@boostdev/design-system-components 1.2.0 → 1.2.2
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 +46 -4
- package/README.md +15 -15
- package/dist/client.cjs +149 -124
- package/dist/client.css +503 -525
- package/dist/client.d.cts +71 -96
- package/dist/client.d.ts +71 -96
- package/dist/client.js +149 -124
- package/dist/index.cjs +149 -124
- package/dist/index.css +503 -525
- package/dist/index.d.cts +71 -96
- package/dist/index.d.ts +71 -96
- package/dist/index.js +149 -124
- package/dist/web-components/{chunk-6MH5UWUD.js → chunk-2FGATTGT.js} +5 -0
- package/dist/web-components/{chunk-5IPHEONG.js → chunk-6I2DBFQ7.js} +1 -0
- package/dist/web-components/{chunk-DI46Q2EA.js → chunk-OCODKRVZ.js} +57 -82
- package/dist/web-components/index.d.ts +571 -1
- package/dist/web-components/index.js +1501 -4
- package/dist/web-components/interaction/bds-collapsible.js +1 -1
- package/dist/web-components/interaction/bds-drawer.js +1 -1
- package/dist/web-components/interaction/form/bds-segmented-control.js +1 -1
- package/package.json +1 -1
- package/src/components/interaction/Command/Command.tsx +4 -3
- package/src/components/interaction/Dialog/Dialog.tsx +4 -5
- package/src/components/interaction/Drawer/Drawer.module.css +37 -62
- package/src/components/interaction/Drawer/Drawer.spec.tsx +3 -3
- package/src/components/interaction/Drawer/Drawer.tsx +25 -24
- package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +4 -2
- package/src/components/interaction/Popover/Popover.tsx +4 -3
- package/src/components/interaction/Rating/Rating.tsx +4 -2
- package/src/components/interaction/form/CheckboxGroup/CheckboxGroup.tsx +4 -6
- package/src/components/interaction/form/Combobox/Combobox.tsx +4 -2
- package/src/components/interaction/form/FileInput/FileInput.tsx +4 -3
- package/src/components/interaction/form/NumberInput/NumberInput.tsx +4 -3
- package/src/components/interaction/form/RadioGroup/RadioGroup.tsx +4 -6
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.mdx +8 -4
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +13 -6
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.tsx +4 -6
- package/src/components/interaction/form/atoms/InputContainer.tsx +2 -2
- package/src/components/layout/ButtonGroup/ButtonGroup.tsx +4 -6
- package/src/components/layout/Card/Card.tsx +4 -10
- package/src/components/layout/IconWrapper/IconWrapper.tsx +4 -5
- package/src/components/layout/SectionHeader/SectionHeader.tsx +5 -4
- package/src/components/ui/Accordion/Accordion.tsx +4 -3
- package/src/components/ui/Alert/Alert.tsx +4 -3
- package/src/components/ui/Avatar/Avatar.tsx +5 -3
- package/src/components/ui/Badge/Badge.tsx +4 -5
- package/src/components/ui/Breadcrumb/Breadcrumb.tsx +4 -3
- package/src/components/ui/Calendar/Calendar.tsx +4 -4
- package/src/components/ui/Carousel/Carousel.tsx +4 -4
- package/src/components/ui/DescriptionList/DescriptionList.tsx +4 -4
- package/src/components/ui/Loading/Loading.tsx +4 -3
- package/src/components/ui/NotificationBanner/NotificationBanner.tsx +4 -2
- package/src/components/ui/Pagination/Pagination.tsx +4 -2
- package/src/components/ui/Progress/Progress.tsx +4 -2
- package/src/components/ui/ProgressCircle/ProgressCircle.tsx +4 -1
- package/src/components/ui/Separator/Separator.tsx +5 -3
- package/src/components/ui/Skeleton/Skeleton.tsx +4 -3
- package/src/components/ui/SkipLink/SkipLink.tsx +4 -5
- package/src/components/ui/Tabs/Tabs.tsx +4 -4
- package/src/components/ui/Tooltip/Tooltip.tsx +4 -2
- package/src/components/ui/Typography/Typography.tsx +4 -5
- package/src/stories/DesignSystem/Grid.mdx +2 -0
- package/src/stories/Introduction.mdx +2 -1
- package/src/web-components/index.ts +12 -0
- package/src/web-components/interaction/BdsAccordion.mdx +80 -28
- package/src/web-components/interaction/BdsAccordion.stories.tsx +67 -58
- package/src/web-components/interaction/BdsCollapsible.mdx +93 -23
- package/src/web-components/interaction/BdsCollapsible.stories.tsx +29 -48
- package/src/web-components/interaction/BdsDialog.mdx +88 -27
- package/src/web-components/interaction/BdsDialog.stories.tsx +129 -47
- package/src/web-components/interaction/BdsDrawer.mdx +85 -27
- package/src/web-components/interaction/BdsDrawer.stories.tsx +161 -31
- 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 +72 -16
- package/src/web-components/interaction/BdsSkipLink.stories.tsx +47 -34
- package/src/web-components/interaction/BdsTabs.mdx +97 -27
- package/src/web-components/interaction/BdsTabs.stories.tsx +69 -55
- package/src/web-components/interaction/BdsTooltip.mdx +84 -18
- package/src/web-components/interaction/BdsTooltip.stories.tsx +49 -30
- package/src/web-components/interaction/bds-collapsible.ts +1 -0
- package/src/web-components/interaction/bds-drawer.ts +59 -82
- 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 +57 -20
- package/src/web-components/interaction/form/BdsCheckbox.stories.tsx +35 -36
- 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 +52 -33
- package/src/web-components/interaction/form/BdsCombobox.stories.tsx +55 -53
- package/src/web-components/interaction/form/BdsFileInput.mdx +59 -24
- package/src/web-components/interaction/form/BdsFileInput.stories.tsx +38 -53
- 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 +51 -22
- package/src/web-components/interaction/form/BdsNumberInput.stories.tsx +24 -46
- package/src/web-components/interaction/form/BdsRadio.mdx +53 -22
- package/src/web-components/interaction/form/BdsRadio.stories.tsx +19 -51
- 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 +76 -23
- package/src/web-components/interaction/form/BdsSegmentedControl.stories.tsx +64 -54
- package/src/web-components/interaction/form/BdsSelect.mdx +59 -21
- package/src/web-components/interaction/form/BdsSelect.stories.tsx +47 -56
- package/src/web-components/interaction/form/BdsSlider.mdx +55 -27
- package/src/web-components/interaction/form/BdsSlider.stories.tsx +23 -44
- package/src/web-components/interaction/form/BdsSwitch.mdx +53 -20
- package/src/web-components/interaction/form/BdsSwitch.stories.tsx +22 -37
- package/src/web-components/interaction/form/BdsTextarea.mdx +54 -22
- package/src/web-components/interaction/form/BdsTextarea.stories.tsx +35 -44
- 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-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-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-segmented-control.ts +5 -0
- package/src/web-components/ui/BdsAvatar.mdx +29 -20
- package/src/web-components/ui/BdsAvatar.stories.tsx +14 -28
- package/src/web-components/ui/BdsBreadcrumb.mdx +22 -19
- package/src/web-components/ui/BdsBreadcrumb.stories.tsx +11 -21
- 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 +30 -25
- package/src/web-components/ui/BdsCard.stories.tsx +19 -42
- 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 +13 -16
- package/src/web-components/ui/BdsDescriptionList.stories.tsx +34 -49
- package/src/web-components/ui/BdsIconWrapper.mdx +20 -20
- package/src/web-components/ui/BdsIconWrapper.stories.tsx +46 -41
- package/src/web-components/ui/BdsLink.mdx +21 -17
- package/src/web-components/ui/BdsLink.stories.tsx +19 -20
- package/src/web-components/ui/BdsLoading.mdx +9 -13
- package/src/web-components/ui/BdsLoading.stories.tsx +8 -10
- package/src/web-components/ui/BdsNotificationBanner.mdx +32 -37
- package/src/web-components/ui/BdsNotificationBanner.stories.tsx +38 -47
- 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 +24 -17
- package/src/web-components/ui/BdsProgress.stories.tsx +55 -29
- package/src/web-components/ui/BdsProgressCircle.mdx +24 -18
- package/src/web-components/ui/BdsProgressCircle.stories.tsx +17 -29
- package/src/web-components/ui/BdsRating.mdx +22 -22
- package/src/web-components/ui/BdsRating.stories.tsx +19 -13
- package/src/web-components/ui/BdsSectionHeader.mdx +31 -28
- package/src/web-components/ui/BdsSectionHeader.stories.tsx +21 -23
- package/src/web-components/ui/BdsSeparator.mdx +22 -8
- package/src/web-components/ui/BdsSeparator.stories.tsx +27 -19
- package/src/web-components/ui/BdsSkeleton.mdx +20 -26
- package/src/web-components/ui/BdsSkeleton.stories.tsx +23 -23
- 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 +20 -29
- package/src/web-components/ui/BdsTypography.stories.tsx +19 -18
- 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-carousel.spec.ts +64 -0
- package/src/web-components/ui/bds-carousel.ts +296 -0
- 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
|
@@ -38,4 +38,574 @@ export { BdsIconWrapper } from './ui/bds-icon-wrapper.js';
|
|
|
38
38
|
export { BdsDescriptionList } from './ui/bds-description-list.js';
|
|
39
39
|
export { BdsBreadcrumb } from './ui/bds-breadcrumb.js';
|
|
40
40
|
export { BdsLink } from './ui/bds-link.js';
|
|
41
|
-
import 'lit';
|
|
41
|
+
import * as lit from 'lit';
|
|
42
|
+
import { LitElement } from 'lit';
|
|
43
|
+
|
|
44
|
+
type ButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
45
|
+
/**
|
|
46
|
+
* `<bds-button-group>` — groups related buttons into a flex container.
|
|
47
|
+
*
|
|
48
|
+
* Attributes:
|
|
49
|
+
* orientation — `"horizontal"` (default) | `"vertical"`
|
|
50
|
+
* aria-label — accessible label for the group
|
|
51
|
+
*
|
|
52
|
+
* Slots:
|
|
53
|
+
* (default) — `<bds-button>` elements
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <bds-button-group aria-label="View options">
|
|
57
|
+
* <bds-button>Day</bds-button>
|
|
58
|
+
* <bds-button>Week</bds-button>
|
|
59
|
+
* <bds-button>Month</bds-button>
|
|
60
|
+
* </bds-button-group>
|
|
61
|
+
*/
|
|
62
|
+
declare class BdsButtonGroup extends LitElement {
|
|
63
|
+
static styles: lit.CSSResult;
|
|
64
|
+
static properties: {
|
|
65
|
+
orientation: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
reflect: boolean;
|
|
68
|
+
};
|
|
69
|
+
'aria-label': {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
orientation: ButtonGroupOrientation;
|
|
74
|
+
['aria-label']: string | undefined;
|
|
75
|
+
constructor();
|
|
76
|
+
render(): lit.TemplateResult<1>;
|
|
77
|
+
}
|
|
78
|
+
declare global {
|
|
79
|
+
interface HTMLElementTagNameMap {
|
|
80
|
+
'bds-button-group': BdsButtonGroup;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* `<bds-table>` — scrollable table wrapper with design-system styles.
|
|
86
|
+
*
|
|
87
|
+
* Slotted content should be a standard `<table>` with `<thead>` / `<tbody>`.
|
|
88
|
+
* Design-token styles are applied to the table and its cells via `::slotted`.
|
|
89
|
+
*
|
|
90
|
+
* Attributes:
|
|
91
|
+
* sticky-header — freezes `<thead>` at the top when the table overflows vertically
|
|
92
|
+
*
|
|
93
|
+
* Slots:
|
|
94
|
+
* (default) — a `<table>` element
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* <bds-table sticky-header>
|
|
98
|
+
* <table>
|
|
99
|
+
* <thead><tr><th>Name</th><th>Value</th></tr></thead>
|
|
100
|
+
* <tbody><tr><td>Alpha</td><td>1</td></tr></tbody>
|
|
101
|
+
* </table>
|
|
102
|
+
* </bds-table>
|
|
103
|
+
*/
|
|
104
|
+
declare class BdsTable extends LitElement {
|
|
105
|
+
static styles: lit.CSSResult;
|
|
106
|
+
static properties: {
|
|
107
|
+
stickyHeader: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
attribute: string;
|
|
110
|
+
reflect: boolean;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
stickyHeader: boolean;
|
|
114
|
+
constructor();
|
|
115
|
+
render(): lit.TemplateResult<1>;
|
|
116
|
+
}
|
|
117
|
+
declare global {
|
|
118
|
+
interface HTMLElementTagNameMap {
|
|
119
|
+
'bds-table': BdsTable;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* `<bds-pagination>` — pagination navigation control.
|
|
125
|
+
*
|
|
126
|
+
* Attributes:
|
|
127
|
+
* current-page — active page number (1-based, default: 1)
|
|
128
|
+
* total-pages — total number of pages (default: 1)
|
|
129
|
+
*
|
|
130
|
+
* Events:
|
|
131
|
+
* bds-page-change — fired when the user navigates; `detail: { page: number }`
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* <bds-pagination current-page="3" total-pages="10"></bds-pagination>
|
|
135
|
+
* <script>
|
|
136
|
+
* document.querySelector('bds-pagination')
|
|
137
|
+
* .addEventListener('bds-page-change', e => console.log(e.detail.page));
|
|
138
|
+
* </script>
|
|
139
|
+
*/
|
|
140
|
+
declare class BdsPagination extends LitElement {
|
|
141
|
+
static styles: lit.CSSResult;
|
|
142
|
+
static properties: {
|
|
143
|
+
currentPage: {
|
|
144
|
+
type: NumberConstructor;
|
|
145
|
+
attribute: string;
|
|
146
|
+
reflect: boolean;
|
|
147
|
+
};
|
|
148
|
+
totalPages: {
|
|
149
|
+
type: NumberConstructor;
|
|
150
|
+
attribute: string;
|
|
151
|
+
reflect: boolean;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
currentPage: number;
|
|
155
|
+
totalPages: number;
|
|
156
|
+
constructor();
|
|
157
|
+
private _navigate;
|
|
158
|
+
render(): lit.TemplateResult<1>;
|
|
159
|
+
}
|
|
160
|
+
declare global {
|
|
161
|
+
interface HTMLElementTagNameMap {
|
|
162
|
+
'bds-pagination': BdsPagination;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* `<bds-checkbox-group>` — groups related checkboxes with a shared label.
|
|
168
|
+
*
|
|
169
|
+
* Renders a `<fieldset>` with a `<legend>` for accessible grouping.
|
|
170
|
+
*
|
|
171
|
+
* Attributes:
|
|
172
|
+
* label — visible group label (rendered as `<legend>`)
|
|
173
|
+
* error — error message shown below items
|
|
174
|
+
* hint — hint text shown below items
|
|
175
|
+
* disabled — disables the entire fieldset
|
|
176
|
+
* required — marks the group as required
|
|
177
|
+
*
|
|
178
|
+
* Slots:
|
|
179
|
+
* (default) — `<bds-checkbox>` elements
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* <bds-checkbox-group label="Interests" required>
|
|
183
|
+
* <bds-checkbox name="sports" value="sports">Sports</bds-checkbox>
|
|
184
|
+
* <bds-checkbox name="music" value="music">Music</bds-checkbox>
|
|
185
|
+
* </bds-checkbox-group>
|
|
186
|
+
*/
|
|
187
|
+
declare class BdsCheckboxGroup extends LitElement {
|
|
188
|
+
static styles: lit.CSSResult;
|
|
189
|
+
static properties: {
|
|
190
|
+
label: {
|
|
191
|
+
type: StringConstructor;
|
|
192
|
+
};
|
|
193
|
+
error: {
|
|
194
|
+
type: StringConstructor;
|
|
195
|
+
};
|
|
196
|
+
hint: {
|
|
197
|
+
type: StringConstructor;
|
|
198
|
+
};
|
|
199
|
+
disabled: {
|
|
200
|
+
type: BooleanConstructor;
|
|
201
|
+
reflect: boolean;
|
|
202
|
+
};
|
|
203
|
+
required: {
|
|
204
|
+
type: BooleanConstructor;
|
|
205
|
+
reflect: boolean;
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
label: string;
|
|
209
|
+
error: string | undefined;
|
|
210
|
+
hint: string | undefined;
|
|
211
|
+
disabled: boolean;
|
|
212
|
+
required: boolean;
|
|
213
|
+
constructor();
|
|
214
|
+
render(): lit.TemplateResult<1>;
|
|
215
|
+
}
|
|
216
|
+
declare global {
|
|
217
|
+
interface HTMLElementTagNameMap {
|
|
218
|
+
'bds-checkbox-group': BdsCheckboxGroup;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* `<bds-radio-group>` — groups related radio buttons with a shared label and name.
|
|
224
|
+
*
|
|
225
|
+
* Renders a `<fieldset>` with a `<legend>`. Propagates the `name` attribute to
|
|
226
|
+
* all slotted `<bds-radio>` elements so radios form a mutually-exclusive set.
|
|
227
|
+
*
|
|
228
|
+
* Attributes:
|
|
229
|
+
* label — visible group label (rendered as `<legend>`)
|
|
230
|
+
* name — shared name forwarded to all slotted `<bds-radio>` elements
|
|
231
|
+
* error — error message shown below items
|
|
232
|
+
* hint — hint text shown below items
|
|
233
|
+
* disabled — disables the entire fieldset
|
|
234
|
+
* required — marks the group as required
|
|
235
|
+
*
|
|
236
|
+
* Slots:
|
|
237
|
+
* (default) — `<bds-radio>` elements
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* <bds-radio-group label="Preferred contact" name="contact">
|
|
241
|
+
* <bds-radio value="email">Email</bds-radio>
|
|
242
|
+
* <bds-radio value="phone">Phone</bds-radio>
|
|
243
|
+
* </bds-radio-group>
|
|
244
|
+
*/
|
|
245
|
+
declare class BdsRadioGroup extends LitElement {
|
|
246
|
+
static styles: lit.CSSResult;
|
|
247
|
+
static properties: {
|
|
248
|
+
label: {
|
|
249
|
+
type: StringConstructor;
|
|
250
|
+
};
|
|
251
|
+
name: {
|
|
252
|
+
type: StringConstructor;
|
|
253
|
+
reflect: boolean;
|
|
254
|
+
};
|
|
255
|
+
error: {
|
|
256
|
+
type: StringConstructor;
|
|
257
|
+
};
|
|
258
|
+
hint: {
|
|
259
|
+
type: StringConstructor;
|
|
260
|
+
};
|
|
261
|
+
disabled: {
|
|
262
|
+
type: BooleanConstructor;
|
|
263
|
+
reflect: boolean;
|
|
264
|
+
};
|
|
265
|
+
required: {
|
|
266
|
+
type: BooleanConstructor;
|
|
267
|
+
reflect: boolean;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
label: string;
|
|
271
|
+
name: string;
|
|
272
|
+
error: string | undefined;
|
|
273
|
+
hint: string | undefined;
|
|
274
|
+
disabled: boolean;
|
|
275
|
+
required: boolean;
|
|
276
|
+
constructor();
|
|
277
|
+
private _propagateName;
|
|
278
|
+
connectedCallback(): void;
|
|
279
|
+
updated(changed: Map<string, unknown>): void;
|
|
280
|
+
render(): lit.TemplateResult<1>;
|
|
281
|
+
}
|
|
282
|
+
declare global {
|
|
283
|
+
interface HTMLElementTagNameMap {
|
|
284
|
+
'bds-radio-group': BdsRadioGroup;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* `<bds-form-input>` — form-associated text input with label, hint, and error support.
|
|
290
|
+
*
|
|
291
|
+
* Participates in HTML forms via the Form-Associated Custom Elements API.
|
|
292
|
+
*
|
|
293
|
+
* Attributes:
|
|
294
|
+
* name — form field name
|
|
295
|
+
* type — input type: text | email | password | search | url | tel (default: "text")
|
|
296
|
+
* value — current value
|
|
297
|
+
* placeholder — placeholder text
|
|
298
|
+
* label — visible label text
|
|
299
|
+
* hint — helper text shown below the input
|
|
300
|
+
* error — error message; when set the input enters error state
|
|
301
|
+
* disabled — disables the input
|
|
302
|
+
* required — marks the field as required
|
|
303
|
+
*
|
|
304
|
+
* Slots:
|
|
305
|
+
* prefix — icon or text rendered before the input
|
|
306
|
+
* suffix — icon or text rendered after the input
|
|
307
|
+
*
|
|
308
|
+
* Events:
|
|
309
|
+
* bds-change — fired on value change; `detail: { value: string }`
|
|
310
|
+
* bds-input — fired on every keystroke; `detail: { value: string }`
|
|
311
|
+
*
|
|
312
|
+
* @example
|
|
313
|
+
* <bds-form-input name="email" type="email" label="Email address" required></bds-form-input>
|
|
314
|
+
*/
|
|
315
|
+
declare class BdsFormInput extends LitElement {
|
|
316
|
+
static formAssociated: boolean;
|
|
317
|
+
static styles: lit.CSSResult;
|
|
318
|
+
static properties: {
|
|
319
|
+
name: {
|
|
320
|
+
type: StringConstructor;
|
|
321
|
+
reflect: boolean;
|
|
322
|
+
};
|
|
323
|
+
type: {
|
|
324
|
+
type: StringConstructor;
|
|
325
|
+
reflect: boolean;
|
|
326
|
+
};
|
|
327
|
+
value: {
|
|
328
|
+
type: StringConstructor;
|
|
329
|
+
};
|
|
330
|
+
placeholder: {
|
|
331
|
+
type: StringConstructor;
|
|
332
|
+
};
|
|
333
|
+
label: {
|
|
334
|
+
type: StringConstructor;
|
|
335
|
+
};
|
|
336
|
+
hint: {
|
|
337
|
+
type: StringConstructor;
|
|
338
|
+
};
|
|
339
|
+
error: {
|
|
340
|
+
type: StringConstructor;
|
|
341
|
+
reflect: boolean;
|
|
342
|
+
};
|
|
343
|
+
disabled: {
|
|
344
|
+
type: BooleanConstructor;
|
|
345
|
+
reflect: boolean;
|
|
346
|
+
};
|
|
347
|
+
required: {
|
|
348
|
+
type: BooleanConstructor;
|
|
349
|
+
reflect: boolean;
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
name: string;
|
|
353
|
+
type: string;
|
|
354
|
+
value: string;
|
|
355
|
+
placeholder: string;
|
|
356
|
+
label: string;
|
|
357
|
+
hint: string | undefined;
|
|
358
|
+
error: string | undefined;
|
|
359
|
+
disabled: boolean;
|
|
360
|
+
required: boolean;
|
|
361
|
+
private _internals;
|
|
362
|
+
private readonly _uid;
|
|
363
|
+
constructor();
|
|
364
|
+
updated(changed: Map<string, unknown>): void;
|
|
365
|
+
formResetCallback(): void;
|
|
366
|
+
private _handleInput;
|
|
367
|
+
private _handleChange;
|
|
368
|
+
render(): lit.TemplateResult<1>;
|
|
369
|
+
}
|
|
370
|
+
declare global {
|
|
371
|
+
interface HTMLElementTagNameMap {
|
|
372
|
+
'bds-form-input': BdsFormInput;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* `<bds-carousel>` — scroll-snap based carousel/slider.
|
|
378
|
+
*
|
|
379
|
+
* Attributes:
|
|
380
|
+
* current-index — active slide index (0-based, default: 0)
|
|
381
|
+
* indicators — show dot indicators
|
|
382
|
+
* loop — wrap from last slide back to first and vice versa
|
|
383
|
+
*
|
|
384
|
+
* Slots:
|
|
385
|
+
* (default) — slide content elements (each direct child = one slide)
|
|
386
|
+
* prev — custom previous button (renders a default button if omitted)
|
|
387
|
+
* next — custom next button (renders a default button if omitted)
|
|
388
|
+
*
|
|
389
|
+
* Events:
|
|
390
|
+
* bds-slide-change — fired when active slide changes; `detail: { index: number }`
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* <bds-carousel indicators loop>
|
|
394
|
+
* <div>Slide 1</div>
|
|
395
|
+
* <div>Slide 2</div>
|
|
396
|
+
* <div>Slide 3</div>
|
|
397
|
+
* </bds-carousel>
|
|
398
|
+
*/
|
|
399
|
+
declare class BdsCarousel extends LitElement {
|
|
400
|
+
static styles: lit.CSSResult;
|
|
401
|
+
static properties: {
|
|
402
|
+
currentIndex: {
|
|
403
|
+
type: NumberConstructor;
|
|
404
|
+
attribute: string;
|
|
405
|
+
reflect: boolean;
|
|
406
|
+
};
|
|
407
|
+
indicators: {
|
|
408
|
+
type: BooleanConstructor;
|
|
409
|
+
reflect: boolean;
|
|
410
|
+
};
|
|
411
|
+
loop: {
|
|
412
|
+
type: BooleanConstructor;
|
|
413
|
+
reflect: boolean;
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
currentIndex: number;
|
|
417
|
+
indicators: boolean;
|
|
418
|
+
loop: boolean;
|
|
419
|
+
private _slideCount;
|
|
420
|
+
private _io;
|
|
421
|
+
constructor();
|
|
422
|
+
private get _track();
|
|
423
|
+
connectedCallback(): void;
|
|
424
|
+
disconnectedCallback(): void;
|
|
425
|
+
private _updateSlideCount;
|
|
426
|
+
private _goTo;
|
|
427
|
+
private _onSlotChange;
|
|
428
|
+
render(): lit.TemplateResult<1>;
|
|
429
|
+
}
|
|
430
|
+
declare global {
|
|
431
|
+
interface HTMLElementTagNameMap {
|
|
432
|
+
'bds-carousel': BdsCarousel;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* `<bds-calendar>` — form-associated date picker calendar.
|
|
438
|
+
*
|
|
439
|
+
* Renders a month grid for selecting a date. Keyboard-navigable. Participates
|
|
440
|
+
* in HTML forms via the Form-Associated Custom Elements API.
|
|
441
|
+
*
|
|
442
|
+
* Attributes:
|
|
443
|
+
* name — form field name
|
|
444
|
+
* value — selected date in ISO 8601 format (`YYYY-MM-DD`)
|
|
445
|
+
* min — minimum selectable date (ISO 8601)
|
|
446
|
+
* max — maximum selectable date (ISO 8601)
|
|
447
|
+
* disabled — disables all interaction
|
|
448
|
+
*
|
|
449
|
+
* Events:
|
|
450
|
+
* bds-date-select — fired when user selects a date; `detail: { date: string }` (ISO 8601)
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* <bds-calendar name="birthday" value="2024-03-15"></bds-calendar>
|
|
454
|
+
*/
|
|
455
|
+
declare class BdsCalendar extends LitElement {
|
|
456
|
+
static formAssociated: boolean;
|
|
457
|
+
static styles: lit.CSSResult;
|
|
458
|
+
static properties: {
|
|
459
|
+
name: {
|
|
460
|
+
type: StringConstructor;
|
|
461
|
+
reflect: boolean;
|
|
462
|
+
};
|
|
463
|
+
value: {
|
|
464
|
+
type: StringConstructor;
|
|
465
|
+
reflect: boolean;
|
|
466
|
+
};
|
|
467
|
+
min: {
|
|
468
|
+
type: StringConstructor;
|
|
469
|
+
};
|
|
470
|
+
max: {
|
|
471
|
+
type: StringConstructor;
|
|
472
|
+
};
|
|
473
|
+
disabled: {
|
|
474
|
+
type: BooleanConstructor;
|
|
475
|
+
reflect: boolean;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
name: string;
|
|
479
|
+
value: string;
|
|
480
|
+
min: string;
|
|
481
|
+
max: string;
|
|
482
|
+
disabled: boolean;
|
|
483
|
+
private _internals;
|
|
484
|
+
private _viewYear;
|
|
485
|
+
private _viewMonth;
|
|
486
|
+
constructor();
|
|
487
|
+
updated(changed: Map<string, unknown>): void;
|
|
488
|
+
formResetCallback(): void;
|
|
489
|
+
private _prevMonth;
|
|
490
|
+
private _nextMonth;
|
|
491
|
+
private _selectDate;
|
|
492
|
+
private _isDisabledDate;
|
|
493
|
+
private _handleKeydown;
|
|
494
|
+
private _buildGrid;
|
|
495
|
+
render(): lit.TemplateResult<1>;
|
|
496
|
+
}
|
|
497
|
+
declare global {
|
|
498
|
+
interface HTMLElementTagNameMap {
|
|
499
|
+
'bds-calendar': BdsCalendar;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
type DropdownMenuPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
504
|
+
/**
|
|
505
|
+
* `<bds-dropdown-menu>` — anchored dropdown menu with keyboard navigation.
|
|
506
|
+
*
|
|
507
|
+
* Uses the native Popover API for the floating panel (light-dismiss, top-layer).
|
|
508
|
+
* The trigger slot element controls open/close. The component handles keyboard
|
|
509
|
+
* navigation (Arrow keys, Escape, Tab) and focus management.
|
|
510
|
+
*
|
|
511
|
+
* Attributes:
|
|
512
|
+
* open — controls open/closed state (reflected)
|
|
513
|
+
* placement — menu position relative to trigger (default: `"bottom-start"`)
|
|
514
|
+
*
|
|
515
|
+
* Slots:
|
|
516
|
+
* trigger — the activating element (button or similar)
|
|
517
|
+
* (default) — `<bds-dropdown-menu-item>` elements
|
|
518
|
+
*
|
|
519
|
+
* Events:
|
|
520
|
+
* bds-open — fired when the menu opens
|
|
521
|
+
* bds-close — fired when the menu closes
|
|
522
|
+
*
|
|
523
|
+
* @example
|
|
524
|
+
* <bds-dropdown-menu>
|
|
525
|
+
* <button slot="trigger">Options</button>
|
|
526
|
+
* <bds-dropdown-menu-item value="edit">Edit</bds-dropdown-menu-item>
|
|
527
|
+
* <bds-dropdown-menu-item value="delete" destructive>Delete</bds-dropdown-menu-item>
|
|
528
|
+
* </bds-dropdown-menu>
|
|
529
|
+
*/
|
|
530
|
+
declare class BdsDropdownMenu extends LitElement {
|
|
531
|
+
static styles: lit.CSSResult;
|
|
532
|
+
static properties: {
|
|
533
|
+
open: {
|
|
534
|
+
type: BooleanConstructor;
|
|
535
|
+
reflect: boolean;
|
|
536
|
+
};
|
|
537
|
+
placement: {
|
|
538
|
+
type: StringConstructor;
|
|
539
|
+
reflect: boolean;
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
open: boolean;
|
|
543
|
+
placement: DropdownMenuPlacement;
|
|
544
|
+
constructor();
|
|
545
|
+
connectedCallback(): void;
|
|
546
|
+
disconnectedCallback(): void;
|
|
547
|
+
private get _items();
|
|
548
|
+
private get _trigger();
|
|
549
|
+
_open(): void;
|
|
550
|
+
_close(): void;
|
|
551
|
+
private _handleTriggerClick;
|
|
552
|
+
private _handleOutsideClick;
|
|
553
|
+
private _handleKeydown;
|
|
554
|
+
private _handleItemSelect;
|
|
555
|
+
private _onTriggerSlotChange;
|
|
556
|
+
render(): lit.TemplateResult<1>;
|
|
557
|
+
}
|
|
558
|
+
declare global {
|
|
559
|
+
interface HTMLElementTagNameMap {
|
|
560
|
+
'bds-dropdown-menu': BdsDropdownMenu;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* `<bds-dropdown-menu-item>` — a single item inside a `<bds-dropdown-menu>`.
|
|
566
|
+
*
|
|
567
|
+
* Attributes:
|
|
568
|
+
* value — value associated with this item
|
|
569
|
+
* disabled — disables this item
|
|
570
|
+
* destructive — renders the item in a destructive (red) style
|
|
571
|
+
*
|
|
572
|
+
* Slots:
|
|
573
|
+
* (default) — item label text
|
|
574
|
+
*
|
|
575
|
+
* Events:
|
|
576
|
+
* bds-select — fired when the item is clicked or activated; `detail: { value: string }`
|
|
577
|
+
*
|
|
578
|
+
* @example
|
|
579
|
+
* <bds-dropdown-menu-item value="delete" destructive>Delete</bds-dropdown-menu-item>
|
|
580
|
+
*/
|
|
581
|
+
declare class BdsDropdownMenuItem extends LitElement {
|
|
582
|
+
static styles: lit.CSSResult;
|
|
583
|
+
static properties: {
|
|
584
|
+
value: {
|
|
585
|
+
type: StringConstructor;
|
|
586
|
+
reflect: boolean;
|
|
587
|
+
};
|
|
588
|
+
disabled: {
|
|
589
|
+
type: BooleanConstructor;
|
|
590
|
+
reflect: boolean;
|
|
591
|
+
};
|
|
592
|
+
destructive: {
|
|
593
|
+
type: BooleanConstructor;
|
|
594
|
+
reflect: boolean;
|
|
595
|
+
};
|
|
596
|
+
};
|
|
597
|
+
value: string;
|
|
598
|
+
disabled: boolean;
|
|
599
|
+
destructive: boolean;
|
|
600
|
+
constructor();
|
|
601
|
+
private _handleClick;
|
|
602
|
+
private _handleKeydown;
|
|
603
|
+
render(): lit.TemplateResult<1>;
|
|
604
|
+
}
|
|
605
|
+
declare global {
|
|
606
|
+
interface HTMLElementTagNameMap {
|
|
607
|
+
'bds-dropdown-menu-item': BdsDropdownMenuItem;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export { BdsButtonGroup, BdsCalendar, BdsCarousel, BdsCheckboxGroup, BdsDropdownMenu, BdsDropdownMenuItem, BdsFormInput, BdsPagination, BdsRadioGroup, BdsTable };
|