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-checkbox, sbb-radio-button): split into regular and panel variants #2552

Merged
merged 109 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
bef4732
feat: common elements creation
MarioCastigliano Mar 24, 2024
3e254fc
feat: strip selection panel functions from checkbox
MarioCastigliano Mar 28, 2024
8962320
feat: checkbox-panel implementation
MarioCastigliano Mar 28, 2024
30e43d8
feat: checkbox-group support for checkbox-panel
MarioCastigliano Mar 28, 2024
bd6d5de
feat: strip selection-panel features from radio-button
MarioCastigliano Mar 28, 2024
67a2a3a
feat: radio-button-panel implementation
MarioCastigliano Apr 2, 2024
33d5184
feat: radio-button-group support for radio-button-panel
MarioCastigliano Apr 2, 2024
77ecf93
refactor: improve code quality
MarioCastigliano Apr 2, 2024
d0abb6a
refactor: selection panel support for new components
MarioCastigliano Apr 2, 2024
6458df2
feat: radio-button-group and checkbox-group stories with panel variants
MarioCastigliano Apr 3, 2024
23f7c2d
feat: improve code and add stories
MarioCastigliano Apr 3, 2024
a3eb554
fix: integrity
MarioCastigliano Apr 3, 2024
158a74d
feat: implement tests and stories
MarioCastigliano Apr 4, 2024
912d84d
refactor: rename selection panel
MarioCastigliano Apr 4, 2024
835b516
refactor: improve code
MarioCastigliano Apr 4, 2024
4c92960
docs: radio-button-panel readme
MarioCastigliano Apr 4, 2024
a9c06d1
fix: integrity
MarioCastigliano Apr 4, 2024
6b89356
docs: fix link
MarioCastigliano Apr 4, 2024
eff5a84
refactor: reoder code
MarioCastigliano Apr 4, 2024
85f62dd
fix: graphical regressions
MarioCastigliano Apr 4, 2024
1414357
fix: build
MarioCastigliano Apr 5, 2024
cd98d93
fix: tests
MarioCastigliano Apr 5, 2024
079107d
fix: lint
MarioCastigliano Apr 9, 2024
fed3d93
fix: lint
MarioCastigliano Apr 9, 2024
650202d
fix: integrity
MarioCastigliano Apr 9, 2024
99f0983
fix: build
MarioCastigliano Apr 9, 2024
f16be0a
refactor: use correct method to set attributes
MarioCastigliano Apr 10, 2024
5aa8fc5
fix: address review comments
MarioCastigliano Apr 11, 2024
c2e31eb
fix: integrity
MarioCastigliano Apr 11, 2024
545d2c0
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 12, 2024
fca9cb1
fix: build
MarioCastigliano Apr 12, 2024
8dd503f
fix: integrity
MarioCastigliano Apr 12, 2024
3ba9961
fix: integrity
MarioCastigliano Apr 12, 2024
ae5c449
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 12, 2024
8747e61
fix: tests
MarioCastigliano Apr 12, 2024
1b1123e
fix: radio-button tests according to review
MarioCastigliano Apr 15, 2024
ca6ef06
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 15, 2024
3e5260a
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 15, 2024
eff2f51
fix: wrong mixin import
MarioCastigliano Apr 15, 2024
33f51b5
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 16, 2024
ff13b78
fix: build
MarioCastigliano Apr 16, 2024
345a246
feat: improve stories
MarioCastigliano Apr 16, 2024
ec9ff04
refactor: move events and event emitters in common elememt
MarioCastigliano Apr 16, 2024
ed38d5d
fix: typo
MarioCastigliano Apr 16, 2024
572d131
refactor: improve code as per review
MarioCastigliano Apr 16, 2024
d52747d
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 26, 2024
4e5abb1
fix: lint
MarioCastigliano Apr 26, 2024
be291f8
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 26, 2024
82d8acf
fix: tests
MarioCastigliano Apr 26, 2024
c4aa463
refactor: move stories to preserve chromatic history
MarioCastigliano Apr 26, 2024
0bf86f1
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Apr 29, 2024
1b3d0de
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 6, 2024
f397699
fix: address review comments
MarioCastigliano May 6, 2024
6ff9535
refactor: rename data attribute
MarioCastigliano May 6, 2024
16e387a
fix: imports
MarioCastigliano May 6, 2024
3fddac3
refactor: use correct import order
MarioCastigliano May 7, 2024
412d6f8
refactor: improve css
MarioCastigliano May 7, 2024
c820712
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 7, 2024
4408426
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 8, 2024
975fc77
fix: lint
MarioCastigliano May 8, 2024
1d3e442
refactor: panel mixin, screenreader label and other small things
MarioCastigliano May 14, 2024
740b7f8
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 14, 2024
b9ac2db
fix: integrity
MarioCastigliano May 14, 2024
96a12cb
refactor: add size to checkbox-panel and radio-button-panel
MarioCastigliano May 15, 2024
3934249
fix: tests
MarioCastigliano May 16, 2024
019e06a
test: optimize radio-button and checkbox tests
MarioCastigliano May 17, 2024
13215fa
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 17, 2024
7cd12d2
fix: tests
MarioCastigliano May 17, 2024
10f6b31
fix: address review comments
MarioCastigliano May 27, 2024
f271d0e
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 28, 2024
deb6594
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 28, 2024
310cc8f
refactor: use localName
MarioCastigliano May 28, 2024
855c427
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 28, 2024
2635094
fix: tests
MarioCastigliano May 28, 2024
e4f7792
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 29, 2024
fec6581
refactor: improve styling
MarioCastigliano May 29, 2024
525a24c
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 29, 2024
9c89c6b
fix: stories
MarioCastigliano May 29, 2024
bbb01ad
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano May 30, 2024
3327efa
feat: add stories for size and color variant
MarioCastigliano May 30, 2024
16db011
fix: remove unncessary code
MarioCastigliano May 30, 2024
696d2c5
fix: remove unnecessary code
MarioCastigliano May 31, 2024
04e3b48
docs: update readme files
MarioCastigliano May 31, 2024
a2563fe
fix: review comments
MarioCastigliano May 31, 2024
1057c55
fix: integrity
MarioCastigliano Jun 3, 2024
1882b53
Merge branch 'refs/heads/main' into refactor/split-panel-components
jeripeierSBB Jun 4, 2024
4a2ece9
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Jun 5, 2024
ed009b6
refactor: move css logic and avoid duplications (#2718)
jeripeierSBB Jun 6, 2024
5af71bc
Merge remote-tracking branch 'origin/main' into refactor/split-panel-…
MarioCastigliano Jun 7, 2024
5af553f
Merge branch 'refs/heads/main' into refactor/split-panel-components
jeripeierSBB Jun 10, 2024
eb195a8
fix: checkbox-panel stuck on checked
MarioCastigliano Jun 12, 2024
eb01d56
feat: improve stories
MarioCastigliano Jun 12, 2024
ba20270
feat: panel elements in groups expand full width
MarioCastigliano Jun 12, 2024
31022c7
feat: move badge slot to panel components
MarioCastigliano Jun 12, 2024
a335f84
fix: integrity
MarioCastigliano Jun 12, 2024
43a724e
feat: improve stories
MarioCastigliano Jun 12, 2024
72786df
fix: tests
MarioCastigliano Jun 12, 2024
a6bf2d2
Merge branch 'refs/heads/main' into refactor/split-panel-components
jeripeierSBB Jun 13, 2024
729d7a9
refactor: badge name
jeripeierSBB Jun 13, 2024
4de192b
fix: border radius of selection expansion panel
jeripeierSBB Jun 13, 2024
1d94ee7
refactor: clean selection expansion panel stories
jeripeierSBB Jun 13, 2024
037dbae
Merge branch 'refs/heads/main' into refactor/split-panel-components
jeripeierSBB Jun 13, 2024
5a4dc61
refactor: show actions in stories
jeripeierSBB Jun 13, 2024
40cc7cf
fix: remove unused data attribute
jeripeierSBB Jun 13, 2024
85d9973
fix: accessibility of expansion state
jeripeierSBB Jun 13, 2024
e408359
fix: initial loading should not contain animation
jeripeierSBB Jun 13, 2024
e2ffd20
test: test that fade in animation was skipped
jeripeierSBB Jun 14, 2024
9e94268
Merge branch 'refs/heads/main' into refactor/split-panel-components
jeripeierSBB Jun 14, 2024
4302823
fix: remove content logic for radio and fix badge docs
jeripeierSBB Jun 14, 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
2 changes: 1 addition & 1 deletion src/components/card/card-badge/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The `sbb-card-badge` can contain some information like prices or discounts,
and can be used in [sbb-card](/docs/components-sbb-card-sbb-card--docs) or
[sbb-selection-panel](/docs/components-sbb-selection-panel--docs).
[sbb-selection-expansion-panel](/docs/components-sbb-selection-expansion-panel--docs).

To achieve the correct spacing between elements inside the card badge, we recommend to use `span`-elements.
All content parts are presented with a predefined gap in between.
Expand Down
2 changes: 2 additions & 0 deletions src/components/checkbox.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export * from './checkbox/checkbox.js';
export * from './checkbox/checkbox-group.js';
export * from './checkbox/checkbox-panel.js';
export * from './checkbox/common.js';
104 changes: 74 additions & 30 deletions src/components/checkbox/checkbox-group/checkbox-group.stories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { withActions } from '@storybook/addon-actions/decorator';
import type { InputType } from '@storybook/types';
import type { Meta, StoryObj, ArgTypes, Args, Decorator } from '@storybook/web-components';
import type { ArgTypes, Args, Decorator, Meta, StoryObj } from '@storybook/web-components';
import type { TemplateResult } from 'lit';
import { html, nothing } from 'lit';
import { styleMap } from 'lit/directives/style-map.js';
Expand All @@ -12,6 +12,7 @@ import readme from './readme.md?raw';

import './checkbox-group.js';
import '../checkbox.js';
import '../checkbox-panel.js';
import '../../form-error.js';

const longLabelText = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer enim elit, ultricies in tincidunt
Expand Down Expand Up @@ -48,6 +49,18 @@ const checkboxes = (
</sbb-checkbox>
`;

const checkboxPanels = (
checked: boolean,
disabledSingle: boolean,
label: string,
): TemplateResult => html`
<sbb-checkbox-panel value="checkbox-1" ?checked=${checked}> ${label} 1 </sbb-checkbox-panel>
<sbb-checkbox-panel value="checkbox-2" ?disabled=${disabledSingle}>
${label} 2
</sbb-checkbox-panel>
<sbb-checkbox-panel value="checkbox-3"> ${label} 3 </sbb-checkbox-panel>
`;

const DefaultTemplate = ({
checked,
disabledSingle,
Expand All @@ -61,6 +74,12 @@ const DefaultTemplate = ({
</sbb-checkbox-group>
`;

const PanelTemplate = ({ checked, disabledSingle, label, ...args }: Args): TemplateResult => html`
<sbb-checkbox-group ${sbbSpread(args)}>
${checkboxPanels(checked, disabledSingle, label)}
</sbb-checkbox-group>
`;

const ErrorMessageTemplate = ({
checked,
disabledSingle,
Expand Down Expand Up @@ -254,6 +273,10 @@ const basicArgTypes: ArgTypes = {
label,
checked,
disabledSingle,
};

const checkboxArgTypes: ArgTypes = {
...basicArgTypes,
iconName,
iconPlacement,
};
Expand All @@ -267,12 +290,16 @@ const basicArgs: Args = {
label: 'Label',
checked: true,
disabledSingle: false,
};

const checkboxArgs: Args = {
...basicArgs,
iconName: undefined,
iconPlacement: undefined,
};

const basicArgsVertical = {
...basicArgs,
const checkboxArgsVertical = {
...checkboxArgs,
orientation: orientation.options[1],
};

Expand All @@ -288,86 +315,103 @@ const iconEnd: Args = {

export const horizontal: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs },
argTypes: checkboxArgTypes,
args: { ...checkboxArgs },
};

export const vertical: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgsVertical },
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical },
};

export const verticalToHorizontal: StoryObj = {
render: DefaultTemplate,
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical, 'horizontal-from': 'medium' },
};
export const horizontalPanel: StoryObj = {
render: PanelTemplate,
argTypes: basicArgTypes,
args: { ...basicArgsVertical, 'horizontal-from': 'medium' },
args: { ...basicArgs },
};

export const verticalPanel: StoryObj = {
render: PanelTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, orientation: orientation.options[1] },
};

export const verticalToHorizontalPanel: StoryObj = {
render: PanelTemplate,
argTypes: checkboxArgTypes,
args: { ...basicArgs, orientation: orientation.options[1], 'horizontal-from': 'medium' },
};

export const horizontalSizeM: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, size: 'm' },
argTypes: checkboxArgTypes,
args: { ...checkboxArgs, size: 'm' },
};

export const horizontalDisabled: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, disabled: true, disabledSingle: true },
argTypes: checkboxArgTypes,
args: { ...checkboxArgs, disabled: true, disabledSingle: true },
};

export const verticalDisabled: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgsVertical, disabled: true, disabledSingle: true },
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical, disabled: true, disabledSingle: true },
};

export const horizontalIconStart: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, ...iconStart },
argTypes: checkboxArgTypes,
args: { ...checkboxArgs, ...iconStart },
};

export const verticalIconStart: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgsVertical, ...iconStart },
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical, ...iconStart },
};

export const horizontalIconEnd: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, ...iconEnd },
argTypes: checkboxArgTypes,
args: { ...checkboxArgs, ...iconEnd },
};

export const verticalIconEnd: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgsVertical, ...iconEnd },
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical, ...iconEnd },
};

export const verticalIconEndLongLabel: StoryObj = {
render: DefaultTemplate,
argTypes: basicArgTypes,
args: { ...basicArgsVertical, ...iconEnd, label: longLabelText },
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical, ...iconEnd, label: longLabelText },
};

export const horizontalWithSbbFormError: StoryObj = {
render: ErrorMessageTemplate,
argTypes: basicArgTypes,
args: { ...basicArgs, required: true },
argTypes: checkboxArgTypes,
args: { ...checkboxArgs, required: true },
};

export const verticalWithSbbFormError: StoryObj = {
render: ErrorMessageTemplate,
argTypes: basicArgTypes,
args: { ...basicArgsVertical, required: true },
argTypes: checkboxArgTypes,
args: { ...checkboxArgsVertical, required: true },
};

export const indeterminateGroup: StoryObj = {
render: IndeterminateGroupTemplate,
argTypes: { ...basicArgTypes },
args: { ...basicArgsVertical, checked: undefined },
argTypes: { ...checkboxArgTypes },
args: { ...checkboxArgsVertical, checked: undefined },
};

const meta: Meta = {
Expand Down
29 changes: 18 additions & 11 deletions src/components/checkbox/checkbox-group/checkbox-group.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
import { html, LitElement } from 'lit';
import { LitElement, html } from 'lit';
MarioCastigliano marked this conversation as resolved.
Show resolved Hide resolved
import { customElement, property } from 'lit/decorators.js';

import { getNextElementIndex, interactivityChecker, isArrowKeyPressed } from '../../core/a11y.js';
import { SbbConnectedAbortController, SbbSlotStateController } from '../../core/controllers.js';
import type { SbbHorizontalFrom, SbbOrientation } from '../../core/interfaces.js';
import { SbbDisabledMixin } from '../../core/mixins.js';
import type { SbbCheckboxPanelElement } from '../checkbox-panel.js';
import type { SbbCheckboxElement, SbbCheckboxSize } from '../checkbox.js';

import style from './checkbox-group.scss?lit&inline';
Expand Down Expand Up @@ -35,9 +36,11 @@ export class SbbCheckboxGroupElement extends SbbDisabledMixin(LitElement) {
public orientation: SbbOrientation = 'horizontal';

/** List of contained checkbox elements. */
public get checkboxes(): SbbCheckboxElement[] {
return Array.from(this.querySelectorAll?.('sbb-checkbox') ?? []).filter(
(el: SbbCheckboxElement) => el.closest('sbb-checkbox-group') === this,
public get checkboxes(): (SbbCheckboxElement | SbbCheckboxPanelElement)[] {
return <(SbbCheckboxElement | SbbCheckboxPanelElement)[]>(
Array.from(this.querySelectorAll?.('sbb-checkbox, sbb-checkbox-panel') ?? []).filter(
(el) => el.closest('sbb-checkbox-group') === this,
)
);
}

Expand All @@ -52,7 +55,10 @@ export class SbbCheckboxGroupElement extends SbbDisabledMixin(LitElement) {
super.connectedCallback();
const signal = this._abort.signal;
this.addEventListener('keydown', (e) => this._handleKeyDown(e), { signal });
this.toggleAttribute('data-has-selection-panel', !!this.querySelector?.('sbb-selection-panel'));
this.toggleAttribute(
'data-has-selection-panel',
MarioCastigliano marked this conversation as resolved.
Show resolved Hide resolved
!!this.querySelector?.('sbb-selection-expansion-panel'),
);
}

protected override willUpdate(changedProperties: PropertyValues<this>): void {
Expand All @@ -68,24 +74,25 @@ export class SbbCheckboxGroupElement extends SbbDisabledMixin(LitElement) {
}

private _handleKeyDown(evt: KeyboardEvent): void {
const enabledCheckboxes: SbbCheckboxElement[] = this.checkboxes.filter(
(checkbox: SbbCheckboxElement) =>
!checkbox.disabled && interactivityChecker.isVisible(checkbox),
);
const enabledCheckboxes: (SbbCheckboxElement | SbbCheckboxPanelElement)[] =
this.checkboxes.filter(
(checkbox: SbbCheckboxElement | SbbCheckboxPanelElement) =>
!checkbox.disabled && interactivityChecker.isVisible(checkbox as HTMLElement),
);

if (
!enabledCheckboxes ||
// don't trap nested handling
((evt.target as HTMLElement) !== this &&
(evt.target as HTMLElement).parentElement !== this &&
(evt.target as HTMLElement).parentElement!.nodeName !== 'SBB-SELECTION-PANEL')
(evt.target as HTMLElement).parentElement!.nodeName !== 'SBB-SELECTION-EXPANSION-PANEL')
MarioCastigliano marked this conversation as resolved.
Show resolved Hide resolved
) {
return;
}

if (isArrowKeyPressed(evt)) {
const current: number = enabledCheckboxes.findIndex(
(e: SbbCheckboxElement) => e === evt.target,
(e: SbbCheckboxElement | SbbCheckboxPanelElement) => e === evt.target,
);
const nextIndex: number = getNextElementIndex(evt, current, enabledCheckboxes.length);
enabledCheckboxes[nextIndex]?.focus();
Expand Down
22 changes: 11 additions & 11 deletions src/components/checkbox/checkbox-group/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The `sbb-checkbox-group` component is used as a container for one or multiple
[sbb-checkbox](/docs/components-sbb-checkbox-sbb-checkbox--docs) components,
or, alternatively, for a collection of [sbb-selection-panel](/docs/components-sbb-selection-panel--docs).
or, alternatively, for a collection of [sbb-selection-expansion-panel](/docs/components-sbb-selection-expansion-panel--docs).

```html
<sbb-checkbox-group>
Expand All @@ -10,7 +10,7 @@ or, alternatively, for a collection of [sbb-selection-panel](/docs/components-sb
</sbb-checkbox-group>

<sbb-checkbox-group>
<sbb-selection-panel>
<sbb-selection-expansion-panel>
<sbb-checkbox>
Value
<span slot="suffix">
Expand All @@ -19,7 +19,7 @@ or, alternatively, for a collection of [sbb-selection-panel](/docs/components-sb
<span class="sbb-text-m sbb-text--bold">40.00</span>
</span>
</sbb-checkbox>
</sbb-selection-panel>
</sbb-selection-expansion-panel>
</sbb-checkbox-group>
```

Expand Down Expand Up @@ -73,14 +73,14 @@ Two values are available, `s` and `m`, which is the default

## Properties

| Name | Attribute | Privacy | Type | Default | Description |
| ---------------- | ----------------- | ------- | -------------------------------- | -------------- | ------------------------------------------------------------------------------ |
| `required` | `required` | public | `boolean` | `false` | Whether the checkbox group is required. |
| `size` | `size` | public | `SbbCheckboxSize` | `'m'` | Size variant, either m or s. |
| `horizontalFrom` | `horizontal-from` | public | `SbbHorizontalFrom \| undefined` | | Overrides the behaviour of `orientation` property. |
| `orientation` | `orientation` | public | `SbbOrientation` | `'horizontal'` | Indicates the orientation of the checkboxes inside the `<sbb-checkbox-group>`. |
| `checkboxes` | - | public | `SbbCheckboxElement[]` | | List of contained checkbox elements. |
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |
| Name | Attribute | Privacy | Type | Default | Description |
| ---------------- | ----------------- | ------- | --------------------------------------------------- | -------------- | ------------------------------------------------------------------------------ |
| `required` | `required` | public | `boolean` | `false` | Whether the checkbox group is required. |
| `size` | `size` | public | `SbbCheckboxSize` | `'m'` | Size variant, either m or s. |
| `horizontalFrom` | `horizontal-from` | public | `SbbHorizontalFrom \| undefined` | | Overrides the behaviour of `orientation` property. |
| `orientation` | `orientation` | public | `SbbOrientation` | `'horizontal'` | Indicates the orientation of the checkboxes inside the `<sbb-checkbox-group>`. |
| `checkboxes` | - | public | `(SbbCheckboxElement \| SbbCheckboxPanelElement)[]` | | List of contained checkbox elements. |
| `disabled` | `disabled` | public | `boolean` | `false` | Whether the component is disabled. |

## Slots

Expand Down
1 change: 1 addition & 0 deletions src/components/checkbox/checkbox-panel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './checkbox-panel/checkbox-panel.js';
Loading
Loading