@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
|
@@ -1,3 +1,48 @@
|
|
|
1
|
+
// node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/css-tag.js
|
|
2
|
+
var t = globalThis;
|
|
3
|
+
var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
4
|
+
var s = /* @__PURE__ */ Symbol();
|
|
5
|
+
var o = /* @__PURE__ */ new WeakMap();
|
|
6
|
+
var n = class {
|
|
7
|
+
constructor(t3, e3, o5) {
|
|
8
|
+
if (this._$cssResult$ = true, o5 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
9
|
+
this.cssText = t3, this.t = e3;
|
|
10
|
+
}
|
|
11
|
+
get styleSheet() {
|
|
12
|
+
let t3 = this.o;
|
|
13
|
+
const s4 = this.t;
|
|
14
|
+
if (e && void 0 === t3) {
|
|
15
|
+
const e3 = void 0 !== s4 && 1 === s4.length;
|
|
16
|
+
e3 && (t3 = o.get(s4)), void 0 === t3 && ((this.o = t3 = new CSSStyleSheet()).replaceSync(this.cssText), e3 && o.set(s4, t3));
|
|
17
|
+
}
|
|
18
|
+
return t3;
|
|
19
|
+
}
|
|
20
|
+
toString() {
|
|
21
|
+
return this.cssText;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var r = (t3) => new n("string" == typeof t3 ? t3 : t3 + "", void 0, s);
|
|
25
|
+
var i = (t3, ...e3) => {
|
|
26
|
+
const o5 = 1 === t3.length ? t3[0] : e3.reduce((e4, s4, o6) => e4 + ((t4) => {
|
|
27
|
+
if (true === t4._$cssResult$) return t4.cssText;
|
|
28
|
+
if ("number" == typeof t4) return t4;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + t4 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(s4) + t3[o6 + 1], t3[0]);
|
|
31
|
+
return new n(o5, t3, s);
|
|
32
|
+
};
|
|
33
|
+
var S = (s4, o5) => {
|
|
34
|
+
if (e) s4.adoptedStyleSheets = o5.map((t3) => t3 instanceof CSSStyleSheet ? t3 : t3.styleSheet);
|
|
35
|
+
else for (const e3 of o5) {
|
|
36
|
+
const o6 = document.createElement("style"), n4 = t.litNonce;
|
|
37
|
+
void 0 !== n4 && o6.setAttribute("nonce", n4), o6.textContent = e3.cssText, s4.appendChild(o6);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
var c = e || void 0 === t.CSSStyleSheet ? (t3) => t3 : (t3) => t3 instanceof CSSStyleSheet ? ((t4) => {
|
|
41
|
+
let e3 = "";
|
|
42
|
+
for (const s4 of t4.cssRules) e3 += s4.cssText;
|
|
43
|
+
return r(e3);
|
|
44
|
+
})(t3) : t3;
|
|
45
|
+
|
|
1
46
|
// node_modules/.pnpm/@lit-labs+ssr-dom-shim@1.5.1/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js
|
|
2
47
|
var ElementInternalsShim = class ElementInternals {
|
|
3
48
|
get shadowRoot() {
|
|
@@ -384,7 +429,7 @@ Object.defineProperties(EventShim.prototype, {
|
|
|
384
429
|
stopPropagation: enumerableProperty,
|
|
385
430
|
isTrusted: enumerableProperty
|
|
386
431
|
});
|
|
387
|
-
var CustomEventShim = (_b = class
|
|
432
|
+
var CustomEventShim = (_b = class CustomEvent extends EventShim {
|
|
388
433
|
constructor(type, options = {}) {
|
|
389
434
|
super(type, options);
|
|
390
435
|
_CustomEvent_detail.set(this, void 0);
|
|
@@ -593,57 +638,12 @@ Make sure to test your application with a production build as repeat registratio
|
|
|
593
638
|
}
|
|
594
639
|
};
|
|
595
640
|
var CustomElementRegistryShimWithRealType = CustomElementRegistry;
|
|
596
|
-
var
|
|
597
|
-
|
|
598
|
-
// node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/css-tag.js
|
|
599
|
-
var t = globalThis;
|
|
600
|
-
var e = t.ShadowRoot && (void 0 === t.ShadyCSS || t.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype;
|
|
601
|
-
var s = /* @__PURE__ */ Symbol();
|
|
602
|
-
var o = /* @__PURE__ */ new WeakMap();
|
|
603
|
-
var n = class {
|
|
604
|
-
constructor(t3, e3, o5) {
|
|
605
|
-
if (this._$cssResult$ = true, o5 !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
606
|
-
this.cssText = t3, this.t = e3;
|
|
607
|
-
}
|
|
608
|
-
get styleSheet() {
|
|
609
|
-
let t3 = this.o;
|
|
610
|
-
const s4 = this.t;
|
|
611
|
-
if (e && void 0 === t3) {
|
|
612
|
-
const e3 = void 0 !== s4 && 1 === s4.length;
|
|
613
|
-
e3 && (t3 = o.get(s4)), void 0 === t3 && ((this.o = t3 = new CSSStyleSheet()).replaceSync(this.cssText), e3 && o.set(s4, t3));
|
|
614
|
-
}
|
|
615
|
-
return t3;
|
|
616
|
-
}
|
|
617
|
-
toString() {
|
|
618
|
-
return this.cssText;
|
|
619
|
-
}
|
|
620
|
-
};
|
|
621
|
-
var r = (t3) => new n("string" == typeof t3 ? t3 : t3 + "", void 0, s);
|
|
622
|
-
var i = (t3, ...e3) => {
|
|
623
|
-
const o5 = 1 === t3.length ? t3[0] : e3.reduce((e4, s4, o6) => e4 + ((t4) => {
|
|
624
|
-
if (true === t4._$cssResult$) return t4.cssText;
|
|
625
|
-
if ("number" == typeof t4) return t4;
|
|
626
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + t4 + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
627
|
-
})(s4) + t3[o6 + 1], t3[0]);
|
|
628
|
-
return new n(o5, t3, s);
|
|
629
|
-
};
|
|
630
|
-
var S = (s4, o5) => {
|
|
631
|
-
if (e) s4.adoptedStyleSheets = o5.map((t3) => t3 instanceof CSSStyleSheet ? t3 : t3.styleSheet);
|
|
632
|
-
else for (const e3 of o5) {
|
|
633
|
-
const o6 = document.createElement("style"), n4 = t.litNonce;
|
|
634
|
-
void 0 !== n4 && o6.setAttribute("nonce", n4), o6.textContent = e3.cssText, s4.appendChild(o6);
|
|
635
|
-
}
|
|
636
|
-
};
|
|
637
|
-
var c = e || void 0 === t.CSSStyleSheet ? (t3) => t3 : (t3) => t3 instanceof CSSStyleSheet ? ((t4) => {
|
|
638
|
-
let e3 = "";
|
|
639
|
-
for (const s4 of t4.cssRules) e3 += s4.cssText;
|
|
640
|
-
return r(e3);
|
|
641
|
-
})(t3) : t3;
|
|
641
|
+
var customElements = new CustomElementRegistryShimWithRealType();
|
|
642
642
|
|
|
643
643
|
// node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/reactive-element.js
|
|
644
644
|
var { is: h, defineProperty: r2, getOwnPropertyDescriptor: o2, getOwnPropertyNames: n2, getOwnPropertySymbols: a, getPrototypeOf: c2 } = Object;
|
|
645
645
|
var l = globalThis;
|
|
646
|
-
l.customElements ??=
|
|
646
|
+
l.customElements ??= customElements;
|
|
647
647
|
var p = l.trustedTypes;
|
|
648
648
|
var d = p ? p.emptyScript : "";
|
|
649
649
|
var u = l.reactiveElementPolyfillSupport;
|
|
@@ -1146,808 +1146,36 @@ var o4 = s3.litElementPolyfillSupport;
|
|
|
1146
1146
|
o4?.({ LitElement: i3 });
|
|
1147
1147
|
(s3.litElementVersions ??= []).push("4.2.2");
|
|
1148
1148
|
|
|
1149
|
-
// src/web-components/ui/bds-badge.ts
|
|
1150
|
-
var BdsBadge = class extends i3 {
|
|
1151
|
-
static styles = i`
|
|
1152
|
-
:host {
|
|
1153
|
-
display: inline-flex;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
.badge {
|
|
1157
|
-
display: inline-flex;
|
|
1158
|
-
align-items: center;
|
|
1159
|
-
justify-content: center;
|
|
1160
|
-
padding: var(--bds-space_xxs) var(--bds-space_xs);
|
|
1161
|
-
border-radius: var(--badge_radius, 2em);
|
|
1162
|
-
font-size: var(--badge_font-size, var(--bds-font_size--body--s));
|
|
1163
|
-
font-weight: var(--bds-font_weight--semibold);
|
|
1164
|
-
line-height: 1;
|
|
1165
|
-
white-space: nowrap;
|
|
1166
|
-
background-color: var(--badge_bg, var(--bds-color_blue));
|
|
1167
|
-
color: var(--badge_text, var(--bds-color_on-blue));
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
/* Variant overrides */
|
|
1171
|
-
:host([variant='primary']) .badge {
|
|
1172
|
-
--badge_bg: var(--bds-color_interactive);
|
|
1173
|
-
--badge_text: var(--bds-color_on-interactive);
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
:host([variant='secondary']) .badge {
|
|
1177
|
-
--badge_bg: var(--bds-color_bg);
|
|
1178
|
-
--badge_text: var(--bds-color_on-bg);
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
:host([variant='success']) .badge {
|
|
1182
|
-
--badge_bg: var(--bds-color_success);
|
|
1183
|
-
--badge_text: var(--bds-color_on-success);
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
:host([variant='error']) .badge {
|
|
1187
|
-
--badge_bg: var(--bds-color_error);
|
|
1188
|
-
--badge_text: var(--bds-color_on-error);
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
:host([variant='warning']) .badge {
|
|
1192
|
-
--badge_bg: var(--bds-color_warning);
|
|
1193
|
-
--badge_text: var(--bds-color_on-warning);
|
|
1194
|
-
}
|
|
1195
|
-
`;
|
|
1196
|
-
static properties = {
|
|
1197
|
-
variant: { type: String, reflect: true }
|
|
1198
|
-
};
|
|
1199
|
-
constructor() {
|
|
1200
|
-
super();
|
|
1201
|
-
this.variant = "primary";
|
|
1202
|
-
}
|
|
1203
|
-
render() {
|
|
1204
|
-
return T`<span class="badge"><slot></slot></span>`;
|
|
1205
|
-
}
|
|
1206
|
-
};
|
|
1207
|
-
customElements.define("bds-badge", BdsBadge);
|
|
1208
|
-
|
|
1209
|
-
// src/web-components/interaction/bds-button.ts
|
|
1210
|
-
var BdsButton = class extends i3 {
|
|
1211
|
-
static styles = i`
|
|
1212
|
-
@keyframes fadeZoom {
|
|
1213
|
-
0%, 100% { opacity: 1; transform: scale(1); }
|
|
1214
|
-
50% { opacity: 0.75; transform: scale(1.15); }
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
@keyframes pulse {
|
|
1218
|
-
0% { transform: scale(1); box-shadow: 0 0 0 0 rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 50%); }
|
|
1219
|
-
70% { transform: scale(1.01); box-shadow: 0 0 0 var(--bds-space_m) rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 0%); }
|
|
1220
|
-
100% { transform: scale(1); box-shadow: 0 0 0 0 rgb(from var(--button_pulse-color, var(--button_color, var(--bds-color_green))) r g b / 0%); }
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
:host {
|
|
1224
|
-
display: inline-flex;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
.button,
|
|
1228
|
-
.button[href] {
|
|
1229
|
-
all: unset;
|
|
1230
|
-
position: relative;
|
|
1231
|
-
font: inherit;
|
|
1232
|
-
padding-inline: var(--bds-space_l);
|
|
1233
|
-
display: inline-flex;
|
|
1234
|
-
gap: var(--bds-space_xs);
|
|
1235
|
-
border-radius: var(--button_border_radius--s, var(--bds-border_radius--s));
|
|
1236
|
-
align-items: center;
|
|
1237
|
-
cursor: pointer;
|
|
1238
|
-
justify-content: center;
|
|
1239
|
-
height: var(--button_height, 3em);
|
|
1240
|
-
font-size: var(--button_font-size, inherit);
|
|
1241
|
-
white-space: nowrap;
|
|
1242
|
-
line-height: 1;
|
|
1243
|
-
|
|
1244
|
-
--button_color: var(--bds-color_green);
|
|
1245
|
-
--button_on-color: var(--bds-color_on-green);
|
|
1246
|
-
|
|
1247
|
-
background-color: var(--button_bg, var(--button_color));
|
|
1248
|
-
color: var(--button_text, var(--button_on-color));
|
|
1249
|
-
border: var(--button_border, none);
|
|
1250
|
-
--bdc_color: transparent;
|
|
1251
|
-
|
|
1252
|
-
outline: var(--bdc-outline_width) solid var(--bdc_color);
|
|
1253
|
-
outline-offset: var(--bdc-outline_offset);
|
|
1254
|
-
transition: var(--bds-animation_transition),
|
|
1255
|
-
--bdc_color var(--bds-animation_transition-duration) var(--bds-animation_easing);
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
.button[href] {
|
|
1259
|
-
text-decoration: none;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
/* Variants */
|
|
1263
|
-
.button.ghost {
|
|
1264
|
-
--button_bg: transparent;
|
|
1265
|
-
--button_text: var(--button_color);
|
|
1266
|
-
--bdc_color: var(--button_color);
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
/* Sizes */
|
|
1270
|
-
.button.small {
|
|
1271
|
-
--button_height: 2.25em;
|
|
1272
|
-
--button_font-size: var(--bds-font_size--body--s);
|
|
1273
|
-
--button_border_radius--s: var(--bds-border_radius--xs);
|
|
1274
|
-
padding-inline: var(--bds-space_m);
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
.button.medium {
|
|
1278
|
-
--button_height: 3em;
|
|
1279
|
-
padding-inline: var(--bds-space_l);
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
.button.large {
|
|
1283
|
-
--button_font-size: var(--bds-font_size--heading-3);
|
|
1284
|
-
--button_border_radius--s: var(--bds-border_radius--m);
|
|
1285
|
-
padding-inline: var(--bds-space_xl);
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
/* Pulse */
|
|
1289
|
-
.button.has-pulse {
|
|
1290
|
-
animation: pulse 3s infinite;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
/* SVG icon colour */
|
|
1294
|
-
.button svg {
|
|
1295
|
-
--icon__stroke: currentcolor;
|
|
1296
|
-
fill: currentcolor;
|
|
1297
|
-
color: currentcolor;
|
|
1298
|
-
flex-shrink: 0;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
/* Icon slots — hidden by default, shown when slot has content */
|
|
1302
|
-
.icon-start,
|
|
1303
|
-
.icon-end {
|
|
1304
|
-
display: none;
|
|
1305
|
-
align-items: center;
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
.icon-start.has-content {
|
|
1309
|
-
display: flex;
|
|
1310
|
-
margin-inline-start: calc(var(--bds-space_s) * -1);
|
|
1311
|
-
transition: var(--bds-animation_transition);
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
.icon-end.has-content {
|
|
1315
|
-
display: flex;
|
|
1316
|
-
margin-inline-end: calc(var(--bds-space_s) * -1);
|
|
1317
|
-
transition: var(--bds-animation_transition);
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
/* Hover icon animation */
|
|
1321
|
-
@media (hover: hover) and (pointer: fine) {
|
|
1322
|
-
.button:hover .icon-start svg,
|
|
1323
|
-
.button:hover .icon-end svg {
|
|
1324
|
-
animation: fadeZoom 2s ease-out infinite;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
/* Default hover */
|
|
1328
|
-
.button.default:hover {
|
|
1329
|
-
--button_bg: var(--bds-color_bg);
|
|
1330
|
-
--button_text: var(--bds-color_interactive);
|
|
1331
|
-
--button_pulse-color: var(--bds-color_interactive);
|
|
1332
|
-
--bdc_color: currentcolor;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
/* Ghost hover */
|
|
1336
|
-
.button.ghost:hover {
|
|
1337
|
-
--button_bg: var(--button_color);
|
|
1338
|
-
--button_text: var(--button_on-color);
|
|
1339
|
-
--bdc_color: transparent;
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
/* Focus visible */
|
|
1344
|
-
.button:focus-visible {
|
|
1345
|
-
outline: var(--bds-outline_default);
|
|
1346
|
-
outline-offset: var(--bds-outline_offset);
|
|
1347
|
-
border-radius: var(--bds-border_radius--s);
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
/* Disabled */
|
|
1351
|
-
.button:disabled,
|
|
1352
|
-
.button[aria-disabled='true'] {
|
|
1353
|
-
opacity: 0.5;
|
|
1354
|
-
cursor: not-allowed;
|
|
1355
|
-
pointer-events: none;
|
|
1356
|
-
}
|
|
1357
|
-
`;
|
|
1358
|
-
static properties = {
|
|
1359
|
-
variant: { type: String, reflect: true },
|
|
1360
|
-
size: { type: String, reflect: true },
|
|
1361
|
-
disabled: { type: Boolean, reflect: true },
|
|
1362
|
-
href: { type: String },
|
|
1363
|
-
target: { type: String },
|
|
1364
|
-
rel: { type: String },
|
|
1365
|
-
hasPulse: { type: Boolean, attribute: "has-pulse", reflect: true },
|
|
1366
|
-
type: { type: String },
|
|
1367
|
-
ariaLabel: { type: String, attribute: "aria-label" },
|
|
1368
|
-
// Internal state
|
|
1369
|
-
_iconStartFilled: { state: true },
|
|
1370
|
-
_iconEndFilled: { state: true }
|
|
1371
|
-
};
|
|
1372
|
-
constructor() {
|
|
1373
|
-
super();
|
|
1374
|
-
this.variant = "default";
|
|
1375
|
-
this.size = "medium";
|
|
1376
|
-
this.disabled = false;
|
|
1377
|
-
this.hasPulse = false;
|
|
1378
|
-
this.type = "button";
|
|
1379
|
-
this.ariaLabel = null;
|
|
1380
|
-
this._iconStartFilled = false;
|
|
1381
|
-
this._iconEndFilled = false;
|
|
1382
|
-
}
|
|
1383
|
-
_onIconSlotChange(e3, position) {
|
|
1384
|
-
const slot = e3.target;
|
|
1385
|
-
const filled = slot.assignedNodes({ flatten: true }).length > 0;
|
|
1386
|
-
if (position === "start") {
|
|
1387
|
-
this._iconStartFilled = filled;
|
|
1388
|
-
} else {
|
|
1389
|
-
this._iconEndFilled = filled;
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
get _classes() {
|
|
1393
|
-
return `button ${this.variant} ${this.size}${this.hasPulse ? " has-pulse" : ""}`;
|
|
1394
|
-
}
|
|
1395
|
-
_handleAnchorClick(e3) {
|
|
1396
|
-
if (this.disabled) {
|
|
1397
|
-
e3.preventDefault();
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
_iconSlot(position) {
|
|
1401
|
-
const filled = position === "start" ? this._iconStartFilled : this._iconEndFilled;
|
|
1402
|
-
return T`
|
|
1403
|
-
<span class="icon-${position} ${filled ? "has-content" : ""}">
|
|
1404
|
-
<slot name="icon-${position}" @slotchange=${(e3) => this._onIconSlotChange(e3, position)}></slot>
|
|
1405
|
-
</span>
|
|
1406
|
-
`;
|
|
1407
|
-
}
|
|
1408
|
-
render() {
|
|
1409
|
-
if (this.href) {
|
|
1410
|
-
return T`
|
|
1411
|
-
<a
|
|
1412
|
-
class=${this._classes}
|
|
1413
|
-
href=${this.disabled ? A : this.href}
|
|
1414
|
-
target=${this.target ?? A}
|
|
1415
|
-
rel=${this.rel ?? A}
|
|
1416
|
-
aria-disabled=${this.disabled ? "true" : A}
|
|
1417
|
-
tabindex=${this.disabled ? "-1" : A}
|
|
1418
|
-
aria-label=${this.ariaLabel ?? A}
|
|
1419
|
-
@click=${this._handleAnchorClick}
|
|
1420
|
-
>
|
|
1421
|
-
${this._iconSlot("start")}
|
|
1422
|
-
<slot></slot>
|
|
1423
|
-
${this._iconSlot("end")}
|
|
1424
|
-
</a>
|
|
1425
|
-
`;
|
|
1426
|
-
}
|
|
1427
|
-
return T`
|
|
1428
|
-
<button
|
|
1429
|
-
class=${this._classes}
|
|
1430
|
-
type=${this.type}
|
|
1431
|
-
?disabled=${this.disabled}
|
|
1432
|
-
aria-label=${this.ariaLabel ?? A}
|
|
1433
|
-
>
|
|
1434
|
-
${this._iconSlot("start")}
|
|
1435
|
-
<slot></slot>
|
|
1436
|
-
${this._iconSlot("end")}
|
|
1437
|
-
</button>
|
|
1438
|
-
`;
|
|
1439
|
-
}
|
|
1440
|
-
};
|
|
1441
|
-
customElements.define("bds-button", BdsButton);
|
|
1442
|
-
|
|
1443
|
-
// src/web-components/ui/bds-alert.ts
|
|
1444
|
-
var BdsAlert = class extends i3 {
|
|
1445
|
-
static styles = i`
|
|
1446
|
-
:host {
|
|
1447
|
-
display: block;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
.alert {
|
|
1451
|
-
display: flex;
|
|
1452
|
-
align-items: flex-start;
|
|
1453
|
-
gap: var(--bds-space_s);
|
|
1454
|
-
padding: var(--bds-space_m);
|
|
1455
|
-
border-radius: var(--bds-border_radius--s);
|
|
1456
|
-
border-inline-start: var(--bds-space_s) solid var(--alert_border, var(--bds-color_blue));
|
|
1457
|
-
background-color: var(--alert_bg, var(--bds-color_blue--subtle));
|
|
1458
|
-
color: var(--alert_text, var(--bds-color_on-blue--subtle));
|
|
1459
|
-
font-size: var(--bds-font_size--body);
|
|
1460
|
-
line-height: var(--bds-font_line-height--body);
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
/* Variant colours */
|
|
1464
|
-
:host([variant='info']) .alert {
|
|
1465
|
-
--alert_bg: var(--bds-color_blue--subtle);
|
|
1466
|
-
--alert_text: var(--bds-color_on-blue--subtle);
|
|
1467
|
-
--alert_border: var(--bds-color_blue);
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
|
-
:host([variant='success']) .alert {
|
|
1471
|
-
--alert_bg: var(--bds-color_success--subtle);
|
|
1472
|
-
--alert_text: var(--bds-color_on-success--subtle);
|
|
1473
|
-
--alert_border: var(--bds-color_success);
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
:host([variant='warning']) .alert {
|
|
1477
|
-
--alert_bg: var(--bds-color_orange--subtle);
|
|
1478
|
-
--alert_text: var(--bds-color_on-orange--subtle);
|
|
1479
|
-
--alert_border: var(--bds-color_warning);
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
:host([variant='error']) .alert {
|
|
1483
|
-
--alert_bg: rgb(from var(--bds-color_error) r g b / 12%);
|
|
1484
|
-
--alert_text: var(--bds-color_on-bg);
|
|
1485
|
-
--alert_border: var(--bds-color_error);
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
/* Icon slot wrapper — hidden unless slot has content */
|
|
1489
|
-
.icon {
|
|
1490
|
-
display: none;
|
|
1491
|
-
align-items: center;
|
|
1492
|
-
flex-shrink: 0;
|
|
1493
|
-
margin-block-start: 0.1em;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
.icon.has-content {
|
|
1497
|
-
display: flex;
|
|
1498
|
-
}
|
|
1499
|
-
|
|
1500
|
-
/* Content area */
|
|
1501
|
-
.content {
|
|
1502
|
-
flex: 1;
|
|
1503
|
-
display: flex;
|
|
1504
|
-
flex-direction: column;
|
|
1505
|
-
gap: var(--bds-space_xxs);
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
.title {
|
|
1509
|
-
font-weight: var(--bds-font_weight--semibold);
|
|
1510
|
-
font-size: var(--bds-font_size--body);
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
/* Dismiss button */
|
|
1514
|
-
.dismiss {
|
|
1515
|
-
all: unset;
|
|
1516
|
-
display: flex;
|
|
1517
|
-
align-items: center;
|
|
1518
|
-
justify-content: center;
|
|
1519
|
-
flex-shrink: 0;
|
|
1520
|
-
cursor: pointer;
|
|
1521
|
-
color: currentcolor;
|
|
1522
|
-
transition: var(--bds-animation_transition);
|
|
1523
|
-
border-radius: 50%;
|
|
1524
|
-
--bdc_color: currentcolor;
|
|
1525
|
-
outline: var(--bdc-outline_width) solid var(--bdc_color);
|
|
1526
|
-
outline-offset: var(--bdc-outline_offset);
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
.dismiss svg {
|
|
1530
|
-
width: 1rem;
|
|
1531
|
-
height: 1rem;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
.dismiss:focus-visible {
|
|
1535
|
-
outline: var(--bds-outline_default);
|
|
1536
|
-
outline-offset: var(--bds-outline_offset);
|
|
1537
|
-
}
|
|
1538
|
-
|
|
1539
|
-
@media (hover: hover) and (pointer: fine) {
|
|
1540
|
-
.dismiss:hover {
|
|
1541
|
-
opacity: 0.7;
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
`;
|
|
1545
|
-
static properties = {
|
|
1546
|
-
variant: { type: String, reflect: true },
|
|
1547
|
-
title: { type: String },
|
|
1548
|
-
dismissible: { type: Boolean, reflect: true },
|
|
1549
|
-
_iconFilled: { state: true }
|
|
1550
|
-
};
|
|
1551
|
-
constructor() {
|
|
1552
|
-
super();
|
|
1553
|
-
this.variant = "info";
|
|
1554
|
-
this.title = "";
|
|
1555
|
-
this.dismissible = false;
|
|
1556
|
-
this._iconFilled = false;
|
|
1557
|
-
}
|
|
1558
|
-
_onIconSlotChange(e3) {
|
|
1559
|
-
const slot = e3.target;
|
|
1560
|
-
this._iconFilled = slot.assignedNodes({ flatten: true }).length > 0;
|
|
1561
|
-
}
|
|
1562
|
-
get _isUrgent() {
|
|
1563
|
-
return this.variant === "error" || this.variant === "warning";
|
|
1564
|
-
}
|
|
1565
|
-
_handleDismiss() {
|
|
1566
|
-
this.dispatchEvent(new CustomEvent("bds-dismiss", { bubbles: true, composed: true }));
|
|
1567
|
-
}
|
|
1568
|
-
render() {
|
|
1569
|
-
return T`
|
|
1570
|
-
<div
|
|
1571
|
-
class="alert"
|
|
1572
|
-
role=${this._isUrgent ? "alert" : "status"}
|
|
1573
|
-
aria-live=${this._isUrgent ? "assertive" : "polite"}
|
|
1574
|
-
aria-atomic="true"
|
|
1575
|
-
>
|
|
1576
|
-
<span class="icon ${this._iconFilled ? "has-content" : ""}" aria-hidden="true">
|
|
1577
|
-
<slot name="icon" @slotchange=${this._onIconSlotChange}></slot>
|
|
1578
|
-
</span>
|
|
1579
|
-
<div class="content">
|
|
1580
|
-
${this.title ? T`<strong class="title">${this.title}</strong>` : A}
|
|
1581
|
-
<div><slot></slot></div>
|
|
1582
|
-
</div>
|
|
1583
|
-
${this.dismissible ? T`
|
|
1584
|
-
<button
|
|
1585
|
-
type="button"
|
|
1586
|
-
class="dismiss"
|
|
1587
|
-
@click=${this._handleDismiss}
|
|
1588
|
-
aria-label="Dismiss alert"
|
|
1589
|
-
>
|
|
1590
|
-
<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1591
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M18 6L6 18M6 6l12 12" />
|
|
1592
|
-
</svg>
|
|
1593
|
-
</button>
|
|
1594
|
-
` : A}
|
|
1595
|
-
</div>
|
|
1596
|
-
`;
|
|
1597
|
-
}
|
|
1598
|
-
};
|
|
1599
|
-
customElements.define("bds-alert", BdsAlert);
|
|
1600
|
-
|
|
1601
|
-
// src/web-components/interaction/bds-popover.ts
|
|
1602
|
-
var BdsPopover = class extends i3 {
|
|
1603
|
-
static styles = i`
|
|
1604
|
-
:host {
|
|
1605
|
-
display: inline-flex;
|
|
1606
|
-
position: relative;
|
|
1607
|
-
}
|
|
1608
|
-
|
|
1609
|
-
/* The wrapper IS the CSS anchor — anchor-name resolves via the custom
|
|
1610
|
-
property injected on :host in connectedCallback(), so each instance
|
|
1611
|
-
gets its own unique name without colliding with siblings. */
|
|
1612
|
-
.wrapper {
|
|
1613
|
-
display: inline-flex;
|
|
1614
|
-
anchor-name: var(--bds-popover-anchor);
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
.panel {
|
|
1618
|
-
display: none;
|
|
1619
|
-
position: absolute;
|
|
1620
|
-
position-anchor: var(--bds-popover-anchor);
|
|
1621
|
-
margin: 0;
|
|
1622
|
-
overflow-y: auto;
|
|
1623
|
-
z-index: var(--popover_z-index, 100);
|
|
1624
|
-
min-width: 12rem;
|
|
1625
|
-
padding: var(--bds-space_m);
|
|
1626
|
-
border-radius: var(--bds-border_radius--s);
|
|
1627
|
-
background-color: var(--popover_color, var(--bds-color_bg));
|
|
1628
|
-
box-shadow: var(--popover_shadow, var(--bds-shadow_m));
|
|
1629
|
-
color: var(--popover_on-color, var(--bds-color_on-bg));
|
|
1630
|
-
font-size: var(--bds-font_size--body);
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
.panel.open {
|
|
1634
|
-
display: block;
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
/* Primary placements */
|
|
1638
|
-
|
|
1639
|
-
.panel[data-placement='bottom'] {
|
|
1640
|
-
top: anchor(bottom);
|
|
1641
|
-
left: anchor(left);
|
|
1642
|
-
margin-top: var(--bds-space_xs, 8px);
|
|
1643
|
-
position-try-fallbacks: --bds-popover-top, --bds-popover-right, --bds-popover-left;
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
.panel[data-placement='top'] {
|
|
1647
|
-
bottom: anchor(top);
|
|
1648
|
-
left: anchor(left);
|
|
1649
|
-
margin-bottom: var(--bds-space_xs, 8px);
|
|
1650
|
-
position-try-fallbacks: --bds-popover-bottom, --bds-popover-right, --bds-popover-left;
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
.panel[data-placement='right'] {
|
|
1654
|
-
top: anchor(top);
|
|
1655
|
-
left: anchor(right);
|
|
1656
|
-
margin-left: var(--bds-space_xs, 8px);
|
|
1657
|
-
position-try-fallbacks: --bds-popover-left, --bds-popover-bottom, --bds-popover-top;
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
.panel[data-placement='left'] {
|
|
1661
|
-
top: anchor(top);
|
|
1662
|
-
right: anchor(left);
|
|
1663
|
-
margin-right: var(--bds-space_xs, 8px);
|
|
1664
|
-
position-try-fallbacks: --bds-popover-right, --bds-popover-bottom, --bds-popover-top;
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
/* Fallback placements */
|
|
1668
|
-
|
|
1669
|
-
@position-try --bds-popover-bottom {
|
|
1670
|
-
top: anchor(bottom);
|
|
1671
|
-
right: unset;
|
|
1672
|
-
bottom: unset;
|
|
1673
|
-
left: anchor(left);
|
|
1674
|
-
margin: 0;
|
|
1675
|
-
margin-top: var(--bds-space_xs, 8px);
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
@position-try --bds-popover-top {
|
|
1679
|
-
top: unset;
|
|
1680
|
-
right: unset;
|
|
1681
|
-
bottom: anchor(top);
|
|
1682
|
-
left: anchor(left);
|
|
1683
|
-
margin: 0;
|
|
1684
|
-
margin-bottom: var(--bds-space_xs, 8px);
|
|
1685
|
-
}
|
|
1686
|
-
|
|
1687
|
-
@position-try --bds-popover-right {
|
|
1688
|
-
top: anchor(top);
|
|
1689
|
-
right: unset;
|
|
1690
|
-
bottom: unset;
|
|
1691
|
-
left: anchor(right);
|
|
1692
|
-
margin: 0;
|
|
1693
|
-
margin-left: var(--bds-space_xs, 8px);
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
@position-try --bds-popover-left {
|
|
1697
|
-
top: anchor(top);
|
|
1698
|
-
right: anchor(left);
|
|
1699
|
-
bottom: unset;
|
|
1700
|
-
left: unset;
|
|
1701
|
-
margin: 0;
|
|
1702
|
-
margin-right: var(--bds-space_xs, 8px);
|
|
1703
|
-
}
|
|
1704
|
-
`;
|
|
1705
|
-
static properties = {
|
|
1706
|
-
placement: { type: String, reflect: true },
|
|
1707
|
-
open: { type: Boolean, reflect: true }
|
|
1708
|
-
};
|
|
1709
|
-
_anchorName;
|
|
1710
|
-
constructor() {
|
|
1711
|
-
super();
|
|
1712
|
-
this.placement = "bottom";
|
|
1713
|
-
this.open = false;
|
|
1714
|
-
const uid = Math.random().toString(36).slice(2, 8);
|
|
1715
|
-
this._anchorName = `--bds-popover-${uid}`;
|
|
1716
|
-
}
|
|
1717
|
-
connectedCallback() {
|
|
1718
|
-
super.connectedCallback();
|
|
1719
|
-
this.style.setProperty("--bds-popover-anchor", this._anchorName);
|
|
1720
|
-
document.addEventListener("keydown", this._onKeydown);
|
|
1721
|
-
document.addEventListener("mousedown", this._onOutsideClick);
|
|
1722
|
-
}
|
|
1723
|
-
disconnectedCallback() {
|
|
1724
|
-
super.disconnectedCallback();
|
|
1725
|
-
document.removeEventListener("keydown", this._onKeydown);
|
|
1726
|
-
document.removeEventListener("mousedown", this._onOutsideClick);
|
|
1727
|
-
}
|
|
1728
|
-
_onKeydown = (e3) => {
|
|
1729
|
-
if (this.open && e3.key === "Escape") this._close();
|
|
1730
|
-
};
|
|
1731
|
-
_onOutsideClick = (e3) => {
|
|
1732
|
-
if (this.open && !this.contains(e3.target)) this._close();
|
|
1733
|
-
};
|
|
1734
|
-
_toggle() {
|
|
1735
|
-
if (this.open) {
|
|
1736
|
-
this._close();
|
|
1737
|
-
} else {
|
|
1738
|
-
this._open();
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
_open() {
|
|
1742
|
-
this.open = true;
|
|
1743
|
-
this.dispatchEvent(new CustomEvent("bds-open", { bubbles: true, composed: true }));
|
|
1744
|
-
}
|
|
1745
|
-
_close() {
|
|
1746
|
-
this.open = false;
|
|
1747
|
-
this.dispatchEvent(new CustomEvent("bds-close", { bubbles: true, composed: true }));
|
|
1748
|
-
}
|
|
1749
|
-
render() {
|
|
1750
|
-
return T`
|
|
1751
|
-
<span class="wrapper">
|
|
1752
|
-
<slot name="trigger" @click=${this._toggle}></slot>
|
|
1753
|
-
</span>
|
|
1754
|
-
<div
|
|
1755
|
-
class="panel ${this.open ? "open" : ""}"
|
|
1756
|
-
data-placement=${this.placement}
|
|
1757
|
-
role="region"
|
|
1758
|
-
aria-label="Popover"
|
|
1759
|
-
>
|
|
1760
|
-
<slot></slot>
|
|
1761
|
-
</div>
|
|
1762
|
-
`;
|
|
1763
|
-
}
|
|
1764
|
-
};
|
|
1765
|
-
customElements.define("bds-popover", BdsPopover);
|
|
1766
|
-
|
|
1767
|
-
// src/web-components/interaction/bds-toast-provider.ts
|
|
1768
|
-
var BdsToastProvider = class extends i3 {
|
|
1769
|
-
static styles = i`
|
|
1770
|
-
:host {
|
|
1771
|
-
display: contents;
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
.container {
|
|
1775
|
-
/* Reset UA popover defaults */
|
|
1776
|
-
position: fixed;
|
|
1777
|
-
inset: unset;
|
|
1778
|
-
bottom: var(--bds-space_xl, 2rem);
|
|
1779
|
-
right: var(--bds-space_xl, 2rem);
|
|
1780
|
-
display: flex;
|
|
1781
|
-
flex-direction: column;
|
|
1782
|
-
gap: var(--bds-space_m, 1rem);
|
|
1783
|
-
border: none;
|
|
1784
|
-
padding: 0;
|
|
1785
|
-
background: transparent;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
.toast {
|
|
1789
|
-
padding: var(--bds-space_m) var(--bds-space_l);
|
|
1790
|
-
background-color: var(--toast_color, var(--bds-color_bg));
|
|
1791
|
-
color: var(--toast_on-color, var(--bds-color_on-bg));
|
|
1792
|
-
border-radius: var(--bds-border_radius--s);
|
|
1793
|
-
box-shadow: var(--bds-shadow_s);
|
|
1794
|
-
display: flex;
|
|
1795
|
-
align-items: center;
|
|
1796
|
-
gap: var(--bds-space_m);
|
|
1797
|
-
min-width: 300px;
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
.toast.--variant_success {
|
|
1801
|
-
--toast_color: var(--bds-color_success);
|
|
1802
|
-
--toast_on-color: var(--bds-color_on-success);
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
.toast.--variant_warning {
|
|
1806
|
-
--toast_color: var(--bds-color_warning);
|
|
1807
|
-
--toast_on-color: var(--bds-color_on-warning);
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
.toast.--variant_info {
|
|
1811
|
-
--toast_color: var(--bds-color_bg--subtle);
|
|
1812
|
-
--toast_on-color: var(--bds-color_on-bg--subtle);
|
|
1813
|
-
}
|
|
1814
|
-
|
|
1815
|
-
.toast.--variant_error {
|
|
1816
|
-
--toast_color: var(--bds-color_error);
|
|
1817
|
-
--toast_on-color: var(--bds-color_on-error);
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
.message {
|
|
1821
|
-
flex: 1;
|
|
1822
|
-
}
|
|
1823
|
-
|
|
1824
|
-
.close {
|
|
1825
|
-
display: flex;
|
|
1826
|
-
align-items: center;
|
|
1827
|
-
justify-content: center;
|
|
1828
|
-
flex-shrink: 0;
|
|
1829
|
-
width: 1.25rem;
|
|
1830
|
-
height: 1.25rem;
|
|
1831
|
-
padding: 0;
|
|
1832
|
-
background: none;
|
|
1833
|
-
border: none;
|
|
1834
|
-
cursor: pointer;
|
|
1835
|
-
color: var(--toast_on-color);
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
.close svg {
|
|
1839
|
-
width: 1rem;
|
|
1840
|
-
height: 1rem;
|
|
1841
|
-
}
|
|
1842
|
-
`;
|
|
1843
|
-
static properties = {
|
|
1844
|
-
_toasts: { state: true }
|
|
1845
|
-
};
|
|
1846
|
-
constructor() {
|
|
1847
|
-
super();
|
|
1848
|
-
this._toasts = [];
|
|
1849
|
-
}
|
|
1850
|
-
connectedCallback() {
|
|
1851
|
-
super.connectedCallback();
|
|
1852
|
-
document.addEventListener("bds-show-toast", this._onShowToastEvent);
|
|
1853
|
-
}
|
|
1854
|
-
disconnectedCallback() {
|
|
1855
|
-
super.disconnectedCallback();
|
|
1856
|
-
document.removeEventListener("bds-show-toast", this._onShowToastEvent);
|
|
1857
|
-
}
|
|
1858
|
-
// Sync the popover's top-layer visibility with the toast queue —
|
|
1859
|
-
// mirrors Toast.tsx's useEffect([toasts.length]).
|
|
1860
|
-
updated() {
|
|
1861
|
-
const container = this.shadowRoot?.querySelector("[popover]");
|
|
1862
|
-
if (!container) return;
|
|
1863
|
-
if (this._toasts.length > 0) {
|
|
1864
|
-
container.showPopover?.();
|
|
1865
|
-
} else {
|
|
1866
|
-
try {
|
|
1867
|
-
container.hidePopover?.();
|
|
1868
|
-
} catch {
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
showToast(message, variant = "info") {
|
|
1873
|
-
const id = Math.random().toString(36).slice(2, 9);
|
|
1874
|
-
this._toasts = [...this._toasts, { id, message, variant }];
|
|
1875
|
-
setTimeout(() => this._removeToast(id), 5e3);
|
|
1876
|
-
}
|
|
1877
|
-
_removeToast(id) {
|
|
1878
|
-
this._toasts = this._toasts.filter((t3) => t3.id !== id);
|
|
1879
|
-
}
|
|
1880
|
-
_onShowToastEvent = (e3) => {
|
|
1881
|
-
const { message, variant } = e3.detail ?? {};
|
|
1882
|
-
if (message) this.showToast(message, variant);
|
|
1883
|
-
};
|
|
1884
|
-
static show(message, variant) {
|
|
1885
|
-
const provider = document.querySelector("bds-toast-provider");
|
|
1886
|
-
provider?.showToast(message, variant ?? "info");
|
|
1887
|
-
}
|
|
1888
|
-
render() {
|
|
1889
|
-
return T`
|
|
1890
|
-
<slot></slot>
|
|
1891
|
-
<div
|
|
1892
|
-
popover="manual"
|
|
1893
|
-
role="region"
|
|
1894
|
-
aria-label="Notifications"
|
|
1895
|
-
class="container"
|
|
1896
|
-
>
|
|
1897
|
-
${this._toasts.map((t3) => T`
|
|
1898
|
-
<div
|
|
1899
|
-
class="toast --variant_${t3.variant}"
|
|
1900
|
-
role="status"
|
|
1901
|
-
aria-live="polite"
|
|
1902
|
-
aria-atomic="true"
|
|
1903
|
-
>
|
|
1904
|
-
<span class="message">${t3.message}</span>
|
|
1905
|
-
<button
|
|
1906
|
-
type="button"
|
|
1907
|
-
class="close"
|
|
1908
|
-
@click=${() => this._removeToast(t3.id)}
|
|
1909
|
-
aria-label="Dismiss"
|
|
1910
|
-
>
|
|
1911
|
-
<svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1912
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="M18 6L6 18M6 6l12 12" />
|
|
1913
|
-
</svg>
|
|
1914
|
-
</button>
|
|
1915
|
-
</div>
|
|
1916
|
-
`)}
|
|
1917
|
-
</div>
|
|
1918
|
-
`;
|
|
1919
|
-
}
|
|
1920
|
-
};
|
|
1921
|
-
customElements.define("bds-toast-provider", BdsToastProvider);
|
|
1922
1149
|
export {
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1150
|
+
i,
|
|
1151
|
+
T,
|
|
1152
|
+
b2 as b,
|
|
1153
|
+
w,
|
|
1154
|
+
A,
|
|
1155
|
+
i3 as i2
|
|
1928
1156
|
};
|
|
1929
1157
|
/*! Bundled license information:
|
|
1930
1158
|
|
|
1931
|
-
@lit
|
|
1932
|
-
@lit-labs/ssr-dom-shim/
|
|
1159
|
+
@lit/reactive-element/node/css-tag.js:
|
|
1160
|
+
@lit-labs/ssr-dom-shim/index.js:
|
|
1933
1161
|
(**
|
|
1934
1162
|
* @license
|
|
1935
|
-
* Copyright
|
|
1163
|
+
* Copyright 2019 Google LLC
|
|
1936
1164
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1937
1165
|
*)
|
|
1938
1166
|
|
|
1939
|
-
@lit-labs/ssr-dom-shim/lib/
|
|
1167
|
+
@lit-labs/ssr-dom-shim/lib/element-internals.js:
|
|
1168
|
+
@lit-labs/ssr-dom-shim/lib/events.js:
|
|
1940
1169
|
(**
|
|
1941
1170
|
* @license
|
|
1942
|
-
* Copyright
|
|
1171
|
+
* Copyright 2023 Google LLC
|
|
1943
1172
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1944
1173
|
*)
|
|
1945
1174
|
|
|
1946
|
-
@lit-labs/ssr-dom-shim/
|
|
1947
|
-
@lit/reactive-element/node/css-tag.js:
|
|
1175
|
+
@lit-labs/ssr-dom-shim/lib/css.js:
|
|
1948
1176
|
(**
|
|
1949
1177
|
* @license
|
|
1950
|
-
* Copyright
|
|
1178
|
+
* Copyright 2024 Google LLC
|
|
1951
1179
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1952
1180
|
*)
|
|
1953
1181
|
|