@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
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
+
/* No border -- verified against the Figma "Card" node, which relies on background/shadow contrast
|
|
6
|
+
against the page rather than a border line. overflow: hidden clips the image slot's top corners
|
|
7
|
+
to this radius (see .bs-card__image--visible below). border-radius-100 (8px), not -150 (12px) --
|
|
8
|
+
the -150 value previously here was the Figma *demo frame's* radius around the example, not the
|
|
9
|
+
card's own "Paper" node radius. */
|
|
5
10
|
.bs-card {
|
|
6
|
-
|
|
7
|
-
border-radius: var(--bs-border-radius-
|
|
8
|
-
padding: var(--bs-spacing-400);
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
border-radius: var(--bs-border-radius-100);
|
|
9
13
|
font-family: inherit;
|
|
10
14
|
}
|
|
11
15
|
|
|
@@ -22,10 +26,38 @@
|
|
|
22
26
|
background: var(--bs-paper-bg-container);
|
|
23
27
|
}
|
|
24
28
|
|
|
29
|
+
/* Empty by default (no padding/margin) -- only visible when the image slot has content, same
|
|
30
|
+
"reserve no space when empty" pattern as bs-dialog's own image slot. */
|
|
31
|
+
.bs-card__image--visible ::slotted(img) {
|
|
32
|
+
display: block;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: auto;
|
|
35
|
+
object-fit: cover;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Carries the padding that used to live directly on .bs-card -- moved here so the image slot above
|
|
39
|
+
can sit flush against the card's edges instead of being inset by it. spacing-200 (16px), not
|
|
40
|
+
-400 (32px) -- the -400 value previously here didn't match the Figma redline at all. */
|
|
41
|
+
.bs-card__content {
|
|
42
|
+
padding: var(--bs-spacing-200);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* spacing-100 (8px), not -300 (24px) -- same over-sized-token mistake as the padding above. */
|
|
25
46
|
.bs-card__header ::slotted(*) {
|
|
26
|
-
margin: 0 0 var(--bs-spacing-
|
|
47
|
+
margin: 0 0 var(--bs-spacing-100) 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Figma's "Card Slot" renders footer actions (typically two buttons) as a right-aligned row with a
|
|
51
|
+
16px gap between them -- the ::slotted(*) margin-top below only provides the gap ABOVE the footer
|
|
52
|
+
row (between it and the header/body content), it doesn't lay out multiple slotted items as a row
|
|
53
|
+
at all (they'd just stack in normal inline flow). This adds that row layout on the wrapper itself. */
|
|
54
|
+
.bs-card__footer {
|
|
55
|
+
display: flex;
|
|
56
|
+
justify-content: flex-end;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--bs-spacing-200);
|
|
27
59
|
}
|
|
28
60
|
|
|
29
61
|
.bs-card__footer ::slotted(*) {
|
|
30
|
-
margin: var(--bs-spacing-
|
|
62
|
+
margin: var(--bs-spacing-100) 0 0 0;
|
|
31
63
|
}
|
|
@@ -10,10 +10,14 @@ import { h } from "@stencil/core";
|
|
|
10
10
|
* - As the only structural element on a page — cards group content, they don't replace layout.
|
|
11
11
|
* - For a dismissible/transient message — use a modal or a dedicated notification component.
|
|
12
12
|
*
|
|
13
|
+
* @slot image - Optional hero image across the top of the card, flush with its edges and clipped
|
|
14
|
+
* to its top corners. Presence of assigned content is what shows it -- doesn't affect layout when
|
|
15
|
+
* empty.
|
|
13
16
|
* @slot header - Optional heading content above the body.
|
|
14
17
|
* @slot - Default slot: the card's main body content.
|
|
15
18
|
* @slot footer - Optional actions/content below the body (e.g. a button).
|
|
16
|
-
* @part container - The outer
|
|
19
|
+
* @part container - The outer surface element.
|
|
20
|
+
* @part image - The hero image wrapper (only visible when the `image` slot has content).
|
|
17
21
|
* @part header - The header wrapper.
|
|
18
22
|
* @part body - The body wrapper.
|
|
19
23
|
* @part footer - The footer wrapper.
|
|
@@ -22,8 +26,15 @@ export class BsCard {
|
|
|
22
26
|
/** Maps to the brandsync-tokens `--bs-paper-bg-*` set — Brandsync's tokens don't have a
|
|
23
27
|
* dedicated "card" component yet, so this reuses the existing Paper surface tokens. */
|
|
24
28
|
surface = 'raised';
|
|
29
|
+
/** Tracks whether the `image` slot has assigned content, so the image wrapper only reserves
|
|
30
|
+
* layout space (and clips its top corners) when there's actually an image -- same pattern as
|
|
31
|
+
* `bs-dialog`'s `hasImage`. */
|
|
32
|
+
hasImage = false;
|
|
33
|
+
onImageSlotchange = (ev) => {
|
|
34
|
+
this.hasImage = ev.target.assignedNodes().length > 0;
|
|
35
|
+
};
|
|
25
36
|
render() {
|
|
26
|
-
return (h("div", { key: '
|
|
37
|
+
return (h("div", { key: '0662903c6a1d7132865b2d6cbacd2d4f106101fc', part: "container", class: `bs-card bs-card--${this.surface}` }, h("div", { key: 'ba7637d19b11d05241f64a6314a8cdeb846be488', part: "image", class: `bs-card__image ${this.hasImage ? 'bs-card__image--visible' : ''}` }, h("slot", { key: '5b4d49a64af886cb19c0142aedb615d4c96e1d77', name: "image", onSlotchange: this.onImageSlotchange })), h("div", { key: 'd98c200c1bc2772f33ee8c0c5029761d464d656d', class: "bs-card__content" }, h("div", { key: '7e80e6809aad33f9919c1b14f86bad18c4602250', part: "header", class: "bs-card__header" }, h("slot", { key: '5daf62af5d08c31a51ad5ca0cc186ca60a92a0ef', name: "header" })), h("div", { key: 'feb18f2cf8c9fcb99051b8b66073ec2b1b46e123', part: "body", class: "bs-card__body" }, h("slot", { key: '561ef6160b5acd92500d097f0d402c176dd81c04' })), h("div", { key: 'd5989024a37534dea720eebf483273c518a72cd3', part: "footer", class: "bs-card__footer" }, h("slot", { key: '829399f8f90c83b2ea75e063daa7afbaf5f0f8dd', name: "footer" })))));
|
|
27
38
|
}
|
|
28
39
|
static get is() { return "bs-card"; }
|
|
29
40
|
static get encapsulation() { return "shadow"; }
|
|
@@ -67,4 +78,9 @@ export class BsCard {
|
|
|
67
78
|
}
|
|
68
79
|
};
|
|
69
80
|
}
|
|
81
|
+
static get states() {
|
|
82
|
+
return {
|
|
83
|
+
"hasImage": {}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
70
86
|
}
|
|
@@ -7,7 +7,8 @@ const meta = {
|
|
|
7
7
|
<bs-card surface=${args.surface} style="max-width: 320px;">
|
|
8
8
|
<strong slot="header">Booking confirmed</strong>
|
|
9
9
|
<p>Meeting Room 4B is reserved for 2:00pm - 3:00pm.</p>
|
|
10
|
-
<bs-button slot="footer" size="sm">
|
|
10
|
+
<bs-button slot="footer" variant="subtle" size="sm">Cancel</bs-button>
|
|
11
|
+
<bs-button slot="footer" variant="outlined" size="sm">View details</bs-button>
|
|
11
12
|
</bs-card>
|
|
12
13
|
`,
|
|
13
14
|
argTypes: {
|
|
@@ -25,3 +26,18 @@ export const Base = {
|
|
|
25
26
|
export const Container = {
|
|
26
27
|
args: { surface: 'container' },
|
|
27
28
|
};
|
|
29
|
+
// A real photo (Unsplash, free-to-use license) -- verified this URL resolves (200, image/jpeg)
|
|
30
|
+
// before using it. Presence of the image slot's content is what shows the hero image, not a prop.
|
|
31
|
+
const heroImage = 'https://images.unsplash.com/photo-1660496247667-3fb697c396af?fm=jpg&q=80&w=640&h=360&fit=crop&auto=format';
|
|
32
|
+
export const WithImage = {
|
|
33
|
+
name: 'With image',
|
|
34
|
+
render: args => html `
|
|
35
|
+
<bs-card surface=${args.surface} style="max-width: 320px;">
|
|
36
|
+
<img slot="image" src=${heroImage} alt="" />
|
|
37
|
+
<strong slot="header">Booking confirmed</strong>
|
|
38
|
+
<p>Meeting Room 4B is reserved for 2:00pm - 3:00pm.</p>
|
|
39
|
+
<bs-button slot="footer" variant="subtle" size="sm">Cancel</bs-button>
|
|
40
|
+
<bs-button slot="footer" variant="outlined" size="sm">View details</bs-button>
|
|
41
|
+
</bs-card>
|
|
42
|
+
`,
|
|
43
|
+
};
|
|
@@ -123,7 +123,7 @@ export class BsChatbotFeedback {
|
|
|
123
123
|
}
|
|
124
124
|
render() {
|
|
125
125
|
const stars = [1, 2, 3, 4, 5];
|
|
126
|
-
return (h("div", { key: '
|
|
126
|
+
return (h("div", { key: '81d4b297593509fc8dd189f6f793f779e74257a9', class: "bs-chatbot-feedback", role: "region", "aria-label": this.computedHeading() }, h("button", { key: '0354e90dafc04230f5ff232a41ef833be53109da', type: "button", part: "close", class: "bs-chatbot-feedback__close", "aria-label": "Close", onClick: this.onCloseClick }, h(CloseIcon, { key: 'bb7dbb0f779ae0c6ed97d89de9daeb273cb95891' })), h("div", { key: 'a08af9ead8ff286a6dbf0cd447c59d5daa985b2e', class: "bs-chatbot-feedback__top" }, h("div", { key: 'ec2566d3fa1b69296e834292718f64f8cdc4de7a', class: "bs-chatbot-feedback__text" }, h("p", { key: 'f93002e0eb4d23247e879910f1f04062eda3445a', part: "heading", class: "bs-chatbot-feedback__heading" }, this.computedHeading()), h("p", { key: '49bc3b0849d622b719dcc8b003c7b19d478e29fe', part: "subtitle", class: "bs-chatbot-feedback__subtitle" }, this.computedSubtitle())), h("div", { key: '4b94ee7207c95f78dd3fa2d3660647f553dda8a8', class: "bs-chatbot-feedback__stars", role: "radiogroup", "aria-label": "Rating" }, stars.map(value => (h("button", { type: "button", part: "star", class: "bs-chatbot-feedback__star", role: "radio", "aria-checked": (this.rating >= value).toString(), "aria-label": `${value} star${value > 1 ? 's' : ''}`, disabled: this.submitted, onClick: () => this.onStarClick(value) }, h(StarIcon, { filled: this.rating >= value }))))), !this.submitted && (h("div", { key: '390dc5a2d4073f89ac90fb6f753d9cd6072cc8e1', class: "bs-chatbot-feedback__field" }, h("label", { key: '4ade9e346c7c5af11ea66f7a491d99f76ba4de8d', part: "label", class: "bs-chatbot-feedback__label", htmlFor: "bs-chatbot-feedback-comment" }, "Tell us what you think"), h("textarea", { key: '8ef6e3fa14f5ebdc060e34b8b73ef08b3ed07396', part: "textarea", id: "bs-chatbot-feedback-comment", class: "bs-chatbot-feedback__textarea", placeholder: "e.g.The response was helpful ....", value: this.comment, onInput: this.onCommentInput }))), this.submitted && this.comment && (h("p", { key: '6b2c93b3e8c494a8a24d2592163497b41c2eab26', part: "comment", class: "bs-chatbot-feedback__comment" }, this.comment))), h("div", { key: 'a38c0b8ad956c56dc9d6f53152744e3e1f4bf049', class: "bs-chatbot-feedback__actions" }, !this.submitted && (h("button", { key: 'b93d7d561dd3bf253c1a04b30ea61b8a27f65d37', type: "button", part: "submit", class: "bs-chatbot-feedback__submit", disabled: this.rating === 0, onClick: this.onSubmitClick }, h(SendIcon, { key: '48cdda204d0d4855d7ec75b9be4715acfc9ad738' }), "Submit feedback")), h("button", { key: '40b3568e4aabf7a4e274b52c26e0216af539ed9f', type: "button", part: "new-chat", class: `bs-chatbot-feedback__new-chat ${this.submitted ? 'bs-chatbot-feedback__new-chat--primary' : 'bs-chatbot-feedback__new-chat--outlined'}`, onClick: this.onNewChatClick }, h(EditIcon, { key: '53804fd03520aefc0d88b5d35b6078c5488c121a' }), "Start new chat"))));
|
|
127
127
|
}
|
|
128
128
|
static get is() { return "bs-chatbot-feedback"; }
|
|
129
129
|
static get encapsulation() { return "shadow"; }
|
|
@@ -74,7 +74,7 @@ export class BsChatbotHeader {
|
|
|
74
74
|
this.bsClose.emit();
|
|
75
75
|
};
|
|
76
76
|
render() {
|
|
77
|
-
return (h("div", { key: '
|
|
77
|
+
return (h("div", { key: 'e0ea19eeb010af536dba9981ed9859181445dfe3', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, h("div", { key: 'b2e9ebadd61e80ad1f4559dd0e0130d6b36f625c', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), h("div", { key: '51a96ee8e2c456e00d090ef329a0a7625e8a22dd', class: "bs-chatbot-header__actions" }, h("span", { key: '26f392cb56b496da1e4c26fe378246bb47f0a7e9', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '7418cea294cc509323049494464fc292c643d881', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, h("slot", { key: '510a66d1d0cc7baccf0f2d9f2dc6b26acfc76d0b', name: "new-chat-icon" }, h(NewChatIcon, { key: 'b135187338a185bda4f145f2311c7ea3b21839d5' }))), h("bs-tooltip", { key: '55605b4ec0d3c51fc5fc5546676e240a64bb5278', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), h("span", { key: 'bab4c50dcf6d0931f90de7a1c45249559149aa9c', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'a70f0acd00a29476800e0cc1367a1f11ab159c75', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, h("slot", { key: 'dfbd816dee51c428359509c4d9fc97efbd290a0e', name: "history-icon" }, h(HistoryIcon, { key: '5550515b799ab3d494d812aa9567781f86c7381a' }))), h("bs-tooltip", { key: '66cc280bc34b411b4ad8d0640acafbc14259bfab', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), h("span", { key: '21bd18c8221473430d5afa844d0a8fd6072fabe4', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'fe794fafeb13f4aa5ae1f228b8b28eeb82317631', type: "button", part: "expand", class: "bs-chatbot-header__button", "aria-label": this.expanded ? 'Collapse' : 'Expand', "aria-pressed": this.expanded ? 'true' : 'false', onClick: this.onExpandClick }, h("slot", { key: '457d0ca096b2f44aee67db3ca6cae24d440b9bb0', name: "expand-icon" }, h(ExpandIcon, { key: '207caae0afda63b8ddc55b13c9de0abf991a5650' }))), h("bs-tooltip", { key: '12251a2b24cd651f0ee91307d62f7179e67fb066', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, this.expanded ? 'Collapse' : 'Expand')), h("span", { key: '25d6e11049392522aa8a0b1b9bc6327850a10084', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'ed9df95ed3922f23d135980ffc2e1306c3d09da2', type: "button", part: "close", class: "bs-chatbot-header__button", "aria-label": "Close", onClick: this.onCloseClick }, h("slot", { key: '73fbf236b91e874ebc40a51b565b772d8b4f65fd', name: "close-icon" }, h(CloseIcon, { key: '26ab31c650988a86860790fd9591b5cd2d0daf3c' }))), h("bs-tooltip", { key: 'f51ce61c93ba84116545d95c6ce89b21e791dc4c', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "Close")))));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "bs-chatbot-header"; }
|
|
80
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -105,7 +105,7 @@ export class BsChatbotResponseAction {
|
|
|
105
105
|
};
|
|
106
106
|
render() {
|
|
107
107
|
const hasSources = !!this.sourcesCount && this.sourcesCount > 0;
|
|
108
|
-
return (h("div", { key: '
|
|
108
|
+
return (h("div", { key: '6f0fe6d237fa76a44aebc5452d77619f8a6f3e07', class: "bs-chatbot-response-action" }, h("button", { key: 'e46a78f8a28c8b23780d86ea52618bb96003bbc6', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, h("slot", { key: 'cf59ea0115e99fef5e5398f8101ecd4702f6d13c', name: "like-icon" }, h(ThumbsUpIcon, { key: '0597457db34f2e4677f63a7253dd59015bbcbaf5' }))), h("button", { key: '9dd6db57941126a2b50f3c1c45653e35cc4e9113', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, h("slot", { key: '8ab78179e979275461cd420e1ab7919396e6126e', name: "dislike-icon" }, h(ThumbsDownIcon, { key: '5f9eeeb87c3bb3f635468dfcdddb323069c20c6f' }))), h("button", { key: '6bf0a37024846ababcfc0c1593f6d9fd4bd2b6af', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, h("slot", { key: '68c68be3274b3bf2c0f59178640e6009ec5869da', name: "copy-icon" }, h(CopyIcon, { key: '229bd54acaad25cc05da69361142be1588c723f9' }))), h("button", { key: '1cc152937d132b179b72daf1342f63cbabcc67f2', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, h("slot", { key: '407f9527d50f75d0063b92a6f68ed6a4364b72bc', name: "regenerate-icon" }, h(RegenerateIcon, { key: 'f1d5fca176ef8f90c167a62307bda06bdc86b4a6' }))), h("div", { key: '2fe454900888c46dc17d24ce28c3af1d2d9afcf6', class: "bs-chatbot-response-action__menu-wrapper" }, h("button", { key: '3046ca6507dd70c734a37e6aed89613167ce5e29', type: "button", part: "menu", class: "bs-chatbot-response-action__button", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.onMenuClick }, h("slot", { key: '3e6814659655c0ba61bc84a3eacae0a13b2c9cd6', name: "menu-icon" }, h(MenuIcon, { key: '70a898b1158a284f1c8e07a6d92ce11de1265844' }))), this.menuOpen && (h("div", { key: '95bc1e4c5a8e8d160a6b59c36bf3485ecfdc8505', class: "bs-chatbot-response-action__menu-popup" }, h("slot", { key: '80dd0220745586c213c4372ded2f2138c4e3dadb', name: "menu" })))), hasSources && (h("button", { key: '4f1036874d1a02347820bb0d19a77c18f5d33bc0', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, h("slot", { key: '11c4b6b5399ffd011bb60da19265e19bc4407061', name: "sources-icon" }, h(SourcesIcon, { key: 'fd64afb252fb5b32332cc46ff664fc947df22ea5' })), h("span", { key: 'ef47e93369d033e3306e7006516470d5b1c9c13f', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "bs-chatbot-response-action"; }
|
|
111
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* --bs-static-white is deliberately NOT theme-aware (never overridden in [data-theme="dark"]),
|
|
4
4
|
* so using it here would leave the panel pure white in dark mode while --bs-text-default (used
|
|
5
5
|
* for the heading below) switches to white -- invisible text on an unchanged white background.
|
|
6
|
-
* --bs-surface-raised is the theme-aware equivalent already used for bs-
|
|
6
|
+
* --bs-surface-raised is the theme-aware equivalent already used for bs-dialog's own dialog box. */
|
|
7
7
|
--bs-chatbot-sources-drawer-bg: var(--bs-surface-raised);
|
|
8
8
|
--bs-chatbot-sources-drawer-header-shadow: var(--bs-shadow-xs);
|
|
9
9
|
--bs-chatbot-sources-drawer-header-padding-x: var(--bs-spacing-200);
|
|
@@ -57,7 +57,7 @@ export class BsChatbotSourcesDrawer {
|
|
|
57
57
|
};
|
|
58
58
|
render() {
|
|
59
59
|
const displayCount = this.count ?? this.slottedCount;
|
|
60
|
-
return (h("div", { key: '
|
|
60
|
+
return (h("div", { key: '4f5ba818b20615f14f05744f7da90293687fb571', class: "bs-chatbot-sources-drawer", role: "region", "aria-label": this.heading }, h("div", { key: 'e42b0c3ea3c33da5ab3c5aff08a27dfdf91f9213', class: "bs-chatbot-sources-drawer__header" }, h("div", { key: '47364bc1d824a102c63a8f3fbca310c3c50996db', class: "bs-chatbot-sources-drawer__title-group" }, h("h2", { key: 'ad91fd640f31ad585438ed0da4fa6964321d0839', part: "heading", class: "bs-chatbot-sources-drawer__heading" }, this.heading), displayCount > 0 && (h("span", { key: 'c46163c92ba3d15e384101d5e37d72c1e2034534', part: "count", class: "bs-chatbot-sources-drawer__count" }, displayCount))), h("button", { key: 'f82bf6ec52abb532b3fd5f4b6d7d4405d71685a0', type: "button", part: "collapse", class: "bs-chatbot-sources-drawer__collapse", "aria-label": "Collapse sources", onClick: this.onCollapseClick }, h("slot", { key: 'f7e7edab6658cbf745f06fa18931d9522e488723', name: "collapse-icon" }, h(CaretRightIcon, { key: '6e3ac570d6a5ca716b39c611b2f6d0c15078cbbf' })))), h("div", { key: '5006ed497dec22fb534a8805edbf24a8196e3cbc', part: "list", class: "bs-chatbot-sources-drawer__list" }, h("slot", { key: 'f32856392781219b2f0102181cbcfb768a331cea', onSlotchange: this.onSlotchange }))));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "bs-chatbot-sources-drawer"; }
|
|
63
63
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js
CHANGED
|
@@ -45,7 +45,7 @@ export class BsChatbotSuggestionButton {
|
|
|
45
45
|
this.bsSelect.emit();
|
|
46
46
|
};
|
|
47
47
|
render() {
|
|
48
|
-
return (h("button", { key: '
|
|
48
|
+
return (h("button", { key: '6382d81881701ca9363c0031e8db634812f233f7', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, h("slot", { key: 'cc6a6586b36c70f5420f08ebc44db5452fe184bc' })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "bs-chatbot-suggestion-button"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.cmp.test.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-checkbox-skeleton', () => {
|
|
3
|
+
it('renders with role="status" and aria-label="Loading" by default', async () => {
|
|
4
|
+
const { root } = await render(h("bs-checkbox-skeleton", null));
|
|
5
|
+
const container = root.shadowRoot.querySelector('.bs-checkbox-skeleton');
|
|
6
|
+
expect(container).toEqualAttribute('role', 'status');
|
|
7
|
+
expect(container).toEqualAttribute('aria-label', 'Loading');
|
|
8
|
+
expect(root.shadowRoot.querySelector('.bs-checkbox-skeleton__box')).toHaveClass('bs-checkbox-skeleton__box--lg');
|
|
9
|
+
});
|
|
10
|
+
it('always renders both a box and a label placeholder', async () => {
|
|
11
|
+
const { root } = await render(h("bs-checkbox-skeleton", null));
|
|
12
|
+
expect(root.shadowRoot.querySelector('[part="box"]')).not.toBeNull();
|
|
13
|
+
expect(root.shadowRoot.querySelector('[part="label"]')).not.toBeNull();
|
|
14
|
+
});
|
|
15
|
+
it('applies the correct box size class for each size value', async () => {
|
|
16
|
+
const { root, setProps } = await render(h("bs-checkbox-skeleton", { size: "sm" }));
|
|
17
|
+
expect(root.shadowRoot.querySelector('.bs-checkbox-skeleton__box')).toHaveClass('bs-checkbox-skeleton__box--sm');
|
|
18
|
+
await setProps({ size: 'md' });
|
|
19
|
+
expect(root.shadowRoot.querySelector('.bs-checkbox-skeleton__box')).toHaveClass('bs-checkbox-skeleton__box--md');
|
|
20
|
+
await setProps({ size: 'lg' });
|
|
21
|
+
expect(root.shadowRoot.querySelector('.bs-checkbox-skeleton__box')).toHaveClass('bs-checkbox-skeleton__box--lg');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
|
|
4
|
+
--bs-checkbox-skeleton-size-sm: var(--bs-spacing-200);
|
|
5
|
+
--bs-checkbox-skeleton-size-md: var(--bs-spacing-250);
|
|
6
|
+
--bs-checkbox-skeleton-size-lg: var(--bs-spacing-300);
|
|
7
|
+
--bs-checkbox-skeleton-gap: var(--bs-spacing-100);
|
|
8
|
+
--bs-checkbox-skeleton-label-width: 96px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.bs-checkbox-skeleton {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--bs-checkbox-skeleton-gap);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.bs-checkbox-skeleton__box,
|
|
18
|
+
.bs-checkbox-skeleton__label {
|
|
19
|
+
background: var(--bs-color-neutral-container);
|
|
20
|
+
animation: bs-checkbox-skeleton-pulse 1.5s ease-in-out infinite;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.bs-checkbox-skeleton__box {
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
border-radius: var(--bs-border-radius-50);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.bs-checkbox-skeleton__box--sm {
|
|
29
|
+
width: var(--bs-checkbox-skeleton-size-sm);
|
|
30
|
+
height: var(--bs-checkbox-skeleton-size-sm);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.bs-checkbox-skeleton__box--md {
|
|
34
|
+
width: var(--bs-checkbox-skeleton-size-md);
|
|
35
|
+
height: var(--bs-checkbox-skeleton-size-md);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.bs-checkbox-skeleton__box--lg {
|
|
39
|
+
width: var(--bs-checkbox-skeleton-size-lg);
|
|
40
|
+
height: var(--bs-checkbox-skeleton-size-lg);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.bs-checkbox-skeleton__label {
|
|
44
|
+
width: var(--bs-checkbox-skeleton-label-width);
|
|
45
|
+
height: 16px;
|
|
46
|
+
border-radius: var(--bs-border-radius-50);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes bs-checkbox-skeleton-pulse {
|
|
50
|
+
0%,
|
|
51
|
+
100% {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
}
|
|
54
|
+
50% {
|
|
55
|
+
opacity: 0.5;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (prefers-reduced-motion: reduce) {
|
|
60
|
+
.bs-checkbox-skeleton__box,
|
|
61
|
+
.bs-checkbox-skeleton__label {
|
|
62
|
+
animation: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A shape-matched loading placeholder for `bs-checkbox`, shown while the real label text isn't
|
|
4
|
+
* known yet (e.g. still being fetched from an API). Renders a small square (matching the
|
|
5
|
+
* checkbox's own box) beside a text-bar placeholder (standing in for the label), both pulsing
|
|
6
|
+
* together, sized to match `bs-checkbox`'s `sm`/`md`/`lg` box dimensions so layout doesn't shift
|
|
7
|
+
* once the real checkbox renders.
|
|
8
|
+
*
|
|
9
|
+
* ## When to use
|
|
10
|
+
* - In place of a `bs-checkbox` whose label/checked state depends on data that hasn't loaded yet.
|
|
11
|
+
*
|
|
12
|
+
* ## When not to use
|
|
13
|
+
* - While a checkbox's own change handler is running (e.g. a save request in flight) -- render the
|
|
14
|
+
* real `bs-checkbox` itself; this component is not a saving-in-progress spinner.
|
|
15
|
+
*
|
|
16
|
+
* @part container - The outer wrapper holding both placeholder pieces.
|
|
17
|
+
* @part box - The pulsing placeholder standing in for the checkbox's own box.
|
|
18
|
+
* @part label - The pulsing placeholder bar standing in for the label text.
|
|
19
|
+
* @prop --bs-checkbox-skeleton-size-sm - Box width/height at `size="sm"`. Aliased to
|
|
20
|
+
* `--bs-spacing-200`, mirroring `bs-checkbox`'s own `--bs-checkbox-size-sm` -- not read directly
|
|
21
|
+
* from it, since these are two separate shadow roots.
|
|
22
|
+
* @prop --bs-checkbox-skeleton-size-md - Box width/height at `size="md"`. Aliased to
|
|
23
|
+
* `--bs-spacing-250`.
|
|
24
|
+
* @prop --bs-checkbox-skeleton-size-lg - Box width/height at `size="lg"`. Aliased to
|
|
25
|
+
* `--bs-spacing-300`.
|
|
26
|
+
* @prop --bs-checkbox-skeleton-gap - Gap between the box and label placeholders. Aliased to
|
|
27
|
+
* `--bs-spacing-100`, mirroring `bs-checkbox`'s own `--bs-checkbox-gap`.
|
|
28
|
+
* @prop --bs-checkbox-skeleton-label-width - Width of the label placeholder bar. Defaults to
|
|
29
|
+
* `96px`.
|
|
30
|
+
*/
|
|
31
|
+
export class BsCheckboxSkeleton {
|
|
32
|
+
/** Sizing scale, matching the `bs-checkbox` size it stands in for. Defaults to `lg`, the same
|
|
33
|
+
* (unusual) default `bs-checkbox` itself uses. */
|
|
34
|
+
size = 'lg';
|
|
35
|
+
render() {
|
|
36
|
+
return (h("span", { key: '3ce0fec776997d16edcb84d3fe46c461721230b1', part: "container", class: "bs-checkbox-skeleton", role: "status", "aria-label": "Loading" }, h("span", { key: 'b59ec36ba925cb95545a4836bfa3b631a5ac54f6', part: "box", class: `bs-checkbox-skeleton__box bs-checkbox-skeleton__box--${this.size}` }), h("span", { key: '847024bd9c5d30157fe2e2cf3ef7421c8741dc21', part: "label", class: "bs-checkbox-skeleton__label" })));
|
|
37
|
+
}
|
|
38
|
+
static get is() { return "bs-checkbox-skeleton"; }
|
|
39
|
+
static get encapsulation() { return "shadow"; }
|
|
40
|
+
static get originalStyleUrls() {
|
|
41
|
+
return {
|
|
42
|
+
"$": ["bs-checkbox-skeleton.css"]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
static get styleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["bs-checkbox-skeleton.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get properties() {
|
|
51
|
+
return {
|
|
52
|
+
"size": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "BsCheckboxSize",
|
|
57
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
58
|
+
"references": {
|
|
59
|
+
"BsCheckboxSize": {
|
|
60
|
+
"location": "import",
|
|
61
|
+
"path": "../bs-checkbox",
|
|
62
|
+
"id": "src/components/bs-checkbox/bs-checkbox.tsx::BsCheckboxSize",
|
|
63
|
+
"referenceLocation": "BsCheckboxSize"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": "Sizing scale, matching the `bs-checkbox` size it stands in for. Defaults to `lg`, the same\n(unusual) default `bs-checkbox` itself uses."
|
|
72
|
+
},
|
|
73
|
+
"getter": false,
|
|
74
|
+
"setter": false,
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"attribute": "size",
|
|
77
|
+
"defaultValue": "'lg'"
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.stories.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../../stories-utils";
|
|
3
|
+
const sizes = ['sm', 'md', 'lg'];
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/bs-checkbox-skeleton',
|
|
6
|
+
parameters: { docs: { description: { component: componentDescription('bs-checkbox-skeleton') } } },
|
|
7
|
+
render: args => html `<bs-checkbox-skeleton size=${args.size}></bs-checkbox-skeleton>`,
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: { control: 'select', options: sizes, description: propDescription('bs-checkbox-skeleton', 'size') },
|
|
10
|
+
},
|
|
11
|
+
args: {
|
|
12
|
+
size: 'lg',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
export const Default = {};
|
|
17
|
+
export const Sizes = {
|
|
18
|
+
render: () => html `
|
|
19
|
+
<div style="display:flex; flex-direction:column; gap:12px; align-items:flex-start;">
|
|
20
|
+
<bs-checkbox-skeleton size="sm"></bs-checkbox-skeleton>
|
|
21
|
+
<bs-checkbox-skeleton size="md"></bs-checkbox-skeleton>
|
|
22
|
+
<bs-checkbox-skeleton size="lg"></bs-checkbox-skeleton>
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
};
|
|
@@ -7,6 +7,16 @@ describe('bs-checkbox', () => {
|
|
|
7
7
|
expect(input.checked).toBe(false);
|
|
8
8
|
expect(root.shadowRoot.querySelector('[part="box"] [part="icon"]')).toBeNull();
|
|
9
9
|
});
|
|
10
|
+
it('reflects ariaLabel to the native input, for label-less accessible names', async () => {
|
|
11
|
+
const { root } = await render(h("bs-checkbox", { ariaLabel: "Select all rows" }));
|
|
12
|
+
const input = root.shadowRoot.querySelector('input');
|
|
13
|
+
expect(input).toEqualAttribute('aria-label', 'Select all rows');
|
|
14
|
+
});
|
|
15
|
+
it('does not set aria-label on the native input when ariaLabel is not provided', async () => {
|
|
16
|
+
const { root } = await render(h("bs-checkbox", null));
|
|
17
|
+
const input = root.shadowRoot.querySelector('input');
|
|
18
|
+
expect(input).not.toHaveAttribute('aria-label');
|
|
19
|
+
});
|
|
10
20
|
it('reflects the checked prop to the native input and shows the check icon', async () => {
|
|
11
21
|
const { root } = await render(h("bs-checkbox", { checked: true }));
|
|
12
22
|
const input = root.shadowRoot.querySelector('input');
|
|
@@ -180,10 +180,16 @@
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
.bs-checkbox__label {
|
|
183
|
-
font-size: var(--bs-font-size-
|
|
183
|
+
font-size: var(--bs-font-size-md);
|
|
184
184
|
color: var(--bs-checkbox-label-color);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
/* Figma specs the label at fontsize/body/sm (14px) only for size="sm" -- size="md"/"lg" both use
|
|
188
|
+
fontsize/body/md (16px), which is the default set above. */
|
|
189
|
+
.bs-checkbox__box--sm ~ .bs-checkbox__label {
|
|
190
|
+
font-size: var(--bs-font-size-sm);
|
|
191
|
+
}
|
|
192
|
+
|
|
187
193
|
.bs-checkbox--disabled .bs-checkbox__label {
|
|
188
194
|
color: var(--bs-checkbox-label-color-disabled);
|
|
189
195
|
}
|
|
@@ -43,6 +43,17 @@ export class BsCheckbox {
|
|
|
43
43
|
/** Applies the error border/label-color treatment. This component's spec has no error message
|
|
44
44
|
* text of its own (unlike `bs-input`'s `error: string`), so it's a plain boolean. */
|
|
45
45
|
error = false;
|
|
46
|
+
/**
|
|
47
|
+
* Accessible name for the checkbox. Required whenever the default (label) slot is empty (e.g. a
|
|
48
|
+
* bare "select row" checkbox in a table) -- without it, the internal native `<input>` has no
|
|
49
|
+
* accessible name at all. Setting `aria-label` directly on the `<bs-checkbox>` host does NOT
|
|
50
|
+
* work for this: that attribute stays on the light-DOM host and is never forwarded into the
|
|
51
|
+
* shadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays
|
|
52
|
+
* nameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and
|
|
53
|
+
* `bs-tab`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal
|
|
54
|
+
* focusable element for the same reason.
|
|
55
|
+
*/
|
|
56
|
+
ariaLabel = null;
|
|
46
57
|
/** Emitted when the checked state changes via user interaction, with the new `checked` value. */
|
|
47
58
|
bsChange;
|
|
48
59
|
/** Keeps the native input's `.indeterminate` JS property in sync -- this can't be expressed as a
|
|
@@ -81,7 +92,7 @@ export class BsCheckbox {
|
|
|
81
92
|
]
|
|
82
93
|
.filter(Boolean)
|
|
83
94
|
.join(' ');
|
|
84
|
-
return (h("label", { key: '
|
|
95
|
+
return (h("label", { key: '78f89b0841c20e030bf8af7384a870d9e660e44f', class: `bs-checkbox ${this.disabled ? 'bs-checkbox--disabled' : ''}` }, h("input", { key: '254d622c1603c444272864f10bc6abccac825f76', ref: el => (this.inputEl = el), class: "bs-checkbox__input", type: "checkbox", checked: this.checked, disabled: this.disabled, "aria-checked": this.indeterminate ? 'mixed' : String(this.checked), "aria-label": this.ariaLabel, onChange: this.onChange }), h("span", { key: '39d94a0d5e590b920082911400554185088a2ebe', part: "box", class: boxClasses }, showIcon && (h("svg", { key: '609448a396a59a9aad9d14eeb8c574d7255dc076', part: "icon", class: "bs-checkbox__icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, this.indeterminate ? (h("path", { d: "M3 8H13", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })) : (h("path", { d: "M3 8.5L6.2 11.5L13 4.5", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), h("span", { key: '16ed6f220ee2417837c2166c9369bff78638095d', part: "label", class: "bs-checkbox__label" }, h("slot", { key: 'd22610712a6bb1e41ecc72ae60c1e6a5df8e93da' }))));
|
|
85
96
|
}
|
|
86
97
|
static get is() { return "bs-checkbox"; }
|
|
87
98
|
static get encapsulation() { return "shadow"; }
|
|
@@ -203,6 +214,26 @@ export class BsCheckbox {
|
|
|
203
214
|
"reflect": false,
|
|
204
215
|
"attribute": "error",
|
|
205
216
|
"defaultValue": "false"
|
|
217
|
+
},
|
|
218
|
+
"ariaLabel": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"mutable": false,
|
|
221
|
+
"complexType": {
|
|
222
|
+
"original": "string | null",
|
|
223
|
+
"resolved": "string",
|
|
224
|
+
"references": {}
|
|
225
|
+
},
|
|
226
|
+
"required": false,
|
|
227
|
+
"optional": false,
|
|
228
|
+
"docs": {
|
|
229
|
+
"tags": [],
|
|
230
|
+
"text": "Accessible name for the checkbox. Required whenever the default (label) slot is empty (e.g. a\nbare \"select row\" checkbox in a table) -- without it, the internal native `<input>` has no\naccessible name at all. Setting `aria-label` directly on the `<bs-checkbox>` host does NOT\nwork for this: that attribute stays on the light-DOM host and is never forwarded into the\nshadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays\nnameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and\n`bs-tab`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal\nfocusable element for the same reason."
|
|
231
|
+
},
|
|
232
|
+
"getter": false,
|
|
233
|
+
"setter": false,
|
|
234
|
+
"reflect": false,
|
|
235
|
+
"attribute": "aria-label",
|
|
236
|
+
"defaultValue": "null"
|
|
206
237
|
}
|
|
207
238
|
};
|
|
208
239
|
}
|
|
@@ -34,6 +34,18 @@ const meta = {
|
|
|
34
34
|
};
|
|
35
35
|
export default meta;
|
|
36
36
|
export const Default = {};
|
|
37
|
+
export const Horizontal = {
|
|
38
|
+
// A layout demo, not a real prop -- bs-checkbox has no orientation/group concept of its own
|
|
39
|
+
// (unlike Carbon's <cds-checkbox-group>), so arranging multiple instances in a row is purely the
|
|
40
|
+
// consuming app's own flex/grid layout, same as the vertical stacking shown implicitly
|
|
41
|
+
// everywhere else in this file.
|
|
42
|
+
render: () => html `
|
|
43
|
+
<div style="display:flex; gap:24px; align-items:center;">
|
|
44
|
+
<bs-checkbox>Checkbox label</bs-checkbox>
|
|
45
|
+
<bs-checkbox>Checkbox label</bs-checkbox>
|
|
46
|
+
</div>
|
|
47
|
+
`,
|
|
48
|
+
};
|
|
37
49
|
export const Checked = {
|
|
38
50
|
args: { checked: true },
|
|
39
51
|
};
|