@brandsync/wc 0.0.10 → 0.0.12
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 +3584 -508
- package/dist/brandsync-wc/brandsync-wc.css +20 -0
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-b1e1b2d6.entry.js → p-09aa03d1.entry.js} +1 -1
- package/dist/brandsync-wc/p-0eee5477.entry.js +1 -0
- package/dist/brandsync-wc/p-0fa017ce.entry.js +1 -0
- package/dist/brandsync-wc/p-12ec9e92.entry.js +1 -0
- package/dist/brandsync-wc/{p-3dacae70.entry.js → p-1900f6ce.entry.js} +1 -1
- package/dist/brandsync-wc/{p-575ce905.entry.js → p-1adc59be.entry.js} +1 -1
- package/dist/brandsync-wc/p-1c6fa697.entry.js +1 -0
- package/dist/brandsync-wc/{p-dd747a12.entry.js → p-1cf715aa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8a78d6ea.entry.js → p-20dbc6a1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a34f460d.entry.js → p-23457a21.entry.js} +1 -1
- package/dist/brandsync-wc/p-266f5dde.entry.js +1 -0
- package/dist/brandsync-wc/p-2a65aabb.entry.js +1 -0
- package/dist/brandsync-wc/{p-8d12ed96.entry.js → p-2c51d738.entry.js} +1 -1
- package/dist/brandsync-wc/p-3b31f7c7.entry.js +1 -0
- package/dist/brandsync-wc/p-46ddc8e1.entry.js +1 -0
- package/dist/brandsync-wc/p-56c66448.entry.js +1 -0
- package/dist/brandsync-wc/{p-18af02df.entry.js → p-57fdbb76.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7776b57b.entry.js → p-64e2a7d7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-805644e4.entry.js → p-6e854e92.entry.js} +1 -1
- package/dist/brandsync-wc/p-72a33f88.entry.js +1 -0
- package/dist/brandsync-wc/p-8049f9f2.entry.js +1 -0
- package/dist/brandsync-wc/{p-d682675e.entry.js → p-88a0abee.entry.js} +1 -1
- package/dist/brandsync-wc/p-8b662ee3.entry.js +1 -0
- package/dist/brandsync-wc/{p-94ed898a.entry.js → p-8ded1eb6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-nLORuTUY.js → p-DST5-cTx.js} +2 -2
- package/dist/brandsync-wc/p-a5b15061.entry.js +1 -0
- package/dist/brandsync-wc/{p-30a0e168.entry.js → p-aba300a9.entry.js} +1 -1
- package/dist/brandsync-wc/p-b24a980b.entry.js +1 -0
- package/dist/brandsync-wc/{p-96f374be.entry.js → p-b289450a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-880ea3f8.entry.js → p-b8a2f882.entry.js} +1 -1
- package/dist/brandsync-wc/p-c320b6b4.entry.js +1 -0
- package/dist/brandsync-wc/{p-1515498e.entry.js → p-d4e3ca77.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ce0914a7.entry.js → p-dd09d335.entry.js} +1 -1
- package/dist/brandsync-wc/p-ef8522b5.entry.js +1 -0
- package/dist/brandsync-wc/p-f04db1b0.entry.js +1 -0
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +3 -2
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +2 -2
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +2 -2
- package/dist/cjs/bs-attachment-list.cjs.entry.js +2 -2
- package/dist/cjs/bs-attachment.cjs.entry.js +3 -3
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/bs-button.cjs.entry.js +3 -3
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-checkbox.cjs.entry.js +94 -0
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +14 -2
- package/dist/cjs/bs-composer.cjs.entry.js +37 -4
- package/dist/cjs/bs-data-table.cjs.entry.js +3 -3
- package/dist/cjs/bs-icon-button.cjs.entry.js +40 -0
- package/dist/cjs/bs-inline-tab.cjs.entry.js +69 -0
- package/dist/cjs/bs-input.cjs.entry.js +3 -3
- package/dist/cjs/bs-logo.cjs.entry.js +165 -0
- package/dist/cjs/bs-menu_2.cjs.entry.js +3 -3
- package/dist/cjs/bs-modal.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +104 -0
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +81 -0
- package/dist/cjs/bs-navigation-header.cjs.entry.js +44 -0
- package/dist/cjs/bs-radio.cjs.entry.js +49 -0
- package/dist/cjs/bs-slider.cjs.entry.js +191 -0
- package/dist/cjs/bs-source-link.cjs.entry.js +3 -3
- package/dist/cjs/bs-switch.cjs.entry.js +57 -0
- package/dist/cjs/bs-tab.cjs.entry.js +80 -0
- package/dist/cjs/bs-tabs.cjs.entry.js +39 -0
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{index-CVh-sqA_.js → index-B3sdhEGk.js} +74 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +14 -2
- package/dist/collection/components/bs-ai-chatbot/bs-ai-chatbot.stories.js +26 -11
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +2 -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/bs-attachment.css +12 -33
- package/dist/collection/components/bs-attachment/bs-attachment.js +4 -10
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-button/{bs-button.cmp.test.js → bs-button/bs-button.cmp.test.js} +26 -0
- package/dist/collection/components/bs-button/{bs-button.css → bs-button/bs-button.css} +57 -6
- package/dist/collection/components/bs-button/{bs-button.js → bs-button/bs-button.js} +10 -5
- package/dist/collection/components/bs-button/{bs-button.stories.js → bs-button/bs-button.stories.js} +2 -27
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +83 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.css +346 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +185 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.stories.js +74 -0
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +3 -3
- 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.cmp.test.js +117 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.css +199 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +265 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.stories.js +65 -0
- package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +48 -7
- package/dist/collection/components/bs-composer/bs-composer.css +15 -0
- package/dist/collection/components/bs-composer/bs-composer.js +38 -4
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +47 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +20 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-logo/brandsync-logo-full-dark.js +44 -0
- package/dist/collection/components/bs-logo/brandsync-logo-full-light.js +40 -0
- package/dist/collection/components/bs-logo/brandsync-logo-mark.js +17 -0
- package/dist/collection/components/bs-logo/bs-logo.cmp.test.js +113 -0
- package/dist/collection/components/bs-logo/bs-logo.css +79 -0
- package/dist/collection/components/bs-logo/bs-logo.js +193 -0
- package/dist/collection/components/bs-logo/bs-logo.stories.js +69 -0
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.cmp.test.js +76 -0
- package/dist/collection/components/bs-radio/bs-radio.css +164 -0
- package/dist/collection/components/bs-radio/bs-radio.js +170 -0
- package/dist/collection/components/bs-radio/bs-radio.stories.js +56 -0
- package/dist/collection/components/bs-slider/bs-slider.cmp.test.js +139 -0
- package/dist/collection/components/bs-slider/bs-slider.css +409 -0
- package/dist/collection/components/bs-slider/bs-slider.js +499 -0
- package/dist/collection/components/bs-slider/bs-slider.stories.js +70 -0
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-switch/bs-switch.cmp.test.js +71 -0
- package/dist/collection/components/bs-switch/bs-switch.css +196 -0
- package/dist/collection/components/bs-switch/bs-switch.js +185 -0
- package/dist/collection/components/bs-switch/bs-switch.stories.js +60 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.js +104 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.css +163 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +192 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.js +95 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.cmp.test.js +120 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.css +216 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +232 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.stories.js +138 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.cmp.test.js +61 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.css +39 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +133 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.stories.js +39 -0
- 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 +131 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.css +257 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +253 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +202 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.js +172 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.css +325 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +314 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.js +78 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.js +77 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +106 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +188 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.js +189 -0
- 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-badge.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.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.d.ts +11 -0
- package/dist/components/bs-checkbox.js +1 -0
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-icon-button.d.ts +11 -0
- package/dist/components/bs-icon-button.js +1 -0
- package/dist/components/bs-inline-tab.d.ts +11 -0
- package/dist/components/bs-inline-tab.js +1 -0
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-logo.d.ts +11 -0
- package/dist/components/bs-logo.js +1 -0
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-modal.js +1 -1
- package/dist/components/bs-navigation-drawer-item.d.ts +11 -0
- package/dist/components/bs-navigation-drawer-item.js +1 -0
- package/dist/components/bs-navigation-drawer.d.ts +11 -0
- package/dist/components/bs-navigation-drawer.js +1 -0
- package/dist/components/bs-navigation-header.d.ts +11 -0
- package/dist/components/bs-navigation-header.js +1 -0
- package/dist/components/bs-radio.d.ts +11 -0
- package/dist/components/bs-radio.js +1 -0
- package/dist/components/bs-slider.d.ts +11 -0
- package/dist/components/bs-slider.js +1 -0
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-switch.d.ts +11 -0
- package/dist/components/bs-switch.js +1 -0
- package/dist/components/bs-tab.d.ts +11 -0
- package/dist/components/bs-tab.js +1 -0
- package/dist/components/bs-tabs.d.ts +11 -0
- package/dist/components/bs-tabs.js +1 -0
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BAOJc0V0.js +1 -0
- package/dist/components/{p-BpvhHQSw.js → p-Be1Pfcnm.js} +1 -1
- package/dist/components/{p-Cz2nfz2j.js → p-BqYyMGrB.js} +1 -1
- package/dist/components/p-CaWqTQBZ.js +1 -0
- package/dist/components/{p-DndQiCMP.js → p-DivZLd6i.js} +1 -1
- package/dist/components/{p-DHbUF0g6.js → p-xfx69LQx.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-ai-disclaimer.entry.js +3 -2
- package/dist/esm/bs-ai-greeting.entry.js +2 -2
- package/dist/esm/bs-ai-thinking.entry.js +2 -2
- package/dist/esm/bs-attachment-list.entry.js +2 -2
- package/dist/esm/bs-attachment.entry.js +3 -3
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +2 -2
- package/dist/esm/bs-button.entry.js +3 -3
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +2 -2
- package/dist/esm/bs-chatbot-header.entry.js +2 -2
- package/dist/esm/bs-chatbot-response-action.entry.js +2 -2
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +2 -2
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
- package/dist/esm/bs-checkbox.entry.js +92 -0
- package/dist/esm/bs-composer-status-banner.entry.js +14 -2
- package/dist/esm/bs-composer.entry.js +37 -4
- package/dist/esm/bs-data-table.entry.js +3 -3
- package/dist/esm/bs-icon-button.entry.js +38 -0
- package/dist/esm/bs-inline-tab.entry.js +67 -0
- package/dist/esm/bs-input.entry.js +3 -3
- package/dist/esm/bs-logo.entry.js +163 -0
- package/dist/esm/bs-menu_2.entry.js +3 -3
- package/dist/esm/bs-modal.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +102 -0
- package/dist/esm/bs-navigation-drawer.entry.js +79 -0
- package/dist/esm/bs-navigation-header.entry.js +42 -0
- package/dist/esm/bs-radio.entry.js +47 -0
- package/dist/esm/bs-slider.entry.js +189 -0
- package/dist/esm/bs-source-link.entry.js +3 -3
- package/dist/esm/bs-switch.entry.js +55 -0
- package/dist/esm/bs-tab.entry.js +78 -0
- package/dist/esm/bs-tabs.entry.js +37 -0
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/{index-nLORuTUY.js → index-DST5-cTx.js} +74 -2
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-attachment/bs-attachment.d.ts +3 -9
- package/dist/types/components/bs-button/{bs-button.d.ts → bs-button/bs-button.d.ts} +5 -0
- package/dist/types/components/bs-button/{bs-button.stories.d.ts → bs-button/bs-button.stories.d.ts} +0 -2
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +51 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.stories.d.ts +16 -0
- package/dist/types/components/bs-button-skeleton/bs-button-skeleton.d.ts +1 -1
- package/dist/types/components/bs-button-skeleton/bs-button-skeleton.stories.d.ts +1 -1
- package/dist/types/components/bs-checkbox/bs-checkbox.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +64 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.stories.d.ts +23 -0
- package/dist/types/components/bs-composer/bs-composer.d.ts +26 -2
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +14 -0
- package/dist/types/components/bs-logo/brandsync-logo-full-dark.d.ts +1 -0
- package/dist/types/components/bs-logo/brandsync-logo-full-light.d.ts +1 -0
- package/dist/types/components/bs-logo/brandsync-logo-mark.d.ts +1 -0
- package/dist/types/components/bs-logo/bs-logo.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-logo/bs-logo.d.ts +73 -0
- package/dist/types/components/bs-logo/bs-logo.stories.d.ts +17 -0
- package/dist/types/components/bs-radio/bs-radio.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-radio/bs-radio.d.ts +45 -0
- package/dist/types/components/bs-radio/bs-radio.stories.d.ts +16 -0
- package/dist/types/components/bs-slider/bs-slider.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-slider/bs-slider.d.ts +109 -0
- package/dist/types/components/bs-slider/bs-slider.stories.d.ts +24 -0
- package/dist/types/components/bs-switch/bs-switch.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-switch/bs-switch.d.ts +45 -0
- package/dist/types/components/bs-switch/bs-switch.stories.d.ts +17 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.d.ts +65 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.d.ts +22 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +74 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.stories.d.ts +30 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.d.ts +45 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.stories.d.ts +13 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.d.ts +1 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +96 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +16 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.d.ts +1 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.d.ts +103 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.d.ts +20 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.d.ts +1 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.d.ts +60 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.d.ts +21 -0
- package/dist/types/components.d.ts +1973 -49
- package/package.json +1 -1
- package/dist/brandsync-wc/p-0d64ea40.entry.js +0 -1
- package/dist/brandsync-wc/p-16a54578.entry.js +0 -1
- package/dist/brandsync-wc/p-bc72439a.entry.js +0 -1
- package/dist/brandsync-wc/p-dad4a92c.entry.js +0 -1
- package/dist/brandsync-wc/p-eb4d87f0.entry.js +0 -1
- /package/dist/types/components/bs-button/{bs-button.cmp.test.d.ts → bs-button/bs-button.cmp.test.d.ts} +0 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A single radio button with its label, for one mutually-exclusive choice within a group.
|
|
4
|
+
*
|
|
5
|
+
* ## When to use
|
|
6
|
+
* - One option within a set of mutually-exclusive choices, where all options should stay visible
|
|
7
|
+
* (a radio group).
|
|
8
|
+
*
|
|
9
|
+
* ## When not to use
|
|
10
|
+
* - An independent, non-exclusive binary choice, or one item in a set of independent choices --
|
|
11
|
+
* use `bs-checkbox` instead.
|
|
12
|
+
* - An on/off setting that takes effect immediately (no explicit form submission) -- use `bs-switch`.
|
|
13
|
+
*
|
|
14
|
+
* @slot - Default slot: the label text.
|
|
15
|
+
* @part circle - The visual radio ring.
|
|
16
|
+
* @part dot - The center fill shown inside the ring when `checked`.
|
|
17
|
+
* @part label - The label text wrapper.
|
|
18
|
+
*/
|
|
19
|
+
// Note: this component's CSS Custom Properties (--bs-radio-*) are documented via @prop comments
|
|
20
|
+
// in bs-radio.css, not here -- Stencil's docs generator only parses @prop out of CSS file
|
|
21
|
+
// comments, not the class-level JSDoc (see bs-checkbox.tsx's equivalent note).
|
|
22
|
+
export class BsRadio {
|
|
23
|
+
el;
|
|
24
|
+
/** The native radio input's `name` attribute. Passed straight through to the native input inside.
|
|
25
|
+
* NOTE: because each `bs-radio` renders its own shadow root, native `<input type="radio">`
|
|
26
|
+
* mutual-exclusion grouping (which the HTML spec scopes to a single DOM tree) does NOT extend
|
|
27
|
+
* across separate `bs-radio` instances sharing the same `name` -- checking one will not natively
|
|
28
|
+
* uncheck another. Within a single instance this still behaves like a normal radio input. See
|
|
29
|
+
* bs-radio.mdx's Accessibility section for this known gap; consumers building a group currently
|
|
30
|
+
* need to manage mutual exclusivity themselves (e.g. via `bsChange`) until a `bs-radio-group`
|
|
31
|
+
* wrapper exists. */
|
|
32
|
+
name;
|
|
33
|
+
/** The native radio input's `value` attribute -- read from `event.target.value`, or used when
|
|
34
|
+
* wiring the group up to a form. */
|
|
35
|
+
value;
|
|
36
|
+
/** Whether the radio is checked. Mutable so clicking the label/input sets it directly. */
|
|
37
|
+
checked = false;
|
|
38
|
+
/** Disables the radio: sets the native `disabled` attribute, suppresses hover/focus styling, and
|
|
39
|
+
* prevents toggling. */
|
|
40
|
+
disabled = false;
|
|
41
|
+
/** Emitted with this radio's own `value` when it becomes checked via user interaction. Since
|
|
42
|
+
* native same-`name` grouping doesn't cross shadow-root boundaries (see the `name` prop's doc),
|
|
43
|
+
* a consumer wiring up a group of `bs-radio`s must itself set `checked = false` on the others in
|
|
44
|
+
* response to this event -- there's no automatic un-checking to rely on here. */
|
|
45
|
+
bsChange;
|
|
46
|
+
onChange = (ev) => {
|
|
47
|
+
const checked = ev.target.checked;
|
|
48
|
+
this.checked = checked;
|
|
49
|
+
if (checked) {
|
|
50
|
+
this.bsChange.emit(this.value);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
render() {
|
|
54
|
+
return (h("label", { key: 'da5cdc3a3661ed9d2f10741e46f87cc9beb9dbfd', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: '431a861dbbd5ea993272714e5c366eaea3a0bd8d', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("span", { key: '525d9b9d3d980a70af93a7ee800043ce0ba8d98e', class: "bs-radio__hit-area" }, h("span", { key: '8c19cc4f2eb771fe82d4cb20376563b61da0f69e', class: "bs-radio__state-layer" }, h("span", { key: '33829a5a6c179a8bc3289f4a25fe65ddbcce5c96', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: '36fc0fa7d46a6bd32879c83a3d084afb282fd39d', part: "dot", class: "bs-radio__dot" })))), h("span", { key: 'efc3e222bae86289767794a23ede57b349567238', part: "label", class: "bs-radio__label" }, h("slot", { key: 'd4842d16ecade0d79572bf53a37549f017f846dd' }))));
|
|
55
|
+
}
|
|
56
|
+
static get is() { return "bs-radio"; }
|
|
57
|
+
static get encapsulation() { return "shadow"; }
|
|
58
|
+
static get delegatesFocus() { return true; }
|
|
59
|
+
static get originalStyleUrls() {
|
|
60
|
+
return {
|
|
61
|
+
"$": ["bs-radio.css"]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static get styleUrls() {
|
|
65
|
+
return {
|
|
66
|
+
"$": ["bs-radio.css"]
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get properties() {
|
|
70
|
+
return {
|
|
71
|
+
"name": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"mutable": false,
|
|
74
|
+
"complexType": {
|
|
75
|
+
"original": "string",
|
|
76
|
+
"resolved": "string",
|
|
77
|
+
"references": {}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": "The native radio input's `name` attribute. Passed straight through to the native input inside.\nNOTE: because each `bs-radio` renders its own shadow root, native `<input type=\"radio\">`\nmutual-exclusion grouping (which the HTML spec scopes to a single DOM tree) does NOT extend\nacross separate `bs-radio` instances sharing the same `name` -- checking one will not natively\nuncheck another. Within a single instance this still behaves like a normal radio input. See\nbs-radio.mdx's Accessibility section for this known gap; consumers building a group currently\nneed to manage mutual exclusivity themselves (e.g. via `bsChange`) until a `bs-radio-group`\nwrapper exists."
|
|
84
|
+
},
|
|
85
|
+
"getter": false,
|
|
86
|
+
"setter": false,
|
|
87
|
+
"reflect": false,
|
|
88
|
+
"attribute": "name"
|
|
89
|
+
},
|
|
90
|
+
"value": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "string",
|
|
95
|
+
"resolved": "string",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": false,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": "The native radio input's `value` attribute -- read from `event.target.value`, or used when\nwiring the group up to a form."
|
|
103
|
+
},
|
|
104
|
+
"getter": false,
|
|
105
|
+
"setter": false,
|
|
106
|
+
"reflect": false,
|
|
107
|
+
"attribute": "value"
|
|
108
|
+
},
|
|
109
|
+
"checked": {
|
|
110
|
+
"type": "boolean",
|
|
111
|
+
"mutable": true,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "boolean",
|
|
114
|
+
"resolved": "boolean",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Whether the radio is checked. Mutable so clicking the label/input sets it directly."
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"reflect": true,
|
|
126
|
+
"attribute": "checked",
|
|
127
|
+
"defaultValue": "false"
|
|
128
|
+
},
|
|
129
|
+
"disabled": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "boolean",
|
|
134
|
+
"resolved": "boolean",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": false,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": "Disables the radio: sets the native `disabled` attribute, suppresses hover/focus styling, and\nprevents toggling."
|
|
142
|
+
},
|
|
143
|
+
"getter": false,
|
|
144
|
+
"setter": false,
|
|
145
|
+
"reflect": false,
|
|
146
|
+
"attribute": "disabled",
|
|
147
|
+
"defaultValue": "false"
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
static get events() {
|
|
152
|
+
return [{
|
|
153
|
+
"method": "bsChange",
|
|
154
|
+
"name": "bsChange",
|
|
155
|
+
"bubbles": true,
|
|
156
|
+
"cancelable": true,
|
|
157
|
+
"composed": true,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": "Emitted with this radio's own `value` when it becomes checked via user interaction. Since\nnative same-`name` grouping doesn't cross shadow-root boundaries (see the `name` prop's doc),\na consumer wiring up a group of `bs-radio`s must itself set `checked = false` on the others in\nresponse to this event -- there's no automatic un-checking to rely on here."
|
|
161
|
+
},
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "string",
|
|
164
|
+
"resolved": "string",
|
|
165
|
+
"references": {}
|
|
166
|
+
}
|
|
167
|
+
}];
|
|
168
|
+
}
|
|
169
|
+
static get elementRef() { return "el"; }
|
|
170
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Components/bs-radio',
|
|
5
|
+
parameters: { docs: { description: { component: componentDescription('bs-radio') } } },
|
|
6
|
+
render: args => html `
|
|
7
|
+
<bs-radio name=${args.name} value=${args.value} ?checked=${args.checked} ?disabled=${args.disabled}>
|
|
8
|
+
${args.label}
|
|
9
|
+
</bs-radio>
|
|
10
|
+
`,
|
|
11
|
+
argTypes: {
|
|
12
|
+
name: { control: 'text', description: propDescription('bs-radio', 'name') },
|
|
13
|
+
value: { control: 'text', description: propDescription('bs-radio', 'value') },
|
|
14
|
+
checked: { control: 'boolean', description: propDescription('bs-radio', 'checked') },
|
|
15
|
+
disabled: { control: 'boolean', description: propDescription('bs-radio', 'disabled') },
|
|
16
|
+
label: { control: 'text' },
|
|
17
|
+
},
|
|
18
|
+
args: {
|
|
19
|
+
name: 'default-group',
|
|
20
|
+
value: 'option-1',
|
|
21
|
+
checked: false,
|
|
22
|
+
disabled: false,
|
|
23
|
+
label: 'Option 1',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
export const Default = {};
|
|
28
|
+
export const Checked = {
|
|
29
|
+
args: { checked: true },
|
|
30
|
+
};
|
|
31
|
+
export const Disabled = {
|
|
32
|
+
args: { disabled: true },
|
|
33
|
+
};
|
|
34
|
+
export const DisabledChecked = {
|
|
35
|
+
name: 'Disabled + checked',
|
|
36
|
+
args: { disabled: true, checked: true },
|
|
37
|
+
};
|
|
38
|
+
// Native same-name radio grouping doesn't extend across separate <bs-radio> instances (each has
|
|
39
|
+
// its own shadow root -- see bs-radio.mdx's Accessibility section), so this story manages mutual
|
|
40
|
+
// exclusivity itself by listening for bsChange and unchecking the siblings.
|
|
41
|
+
const onGroupChange = (ev) => {
|
|
42
|
+
const group = ev.target.closest('[data-radio-group]');
|
|
43
|
+
group?.querySelectorAll('bs-radio').forEach(radio => {
|
|
44
|
+
radio.checked = radio === ev.target;
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
export const Group = {
|
|
48
|
+
name: 'Radio group',
|
|
49
|
+
render: () => html `
|
|
50
|
+
<div data-radio-group style="display: flex; flex-direction: column; gap: 8px;" @bsChange=${onGroupChange}>
|
|
51
|
+
<bs-radio name="group-story" value="option-1" checked>Option 1</bs-radio>
|
|
52
|
+
<bs-radio name="group-story" value="option-2">Option 2</bs-radio>
|
|
53
|
+
<bs-radio name="group-story" value="option-3">Option 3</bs-radio>
|
|
54
|
+
</div>
|
|
55
|
+
`,
|
|
56
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-slider', () => {
|
|
3
|
+
it('renders a native range input by default with the given value/min/max', async () => {
|
|
4
|
+
const { root } = await render(h("bs-slider", { min: 0, max: 100, value: 40 }));
|
|
5
|
+
const input = root.shadowRoot.querySelector('input[type="range"]');
|
|
6
|
+
expect(input).not.toBeNull();
|
|
7
|
+
expect(input.value).toBe('40');
|
|
8
|
+
expect(input).toEqualAttribute('min', '0');
|
|
9
|
+
expect(input).toEqualAttribute('max', '100');
|
|
10
|
+
});
|
|
11
|
+
it('renders the label and one editable percentage field when showLabel is true (default)', async () => {
|
|
12
|
+
const { root } = await render(h("bs-slider", { label: "Volume", value: 20 }));
|
|
13
|
+
expect(root.shadowRoot.querySelector('[part="label"]').textContent).toBe('Volume');
|
|
14
|
+
expect(root.shadowRoot.querySelectorAll('[part="field"]').length).toBe(1);
|
|
15
|
+
});
|
|
16
|
+
it('renders static min/max bound labels flanking the track when showLabel is true', async () => {
|
|
17
|
+
const { root } = await render(h("bs-slider", { min: 0, max: 100, value: 20 }));
|
|
18
|
+
const bounds = root.shadowRoot.querySelectorAll('[part="bound"]');
|
|
19
|
+
expect(bounds.length).toBe(2);
|
|
20
|
+
expect(bounds[0].textContent).toBe('0');
|
|
21
|
+
expect(bounds[1].textContent).toBe('100');
|
|
22
|
+
});
|
|
23
|
+
describe('accessible name', () => {
|
|
24
|
+
it('associates the range input with the visible "Label" text via aria-labelledby when no ariaLabel is set', async () => {
|
|
25
|
+
const { root } = await render(h("bs-slider", { label: "Volume", value: 20 }));
|
|
26
|
+
const input = root.shadowRoot.querySelector('input[type="range"]');
|
|
27
|
+
const labelId = input.getAttribute('aria-labelledby');
|
|
28
|
+
expect(labelId).not.toBeNull();
|
|
29
|
+
expect(root.shadowRoot.getElementById(labelId).textContent).toBe('Volume');
|
|
30
|
+
expect(input.getAttribute('aria-label')).toBeNull();
|
|
31
|
+
});
|
|
32
|
+
it('prefers an explicit ariaLabel over the visible label text', async () => {
|
|
33
|
+
const { root } = await render(h("bs-slider", { label: "Volume", ariaLabel: "Custom name", value: 20 }));
|
|
34
|
+
const input = root.shadowRoot.querySelector('input[type="range"]');
|
|
35
|
+
expect(input.getAttribute('aria-label')).toBe('Custom name');
|
|
36
|
+
expect(input.getAttribute('aria-labelledby')).toBeNull();
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
it('renders no label, value field, or bounds when showLabel is false', async () => {
|
|
40
|
+
const { root } = await render(h("bs-slider", { showLabel: false }));
|
|
41
|
+
expect(root.shadowRoot.querySelector('[part="label"]')).toBeNull();
|
|
42
|
+
expect(root.shadowRoot.querySelectorAll('[part="field"]').length).toBe(0);
|
|
43
|
+
expect(root.shadowRoot.querySelectorAll('[part="bound"]').length).toBe(0);
|
|
44
|
+
});
|
|
45
|
+
describe('value clamping', () => {
|
|
46
|
+
it('clamps a percentage entered in the value field above 100 down to max', async () => {
|
|
47
|
+
const { root, waitForChanges } = await render(h("bs-slider", { min: 0, max: 100, value: 40 }));
|
|
48
|
+
const valueField = root.shadowRoot.querySelector('[part="field"] input');
|
|
49
|
+
valueField.value = '999';
|
|
50
|
+
valueField.dispatchEvent(new Event('change'));
|
|
51
|
+
await waitForChanges();
|
|
52
|
+
const rangeInput = root.shadowRoot.querySelector('input[type="range"]');
|
|
53
|
+
expect(rangeInput.value).toBe('100');
|
|
54
|
+
});
|
|
55
|
+
it('clamps a percentage entered in the value field below 0 up to min', async () => {
|
|
56
|
+
const { root, waitForChanges } = await render(h("bs-slider", { min: 10, max: 100, value: 40 }));
|
|
57
|
+
const valueField = root.shadowRoot.querySelector('[part="field"] input');
|
|
58
|
+
valueField.value = '-50';
|
|
59
|
+
valueField.dispatchEvent(new Event('change'));
|
|
60
|
+
await waitForChanges();
|
|
61
|
+
const rangeInput = root.shadowRoot.querySelector('input[type="range"]');
|
|
62
|
+
expect(rangeInput.value).toBe('10');
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
it('fires bsChange with the new value when the range input changes', async () => {
|
|
66
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-slider", { min: 0, max: 100, value: 10 }));
|
|
67
|
+
const bsChangeSpy = spyOnEvent('bsChange');
|
|
68
|
+
const input = root.shadowRoot.querySelector('input[type="range"]');
|
|
69
|
+
input.value = '55';
|
|
70
|
+
input.dispatchEvent(new Event('change'));
|
|
71
|
+
await waitForChanges();
|
|
72
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(1);
|
|
73
|
+
expect(bsChangeSpy).toHaveReceivedEventDetail(55);
|
|
74
|
+
});
|
|
75
|
+
describe('disabled', () => {
|
|
76
|
+
it('sets the disabled attribute on the range input and value fields', async () => {
|
|
77
|
+
const { root } = await render(h("bs-slider", { disabled: true }));
|
|
78
|
+
const input = root.shadowRoot.querySelector('input[type="range"]');
|
|
79
|
+
expect(input).toHaveAttribute('disabled');
|
|
80
|
+
root.shadowRoot.querySelectorAll('[part="field"] input').forEach(field => {
|
|
81
|
+
expect(field).toHaveAttribute('disabled');
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
it('prevents value changes via the range input', async () => {
|
|
85
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-slider", { disabled: true, value: 10 }));
|
|
86
|
+
const bsChangeSpy = spyOnEvent('bsChange');
|
|
87
|
+
const input = root.shadowRoot.querySelector('input[type="range"]');
|
|
88
|
+
input.value = '90';
|
|
89
|
+
input.dispatchEvent(new Event('change'));
|
|
90
|
+
await waitForChanges();
|
|
91
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(0);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
describe('type="range"', () => {
|
|
95
|
+
it('renders two range inputs for the start/end thumbs', async () => {
|
|
96
|
+
const { root } = await render(h("bs-slider", { type: "range", min: 0, max: 100, valueStart: 20, valueEnd: 80 }));
|
|
97
|
+
const inputs = root.shadowRoot.querySelectorAll('input[type="range"]');
|
|
98
|
+
expect(inputs.length).toBe(2);
|
|
99
|
+
expect(inputs[0].value).toBe('20');
|
|
100
|
+
expect(inputs[1].value).toBe('80');
|
|
101
|
+
});
|
|
102
|
+
it('fires bsRangeChange when the start thumb changes, clamped to not exceed the end value', async () => {
|
|
103
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-slider", { type: "range", min: 0, max: 100, valueStart: 20, valueEnd: 80 }));
|
|
104
|
+
const bsRangeChangeSpy = spyOnEvent('bsRangeChange');
|
|
105
|
+
const inputs = root.shadowRoot.querySelectorAll('input[type="range"]');
|
|
106
|
+
const startInput = inputs[0];
|
|
107
|
+
startInput.value = '95';
|
|
108
|
+
startInput.dispatchEvent(new Event('change'));
|
|
109
|
+
await waitForChanges();
|
|
110
|
+
expect(bsRangeChangeSpy).toHaveReceivedEventTimes(1);
|
|
111
|
+
expect(bsRangeChangeSpy).toHaveReceivedEventDetail({ start: 80, end: 80 });
|
|
112
|
+
});
|
|
113
|
+
it('fires bsRangeChange when the end thumb changes, clamped to not go below the start value', async () => {
|
|
114
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-slider", { type: "range", min: 0, max: 100, valueStart: 20, valueEnd: 80 }));
|
|
115
|
+
const bsRangeChangeSpy = spyOnEvent('bsRangeChange');
|
|
116
|
+
const inputs = root.shadowRoot.querySelectorAll('input[type="range"]');
|
|
117
|
+
const endInput = inputs[1];
|
|
118
|
+
endInput.value = '5';
|
|
119
|
+
endInput.dispatchEvent(new Event('change'));
|
|
120
|
+
await waitForChanges();
|
|
121
|
+
expect(bsRangeChangeSpy).toHaveReceivedEventTimes(1);
|
|
122
|
+
expect(bsRangeChangeSpy).toHaveReceivedEventDetail({ start: 20, end: 20 });
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
describe('type="segmented"', () => {
|
|
126
|
+
it('renders segments + 1 tick marks, with the first hidden', async () => {
|
|
127
|
+
const { root } = await render(h("bs-slider", { type: "segmented", segments: 5 }));
|
|
128
|
+
const ticks = root.shadowRoot.querySelectorAll('.bs-slider__tick');
|
|
129
|
+
expect(ticks.length).toBe(6);
|
|
130
|
+
expect(ticks[0]).toHaveClass('bs-slider__tick--hidden');
|
|
131
|
+
expect(ticks[1]).not.toHaveClass('bs-slider__tick--hidden');
|
|
132
|
+
});
|
|
133
|
+
it('derives the range input step from (max - min) / segments', async () => {
|
|
134
|
+
const { root } = await render(h("bs-slider", { type: "segmented", min: 0, max: 100, segments: 4 }));
|
|
135
|
+
const input = root.shadowRoot.querySelector('input[type="range"]');
|
|
136
|
+
expect(input).toEqualAttribute('step', '25');
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
});
|