@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
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
import { assertShadowParts, runAxeCheck } from "../../test/helpers/conventions";
|
|
3
|
+
const btn = (el) => el?.shadowRoot?.querySelector('button');
|
|
4
|
+
describe('bs-file-upload-item', () => {
|
|
5
|
+
it('has no axe-core violations in every state', async () => {
|
|
6
|
+
for (const state of ['loading', 'in-progress', 'error', 'success']) {
|
|
7
|
+
const { root } = await render(h("bs-file-upload-item", { state: state, fileName: "report.pdf", fileSize: "8MB", progress: 40 }));
|
|
8
|
+
await runAxeCheck(root);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
it('exposes its documented shadow parts', async () => {
|
|
12
|
+
const { root } = await render(h("bs-file-upload-item", { state: "success", fileName: "a.pdf", fileSize: "1MB" }));
|
|
13
|
+
assertShadowParts(root.shadowRoot, ['item', 'thumbnail', 'name', 'size', 'status', 'action']);
|
|
14
|
+
const { root: r2 } = await render(h("bs-file-upload-item", { state: "in-progress", fileName: "a.pdf" }));
|
|
15
|
+
assertShadowParts(r2.shadowRoot, ['progress']);
|
|
16
|
+
});
|
|
17
|
+
it('shows the file name and size', async () => {
|
|
18
|
+
const { root } = await render(h("bs-file-upload-item", { fileName: "Image Name", fileSize: "8MB" }));
|
|
19
|
+
expect(root.shadowRoot.querySelector('[part="name"]').textContent).toBe('Image Name');
|
|
20
|
+
expect(root.shadowRoot.querySelector('[part="size"]').textContent).toBe('8MB');
|
|
21
|
+
});
|
|
22
|
+
it('omits the size line when there is no fileSize', async () => {
|
|
23
|
+
const { root } = await render(h("bs-file-upload-item", { fileName: "x" }));
|
|
24
|
+
expect(root.shadowRoot.querySelector('[part="size"]')).toBeNull();
|
|
25
|
+
});
|
|
26
|
+
describe('loading', () => {
|
|
27
|
+
it('renders an indeterminate progress bar labelled "Loading..."', async () => {
|
|
28
|
+
const { root } = await render(h("bs-file-upload-item", { state: "loading", fileName: "a" }));
|
|
29
|
+
const bar = root.shadowRoot.querySelector('bs-progress-linear');
|
|
30
|
+
expect(bar.type).toBe('indeterminate');
|
|
31
|
+
expect(bar.size).toBe('small');
|
|
32
|
+
expect(bar.textContent).toBe('Loading...');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
describe('in-progress', () => {
|
|
36
|
+
it('renders a determinate bar with the percentage label', async () => {
|
|
37
|
+
const { root } = await render(h("bs-file-upload-item", { state: "in-progress", fileName: "a", progress: 40 }));
|
|
38
|
+
const bar = root.shadowRoot.querySelector('bs-progress-linear');
|
|
39
|
+
expect(bar.type).toBe('determinate');
|
|
40
|
+
expect(bar.value).toBe(40);
|
|
41
|
+
expect(bar.textContent).toBe('40% uploaded');
|
|
42
|
+
});
|
|
43
|
+
it('clamps and rounds progress', async () => {
|
|
44
|
+
const { root } = await render(h("bs-file-upload-item", { state: "in-progress", fileName: "a", progress: 140.4 }));
|
|
45
|
+
expect(root.shadowRoot.querySelector('bs-progress-linear').textContent).toBe('100% uploaded');
|
|
46
|
+
});
|
|
47
|
+
it('names the progress bar after the file', async () => {
|
|
48
|
+
const { root } = await render(h("bs-file-upload-item", { state: "in-progress", fileName: "report.pdf", progress: 10 }));
|
|
49
|
+
const bar = root.shadowRoot.querySelector('bs-progress-linear');
|
|
50
|
+
expect(bar.shadowRoot.querySelector('[role="progressbar"]')).toEqualAttribute('aria-label', 'report.pdf');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
describe('error and success', () => {
|
|
54
|
+
it('error: red status with the default or a custom message, announced via role="status"', async () => {
|
|
55
|
+
const { root } = await render(h("bs-file-upload-item", { state: "error", fileName: "a" }));
|
|
56
|
+
const status = root.shadowRoot.querySelector('[part="status"]');
|
|
57
|
+
expect(status).toEqualAttribute('role', 'status');
|
|
58
|
+
expect(status.textContent).toContain('Upload failed');
|
|
59
|
+
expect(status).toHaveClass('bs-file-upload-item__status--error');
|
|
60
|
+
const { root: r2 } = await render(h("bs-file-upload-item", { state: "error", fileName: "a", message: "File too large" }));
|
|
61
|
+
expect(r2.shadowRoot.querySelector('[part="status"]').textContent).toContain('File too large');
|
|
62
|
+
});
|
|
63
|
+
it('success: green status with the default message', async () => {
|
|
64
|
+
const { root } = await render(h("bs-file-upload-item", { state: "success", fileName: "a" }));
|
|
65
|
+
const status = root.shadowRoot.querySelector('[part="status"]');
|
|
66
|
+
expect(status.textContent).toContain('File uploaded successfully');
|
|
67
|
+
expect(status).toHaveClass('bs-file-upload-item__status--success');
|
|
68
|
+
});
|
|
69
|
+
it('the final states render no progress bar', async () => {
|
|
70
|
+
const { root } = await render(h("bs-file-upload-item", { state: "success", fileName: "a" }));
|
|
71
|
+
expect(root.shadowRoot.querySelector('bs-progress-linear')).toBeNull();
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
describe('action button', () => {
|
|
75
|
+
it('loading / in-progress / error: a cancel button that emits bsCancel', async () => {
|
|
76
|
+
for (const state of ['loading', 'in-progress', 'error']) {
|
|
77
|
+
const { root, spyOnEvent } = await render(h("bs-file-upload-item", { state: state, fileName: "a" }));
|
|
78
|
+
const cancel = spyOnEvent('bsCancel');
|
|
79
|
+
const remove = spyOnEvent('bsRemove');
|
|
80
|
+
const action = root.shadowRoot.querySelector('[part="action"]');
|
|
81
|
+
expect(btn(action).getAttribute('aria-label')).toBe('Cancel upload');
|
|
82
|
+
btn(action).click();
|
|
83
|
+
expect(cancel).toHaveReceivedEventTimes(1);
|
|
84
|
+
expect(remove).not.toHaveReceivedEvent();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
it('success: a remove button that emits bsRemove', async () => {
|
|
88
|
+
const { root, spyOnEvent } = await render(h("bs-file-upload-item", { state: "success", fileName: "a" }));
|
|
89
|
+
const cancel = spyOnEvent('bsCancel');
|
|
90
|
+
const remove = spyOnEvent('bsRemove');
|
|
91
|
+
const action = root.shadowRoot.querySelector('[part="action"]');
|
|
92
|
+
expect(btn(action).getAttribute('aria-label')).toBe('Remove file');
|
|
93
|
+
btn(action).click();
|
|
94
|
+
expect(remove).toHaveReceivedEventTimes(1);
|
|
95
|
+
expect(cancel).not.toHaveReceivedEvent();
|
|
96
|
+
});
|
|
97
|
+
it('cancelLabel / removeLabel override the accessible names', async () => {
|
|
98
|
+
const { root } = await render(h("bs-file-upload-item", { state: "loading", fileName: "a", cancelLabel: "Annuller" }));
|
|
99
|
+
expect(btn(root.shadowRoot.querySelector('[part="action"]')).getAttribute('aria-label')).toBe('Annuller');
|
|
100
|
+
const { root: r2 } = await render(h("bs-file-upload-item", { state: "success", fileName: "a", removeLabel: "Fjern" }));
|
|
101
|
+
expect(btn(r2.shadowRoot.querySelector('[part="action"]')).getAttribute('aria-label')).toBe('Fjern');
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
describe('thumbnail', () => {
|
|
105
|
+
it('shows the placeholder icon without thumbnailSrc, and the image with it', async () => {
|
|
106
|
+
const { root } = await render(h("bs-file-upload-item", { fileName: "a" }));
|
|
107
|
+
expect(root.shadowRoot.querySelector('.bs-file-upload-item__placeholder')).not.toBeNull();
|
|
108
|
+
expect(root.shadowRoot.querySelector('img')).toBeNull();
|
|
109
|
+
const { root: r2 } = await render(h("bs-file-upload-item", { fileName: "a", thumbnailSrc: "data:image/gif;base64,R0lGODlhAQABAAAAACw=", thumbnailAlt: "Preview" }));
|
|
110
|
+
const img = r2.shadowRoot.querySelector('img');
|
|
111
|
+
expect(img).toEqualAttribute('alt', 'Preview');
|
|
112
|
+
expect(r2.shadowRoot.querySelector('.bs-file-upload-item__placeholder')).toBeNull();
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
});
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-file-upload-item-bg: Card background. Aliased to --bs-surface-base.
|
|
3
|
+
* @prop --bs-file-upload-item-border-color: Card border color. Aliased to --bs-border-default.
|
|
4
|
+
* @prop --bs-file-upload-item-border-width: Card border width. Aliased to --bs-border-width-thin.
|
|
5
|
+
* @prop --bs-file-upload-item-radius: Card corner radius. Aliased to --bs-border-radius-150.
|
|
6
|
+
* @prop --bs-file-upload-item-padding: Card padding on all sides. Aliased to --bs-spacing-200.
|
|
7
|
+
* @prop --bs-file-upload-item-gap: Gap between the thumbnail, the content and the action. Aliased to --bs-spacing-150.
|
|
8
|
+
* @prop --bs-file-upload-item-thumbnail-size: Thumbnail width/height. 80px, per the Figma spec.
|
|
9
|
+
* @prop --bs-file-upload-item-thumbnail-radius: Thumbnail corner radius. Aliased to --bs-border-radius-100.
|
|
10
|
+
* @prop --bs-file-upload-item-thumbnail-bg: Placeholder background (when there is no image). Aliased to --bs-surface-container.
|
|
11
|
+
* @prop --bs-file-upload-item-thumbnail-icon-color: Placeholder icon color. Aliased to --bs-icon-muted.
|
|
12
|
+
* @prop --bs-file-upload-item-content-gap: Gap between the name/size block and the status line. Aliased to --bs-spacing-100.
|
|
13
|
+
* @prop --bs-file-upload-item-name-color: File name color. Aliased to --bs-text-default.
|
|
14
|
+
* @prop --bs-file-upload-item-size-color: File size color. Aliased to --bs-text-default.
|
|
15
|
+
* @prop --bs-file-upload-item-success-color: Success text color. Aliased to --bs-text-success.
|
|
16
|
+
* @prop --bs-file-upload-item-success-icon-color: Success icon color. Aliased to --bs-icon-success.
|
|
17
|
+
* @prop --bs-file-upload-item-error-color: Error text color. Aliased to --bs-text-error.
|
|
18
|
+
* @prop --bs-file-upload-item-error-icon-color: Error icon color. Aliased to --bs-icon-error.
|
|
19
|
+
*/
|
|
20
|
+
:host {
|
|
21
|
+
display: block;
|
|
22
|
+
|
|
23
|
+
--bs-file-upload-item-bg: var(--bs-surface-base);
|
|
24
|
+
--bs-file-upload-item-border-color: var(--bs-border-default);
|
|
25
|
+
--bs-file-upload-item-border-width: var(--bs-border-width-thin);
|
|
26
|
+
--bs-file-upload-item-radius: var(--bs-border-radius-150);
|
|
27
|
+
--bs-file-upload-item-padding: var(--bs-spacing-200);
|
|
28
|
+
--bs-file-upload-item-gap: var(--bs-spacing-150);
|
|
29
|
+
|
|
30
|
+
--bs-file-upload-item-thumbnail-size: 80px;
|
|
31
|
+
--bs-file-upload-item-thumbnail-radius: var(--bs-border-radius-100);
|
|
32
|
+
--bs-file-upload-item-thumbnail-bg: var(--bs-surface-container);
|
|
33
|
+
--bs-file-upload-item-thumbnail-icon-color: var(--bs-icon-muted);
|
|
34
|
+
|
|
35
|
+
--bs-file-upload-item-content-gap: var(--bs-spacing-100);
|
|
36
|
+
--bs-file-upload-item-name-color: var(--bs-text-default);
|
|
37
|
+
--bs-file-upload-item-size-color: var(--bs-text-default);
|
|
38
|
+
|
|
39
|
+
--bs-file-upload-item-success-color: var(--bs-text-success);
|
|
40
|
+
--bs-file-upload-item-success-icon-color: var(--bs-icon-success);
|
|
41
|
+
--bs-file-upload-item-error-color: var(--bs-text-error);
|
|
42
|
+
--bs-file-upload-item-error-icon-color: var(--bs-icon-error);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bs-file-upload-item {
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: flex-start;
|
|
49
|
+
gap: var(--bs-file-upload-item-gap);
|
|
50
|
+
padding: var(--bs-file-upload-item-padding);
|
|
51
|
+
border: var(--bs-file-upload-item-border-width) solid var(--bs-file-upload-item-border-color);
|
|
52
|
+
border-radius: var(--bs-file-upload-item-radius);
|
|
53
|
+
background: var(--bs-file-upload-item-bg);
|
|
54
|
+
font-size: var(--bs-font-size-md);
|
|
55
|
+
line-height: calc(var(--bs-line-height-body-md) * 1px);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.bs-file-upload-item__thumbnail {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex: none;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: var(--bs-file-upload-item-thumbnail-size);
|
|
64
|
+
height: var(--bs-file-upload-item-thumbnail-size);
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
border-radius: var(--bs-file-upload-item-thumbnail-radius);
|
|
67
|
+
background: var(--bs-file-upload-item-thumbnail-bg);
|
|
68
|
+
color: var(--bs-file-upload-item-thumbnail-icon-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.bs-file-upload-item__placeholder {
|
|
72
|
+
display: block;
|
|
73
|
+
width: 32px;
|
|
74
|
+
height: 32px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bs-file-upload-item__image {
|
|
78
|
+
display: block;
|
|
79
|
+
width: 100%;
|
|
80
|
+
height: 100%;
|
|
81
|
+
object-fit: cover;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.bs-file-upload-item__content {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex: 1;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
gap: var(--bs-file-upload-item-content-gap);
|
|
90
|
+
align-self: stretch;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.bs-file-upload-item__meta {
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bs-file-upload-item__name {
|
|
100
|
+
color: var(--bs-file-upload-item-name-color);
|
|
101
|
+
font-weight: 600;
|
|
102
|
+
overflow-wrap: anywhere;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.bs-file-upload-item__size {
|
|
106
|
+
color: var(--bs-file-upload-item-size-color);
|
|
107
|
+
font-size: var(--bs-font-size-sm);
|
|
108
|
+
line-height: calc(var(--bs-line-height-body-sm) * 1px);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.bs-file-upload-item__status {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: var(--bs-spacing-50);
|
|
115
|
+
min-height: 24px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.bs-file-upload-item__status-icon {
|
|
119
|
+
display: block;
|
|
120
|
+
flex: none;
|
|
121
|
+
width: 16px;
|
|
122
|
+
height: 16px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.bs-file-upload-item__status--success {
|
|
126
|
+
color: var(--bs-file-upload-item-success-color);
|
|
127
|
+
}
|
|
128
|
+
.bs-file-upload-item__status--success .bs-file-upload-item__status-icon {
|
|
129
|
+
color: var(--bs-file-upload-item-success-icon-color);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.bs-file-upload-item__status--error {
|
|
133
|
+
color: var(--bs-file-upload-item-error-color);
|
|
134
|
+
}
|
|
135
|
+
.bs-file-upload-item__status--error .bs-file-upload-item__status-icon {
|
|
136
|
+
color: var(--bs-file-upload-item-error-icon-color);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
bs-progress-linear {
|
|
140
|
+
width: 100%;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Figma uses the default icon color for the cancel/remove glyph, one step darker than the subtle
|
|
144
|
+
variant's --bs-icon-neutral-default (same re-pointing as bs-carousel's arrows). */
|
|
145
|
+
bs-icon-button {
|
|
146
|
+
flex: none;
|
|
147
|
+
--bs-icon-neutral-default: var(--bs-icon-default);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@media (forced-colors: active) {
|
|
151
|
+
.bs-file-upload-item {
|
|
152
|
+
border-color: CanvasText;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* One file in an upload list: a thumbnail, the file name and size, a status line (a progress bar
|
|
4
|
+
* while uploading, or a success / error message) and an action button (cancel while uploading or
|
|
5
|
+
* after an error, remove once uploaded).
|
|
6
|
+
*
|
|
7
|
+
* Presentational only -- the consuming app owns the upload and drives `state`, `progress` and
|
|
8
|
+
* `message` from it. Pair with `bs-file-upload` (the dropzone that picks the files).
|
|
9
|
+
*
|
|
10
|
+
* ## When to use
|
|
11
|
+
* - Showing the status of each file the user has added, in a list under a `bs-file-upload`.
|
|
12
|
+
*
|
|
13
|
+
* ## When not to use
|
|
14
|
+
* - Attaching files to a chat message -- use `bs-attachment`.
|
|
15
|
+
*
|
|
16
|
+
* @slot thumbnail - Replaces the thumbnail content (the image-placeholder icon, or `thumbnailSrc`).
|
|
17
|
+
* @part item - The card.
|
|
18
|
+
* @part thumbnail - The thumbnail box.
|
|
19
|
+
* @part name - The file name.
|
|
20
|
+
* @part size - The file size text.
|
|
21
|
+
* @part progress - The progress bar (`loading` / `in-progress`).
|
|
22
|
+
* @part status - The success / error message line.
|
|
23
|
+
* @part action - The cancel / remove button.
|
|
24
|
+
*/
|
|
25
|
+
// Note: this component's CSS Custom Properties (--bs-file-upload-item-*) are documented via @prop
|
|
26
|
+
// comments in bs-file-upload-item.css, not here (see bs-input.tsx's equivalent note).
|
|
27
|
+
export class BsFileUploadItem {
|
|
28
|
+
/** Where the upload is. `loading` = working with no known percentage (indeterminate bar);
|
|
29
|
+
* `in-progress` = uploading with a known `progress`; `error` and `success` are final. */
|
|
30
|
+
state = 'loading';
|
|
31
|
+
/** The file name. */
|
|
32
|
+
fileName = '';
|
|
33
|
+
/** The file size, already formatted (e.g. "8MB"). */
|
|
34
|
+
fileSize;
|
|
35
|
+
/** Upload progress, 0-100. Only used when `state="in-progress"`. */
|
|
36
|
+
progress = 0;
|
|
37
|
+
/** The status text. Defaults per state: "Loading..." (`loading`), "{progress}% uploaded"
|
|
38
|
+
* (`in-progress`), "Upload failed" (`error`), "File uploaded successfully" (`success`). Provide
|
|
39
|
+
* your own for localisation or a specific error. */
|
|
40
|
+
message;
|
|
41
|
+
/** A preview image of the file. Shown instead of the placeholder icon when set. */
|
|
42
|
+
thumbnailSrc;
|
|
43
|
+
/** Alt text for `thumbnailSrc`. Leave empty when the file name already says it all. */
|
|
44
|
+
thumbnailAlt = '';
|
|
45
|
+
/** Accessible name of the cancel button (`loading`, `in-progress`, `error`). */
|
|
46
|
+
cancelLabel = 'Cancel upload';
|
|
47
|
+
/** Accessible name of the remove button (`success`). */
|
|
48
|
+
removeLabel = 'Remove file';
|
|
49
|
+
/** Fires when the cancel button is clicked (`loading`, `in-progress`, `error`). The consumer
|
|
50
|
+
* stops the upload and removes the item. */
|
|
51
|
+
bsCancel;
|
|
52
|
+
/** Fires when the remove button is clicked (`success`). The consumer removes the file. */
|
|
53
|
+
bsRemove;
|
|
54
|
+
get clampedProgress() {
|
|
55
|
+
return Math.min(100, Math.max(0, Math.round(Number.isFinite(this.progress) ? this.progress : 0)));
|
|
56
|
+
}
|
|
57
|
+
get statusText() {
|
|
58
|
+
if (this.message)
|
|
59
|
+
return this.message;
|
|
60
|
+
switch (this.state) {
|
|
61
|
+
case 'in-progress':
|
|
62
|
+
return `${this.clampedProgress}% uploaded`;
|
|
63
|
+
case 'error':
|
|
64
|
+
return 'Upload failed';
|
|
65
|
+
case 'success':
|
|
66
|
+
return 'File uploaded successfully';
|
|
67
|
+
case 'loading':
|
|
68
|
+
default:
|
|
69
|
+
return 'Loading...';
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
onAction = () => {
|
|
73
|
+
if (this.state === 'success')
|
|
74
|
+
this.bsRemove.emit();
|
|
75
|
+
else
|
|
76
|
+
this.bsCancel.emit();
|
|
77
|
+
};
|
|
78
|
+
renderStatus() {
|
|
79
|
+
const uploading = this.state === 'loading' || this.state === 'in-progress';
|
|
80
|
+
if (uploading) {
|
|
81
|
+
return (h("bs-progress-linear", { part: "progress", size: "small", type: this.state === 'loading' ? 'indeterminate' : 'determinate', value: this.clampedProgress, ariaLabel: this.fileName || 'Upload progress' }, this.statusText));
|
|
82
|
+
}
|
|
83
|
+
// Final states are announced once (role="status"); the progress bar above is deliberately not
|
|
84
|
+
// a live region, so frequent percentage updates don't flood a screen reader.
|
|
85
|
+
return (h("div", { part: "status", class: `bs-file-upload-item__status bs-file-upload-item__status--${this.state}`, role: "status" }, this.state === 'success' ? h(CheckCircleIcon, null) : h(XCircleIcon, null), h("span", { class: "bs-file-upload-item__status-text" }, this.statusText)));
|
|
86
|
+
}
|
|
87
|
+
render() {
|
|
88
|
+
const removing = this.state === 'success';
|
|
89
|
+
return (h("div", { key: 'd26aebbbdb7858444d2ff3084c421ce1e70acd9e', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, h("div", { key: '2bf21442cc31bc9f85178e97bdae140de59fd7ce', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, h("slot", { key: 'fb9a9d723855e6d2556e61fb5cc7414e296ddf89', name: "thumbnail" }, this.thumbnailSrc ? (h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (h(ImageIcon, null)))), h("div", { key: 'ca1cab03c21d93b4fe754e8e4575bbee5c6c11bd', class: "bs-file-upload-item__content" }, h("div", { key: '072532a7cfb4a699ab9920594ed4299bd094eea3', class: "bs-file-upload-item__meta" }, h("span", { key: 'f30ec89b3af9d5a4fc3ea2cf9252713f47a68ba2', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (h("span", { key: '63aeb6db94d78011a649fa1a0771d488890c330b', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), h("bs-icon-button", { key: '5434d917777db308f8b16f84e2ccd5efcfb46dc8', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? h(TrashIcon, null) : h(CloseIcon, null))));
|
|
90
|
+
}
|
|
91
|
+
static get is() { return "bs-file-upload-item"; }
|
|
92
|
+
static get encapsulation() { return "shadow"; }
|
|
93
|
+
static get originalStyleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["bs-file-upload-item.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get styleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["bs-file-upload-item.css"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get properties() {
|
|
104
|
+
return {
|
|
105
|
+
"state": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "BsFileUploadItemState",
|
|
110
|
+
"resolved": "\"error\" | \"in-progress\" | \"loading\" | \"success\"",
|
|
111
|
+
"references": {
|
|
112
|
+
"BsFileUploadItemState": {
|
|
113
|
+
"location": "local",
|
|
114
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-file-upload-item/bs-file-upload-item.tsx",
|
|
115
|
+
"id": "src/components/bs-file-upload-item/bs-file-upload-item.tsx::BsFileUploadItemState"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": false,
|
|
120
|
+
"optional": false,
|
|
121
|
+
"docs": {
|
|
122
|
+
"tags": [],
|
|
123
|
+
"text": "Where the upload is. `loading` = working with no known percentage (indeterminate bar);\n`in-progress` = uploading with a known `progress`; `error` and `success` are final."
|
|
124
|
+
},
|
|
125
|
+
"getter": false,
|
|
126
|
+
"setter": false,
|
|
127
|
+
"reflect": true,
|
|
128
|
+
"attribute": "state",
|
|
129
|
+
"defaultValue": "'loading'"
|
|
130
|
+
},
|
|
131
|
+
"fileName": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"mutable": false,
|
|
134
|
+
"complexType": {
|
|
135
|
+
"original": "string",
|
|
136
|
+
"resolved": "string",
|
|
137
|
+
"references": {}
|
|
138
|
+
},
|
|
139
|
+
"required": false,
|
|
140
|
+
"optional": false,
|
|
141
|
+
"docs": {
|
|
142
|
+
"tags": [],
|
|
143
|
+
"text": "The file name."
|
|
144
|
+
},
|
|
145
|
+
"getter": false,
|
|
146
|
+
"setter": false,
|
|
147
|
+
"reflect": false,
|
|
148
|
+
"attribute": "file-name",
|
|
149
|
+
"defaultValue": "''"
|
|
150
|
+
},
|
|
151
|
+
"fileSize": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"mutable": false,
|
|
154
|
+
"complexType": {
|
|
155
|
+
"original": "string",
|
|
156
|
+
"resolved": "string",
|
|
157
|
+
"references": {}
|
|
158
|
+
},
|
|
159
|
+
"required": false,
|
|
160
|
+
"optional": true,
|
|
161
|
+
"docs": {
|
|
162
|
+
"tags": [],
|
|
163
|
+
"text": "The file size, already formatted (e.g. \"8MB\")."
|
|
164
|
+
},
|
|
165
|
+
"getter": false,
|
|
166
|
+
"setter": false,
|
|
167
|
+
"reflect": false,
|
|
168
|
+
"attribute": "file-size"
|
|
169
|
+
},
|
|
170
|
+
"progress": {
|
|
171
|
+
"type": "number",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "number",
|
|
175
|
+
"resolved": "number",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Upload progress, 0-100. Only used when `state=\"in-progress\"`."
|
|
183
|
+
},
|
|
184
|
+
"getter": false,
|
|
185
|
+
"setter": false,
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"attribute": "progress",
|
|
188
|
+
"defaultValue": "0"
|
|
189
|
+
},
|
|
190
|
+
"message": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "string",
|
|
195
|
+
"resolved": "string",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": true,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": "The status text. Defaults per state: \"Loading...\" (`loading`), \"{progress}% uploaded\"\n(`in-progress`), \"Upload failed\" (`error`), \"File uploaded successfully\" (`success`). Provide\nyour own for localisation or a specific error."
|
|
203
|
+
},
|
|
204
|
+
"getter": false,
|
|
205
|
+
"setter": false,
|
|
206
|
+
"reflect": false,
|
|
207
|
+
"attribute": "message"
|
|
208
|
+
},
|
|
209
|
+
"thumbnailSrc": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "string",
|
|
214
|
+
"resolved": "string",
|
|
215
|
+
"references": {}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": true,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": "A preview image of the file. Shown instead of the placeholder icon when set."
|
|
222
|
+
},
|
|
223
|
+
"getter": false,
|
|
224
|
+
"setter": false,
|
|
225
|
+
"reflect": false,
|
|
226
|
+
"attribute": "thumbnail-src"
|
|
227
|
+
},
|
|
228
|
+
"thumbnailAlt": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"mutable": false,
|
|
231
|
+
"complexType": {
|
|
232
|
+
"original": "string",
|
|
233
|
+
"resolved": "string",
|
|
234
|
+
"references": {}
|
|
235
|
+
},
|
|
236
|
+
"required": false,
|
|
237
|
+
"optional": false,
|
|
238
|
+
"docs": {
|
|
239
|
+
"tags": [],
|
|
240
|
+
"text": "Alt text for `thumbnailSrc`. Leave empty when the file name already says it all."
|
|
241
|
+
},
|
|
242
|
+
"getter": false,
|
|
243
|
+
"setter": false,
|
|
244
|
+
"reflect": false,
|
|
245
|
+
"attribute": "thumbnail-alt",
|
|
246
|
+
"defaultValue": "''"
|
|
247
|
+
},
|
|
248
|
+
"cancelLabel": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"mutable": false,
|
|
251
|
+
"complexType": {
|
|
252
|
+
"original": "string",
|
|
253
|
+
"resolved": "string",
|
|
254
|
+
"references": {}
|
|
255
|
+
},
|
|
256
|
+
"required": false,
|
|
257
|
+
"optional": false,
|
|
258
|
+
"docs": {
|
|
259
|
+
"tags": [],
|
|
260
|
+
"text": "Accessible name of the cancel button (`loading`, `in-progress`, `error`)."
|
|
261
|
+
},
|
|
262
|
+
"getter": false,
|
|
263
|
+
"setter": false,
|
|
264
|
+
"reflect": false,
|
|
265
|
+
"attribute": "cancel-label",
|
|
266
|
+
"defaultValue": "'Cancel upload'"
|
|
267
|
+
},
|
|
268
|
+
"removeLabel": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "string",
|
|
273
|
+
"resolved": "string",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": false,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": "Accessible name of the remove button (`success`)."
|
|
281
|
+
},
|
|
282
|
+
"getter": false,
|
|
283
|
+
"setter": false,
|
|
284
|
+
"reflect": false,
|
|
285
|
+
"attribute": "remove-label",
|
|
286
|
+
"defaultValue": "'Remove file'"
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
static get events() {
|
|
291
|
+
return [{
|
|
292
|
+
"method": "bsCancel",
|
|
293
|
+
"name": "bsCancel",
|
|
294
|
+
"bubbles": true,
|
|
295
|
+
"cancelable": true,
|
|
296
|
+
"composed": true,
|
|
297
|
+
"docs": {
|
|
298
|
+
"tags": [],
|
|
299
|
+
"text": "Fires when the cancel button is clicked (`loading`, `in-progress`, `error`). The consumer\nstops the upload and removes the item."
|
|
300
|
+
},
|
|
301
|
+
"complexType": {
|
|
302
|
+
"original": "void",
|
|
303
|
+
"resolved": "void",
|
|
304
|
+
"references": {}
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
"method": "bsRemove",
|
|
308
|
+
"name": "bsRemove",
|
|
309
|
+
"bubbles": true,
|
|
310
|
+
"cancelable": true,
|
|
311
|
+
"composed": true,
|
|
312
|
+
"docs": {
|
|
313
|
+
"tags": [],
|
|
314
|
+
"text": "Fires when the remove button is clicked (`success`). The consumer removes the file."
|
|
315
|
+
},
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "void",
|
|
318
|
+
"resolved": "void",
|
|
319
|
+
"references": {}
|
|
320
|
+
}
|
|
321
|
+
}];
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
// Figma exports, recolored via currentColor so the CSS tokens drive the color.
|
|
325
|
+
const ImageIcon = () => (h("svg", { class: "bs-file-upload-item__placeholder", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M5 6H27C27.5523 6 28 6.44772 28 7V25C28 25.5523 27.5523 26 27 26H5C4.44772 26 4 25.5523 4 25V7C4 6.44772 4.44772 6 5 6Z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M19.5 14C20.3284 14 21 13.3284 21 12.5C21 11.6716 20.3284 11 19.5 11C18.6716 11 18 11.6716 18 12.5C18 13.3284 18.6716 14 19.5 14Z", fill: "currentColor" }), h("path", { d: "M18.4137 20.5L21.625 17.2925C21.8125 17.1051 22.0668 16.9998 22.3319 16.9998C22.597 16.9998 22.8512 17.1051 23.0387 17.2925L28 22.2575", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M4 21.0863L10.7925 14.2925C10.8854 14.1995 10.9957 14.1258 11.1171 14.0754C11.2385 14.0251 11.3686 13.9992 11.5 13.9992C11.6314 13.9992 11.7615 14.0251 11.8829 14.0754C12.0043 14.1258 12.1146 14.1995 12.2075 14.2925L23.9137 26", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
326
|
+
const CheckCircleIcon = () => (h("svg", { class: "bs-file-upload-item__status-icon", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M11.0306 5.96938C11.1005 6.03905 11.156 6.12185 11.1939 6.21301C11.2317 6.30417 11.2512 6.40191 11.2512 6.50063C11.2512 6.59934 11.2317 6.69708 11.1939 6.78824C11.156 6.8794 11.1005 6.9622 11.0306 7.03188L7.53062 10.5319C7.46095 10.6018 7.37815 10.6573 7.28699 10.6951C7.19582 10.733 7.09809 10.7525 6.99937 10.7525C6.90066 10.7525 6.80292 10.733 6.71176 10.6951C6.6206 10.6573 6.5378 10.6018 6.46812 10.5319L4.96812 9.03187C4.89836 8.96211 4.84302 8.87929 4.80526 8.78814C4.76751 8.69698 4.74807 8.59929 4.74807 8.50062C4.74807 8.40196 4.76751 8.30427 4.80526 8.21311C4.84302 8.12196 4.89836 8.03914 4.96812 7.96938C5.03789 7.89961 5.12071 7.84427 5.21186 7.80651C5.30302 7.76876 5.40071 7.74932 5.49937 7.74932C5.59804 7.74932 5.69573 7.76876 5.78689 7.80651C5.87804 7.84427 5.96086 7.89961 6.03062 7.96938L7 8.9375L9.96937 5.9675C10.0392 5.89789 10.122 5.84272 10.2131 5.80513C10.3042 5.76755 10.4018 5.7483 10.5004 5.74847C10.599 5.74865 10.6965 5.76825 10.7875 5.80615C10.8785 5.84405 10.9611 5.89952 11.0306 5.96938ZM14.75 8C14.75 9.33502 14.3541 10.6401 13.6124 11.7501C12.8707 12.8601 11.8165 13.7253 10.5831 14.2362C9.34971 14.7471 7.99251 14.8808 6.68314 14.6203C5.37377 14.3598 4.17103 13.717 3.22703 12.773C2.28302 11.829 1.64015 10.6262 1.3797 9.31686C1.11925 8.00749 1.25292 6.65029 1.76381 5.41689C2.2747 4.18349 3.13987 3.12928 4.2499 2.38758C5.35993 1.64588 6.66498 1.25 8 1.25C9.7896 1.25199 11.5053 1.96378 12.7708 3.22922C14.0362 4.49466 14.748 6.2104 14.75 8ZM13.25 8C13.25 6.96165 12.9421 5.94661 12.3652 5.08326C11.7883 4.2199 10.9684 3.54699 10.0091 3.14963C9.04978 2.75227 7.99418 2.6483 6.97578 2.85088C5.95738 3.05345 5.02191 3.55346 4.28769 4.28769C3.55346 5.02191 3.05345 5.95738 2.85088 6.97578C2.6483 7.99418 2.75227 9.04978 3.14963 10.0091C3.54699 10.9684 4.2199 11.7883 5.08326 12.3652C5.94661 12.9421 6.96165 13.25 8 13.25C9.39193 13.2485 10.7264 12.6949 11.7107 11.7107C12.6949 10.7264 13.2485 9.39193 13.25 8Z", fill: "currentColor" })));
|
|
327
|
+
const XCircleIcon = () => (h("svg", { class: "bs-file-upload-item__status-icon", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M10.5306 6.53062L9.0625 8L10.5325 9.46937C10.6734 9.61027 10.7526 9.80137 10.7526 10.0006C10.7526 10.1999 10.6734 10.391 10.5325 10.5319C10.3916 10.6728 10.2005 10.7519 10.0013 10.7519C9.80199 10.7519 9.6109 10.6728 9.47 10.5319L8 9.0625L6.53062 10.5325C6.38973 10.6734 6.19863 10.7526 5.99937 10.7526C5.80012 10.7526 5.60902 10.6734 5.46812 10.5325C5.32723 10.3916 5.24807 10.2005 5.24807 10.0013C5.24807 9.80199 5.32723 9.6109 5.46812 9.47L6.9375 8L5.46937 6.53062C5.39961 6.46086 5.34427 6.37804 5.30651 6.28689C5.26876 6.19573 5.24932 6.09804 5.24932 5.99937C5.24932 5.80012 5.32848 5.60902 5.46937 5.46812C5.61027 5.32723 5.80137 5.24807 6.00062 5.24807C6.19988 5.24807 6.39098 5.32723 6.53187 5.46812L8 6.9375L9.46937 5.4675C9.61027 5.3266 9.80137 5.24745 10.0006 5.24745C10.1999 5.24745 10.391 5.3266 10.5319 5.4675C10.6728 5.6084 10.7519 5.79949 10.7519 5.99875C10.7519 6.19801 10.6728 6.3891 10.5319 6.53L10.5306 6.53062ZM14.75 8C14.75 9.33502 14.3541 10.6401 13.6124 11.7501C12.8707 12.8601 11.8165 13.7253 10.5831 14.2362C9.34971 14.7471 7.99251 14.8808 6.68314 14.6203C5.37377 14.3598 4.17103 13.717 3.22703 12.773C2.28302 11.829 1.64015 10.6262 1.3797 9.31686C1.11925 8.00749 1.25292 6.65029 1.76381 5.41689C2.2747 4.18349 3.13987 3.12928 4.2499 2.38758C5.35993 1.64588 6.66498 1.25 8 1.25C9.7896 1.25199 11.5053 1.96378 12.7708 3.22922C14.0362 4.49466 14.748 6.2104 14.75 8ZM13.25 8C13.25 6.96165 12.9421 5.94661 12.3652 5.08326C11.7883 4.2199 10.9684 3.54699 10.0091 3.14963C9.04978 2.75227 7.99418 2.6483 6.97578 2.85088C5.95738 3.05345 5.02191 3.55346 4.28769 4.28769C3.55346 5.02191 3.05345 5.95738 2.85088 6.97578C2.6483 7.99418 2.75227 9.04978 3.14963 10.0091C3.54699 10.9684 4.2199 11.7883 5.08326 12.3652C5.94661 12.9421 6.96165 13.25 8 13.25C9.39193 13.2485 10.7264 12.6949 11.7107 11.7107C12.6949 10.7264 13.2485 9.39193 13.25 8Z", fill: "currentColor" })));
|
|
328
|
+
const CloseIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M18.75 5.25L5.25 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M18.75 18.75L5.25 5.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
329
|
+
const TrashIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M20.25 5.25H3.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M9.75 9.75V15.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M14.25 9.75V15.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M18.75 5.25V19.5C18.75 19.6989 18.671 19.8897 18.5303 20.0303C18.3897 20.171 18.1989 20.25 18 20.25H6C5.80109 20.25 5.61032 20.171 5.46967 20.0303C5.32902 19.8897 5.25 19.6989 5.25 19.5V5.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M15.75 5.25V3.75C15.75 3.35218 15.592 2.97064 15.3107 2.68934C15.0294 2.40804 14.6478 2.25 14.25 2.25H9.75C9.35218 2.25 8.97064 2.40804 8.68934 2.68934C8.40804 2.97064 8.25 3.35218 8.25 3.75V5.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|