@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,42 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-stepper', () => {
|
|
3
|
+
it('propagates computedState to slotted steps based on position relative to currentStep', async () => {
|
|
4
|
+
const { root, waitForChanges } = await render(h("bs-stepper", { currentStep: 2 }, h("bs-stepper-step", { name: "Cart" }), h("bs-stepper-step", { name: "Shipping" }), h("bs-stepper-step", { name: "Payment" }), h("bs-stepper-step", { name: "Confirm" })));
|
|
5
|
+
await waitForChanges();
|
|
6
|
+
const steps = root.querySelectorAll('bs-stepper-step');
|
|
7
|
+
expect(steps[0].computedState).toBe('done');
|
|
8
|
+
expect(steps[1].computedState).toBe('done');
|
|
9
|
+
expect(steps[2].computedState).toBe('current');
|
|
10
|
+
expect(steps[3].computedState).toBe('enabled');
|
|
11
|
+
});
|
|
12
|
+
it('re-propagates computedState when currentStep changes', async () => {
|
|
13
|
+
const { root, waitForChanges } = await render(h("bs-stepper", { currentStep: 0 }, h("bs-stepper-step", { name: "A" }), h("bs-stepper-step", { name: "B" })));
|
|
14
|
+
await waitForChanges();
|
|
15
|
+
root.currentStep = 1;
|
|
16
|
+
await waitForChanges();
|
|
17
|
+
const steps = root.querySelectorAll('bs-stepper-step');
|
|
18
|
+
expect(steps[0].computedState).toBe('done');
|
|
19
|
+
expect(steps[1].computedState).toBe('current');
|
|
20
|
+
});
|
|
21
|
+
it('propagates direction and showDescription to slotted steps', async () => {
|
|
22
|
+
const { root, waitForChanges } = await render(h("bs-stepper", { direction: "vertical", showDescription: false }, h("bs-stepper-step", { name: "A" })));
|
|
23
|
+
await waitForChanges();
|
|
24
|
+
const step = root.querySelector('bs-stepper-step');
|
|
25
|
+
expect(step.direction).toBe('vertical');
|
|
26
|
+
expect(step.showDescription).toBe(false);
|
|
27
|
+
});
|
|
28
|
+
it('propagates the current props to a step added after initial render', async () => {
|
|
29
|
+
// currentStep=0 and this being the only (so index-0) step once appended -- 0 === 0 -> "current".
|
|
30
|
+
const { root, waitForChanges } = await render(h("bs-stepper", { currentStep: 0 }));
|
|
31
|
+
await waitForChanges();
|
|
32
|
+
const step = document.createElement('bs-stepper-step');
|
|
33
|
+
step.setAttribute('name', 'Late add');
|
|
34
|
+
root.appendChild(step);
|
|
35
|
+
await waitForChanges();
|
|
36
|
+
expect(step.computedState).toBe('current');
|
|
37
|
+
});
|
|
38
|
+
it('reflects the direction attribute for the container itself', async () => {
|
|
39
|
+
const { root } = await render(h("bs-stepper", { direction: "vertical" }));
|
|
40
|
+
expect(root).toEqualAttribute('direction', 'vertical');
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-stepper-edge-padding: Horizontal padding, direction="horizontal" only. Aliased to
|
|
3
|
+
* --bs-spacing-800. Every step's name/description centers under its own icon (see
|
|
4
|
+
* bs-stepper-step.css), including the first and last steps -- whose icons sit flush against this
|
|
5
|
+
* container's own edges. Without this padding, a first/last step's centered text has room to
|
|
6
|
+
* overflow in only one direction and clips against the container edge (confirmed by measuring a
|
|
7
|
+
* real render: a description clipped to a negative x position). This padding exists purely to give
|
|
8
|
+
* that overflow somewhere to go; it isn't a general "breathing room" affordance for content that
|
|
9
|
+
* fits.
|
|
10
|
+
*/
|
|
11
|
+
/* This container renders a bare <slot> with no wrapping element (see bs-stepper.tsx), so :host
|
|
12
|
+
itself is what establishes the flex row/column context each slotted bs-stepper-step's own
|
|
13
|
+
`:host(.bs-stepper-step--horizontal) { flex: 1 1 0; }` (etc.) expects from its parent. */
|
|
14
|
+
:host {
|
|
15
|
+
display: flex;
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
--bs-stepper-edge-padding: var(--bs-spacing-800);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host([direction='vertical']) {
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host(:not([direction='vertical'])) {
|
|
26
|
+
flex-direction: row;
|
|
27
|
+
align-items: flex-start;
|
|
28
|
+
padding: 0 var(--bs-stepper-edge-padding);
|
|
29
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A sequence of named steps showing overall progress through a multi-step flow (e.g. a checkout,
|
|
4
|
+
* an onboarding wizard) -- each step reads as enabled (not yet reached), current, done, error, or
|
|
5
|
+
* disabled, connected by a rail between them.
|
|
6
|
+
*
|
|
7
|
+
* This container is intentionally thin: it renders a `<slot>` for `<bs-stepper-step>` children and
|
|
8
|
+
* propagates `currentStep`/`direction`/`showDescription` down to them as JS properties whenever any
|
|
9
|
+
* of those change or the slotted children themselves change -- the same "container pushes state
|
|
10
|
+
* onto its slotted children" pattern `bs-tabs` uses for `selected` and `bs-breadcrumbs` uses for
|
|
11
|
+
* `size`. Each step computes its own `enabled`/`current`/`done` state from its position among its
|
|
12
|
+
* siblings relative to `currentStep`, unless that step's own `error`/`disabled` prop overrides it.
|
|
13
|
+
*
|
|
14
|
+
* This is a static status display, not an interactive control -- Figma's spec shows no
|
|
15
|
+
* hover/pressed treatment on any step, so nothing here is clickable.
|
|
16
|
+
*
|
|
17
|
+
* ## When to use
|
|
18
|
+
* - Showing where the user is in a fixed, ordered, multi-step flow.
|
|
19
|
+
*
|
|
20
|
+
* ## When not to use
|
|
21
|
+
* - A flow whose steps aren't fixed/known in advance -- a stepper implies the full sequence is
|
|
22
|
+
* already known.
|
|
23
|
+
* - As a substitute for actual in-page navigation between steps -- pair this with real controls
|
|
24
|
+
* (Next/Back buttons) elsewhere in the flow, this component only displays status.
|
|
25
|
+
*
|
|
26
|
+
* @slot - Default slot: the `<bs-stepper-step>` elements making up the sequence, in order.
|
|
27
|
+
*/
|
|
28
|
+
export class BsStepper {
|
|
29
|
+
el;
|
|
30
|
+
/** 0-indexed: which step is current. Every step before this index reads as "done" (unless that
|
|
31
|
+
* step's own `error`/`disabled` overrides it), every step after reads as "enabled". */
|
|
32
|
+
currentStep = 0;
|
|
33
|
+
/** `horizontal` (icon above name/description, connected by a horizontal rail) or `vertical`
|
|
34
|
+
* (icon beside name/description, connected by a vertical rail). Propagated to every slotted
|
|
35
|
+
* `bs-stepper-step`, and reflected as an attribute so this container's own `:host` CSS can switch
|
|
36
|
+
* its `flex-direction` to match -- a bare `<slot>` with no wrapping element (see `render()`)
|
|
37
|
+
* means the slotted steps' flex-row/column layout comes directly from `:host` here, not from any
|
|
38
|
+
* wrapper div. */
|
|
39
|
+
direction = 'horizontal';
|
|
40
|
+
/** Whether each step's description renders at all. Propagated to every slotted
|
|
41
|
+
* `bs-stepper-step`. */
|
|
42
|
+
showDescription = true;
|
|
43
|
+
onPropChange() {
|
|
44
|
+
this.propagateToSteps();
|
|
45
|
+
}
|
|
46
|
+
componentDidLoad() {
|
|
47
|
+
this.propagateToSteps();
|
|
48
|
+
}
|
|
49
|
+
onSlotChange = () => {
|
|
50
|
+
this.propagateToSteps();
|
|
51
|
+
};
|
|
52
|
+
propagateToSteps() {
|
|
53
|
+
const steps = this.el.querySelectorAll(':scope > bs-stepper-step');
|
|
54
|
+
steps.forEach((step, index) => {
|
|
55
|
+
const computedState = index < this.currentStep ? 'done' : index === this.currentStep ? 'current' : 'enabled';
|
|
56
|
+
Object.assign(step, {
|
|
57
|
+
computedState,
|
|
58
|
+
direction: this.direction,
|
|
59
|
+
showDescription: this.showDescription,
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return h("slot", { key: 'aed14a6d1d81b19d7d53fe9a536b2eb4912a2108', onSlotchange: this.onSlotChange });
|
|
65
|
+
}
|
|
66
|
+
static get is() { return "bs-stepper"; }
|
|
67
|
+
static get encapsulation() { return "shadow"; }
|
|
68
|
+
static get originalStyleUrls() {
|
|
69
|
+
return {
|
|
70
|
+
"$": ["bs-stepper.css"]
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static get styleUrls() {
|
|
74
|
+
return {
|
|
75
|
+
"$": ["bs-stepper.css"]
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
static get properties() {
|
|
79
|
+
return {
|
|
80
|
+
"currentStep": {
|
|
81
|
+
"type": "number",
|
|
82
|
+
"mutable": false,
|
|
83
|
+
"complexType": {
|
|
84
|
+
"original": "number",
|
|
85
|
+
"resolved": "number",
|
|
86
|
+
"references": {}
|
|
87
|
+
},
|
|
88
|
+
"required": false,
|
|
89
|
+
"optional": false,
|
|
90
|
+
"docs": {
|
|
91
|
+
"tags": [],
|
|
92
|
+
"text": "0-indexed: which step is current. Every step before this index reads as \"done\" (unless that\nstep's own `error`/`disabled` overrides it), every step after reads as \"enabled\"."
|
|
93
|
+
},
|
|
94
|
+
"getter": false,
|
|
95
|
+
"setter": false,
|
|
96
|
+
"reflect": false,
|
|
97
|
+
"attribute": "current-step",
|
|
98
|
+
"defaultValue": "0"
|
|
99
|
+
},
|
|
100
|
+
"direction": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "BsStepperDirection",
|
|
105
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
106
|
+
"references": {
|
|
107
|
+
"BsStepperDirection": {
|
|
108
|
+
"location": "import",
|
|
109
|
+
"path": "../bs-stepper-step/bs-stepper-step",
|
|
110
|
+
"id": "src/components/bs-stepper/bs-stepper-step/bs-stepper-step.tsx::BsStepperDirection",
|
|
111
|
+
"referenceLocation": "BsStepperDirection"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": false,
|
|
116
|
+
"optional": false,
|
|
117
|
+
"docs": {
|
|
118
|
+
"tags": [],
|
|
119
|
+
"text": "`horizontal` (icon above name/description, connected by a horizontal rail) or `vertical`\n(icon beside name/description, connected by a vertical rail). Propagated to every slotted\n`bs-stepper-step`, and reflected as an attribute so this container's own `:host` CSS can switch\nits `flex-direction` to match -- a bare `<slot>` with no wrapping element (see `render()`)\nmeans the slotted steps' flex-row/column layout comes directly from `:host` here, not from any\nwrapper div."
|
|
120
|
+
},
|
|
121
|
+
"getter": false,
|
|
122
|
+
"setter": false,
|
|
123
|
+
"reflect": true,
|
|
124
|
+
"attribute": "direction",
|
|
125
|
+
"defaultValue": "'horizontal'"
|
|
126
|
+
},
|
|
127
|
+
"showDescription": {
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "boolean",
|
|
132
|
+
"resolved": "boolean",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": false,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": "Whether each step's description renders at all. Propagated to every slotted\n`bs-stepper-step`."
|
|
140
|
+
},
|
|
141
|
+
"getter": false,
|
|
142
|
+
"setter": false,
|
|
143
|
+
"reflect": false,
|
|
144
|
+
"attribute": "show-description",
|
|
145
|
+
"defaultValue": "true"
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
static get elementRef() { return "el"; }
|
|
150
|
+
static get watchers() {
|
|
151
|
+
return [{
|
|
152
|
+
"propName": "currentStep",
|
|
153
|
+
"methodName": "onPropChange"
|
|
154
|
+
}, {
|
|
155
|
+
"propName": "direction",
|
|
156
|
+
"methodName": "onPropChange"
|
|
157
|
+
}, {
|
|
158
|
+
"propName": "showDescription",
|
|
159
|
+
"methodName": "onPropChange"
|
|
160
|
+
}];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../../stories-utils";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Components/bs-stepper',
|
|
5
|
+
parameters: { docs: { description: { component: componentDescription('bs-stepper') } } },
|
|
6
|
+
render: args => html `
|
|
7
|
+
<bs-stepper current-step=${args.currentStep} direction=${args.direction} show-description=${args.showDescription}>
|
|
8
|
+
<bs-stepper-step name="Cart" description="Review items"></bs-stepper-step>
|
|
9
|
+
<bs-stepper-step name="Shipping" description="Delivery address"></bs-stepper-step>
|
|
10
|
+
<bs-stepper-step name="Payment" description="Card details"></bs-stepper-step>
|
|
11
|
+
<bs-stepper-step name="Confirm" description="Review order"></bs-stepper-step>
|
|
12
|
+
</bs-stepper>
|
|
13
|
+
`,
|
|
14
|
+
argTypes: {
|
|
15
|
+
currentStep: { control: { type: 'number', min: 0, max: 3 }, description: propDescription('bs-stepper', 'currentStep') },
|
|
16
|
+
direction: { control: { type: 'select' }, options: ['horizontal', 'vertical'], description: propDescription('bs-stepper', 'direction') },
|
|
17
|
+
showDescription: { control: 'boolean', description: propDescription('bs-stepper', 'showDescription') },
|
|
18
|
+
},
|
|
19
|
+
args: {
|
|
20
|
+
currentStep: 1,
|
|
21
|
+
direction: 'horizontal',
|
|
22
|
+
showDescription: true,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
export const Default = {};
|
|
27
|
+
export const Vertical = {
|
|
28
|
+
args: { direction: 'vertical' },
|
|
29
|
+
};
|
|
30
|
+
// A step's own `error` attribute overrides its position-derived state -- Shipping shows the error
|
|
31
|
+
// treatment even though it's before currentStep (which would normally read as "done").
|
|
32
|
+
export const WithError = {
|
|
33
|
+
name: 'With an error step',
|
|
34
|
+
args: { currentStep: 2 },
|
|
35
|
+
render: args => html `
|
|
36
|
+
<bs-stepper current-step=${args.currentStep} direction=${args.direction} show-description=${args.showDescription}>
|
|
37
|
+
<bs-stepper-step name="Cart" description="Review items"></bs-stepper-step>
|
|
38
|
+
<bs-stepper-step name="Shipping" description="Delivery address" error></bs-stepper-step>
|
|
39
|
+
<bs-stepper-step name="Payment" description="Card details"></bs-stepper-step>
|
|
40
|
+
<bs-stepper-step name="Confirm" description="Review order"></bs-stepper-step>
|
|
41
|
+
</bs-stepper>
|
|
42
|
+
`,
|
|
43
|
+
};
|
|
44
|
+
export const WithDisabledStep = {
|
|
45
|
+
name: 'With a disabled step',
|
|
46
|
+
args: { currentStep: 2 },
|
|
47
|
+
render: args => html `
|
|
48
|
+
<bs-stepper current-step=${args.currentStep} direction=${args.direction} show-description=${args.showDescription}>
|
|
49
|
+
<bs-stepper-step name="Cart" description="Review items"></bs-stepper-step>
|
|
50
|
+
<bs-stepper-step name="Shipping" description="Delivery address"></bs-stepper-step>
|
|
51
|
+
<bs-stepper-step name="Payment" description="Card details"></bs-stepper-step>
|
|
52
|
+
<bs-stepper-step name="Confirm" description="Review order" disabled></bs-stepper-step>
|
|
53
|
+
</bs-stepper>
|
|
54
|
+
`,
|
|
55
|
+
};
|
|
56
|
+
export const NoDescription = {
|
|
57
|
+
name: 'No description',
|
|
58
|
+
args: { showDescription: false },
|
|
59
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-stepper-step', () => {
|
|
3
|
+
it('defaults to enabled/horizontal/showDescription=true when used standalone', async () => {
|
|
4
|
+
const { root } = await render(h("bs-stepper-step", { name: "Cart" }));
|
|
5
|
+
expect(root.shadowRoot.querySelector('[part="icon"]')).toHaveClass('bs-stepper-step__icon--enabled');
|
|
6
|
+
expect(root).toHaveClass('bs-stepper-step--horizontal');
|
|
7
|
+
});
|
|
8
|
+
it('renders the name text', async () => {
|
|
9
|
+
const { root } = await render(h("bs-stepper-step", { name: "Shipping" }));
|
|
10
|
+
expect(root.shadowRoot.querySelector('[part="name"]').textContent.trim()).toBe('Shipping');
|
|
11
|
+
});
|
|
12
|
+
describe('state resolution', () => {
|
|
13
|
+
it('error overrides computedState', async () => {
|
|
14
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", computedState: "done", error: true }));
|
|
15
|
+
expect(root.shadowRoot.querySelector('[part="icon"]')).toHaveClass('bs-stepper-step__icon--error');
|
|
16
|
+
});
|
|
17
|
+
it('disabled overrides both computedState and error', async () => {
|
|
18
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", computedState: "current", error: true, disabled: true }));
|
|
19
|
+
expect(root.shadowRoot.querySelector('[part="icon"]')).toHaveClass('bs-stepper-step__icon--disabled');
|
|
20
|
+
});
|
|
21
|
+
it('falls back to computedState when neither error nor disabled is set', async () => {
|
|
22
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", computedState: "done" }));
|
|
23
|
+
expect(root.shadowRoot.querySelector('[part="icon"]')).toHaveClass('bs-stepper-step__icon--done');
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
describe('icon content per state', () => {
|
|
27
|
+
it('done shows a checkmark', async () => {
|
|
28
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", computedState: "done" }));
|
|
29
|
+
expect(root.shadowRoot.querySelector('[part="icon"] svg')).not.toBeNull();
|
|
30
|
+
});
|
|
31
|
+
it('current shows an inner dot, no svg', async () => {
|
|
32
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", computedState: "current" }));
|
|
33
|
+
expect(root.shadowRoot.querySelector('.bs-stepper-step__icon-dot')).not.toBeNull();
|
|
34
|
+
expect(root.shadowRoot.querySelector('[part="icon"] svg')).toBeNull();
|
|
35
|
+
});
|
|
36
|
+
it('enabled shows neither', async () => {
|
|
37
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", computedState: "enabled" }));
|
|
38
|
+
expect(root.shadowRoot.querySelector('.bs-stepper-step__icon-dot')).toBeNull();
|
|
39
|
+
expect(root.shadowRoot.querySelector('[part="icon"] svg')).toBeNull();
|
|
40
|
+
});
|
|
41
|
+
it('error shows an exclamation icon', async () => {
|
|
42
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", error: true }));
|
|
43
|
+
expect(root.shadowRoot.querySelector('[part="icon"] svg')).not.toBeNull();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
describe('showDescription', () => {
|
|
47
|
+
it('renders the description when set and showDescription is true', async () => {
|
|
48
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", description: "Some detail", showDescription: true }));
|
|
49
|
+
expect(root.shadowRoot.querySelector('[part="description"]').textContent.trim()).toBe('Some detail');
|
|
50
|
+
});
|
|
51
|
+
it('does not render a description when showDescription is false', async () => {
|
|
52
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", description: "Some detail", showDescription: false }));
|
|
53
|
+
expect(root.shadowRoot.querySelector('[part="description"]')).toBeNull();
|
|
54
|
+
});
|
|
55
|
+
it('does not render a description that was never set, even with showDescription true', async () => {
|
|
56
|
+
const { root } = await render(h("bs-stepper-step", { name: "A", showDescription: true }));
|
|
57
|
+
expect(root.shadowRoot.querySelector('[part="description"]')).toBeNull();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
it('hides its own trailing connector when last in its parent, regardless of tag mix', async () => {
|
|
61
|
+
const container = document.createElement('div');
|
|
62
|
+
container.innerHTML = '<bs-stepper-step name="A"></bs-stepper-step><bs-stepper-step name="B"></bs-stepper-step>';
|
|
63
|
+
document.body.appendChild(container);
|
|
64
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
65
|
+
await new Promise(resolve => requestAnimationFrame(resolve));
|
|
66
|
+
const [first, second] = Array.from(container.querySelectorAll('bs-stepper-step'));
|
|
67
|
+
const firstConnector = first.shadowRoot.querySelector('.bs-stepper-step__connector');
|
|
68
|
+
const secondConnector = second.shadowRoot.querySelector('.bs-stepper-step__connector');
|
|
69
|
+
expect(getComputedStyle(firstConnector).visibility).not.toBe('hidden');
|
|
70
|
+
expect(getComputedStyle(secondConnector).visibility).toBe('hidden');
|
|
71
|
+
container.remove();
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-stepper-step-gap: Gap between the icon/connector row (or column) and the label. Aliased to --bs-spacing-100.
|
|
3
|
+
* @prop --bs-stepper-step-icon-size: Width/height of the icon/indicator circle. 24px, matching Figma exactly.
|
|
4
|
+
* @prop --bs-stepper-step-icon-border-width: Border width of the icon circle. 1.5px, matching Figma exactly.
|
|
5
|
+
* @prop --bs-stepper-step-connector-color: Rail color to the next step. Aliased to --bs-border-default. Figma's spec shows one static rail color regardless of adjacent steps' state -- completion is conveyed by the icons, not the rail.
|
|
6
|
+
* @prop --bs-stepper-step-connector-thickness: Rail line thickness. 2px, matching Figma exactly.
|
|
7
|
+
* @prop --bs-stepper-step-icon-border-enabled: Icon border, state="enabled" (not yet reached). Aliased to --bs-border-default.
|
|
8
|
+
* @prop --bs-stepper-step-icon-border-current: Icon border, state="current". Aliased to --bs-color-primary-default.
|
|
9
|
+
* @prop --bs-stepper-step-icon-dot-current: Inner filled dot color, state="current". Aliased to --bs-color-primary-default.
|
|
10
|
+
* @prop --bs-stepper-step-icon-bg-done: Icon background, state="done". Aliased to --bs-color-primary-default.
|
|
11
|
+
* @prop --bs-stepper-step-icon-color-done: Checkmark icon color, state="done". Aliased to --bs-text-on-action.
|
|
12
|
+
* @prop --bs-stepper-step-icon-border-error: Icon border, state="error". Aliased to --bs-border-error.
|
|
13
|
+
* @prop --bs-stepper-step-icon-color-error: Exclamation icon color, state="error". Aliased to --bs-border-error.
|
|
14
|
+
* @prop --bs-stepper-step-icon-border-disabled: Icon border, state="disabled". Aliased to --bs-border-neutral-disabled.
|
|
15
|
+
* @prop --bs-stepper-step-text-enabled: Name/description color, state="enabled"/"error". Aliased to --bs-text-muted.
|
|
16
|
+
* @prop --bs-stepper-step-text-active: Name/description color, state="current"/"done". Aliased to --bs-text-default.
|
|
17
|
+
* @prop --bs-stepper-step-text-disabled: Name/description color, state="disabled". Aliased to --bs-text-on-disabled.
|
|
18
|
+
* @prop --bs-stepper-step-font-size: Aliased to --bs-font-size-md.
|
|
19
|
+
* @prop --bs-stepper-step-line-height: Aliased to --bs-line-height-body-md.
|
|
20
|
+
* @prop --bs-stepper-step-name-font-weight: Aliased to --bs-font-weight-semibold.
|
|
21
|
+
* @prop --bs-stepper-step-description-font-weight: Aliased to --bs-font-weight-regular.
|
|
22
|
+
*/
|
|
23
|
+
:host {
|
|
24
|
+
display: flex;
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
font-size: var(--bs-stepper-step-font-size);
|
|
27
|
+
line-height: calc(var(--bs-stepper-step-line-height) * 1px);
|
|
28
|
+
|
|
29
|
+
--bs-stepper-step-gap: var(--bs-spacing-100);
|
|
30
|
+
--bs-stepper-step-icon-size: 24px;
|
|
31
|
+
--bs-stepper-step-icon-border-width: 1.5px;
|
|
32
|
+
--bs-stepper-step-connector-color: var(--bs-border-default);
|
|
33
|
+
--bs-stepper-step-connector-thickness: 2px;
|
|
34
|
+
|
|
35
|
+
--bs-stepper-step-icon-border-enabled: var(--bs-border-default);
|
|
36
|
+
--bs-stepper-step-icon-border-current: var(--bs-color-primary-default);
|
|
37
|
+
--bs-stepper-step-icon-dot-current: var(--bs-color-primary-default);
|
|
38
|
+
--bs-stepper-step-icon-bg-done: var(--bs-color-primary-default);
|
|
39
|
+
--bs-stepper-step-icon-color-done: var(--bs-text-on-action);
|
|
40
|
+
--bs-stepper-step-icon-border-error: var(--bs-border-error);
|
|
41
|
+
--bs-stepper-step-icon-color-error: var(--bs-border-error);
|
|
42
|
+
--bs-stepper-step-icon-border-disabled: var(--bs-border-neutral-disabled);
|
|
43
|
+
|
|
44
|
+
--bs-stepper-step-text-enabled: var(--bs-text-muted);
|
|
45
|
+
--bs-stepper-step-text-active: var(--bs-text-default);
|
|
46
|
+
--bs-stepper-step-text-disabled: var(--bs-text-on-disabled);
|
|
47
|
+
|
|
48
|
+
--bs-stepper-step-font-size: var(--bs-font-size-md);
|
|
49
|
+
--bs-stepper-step-line-height: var(--bs-line-height-body-md);
|
|
50
|
+
--bs-stepper-step-name-font-weight: var(--bs-font-weight-semibold);
|
|
51
|
+
--bs-stepper-step-description-font-weight: var(--bs-font-weight-regular);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Each step lays out and grows evenly across the row (horizontal) or stacks full-width (vertical)
|
|
55
|
+
-- the parent <bs-stepper> just renders a plain <slot>, it doesn't wrap children in any list/flex
|
|
56
|
+
scaffolding of its own. */
|
|
57
|
+
:host(.bs-stepper-step--horizontal) {
|
|
58
|
+
flex: 1 1 0;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host(.bs-stepper-step--vertical) {
|
|
63
|
+
width: 100%;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
/* Same reasoning as above, just on the cross axis: default `stretch` makes .top match .label's
|
|
66
|
+
height, which the connector inside .top needs (via flex-grow) to visually reach the next step's
|
|
67
|
+
icon regardless of how many lines the label wraps to. */
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* The icon+connector pairing: a row in horizontal mode (icon left, rail extends right to the next
|
|
71
|
+
step), a column in vertical mode (icon on top, rail extends down to the next step). */
|
|
72
|
+
.bs-stepper-step__top {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Stretches to the step's full width (default `stretch`, from .top having no explicit width/
|
|
78
|
+
align-self) -- the icon (flex-shrink: 0, first child) stays pinned to its left edge, and the
|
|
79
|
+
connector below fills whatever's left via flex: 1 1 auto. This means every step's icon sits at
|
|
80
|
+
the same relative x (its own step's left edge), regardless of the step's role -- only .label's
|
|
81
|
+
*text* alignment (see below) needs to vary by first/middle/last, not the icon/connector row. */
|
|
82
|
+
:host(.bs-stepper-step--horizontal) .bs-stepper-step__top {
|
|
83
|
+
flex-direction: row;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host(.bs-stepper-step--vertical) .bs-stepper-step__top {
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.bs-stepper-step__icon {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
flex-shrink: 0;
|
|
95
|
+
width: var(--bs-stepper-step-icon-size);
|
|
96
|
+
height: var(--bs-stepper-step-icon-size);
|
|
97
|
+
border-radius: 50%;
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.bs-stepper-step__icon svg {
|
|
102
|
+
width: 16px;
|
|
103
|
+
height: 16px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.bs-stepper-step__icon--enabled {
|
|
107
|
+
border: var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-enabled);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.bs-stepper-step__icon--current {
|
|
111
|
+
border: var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-current);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.bs-stepper-step__icon-dot {
|
|
115
|
+
width: 16px;
|
|
116
|
+
height: 16px;
|
|
117
|
+
border-radius: 50%;
|
|
118
|
+
background: var(--bs-stepper-step-icon-dot-current);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.bs-stepper-step__icon--done {
|
|
122
|
+
background: var(--bs-stepper-step-icon-bg-done);
|
|
123
|
+
color: var(--bs-stepper-step-icon-color-done);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.bs-stepper-step__icon--error {
|
|
127
|
+
border: var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-error);
|
|
128
|
+
color: var(--bs-stepper-step-icon-color-error);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.bs-stepper-step__icon--disabled {
|
|
132
|
+
border: var(--bs-stepper-step-icon-border-width) solid var(--bs-stepper-step-icon-border-disabled);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.bs-stepper-step__connector {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* A normal flex child of .top, growing to fill whatever's left after the icon's fixed width --
|
|
142
|
+
NOT absolutely positioned. An earlier attempt anchored this to :host with a fixed left offset
|
|
143
|
+
assuming every icon sits at the step's left edge, which broke the moment .top's own alignment
|
|
144
|
+
varied (a centered/end-aligned icon no longer started where the connector assumed) -- the line
|
|
145
|
+
rendered straight through the icon on every middle/last step. Since .top (and therefore the icon)
|
|
146
|
+
is now always left-pinned (see .top's own comment above), a plain flex: 1 1 auto here reaches from
|
|
147
|
+
the icon's own right edge to .top's right edge with no positioning assumptions to get wrong. */
|
|
148
|
+
:host(.bs-stepper-step--horizontal) .bs-stepper-step__connector {
|
|
149
|
+
flex: 1 1 auto;
|
|
150
|
+
margin-left: var(--bs-stepper-step-gap);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:host(.bs-stepper-step--vertical) .bs-stepper-step__connector {
|
|
154
|
+
/* Unlike horizontal mode above, vertical's connector stays in normal flex flow (inside .top,
|
|
155
|
+
which is itself flex-direction: column here) rather than switching to absolute positioning --
|
|
156
|
+
it doesn't have the same bug, since a taller icon+connector column doesn't shift .label's
|
|
157
|
+
horizontal position the way a wider one did for horizontal mode's centered/right-aligned text.
|
|
158
|
+
flex: 1 1 auto (grow to fill), not a percentage size -- a percentage only resolves against a
|
|
159
|
+
parent with a *definite* size along that axis, which .top doesn't reliably have (it's sized by
|
|
160
|
+
stretch/content, not an explicit value). flex-direction: column -- without this, the wrapper
|
|
161
|
+
stays row-direction (the base rule's default), so the line's own `flex: 1 1 auto` below tries
|
|
162
|
+
to grow WIDTH (the row's main axis) instead of height, while an explicit width: 2px pins it
|
|
163
|
+
right back down -- net effect, confirmed via a real measurement, was the line collapsing to 0
|
|
164
|
+
height. Also gives the wrapper an explicit width matching the icon, rather than shrinking to
|
|
165
|
+
the 2px-wide line's own size (which left the line off-center under the icon above it). */
|
|
166
|
+
flex: 1 1 auto;
|
|
167
|
+
flex-direction: column;
|
|
168
|
+
align-items: center;
|
|
169
|
+
width: var(--bs-stepper-step-icon-size);
|
|
170
|
+
margin: var(--bs-stepper-step-gap) 0;
|
|
171
|
+
min-height: var(--bs-stepper-step-icon-size);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.bs-stepper-step__connector-line {
|
|
175
|
+
display: block;
|
|
176
|
+
border-radius: calc(var(--bs-stepper-step-connector-thickness) / 2);
|
|
177
|
+
background: var(--bs-stepper-step-connector-color);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host(.bs-stepper-step--horizontal) .bs-stepper-step__connector-line {
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: var(--bs-stepper-step-connector-thickness);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:host(.bs-stepper-step--vertical) .bs-stepper-step__connector-line {
|
|
186
|
+
flex: 1 1 auto;
|
|
187
|
+
width: var(--bs-stepper-step-connector-thickness);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* This step is visually last -- pure DOM position (:last-child, not :last-of-type), so it works
|
|
191
|
+
correctly even if something other than bs-stepper-step is ever mixed in as a sibling. Hides the
|
|
192
|
+
trailing rail entirely; the icon/label content is unaffected. */
|
|
193
|
+
:host(:last-child) .bs-stepper-step__connector {
|
|
194
|
+
visibility: hidden;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.bs-stepper-step__label {
|
|
198
|
+
display: flex;
|
|
199
|
+
flex-direction: column;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* width: icon-size (not the step's full width) + align-self: flex-start pins this box under the
|
|
203
|
+
icon specifically -- the icon is always at the step's own left edge (see .top's comment above),
|
|
204
|
+
so anchoring .label there too, then letting its *content* overflow via align-items/text-align
|
|
205
|
+
below, centers the actual text relative to the icon regardless of how wide the trailing connector
|
|
206
|
+
is. (A flex item with an explicit cross-size doesn't stretch to fill the column's width the way
|
|
207
|
+
an auto-sized one would, so this needs align-self spelled out rather than relying on the host's
|
|
208
|
+
default `stretch`.) Every step centers the same way, including the first/last -- no
|
|
209
|
+
:first-child/:last-child override to left/right-align those two, unlike .connector's
|
|
210
|
+
:last-child rule below (which is unrelated: that one hides the trailing rail, not text
|
|
211
|
+
alignment). */
|
|
212
|
+
:host(.bs-stepper-step--horizontal) .bs-stepper-step__label {
|
|
213
|
+
margin-top: var(--bs-stepper-step-gap);
|
|
214
|
+
width: var(--bs-stepper-step-icon-size);
|
|
215
|
+
align-self: flex-start;
|
|
216
|
+
align-items: center;
|
|
217
|
+
text-align: center;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
:host(.bs-stepper-step--vertical) .bs-stepper-step__label {
|
|
221
|
+
margin-left: var(--bs-stepper-step-gap);
|
|
222
|
+
text-align: left;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* white-space: nowrap -- .label is deliberately narrowed to just the icon's width (see .label's own
|
|
226
|
+
comment above) so its *box* anchors under the icon while the *text* overflows past it. Without
|
|
227
|
+
this, a multi-word name/description doesn't overflow as one line -- a flex item's cross-axis
|
|
228
|
+
sizing (here, width, since .label is a column flex container) still wraps text word-by-word to
|
|
229
|
+
fit within the parent's available width before falling back to overflow, so e.g. "Review items"
|
|
230
|
+
split into "Review" / "items" onto two lines instead of extending past the 24px box as intended. */
|
|
231
|
+
.bs-stepper-step__name {
|
|
232
|
+
font-weight: var(--bs-stepper-step-name-font-weight);
|
|
233
|
+
white-space: nowrap;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.bs-stepper-step__description {
|
|
237
|
+
font-weight: var(--bs-stepper-step-description-font-weight);
|
|
238
|
+
white-space: nowrap;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.bs-stepper-step__label--enabled .bs-stepper-step__name,
|
|
242
|
+
.bs-stepper-step__label--enabled .bs-stepper-step__description,
|
|
243
|
+
.bs-stepper-step__label--error .bs-stepper-step__name,
|
|
244
|
+
.bs-stepper-step__label--error .bs-stepper-step__description {
|
|
245
|
+
color: var(--bs-stepper-step-text-enabled);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.bs-stepper-step__label--current .bs-stepper-step__name,
|
|
249
|
+
.bs-stepper-step__label--current .bs-stepper-step__description,
|
|
250
|
+
.bs-stepper-step__label--done .bs-stepper-step__name,
|
|
251
|
+
.bs-stepper-step__label--done .bs-stepper-step__description {
|
|
252
|
+
color: var(--bs-stepper-step-text-active);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.bs-stepper-step__label--disabled .bs-stepper-step__name,
|
|
256
|
+
.bs-stepper-step__label--disabled .bs-stepper-step__description {
|
|
257
|
+
color: var(--bs-stepper-step-text-disabled);
|
|
258
|
+
}
|