Skip to content

Commit

Permalink
feat(sbb-radio-button, sbb-radio-button-panel): implement native form…
Browse files Browse the repository at this point in the history
… support (#3160)

BREAKING CHANGE: Removed `SbbRadioButtonGroupEventDetail` from the `change`, `input` and `didChange` events of the `sbb-radio-button-group`.
As an alternative to `event.detail.value` use `radioButtonGroup.value`
  • Loading branch information
TomMenga authored Nov 19, 2024
1 parent 212992e commit e113c6a
Show file tree
Hide file tree
Showing 29 changed files with 2,077 additions and 714 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
/* @web/test-runner snapshot v1 */
export const snapshots = {};

snapshots["sbb-autocomplete-grid Safari DOM"] =
`<sbb-autocomplete-grid
data-state="closed"
id="sbb-autocomplete-grid-1"
role="grid"
>
snapshots["sbb-autocomplete-grid Chrome-Firefox DOM"] =
`<sbb-autocomplete-grid data-state="closed">
<sbb-autocomplete-grid-row
id="sbb-autocomplete-grid-row-1"
role="row"
Expand Down Expand Up @@ -55,9 +51,9 @@ snapshots["sbb-autocomplete-grid Safari DOM"] =
</sbb-autocomplete-grid-row>
</sbb-autocomplete-grid>
`;
/* end snapshot sbb-autocomplete-grid Safari DOM */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox DOM */

snapshots["sbb-autocomplete-grid Safari Shadow DOM"] =
snapshots["sbb-autocomplete-grid Chrome-Firefox Shadow DOM"] =
`<div class="sbb-autocomplete__gap-fix">
</div>
<div class="sbb-autocomplete__container">
Expand All @@ -79,18 +75,26 @@ snapshots["sbb-autocomplete-grid Safari Shadow DOM"] =
</div>
<div class="sbb-autocomplete__panel">
<div class="sbb-autocomplete__wrapper">
<div class="sbb-autocomplete__options">
<div
class="sbb-autocomplete__options"
id="sbb-autocomplete-grid-2"
role="grid"
>
<slot>
</slot>
</div>
</div>
</div>
</div>
`;
/* end snapshot sbb-autocomplete-grid Safari Shadow DOM */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox Shadow DOM */

snapshots["sbb-autocomplete-grid Chrome-Firefox DOM"] =
`<sbb-autocomplete-grid data-state="closed">
snapshots["sbb-autocomplete-grid Safari DOM"] =
`<sbb-autocomplete-grid
data-state="closed"
id="sbb-autocomplete-grid-1"
role="grid"
>
<sbb-autocomplete-grid-row
id="sbb-autocomplete-grid-row-1"
role="row"
Expand Down Expand Up @@ -139,9 +143,9 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox DOM"] =
</sbb-autocomplete-grid-row>
</sbb-autocomplete-grid>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox DOM */
/* end snapshot sbb-autocomplete-grid Safari DOM */

snapshots["sbb-autocomplete-grid Chrome-Firefox Shadow DOM"] =
snapshots["sbb-autocomplete-grid Safari Shadow DOM"] =
`<div class="sbb-autocomplete__gap-fix">
</div>
<div class="sbb-autocomplete__container">
Expand All @@ -163,28 +167,24 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox Shadow DOM"] =
</div>
<div class="sbb-autocomplete__panel">
<div class="sbb-autocomplete__wrapper">
<div
class="sbb-autocomplete__options"
id="sbb-autocomplete-grid-2"
role="grid"
>
<div class="sbb-autocomplete__options">
<slot>
</slot>
</div>
</div>
</div>
</div>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox Shadow DOM */
/* end snapshot sbb-autocomplete-grid Safari Shadow DOM */

snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome"] =
snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox"] =
`<p>
{
"role": "WebArea",
"role": "document",
"name": "",
"children": [
{
"role": "text",
"role": "statictext",
"name": "​"
},
{
Expand All @@ -197,16 +197,16 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome"] =
}
</p>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox */

snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox"] =
snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome"] =
`<p>
{
"role": "document",
"role": "WebArea",
"name": "",
"children": [
{
"role": "statictext",
"role": "text",
"name": "​"
},
{
Expand All @@ -219,5 +219,5 @@ snapshots["sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox"] =
}
</p>
`;
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Firefox */
/* end snapshot sbb-autocomplete-grid Chrome-Firefox A11y tree Chrome */

1 change: 1 addition & 0 deletions src/elements/core/mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from './mixins/constructor.js';
export * from './mixins/disabled-mixin.js';
export * from './mixins/form-associated-checkbox-mixin.js';
export * from './mixins/form-associated-mixin.js';
export * from './mixins/form-associated-radio-button-mixin.js';
export * from './mixins/hydration-mixin.js';
export * from './mixins/named-slot-list-mixin.js';
export * from './mixins/negative-mixin.js';
Expand Down
2 changes: 1 addition & 1 deletion src/elements/core/mixins/form-associated-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { property, state } from 'lit/decorators.js';

import type { AbstractConstructor } from './constructor.js';

export declare abstract class SbbFormAssociatedMixinType<V = string> {
export declare abstract class SbbFormAssociatedMixinType<V = string> extends LitElement {
public get form(): HTMLFormElement | null;
public get name(): string;
public set name(value: string);
Expand Down
Loading

0 comments on commit e113c6a

Please sign in to comment.