@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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Components/bs-datepicker',
|
|
5
|
+
parameters: { docs: { description: { component: componentDescription('bs-datepicker') } } },
|
|
6
|
+
render: args => html `
|
|
7
|
+
<bs-datepicker
|
|
8
|
+
?range=${args.range}
|
|
9
|
+
value=${args.value}
|
|
10
|
+
start=${args.start}
|
|
11
|
+
end=${args.end}
|
|
12
|
+
min=${args.min || undefined}
|
|
13
|
+
max=${args.max || undefined}
|
|
14
|
+
locale=${args.locale}
|
|
15
|
+
first-day-of-week=${args.firstDayOfWeek}
|
|
16
|
+
@bsChange=${(ev) => console.log('bsChange', ev.detail)}
|
|
17
|
+
></bs-datepicker>
|
|
18
|
+
`,
|
|
19
|
+
argTypes: {
|
|
20
|
+
range: { control: 'boolean', description: propDescription('bs-datepicker', 'range') },
|
|
21
|
+
value: { control: 'text', description: propDescription('bs-datepicker', 'value') },
|
|
22
|
+
start: { control: 'text', description: propDescription('bs-datepicker', 'start') },
|
|
23
|
+
end: { control: 'text', description: propDescription('bs-datepicker', 'end') },
|
|
24
|
+
min: { control: 'text', description: propDescription('bs-datepicker', 'min') },
|
|
25
|
+
max: { control: 'text', description: propDescription('bs-datepicker', 'max') },
|
|
26
|
+
locale: { control: 'text', description: propDescription('bs-datepicker', 'locale') },
|
|
27
|
+
firstDayOfWeek: { control: { type: 'number', min: 0, max: 6 }, description: propDescription('bs-datepicker', 'firstDayOfWeek') },
|
|
28
|
+
},
|
|
29
|
+
args: {
|
|
30
|
+
range: false,
|
|
31
|
+
value: '2026-09-16',
|
|
32
|
+
start: '',
|
|
33
|
+
end: '',
|
|
34
|
+
min: '',
|
|
35
|
+
max: '',
|
|
36
|
+
locale: 'en-GB',
|
|
37
|
+
firstDayOfWeek: 0,
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
export default meta;
|
|
41
|
+
// Figma "Default" type: month/year dropdowns, 16 September 2026 selected.
|
|
42
|
+
export const Default = {};
|
|
43
|
+
// Figma "Range" type: start/end fields, Mon-Sat of one week selected. The Figma's own dates (11-16
|
|
44
|
+
// September) don't line up with the real 2026 calendar, so this uses 14-19 September -- the same
|
|
45
|
+
// Monday-to-Saturday shape, so the band sits in a single row like the design.
|
|
46
|
+
export const Range = {
|
|
47
|
+
args: { range: true, value: '', start: '2026-09-14', end: '2026-09-19' },
|
|
48
|
+
};
|
|
49
|
+
export const RangeAcrossWeeks = {
|
|
50
|
+
name: 'Range across weeks',
|
|
51
|
+
args: { range: true, value: '', start: '2026-09-11', end: '2026-09-24' },
|
|
52
|
+
};
|
|
53
|
+
export const MinMax = {
|
|
54
|
+
name: 'Min and max',
|
|
55
|
+
args: { min: '2026-09-10', max: '2026-09-25' },
|
|
56
|
+
};
|
|
57
|
+
export const MondayFirst = {
|
|
58
|
+
name: 'Week starts on Monday',
|
|
59
|
+
args: { firstDayOfWeek: 1 },
|
|
60
|
+
};
|
|
61
|
+
export const Danish = {
|
|
62
|
+
args: { locale: 'da-DK', firstDayOfWeek: 1 },
|
|
63
|
+
};
|
|
@@ -112,7 +112,7 @@ export class BsFileUpload {
|
|
|
112
112
|
this.handleFiles(files);
|
|
113
113
|
};
|
|
114
114
|
render() {
|
|
115
|
-
return (h("div", { key: '
|
|
115
|
+
return (h("div", { key: 'b33535fd240d2d406118fd64fd9c227dea7ecd6e', part: "dropzone", class: `bs-file-upload bs-file-upload--${this.direction} ${this.dragging ? 'bs-file-upload--dragging' : ''} ${this.disabled ? 'bs-file-upload--disabled' : ''}`, onDragEnter: this.onDragOver, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, h("div", { key: '38cc0d7e10cbdfd9daef5749c2b50ec7c9123f71', part: "icon", class: "bs-file-upload__icon" }, h("slot", { key: '0e9cadb8101a73f55410eb30b2ddbf9c5e2cd0ed', name: "icon" }, h(UploadIcon, { key: '3f745666d0967ab5de4a6824a0fc8b3e0f7f900b' }))), h("div", { key: '7e347497915149907ade2e90aa19bd339b013be9', class: "bs-file-upload__content" }, h("div", { key: 'ea3a760d44b38cd5397d5952dbee998ddb2bea1b', class: "bs-file-upload__text" }, this.heading && (h("span", { key: '9e00cc05d2b479964502243e1dda32eb7fa81e42', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (h("span", { key: 'abb9857cdd2c85a7730101d05a5704d947c669bd', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), h("bs-button", { key: '98dea0715d7c0c641c552025403febd13fe4c32f', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), h("input", { key: '0c83fdaba93b46128e4990f9d15a746fd95479f5', ref: el => (this.inputEl = el), class: "bs-file-upload__input", type: "file", hidden: true, tabindex: -1, accept: this.accept, multiple: this.multiple, disabled: this.disabled, "aria-describedby": this.description ? 'description' : undefined, onChange: this.onInputChange })));
|
|
116
116
|
}
|
|
117
117
|
static get is() { return "bs-file-upload"; }
|
|
118
118
|
static get encapsulation() { return "shadow"; }
|
|
@@ -86,7 +86,7 @@ export class BsFileUploadItem {
|
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
88
|
const removing = this.state === 'success';
|
|
89
|
-
return (h("div", { key: '
|
|
89
|
+
return (h("div", { key: '6b7fc89949cfa70838cc60d94ccb91afe09f75cd', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, h("div", { key: '55923d2fc56d8b1794a3a0d835440cd428e1e168', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, h("slot", { key: '25f93a00ba465db98c73f1bf38abc46110ae5c82', name: "thumbnail" }, this.thumbnailSrc ? (h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (h(ImageIcon, null)))), h("div", { key: 'ab975fe4e7e888755f9ceae00b6633f86b856c47', class: "bs-file-upload-item__content" }, h("div", { key: '6b1c9161edd76c799f0c545e2f939907bbb1dcee', class: "bs-file-upload-item__meta" }, h("span", { key: '3b7ca85e645d19b1ef1affff55a8e2a2284aff72', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (h("span", { key: '70dd2e29628bd536dac520ffe653bc7651f41c33', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), h("bs-icon-button", { key: '5ac7e596601ebdb35add9e278f17f67db4758e48', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? h(TrashIcon, null) : h(CloseIcon, null))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "bs-file-upload-item"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -314,7 +314,10 @@ export class BsInput {
|
|
|
314
314
|
}
|
|
315
315
|
renderStandardControl() {
|
|
316
316
|
const nativeType = this.type === 'password' ? (this.passwordVisible ? 'text' : 'password') : this.type === 'dropdown' ? 'text' : this.type;
|
|
317
|
-
return (h("input", { id: "control", part: "control", class: "bs-input__control", type: nativeType, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.type === 'dropdown',
|
|
317
|
+
return (h("input", { id: "control", part: "control", class: "bs-input__control", type: nativeType, value: this.value, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.type === 'dropdown',
|
|
318
|
+
// The popup state belongs on the focusable control (a roleless wrapper div can't carry
|
|
319
|
+
// aria-haspopup/aria-expanded -- axe's aria-allowed-attr flags it).
|
|
320
|
+
role: this.type === 'dropdown' ? 'combobox' : undefined, "aria-haspopup": this.type === 'dropdown' ? 'listbox' : undefined, "aria-expanded": this.type === 'dropdown' ? String(this.open) : undefined, min: this.type === 'number' ? this.min : undefined, max: this.type === 'number' ? this.max : undefined, step: this.type === 'number' ? this.step : undefined, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }));
|
|
318
321
|
}
|
|
319
322
|
renderSelectControl() {
|
|
320
323
|
return (h("select", { id: "control", part: "control", class: "bs-input__control", disabled: this.disabled, "aria-describedby": this.error || this.description ? 'description-or-error' : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined, onInput: this.onInput, onChange: this.onChange }, this.options.map(opt => (h("option", { value: opt.value, selected: opt.value === this.value }, opt.label)))));
|
|
@@ -374,7 +377,7 @@ export class BsInput {
|
|
|
374
377
|
.filter(Boolean)
|
|
375
378
|
.join(' ');
|
|
376
379
|
const isDropdown = this.type === 'dropdown';
|
|
377
|
-
return (h("div", { class: "bs-input__field-wrapper" }, h("div", { part: "field", class: fieldClasses, onClick: isDropdown ? this.onDropdownToggle : undefined, onKeyDown: isDropdown ? this.onDropdownKeydown : undefined
|
|
380
|
+
return (h("div", { class: "bs-input__field-wrapper" }, h("div", { part: "field", class: fieldClasses, onClick: isDropdown ? this.onDropdownToggle : undefined, onKeyDown: isDropdown ? this.onDropdownKeydown : undefined }, h("span", { part: "icon", class: `bs-input__icon ${this.showsIconArea ? 'bs-input__icon--visible' : ''}` }, this.renderIconContent()), this.renderControl(), h("span", { part: "end-icon", class: `bs-input__end-icon ${this.showsEndIconArea ? 'bs-input__end-icon--visible' : ''}` }, this.renderEndIconContent())), isDropdown && this.open && this.options.length > 0 && (h("bs-menu", { part: "menu", class: "bs-input__dropdown-menu", role: "listbox" }, this.options.map(option => (h("bs-menu-item", { key: option.value, onBsSelect: this.onDropdownOptionSelect(option) }, option.label)))))));
|
|
378
381
|
}
|
|
379
382
|
renderPinField() {
|
|
380
383
|
this.pinInputs = [];
|
|
@@ -383,10 +386,10 @@ export class BsInput {
|
|
|
383
386
|
return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, Array.from({ length: this.length }).map((_, i) => (h("input", { id: i === 0 ? 'control' : undefined, ref: el => (this.pinInputs[i] = el), part: "control", class: "bs-input__pin-cell", type: "text", inputMode: "numeric", maxLength: 1, value: this.value[i] ?? '', disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onPinInput(i), onKeyDown: this.onPinKeydown(i) })))));
|
|
384
387
|
}
|
|
385
388
|
render() {
|
|
386
|
-
return (h("div", { key: '
|
|
389
|
+
return (h("div", { key: '70497bf30b0a244e1df36075d0db77cec5345d6c', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
387
390
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
388
391
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
389
|
-
h("label", { key: '
|
|
392
|
+
h("label", { key: '527e0d146170d9d11a004d452fa2cb363c5cc7d2', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '9dd54a626ec80c774d6deacc3c9dcf02d1fef8a9', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
|
|
390
393
|
}
|
|
391
394
|
static get is() { return "bs-input"; }
|
|
392
395
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
import { vi } from "vitest";
|
|
2
3
|
describe('bs-logo', () => {
|
|
3
4
|
it('renders role="img" and aria-label="BrandSync"', async () => {
|
|
4
5
|
const { root } = await render(h("bs-logo", null));
|
|
@@ -37,9 +38,9 @@ describe('bs-logo', () => {
|
|
|
37
38
|
expect(getComputedStyle(darkAsset).display).toBe('none');
|
|
38
39
|
});
|
|
39
40
|
it('shows the dark asset and hides the light one when an ambient dark theme sets --bs-logo-asset-*-display', async () => {
|
|
40
|
-
// Simulates what src/global/base.css's [data-theme="dark"] rule sets
|
|
41
|
-
//
|
|
42
|
-
//
|
|
41
|
+
// Simulates what src/global/base.css's [data-theme="dark"] rule sets, by setting the same
|
|
42
|
+
// custom properties directly on the render stage container. (The real selector is exercised
|
|
43
|
+
// in the "follows the real [data-theme="dark"] attribute" tests below.) CSS custom
|
|
43
44
|
// properties inherit through the shadow boundary regardless of where they're defined.
|
|
44
45
|
const { root } = await render(h("bs-logo", null), {
|
|
45
46
|
stageAttrs: { style: '--bs-logo-asset-light-display: none; --bs-logo-asset-dark-display: block;' },
|
|
@@ -50,6 +51,54 @@ describe('bs-logo', () => {
|
|
|
50
51
|
expect(getComputedStyle(darkAsset).display).not.toBe('none');
|
|
51
52
|
});
|
|
52
53
|
});
|
|
54
|
+
// The tests above set the --bs-logo-asset-*-display variables by hand. These exercise the real
|
|
55
|
+
// `[data-theme="dark"]` rule from src/global/base.css (loaded by vitest-setup.ts), i.e. what a
|
|
56
|
+
// consuming app actually does -- including WHERE the attribute may sit (issue: dark logo on a dark
|
|
57
|
+
// theme).
|
|
58
|
+
describe('background="auto" follows the real [data-theme="dark"] attribute', () => {
|
|
59
|
+
const shown = (root) => ({
|
|
60
|
+
light: getComputedStyle(root.shadowRoot.querySelector('.bs-logo__asset--light')).display !== 'none',
|
|
61
|
+
dark: getComputedStyle(root.shadowRoot.querySelector('.bs-logo__asset--dark')).display !== 'none',
|
|
62
|
+
});
|
|
63
|
+
it('flips to the dark asset when data-theme="dark" is on <html>', async () => {
|
|
64
|
+
document.documentElement.setAttribute('data-theme', 'dark');
|
|
65
|
+
try {
|
|
66
|
+
const { root } = await render(h("bs-logo", null));
|
|
67
|
+
expect(shown(root)).toEqual({ light: false, dark: true });
|
|
68
|
+
}
|
|
69
|
+
finally {
|
|
70
|
+
document.documentElement.removeAttribute('data-theme');
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
it('flips to the dark asset when data-theme="dark" is on <body>', async () => {
|
|
74
|
+
document.body.setAttribute('data-theme', 'dark');
|
|
75
|
+
try {
|
|
76
|
+
const { root } = await render(h("bs-logo", null));
|
|
77
|
+
expect(shown(root)).toEqual({ light: false, dark: true });
|
|
78
|
+
}
|
|
79
|
+
finally {
|
|
80
|
+
document.body.removeAttribute('data-theme');
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
it('flips to the dark asset when data-theme="dark" is on any ancestor wrapper', async () => {
|
|
84
|
+
const { root } = await render(h("div", { "data-theme": "dark" }, h("bs-logo", null)));
|
|
85
|
+
expect(shown(root.querySelector('bs-logo'))).toEqual({ light: false, dark: true });
|
|
86
|
+
});
|
|
87
|
+
it('does NOT flip for a logo outside the data-theme="dark" element', async () => {
|
|
88
|
+
const { root } = await render(h("div", null, h("div", { "data-theme": "dark" }), h("bs-logo", null)));
|
|
89
|
+
expect(shown(root.querySelector('bs-logo'))).toEqual({ light: true, dark: false });
|
|
90
|
+
});
|
|
91
|
+
it('does not follow prefers-color-scheme (only the data-theme attribute)', async () => {
|
|
92
|
+
const spy = vi.spyOn(window, 'matchMedia').mockImplementation((q) => ({ matches: q.includes('prefers-color-scheme: dark'), media: q, addEventListener: () => undefined, removeEventListener: () => undefined, addListener: () => undefined, removeListener: () => undefined, onchange: null, dispatchEvent: () => false }));
|
|
93
|
+
try {
|
|
94
|
+
const { root } = await render(h("bs-logo", null));
|
|
95
|
+
expect(shown(root)).toEqual({ light: true, dark: false });
|
|
96
|
+
}
|
|
97
|
+
finally {
|
|
98
|
+
spy.mockRestore();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
53
102
|
describe('background="light"/"dark" (explicit)', () => {
|
|
54
103
|
it('pins the light asset even when an ambient dark theme is set', async () => {
|
|
55
104
|
const { root } = await render(h("bs-logo", { background: "light" }), {
|
|
@@ -44,7 +44,7 @@ export class BsMenu {
|
|
|
44
44
|
items[next].shadowRoot?.querySelector('button')?.focus();
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h("div", { key: '
|
|
47
|
+
return (h("div", { key: '24e54ac14b17bc1e45bcd5d7d0fda3250350672a', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: '57e28eafbb83da6bb14dfe588793edd33b2b5316' })));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "bs-menu"; }
|
|
50
50
|
static get encapsulation() { return "shadow"; }
|
|
@@ -13,3 +13,57 @@ const meta = {
|
|
|
13
13
|
};
|
|
14
14
|
export default meta;
|
|
15
15
|
export const Default = {};
|
|
16
|
+
// `bs-menu` is only the popup surface: it does not open, close or position itself. This story is the
|
|
17
|
+
// recipe for turning it into a dropdown with the pieces the library already has (a button, the menu,
|
|
18
|
+
// and ~25 lines of wiring). The same code is shown in bs-menu.mdx.
|
|
19
|
+
export const DropdownRecipe = {
|
|
20
|
+
name: 'Dropdown (recipe)',
|
|
21
|
+
render: () => {
|
|
22
|
+
const host = document.createElement('div');
|
|
23
|
+
host.style.minHeight = '220px';
|
|
24
|
+
host.innerHTML = `
|
|
25
|
+
<div class="dropdown" style="position: relative; display: inline-block;">
|
|
26
|
+
<bs-button aria-haspopup="menu" aria-expanded="false">Actions</bs-button>
|
|
27
|
+
<bs-menu style="display: none; position: absolute; top: calc(100% + var(--bs-spacing-50)); inset-inline-start: 0; z-index: var(--bs-z-index-popover); width: 210px;">
|
|
28
|
+
<bs-menu-item>Edit</bs-menu-item>
|
|
29
|
+
<bs-menu-item>Duplicate</bs-menu-item>
|
|
30
|
+
<bs-menu-item disabled>Archive</bs-menu-item>
|
|
31
|
+
<bs-menu-item>Delete</bs-menu-item>
|
|
32
|
+
</bs-menu>
|
|
33
|
+
</div>`;
|
|
34
|
+
const wrapper = host.querySelector('.dropdown');
|
|
35
|
+
const trigger = wrapper.querySelector('bs-button');
|
|
36
|
+
const menu = wrapper.querySelector('bs-menu');
|
|
37
|
+
const onDocumentClick = (ev) => {
|
|
38
|
+
// composedPath() so a click inside the shadow DOM of the button / menu items counts as inside
|
|
39
|
+
if (!ev.composedPath().includes(wrapper))
|
|
40
|
+
setOpen(false);
|
|
41
|
+
};
|
|
42
|
+
function setOpen(open, restoreFocus = false) {
|
|
43
|
+
menu.style.display = open ? 'block' : 'none';
|
|
44
|
+
trigger.setAttribute('aria-expanded', String(open));
|
|
45
|
+
if (open) {
|
|
46
|
+
document.addEventListener('click', onDocumentClick);
|
|
47
|
+
// bs-menu handles Up/Down/Home/End once focus is inside; put it on the first enabled item
|
|
48
|
+
menu.querySelector('bs-menu-item:not([disabled])')?.shadowRoot?.querySelector('button')?.focus();
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
document.removeEventListener('click', onDocumentClick);
|
|
52
|
+
if (restoreFocus)
|
|
53
|
+
trigger.focus();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
trigger.addEventListener('click', () => setOpen(menu.style.display === 'none'));
|
|
57
|
+
wrapper.addEventListener('keydown', (ev) => {
|
|
58
|
+
if (ev.key === 'Escape')
|
|
59
|
+
setOpen(false, true);
|
|
60
|
+
});
|
|
61
|
+
wrapper.addEventListener('focusout', (ev) => {
|
|
62
|
+
// Tab (or anything else) moving focus out of the whole dropdown closes it
|
|
63
|
+
if (menu.style.display !== 'none' && !wrapper.contains(ev.relatedTarget))
|
|
64
|
+
setOpen(false);
|
|
65
|
+
});
|
|
66
|
+
menu.addEventListener('bsSelect', () => setOpen(false, true));
|
|
67
|
+
return host;
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -47,7 +47,7 @@ export class BsMenuItem {
|
|
|
47
47
|
this.bsSelect.emit();
|
|
48
48
|
};
|
|
49
49
|
render() {
|
|
50
|
-
return (h("button", { key: '
|
|
50
|
+
return (h("button", { key: '5aabea2ec3ad0181e3ff53b3f22873563da69ccd', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, h("span", { key: '7e180921d99d4f430d72d8dbfeda0ca00881b74a', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '9d6d15f2d51c271de699b0101f781d8c0f3ab7e9', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '88645fe2991eb91a145e33a4f5e5e59a9ade3248', part: "label", class: "bs-menu-item__label" }, h("slot", { key: 'd3cc0ffcf0f354ffa9c48cbc88a99ec99d4f2db4' }))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "bs-menu-item"; }
|
|
53
53
|
static get encapsulation() { return "shadow"; }
|
|
@@ -87,7 +87,7 @@ export class BsPagination {
|
|
|
87
87
|
}
|
|
88
88
|
render() {
|
|
89
89
|
const pageList = this.getPageList();
|
|
90
|
-
return (h("nav", { key: '
|
|
90
|
+
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' }))))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "bs-pagination"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -69,7 +69,7 @@ export class BsProgress {
|
|
|
69
69
|
const isDeterminate = this.type === 'determinate';
|
|
70
70
|
const value = this.clampedValue;
|
|
71
71
|
const dashOffset = circumference * (1 - value / 100);
|
|
72
|
-
return (h("div", { key: '
|
|
72
|
+
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 }))) : (
|
|
73
73
|
// Figma's indeterminate ring is a fading "comet tail" (transparent -> solid color),
|
|
74
74
|
// not a flat-colored partial arc -- SVG has no angular/conic gradient primitive, so a
|
|
75
75
|
// CSS conic-gradient (color varying by angle) + a radial-gradient mask (carving the
|
|
@@ -78,7 +78,7 @@ export class BsProgress {
|
|
|
78
78
|
h("div", { part: "arc", class: "bs-progress__spinner", style: {
|
|
79
79
|
'--bs-progress-spinner-stroke-width': `${this.strokeWidth}px`,
|
|
80
80
|
'--bs-progress-spinner-sweep': `${INDETERMINATE_SWEEP_DEGREES}deg`,
|
|
81
|
-
} }))), isDeterminate && this.showLabel && (h("span", { key: '
|
|
81
|
+
} }))), isDeterminate && this.showLabel && (h("span", { key: '2482112c5f6cac5dceffe49bd878e05a526ea64e', part: "label", class: `bs-progress__label bs-progress__label--${this.size}` }, value, "%"))));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "bs-progress"; }
|
|
84
84
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,13 +51,13 @@ export class BsProgressLinear {
|
|
|
51
51
|
render() {
|
|
52
52
|
const isDeterminate = this.type === 'determinate';
|
|
53
53
|
const value = this.clampedValue;
|
|
54
|
-
return (h("div", { key: '
|
|
54
|
+
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}%` } })) : (
|
|
55
55
|
// Figma's indeterminate bar is a soft "comet" gradient segment (transparent -> blue ->
|
|
56
56
|
// transparent) sliding left-to-right across the track's full width in a loop -- the
|
|
57
57
|
// same fade concept as bs-progress's indeterminate ring's conic-gradient comet tail,
|
|
58
58
|
// but along a straight line via a linear-gradient + `transform: translateX(...)`
|
|
59
59
|
// keyframe animation instead of a rotating conic-gradient.
|
|
60
|
-
h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (h("span", { key: '
|
|
60
|
+
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' })))));
|
|
61
61
|
}
|
|
62
62
|
// The default slot's assigned content lives in the host's light DOM regardless of whether a
|
|
63
63
|
// <slot> is currently rendered in the shadow tree, so this can be computed directly from the
|
|
@@ -104,7 +104,7 @@ export class BsRadio {
|
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
render() {
|
|
107
|
-
return (h("label", { key: '
|
|
107
|
+
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' }))));
|
|
108
108
|
}
|
|
109
109
|
static get is() { return "bs-radio"; }
|
|
110
110
|
static get encapsulation() { return "shadow"; }
|
|
@@ -229,7 +229,7 @@ export class BsSlider {
|
|
|
229
229
|
render() {
|
|
230
230
|
const isRange = this.type === 'range';
|
|
231
231
|
const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
|
|
232
|
-
return (h("div", { key: '
|
|
232
|
+
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)))));
|
|
233
233
|
}
|
|
234
234
|
static get is() { return "bs-slider"; }
|
|
235
235
|
static get encapsulation() { return "shadow"; }
|
|
@@ -61,7 +61,7 @@ export class BsSnackbar {
|
|
|
61
61
|
this.bsDismiss.emit();
|
|
62
62
|
};
|
|
63
63
|
render() {
|
|
64
|
-
return (h("div", { key: '
|
|
64
|
+
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' })))));
|
|
65
65
|
}
|
|
66
66
|
static get is() { return "bs-snackbar"; }
|
|
67
67
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,8 +51,8 @@ export class BsSourceLink {
|
|
|
51
51
|
};
|
|
52
52
|
render() {
|
|
53
53
|
const inner = [
|
|
54
|
-
h("span", { key: '
|
|
55
|
-
h("span", { key: '
|
|
54
|
+
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)))),
|
|
55
|
+
h("span", { key: '48ef2cf4c2441fb94d48112860a0ee5982176152', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '6942e3329d26b9244d57377498ac2b46966c0c64' })),
|
|
56
56
|
];
|
|
57
57
|
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));
|
|
58
58
|
}
|
|
@@ -62,7 +62,7 @@ export class BsStepper {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
// role="list" so each bs-stepper-step's role="listitem" has the required parent.
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: 'db168a586dfd3142f6dc75627f6f13fd6bde56dd', role: "list" }, h("slot", { key: 'fe06e525cb9e790d97be4d153cc07757c3624732', onSlotchange: this.onSlotChange })));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "bs-stepper"; }
|
|
68
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -57,7 +57,7 @@ export class BsStepperStep {
|
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
59
|
const state = this.state;
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
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)))));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "bs-stepper-step"; }
|
|
63
63
|
static get encapsulation() { return "shadow"; }
|
|
@@ -75,7 +75,7 @@ export class BsSwitch {
|
|
|
75
75
|
const knobClasses = ['bs-switch__knob', `bs-switch__knob--${this.size}`, this.disabled ? 'bs-switch__knob--disabled' : '']
|
|
76
76
|
.filter(Boolean)
|
|
77
77
|
.join(' ');
|
|
78
|
-
return (h("label", { key: '
|
|
78
|
+
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' }))));
|
|
79
79
|
}
|
|
80
80
|
static get is() { return "bs-switch"; }
|
|
81
81
|
static get encapsulation() { return "shadow"; }
|
|
@@ -48,6 +48,10 @@ export class BsInlineTab {
|
|
|
48
48
|
* violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute
|
|
49
49
|
* automatically, same as `bs-tab`'s identical prop. */
|
|
50
50
|
ariaLabel = null;
|
|
51
|
+
/** Identifies this tab within a parent `bs-tabs`: the group's `value` is the selected tab's
|
|
52
|
+
* `value`, and `bsChange` reports it. Optional -- a tab without one is identified by its
|
|
53
|
+
* zero-based position in the group (`"0"`, `"1"`...). */
|
|
54
|
+
value;
|
|
51
55
|
/** Set by a parent `bs-tabs` to implement roving tabindex (only one tab in the group is in the
|
|
52
56
|
* Tab order; arrow keys move between them). Left `undefined` for a standalone tab, which stays
|
|
53
57
|
* a normal tab stop. */
|
|
@@ -90,7 +94,7 @@ export class BsInlineTab {
|
|
|
90
94
|
};
|
|
91
95
|
render() {
|
|
92
96
|
const iconOnly = this.hasIcon && !this.hasLabel;
|
|
93
|
-
return (h("button", { key: '
|
|
97
|
+
return (h("button", { key: '2b53f8013cdcd94dd7297ece3cff679d158a86a8', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, 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: '4e4832cffe54b28cdd68f7c35c9741dfe001b4d5', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: 'ccc3225b1a9047a0a346b8fb8bf6f02a63ecc988', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '95c8ac8ba725cf9ed20887dfee0c88d0dd0ce180', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: 'f9551ac1fe994a7e66fe48d23b39f2936c6b5a37', onSlotchange: this.onLabelSlotchange }))));
|
|
94
98
|
}
|
|
95
99
|
static get is() { return "bs-inline-tab"; }
|
|
96
100
|
static get encapsulation() { return "shadow"; }
|
|
@@ -166,6 +170,25 @@ export class BsInlineTab {
|
|
|
166
170
|
"attribute": "aria-label",
|
|
167
171
|
"defaultValue": "null"
|
|
168
172
|
},
|
|
173
|
+
"value": {
|
|
174
|
+
"type": "string",
|
|
175
|
+
"mutable": false,
|
|
176
|
+
"complexType": {
|
|
177
|
+
"original": "string",
|
|
178
|
+
"resolved": "string",
|
|
179
|
+
"references": {}
|
|
180
|
+
},
|
|
181
|
+
"required": false,
|
|
182
|
+
"optional": true,
|
|
183
|
+
"docs": {
|
|
184
|
+
"tags": [],
|
|
185
|
+
"text": "Identifies this tab within a parent `bs-tabs`: the group's `value` is the selected tab's\n`value`, and `bsChange` reports it. Optional -- a tab without one is identified by its\nzero-based position in the group (`\"0\"`, `\"1\"`...)."
|
|
186
|
+
},
|
|
187
|
+
"getter": false,
|
|
188
|
+
"setter": false,
|
|
189
|
+
"reflect": true,
|
|
190
|
+
"attribute": "value"
|
|
191
|
+
},
|
|
169
192
|
"tabbable": {
|
|
170
193
|
"type": "boolean",
|
|
171
194
|
"mutable": false,
|
|
@@ -53,6 +53,10 @@ export class BsTab {
|
|
|
53
53
|
* violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute
|
|
54
54
|
* automatically, same as `bs-button`'s identical prop. */
|
|
55
55
|
ariaLabel = null;
|
|
56
|
+
/** Identifies this tab within a parent `bs-tabs`: the group's `value` is the selected tab's
|
|
57
|
+
* `value`, and `bsChange` reports it. Optional -- a tab without one is identified by its
|
|
58
|
+
* zero-based position in the group (`"0"`, `"1"`...). */
|
|
59
|
+
value;
|
|
56
60
|
/** Set by a parent `bs-tabs` to implement roving tabindex (only one tab in the group is in the
|
|
57
61
|
* Tab order; arrow keys move between them). Left `undefined` for a standalone tab, which stays
|
|
58
62
|
* a normal tab stop. */
|
|
@@ -103,7 +107,7 @@ export class BsTab {
|
|
|
103
107
|
const iconOnly = this.hasIcon && !this.hasLabel;
|
|
104
108
|
const vertical = this.hasIcon && this.hasLabel && this.iconPosition === 'top';
|
|
105
109
|
const showBadge = this.hasBadge && !iconOnly && !vertical;
|
|
106
|
-
return (h("button", { key: '
|
|
110
|
+
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" })));
|
|
107
111
|
}
|
|
108
112
|
static get is() { return "bs-tab"; }
|
|
109
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -205,6 +209,25 @@ export class BsTab {
|
|
|
205
209
|
"attribute": "aria-label",
|
|
206
210
|
"defaultValue": "null"
|
|
207
211
|
},
|
|
212
|
+
"value": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"mutable": false,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "string",
|
|
217
|
+
"resolved": "string",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": true,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": "Identifies this tab within a parent `bs-tabs`: the group's `value` is the selected tab's\n`value`, and `bsChange` reports it. Optional -- a tab without one is identified by its\nzero-based position in the group (`\"0\"`, `\"1\"`...)."
|
|
225
|
+
},
|
|
226
|
+
"getter": false,
|
|
227
|
+
"setter": false,
|
|
228
|
+
"reflect": true,
|
|
229
|
+
"attribute": "value"
|
|
230
|
+
},
|
|
208
231
|
"tabbable": {
|
|
209
232
|
"type": "boolean",
|
|
210
233
|
"mutable": false,
|