@brandsync/wc 1.6.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 +1302 -90
- 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-e35249c4.entry.js → p-03b08508.entry.js} +1 -1
- package/dist/brandsync-wc/{p-db46376b.entry.js → p-051d3064.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c054f493.entry.js → p-05c7de28.entry.js} +1 -1
- package/dist/brandsync-wc/{p-639946e7.entry.js → p-062cfa34.entry.js} +1 -1
- package/dist/brandsync-wc/p-0e39b9cc.entry.js +1 -0
- package/dist/brandsync-wc/{p-9fb8848c.entry.js → p-114d2fd8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ef68f29b.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-43617f2e.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-604553a0.entry.js → p-3176d1d3.entry.js} +1 -1
- package/dist/brandsync-wc/p-33e44094.entry.js +1 -0
- package/dist/brandsync-wc/p-360452c2.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-612cf79c.entry.js +1 -0
- package/dist/brandsync-wc/p-61c1a2a3.entry.js +1 -0
- package/dist/brandsync-wc/{p-11224cab.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-a603a13a.entry.js → p-6bf2f116.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9b72cc12.entry.js → p-70f64b25.entry.js} +1 -1
- package/dist/brandsync-wc/{p-44bfdd4b.entry.js → p-7b00dd36.entry.js} +1 -1
- package/dist/brandsync-wc/p-7c94e6ae.entry.js +1 -0
- package/dist/brandsync-wc/p-835a8dc7.entry.js +1 -0
- package/dist/brandsync-wc/{p-0aca5f0e.entry.js → p-8ee0153b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bb77098b.entry.js → p-9f65f998.entry.js} +1 -1
- package/dist/brandsync-wc/p-9f8852a0.entry.js +1 -0
- package/dist/brandsync-wc/{p-DuyFft7h.js → p-AgoOSYvW.js} +2 -2
- package/dist/brandsync-wc/{p-a8e2a2b2.entry.js → p-a09e157f.entry.js} +1 -1
- package/dist/brandsync-wc/p-a0d5a620.entry.js +1 -0
- package/dist/brandsync-wc/{p-525504c2.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-57e1dc35.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-fcd4ec60.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-abda1d69.entry.js → p-c4de155c.entry.js} +1 -1
- package/dist/brandsync-wc/p-c7f4c114.entry.js +1 -0
- package/dist/brandsync-wc/{p-52d5f6a9.entry.js → p-cfcf3f0a.entry.js} +1 -1
- package/dist/brandsync-wc/p-de7c946d.entry.js +1 -0
- package/dist/brandsync-wc/{p-a8cdf449.entry.js → p-e9b43754.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c5011746.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-f7d47c17.entry.js +1 -0
- package/dist/brandsync-wc/{p-7609221f.entry.js → p-fc58c663.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a3a4d541.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 +2 -2
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +2 -2
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +2 -2
- package/dist/cjs/bs-attachment-list.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +2 -2
- 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 +196 -0
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +3 -3
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +3 -3
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/bs-checkbox.cjs.entry.js +48 -3
- package/dist/cjs/bs-chip-filter.cjs.entry.js +3 -3
- package/dist/cjs/bs-chip-informative.cjs.entry.js +3 -3
- package/dist/cjs/bs-chip-input.cjs.entry.js +3 -3
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +2 -2
- package/dist/cjs/bs-composer.cjs.entry.js +2 -2
- package/dist/cjs/bs-data-table.cjs.entry.js +4 -4
- package/dist/cjs/bs-dialog.cjs.entry.js +2 -2
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +85 -0
- package/dist/cjs/bs-file-upload.cjs.entry.js +110 -0
- 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 +2 -2
- 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 +2 -2
- package/dist/cjs/bs-pagination.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress-linear.cjs.entry.js +8 -3
- 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 +2 -2
- package/dist/cjs/bs-source-link.cjs.entry.js +4 -4
- package/dist/cjs/bs-stepper-step.cjs.entry.js +3 -3
- 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 +2 -2
- 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/collection-manifest.json +3 -0
- package/dist/collection/components/bs-a11y.cmp.test.js +54 -0
- package/dist/collection/components/bs-accordion/bs-accordion.cmp.test.js +5 -0
- package/dist/collection/components/bs-accordion/bs-accordion.css +5 -5
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-attachment/bs-attachment.css +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.css +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.css +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +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-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.css +4 -0
- package/dist/collection/components/bs-carousel/bs-carousel.cmp.test.js +198 -0
- package/dist/collection/components/bs-carousel/bs-carousel.css +107 -0
- package/dist/collection/components/bs-carousel/bs-carousel.js +531 -0
- package/dist/collection/components/bs-carousel/bs-carousel.stories.js +68 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.css +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css +3 -3
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- 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-filter/bs-chip-filter.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.css +4 -4
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.css +5 -5
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +1 -1
- package/dist/collection/components/bs-composer/bs-composer.js +1 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.css +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-dialog/bs-dialog.css +5 -1
- package/dist/collection/components/bs-file-upload/bs-file-upload.cmp.test.js +119 -0
- package/dist/collection/components/bs-file-upload/bs-file-upload.css +139 -0
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +342 -0
- package/dist/collection/components/bs-file-upload/bs-file-upload.stories.js +116 -0
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.cmp.test.js +115 -0
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.css +154 -0
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +329 -0
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.stories.js +54 -0
- 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-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-progress/bs-progress.js +27 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.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-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.css +2 -2
- package/dist/collection/components/bs-source-link/bs-source-link.js +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-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- 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-toast/bs-toast.js +1 -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/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/collection/test/helpers/conventions.js +46 -0
- package/dist/collection/test/helpers/conventions.unit.test.js +38 -0
- 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.d.ts +11 -0
- package/dist/components/bs-carousel.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/bs-file-upload-item.js +1 -0
- package/dist/components/bs-file-upload.d.ts +11 -0
- package/dist/components/bs-file-upload.js +1 -0
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-logo.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-pagination.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-B8eut73c.js → p-BA3c9Rom.js} +1 -1
- package/dist/components/{p-DIezWdNu.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-EtXc94lJ.js +1 -0
- 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-wei0Ija2.js +1 -0
- 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 +2 -2
- package/dist/esm/bs-ai-greeting.entry.js +2 -2
- package/dist/esm/bs-ai-thinking.entry.js +2 -2
- package/dist/esm/bs-attachment-list.entry.js +3 -3
- 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 +2 -2
- package/dist/esm/bs-button-skeleton.entry.js +2 -2
- 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 +194 -0
- package/dist/esm/bs-chatbot-feedback.entry.js +3 -3
- package/dist/esm/bs-chatbot-header.entry.js +2 -2
- package/dist/esm/bs-chatbot-response-action.entry.js +3 -3
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +2 -2
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
- package/dist/esm/bs-checkbox-skeleton.entry.js +2 -2
- package/dist/esm/bs-checkbox.entry.js +48 -3
- package/dist/esm/bs-chip-filter.entry.js +3 -3
- package/dist/esm/bs-chip-informative.entry.js +3 -3
- package/dist/esm/bs-chip-input.entry.js +3 -3
- package/dist/esm/bs-composer-status-banner.entry.js +2 -2
- package/dist/esm/bs-composer.entry.js +2 -2
- package/dist/esm/bs-data-table.entry.js +4 -4
- package/dist/esm/bs-dialog.entry.js +2 -2
- package/dist/esm/bs-file-upload-item.entry.js +83 -0
- package/dist/esm/bs-file-upload.entry.js +108 -0
- 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 +2 -2
- 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 +2 -2
- package/dist/esm/bs-pagination.entry.js +2 -2
- package/dist/esm/bs-progress-linear.entry.js +8 -3
- 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 +2 -2
- package/dist/esm/bs-source-link.entry.js +4 -4
- package/dist/esm/bs-stepper-step.entry.js +3 -3
- 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 +2 -2
- 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-carousel/bs-carousel.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-carousel/bs-carousel.d.ts +101 -0
- package/dist/types/components/bs-carousel/bs-carousel.stories.d.ts +17 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +12 -0
- package/dist/types/components/bs-file-upload/bs-file-upload.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-file-upload/bs-file-upload.d.ts +59 -0
- package/dist/types/components/bs-file-upload/bs-file-upload.stories.d.ts +21 -0
- package/dist/types/components/bs-file-upload-item/bs-file-upload-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-file-upload-item/bs-file-upload-item.d.ts +58 -0
- package/dist/types/components/bs-file-upload-item/bs-file-upload-item.stories.d.ts +18 -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-progress-linear/bs-progress-linear.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 +735 -7
- package/dist/types/test/helpers/conventions.d.ts +21 -0
- package/dist/types/test/helpers/conventions.unit.test.d.ts +1 -0
- package/package.json +2 -1
- package/readme.md +14 -0
- package/dist/brandsync-wc/p-00f733ef.entry.js +0 -1
- package/dist/brandsync-wc/p-18c59979.entry.js +0 -1
- package/dist/brandsync-wc/p-3cb58df8.entry.js +0 -1
- package/dist/brandsync-wc/p-3ed5b215.entry.js +0 -1
- package/dist/brandsync-wc/p-413a1ee0.entry.js +0 -1
- package/dist/brandsync-wc/p-512dafc6.entry.js +0 -1
- package/dist/brandsync-wc/p-57609703.entry.js +0 -1
- package/dist/brandsync-wc/p-6bf8a5bd.entry.js +0 -1
- package/dist/brandsync-wc/p-6c769a1d.entry.js +0 -1
- package/dist/brandsync-wc/p-6d0c054b.entry.js +0 -1
- package/dist/brandsync-wc/p-7b9598d9.entry.js +0 -1
- package/dist/brandsync-wc/p-98021881.entry.js +0 -1
- package/dist/brandsync-wc/p-a96856fd.entry.js +0 -1
- package/dist/brandsync-wc/p-bb68e236.entry.js +0 -1
- package/dist/brandsync-wc/p-cfb49342.entry.js +0 -1
- package/dist/brandsync-wc/p-e2ac61c4.entry.js +0 -1
- package/dist/brandsync-wc/p-f714683d.entry.js +0 -1
- package/dist/brandsync-wc/p-fe778b6b.entry.js +0 -1
- package/dist/components/p-3gs695M6.js +0 -1
- package/dist/components/p-BaxFLlKS.js +0 -1
- package/dist/components/p-DKMMCLxx.js +0 -1
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
|
}
|
|
@@ -105,7 +105,7 @@ export class BsChatbotResponseAction {
|
|
|
105
105
|
};
|
|
106
106
|
render() {
|
|
107
107
|
const hasSources = !!this.sourcesCount && this.sourcesCount > 0;
|
|
108
|
-
return (h("div", { key: '
|
|
108
|
+
return (h("div", { key: 'cbd257d7e8028f159bd8034217c3996d44cdf8ff', class: "bs-chatbot-response-action" }, h("button", { key: 'b1727aa3c799a5f7847784bbb5bee5abb9021800', type: "button", part: "like", class: "bs-chatbot-response-action__button", "aria-label": "Like", onClick: this.onLikeClick }, h("slot", { key: 'a39db9d1411f5923415f2f4576d715b7d44f5746', name: "like-icon" }, h(ThumbsUpIcon, { key: 'ad66ffbe937780037b25842da79ed34cede4fb8a' }))), h("button", { key: 'dd3fff82e054acba64d469aa939fe5d9e948ee86', type: "button", part: "dislike", class: "bs-chatbot-response-action__button", "aria-label": "Dislike", onClick: this.onDislikeClick }, h("slot", { key: '4d63753fca15dd1c9def17dd723fdbe549e286ea', name: "dislike-icon" }, h(ThumbsDownIcon, { key: '5985ecd4c1174a1d853dcafd27662eb0065f6a2f' }))), h("button", { key: '9a42c214ad271dd393deb319ae15815297970296', type: "button", part: "copy", class: "bs-chatbot-response-action__button", "aria-label": "Copy", onClick: this.onCopyClick }, h("slot", { key: '9b59e4e174e146e933683cb1e8f5b8887e17171b', name: "copy-icon" }, h(CopyIcon, { key: '73ed83f0056a5acb93ca731a69f5d0d320e2806c' }))), h("button", { key: '435980b95cfd5bd5c0c082520c9d2507357a481f', type: "button", part: "regenerate", class: "bs-chatbot-response-action__button", "aria-label": "Regenerate", onClick: this.onRegenerateClick }, h("slot", { key: '1f536807ea55e6332bb4c98314e747f1ff775ea4', name: "regenerate-icon" }, h(RegenerateIcon, { key: '461ce99ba4bb70ca07810a5883e00d96f6ff3e6c' }))), h("div", { key: '086174d1bc011ad39bf100ffb0ce39b7815c50e2', class: "bs-chatbot-response-action__menu-wrapper" }, h("button", { key: 'd1d52de0d6becf762e7f754f65cbd4430de168aa', type: "button", part: "menu", class: "bs-chatbot-response-action__button", "aria-label": "More options", "aria-haspopup": "menu", "aria-expanded": this.menuOpen ? 'true' : 'false', onClick: this.onMenuClick }, h("slot", { key: 'e70c2b467bb50751afd3b84874b653d1124fc3e5', name: "menu-icon" }, h(MenuIcon, { key: 'b73c887976b2e143638d61c0b9ea41ebb2e388bd' }))), this.menuOpen && (h("div", { key: '18891a0da434a7f50b6050806c2953e5e5e21484', class: "bs-chatbot-response-action__menu-popup" }, h("slot", { key: '288b3280f09def47f5065b4e85e91142ddd3d2a6', name: "menu" })))), hasSources && (h("button", { key: 'cfa661c9c2096975d250aa3a0b28b36ff3a397a1', type: "button", part: "sources", class: "bs-chatbot-response-action__sources", onClick: this.onSourcesClick }, h("slot", { key: 'a7b610479f2efaded9714c2ad75cd1fd168df55b', name: "sources-icon" }, h(SourcesIcon, { key: '49b12b3ab6011131147909158ec88518a86ce706' })), h("span", { key: 'f063468b3e386f1b88d41a668ac470a601322b51', class: "bs-chatbot-response-action__sources-label" }, this.sourcesCount, " ", this.sourcesCount === 1 ? 'source' : 'sources')))));
|
|
109
109
|
}
|
|
110
110
|
static get is() { return "bs-chatbot-response-action"; }
|
|
111
111
|
static get encapsulation() { return "shadow"; }
|
|
@@ -57,7 +57,7 @@ export class BsChatbotSourcesDrawer {
|
|
|
57
57
|
};
|
|
58
58
|
render() {
|
|
59
59
|
const displayCount = this.count ?? this.slottedCount;
|
|
60
|
-
return (h("div", { key: '
|
|
60
|
+
return (h("div", { key: '124930cad859a46032214d2025a6d0dc0601bd7e', class: "bs-chatbot-sources-drawer", role: "region", "aria-label": this.heading }, h("div", { key: 'edac48bbd2236fc8382595d0bb3fab2029d5471b', class: "bs-chatbot-sources-drawer__header" }, h("div", { key: '67c816b8604c8a7bdba2939162d9296f4213d8d0', class: "bs-chatbot-sources-drawer__title-group" }, h("h2", { key: '998b580f25800c4d25a288c60d78313ebb18ba96', part: "heading", class: "bs-chatbot-sources-drawer__heading" }, this.heading), displayCount > 0 && (h("span", { key: '7f04669f0c8a4df3383f4d37502620cee268249e', part: "count", class: "bs-chatbot-sources-drawer__count" }, displayCount))), h("button", { key: '3e672753a8eb658b5f63878411f4e98b8f0e9aeb', type: "button", part: "collapse", class: "bs-chatbot-sources-drawer__collapse", "aria-label": "Collapse sources", onClick: this.onCollapseClick }, h("slot", { key: '032e644f385e92882837386e02fcf04f4d4f7818', name: "collapse-icon" }, h(CaretRightIcon, { key: 'eed919d8fac971c37c45dbee46c3395e36dbd436' })))), h("div", { key: '7901e0b8eb2c904a779735dc613040bab1cec881', part: "list", class: "bs-chatbot-sources-drawer__list" }, h("slot", { key: '511ac408aae665461103da7b88664636a773f043', onSlotchange: this.onSlotchange }))));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "bs-chatbot-sources-drawer"; }
|
|
63
63
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js
CHANGED
|
@@ -45,7 +45,7 @@ export class BsChatbotSuggestionButton {
|
|
|
45
45
|
this.bsSelect.emit();
|
|
46
46
|
};
|
|
47
47
|
render() {
|
|
48
|
-
return (h("button", { key: '
|
|
48
|
+
return (h("button", { key: 'ae54b5a19bb4ad4d215c34df56018f49fd1907a9', type: "button", part: "button", class: "bs-chatbot-suggestion-button", disabled: this.disabled, onClick: this.onClick }, h("slot", { key: '950eefcbff22f6f09547b805bb72b6bc7599d060' })));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "bs-chatbot-suggestion-button"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -33,7 +33,7 @@ export class BsCheckboxSkeleton {
|
|
|
33
33
|
* (unusual) default `bs-checkbox` itself uses. */
|
|
34
34
|
size = 'lg';
|
|
35
35
|
render() {
|
|
36
|
-
return (h("span", { key: '
|
|
36
|
+
return (h("span", { key: '8797658f07231a6da75540109d31a0046e87391e', part: "container", class: "bs-checkbox-skeleton", role: "status", "aria-label": "Loading" }, h("span", { key: '5476c7e0b6fbfa41c2b9aabe64452665841c516d', part: "box", class: `bs-checkbox-skeleton__box bs-checkbox-skeleton__box--${this.size}` }), h("span", { key: 'f0d9bf8dee42ce498f8f627ed5a536e0ec8029c4', part: "label", class: "bs-checkbox-skeleton__label" })));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "bs-checkbox-skeleton"; }
|
|
39
39
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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 {
|
|
@@ -70,7 +70,7 @@ export class BsChipFilter {
|
|
|
70
70
|
// label-only edge gets more -- except when NEITHER edge has a glyph, where both edges use a
|
|
71
71
|
// third, larger value rather than the label-only one (see bs-chip-filter.css's own comment).
|
|
72
72
|
const paddingVariant = this.hasIcon && this.dropdown ? 'icon-dropdown' : this.hasIcon ? 'icon-only' : this.dropdown ? 'dropdown-only' : 'text-only';
|
|
73
|
-
return (h("button", { key: '
|
|
73
|
+
return (h("button", { key: 'c1b7395764984baadd0d32d5bd6a3d8d61cb637a', type: "button", class: `bs-chip-filter bs-chip-filter--${this.size} bs-chip-filter--${paddingVariant} ${this.selected ? 'bs-chip-filter--selected' : ''}`, disabled: this.disabled, "aria-pressed": String(this.selected), "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: 'db74ff2a992268bb95564dc1631e54d00208255f', part: "icon", class: `bs-chip-filter__icon ${this.hasIcon ? 'bs-chip-filter__icon--visible' : ''}` }, h("slot", { key: '9319387acc35131d0555f9ad84c1f733034920d7', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '06291c8712d77d43c3c823e4b90d99218618db35', part: "label", class: "bs-chip-filter__label" }, h("slot", { key: '3c72fcc1085239ba9c45ee6e89f5b8e8b4cc0ce8' })), this.dropdown && (h("span", { key: 'd2efca03ed06d2341aec986cca2c0d27bdce5a75', part: "caret", class: "bs-chip-filter__caret", "aria-hidden": "true" }, h(ChevronDownIcon, { key: '8bb9383201632e567f662909559702fcf391790e' })))));
|
|
74
74
|
}
|
|
75
75
|
static get is() { return "bs-chip-filter"; }
|
|
76
76
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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 {
|
|
@@ -44,7 +44,7 @@ export class BsChipInformative {
|
|
|
44
44
|
};
|
|
45
45
|
render() {
|
|
46
46
|
const paddingVariant = this.hasIcon ? 'icon' : 'text';
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: 'ee5706f8c040b01f97e44b9dba4d74a3b023005c', class: `bs-chip-informative bs-chip-informative--${this.color} bs-chip-informative--${this.size} bs-chip-informative--${paddingVariant}` }, h("span", { key: '611cc7bec3b22cc2e7de25fc8aa49e8d4eca3cba', part: "icon", class: `bs-chip-informative__icon ${this.hasIcon ? 'bs-chip-informative__icon--visible' : ''}` }, h("slot", { key: '5945478d567c7b6a6e4ff602c2edd6465d3b7778', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '7e78fb0f2e5cfc2d232aa04f0c9edf94044f8eca', part: "label", class: "bs-chip-informative__label" }, h("slot", { key: 'fcec1018222e0da3f0adc6da13e0699c0bad764b' }))));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "bs-chip-informative"; }
|
|
50
50
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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 {
|
|
@@ -77,7 +77,7 @@ export class BsChipInput {
|
|
|
77
77
|
};
|
|
78
78
|
render() {
|
|
79
79
|
const paddingVariant = this.hasIcon ? 'icon' : 'text';
|
|
80
|
-
return (h(Host, { key: '
|
|
80
|
+
return (h(Host, { key: 'bb8adc7ac62df562155d169a119d0bf3100f4c9f', class: `bs-chip-input bs-chip-input--${this.size} bs-chip-input--${paddingVariant}` }, h("button", { key: '92a509d98f93873738bed6db0fe0d5dc5bb9a7e4', type: "button", part: "body", class: "bs-chip-input__body", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.onBodyClick }, h("span", { key: '179d8713dd8be5a8340848eddb1de24ce7561d09', part: "icon", class: `bs-chip-input__icon ${this.hasIcon ? 'bs-chip-input__icon--visible' : ''}` }, h("slot", { key: '0b47b10606ef75c91b5374dc0032772993419ede', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'c2b678ecd9863d53c5ab52bd257122f298aafa62', part: "label", class: "bs-chip-input__label" }, h("slot", { key: '806fb8ea8e284a80d5faeef4905d1758c66f3ef0', onSlotchange: this.onLabelSlotchange }))), h("button", { key: 'a61df73d4a372dd0dce8b045feb6180853c209d2', type: "button", part: "remove", class: "bs-chip-input__remove", disabled: this.disabled, "aria-label": `Remove ${this.labelText}`, onClick: this.onRemoveClick }, h(CloseIcon, { key: '6e14762d31caae9473603449dd47a158859d28f6' }))));
|
|
81
81
|
}
|
|
82
82
|
static get is() { return "bs-chip-input"; }
|
|
83
83
|
static get encapsulation() { return "shadow"; }
|
|
@@ -206,7 +206,7 @@ export class BsComposer {
|
|
|
206
206
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
207
207
|
const disabled = this.state === 'disabled';
|
|
208
208
|
const recording = this.state === 'recording';
|
|
209
|
-
return (h("div", { key: '
|
|
209
|
+
return (h("div", { key: '8313dc19fa583114e96203cb07be9ac114afe6f2', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '2aaef774ce964d33342bce9126c4537dd8c3f844', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: 'fd673d9316b78516f3b828585a264005306c42f2', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: 'b3dbfc51f3451ae573443865487b6cd5cf20edb3', class: "bs-composer__text-row" }, h("textarea", { key: '10318ae3174f0491ead324fec41a12cc5135407a', ref: el => (this.inputEl = el), part: "input", class: "bs-composer__input", rows: 1, value: this.value, placeholder: placeholder, disabled: disabled, "aria-label": this.ariaLabel, onInput: this.onInput, onKeyDown: this.onInputKeydown })), h("div", { key: 'e298d4239e7868c97599c430397e8dedde4926c2', class: "bs-composer__controls-row" }, h("button", { key: 'a39c4810329fe7e198645e5e0ab29003916dd6d8', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, h(PlusIcon, { key: '9d58e6a54c91eb6d2c658ee203eb6ae37eeabea5' })), recording ? (h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (h("span", { class: "bs-composer__spacer" })), h("button", { key: '21f7f81e1273b240dc0bb35f96dac43976d76672', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? 'Stop recording' : 'Start voice input', disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null)), h("button", { key: '76f9d399d49c5f7248770a5a2845a2ab8b2e26e1', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: '4de2116117e03382f89c1a409fcb2ecb38aa89ff', name: "actions-end" }))));
|
|
210
210
|
}
|
|
211
211
|
static get is() { return "bs-composer"; }
|
|
212
212
|
static get encapsulation() { return "shadow"; }
|
|
@@ -106,7 +106,7 @@ export class BsComposerStatusBanner {
|
|
|
106
106
|
return this.type === 'error' || this.type === 'warning' ? h(WarningIcon, null) : h(ClockIcon, null);
|
|
107
107
|
}
|
|
108
108
|
render() {
|
|
109
|
-
return (h("div", { key: '
|
|
109
|
+
return (h("div", { key: '9e0569099d74f708f475b502625a2fd000cbbbf5', role: this.roleForType(), class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: '8d6de7446b8bb53bc45ab9d4f110963425559f50', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: '6f9964755ae030e577b356290ad2d972e024ace1', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '56d50ba748d0ad4cbcbcd73a6f4b8cb1a50613b8', name: "icon" }, this.renderDefaultIcon()))), h("p", { key: 'fed8249da75a688b2f125e5f9ca1787dc885b891', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: '48eb50ca73f76bfd404bbd5b2a7bce3ced2da7ac', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: 'f644669b00b8077b36ba9eb88ffffaba0e675fb4', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": "Dismiss", onClick: this.onCloseClick }, h(CloseIcon, { key: '3b42ae94449658eae8e9af5617abc3268c215325' })))));
|
|
110
110
|
}
|
|
111
111
|
static get is() { return "bs-composer-status-banner"; }
|
|
112
112
|
static get encapsulation() { return "shadow"; }
|
|
@@ -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);
|
|
@@ -71,11 +71,11 @@ export class BsDataTable {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
render() {
|
|
74
|
-
return (h("table", { key: '
|
|
74
|
+
return (h("table", { key: 'a1a9d0c92eb2af12f8f9cab9ba4ae0994a10958a', part: "table", class: "bs-data-table" }, h("thead", { key: '2b51500b221465d750b55c31e00af94684367eb2', part: "head" }, h("tr", { key: '57aa25ca9b255213f155b5b30841e284d1eebaf8' }, this.selectable && (h("th", { key: '44b709a7cd1f2072934efe8fef44a63b2ed20d62', class: "bs-data-table__select-col" }, this.rows.length > 0 && (h("input", { key: '084d099453c53333d77c60786b7eb6bedfa21ef3', 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
75
|
const isSorted = this.sortColumn === column.key;
|
|
76
76
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
77
77
|
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: '
|
|
78
|
+
}))), h("tbody", { key: '0438897652b9f8909ff67ae9f7b22d0950f1e5e8', 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
79
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
80
80
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
81
81
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -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,119 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
import { assertShadowParts, runAxeCheck } from "../../test/helpers/conventions";
|
|
3
|
+
const file = (name, type) => new File(['x'], name, { type });
|
|
4
|
+
const dt = (...files) => {
|
|
5
|
+
const d = new DataTransfer();
|
|
6
|
+
files.forEach(f => d.items.add(f));
|
|
7
|
+
return d;
|
|
8
|
+
};
|
|
9
|
+
const drop = (el, ...files) => el.dispatchEvent(new DragEvent('drop', { dataTransfer: dt(...files), bubbles: true, cancelable: true, composed: true }));
|
|
10
|
+
const zone = (root) => root.shadowRoot.querySelector('[part="dropzone"]');
|
|
11
|
+
const input = (root) => root.shadowRoot.querySelector('input[type="file"]');
|
|
12
|
+
describe('bs-file-upload', () => {
|
|
13
|
+
it('has no axe-core violations (both directions)', async () => {
|
|
14
|
+
for (const direction of ['horizontal', 'vertical']) {
|
|
15
|
+
const { root } = await render(h("bs-file-upload", { direction: direction, heading: "Upload documents", description: "PDF, up to 8MB" }));
|
|
16
|
+
await runAxeCheck(root);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
it('exposes its documented shadow parts', async () => {
|
|
20
|
+
const { root } = await render(h("bs-file-upload", { heading: "H", description: "D" }));
|
|
21
|
+
assertShadowParts(root.shadowRoot, ['dropzone', 'icon', 'heading', 'description', 'browse']);
|
|
22
|
+
});
|
|
23
|
+
it('renders the heading, description and the Browse file button', async () => {
|
|
24
|
+
const { root } = await render(h("bs-file-upload", { heading: "Upload", description: "Guidelines" }));
|
|
25
|
+
expect(root.shadowRoot.querySelector('[part="heading"]').textContent).toBe('Upload');
|
|
26
|
+
expect(root.shadowRoot.querySelector('[part="description"]').textContent).toBe('Guidelines');
|
|
27
|
+
expect(root.shadowRoot.querySelector('[part="browse"]').textContent).toBe('Browse file');
|
|
28
|
+
});
|
|
29
|
+
it('buttonLabel overrides the browse button text', async () => {
|
|
30
|
+
const { root } = await render(h("bs-file-upload", { buttonLabel: "V\u00E6lg fil" }));
|
|
31
|
+
expect(root.shadowRoot.querySelector('[part="browse"]').textContent).toBe('Vælg fil');
|
|
32
|
+
});
|
|
33
|
+
it('pressing Browse opens the native file picker', async () => {
|
|
34
|
+
const { root } = await render(h("bs-file-upload", null));
|
|
35
|
+
let clicked = 0;
|
|
36
|
+
input(root).addEventListener('click', () => clicked++);
|
|
37
|
+
root.shadowRoot.querySelector('[part="browse"]').shadowRoot.querySelector('button').click();
|
|
38
|
+
expect(clicked).toBe(1);
|
|
39
|
+
});
|
|
40
|
+
it('picking files through the input emits bsFilesSelect', async () => {
|
|
41
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-file-upload", { multiple: true }));
|
|
42
|
+
const spy = spyOnEvent('bsFilesSelect');
|
|
43
|
+
input(root).files = dt(file('a.pdf', 'application/pdf'), file('b.png', 'image/png')).files;
|
|
44
|
+
input(root).dispatchEvent(new Event('change', { bubbles: true }));
|
|
45
|
+
await waitForChanges();
|
|
46
|
+
expect(spy).toHaveReceivedEventTimes(1);
|
|
47
|
+
expect(spy.lastEvent.detail.map((f) => f.name)).toEqual(['a.pdf', 'b.png']);
|
|
48
|
+
});
|
|
49
|
+
it('dropping files emits bsFilesSelect', async () => {
|
|
50
|
+
const { root, spyOnEvent } = await render(h("bs-file-upload", { multiple: true }));
|
|
51
|
+
const spy = spyOnEvent('bsFilesSelect');
|
|
52
|
+
drop(zone(root), file('a.pdf', 'application/pdf'));
|
|
53
|
+
expect(spy.lastEvent.detail.map((f) => f.name)).toEqual(['a.pdf']);
|
|
54
|
+
});
|
|
55
|
+
it('without multiple, only the first file is taken and the rest are rejected', async () => {
|
|
56
|
+
const { root, spyOnEvent } = await render(h("bs-file-upload", null));
|
|
57
|
+
const select = spyOnEvent('bsFilesSelect');
|
|
58
|
+
const reject = spyOnEvent('bsFilesReject');
|
|
59
|
+
drop(zone(root), file('a.pdf', 'application/pdf'), file('b.pdf', 'application/pdf'));
|
|
60
|
+
expect(select.lastEvent.detail.map((f) => f.name)).toEqual(['a.pdf']);
|
|
61
|
+
expect(reject.lastEvent.detail.map((f) => f.name)).toEqual(['b.pdf']);
|
|
62
|
+
});
|
|
63
|
+
it('accept filters dropped files (extensions, MIME types and wildcards) and rejects the rest', async () => {
|
|
64
|
+
const { root, spyOnEvent } = await render(h("bs-file-upload", { multiple: true, accept: ".pdf, image/*, text/csv" }));
|
|
65
|
+
const select = spyOnEvent('bsFilesSelect');
|
|
66
|
+
const reject = spyOnEvent('bsFilesReject');
|
|
67
|
+
drop(zone(root), file('a.PDF', ''), file('b.png', 'image/png'), file('c.csv', 'text/csv'), file('d.exe', 'application/octet-stream'));
|
|
68
|
+
expect(select.lastEvent.detail.map((f) => f.name)).toEqual(['a.PDF', 'b.png', 'c.csv']);
|
|
69
|
+
expect(reject.lastEvent.detail.map((f) => f.name)).toEqual(['d.exe']);
|
|
70
|
+
});
|
|
71
|
+
it('passes accept/multiple to the native input', async () => {
|
|
72
|
+
const { root } = await render(h("bs-file-upload", { accept: ".pdf", multiple: true }));
|
|
73
|
+
expect(input(root).accept).toBe('.pdf');
|
|
74
|
+
expect(input(root).multiple).toBe(true);
|
|
75
|
+
});
|
|
76
|
+
it('shows the Drop state while dragging over and clears it on drop and on leaving', async () => {
|
|
77
|
+
const { root, waitForChanges } = await render(h("bs-file-upload", null));
|
|
78
|
+
const host = root;
|
|
79
|
+
zone(root).dispatchEvent(new DragEvent('dragover', { bubbles: true, cancelable: true, dataTransfer: dt() }));
|
|
80
|
+
await waitForChanges();
|
|
81
|
+
expect(host.dragging).toBe(true);
|
|
82
|
+
expect(zone(root)).toHaveClass('bs-file-upload--dragging');
|
|
83
|
+
zone(root).dispatchEvent(new DragEvent('dragleave', { bubbles: true, relatedTarget: document.body }));
|
|
84
|
+
await waitForChanges();
|
|
85
|
+
expect(host.dragging).toBe(false);
|
|
86
|
+
zone(root).dispatchEvent(new DragEvent('dragover', { bubbles: true, cancelable: true, dataTransfer: dt() }));
|
|
87
|
+
drop(zone(root), file('a.pdf', 'application/pdf'));
|
|
88
|
+
await waitForChanges();
|
|
89
|
+
expect(host.dragging).toBe(false);
|
|
90
|
+
});
|
|
91
|
+
it('dragleave between its own children does not clear the Drop state', async () => {
|
|
92
|
+
const { root, waitForChanges } = await render(h("bs-file-upload", { heading: "H" }));
|
|
93
|
+
const host = root;
|
|
94
|
+
zone(root).dispatchEvent(new DragEvent('dragover', { bubbles: true, cancelable: true, dataTransfer: dt() }));
|
|
95
|
+
zone(root).dispatchEvent(new DragEvent('dragleave', { bubbles: true, relatedTarget: root.shadowRoot.querySelector('[part="heading"]') }));
|
|
96
|
+
await waitForChanges();
|
|
97
|
+
expect(host.dragging).toBe(true);
|
|
98
|
+
});
|
|
99
|
+
it('disabled: ignores drops, never enters the Drop state, and disables the button and input', async () => {
|
|
100
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-file-upload", { disabled: true }));
|
|
101
|
+
const spy = spyOnEvent('bsFilesSelect');
|
|
102
|
+
zone(root).dispatchEvent(new DragEvent('dragover', { bubbles: true, cancelable: true, dataTransfer: dt() }));
|
|
103
|
+
drop(zone(root), file('a.pdf', 'application/pdf'));
|
|
104
|
+
await waitForChanges();
|
|
105
|
+
expect(spy).not.toHaveReceivedEvent();
|
|
106
|
+
expect(root.dragging).toBe(false);
|
|
107
|
+
expect(input(root).disabled).toBe(true);
|
|
108
|
+
expect(root.shadowRoot.querySelector('[part="browse"]').disabled).toBe(true);
|
|
109
|
+
});
|
|
110
|
+
it('dragging can be set from outside to show the Drop state statically', async () => {
|
|
111
|
+
const { root } = await render(h("bs-file-upload", { dragging: true }));
|
|
112
|
+
expect(zone(root)).toHaveClass('bs-file-upload--dragging');
|
|
113
|
+
});
|
|
114
|
+
it('the icon slot replaces the default icon', async () => {
|
|
115
|
+
const { root } = await render(h("bs-file-upload", null, h("span", { slot: "icon", id: "custom" }, "*")));
|
|
116
|
+
const slot = root.shadowRoot.querySelector('slot[name="icon"]');
|
|
117
|
+
expect(slot.assignedElements()[0].id).toBe('custom');
|
|
118
|
+
});
|
|
119
|
+
});
|