@brandsync/wc 0.0.12 → 1.0.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 +4969 -3104
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-0ba35c3b.entry.js +1 -0
- package/dist/brandsync-wc/{p-72a33f88.entry.js → p-10f6f3cd.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2c51d738.entry.js → p-16c960b5.entry.js} +1 -1
- package/dist/brandsync-wc/p-17a695af.entry.js +1 -0
- package/dist/brandsync-wc/{p-6e854e92.entry.js → p-196cfcf0.entry.js} +1 -1
- package/dist/brandsync-wc/p-1fcc9f47.entry.js +1 -0
- package/dist/brandsync-wc/p-27cce165.entry.js +1 -0
- package/dist/brandsync-wc/p-37365a51.entry.js +1 -0
- package/dist/brandsync-wc/{p-0eee5477.entry.js → p-38aad266.entry.js} +1 -1
- package/dist/brandsync-wc/p-3efb76dd.entry.js +1 -0
- package/dist/brandsync-wc/{p-1c6fa697.entry.js → p-43e37883.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1900f6ce.entry.js → p-45016a37.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8b662ee3.entry.js → p-48000949.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ef8522b5.entry.js → p-4ec24ccb.entry.js} +1 -1
- package/dist/brandsync-wc/p-4f8459ae.entry.js +1 -0
- package/dist/brandsync-wc/{p-8049f9f2.entry.js → p-55a8d4b5.entry.js} +1 -1
- 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-613ff380.entry.js +1 -0
- package/dist/brandsync-wc/{p-57fdbb76.entry.js → p-63167373.entry.js} +1 -1
- package/dist/brandsync-wc/{p-20dbc6a1.entry.js → p-69c5bc2e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-46ddc8e1.entry.js → p-6e95eb36.entry.js} +1 -1
- package/dist/brandsync-wc/p-752c04c8.entry.js +1 -0
- package/dist/brandsync-wc/p-7e544766.entry.js +1 -0
- package/dist/brandsync-wc/p-917a5bbc.entry.js +1 -0
- package/dist/brandsync-wc/{p-c320b6b4.entry.js → p-9bcd99aa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-12ec9e92.entry.js → p-9f1e4a91.entry.js} +1 -1
- package/dist/brandsync-wc/{p-DST5-cTx.js → p-Do3l4of3.js} +2 -2
- package/dist/brandsync-wc/{p-0fa017ce.entry.js → p-aa43d478.entry.js} +1 -1
- package/dist/brandsync-wc/{p-dd09d335.entry.js → p-ab8de9b6.entry.js} +1 -1
- package/dist/brandsync-wc/p-b18e4845.entry.js +1 -0
- package/dist/brandsync-wc/{p-88a0abee.entry.js → p-b5cbe30b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3b31f7c7.entry.js → p-baa4e2e0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d4e3ca77.entry.js → p-c04cf1bb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a5b15061.entry.js → p-c3079ad7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-23457a21.entry.js → p-c3c383dc.entry.js} +1 -1
- package/dist/brandsync-wc/p-c90f5a74.entry.js +1 -0
- package/dist/brandsync-wc/{p-b24a980b.entry.js → p-cc79e75f.entry.js} +1 -1
- package/dist/brandsync-wc/p-ce7fc368.entry.js +1 -0
- package/dist/brandsync-wc/{p-1adc59be.entry.js → p-d037b619.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2a65aabb.entry.js → p-d22990c0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-56c66448.entry.js → p-e231e4cf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-64e2a7d7.entry.js → p-e2a37bda.entry.js} +1 -1
- package/dist/brandsync-wc/{p-aba300a9.entry.js → p-e3ce0c8c.entry.js} +1 -1
- package/dist/brandsync-wc/p-f0ae2740.entry.js +1 -0
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +2 -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 +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +2 -2
- package/dist/cjs/bs-composer.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/bs-input.cjs.entry.js +24 -12
- package/dist/cjs/bs-logo.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +8 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-pagination.cjs.entry.js +85 -0
- package/dist/cjs/bs-radio.cjs.entry.js +2 -2
- package/dist/cjs/bs-slider.cjs.entry.js +2 -2
- 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-stepper-step.cjs.entry.js +44 -0
- package/dist/cjs/bs-stepper.cjs.entry.js +62 -0
- package/dist/cjs/bs-switch.cjs.entry.js +2 -2
- package/dist/cjs/bs-tab.cjs.entry.js +2 -2
- package/dist/cjs/bs-tabs.cjs.entry.js +2 -2
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{index-B3sdhEGk.js → index-DHVw-IPK.js} +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +10 -1
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-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/bs-button.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- 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.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.stories.js +12 -0
- package/dist/collection/components/bs-composer/bs-composer.js +1 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -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-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.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- 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-stepper/bs-stepper/bs-stepper.cmp.test.js +42 -0
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.css +29 -0
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +162 -0
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.stories.js +59 -0
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.cmp.test.js +73 -0
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.css +258 -0
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +231 -0
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +12 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +34 -6
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +74 -2
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.css +5 -5
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.js +258 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/{bs-modal.d.ts → bs-avatar.d.ts} +4 -4
- 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.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-logo.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-pagination.d.ts +11 -0
- package/dist/components/bs-pagination.js +1 -0
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- 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-stepper-step.d.ts +11 -0
- package/dist/components/bs-stepper-step.js +1 -0
- package/dist/components/bs-stepper.d.ts +11 -0
- package/dist/components/bs-stepper.js +1 -0
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BAOJc0V0.js → p-BFcVSpES.js} +1 -1
- package/dist/components/{p-Be1Pfcnm.js → p-BJZYe7M4.js} +1 -1
- package/dist/components/{p-CaWqTQBZ.js → p-BKaZWFE1.js} +1 -1
- package/dist/components/{p-DivZLd6i.js → p-Bs7nEbqK.js} +1 -1
- package/dist/components/{p-BqYyMGrB.js → p-CPSCOLIf.js} +1 -1
- package/dist/components/{p-xfx69LQx.js → p-CUa8zihb.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-ai-disclaimer.entry.js +2 -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 +1 -1
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/bs-composer-status-banner.entry.js +2 -2
- package/dist/esm/bs-composer.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/bs-inline-tab.entry.js +2 -2
- package/dist/esm/bs-input.entry.js +24 -12
- package/dist/esm/bs-logo.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/bs-navigation-drawer.entry.js +8 -2
- package/dist/esm/bs-navigation-header.entry.js +2 -2
- package/dist/esm/bs-pagination.entry.js +83 -0
- package/dist/esm/bs-radio.entry.js +2 -2
- package/dist/esm/bs-slider.entry.js +2 -2
- package/dist/esm/bs-snackbar.entry.js +39 -0
- package/dist/esm/bs-source-link.entry.js +3 -3
- package/dist/esm/bs-stepper-step.entry.js +42 -0
- package/dist/esm/bs-stepper.entry.js +60 -0
- package/dist/esm/bs-switch.entry.js +2 -2
- package/dist/esm/bs-tab.entry.js +2 -2
- package/dist/esm/bs-tabs.entry.js +2 -2
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/{index-DST5-cTx.js → index-Do3l4of3.js} +1 -1
- package/dist/esm/loader.js +3 -3
- 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.cmp.test.d.ts +1 -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-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.stories.d.ts +1 -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-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-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-stepper/bs-stepper/bs-stepper.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-stepper/bs-stepper/bs-stepper.d.ts +48 -0
- package/dist/types/components/bs-stepper/bs-stepper/bs-stepper.stories.d.ts +14 -0
- package/dist/types/components/bs-stepper/bs-stepper-step/bs-stepper-step.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-stepper/bs-stepper-step/bs-stepper-step.d.ts +55 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +13 -5
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +3 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.d.ts +4 -0
- package/dist/types/components.d.ts +1431 -128
- package/package.json +1 -1
- package/dist/brandsync-wc/p-09aa03d1.entry.js +0 -1
- package/dist/brandsync-wc/p-1cf715aa.entry.js +0 -1
- package/dist/brandsync-wc/p-266f5dde.entry.js +0 -1
- package/dist/brandsync-wc/p-8ded1eb6.entry.js +0 -1
- package/dist/brandsync-wc/p-b289450a.entry.js +0 -1
- package/dist/brandsync-wc/p-b8a2f882.entry.js +0 -1
- package/dist/brandsync-wc/p-f04db1b0.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-modal/bs-modal.cmp.test.d.ts → bs-avatar/bs-avatar.cmp.test.d.ts} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-breadcrumbs', () => {
|
|
3
|
+
it('defaults aria-label on the nav to "Breadcrumb"', async () => {
|
|
4
|
+
const { root } = await render(h("bs-breadcrumbs", null));
|
|
5
|
+
const nav = root.shadowRoot.querySelector('nav');
|
|
6
|
+
expect(nav).toEqualAttribute('aria-label', 'Breadcrumb');
|
|
7
|
+
});
|
|
8
|
+
it('reflects the label prop as the nav aria-label', async () => {
|
|
9
|
+
const { root } = await render(h("bs-breadcrumbs", { label: "You are here" }));
|
|
10
|
+
const nav = root.shadowRoot.querySelector('nav');
|
|
11
|
+
expect(nav).toEqualAttribute('aria-label', 'You are here');
|
|
12
|
+
});
|
|
13
|
+
it('wraps an <ol part="list"> inside the nav', async () => {
|
|
14
|
+
const { root } = await render(h("bs-breadcrumbs", null));
|
|
15
|
+
const nav = root.shadowRoot.querySelector('nav');
|
|
16
|
+
const list = root.shadowRoot.querySelector('[part="list"]');
|
|
17
|
+
expect(list).not.toBeNull();
|
|
18
|
+
expect(list.tagName).toBe('OL');
|
|
19
|
+
expect(nav.contains(list)).toBe(true);
|
|
20
|
+
});
|
|
21
|
+
it('renders slotted children via the default slot', async () => {
|
|
22
|
+
const { root } = await render(h("bs-breadcrumbs", null, h("bs-breadcrumb", { href: "/" }, "Home"), h("bs-breadcrumb", { current: true }, "Edit")));
|
|
23
|
+
const crumbs = root.querySelectorAll('bs-breadcrumb');
|
|
24
|
+
expect(crumbs.length).toBe(2);
|
|
25
|
+
});
|
|
26
|
+
describe('size propagation', () => {
|
|
27
|
+
it('propagates the default "md" size to slotted bs-breadcrumb/bs-breadcrumb-overflow children on load', async () => {
|
|
28
|
+
const { root, waitForChanges } = await render(h("bs-breadcrumbs", null, h("bs-breadcrumb", { href: "/" }, "Home"), h("bs-breadcrumb-overflow", null)));
|
|
29
|
+
await waitForChanges();
|
|
30
|
+
const crumb = root.querySelector('bs-breadcrumb');
|
|
31
|
+
const overflow = root.querySelector('bs-breadcrumb-overflow');
|
|
32
|
+
expect(crumb.size).toBe('md');
|
|
33
|
+
expect(overflow.size).toBe('md');
|
|
34
|
+
});
|
|
35
|
+
it('propagates a non-default size to slotted children on load', async () => {
|
|
36
|
+
const { root, waitForChanges } = await render(h("bs-breadcrumbs", { size: "sm" }, h("bs-breadcrumb", { href: "/" }, "Home")));
|
|
37
|
+
await waitForChanges();
|
|
38
|
+
const crumb = root.querySelector('bs-breadcrumb');
|
|
39
|
+
expect(crumb.size).toBe('sm');
|
|
40
|
+
});
|
|
41
|
+
it('re-propagates size to existing children when the size prop changes', async () => {
|
|
42
|
+
const { root, waitForChanges } = await render(h("bs-breadcrumbs", null, h("bs-breadcrumb", { href: "/" }, "Home")));
|
|
43
|
+
await waitForChanges();
|
|
44
|
+
root.size = 'sm';
|
|
45
|
+
await waitForChanges();
|
|
46
|
+
const crumb = root.querySelector('bs-breadcrumb');
|
|
47
|
+
expect(crumb.size).toBe('sm');
|
|
48
|
+
});
|
|
49
|
+
it('propagates the current size to a child added after initial render', async () => {
|
|
50
|
+
const { root, waitForChanges } = await render(h("bs-breadcrumbs", { size: "sm" }));
|
|
51
|
+
await waitForChanges();
|
|
52
|
+
const crumb = document.createElement('bs-breadcrumb');
|
|
53
|
+
root.appendChild(crumb);
|
|
54
|
+
await waitForChanges();
|
|
55
|
+
expect(crumb.size).toBe('sm');
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-breadcrumbs-gap: Gap between slotted crumbs (bs-breadcrumb/bs-breadcrumb-overflow). Aliased to --bs-spacing-50.
|
|
3
|
+
*/
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
|
|
7
|
+
--bs-breadcrumbs-gap: var(--bs-spacing-50);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.bs-breadcrumbs__list {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
align-items: center;
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
list-style: none;
|
|
17
|
+
gap: var(--bs-breadcrumbs-gap);
|
|
18
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A breadcrumb trail container: a real `<nav>` landmark wrapping an `<ol>`, meant to be populated
|
|
4
|
+
* with slotted `<bs-breadcrumb>` (and, where the consumer wants a collapsed-items disclosure,
|
|
5
|
+
* `<bs-breadcrumb-overflow>`) children -- same composition-over-configuration architecture as
|
|
6
|
+
* Carbon Design System's `cds-breadcrumb`/`cds-breadcrumb-item`/`cds-breadcrumb-link`.
|
|
7
|
+
*
|
|
8
|
+
* This component is intentionally thin: it owns only the `<nav>` landmark and list semantics.
|
|
9
|
+
* Unlike an earlier `items`-array-driven design, there is no automatic collapsing here -- exactly
|
|
10
|
+
* like Carbon, the consumer decides what's visible and manually places a `<bs-breadcrumb-overflow>`
|
|
11
|
+
* wherever they want a collapsed-items disclosure. See `bs-breadcrumbs.mdx` for the consolidated
|
|
12
|
+
* docs covering all three components in this feature area.
|
|
13
|
+
*
|
|
14
|
+
* ## When to use
|
|
15
|
+
* - Showing a user's current location within a hierarchical page structure, with a path back to
|
|
16
|
+
* its ancestors.
|
|
17
|
+
*
|
|
18
|
+
* ## When not to use
|
|
19
|
+
* - Primary in-app navigation -- use `bs-navigation-drawer`/`bs-navigation-header` instead.
|
|
20
|
+
* - A flat set of unrelated pages with no hierarchy -- breadcrumbs imply ancestry, not just history.
|
|
21
|
+
*
|
|
22
|
+
* @slot - Default slot: the trail's crumbs, `<bs-breadcrumb>` and/or `<bs-breadcrumb-overflow>`
|
|
23
|
+
* elements, in visual order.
|
|
24
|
+
* @part list - The `<ol>` element.
|
|
25
|
+
*/
|
|
26
|
+
// Note: this component's CSS Custom Property (--bs-breadcrumbs-gap) is documented via an @prop
|
|
27
|
+
// comment in bs-breadcrumbs.css, not here -- see bs-tab.tsx's identical note.
|
|
28
|
+
export class BsBreadcrumbs {
|
|
29
|
+
el;
|
|
30
|
+
/** Accessible name for the `<nav>` landmark, via `aria-label`. Same pattern as
|
|
31
|
+
* `bs-navigation-drawer`'s `heading` prop. */
|
|
32
|
+
label = 'Breadcrumb';
|
|
33
|
+
/** Size variant, propagated as a JS property to every slotted `bs-breadcrumb`/
|
|
34
|
+
* `bs-breadcrumb-overflow` child -- this container has no visual sizing of its own (font/spacing
|
|
35
|
+
* live on the item components, see `bs-breadcrumb.tsx`'s identical `size` prop), so propagation
|
|
36
|
+
* is the only way setting `size` here reaches every crumb. CSS custom properties can't carry an
|
|
37
|
+
* enum that switches rules on their own, which is why this is pushed via JS property instead of
|
|
38
|
+
* CSS inheritance -- same reasoning as `bs-tabs` setting `selected` directly on its slotted
|
|
39
|
+
* `bs-tab`/`bs-inline-tab` children. Re-propagated on `size` changes and whenever the slotted
|
|
40
|
+
* children change (e.g. a crumb added later). */
|
|
41
|
+
size = 'md';
|
|
42
|
+
onSizeChange(size) {
|
|
43
|
+
this.propagateSize(size);
|
|
44
|
+
}
|
|
45
|
+
componentDidLoad() {
|
|
46
|
+
this.propagateSize(this.size);
|
|
47
|
+
}
|
|
48
|
+
onSlotChange = () => {
|
|
49
|
+
this.propagateSize(this.size);
|
|
50
|
+
};
|
|
51
|
+
propagateSize(size) {
|
|
52
|
+
this.el.querySelectorAll(':scope > bs-breadcrumb, :scope > bs-breadcrumb-overflow').forEach(child => {
|
|
53
|
+
child.size = size;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return (h("nav", { key: 'bbe4f667e651ac339bec4e231bb001b745ae9aa3', "aria-label": this.label }, h("ol", { key: 'f62635e3dc908c10e8610f5baef42d5499d69002', part: "list", class: "bs-breadcrumbs__list" }, h("slot", { key: '6914c7f742a435f32eecf65fc767ff2b6f645b10', onSlotchange: this.onSlotChange }))));
|
|
58
|
+
}
|
|
59
|
+
static get is() { return "bs-breadcrumbs"; }
|
|
60
|
+
static get encapsulation() { return "shadow"; }
|
|
61
|
+
static get originalStyleUrls() {
|
|
62
|
+
return {
|
|
63
|
+
"$": ["bs-breadcrumbs.css"]
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static get styleUrls() {
|
|
67
|
+
return {
|
|
68
|
+
"$": ["bs-breadcrumbs.css"]
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get properties() {
|
|
72
|
+
return {
|
|
73
|
+
"label": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "string",
|
|
78
|
+
"resolved": "string",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Accessible name for the `<nav>` landmark, via `aria-label`. Same pattern as\n`bs-navigation-drawer`'s `heading` prop."
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false,
|
|
89
|
+
"reflect": false,
|
|
90
|
+
"attribute": "label",
|
|
91
|
+
"defaultValue": "'Breadcrumb'"
|
|
92
|
+
},
|
|
93
|
+
"size": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "BsBreadcrumbSize",
|
|
98
|
+
"resolved": "\"md\" | \"sm\"",
|
|
99
|
+
"references": {
|
|
100
|
+
"BsBreadcrumbSize": {
|
|
101
|
+
"location": "import",
|
|
102
|
+
"path": "../bs-breadcrumb/bs-breadcrumb",
|
|
103
|
+
"id": "src/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.tsx::BsBreadcrumbSize",
|
|
104
|
+
"referenceLocation": "BsBreadcrumbSize"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Size variant, propagated as a JS property to every slotted `bs-breadcrumb`/\n`bs-breadcrumb-overflow` child -- this container has no visual sizing of its own (font/spacing\nlive on the item components, see `bs-breadcrumb.tsx`'s identical `size` prop), so propagation\nis the only way setting `size` here reaches every crumb. CSS custom properties can't carry an\nenum that switches rules on their own, which is why this is pushed via JS property instead of\nCSS inheritance -- same reasoning as `bs-tabs` setting `selected` directly on its slotted\n`bs-tab`/`bs-inline-tab` children. Re-propagated on `size` changes and whenever the slotted\nchildren change (e.g. a crumb added later)."
|
|
113
|
+
},
|
|
114
|
+
"getter": false,
|
|
115
|
+
"setter": false,
|
|
116
|
+
"reflect": false,
|
|
117
|
+
"attribute": "size",
|
|
118
|
+
"defaultValue": "'md'"
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
static get elementRef() { return "el"; }
|
|
123
|
+
static get watchers() {
|
|
124
|
+
return [{
|
|
125
|
+
"propName": "size",
|
|
126
|
+
"methodName": "onSizeChange"
|
|
127
|
+
}];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../../stories-utils";
|
|
3
|
+
const sizes = ['sm', 'md'];
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/bs-breadcrumbs',
|
|
6
|
+
parameters: { docs: { description: { component: componentDescription('bs-breadcrumbs') } } },
|
|
7
|
+
argTypes: {
|
|
8
|
+
label: { control: 'text', description: propDescription('bs-breadcrumbs', 'label') },
|
|
9
|
+
size: { control: { type: 'select' }, options: sizes, description: propDescription('bs-breadcrumbs', 'size') },
|
|
10
|
+
},
|
|
11
|
+
args: {
|
|
12
|
+
label: 'Breadcrumb',
|
|
13
|
+
size: 'md',
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
const overflowItems = [
|
|
18
|
+
{ label: 'Products', href: '/products' },
|
|
19
|
+
{ label: 'Category', href: '/products/category' },
|
|
20
|
+
];
|
|
21
|
+
// A short trail needs no overflow at all -- bs-breadcrumb-overflow is only placed by the consumer
|
|
22
|
+
// when there are actually hidden crumbs to disclose (there's no automatic maxItems collapsing).
|
|
23
|
+
export const Default = {
|
|
24
|
+
render: args => html `
|
|
25
|
+
<bs-breadcrumbs label=${args.label} size=${args.size}>
|
|
26
|
+
<bs-breadcrumb href="/">Home</bs-breadcrumb>
|
|
27
|
+
<bs-breadcrumb href="/settings">Settings</bs-breadcrumb>
|
|
28
|
+
<bs-breadcrumb current>Profile</bs-breadcrumb>
|
|
29
|
+
</bs-breadcrumbs>
|
|
30
|
+
`,
|
|
31
|
+
};
|
|
32
|
+
// size="sm" set once on the container, propagated as a JS property to every slotted crumb (and the
|
|
33
|
+
// overflow disclosure) -- see bs-breadcrumbs.tsx's propagateSize.
|
|
34
|
+
export const Small = {
|
|
35
|
+
args: { size: 'sm' },
|
|
36
|
+
render: args => html `
|
|
37
|
+
<bs-breadcrumbs label=${args.label} size=${args.size}>
|
|
38
|
+
<bs-breadcrumb href="/">Home</bs-breadcrumb>
|
|
39
|
+
<bs-breadcrumb-overflow .items=${overflowItems}></bs-breadcrumb-overflow>
|
|
40
|
+
<bs-breadcrumb href="/settings/profile">Profile</bs-breadcrumb>
|
|
41
|
+
<bs-breadcrumb current>Edit</bs-breadcrumb>
|
|
42
|
+
</bs-breadcrumbs>
|
|
43
|
+
`,
|
|
44
|
+
};
|
|
45
|
+
// A longer trail where the consumer has chosen to hide the middle crumbs behind a manually placed
|
|
46
|
+
// <bs-breadcrumb-overflow>, reachable via its ellipsis disclosure.
|
|
47
|
+
export const WithOverflow = {
|
|
48
|
+
name: 'With overflow',
|
|
49
|
+
render: args => html `
|
|
50
|
+
<bs-breadcrumbs label=${args.label}>
|
|
51
|
+
<bs-breadcrumb href="/">Home</bs-breadcrumb>
|
|
52
|
+
<bs-breadcrumb-overflow .items=${overflowItems}></bs-breadcrumb-overflow>
|
|
53
|
+
<bs-breadcrumb href="/settings/profile">Profile</bs-breadcrumb>
|
|
54
|
+
<bs-breadcrumb current>Edit</bs-breadcrumb>
|
|
55
|
+
</bs-breadcrumbs>
|
|
56
|
+
`,
|
|
57
|
+
};
|
|
58
|
+
// A crumb with neither `current` nor `href` -- not the current page, but also not navigable (e.g.
|
|
59
|
+
// an archived section heading). Renders as plain, non-interactive text with the same muted styling
|
|
60
|
+
// as a link.
|
|
61
|
+
export const NonLinkCrumb = {
|
|
62
|
+
args: {
|
|
63
|
+
size: 'md',
|
|
64
|
+
},
|
|
65
|
+
name: 'Non-link crumb',
|
|
66
|
+
render: args => html `
|
|
67
|
+
<bs-breadcrumbs label=${args.label}>
|
|
68
|
+
<bs-breadcrumb href="/">Home</bs-breadcrumb>
|
|
69
|
+
<bs-breadcrumb>Archived section</bs-breadcrumb>
|
|
70
|
+
<bs-breadcrumb current>Report</bs-breadcrumb>
|
|
71
|
+
</bs-breadcrumbs>
|
|
72
|
+
`,
|
|
73
|
+
};
|
|
74
|
+
// Sanity-checks the :host(:first-child) separator-hiding rule when a <bs-breadcrumb-overflow> --
|
|
75
|
+
// rather than a <bs-breadcrumb> -- is the visually first element in the trail.
|
|
76
|
+
export const OverflowFirst = {
|
|
77
|
+
name: 'Overflow first',
|
|
78
|
+
render: () => html `
|
|
79
|
+
<bs-breadcrumbs label="Breadcrumb">
|
|
80
|
+
<bs-breadcrumb-overflow .items=${overflowItems}></bs-breadcrumb-overflow>
|
|
81
|
+
<bs-breadcrumb current>Edit</bs-breadcrumb>
|
|
82
|
+
</bs-breadcrumbs>
|
|
83
|
+
`,
|
|
84
|
+
};
|
|
@@ -105,7 +105,7 @@ export class BsButton {
|
|
|
105
105
|
};
|
|
106
106
|
render() {
|
|
107
107
|
const iconOnly = (this.hasIcon || this.hasEndIcon) && !this.hasLabel;
|
|
108
|
-
return (h("button", { key: '
|
|
108
|
+
return (h("button", { key: '3820c965cff86109613dac0d6ffaf5ee0a926f26', class: `bs-button bs-button--${this.variant} bs-button--${this.size} ${iconOnly ? 'bs-button--icon-only' : ''} ${this.hasIcon && !iconOnly ? 'bs-button--has-icon' : ''} ${this.hasEndIcon && !iconOnly ? 'bs-button--has-end-icon' : ''}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel }, h("span", { key: 'b8fb25e26d96168d6676acc0c3fa1b4f3429e974', part: "icon", class: `bs-button__icon ${this.hasIcon ? 'bs-button__icon--visible' : ''}` }, h("slot", { key: 'cd5e33cf19f19b89c2f87153d20d32bf0d3dabb9', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '91c9fd334013c495d2ec836619b9aecebc3c8e20', part: "label", class: "bs-button__label" }, h("slot", { key: 'c363d5d5004d2b2e9e5a4e09fa6cbe2ab87d9fff', onSlotchange: this.onLabelSlotchange })), h("span", { key: '29c1b4457efcfb9c11b0095279b77f3e97fa9988', part: "end-icon", class: `bs-button__end-icon ${this.hasEndIcon ? 'bs-button__end-icon--visible' : ''}` }, h("slot", { key: '9a6d3c0fcc16d8b546e225d88ae4d6014e9b2e45', name: "end-icon", onSlotchange: this.onEndIconSlotchange }))));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "bs-button"; }
|
|
111
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -50,7 +50,7 @@ export class BsIconButton {
|
|
|
50
50
|
*/
|
|
51
51
|
ariaLabel = null;
|
|
52
52
|
render() {
|
|
53
|
-
return (h("button", { key: '
|
|
53
|
+
return (h("button", { key: '174cb1f4c7eb14ba404991cebf081ecd25294faf', class: `bs-icon-button bs-icon-button--${this.variant} bs-icon-button--${this.size}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel }, h("span", { key: '613f2701ee211ead437c5137344db4f7e3de1893', part: "icon", class: "bs-icon-button__icon" }, h("slot", { key: '4f7053179b9ce70eb82731f01b5b0b33f9911240' }))));
|
|
54
54
|
}
|
|
55
55
|
static get is() { return "bs-icon-button"; }
|
|
56
56
|
static get encapsulation() { return "shadow"; }
|
|
@@ -25,7 +25,7 @@ export class BsButtonSkeleton {
|
|
|
25
25
|
/** Sizing scale, matching the `bs-button` size it stands in for. */
|
|
26
26
|
size = 'md';
|
|
27
27
|
render() {
|
|
28
|
-
return h("span", { key: '
|
|
28
|
+
return h("span", { key: '4643d43484ba7150e4bb1b6595eb6afe37277d28', part: "container", class: `bs-button-skeleton bs-button-skeleton--${this.size}`, role: "status", "aria-label": "Loading" });
|
|
29
29
|
}
|
|
30
30
|
static get is() { return "bs-button-skeleton"; }
|
|
31
31
|
static get encapsulation() { return "shadow"; }
|
|
@@ -39,4 +39,23 @@ describe('bs-card', () => {
|
|
|
39
39
|
expect(header.textContent.trim()).toBe('');
|
|
40
40
|
expect(footer.textContent.trim()).toBe('');
|
|
41
41
|
});
|
|
42
|
+
it('lays out multiple footer items as a right-aligned row', async () => {
|
|
43
|
+
const { root } = await render(h("bs-card", null, "Body content", h("button", { slot: "footer" }, "Cancel"), h("button", { slot: "footer" }, "Confirm")));
|
|
44
|
+
const footer = root.shadowRoot.querySelector('[part="footer"]');
|
|
45
|
+
expect(getComputedStyle(footer).display).toBe('flex');
|
|
46
|
+
expect(getComputedStyle(footer).justifyContent).toBe('flex-end');
|
|
47
|
+
});
|
|
48
|
+
describe('image slot', () => {
|
|
49
|
+
it('has no visible image wrapper when the image slot is empty', async () => {
|
|
50
|
+
const { root } = await render(h("bs-card", null, "Body content"));
|
|
51
|
+
const image = root.shadowRoot.querySelector('[part="image"]');
|
|
52
|
+
expect(image).not.toBeNull();
|
|
53
|
+
expect(image).not.toHaveClass('bs-card__image--visible');
|
|
54
|
+
});
|
|
55
|
+
it('shows the image wrapper when the image slot has content', async () => {
|
|
56
|
+
const { root } = await render(h("bs-card", null, "Body content", h("img", { slot: "image", src: "hero.jpg", alt: "" })));
|
|
57
|
+
const image = root.shadowRoot.querySelector('[part="image"]');
|
|
58
|
+
expect(image).toHaveClass('bs-card__image--visible');
|
|
59
|
+
});
|
|
60
|
+
});
|
|
42
61
|
});
|
|
@@ -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: '0b8ab60623060df54d86c8ff8e74420ec67f7624', class: "bs-chatbot-feedback", role: "region", "aria-label": this.computedHeading() }, h("button", { key: '1d0ac3c5e73dfda9643bb26f443fe335396085a1', type: "button", part: "close", class: "bs-chatbot-feedback__close", "aria-label": "Close", onClick: this.onCloseClick }, h(CloseIcon, { key: '0df4513da8ba214a2305f8e1cc69dd6fb2b1ebb8' })), h("div", { key: '87a3a0a30b86d0012185c2a415735aeef909027d', class: "bs-chatbot-feedback__top" }, h("div", { key: '79e9fd626f6a492a2f33108468e3591daef44af1', class: "bs-chatbot-feedback__text" }, h("p", { key: 'c263ab79f00b5d6ae075d65ccf4000894bcaf4e6', part: "heading", class: "bs-chatbot-feedback__heading" }, this.computedHeading()), h("p", { key: 'fdfaecaba5bc66e8d42c98fb01ee6ee1cb854c25', part: "subtitle", class: "bs-chatbot-feedback__subtitle" }, this.computedSubtitle())), h("div", { key: '026942be351e900cc3edb53c43f2c22910738659', 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: 'a3aef9bf37275ef5121fc17e666fe3bc0bd08cc1', class: "bs-chatbot-feedback__field" }, h("label", { key: 'df3867b4a6799215fb1c95df2d531c174d1099b9', part: "label", class: "bs-chatbot-feedback__label", htmlFor: "bs-chatbot-feedback-comment" }, "Tell us what you think"), h("textarea", { key: '9b8213e3300cdd848a7a315cf08cebc098200085', 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: 'e103acfb691fb7b1966abcc9139b5f549c13e19c', part: "comment", class: "bs-chatbot-feedback__comment" }, this.comment))), h("div", { key: '48aee021f29dd907ba9d7ee1c8edaa9ce9a14fab', class: "bs-chatbot-feedback__actions" }, !this.submitted && (h("button", { key: 'bb9178271b30e9ecb7f8456d7c6eea66f54541b5', type: "button", part: "submit", class: "bs-chatbot-feedback__submit", disabled: this.rating === 0, onClick: this.onSubmitClick }, h(SendIcon, { key: '49250a1d36790fa99cd8fc1ab8af7556a6b61aff' }), "Submit feedback")), h("button", { key: '639cbe7d23344cc7dcfb9348b34161dfa73fde86', 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: '76d6ee82bf8120dea1bb402a74993174194ebe8c' }), "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: '976c52c3c5fc7d4b3a71669075263053abc7b253', class: "bs-chatbot-header", role: "banner", "aria-label": this.heading }, h("div", { key: 'ee3e0f4478ccbbe293c555f4f49c040dff3347de', part: "logo", class: "bs-chatbot-header__logo", role: "img", "aria-label": this.heading, innerHTML: GENIE_LOGO_SVG }), h("div", { key: '189372f43f8d38ae906498f3eb54d0c3023b32f9', class: "bs-chatbot-header__actions" }, h("span", { key: 'f0346193fa5927156265da9a785a6f1f6920eee9', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '8c4efc93a8f9ff06e0640635670117a05a363e6b', type: "button", part: "new-chat", class: "bs-chatbot-header__button", "aria-label": "New chat", onClick: this.onNewChatClick }, h("slot", { key: '95c55f8631203dd8addeca3814f075635f403a33', name: "new-chat-icon" }, h(NewChatIcon, { key: '2472c8aab26a9f78ca3f8ee5c9c7742bc6c4fd0a' }))), h("bs-tooltip", { key: '5eea9d22cad778e51af7ea2cf5bb7b049efeddab', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "New chat")), h("span", { key: 'fa4c416c88908a72e1e60808786eaedb4682988e', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'cdc4c7ecf2fceb64ea9e5ff2bcb684e5773094ff', type: "button", part: "history", class: "bs-chatbot-header__button", "aria-label": "History", onClick: this.onHistoryClick }, h("slot", { key: 'f4dd57016f0d070fcef8bd108bee57c7541d9234', name: "history-icon" }, h(HistoryIcon, { key: '361f3512015127ded2802df421238e247cb21b39' }))), h("bs-tooltip", { key: '55170d0bc19d6c27327af2b637d97d9659f28d36', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, "History")), h("span", { key: 'b7e2916d6b821fa1a5399dc4b136a56cffa74262', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: '8708ed4e461c1267fa269b26d28c161c189c1545', 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: '89051c53a9023d97a46caea933c266d317854a19', name: "expand-icon" }, h(ExpandIcon, { key: '7da6d2c1d998aa81a2799451cd2e179d48c2bac0' }))), h("bs-tooltip", { key: '4e310620ee98ab1a86c431f8793973769cbcabe8', class: "bs-chatbot-header__tooltip", placement: "top", "aria-hidden": "true" }, this.expanded ? 'Collapse' : 'Expand')), h("span", { key: '4591bee15e6b9bffa8040886afd779be8b1ddf04', class: "bs-chatbot-header__tooltip-wrapper" }, h("button", { key: 'ed8f7b652940e0075a254705d503b872d9cb54dd', type: "button", part: "close", class: "bs-chatbot-header__button", "aria-label": "Close", onClick: this.onCloseClick }, h("slot", { key: '46fd676c08f046269ed459867733bfade7ee6347', name: "close-icon" }, h(CloseIcon, { key: '58ec3e580328eb7ed51579c03c02cd9b369a8cdf' }))), h("bs-tooltip", { key: '5808c60d8d56763f6dcc39e5862178190830f4bc', 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: '36a3a372af16e57f0747d0afacede280c75e2baa', class: "bs-chatbot-response-action" }, h("button", { key: '5d67c3cb0b3488d3f3ac84fe593cacc66e119a3b', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, h("slot", { key: 'b9447e9cb87c841cb75b015324780a926275643d', name: "like-icon" }, h(ThumbsUpIcon, { key: 'd5b8b4cb03eb08d12ef92d6ef7e8747830f496f0' }))), h("button", { key: 'e510cc2d7edf1b85b9c298f7d988b994f716821b', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, h("slot", { key: '94aa62133ad644a1423539a2854e24bd809ae934', name: "dislike-icon" }, h(ThumbsDownIcon, { key: '5770a79e906a6ff99ca9e632a2dbcfccf3478756' }))), h("button", { key: 'b8477c11b99ba291406ebc8fcb953ca87d21e5d5', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, h("slot", { key: 'f2ebadfff852af1e1f1462257a1132ef16fd538d', name: "copy-icon" }, h(CopyIcon, { key: '57c470579a282b8fbd0aad5e1153e4e5666c8c04' }))), h("button", { key: 'd27f9d32f57296011f8c69848b678b745e068074', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, h("slot", { key: 'eb8dc45632ecf993cbdb78a4174eee93fc8a1df8', name: "regenerate-icon" }, h(RegenerateIcon, { key: 'a1a72e6fdc499b4f76caeb747c4711b31985e5b8' }))), h("div", { key: 'e51c762ded01dcacbfcc554b858992ecf818b890', class: "bs-chatbot-response-action__menu-wrapper" }, h("button", { key: '43cb51c908e6e57f35d6ff84a0e7fba850c3c410', 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: '515f26fb7b3c861c5fb67e6831fa0cff568006d2', name: "menu-icon" }, h(MenuIcon, { key: '93c50b2d7ed0d710c30d33a0483943e12111f479' }))), this.menuOpen && (h("div", { key: '098e59c3e121fe9565d349372d84cc8106762968', class: "bs-chatbot-response-action__menu-popup" }, h("slot", { key: 'bc7a4ec19beeaf66d7dbd506914d185233677760', name: "menu" })))), hasSources && (h("button", { key: '703c714cf207a1475069cc8c93155b9be002310a', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, h("slot", { key: '8184596f5a98cbaaa276d337269aea27f3de5ba4', name: "sources-icon" }, h(SourcesIcon, { key: 'eb5984310dc77e1aa082c9275105bbca923cc7ab' })), h("span", { key: '52ba085dd94415e7ee36fce236375bd9d66f6145', 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: 'bbec982298c928942775b7543865781a3fd0c555', class: "bs-chatbot-sources-drawer", role: "region", "aria-label": this.heading }, h("div", { key: '9e6e7c89bdf061c89a608fcdc9aa9e85a8de731c', class: "bs-chatbot-sources-drawer__header" }, h("div", { key: '648efdba7da08457adf1e9fe5cb69b1a4d2f9266', class: "bs-chatbot-sources-drawer__title-group" }, h("h2", { key: '08557ea95eae88878c3c0971ce8aa5fa6a72bdcc', part: "heading", class: "bs-chatbot-sources-drawer__heading" }, this.heading), displayCount > 0 && (h("span", { key: '3aaf595afc3170bf8f18cf06a119555ff386aaa4', part: "count", class: "bs-chatbot-sources-drawer__count" }, displayCount))), h("button", { key: 'ccf98e8772366e8c91e6cb6f824194d4ec8a8b35', type: "button", part: "collapse", class: "bs-chatbot-sources-drawer__collapse", "aria-label": "Collapse sources", onClick: this.onCollapseClick }, h("slot", { key: 'd1f41711fd871e0f5ef0d23fd7ffb8ae0d6aa595', name: "collapse-icon" }, h(CaretRightIcon, { key: '55dea932bcfa2dcdb776cf452737362c52ea879e' })))), h("div", { key: 'f3f8e5fd96df856ecb965c7e75b706c1f8fe6488', part: "list", class: "bs-chatbot-sources-drawer__list" }, h("slot", { key: '27f35d19a5f00275c983f17a2709932fdf2f2b61', 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: '26a03adfaace4fffed0f3c371b665f49a68dbfae', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, h("slot", { key: 'e40d0b911d11329ea5f07cffe1a0f60acf777dd5' })));
|
|
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
|
+
});
|