@boostdev/design-system-components 1.1.0 → 1.1.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 -5
- package/dist/client.cjs +206 -113
- package/dist/client.css +664 -624
- package/dist/client.d.cts +9 -3
- package/dist/client.d.ts +9 -3
- package/dist/client.js +241 -149
- package/dist/index.cjs +206 -113
- package/dist/index.css +664 -624
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +241 -149
- package/dist/web-components/chunk-2QA62WCQ.js +48 -0
- package/dist/web-components/chunk-4BX6AWXX.js +146 -0
- package/dist/web-components/chunk-57TRNCWQ.js +93 -0
- package/dist/web-components/chunk-5IPHEONG.js +139 -0
- package/dist/web-components/chunk-5R6IFELV.js +63 -0
- package/dist/web-components/chunk-5TFWOPLH.js +49 -0
- package/dist/web-components/chunk-6I3CFC26.js +89 -0
- package/dist/web-components/chunk-6T3RKUKG.js +65 -0
- package/dist/web-components/chunk-7FMR53BW.js +127 -0
- package/dist/web-components/chunk-A67LCT7C.js +134 -0
- package/dist/web-components/chunk-AGKJTMJI.js +56 -0
- package/dist/web-components/chunk-BQLZ7I4G.js +56 -0
- package/dist/web-components/chunk-CAPI25CU.js +53 -0
- package/dist/web-components/chunk-CJ5ZOO42.js +229 -0
- package/dist/web-components/chunk-CR5PGUHV.js +109 -0
- package/dist/web-components/chunk-ECW3HHWA.js +185 -0
- package/dist/web-components/chunk-HGBNDR22.js +98 -0
- package/dist/web-components/chunk-IK3PTFZ4.js +133 -0
- package/dist/web-components/chunk-IQGLIQSO.js +188 -0
- package/dist/web-components/chunk-ITHLKR7Q.js +105 -0
- package/dist/web-components/chunk-K5CE6HSB.js +169 -0
- package/dist/web-components/chunk-L3XHOMN6.js +111 -0
- package/dist/{web-components.js → web-components/chunk-LGEZYFUU.js} +62 -834
- package/dist/web-components/chunk-LSC4N56Q.js +168 -0
- package/dist/web-components/chunk-LY62SAVN.js +64 -0
- package/dist/web-components/chunk-O4UFI2RX.js +244 -0
- package/dist/web-components/chunk-O7I63SQX.js +124 -0
- package/dist/web-components/chunk-OHUTLSIQ.js +69 -0
- package/dist/web-components/chunk-OQTRTMAB.js +27 -0
- package/dist/web-components/chunk-OTX4COSV.js +187 -0
- package/dist/web-components/chunk-PY62FTRW.js +179 -0
- package/dist/web-components/chunk-Q4T5BJT6.js +94 -0
- package/dist/web-components/chunk-QDRH46TF.js +281 -0
- package/dist/web-components/chunk-QDST57JC.js +119 -0
- package/dist/web-components/chunk-QPOKHLMQ.js +45 -0
- package/dist/web-components/chunk-SOQQ7RVJ.js +88 -0
- package/dist/web-components/chunk-UFFCKVZE.js +149 -0
- package/dist/web-components/chunk-VM3YHGQ2.js +152 -0
- package/dist/web-components/chunk-VMMVWLXL.js +53 -0
- package/dist/web-components/chunk-VSS5ITNE.js +109 -0
- package/dist/web-components/chunk-XIENXR7H.js +118 -0
- package/dist/web-components/chunk-Y4MAXTMA.js +80 -0
- package/dist/web-components/chunk-YLVTEY23.js +165 -0
- package/dist/web-components/globals.d.ts +2 -0
- package/dist/web-components/globals.js +1 -0
- package/dist/web-components/index.d.ts +41 -0
- package/dist/web-components/index.js +165 -0
- package/dist/web-components/interaction/bds-accordion-item.d.ts +54 -0
- package/dist/web-components/interaction/bds-accordion-item.js +7 -0
- package/dist/web-components/interaction/bds-accordion.d.ts +50 -0
- package/dist/web-components/interaction/bds-accordion.js +7 -0
- package/dist/web-components/interaction/bds-button.d.ts +100 -0
- package/dist/web-components/interaction/bds-button.js +7 -0
- package/dist/web-components/interaction/bds-collapsible.d.ts +52 -0
- package/dist/web-components/interaction/bds-collapsible.js +7 -0
- package/dist/web-components/interaction/bds-dialog.d.ts +56 -0
- package/dist/web-components/interaction/bds-dialog.js +7 -0
- package/dist/web-components/interaction/bds-drawer.d.ts +64 -0
- package/dist/web-components/interaction/bds-drawer.js +7 -0
- package/dist/web-components/interaction/bds-popover.d.ts +62 -0
- package/dist/web-components/interaction/bds-popover.js +7 -0
- package/dist/web-components/interaction/bds-skip-link.d.ts +36 -0
- package/dist/web-components/interaction/bds-skip-link.js +7 -0
- package/dist/web-components/interaction/bds-tab-panel.d.ts +26 -0
- package/dist/web-components/interaction/bds-tab-panel.js +7 -0
- package/dist/web-components/interaction/bds-tab.d.ts +45 -0
- package/dist/web-components/interaction/bds-tab.js +7 -0
- package/dist/web-components/interaction/bds-tabs.d.ts +46 -0
- package/dist/web-components/interaction/bds-tabs.js +7 -0
- package/dist/web-components/interaction/bds-toast-provider.d.ts +57 -0
- package/dist/web-components/interaction/bds-toast-provider.js +7 -0
- package/dist/web-components/interaction/bds-tooltip.d.ts +50 -0
- package/dist/web-components/interaction/bds-tooltip.js +7 -0
- package/dist/web-components/interaction/form/bds-checkbox.d.ts +70 -0
- package/dist/web-components/interaction/form/bds-checkbox.js +7 -0
- package/dist/web-components/interaction/form/bds-combobox.d.ts +84 -0
- package/dist/web-components/interaction/form/bds-combobox.js +7 -0
- package/dist/web-components/interaction/form/bds-file-input.d.ts +62 -0
- package/dist/web-components/interaction/form/bds-file-input.js +7 -0
- package/dist/web-components/interaction/form/bds-number-input.d.ts +68 -0
- package/dist/web-components/interaction/form/bds-number-input.js +7 -0
- package/dist/web-components/interaction/form/bds-radio.d.ts +68 -0
- package/dist/web-components/interaction/form/bds-radio.js +7 -0
- package/dist/web-components/interaction/form/bds-segmented-control.d.ts +71 -0
- package/dist/web-components/interaction/form/bds-segmented-control.js +7 -0
- package/dist/web-components/interaction/form/bds-select.d.ts +79 -0
- package/dist/web-components/interaction/form/bds-select.js +7 -0
- package/dist/web-components/interaction/form/bds-slider.d.ts +70 -0
- package/dist/web-components/interaction/form/bds-slider.js +7 -0
- package/dist/web-components/interaction/form/bds-switch.d.ts +67 -0
- package/dist/web-components/interaction/form/bds-switch.js +7 -0
- package/dist/web-components/interaction/form/bds-textarea.d.ts +70 -0
- package/dist/web-components/interaction/form/bds-textarea.js +7 -0
- package/dist/web-components/ui/bds-alert.d.ts +66 -0
- package/dist/web-components/ui/bds-alert.js +7 -0
- package/dist/web-components/ui/bds-avatar.d.ts +50 -0
- package/dist/web-components/ui/bds-avatar.js +7 -0
- package/dist/web-components/ui/bds-badge.d.ts +35 -0
- package/dist/web-components/ui/bds-badge.js +7 -0
- package/dist/web-components/ui/bds-breadcrumb.d.ts +35 -0
- package/dist/web-components/ui/bds-breadcrumb.js +7 -0
- package/dist/web-components/ui/bds-card.d.ts +72 -0
- package/dist/web-components/ui/bds-card.js +7 -0
- package/dist/web-components/ui/bds-description-list.d.ts +42 -0
- package/dist/web-components/ui/bds-description-list.js +7 -0
- package/dist/web-components/ui/bds-icon-wrapper.d.ts +39 -0
- package/dist/web-components/ui/bds-icon-wrapper.js +7 -0
- package/dist/web-components/ui/bds-link.d.ts +59 -0
- package/dist/web-components/ui/bds-link.js +7 -0
- package/dist/web-components/ui/bds-loading.d.ts +32 -0
- package/dist/web-components/ui/bds-loading.js +7 -0
- package/dist/web-components/ui/bds-notification-banner.d.ts +61 -0
- package/dist/web-components/ui/bds-notification-banner.js +7 -0
- package/dist/web-components/ui/bds-progress-circle.d.ts +53 -0
- package/dist/web-components/ui/bds-progress-circle.js +7 -0
- package/dist/web-components/ui/bds-progress.d.ts +54 -0
- package/dist/web-components/ui/bds-progress.js +7 -0
- package/dist/web-components/ui/bds-rating.d.ts +36 -0
- package/dist/web-components/ui/bds-rating.js +7 -0
- package/dist/web-components/ui/bds-section-header.d.ts +53 -0
- package/dist/web-components/ui/bds-section-header.js +8 -0
- package/dist/web-components/ui/bds-separator.d.ts +32 -0
- package/dist/web-components/ui/bds-separator.js +7 -0
- package/dist/web-components/ui/bds-skeleton.d.ts +22 -0
- package/dist/web-components/ui/bds-skeleton.js +7 -0
- package/dist/web-components/ui/bds-typography.d.ts +44 -0
- package/dist/web-components/ui/bds-typography.js +8 -0
- package/package.json +169 -4
- package/src/components/interaction/Button/Button.module.css +1 -1
- package/src/components/interaction/Button/Button.native.mdx +72 -0
- package/src/components/interaction/Command/Command.module.css +7 -7
- package/src/components/interaction/Command/Command.spec.tsx +37 -0
- package/src/components/interaction/Command/Command.tsx +37 -2
- package/src/components/interaction/Dialog/Dialog.module.css +10 -13
- package/src/components/interaction/Dialog/Dialog.spec.tsx +53 -1
- package/src/components/interaction/Dialog/Dialog.stories.tsx +17 -0
- package/src/components/interaction/Dialog/Dialog.tsx +50 -16
- package/src/components/interaction/Drawer/Drawer.module.css +11 -11
- package/src/components/interaction/Drawer/Drawer.spec.tsx +48 -1
- package/src/components/interaction/Drawer/Drawer.tsx +38 -4
- package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +6 -6
- package/src/components/interaction/Popover/Popover.module.css +74 -15
- package/src/components/interaction/Popover/Popover.spec.tsx +94 -59
- package/src/components/interaction/Popover/Popover.tsx +44 -60
- package/src/components/interaction/Toast/Toast.module.css +7 -7
- package/src/components/interaction/form/Checkbox/Checkbox.module.css +6 -6
- package/src/components/interaction/form/Checkbox/Checkbox.native.mdx +74 -0
- package/src/components/interaction/form/Combobox/Combobox.module.css +7 -8
- package/src/components/interaction/form/FileInput/FileInput.module.css +4 -4
- package/src/components/interaction/form/NumberInput/NumberInput.module.css +1 -1
- package/src/components/interaction/form/Radio/Radio.module.css +6 -6
- package/src/components/interaction/form/SegmentedControl/SegmentedControl.module.css +5 -6
- package/src/components/interaction/form/Select/Select.module.css +3 -3
- package/src/components/interaction/form/Slider/Slider.module.css +6 -6
- package/src/components/interaction/form/Switch/Switch.module.css +8 -8
- package/src/components/interaction/form/Textarea/Textarea.module.css +1 -1
- package/src/components/layout/IconWrapper/IconWrapper.module.css +2 -2
- package/src/components/ui/Accordion/Accordion.module.css +5 -5
- package/src/components/ui/Alert/Alert.native.mdx +62 -0
- package/src/components/ui/Avatar/Avatar.native.mdx +50 -0
- package/src/components/ui/Badge/Badge.native.mdx +54 -0
- package/src/components/ui/Calendar/Calendar.module.css +7 -7
- package/src/components/ui/Carousel/Carousel.module.css +5 -5
- package/src/components/ui/Collapsible/Collapsible.module.css +4 -4
- package/src/components/ui/Link/Link.module.css +2 -2
- package/src/components/ui/Loading/Loading.module.css +7 -7
- package/src/components/ui/NotificationBanner/NotificationBanner.module.css +3 -3
- package/src/components/ui/Pagination/Pagination.module.css +6 -6
- package/src/components/ui/Progress/Progress.module.css +5 -5
- package/src/components/ui/Separator/Separator.module.css +3 -3
- package/src/components/ui/Skeleton/Skeleton.module.css +1 -1
- package/src/components/ui/Table/Table.module.css +9 -9
- package/src/components/ui/Tabs/Tabs.module.css +3 -3
- package/src/components/ui/Tooltip/Tooltip.module.css +8 -8
- package/src/components/ui/Typography/Typography.native.mdx +56 -0
- package/src/polyfill-invoker-commands.ts +68 -0
- package/src/react-augment.d.ts +19 -0
- package/src/stories/ReactNative.mdx +121 -0
- package/src/web-components/index.ts +47 -0
- package/src/web-components/interaction/BdsButton.mdx +106 -0
- package/src/web-components/interaction/BdsPopover.mdx +120 -0
- package/src/web-components/interaction/BdsToastProvider.mdx +94 -0
- package/src/web-components/interaction/bds-accordion-item.spec.ts +75 -0
- package/src/web-components/interaction/bds-accordion-item.ts +181 -0
- package/src/web-components/interaction/bds-accordion.spec.ts +73 -0
- package/src/web-components/interaction/bds-accordion.ts +99 -0
- package/src/web-components/interaction/bds-collapsible.spec.ts +56 -0
- package/src/web-components/interaction/bds-collapsible.ts +170 -0
- package/src/web-components/interaction/bds-dialog.spec.ts +119 -0
- package/src/web-components/interaction/bds-dialog.ts +224 -0
- package/src/web-components/interaction/bds-drawer.spec.ts +113 -0
- package/src/web-components/interaction/bds-drawer.ts +266 -0
- package/src/web-components/interaction/bds-popover.spec.ts +49 -1
- package/src/web-components/interaction/bds-popover.ts +12 -0
- package/src/web-components/interaction/bds-skip-link.spec.ts +42 -0
- package/src/web-components/interaction/bds-skip-link.ts +74 -0
- package/src/web-components/interaction/bds-tab-panel.spec.ts +32 -0
- package/src/web-components/interaction/bds-tab-panel.ts +38 -0
- package/src/web-components/interaction/bds-tab.spec.ts +71 -0
- package/src/web-components/interaction/bds-tab.ts +110 -0
- package/src/web-components/interaction/bds-tabs.spec.ts +120 -0
- package/src/web-components/interaction/bds-tabs.ts +152 -0
- package/src/web-components/interaction/bds-tooltip.spec.ts +49 -0
- package/src/web-components/interaction/bds-tooltip.ts +127 -0
- package/src/web-components/interaction/form/bds-checkbox.spec.ts +63 -0
- package/src/web-components/interaction/form/bds-checkbox.ts +168 -0
- package/src/web-components/interaction/form/bds-combobox.spec.ts +117 -0
- package/src/web-components/interaction/form/bds-combobox.ts +336 -0
- package/src/web-components/interaction/form/bds-file-input.spec.ts +58 -0
- package/src/web-components/interaction/form/bds-file-input.ts +209 -0
- package/src/web-components/interaction/form/bds-number-input.spec.ts +87 -0
- package/src/web-components/interaction/form/bds-number-input.ts +221 -0
- package/src/web-components/interaction/form/bds-radio.spec.ts +70 -0
- package/src/web-components/interaction/form/bds-radio.ts +157 -0
- package/src/web-components/interaction/form/bds-segmented-control.spec.ts +74 -0
- package/src/web-components/interaction/form/bds-segmented-control.ts +211 -0
- package/src/web-components/interaction/form/bds-select.spec.ts +74 -0
- package/src/web-components/interaction/form/bds-select.ts +190 -0
- package/src/web-components/interaction/form/bds-slider.spec.ts +41 -0
- package/src/web-components/interaction/form/bds-slider.ts +162 -0
- package/src/web-components/interaction/form/bds-switch.spec.ts +62 -0
- package/src/web-components/interaction/form/bds-switch.ts +166 -0
- package/src/web-components/interaction/form/bds-textarea.spec.ts +55 -0
- package/src/web-components/interaction/form/bds-textarea.ts +143 -0
- package/src/web-components/test/helpers.ts +8 -0
- package/src/web-components/ui/BdsAlert.mdx +90 -0
- package/src/web-components/ui/BdsBadge.mdx +74 -0
- package/src/web-components/ui/bds-avatar.spec.ts +75 -0
- package/src/web-components/ui/bds-avatar.ts +122 -0
- package/src/web-components/ui/bds-breadcrumb.spec.ts +55 -0
- package/src/web-components/ui/bds-breadcrumb.ts +114 -0
- package/src/web-components/ui/bds-card.spec.ts +70 -0
- package/src/web-components/ui/bds-card.ts +156 -0
- package/src/web-components/ui/bds-description-list.spec.ts +36 -0
- package/src/web-components/ui/bds-description-list.ts +79 -0
- package/src/web-components/ui/bds-icon-wrapper.spec.ts +21 -0
- package/src/web-components/ui/bds-icon-wrapper.ts +68 -0
- package/src/web-components/ui/bds-link.spec.ts +72 -0
- package/src/web-components/ui/bds-link.ts +138 -0
- package/src/web-components/ui/bds-loading.spec.ts +38 -0
- package/src/web-components/ui/bds-loading.ts +76 -0
- package/src/web-components/ui/bds-notification-banner.spec.ts +82 -0
- package/src/web-components/ui/bds-notification-banner.ts +185 -0
- package/src/web-components/ui/bds-progress-circle.spec.ts +58 -0
- package/src/web-components/ui/bds-progress-circle.ts +142 -0
- package/src/web-components/ui/bds-progress.spec.ts +66 -0
- package/src/web-components/ui/bds-progress.ts +127 -0
- package/src/web-components/ui/bds-rating.spec.ts +70 -0
- package/src/web-components/ui/bds-rating.ts +80 -0
- package/src/web-components/ui/bds-section-header.spec.ts +57 -0
- package/src/web-components/ui/bds-section-header.ts +96 -0
- package/src/web-components/ui/bds-separator.spec.ts +50 -0
- package/src/web-components/ui/bds-separator.ts +66 -0
- package/src/web-components/ui/bds-skeleton.spec.ts +22 -0
- package/src/web-components/ui/bds-skeleton.ts +55 -0
- package/src/web-components/ui/bds-typography.spec.ts +76 -0
- package/src/web-components/ui/bds-typography.ts +112 -0
- package/dist/web-components.d.ts +0 -303
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-number-input>` — form-associated Number Input with stepper buttons.
|
|
6
|
+
*
|
|
7
|
+
* Attributes:
|
|
8
|
+
* name — form field name
|
|
9
|
+
* value — current numeric value (default: 0)
|
|
10
|
+
* min — minimum allowed value
|
|
11
|
+
* max — maximum allowed value
|
|
12
|
+
* step — increment/decrement step (default: 1)
|
|
13
|
+
* disabled — boolean
|
|
14
|
+
*
|
|
15
|
+
* Events:
|
|
16
|
+
* input — fired on stepper click and native input
|
|
17
|
+
* change — native change event
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <bds-number-input name="qty" value="1" min="0" max="99" step="1"></bds-number-input>
|
|
21
|
+
*/
|
|
22
|
+
declare class BdsNumberInput extends LitElement {
|
|
23
|
+
static formAssociated: boolean;
|
|
24
|
+
static styles: lit.CSSResult;
|
|
25
|
+
static properties: {
|
|
26
|
+
name: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
reflect: boolean;
|
|
29
|
+
};
|
|
30
|
+
value: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
};
|
|
33
|
+
min: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
};
|
|
36
|
+
max: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
};
|
|
39
|
+
step: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
};
|
|
42
|
+
disabled: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
reflect: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
name: string;
|
|
48
|
+
value: number;
|
|
49
|
+
min: number | undefined;
|
|
50
|
+
max: number | undefined;
|
|
51
|
+
step: number;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
private _internals;
|
|
54
|
+
constructor();
|
|
55
|
+
updated(changed: Map<string, unknown>): void;
|
|
56
|
+
formResetCallback(): void;
|
|
57
|
+
private _clamp;
|
|
58
|
+
private _adjust;
|
|
59
|
+
private _handleChange;
|
|
60
|
+
render(): lit.TemplateResult<1>;
|
|
61
|
+
}
|
|
62
|
+
declare global {
|
|
63
|
+
interface HTMLElementTagNameMap {
|
|
64
|
+
'bds-number-input': BdsNumberInput;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { BdsNumberInput };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-radio>` — form-associated Radio custom element.
|
|
6
|
+
*
|
|
7
|
+
* Participates in HTML forms via the Form-Associated Custom Elements API.
|
|
8
|
+
* Use multiple `<bds-radio>` elements with the same `name` to form a group.
|
|
9
|
+
*
|
|
10
|
+
* Attributes:
|
|
11
|
+
* name — form field name (groups radio buttons)
|
|
12
|
+
* value — submitted value when selected
|
|
13
|
+
* checked — boolean; whether this option is selected
|
|
14
|
+
* required — boolean
|
|
15
|
+
* disabled — boolean
|
|
16
|
+
*
|
|
17
|
+
* Slots:
|
|
18
|
+
* (default) — label text
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <bds-radio name="size" value="s">Small</bds-radio>
|
|
22
|
+
* <bds-radio name="size" value="m" checked>Medium</bds-radio>
|
|
23
|
+
* <bds-radio name="size" value="l">Large</bds-radio>
|
|
24
|
+
*/
|
|
25
|
+
declare class BdsRadio extends LitElement {
|
|
26
|
+
static formAssociated: boolean;
|
|
27
|
+
static styles: lit.CSSResult;
|
|
28
|
+
static properties: {
|
|
29
|
+
name: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
reflect: boolean;
|
|
32
|
+
};
|
|
33
|
+
value: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
checked: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
reflect: boolean;
|
|
39
|
+
};
|
|
40
|
+
required: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
reflect: boolean;
|
|
43
|
+
};
|
|
44
|
+
disabled: {
|
|
45
|
+
type: BooleanConstructor;
|
|
46
|
+
reflect: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
name: string;
|
|
50
|
+
value: string;
|
|
51
|
+
checked: boolean;
|
|
52
|
+
required: boolean;
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
private _internals;
|
|
55
|
+
private readonly _uid;
|
|
56
|
+
constructor();
|
|
57
|
+
updated(changed: Map<string, unknown>): void;
|
|
58
|
+
formResetCallback(): void;
|
|
59
|
+
private _handleChange;
|
|
60
|
+
render(): lit.TemplateResult<1>;
|
|
61
|
+
}
|
|
62
|
+
declare global {
|
|
63
|
+
interface HTMLElementTagNameMap {
|
|
64
|
+
'bds-radio': BdsRadio;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { BdsRadio };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
interface SegmentedOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* `<bds-segmented-control>` — form-associated Segmented Control custom element.
|
|
11
|
+
*
|
|
12
|
+
* Renders a group of radio buttons styled as a unified segmented control.
|
|
13
|
+
* Passes a JSON `options` attribute because reactive slot content can't be
|
|
14
|
+
* easily converted to radio groups.
|
|
15
|
+
*
|
|
16
|
+
* Attributes:
|
|
17
|
+
* name — form field name (also used for the internal radio group)
|
|
18
|
+
* value — currently selected value
|
|
19
|
+
* options — JSON array of `{ value, label, disabled? }` option objects
|
|
20
|
+
* disabled — boolean; disables all options
|
|
21
|
+
*
|
|
22
|
+
* Events:
|
|
23
|
+
* change — fired when a new segment is selected
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <bds-segmented-control
|
|
27
|
+
* name="view"
|
|
28
|
+
* value="list"
|
|
29
|
+
* options='[{"value":"list","label":"List"},{"value":"grid","label":"Grid"}]'
|
|
30
|
+
* ></bds-segmented-control>
|
|
31
|
+
*/
|
|
32
|
+
declare class BdsSegmentedControl extends LitElement {
|
|
33
|
+
static formAssociated: boolean;
|
|
34
|
+
static styles: lit.CSSResult;
|
|
35
|
+
static properties: {
|
|
36
|
+
name: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
reflect: boolean;
|
|
39
|
+
};
|
|
40
|
+
value: {
|
|
41
|
+
type: StringConstructor;
|
|
42
|
+
};
|
|
43
|
+
options: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
};
|
|
46
|
+
disabled: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
reflect: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
name: string;
|
|
52
|
+
value: string;
|
|
53
|
+
options: string;
|
|
54
|
+
disabled: boolean;
|
|
55
|
+
private _internals;
|
|
56
|
+
private readonly _uid;
|
|
57
|
+
constructor();
|
|
58
|
+
private get _options();
|
|
59
|
+
updated(changed: Map<string, unknown>): void;
|
|
60
|
+
private _updateThumb;
|
|
61
|
+
formResetCallback(): void;
|
|
62
|
+
private _handleChange;
|
|
63
|
+
render(): lit.TemplateResult<1>;
|
|
64
|
+
}
|
|
65
|
+
declare global {
|
|
66
|
+
interface HTMLElementTagNameMap {
|
|
67
|
+
'bds-segmented-control': BdsSegmentedControl;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { BdsSegmentedControl, type SegmentedOption };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
interface SelectOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* `<bds-select>` — form-associated Select custom element.
|
|
11
|
+
*
|
|
12
|
+
* Uses a JSON `options` attribute because slotting `<option>` elements into a
|
|
13
|
+
* shadow-DOM `<select>` is not supported cross-browser.
|
|
14
|
+
*
|
|
15
|
+
* Attributes:
|
|
16
|
+
* name — form field name
|
|
17
|
+
* value — currently selected value
|
|
18
|
+
* options — JSON array of `{ value, label, disabled? }` option objects
|
|
19
|
+
* placeholder — placeholder option label (disabled, empty value)
|
|
20
|
+
* required — boolean
|
|
21
|
+
* disabled — boolean
|
|
22
|
+
*
|
|
23
|
+
* Events:
|
|
24
|
+
* change — native change event (forwarded from inner select)
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* <bds-select
|
|
28
|
+
* name="country"
|
|
29
|
+
* placeholder="Choose…"
|
|
30
|
+
* options='[{"value":"nl","label":"Netherlands"},{"value":"be","label":"Belgium"}]'
|
|
31
|
+
* ></bds-select>
|
|
32
|
+
*/
|
|
33
|
+
declare class BdsSelect extends LitElement {
|
|
34
|
+
static formAssociated: boolean;
|
|
35
|
+
static styles: lit.CSSResult;
|
|
36
|
+
static properties: {
|
|
37
|
+
name: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
reflect: boolean;
|
|
40
|
+
};
|
|
41
|
+
value: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
};
|
|
44
|
+
options: {
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
};
|
|
47
|
+
placeholder: {
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
};
|
|
50
|
+
required: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
reflect: boolean;
|
|
53
|
+
};
|
|
54
|
+
disabled: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
reflect: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
name: string;
|
|
60
|
+
value: string;
|
|
61
|
+
options: string;
|
|
62
|
+
placeholder: string;
|
|
63
|
+
required: boolean;
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
private _internals;
|
|
66
|
+
constructor();
|
|
67
|
+
private get _options();
|
|
68
|
+
updated(changed: Map<string, unknown>): void;
|
|
69
|
+
formResetCallback(): void;
|
|
70
|
+
private _handleChange;
|
|
71
|
+
render(): lit.TemplateResult<1>;
|
|
72
|
+
}
|
|
73
|
+
declare global {
|
|
74
|
+
interface HTMLElementTagNameMap {
|
|
75
|
+
'bds-select': BdsSelect;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export { BdsSelect, type SelectOption };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-slider>` — form-associated Slider / Range Input custom element.
|
|
6
|
+
*
|
|
7
|
+
* Uses a native `<input type="range">` with a CSS fill track driven by
|
|
8
|
+
* the `--slider_fill` custom property.
|
|
9
|
+
*
|
|
10
|
+
* Attributes:
|
|
11
|
+
* name — form field name
|
|
12
|
+
* value — current value (default: 0)
|
|
13
|
+
* min — minimum value (default: 0)
|
|
14
|
+
* max — maximum value (default: 100)
|
|
15
|
+
* step — step increment (default: 1)
|
|
16
|
+
* disabled — boolean
|
|
17
|
+
*
|
|
18
|
+
* Events:
|
|
19
|
+
* input — fired as the user drags
|
|
20
|
+
* change — fired when the user releases
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <bds-slider name="volume" value="50" min="0" max="100" step="5"></bds-slider>
|
|
24
|
+
*/
|
|
25
|
+
declare class BdsSlider extends LitElement {
|
|
26
|
+
static formAssociated: boolean;
|
|
27
|
+
static styles: lit.CSSResult;
|
|
28
|
+
static properties: {
|
|
29
|
+
name: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
reflect: boolean;
|
|
32
|
+
};
|
|
33
|
+
value: {
|
|
34
|
+
type: NumberConstructor;
|
|
35
|
+
};
|
|
36
|
+
min: {
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
};
|
|
39
|
+
max: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
};
|
|
42
|
+
step: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
};
|
|
45
|
+
disabled: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
reflect: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
name: string;
|
|
51
|
+
value: number;
|
|
52
|
+
min: number;
|
|
53
|
+
max: number;
|
|
54
|
+
step: number;
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
private _internals;
|
|
57
|
+
constructor();
|
|
58
|
+
updated(changed: Map<string, unknown>): void;
|
|
59
|
+
formResetCallback(): void;
|
|
60
|
+
private get _fillPct();
|
|
61
|
+
private _handleInput;
|
|
62
|
+
render(): lit.TemplateResult<1>;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
interface HTMLElementTagNameMap {
|
|
66
|
+
'bds-slider': BdsSlider;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { BdsSlider };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-switch>` — form-associated Toggle Switch custom element.
|
|
6
|
+
*
|
|
7
|
+
* Visually a toggle switch but semantically equivalent to a checkbox
|
|
8
|
+
* (`role="switch"`). Participates in HTML forms via the Form-Associated
|
|
9
|
+
* Custom Elements API.
|
|
10
|
+
*
|
|
11
|
+
* Attributes:
|
|
12
|
+
* name — form field name
|
|
13
|
+
* value — submitted value when on (default: "on")
|
|
14
|
+
* checked — boolean; whether the switch is on
|
|
15
|
+
* required — boolean
|
|
16
|
+
* disabled — boolean
|
|
17
|
+
*
|
|
18
|
+
* Slots:
|
|
19
|
+
* (default) — label text
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <bds-switch name="notifications" value="enabled">Enable notifications</bds-switch>
|
|
23
|
+
*/
|
|
24
|
+
declare class BdsSwitch extends LitElement {
|
|
25
|
+
static formAssociated: boolean;
|
|
26
|
+
static styles: lit.CSSResult;
|
|
27
|
+
static properties: {
|
|
28
|
+
name: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
reflect: boolean;
|
|
31
|
+
};
|
|
32
|
+
value: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
};
|
|
35
|
+
checked: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
reflect: boolean;
|
|
38
|
+
};
|
|
39
|
+
required: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
reflect: boolean;
|
|
42
|
+
};
|
|
43
|
+
disabled: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
reflect: boolean;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
name: string;
|
|
49
|
+
value: string;
|
|
50
|
+
checked: boolean;
|
|
51
|
+
required: boolean;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
private _internals;
|
|
54
|
+
private readonly _uid;
|
|
55
|
+
constructor();
|
|
56
|
+
updated(changed: Map<string, unknown>): void;
|
|
57
|
+
formResetCallback(): void;
|
|
58
|
+
private _handleChange;
|
|
59
|
+
render(): lit.TemplateResult<1>;
|
|
60
|
+
}
|
|
61
|
+
declare global {
|
|
62
|
+
interface HTMLElementTagNameMap {
|
|
63
|
+
'bds-switch': BdsSwitch;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export { BdsSwitch };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-textarea>` — form-associated Textarea custom element.
|
|
6
|
+
*
|
|
7
|
+
* Wraps a native `<textarea>` for consistent styling while participating
|
|
8
|
+
* in HTML forms via the Form-Associated Custom Elements API.
|
|
9
|
+
*
|
|
10
|
+
* Attributes:
|
|
11
|
+
* name — form field name
|
|
12
|
+
* value — text value
|
|
13
|
+
* placeholder — placeholder text
|
|
14
|
+
* rows — number of visible rows (default: 4)
|
|
15
|
+
* required — boolean
|
|
16
|
+
* disabled — boolean
|
|
17
|
+
*
|
|
18
|
+
* Events:
|
|
19
|
+
* input — native input event
|
|
20
|
+
* change — native change event
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <bds-textarea name="message" placeholder="Enter message…" rows="6"></bds-textarea>
|
|
24
|
+
*/
|
|
25
|
+
declare class BdsTextarea extends LitElement {
|
|
26
|
+
static formAssociated: boolean;
|
|
27
|
+
static styles: lit.CSSResult;
|
|
28
|
+
static properties: {
|
|
29
|
+
name: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
reflect: boolean;
|
|
32
|
+
};
|
|
33
|
+
value: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
};
|
|
36
|
+
placeholder: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
rows: {
|
|
40
|
+
type: NumberConstructor;
|
|
41
|
+
};
|
|
42
|
+
required: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
reflect: boolean;
|
|
45
|
+
};
|
|
46
|
+
disabled: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
reflect: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
name: string;
|
|
52
|
+
value: string;
|
|
53
|
+
placeholder: string;
|
|
54
|
+
rows: number;
|
|
55
|
+
required: boolean;
|
|
56
|
+
disabled: boolean;
|
|
57
|
+
private _internals;
|
|
58
|
+
constructor();
|
|
59
|
+
updated(changed: Map<string, unknown>): void;
|
|
60
|
+
formResetCallback(): void;
|
|
61
|
+
private _handleInput;
|
|
62
|
+
render(): lit.TemplateResult<1>;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
interface HTMLElementTagNameMap {
|
|
66
|
+
'bds-textarea': BdsTextarea;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { BdsTextarea };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
type AlertVariant = 'info' | 'success' | 'warning' | 'error';
|
|
5
|
+
/**
|
|
6
|
+
* `<bds-alert>` — framework-agnostic Alert custom element.
|
|
7
|
+
*
|
|
8
|
+
* Attributes:
|
|
9
|
+
* variant — "info" (default) | "success" | "warning" | "error"
|
|
10
|
+
* title — optional heading above the body text
|
|
11
|
+
* dismissible — boolean; shows a dismiss button when present
|
|
12
|
+
*
|
|
13
|
+
* Slots:
|
|
14
|
+
* (default) — alert body content
|
|
15
|
+
* icon — optional icon displayed to the left of the content
|
|
16
|
+
*
|
|
17
|
+
* Events:
|
|
18
|
+
* bds-dismiss — fired (bubbles, composed) when the dismiss button is clicked
|
|
19
|
+
*
|
|
20
|
+
* Accessibility:
|
|
21
|
+
* role="alert" + aria-live="assertive" for error/warning variants,
|
|
22
|
+
* role="status" + aria-live="polite" for info/success variants.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <bds-alert variant="success" title="Saved!">Your changes have been saved.</bds-alert>
|
|
26
|
+
*
|
|
27
|
+
* <bds-alert variant="error" dismissible>
|
|
28
|
+
* <svg slot="icon">…</svg>
|
|
29
|
+
* Something went wrong.
|
|
30
|
+
* </bds-alert>
|
|
31
|
+
*/
|
|
32
|
+
declare class BdsAlert extends LitElement {
|
|
33
|
+
static styles: lit.CSSResult;
|
|
34
|
+
static properties: {
|
|
35
|
+
variant: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
reflect: boolean;
|
|
38
|
+
};
|
|
39
|
+
title: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
};
|
|
42
|
+
dismissible: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
reflect: boolean;
|
|
45
|
+
};
|
|
46
|
+
_iconFilled: {
|
|
47
|
+
state: boolean;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
variant: AlertVariant;
|
|
51
|
+
title: string;
|
|
52
|
+
dismissible: boolean;
|
|
53
|
+
private _iconFilled;
|
|
54
|
+
constructor();
|
|
55
|
+
private _onIconSlotChange;
|
|
56
|
+
private get _isUrgent();
|
|
57
|
+
private _handleDismiss;
|
|
58
|
+
render(): lit.TemplateResult<1>;
|
|
59
|
+
}
|
|
60
|
+
declare global {
|
|
61
|
+
interface HTMLElementTagNameMap {
|
|
62
|
+
'bds-alert': BdsAlert;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { type AlertVariant, BdsAlert };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-avatar>` — framework-agnostic Avatar custom element.
|
|
6
|
+
*
|
|
7
|
+
* Shows an image when `src` is set; falls back to initials derived from `name`.
|
|
8
|
+
*
|
|
9
|
+
* Attributes:
|
|
10
|
+
* src — image URL
|
|
11
|
+
* alt — image alt text (defaults to `name` or "User avatar")
|
|
12
|
+
* name — full name; used to compute initials and as fallback aria-label
|
|
13
|
+
* size — "small" | "medium" (default) | "large"
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <bds-avatar src="/photo.jpg" name="Jane Doe"></bds-avatar>
|
|
17
|
+
* <bds-avatar name="Jane Doe" size="large"></bds-avatar>
|
|
18
|
+
*/
|
|
19
|
+
declare class BdsAvatar extends LitElement {
|
|
20
|
+
static styles: lit.CSSResult;
|
|
21
|
+
static properties: {
|
|
22
|
+
src: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
};
|
|
25
|
+
alt: {
|
|
26
|
+
type: StringConstructor;
|
|
27
|
+
};
|
|
28
|
+
name: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
size: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
reflect: boolean;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
src: string;
|
|
37
|
+
alt: string;
|
|
38
|
+
name: string;
|
|
39
|
+
size: 'small' | 'medium' | 'large';
|
|
40
|
+
constructor();
|
|
41
|
+
private get _initials();
|
|
42
|
+
render(): lit.TemplateResult<1>;
|
|
43
|
+
}
|
|
44
|
+
declare global {
|
|
45
|
+
interface HTMLElementTagNameMap {
|
|
46
|
+
'bds-avatar': BdsAvatar;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { BdsAvatar };
|