Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sbb-radio-button, sbb-radio-button-panel): implement native form support #3160

Merged
merged 35 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c2839c7
feat(sbb-radio-button): form association - first implementation
TomMenga Oct 4, 2024
f342375
Merge branch 'refs/heads/main' into feat/radio-button-form-native
TomMenga Oct 4, 2024
283bfc8
feat(sbb-radio-button): implement standalone focus and keyboard handling
TomMenga Oct 7, 2024
fa7d7f4
feat(sbb-radio-button): remove native input
TomMenga Oct 9, 2024
93786e0
feat(sbb-radio-group): adapt to the radio standalone implementation
TomMenga Oct 9, 2024
cd53c5d
feat(sbb-radio-button): add standalone stories
TomMenga Oct 9, 2024
d1f1265
feat(sbb-radio-button): update snapshots
TomMenga Oct 9, 2024
e54164d
test(sbb-radio-button, sbb-radio-button-panel): update spec tests
TomMenga Oct 14, 2024
d91015d
docs(sbb-radio-button, sbb-radio-button-panel): update docs
TomMenga Oct 14, 2024
eff70da
docs(sbb-radio-button, sbb-radio-button-panel): update storybook
TomMenga Oct 14, 2024
cb0572f
feat(sbb-radio-button, sbb-radio-button-panel): add 'change' and 'inp…
TomMenga Oct 14, 2024
72893f8
feat(sbb-radio-button-group): add 'change' and 'input' events
TomMenga Oct 14, 2024
e93c6df
test(sbb-radio-button-group): add spec tests
TomMenga Oct 18, 2024
66dc63a
docs(sbb-radio-button, sbb-radio-button-group): update with 'standalo…
TomMenga Oct 18, 2024
90f94c2
test(sbb-radio-button): add spec tests
TomMenga Oct 18, 2024
4d4a87d
feat(sbb-radio-button-panel): handle expansion-panel keyboard navigat…
TomMenga Oct 18, 2024
3d0284e
Merge branch 'refs/heads/main' into feat/radio-button-form-native
TomMenga Oct 18, 2024
42b126d
docs(sbb-radio-button): update docs
TomMenga Oct 18, 2024
c872f43
docs(sbb-radio-button): update docs
TomMenga Oct 18, 2024
80fe9aa
chore(sbb-radio-button): fix linting
TomMenga Oct 18, 2024
04328fd
feat(sbb-radio-button-panel): handle selection by keyboard
TomMenga Oct 18, 2024
4c28844
feat(sbb-radio-button-group): handle value preservation
TomMenga Oct 21, 2024
5331b3d
Merge branch 'refs/heads/main' into feat/radio-button-form-native
TomMenga Oct 21, 2024
56d5ba4
test(sbb-radio-button): enhance ssr test
TomMenga Oct 23, 2024
d05caca
fix(sbb-radio-button): pr feedbacks
TomMenga Oct 23, 2024
d3a9867
Merge branch 'refs/heads/main' into feat/radio-button-form-native
TomMenga Oct 30, 2024
0fb5777
fix(sbb-radio-button): minor pr fixes
TomMenga Oct 30, 2024
623d70b
fix(sbb-radio-button): ignore non-visible radios
TomMenga Oct 30, 2024
f6a467e
fix(sbb-radio-button): handle groups with the same name
TomMenga Oct 30, 2024
e4e2d2b
feat(sbb-radio-button-group)!: removed details from `change` and `inp…
TomMenga Nov 11, 2024
0a1c48a
refactor(radio-button-registry): now use 'WeakMap'
TomMenga Nov 13, 2024
696facb
fix(sbb-radio-button): minor fixes
TomMenga Nov 13, 2024
b82a997
test(radio-button-registry): add spec tests
TomMenga Nov 13, 2024
514d19d
test(radio-button-registry): add spec tests
TomMenga Nov 14, 2024
f6c6a7e
Merge branch 'refs/heads/main' into feat/radio-button-form-native
TomMenga Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading