@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,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: 'c2a6166646dde6d30242d16582706d0e422eb4d6', part: "container", class: "bs-checkbox-skeleton", role: "status", "aria-label": "Loading" }, h("span", { key: 'f1be3fc565db55eac147901c8035b9b83a75911d', part: "box", class: `bs-checkbox-skeleton__box bs-checkbox-skeleton__box--${this.size}` }), h("span", { key: '4dcce33b22c6930795d2c1ea3bc5d0aa84f3601b', 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
|
+
};
|
|
@@ -92,7 +92,7 @@ export class BsCheckbox {
|
|
|
92
92
|
]
|
|
93
93
|
.filter(Boolean)
|
|
94
94
|
.join(' ');
|
|
95
|
-
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' }))));
|
|
96
96
|
}
|
|
97
97
|
static get is() { return "bs-checkbox"; }
|
|
98
98
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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
|
};
|
|
@@ -183,7 +183,7 @@ export class BsComposer {
|
|
|
183
183
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
184
184
|
const disabled = this.state === 'disabled';
|
|
185
185
|
const recording = this.state === 'recording';
|
|
186
|
-
return (h("div", { key: '
|
|
186
|
+
return (h("div", { key: 'ee8e0a250798b3b5f9da6acde497779581c3b9ca', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: 'fe37e3bd240379513c97022b77635121ae100826', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: 'c6237cef8ebf742d6a68d513bd4366226317ec43', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: 'e88d294aba83e6a4c11f35095ae4efd58aeb9586', class: "bs-composer__text-row" }, h("textarea", { key: 'c6a123b0134e74fed67ec590a7ee9c0eaa238318', ref: el => (this.inputEl = el), part: "input", class: "bs-composer__input", rows: 1, value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput })), h("div", { key: 'aab617b78bfd3bcd33d43f08669f6f1688238388', class: "bs-composer__controls-row" }, h("button", { key: 'db8147a8841c08786c725052fdbaa366718c9a2e', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, h(PlusIcon, { key: 'cc13f52bfc496bd2a530012917b098fe10dff27b' })), recording ? (h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (h("span", { class: "bs-composer__spacer" })), h("button", { key: '372d2751ea5dab5793314aa4469ef80ab28536a5', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null)), h("button", { key: '4694605f9e970097290d0eabbc1d4815c3b3bfe2', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '71976baf242f384a2c69ef8561dda47d0a3739ae', name: "actions-end" }))));
|
|
187
187
|
}
|
|
188
188
|
static get is() { return "bs-composer"; }
|
|
189
189
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,7 +106,7 @@ export class BsComposerStatusBanner {
|
|
|
106
106
|
return this.type === 'error' || this.type === 'warning' ? h(WarningIcon, null) : h(ClockIcon, null);
|
|
107
107
|
}
|
|
108
108
|
render() {
|
|
109
|
-
return (h("div", { key: '
|
|
109
|
+
return (h("div", { key: 'f8f5ae2de96dc534f4e9c9a5f46fe28e3da57939', role: this.roleForType(), class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: '28d77b1058c375afaba827f4dd4563b6cff058e4', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: 'aaa867907b3610a1e2a9be087d2d077cd1252503', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '1d0db69c42e4a23978655e86e16b9624f05a8edb', name: "icon" }, this.renderDefaultIcon()))), h("p", { key: 'bdad9aaf7efa1d96afd07c9d214d7a2ee369c010', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: 'cf949f6cada1c35d91ebc7ec81c56ea9e9255c30', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: '5108346a07f7bb3c23ea94c213f395212497b4e8', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": "Dismiss", onClick: this.onCloseClick }, h(CloseIcon, { key: '7651748165308c30394ea312f227ff83eb7b1d1a' })))));
|
|
110
110
|
}
|
|
111
111
|
static get is() { return "bs-composer-status-banner"; }
|
|
112
112
|
static get encapsulation() { return "shadow"; }
|
|
@@ -54,11 +54,11 @@ export class BsDataTable {
|
|
|
54
54
|
this.bsRowSelect.emit({ id: row.id, selected });
|
|
55
55
|
};
|
|
56
56
|
render() {
|
|
57
|
-
return (h("table", { key: '
|
|
57
|
+
return (h("table", { key: 'fa798fc4873097b91f1e5527836c9607630535ad', part: "table", class: "bs-data-table" }, h("thead", { key: '4ce731b46239412e2f87167ca678c0a9376a67dd', part: "head" }, h("tr", { key: '74fd0fb91c96b62e7ea97f85fb9e215ab5883af5' }, this.selectable && h("th", { key: '595ffb64be9ddb12851acc704e503653c623a385', class: "bs-data-table__select-col" }), this.columns.map(column => {
|
|
58
58
|
const isSorted = this.sortColumn === column.key;
|
|
59
59
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
60
60
|
return (h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
61
|
-
}))), h("tbody", { key: '
|
|
61
|
+
}))), h("tbody", { key: '1e46254b85803cbd3925b6a4bbc9ca0205816753', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
62
62
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
63
63
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
64
64
|
// same trust model as React's dangerouslySetInnerHTML.
|
package/dist/collection/components/{bs-modal/bs-modal.cmp.test.js → bs-dialog/bs-dialog.cmp.test.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { render, h, describe, it, expect, afterEach } from "@stencil/vitest";
|
|
2
|
-
describe('bs-
|
|
2
|
+
describe('bs-dialog', () => {
|
|
3
3
|
afterEach(() => {
|
|
4
4
|
document.querySelectorAll('button[data-test-trigger]').forEach(el => el.remove());
|
|
5
5
|
});
|
|
6
6
|
it('renders nothing when closed (default)', async () => {
|
|
7
|
-
const { root } = await render(h("bs-
|
|
7
|
+
const { root } = await render(h("bs-dialog", { heading: "Confirm booking" }, "Body"));
|
|
8
8
|
expect(root.shadowRoot.querySelector('[part="backdrop"]')).toBeNull();
|
|
9
9
|
expect(root.shadowRoot.querySelector('[part="dialog"]')).toBeNull();
|
|
10
10
|
});
|
|
11
11
|
it('renders the backdrop and dialog with correct a11y attributes when open', async () => {
|
|
12
|
-
const { root } = await render(h("bs-
|
|
12
|
+
const { root } = await render(h("bs-dialog", { open: true, heading: "Confirm booking" }, "Body content"));
|
|
13
13
|
const backdrop = root.shadowRoot.querySelector('[part="backdrop"]');
|
|
14
14
|
const dialog = root.shadowRoot.querySelector('[part="dialog"]');
|
|
15
15
|
expect(backdrop).toBeTruthy();
|
|
@@ -21,27 +21,71 @@ describe('bs-modal', () => {
|
|
|
21
21
|
});
|
|
22
22
|
['sm', 'md', 'lg'].forEach(size => {
|
|
23
23
|
it(`applies the "${size}" size class to the dialog`, async () => {
|
|
24
|
-
const { root } = await render(h("bs-
|
|
24
|
+
const { root } = await render(h("bs-dialog", { open: true, size: size }, "Body"));
|
|
25
25
|
const dialog = root.shadowRoot.querySelector('[part="dialog"]');
|
|
26
|
-
expect(dialog).toHaveClass(`bs-
|
|
26
|
+
expect(dialog).toHaveClass(`bs-dialog__dialog--${size}`);
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
it('defaults to the "md" size', async () => {
|
|
30
|
-
const { root } = await render(h("bs-
|
|
30
|
+
const { root } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
31
31
|
const dialog = root.shadowRoot.querySelector('[part="dialog"]');
|
|
32
|
-
expect(dialog).toHaveClass('bs-
|
|
32
|
+
expect(dialog).toHaveClass('bs-dialog__dialog--md');
|
|
33
33
|
});
|
|
34
34
|
it('only shows the footer bar when the footer slot has content', async () => {
|
|
35
|
-
const { root: withoutFooter } = await render(h("bs-
|
|
35
|
+
const { root: withoutFooter } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
36
36
|
const footerWithout = withoutFooter.shadowRoot.querySelector('[part="footer"]');
|
|
37
|
-
expect(footerWithout).not.toHaveClass('bs-
|
|
38
|
-
const { root: withFooter } = await render(h("bs-
|
|
37
|
+
expect(footerWithout).not.toHaveClass('bs-dialog__footer--visible');
|
|
38
|
+
const { root: withFooter } = await render(h("bs-dialog", { open: true }, "Body", h("button", { slot: "footer" }, "Confirm")));
|
|
39
39
|
const footerWith = withFooter.shadowRoot.querySelector('[part="footer"]');
|
|
40
|
-
expect(footerWith).toHaveClass('bs-
|
|
40
|
+
expect(footerWith).toHaveClass('bs-dialog__footer--visible');
|
|
41
41
|
expect(withFooter).toHaveTextContent('Confirm');
|
|
42
42
|
});
|
|
43
|
+
describe('image slot', () => {
|
|
44
|
+
it('has no visible image wrapper and an inline close button when the image slot is empty', async () => {
|
|
45
|
+
const { root } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
46
|
+
const image = root.shadowRoot.querySelector('[part="image"]');
|
|
47
|
+
expect(image).not.toHaveClass('bs-dialog__image--visible');
|
|
48
|
+
const header = root.shadowRoot.querySelector('[part="header"]');
|
|
49
|
+
expect(header.querySelector('[part="close"]')).not.toBeNull();
|
|
50
|
+
expect(root.shadowRoot.querySelector('.bs-dialog__close--floating')).toBeNull();
|
|
51
|
+
});
|
|
52
|
+
it('shows the image wrapper and floats the close button when the image slot has content', async () => {
|
|
53
|
+
const { root } = await render(h("bs-dialog", { open: true }, "Body", h("img", { slot: "image", src: "hero.jpg", alt: "" })));
|
|
54
|
+
const image = root.shadowRoot.querySelector('[part="image"]');
|
|
55
|
+
expect(image).toHaveClass('bs-dialog__image--visible');
|
|
56
|
+
const floating = root.shadowRoot.querySelector('.bs-dialog__close--floating');
|
|
57
|
+
expect(floating).not.toBeNull();
|
|
58
|
+
const header = root.shadowRoot.querySelector('[part="header"]');
|
|
59
|
+
expect(header.querySelector('[part="close"]')).toBeNull();
|
|
60
|
+
// Exactly one close button total, not both the floating and inline variants at once.
|
|
61
|
+
expect(root.shadowRoot.querySelectorAll('[part="close"]').length).toBe(1);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
describe('centered layout', () => {
|
|
65
|
+
it('reflects the centered attribute, defaulting to false', async () => {
|
|
66
|
+
const { root } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
67
|
+
expect(root).not.toHaveAttribute('centered');
|
|
68
|
+
});
|
|
69
|
+
it('renders an icon wrapper, centers the header/body, and floats the close button', async () => {
|
|
70
|
+
const { root } = await render(h("bs-dialog", { open: true, centered: true, heading: "All set" }, "Body", h("span", { slot: "icon" }, "\u2713")));
|
|
71
|
+
expect(root).toHaveAttribute('centered');
|
|
72
|
+
const icon = root.shadowRoot.querySelector('[part="icon"]');
|
|
73
|
+
expect(icon).not.toBeNull();
|
|
74
|
+
expect(icon).toHaveClass('bs-dialog__icon--visible');
|
|
75
|
+
const header = root.shadowRoot.querySelector('[part="header"]');
|
|
76
|
+
expect(header).toHaveClass('bs-dialog__header--centered');
|
|
77
|
+
const body = root.shadowRoot.querySelector('[part="body"]');
|
|
78
|
+
expect(body).toHaveClass('bs-dialog__body--centered');
|
|
79
|
+
expect(header.querySelector('[part="close"]')).toBeNull();
|
|
80
|
+
expect(root.shadowRoot.querySelector('.bs-dialog__close--floating')).not.toBeNull();
|
|
81
|
+
});
|
|
82
|
+
it('does not render an icon wrapper at all when not centered, even with a slotted icon', async () => {
|
|
83
|
+
const { root } = await render(h("bs-dialog", { open: true }, "Body", h("span", { slot: "icon" }, "\u2713")));
|
|
84
|
+
expect(root.shadowRoot.querySelector('[part="icon"]')).toBeNull();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
43
87
|
it('closes and emits bsClose when the close button is clicked', async () => {
|
|
44
|
-
const { root, spyOnEvent, waitForChanges } = await render(h("bs-
|
|
88
|
+
const { root, spyOnEvent, waitForChanges } = await render(h("bs-dialog", { open: true, heading: "Confirm booking" }, "Body"));
|
|
45
89
|
const closeSpy = spyOnEvent('bsClose');
|
|
46
90
|
const closeButton = root.shadowRoot.querySelector('[part="close"]');
|
|
47
91
|
closeButton.click();
|
|
@@ -51,7 +95,7 @@ describe('bs-modal', () => {
|
|
|
51
95
|
expect(root.shadowRoot.querySelector('[part="dialog"]')).toBeNull();
|
|
52
96
|
});
|
|
53
97
|
it('closes when the backdrop itself is clicked, but not when the dialog inside it is clicked', async () => {
|
|
54
|
-
const { root, spyOnEvent, waitForChanges } = await render(h("bs-
|
|
98
|
+
const { root, spyOnEvent, waitForChanges } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
55
99
|
const closeSpy = spyOnEvent('bsClose');
|
|
56
100
|
const dialog = root.shadowRoot.querySelector('[part="dialog"]');
|
|
57
101
|
dialog.click();
|
|
@@ -65,7 +109,7 @@ describe('bs-modal', () => {
|
|
|
65
109
|
expect(root).not.toHaveAttribute('open');
|
|
66
110
|
});
|
|
67
111
|
it('closes on Escape keydown while open', async () => {
|
|
68
|
-
const { root, spyOnEvent, waitForChanges } = await render(h("bs-
|
|
112
|
+
const { root, spyOnEvent, waitForChanges } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
69
113
|
const closeSpy = spyOnEvent('bsClose');
|
|
70
114
|
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
71
115
|
await waitForChanges();
|
|
@@ -73,14 +117,14 @@ describe('bs-modal', () => {
|
|
|
73
117
|
expect(root).not.toHaveAttribute('open');
|
|
74
118
|
});
|
|
75
119
|
it('does not react to Escape when closed', async () => {
|
|
76
|
-
const { spyOnEvent, waitForChanges } = await render(h("bs-
|
|
120
|
+
const { spyOnEvent, waitForChanges } = await render(h("bs-dialog", null, "Body"));
|
|
77
121
|
const closeSpy = spyOnEvent('bsClose');
|
|
78
122
|
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
79
123
|
await waitForChanges();
|
|
80
124
|
expect(closeSpy.length).toBe(0);
|
|
81
125
|
});
|
|
82
126
|
it('moves focus into the dialog when opened', async () => {
|
|
83
|
-
const { root } = await render(h("bs-
|
|
127
|
+
const { root } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
84
128
|
const dialog = root.shadowRoot.querySelector('[part="dialog"]');
|
|
85
129
|
expect(root.shadowRoot.activeElement).toBe(dialog);
|
|
86
130
|
});
|
|
@@ -89,7 +133,7 @@ describe('bs-modal', () => {
|
|
|
89
133
|
outside.setAttribute('data-test-trigger', '');
|
|
90
134
|
outside.textContent = 'outside';
|
|
91
135
|
document.body.appendChild(outside);
|
|
92
|
-
const { root } = await render(h("bs-
|
|
136
|
+
const { root } = await render(h("bs-dialog", { open: true }, "Body"));
|
|
93
137
|
const dialog = root.shadowRoot.querySelector('[part="dialog"]');
|
|
94
138
|
outside.focus();
|
|
95
139
|
expect(root.shadowRoot.activeElement).toBe(dialog);
|
|
@@ -97,11 +141,11 @@ describe('bs-modal', () => {
|
|
|
97
141
|
it('captures the previously focused element on open and restores focus to it on close', async () => {
|
|
98
142
|
const trigger = document.createElement('button');
|
|
99
143
|
trigger.setAttribute('data-test-trigger', '');
|
|
100
|
-
trigger.textContent = 'open
|
|
144
|
+
trigger.textContent = 'open dialog';
|
|
101
145
|
document.body.appendChild(trigger);
|
|
102
146
|
trigger.focus();
|
|
103
147
|
expect(document.activeElement).toBe(trigger);
|
|
104
|
-
const { root, setProps, waitForChanges } = await render(h("bs-
|
|
148
|
+
const { root, setProps, waitForChanges } = await render(h("bs-dialog", null, "Body"));
|
|
105
149
|
await setProps({ open: true });
|
|
106
150
|
const dialog = root.shadowRoot.querySelector('[part="dialog"]');
|
|
107
151
|
expect(root.shadowRoot.activeElement).toBe(dialog);
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
.bs-dialog__backdrop {
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: var(--bs-z-index-modal);
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
background: rgba(0, 0, 0, 0.4);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.bs-dialog__dialog {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
max-height: calc(100vh - var(--bs-spacing-800));
|
|
16
|
+
background: var(--bs-surface-base);
|
|
17
|
+
/* Only .bs-dialog__heading set a themed color before this -- body/footer slot content had no
|
|
18
|
+
color rule anywhere in this file, so it inherited whatever color the *consuming page* happened
|
|
19
|
+
to have, not this dialog's own dark/light-themed token. Invisible in dark mode specifically
|
|
20
|
+
because the surface flipped dark via --bs-surface-raised while the text stayed whatever the
|
|
21
|
+
page's own default was. Setting it here gives every slotted section a themed default to
|
|
22
|
+
inherit, unless a section (like heading) needs its own explicit override anyway. */
|
|
23
|
+
color: var(--bs-text-default);
|
|
24
|
+
border-radius: var(--bs-border-radius-200);
|
|
25
|
+
box-shadow: var(--bs-shadow-xl);
|
|
26
|
+
font-family: inherit;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.bs-dialog__dialog--sm {
|
|
30
|
+
width: 360px;
|
|
31
|
+
}
|
|
32
|
+
.bs-dialog__dialog--md {
|
|
33
|
+
width: 560px;
|
|
34
|
+
}
|
|
35
|
+
.bs-dialog__dialog--lg {
|
|
36
|
+
width: 800px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Vertical rhythm follows the Figma "Dialog" spec: 16px between the dialog edge/image/icon and the
|
|
40
|
+
heading, 8px between the heading and body content, 16px between the body and footer/dialog edge
|
|
41
|
+
-- no divider lines anywhere. Achieved with a mix of each section's own padding (top 16, bottom 8
|
|
42
|
+
here) and the sibling-selector rule below, rather than a single flex `gap` on the dialog, since a
|
|
43
|
+
`gap` would add unwanted space even when the preceding image/icon wrapper is empty. */
|
|
44
|
+
.bs-dialog__header {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
padding: var(--bs-spacing-200) var(--bs-spacing-200) var(--bs-spacing-100);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* The image/icon wrapper above already provides its own bottom margin when it has content (see
|
|
52
|
+
.bs-dialog__image--visible / .bs-dialog__icon--visible below) -- without this, the header's own
|
|
53
|
+
top padding would stack on top of that margin for a doubled gap. */
|
|
54
|
+
.bs-dialog__image--visible + .bs-dialog__header,
|
|
55
|
+
.bs-dialog__icon--visible + .bs-dialog__header {
|
|
56
|
+
padding-top: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bs-dialog__heading {
|
|
60
|
+
font-size: var(--bs-font-size-lg);
|
|
61
|
+
font-weight: var(--bs-font-weight-semibold);
|
|
62
|
+
color: var(--bs-text-default);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Both close buttons are real <bs-icon-button> elements now (variant="subtle" inline in the header,
|
|
66
|
+
variant="neutral" floating -- that variant/token pairing is an exact match for the Figma "Dialog"
|
|
67
|
+
spec's raised, bordered floating close, confirmed against bs-icon-button.css's own token aliases),
|
|
68
|
+
so this only needs to position the floating one -- everything else (size, background, border,
|
|
69
|
+
hover/focus states) already comes from bs-icon-button itself. */
|
|
70
|
+
.bs-dialog__close--floating {
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: var(--bs-spacing-200);
|
|
73
|
+
right: var(--bs-spacing-200);
|
|
74
|
+
z-index: 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bs-dialog__body {
|
|
78
|
+
/* No top padding -- the header's own bottom padding (8px) already provides the heading-to-body
|
|
79
|
+
gap, so this only needs to handle the sides and the bottom gap to the footer/dialog edge. */
|
|
80
|
+
padding: 0 var(--bs-spacing-200) var(--bs-spacing-200);
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.bs-dialog__body--centered {
|
|
85
|
+
text-align: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.bs-dialog__footer--visible {
|
|
89
|
+
display: flex;
|
|
90
|
+
justify-content: flex-end;
|
|
91
|
+
gap: var(--bs-spacing-200);
|
|
92
|
+
/* No top padding -- the body's own bottom padding (16px) already provides the body-to-footer
|
|
93
|
+
gap, avoiding a doubled gap. */
|
|
94
|
+
padding: 0 var(--bs-spacing-200) var(--bs-spacing-200);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Empty by default (no padding/margin) -- only visible when the image slot has content, same
|
|
98
|
+
"reserve no space when empty" pattern as .bs-dialog__footer--visible above. */
|
|
99
|
+
.bs-dialog__image--visible {
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
border-radius: var(--bs-border-radius-200) var(--bs-border-radius-200) 0 0;
|
|
102
|
+
margin-bottom: var(--bs-spacing-200);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.bs-dialog__image--visible ::slotted(img) {
|
|
106
|
+
display: block;
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: auto;
|
|
109
|
+
object-fit: cover;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Only rendered at all when `centered` is true (see render()) -- empty by default, same
|
|
113
|
+
"reserve no space when empty" pattern as .bs-dialog__footer--visible above. */
|
|
114
|
+
.bs-dialog__icon--visible {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
padding: var(--bs-spacing-200) var(--bs-spacing-200) 0;
|
|
119
|
+
margin-bottom: var(--bs-spacing-200);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.bs-dialog__icon--visible ::slotted(*) {
|
|
123
|
+
width: 64px;
|
|
124
|
+
height: 64px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.bs-dialog__header--centered {
|
|
128
|
+
justify-content: center;
|
|
129
|
+
text-align: center;
|
|
130
|
+
}
|