@brandsync/wc 1.7.0 → 1.8.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 +201 -13
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-387ed85f.entry.js → p-002d258d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-819a3dae.entry.js → p-03b08508.entry.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-538cc08e.entry.js → p-114d2fd8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-70e035ed.entry.js → p-153da845.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-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-2891d40b.entry.js +1 -0
- package/dist/brandsync-wc/p-29027559.entry.js +1 -0
- package/dist/brandsync-wc/p-2e7a1082.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-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-612cf79c.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-d03eba2b.entry.js → p-652d4068.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9c1be2a0.entry.js → p-6bf2f116.entry.js} +1 -1
- 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-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-30d6a6d0.entry.js → p-bc69a96c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-80cf96ff.entry.js → p-be2c1740.entry.js} +1 -1
- package/dist/brandsync-wc/p-bf53ad52.entry.js +1 -0
- package/dist/brandsync-wc/p-c10d2529.entry.js +1 -0
- package/dist/brandsync-wc/{p-8b57f606.entry.js → p-c4de155c.entry.js} +1 -1
- package/dist/brandsync-wc/p-c7f4c114.entry.js +1 -0
- 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-d25b7b74.entry.js → p-ee7da23d.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-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 +2 -2
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +1 -1
- 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 +2 -2
- 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 +22 -3
- package/dist/cjs/bs-inline-tab.cjs.entry.js +7 -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 +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
- 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 +7 -3
- package/dist/cjs/bs-tabs.cjs.entry.js +51 -2
- 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-overflow/bs-breadcrumb-overflow.css +1 -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.js +16 -3
- 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.css +1 -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-menu/bs-menu.css +4 -0
- package/dist/collection/components/bs-menu/bs-menu.js +33 -1
- 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 +24 -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 +24 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +57 -1
- 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.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- 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-BkHYJIyj.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 +2 -2
- package/dist/esm/bs-breadcrumb.entry.js +1 -1
- 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 +2 -2
- 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 +22 -3
- package/dist/esm/bs-inline-tab.entry.js +7 -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 +2 -2
- package/dist/esm/bs-navigation-header.entry.js +1 -1
- 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 +7 -3
- package/dist/esm/bs-tabs.entry.js +51 -2
- 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-button/bs-button/bs-button.d.ts +4 -1
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +4 -1
- package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +12 -0
- 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-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 +4 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +4 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.d.ts +7 -0
- package/dist/types/components/forms/forms.stories.d.ts +6 -0
- package/dist/types/components.d.ts +141 -7
- 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-4b0938a5.entry.js +0 -1
- package/dist/brandsync-wc/p-5312b6a5.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-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
|
}
|
|
@@ -28,6 +28,7 @@ import { h } from "@stencil/core";
|
|
|
28
28
|
// CSS file comments, not the class-level JSDoc (see bs-tab.css's/bs-inline-tab.css's equivalent note).
|
|
29
29
|
export class BsIconButton {
|
|
30
30
|
el;
|
|
31
|
+
internals;
|
|
31
32
|
/**
|
|
32
33
|
* Visual style. Maps to the same semantic token families as `bs-button`'s `variant`.
|
|
33
34
|
* `error` is for destructive/irreversible actions per BrandSync guidance, not a stronger
|
|
@@ -41,7 +42,8 @@ export class BsIconButton {
|
|
|
41
42
|
size = 'md';
|
|
42
43
|
/** Disables the button and applies the disabled token set. */
|
|
43
44
|
disabled = false;
|
|
44
|
-
/**
|
|
45
|
+
/** Button type. `submit` submits the surrounding `<form>` (via `requestSubmit()`, so validation
|
|
46
|
+
* runs); `reset` resets it; `button` (default) does nothing on its own. */
|
|
45
47
|
type = 'button';
|
|
46
48
|
/**
|
|
47
49
|
* Accessible name for the button. Required -- this component is always icon-only, so there's
|
|
@@ -49,12 +51,22 @@ export class BsIconButton {
|
|
|
49
51
|
* prop to the `aria-label` HTML attribute automatically.
|
|
50
52
|
*/
|
|
51
53
|
ariaLabel = null;
|
|
54
|
+
onClick = () => {
|
|
55
|
+
const form = this.internals?.form;
|
|
56
|
+
if (!form || this.disabled)
|
|
57
|
+
return;
|
|
58
|
+
if (this.type === 'submit')
|
|
59
|
+
form.requestSubmit();
|
|
60
|
+
else if (this.type === 'reset')
|
|
61
|
+
form.reset();
|
|
62
|
+
};
|
|
52
63
|
render() {
|
|
53
|
-
return (h("button", { key: '
|
|
64
|
+
return (h("button", { key: '1d0525e3ad0b90e723cab2c9cd0217046a905a5e', 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: '1c94ad4a861dde9e4942f6795a2a868161c0b4a1', part: "icon", class: "bs-icon-button__icon" }, h("slot", { key: '9cd3a6aa2d9cbfebaa1d0e70fc10448af4ef4429' }))));
|
|
54
65
|
}
|
|
55
66
|
static get is() { return "bs-icon-button"; }
|
|
56
67
|
static get encapsulation() { return "shadow"; }
|
|
57
68
|
static get delegatesFocus() { return true; }
|
|
69
|
+
static get formAssociated() { return true; }
|
|
58
70
|
static get originalStyleUrls() {
|
|
59
71
|
return {
|
|
60
72
|
"$": ["bs-icon-button.css"]
|
|
@@ -151,7 +163,7 @@ export class BsIconButton {
|
|
|
151
163
|
"optional": false,
|
|
152
164
|
"docs": {
|
|
153
165
|
"tags": [],
|
|
154
|
-
"text": "
|
|
166
|
+
"text": "Button type. `submit` submits the surrounding `<form>` (via `requestSubmit()`, so validation\nruns); `reset` resets it; `button` (default) does nothing on its own."
|
|
155
167
|
},
|
|
156
168
|
"getter": false,
|
|
157
169
|
"setter": false,
|
|
@@ -182,4 +194,5 @@ export class BsIconButton {
|
|
|
182
194
|
};
|
|
183
195
|
}
|
|
184
196
|
static get elementRef() { return "el"; }
|
|
197
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
185
198
|
}
|
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 {
|
|
@@ -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);
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
.bs-dialog__close--floating {
|
|
71
71
|
position: absolute;
|
|
72
72
|
top: var(--bs-spacing-200);
|
|
73
|
-
|
|
73
|
+
inset-inline-end: var(--bs-spacing-200);
|
|
74
74
|
z-index: 1;
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -128,3 +128,7 @@
|
|
|
128
128
|
justify-content: center;
|
|
129
129
|
text-align: center;
|
|
130
130
|
}
|
|
131
|
+
|
|
132
|
+
@media (forced-colors: active) {
|
|
133
|
+
.bs-dialog__dialog { border: 1px solid CanvasText; }
|
|
134
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
// Cross-component coverage for native <form> participation (FormData, validation, reset) and the
|
|
3
|
+
// radio group keyboard pattern. Lives beside the components, not in one of them, since it exercises
|
|
4
|
+
// several together inside a real <form>.
|
|
5
|
+
async function renderForm(children) {
|
|
6
|
+
const { root, waitForChanges } = await render(h("form", null, children));
|
|
7
|
+
return { form: root, waitForChanges };
|
|
8
|
+
}
|
|
9
|
+
describe('form association', () => {
|
|
10
|
+
it('bs-input submits its value under name', async () => {
|
|
11
|
+
const { form, waitForChanges } = await renderForm(h("bs-input", { name: "email", value: "a@b.co" }));
|
|
12
|
+
await waitForChanges();
|
|
13
|
+
expect(new FormData(form).get('email')).toBe('a@b.co');
|
|
14
|
+
});
|
|
15
|
+
it('bs-input updates FormData as the user types, and resets with the form', async () => {
|
|
16
|
+
const { form, waitForChanges } = await renderForm(h("bs-input", { name: "q", value: "start" }));
|
|
17
|
+
const input = form.querySelector('bs-input').shadowRoot.querySelector('input');
|
|
18
|
+
input.value = 'typed';
|
|
19
|
+
input.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));
|
|
20
|
+
await waitForChanges();
|
|
21
|
+
expect(new FormData(form).get('q')).toBe('typed');
|
|
22
|
+
form.reset();
|
|
23
|
+
await waitForChanges();
|
|
24
|
+
expect(new FormData(form).get('q')).toBe('start');
|
|
25
|
+
});
|
|
26
|
+
it('a required, empty bs-input makes the form invalid', async () => {
|
|
27
|
+
const { form, waitForChanges } = await renderForm(h("bs-input", { name: "n", required: true }));
|
|
28
|
+
await waitForChanges();
|
|
29
|
+
expect(form.checkValidity()).toBe(false);
|
|
30
|
+
});
|
|
31
|
+
it('bs-checkbox and bs-switch submit only while checked', async () => {
|
|
32
|
+
const { form, waitForChanges } = await renderForm(h("div", null, h("bs-checkbox", { name: "terms", value: "yes" }), h("bs-switch", { name: "alerts", checked: true })));
|
|
33
|
+
await waitForChanges();
|
|
34
|
+
expect(new FormData(form).get('terms')).toBeNull();
|
|
35
|
+
expect(new FormData(form).get('alerts')).toBe('on');
|
|
36
|
+
form.querySelector('bs-checkbox').shadowRoot.querySelector('input').click();
|
|
37
|
+
await waitForChanges();
|
|
38
|
+
expect(new FormData(form).get('terms')).toBe('yes');
|
|
39
|
+
form.reset();
|
|
40
|
+
await waitForChanges();
|
|
41
|
+
expect(new FormData(form).get('terms')).toBeNull();
|
|
42
|
+
});
|
|
43
|
+
it('a required, unchecked bs-checkbox makes the form invalid', async () => {
|
|
44
|
+
const { form, waitForChanges } = await renderForm(h("bs-checkbox", { name: "t", required: true }));
|
|
45
|
+
await waitForChanges();
|
|
46
|
+
expect(form.checkValidity()).toBe(false);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
describe('bs-radio group', () => {
|
|
50
|
+
const group = () => (h("div", null, h("bs-radio", { name: "fruit", value: "a" }), h("bs-radio", { name: "fruit", value: "b" }), h("bs-radio", { name: "fruit", value: "c", disabled: true })));
|
|
51
|
+
const inputOf = (r) => r.shadowRoot.querySelector('input');
|
|
52
|
+
it('checking one unchecks the others and submits its value', async () => {
|
|
53
|
+
const { form, waitForChanges } = await renderForm(group());
|
|
54
|
+
const [a, b] = Array.from(form.querySelectorAll('bs-radio'));
|
|
55
|
+
inputOf(a).click();
|
|
56
|
+
await waitForChanges();
|
|
57
|
+
inputOf(b).click();
|
|
58
|
+
await waitForChanges();
|
|
59
|
+
expect(a.checked).toBe(false);
|
|
60
|
+
expect(b.checked).toBe(true);
|
|
61
|
+
expect(new FormData(form).get('fruit')).toBe('b');
|
|
62
|
+
});
|
|
63
|
+
it('arrow keys move selection to the next enabled radio, wrapping', async () => {
|
|
64
|
+
const { form, waitForChanges } = await renderForm(group());
|
|
65
|
+
const [a, b] = Array.from(form.querySelectorAll('bs-radio'));
|
|
66
|
+
inputOf(a).click();
|
|
67
|
+
await waitForChanges();
|
|
68
|
+
inputOf(a).dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown', bubbles: true, composed: true, cancelable: true }));
|
|
69
|
+
await waitForChanges();
|
|
70
|
+
expect(b.checked).toBe(true);
|
|
71
|
+
inputOf(b).dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight', bubbles: true, composed: true, cancelable: true }));
|
|
72
|
+
await waitForChanges();
|
|
73
|
+
expect(a.checked).toBe(true); // skipped the disabled third radio and wrapped
|
|
74
|
+
});
|
|
75
|
+
it('only the checked radio is in the tab order once the group has a selection', async () => {
|
|
76
|
+
const { form, waitForChanges } = await renderForm(group());
|
|
77
|
+
const [a, b] = Array.from(form.querySelectorAll('bs-radio'));
|
|
78
|
+
inputOf(a).click();
|
|
79
|
+
await waitForChanges();
|
|
80
|
+
expect(inputOf(a).tabIndex).toBe(0);
|
|
81
|
+
expect(inputOf(b).tabIndex).toBe(-1);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
describe('bs-button / bs-icon-button inside a form', () => {
|
|
85
|
+
const click = (el) => el.shadowRoot.querySelector('button').click();
|
|
86
|
+
it('type="submit" submits the surrounding form (and runs validation first)', async () => {
|
|
87
|
+
let submits = 0;
|
|
88
|
+
const { root, waitForChanges } = await render(h("form", { onSubmit: (e) => { e.preventDefault(); submits++; } }, h("bs-input", { name: "n", required: true }), h("bs-button", { type: "submit" }, "Go"), h("bs-icon-button", { type: "submit", ariaLabel: "Go" }, "x")));
|
|
89
|
+
const form = root;
|
|
90
|
+
await waitForChanges();
|
|
91
|
+
click(form.querySelector('bs-button'));
|
|
92
|
+
click(form.querySelector('bs-icon-button'));
|
|
93
|
+
expect(submits).toBe(0); // required field empty -> blocked by validation
|
|
94
|
+
form.querySelector('bs-input').value = 'x';
|
|
95
|
+
await waitForChanges();
|
|
96
|
+
click(form.querySelector('bs-button'));
|
|
97
|
+
click(form.querySelector('bs-icon-button'));
|
|
98
|
+
expect(submits).toBe(2);
|
|
99
|
+
});
|
|
100
|
+
it('type="reset" resets the form; type="button" does neither', async () => {
|
|
101
|
+
let submits = 0;
|
|
102
|
+
const { root, waitForChanges } = await render(h("form", { onSubmit: (e) => { e.preventDefault(); submits++; } }, h("bs-input", { name: "q", value: "start" }), h("bs-button", { type: "reset" }, "Reset"), h("bs-button", null, "Plain")));
|
|
103
|
+
const form = root;
|
|
104
|
+
await waitForChanges();
|
|
105
|
+
form.querySelector('bs-input').value = 'changed';
|
|
106
|
+
await waitForChanges();
|
|
107
|
+
click(form.querySelectorAll('bs-button')[1]);
|
|
108
|
+
expect(submits).toBe(0);
|
|
109
|
+
expect(new FormData(form).get('q')).toBe('changed');
|
|
110
|
+
click(form.querySelectorAll('bs-button')[0]);
|
|
111
|
+
await waitForChanges();
|
|
112
|
+
expect(new FormData(form).get('q')).toBe('start');
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
// The Angular ControlValueAccessors and Vue v-model bindings (generated in stencil.config.ts) read
|
|
116
|
+
// `event.target.value` / `.checked` straight off the host inside the `bsChange` handler. That only
|
|
117
|
+
// works if the host property is already updated when `bsChange` fires -- pin that contract here.
|
|
118
|
+
describe('bsChange framework-binding contract', () => {
|
|
119
|
+
it('bs-input: host.value is already the new value inside bsChange', async () => {
|
|
120
|
+
const { root, waitForChanges } = await render(h("bs-input", null));
|
|
121
|
+
const seen = [];
|
|
122
|
+
root.addEventListener('bsChange', (e) => seen.push(e.target.value));
|
|
123
|
+
const input = root.shadowRoot.querySelector('input');
|
|
124
|
+
input.value = 'hello';
|
|
125
|
+
input.dispatchEvent(new Event('change', { bubbles: true }));
|
|
126
|
+
await waitForChanges();
|
|
127
|
+
expect(seen).toEqual(['hello']);
|
|
128
|
+
});
|
|
129
|
+
it('bs-checkbox and bs-switch: host.checked is already updated inside bsChange', async () => {
|
|
130
|
+
const { root, waitForChanges } = await render(h("div", null, h("bs-checkbox", null), h("bs-switch", null)));
|
|
131
|
+
const seen = [];
|
|
132
|
+
root.addEventListener('bsChange', (e) => seen.push(e.target.checked));
|
|
133
|
+
root.querySelector('bs-checkbox').shadowRoot.querySelector('input').click();
|
|
134
|
+
root.querySelector('bs-switch').shadowRoot.querySelector('input').click();
|
|
135
|
+
await waitForChanges();
|
|
136
|
+
expect(seen).toEqual([true, true]);
|
|
137
|
+
});
|
|
138
|
+
it('bs-slider: host.value is already updated inside bsChange', async () => {
|
|
139
|
+
const { root, waitForChanges } = await render(h("bs-slider", { value: 10 }));
|
|
140
|
+
const seen = [];
|
|
141
|
+
root.addEventListener('bsChange', (e) => seen.push(e.target.value));
|
|
142
|
+
const range = root.shadowRoot.querySelector('input[type="range"]');
|
|
143
|
+
range.value = '55';
|
|
144
|
+
range.dispatchEvent(new Event('input', { bubbles: true }));
|
|
145
|
+
range.dispatchEvent(new Event('change', { bubbles: true }));
|
|
146
|
+
await waitForChanges();
|
|
147
|
+
expect(seen.length).toBeGreaterThan(0);
|
|
148
|
+
expect(seen[seen.length - 1]).toBe(55);
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
const keysOf = (f) => {
|
|
152
|
+
const keys = [];
|
|
153
|
+
new FormData(f).forEach((_v, k) => keys.push(k));
|
|
154
|
+
return keys;
|
|
155
|
+
};
|
|
156
|
+
describe('disabled controls', () => {
|
|
157
|
+
it('a disabled control is excluded from FormData and validation, like a native disabled input', async () => {
|
|
158
|
+
const { root, waitForChanges } = await render(h("form", null, h("bs-input", { name: "i", value: "x", required: true, disabled: true }), h("bs-checkbox", { name: "c", checked: true, disabled: true }), h("bs-switch", { name: "s", checked: true, disabled: true }), h("bs-radio", { name: "r", value: "a", checked: true, disabled: true }), h("bs-slider", { name: "v", value: 20, disabled: true })));
|
|
159
|
+
const form = root;
|
|
160
|
+
await waitForChanges();
|
|
161
|
+
expect(keysOf(form)).toEqual([]);
|
|
162
|
+
expect(form.checkValidity()).toBe(true);
|
|
163
|
+
Array.from(form.querySelectorAll('bs-input, bs-checkbox, bs-switch, bs-radio, bs-slider')).forEach(el => (el.disabled = false));
|
|
164
|
+
await waitForChanges();
|
|
165
|
+
expect(keysOf(form).sort()).toEqual(['c', 'i', 'r', 's', 'v']);
|
|
166
|
+
});
|
|
167
|
+
it('a control inside <fieldset disabled> is excluded from FormData', async () => {
|
|
168
|
+
const { root, waitForChanges } = await render(h("form", null, h("fieldset", { disabled: true }, h("bs-input", { name: "fs", value: "x" }))));
|
|
169
|
+
await waitForChanges();
|
|
170
|
+
expect(keysOf(root)).toEqual([]);
|
|
171
|
+
});
|
|
172
|
+
});
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
|
|
85
85
|
.bs-input__required {
|
|
86
86
|
color: var(--bs-input-error-color);
|
|
87
|
-
margin-
|
|
87
|
+
margin-inline-start: 2px;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.bs-input__field {
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
visibility: hidden;
|
|
149
149
|
pointer-events: none;
|
|
150
150
|
position: absolute;
|
|
151
|
-
|
|
151
|
+
inset-inline-end: 0;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.bs-input__control::-webkit-textfield-decoration-container {
|
|
@@ -282,8 +282,8 @@
|
|
|
282
282
|
.bs-input__dropdown-menu {
|
|
283
283
|
position: absolute;
|
|
284
284
|
top: calc(100% + var(--bs-input-stack-gap));
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
inset-inline-start: 0;
|
|
286
|
+
inset-inline-end: 0;
|
|
287
287
|
z-index: 1;
|
|
288
288
|
}
|
|
289
289
|
|
|
@@ -450,3 +450,9 @@
|
|
|
450
450
|
.bs-input__field--pin.bs-input__field--error .bs-input__pin-cell {
|
|
451
451
|
border-color: var(--bs-input-field-border-error);
|
|
452
452
|
}
|
|
453
|
+
|
|
454
|
+
/* Windows High Contrast: keep the field boundary visible. */
|
|
455
|
+
@media (forced-colors: active) {
|
|
456
|
+
.bs-input__control { border: 1px solid FieldText; }
|
|
457
|
+
.bs-input__control:focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }
|
|
458
|
+
}
|