@brandsync/wc 1.8.0 → 1.10.0
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/custom-elements.json +4493 -3458
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-c4de155c.entry.js → p-0132a2d1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-051d3064.entry.js → p-041776c0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a09e157f.entry.js → p-08c99a60.entry.js} +1 -1
- package/dist/brandsync-wc/{p-70f64b25.entry.js → p-18c3c22c.entry.js} +1 -1
- package/dist/brandsync-wc/p-1c3a43c7.entry.js +1 -0
- package/dist/brandsync-wc/{p-fddc7bd1.entry.js → p-1c427ffb.entry.js} +1 -1
- package/dist/brandsync-wc/p-2181378f.entry.js +1 -0
- package/dist/brandsync-wc/{p-29027559.entry.js → p-2e958566.entry.js} +1 -1
- package/dist/brandsync-wc/{p-235ae012.entry.js → p-301b2455.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8ee0153b.entry.js → p-32cd69f1.entry.js} +1 -1
- package/dist/brandsync-wc/p-4f2c4929.entry.js +1 -0
- package/dist/brandsync-wc/{p-a0d5a620.entry.js → p-50a251a4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0e39b9cc.entry.js → p-5f3cd501.entry.js} +1 -1
- package/dist/brandsync-wc/p-701ebf4a.entry.js +1 -0
- package/dist/brandsync-wc/p-763876f5.entry.js +1 -0
- package/dist/brandsync-wc/{p-f7d47c17.entry.js → p-76e1c295.entry.js} +1 -1
- package/dist/brandsync-wc/p-790db8b3.entry.js +1 -0
- package/dist/brandsync-wc/{p-4e5dcaff.entry.js → p-796a1860.entry.js} +1 -1
- package/dist/brandsync-wc/p-806a5347.entry.js +1 -0
- package/dist/brandsync-wc/{p-6331de9c.entry.js → p-8eba7f90.entry.js} +1 -1
- package/dist/brandsync-wc/p-96ed9386.entry.js +1 -0
- package/dist/brandsync-wc/{p-cfcf3f0a.entry.js → p-9e88f19c.entry.js} +1 -1
- package/dist/brandsync-wc/p-9f6fe37d.entry.js +1 -0
- package/dist/brandsync-wc/{p-de7c946d.entry.js → p-a71d2811.entry.js} +1 -1
- package/dist/brandsync-wc/{p-33e44094.entry.js → p-a8e2a829.entry.js} +1 -1
- package/dist/brandsync-wc/p-addfa0a0.entry.js +1 -0
- package/dist/brandsync-wc/{p-4574a707.entry.js → p-af2bf957.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6bf2f116.entry.js → p-b2074a32.entry.js} +1 -1
- package/dist/brandsync-wc/{p-03b08508.entry.js → p-c3f72584.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7c94e6ae.entry.js → p-c99b6a66.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2891d40b.entry.js → p-c9a72416.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9f65f998.entry.js → p-d3f44cb7.entry.js} +1 -1
- package/dist/brandsync-wc/p-d42b1c2b.entry.js +1 -0
- package/dist/brandsync-wc/{p-3ec74d35.entry.js → p-daab6b22.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ee7da23d.entry.js → p-dbcbe682.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3176d1d3.entry.js → p-e8a5b8eb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-062cfa34.entry.js → p-ea4e20ef.entry.js} +1 -1
- package/dist/brandsync-wc/p-f370b8fa.entry.js +1 -0
- package/dist/brandsync-wc/{p-05c7de28.entry.js → p-f89de457.entry.js} +1 -1
- package/dist/brandsync-wc/{p-114d2fd8.entry.js → p-fd254972.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +13 -1
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +15 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +18 -4
- package/dist/cjs/bs-datepicker.cjs.entry.js +410 -0
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +5 -1
- package/dist/cjs/{bs-input.cjs.entry.js → bs-input_2.cjs.entry.js} +37 -4
- package/dist/cjs/bs-menu.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +118 -5
- package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-slider.cjs.entry.js +1 -1
- package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bs-switch.cjs.entry.js +1 -1
- package/dist/cjs/bs-tab.cjs.entry.js +5 -1
- package/dist/cjs/bs-tabs.cjs.entry.js +47 -2
- package/dist/cjs/bs-timepicker.cjs.entry.js +209 -0
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/bs-a11y.cmp.test.js +4 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.js +63 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +32 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.js +45 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +30 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +20 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.css +21 -4
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +3 -2
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.stories.js +10 -0
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.cmp.test.js +19 -0
- package/dist/collection/components/bs-data-table/bs-data-table.js +19 -5
- package/dist/collection/components/bs-data-table/bs-data-table.stories.js +8 -1
- package/dist/collection/components/bs-datepicker/bs-datepicker.cmp.test.js +182 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.css +315 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +782 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.stories.js +63 -0
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-input/bs-input.js +7 -4
- package/dist/collection/components/bs-logo/bs-logo.cmp.test.js +52 -3
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu/bs-menu.stories.js +54 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +24 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +24 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.cmp.test.js +88 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +83 -2
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.stories.js +24 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.cmp.test.js +141 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.css +200 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +509 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.stories.js +44 -0
- package/dist/collection/components/bs-toast/bs-toast.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +173 -5
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.css +106 -34
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +181 -5
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +48 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.js +68 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +31 -17
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-carousel.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.d.ts +11 -0
- package/dist/components/bs-datepicker.js +1 -0
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-timepicker.d.ts +11 -0
- package/dist/components/bs-timepicker.js +1 -0
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/{p-BA3c9Rom.js → p-B7Icv1ho.js} +1 -1
- package/dist/components/{p-wei0Ija2.js → p-BTvme8CE.js} +1 -1
- package/dist/components/p-BYR_ZC8v.js +1 -0
- package/dist/components/p-Ba860ej1.js +1 -0
- package/dist/components/p-CPvqZNO8.js +1 -0
- package/dist/components/{p-EtXc94lJ.js → p-DkIVyFOP.js} +1 -1
- package/dist/components/{p-BfEyD6Ku.js → p-ZK8p5zax.js} +1 -1
- package/dist/components/p-jDO25SfF.js +1 -0
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +14 -2
- package/dist/esm/bs-breadcrumb.entry.js +16 -2
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +18 -4
- package/dist/esm/bs-datepicker.entry.js +408 -0
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-icon-button.entry.js +2 -2
- package/dist/esm/bs-inline-tab.entry.js +5 -1
- package/dist/esm/{bs-input.entry.js → bs-input_2.entry.js} +37 -5
- package/dist/esm/bs-menu.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +119 -6
- package/dist/esm/bs-navigation-header.entry.js +2 -2
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +2 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-slider.entry.js +1 -1
- package/dist/esm/bs-snackbar.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-stepper-step.entry.js +1 -1
- package/dist/esm/bs-stepper.entry.js +1 -1
- package/dist/esm/bs-switch.entry.js +1 -1
- package/dist/esm/bs-tab.entry.js +5 -1
- package/dist/esm/bs-tabs.entry.js +48 -3
- package/dist/esm/bs-timepicker.entry.js +207 -0
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.d.ts +10 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.d.ts +8 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +2 -1
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.stories.d.ts +1 -0
- package/dist/types/components/bs-data-table/bs-data-table.d.ts +16 -2
- package/dist/types/components/bs-datepicker/bs-datepicker.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-datepicker/bs-datepicker.d.ts +136 -0
- package/dist/types/components/bs-datepicker/bs-datepicker.stories.d.ts +20 -0
- package/dist/types/components/bs-menu/bs-menu.stories.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.d.ts +4 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +4 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.d.ts +17 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.stories.d.ts +1 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.d.ts +101 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.stories.d.ts +14 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +50 -1
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +2 -0
- package/dist/types/components.d.ts +645 -2
- package/package.json +1 -1
- package/dist/brandsync-wc/p-002d258d.entry.js +0 -1
- package/dist/brandsync-wc/p-153da845.entry.js +0 -1
- package/dist/brandsync-wc/p-2e7a1082.entry.js +0 -1
- package/dist/brandsync-wc/p-612cf79c.entry.js +0 -1
- package/dist/brandsync-wc/p-652d4068.entry.js +0 -1
- package/dist/brandsync-wc/p-7b00dd36.entry.js +0 -1
- package/dist/brandsync-wc/p-ae978c9a.entry.js +0 -1
- package/dist/brandsync-wc/p-bc69a96c.entry.js +0 -1
- package/dist/brandsync-wc/p-bf53ad52.entry.js +0 -1
- package/dist/brandsync-wc/p-c10d2529.entry.js +0 -1
- package/dist/brandsync-wc/p-c7f4c114.entry.js +0 -1
- package/dist/cjs/bs-menu-item.cjs.entry.js +0 -34
- package/dist/components/p-BkHYJIyj.js +0 -1
- package/dist/components/p-Buly0d5G.js +0 -1
- package/dist/esm/bs-menu-item.entry.js +0 -32
|
@@ -91,7 +91,7 @@ const BsNavigationDrawerItem = class {
|
|
|
91
91
|
// incorrectly also toggle this parent row on every child click. Both are wrapped in a
|
|
92
92
|
// `display: contents` container so render() still returns a single root node (this codebase's
|
|
93
93
|
// convention, e.g. bs-input.tsx) without that wrapper affecting layout at all.
|
|
94
|
-
return (h("div", { key: '
|
|
94
|
+
return (h("div", { key: 'a62142391a3302dd6379135af11aa3215786df60', class: "bs-navigation-drawer-item__root" }, h("button", { key: '859f32bb1588ec661fea55d405a60a20e803b969', type: "button", part: "item", class: rowClasses, "aria-expanded": this.expandable ? String(this.expanded) : undefined, "aria-label": this.ariaLabel ?? undefined, onClick: this.onClick }, !this.nested && (h("span", { key: '0191eb506a8fa145732fb250d52d1ad650ea9a0f', part: "icon", class: `bs-navigation-drawer-item__icon ${this.hasIcon ? 'bs-navigation-drawer-item__icon--has-content' : ''}` }, h("slot", { key: '29bfc6b85d32172ac4f92ca482ffcbf71ed2158c', name: "icon", onSlotchange: this.onIconSlotchange }))), h("span", { key: 'd5e681c8dfc6b8517a01caea2daa49089ef73994', part: "label", class: "bs-navigation-drawer-item__label" }, h("slot", { key: '6f60e5831a064caae85747d6c6b735912abc9a3c' })), this.expandable && (h("span", { key: '37eebaa53518961ac10e37abe8a6f68e1066b173', part: "chevron", class: `bs-navigation-drawer-item__chevron ${this.expanded ? 'bs-navigation-drawer-item__chevron--expanded' : ''}` }, h(ChevronDownIcon, { key: '5c212defdf0226202d710f799dbf380aca087ff6' })))), this.expandable && (h("span", { key: 'abc9eb5ca2161706511b3691c71d5fedd33ee74f', part: "children", class: "bs-navigation-drawer-item__children" }, h("slot", { key: '9b501d624d2bd055e4a71848d08dfb7198e17ece', name: "children" })))));
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
// 16x16 native viewBox (not a 24x24 icon scaled down) -- authored directly at display size, per
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-AgoOSYvW.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-AgoOSYvW.js';
|
|
2
2
|
|
|
3
|
-
const bsNavigationDrawerCss = () => `:host{display:block;--bs-navigation-drawer-bg:var(--bs-surface-base);--bs-navigation-drawer-border:var(--bs-border-neutral-container);--bs-navigation-drawer-padding-y:var(--bs-spacing-300);--bs-navigation-drawer-padding-left:var(--bs-spacing-300);--bs-navigation-drawer-padding-right:var(--bs-spacing-200);--bs-navigation-drawer-gap:var(--bs-spacing-300);--bs-navigation-drawer-width:280px;--bs-navigation-drawer-title-font-family:var(--bs-typography-font-family-heading);--bs-navigation-drawer-title-font-weight:var(--bs-font-weight-bold);--bs-navigation-drawer-title-font-size:var(--bs-font-size-md);--bs-navigation-drawer-title-line-height:var(--bs-line-height-heading-h6);--bs-navigation-drawer-title-color:var(--bs-text-default);--bs-navigation-drawer-collapse-size:48px;--bs-navigation-drawer-collapse-radius:var(--bs-border-radius-100);--bs-navigation-drawer-collapse-hover:var(--bs-color-neutral-container);--bs-navigation-drawer-collapse-pressed:var(--bs-color-neutral-container-pressed);--bs-navigation-drawer-collapse-icon:var(--bs-icon-default);--bs-navigation-drawer-items-gap:var(--bs-spacing-100);--bs-navigation-drawer-collapsed-width:96px;--bs-navigation-drawer-search-trigger-size:44px;--bs-navigation-drawer-search-trigger-bg:var(--bs-color-neutral-container);--bs-navigation-drawer-search-trigger-border:var(--bs-border-neutral-container);--bs-navigation-drawer-search-trigger-icon:var(--bs-icon-default)}.bs-navigation-drawer{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-gap);width:var(--bs-navigation-drawer-width);height:100%;background:var(--bs-navigation-drawer-bg);border-right:1px solid var(--bs-navigation-drawer-border);padding:var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-right) var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-left);font-family:inherit;transition:width var(--bs-duration-fast) var(--bs-easing-standard), padding var(--bs-duration-fast) var(--bs-easing-standard)}:host([collapsed]) .bs-navigation-drawer{width:var(--bs-navigation-drawer-collapsed-width);padding-left:0;padding-right:0;align-items:center}.bs-navigation-drawer__logo{flex-shrink:0;display:flex;align-items:center}.bs-navigation-drawer__logo--mark{display:none}:host([collapsed]) .bs-navigation-drawer__logo--full{display:none}:host([collapsed]) .bs-navigation-drawer__logo--mark{display:flex}.bs-navigation-drawer__title-row{flex-shrink:0;display:flex;align-items:center;gap:var(--bs-navigation-drawer-gap)}.bs-navigation-drawer__title{flex:1;min-width:0;font-family:var(--bs-navigation-drawer-title-font-family);font-weight:var(--bs-navigation-drawer-title-font-weight);font-size:var(--bs-navigation-drawer-title-font-size);line-height:calc(var(--bs-navigation-drawer-title-line-height) * 1px);color:var(--bs-navigation-drawer-title-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([collapsed]) .bs-navigation-drawer__title{display:none}.bs-navigation-drawer__collapse{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-navigation-drawer-collapse-size);height:var(--bs-navigation-drawer-collapse-size);border:none;border-radius:var(--bs-navigation-drawer-collapse-radius);padding:0;background:transparent;color:var(--bs-navigation-drawer-collapse-icon);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer__collapse svg{width:24px;height:24px}.bs-navigation-drawer__collapse:hover{background:var(--bs-navigation-drawer-collapse-hover)}.bs-navigation-drawer__collapse:active{background:var(--bs-navigation-drawer-collapse-pressed)}.bs-navigation-drawer__collapse:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-navigation-drawer__search{flex-shrink:0;width:100%}:host([collapsed]) .bs-navigation-drawer__search{display:none}.bs-navigation-drawer__search-trigger{display:none;flex-shrink:0;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-navigation-drawer-search-trigger-size);height:var(--bs-navigation-drawer-search-trigger-size);border:1px solid var(--bs-navigation-drawer-search-trigger-border);border-radius:var(--bs-navigation-drawer-collapse-radius);background:var(--bs-navigation-drawer-search-trigger-bg);color:var(--bs-navigation-drawer-search-trigger-icon);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer__search-trigger svg{width:24px;height:24px}.bs-navigation-drawer__search-trigger:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}:host([collapsed]) .bs-navigation-drawer__search-trigger{display:inline-flex}.bs-navigation-drawer__items{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-items-gap);scrollbar-width:none}.bs-navigation-drawer__items::-webkit-scrollbar{display:none}
|
|
3
|
+
const bsNavigationDrawerCss = () => `:host{display:block;--bs-navigation-drawer-bg:var(--bs-surface-base);--bs-navigation-drawer-border:var(--bs-border-neutral-container);--bs-navigation-drawer-padding-y:var(--bs-spacing-300);--bs-navigation-drawer-padding-left:var(--bs-spacing-300);--bs-navigation-drawer-padding-right:var(--bs-spacing-200);--bs-navigation-drawer-gap:var(--bs-spacing-300);--bs-navigation-drawer-width:280px;--bs-navigation-drawer-title-font-family:var(--bs-typography-font-family-heading);--bs-navigation-drawer-title-font-weight:var(--bs-font-weight-bold);--bs-navigation-drawer-title-font-size:var(--bs-font-size-md);--bs-navigation-drawer-title-line-height:var(--bs-line-height-heading-h6);--bs-navigation-drawer-title-color:var(--bs-text-default);--bs-navigation-drawer-collapse-size:48px;--bs-navigation-drawer-collapse-radius:var(--bs-border-radius-100);--bs-navigation-drawer-collapse-hover:var(--bs-color-neutral-container);--bs-navigation-drawer-collapse-pressed:var(--bs-color-neutral-container-pressed);--bs-navigation-drawer-collapse-icon:var(--bs-icon-default);--bs-navigation-drawer-items-gap:var(--bs-spacing-100);--bs-navigation-drawer-collapsed-width:96px;--bs-navigation-drawer-search-trigger-size:44px;--bs-navigation-drawer-search-trigger-bg:var(--bs-color-neutral-container);--bs-navigation-drawer-search-trigger-border:var(--bs-border-neutral-container);--bs-navigation-drawer-search-trigger-icon:var(--bs-icon-default);--bs-navigation-drawer-backdrop:var(--bs-surface-overlay-level-2);--bs-navigation-drawer-overlay-shadow:var(--bs-shadow-lg);--bs-navigation-drawer-overlay-z-index:var(--bs-z-index-modal);--bs-navigation-drawer-overlay-duration:var(--bs-duration-default)}.bs-navigation-drawer{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-gap);width:var(--bs-navigation-drawer-width);height:100%;background:var(--bs-navigation-drawer-bg);border-right:1px solid var(--bs-navigation-drawer-border);padding:var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-right) var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-left);font-family:inherit;transition:width var(--bs-duration-fast) var(--bs-easing-standard), padding var(--bs-duration-fast) var(--bs-easing-standard)}:host([collapsed]) .bs-navigation-drawer{width:var(--bs-navigation-drawer-collapsed-width);padding-left:0;padding-right:0;align-items:center}.bs-navigation-drawer__logo{flex-shrink:0;display:flex;align-items:center}.bs-navigation-drawer__logo--mark{display:none}:host([collapsed]) .bs-navigation-drawer__logo--full{display:none}:host([collapsed]) .bs-navigation-drawer__logo--mark{display:flex}.bs-navigation-drawer__title-row{flex-shrink:0;display:flex;align-items:center;gap:var(--bs-navigation-drawer-gap)}.bs-navigation-drawer__title{flex:1;min-width:0;font-family:var(--bs-navigation-drawer-title-font-family);font-weight:var(--bs-navigation-drawer-title-font-weight);font-size:var(--bs-navigation-drawer-title-font-size);line-height:calc(var(--bs-navigation-drawer-title-line-height) * 1px);color:var(--bs-navigation-drawer-title-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([collapsed]) .bs-navigation-drawer__title{display:none}.bs-navigation-drawer__collapse{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-navigation-drawer-collapse-size);height:var(--bs-navigation-drawer-collapse-size);border:none;border-radius:var(--bs-navigation-drawer-collapse-radius);padding:0;background:transparent;color:var(--bs-navigation-drawer-collapse-icon);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer__collapse svg{width:24px;height:24px}.bs-navigation-drawer__collapse:hover{background:var(--bs-navigation-drawer-collapse-hover)}.bs-navigation-drawer__collapse:active{background:var(--bs-navigation-drawer-collapse-pressed)}.bs-navigation-drawer__collapse:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-navigation-drawer__search{flex-shrink:0;width:100%}:host([collapsed]) .bs-navigation-drawer__search{display:none}.bs-navigation-drawer__search-trigger{display:none;flex-shrink:0;align-items:center;justify-content:center;box-sizing:border-box;width:var(--bs-navigation-drawer-search-trigger-size);height:var(--bs-navigation-drawer-search-trigger-size);border:1px solid var(--bs-navigation-drawer-search-trigger-border);border-radius:var(--bs-navigation-drawer-collapse-radius);background:var(--bs-navigation-drawer-search-trigger-bg);color:var(--bs-navigation-drawer-search-trigger-icon);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-navigation-drawer__search-trigger svg{width:24px;height:24px}.bs-navigation-drawer__search-trigger:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}:host([collapsed]) .bs-navigation-drawer__search-trigger{display:inline-flex}.bs-navigation-drawer__items{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:var(--bs-navigation-drawer-items-gap);scrollbar-width:none}.bs-navigation-drawer__items::-webkit-scrollbar{display:none}.bs-navigation-drawer:focus{outline:none;}:host([data-overlay]) .bs-navigation-drawer{position:fixed;inset-block:0;inset-inline-start:0;z-index:calc(var(--bs-navigation-drawer-overlay-z-index) + 1);width:var(--bs-navigation-drawer-width);max-width:100vw;padding:var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-right) var(--bs-navigation-drawer-padding-y) var(--bs-navigation-drawer-padding-left);align-items:stretch;box-shadow:var(--bs-navigation-drawer-overlay-shadow);transform:translateX(-100%);visibility:hidden;transition:transform var(--bs-navigation-drawer-overlay-duration) var(--bs-easing-standard), visibility 0s linear var(--bs-navigation-drawer-overlay-duration)}:host([data-overlay]:dir(rtl)) .bs-navigation-drawer{transform:translateX(100%)}:host([data-overlay]) .bs-navigation-drawer.bs-navigation-drawer--open{transform:none;visibility:visible;transition:transform var(--bs-navigation-drawer-overlay-duration) var(--bs-easing-standard), visibility 0s}:host([data-overlay]) .bs-navigation-drawer__logo--full{display:flex}:host([data-overlay]) .bs-navigation-drawer__logo--mark{display:none}:host([data-overlay]) .bs-navigation-drawer__title{display:block}:host([data-overlay]) .bs-navigation-drawer__search{display:block}:host([data-overlay]) .bs-navigation-drawer__search-trigger,:host([data-overlay]) .bs-navigation-drawer__collapse{display:none}.bs-navigation-drawer__backdrop{position:fixed;inset:0;z-index:var(--bs-navigation-drawer-overlay-z-index);background:var(--bs-navigation-drawer-backdrop);opacity:0;visibility:hidden;transition:opacity var(--bs-navigation-drawer-overlay-duration) var(--bs-easing-standard), visibility 0s linear var(--bs-navigation-drawer-overlay-duration)}:host([open]) .bs-navigation-drawer__backdrop{opacity:1;visibility:visible;transition:opacity var(--bs-navigation-drawer-overlay-duration) var(--bs-easing-standard), visibility 0s}@media (prefers-reduced-motion: reduce){:host([data-overlay]) .bs-navigation-drawer,.bs-navigation-drawer__backdrop{transition:none}}@media (forced-colors: active){:host([data-overlay]) .bs-navigation-drawer{border:1px solid CanvasText}}`;
|
|
4
4
|
|
|
5
5
|
const BsNavigationDrawer = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
this.bsCollapse = createEvent(this, "bsCollapse");
|
|
9
9
|
this.bsSearchClick = createEvent(this, "bsSearchClick");
|
|
10
|
+
this.bsClose = createEvent(this, "bsClose");
|
|
10
11
|
}
|
|
11
12
|
get el() { return getElement(this); }
|
|
12
13
|
/** Heading text shown next to the collapse toggle, and used as the `<nav>` landmark's
|
|
@@ -44,11 +45,112 @@ const BsNavigationDrawer = class {
|
|
|
44
45
|
* pairing works too: a header that keeps its own logo (`alignment="default"`) paired with this
|
|
45
46
|
* drawer set to `showLogo={false}`, so the brand mark only ever appears once. */
|
|
46
47
|
showLogo = true;
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
/** Small screens only (768px and below): whether the off-canvas overlay is shown. Mutable and
|
|
49
|
+
* reflected -- the drawer sets it back to `false` itself when the user dismisses it (Escape or
|
|
50
|
+
* the backdrop), and emits `bsClose`. Ignored on wider screens, where the drawer is always in
|
|
51
|
+
* the page flow. There is no built-in trigger: set this from your own button. */
|
|
52
|
+
open = false;
|
|
53
|
+
/** Fires when the user dismisses the overlay (Escape, or a click on the backdrop), after `open`
|
|
54
|
+
* has been set back to `false`. Does not fire when you set `open = false` yourself. */
|
|
55
|
+
bsClose;
|
|
56
|
+
/** Whether the viewport is in the small-screen range (<= 768px), tracked with `matchMedia`. */
|
|
57
|
+
mobile = false;
|
|
58
|
+
mediaQuery;
|
|
59
|
+
focusPending = false;
|
|
60
|
+
navRef;
|
|
61
|
+
previouslyFocused;
|
|
62
|
+
bodyOverflowBefore;
|
|
63
|
+
get overlayOpen() {
|
|
64
|
+
return this.mobile && this.open;
|
|
65
|
+
}
|
|
66
|
+
connectedCallback() {
|
|
67
|
+
this.mediaQuery = window.matchMedia?.('(max-width: 768px)');
|
|
68
|
+
if (this.mediaQuery) {
|
|
69
|
+
this.mobile = this.mediaQuery.matches;
|
|
70
|
+
this.mediaQuery.addEventListener('change', this.onMediaChange);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
disconnectedCallback() {
|
|
74
|
+
this.mediaQuery?.removeEventListener('change', this.onMediaChange);
|
|
75
|
+
this.unlockScroll();
|
|
76
|
+
}
|
|
77
|
+
onMediaChange = (ev) => {
|
|
78
|
+
this.mobile = ev.matches;
|
|
79
|
+
};
|
|
80
|
+
onCollapsedChange() {
|
|
81
|
+
this.syncItems();
|
|
82
|
+
}
|
|
83
|
+
onMobileChange() {
|
|
84
|
+
this.syncItems();
|
|
85
|
+
this.applyOverlayState();
|
|
86
|
+
}
|
|
87
|
+
onOpenChange() {
|
|
88
|
+
this.applyOverlayState();
|
|
49
89
|
}
|
|
50
90
|
componentDidLoad() {
|
|
51
|
-
this.
|
|
91
|
+
this.syncItems();
|
|
92
|
+
this.applyOverlayState();
|
|
93
|
+
this.flushFocus();
|
|
94
|
+
}
|
|
95
|
+
componentDidRender() {
|
|
96
|
+
this.flushFocus();
|
|
97
|
+
}
|
|
98
|
+
/** Focus is moved only after the render that makes the panel visible -- focusing earlier races the
|
|
99
|
+
* re-render (the panel is still `visibility: hidden`), and a hidden element can't take focus. */
|
|
100
|
+
flushFocus() {
|
|
101
|
+
if (this.focusPending && this.overlayOpen) {
|
|
102
|
+
this.focusPending = false;
|
|
103
|
+
requestAnimationFrame(() => this.navRef?.focus());
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/** In the small-screen overlay the items always use their expanded layout -- the collapsed
|
|
107
|
+
* (icon-above-caption) layout is for the desktop rail, and would clip labels in a full-width
|
|
108
|
+
* panel and hide nested items. */
|
|
109
|
+
syncItems() {
|
|
110
|
+
this.syncItemsCollapsed(this.mobile ? false : this.collapsed);
|
|
111
|
+
}
|
|
112
|
+
/** Scroll lock, focus entry and focus return for the overlay, mirroring `bs-dialog`: the focus
|
|
113
|
+
* move is deferred a frame because focusing right after the panel becomes visible does not
|
|
114
|
+
* reliably land. */
|
|
115
|
+
applyOverlayState() {
|
|
116
|
+
if (this.overlayOpen) {
|
|
117
|
+
if (this.bodyOverflowBefore === undefined) {
|
|
118
|
+
this.bodyOverflowBefore = document.body.style.overflow;
|
|
119
|
+
document.body.style.overflow = 'hidden';
|
|
120
|
+
}
|
|
121
|
+
if (!this.previouslyFocused) {
|
|
122
|
+
this.previouslyFocused = document.activeElement;
|
|
123
|
+
}
|
|
124
|
+
this.focusPending = true;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
this.focusPending = false;
|
|
128
|
+
this.unlockScroll();
|
|
129
|
+
if (this.previouslyFocused?.isConnected)
|
|
130
|
+
this.previouslyFocused.focus();
|
|
131
|
+
this.previouslyFocused = undefined;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
unlockScroll() {
|
|
135
|
+
if (this.bodyOverflowBefore !== undefined) {
|
|
136
|
+
document.body.style.overflow = this.bodyOverflowBefore;
|
|
137
|
+
this.bodyOverflowBefore = undefined;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
requestClose = () => {
|
|
141
|
+
this.open = false;
|
|
142
|
+
this.bsClose.emit();
|
|
143
|
+
};
|
|
144
|
+
onDocumentKeydown(ev) {
|
|
145
|
+
if (this.overlayOpen && ev.key === 'Escape')
|
|
146
|
+
this.requestClose();
|
|
147
|
+
}
|
|
148
|
+
/** Keeps focus inside the open overlay: focus that lands anywhere outside this component is
|
|
149
|
+
* pulled back in. `composedPath()` is used so this works across shadow-DOM boundaries (same
|
|
150
|
+
* approach as `bs-dialog`). */
|
|
151
|
+
onDocumentFocusIn(ev) {
|
|
152
|
+
if (this.overlayOpen && !ev.composedPath().includes(this.el))
|
|
153
|
+
this.navRef?.focus();
|
|
52
154
|
}
|
|
53
155
|
/** Keeps every direct-child `bs-navigation-drawer-item`'s `collapsed` prop in sync with this
|
|
54
156
|
* component's own -- same direct-children-prop-sync approach `bs-tabs` uses for `selected`
|
|
@@ -69,11 +171,22 @@ const BsNavigationDrawer = class {
|
|
|
69
171
|
this.bsSearchClick.emit();
|
|
70
172
|
};
|
|
71
173
|
render() {
|
|
72
|
-
|
|
174
|
+
const classes = ['bs-navigation-drawer', this.mobile ? 'bs-navigation-drawer--overlay' : '', this.overlayOpen ? 'bs-navigation-drawer--open' : ''].filter(Boolean).join(' ');
|
|
175
|
+
return (h(Host, { key: 'c1e563e7b2a9474286671a3f6e1f2d3aed312620', "data-overlay": this.mobile ? '' : undefined }, this.mobile && h("div", { key: 'f6885e88df1607bb9e85a27c4e1cb616ce6b6c0d', part: "backdrop", class: "bs-navigation-drawer__backdrop", onClick: this.requestClose }), h("nav", { key: 'a3086b5203fd3724fce5fe82be394a77a6d9a1e1', ref: el => (this.navRef = el), class: classes, "aria-label": this.heading,
|
|
176
|
+
// Stays a plain <nav> landmark in every state: ARIA does not allow role="dialog" on <nav>
|
|
177
|
+
// (axe: aria-allowed-role). Modality is behavioral -- focus is held inside, the page behind is
|
|
178
|
+
// scrimmed, Escape closes -- rather than announced through aria-modal.
|
|
179
|
+
tabIndex: this.mobile ? -1 : undefined }, this.showLogo && (h("div", { key: 'c1b8700d6936ae14acf900d3cc83c6a8a7d79a20', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: '27f4205dcdd609c4709a09dbeb7d4d59a41340db', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: 'b8474734a50dbd690a9a8d8febd6cda084498d02', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: 'c89909a16f7255d24ddaae54ddd2c6cfca361572', variant: "mark", background: this.logoBackground }))), h("div", { key: '83b7641c3c1f8b8307bf8006bbef147ccfdc917c', class: "bs-navigation-drawer__title-row" }, h("span", { key: '97075d0df805b02f3f520c42ef4eceaa377e7064', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '184f4f2f35f74f145621d2854a6a50e52006ebd1', type: "button", part: "collapse", class: "bs-navigation-drawer__collapse", "aria-label": this.collapsed ? 'Expand' : 'Collapse', "aria-pressed": this.collapsed ? 'true' : 'false', onClick: this.onCollapseClick }, h(CaretLeftIcon, { key: '168c4a4f30f9cf92afd5cffc63e989e0a3d4e45a' })))), h("div", { key: 'd93ec72e4f6ba6f01d4fdc8fc3d9e0c9f0649242', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: '3441fb753d206b84e68bb777e60ec849185882b9', name: "search" })), h("button", { key: '98b3bf5e4807afb1ba5a91e2b5238d917f584ab8', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: 'c61c32465503084caab0b3741bc95e3f0f274214' })), h("div", { key: 'f75111a609795d6ed83e3e843a433440a932b730', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: '50f7cee1ae4e352b56561740bfc6ff035d521354' })))));
|
|
73
180
|
}
|
|
74
181
|
static get watchers() { return {
|
|
75
182
|
"collapsed": [{
|
|
76
183
|
"onCollapsedChange": 0
|
|
184
|
+
}],
|
|
185
|
+
"mobile": [{
|
|
186
|
+
"onMobileChange": 0
|
|
187
|
+
}],
|
|
188
|
+
"open": [{
|
|
189
|
+
"onOpenChange": 0
|
|
77
190
|
}]
|
|
78
191
|
}; }
|
|
79
192
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-AgoOSYvW.js';
|
|
2
2
|
|
|
3
|
-
const bsNavigationHeaderCss = () => `:host{display:block;--bs-navigation-header-bg:var(--bs-surface-base);--bs-navigation-header-border:var(--bs-border-default);--bs-navigation-header-padding-top:var(--bs-spacing-200);--bs-navigation-header-padding-bottom:var(--bs-spacing-100);--bs-navigation-header-padding-x:var(--bs-margin-fluid);--bs-navigation-header-max-width:
|
|
3
|
+
const bsNavigationHeaderCss = () => `:host{display:block;--bs-navigation-header-bg:var(--bs-surface-base);--bs-navigation-header-border:var(--bs-border-default);--bs-navigation-header-padding-top:var(--bs-spacing-200);--bs-navigation-header-padding-bottom:var(--bs-spacing-100);--bs-navigation-header-padding-x:var(--bs-margin-fluid);--bs-navigation-header-max-width:none;--bs-navigation-header-item-gap:calc(var(--bs-navigation-header-gap) * 1px);--bs-navigation-header-slot-gap:var(--bs-spacing-100);--bs-navigation-header-skip-link-bg:var(--bs-surface-action);--bs-navigation-header-skip-link-color:var(--bs-text-inverse)}.bs-navigation-header{box-sizing:border-box;position:relative;display:flex;align-items:center;width:100%;max-width:var(--bs-navigation-header-max-width);background:var(--bs-navigation-header-bg);border-bottom:1px solid var(--bs-navigation-header-border);padding:var(--bs-navigation-header-padding-top) var(--bs-navigation-header-padding-x) var(--bs-navigation-header-padding-bottom)}.bs-navigation-header__skip-link{position:absolute;top:var(--bs-spacing-100);left:-9999px;z-index:1;padding:var(--bs-spacing-100) var(--bs-spacing-200);border-radius:var(--bs-border-radius-100);background:var(--bs-navigation-header-skip-link-bg);color:var(--bs-navigation-header-skip-link-color);font-size:var(--bs-font-size-sm);text-decoration:underline}.bs-navigation-header__skip-link:focus{left:var(--bs-navigation-header-padding-x)}.bs-navigation-header--default,.bs-navigation-header--with-navigation-drawer{gap:var(--bs-navigation-header-item-gap)}.bs-navigation-header__logo{flex-shrink:0;display:flex;align-items:center}.bs-navigation-header--center .bs-navigation-header__logo{flex:1 0 0;min-width:0}.bs-navigation-header__left{display:flex;align-items:center;gap:var(--bs-navigation-header-slot-gap);flex-shrink:0}.bs-navigation-header__right{display:flex;align-items:center;justify-content:flex-end;gap:var(--bs-navigation-header-slot-gap);flex:1 0 0;min-width:0}@media (max-width: 768px){.bs-navigation-header--default,.bs-navigation-header--with-navigation-drawer{flex-wrap:wrap;row-gap:var(--bs-navigation-header-slot-gap)}.bs-navigation-header--default .bs-navigation-header__left,.bs-navigation-header--with-navigation-drawer .bs-navigation-header__left{flex:1 1 0%;min-width:0}.bs-navigation-header--default .bs-navigation-header__right,.bs-navigation-header--with-navigation-drawer .bs-navigation-header__right{flex:0 0 auto;margin-inline-start:auto;justify-content:flex-end}}`;
|
|
4
4
|
|
|
5
5
|
const BsNavigationHeader = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -34,7 +34,7 @@ const BsNavigationHeader = class {
|
|
|
34
34
|
render() {
|
|
35
35
|
const showLogo = this.alignment !== 'with-navigation-drawer';
|
|
36
36
|
const rootClasses = `bs-navigation-header bs-navigation-header--${this.alignment}`;
|
|
37
|
-
return (h("header", { key: '
|
|
37
|
+
return (h("header", { key: '8df6952f56af87f50c453d923d579a873565f340', class: rootClasses, "aria-label": this.ariaLabel ?? undefined }, this.skipToContentHref && (h("a", { key: 'fc18af20e2900ad6ae6c84e48bf34cbb1a5a256a', part: "skip-link", class: "bs-navigation-header__skip-link", href: this.skipToContentHref }, this.skipToContentLabel)), showLogo && (h("bs-logo", { key: '8b903db4bf61de487379378bf7ed241b7bfe588a', part: "logo", class: "bs-navigation-header__logo", variant: "full", background: this.logoBackground })), h("div", { key: '16db4c45690961fe6f362204f97969375a6fda7c', part: "left", class: "bs-navigation-header__left" }, h("slot", { key: '96b0d128230c694f104d1d0578d3dfb81cd3f3c1', name: "left" })), h("div", { key: 'e5250ad7e8ad58d0305ee5a41259704ec4a00a4a', part: "right", class: "bs-navigation-header__right" }, h("slot", { key: 'd2620bea8d01c0abc1751e44ed9bdd8e5ce36d6b', name: "right" }))));
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
BsNavigationHeader.style = bsNavigationHeaderCss();
|
|
@@ -68,7 +68,7 @@ const BsPagination = class {
|
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
70
|
const pageList = this.getPageList();
|
|
71
|
-
return (h("nav", { key: '
|
|
71
|
+
return (h("nav", { key: '9c08eac677410bc05682ff8e4219b63226eb81bd', "aria-label": "Pagination" }, h("ul", { key: '2d62248f42a4a19470ac6a259ab759ccdfd9a245', part: "list", class: "bs-pagination__list" }, h("li", { key: 'db5f800712d37adb8d3d28cd24016a2e3c2cdda1', part: "item", class: "bs-pagination__item" }, h("button", { key: 'cdee1107fa0f38d3e92adb58d2147f97b7b0605f', part: "prev", type: "button", class: "bs-pagination__control", "aria-label": this.previousLabel, disabled: this.currentPage <= 1, onClick: () => this.goToPage(this.currentPage - 1) }, h(ChevronLeftIcon, { key: 'f1293927db7446d8ceb6b8391e9a5796b0fad61c' }))), pageList.map((item, index) => item === 'ellipsis' ? (h("li", { part: "item", class: "bs-pagination__item", key: `ellipsis-${index}` }, h("span", { part: "ellipsis", class: "bs-pagination__ellipsis", "aria-hidden": "true" }, h(EllipsisIcon, null)))) : (h("li", { part: "item", class: "bs-pagination__item", key: item }, h("button", { part: item === this.currentPage ? 'page current' : 'page', type: "button", class: `bs-pagination__control bs-pagination__page ${item === this.currentPage ? 'bs-pagination__page--current' : ''}`, "aria-label": `Go to page ${item}`, "aria-current": item === this.currentPage ? 'page' : undefined, onClick: () => this.goToPage(item) }, item)))), h("li", { key: '530829cfaccd79476c8788f1079991cd7ccc3a4b', part: "item", class: "bs-pagination__item" }, h("button", { key: '9a38949a2dd2de77cf57e3fe7e281c1fe49fcc50', part: "next", type: "button", class: "bs-pagination__control", "aria-label": this.nextLabel, disabled: this.currentPage >= this.safeTotalPages, onClick: () => this.goToPage(this.currentPage + 1) }, h(ChevronRightIcon, { key: '10f3d9f6a79b431ece2c1b8f12e579b210e95e2f' }))))));
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
function range(start, end) {
|
|
@@ -33,13 +33,13 @@ const BsProgressLinear = class {
|
|
|
33
33
|
render() {
|
|
34
34
|
const isDeterminate = this.type === 'determinate';
|
|
35
35
|
const value = this.clampedValue;
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: '84a59a0536a42cbf196fe981b8574a2e530e99a0', part: "container", class: "bs-progress-linear" }, h("div", { key: '6ef60ecc713e514ee0d11c4f26fe12fd395c685d', part: "track", class: `bs-progress-linear__track bs-progress-linear__track--${this.size}`, role: "progressbar", "aria-label": this.ariaLabel, "aria-valuemin": isDeterminate ? '0' : undefined, "aria-valuemax": isDeterminate ? '100' : undefined, "aria-valuenow": isDeterminate ? String(value) : undefined, "aria-busy": isDeterminate ? undefined : 'true' }, isDeterminate ? (h("div", { part: "fill", class: "bs-progress-linear__fill", style: { width: `${value}%` } })) : (
|
|
37
37
|
// Figma's indeterminate bar is a soft "comet" gradient segment (transparent -> blue ->
|
|
38
38
|
// transparent) sliding left-to-right across the track's full width in a loop -- the
|
|
39
39
|
// same fade concept as bs-progress's indeterminate ring's conic-gradient comet tail,
|
|
40
40
|
// but along a straight line via a linear-gradient + `transform: translateX(...)`
|
|
41
41
|
// keyframe animation instead of a rotating conic-gradient.
|
|
42
|
-
h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (h("span", { key: '
|
|
42
|
+
h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (h("span", { key: 'd637632ca0bebe53088d4ee0ba984bbb2cf0b212', part: "label", class: "bs-progress-linear__label" }, h("slot", { key: '01830596779d6f41387cff50bbcbc9892ab71162' })))));
|
|
43
43
|
}
|
|
44
44
|
// The default slot's assigned content lives in the host's light DOM regardless of whether a
|
|
45
45
|
// <slot> is currently rendered in the shadow tree, so this can be computed directly from the
|
|
@@ -55,7 +55,7 @@ const BsProgress = class {
|
|
|
55
55
|
const isDeterminate = this.type === 'determinate';
|
|
56
56
|
const value = this.clampedValue;
|
|
57
57
|
const dashOffset = circumference * (1 - value / 100);
|
|
58
|
-
return (h("div", { key: '
|
|
58
|
+
return (h("div", { key: 'b1516c02f0f6ec3865930a5ef1be7bab30c9cdfe', part: "container", class: "bs-progress" }, h("div", { key: '0689f281619a940d73d24bb79d25d54a0863c1af', class: "bs-progress__box", style: { width: `${diameter}px`, height: `${diameter}px` }, role: "progressbar", "aria-label": this.ariaLabel, "aria-valuemin": isDeterminate ? '0' : undefined, "aria-valuemax": isDeterminate ? '100' : undefined, "aria-valuenow": isDeterminate ? String(value) : undefined, "aria-busy": isDeterminate ? undefined : 'true' }, isDeterminate ? (h("svg", { class: "bs-progress__ring", width: diameter, height: diameter, viewBox: `0 0 ${diameter} ${diameter}` }, h("circle", { part: "track", class: "bs-progress__track", cx: diameter / 2, cy: diameter / 2, r: radius, "stroke-width": this.strokeWidth, fill: "none" }), h("circle", { part: "arc", class: "bs-progress__arc", cx: diameter / 2, cy: diameter / 2, r: radius, "stroke-width": this.strokeWidth, fill: "none", "stroke-linecap": "round", "stroke-dasharray": circumference, "stroke-dashoffset": dashOffset }))) : (
|
|
59
59
|
// Figma's indeterminate ring is a fading "comet tail" (transparent -> solid color),
|
|
60
60
|
// not a flat-colored partial arc -- SVG has no angular/conic gradient primitive, so a
|
|
61
61
|
// CSS conic-gradient (color varying by angle) + a radial-gradient mask (carving the
|
|
@@ -64,7 +64,7 @@ const BsProgress = class {
|
|
|
64
64
|
h("div", { part: "arc", class: "bs-progress__spinner", style: {
|
|
65
65
|
'--bs-progress-spinner-stroke-width': `${this.strokeWidth}px`,
|
|
66
66
|
'--bs-progress-spinner-sweep': `${INDETERMINATE_SWEEP_DEGREES}deg`,
|
|
67
|
-
} }))), isDeterminate && this.showLabel && (h("span", { key: '
|
|
67
|
+
} }))), isDeterminate && this.showLabel && (h("span", { key: '2482112c5f6cac5dceffe49bd878e05a526ea64e', part: "label", class: `bs-progress__label bs-progress__label--${this.size}` }, value, "%"))));
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
BsProgress.style = bsProgressCss();
|
|
@@ -98,7 +98,7 @@ const BsRadio = class {
|
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
render() {
|
|
101
|
-
return (h("label", { key: '
|
|
101
|
+
return (h("label", { key: 'd261741b6d1823387c7df668759910761da6afec', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: '649a22151782938d8aff9229446060a54ce84e98', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, tabIndex: this.checked || !this.groupHasChecked ? 0 : -1, onKeyDown: this.onKeyDown, onChange: this.onChange }), h("span", { key: '3399b1629f64b148957031eac2787dd4a673e0fe', class: "bs-radio__hit-area" }, h("span", { key: 'ed5e9f03d38d76b6e69e3800489ae50c48dfcd19', class: "bs-radio__state-layer" }, h("span", { key: 'e8384a66bf5785aef4c608dde2ff96d0208cd798', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: 'abbe35f86db25e6c4732cf056d2f359f73938024', part: "dot", class: "bs-radio__dot" })))), h("span", { key: '6d29a3fd68fdaa511c66535893bedf5e49205d8c', part: "label", class: "bs-radio__label" }, h("slot", { key: '20d9bc9f8008cf775a520f25cef88cec5a36021a' }))));
|
|
102
102
|
}
|
|
103
103
|
static get delegatesFocus() { return true; }
|
|
104
104
|
static get formAssociated() { return true; }
|
|
@@ -217,7 +217,7 @@ const BsSlider = class {
|
|
|
217
217
|
render() {
|
|
218
218
|
const isRange = this.type === 'range';
|
|
219
219
|
const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
|
|
220
|
-
return (h("div", { key: '
|
|
220
|
+
return (h("div", { key: 'c6648b04d434b95f21b9020ee7eb773c30bad01d', class: rootClasses }, this.showLabel && (h("div", { key: '441e317ad19da525a721da0529aadd959a73c3ad', class: "bs-slider__header" }, h("span", { key: '5ed50642ee23d285a472a701bca67f68a05848fc', id: "bs-slider-label", part: "label", class: "bs-slider__label" }, this.label), isRange ? (h("span", { class: "bs-slider__value-fields" }, this.renderPercentField(this.percent(this.effectiveValueStart), this.onStartPercentFieldChange, this.ariaLabel ?? 'Start value'), h("span", { class: "bs-slider__separator" }, "\u2013"), this.renderPercentField(this.percent(this.effectiveValueEnd), this.onEndPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} end` : 'End value'))) : (this.renderPercentField(this.percent(this.value), this.onPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} value` : 'Value')))), h("div", { key: '2883165b7d7c649f317442a5925300c34b183e63', class: "bs-slider__row" }, this.showLabel && (h("span", { key: '7b9d60275fb8e71371277012b4fb460b357da8c8', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (h("span", { key: '1b450b15db44433662a916dd52aaf961217e71dd', part: "bound", class: "bs-slider__bound" }, this.max)))));
|
|
221
221
|
}
|
|
222
222
|
static get delegatesFocus() { return true; }
|
|
223
223
|
static get formAssociated() { return true; }
|
|
@@ -39,7 +39,7 @@ const BsSnackbar = class {
|
|
|
39
39
|
this.bsDismiss.emit();
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: '26d056b4b494847c48b1c60ac0c392334d27d54e', part: "container", class: `bs-snackbar bs-snackbar--${this.variant}`, role: "status", "aria-live": this.variant === 'error' ? 'assertive' : 'polite' }, h("div", { key: '583ad744a0b8c274992bf2e98f5bc06f8937ed4c', class: "bs-snackbar__content" }, h("span", { key: '518b02e526a261be557587bb4d39a93964bcdf24', part: "icon", class: "bs-snackbar__icon", "aria-hidden": "true" }, this.loading ? h("span", { class: "bs-snackbar__spinner" }) : h(CheckCircleIcon, null)), h("span", { key: 'ad8436b86fc5232e74a5e92604adfca129b9c698', part: "message", class: "bs-snackbar__message" }, h("slot", { key: 'b6fa1efe3c4da2e03f3c45fb18f5b899411af791' }))), h("div", { key: '674f7dc064863843406f87cc5c2534e90c7d4b30', class: "bs-snackbar__actions" }, this.actionLabel && (h("bs-button", { key: '56a7051b28197f34a5a11eb3f92087defd3a495a', part: "action", variant: ACTION_VARIANT[this.variant], size: "sm", onClick: this.onAction }, this.actionLabel)), h("bs-icon-button", { key: 'cfb7f10a70ed48f0c0ecfde5212e2ce41aca17f1', part: "close", variant: "subtle", size: "md", ariaLabel: "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: '75fd2a71af3f309a19322304e7937a39729638b9' })))));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
const CheckCircleIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M8.25 12.75L10.5 15L15.75 9.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -24,8 +24,8 @@ const BsSourceLink = class {
|
|
|
24
24
|
};
|
|
25
25
|
render() {
|
|
26
26
|
const inner = [
|
|
27
|
-
h("span", { key: '
|
|
28
|
-
h("span", { key: '
|
|
27
|
+
h("span", { key: '0b24af45da9ac7753eabcfde75547e08e19c2fa5', class: "bs-source-link__left" }, h("span", { key: '305dd947e35832c5dc2cb04585b3289e0c36072e', class: "bs-source-link__filename-row" }, h("span", { key: '09658f61e3806bbd2c4c03c0367ab79ad9a3faa6', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: 'dcbe10c8789f9dbcd95c3d796a555a387a5626ee', name: "icon" }, h(FileTextIcon, { key: 'c56ece8394e6fce4d7a327203c109e72b883ab91' }))), h("p", { key: '293a17d2135821a549b7874338b02c8cec345632', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'ac200e11ee885d366f146d7413526661b9d76cfa', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: 'd076f98b5a70593e575ff764da84cfbecf5ffdef', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '50fca70a24f3c4f6c8d8b4a5f1cdb46dba4d7de3', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: 'ccdf4864ed01b0a517118219b55bf8cc7c442548', part: "version", class: "bs-source-link__version" }, this.version)))),
|
|
28
|
+
h("span", { key: '48ef2cf4c2441fb94d48112860a0ee5982176152', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '6942e3329d26b9244d57377498ac2b46966c0c64' })),
|
|
29
29
|
];
|
|
30
30
|
return this.href ? (h("a", { class: "bs-source-link", href: this.href, target: this.target, rel: "noopener noreferrer", onClick: this.onClick }, inner)) : (h("button", { type: "button", class: "bs-source-link", onClick: this.onClick }, inner));
|
|
31
31
|
}
|
|
@@ -32,7 +32,7 @@ const BsStepperStep = class {
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
const state = this.state;
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: '809ebc9656bc8c309b603c1940ea982d02560630', role: "listitem", class: `bs-stepper-step--${this.direction}` }, h("div", { key: '05484ab3c56d0c42dac1b8af99d715109679389b', class: "bs-stepper-step__top" }, h("span", { key: '2076c16d90d907a4b40de84304bd77a7b9ae1bf9', part: "icon", class: `bs-stepper-step__icon bs-stepper-step__icon--${state}` }, state === 'current' && h("span", { key: '6fcbca00f7010e49583522a83f54f2db5ea01441', class: "bs-stepper-step__icon-dot" }), state === 'done' && h(CheckIcon, { key: '17589e79f8806e30aa6f6683fc6f7acd857dc8c9' }), state === 'error' && h(ExclamationIcon, { key: '29fd2fdd31b9d899153396e758bcc8c69cbddaea' })), h("span", { key: 'cbd47c375dc0f287449e2b1ea9f49bc15302389a', part: "connector", class: "bs-stepper-step__connector", "aria-hidden": "true" }, h("span", { key: '6d29361f15e62a945f7f9c8a37b05025b3173214', class: "bs-stepper-step__connector-line" }))), h("span", { key: 'edb0ca51856917b8703ec88655bd4c8c1a1ff5df', part: "label", class: `bs-stepper-step__label bs-stepper-step__label--${state}` }, h("span", { key: 'abe23448bb9bc8a818551dc219aa89f05b9a6721', part: "name", class: "bs-stepper-step__name" }, this.name), this.showDescription && this.description && (h("span", { key: 'e469eb84389527f380c37f7e7724809528d624ae', part: "description", class: "bs-stepper-step__description" }, this.description)))));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
const CheckIcon = () => (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M2.5 9L6 12.5L14 4.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -42,7 +42,7 @@ const BsStepper = class {
|
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
44
|
// role="list" so each bs-stepper-step's role="listitem" has the required parent.
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'db168a586dfd3142f6dc75627f6f13fd6bde56dd', role: "list" }, h("slot", { key: 'fe06e525cb9e790d97be4d153cc07757c3624732', onSlotchange: this.onSlotChange })));
|
|
46
46
|
}
|
|
47
47
|
static get watchers() { return {
|
|
48
48
|
"currentStep": [{
|
|
@@ -70,7 +70,7 @@ const BsSwitch = class {
|
|
|
70
70
|
const knobClasses = ['bs-switch__knob', `bs-switch__knob--${this.size}`, this.disabled ? 'bs-switch__knob--disabled' : '']
|
|
71
71
|
.filter(Boolean)
|
|
72
72
|
.join(' ');
|
|
73
|
-
return (h("label", { key: '
|
|
73
|
+
return (h("label", { key: '29aaef97a7a237cddfdfffb7cdb693c8934a9d4f', class: `bs-switch ${this.disabled ? 'bs-switch--disabled' : ''}` }, h("input", { key: '03a1e41e0b66f823a95b76c85a19c8ca6c418763', class: "bs-switch__input", type: "checkbox", role: "switch", checked: this.checked, disabled: this.disabled, "aria-checked": String(this.checked), "aria-label": this.ariaLabel, onChange: this.onChange }), h("span", { key: '4dc7254d5855d91221048aa2fbddcb0532c4f572', part: "track", class: trackClasses }, h("span", { key: '11dbb2724c94e6a58413d36b8d673015ad44a5e3', part: "knob", class: knobClasses })), h("span", { key: '9954a8d69131ca00bcd177d1d7cfe7ca83bc32a1', part: "label", class: "bs-switch__label" }, h("slot", { key: '98058212aed27b2d6b589eb769fddd5fe3156510' }))));
|
|
74
74
|
}
|
|
75
75
|
static get delegatesFocus() { return true; }
|
|
76
76
|
static get formAssociated() { return true; }
|
package/dist/esm/bs-tab.entry.js
CHANGED
|
@@ -24,6 +24,10 @@ const BsTab = class {
|
|
|
24
24
|
* violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute
|
|
25
25
|
* automatically, same as `bs-button`'s identical prop. */
|
|
26
26
|
ariaLabel = null;
|
|
27
|
+
/** Identifies this tab within a parent `bs-tabs`: the group's `value` is the selected tab's
|
|
28
|
+
* `value`, and `bsChange` reports it. Optional -- a tab without one is identified by its
|
|
29
|
+
* zero-based position in the group (`"0"`, `"1"`...). */
|
|
30
|
+
value;
|
|
27
31
|
/** Set by a parent `bs-tabs` to implement roving tabindex (only one tab in the group is in the
|
|
28
32
|
* Tab order; arrow keys move between them). Left `undefined` for a standalone tab, which stays
|
|
29
33
|
* a normal tab stop. */
|
|
@@ -74,7 +78,7 @@ const BsTab = class {
|
|
|
74
78
|
const iconOnly = this.hasIcon && !this.hasLabel;
|
|
75
79
|
const vertical = this.hasIcon && this.hasLabel && this.iconPosition === 'top';
|
|
76
80
|
const showBadge = this.hasBadge && !iconOnly && !vertical;
|
|
77
|
-
return (h("button", { key: '
|
|
81
|
+
return (h("button", { key: '87234360dfed766afe447c3e8f037d8b59868a15', type: "button", part: "tab", role: "tab", class: `bs-tab ${this.selected ? 'bs-tab--selected' : ''} ${this.disabled ? 'bs-tab--disabled' : ''} ${iconOnly ? 'bs-tab--icon-only' : ''} ${vertical ? 'bs-tab--vertical' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: 'cecdf03d52896828f098956a25342209c0244f39', part: "icon", class: `bs-tab__icon ${this.hasIcon ? 'bs-tab__icon--has-content' : ''}` }, h("slot", { key: 'f4bbc1ac9ee7df0db6cb393c69b43227add0db3e', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'c14726bc5b6f47d0a96fdf5807a2dd7b2466a27f', part: "label", class: `bs-tab__label ${this.hasLabel ? 'bs-tab__label--has-content' : ''}` }, h("slot", { key: '88936beb454b7fa0b9d1c67d39e812f86e89ae56', onSlotchange: this.onLabelSlotchange })), h("span", { key: 'a32984bfa7879e702748171fc51a4679b58d0b8b', part: "badge", class: `bs-tab__badge ${showBadge ? 'bs-tab__badge--has-content' : ''}` }, h("slot", { key: 'ad516087badafb57ff4df818d0b9a100373f205e', name: "badge", onSlotchange: this.onBadgeSlotchange })), h("span", { key: '30e25441bd650875ce8b6dd97befc1053c40ca47', part: "indicator", class: "bs-tab__indicator" })));
|
|
78
82
|
}
|
|
79
83
|
};
|
|
80
84
|
BsTab.style = bsTabCss();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, a as getElement, h } from './index-AgoOSYvW.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-AgoOSYvW.js';
|
|
2
2
|
|
|
3
3
|
const bsTabsCss = () => `:host{display:inline-block;--bs-tabs-tab-gap:var(--bs-spacing-100);--bs-tabs-inline-tab-bg:var(--bs-color-neutral-container);--bs-tabs-inline-tab-padding-x:var(--bs-spacing-50);--bs-tabs-inline-tab-radius:var(--bs-border-radius-full);--bs-tabs-inline-tab-gap:var(--bs-spacing-50)}.bs-tabs{display:inline-flex;align-items:center}.bs-tabs--vertical{display:flex;flex-direction:column;align-items:flex-start}.bs-tabs--bs-tab{gap:var(--bs-tabs-tab-gap)}.bs-tabs--bs-inline-tab{background:var(--bs-tabs-inline-tab-bg);padding:0 var(--bs-tabs-inline-tab-padding-x);border-radius:var(--bs-tabs-inline-tab-radius);gap:var(--bs-tabs-inline-tab-gap)}`;
|
|
4
4
|
|
|
5
5
|
const BsTabs = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
+
this.bsChange = createEvent(this, "bsChange");
|
|
8
9
|
}
|
|
9
10
|
get el() { return getElement(this); }
|
|
10
11
|
/** Which tab-button family this group wraps. Governs the wrapper's own visual treatment (gap-only
|
|
@@ -14,6 +15,16 @@ const BsTabs = class {
|
|
|
14
15
|
/** Layout direction of the tab bar itself. Sets `aria-orientation` on the internal wrapper and
|
|
15
16
|
* switches `flex-direction`. */
|
|
16
17
|
orientation = 'horizontal';
|
|
18
|
+
/** The selected tab's `value`. Mutable and reflected: it follows the user's selection, and
|
|
19
|
+
* setting it from outside (attribute or property) selects the matching tab -- without emitting
|
|
20
|
+
* `bsChange`, which only fires for user-driven changes. A tab's value is its own `value` prop,
|
|
21
|
+
* or, for a tab without one, its zero-based position in the group as a string (`"0"`, `"1"`...).
|
|
22
|
+
* If unset, it is read from whichever tab is already `selected` once the group loads. */
|
|
23
|
+
value;
|
|
24
|
+
/** Fires when the user selects a different tab (click, or arrow/Home/End), with the new
|
|
25
|
+
* `value`. Does not fire when `value` is set programmatically. `bsSelect` on the individual tab
|
|
26
|
+
* still fires as before. */
|
|
27
|
+
bsChange;
|
|
17
28
|
/**
|
|
18
29
|
* Catches `bsSelect` bubbling up from any slotted `<bs-tab>`/`<bs-inline-tab>` (Stencil's
|
|
19
30
|
* `@Event()` defaults to `bubbles: true, composed: true`, and `@Listen` without a target listens
|
|
@@ -22,15 +33,46 @@ const BsTabs = class {
|
|
|
22
33
|
* `if (this.disabled) return;`), so no special-casing is needed here.
|
|
23
34
|
*/
|
|
24
35
|
onTabSelect(ev) {
|
|
25
|
-
const tabs = this.
|
|
36
|
+
const tabs = this.tabs();
|
|
26
37
|
tabs.forEach(tab => {
|
|
27
38
|
tab.selected = tab === ev.target;
|
|
28
39
|
});
|
|
29
40
|
this.syncRovingTabindex();
|
|
41
|
+
const index = tabs.findIndex(tab => tab === ev.target);
|
|
42
|
+
if (index === -1)
|
|
43
|
+
return;
|
|
44
|
+
const value = this.tabValue(tabs[index], index);
|
|
45
|
+
if (value !== this.value) {
|
|
46
|
+
this.value = value;
|
|
47
|
+
this.bsChange.emit({ value });
|
|
48
|
+
}
|
|
30
49
|
}
|
|
31
50
|
componentDidLoad() {
|
|
51
|
+
if (this.value !== undefined) {
|
|
52
|
+
this.applyValue();
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
// Uncontrolled: report whichever tab the consumer already marked `selected`.
|
|
56
|
+
const tabs = this.tabs();
|
|
57
|
+
const index = tabs.findIndex(t => t.selected);
|
|
58
|
+
if (index !== -1)
|
|
59
|
+
this.value = this.tabValue(tabs[index], index);
|
|
60
|
+
}
|
|
32
61
|
this.syncRovingTabindex();
|
|
33
62
|
}
|
|
63
|
+
tabValue(tab, index) {
|
|
64
|
+
return tab.value ?? String(index);
|
|
65
|
+
}
|
|
66
|
+
/** Selects the tab whose value matches `this.value` (and deselects the rest). */
|
|
67
|
+
applyValue() {
|
|
68
|
+
this.tabs().forEach((tab, i) => {
|
|
69
|
+
tab.selected = this.tabValue(tab, i) === this.value;
|
|
70
|
+
});
|
|
71
|
+
this.syncRovingTabindex();
|
|
72
|
+
}
|
|
73
|
+
onValueChange() {
|
|
74
|
+
this.applyValue();
|
|
75
|
+
}
|
|
34
76
|
syncRovingTabindex() {
|
|
35
77
|
const tabs = this.tabs();
|
|
36
78
|
const anySelected = tabs.some(t => t.selected);
|
|
@@ -73,9 +115,12 @@ const BsTabs = class {
|
|
|
73
115
|
}
|
|
74
116
|
render() {
|
|
75
117
|
const vertical = this.orientation === 'vertical';
|
|
76
|
-
return (h("div", { key: '
|
|
118
|
+
return (h("div", { key: 'b47d3502305490c9098b825f1eb8c60f45dad5d8', part: "tablist", role: "tablist", "aria-orientation": this.orientation, class: `bs-tabs bs-tabs--${this.type} ${vertical ? 'bs-tabs--vertical' : ''}` }, h("slot", { key: '133cf0b2ea93354a664bb304579fa59d85e53edf', onSlotchange: () => this.syncRovingTabindex() })));
|
|
77
119
|
}
|
|
78
120
|
static get watchers() { return {
|
|
121
|
+
"value": [{
|
|
122
|
+
"onValueChange": 0
|
|
123
|
+
}],
|
|
79
124
|
"orientation": [{
|
|
80
125
|
"syncRovingTabindex": 0
|
|
81
126
|
}]
|