@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,62 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
type PopoverPlacement = 'bottom' | 'top' | 'left' | 'right';
|
|
5
|
+
/**
|
|
6
|
+
* `<bds-popover>` — framework-agnostic Popover custom element.
|
|
7
|
+
*
|
|
8
|
+
* Uses CSS Anchor Positioning within the shadow DOM so the panel stays
|
|
9
|
+
* anchored to the trigger and automatically repositions when it would
|
|
10
|
+
* overflow the viewport (`@position-try` fallbacks).
|
|
11
|
+
*
|
|
12
|
+
* Attributes:
|
|
13
|
+
* placement — "bottom" (default) | "top" | "left" | "right"
|
|
14
|
+
* open — boolean; reflects whether the panel is visible
|
|
15
|
+
*
|
|
16
|
+
* Slots:
|
|
17
|
+
* trigger — the element that opens/closes the panel on click
|
|
18
|
+
* (default) — panel content
|
|
19
|
+
*
|
|
20
|
+
* Events:
|
|
21
|
+
* bds-open — fired (bubbles, composed) when the panel opens
|
|
22
|
+
* bds-close — fired (bubbles, composed) when the panel closes
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <bds-popover placement="bottom">
|
|
26
|
+
* <button slot="trigger">Open</button>
|
|
27
|
+
* <p>Panel content here</p>
|
|
28
|
+
* </bds-popover>
|
|
29
|
+
*/
|
|
30
|
+
declare class BdsPopover extends LitElement {
|
|
31
|
+
static styles: lit.CSSResult;
|
|
32
|
+
static properties: {
|
|
33
|
+
placement: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
reflect: boolean;
|
|
36
|
+
};
|
|
37
|
+
open: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
reflect: boolean;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
placement: PopoverPlacement;
|
|
43
|
+
open: boolean;
|
|
44
|
+
private _anchorName;
|
|
45
|
+
constructor();
|
|
46
|
+
connectedCallback(): void;
|
|
47
|
+
disconnectedCallback(): void;
|
|
48
|
+
private _onKeydown;
|
|
49
|
+
private _onCommand;
|
|
50
|
+
private _onOutsideClick;
|
|
51
|
+
private _toggle;
|
|
52
|
+
private _open;
|
|
53
|
+
private _close;
|
|
54
|
+
render(): lit.TemplateResult<1>;
|
|
55
|
+
}
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'bds-popover': BdsPopover;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { BdsPopover, type PopoverPlacement };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-skip-link>` — framework-agnostic Skip Navigation Link custom element.
|
|
6
|
+
*
|
|
7
|
+
* Visually hidden until focused. Allows keyboard users to skip repetitive
|
|
8
|
+
* navigation and jump directly to main content.
|
|
9
|
+
*
|
|
10
|
+
* Attributes:
|
|
11
|
+
* href — the target anchor (default: "#main")
|
|
12
|
+
*
|
|
13
|
+
* Slots:
|
|
14
|
+
* (default) — link text (default: "Skip to main content")
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <bds-skip-link href="#main-content">Skip to main content</bds-skip-link>
|
|
18
|
+
*/
|
|
19
|
+
declare class BdsSkipLink extends LitElement {
|
|
20
|
+
static styles: lit.CSSResult;
|
|
21
|
+
static properties: {
|
|
22
|
+
href: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
href: string;
|
|
27
|
+
constructor();
|
|
28
|
+
render(): lit.TemplateResult<1>;
|
|
29
|
+
}
|
|
30
|
+
declare global {
|
|
31
|
+
interface HTMLElementTagNameMap {
|
|
32
|
+
'bds-skip-link': BdsSkipLink;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { BdsSkipLink };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-tab-panel>` — child element of `<bds-tabs>`.
|
|
6
|
+
*
|
|
7
|
+
* Contains the content displayed for the associated tab. The `hidden`
|
|
8
|
+
* state is managed by the parent `<bds-tabs>` element.
|
|
9
|
+
*
|
|
10
|
+
* Slots:
|
|
11
|
+
* (default) — panel content
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <bds-tab-panel>Panel content here</bds-tab-panel>
|
|
15
|
+
*/
|
|
16
|
+
declare class BdsTabPanel extends LitElement {
|
|
17
|
+
static styles: lit.CSSResult;
|
|
18
|
+
render(): lit.TemplateResult<1>;
|
|
19
|
+
}
|
|
20
|
+
declare global {
|
|
21
|
+
interface HTMLElementTagNameMap {
|
|
22
|
+
'bds-tab-panel': BdsTabPanel;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { BdsTabPanel };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-tab>` — child element of `<bds-tabs>`.
|
|
6
|
+
*
|
|
7
|
+
* Represents a single tab button. State (`selected`, `tabIndex`, `disabled`)
|
|
8
|
+
* is managed by the parent `<bds-tabs>` element.
|
|
9
|
+
*
|
|
10
|
+
* Slots:
|
|
11
|
+
* (default) — tab label
|
|
12
|
+
*
|
|
13
|
+
* Events:
|
|
14
|
+
* bds-tab-select — fired (bubbles, composed) when the tab is clicked
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <bds-tab>Overview</bds-tab>
|
|
18
|
+
*/
|
|
19
|
+
declare class BdsTab extends LitElement {
|
|
20
|
+
static styles: lit.CSSResult;
|
|
21
|
+
static properties: {
|
|
22
|
+
selected: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
reflect: boolean;
|
|
25
|
+
};
|
|
26
|
+
disabled: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
reflect: boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
selected: boolean;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
constructor();
|
|
34
|
+
/** Called by `bds-tabs` to focus the inner button for keyboard navigation. */
|
|
35
|
+
focusButton(): void;
|
|
36
|
+
private _handleClick;
|
|
37
|
+
render(): lit.TemplateResult<1>;
|
|
38
|
+
}
|
|
39
|
+
declare global {
|
|
40
|
+
interface HTMLElementTagNameMap {
|
|
41
|
+
'bds-tab': BdsTab;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { BdsTab };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-tabs>` — framework-agnostic Tabs custom element.
|
|
6
|
+
*
|
|
7
|
+
* Contains `<bds-tab>` and `<bds-tab-panel>` children. Tabs and panels are
|
|
8
|
+
* matched by DOM order: the first tab corresponds to the first panel, etc.
|
|
9
|
+
*
|
|
10
|
+
* Use `slot="tab"` on `<bds-tab>` elements and `slot="panel"` on
|
|
11
|
+
* `<bds-tab-panel>` elements.
|
|
12
|
+
*
|
|
13
|
+
* Keyboard navigation: ArrowLeft/Right moves between tabs, Home/End jumps to
|
|
14
|
+
* first/last enabled tab.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <bds-tabs>
|
|
18
|
+
* <bds-tab slot="tab">Overview</bds-tab>
|
|
19
|
+
* <bds-tab slot="tab">Details</bds-tab>
|
|
20
|
+
* <bds-tab slot="tab" disabled>Disabled</bds-tab>
|
|
21
|
+
* <bds-tab-panel slot="panel">Overview content</bds-tab-panel>
|
|
22
|
+
* <bds-tab-panel slot="panel">Details content</bds-tab-panel>
|
|
23
|
+
* <bds-tab-panel slot="panel">Disabled content</bds-tab-panel>
|
|
24
|
+
* </bds-tabs>
|
|
25
|
+
*/
|
|
26
|
+
declare class BdsTabs extends LitElement {
|
|
27
|
+
static styles: lit.CSSResult;
|
|
28
|
+
private _activeIndex;
|
|
29
|
+
private _mo;
|
|
30
|
+
connectedCallback(): void;
|
|
31
|
+
disconnectedCallback(): void;
|
|
32
|
+
private get _tabs();
|
|
33
|
+
private get _panels();
|
|
34
|
+
private get _enabledIndexes();
|
|
35
|
+
private _applyState;
|
|
36
|
+
private _handleTabSelect;
|
|
37
|
+
private _handleKeydown;
|
|
38
|
+
render(): lit.TemplateResult<1>;
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLElementTagNameMap {
|
|
42
|
+
'bds-tabs': BdsTabs;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { BdsTabs };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
type ToastVariant = 'success' | 'error' | 'info' | 'warning';
|
|
5
|
+
/**
|
|
6
|
+
* `<bds-toast-provider>` — framework-agnostic Toast provider custom element.
|
|
7
|
+
*
|
|
8
|
+
* Wraps page content and manages a `popover="manual"` toast container that
|
|
9
|
+
* renders in the browser top layer — above all fixed/sticky elements without
|
|
10
|
+
* needing a z-index.
|
|
11
|
+
*
|
|
12
|
+
* Usage:
|
|
13
|
+
* // Instance method (direct reference)
|
|
14
|
+
* provider.showToast('Saved!', 'success');
|
|
15
|
+
*
|
|
16
|
+
* // Static convenience (finds the first provider in the DOM)
|
|
17
|
+
* BdsToastProvider.show('Something went wrong', 'error');
|
|
18
|
+
*
|
|
19
|
+
* // Event-driven (no import required)
|
|
20
|
+
* document.dispatchEvent(new CustomEvent('bds-show-toast', {
|
|
21
|
+
* detail: { message: 'Hello', variant: 'info' }
|
|
22
|
+
* }));
|
|
23
|
+
*
|
|
24
|
+
* Slots:
|
|
25
|
+
* (default) — page content; the host uses display:contents so layout
|
|
26
|
+
* is unaffected
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* <bds-toast-provider>
|
|
30
|
+
* <main>…</main>
|
|
31
|
+
* </bds-toast-provider>
|
|
32
|
+
*/
|
|
33
|
+
declare class BdsToastProvider extends LitElement {
|
|
34
|
+
static styles: lit.CSSResult;
|
|
35
|
+
static properties: {
|
|
36
|
+
_toasts: {
|
|
37
|
+
state: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
private _toasts;
|
|
41
|
+
constructor();
|
|
42
|
+
connectedCallback(): void;
|
|
43
|
+
disconnectedCallback(): void;
|
|
44
|
+
updated(): void;
|
|
45
|
+
showToast(message: string, variant?: ToastVariant): void;
|
|
46
|
+
private _removeToast;
|
|
47
|
+
private _onShowToastEvent;
|
|
48
|
+
static show(message: string, variant?: ToastVariant): void;
|
|
49
|
+
render(): lit.TemplateResult<1>;
|
|
50
|
+
}
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementTagNameMap {
|
|
53
|
+
'bds-toast-provider': BdsToastProvider;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { BdsToastProvider, type ToastVariant };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
/**
|
|
6
|
+
* `<bds-tooltip>` — framework-agnostic Tooltip custom element.
|
|
7
|
+
*
|
|
8
|
+
* Shows a tooltip panel on hover and keyboard focus using CSS-only visibility.
|
|
9
|
+
* The tooltip position is controlled via the `placement` attribute.
|
|
10
|
+
*
|
|
11
|
+
* Attributes:
|
|
12
|
+
* content — text to display in the tooltip
|
|
13
|
+
* placement — "top" (default) | "bottom" | "left" | "right"
|
|
14
|
+
*
|
|
15
|
+
* Slots:
|
|
16
|
+
* (default) — the trigger element (button, icon, etc.)
|
|
17
|
+
*
|
|
18
|
+
* Accessibility:
|
|
19
|
+
* The `aria-describedby` relationship between trigger and tooltip panel
|
|
20
|
+
* cannot cross shadow DOM boundaries; screen readers will announce the tooltip
|
|
21
|
+
* via role="tooltip" proximity when it becomes visible.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <bds-tooltip content="More information" placement="bottom">
|
|
25
|
+
* <button type="button">?</button>
|
|
26
|
+
* </bds-tooltip>
|
|
27
|
+
*/
|
|
28
|
+
declare class BdsTooltip extends LitElement {
|
|
29
|
+
static styles: lit.CSSResult;
|
|
30
|
+
static properties: {
|
|
31
|
+
content: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
};
|
|
34
|
+
placement: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
reflect: boolean;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
content: string;
|
|
40
|
+
placement: TooltipPlacement;
|
|
41
|
+
constructor();
|
|
42
|
+
render(): lit.TemplateResult<1>;
|
|
43
|
+
}
|
|
44
|
+
declare global {
|
|
45
|
+
interface HTMLElementTagNameMap {
|
|
46
|
+
'bds-tooltip': BdsTooltip;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { BdsTooltip, type TooltipPlacement };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-checkbox>` — form-associated Checkbox custom element.
|
|
6
|
+
*
|
|
7
|
+
* Participates in HTML forms via the Form-Associated Custom Elements API
|
|
8
|
+
* (`ElementInternals`). Native browser validation (required, etc.) works
|
|
9
|
+
* without any wrapper.
|
|
10
|
+
*
|
|
11
|
+
* Attributes:
|
|
12
|
+
* name — form field name
|
|
13
|
+
* value — submitted value when checked (default: "on")
|
|
14
|
+
* checked — boolean; whether the checkbox is checked
|
|
15
|
+
* required — boolean
|
|
16
|
+
* disabled — boolean
|
|
17
|
+
*
|
|
18
|
+
* Slots:
|
|
19
|
+
* (default) — label text
|
|
20
|
+
*
|
|
21
|
+
* Events:
|
|
22
|
+
* change — native change event (forwarded from inner input)
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* <bds-checkbox name="agree" value="yes" required>I agree</bds-checkbox>
|
|
26
|
+
*/
|
|
27
|
+
declare class BdsCheckbox extends LitElement {
|
|
28
|
+
static formAssociated: boolean;
|
|
29
|
+
static styles: lit.CSSResult;
|
|
30
|
+
static properties: {
|
|
31
|
+
name: {
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
reflect: boolean;
|
|
34
|
+
};
|
|
35
|
+
value: {
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
checked: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
reflect: boolean;
|
|
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
|
+
checked: boolean;
|
|
54
|
+
required: boolean;
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
private _internals;
|
|
57
|
+
private readonly _uid;
|
|
58
|
+
constructor();
|
|
59
|
+
updated(changed: Map<string, unknown>): void;
|
|
60
|
+
formResetCallback(): void;
|
|
61
|
+
private _handleChange;
|
|
62
|
+
render(): lit.TemplateResult<1>;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
interface HTMLElementTagNameMap {
|
|
66
|
+
'bds-checkbox': BdsCheckbox;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { BdsCheckbox };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
interface ComboboxOption {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* `<bds-combobox>` — form-associated Combobox (autocomplete) custom element.
|
|
11
|
+
*
|
|
12
|
+
* Renders a text input with a filterable dropdown. Keyboard navigation:
|
|
13
|
+
* ArrowDown/ArrowUp to move focus, Enter to select, Escape to close.
|
|
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 — input placeholder text
|
|
20
|
+
* disabled — boolean
|
|
21
|
+
*
|
|
22
|
+
* Events:
|
|
23
|
+
* bds-change — fired with `{ detail: { value, label } }` when an option is selected
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* <bds-combobox
|
|
27
|
+
* name="country"
|
|
28
|
+
* placeholder="Search…"
|
|
29
|
+
* options='[{"value":"nl","label":"Netherlands"},{"value":"be","label":"Belgium"}]'
|
|
30
|
+
* ></bds-combobox>
|
|
31
|
+
*/
|
|
32
|
+
declare class BdsCombobox 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
|
+
placeholder: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
};
|
|
49
|
+
disabled: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
reflect: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
name: string;
|
|
55
|
+
value: string;
|
|
56
|
+
options: string;
|
|
57
|
+
placeholder: string;
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
private _internals;
|
|
60
|
+
private _open;
|
|
61
|
+
private _query;
|
|
62
|
+
private _focusedIndex;
|
|
63
|
+
constructor();
|
|
64
|
+
private get _options();
|
|
65
|
+
private get _filtered();
|
|
66
|
+
private get _displayLabel();
|
|
67
|
+
updated(changed: Map<string, unknown>): void;
|
|
68
|
+
formResetCallback(): void;
|
|
69
|
+
private _openList;
|
|
70
|
+
private _closeList;
|
|
71
|
+
private _selectOption;
|
|
72
|
+
private _handleInput;
|
|
73
|
+
private _handleFocus;
|
|
74
|
+
private _handleBlur;
|
|
75
|
+
private _handleKeydown;
|
|
76
|
+
render(): lit.TemplateResult<1>;
|
|
77
|
+
}
|
|
78
|
+
declare global {
|
|
79
|
+
interface HTMLElementTagNameMap {
|
|
80
|
+
'bds-combobox': BdsCombobox;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { BdsCombobox, type ComboboxOption };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `<bds-file-input>` — form-associated File Input with drag-and-drop zone.
|
|
6
|
+
*
|
|
7
|
+
* Attributes:
|
|
8
|
+
* name — form field name
|
|
9
|
+
* accept — file types to accept (e.g. "image/*,.pdf")
|
|
10
|
+
* multiple — boolean; allow selecting multiple files
|
|
11
|
+
* disabled — boolean
|
|
12
|
+
*
|
|
13
|
+
* Events:
|
|
14
|
+
* bds-change — fired with `{ detail: FileList }` when files are selected
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <bds-file-input name="avatar" accept="image/*">Upload photo</bds-file-input>
|
|
18
|
+
*/
|
|
19
|
+
declare class BdsFileInput extends LitElement {
|
|
20
|
+
static formAssociated: boolean;
|
|
21
|
+
static styles: lit.CSSResult;
|
|
22
|
+
static properties: {
|
|
23
|
+
name: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
reflect: boolean;
|
|
26
|
+
};
|
|
27
|
+
accept: {
|
|
28
|
+
type: StringConstructor;
|
|
29
|
+
};
|
|
30
|
+
multiple: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
reflect: boolean;
|
|
33
|
+
};
|
|
34
|
+
disabled: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
reflect: boolean;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
name: string;
|
|
40
|
+
accept: string;
|
|
41
|
+
multiple: boolean;
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
private _internals;
|
|
44
|
+
private _isDragging;
|
|
45
|
+
private readonly _uid;
|
|
46
|
+
constructor();
|
|
47
|
+
formResetCallback(): void;
|
|
48
|
+
private _handleFiles;
|
|
49
|
+
private _handleInputChange;
|
|
50
|
+
private _handleClick;
|
|
51
|
+
private _handleDragover;
|
|
52
|
+
private _handleDragleave;
|
|
53
|
+
private _handleDrop;
|
|
54
|
+
render(): lit.TemplateResult<1>;
|
|
55
|
+
}
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'bds-file-input': BdsFileInput;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { BdsFileInput };
|