@brandsync/wc 1.7.0 → 1.9.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 +340 -24
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-fde5e9f1.entry.js → p-051d3064.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f243683f.entry.js → p-05c7de28.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2d6955d6.entry.js → p-062cfa34.entry.js} +1 -1
- package/dist/brandsync-wc/p-0e39b9cc.entry.js +1 -0
- package/dist/brandsync-wc/p-0eed6813.entry.js +1 -0
- package/dist/brandsync-wc/{p-d25b7b74.entry.js → p-107b1c5d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-538cc08e.entry.js → p-114d2fd8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6754dfa9.entry.js → p-1c0db4d6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4a1a5d6e.entry.js → p-1f7208cb.entry.js} +1 -1
- package/dist/brandsync-wc/p-2181378f.entry.js +1 -0
- package/dist/brandsync-wc/{p-d06543a5.entry.js → p-235ae012.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2700a63e.entry.js → p-275072dd.entry.js} +1 -1
- package/dist/brandsync-wc/p-27bbed83.entry.js +1 -0
- package/dist/brandsync-wc/p-2891d40b.entry.js +1 -0
- package/dist/brandsync-wc/p-29027559.entry.js +1 -0
- package/dist/brandsync-wc/{p-a36a0e6a.entry.js → p-3176d1d3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0d86c22d.entry.js → p-33e44094.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e427bbda.entry.js → p-360452c2.entry.js} +1 -1
- package/dist/brandsync-wc/p-36bf37d9.entry.js +1 -0
- package/dist/brandsync-wc/p-3b64e3cd.entry.js +1 -0
- package/dist/brandsync-wc/p-3ec74d35.entry.js +1 -0
- package/dist/brandsync-wc/p-4574a707.entry.js +1 -0
- package/dist/brandsync-wc/p-4e5dcaff.entry.js +1 -0
- package/dist/brandsync-wc/{p-61db6ce2.entry.js → p-61c1a2a3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-85c70f6d.entry.js → p-6331de9c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9c1be2a0.entry.js → p-6bf2f116.entry.js} +1 -1
- package/dist/brandsync-wc/p-6fd7dd6a.entry.js +1 -0
- package/dist/brandsync-wc/{p-c3a28a89.entry.js → p-70f64b25.entry.js} +1 -1
- package/dist/brandsync-wc/{p-06e9b45d.entry.js → p-7b00dd36.entry.js} +1 -1
- package/dist/brandsync-wc/{p-13e4966c.entry.js → p-7c94e6ae.entry.js} +1 -1
- package/dist/brandsync-wc/p-835a8dc7.entry.js +1 -0
- package/dist/brandsync-wc/{p-77433277.entry.js → p-8ee0153b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e1069ba9.entry.js → p-9f65f998.entry.js} +1 -1
- package/dist/brandsync-wc/p-9f6fe37d.entry.js +1 -0
- package/dist/brandsync-wc/{p-b2dc9886.entry.js → p-9f8852a0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-DuyFft7h.js → p-AgoOSYvW.js} +2 -2
- package/dist/brandsync-wc/{p-fba01c96.entry.js → p-a09e157f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-55e6438c.entry.js → p-a0d5a620.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8b2ab522.entry.js → p-a5feaad4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cbaa19ab.entry.js → p-a92eec48.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3eab22a5.entry.js → p-ae978c9a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f2ce9a1f.entry.js → p-bbcc47b0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-80cf96ff.entry.js → p-be2c1740.entry.js} +1 -1
- package/dist/brandsync-wc/p-c10d2529.entry.js +1 -0
- package/dist/brandsync-wc/{p-819a3dae.entry.js → p-c3f72584.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8b57f606.entry.js → p-c4de155c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c197cc95.entry.js → p-cfcf3f0a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f8f03334.entry.js → p-de7c946d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-600b5434.entry.js → p-e9b43754.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4bff9b4b.entry.js → p-f006d962.entry.js} +1 -1
- package/dist/brandsync-wc/p-f074f94e.entry.js +1 -0
- package/dist/brandsync-wc/{p-7ed5670e.entry.js → p-f7d47c17.entry.js} +1 -1
- package/dist/brandsync-wc/p-fc240aa0.entry.js +1 -0
- package/dist/brandsync-wc/{p-f518f486.entry.js → p-fc58c663.entry.js} +1 -1
- package/dist/brandsync-wc/{p-be14f99f.entry.js → p-fddc7bd1.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-accordion.cjs.entry.js +2 -2
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +2 -2
- package/dist/cjs/bs-attachment.cjs.entry.js +2 -2
- package/dist/cjs/bs-avatar.cjs.entry.js +1 -1
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +15 -3
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +16 -2
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-button.cjs.entry.js +23 -4
- package/dist/cjs/bs-card.cjs.entry.js +2 -2
- package/dist/cjs/bs-carousel.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox.cjs.entry.js +48 -3
- package/dist/cjs/bs-chip-filter.cjs.entry.js +2 -2
- package/dist/cjs/bs-chip-informative.cjs.entry.js +2 -2
- package/dist/cjs/bs-chip-input.cjs.entry.js +2 -2
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +20 -6
- package/dist/cjs/bs-dialog.cjs.entry.js +2 -2
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-button.cjs.entry.js +23 -4
- package/dist/cjs/bs-inline-tab.cjs.entry.js +11 -3
- package/dist/cjs/bs-input.cjs.entry.js +69 -5
- package/dist/cjs/bs-logo.cjs.entry.js +1 -1
- package/dist/cjs/bs-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-menu.cjs.entry.js +25 -3
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +119 -6
- package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress.cjs.entry.js +8 -3
- package/dist/cjs/bs-radio.cjs.entry.js +81 -12
- package/dist/cjs/bs-slider.cjs.entry.js +54 -2
- package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-stepper-step.cjs.entry.js +2 -2
- package/dist/cjs/bs-stepper.cjs.entry.js +3 -2
- package/dist/cjs/bs-switch.cjs.entry.js +36 -3
- package/dist/cjs/bs-tab.cjs.entry.js +11 -3
- package/dist/cjs/bs-tabs.cjs.entry.js +97 -3
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{index-D7e6DfLV.js → index-kk9YXF2S.js} +43 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/bs-a11y.cmp.test.js +54 -0
- package/dist/collection/components/bs-accordion/bs-accordion.css +5 -5
- package/dist/collection/components/bs-attachment/bs-attachment.css +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.css +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.js +63 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +32 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.js +45 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.css +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +30 -1
- package/dist/collection/components/bs-button/bs-button/bs-button.css +17 -10
- package/dist/collection/components/bs-button/bs-button/bs-button.js +16 -3
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +20 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.css +21 -4
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +18 -4
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.stories.js +10 -0
- package/dist/collection/components/bs-card/bs-card.css +4 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.css +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css +3 -3
- package/dist/collection/components/bs-checkbox/bs-checkbox.css +8 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +100 -2
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.css +4 -4
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.css +4 -4
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.css +5 -5
- package/dist/collection/components/bs-data-table/bs-data-table.cmp.test.js +19 -0
- package/dist/collection/components/bs-data-table/bs-data-table.css +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +19 -5
- package/dist/collection/components/bs-data-table/bs-data-table.stories.js +8 -1
- package/dist/collection/components/bs-dialog/bs-dialog.css +5 -1
- package/dist/collection/components/bs-form-association.cmp.test.js +172 -0
- package/dist/collection/components/bs-input/bs-input.css +10 -4
- package/dist/collection/components/bs-input/bs-input.js +82 -4
- package/dist/collection/components/bs-keyboard-nav.cmp.test.js +100 -0
- package/dist/collection/components/bs-logo/bs-logo.cmp.test.js +52 -3
- package/dist/collection/components/bs-menu/bs-menu.css +4 -0
- package/dist/collection/components/bs-menu/bs-menu.js +33 -1
- package/dist/collection/components/bs-menu/bs-menu.stories.js +54 -0
- package/dist/collection/components/bs-progress/bs-progress.js +27 -2
- package/dist/collection/components/bs-radio/bs-radio.cmp.test.js +4 -10
- package/dist/collection/components/bs-radio/bs-radio.css +7 -1
- package/dist/collection/components/bs-radio/bs-radio.js +92 -14
- package/dist/collection/components/bs-radio/bs-radio.stories.js +1 -10
- package/dist/collection/components/bs-slider/bs-slider.js +68 -2
- package/dist/collection/components/bs-source-link/bs-source-link.css +2 -2
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +3 -2
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.css +3 -3
- package/dist/collection/components/bs-switch/bs-switch.css +10 -1
- package/dist/collection/components/bs-switch/bs-switch.js +69 -2
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.css +2 -2
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +47 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.css +2 -2
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +47 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.cmp.test.js +88 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +139 -2
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.stories.js +24 -0
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/forms/forms.stories.js +63 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +173 -5
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.css +106 -34
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +181 -5
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +48 -0
- 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.cmp.test.js +68 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +31 -17
- package/dist/components/bs-accordion.js +1 -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-avatar.js +1 -1
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- 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-carousel.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.js +1 -1
- package/dist/components/bs-checkbox.js +1 -1
- package/dist/components/bs-chip-filter.js +1 -1
- package/dist/components/bs-chip-informative.js +1 -1
- package/dist/components/bs-chip-input.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.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- 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.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- 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-toast.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-LYvoWZt4.js → p-BA3c9Rom.js} +1 -1
- package/dist/components/{p-Dqt-Qp4W.js → p-BfEyD6Ku.js} +1 -1
- package/dist/components/p-BoeorHNv.js +1 -0
- package/dist/components/p-Buly0d5G.js +1 -0
- package/dist/components/p-CpUHnsq9.js +1 -0
- package/dist/components/{p-BxFJ74fI.js → p-EtXc94lJ.js} +1 -1
- package/dist/components/{p-mnGJPH85.js → p-JYlmcxBn.js} +1 -1
- package/dist/components/{p-BhvV55-6.js → p-R2MlkUzD.js} +1 -1
- package/dist/components/{p-Dx8gAOVC.js → p-wei0Ija2.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-accordion.entry.js +2 -2
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +2 -2
- package/dist/esm/bs-attachment.entry.js +2 -2
- package/dist/esm/bs-avatar.entry.js +1 -1
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +15 -3
- package/dist/esm/bs-breadcrumb.entry.js +16 -2
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-button.entry.js +23 -4
- package/dist/esm/bs-card.entry.js +2 -2
- package/dist/esm/bs-carousel.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +2 -2
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +2 -2
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-checkbox.entry.js +48 -3
- package/dist/esm/bs-chip-filter.entry.js +2 -2
- package/dist/esm/bs-chip-informative.entry.js +2 -2
- package/dist/esm/bs-chip-input.entry.js +2 -2
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +20 -6
- package/dist/esm/bs-dialog.entry.js +2 -2
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-icon-button.entry.js +23 -4
- package/dist/esm/bs-inline-tab.entry.js +11 -3
- package/dist/esm/bs-input.entry.js +69 -5
- package/dist/esm/bs-logo.entry.js +1 -1
- package/dist/esm/bs-menu-item.entry.js +1 -1
- package/dist/esm/bs-menu.entry.js +25 -3
- package/dist/esm/bs-navigation-drawer-item.entry.js +2 -2
- package/dist/esm/bs-navigation-drawer.entry.js +119 -6
- package/dist/esm/bs-navigation-header.entry.js +2 -2
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +1 -1
- package/dist/esm/bs-progress.entry.js +8 -3
- package/dist/esm/bs-radio.entry.js +81 -12
- package/dist/esm/bs-slider.entry.js +54 -2
- package/dist/esm/bs-snackbar.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-stepper-step.entry.js +2 -2
- package/dist/esm/bs-stepper.entry.js +3 -2
- package/dist/esm/bs-switch.entry.js +36 -3
- package/dist/esm/bs-tab.entry.js +11 -3
- package/dist/esm/bs-tabs.entry.js +97 -3
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/{index-DuyFft7h.js → index-AgoOSYvW.js} +43 -5
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-a11y.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.d.ts +10 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.d.ts +8 -0
- package/dist/types/components/bs-button/bs-button/bs-button.d.ts +4 -1
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +6 -2
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.stories.d.ts +1 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +12 -0
- package/dist/types/components/bs-data-table/bs-data-table.d.ts +16 -2
- package/dist/types/components/bs-form-association.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-input/bs-input.d.ts +12 -0
- package/dist/types/components/bs-keyboard-nav.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-menu/bs-menu.d.ts +4 -0
- package/dist/types/components/bs-menu/bs-menu.stories.d.ts +1 -0
- package/dist/types/components/bs-progress/bs-progress.d.ts +5 -0
- package/dist/types/components/bs-radio/bs-radio.d.ts +23 -9
- package/dist/types/components/bs-slider/bs-slider.d.ts +9 -0
- package/dist/types/components/bs-switch/bs-switch.d.ts +10 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.d.ts +8 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +8 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.d.ts +24 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.stories.d.ts +1 -0
- package/dist/types/components/forms/forms.stories.d.ts +6 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +50 -1
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +2 -0
- package/dist/types/components.d.ts +271 -9
- package/package.json +1 -1
- package/readme.md +14 -0
- package/dist/brandsync-wc/p-18021c05.entry.js +0 -1
- package/dist/brandsync-wc/p-1c8160c2.entry.js +0 -1
- package/dist/brandsync-wc/p-21c14465.entry.js +0 -1
- package/dist/brandsync-wc/p-27100489.entry.js +0 -1
- package/dist/brandsync-wc/p-309f920e.entry.js +0 -1
- package/dist/brandsync-wc/p-30d6a6d0.entry.js +0 -1
- package/dist/brandsync-wc/p-387ed85f.entry.js +0 -1
- package/dist/brandsync-wc/p-4b0938a5.entry.js +0 -1
- package/dist/brandsync-wc/p-5312b6a5.entry.js +0 -1
- package/dist/brandsync-wc/p-70e035ed.entry.js +0 -1
- package/dist/brandsync-wc/p-777a9dbf.entry.js +0 -1
- package/dist/brandsync-wc/p-a96856fd.entry.js +0 -1
- package/dist/brandsync-wc/p-b0634051.entry.js +0 -1
- package/dist/brandsync-wc/p-bcee3d60.entry.js +0 -1
- package/dist/brandsync-wc/p-d03eba2b.entry.js +0 -1
- package/dist/brandsync-wc/p-e61efe4d.entry.js +0 -1
- package/dist/brandsync-wc/p-f14bda01.entry.js +0 -1
- package/dist/components/p-BaxFLlKS.js +0 -1
- package/dist/components/p-DI5GgSqL.js +0 -1
- package/dist/components/p-v4T0qPVn.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-kk9YXF2S.js');
|
|
4
4
|
|
|
5
5
|
const bsToastCss = () => `:host{display:inline-flex;--bs-toast-radius:var(--bs-border-radius-100);--bs-toast-shadow:var(--bs-shadow-md);--bs-toast-content-padding-y:var(--bs-spacing-200);--bs-toast-content-padding-x:var(--bs-spacing-200);--bs-toast-content-gap:var(--bs-spacing-150);--bs-toast-font-size:var(--bs-font-size-md);--bs-toast-line-height:var(--bs-line-height-body-md);--bs-toast-actions-padding-y:var(--bs-spacing-50);--bs-toast-actions-padding-x:var(--bs-spacing-100);--bs-toast-close-radius:var(--bs-border-radius-100);--bs-toast-surface-info:var(--bs-color-info-container);--bs-toast-text-info:var(--bs-text-info);--bs-toast-surface-warning:var(--bs-color-warning-container);--bs-toast-text-warning:var(--bs-text-warning);--bs-toast-surface-success:var(--bs-color-success-container);--bs-toast-text-success:var(--bs-text-success);--bs-toast-surface-error:var(--bs-color-error-container);--bs-toast-text-error:var(--bs-text-error)}.bs-toast{display:flex;align-items:center;border-radius:var(--bs-toast-radius);box-shadow:var(--bs-toast-shadow);font-family:inherit}.bs-toast--info{background:var(--bs-toast-surface-info);color:var(--bs-toast-text-info)}.bs-toast--warning{background:var(--bs-toast-surface-warning);color:var(--bs-toast-text-warning)}.bs-toast--success{background:var(--bs-toast-surface-success);color:var(--bs-toast-text-success)}.bs-toast--error{background:var(--bs-toast-surface-error);color:var(--bs-toast-text-error)}.bs-toast__content{display:flex;align-items:center;gap:var(--bs-toast-content-gap);flex:1 1 auto;min-width:0;padding:var(--bs-toast-content-padding-y) 0 var(--bs-toast-content-padding-y) var(--bs-toast-content-padding-x)}.bs-toast__icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0;color:inherit}.bs-toast__icon svg{width:24px;height:24px}.bs-toast__message{flex:1 1 auto;min-width:0;font-size:var(--bs-toast-font-size);line-height:calc(var(--bs-toast-line-height) * 1px)}.bs-toast__actions{display:flex;align-items:center;align-self:stretch;flex-shrink:0;padding:var(--bs-toast-actions-padding-y) var(--bs-toast-actions-padding-x) var(--bs-toast-actions-padding-y) 0}.bs-toast__close{display:flex;align-items:center;justify-content:center;width:44px;height:44px;flex-shrink:0;padding:0;border:none;background:transparent;border-radius:var(--bs-toast-close-radius);color:inherit;cursor:pointer}.bs-toast__close svg{width:24px;height:24px}.bs-toast__close:hover{background:color-mix(in srgb, currentColor 12%, transparent)}.bs-toast__close:active{background:color-mix(in srgb, currentColor 24%, transparent)}.bs-toast__close:focus-visible{outline:2px solid currentColor;outline-offset:2px}`;
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-kk9YXF2S.js');
|
|
4
4
|
|
|
5
5
|
const bsTooltipCss = () => `:host{display:inline-block;--bs-tooltip-bg:var(--bs-surface-inverse);--bs-tooltip-color:var(--bs-text-inverse);--bs-tooltip-radius:var(--bs-border-radius-50);--bs-tooltip-padding-x:var(--bs-spacing-200);--bs-tooltip-padding-y:var(--bs-spacing-100);--bs-tooltip-max-width:200px;--bs-tooltip-shadow:-1px 4px 8px rgba(0, 0, 0, 0.08);--bs-tooltip-font-size:var(--bs-font-size-sm);--bs-tooltip-line-height:var(--bs-line-height-body-sm)}.bs-tooltip{position:relative;display:inline-block}.bs-tooltip__bubble{box-sizing:border-box;max-width:var(--bs-tooltip-max-width);padding:var(--bs-tooltip-padding-y) var(--bs-tooltip-padding-x);background:var(--bs-tooltip-bg);color:var(--bs-tooltip-color);border-radius:var(--bs-tooltip-radius);box-shadow:var(--bs-tooltip-shadow);font-family:inherit;font-size:var(--bs-tooltip-font-size);line-height:calc(var(--bs-tooltip-line-height) * 1px)}.bs-tooltip__arrow{position:absolute;top:-6px;left:50%;transform:translateX(-50%);width:8px;height:8px;background:var(--bs-tooltip-bg);clip-path:polygon(50% 0, 0% 100%, 100% 100%)}`;
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ const BsTooltip = class {
|
|
|
16
16
|
*/
|
|
17
17
|
placement = 'top';
|
|
18
18
|
render() {
|
|
19
|
-
return (index.h("div", { key: '
|
|
19
|
+
return (index.h("div", { key: 'b7c2ee57db3a4e36cdd106d78f0f8d54c45a04c6', class: "bs-tooltip" }, index.h("span", { key: '22b738a760e9967233052ce4540c77da4ac9563e', part: "arrow", class: "bs-tooltip__arrow" }), index.h("div", { key: '69a8b07711478e699be4c8151d9f7dfd2e4e0bf4', part: "bubble", class: "bs-tooltip__bubble" }, index.h("slot", { key: 'b32c75a06582b8e8f99b973889450e9100b75323' }))));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
BsTooltip.style = bsTooltipCss();
|
|
@@ -144,6 +144,12 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
|
144
144
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
145
145
|
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
146
146
|
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
147
|
+
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
148
|
+
"formAssociatedCallback",
|
|
149
|
+
"formResetCallback",
|
|
150
|
+
"formDisabledCallback",
|
|
151
|
+
"formStateRestoreCallback"
|
|
152
|
+
];
|
|
147
153
|
var win = typeof window !== "undefined" ? window : {};
|
|
148
154
|
var plt = {
|
|
149
155
|
$flags$: 0,
|
|
@@ -542,7 +548,9 @@ var normalizeWatchers = (raw) => {
|
|
|
542
548
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
543
549
|
if (propValue != null && !isComplexType(propValue)) {
|
|
544
550
|
if (propType & 4 /* Boolean */) {
|
|
545
|
-
{
|
|
551
|
+
if (isFormAssociated && typeof propValue === "string") {
|
|
552
|
+
return propValue === "" || !!propValue;
|
|
553
|
+
} else {
|
|
546
554
|
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
547
555
|
}
|
|
548
556
|
}
|
|
@@ -1239,7 +1247,9 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1239
1247
|
const instance = hostRef.$lazyInstance$ ;
|
|
1240
1248
|
newVal = parsePropertyValue(
|
|
1241
1249
|
newVal,
|
|
1242
|
-
cmpMeta.$members$[propName][0]
|
|
1250
|
+
cmpMeta.$members$[propName][0],
|
|
1251
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1252
|
+
);
|
|
1243
1253
|
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1244
1254
|
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1245
1255
|
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
@@ -1297,6 +1307,26 @@ var replayPendingSetterValues = (hostRef, cmpMeta) => {
|
|
|
1297
1307
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1298
1308
|
var _a, _b;
|
|
1299
1309
|
const prototype = Cstr.prototype;
|
|
1310
|
+
if (cmpMeta.$flags$ & 64 /* formAssociated */ && flags & 1 /* isElementConstructor */) {
|
|
1311
|
+
FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
|
|
1312
|
+
Object.defineProperty(prototype, cbName, {
|
|
1313
|
+
value(...args) {
|
|
1314
|
+
var _a2;
|
|
1315
|
+
const hostRef = getHostRef(this);
|
|
1316
|
+
const instance = hostRef == null ? void 0 : hostRef.$lazyInstance$ ;
|
|
1317
|
+
if (!instance) {
|
|
1318
|
+
(_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
|
|
1319
|
+
const cb = asyncInstance[cbName];
|
|
1320
|
+
typeof cb === "function" && cb.call(asyncInstance, ...args);
|
|
1321
|
+
});
|
|
1322
|
+
} else {
|
|
1323
|
+
const cb = instance[cbName] ;
|
|
1324
|
+
typeof cb === "function" && cb.call(instance, ...args);
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
});
|
|
1329
|
+
}
|
|
1300
1330
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
1301
1331
|
{
|
|
1302
1332
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
@@ -1345,7 +1375,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1345
1375
|
origSetter.apply(this, [
|
|
1346
1376
|
parsePropertyValue(
|
|
1347
1377
|
newValue,
|
|
1348
|
-
memberFlags
|
|
1378
|
+
memberFlags,
|
|
1379
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1380
|
+
)
|
|
1349
1381
|
]);
|
|
1350
1382
|
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1351
1383
|
setValue(this, memberName, newValue, cmpMeta);
|
|
@@ -1358,7 +1390,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1358
1390
|
}
|
|
1359
1391
|
const parsedValue = parsePropertyValue(
|
|
1360
1392
|
newValue,
|
|
1361
|
-
memberFlags
|
|
1393
|
+
memberFlags,
|
|
1394
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1395
|
+
);
|
|
1362
1396
|
if (ref.$lazyInstance$) {
|
|
1363
1397
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
1364
1398
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
@@ -1423,7 +1457,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1423
1457
|
}
|
|
1424
1458
|
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1425
1459
|
if (isBooleanTarget) {
|
|
1426
|
-
|
|
1460
|
+
const isFormAssociated = !!(cmpMeta.$flags$ & 64 /* formAssociated */);
|
|
1461
|
+
newValue = newValue === null || newValue === "false" && !isFormAssociated ? false : true;
|
|
1427
1462
|
}
|
|
1428
1463
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1429
1464
|
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
@@ -1727,6 +1762,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1727
1762
|
return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
|
|
1728
1763
|
}
|
|
1729
1764
|
};
|
|
1765
|
+
if (cmpMeta.$flags$ & 64 /* formAssociated */) {
|
|
1766
|
+
HostElement.formAssociated = true;
|
|
1767
|
+
}
|
|
1730
1768
|
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1731
1769
|
if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
|
|
1732
1770
|
cmpTags.push(tagName);
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-kk9YXF2S.js');
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await index.globalScripts();
|
|
8
|
-
return index.bootstrapLazy([["bs-carousel.cjs",[[769,"bs-carousel",{"tracker":[1],"slidesPerView":[2,"slides-per-view"],"currentPage":[1538,"current-page"],"autoplay":[4],"interval":[2],"paused":[1540],"label":[1],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"],"pauseLabel":[1,"pause-label"],"playLabel":[1,"play-label"],"slideCount":[32],"interacting":[32]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[0,"focusin","onFocusIn"],[0,"focusout","onFocusOut"]],{"currentPage":[{"onCurrentPageChange":0}],"autoplay":[{"updateTimer":0}],"paused":[{"updateTimer":0}],"interval":[{"updateTimer":0}],"interacting":[{"updateTimer":0}],"slideCount":[{"updateTimer":0}],"slidesPerView":[{"updateTimer":0}]}]]],["bs-file-upload-item.cjs",[[769,"bs-file-upload-item",{"state":[513],"fileName":[1,"file-name"],"fileSize":[1,"file-size"],"progress":[2],"message":[1],"thumbnailSrc":[1,"thumbnail-src"],"thumbnailAlt":[1,"thumbnail-alt"],"cancelLabel":[1,"cancel-label"],"removeLabel":[1,"remove-label"]}]]],["bs-input.cjs",[[
|
|
8
|
+
return index.bootstrapLazy([["bs-carousel.cjs",[[769,"bs-carousel",{"tracker":[1],"slidesPerView":[2,"slides-per-view"],"currentPage":[1538,"current-page"],"autoplay":[4],"interval":[2],"paused":[1540],"label":[1],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"],"pauseLabel":[1,"pause-label"],"playLabel":[1,"play-label"],"slideCount":[32],"interacting":[32]},[[1,"mouseenter","onMouseEnter"],[1,"mouseleave","onMouseLeave"],[0,"focusin","onFocusIn"],[0,"focusout","onFocusOut"]],{"currentPage":[{"onCurrentPageChange":0}],"autoplay":[{"updateTimer":0}],"paused":[{"updateTimer":0}],"interval":[{"updateTimer":0}],"interacting":[{"updateTimer":0}],"slideCount":[{"updateTimer":0}],"slidesPerView":[{"updateTimer":0}]}]]],["bs-file-upload-item.cjs",[[769,"bs-file-upload-item",{"state":[513],"fileName":[1,"file-name"],"fileSize":[1,"file-size"],"progress":[2],"message":[1],"thumbnailSrc":[1,"thumbnail-src"],"thumbnailAlt":[1,"thumbnail-alt"],"cancelLabel":[1,"cancel-label"],"removeLabel":[1,"remove-label"]}]]],["bs-input.cjs",[[849,"bs-input",{"name":[513],"value":[1025],"type":[1],"label":[1],"placeholder":[1],"description":[1],"error":[1],"disabled":[516],"required":[4],"step":[2],"min":[2],"max":[2],"options":[16],"rows":[2],"chips":[16],"titleOptions":[16],"initialsTitle":[1,"initials-title"],"countryOptions":[16],"country":[1],"length":[2],"open":[1540],"hasIcon":[32],"hasEndIcon":[32],"passwordVisible":[32],"chipDraft":[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]],{"value":[{"onFormStateChange":0}],"type":[{"onFormStateChange":0}],"chips":[{"onFormStateChange":0}],"required":[{"onFormStateChange":0}]}]]],["bs-snackbar.cjs",[[769,"bs-snackbar",{"variant":[1],"loading":[4],"actionLabel":[1,"action-label"]}]]],["bs-attachment.cjs",[[513,"bs-attachment",{"type":[1],"fileName":[1,"file-name"],"imageSrc":[1,"image-src"],"imageAlt":[1,"image-alt"],"loading":[4],"removable":[4]}]]],["bs-breadcrumb-overflow.cjs",[[513,"bs-breadcrumb-overflow",{"items":[16],"overflowLabel":[1,"overflow-label"],"size":[513],"open":[32]},[[0,"keydown","onHostKeydown"],[0,"focusout","onHostFocusOut"]]]]],["bs-chatbot-header.cjs",[[769,"bs-chatbot-header",{"heading":[1],"expanded":[1540]}]]],["bs-dialog.cjs",[[769,"bs-dialog",{"open":[1540],"heading":[1],"size":[1],"centered":[516],"hasFooter":[32],"hasImage":[32],"hasIcon":[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]]],["bs-file-upload.cjs",[[769,"bs-file-upload",{"direction":[513],"heading":[1],"description":[1],"buttonLabel":[1,"button-label"],"accept":[1],"multiple":[4],"disabled":[516],"dragging":[1540]}]]],["bs-navigation-drawer.cjs",[[769,"bs-navigation-drawer",{"heading":[1],"collapsible":[4],"collapsed":[1540],"logoBackground":[1,"logo-background"],"showLogo":[4,"show-logo"],"open":[1540],"mobile":[32]},[[4,"keydown","onDocumentKeydown"],[4,"focusin","onDocumentFocusIn"]],{"collapsed":[{"onCollapsedChange":0}],"mobile":[{"onMobileChange":0}],"open":[{"onOpenChange":0}]}]]],["bs-navigation-header.cjs",[[769,"bs-navigation-header",{"alignment":[1],"ariaLabel":[1,"aria-label"],"skipToContentHref":[1,"skip-to-content-href"],"skipToContentLabel":[1,"skip-to-content-label"],"logoBackground":[1,"logo-background"]}]]],["bs-accordion.cjs",[[769,"bs-accordion",{"expanded":[516],"size":[1],"disabled":[4],"showIcon":[4,"show-icon"],"showPreview":[4,"show-preview"]}]]],["bs-ai-disclaimer.cjs",[[257,"bs-ai-disclaimer"]]],["bs-ai-greeting.cjs",[[513,"bs-ai-greeting",{"assistantName":[1,"assistant-name"],"productName":[1,"product-name"]}]]],["bs-ai-thinking.cjs",[[513,"bs-ai-thinking",{"label":[1]}]]],["bs-attachment-list.cjs",[[769,"bs-attachment-list",{"ariaLabel":[1,"aria-label"],"canScrollRight":[32]}]]],["bs-avatar.cjs",[[513,"bs-avatar",{"type":[1],"size":[1],"initials":[1],"src":[1],"alt":[1],"ariaLabel":[1,"aria-label"],"disabled":[516]}]]],["bs-badge.cjs",[[769,"bs-badge",{"variant":[1]}]]],["bs-breadcrumb.cjs",[[769,"bs-breadcrumb",{"href":[1],"current":[516],"size":[513]}]]],["bs-breadcrumbs.cjs",[[769,"bs-breadcrumbs",{"label":[1],"size":[1]},null,{"size":[{"onSizeChange":0}]}]]],["bs-button-skeleton.cjs",[[513,"bs-button-skeleton",{"size":[1]}]]],["bs-card.cjs",[[769,"bs-card",{"surface":[1],"hasImage":[32]}]]],["bs-chatbot-feedback.cjs",[[513,"bs-chatbot-feedback",{"rating":[1538],"submitted":[1540],"comment":[1025],"heading":[1],"subtitle":[1]}]]],["bs-chatbot-response-action.cjs",[[769,"bs-chatbot-response-action",{"sourcesCount":[2,"sources-count"],"menuOpen":[1540,"menu-open"]},[[4,"click","onDocumentClick"],[4,"keydown","onKeydown"]]]]],["bs-chatbot-sources-drawer.cjs",[[769,"bs-chatbot-sources-drawer",{"heading":[1],"count":[2],"slottedCount":[32]}]]],["bs-chatbot-suggestion-button.cjs",[[769,"bs-chatbot-suggestion-button",{"disabled":[4]}]]],["bs-checkbox.cjs",[[849,"bs-checkbox",{"name":[513],"value":[1],"required":[4],"size":[1],"checked":[1540],"indeterminate":[1540],"disabled":[516],"error":[4],"ariaLabel":[1,"aria-label"]},null,{"checked":[{"syncFormValue":0}],"value":[{"syncFormValue":0}],"required":[{"syncFormValue":0}],"indeterminate":[{"onIndeterminateChange":0}]}]]],["bs-checkbox-skeleton.cjs",[[513,"bs-checkbox-skeleton",{"size":[1]}]]],["bs-chip-filter.cjs",[[785,"bs-chip-filter",{"size":[1],"selected":[516],"dropdown":[4],"disabled":[4],"ariaLabel":[1,"aria-label"],"hasIcon":[32]}]]],["bs-chip-informative.cjs",[[769,"bs-chip-informative",{"color":[1],"size":[1],"disabled":[516],"hasIcon":[32]}]]],["bs-chip-input.cjs",[[785,"bs-chip-input",{"size":[1],"selected":[1540],"disabled":[516],"hasIcon":[32],"labelText":[32]}]]],["bs-composer.cjs",[[785,"bs-composer",{"variant":[1],"placeholder":[1],"value":[1025],"state":[513],"ariaLabel":[1,"aria-label"],"hasAttachments":[32]}]]],["bs-composer-status-banner.cjs",[[769,"bs-composer-status-banner",{"type":[1],"message":[1],"showIcon":[4,"show-icon"],"showButton":[4,"show-button"],"actionLabel":[1,"action-label"],"allowClose":[4,"allow-close"]}]]],["bs-data-table.cjs",[[513,"bs-data-table",{"columns":[16],"rows":[16],"sortColumn":[1,"sort-column"],"sortDirection":[1,"sort-direction"],"selectable":[4],"cellRenderer":[16],"selectedIds":[32],"clearSelection":[64]}]]],["bs-inline-tab.cjs",[[769,"bs-inline-tab",{"selected":[516],"disabled":[4],"ariaLabel":[1,"aria-label"],"value":[513],"tabbable":[4],"hasIcon":[32],"hasLabel":[32]}]]],["bs-navigation-drawer-item.cjs",[[769,"bs-navigation-drawer-item",{"selected":[516],"expandable":[4],"expanded":[1540],"nested":[4],"ariaLabel":[1,"aria-label"],"collapsed":[516],"hasIcon":[32]}]]],["bs-progress.cjs",[[513,"bs-progress",{"type":[1],"size":[1],"strokeWidth":[2,"stroke-width"],"value":[2],"showLabel":[4,"show-label"],"ariaLabel":[1,"aria-label"]}]]],["bs-radio.cjs",[[849,"bs-radio",{"name":[513],"value":[1],"checked":[1540],"disabled":[516],"groupHasChecked":[32]},[[4,"bsChange","onAnyRadioChange"]],{"checked":[{"onCheckedChange":0}],"value":[{"onCheckedChange":0}]}]]],["bs-slider.cjs",[[593,"bs-slider",{"type":[1],"name":[513],"showLabel":[4,"show-label"],"label":[1],"min":[2],"max":[2],"step":[2],"value":[1026],"valueStart":[1026,"value-start"],"valueEnd":[1026,"value-end"],"segments":[2],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"value":[{"syncFormValue":0}],"valueStart":[{"syncFormValue":0}],"valueEnd":[{"syncFormValue":0}],"type":[{"syncFormValue":0}]}]]],["bs-source-link.cjs",[[769,"bs-source-link",{"fileName":[1,"file-name"],"sourceName":[1,"source-name"],"version":[1],"href":[1],"target":[1]}]]],["bs-stepper.cjs",[[769,"bs-stepper",{"currentStep":[2,"current-step"],"direction":[513],"showDescription":[4,"show-description"]},null,{"currentStep":[{"onPropChange":0}],"direction":[{"onPropChange":0}],"showDescription":[{"onPropChange":0}]}]]],["bs-stepper-step.cjs",[[513,"bs-stepper-step",{"name":[1],"description":[1],"error":[4],"disabled":[4],"computedState":[1,"computed-state"],"direction":[1],"showDescription":[4,"show-description"]}]]],["bs-switch.cjs",[[849,"bs-switch",{"name":[513],"value":[1],"size":[1],"checked":[1540],"disabled":[516],"ariaLabel":[1,"aria-label"]},null,{"checked":[{"syncFormValue":0}],"value":[{"syncFormValue":0}]}]]],["bs-tab.cjs",[[769,"bs-tab",{"selected":[516],"disabled":[4],"iconPosition":[1,"icon-position"],"ariaLabel":[1,"aria-label"],"value":[513],"tabbable":[4],"hasIcon":[32],"hasLabel":[32],"hasBadge":[32]}]]],["bs-tabs.cjs",[[769,"bs-tabs",{"type":[1],"orientation":[1],"value":[1537]},[[0,"bsSelect","onTabSelect"],[0,"keydown","onKeyDown"]],{"value":[{"onValueChange":0}],"orientation":[{"syncRovingTabindex":0}]}]]],["bs-toast.cjs",[[769,"bs-toast",{"state":[1]}]]],["bs-menu-item.cjs",[[769,"bs-menu-item",{"disabled":[4],"hasIcon":[32]}]]],["bs-pagination.cjs",[[513,"bs-pagination",{"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"],"siblingCount":[2,"sibling-count"],"previousLabel":[1,"previous-label"],"nextLabel":[1,"next-label"]}]]],["bs-progress-linear.cjs",[[769,"bs-progress-linear",{"type":[1],"size":[1],"value":[2],"showLabel":[4,"show-label"],"ariaLabel":[1,"aria-label"],"hasLabelContent":[32]}]]],["bs-tooltip.cjs",[[769,"bs-tooltip",{"placement":[1]}]]],["bs-logo.cjs",[[513,"bs-logo",{"variant":[1],"background":[1],"src":[1],"alt":[1]}]]],["bs-menu.cjs",[[257,"bs-menu",null,[[0,"keydown","onKeyDown"]]]]],["bs-button.cjs",[[849,"bs-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"],"hasIcon":[32],"hasEndIcon":[32],"hasLabel":[32]}]]],["bs-icon-button.cjs",[[849,"bs-icon-button",{"variant":[1],"size":[1],"disabled":[4],"type":[1],"ariaLabel":[1,"aria-label"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { render, h, describe, it } from "@stencil/vitest";
|
|
2
|
+
import { runAxeCheck } from "../test/helpers/conventions";
|
|
3
|
+
// One axe-core pass per component, in a representative (labelled, realistic) configuration.
|
|
4
|
+
// Components with their own axe test elsewhere (bs-accordion, bs-slider, bs-chatbot-header) are
|
|
5
|
+
// covered there. A violation here is a real bug in the component (or a missing accessible name
|
|
6
|
+
// that the component's docs say the consumer must provide -- supply it below, don't suppress it).
|
|
7
|
+
const axeOf = (name, vnode) => it(`${name} has no axe-core violations`, async () => {
|
|
8
|
+
const { root } = await render(vnode());
|
|
9
|
+
await runAxeCheck(root);
|
|
10
|
+
});
|
|
11
|
+
describe('axe: form controls', () => {
|
|
12
|
+
axeOf('bs-input', () => h("bs-input", { label: "Email", value: "a@b.co" }));
|
|
13
|
+
axeOf('bs-input (error)', () => h("bs-input", { label: "Email", error: "Required" }));
|
|
14
|
+
axeOf('bs-input (textarea)', () => h("bs-input", { type: "textarea", label: "Notes" }));
|
|
15
|
+
axeOf('bs-input (password)', () => h("bs-input", { type: "password", label: "Password" }));
|
|
16
|
+
axeOf('bs-checkbox', () => h("bs-checkbox", null, "Agree"));
|
|
17
|
+
axeOf('bs-checkbox (icon-only)', () => h("bs-checkbox", { ariaLabel: "Select row" }));
|
|
18
|
+
axeOf('bs-switch', () => h("bs-switch", null, "Alerts"));
|
|
19
|
+
axeOf('bs-radio group', () => (h("div", { role: "radiogroup", "aria-label": "Fruit" }, h("bs-radio", { name: "f", value: "a", checked: true }, "A"), h("bs-radio", { name: "f", value: "b" }, "B"))));
|
|
20
|
+
});
|
|
21
|
+
describe('axe: actions & navigation', () => {
|
|
22
|
+
axeOf('bs-button', () => h("bs-button", null, "Save"));
|
|
23
|
+
axeOf('bs-icon-button', () => h("bs-icon-button", { ariaLabel: "Close" }));
|
|
24
|
+
axeOf('bs-button-skeleton', () => h("bs-button-skeleton", null));
|
|
25
|
+
axeOf('bs-tabs', () => (h("bs-tabs", null, h("bs-tab", { selected: true }, "One"), h("bs-tab", null, "Two"))));
|
|
26
|
+
axeOf('bs-menu', () => (h("bs-menu", null, h("bs-menu-item", null, "Edit"), h("bs-menu-item", null, "Delete"))));
|
|
27
|
+
axeOf('bs-breadcrumbs', () => (h("bs-breadcrumbs", null, h("bs-breadcrumb", { href: "/" }, "Home"), h("bs-breadcrumb", { current: true }, "Page"))));
|
|
28
|
+
axeOf('bs-pagination', () => h("bs-pagination", { totalPages: 10, currentPage: 1 }));
|
|
29
|
+
axeOf('bs-stepper', () => (h("bs-stepper", null, h("bs-stepper-step", { name: "One" }), h("bs-stepper-step", { name: "Two" }))));
|
|
30
|
+
axeOf('bs-source-link', () => h("bs-source-link", { href: "https://example.com" }, "Source"));
|
|
31
|
+
});
|
|
32
|
+
describe('axe: display & feedback', () => {
|
|
33
|
+
axeOf('bs-avatar', () => h("bs-avatar", { initials: "AB", ariaLabel: "Ada Byron" }));
|
|
34
|
+
axeOf('bs-badge', () => h("bs-badge", null, "3"));
|
|
35
|
+
axeOf('bs-card', () => h("bs-card", null, "Content"));
|
|
36
|
+
axeOf('bs-chip-informative', () => h("bs-chip-informative", null, "Tag"));
|
|
37
|
+
axeOf('bs-logo', () => h("bs-logo", null));
|
|
38
|
+
axeOf('bs-progress', () => h("bs-progress", { value: 40, ariaLabel: "Uploading" }));
|
|
39
|
+
axeOf('bs-progress-linear', () => h("bs-progress-linear", { value: 40, ariaLabel: "Uploading" }));
|
|
40
|
+
axeOf('bs-snackbar', () => h("bs-snackbar", null, "Saved"));
|
|
41
|
+
axeOf('bs-toast', () => h("bs-toast", null, "Saved"));
|
|
42
|
+
axeOf('bs-tooltip', () => h("bs-tooltip", null, "Help text"));
|
|
43
|
+
axeOf('bs-dialog', () => (h("bs-dialog", { open: true, heading: "Confirm" }, "Are you sure?")));
|
|
44
|
+
axeOf('bs-data-table', () => (h("bs-data-table", { columns: [{ key: 'name', label: 'Name' }], rows: [{ id: 1, name: 'Ada' }] })));
|
|
45
|
+
});
|
|
46
|
+
describe('axe: AI chat', () => {
|
|
47
|
+
axeOf('bs-ai-disclaimer', () => h("bs-ai-disclaimer", null));
|
|
48
|
+
axeOf('bs-ai-greeting', () => h("bs-ai-greeting", null));
|
|
49
|
+
axeOf('bs-ai-thinking', () => h("bs-ai-thinking", null));
|
|
50
|
+
axeOf('bs-attachment', () => h("bs-attachment", { fileName: "file.pdf" }));
|
|
51
|
+
axeOf('bs-composer', () => h("bs-composer", null));
|
|
52
|
+
axeOf('bs-chatbot-feedback', () => h("bs-chatbot-feedback", null));
|
|
53
|
+
axeOf('bs-chatbot-suggestion-button', () => h("bs-chatbot-suggestion-button", null, "Ask"));
|
|
54
|
+
});
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
padding: 0;
|
|
90
90
|
cursor: pointer;
|
|
91
91
|
font-family: inherit;
|
|
92
|
-
text-align:
|
|
92
|
+
text-align: start;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/* The focus-visible ring is drawn on the outer .bs-accordion container (see above), not here --
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
/* Icon=No: no icon box on the left to provide the inset, so the label gets it directly --
|
|
149
149
|
confirmed against Figma's Icon=No variant. */
|
|
150
150
|
.bs-accordion__label--no-icon {
|
|
151
|
-
padding-
|
|
151
|
+
padding-inline-start: var(--bs-accordion-header-padding-x);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
/* Same fixed-width/height box as .bs-accordion__icon (not just the 24px SVG) -- per Figma, the
|
|
@@ -181,15 +181,15 @@
|
|
|
181
181
|
.bs-accordion__content {
|
|
182
182
|
padding-top: 0;
|
|
183
183
|
padding-bottom: var(--bs-accordion-content-padding-bottom);
|
|
184
|
-
padding-
|
|
185
|
-
padding-
|
|
184
|
+
padding-inline-end: var(--bs-accordion-content-padding-right);
|
|
185
|
+
padding-inline-start: var(--bs-accordion-content-padding-left);
|
|
186
186
|
color: var(--bs-accordion-text-default);
|
|
187
187
|
font-size: var(--bs-accordion-font-size);
|
|
188
188
|
line-height: calc(var(--bs-accordion-line-height) * 1px);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
.bs-accordion__content--no-icon {
|
|
192
|
-
padding-
|
|
192
|
+
padding-inline-start: var(--bs-accordion-content-padding-left-no-icon);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
/* Collapsed + showPreview: pure CSS truncation of the SAME slotted content to a single line --
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
*visible* 16px button centered inside it (8px inset on every side) -- so the visible button's
|
|
108
108
|
real offset from the thumbnail's corner is 8px, not 4px. */
|
|
109
109
|
top: var(--bs-spacing-100);
|
|
110
|
-
|
|
110
|
+
inset-inline-end: var(--bs-spacing-100);
|
|
111
111
|
opacity: 0;
|
|
112
112
|
pointer-events: none;
|
|
113
113
|
transition: opacity var(--bs-duration-fast) var(--bs-easing-standard);
|
|
@@ -59,4 +59,67 @@ describe('bs-breadcrumb', () => {
|
|
|
59
59
|
expect(smFontSize).not.toBe(mdFontSize);
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
|
+
describe('bsNavigate', () => {
|
|
63
|
+
// Dispatches a synthetic click and reports whether the component's own handlers (or a consumer's
|
|
64
|
+
// bsNavigate listener) prevented it. A window-level guard then blocks the native navigation in
|
|
65
|
+
// every case -- an un-prevented click on an <a> really navigates the test page, which the test
|
|
66
|
+
// runner's frame does not survive.
|
|
67
|
+
const click = (el, init = {}) => {
|
|
68
|
+
const ev = new MouseEvent('click', { bubbles: true, cancelable: true, composed: true, button: 0, ...init });
|
|
69
|
+
let prevented = false;
|
|
70
|
+
const guard = (e) => {
|
|
71
|
+
prevented = e.defaultPrevented;
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
};
|
|
74
|
+
window.addEventListener('click', guard, { once: true });
|
|
75
|
+
el.dispatchEvent(ev);
|
|
76
|
+
window.removeEventListener('click', guard);
|
|
77
|
+
return { prevented };
|
|
78
|
+
};
|
|
79
|
+
const link = (root) => root.shadowRoot.querySelector('a');
|
|
80
|
+
it('a plain click emits bsNavigate with the href, as a cancelable event', async () => {
|
|
81
|
+
const { root, spyOnEvent } = await render(h("bs-breadcrumb", { href: "#crumb-a" }, "Home"));
|
|
82
|
+
const spy = spyOnEvent('bsNavigate');
|
|
83
|
+
click(link(root));
|
|
84
|
+
expect(spy).toHaveReceivedEventTimes(1);
|
|
85
|
+
expect(spy).toHaveReceivedEventDetail({ href: '#crumb-a' });
|
|
86
|
+
expect(spy.lastEvent.cancelable).toBe(true);
|
|
87
|
+
});
|
|
88
|
+
it('without a listener the native navigation still happens (click is not prevented)', async () => {
|
|
89
|
+
const { root } = await render(h("bs-breadcrumb", { href: "#crumb-b" }, "Home"));
|
|
90
|
+
expect(click(link(root)).prevented).toBe(false);
|
|
91
|
+
});
|
|
92
|
+
it('preventDefault() in a bsNavigate listener cancels the native navigation', async () => {
|
|
93
|
+
const { root } = await render(h("bs-breadcrumb", { href: "#crumb-c" }, "Home"));
|
|
94
|
+
root.addEventListener('bsNavigate', e => e.preventDefault());
|
|
95
|
+
expect(click(link(root)).prevented).toBe(true);
|
|
96
|
+
});
|
|
97
|
+
for (const [name, init] of [
|
|
98
|
+
['ctrl', { ctrlKey: true }],
|
|
99
|
+
['meta', { metaKey: true }],
|
|
100
|
+
['shift', { shiftKey: true }],
|
|
101
|
+
['alt', { altKey: true }],
|
|
102
|
+
['middle button', { button: 1 }],
|
|
103
|
+
]) {
|
|
104
|
+
it(`a ${name}-click does not emit bsNavigate (left to the browser)`, async () => {
|
|
105
|
+
const { root, spyOnEvent } = await render(h("bs-breadcrumb", { href: "#crumb-d" }, "Home"));
|
|
106
|
+
const spy = spyOnEvent('bsNavigate');
|
|
107
|
+
click(link(root), init);
|
|
108
|
+
expect(spy).not.toHaveReceivedEvent();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
it('bubbles to the surrounding <bs-breadcrumbs>, so one listener covers every crumb', async () => {
|
|
112
|
+
const { root } = await render(h("bs-breadcrumbs", null, h("bs-breadcrumb", { href: "#one" }, "One"), h("bs-breadcrumb", { href: "#two" }, "Two")));
|
|
113
|
+
const seen = [];
|
|
114
|
+
root.addEventListener('bsNavigate', (e) => seen.push(e.detail.href));
|
|
115
|
+
const crumbs = root.querySelectorAll('bs-breadcrumb');
|
|
116
|
+
click(link(crumbs[0]));
|
|
117
|
+
click(link(crumbs[1]));
|
|
118
|
+
expect(seen).toEqual(['#one', '#two']);
|
|
119
|
+
});
|
|
120
|
+
it('the current crumb is never a link, so it never emits', async () => {
|
|
121
|
+
const { root } = await render(h("bs-breadcrumb", { current: true, href: "#now" }, "Now"));
|
|
122
|
+
expect(root.shadowRoot.querySelector('a')).toBeNull();
|
|
123
|
+
});
|
|
124
|
+
});
|
|
62
125
|
});
|
|
@@ -42,8 +42,21 @@ export class BsBreadcrumb {
|
|
|
42
42
|
* size is unchanged, since Figma didn't specify a `sm` icon size and guessing one risked drifting
|
|
43
43
|
* off-brand. Reflected so consumers/CSS can target `bs-breadcrumb[size="sm"]`. */
|
|
44
44
|
size = 'md';
|
|
45
|
+
/** Fires when the crumb's link is clicked, before the browser navigates. **Cancelable**: call
|
|
46
|
+
* `event.preventDefault()` to stop the native navigation and route it yourself (an SPA router).
|
|
47
|
+
* Detail is `{ href }`. Only a plain primary-button click emits it -- ctrl/cmd/shift/alt-clicks
|
|
48
|
+
* and middle-clicks (open in a new tab/window) are left to the browser. Bubbles and is composed,
|
|
49
|
+
* so one listener on the surrounding `<bs-breadcrumbs>` covers every crumb. */
|
|
50
|
+
bsNavigate;
|
|
51
|
+
onLinkClick = (ev) => {
|
|
52
|
+
if (ev.defaultPrevented || ev.button !== 0 || ev.metaKey || ev.ctrlKey || ev.shiftKey || ev.altKey)
|
|
53
|
+
return;
|
|
54
|
+
const navigate = this.bsNavigate.emit({ href: this.href });
|
|
55
|
+
if (navigate.defaultPrevented)
|
|
56
|
+
ev.preventDefault();
|
|
57
|
+
};
|
|
45
58
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '92b78d6b9eeb98420ed6a42496d632d4d437ea78', role: "listitem" }, h("span", { key: '0fbd23cacfecc6b5ea75c250d65875a1087913f7', part: "separator", class: "bs-breadcrumb__separator", "aria-hidden": "true" }, h(CaretRightIcon, { key: '2799c66de6d3291622bd3dea39e4c1f7f97a1bc9' })), this.current ? (h("span", { part: "current", class: "bs-breadcrumb__current", "aria-current": "page" }, h("slot", null))) : this.href ? (h("a", { part: "link", class: "bs-breadcrumb__link", href: this.href, onClick: this.onLinkClick }, h("slot", null))) : (h("span", { part: "link", class: "bs-breadcrumb__link" }, h("slot", null)))));
|
|
47
60
|
}
|
|
48
61
|
static get is() { return "bs-breadcrumb"; }
|
|
49
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -126,5 +139,23 @@ export class BsBreadcrumb {
|
|
|
126
139
|
}
|
|
127
140
|
};
|
|
128
141
|
}
|
|
142
|
+
static get events() {
|
|
143
|
+
return [{
|
|
144
|
+
"method": "bsNavigate",
|
|
145
|
+
"name": "bsNavigate",
|
|
146
|
+
"bubbles": true,
|
|
147
|
+
"cancelable": true,
|
|
148
|
+
"composed": true,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Fires when the crumb's link is clicked, before the browser navigates. **Cancelable**: call\n`event.preventDefault()` to stop the native navigation and route it yourself (an SPA router).\nDetail is `{ href }`. Only a plain primary-button click emits it -- ctrl/cmd/shift/alt-clicks\nand middle-clicks (open in a new tab/window) are left to the browser. Bubbles and is composed,\nso one listener on the surrounding `<bs-breadcrumbs>` covers every crumb."
|
|
152
|
+
},
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "{ href: string }",
|
|
155
|
+
"resolved": "{ href: string; }",
|
|
156
|
+
"references": {}
|
|
157
|
+
}
|
|
158
|
+
}];
|
|
159
|
+
}
|
|
129
160
|
}
|
|
130
161
|
const CaretRightIcon = () => (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M6 3L11 8L6 13", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -115,4 +115,49 @@ describe('bs-breadcrumb-overflow', () => {
|
|
|
115
115
|
expect(root).toEqualAttribute('size', 'sm');
|
|
116
116
|
});
|
|
117
117
|
});
|
|
118
|
+
describe('bsNavigate', () => {
|
|
119
|
+
const open = async (items) => {
|
|
120
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-breadcrumb-overflow", null));
|
|
121
|
+
root.items = items;
|
|
122
|
+
await waitForChanges();
|
|
123
|
+
root.shadowRoot.querySelector('[part="ellipsis"]').click();
|
|
124
|
+
await waitForChanges();
|
|
125
|
+
return { root, spy: spyOnEvent('bsNavigate') };
|
|
126
|
+
};
|
|
127
|
+
// Dispatches a synthetic click and reports whether the component's own handlers (or a consumer's
|
|
128
|
+
// bsNavigate listener) prevented it. A window-level guard then blocks the native navigation in
|
|
129
|
+
// every case -- an un-prevented click on an <a> really navigates the test page, which the test
|
|
130
|
+
// runner's frame does not survive.
|
|
131
|
+
const click = (el, init = {}) => {
|
|
132
|
+
const ev = new MouseEvent('click', { bubbles: true, cancelable: true, composed: true, button: 0, ...init });
|
|
133
|
+
let prevented = false;
|
|
134
|
+
const guard = (e) => {
|
|
135
|
+
prevented = e.defaultPrevented;
|
|
136
|
+
e.preventDefault();
|
|
137
|
+
};
|
|
138
|
+
window.addEventListener('click', guard, { once: true });
|
|
139
|
+
el.dispatchEvent(ev);
|
|
140
|
+
window.removeEventListener('click', guard);
|
|
141
|
+
return { prevented };
|
|
142
|
+
};
|
|
143
|
+
it('clicking a popup link emits a cancelable bsNavigate with that link\'s href', async () => {
|
|
144
|
+
const { root, spy } = await open([
|
|
145
|
+
{ label: 'A', href: '#ov-a' },
|
|
146
|
+
{ label: 'B', href: '#ov-b' },
|
|
147
|
+
]);
|
|
148
|
+
const links = root.shadowRoot.querySelectorAll('a[part="link"]');
|
|
149
|
+
click(links[1]);
|
|
150
|
+
expect(spy).toHaveReceivedEventTimes(1);
|
|
151
|
+
expect(spy).toHaveReceivedEventDetail({ href: '#ov-b' });
|
|
152
|
+
expect(spy.lastEvent.cancelable).toBe(true);
|
|
153
|
+
});
|
|
154
|
+
it('preventDefault() cancels the native navigation; a ctrl-click does not emit', async () => {
|
|
155
|
+
const { root, spy } = await open([{ label: 'A', href: '#ov-c' }]);
|
|
156
|
+
root.addEventListener('bsNavigate', e => e.preventDefault());
|
|
157
|
+
const link = root.shadowRoot.querySelector('a[part="link"]');
|
|
158
|
+
expect(click(link).prevented).toBe(true);
|
|
159
|
+
click(link, { ctrlKey: true });
|
|
160
|
+
expect(spy).toHaveReceivedEventTimes(1);
|
|
161
|
+
});
|
|
162
|
+
});
|
|
118
163
|
});
|
package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js
CHANGED
|
@@ -54,6 +54,17 @@ export class BsBreadcrumbOverflow {
|
|
|
54
54
|
size = 'md';
|
|
55
55
|
/** Whether the overflow popup is open. */
|
|
56
56
|
open = false;
|
|
57
|
+
/** Fires when one of the popup's links is clicked, before the browser navigates. **Cancelable**
|
|
58
|
+
* -- see `bs-breadcrumb`'s `bsNavigate`, which this mirrors (same detail, same modified-click
|
|
59
|
+
* rule). Detail is `{ href }`. */
|
|
60
|
+
bsNavigate;
|
|
61
|
+
onItemClick = (href) => (ev) => {
|
|
62
|
+
if (ev.defaultPrevented || ev.button !== 0 || ev.metaKey || ev.ctrlKey || ev.shiftKey || ev.altKey)
|
|
63
|
+
return;
|
|
64
|
+
const navigate = this.bsNavigate.emit({ href });
|
|
65
|
+
if (navigate.defaultPrevented)
|
|
66
|
+
ev.preventDefault();
|
|
67
|
+
};
|
|
57
68
|
onEllipsisToggle = () => {
|
|
58
69
|
this.open = !this.open;
|
|
59
70
|
};
|
|
@@ -77,7 +88,7 @@ export class BsBreadcrumbOverflow {
|
|
|
77
88
|
}
|
|
78
89
|
}
|
|
79
90
|
render() {
|
|
80
|
-
return (h(Host, { key: '
|
|
91
|
+
return (h(Host, { key: '4dd958f3f99f42072bb314654fc5a0856d8e41c4', role: "listitem" }, h("span", { key: 'ab7d01467e99b810b62e71d7ed289316470529f5', part: "separator", class: "bs-breadcrumb-overflow__separator", "aria-hidden": "true" }, h(CaretRightIcon, { key: '6590de37057e39c4c914fde3dc3490e17566ad66' })), h("span", { key: '63081f592180f605716221c80dbb877acf926d48', class: "bs-breadcrumb-overflow__wrapper" }, h("button", { key: '0ec87f47561dc329269b1fefef0ccb76dae4cdb4', type: "button", part: "ellipsis", class: "bs-breadcrumb-overflow__ellipsis", "aria-haspopup": "menu", "aria-expanded": String(this.open), "aria-label": this.overflowLabel, onClick: this.onEllipsisToggle }, h(DotsThreeIcon, { key: '6da3c5bee9f532264e2e58227dccc4dfc3786782' })), this.open && this.items.length > 0 && (h("bs-menu", { key: '66f772f0f53090e960d2a9b08e1283989dfc02f8', part: "menu", class: "bs-breadcrumb-overflow__menu" }, this.items.map(item => item.href ? (h("a", { part: "link", class: "bs-breadcrumb-overflow__link", href: item.href, onClick: this.onItemClick(item.href) }, item.label)) : (h("span", { part: "link", class: "bs-breadcrumb-overflow__link" }, item.label))))))));
|
|
81
92
|
}
|
|
82
93
|
static get is() { return "bs-breadcrumb-overflow"; }
|
|
83
94
|
static get encapsulation() { return "shadow"; }
|
|
@@ -171,6 +182,24 @@ export class BsBreadcrumbOverflow {
|
|
|
171
182
|
"open": {}
|
|
172
183
|
};
|
|
173
184
|
}
|
|
185
|
+
static get events() {
|
|
186
|
+
return [{
|
|
187
|
+
"method": "bsNavigate",
|
|
188
|
+
"name": "bsNavigate",
|
|
189
|
+
"bubbles": true,
|
|
190
|
+
"cancelable": true,
|
|
191
|
+
"composed": true,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": "Fires when one of the popup's links is clicked, before the browser navigates. **Cancelable**\n-- see `bs-breadcrumb`'s `bsNavigate`, which this mirrors (same detail, same modified-click\nrule). Detail is `{ href }`."
|
|
195
|
+
},
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "{ href: string }",
|
|
198
|
+
"resolved": "{ href: string; }",
|
|
199
|
+
"references": {}
|
|
200
|
+
}
|
|
201
|
+
}];
|
|
202
|
+
}
|
|
174
203
|
static get elementRef() { return "el"; }
|
|
175
204
|
static get listeners() {
|
|
176
205
|
return [{
|
|
@@ -263,11 +263,11 @@
|
|
|
263
263
|
/* Gap between icon and label: spacing/xs (4px) per Figma node 2842:50344's state-layer gap, not
|
|
264
264
|
spacing-100 (8px). */
|
|
265
265
|
.bs-button__icon--visible {
|
|
266
|
-
margin-
|
|
266
|
+
margin-inline-end: var(--bs-spacing-50);
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
.bs-button__end-icon--visible {
|
|
270
|
-
margin-
|
|
270
|
+
margin-inline-start: var(--bs-spacing-50);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
.bs-button__icon ::slotted(*),
|
|
@@ -282,10 +282,10 @@
|
|
|
282
282
|
aspect-ratio: 1 / 1;
|
|
283
283
|
}
|
|
284
284
|
.bs-button--icon-only .bs-button__icon--visible {
|
|
285
|
-
margin-
|
|
285
|
+
margin-inline-end: 0;
|
|
286
286
|
}
|
|
287
287
|
.bs-button--icon-only .bs-button__end-icon--visible {
|
|
288
|
-
margin-
|
|
288
|
+
margin-inline-start: 0;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
/* Verified against a Figma redline for the icon+label layout: the edge next to an icon is
|
|
@@ -295,14 +295,21 @@
|
|
|
295
295
|
the icon-less button (12+20 = 16+16 = 32px for size="md"). This is deliberately NOT
|
|
296
296
|
size-dependent, same as the icon/label gap above -- neither varies by size in the source spec. */
|
|
297
297
|
.bs-button--has-icon:not(.bs-button--has-end-icon) {
|
|
298
|
-
padding-
|
|
299
|
-
padding-
|
|
298
|
+
padding-inline-start: var(--bs-button-padding-x-icon-side);
|
|
299
|
+
padding-inline-end: var(--bs-button-padding-x-label-side);
|
|
300
300
|
}
|
|
301
301
|
.bs-button--has-end-icon:not(.bs-button--has-icon) {
|
|
302
|
-
padding-
|
|
303
|
-
padding-
|
|
302
|
+
padding-inline-start: var(--bs-button-padding-x-label-side);
|
|
303
|
+
padding-inline-end: var(--bs-button-padding-x-icon-side);
|
|
304
304
|
}
|
|
305
305
|
.bs-button--has-icon.bs-button--has-end-icon {
|
|
306
|
-
padding-
|
|
307
|
-
padding-
|
|
306
|
+
padding-inline-start: var(--bs-button-padding-x-icon-side);
|
|
307
|
+
padding-inline-end: var(--bs-button-padding-x-icon-side);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* Windows High Contrast: author backgrounds are dropped, so keep the button boundary and a visible focus ring. */
|
|
311
|
+
@media (forced-colors: active) {
|
|
312
|
+
.bs-button { border: 1px solid ButtonText; }
|
|
313
|
+
.bs-button:disabled { border-color: GrayText; color: GrayText; }
|
|
314
|
+
.bs-button:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
|
|
308
315
|
}
|