@boostdev/design-system-components 1.1.2 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +38 -14
- package/dist/client.cjs +85 -103
- package/dist/client.css +610 -601
- package/dist/client.d.cts +13 -16
- package/dist/client.d.ts +13 -16
- package/dist/client.js +95 -113
- package/dist/index.cjs +85 -103
- package/dist/index.css +610 -601
- package/dist/index.d.cts +13 -16
- package/dist/index.d.ts +13 -16
- package/dist/index.js +95 -113
- package/dist/native/index.cjs +9 -8
- package/dist/native/index.d.cts +1 -1
- package/dist/native/index.d.ts +1 -1
- package/dist/native/index.js +9 -8
- package/dist/web-components/{chunk-K5CE6HSB.js → chunk-2FGATTGT.js} +79 -17
- package/dist/web-components/{chunk-O4UFI2RX.js → chunk-3REOIRDW.js} +13 -11
- package/dist/web-components/{chunk-5IPHEONG.js → chunk-6I2DBFQ7.js} +1 -0
- package/dist/web-components/{chunk-VM3YHGQ2.js → chunk-AJSXNDAP.js} +1 -2
- package/dist/web-components/{chunk-LSC4N56Q.js → chunk-BX3IPVOB.js} +1 -2
- package/dist/web-components/{chunk-CAPI25CU.js → chunk-DZRSJGPB.js} +3 -3
- package/dist/web-components/{chunk-VSS5ITNE.js → chunk-EBJM3VD4.js} +1 -3
- package/dist/web-components/{chunk-O7I63SQX.js → chunk-HHHRF2PS.js} +6 -12
- package/dist/web-components/{chunk-OTX4COSV.js → chunk-JUKB3BUP.js} +3 -4
- package/dist/web-components/{chunk-IQGLIQSO.js → chunk-N6IMUOY4.js} +2 -5
- package/dist/web-components/{chunk-CJ5ZOO42.js → chunk-OCODKRVZ.js} +68 -44
- package/dist/web-components/{chunk-QDRH46TF.js → chunk-QLZ2362S.js} +1 -3
- package/dist/web-components/{chunk-IK3PTFZ4.js → chunk-T6AETZRP.js} +1 -3
- package/dist/web-components/{chunk-4BX6AWXX.js → chunk-X3FKVHLK.js} +2 -4
- package/dist/web-components/{chunk-A67LCT7C.js → chunk-XNA6WTXG.js} +3 -4
- package/dist/web-components/{chunk-XIENXR7H.js → chunk-YRXCVKHV.js} +1 -3
- package/dist/web-components/{chunk-6T3RKUKG.js → chunk-ZTC6GRP7.js} +1 -2
- package/dist/web-components/globals.js +1 -1
- package/dist/web-components/index.d.ts +571 -1
- package/dist/web-components/index.js +1515 -18
- package/dist/web-components/interaction/bds-accordion.js +1 -1
- package/dist/web-components/interaction/bds-button.d.ts +2 -2
- package/dist/web-components/interaction/bds-button.js +1 -1
- package/dist/web-components/interaction/bds-collapsible.js +1 -1
- package/dist/web-components/interaction/bds-dialog.js +1 -1
- package/dist/web-components/interaction/bds-drawer.js +1 -1
- package/dist/web-components/interaction/form/bds-checkbox.js +1 -1
- package/dist/web-components/interaction/form/bds-combobox.js +1 -1
- package/dist/web-components/interaction/form/bds-number-input.js +1 -1
- package/dist/web-components/interaction/form/bds-radio.js +1 -1
- package/dist/web-components/interaction/form/bds-segmented-control.d.ts +20 -3
- package/dist/web-components/interaction/form/bds-segmented-control.js +1 -1
- package/dist/web-components/interaction/form/bds-select.js +1 -1
- package/dist/web-components/interaction/form/bds-switch.js +1 -1
- package/dist/web-components/interaction/form/bds-textarea.js +1 -1
- package/dist/web-components/ui/bds-alert.js +1 -1
- package/dist/web-components/ui/bds-card.js +1 -1
- package/dist/web-components/ui/bds-notification-banner.js +1 -1
- package/package.json +2 -2
- package/src/components/interaction/Button/Button.module.css +12 -11
- package/src/components/interaction/Button/Button.native.tsx +10 -9
- package/src/components/interaction/Button/Button.tsx +1 -1
- package/src/components/interaction/Command/Command.module.css +3 -7
- package/src/components/interaction/Dialog/Dialog.module.css +7 -5
- package/src/components/interaction/Drawer/Drawer.module.css +48 -25
- package/src/components/interaction/Drawer/Drawer.tsx +21 -17
- package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +1 -3
- package/src/components/interaction/Popover/Popover.module.css +1 -3
- package/src/components/interaction/form/Checkbox/Checkbox.module.css +1 -3
- package/src/components/interaction/form/Combobox/Combobox.module.css +2 -6
- package/src/components/interaction/form/FormInput/FormInput.module.css +1 -3
- package/src/components/interaction/form/NumberInput/NumberInput.module.css +16 -4
- package/src/components/interaction/form/Radio/Radio.module.css +6 -16
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.mdx +74 -25
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +65 -36
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.spec.tsx +127 -56
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.stories.tsx +89 -72
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +40 -62
- package/src/components/interaction/form/SegmentedControl/index.ts +1 -1
- package/src/components/interaction/form/Select/Select.module.css +2 -4
- package/src/components/interaction/form/Switch/Switch.module.css +5 -7
- package/src/components/interaction/form/Switch/Switch.native.spec.tsx +9 -9
- package/src/components/interaction/form/Switch/Switch.native.tsx +2 -2
- package/src/components/interaction/form/Textarea/Textarea.module.css +1 -3
- package/src/components/interaction/form/atoms/InputContainer.stories.tsx +64 -0
- package/src/components/interaction/form/atoms/Label.stories.tsx +33 -0
- package/src/components/interaction/form/atoms/Message.stories.tsx +33 -0
- package/src/components/layout/Card/Card.module.css +1 -3
- package/src/components/ui/Accordion/Accordion.module.css +1 -2
- package/src/components/ui/Alert/Alert.module.css +1 -2
- package/src/components/ui/Calendar/Calendar.module.css +2 -5
- package/src/components/ui/Carousel/Carousel.module.css +1 -3
- package/src/components/ui/NotificationBanner/NotificationBanner.module.css +1 -2
- package/src/components/ui/Pagination/Pagination.module.css +1 -2
- package/src/components/ui/SkipLink/SkipLink.module.css +1 -2
- package/src/components/ui/Table/Table.module.css +1 -2
- package/src/css/bdc.css +16 -11
- package/src/index.ts +1 -1
- package/src/stories/Introduction.mdx +2 -1
- package/src/web-components/globals.ts +3 -3
- package/src/web-components/index.ts +12 -0
- package/src/web-components/interaction/BdsAccordion.mdx +103 -0
- package/src/web-components/interaction/BdsAccordion.stories.tsx +94 -0
- package/src/web-components/interaction/BdsCollapsible.mdx +116 -0
- package/src/web-components/interaction/BdsCollapsible.stories.tsx +68 -0
- package/src/web-components/interaction/BdsDialog.mdx +110 -0
- package/src/web-components/interaction/BdsDialog.stories.tsx +157 -0
- package/src/web-components/interaction/BdsDrawer.mdx +108 -0
- package/src/web-components/interaction/BdsDrawer.stories.tsx +196 -0
- package/src/web-components/interaction/BdsDropdownMenu.mdx +108 -0
- package/src/web-components/interaction/BdsDropdownMenu.stories.tsx +91 -0
- package/src/web-components/interaction/BdsSkipLink.mdx +90 -0
- package/src/web-components/interaction/BdsSkipLink.stories.tsx +68 -0
- package/src/web-components/interaction/BdsTabs.mdx +117 -0
- package/src/web-components/interaction/BdsTabs.stories.tsx +94 -0
- package/src/web-components/interaction/BdsTooltip.mdx +104 -0
- package/src/web-components/interaction/BdsTooltip.stories.tsx +87 -0
- package/src/web-components/interaction/bds-accordion.ts +1 -2
- package/src/web-components/interaction/bds-button.ts +15 -13
- package/src/web-components/interaction/bds-collapsible.ts +1 -0
- package/src/web-components/interaction/bds-dialog.ts +2 -5
- package/src/web-components/interaction/bds-drawer.ts +70 -44
- package/src/web-components/interaction/bds-dropdown-menu-item.ts +124 -0
- package/src/web-components/interaction/bds-dropdown-menu.spec.ts +102 -0
- package/src/web-components/interaction/bds-dropdown-menu.ts +200 -0
- package/src/web-components/interaction/form/BdsCheckbox.mdx +76 -0
- package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +72 -0
- package/src/web-components/interaction/form/BdsCheckboxGroup.mdx +70 -0
- package/src/web-components/interaction/form/BdsCheckboxGroup.stories.tsx +81 -0
- package/src/web-components/interaction/form/BdsCombobox.mdx +71 -0
- package/src/web-components/interaction/form/BdsCombobox.stories.tsx +93 -0
- package/src/web-components/interaction/form/BdsFileInput.mdx +79 -0
- package/src/web-components/interaction/form/BdsFileInput.stories.tsx +69 -0
- package/src/web-components/interaction/form/BdsFormInput.mdx +98 -0
- package/src/web-components/interaction/form/BdsFormInput.stories.tsx +139 -0
- package/src/web-components/interaction/form/BdsNumberInput.mdx +70 -0
- package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +68 -0
- package/src/web-components/interaction/form/BdsRadio.mdx +72 -0
- package/src/web-components/interaction/form/BdsRadio.stories.tsx +58 -0
- package/src/web-components/interaction/form/BdsRadioGroup.mdx +73 -0
- package/src/web-components/interaction/form/BdsRadioGroup.stories.tsx +88 -0
- package/src/web-components/interaction/form/BdsSegmentedControl.mdx +95 -0
- package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +102 -0
- package/src/web-components/interaction/form/BdsSelect.mdx +76 -0
- package/src/web-components/interaction/form/BdsSelect.stories.tsx +84 -0
- package/src/web-components/interaction/form/BdsSlider.mdx +77 -0
- package/src/web-components/interaction/form/BdsSlider.stories.tsx +68 -0
- package/src/web-components/interaction/form/BdsSwitch.mdx +72 -0
- package/src/web-components/interaction/form/BdsSwitch.stories.tsx +58 -0
- package/src/web-components/interaction/form/BdsTextarea.mdx +73 -0
- package/src/web-components/interaction/form/BdsTextarea.stories.tsx +70 -0
- package/src/web-components/interaction/form/bds-checkbox-group.spec.ts +55 -0
- package/src/web-components/interaction/form/bds-checkbox-group.ts +117 -0
- package/src/web-components/interaction/form/bds-checkbox.ts +1 -3
- package/src/web-components/interaction/form/bds-combobox.ts +1 -3
- package/src/web-components/interaction/form/bds-form-input.spec.ts +83 -0
- package/src/web-components/interaction/form/bds-form-input.ts +268 -0
- package/src/web-components/interaction/form/bds-number-input.ts +3 -4
- package/src/web-components/interaction/form/bds-radio-group.spec.ts +62 -0
- package/src/web-components/interaction/form/bds-radio-group.ts +142 -0
- package/src/web-components/interaction/form/bds-radio.ts +6 -12
- package/src/web-components/interaction/form/bds-segmented-control.ts +96 -20
- package/src/web-components/interaction/form/bds-select.ts +2 -4
- package/src/web-components/interaction/form/bds-switch.ts +3 -4
- package/src/web-components/interaction/form/bds-textarea.ts +1 -3
- package/src/web-components/ui/BdsAvatar.mdx +76 -0
- package/src/web-components/ui/BdsAvatar.stories.tsx +48 -0
- package/src/web-components/ui/BdsBreadcrumb.mdx +66 -0
- package/src/web-components/ui/BdsBreadcrumb.stories.tsx +49 -0
- package/src/web-components/ui/BdsButtonGroup.mdx +69 -0
- package/src/web-components/ui/BdsButtonGroup.stories.tsx +66 -0
- package/src/web-components/ui/BdsCalendar.mdx +93 -0
- package/src/web-components/ui/BdsCalendar.stories.tsx +63 -0
- package/src/web-components/ui/BdsCard.mdx +88 -0
- package/src/web-components/ui/BdsCard.stories.tsx +67 -0
- package/src/web-components/ui/BdsCarousel.mdx +83 -0
- package/src/web-components/ui/BdsCarousel.stories.tsx +96 -0
- package/src/web-components/ui/BdsDescriptionList.mdx +64 -0
- package/src/web-components/ui/BdsDescriptionList.stories.tsx +64 -0
- package/src/web-components/ui/BdsIconWrapper.mdx +70 -0
- package/src/web-components/ui/BdsIconWrapper.stories.tsx +81 -0
- package/src/web-components/ui/BdsLink.mdx +79 -0
- package/src/web-components/ui/BdsLink.stories.tsx +63 -0
- package/src/web-components/ui/BdsLoading.mdx +58 -0
- package/src/web-components/ui/BdsLoading.stories.tsx +35 -0
- package/src/web-components/ui/BdsNotificationBanner.mdx +85 -0
- package/src/web-components/ui/BdsNotificationBanner.stories.tsx +84 -0
- package/src/web-components/ui/BdsPagination.mdx +74 -0
- package/src/web-components/ui/BdsPagination.stories.tsx +36 -0
- package/src/web-components/ui/BdsProgress.mdx +70 -0
- package/src/web-components/ui/BdsProgress.stories.tsx +96 -0
- package/src/web-components/ui/BdsProgressCircle.mdx +70 -0
- package/src/web-components/ui/BdsProgressCircle.stories.tsx +57 -0
- package/src/web-components/ui/BdsRating.mdx +61 -0
- package/src/web-components/ui/BdsRating.stories.tsx +45 -0
- package/src/web-components/ui/BdsSectionHeader.mdx +72 -0
- package/src/web-components/ui/BdsSectionHeader.stories.tsx +54 -0
- package/src/web-components/ui/BdsSeparator.mdx +77 -0
- package/src/web-components/ui/BdsSeparator.stories.tsx +55 -0
- package/src/web-components/ui/BdsSkeleton.mdx +61 -0
- package/src/web-components/ui/BdsSkeleton.stories.tsx +50 -0
- package/src/web-components/ui/BdsTable.mdx +81 -0
- package/src/web-components/ui/BdsTable.stories.tsx +83 -0
- package/src/web-components/ui/BdsTypography.mdx +74 -0
- package/src/web-components/ui/BdsTypography.stories.tsx +52 -0
- package/src/web-components/ui/bds-alert.ts +1 -2
- package/src/web-components/ui/bds-button-group.spec.ts +40 -0
- package/src/web-components/ui/bds-button-group.ts +78 -0
- package/src/web-components/ui/bds-calendar.spec.ts +91 -0
- package/src/web-components/ui/bds-calendar.ts +427 -0
- package/src/web-components/ui/bds-card.ts +1 -3
- package/src/web-components/ui/bds-carousel.spec.ts +64 -0
- package/src/web-components/ui/bds-carousel.ts +296 -0
- package/src/web-components/ui/bds-notification-banner.ts +1 -2
- package/src/web-components/ui/bds-pagination.spec.ts +67 -0
- package/src/web-components/ui/bds-pagination.ts +197 -0
- package/src/web-components/ui/bds-table.spec.ts +45 -0
- package/src/web-components/ui/bds-table.ts +96 -0
package/AGENTS.md
CHANGED
|
@@ -32,12 +32,32 @@ import '@boostdev/components/web-components';
|
|
|
32
32
|
|
|
33
33
|
### Web Components (experimental) — `src/web-components/`
|
|
34
34
|
Custom elements built with Lit. Entry: `src/web-components/index.ts`. Bundled with Lit (no peer dep required).
|
|
35
|
-
- **ui/**: `<bds-alert>`, `<bds-badge>`
|
|
36
|
-
- **interaction/**: `<bds-button>`, `<bds-popover>`, `<bds-toast-provider>`
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
- **ui/**: `<bds-alert>`, `<bds-avatar>`, `<bds-badge>`, `<bds-breadcrumb>`, `<bds-button-group>`, `<bds-calendar>`, `<bds-card>`, `<bds-carousel>`, `<bds-description-list>`, `<bds-icon-wrapper>`, `<bds-link>`, `<bds-loading>`, `<bds-notification-banner>`, `<bds-pagination>`, `<bds-progress>`, `<bds-progress-circle>`, `<bds-rating>`, `<bds-section-header>`, `<bds-separator>`, `<bds-skeleton>`, `<bds-table>`, `<bds-typography>`
|
|
37
|
+
- **interaction/**: `<bds-accordion>`, `<bds-accordion-item>`, `<bds-button>`, `<bds-collapsible>`, `<bds-dialog>`, `<bds-drawer>`, `<bds-dropdown-menu>`, `<bds-dropdown-menu-item>`, `<bds-popover>`, `<bds-skip-link>`, `<bds-tab>`, `<bds-tab-panel>`, `<bds-tabs>`, `<bds-toast-provider>`, `<bds-tooltip>`
|
|
38
|
+
- **interaction/form/**: `<bds-checkbox>`, `<bds-checkbox-group>`, `<bds-combobox>`, `<bds-file-input>`, `<bds-form-input>`, `<bds-number-input>`, `<bds-radio>`, `<bds-radio-group>`, `<bds-segmented-control>`, `<bds-select>`, `<bds-slider>`, `<bds-switch>`, `<bds-textarea>`
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
**Not ported** (deferred): `Command` — depends on `cmdk` React library internals. Use `<bds-combobox>` as the web component alternative.
|
|
41
|
+
|
|
42
|
+
Storybook stories live at `src/web-components/{ui,interaction,interaction/form}/Bds*.stories.tsx` (title path `'Web Components/{UI|Interaction|Form}/{Name}'`, tags `['!stable', 'experimental']`). Stories use a thin React wrapper to enable Storybook controls.
|
|
43
|
+
|
|
44
|
+
MDX docs live at `src/web-components/{ui,interaction,interaction/form}/Bds*.mdx` — one per component.
|
|
45
|
+
|
|
46
|
+
**Custom events in stories**: React 18 does NOT wire `onBdsClose` (or any `onBds*` prop) as a DOM event listener on custom elements — it sets it as a property, which is a no-op. Always use `addEventListener` via `ref` + `useEffect` to handle custom events from web components:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
const ref = React.useRef<HTMLElement>(null);
|
|
50
|
+
React.useEffect(() => {
|
|
51
|
+
const el = ref.current;
|
|
52
|
+
if (!el) return;
|
|
53
|
+
const handler = () => setState(false);
|
|
54
|
+
el.addEventListener('bds-close', handler);
|
|
55
|
+
return () => el.removeEventListener('bds-close', handler);
|
|
56
|
+
}, []);
|
|
57
|
+
// then pass ref={ref} to React.createElement(...)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Also: never define story component functions inside a `render: () => { function Foo() {...} }` arrow — React treats each render as a new component type and unmounts/remounts it. Define them at module scope instead.
|
|
41
61
|
|
|
42
62
|
### React Native (alpha) — `src/components/**/*.native.tsx`
|
|
43
63
|
Native implementations co-located with their web counterparts. Metro resolves them automatically.
|
|
@@ -92,7 +112,7 @@ For **border colours** that should match surrounding text/icon colour, use `curr
|
|
|
92
112
|
|
|
93
113
|
### bdc border tokens
|
|
94
114
|
|
|
95
|
-
Components use `
|
|
115
|
+
Components use `box-shadow: inset` (not `outline` or `border`) for all visual frame edges via `--bdc_*` tokens defined in `src/css/bdc.css`. This keeps `outline` exclusively for `:focus-visible` rings. Set local values on the component rule:
|
|
96
116
|
|
|
97
117
|
```css
|
|
98
118
|
.myElement {
|
|
@@ -100,19 +120,22 @@ Components use `outline` (not `border`) for all visual frame edges via `--bdc_*`
|
|
|
100
120
|
--bdc_color: currentcolor;
|
|
101
121
|
--bdc-outline_radius: var(--bds-border_radius--xs);
|
|
102
122
|
|
|
103
|
-
outline: var(--bdc-outline_width) solid var(--bdc_color);
|
|
104
|
-
outline-offset: var(--bdc-outline_offset);
|
|
105
123
|
border-radius: var(--myComponent_radius, var(--bdc-outline_radius));
|
|
106
|
-
box-shadow: var(--
|
|
124
|
+
box-shadow: inset 0 0 0 var(--bdc-outline_width) var(--bdc_color),
|
|
125
|
+
var(--myComponent_shadow, var(--bdc-outline_shadow));
|
|
107
126
|
transition: --bdc_color var(--bds-animation_transition-duration) var(--bds-animation_easing);
|
|
108
127
|
}
|
|
109
128
|
|
|
110
|
-
.myElement:focus {
|
|
111
|
-
|
|
129
|
+
.myElement:focus-visible {
|
|
130
|
+
outline: var(--bds-outline_default);
|
|
131
|
+
outline-offset: var(--bds-outline_offset);
|
|
112
132
|
}
|
|
113
133
|
```
|
|
114
134
|
|
|
115
|
-
|
|
135
|
+
- The `--bdc_color` `<color>` registered property enables smooth CSS transitions on the inset shadow colour.
|
|
136
|
+
- The neutral shadow default is `0 0 0 0 transparent` — `none` is invalid in a comma-separated `box-shadow` list.
|
|
137
|
+
- `:focus-visible` always uses `outline` + `var(--bds-outline_default)` (never the inset shadow).
|
|
138
|
+
- Focus rings use `--bds-outline_default` (2 px solid interactive colour, 2 px offset) — defined in `src/css/bdc.css`.
|
|
116
139
|
|
|
117
140
|
### Two-level fallback for active/selected state
|
|
118
141
|
|
|
@@ -192,13 +215,14 @@ References: https://developer.mozilla.org/en-US/docs/Web/Accessibility | https:/
|
|
|
192
215
|
|
|
193
216
|
## Key decisions
|
|
194
217
|
|
|
195
|
-
- **Button variants**: `default` (filled) and `
|
|
218
|
+
- **Button variants**: `default` (filled) and `outline` (transparent, outlined). `ghost` is a deprecated alias for `outline` — use `outline` for new code.
|
|
196
219
|
- **Button colour model**: `--button_color` + `--button_on-color` are the two theming inputs. All other button CSS vars derive from these.
|
|
197
|
-
- **`bdc` border token system**: All component frame borders use `
|
|
198
|
-
-
|
|
220
|
+
- **`bdc` border token system**: All component frame borders use `box-shadow: inset 0 0 0 var(--bdc-outline_width) var(--bdc_color)` (not `outline` or `border`). `outline` is reserved exclusively for `:focus-visible` rings. `--bdc_color` is registered as `<color>` with `@property`, enabling smooth `transition: --bdc_color` animations. The neutral `--bdc-outline_shadow` default is `0 0 0 0 transparent` (not `none` — `none` breaks comma-separated box-shadow).
|
|
221
|
+
- **Focus rings**: all components use `outline: var(--bds-outline_default)` + `outline-offset: var(--bds-outline_offset)` on `:focus-visible`. The `--bds-outline_default` is overridden in `bdc.css` to `2px solid var(--bds-color_interactive)` at 2px offset.
|
|
199
222
|
- **Backdrop token**: `var(--color_backdrop, rgb(0 0 0 / 50%))` — never hardcode rgba. (`--color_backdrop` is a library hook token, not a foundation token.)
|
|
200
223
|
- **`bds-popover` Invoker Commands API**: `<button commandfor="<id>" command="--toggle|--open|--close">` declaratively controls the popover. Handled via a `command` event listener on the host (light DOM) in `connectedCallback`/`disconnectedCallback`. Use an arrow-function handler for stable `removeEventListener` reference.
|
|
201
224
|
- **State guard in open/close methods**: `_open()` and `_close()` on stateful web components must return early if already in the target state, to prevent dispatching redundant events to listeners.
|
|
225
|
+
- **Drawer/Dialog animation**: `<dialog>` is the sliding panel itself — no wrapper div. Slide animation uses `translate` + `@starting-style` only. Do **not** add `@keyframes` — mixing `@keyframes` (open) with `translate` transition (close) causes a stutter. Backdrop uses `opacity: 0` as default with `@starting-style { opacity: 0 }` on `[open]::backdrop` for a smooth fade. `display` and `overlay` discrete transitions must include the easing function before `allow-discrete`.
|
|
202
226
|
|
|
203
227
|
## Adding new components
|
|
204
228
|
|