@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
|
@@ -35,6 +35,7 @@ import { h } from "@stencil/core";
|
|
|
35
35
|
*/
|
|
36
36
|
export class BsButton {
|
|
37
37
|
el;
|
|
38
|
+
internals;
|
|
38
39
|
/**
|
|
39
40
|
* Visual style. Maps directly to the brandsync-tokens `--bs-button-*` semantic set.
|
|
40
41
|
* `error` is for destructive/irreversible actions per BrandSync guidance, not a stronger
|
|
@@ -45,7 +46,8 @@ export class BsButton {
|
|
|
45
46
|
size = 'md';
|
|
46
47
|
/** Disables the button and applies the disabled token set. */
|
|
47
48
|
disabled = false;
|
|
48
|
-
/**
|
|
49
|
+
/** Button type. `submit` submits the surrounding `<form>` (via `requestSubmit()`, so validation
|
|
50
|
+
* runs); `reset` resets it; `button` (default) does nothing on its own. */
|
|
49
51
|
type = 'button';
|
|
50
52
|
/**
|
|
51
53
|
* Accessible name for the button. Required for icon-only usage (no visible label text via the
|
|
@@ -103,13 +105,23 @@ export class BsButton {
|
|
|
103
105
|
onLabelSlotchange = (ev) => {
|
|
104
106
|
this.hasLabel = ev.target.assignedNodes().length > 0;
|
|
105
107
|
};
|
|
108
|
+
onClick = () => {
|
|
109
|
+
const form = this.internals?.form;
|
|
110
|
+
if (!form || this.disabled)
|
|
111
|
+
return;
|
|
112
|
+
if (this.type === 'submit')
|
|
113
|
+
form.requestSubmit();
|
|
114
|
+
else if (this.type === 'reset')
|
|
115
|
+
form.reset();
|
|
116
|
+
};
|
|
106
117
|
render() {
|
|
107
118
|
const iconOnly = (this.hasIcon || this.hasEndIcon) && !this.hasLabel;
|
|
108
|
-
return (h("button", { key: '
|
|
119
|
+
return (h("button", { key: 'c218d6df7ccdbb753a2965e6f25a2ed7c0fd73fc', class: `bs-button bs-button--${this.variant} bs-button--${this.size} ${iconOnly ? 'bs-button--icon-only' : ''} ${this.hasIcon && !iconOnly ? 'bs-button--has-icon' : ''} ${this.hasEndIcon && !iconOnly ? 'bs-button--has-end-icon' : ''}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: '8b664e7aae4d4558aeb9fa2d5bc39c0445bd6e1d', part: "icon", class: `bs-button__icon ${this.hasIcon ? 'bs-button__icon--visible' : ''}` }, h("slot", { key: '708b742030c8f4aaeeea36ce68c0c9bc3d9839f9', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'db1a5517c7a68d3dafd884b3ebf590e53d911782', part: "label", class: "bs-button__label" }, h("slot", { key: 'ba58f01560f81165e24624b5511848d42b602965', onSlotchange: this.onLabelSlotchange })), h("span", { key: '78f6f131f9b6ea390b1f18929053040e93b688f3', part: "end-icon", class: `bs-button__end-icon ${this.hasEndIcon ? 'bs-button__end-icon--visible' : ''}` }, h("slot", { key: 'ee1c230a9f4099e625623173ab429c76664ee64e', name: "end-icon", onSlotchange: this.onEndIconSlotchange }))));
|
|
109
120
|
}
|
|
110
121
|
static get is() { return "bs-button"; }
|
|
111
122
|
static get encapsulation() { return "shadow"; }
|
|
112
123
|
static get delegatesFocus() { return true; }
|
|
124
|
+
static get formAssociated() { return true; }
|
|
113
125
|
static get originalStyleUrls() {
|
|
114
126
|
return {
|
|
115
127
|
"$": ["bs-button.css"]
|
|
@@ -206,7 +218,7 @@ export class BsButton {
|
|
|
206
218
|
"optional": false,
|
|
207
219
|
"docs": {
|
|
208
220
|
"tags": [],
|
|
209
|
-
"text": "
|
|
221
|
+
"text": "Button type. `submit` submits the surrounding `<form>` (via `requestSubmit()`, so validation\nruns); `reset` resets it; `button` (default) does nothing on its own."
|
|
210
222
|
},
|
|
211
223
|
"getter": false,
|
|
212
224
|
"setter": false,
|
|
@@ -244,4 +256,5 @@ export class BsButton {
|
|
|
244
256
|
};
|
|
245
257
|
}
|
|
246
258
|
static get elementRef() { return "el"; }
|
|
259
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
247
260
|
}
|
|
@@ -80,4 +80,24 @@ describe('bs-icon-button', () => {
|
|
|
80
80
|
expect(iconWrapper.querySelector('slot')).not.toBeNull();
|
|
81
81
|
expect(root.querySelector('svg.my-icon')).not.toBeNull();
|
|
82
82
|
});
|
|
83
|
+
describe('icon-font glyphs', () => {
|
|
84
|
+
// Issue: a slotted icon-font glyph (<i class="ph-bold ...">) ignored the size prop, because
|
|
85
|
+
// glyphs are sized by font-size and only width/height were being set.
|
|
86
|
+
for (const [size, px] of [
|
|
87
|
+
['xs', 8],
|
|
88
|
+
['sm', 16],
|
|
89
|
+
['md', 20],
|
|
90
|
+
['lg', 24],
|
|
91
|
+
]) {
|
|
92
|
+
it(`size="${size}" sizes a slotted glyph to ${px}px via font-size`, async () => {
|
|
93
|
+
const { root } = await render(h("bs-icon-button", { size: size, ariaLabel: "Bell" }, h("i", { class: "glyph" }, "A")));
|
|
94
|
+
const glyph = root.querySelector('i.glyph');
|
|
95
|
+
expect(getComputedStyle(glyph).fontSize).toBe(`${px}px`);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
it('does not override a font-size the consumer sets on the glyph themselves', async () => {
|
|
99
|
+
const { root } = await render(h("bs-icon-button", { size: "md", ariaLabel: "Bell" }, h("i", { class: "glyph", style: { fontSize: '30px' } }, "A")));
|
|
100
|
+
expect(getComputedStyle(root.querySelector('i.glyph')).fontSize).toBe('30px');
|
|
101
|
+
});
|
|
102
|
+
});
|
|
83
103
|
});
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* @prop --bs-icon-button-radius: Corner radius, size="sm"/"md"/"lg". Aliased to --bs-border-radius-100.
|
|
3
3
|
* @prop --bs-icon-button-radius-xs: Corner radius, size="xs" -- a smaller radius than --bs-icon-button-radius, since --bs-border-radius-100 (8px) on a 16px box would look nearly circular. Aliased to --bs-border-radius-50.
|
|
4
4
|
* @prop --bs-icon-button-size-xs: Container width/height at size="xs". 16px.
|
|
5
|
-
* @prop --bs-icon-button-icon-size-xs: Slotted icon width/height at size="xs". 8px.
|
|
5
|
+
* @prop --bs-icon-button-icon-size-xs: Slotted icon width/height (and font-size, for icon-font glyphs) at size="xs". 8px.
|
|
6
6
|
* @prop --bs-icon-button-padding-xs: Padding on all sides, size="xs" only -- distinct from --bs-icon-button-padding, since 16px/8px icon math (4px) differs from the sm/md/lg constant (12px). Aliased to --bs-spacing-50.
|
|
7
7
|
* @prop --bs-icon-button-size-sm: Container width/height at size="sm". 40px.
|
|
8
8
|
* @prop --bs-icon-button-size-md: Container width/height at size="md". 44px.
|
|
9
9
|
* @prop --bs-icon-button-size-lg: Container width/height at size="lg". 48px.
|
|
10
|
-
* @prop --bs-icon-button-icon-size-sm: Slotted icon width/height at size="sm". 16px.
|
|
11
|
-
* @prop --bs-icon-button-icon-size-md: Slotted icon width/height at size="md". 20px.
|
|
12
|
-
* @prop --bs-icon-button-icon-size-lg: Slotted icon width/height at size="lg". 24px.
|
|
10
|
+
* @prop --bs-icon-button-icon-size-sm: Slotted icon width/height (and font-size, for icon-font glyphs) at size="sm". 16px.
|
|
11
|
+
* @prop --bs-icon-button-icon-size-md: Slotted icon width/height (and font-size, for icon-font glyphs) at size="md". 20px.
|
|
12
|
+
* @prop --bs-icon-button-icon-size-lg: Slotted icon width/height (and font-size, for icon-font glyphs) at size="lg". 24px.
|
|
13
13
|
* @prop --bs-icon-button-padding: Padding on all sides, all sizes (constant -- centers the icon
|
|
14
14
|
* inside the container at every size). Aliased to --bs-spacing-150.
|
|
15
15
|
* @prop --bs-icon-button-primary-default: Background, variant="primary", default. Aliased to --bs-color-primary-default.
|
|
@@ -161,6 +161,9 @@
|
|
|
161
161
|
.bs-icon-button--xs .bs-icon-button__icon {
|
|
162
162
|
width: var(--bs-icon-button-icon-size-xs);
|
|
163
163
|
height: var(--bs-icon-button-icon-size-xs);
|
|
164
|
+
/* Icon-font glyphs (e.g. <i class="ph-bold ph-bell">) are sized by font-size, not width/height,
|
|
165
|
+
so they follow the same token as SVG icons do. */
|
|
166
|
+
font-size: var(--bs-icon-button-icon-size-xs);
|
|
164
167
|
}
|
|
165
168
|
|
|
166
169
|
.bs-icon-button--sm {
|
|
@@ -170,6 +173,9 @@
|
|
|
170
173
|
.bs-icon-button--sm .bs-icon-button__icon {
|
|
171
174
|
width: var(--bs-icon-button-icon-size-sm);
|
|
172
175
|
height: var(--bs-icon-button-icon-size-sm);
|
|
176
|
+
/* Icon-font glyphs (e.g. <i class="ph-bold ph-bell">) are sized by font-size, not width/height,
|
|
177
|
+
so they follow the same token as SVG icons do. */
|
|
178
|
+
font-size: var(--bs-icon-button-icon-size-sm);
|
|
173
179
|
}
|
|
174
180
|
|
|
175
181
|
.bs-icon-button--md {
|
|
@@ -179,6 +185,9 @@
|
|
|
179
185
|
.bs-icon-button--md .bs-icon-button__icon {
|
|
180
186
|
width: var(--bs-icon-button-icon-size-md);
|
|
181
187
|
height: var(--bs-icon-button-icon-size-md);
|
|
188
|
+
/* Icon-font glyphs (e.g. <i class="ph-bold ph-bell">) are sized by font-size, not width/height,
|
|
189
|
+
so they follow the same token as SVG icons do. */
|
|
190
|
+
font-size: var(--bs-icon-button-icon-size-md);
|
|
182
191
|
}
|
|
183
192
|
|
|
184
193
|
.bs-icon-button--lg {
|
|
@@ -188,6 +197,9 @@
|
|
|
188
197
|
.bs-icon-button--lg .bs-icon-button__icon {
|
|
189
198
|
width: var(--bs-icon-button-icon-size-lg);
|
|
190
199
|
height: var(--bs-icon-button-icon-size-lg);
|
|
200
|
+
/* Icon-font glyphs (e.g. <i class="ph-bold ph-bell">) are sized by font-size, not width/height,
|
|
201
|
+
so they follow the same token as SVG icons do. */
|
|
202
|
+
font-size: var(--bs-icon-button-icon-size-lg);
|
|
191
203
|
}
|
|
192
204
|
|
|
193
205
|
.bs-icon-button__icon {
|
|
@@ -195,12 +207,17 @@
|
|
|
195
207
|
align-items: center;
|
|
196
208
|
justify-content: center;
|
|
197
209
|
color: inherit;
|
|
210
|
+
line-height: 1;
|
|
198
211
|
}
|
|
199
212
|
|
|
200
213
|
.bs-icon-button__icon ::slotted(*) {
|
|
201
214
|
display: block;
|
|
202
215
|
width: 100%;
|
|
203
216
|
height: 100%;
|
|
217
|
+
/* Make a slotted icon font glyph take the wrapper's font-size (above) rather than whatever the
|
|
218
|
+
page's inherited size happens to be. */
|
|
219
|
+
font-size: inherit;
|
|
220
|
+
line-height: 1;
|
|
204
221
|
}
|
|
205
222
|
|
|
206
223
|
.bs-icon-button--primary {
|
|
@@ -20,7 +20,8 @@ import { h } from "@stencil/core";
|
|
|
20
20
|
* just conditionally, unlike `bs-button`) -- there's no visible label text to fall back on for an
|
|
21
21
|
* accessible name.
|
|
22
22
|
*
|
|
23
|
-
* @slot - Default slot: the icon content. Exactly one icon, no label
|
|
23
|
+
* @slot - Default slot: the icon content. Exactly one icon, no label -- an inline SVG, or an icon-font
|
|
24
|
+
* glyph (sized by `font-size`, which this component sets from the `size` prop).
|
|
24
25
|
* @part icon - The icon wrapper element.
|
|
25
26
|
*/
|
|
26
27
|
// Note: this component's CSS Custom Properties (--bs-icon-button-*) are documented via @prop
|
|
@@ -28,6 +29,7 @@ import { h } from "@stencil/core";
|
|
|
28
29
|
// CSS file comments, not the class-level JSDoc (see bs-tab.css's/bs-inline-tab.css's equivalent note).
|
|
29
30
|
export class BsIconButton {
|
|
30
31
|
el;
|
|
32
|
+
internals;
|
|
31
33
|
/**
|
|
32
34
|
* Visual style. Maps to the same semantic token families as `bs-button`'s `variant`.
|
|
33
35
|
* `error` is for destructive/irreversible actions per BrandSync guidance, not a stronger
|
|
@@ -41,7 +43,8 @@ export class BsIconButton {
|
|
|
41
43
|
size = 'md';
|
|
42
44
|
/** Disables the button and applies the disabled token set. */
|
|
43
45
|
disabled = false;
|
|
44
|
-
/**
|
|
46
|
+
/** Button type. `submit` submits the surrounding `<form>` (via `requestSubmit()`, so validation
|
|
47
|
+
* runs); `reset` resets it; `button` (default) does nothing on its own. */
|
|
45
48
|
type = 'button';
|
|
46
49
|
/**
|
|
47
50
|
* Accessible name for the button. Required -- this component is always icon-only, so there's
|
|
@@ -49,12 +52,22 @@ export class BsIconButton {
|
|
|
49
52
|
* prop to the `aria-label` HTML attribute automatically.
|
|
50
53
|
*/
|
|
51
54
|
ariaLabel = null;
|
|
55
|
+
onClick = () => {
|
|
56
|
+
const form = this.internals?.form;
|
|
57
|
+
if (!form || this.disabled)
|
|
58
|
+
return;
|
|
59
|
+
if (this.type === 'submit')
|
|
60
|
+
form.requestSubmit();
|
|
61
|
+
else if (this.type === 'reset')
|
|
62
|
+
form.reset();
|
|
63
|
+
};
|
|
52
64
|
render() {
|
|
53
|
-
return (h("button", { key: '
|
|
65
|
+
return (h("button", { key: '538cd121df25e20ea7e21a7b5269e73d275f8bff', class: `bs-icon-button bs-icon-button--${this.variant} bs-icon-button--${this.size}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: '35548fe082134edb85dbdcb0caf820ec3b5233c2', part: "icon", class: "bs-icon-button__icon" }, h("slot", { key: '7f16ef5f2c08fc5d2bb852bd5c36598be5aa1175' }))));
|
|
54
66
|
}
|
|
55
67
|
static get is() { return "bs-icon-button"; }
|
|
56
68
|
static get encapsulation() { return "shadow"; }
|
|
57
69
|
static get delegatesFocus() { return true; }
|
|
70
|
+
static get formAssociated() { return true; }
|
|
58
71
|
static get originalStyleUrls() {
|
|
59
72
|
return {
|
|
60
73
|
"$": ["bs-icon-button.css"]
|
|
@@ -151,7 +164,7 @@ export class BsIconButton {
|
|
|
151
164
|
"optional": false,
|
|
152
165
|
"docs": {
|
|
153
166
|
"tags": [],
|
|
154
|
-
"text": "
|
|
167
|
+
"text": "Button type. `submit` submits the surrounding `<form>` (via `requestSubmit()`, so validation\nruns); `reset` resets it; `button` (default) does nothing on its own."
|
|
155
168
|
},
|
|
156
169
|
"getter": false,
|
|
157
170
|
"setter": false,
|
|
@@ -182,4 +195,5 @@ export class BsIconButton {
|
|
|
182
195
|
};
|
|
183
196
|
}
|
|
184
197
|
static get elementRef() { return "el"; }
|
|
198
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
185
199
|
}
|
|
@@ -42,6 +42,16 @@ export const Sizes = {
|
|
|
42
42
|
</div>
|
|
43
43
|
`,
|
|
44
44
|
};
|
|
45
|
+
// An icon-font glyph in the slot (here a plain text glyph, so the story needs no icon-font
|
|
46
|
+
// dependency) scales with `size` exactly like the SVG above -- no manual font-size needed.
|
|
47
|
+
export const IconFontGlyph = {
|
|
48
|
+
name: 'Icon-font glyph',
|
|
49
|
+
render: args => html `
|
|
50
|
+
<div style="display:flex; gap:12px; align-items:center;">
|
|
51
|
+
${['xs', 'sm', 'md', 'lg'].map(size => html `<bs-icon-button size=${size} aria-label=${args.ariaLabel}><i style="font-style: normal;">★</i></bs-icon-button>`)}
|
|
52
|
+
</div>
|
|
53
|
+
`,
|
|
54
|
+
};
|
|
45
55
|
export const Disabled = {
|
|
46
56
|
args: { disabled: true },
|
|
47
57
|
};
|
package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css
CHANGED
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
.bs-chatbot-response-action__menu-popup {
|
|
73
73
|
position: absolute;
|
|
74
74
|
top: calc(100% + var(--bs-spacing-50));
|
|
75
|
-
|
|
75
|
+
inset-inline-start: 0;
|
|
76
76
|
z-index: 1;
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
gap: var(--bs-chatbot-response-action-sources-gap);
|
|
91
91
|
border-radius: var(--bs-chatbot-response-action-button-radius);
|
|
92
92
|
height: var(--bs-chatbot-response-action-button-size);
|
|
93
|
-
padding-
|
|
94
|
-
padding-
|
|
93
|
+
padding-inline-start: var(--bs-chatbot-response-action-sources-padding-left);
|
|
94
|
+
padding-inline-end: var(--bs-chatbot-response-action-sources-padding-right);
|
|
95
95
|
flex-shrink: 0;
|
|
96
96
|
transition: background-color var(--bs-duration-fast) var(--bs-easing-standard);
|
|
97
97
|
}
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
.bs-checkbox__input {
|
|
86
86
|
position: absolute;
|
|
87
87
|
top: 0;
|
|
88
|
-
|
|
88
|
+
inset-inline-start: 0;
|
|
89
89
|
width: 100%;
|
|
90
90
|
height: 100%;
|
|
91
91
|
margin: 0;
|
|
@@ -197,3 +197,10 @@
|
|
|
197
197
|
.bs-checkbox:not(.bs-checkbox--disabled) .bs-checkbox__box--error ~ .bs-checkbox__label {
|
|
198
198
|
color: var(--bs-checkbox-label-color-error);
|
|
199
199
|
}
|
|
200
|
+
|
|
201
|
+
/* Windows High Contrast: keep the box outline and show the checked state with system colors. */
|
|
202
|
+
@media (forced-colors: active) {
|
|
203
|
+
.bs-checkbox__box { border: 2px solid ButtonText; forced-color-adjust: none; background: Canvas; color: ButtonText; }
|
|
204
|
+
.bs-checkbox__box--selected { background: Highlight; border-color: Highlight; color: HighlightText; }
|
|
205
|
+
.bs-checkbox__box--disabled { border-color: GrayText; color: GrayText; }
|
|
206
|
+
}
|
|
@@ -22,7 +22,15 @@ import { h } from "@stencil/core";
|
|
|
22
22
|
// comments, not the class-level JSDoc (see bs-input.tsx's equivalent note).
|
|
23
23
|
export class BsCheckbox {
|
|
24
24
|
el;
|
|
25
|
+
internals;
|
|
25
26
|
inputEl;
|
|
27
|
+
initialChecked = false;
|
|
28
|
+
/** The `name` the value is submitted under in a surrounding `<form>`'s `FormData`. */
|
|
29
|
+
name;
|
|
30
|
+
/** The value submitted when checked (native checkbox default: `"on"`). */
|
|
31
|
+
value = 'on';
|
|
32
|
+
/** Marks the checkbox as required: the surrounding form fails validation while unchecked. */
|
|
33
|
+
required = false;
|
|
26
34
|
/** Sizing scale. Controls the box's width/height and border width; corner radius is constant
|
|
27
35
|
* across all sizes. */
|
|
28
36
|
size = 'lg';
|
|
@@ -58,6 +66,26 @@ export class BsCheckbox {
|
|
|
58
66
|
bsChange;
|
|
59
67
|
/** Keeps the native input's `.indeterminate` JS property in sync -- this can't be expressed as a
|
|
60
68
|
* JSX attribute in Stencil, it must be set imperatively on the element. */
|
|
69
|
+
syncFormValue() {
|
|
70
|
+
if (!this.internals?.setFormValue)
|
|
71
|
+
return;
|
|
72
|
+
this.internals.setFormValue(this.checked ? this.value : null);
|
|
73
|
+
if (this.required && !this.checked) {
|
|
74
|
+
this.internals.setValidity({ valueMissing: true }, 'Please check this box if you want to proceed.', this.inputEl);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
this.internals.setValidity({});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/** Called by the browser when the surrounding `<form>` is reset. */
|
|
81
|
+
formResetCallback() {
|
|
82
|
+
this.checked = this.initialChecked;
|
|
83
|
+
this.indeterminate = false;
|
|
84
|
+
}
|
|
85
|
+
componentWillLoad() {
|
|
86
|
+
this.initialChecked = this.checked;
|
|
87
|
+
this.syncFormValue();
|
|
88
|
+
}
|
|
61
89
|
onIndeterminateChange() {
|
|
62
90
|
if (this.inputEl) {
|
|
63
91
|
this.inputEl.indeterminate = this.indeterminate;
|
|
@@ -92,11 +120,12 @@ export class BsCheckbox {
|
|
|
92
120
|
]
|
|
93
121
|
.filter(Boolean)
|
|
94
122
|
.join(' ');
|
|
95
|
-
return (h("label", { key: '
|
|
123
|
+
return (h("label", { key: '98b2c7da5530c74c5632f28a770096201df43f1f', class: `bs-checkbox ${this.disabled ? 'bs-checkbox--disabled' : ''}` }, h("input", { key: '1765be1adab7001f6b8c6ca79c9da8ca3a67bb77', ref: el => (this.inputEl = el), class: "bs-checkbox__input", type: "checkbox", checked: this.checked, disabled: this.disabled, required: this.required, "aria-checked": this.indeterminate ? 'mixed' : String(this.checked), "aria-label": this.ariaLabel, onChange: this.onChange }), h("span", { key: 'ffae4c14191d40da029aaa058d0a11f1170e8c00', part: "box", class: boxClasses }, showIcon && (h("svg", { key: 'ef0ddf8663a8d1a517b3604c8fa3a98ff1ba7187', part: "icon", class: "bs-checkbox__icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, this.indeterminate ? (h("path", { d: "M3 8H13", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })) : (h("path", { d: "M3 8.5L6.2 11.5L13 4.5", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))))), h("span", { key: '9fda5d8e25fecbc6d4ebe9339f63fae58e8bac26', part: "label", class: "bs-checkbox__label" }, h("slot", { key: '95d6e3a55c81444feb8d1221bb080b9c49a8cf46' }))));
|
|
96
124
|
}
|
|
97
125
|
static get is() { return "bs-checkbox"; }
|
|
98
126
|
static get encapsulation() { return "shadow"; }
|
|
99
127
|
static get delegatesFocus() { return true; }
|
|
128
|
+
static get formAssociated() { return true; }
|
|
100
129
|
static get originalStyleUrls() {
|
|
101
130
|
return {
|
|
102
131
|
"$": ["bs-checkbox.css"]
|
|
@@ -109,6 +138,65 @@ export class BsCheckbox {
|
|
|
109
138
|
}
|
|
110
139
|
static get properties() {
|
|
111
140
|
return {
|
|
141
|
+
"name": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"mutable": false,
|
|
144
|
+
"complexType": {
|
|
145
|
+
"original": "string",
|
|
146
|
+
"resolved": "string",
|
|
147
|
+
"references": {}
|
|
148
|
+
},
|
|
149
|
+
"required": false,
|
|
150
|
+
"optional": true,
|
|
151
|
+
"docs": {
|
|
152
|
+
"tags": [],
|
|
153
|
+
"text": "The `name` the value is submitted under in a surrounding `<form>`'s `FormData`."
|
|
154
|
+
},
|
|
155
|
+
"getter": false,
|
|
156
|
+
"setter": false,
|
|
157
|
+
"reflect": true,
|
|
158
|
+
"attribute": "name"
|
|
159
|
+
},
|
|
160
|
+
"value": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "string",
|
|
165
|
+
"resolved": "string",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": "The value submitted when checked (native checkbox default: `\"on\"`)."
|
|
173
|
+
},
|
|
174
|
+
"getter": false,
|
|
175
|
+
"setter": false,
|
|
176
|
+
"reflect": false,
|
|
177
|
+
"attribute": "value",
|
|
178
|
+
"defaultValue": "'on'"
|
|
179
|
+
},
|
|
180
|
+
"required": {
|
|
181
|
+
"type": "boolean",
|
|
182
|
+
"mutable": false,
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "boolean",
|
|
185
|
+
"resolved": "boolean",
|
|
186
|
+
"references": {}
|
|
187
|
+
},
|
|
188
|
+
"required": false,
|
|
189
|
+
"optional": false,
|
|
190
|
+
"docs": {
|
|
191
|
+
"tags": [],
|
|
192
|
+
"text": "Marks the checkbox as required: the surrounding form fails validation while unchecked."
|
|
193
|
+
},
|
|
194
|
+
"getter": false,
|
|
195
|
+
"setter": false,
|
|
196
|
+
"reflect": false,
|
|
197
|
+
"attribute": "required",
|
|
198
|
+
"defaultValue": "false"
|
|
199
|
+
},
|
|
112
200
|
"size": {
|
|
113
201
|
"type": "string",
|
|
114
202
|
"mutable": false,
|
|
@@ -191,7 +279,7 @@ export class BsCheckbox {
|
|
|
191
279
|
},
|
|
192
280
|
"getter": false,
|
|
193
281
|
"setter": false,
|
|
194
|
-
"reflect":
|
|
282
|
+
"reflect": true,
|
|
195
283
|
"attribute": "disabled",
|
|
196
284
|
"defaultValue": "false"
|
|
197
285
|
},
|
|
@@ -258,8 +346,18 @@ export class BsCheckbox {
|
|
|
258
346
|
static get elementRef() { return "el"; }
|
|
259
347
|
static get watchers() {
|
|
260
348
|
return [{
|
|
349
|
+
"propName": "checked",
|
|
350
|
+
"methodName": "syncFormValue"
|
|
351
|
+
}, {
|
|
352
|
+
"propName": "value",
|
|
353
|
+
"methodName": "syncFormValue"
|
|
354
|
+
}, {
|
|
355
|
+
"propName": "required",
|
|
356
|
+
"methodName": "syncFormValue"
|
|
357
|
+
}, {
|
|
261
358
|
"propName": "indeterminate",
|
|
262
359
|
"methodName": "onIndeterminateChange"
|
|
263
360
|
}];
|
|
264
361
|
}
|
|
362
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
265
363
|
}
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.bs-chip-filter--icon-only {
|
|
72
|
-
padding-
|
|
73
|
-
padding-
|
|
72
|
+
padding-inline-start: var(--bs-chip-filter-padding-x-glyph-side);
|
|
73
|
+
padding-inline-end: var(--bs-chip-filter-padding-x-plain-side);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.bs-chip-filter--dropdown-only {
|
|
77
|
-
padding-
|
|
78
|
-
padding-
|
|
77
|
+
padding-inline-start: var(--bs-chip-filter-padding-x-plain-side);
|
|
78
|
+
padding-inline-end: var(--bs-chip-filter-padding-x-glyph-side);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.bs-chip-filter--text-only {
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
:host(.bs-chip-informative--icon) {
|
|
72
|
-
padding-
|
|
73
|
-
padding-
|
|
72
|
+
padding-inline-start: var(--bs-chip-informative-padding-x-glyph-side);
|
|
73
|
+
padding-inline-end: var(--bs-chip-informative-padding-right-icon-variant);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
:host(.bs-chip-informative--text) {
|
|
77
|
-
padding-
|
|
78
|
-
padding-
|
|
77
|
+
padding-inline-start: var(--bs-chip-informative-padding-x-plain-side);
|
|
78
|
+
padding-inline-end: var(--bs-chip-informative-padding-x-plain-side);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.bs-chip-informative__icon {
|
|
@@ -69,20 +69,20 @@
|
|
|
69
69
|
|
|
70
70
|
.bs-chip-input__body {
|
|
71
71
|
gap: var(--bs-chip-input-gap);
|
|
72
|
-
padding-
|
|
72
|
+
padding-inline-end: 0;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
:host(.bs-chip-input--icon) .bs-chip-input__body {
|
|
76
|
-
padding-
|
|
76
|
+
padding-inline-start: var(--bs-chip-input-padding-x-glyph-side);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
:host(.bs-chip-input--text) .bs-chip-input__body {
|
|
80
|
-
padding-
|
|
80
|
+
padding-inline-start: var(--bs-chip-input-padding-x-plain-side);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.bs-chip-input__remove {
|
|
84
|
-
padding-
|
|
85
|
-
padding-
|
|
84
|
+
padding-inline-start: 0;
|
|
85
|
+
padding-inline-end: var(--bs-chip-input-padding-x-glyph-side);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.bs-chip-input__icon {
|
|
@@ -99,6 +99,25 @@ describe('bs-data-table', () => {
|
|
|
99
99
|
expect(cell.querySelector('img')).toBeNull();
|
|
100
100
|
expect(cell.textContent).toBe('<img src=x onerror="window.__xss = true">');
|
|
101
101
|
});
|
|
102
|
+
it('renders rich cell content: a link and a web component become real elements', async () => {
|
|
103
|
+
const { root, waitForChanges } = await render(h("bs-data-table", { columns: columns, rows: rows, cellRenderer: (row) => `<a href="/users/${row.id}">Open</a><bs-badge variant="success">Active</bs-badge>` }));
|
|
104
|
+
await waitForChanges();
|
|
105
|
+
const cell = root.shadowRoot.querySelector('tbody td');
|
|
106
|
+
expect(cell.querySelector('a')).toEqualAttribute('href', '/users/1');
|
|
107
|
+
const badge = cell.querySelector('bs-badge');
|
|
108
|
+
expect(badge).not.toBeNull();
|
|
109
|
+
expect(badge.shadowRoot).not.toBeNull(); // upgraded: it is a live component, not inert text
|
|
110
|
+
});
|
|
111
|
+
it('applies cellRenderer to every cell, and does NOT escape what it returns (the caller must)', async () => {
|
|
112
|
+
const unsafeRows = [{ id: 1, name: '<img src=x onerror="window.__xss2 = true">', status: 'Active' }];
|
|
113
|
+
const unsafe = await render(h("bs-data-table", { columns: columns, rows: unsafeRows, cellRenderer: (row, col) => String(row[col.key]) }));
|
|
114
|
+
expect(unsafe.root.shadowRoot.querySelector('tbody td').querySelector('img')).not.toBeNull();
|
|
115
|
+
const esc = (v) => String(v).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
116
|
+
const safe = await render(h("bs-data-table", { columns: columns, rows: unsafeRows, cellRenderer: (row, col) => esc(row[col.key]) }));
|
|
117
|
+
const cell = safe.root.shadowRoot.querySelector('tbody td');
|
|
118
|
+
expect(cell.querySelector('img')).toBeNull();
|
|
119
|
+
expect(cell.textContent).toBe('<img src=x onerror="window.__xss2 = true">');
|
|
120
|
+
});
|
|
102
121
|
it('still allows cellRenderer to render trusted custom HTML when explicitly supplied', async () => {
|
|
103
122
|
const { root } = await render(h("bs-data-table", { columns: columns, rows: rows, cellRenderer: () => '<button type="button">Edit</button>' }));
|
|
104
123
|
const cell = root.shadowRoot.querySelector('tbody td');
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.bs-data-table__header-cell {
|
|
16
|
-
text-align:
|
|
16
|
+
text-align: start;
|
|
17
17
|
padding: var(--bs-data-table-cell-padding-y) var(--bs-data-table-cell-padding-x);
|
|
18
18
|
border-bottom: 1px solid var(--bs-border-default);
|
|
19
19
|
font-weight: var(--bs-font-weight-semibold);
|
|
@@ -29,8 +29,22 @@ export class BsDataTable {
|
|
|
29
29
|
sortColumn;
|
|
30
30
|
sortDirection = 'asc';
|
|
31
31
|
selectable = false;
|
|
32
|
-
/** Optional custom cell renderer,
|
|
33
|
-
*
|
|
32
|
+
/** Optional custom cell renderer, for rich cells such as a status badge, a link or an actions
|
|
33
|
+
* column. It returns an **HTML string** that is inserted into the cell as real markup
|
|
34
|
+
* (`innerHTML`), so links, buttons, `<img>` and other web components (e.g. `<bs-badge>`) all render.
|
|
35
|
+
*
|
|
36
|
+
* **When set it renders every cell, not just the special ones** -- return the plain value for
|
|
37
|
+
* ordinary columns too. And **the returned string is not escaped or sanitized** (same trust
|
|
38
|
+
* model as React's `dangerouslySetInnerHTML`): escape any untrusted row data you put in it, plain
|
|
39
|
+
* columns included, or it will be interpreted as HTML. Without a `cellRenderer`, values are
|
|
40
|
+
* rendered as escaped text.
|
|
41
|
+
*
|
|
42
|
+
* The markup is static HTML -- attach behavior yourself, e.g. one `click` listener on the table
|
|
43
|
+
* that reads `event.composedPath()[0]` (events from inside the shadow root are retargeted to the
|
|
44
|
+
* table itself).
|
|
45
|
+
*
|
|
46
|
+
* Function props are JS-property-only, same as array props -- there is no attribute equivalent.
|
|
47
|
+
* Falls back to the raw cell value (as escaped text) when unset. */
|
|
34
48
|
cellRenderer;
|
|
35
49
|
bsSort;
|
|
36
50
|
bsRowSelect;
|
|
@@ -71,11 +85,11 @@ export class BsDataTable {
|
|
|
71
85
|
}
|
|
72
86
|
}
|
|
73
87
|
render() {
|
|
74
|
-
return (h("table", { key: '
|
|
88
|
+
return (h("table", { key: '7ea79a70148513512cdba2f8cb8d5a5c7ae09706', part: "table", class: "bs-data-table" }, h("thead", { key: 'e9cf73cbba196e9caf4b03a837866a5370c13e19', part: "head" }, h("tr", { key: 'a33fbd57f1925e34c6e7ce292b6945d2ee5c6113' }, this.selectable && (h("th", { key: '876948b66e54ae68d6aa6148c962781223fa0441', class: "bs-data-table__select-col" }, this.rows.length > 0 && (h("input", { key: 'cf8f26258bcee486190e3ac4b3d5ce4715784d5f', type: "checkbox", "aria-label": "Select all rows", checked: this.selectedIds.size > 0 && this.selectedIds.size === this.rows.length, indeterminate: this.selectedIds.size > 0 && this.selectedIds.size < this.rows.length, onChange: this.onSelectAllChange })))), this.columns.map(column => {
|
|
75
89
|
const isSorted = this.sortColumn === column.key;
|
|
76
90
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
77
91
|
return (h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
78
|
-
}))), h("tbody", { key: '
|
|
92
|
+
}))), h("tbody", { key: '3a0c2ce6fea27797b855ee2b3c724d0e99471d28', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
79
93
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
80
94
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
81
95
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -228,7 +242,7 @@ export class BsDataTable {
|
|
|
228
242
|
"optional": true,
|
|
229
243
|
"docs": {
|
|
230
244
|
"tags": [],
|
|
231
|
-
"text": "Optional custom cell renderer, e.g. for
|
|
245
|
+
"text": "Optional custom cell renderer, for rich cells such as a status badge, a link or an actions\ncolumn. It returns an **HTML string** that is inserted into the cell as real markup\n(`innerHTML`), so links, buttons, `<img>` and other web components (e.g. `<bs-badge>`) all render.\n\n**When set it renders every cell, not just the special ones** -- return the plain value for\nordinary columns too. And **the returned string is not escaped or sanitized** (same trust\nmodel as React's `dangerouslySetInnerHTML`): escape any untrusted row data you put in it, plain\ncolumns included, or it will be interpreted as HTML. Without a `cellRenderer`, values are\nrendered as escaped text.\n\nThe markup is static HTML -- attach behavior yourself, e.g. one `click` listener on the table\nthat reads `event.composedPath()[0]` (events from inside the shadow root are retargeted to the\ntable itself).\n\nFunction props are JS-property-only, same as array props -- there is no attribute equivalent.\nFalls back to the raw cell value (as escaped text) when unset."
|
|
232
246
|
},
|
|
233
247
|
"getter": false,
|
|
234
248
|
"setter": false
|
|
@@ -44,11 +44,18 @@ export const WithCustomCellRenderer = {
|
|
|
44
44
|
const table = document.createElement('bs-data-table');
|
|
45
45
|
table.columns = [...columns, { key: 'actions', label: 'Actions' }];
|
|
46
46
|
table.rows = rows;
|
|
47
|
+
// cellRenderer renders EVERY cell and its output is not escaped, so plain columns are escaped
|
|
48
|
+
// here too -- copying `String(row[column.key])` unescaped would make untrusted row data HTML.
|
|
49
|
+
const escapeHtml = (value) => String(value ?? '').replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]);
|
|
47
50
|
table.cellRenderer = (row, column) => {
|
|
48
51
|
if (column.key === 'actions') {
|
|
49
52
|
return `<button type="button">Edit</button>`;
|
|
50
53
|
}
|
|
51
|
-
|
|
54
|
+
if (column.key === 'status') {
|
|
55
|
+
// Rich content: a web component in the cell.
|
|
56
|
+
return `<bs-badge variant="${row.status === 'Active' ? 'success' : 'neutral'}">${escapeHtml(row.status)}</bs-badge>`;
|
|
57
|
+
}
|
|
58
|
+
return escapeHtml(row[column.key]);
|
|
52
59
|
};
|
|
53
60
|
return table;
|
|
54
61
|
},
|