@brandsync/wc 0.0.11 → 0.1.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 +5869 -1633
- package/dist/brandsync-wc/brandsync-wc.css +20 -0
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-00bb9bda.entry.js +1 -0
- package/dist/brandsync-wc/{p-8dff4f24.entry.js → p-0847f5c0.entry.js} +1 -1
- package/dist/brandsync-wc/p-0ba35c3b.entry.js +1 -0
- package/dist/brandsync-wc/{p-073e5fee.entry.js → p-0f3cb0c4.entry.js} +1 -1
- package/dist/brandsync-wc/p-10f6f3cd.entry.js +1 -0
- package/dist/brandsync-wc/{p-c6d330c3.entry.js → p-111974df.entry.js} +1 -1
- package/dist/brandsync-wc/p-11f3fceb.entry.js +1 -0
- package/dist/brandsync-wc/p-171fed0c.entry.js +1 -0
- package/dist/brandsync-wc/{p-dd224cb3.entry.js → p-18813680.entry.js} +1 -1
- package/dist/brandsync-wc/p-1b7c9928.entry.js +1 -0
- package/dist/brandsync-wc/p-1ce7dd64.entry.js +1 -0
- package/dist/brandsync-wc/p-2063a6d6.entry.js +1 -0
- package/dist/brandsync-wc/{p-4ca15322.entry.js → p-20c24179.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b174403d.entry.js → p-321ed4d3.entry.js} +1 -1
- package/dist/brandsync-wc/p-38aad266.entry.js +1 -0
- package/dist/brandsync-wc/p-43e37883.entry.js +1 -0
- package/dist/brandsync-wc/p-55a8d4b5.entry.js +1 -0
- package/dist/brandsync-wc/p-59ac2495.entry.js +1 -0
- package/dist/brandsync-wc/p-5ae9e60e.entry.js +1 -0
- package/dist/brandsync-wc/p-6b469b2d.entry.js +1 -0
- package/dist/brandsync-wc/p-6d85fba4.entry.js +1 -0
- package/dist/brandsync-wc/p-6e95eb36.entry.js +1 -0
- package/dist/brandsync-wc/{p-84ae4420.entry.js → p-73217b90.entry.js} +1 -1
- package/dist/brandsync-wc/p-752c04c8.entry.js +1 -0
- package/dist/brandsync-wc/p-79af762c.entry.js +1 -0
- package/dist/brandsync-wc/p-81d49240.entry.js +1 -0
- package/dist/brandsync-wc/p-91551e7b.entry.js +1 -0
- package/dist/brandsync-wc/p-917a5bbc.entry.js +1 -0
- package/dist/brandsync-wc/{p-0b858120.entry.js → p-9876e83c.entry.js} +1 -1
- package/dist/brandsync-wc/p-9bcd99aa.entry.js +1 -0
- package/dist/brandsync-wc/{p-d1dc2ced.entry.js → p-9c4768aa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-DP_bvuvB.js → p-Do3l4of3.js} +2 -2
- package/dist/brandsync-wc/p-aa43d478.entry.js +1 -0
- package/dist/brandsync-wc/p-c3079ad7.entry.js +1 -0
- package/dist/brandsync-wc/{p-74a4dd91.entry.js → p-c3c383dc.entry.js} +1 -1
- package/dist/brandsync-wc/p-cc79e75f.entry.js +1 -0
- package/dist/brandsync-wc/p-ce7fc368.entry.js +1 -0
- package/dist/brandsync-wc/{p-030a8ba7.entry.js → p-d3265e70.entry.js} +1 -1
- package/dist/brandsync-wc/p-d55bbcec.entry.js +1 -0
- package/dist/brandsync-wc/{p-1bf0b2d5.entry.js → p-e93e944b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7a605d98.entry.js → p-eb04c578.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3c8fbaa8.entry.js → p-f0ae2740.entry.js} +1 -1
- package/dist/brandsync-wc/p-f4f22015.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-avatar.cjs.entry.js +60 -0
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +56 -0
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +33 -0
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +49 -0
- 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 +10 -3
- 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-skeleton.cjs.entry.js +20 -0
- package/dist/cjs/bs-checkbox.cjs.entry.js +14 -3
- 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-dialog.cjs.entry.js +110 -0
- 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 +24 -12
- package/dist/cjs/bs-logo.cjs.entry.js +165 -0
- package/dist/cjs/{bs-menu_2.cjs.entry.js → bs-menu-item.cjs.entry.js} +2 -15
- package/dist/cjs/bs-menu.cjs.entry.js +17 -0
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +104 -0
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +87 -0
- package/dist/cjs/bs-navigation-header.cjs.entry.js +44 -0
- package/dist/cjs/bs-pagination.cjs.entry.js +85 -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-snackbar.cjs.entry.js +41 -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-CGrdFg95.js → index-DHVw-IPK.js} +2 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +21 -3
- 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-avatar/bs-avatar.cmp.test.js +54 -0
- package/dist/collection/components/bs-avatar/bs-avatar.css +197 -0
- package/dist/collection/components/bs-avatar/bs-avatar.js +251 -0
- package/dist/collection/components/bs-avatar/bs-avatar.stories.js +67 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.js +62 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.css +93 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +130 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.js +118 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.css +125 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +192 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.cmp.test.js +58 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.css +18 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +129 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.stories.js +84 -0
- 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-card/bs-card.cmp.test.js +19 -0
- package/dist/collection/components/bs-card/bs-card.css +37 -5
- package/dist/collection/components/bs-card/bs-card.js +18 -2
- package/dist/collection/components/bs-card/bs-card.stories.js +17 -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.css +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.cmp.test.js +23 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.css +64 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +81 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.stories.js +25 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.cmp.test.js +10 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.css +7 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +32 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.stories.js +12 -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-modal/bs-modal.cmp.test.js → bs-dialog/bs-dialog.cmp.test.js} +63 -19
- package/dist/collection/components/bs-dialog/bs-dialog.css +130 -0
- package/dist/collection/components/bs-dialog/bs-dialog.js +273 -0
- package/dist/collection/components/bs-dialog/bs-dialog.stories.js +115 -0
- package/dist/collection/components/bs-input/bs-input.cmp.test.js +20 -0
- package/dist/collection/components/bs-input/bs-input.css +80 -2
- package/dist/collection/components/bs-input/bs-input.js +28 -10
- package/dist/collection/components/bs-input/bs-input.stories.js +14 -11
- 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-pagination/bs-pagination.cmp.test.js +102 -0
- package/dist/collection/components/bs-pagination/bs-pagination.css +120 -0
- package/dist/collection/components/bs-pagination/bs-pagination.js +233 -0
- package/dist/collection/components/bs-pagination/bs-pagination.stories.js +43 -0
- 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-snackbar/bs-snackbar.cmp.test.js +77 -0
- package/dist/collection/components/bs-snackbar/bs-snackbar.css +321 -0
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +172 -0
- package/dist/collection/components/bs-snackbar/bs-snackbar.stories.js +59 -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 +143 -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 +281 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +274 -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 +446 -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-avatar.d.ts +11 -0
- package/dist/components/bs-avatar.js +1 -0
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.d.ts +11 -0
- package/dist/components/bs-breadcrumb-overflow.js +1 -0
- package/dist/components/bs-breadcrumb.d.ts +11 -0
- package/dist/components/bs-breadcrumb.js +1 -0
- package/dist/components/bs-breadcrumbs.d.ts +11 -0
- package/dist/components/bs-breadcrumbs.js +1 -0
- 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-skeleton.d.ts +11 -0
- package/dist/components/bs-checkbox-skeleton.js +1 -0
- package/dist/components/bs-checkbox.js +1 -1
- 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-dialog.d.ts +11 -0
- package/dist/components/bs-dialog.js +1 -0
- 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-modal.d.ts → bs-logo.d.ts} +4 -4
- 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-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-pagination.d.ts +11 -0
- package/dist/components/bs-pagination.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-snackbar.d.ts +11 -0
- package/dist/components/bs-snackbar.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-BFcVSpES.js +1 -0
- package/dist/components/{p-D1cYtKyN.js → p-BJZYe7M4.js} +1 -1
- package/dist/components/p-BKaZWFE1.js +1 -0
- package/dist/components/{p-BUbGEXL7.js → p-BtX5URLk.js} +1 -1
- package/dist/components/{p-B9PrXIl_.js → p-CgaPcyEJ.js} +1 -1
- package/dist/components/{p-D2HDHZjz.js → p-qK1XlpTA.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-avatar.entry.js +58 -0
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +54 -0
- package/dist/esm/bs-breadcrumb.entry.js +31 -0
- package/dist/esm/bs-breadcrumbs.entry.js +47 -0
- 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 +10 -3
- 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-skeleton.entry.js +18 -0
- package/dist/esm/bs-checkbox.entry.js +14 -3
- 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-dialog.entry.js +108 -0
- 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 +24 -12
- package/dist/esm/bs-logo.entry.js +163 -0
- package/dist/esm/{bs-menu_2.entry.js → bs-menu-item.entry.js} +3 -15
- package/dist/esm/bs-menu.entry.js +15 -0
- package/dist/esm/bs-navigation-drawer-item.entry.js +102 -0
- package/dist/esm/bs-navigation-drawer.entry.js +85 -0
- package/dist/esm/bs-navigation-header.entry.js +42 -0
- package/dist/esm/bs-pagination.entry.js +83 -0
- package/dist/esm/bs-radio.entry.js +47 -0
- package/dist/esm/bs-slider.entry.js +189 -0
- package/dist/esm/bs-snackbar.entry.js +39 -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-DP_bvuvB.js → index-Do3l4of3.js} +2 -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-avatar/bs-avatar.d.ts +67 -0
- package/dist/types/components/bs-avatar/bs-avatar.stories.d.ts +20 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.d.ts +44 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.d.ts +69 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.d.ts +45 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.stories.d.ts +14 -0
- package/dist/types/components/bs-button/bs-button/bs-button.cmp.test.d.ts +1 -0
- 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-card/bs-card.d.ts +10 -1
- package/dist/types/components/bs-card/bs-card.stories.d.ts +1 -0
- package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.d.ts +36 -0
- package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.stories.d.ts +10 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +11 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.stories.d.ts +1 -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-dialog/bs-dialog.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-dialog/bs-dialog.d.ts +74 -0
- package/dist/types/components/{bs-modal/bs-modal.stories.d.ts → bs-dialog/bs-dialog.stories.d.ts} +5 -3
- package/dist/types/components/bs-input/bs-input.d.ts +8 -1
- 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-pagination/bs-pagination.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-pagination/bs-pagination.d.ts +51 -0
- package/dist/types/components/bs-pagination/bs-pagination.stories.d.ts +14 -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-snackbar/bs-snackbar.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-snackbar/bs-snackbar.d.ts +51 -0
- package/dist/types/components/bs-snackbar/bs-snackbar.stories.d.ts +16 -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 +104 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +19 -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 +25 -0
- package/dist/types/components.d.ts +2908 -114
- package/package.json +1 -1
- package/dist/brandsync-wc/p-2598ca88.entry.js +0 -1
- package/dist/brandsync-wc/p-3dd9b814.entry.js +0 -1
- package/dist/brandsync-wc/p-41edb0a2.entry.js +0 -1
- package/dist/brandsync-wc/p-6254dcbe.entry.js +0 -1
- package/dist/brandsync-wc/p-7131d0a1.entry.js +0 -1
- package/dist/brandsync-wc/p-8c302968.entry.js +0 -1
- package/dist/brandsync-wc/p-8d78171b.entry.js +0 -1
- package/dist/brandsync-wc/p-93e44903.entry.js +0 -1
- package/dist/brandsync-wc/p-aa45d877.entry.js +0 -1
- package/dist/cjs/bs-modal.cjs.entry.js +0 -69
- package/dist/collection/components/bs-modal/bs-modal.css +0 -66
- package/dist/collection/components/bs-modal/bs-modal.js +0 -198
- package/dist/collection/components/bs-modal/bs-modal.stories.js +0 -38
- package/dist/components/bs-modal.js +0 -1
- package/dist/esm/bs-modal.entry.js +0 -67
- package/dist/types/components/bs-modal/bs-modal.d.ts +0 -45
- /package/dist/types/components/{bs-button/bs-button.cmp.test.d.ts → bs-avatar/bs-avatar.cmp.test.d.ts} +0 -0
- /package/dist/types/components/{bs-modal/bs-modal.cmp.test.d.ts → bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.d.ts} +0 -0
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-snackbar-radius: Corner radius of the bar. Aliased to --bs-border-radius-100.
|
|
3
|
+
* @prop --bs-snackbar-shadow: Elevation shadow, since a snackbar floats above page content. Aliased to --bs-shadow-md.
|
|
4
|
+
* @prop --bs-snackbar-gap: Gap between the content area and the actions area. Aliased to --bs-spacing-100.
|
|
5
|
+
* @prop --bs-snackbar-content-padding-y: Top/bottom padding of the content area. Aliased to --bs-spacing-200.
|
|
6
|
+
* @prop --bs-snackbar-content-padding-x: Left padding of the content area (the bar's own left edge). Aliased to --bs-spacing-200.
|
|
7
|
+
* @prop --bs-snackbar-content-gap: Gap between the icon and the message. Aliased to --bs-spacing-150.
|
|
8
|
+
* @prop --bs-snackbar-font-size: Message font size. Aliased to --bs-font-size-md.
|
|
9
|
+
* @prop --bs-snackbar-line-height: Message line height. Aliased to --bs-line-height-body-md.
|
|
10
|
+
* @prop --bs-snackbar-actions-padding-y: Top/bottom padding of the actions area. Aliased to --bs-spacing-50.
|
|
11
|
+
* @prop --bs-snackbar-actions-padding-x: Right padding of the actions area (the bar's own right edge). Aliased to --bs-spacing-100.
|
|
12
|
+
* @prop --bs-snackbar-actions-gap: Gap between the action button and the close button. Aliased to --bs-spacing-50.
|
|
13
|
+
* @prop --bs-snackbar-action-radius: Corner radius of the action button. Aliased to --bs-border-radius-100.
|
|
14
|
+
* @prop --bs-snackbar-action-font-size: Action button font size. Aliased to --bs-font-size-sm.
|
|
15
|
+
* @prop --bs-snackbar-action-font-weight: Action button font weight. Aliased to --bs-font-weight-medium.
|
|
16
|
+
* @prop --bs-snackbar-action-line-height: Action button line height. Aliased to --bs-line-height-body-sm.
|
|
17
|
+
* @prop --bs-snackbar-close-radius: Corner radius of the close button. Aliased to --bs-border-radius-100.
|
|
18
|
+
* @prop --bs-snackbar-surface-default: Bar background, variant="default". Aliased to --bs-snackbar-bg-default (brandsync-tokens).
|
|
19
|
+
* @prop --bs-snackbar-color-default: Icon/message/close color, variant="default". Aliased to --bs-snackbar-text-default (brandsync-tokens) -- named "-color-", not "-text-", solely to avoid colliding with that vendored token's own name.
|
|
20
|
+
* @prop --bs-snackbar-action-border-default: Action button border, variant="default" (outlined, not filled). Aliased to --bs-blue-300.
|
|
21
|
+
* @prop --bs-snackbar-action-text-default: Action button text, variant="default". Aliased to --bs-snackbar-action-text (brandsync-tokens).
|
|
22
|
+
* @prop --bs-snackbar-surface-info: Bar background, variant="info". Aliased to --bs-color-info-container.
|
|
23
|
+
* @prop --bs-snackbar-text-info: Icon/message/close color, variant="info". Aliased to --bs-text-info.
|
|
24
|
+
* @prop --bs-snackbar-action-bg-info: Action button background, variant="info". Aliased to --bs-snackbar-bg-info (brandsync-tokens).
|
|
25
|
+
* @prop --bs-snackbar-action-bg-info-hover: Action button background, variant="info", hover. Aliased to --bs-color-info-hover.
|
|
26
|
+
* @prop --bs-snackbar-action-bg-info-pressed: Action button background, variant="info", pressed. Aliased to --bs-color-info-pressed.
|
|
27
|
+
* @prop --bs-snackbar-surface-warning: Bar background, variant="warning". Aliased to --bs-color-warning-container.
|
|
28
|
+
* @prop --bs-snackbar-text-warning: Icon/message/close color, variant="warning". Aliased to --bs-text-warning.
|
|
29
|
+
* @prop --bs-snackbar-action-bg-warning: Action button background, variant="warning". Aliased to --bs-snackbar-bg-warning (brandsync-tokens).
|
|
30
|
+
* @prop --bs-snackbar-action-bg-warning-hover: Action button background, variant="warning", hover. Aliased to --bs-color-warning-hover.
|
|
31
|
+
* @prop --bs-snackbar-action-bg-warning-pressed: Action button background, variant="warning", pressed. Aliased to --bs-color-warning-pressed.
|
|
32
|
+
* @prop --bs-snackbar-surface-success: Bar background, variant="success". Aliased to --bs-color-success-container.
|
|
33
|
+
* @prop --bs-snackbar-text-success: Icon/message/close color, variant="success". Aliased to --bs-text-success.
|
|
34
|
+
* @prop --bs-snackbar-action-bg-success: Action button background, variant="success". Aliased to --bs-snackbar-bg-success (brandsync-tokens).
|
|
35
|
+
* @prop --bs-snackbar-action-bg-success-hover: Action button background, variant="success", hover. Aliased to --bs-color-success-hover.
|
|
36
|
+
* @prop --bs-snackbar-action-bg-success-pressed: Action button background, variant="success", pressed. Aliased to --bs-color-success-pressed.
|
|
37
|
+
* @prop --bs-snackbar-surface-error: Bar background, variant="error". Aliased to --bs-color-error-container.
|
|
38
|
+
* @prop --bs-snackbar-text-error: Icon/message/close color, variant="error". Aliased to --bs-text-error.
|
|
39
|
+
* @prop --bs-snackbar-action-bg-error: Action button background, variant="error". Aliased to --bs-snackbar-bg-error (brandsync-tokens).
|
|
40
|
+
* @prop --bs-snackbar-action-bg-error-hover: Action button background, variant="error", hover. Aliased to --bs-color-error-hover.
|
|
41
|
+
* @prop --bs-snackbar-action-bg-error-pressed: Action button background, variant="error", pressed. Aliased to --bs-color-error-pressed.
|
|
42
|
+
* @prop --bs-snackbar-action-text-on-action: Action button text, every colored (filled) variant. Aliased to --bs-text-on-action.
|
|
43
|
+
* @prop --bs-snackbar-spinner-track: Loading spinner's background ring. Aliased to --bs-neutral-200.
|
|
44
|
+
*/
|
|
45
|
+
:host {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
|
|
48
|
+
--bs-snackbar-radius: var(--bs-border-radius-100);
|
|
49
|
+
--bs-snackbar-shadow: var(--bs-shadow-md);
|
|
50
|
+
--bs-snackbar-gap: var(--bs-spacing-100);
|
|
51
|
+
|
|
52
|
+
--bs-snackbar-content-padding-y: var(--bs-spacing-200);
|
|
53
|
+
--bs-snackbar-content-padding-x: var(--bs-spacing-200);
|
|
54
|
+
--bs-snackbar-content-gap: var(--bs-spacing-150);
|
|
55
|
+
--bs-snackbar-font-size: var(--bs-font-size-md);
|
|
56
|
+
--bs-snackbar-line-height: var(--bs-line-height-body-md);
|
|
57
|
+
|
|
58
|
+
--bs-snackbar-actions-padding-y: var(--bs-spacing-50);
|
|
59
|
+
--bs-snackbar-actions-padding-x: var(--bs-spacing-100);
|
|
60
|
+
--bs-snackbar-actions-gap: var(--bs-spacing-50);
|
|
61
|
+
|
|
62
|
+
--bs-snackbar-action-radius: var(--bs-border-radius-100);
|
|
63
|
+
--bs-snackbar-action-font-size: var(--bs-font-size-sm);
|
|
64
|
+
--bs-snackbar-action-font-weight: var(--bs-font-weight-medium);
|
|
65
|
+
--bs-snackbar-action-line-height: var(--bs-line-height-body-sm);
|
|
66
|
+
|
|
67
|
+
--bs-snackbar-close-radius: var(--bs-border-radius-100);
|
|
68
|
+
|
|
69
|
+
--bs-snackbar-surface-default: var(--bs-snackbar-bg-default);
|
|
70
|
+
/* Named "-color-", not "-text-", solely to avoid a self-referential cycle: the brandsync-tokens
|
|
71
|
+
vendored token is ALSO literally named --bs-snackbar-text-default, so declaring a property of
|
|
72
|
+
that same name here (even aliasing to the "outer" token via var()) creates a cyclic reference
|
|
73
|
+
per the CSS spec -- the property would compute to its initial value (nothing), not fall back
|
|
74
|
+
to the vendored one. */
|
|
75
|
+
--bs-snackbar-color-default: var(--bs-snackbar-text-default);
|
|
76
|
+
--bs-snackbar-action-border-default: var(--bs-blue-300);
|
|
77
|
+
--bs-snackbar-action-text-default: var(--bs-snackbar-action-text);
|
|
78
|
+
|
|
79
|
+
--bs-snackbar-surface-info: var(--bs-color-info-container);
|
|
80
|
+
--bs-snackbar-text-info: var(--bs-text-info);
|
|
81
|
+
--bs-snackbar-action-bg-info: var(--bs-snackbar-bg-info);
|
|
82
|
+
--bs-snackbar-action-bg-info-hover: var(--bs-color-info-hover);
|
|
83
|
+
--bs-snackbar-action-bg-info-pressed: var(--bs-color-info-pressed);
|
|
84
|
+
|
|
85
|
+
--bs-snackbar-surface-warning: var(--bs-color-warning-container);
|
|
86
|
+
--bs-snackbar-text-warning: var(--bs-text-warning);
|
|
87
|
+
--bs-snackbar-action-bg-warning: var(--bs-snackbar-bg-warning);
|
|
88
|
+
--bs-snackbar-action-bg-warning-hover: var(--bs-color-warning-hover);
|
|
89
|
+
--bs-snackbar-action-bg-warning-pressed: var(--bs-color-warning-pressed);
|
|
90
|
+
|
|
91
|
+
--bs-snackbar-surface-success: var(--bs-color-success-container);
|
|
92
|
+
--bs-snackbar-text-success: var(--bs-text-success);
|
|
93
|
+
--bs-snackbar-action-bg-success: var(--bs-snackbar-bg-success);
|
|
94
|
+
--bs-snackbar-action-bg-success-hover: var(--bs-color-success-hover);
|
|
95
|
+
--bs-snackbar-action-bg-success-pressed: var(--bs-color-success-pressed);
|
|
96
|
+
|
|
97
|
+
--bs-snackbar-surface-error: var(--bs-color-error-container);
|
|
98
|
+
--bs-snackbar-text-error: var(--bs-text-error);
|
|
99
|
+
--bs-snackbar-action-bg-error: var(--bs-snackbar-bg-error);
|
|
100
|
+
--bs-snackbar-action-bg-error-hover: var(--bs-color-error-hover);
|
|
101
|
+
--bs-snackbar-action-bg-error-pressed: var(--bs-color-error-pressed);
|
|
102
|
+
|
|
103
|
+
--bs-snackbar-action-text-on-action: var(--bs-text-on-action);
|
|
104
|
+
--bs-snackbar-spinner-track: var(--bs-neutral-200);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.bs-snackbar {
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
gap: var(--bs-snackbar-gap);
|
|
111
|
+
border-radius: var(--bs-snackbar-radius);
|
|
112
|
+
box-shadow: var(--bs-snackbar-shadow);
|
|
113
|
+
font-family: inherit;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Each variant sets its own surface/text pair -- .bs-snackbar__icon, .bs-snackbar__message, and
|
|
117
|
+
.bs-snackbar__close all inherit `color` from here rather than each redeclaring it. */
|
|
118
|
+
.bs-snackbar--default {
|
|
119
|
+
background: var(--bs-snackbar-surface-default);
|
|
120
|
+
color: var(--bs-snackbar-color-default);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.bs-snackbar--info {
|
|
124
|
+
background: var(--bs-snackbar-surface-info);
|
|
125
|
+
color: var(--bs-snackbar-text-info);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.bs-snackbar--warning {
|
|
129
|
+
background: var(--bs-snackbar-surface-warning);
|
|
130
|
+
color: var(--bs-snackbar-text-warning);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.bs-snackbar--success {
|
|
134
|
+
background: var(--bs-snackbar-surface-success);
|
|
135
|
+
color: var(--bs-snackbar-text-success);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.bs-snackbar--error {
|
|
139
|
+
background: var(--bs-snackbar-surface-error);
|
|
140
|
+
color: var(--bs-snackbar-text-error);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.bs-snackbar__content {
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
gap: var(--bs-snackbar-content-gap);
|
|
147
|
+
flex: 1 1 auto;
|
|
148
|
+
min-width: 0;
|
|
149
|
+
padding: var(--bs-snackbar-content-padding-y) 0 var(--bs-snackbar-content-padding-y) var(--bs-snackbar-content-padding-x);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.bs-snackbar__icon {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
width: 24px;
|
|
157
|
+
height: 24px;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
color: inherit;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.bs-snackbar__icon svg {
|
|
163
|
+
width: 24px;
|
|
164
|
+
height: 24px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* Same border-spin technique as bs-attachment's own upload spinner -- a light track ring plus one
|
|
168
|
+
accent-colored side, rotated. `color: inherit` means the accent automatically matches whatever
|
|
169
|
+
variant's text color is currently active, without a separate --bs-snackbar-spinner-accent prop. */
|
|
170
|
+
.bs-snackbar__spinner {
|
|
171
|
+
display: inline-block;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
width: 24px;
|
|
174
|
+
height: 24px;
|
|
175
|
+
border: 2px solid var(--bs-snackbar-spinner-track);
|
|
176
|
+
border-top-color: currentColor;
|
|
177
|
+
border-radius: 50%;
|
|
178
|
+
animation: bs-snackbar-spin 0.8s linear infinite;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@keyframes bs-snackbar-spin {
|
|
182
|
+
to {
|
|
183
|
+
transform: rotate(360deg);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@media (prefers-reduced-motion: reduce) {
|
|
188
|
+
.bs-snackbar__spinner {
|
|
189
|
+
animation: none;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.bs-snackbar__message {
|
|
194
|
+
flex: 1 1 auto;
|
|
195
|
+
min-width: 0;
|
|
196
|
+
font-size: var(--bs-snackbar-font-size);
|
|
197
|
+
line-height: calc(var(--bs-snackbar-line-height) * 1px);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.bs-snackbar__actions {
|
|
201
|
+
display: flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
align-self: stretch;
|
|
204
|
+
gap: var(--bs-snackbar-actions-gap);
|
|
205
|
+
flex-shrink: 0;
|
|
206
|
+
padding: var(--bs-snackbar-actions-padding-y) var(--bs-snackbar-actions-padding-x) var(--bs-snackbar-actions-padding-y) 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.bs-snackbar__action {
|
|
210
|
+
height: 32px;
|
|
211
|
+
padding: 0 var(--bs-spacing-150);
|
|
212
|
+
border-radius: var(--bs-snackbar-action-radius);
|
|
213
|
+
font-family: inherit;
|
|
214
|
+
font-size: var(--bs-snackbar-action-font-size);
|
|
215
|
+
font-weight: var(--bs-snackbar-action-font-weight);
|
|
216
|
+
line-height: calc(var(--bs-snackbar-action-line-height) * 1px);
|
|
217
|
+
white-space: nowrap;
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
border: none;
|
|
220
|
+
background: transparent;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/* default is the only variant whose action button is outlined (transparent, bordered) rather than
|
|
224
|
+
filled -- matches the Figma spec's dark neutral bar using a lighter bordered button instead of a
|
|
225
|
+
solid fill, since a solid fill would need its own distinct color unrelated to the bar's own dark
|
|
226
|
+
surface. */
|
|
227
|
+
.bs-snackbar--default .bs-snackbar__action {
|
|
228
|
+
border: 1px solid var(--bs-snackbar-action-border-default);
|
|
229
|
+
color: var(--bs-snackbar-action-text-default);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.bs-snackbar--info .bs-snackbar__action {
|
|
233
|
+
background: var(--bs-snackbar-action-bg-info);
|
|
234
|
+
color: var(--bs-snackbar-action-text-on-action);
|
|
235
|
+
}
|
|
236
|
+
.bs-snackbar--info .bs-snackbar__action:hover {
|
|
237
|
+
background: var(--bs-snackbar-action-bg-info-hover);
|
|
238
|
+
}
|
|
239
|
+
.bs-snackbar--info .bs-snackbar__action:active {
|
|
240
|
+
background: var(--bs-snackbar-action-bg-info-pressed);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.bs-snackbar--warning .bs-snackbar__action {
|
|
244
|
+
background: var(--bs-snackbar-action-bg-warning);
|
|
245
|
+
color: var(--bs-snackbar-action-text-on-action);
|
|
246
|
+
}
|
|
247
|
+
.bs-snackbar--warning .bs-snackbar__action:hover {
|
|
248
|
+
background: var(--bs-snackbar-action-bg-warning-hover);
|
|
249
|
+
}
|
|
250
|
+
.bs-snackbar--warning .bs-snackbar__action:active {
|
|
251
|
+
background: var(--bs-snackbar-action-bg-warning-pressed);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.bs-snackbar--success .bs-snackbar__action {
|
|
255
|
+
background: var(--bs-snackbar-action-bg-success);
|
|
256
|
+
color: var(--bs-snackbar-action-text-on-action);
|
|
257
|
+
}
|
|
258
|
+
.bs-snackbar--success .bs-snackbar__action:hover {
|
|
259
|
+
background: var(--bs-snackbar-action-bg-success-hover);
|
|
260
|
+
}
|
|
261
|
+
.bs-snackbar--success .bs-snackbar__action:active {
|
|
262
|
+
background: var(--bs-snackbar-action-bg-success-pressed);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.bs-snackbar--error .bs-snackbar__action {
|
|
266
|
+
background: var(--bs-snackbar-action-bg-error);
|
|
267
|
+
color: var(--bs-snackbar-action-text-on-action);
|
|
268
|
+
}
|
|
269
|
+
.bs-snackbar--error .bs-snackbar__action:hover {
|
|
270
|
+
background: var(--bs-snackbar-action-bg-error-hover);
|
|
271
|
+
}
|
|
272
|
+
.bs-snackbar--error .bs-snackbar__action:active {
|
|
273
|
+
background: var(--bs-snackbar-action-bg-error-pressed);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.bs-snackbar__close {
|
|
277
|
+
display: flex;
|
|
278
|
+
align-items: center;
|
|
279
|
+
justify-content: center;
|
|
280
|
+
width: 44px;
|
|
281
|
+
height: 44px;
|
|
282
|
+
flex-shrink: 0;
|
|
283
|
+
padding: 0;
|
|
284
|
+
border: none;
|
|
285
|
+
background: transparent;
|
|
286
|
+
border-radius: var(--bs-snackbar-close-radius);
|
|
287
|
+
color: inherit;
|
|
288
|
+
cursor: pointer;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.bs-snackbar__close svg {
|
|
292
|
+
width: 24px;
|
|
293
|
+
height: 24px;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* Hover/active feedback for the close button (every variant) and the default variant's outlined
|
|
297
|
+
action button -- both have a transparent background with only text/border color, so there's no
|
|
298
|
+
solid fill to darken the way the filled colored-variant action buttons above do. `opacity` was
|
|
299
|
+
tried here first and was wrong: dimming a transparent element's opacity blends it TOWARD
|
|
300
|
+
whatever's behind it, which on the light pastel info/warning/success/error surfaces made a
|
|
301
|
+
"pressed" dark-colored button look LIGHTER/washed-out -- backwards from a pressed state. A
|
|
302
|
+
`color-mix()` tint using `currentColor` fixes that (a real added tint, not a blend-toward-behind)
|
|
303
|
+
while still doing the right thing on the dark `default` surface, where content is white and a
|
|
304
|
+
light-tint hover is the correct/expected direction (same idea as a ripple highlight on a dark
|
|
305
|
+
surface). Also automatically matches whichever variant's color is active, no separate per-variant
|
|
306
|
+
hover token needed here. */
|
|
307
|
+
.bs-snackbar--default .bs-snackbar__action:hover,
|
|
308
|
+
.bs-snackbar__close:hover {
|
|
309
|
+
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.bs-snackbar--default .bs-snackbar__action:active,
|
|
313
|
+
.bs-snackbar__close:active {
|
|
314
|
+
background: color-mix(in srgb, currentColor 24%, transparent);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.bs-snackbar__action:focus-visible,
|
|
318
|
+
.bs-snackbar__close:focus-visible {
|
|
319
|
+
outline: 2px solid currentColor;
|
|
320
|
+
outline-offset: 2px;
|
|
321
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A transient status bar for confirming the result of an action (e.g. "Files uploaded
|
|
4
|
+
* successfully.") -- an icon (or loading spinner), a message, an optional action, and a close
|
|
5
|
+
* button.
|
|
6
|
+
*
|
|
7
|
+
* This component only renders the bar itself -- it doesn't manage its own visibility, timing, or
|
|
8
|
+
* stacking. A consumer (typically a small "toast manager" utility) creates one per message and
|
|
9
|
+
* removes it from the DOM again, whether on a timer or on `bsDismiss`. Figma's spec doesn't show
|
|
10
|
+
* auto-dismiss timing at all (it's a static visual spec), so this deliberately doesn't invent one.
|
|
11
|
+
*
|
|
12
|
+
* The icon is always the same checkmark glyph across every `variant`, just recolored -- matching
|
|
13
|
+
* the Figma spec exactly, even though a checkmark for `variant="error"` reads a little oddly
|
|
14
|
+
* semantically. Worth revisiting with severity-specific icons (warning triangle, error circle,
|
|
15
|
+
* etc.) if the design updates to specify them.
|
|
16
|
+
*
|
|
17
|
+
* ## When to use
|
|
18
|
+
* - Confirming the outcome of an action that just happened (save succeeded, upload failed) without
|
|
19
|
+
* interrupting the user's flow.
|
|
20
|
+
*
|
|
21
|
+
* ## When not to use
|
|
22
|
+
* - For a response that requires the user to make a decision before continuing -- use `bs-dialog`.
|
|
23
|
+
* - For persistent, always-visible status -- a snackbar is inherently transient.
|
|
24
|
+
*
|
|
25
|
+
* @slot - Default slot: the message text.
|
|
26
|
+
* @part container - The outer bar.
|
|
27
|
+
* @part icon - The leading icon/spinner wrapper.
|
|
28
|
+
* @part message - The message text wrapper.
|
|
29
|
+
* @part action - The optional action button (only rendered when `actionLabel` is set).
|
|
30
|
+
* @part close - The close button.
|
|
31
|
+
*/
|
|
32
|
+
export class BsSnackbar {
|
|
33
|
+
/** Color/semantic variant. `default` is the neutral (dark, inverse-surface) bar Figma shows as
|
|
34
|
+
* the baseline; `info`/`warning`/`success`/`error` use their matching container/text tokens. */
|
|
35
|
+
variant = 'default';
|
|
36
|
+
/** Replaces the checkmark icon with a spinning loading indicator, for a message describing
|
|
37
|
+
* in-progress work (e.g. "Uploading files...") rather than a completed result. */
|
|
38
|
+
loading = false;
|
|
39
|
+
/** Label for the optional action button (e.g. "Undo", "Retry"). Omit this prop entirely to
|
|
40
|
+
* render no action button at all -- its presence, not a boolean flag, is what shows it. */
|
|
41
|
+
actionLabel;
|
|
42
|
+
/** Fires when the action button is clicked. Ignored/never fires if `actionLabel` isn't set. */
|
|
43
|
+
bsAction;
|
|
44
|
+
/** Fires when the close button is clicked. This component doesn't remove itself from the DOM --
|
|
45
|
+
* the consumer is expected to do that (or hide it) in response to this event. */
|
|
46
|
+
bsDismiss;
|
|
47
|
+
onAction = () => {
|
|
48
|
+
this.bsAction.emit();
|
|
49
|
+
};
|
|
50
|
+
onDismiss = () => {
|
|
51
|
+
this.bsDismiss.emit();
|
|
52
|
+
};
|
|
53
|
+
render() {
|
|
54
|
+
return (h("div", { key: '9106411da12b9a4687fc15cf51c3398e9f44cf61', part: "container", class: `bs-snackbar bs-snackbar--${this.variant}`, role: "status", "aria-live": this.variant === 'error' ? 'assertive' : 'polite' }, h("div", { key: '47d66fbf472070db51cc4ef1da513068a06bd4cf', class: "bs-snackbar__content" }, h("span", { key: 'aabe82b54a892ae9ce0ec299a8a8282b9c64a158', part: "icon", class: "bs-snackbar__icon", "aria-hidden": "true" }, this.loading ? h("span", { class: "bs-snackbar__spinner" }) : h(CheckCircleIcon, null)), h("span", { key: '0d349ebe58140aed06a6a887a71105aab8218c55', part: "message", class: "bs-snackbar__message" }, h("slot", { key: 'c95af54cae4327a956196c5e252c2e1bafc26e92' }))), h("div", { key: '9d85cb2e47cc696523bc3921afa804648ea13553', class: "bs-snackbar__actions" }, this.actionLabel && (h("button", { key: '59e85117a9351385d258ec9b5bac6cfb6b2d88bf', part: "action", type: "button", class: "bs-snackbar__action", onClick: this.onAction }, this.actionLabel)), h("button", { key: '9e60406a369a599d9a43fb3c9c321e1aa8e1144d', part: "close", type: "button", class: "bs-snackbar__close", "aria-label": "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: '93e815dace277cbee4f0f67a2ec1b3321c9ff495' })))));
|
|
55
|
+
}
|
|
56
|
+
static get is() { return "bs-snackbar"; }
|
|
57
|
+
static get encapsulation() { return "shadow"; }
|
|
58
|
+
static get originalStyleUrls() {
|
|
59
|
+
return {
|
|
60
|
+
"$": ["bs-snackbar.css"]
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
static get styleUrls() {
|
|
64
|
+
return {
|
|
65
|
+
"$": ["bs-snackbar.css"]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static get properties() {
|
|
69
|
+
return {
|
|
70
|
+
"variant": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "BsSnackbarVariant",
|
|
75
|
+
"resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\"",
|
|
76
|
+
"references": {
|
|
77
|
+
"BsSnackbarVariant": {
|
|
78
|
+
"location": "local",
|
|
79
|
+
"path": "/Users/vivka/brandsync-web-components/src/components/bs-snackbar/bs-snackbar.tsx",
|
|
80
|
+
"id": "src/components/bs-snackbar/bs-snackbar.tsx::BsSnackbarVariant"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": false,
|
|
85
|
+
"optional": false,
|
|
86
|
+
"docs": {
|
|
87
|
+
"tags": [],
|
|
88
|
+
"text": "Color/semantic variant. `default` is the neutral (dark, inverse-surface) bar Figma shows as\nthe baseline; `info`/`warning`/`success`/`error` use their matching container/text tokens."
|
|
89
|
+
},
|
|
90
|
+
"getter": false,
|
|
91
|
+
"setter": false,
|
|
92
|
+
"reflect": false,
|
|
93
|
+
"attribute": "variant",
|
|
94
|
+
"defaultValue": "'default'"
|
|
95
|
+
},
|
|
96
|
+
"loading": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "boolean",
|
|
101
|
+
"resolved": "boolean",
|
|
102
|
+
"references": {}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": false,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "Replaces the checkmark icon with a spinning loading indicator, for a message describing\nin-progress work (e.g. \"Uploading files...\") rather than a completed result."
|
|
109
|
+
},
|
|
110
|
+
"getter": false,
|
|
111
|
+
"setter": false,
|
|
112
|
+
"reflect": false,
|
|
113
|
+
"attribute": "loading",
|
|
114
|
+
"defaultValue": "false"
|
|
115
|
+
},
|
|
116
|
+
"actionLabel": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "string",
|
|
121
|
+
"resolved": "string",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": true,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": "Label for the optional action button (e.g. \"Undo\", \"Retry\"). Omit this prop entirely to\nrender no action button at all -- its presence, not a boolean flag, is what shows it."
|
|
129
|
+
},
|
|
130
|
+
"getter": false,
|
|
131
|
+
"setter": false,
|
|
132
|
+
"reflect": false,
|
|
133
|
+
"attribute": "action-label"
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get events() {
|
|
138
|
+
return [{
|
|
139
|
+
"method": "bsAction",
|
|
140
|
+
"name": "bsAction",
|
|
141
|
+
"bubbles": true,
|
|
142
|
+
"cancelable": true,
|
|
143
|
+
"composed": true,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": "Fires when the action button is clicked. Ignored/never fires if `actionLabel` isn't set."
|
|
147
|
+
},
|
|
148
|
+
"complexType": {
|
|
149
|
+
"original": "void",
|
|
150
|
+
"resolved": "void",
|
|
151
|
+
"references": {}
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
"method": "bsDismiss",
|
|
155
|
+
"name": "bsDismiss",
|
|
156
|
+
"bubbles": true,
|
|
157
|
+
"cancelable": true,
|
|
158
|
+
"composed": true,
|
|
159
|
+
"docs": {
|
|
160
|
+
"tags": [],
|
|
161
|
+
"text": "Fires when the close button is clicked. This component doesn't remove itself from the DOM --\nthe consumer is expected to do that (or hide it) in response to this event."
|
|
162
|
+
},
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "void",
|
|
165
|
+
"resolved": "void",
|
|
166
|
+
"references": {}
|
|
167
|
+
}
|
|
168
|
+
}];
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const CheckCircleIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M8.25 12.75L10.5 15L15.75 9.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
172
|
+
const CloseIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M18.75 5.25L5.25 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M18.75 18.75L5.25 5.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
3
|
+
const variants = ['default', 'info', 'warning', 'success', 'error'];
|
|
4
|
+
// Demonstrates a real consumer reaction to bsDismiss -- the component itself doesn't remove or
|
|
5
|
+
// hide anything on dismiss (see the class JSDoc: that's deliberately left to the consumer). Without
|
|
6
|
+
// this, clicking the close button visibly does nothing in the story, which reads as "the button
|
|
7
|
+
// doesn't work" even though the click handler did fire (see the bsDismiss test coverage).
|
|
8
|
+
const hideOnDismiss = (ev) => {
|
|
9
|
+
ev.currentTarget.style.display = 'none';
|
|
10
|
+
};
|
|
11
|
+
const meta = {
|
|
12
|
+
title: 'Components/bs-snackbar',
|
|
13
|
+
parameters: { docs: { description: { component: componentDescription('bs-snackbar') } } },
|
|
14
|
+
render: args => html `
|
|
15
|
+
<bs-snackbar
|
|
16
|
+
variant=${args.variant}
|
|
17
|
+
?loading=${args.loading}
|
|
18
|
+
action-label=${args.actionLabel || undefined}
|
|
19
|
+
@bsDismiss=${hideOnDismiss}
|
|
20
|
+
>
|
|
21
|
+
${args.message}
|
|
22
|
+
</bs-snackbar>
|
|
23
|
+
`,
|
|
24
|
+
argTypes: {
|
|
25
|
+
variant: { control: { type: 'select' }, options: variants, description: propDescription('bs-snackbar', 'variant') },
|
|
26
|
+
loading: { control: 'boolean', description: propDescription('bs-snackbar', 'loading') },
|
|
27
|
+
actionLabel: { control: 'text', description: propDescription('bs-snackbar', 'actionLabel') },
|
|
28
|
+
message: { control: 'text', description: 'Slotted message content (not a real attribute -- see the default slot).' },
|
|
29
|
+
},
|
|
30
|
+
args: {
|
|
31
|
+
variant: 'default',
|
|
32
|
+
loading: false,
|
|
33
|
+
actionLabel: 'Click me',
|
|
34
|
+
message: 'Files uploaded successfully.',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
export const Default = {};
|
|
39
|
+
// One instance per variant, side by side, matching the Figma spec's column layout.
|
|
40
|
+
export const AllVariants = {
|
|
41
|
+
name: 'All variants',
|
|
42
|
+
render: () => html `
|
|
43
|
+
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
44
|
+
${variants.map(variant => html `
|
|
45
|
+
<bs-snackbar variant=${variant} action-label="Click me" @bsDismiss=${hideOnDismiss}>Files uploaded successfully.</bs-snackbar>
|
|
46
|
+
`)}
|
|
47
|
+
</div>
|
|
48
|
+
`,
|
|
49
|
+
};
|
|
50
|
+
export const Overflow = {
|
|
51
|
+
args: { message: 'Your changes were saved, but some fields may fail.' },
|
|
52
|
+
};
|
|
53
|
+
export const Loading = {
|
|
54
|
+
args: { loading: true, message: 'Uploading files...', actionLabel: '' },
|
|
55
|
+
};
|
|
56
|
+
export const NoAction = {
|
|
57
|
+
name: 'No action',
|
|
58
|
+
args: { actionLabel: '' },
|
|
59
|
+
};
|
|
@@ -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: '87d5b005650458dac01edfc249af98f004281345', class: "bs-source-link__left" }, h("span", { key: '8eff72ca308f2617826f29312a755925526ffbd6', class: "bs-source-link__filename-row" }, h("span", { key: 'f0d435557cabaf12ee9bd2d155e432accf2fe858', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: '51d36a29f3d77280bc575e32929a64e31e953fb3', name: "icon" }, h(FileTextIcon, { key: 'c51889f0f2cb3ab048b0a6cca1541accb720c4b2' }))), h("p", { key: '213eeb131f508e49f0b22aedce477cc68d0ebe54', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'c6ca408b2707ed208f02a85baf393330536a126e', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: '7ec7920ab0a44d2169e53e24c958b0ad5c9ee58c', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: 'e5687303c97b0cc5c655c5646c7be367d41d35b8', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: 'b0abbfc1b477d85ac25fe281d0404da62f2f21b0', part: "version", class: "bs-source-link__version" }, this.version)))),
|
|
55
|
+
h("span", { key: 'a2b93f18243778d72c77e2790ee43a4c3b7214a5', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '2cc849857b592ea425ea43cf55a202adde726826' })),
|
|
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
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-switch', () => {
|
|
3
|
+
it('renders an unchecked native switch input by default', async () => {
|
|
4
|
+
const { root } = await render(h("bs-switch", null));
|
|
5
|
+
const input = root.shadowRoot.querySelector('input');
|
|
6
|
+
expect(input).toEqualAttribute('type', 'checkbox');
|
|
7
|
+
expect(input).toEqualAttribute('role', 'switch');
|
|
8
|
+
expect(input.checked).toBe(false);
|
|
9
|
+
expect(root.shadowRoot.querySelector('[part="track"]')).not.toHaveClass('bs-switch__track--checked');
|
|
10
|
+
});
|
|
11
|
+
it('reflects ariaLabel to the native input, for label-less accessible names', async () => {
|
|
12
|
+
const { root } = await render(h("bs-switch", { ariaLabel: "Enable notifications" }));
|
|
13
|
+
const input = root.shadowRoot.querySelector('input');
|
|
14
|
+
expect(input).toEqualAttribute('aria-label', 'Enable notifications');
|
|
15
|
+
});
|
|
16
|
+
it('does not set aria-label on the native input when ariaLabel is not provided', async () => {
|
|
17
|
+
const { root } = await render(h("bs-switch", null));
|
|
18
|
+
const input = root.shadowRoot.querySelector('input');
|
|
19
|
+
expect(input).not.toHaveAttribute('aria-label');
|
|
20
|
+
});
|
|
21
|
+
it('reflects the checked prop to the native input and the track', async () => {
|
|
22
|
+
const { root } = await render(h("bs-switch", { checked: true }));
|
|
23
|
+
const input = root.shadowRoot.querySelector('input');
|
|
24
|
+
expect(input.checked).toBe(true);
|
|
25
|
+
expect(root.shadowRoot.querySelector('[part="track"]')).toHaveClass('bs-switch__track--checked');
|
|
26
|
+
});
|
|
27
|
+
it('clicking the input toggles checked and emits bsChange with the new value', async () => {
|
|
28
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-switch", null));
|
|
29
|
+
const bsChangeSpy = spyOnEvent('bsChange');
|
|
30
|
+
const input = root.shadowRoot.querySelector('input');
|
|
31
|
+
input.click();
|
|
32
|
+
await waitForChanges();
|
|
33
|
+
expect(input.checked).toBe(true);
|
|
34
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(1);
|
|
35
|
+
expect(bsChangeSpy).toHaveReceivedEventDetail(true);
|
|
36
|
+
input.click();
|
|
37
|
+
await waitForChanges();
|
|
38
|
+
expect(input.checked).toBe(false);
|
|
39
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(2);
|
|
40
|
+
expect(bsChangeSpy).toHaveReceivedEventDetail(false);
|
|
41
|
+
});
|
|
42
|
+
describe('disabled', () => {
|
|
43
|
+
it('sets the disabled attribute on the native input', async () => {
|
|
44
|
+
const { root } = await render(h("bs-switch", { disabled: true }));
|
|
45
|
+
const input = root.shadowRoot.querySelector('input');
|
|
46
|
+
expect(input).toHaveAttribute('disabled');
|
|
47
|
+
});
|
|
48
|
+
it('prevents toggling via click', async () => {
|
|
49
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-switch", { disabled: true }));
|
|
50
|
+
const bsChangeSpy = spyOnEvent('bsChange');
|
|
51
|
+
const input = root.shadowRoot.querySelector('input');
|
|
52
|
+
input.click();
|
|
53
|
+
await waitForChanges();
|
|
54
|
+
expect(input.checked).toBe(false);
|
|
55
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(0);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
['md', 'lg'].forEach(size => {
|
|
59
|
+
it(`renders size="${size}" with the matching track modifier class`, async () => {
|
|
60
|
+
const { root } = await render(h("bs-switch", { size: size }));
|
|
61
|
+
const track = root.shadowRoot.querySelector('[part="track"]');
|
|
62
|
+
expect(track).toHaveClass(`bs-switch__track--${size}`);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
it('renders label slot content', async () => {
|
|
66
|
+
const { root } = await render(h("bs-switch", null, "Enable notifications"));
|
|
67
|
+
expect(root).toHaveTextContent('Enable notifications');
|
|
68
|
+
const label = root.shadowRoot.querySelector('[part="label"]');
|
|
69
|
+
expect(label.querySelector('slot')).not.toBeNull();
|
|
70
|
+
});
|
|
71
|
+
});
|