@brandsync/wc 1.6.0 → 1.7.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 +1122 -98
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-44bfdd4b.entry.js → p-06e9b45d.entry.js} +1 -1
- package/dist/brandsync-wc/p-0d86c22d.entry.js +1 -0
- package/dist/brandsync-wc/{p-e2ac61c4.entry.js → p-13e4966c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-18c59979.entry.js → p-18021c05.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cfb49342.entry.js → p-1c8160c2.entry.js} +1 -1
- package/dist/brandsync-wc/{p-00f733ef.entry.js → p-21c14465.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6d0c054b.entry.js → p-27100489.entry.js} +1 -1
- package/dist/brandsync-wc/{p-639946e7.entry.js → p-2d6955d6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3ed5b215.entry.js → p-309f920e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fcd4ec60.entry.js → p-30d6a6d0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-57e1dc35.entry.js → p-3eab22a5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-57609703.entry.js → p-4b0938a5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-512dafc6.entry.js → p-5312b6a5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9fb8848c.entry.js → p-538cc08e.entry.js} +1 -1
- package/dist/brandsync-wc/p-55e6438c.entry.js +1 -0
- package/dist/brandsync-wc/{p-a8cdf449.entry.js → p-600b5434.entry.js} +1 -1
- package/dist/brandsync-wc/p-61db6ce2.entry.js +1 -0
- package/dist/brandsync-wc/{p-ef68f29b.entry.js → p-70e035ed.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0aca5f0e.entry.js → p-77433277.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f714683d.entry.js → p-777a9dbf.entry.js} +1 -1
- package/dist/brandsync-wc/p-7ed5670e.entry.js +1 -0
- package/dist/brandsync-wc/{p-e35249c4.entry.js → p-819a3dae.entry.js} +1 -1
- package/dist/brandsync-wc/{p-11224cab.entry.js → p-85c70f6d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-525504c2.entry.js → p-8b2ab522.entry.js} +1 -1
- package/dist/brandsync-wc/{p-abda1d69.entry.js → p-8b57f606.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a603a13a.entry.js → p-9c1be2a0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-604553a0.entry.js → p-a36a0e6a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3cb58df8.entry.js → p-b0634051.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7b9598d9.entry.js → p-b2dc9886.entry.js} +1 -1
- package/dist/brandsync-wc/{p-413a1ee0.entry.js → p-bcee3d60.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a3a4d541.entry.js → p-be14f99f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-52d5f6a9.entry.js → p-c197cc95.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9b72cc12.entry.js → p-c3a28a89.entry.js} +1 -1
- package/dist/brandsync-wc/{p-43617f2e.entry.js → p-d06543a5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c5011746.entry.js → p-d25b7b74.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bb77098b.entry.js → p-e1069ba9.entry.js} +1 -1
- package/dist/brandsync-wc/p-e427bbda.entry.js +1 -0
- package/dist/brandsync-wc/{p-bb68e236.entry.js → p-e61efe4d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6c769a1d.entry.js → p-f14bda01.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c054f493.entry.js → p-f243683f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7609221f.entry.js → p-f518f486.entry.js} +1 -1
- package/dist/brandsync-wc/{p-98021881.entry.js → p-f8f03334.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a8e2a2b2.entry.js → p-fba01c96.entry.js} +1 -1
- package/dist/brandsync-wc/{p-db46376b.entry.js → p-fde5e9f1.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-carousel.cjs.entry.js +196 -0
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-filter.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-informative.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-input.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-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 +1 -1
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-input.cjs.entry.js +2 -2
- package/dist/cjs/bs-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-menu.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +7 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-slider.cjs.entry.js +1 -1
- package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bs-switch.cjs.entry.js +1 -1
- package/dist/cjs/bs-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-tabs.cjs.entry.js +1 -1
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/bs-accordion/bs-accordion.cmp.test.js +5 -0
- 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-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- 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.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.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.js +1 -1
- 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.js +1 -1
- 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.js +2 -2
- 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-input/bs-input.js +2 -2
- package/dist/collection/components/bs-menu/bs-menu.js +1 -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 +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +27 -2
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -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/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-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-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.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-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/p-BxFJ74fI.js +1 -0
- package/dist/components/{p-DKMMCLxx.js → p-DI5GgSqL.js} +1 -1
- package/dist/components/{p-DIezWdNu.js → p-Dqt-Qp4W.js} +1 -1
- package/dist/components/p-Dx8gAOVC.js +1 -0
- package/dist/components/{p-B8eut73c.js → p-LYvoWZt4.js} +1 -1
- package/dist/components/{p-3gs695M6.js → p-v4T0qPVn.js} +1 -1
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-carousel.entry.js +194 -0
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-checkbox.entry.js +1 -1
- package/dist/esm/bs-chip-filter.entry.js +1 -1
- package/dist/esm/bs-chip-informative.entry.js +1 -1
- package/dist/esm/bs-chip-input.entry.js +1 -1
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-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 +1 -1
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/bs-input.entry.js +2 -2
- package/dist/esm/bs-menu-item.entry.js +1 -1
- package/dist/esm/bs-menu.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +1 -1
- package/dist/esm/bs-navigation-header.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +7 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-slider.entry.js +1 -1
- package/dist/esm/bs-snackbar.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-stepper-step.entry.js +1 -1
- package/dist/esm/bs-stepper.entry.js +1 -1
- package/dist/esm/bs-switch.entry.js +1 -1
- package/dist/esm/bs-tab.entry.js +1 -1
- package/dist/esm/bs-tabs.entry.js +1 -1
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/loader.js +1 -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-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-progress-linear/bs-progress-linear.d.ts +5 -0
- package/dist/types/components.d.ts +594 -0
- 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/dist/brandsync-wc/p-6bf8a5bd.entry.js +0 -1
- package/dist/brandsync-wc/p-fe778b6b.entry.js +0 -1
|
@@ -32,7 +32,7 @@ const BsChipInformative = class {
|
|
|
32
32
|
};
|
|
33
33
|
render() {
|
|
34
34
|
const paddingVariant = this.hasIcon ? 'icon' : 'text';
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
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' }))));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
BsChipInformative.style = bsChipInformativeCss();
|
|
@@ -62,7 +62,7 @@ const BsChipInput = class {
|
|
|
62
62
|
};
|
|
63
63
|
render() {
|
|
64
64
|
const paddingVariant = this.hasIcon ? 'icon' : 'text';
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
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' }))));
|
|
66
66
|
}
|
|
67
67
|
static get delegatesFocus() { return true; }
|
|
68
68
|
};
|
|
@@ -42,7 +42,7 @@ const BsComposerStatusBanner = class {
|
|
|
42
42
|
return this.type === 'error' || this.type === 'warning' ? h(WarningIcon, null) : h(ClockIcon, null);
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
|
-
return (h("div", { key: '
|
|
45
|
+
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' })))));
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
const ClockIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-width": "1.3" }), h("path", { d: "M10 5.83V10L12.5 11.67", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -169,7 +169,7 @@ const BsComposer = class {
|
|
|
169
169
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
170
170
|
const disabled = this.state === 'disabled';
|
|
171
171
|
const recording = this.state === 'recording';
|
|
172
|
-
return (h("div", { key: '
|
|
172
|
+
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" }))));
|
|
173
173
|
}
|
|
174
174
|
static get delegatesFocus() { return true; }
|
|
175
175
|
};
|
|
@@ -58,11 +58,11 @@ const BsDataTable = class {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
render() {
|
|
61
|
-
return (h("table", { key: '
|
|
61
|
+
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 => {
|
|
62
62
|
const isSorted = this.sortColumn === column.key;
|
|
63
63
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
64
64
|
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)));
|
|
65
|
-
}))), h("tbody", { key: '
|
|
65
|
+
}))), 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 ? (
|
|
66
66
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
67
67
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
68
68
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-DuyFft7h.js';
|
|
2
|
+
|
|
3
|
+
const bsFileUploadItemCss = () => `:host{display:block;--bs-file-upload-item-bg:var(--bs-surface-base);--bs-file-upload-item-border-color:var(--bs-border-default);--bs-file-upload-item-border-width:var(--bs-border-width-thin);--bs-file-upload-item-radius:var(--bs-border-radius-150);--bs-file-upload-item-padding:var(--bs-spacing-200);--bs-file-upload-item-gap:var(--bs-spacing-150);--bs-file-upload-item-thumbnail-size:80px;--bs-file-upload-item-thumbnail-radius:var(--bs-border-radius-100);--bs-file-upload-item-thumbnail-bg:var(--bs-surface-container);--bs-file-upload-item-thumbnail-icon-color:var(--bs-icon-muted);--bs-file-upload-item-content-gap:var(--bs-spacing-100);--bs-file-upload-item-name-color:var(--bs-text-default);--bs-file-upload-item-size-color:var(--bs-text-default);--bs-file-upload-item-success-color:var(--bs-text-success);--bs-file-upload-item-success-icon-color:var(--bs-icon-success);--bs-file-upload-item-error-color:var(--bs-text-error);--bs-file-upload-item-error-icon-color:var(--bs-icon-error)}.bs-file-upload-item{box-sizing:border-box;display:flex;align-items:flex-start;gap:var(--bs-file-upload-item-gap);padding:var(--bs-file-upload-item-padding);border:var(--bs-file-upload-item-border-width) solid var(--bs-file-upload-item-border-color);border-radius:var(--bs-file-upload-item-radius);background:var(--bs-file-upload-item-bg);font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-file-upload-item__thumbnail{display:flex;flex:none;align-items:center;justify-content:center;width:var(--bs-file-upload-item-thumbnail-size);height:var(--bs-file-upload-item-thumbnail-size);overflow:hidden;border-radius:var(--bs-file-upload-item-thumbnail-radius);background:var(--bs-file-upload-item-thumbnail-bg);color:var(--bs-file-upload-item-thumbnail-icon-color)}.bs-file-upload-item__placeholder{display:block;width:32px;height:32px}.bs-file-upload-item__image{display:block;width:100%;height:100%;object-fit:cover}.bs-file-upload-item__content{display:flex;flex:1;flex-direction:column;justify-content:center;gap:var(--bs-file-upload-item-content-gap);align-self:stretch;min-width:0}.bs-file-upload-item__meta{display:flex;flex-direction:column}.bs-file-upload-item__name{color:var(--bs-file-upload-item-name-color);font-weight:600;overflow-wrap:anywhere}.bs-file-upload-item__size{color:var(--bs-file-upload-item-size-color);font-size:var(--bs-font-size-sm);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-file-upload-item__status{display:flex;align-items:center;gap:var(--bs-spacing-50);min-height:24px}.bs-file-upload-item__status-icon{display:block;flex:none;width:16px;height:16px}.bs-file-upload-item__status--success{color:var(--bs-file-upload-item-success-color)}.bs-file-upload-item__status--success .bs-file-upload-item__status-icon{color:var(--bs-file-upload-item-success-icon-color)}.bs-file-upload-item__status--error{color:var(--bs-file-upload-item-error-color)}.bs-file-upload-item__status--error .bs-file-upload-item__status-icon{color:var(--bs-file-upload-item-error-icon-color)}bs-progress-linear{width:100%}bs-icon-button{flex:none;--bs-icon-neutral-default:var(--bs-icon-default)}@media (forced-colors: active){.bs-file-upload-item{border-color:CanvasText}}`;
|
|
4
|
+
|
|
5
|
+
const BsFileUploadItem = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.bsCancel = createEvent(this, "bsCancel");
|
|
9
|
+
this.bsRemove = createEvent(this, "bsRemove");
|
|
10
|
+
}
|
|
11
|
+
/** Where the upload is. `loading` = working with no known percentage (indeterminate bar);
|
|
12
|
+
* `in-progress` = uploading with a known `progress`; `error` and `success` are final. */
|
|
13
|
+
state = 'loading';
|
|
14
|
+
/** The file name. */
|
|
15
|
+
fileName = '';
|
|
16
|
+
/** The file size, already formatted (e.g. "8MB"). */
|
|
17
|
+
fileSize;
|
|
18
|
+
/** Upload progress, 0-100. Only used when `state="in-progress"`. */
|
|
19
|
+
progress = 0;
|
|
20
|
+
/** The status text. Defaults per state: "Loading..." (`loading`), "{progress}% uploaded"
|
|
21
|
+
* (`in-progress`), "Upload failed" (`error`), "File uploaded successfully" (`success`). Provide
|
|
22
|
+
* your own for localisation or a specific error. */
|
|
23
|
+
message;
|
|
24
|
+
/** A preview image of the file. Shown instead of the placeholder icon when set. */
|
|
25
|
+
thumbnailSrc;
|
|
26
|
+
/** Alt text for `thumbnailSrc`. Leave empty when the file name already says it all. */
|
|
27
|
+
thumbnailAlt = '';
|
|
28
|
+
/** Accessible name of the cancel button (`loading`, `in-progress`, `error`). */
|
|
29
|
+
cancelLabel = 'Cancel upload';
|
|
30
|
+
/** Accessible name of the remove button (`success`). */
|
|
31
|
+
removeLabel = 'Remove file';
|
|
32
|
+
/** Fires when the cancel button is clicked (`loading`, `in-progress`, `error`). The consumer
|
|
33
|
+
* stops the upload and removes the item. */
|
|
34
|
+
bsCancel;
|
|
35
|
+
/** Fires when the remove button is clicked (`success`). The consumer removes the file. */
|
|
36
|
+
bsRemove;
|
|
37
|
+
get clampedProgress() {
|
|
38
|
+
return Math.min(100, Math.max(0, Math.round(Number.isFinite(this.progress) ? this.progress : 0)));
|
|
39
|
+
}
|
|
40
|
+
get statusText() {
|
|
41
|
+
if (this.message)
|
|
42
|
+
return this.message;
|
|
43
|
+
switch (this.state) {
|
|
44
|
+
case 'in-progress':
|
|
45
|
+
return `${this.clampedProgress}% uploaded`;
|
|
46
|
+
case 'error':
|
|
47
|
+
return 'Upload failed';
|
|
48
|
+
case 'success':
|
|
49
|
+
return 'File uploaded successfully';
|
|
50
|
+
case 'loading':
|
|
51
|
+
default:
|
|
52
|
+
return 'Loading...';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
onAction = () => {
|
|
56
|
+
if (this.state === 'success')
|
|
57
|
+
this.bsRemove.emit();
|
|
58
|
+
else
|
|
59
|
+
this.bsCancel.emit();
|
|
60
|
+
};
|
|
61
|
+
renderStatus() {
|
|
62
|
+
const uploading = this.state === 'loading' || this.state === 'in-progress';
|
|
63
|
+
if (uploading) {
|
|
64
|
+
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));
|
|
65
|
+
}
|
|
66
|
+
// Final states are announced once (role="status"); the progress bar above is deliberately not
|
|
67
|
+
// a live region, so frequent percentage updates don't flood a screen reader.
|
|
68
|
+
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)));
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
const removing = this.state === 'success';
|
|
72
|
+
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))));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
// Figma exports, recolored via currentColor so the CSS tokens drive the color.
|
|
76
|
+
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" })));
|
|
77
|
+
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" })));
|
|
78
|
+
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" })));
|
|
79
|
+
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" })));
|
|
80
|
+
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" })));
|
|
81
|
+
BsFileUploadItem.style = bsFileUploadItemCss();
|
|
82
|
+
|
|
83
|
+
export { BsFileUploadItem as bs_file_upload_item };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-DuyFft7h.js';
|
|
2
|
+
|
|
3
|
+
const bsFileUploadCss = () => `:host{display:block;--bs-file-upload-bg:var(--bs-surface-raised);--bs-file-upload-bg-dragging:var(--bs-surface-container);--bs-file-upload-border-color:var(--bs-border-neutral-container);--bs-file-upload-border-color-dragging:var(--bs-border-neutral-container-pressed);--bs-file-upload-border-width:var(--bs-border-width-medium);--bs-file-upload-radius:var(--bs-border-radius-150);--bs-file-upload-padding:var(--bs-spacing-300);--bs-file-upload-gap:var(--bs-spacing-300);--bs-file-upload-icon-size:102px;--bs-file-upload-icon-bg:var(--bs-surface-hover);--bs-file-upload-icon-bg-dragging:var(--bs-surface-raised);--bs-file-upload-icon-color:var(--bs-icon-default);--bs-file-upload-content-gap:var(--bs-spacing-100);--bs-file-upload-text-gap:var(--bs-spacing-25);--bs-file-upload-heading-color:var(--bs-text-default);--bs-file-upload-description-color:var(--bs-text-secondary);--bs-file-upload-font-size:var(--bs-font-size-md);--bs-file-upload-line-height:var(--bs-line-height-body-md)}.bs-file-upload{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:var(--bs-file-upload-gap);padding:var(--bs-file-upload-padding);border:var(--bs-file-upload-border-width) dashed var(--bs-file-upload-border-color);border-radius:var(--bs-file-upload-radius);background:var(--bs-file-upload-bg);font-size:var(--bs-file-upload-font-size);line-height:calc(var(--bs-file-upload-line-height) * 1px)}.bs-file-upload--horizontal{flex-direction:row;justify-content:flex-start}.bs-file-upload--vertical{flex-direction:column;text-align:center}.bs-file-upload--dragging{background:var(--bs-file-upload-bg-dragging);border-color:var(--bs-file-upload-border-color-dragging)}.bs-file-upload__icon{display:flex;flex:none;align-items:center;justify-content:center;width:var(--bs-file-upload-icon-size);height:var(--bs-file-upload-icon-size);border-radius:var(--bs-border-radius-full);background:var(--bs-file-upload-icon-bg);color:var(--bs-file-upload-icon-color)}.bs-file-upload--dragging .bs-file-upload__icon{background:var(--bs-file-upload-icon-bg-dragging)}.bs-file-upload__icon-svg,.bs-file-upload__icon ::slotted(*){display:block;width:32px;height:32px}.bs-file-upload__content{display:flex;flex-direction:column;gap:var(--bs-file-upload-content-gap);min-width:0}.bs-file-upload--horizontal .bs-file-upload__content{align-items:flex-start}.bs-file-upload--vertical .bs-file-upload__content{align-items:center}.bs-file-upload__text{display:flex;flex-direction:column;gap:var(--bs-file-upload-text-gap)}.bs-file-upload__heading{color:var(--bs-file-upload-heading-color);font-weight:600}.bs-file-upload__description{color:var(--bs-file-upload-description-color)}.bs-file-upload--disabled{cursor:not-allowed}@media (forced-colors: active){.bs-file-upload{border-color:CanvasText}.bs-file-upload--dragging{border-color:Highlight}}`;
|
|
4
|
+
|
|
5
|
+
const BsFileUpload = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.bsFilesSelect = createEvent(this, "bsFilesSelect");
|
|
9
|
+
this.bsFilesReject = createEvent(this, "bsFilesReject");
|
|
10
|
+
}
|
|
11
|
+
get el() { return getElement(this); }
|
|
12
|
+
inputEl;
|
|
13
|
+
/** Layout: icon beside the text (`horizontal`) or stacked above it, centered (`vertical`). */
|
|
14
|
+
direction = 'horizontal';
|
|
15
|
+
/** Heading text (e.g. "Upload your documents"). */
|
|
16
|
+
heading;
|
|
17
|
+
/** Guidelines under the heading (e.g. "PDF or JPG, up to 8MB"). */
|
|
18
|
+
description;
|
|
19
|
+
/** Label of the browse button. Override for localisation. */
|
|
20
|
+
buttonLabel = 'Browse file';
|
|
21
|
+
/** Which files are accepted, same syntax as the native `accept` attribute: comma-separated
|
|
22
|
+
* extensions (`.pdf`), MIME types (`image/png`) or wildcards (`image/*`). Applied to the picker
|
|
23
|
+
* and also to dropped files, which the browser does not filter. */
|
|
24
|
+
accept;
|
|
25
|
+
/** Allows selecting/dropping more than one file. Without it only the first file is taken. */
|
|
26
|
+
multiple = false;
|
|
27
|
+
/** Disables the browse button and ignores drops. */
|
|
28
|
+
disabled = false;
|
|
29
|
+
/** Whether a file is currently being dragged over the dropzone (the Figma "Drop" state). Set by
|
|
30
|
+
* the component during a drag; mutable and reflected so it can also be set to show the state
|
|
31
|
+
* statically. */
|
|
32
|
+
dragging = false;
|
|
33
|
+
/** Fires with the accepted files, after the picker closes or files are dropped. */
|
|
34
|
+
bsFilesSelect;
|
|
35
|
+
/** Fires with files that were not taken: they didn't match `accept`, or were extra files
|
|
36
|
+
* dropped while `multiple` is off. */
|
|
37
|
+
bsFilesReject;
|
|
38
|
+
matchesAccept(file) {
|
|
39
|
+
const tokens = (this.accept ?? '')
|
|
40
|
+
.split(',')
|
|
41
|
+
.map(t => t.trim().toLowerCase())
|
|
42
|
+
.filter(Boolean);
|
|
43
|
+
if (tokens.length === 0)
|
|
44
|
+
return true;
|
|
45
|
+
const name = file.name.toLowerCase();
|
|
46
|
+
const type = (file.type || '').toLowerCase();
|
|
47
|
+
return tokens.some(token => {
|
|
48
|
+
if (token.startsWith('.'))
|
|
49
|
+
return name.endsWith(token);
|
|
50
|
+
if (token.endsWith('/*'))
|
|
51
|
+
return type.startsWith(token.slice(0, -1));
|
|
52
|
+
return type === token;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
handleFiles(files) {
|
|
56
|
+
const matching = files.filter(f => this.matchesAccept(f));
|
|
57
|
+
const rejected = files.filter(f => !this.matchesAccept(f));
|
|
58
|
+
const accepted = this.multiple ? matching : matching.slice(0, 1);
|
|
59
|
+
if (!this.multiple)
|
|
60
|
+
rejected.push(...matching.slice(1));
|
|
61
|
+
if (accepted.length)
|
|
62
|
+
this.bsFilesSelect.emit(accepted);
|
|
63
|
+
if (rejected.length)
|
|
64
|
+
this.bsFilesReject.emit(rejected);
|
|
65
|
+
}
|
|
66
|
+
onBrowse = () => {
|
|
67
|
+
if (!this.disabled)
|
|
68
|
+
this.inputEl?.click();
|
|
69
|
+
};
|
|
70
|
+
onInputChange = () => {
|
|
71
|
+
const files = Array.from(this.inputEl?.files ?? []);
|
|
72
|
+
// Reset so choosing the same file again still fires `change`.
|
|
73
|
+
if (this.inputEl)
|
|
74
|
+
this.inputEl.value = '';
|
|
75
|
+
if (files.length)
|
|
76
|
+
this.handleFiles(files);
|
|
77
|
+
};
|
|
78
|
+
onDragOver = (ev) => {
|
|
79
|
+
if (this.disabled)
|
|
80
|
+
return;
|
|
81
|
+
ev.preventDefault();
|
|
82
|
+
this.dragging = true;
|
|
83
|
+
};
|
|
84
|
+
onDragLeave = (ev) => {
|
|
85
|
+
// dragleave also fires when crossing between child elements; only clear when leaving the zone.
|
|
86
|
+
const next = ev.relatedTarget;
|
|
87
|
+
if (next && ev.currentTarget.contains(next))
|
|
88
|
+
return;
|
|
89
|
+
this.dragging = false;
|
|
90
|
+
};
|
|
91
|
+
onDrop = (ev) => {
|
|
92
|
+
if (this.disabled)
|
|
93
|
+
return;
|
|
94
|
+
ev.preventDefault();
|
|
95
|
+
this.dragging = false;
|
|
96
|
+
const files = Array.from(ev.dataTransfer?.files ?? []);
|
|
97
|
+
if (files.length)
|
|
98
|
+
this.handleFiles(files);
|
|
99
|
+
};
|
|
100
|
+
render() {
|
|
101
|
+
return (h("div", { key: 'baa70a704a4c3508cd3186f567d0887218a9c04d', part: "dropzone", class: `bs-file-upload bs-file-upload--${this.direction} ${this.dragging ? 'bs-file-upload--dragging' : ''} ${this.disabled ? 'bs-file-upload--disabled' : ''}`, onDragEnter: this.onDragOver, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, h("div", { key: 'c5fe3207ba56506a272c42097ec23881bcf863d4', part: "icon", class: "bs-file-upload__icon" }, h("slot", { key: 'd33d8f0f7b17bab679124823c61a1b7c6d031345', name: "icon" }, h(UploadIcon, { key: 'd0356e97a031867f323de21905a2bbca57963962' }))), h("div", { key: 'a5f4fb403556b2b596291bfddad2b73b1765f91f', class: "bs-file-upload__content" }, h("div", { key: 'b99afac250a8d40e54c97f74afde42620da2ff07', class: "bs-file-upload__text" }, this.heading && (h("span", { key: '33a2ce5aac1d8bf15c55dcf8ccfe4fbce6892fd1', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (h("span", { key: 'eec7f2fcc598412107e7b9c78efae30a3714c674', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), h("bs-button", { key: 'f44a5747bb0e9452aefa1fe2fc1d51b1af7da9b1', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), h("input", { key: 'c8e19f95978d103f535bf26fb64c34ff69c4c7ee', ref: el => (this.inputEl = el), class: "bs-file-upload__input", type: "file", hidden: true, tabindex: -1, accept: this.accept, multiple: this.multiple, disabled: this.disabled, "aria-describedby": this.description ? 'description' : undefined, onChange: this.onInputChange })));
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
// Figma's "UploadSimple" icon (3272:50330), exported SVG, recolored via currentColor.
|
|
105
|
+
const UploadIcon = () => (h("svg", { class: "bs-file-upload__icon-svg", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M16 18V4", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M27 18V26H5V18", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M11 9L16 4L21 9", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
106
|
+
BsFileUpload.style = bsFileUploadCss();
|
|
107
|
+
|
|
108
|
+
export { BsFileUpload as bs_file_upload };
|
|
@@ -29,7 +29,7 @@ const BsIconButton = class {
|
|
|
29
29
|
*/
|
|
30
30
|
ariaLabel = null;
|
|
31
31
|
render() {
|
|
32
|
-
return (h("button", { key: '
|
|
32
|
+
return (h("button", { key: '0721387caf111462e6ae846647ba1c48363158aa', class: `bs-icon-button bs-icon-button--${this.variant} bs-icon-button--${this.size}`, type: this.type, disabled: this.disabled, "aria-label": this.ariaLabel }, h("span", { key: '8c69f815b6ca603cfcfab34e3530f4c783da0ee7', part: "icon", class: "bs-icon-button__icon" }, h("slot", { key: '8533f8ecfae182d6bd7d7e0dd6af328015948864' }))));
|
|
33
33
|
}
|
|
34
34
|
static get delegatesFocus() { return true; }
|
|
35
35
|
};
|
|
@@ -59,7 +59,7 @@ const BsInlineTab = class {
|
|
|
59
59
|
};
|
|
60
60
|
render() {
|
|
61
61
|
const iconOnly = this.hasIcon && !this.hasLabel;
|
|
62
|
-
return (h("button", { key: '
|
|
62
|
+
return (h("button", { key: '5fafbb8734ddd3d5b155ebdaac9c3aa5ecae6309', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, onClick: this.onClick }, h("span", { key: '26381015d527bbb2d7b598e117dd61512b5acdac', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: '9902a6a2263b7bac63063817859924decd8b3518', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '1982f864c34bb1869085c46237eb1620da47449d', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: '5029733093fd8dd68565af803bb74444e5470eef', onSlotchange: this.onLabelSlotchange }))));
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
BsInlineTab.style = bsInlineTabCss();
|
|
@@ -306,10 +306,10 @@ const BsInput = class {
|
|
|
306
306
|
return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, Array.from({ length: this.length }).map((_, i) => (h("input", { id: i === 0 ? 'control' : undefined, ref: el => (this.pinInputs[i] = el), part: "control", class: "bs-input__pin-cell", type: "text", inputMode: "numeric", maxLength: 1, value: this.value[i] ?? '', disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onPinInput(i), onKeyDown: this.onPinKeydown(i) })))));
|
|
307
307
|
}
|
|
308
308
|
render() {
|
|
309
|
-
return (h("div", { key: '
|
|
309
|
+
return (h("div", { key: 'd65ab3191cd18c77385ffbb8b827e6161dafceaf', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
310
310
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
311
311
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
312
|
-
h("label", { key: '
|
|
312
|
+
h("label", { key: '762c10bb8afcd1f0609ba75b0d6d8162c483b5b5', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '9a74743816c07b81b4db39616cee80ef69d60ca1', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
|
|
313
313
|
}
|
|
314
314
|
static get delegatesFocus() { return true; }
|
|
315
315
|
};
|
|
@@ -24,7 +24,7 @@ const BsMenuItem = class {
|
|
|
24
24
|
this.bsSelect.emit();
|
|
25
25
|
};
|
|
26
26
|
render() {
|
|
27
|
-
return (h("button", { key: '
|
|
27
|
+
return (h("button", { key: '02e1255e64ab0bd0b283927f1321fb5e660c78b6', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, h("span", { key: 'fb36594dd48bd601a26d9debda9fb1c9bde37f88', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '19049f5f1f79e6136cd9cc8bcb3669ff97d79c18', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '6ac351a3d3a07bea5bbb5f69bd58c1a7189283fe', part: "label", class: "bs-menu-item__label" }, h("slot", { key: '04215578eb545d824c090cb72f1e493474dca409' }))));
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
BsMenuItem.style = bsMenuItemCss();
|
|
@@ -7,7 +7,7 @@ const BsMenu = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h("div", { key: '
|
|
10
|
+
return (h("div", { key: '6d24ccbadf6c68bba52b6737e91c4d131fbce331', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: '94cc6884049a7836b3438a2fc112f0a2c7a1473a' })));
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
BsMenu.style = bsMenuCss();
|
|
@@ -91,7 +91,7 @@ const BsNavigationDrawerItem = class {
|
|
|
91
91
|
// incorrectly also toggle this parent row on every child click. Both are wrapped in a
|
|
92
92
|
// `display: contents` container so render() still returns a single root node (this codebase's
|
|
93
93
|
// convention, e.g. bs-input.tsx) without that wrapper affecting layout at all.
|
|
94
|
-
return (h("div", { key: '
|
|
94
|
+
return (h("div", { key: 'bb51c715175ff08caa34b5c2e3c5f7fecdd92059', class: "bs-navigation-drawer-item__root" }, h("button", { key: '799bb1bd74e830e8630c5a8bebe91ffa8e988c07', type: "button", part: "item", class: rowClasses, "aria-expanded": this.expandable ? String(this.expanded) : undefined, "aria-label": this.ariaLabel ?? undefined, onClick: this.onClick }, !this.nested && (h("span", { key: '78cf9b9281f94d44928b8f7e93de4ed327ca2e6e', part: "icon", class: `bs-navigation-drawer-item__icon ${this.hasIcon ? 'bs-navigation-drawer-item__icon--has-content' : ''}` }, h("slot", { key: '94b6037e69f7f1aa77a5abf3c726ae1f02eb55e0', name: "icon", onSlotchange: this.onIconSlotchange }))), h("span", { key: 'f7b355c4ef9b4a1d115083fbcb19003aee1a56a4', part: "label", class: "bs-navigation-drawer-item__label" }, h("slot", { key: '68ad8fb87791f5533a13eafa1348990f0acff6d4' })), this.expandable && (h("span", { key: 'd0f2ef997e4ee619013d63a0793008bb797b2776', part: "chevron", class: `bs-navigation-drawer-item__chevron ${this.expanded ? 'bs-navigation-drawer-item__chevron--expanded' : ''}` }, h(ChevronDownIcon, { key: '20286773f2ec74c370335bdcb30b36cd868c3a58' })))), this.expandable && (h("span", { key: 'e9b7a658742af43fcc570c33e82f28bbb87b5a05', part: "children", class: "bs-navigation-drawer-item__children" }, h("slot", { key: '172adb88df778a8411cbe3de3250af1917564b5d', name: "children" })))));
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
// 16x16 native viewBox (not a 24x24 icon scaled down) -- authored directly at display size, per
|
|
@@ -69,7 +69,7 @@ const BsNavigationDrawer = class {
|
|
|
69
69
|
this.bsSearchClick.emit();
|
|
70
70
|
};
|
|
71
71
|
render() {
|
|
72
|
-
return (h("nav", { key: '
|
|
72
|
+
return (h("nav", { key: '4f39df22dc1027094a67c3d331021a90c471bef6', class: "bs-navigation-drawer", "aria-label": this.heading }, this.showLogo && (h("div", { key: '68101afc424bba6fd56d6b155d8130b77fcb42a9', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, h("bs-logo", { key: '7ec295e0411d6fe6ed33ea67e632fcda72a49611', variant: "full", background: this.logoBackground }))), this.showLogo && (h("div", { key: 'ee9db23aeb0c7ad6297bed6a4baa17dbe4b2f6d4', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, h("bs-logo", { key: 'e69f31b910c3302d2c5851ae9bfdbfec1999fd4e', variant: "mark", background: this.logoBackground }))), h("div", { key: '8d69e56009e183c1745ddafebc75417ce6ea5bdc', class: "bs-navigation-drawer__title-row" }, h("span", { key: '434dd310adc86473876e125fab81f97b0beb5c4b', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (h("button", { key: '27508cb2c5f417d450b1a059b8e07d47396d3e69', type: "button", part: "collapse", class: "bs-navigation-drawer__collapse", "aria-label": this.collapsed ? 'Expand' : 'Collapse', "aria-pressed": this.collapsed ? 'true' : 'false', onClick: this.onCollapseClick }, h(CaretLeftIcon, { key: '96ee586ecd6edc378a95a0afcc114919230a52af' })))), h("div", { key: '3b20ffc4e837b7a2e7229ba575b429e54fc9f3ac', part: "search", class: "bs-navigation-drawer__search" }, h("slot", { key: 'f62aae2397c1eada4c0d52fd6d4cba778f475a58', name: "search" })), h("button", { key: 'a00b4871692f612c62d5e1b6de9511ca7ce7ebe3', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, h(SearchIcon, { key: '8402ace02e086a862bcc3bc92beb324940f7fda0' })), h("div", { key: '3ac74499c23530d89061d04fa23c4fd6a7e8c7b4', part: "items", class: "bs-navigation-drawer__items" }, h("slot", { key: '89baa650f1449c813f7a1e9f29f6525dcf6e2699' }))));
|
|
73
73
|
}
|
|
74
74
|
static get watchers() { return {
|
|
75
75
|
"collapsed": [{
|
|
@@ -34,7 +34,7 @@ const BsNavigationHeader = class {
|
|
|
34
34
|
render() {
|
|
35
35
|
const showLogo = this.alignment !== 'with-navigation-drawer';
|
|
36
36
|
const rootClasses = `bs-navigation-header bs-navigation-header--${this.alignment}`;
|
|
37
|
-
return (h("header", { key: '
|
|
37
|
+
return (h("header", { key: '0dc99abb8f2db96f0befe1b838a2db037636a75c', class: rootClasses, "aria-label": this.ariaLabel ?? undefined }, this.skipToContentHref && (h("a", { key: '1f906366d5398aa62d2485afdb1c9cf350354f05', part: "skip-link", class: "bs-navigation-header__skip-link", href: this.skipToContentHref }, this.skipToContentLabel)), showLogo && (h("bs-logo", { key: 'c735b4647acc92ff5b6725dc72bfbab421230a9c', part: "logo", class: "bs-navigation-header__logo", variant: "full", background: this.logoBackground })), h("div", { key: '845c1d60319daf2aa7aa57f0f8ba71e0f633598e', part: "left", class: "bs-navigation-header__left" }, h("slot", { key: '67436745b63a843e86a79163f927f2b563b6e2e4', name: "left" })), h("div", { key: '4c6d514d7cf238b5be8476f9fede7292b1dc1c10', part: "right", class: "bs-navigation-header__right" }, h("slot", { key: 'a6c12231c6cc728314fdfc076a48fd1ce0f79ede', name: "right" }))));
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
BsNavigationHeader.style = bsNavigationHeaderCss();
|
|
@@ -68,7 +68,7 @@ const BsPagination = class {
|
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
70
|
const pageList = this.getPageList();
|
|
71
|
-
return (h("nav", { key: '
|
|
71
|
+
return (h("nav", { key: 'f5f1e20a72ffc81ca14b05ad735e3ca714069ed3', "aria-label": "Pagination" }, h("ul", { key: '416ef86fe6aca589869e529d1248cbca7ad254ac', part: "list", class: "bs-pagination__list" }, h("li", { key: 'c550eada1eb765db7734e0971f4a2222ad1488e8', part: "item", class: "bs-pagination__item" }, h("button", { key: '8a88280dc813abe71ba3315048ca8931ef2b20cf', part: "prev", type: "button", class: "bs-pagination__control", "aria-label": this.previousLabel, disabled: this.currentPage <= 1, onClick: () => this.goToPage(this.currentPage - 1) }, h(ChevronLeftIcon, { key: 'ea30181c70ff4c7c39852cb978b4cc9307bfa736' }))), pageList.map((item, index) => item === 'ellipsis' ? (h("li", { part: "item", class: "bs-pagination__item", key: `ellipsis-${index}` }, h("span", { part: "ellipsis", class: "bs-pagination__ellipsis", "aria-hidden": "true" }, h(EllipsisIcon, null)))) : (h("li", { part: "item", class: "bs-pagination__item", key: item }, h("button", { part: item === this.currentPage ? 'page current' : 'page', type: "button", class: `bs-pagination__control bs-pagination__page ${item === this.currentPage ? 'bs-pagination__page--current' : ''}`, "aria-label": `Go to page ${item}`, "aria-current": item === this.currentPage ? 'page' : undefined, onClick: () => this.goToPage(item) }, item)))), h("li", { key: '1c587333c1795e4b189c793b442c03e75937ab11', part: "item", class: "bs-pagination__item" }, h("button", { key: '707144112eb882431b9d6ad43f7557be32d08e78', part: "next", type: "button", class: "bs-pagination__control", "aria-label": this.nextLabel, disabled: this.currentPage >= this.safeTotalPages, onClick: () => this.goToPage(this.currentPage + 1) }, h(ChevronRightIcon, { key: '5c94c76cbda7938da625f326ea2ef7ddadce3929' }))))));
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
function range(start, end) {
|
|
@@ -22,19 +22,24 @@ const BsProgressLinear = class {
|
|
|
22
22
|
/** Shows the slotted label below the bar. When `false`, or when no content is slotted, the
|
|
23
23
|
* label wrapper isn't rendered at all. Defaults to `true`. */
|
|
24
24
|
showLabel = true;
|
|
25
|
+
/** Accessible name for the progress bar (e.g. "Uploading report"). Required for assistive tech --
|
|
26
|
+
* a `role="progressbar"` with no name is an axe-core `aria-progressbar-name` violation. Setting
|
|
27
|
+
* `aria-label` on the host doesn't reach the inner element across the shadow boundary, so this
|
|
28
|
+
* prop binds it directly -- same pattern as `bs-button`'s `ariaLabel`. */
|
|
29
|
+
ariaLabel = null;
|
|
25
30
|
get clampedValue() {
|
|
26
31
|
return Math.min(100, Math.max(0, this.value));
|
|
27
32
|
}
|
|
28
33
|
render() {
|
|
29
34
|
const isDeterminate = this.type === 'determinate';
|
|
30
35
|
const value = this.clampedValue;
|
|
31
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: '279dbb0cd17b9584b500570d58cc09bd91e8a0d7', part: "container", class: "bs-progress-linear" }, h("div", { key: '9299c229184d172f743fb7fb0dce2a9c55a4496f', part: "track", class: `bs-progress-linear__track bs-progress-linear__track--${this.size}`, role: "progressbar", "aria-label": this.ariaLabel, "aria-valuemin": isDeterminate ? '0' : undefined, "aria-valuemax": isDeterminate ? '100' : undefined, "aria-valuenow": isDeterminate ? String(value) : undefined, "aria-busy": isDeterminate ? undefined : 'true' }, isDeterminate ? (h("div", { part: "fill", class: "bs-progress-linear__fill", style: { width: `${value}%` } })) : (
|
|
32
37
|
// Figma's indeterminate bar is a soft "comet" gradient segment (transparent -> blue ->
|
|
33
38
|
// transparent) sliding left-to-right across the track's full width in a loop -- the
|
|
34
39
|
// same fade concept as bs-progress's indeterminate ring's conic-gradient comet tail,
|
|
35
40
|
// but along a straight line via a linear-gradient + `transform: translateX(...)`
|
|
36
41
|
// keyframe animation instead of a rotating conic-gradient.
|
|
37
|
-
h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (h("span", { key: '
|
|
42
|
+
h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (h("span", { key: '51a75cae90630fec1d8757d483c239a534385aa7', part: "label", class: "bs-progress-linear__label" }, h("slot", { key: '7e6639ff4f7219cbb3fa09d7c7570268534530b4' })))));
|
|
38
43
|
}
|
|
39
44
|
// The default slot's assigned content lives in the host's light DOM regardless of whether a
|
|
40
45
|
// <slot> is currently rendered in the shadow tree, so this can be computed directly from the
|
|
@@ -50,7 +50,7 @@ const BsProgress = class {
|
|
|
50
50
|
const isDeterminate = this.type === 'determinate';
|
|
51
51
|
const value = this.clampedValue;
|
|
52
52
|
const dashOffset = circumference * (1 - value / 100);
|
|
53
|
-
return (h("div", { key: '
|
|
53
|
+
return (h("div", { key: '0534b118c5954b821dc3e9f1bb0b4a0ac746633a', part: "container", class: "bs-progress" }, h("div", { key: 'fd20dfde6fe2de74c0622589294a066f526fe213', class: "bs-progress__box", style: { width: `${diameter}px`, height: `${diameter}px` }, role: "progressbar", "aria-valuemin": isDeterminate ? '0' : undefined, "aria-valuemax": isDeterminate ? '100' : undefined, "aria-valuenow": isDeterminate ? String(value) : undefined, "aria-busy": isDeterminate ? undefined : 'true' }, isDeterminate ? (h("svg", { class: "bs-progress__ring", width: diameter, height: diameter, viewBox: `0 0 ${diameter} ${diameter}` }, h("circle", { part: "track", class: "bs-progress__track", cx: diameter / 2, cy: diameter / 2, r: radius, "stroke-width": this.strokeWidth, fill: "none" }), h("circle", { part: "arc", class: "bs-progress__arc", cx: diameter / 2, cy: diameter / 2, r: radius, "stroke-width": this.strokeWidth, fill: "none", "stroke-linecap": "round", "stroke-dasharray": circumference, "stroke-dashoffset": dashOffset }))) : (
|
|
54
54
|
// Figma's indeterminate ring is a fading "comet tail" (transparent -> solid color),
|
|
55
55
|
// not a flat-colored partial arc -- SVG has no angular/conic gradient primitive, so a
|
|
56
56
|
// CSS conic-gradient (color varying by angle) + a radial-gradient mask (carving the
|
|
@@ -59,7 +59,7 @@ const BsProgress = class {
|
|
|
59
59
|
h("div", { part: "arc", class: "bs-progress__spinner", style: {
|
|
60
60
|
'--bs-progress-spinner-stroke-width': `${this.strokeWidth}px`,
|
|
61
61
|
'--bs-progress-spinner-sweep': `${INDETERMINATE_SWEEP_DEGREES}deg`,
|
|
62
|
-
} }))), isDeterminate && this.showLabel && (h("span", { key: '
|
|
62
|
+
} }))), isDeterminate && this.showLabel && (h("span", { key: '20b74322a926ff40188de525103f91992d9bc508', part: "label", class: `bs-progress__label bs-progress__label--${this.size}` }, value, "%"))));
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
BsProgress.style = bsProgressCss();
|
|
@@ -38,7 +38,7 @@ const BsRadio = class {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
render() {
|
|
41
|
-
return (h("label", { key: '
|
|
41
|
+
return (h("label", { key: '9aed6afb95bd1875b02e96aa17ff9419f15f52df', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: 'dd8976d2e0c907d2dc2af45540d3c10abca9abb1', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("span", { key: 'dd68936424c34d8395b1b3540e875a0efb154365', class: "bs-radio__hit-area" }, h("span", { key: 'a5d17ebb7a01851ce3cd0a2acc3c16be911ffc53', class: "bs-radio__state-layer" }, h("span", { key: '46ed4553f672712b4c2fc26b8e229a93bb4ad575', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: '18d9f81c031ff77ee4361a0ce8c73665bd6c1b75', part: "dot", class: "bs-radio__dot" })))), h("span", { key: 'a48cfc6d0689e523ab70450853b9fb2450c172e9', part: "label", class: "bs-radio__label" }, h("slot", { key: '7b1a801812fe510eb392c7266e8253bc9408c3db' }))));
|
|
42
42
|
}
|
|
43
43
|
static get delegatesFocus() { return true; }
|
|
44
44
|
};
|
|
@@ -180,7 +180,7 @@ const BsSlider = class {
|
|
|
180
180
|
render() {
|
|
181
181
|
const isRange = this.type === 'range';
|
|
182
182
|
const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
|
|
183
|
-
return (h("div", { key: '
|
|
183
|
+
return (h("div", { key: '602cadcb8377457bc5911161b238c612545592b4', class: rootClasses }, this.showLabel && (h("div", { key: '02b4d3d785665b4563dd04708a5926e116c8f5d7', class: "bs-slider__header" }, h("span", { key: '6a1ddf9c9a50b823231c779610fcbd2cef944701', id: "bs-slider-label", part: "label", class: "bs-slider__label" }, this.label), isRange ? (h("span", { class: "bs-slider__value-fields" }, this.renderPercentField(this.percent(this.effectiveValueStart), this.onStartPercentFieldChange, this.ariaLabel ?? 'Start value'), h("span", { class: "bs-slider__separator" }, "\u2013"), this.renderPercentField(this.percent(this.effectiveValueEnd), this.onEndPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} end` : 'End value'))) : (this.renderPercentField(this.percent(this.value), this.onPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} value` : 'Value')))), h("div", { key: '841a41446845737e38d88ca122ec5c626da5ba53', class: "bs-slider__row" }, this.showLabel && (h("span", { key: 'a978c0bf50a02ae281925ecd2a21d4aec6458be8', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (h("span", { key: 'beb8e6ffb9113c9e6d1185f67db27fd77e6eec4c', part: "bound", class: "bs-slider__bound" }, this.max)))));
|
|
184
184
|
}
|
|
185
185
|
static get delegatesFocus() { return true; }
|
|
186
186
|
};
|
|
@@ -39,7 +39,7 @@ const BsSnackbar = class {
|
|
|
39
39
|
this.bsDismiss.emit();
|
|
40
40
|
};
|
|
41
41
|
render() {
|
|
42
|
-
return (h("div", { key: '
|
|
42
|
+
return (h("div", { key: 'c84de130f993938339fd16d9f534f1da18fe6c0a', part: "container", class: `bs-snackbar bs-snackbar--${this.variant}`, role: "status", "aria-live": this.variant === 'error' ? 'assertive' : 'polite' }, h("div", { key: '0941f900229f6b3208f8268d34b0cde49e4dba22', class: "bs-snackbar__content" }, h("span", { key: 'cf89eff5ea640950573f9b610d6eff46e5d0154e', part: "icon", class: "bs-snackbar__icon", "aria-hidden": "true" }, this.loading ? h("span", { class: "bs-snackbar__spinner" }) : h(CheckCircleIcon, null)), h("span", { key: 'd4ae7e62ecaea7b53962b08d69bae435ecf0a810', part: "message", class: "bs-snackbar__message" }, h("slot", { key: 'a99ec601f27f79f42fc61cd14c0fed742d2fa334' }))), h("div", { key: 'a139c0287e2eacb26ccbd604ff0343bca23eeb5d', class: "bs-snackbar__actions" }, this.actionLabel && (h("bs-button", { key: 'f22c4a63903fdb50da087ab2c38dd076298a12ed', part: "action", variant: ACTION_VARIANT[this.variant], size: "sm", onClick: this.onAction }, this.actionLabel)), h("bs-icon-button", { key: '4cd5c8f367ee71f11dad1f6f47ff1cdf6436a764', part: "close", variant: "subtle", size: "md", ariaLabel: "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: 'a52e6af7acf7c95a54aa6cb5237f2b53e30ea601' })))));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
const CheckCircleIcon = () => (h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M8.25 12.75L10.5 15L15.75 9.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -24,8 +24,8 @@ const BsSourceLink = class {
|
|
|
24
24
|
};
|
|
25
25
|
render() {
|
|
26
26
|
const inner = [
|
|
27
|
-
h("span", { key: '
|
|
28
|
-
h("span", { key: '
|
|
27
|
+
h("span", { key: '5c6382ad80cc971f302da1d80af089306a612e73', class: "bs-source-link__left" }, h("span", { key: '07c8591469e23fe4304846e9282cea0a9eae3ba2', class: "bs-source-link__filename-row" }, h("span", { key: 'ffdb99816134be212cc4d30ebdbf8dd8bcdc085f', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: '475cd85bcb5caa1d3a82d08318731ef4bdf6cb60', name: "icon" }, h(FileTextIcon, { key: '6915810a89f15b823b2b744d30db5b2cefff8162' }))), h("p", { key: '14facc92c71f91701654ea2ce2f9f2ef4b980c5e', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'ecd7080f8bc8ce5d7e169f917aaae275ac7a474e', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: 'f1697d3e278225b26909ec1c40ce2c4cb51c884b', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '8efe25341dc7c68ec9c66b91f5f399c9b8ed659f', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: 'cddd46792f911af65434554e56d1cb72d2b88cae', part: "version", class: "bs-source-link__version" }, this.version)))),
|
|
28
|
+
h("span", { key: '166b5070329771cd7e8f20689e5b257d3f6f1fd0', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: 'c2a820c6b36ead5f1bbfd74d84c70cb9894c8f1f' })),
|
|
29
29
|
];
|
|
30
30
|
return this.href ? (h("a", { class: "bs-source-link", href: this.href, target: this.target, rel: "noopener noreferrer", onClick: this.onClick }, inner)) : (h("button", { type: "button", class: "bs-source-link", onClick: this.onClick }, inner));
|
|
31
31
|
}
|