Skip to content

Commit

Permalink
Merge branch 'main' into shadow-scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Dec 18, 2024
2 parents 053e699 + ee4494f commit 3c375df
Show file tree
Hide file tree
Showing 32 changed files with 137 additions and 108 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "3.7.0",
"eslint-plugin-import-x": "4.5.0",
"eslint-plugin-import-x": "4.5.1",
"eslint-plugin-lit": "1.15.0",
"eslint-plugin-react": "7.37.2",
"eslint-plugin-storybook": "0.11.1",
Expand Down
2 changes: 1 addition & 1 deletion src/elements/button/accent-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ guard against such cases in your component.
| --------------------- | ---------------------- | ------- | ------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |
| `disabledInteractive` | `disabled-interactive` | public | `boolean` | `false` | Whether the button should be aria-disabled but stay interactive. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `iconName` | `icon-name` | public | `string` | `''` | The icon name we want to use, choose from the small icon variants from the ui-icons category from here https://icons.app.sbb.ch. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
Expand Down
2 changes: 1 addition & 1 deletion src/elements/button/button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ guard against such cases in your component.
| --------------------- | ---------------------- | ------- | ------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |
| `disabledInteractive` | `disabled-interactive` | public | `boolean` | `false` | Whether the button should be aria-disabled but stay interactive. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `iconName` | `icon-name` | public | `string` | `''` | The icon name we want to use, choose from the small icon variants from the ui-icons category from here https://icons.app.sbb.ch. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
Expand Down
2 changes: 1 addition & 1 deletion src/elements/button/mini-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ guard against such cases in your component.
| --------------------- | ---------------------- | ------- | ------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |
| `disabledInteractive` | `disabled-interactive` | public | `boolean` | `false` | Whether the button should be aria-disabled but stay interactive. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `iconName` | `icon-name` | public | `string` | `''` | The icon name we want to use, choose from the small icon variants from the ui-icons category from here https://icons.app.sbb.ch. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
Expand Down
2 changes: 1 addition & 1 deletion src/elements/button/secondary-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ guard against such cases in your component.
| --------------------- | ---------------------- | ------- | ------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |
| `disabledInteractive` | `disabled-interactive` | public | `boolean` | `false` | Whether the button should be aria-disabled but stay interactive. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `iconName` | `icon-name` | public | `string` | `''` | The icon name we want to use, choose from the small icon variants from the ui-icons category from here https://icons.app.sbb.ch. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
Expand Down
2 changes: 1 addition & 1 deletion src/elements/button/transparent-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ guard against such cases in your component.
| --------------------- | ---------------------- | ------- | ------------------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |
| `disabledInteractive` | `disabled-interactive` | public | `boolean` | `false` | Whether the button should be aria-disabled but stay interactive. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `iconName` | `icon-name` | public | `string` | `''` | The icon name we want to use, choose from the small icon variants from the ui-icons category from here https://icons.app.sbb.ch. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
Expand Down
2 changes: 1 addition & 1 deletion src/elements/calendar/calendar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe(`sbb-calendar`, () => {
});

it('opens month view with current date', async () => {
element.selected = undefined;
element.selected = null;
element.now = '2022-08-15';
element.view = 'month';
await waitForLitRender(element);
Expand Down
6 changes: 3 additions & 3 deletions src/elements/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class SbbCalendarElement<T = Date> extends SbbHydrationMixin(LitElement) {

/** The maximum valid date. Takes T Object, ISOString, and Unix Timestamp (number of seconds since Jan 1, 1970). */
@property()
public set max(value: SbbDateLike<T> | undefined) {
public set max(value: SbbDateLike<T> | null) {
this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
}
public get max(): T | null {
Expand All @@ -133,7 +133,7 @@ class SbbCalendarElement<T = Date> extends SbbHydrationMixin(LitElement) {

/** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
@property()
public set now(value: SbbDateLike<T> | undefined) {
public set now(value: SbbDateLike<T> | null) {
this._now = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
}
public get now(): T {
Expand All @@ -143,7 +143,7 @@ class SbbCalendarElement<T = Date> extends SbbHydrationMixin(LitElement) {

/** The selected date. Takes T Object, ISOString, and Unix Timestamp (number of seconds since Jan 1, 1970). */
@property()
public set selected(value: SbbDateLike<T> | undefined) {
public set selected(value: SbbDateLike<T> | null) {
this._selectedDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value));
if (
!!this._selectedDate &&
Expand Down
14 changes: 7 additions & 7 deletions src/elements/card/card-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ as it is used for search engines and screen-reader users.

## Properties

| Name | Attribute | Privacy | Type | Default | Description |
| -------- | --------- | ------- | ------------------------- | ---------- | -------------------------------------------------------------- |
| `active` | `active` | public | `boolean` | `false` | Whether the card is active. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `type` | `type` | public | `SbbButtonType` | `'button'` | The type attribute to use for the button. |
| `value` | `value` | public | `string \| null` | `null` | Value of the form element. |
| Name | Attribute | Privacy | Type | Default | Description |
| -------- | --------- | ------- | ------------------------- | ---------- | ----------------------------------------------------------- |
| `active` | `active` | public | `boolean` | `false` | Whether the card is active. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `type` | `type` | public | `SbbButtonType` | `'button'` | The type attribute to use for the button. |
| `value` | `value` | public | `string \| null` | `null` | Value of the form element. |

## Slots

Expand Down
2 changes: 1 addition & 1 deletion src/elements/core/base-elements/button-base-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ abstract class SbbButtonBaseElement extends SbbFormAssociatedMixin(SbbActionBase
return (this.getAttribute('type') as SbbButtonType) ?? 'button';
}

/** The <form> element to associate the button with. */
/** The `<form>` element to associate the button with. */
@property()
public override set form(value: string) {
this._formId = value;
Expand Down
16 changes: 8 additions & 8 deletions src/elements/datepicker/datepicker-next-day/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ both standalone or within the `sbb-form-field`, they must have the same parent e

## Properties

| Name | Attribute | Privacy | Type | Default | Description |
| ------------ | ------------- | ------- | ------------------------------------------- | ---------- | -------------------------------------------------------------- |
| `datePicker` | `date-picker` | public | `string \| SbbDatepickerElement<T> \| null` | `null` | Datepicker reference. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
| `type` | `type` | public | `SbbButtonType` | `'button'` | The type attribute to use for the button. |
| `value` | `value` | public | `string \| null` | `null` | Value of the form element. |
| Name | Attribute | Privacy | Type | Default | Description |
| ------------ | ------------- | ------- | ------------------------------------------- | ---------- | ----------------------------------------------------------- |
| `datePicker` | `date-picker` | public | `string \| SbbDatepickerElement<T> \| null` | `null` | Datepicker reference. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
| `type` | `type` | public | `SbbButtonType` | `'button'` | The type attribute to use for the button. |
| `value` | `value` | public | `string \| null` | `null` | Value of the form element. |
16 changes: 8 additions & 8 deletions src/elements/datepicker/datepicker-previous-day/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ both standalone or within the `sbb-form-field`, they must have the same parent e

## Properties

| Name | Attribute | Privacy | Type | Default | Description |
| ------------ | ------------- | ------- | ------------------------------------------- | ---------- | -------------------------------------------------------------- |
| `datePicker` | `date-picker` | public | `string \| SbbDatepickerElement<T> \| null` | `null` | Datepicker reference. |
| `form` | `form` | public | `HTMLFormElement \| null` | | Returns the form owner of the internals of the target element. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
| `type` | `type` | public | `SbbButtonType` | `'button'` | The type attribute to use for the button. |
| `value` | `value` | public | `string \| null` | `null` | Value of the form element. |
| Name | Attribute | Privacy | Type | Default | Description |
| ------------ | ------------- | ------- | ------------------------------------------- | ---------- | ----------------------------------------------------------- |
| `datePicker` | `date-picker` | public | `string \| SbbDatepickerElement<T> \| null` | `null` | Datepicker reference. |
| `form` | `form` | public | `HTMLFormElement \| null` | | The `<form>` element to associate the button with. |
| `name` | `name` | public | `string` | | Name of the form element. Will be read from name attribute. |
| `negative` | `negative` | public | `boolean` | `false` | Negative coloring variant flag. |
| `type` | `type` | public | `SbbButtonType` | `'button'` | The type attribute to use for the button. |
| `value` | `value` | public | `string \| null` | `null` | Value of the form element. |
Loading

0 comments on commit 3c375df

Please sign in to comment.