@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
|
@@ -64,7 +64,7 @@ const BsChipInput = class {
|
|
|
64
64
|
};
|
|
65
65
|
render() {
|
|
66
66
|
const paddingVariant = this.hasIcon ? 'icon' : 'text';
|
|
67
|
-
return (index.h(index.Host, { key: '
|
|
67
|
+
return (index.h(index.Host, { key: 'bb8adc7ac62df562155d169a119d0bf3100f4c9f', class: `bs-chip-input bs-chip-input--${this.size} bs-chip-input--${paddingVariant}` }, index.h("button", { key: '92a509d98f93873738bed6db0fe0d5dc5bb9a7e4', type: "button", part: "body", class: "bs-chip-input__body", disabled: this.disabled, "aria-pressed": String(this.selected), onClick: this.onBodyClick }, index.h("span", { key: '179d8713dd8be5a8340848eddb1de24ce7561d09', part: "icon", class: `bs-chip-input__icon ${this.hasIcon ? 'bs-chip-input__icon--visible' : ''}` }, index.h("slot", { key: '0b47b10606ef75c91b5374dc0032772993419ede', name: "icon", onSlotchange: this.onIconSlotchange })), index.h("span", { key: 'c2b678ecd9863d53c5ab52bd257122f298aafa62', part: "label", class: "bs-chip-input__label" }, index.h("slot", { key: '806fb8ea8e284a80d5faeef4905d1758c66f3ef0', onSlotchange: this.onLabelSlotchange }))), index.h("button", { key: 'a61df73d4a372dd0dce8b045feb6180853c209d2', type: "button", part: "remove", class: "bs-chip-input__remove", disabled: this.disabled, "aria-label": `Remove ${this.labelText}`, onClick: this.onRemoveClick }, index.h(CloseIcon, { key: '6e14762d31caae9473603449dd47a158859d28f6' }))));
|
|
68
68
|
}
|
|
69
69
|
static get delegatesFocus() { return true; }
|
|
70
70
|
};
|
|
@@ -44,7 +44,7 @@ const BsComposerStatusBanner = class {
|
|
|
44
44
|
return this.type === 'error' || this.type === 'warning' ? index.h(WarningIcon, null) : index.h(ClockIcon, null);
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (index.h("div", { key: '
|
|
47
|
+
return (index.h("div", { key: '9e0569099d74f708f475b502625a2fd000cbbbf5', role: this.roleForType(), class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, index.h("div", { key: '8d6de7446b8bb53bc45ab9d4f110963425559f50', class: "bs-composer-status-banner__message-group" }, this.showIcon && (index.h("span", { key: '6f9964755ae030e577b356290ad2d972e024ace1', part: "icon", class: "bs-composer-status-banner__icon" }, index.h("slot", { key: '56d50ba748d0ad4cbcbcd73a6f4b8cb1a50613b8', name: "icon" }, this.renderDefaultIcon()))), index.h("p", { key: 'fed8249da75a688b2f125e5f9ca1787dc885b891', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (index.h("button", { key: '48eb50ca73f76bfd404bbd5b2a7bce3ced2da7ac', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (index.h("button", { key: 'f644669b00b8077b36ba9eb88ffffaba0e675fb4', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": "Dismiss", onClick: this.onCloseClick }, index.h(CloseIcon, { key: '3b42ae94449658eae8e9af5617abc3268c215325' })))));
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
const ClockIcon = () => (index.h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-width": "1.3" }), index.h("path", { d: "M10 5.83V10L12.5 11.67", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -171,7 +171,7 @@ const BsComposer = class {
|
|
|
171
171
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
172
172
|
const disabled = this.state === 'disabled';
|
|
173
173
|
const recording = this.state === 'recording';
|
|
174
|
-
return (index.h("div", { key: '
|
|
174
|
+
return (index.h("div", { key: '8313dc19fa583114e96203cb07be9ac114afe6f2', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, index.h("div", { key: '2aaef774ce964d33342bce9126c4537dd8c3f844', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, index.h("slot", { key: 'fd673d9316b78516f3b828585a264005306c42f2', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), index.h("div", { key: 'b3dbfc51f3451ae573443865487b6cd5cf20edb3', class: "bs-composer__text-row" }, index.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 })), index.h("div", { key: 'e298d4239e7868c97599c430397e8dedde4926c2', class: "bs-composer__controls-row" }, index.h("button", { key: 'a39c4810329fe7e198645e5e0ab29003916dd6d8', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": "Attach", onClick: this.onAttachClick }, index.h(PlusIcon, { key: '9d58e6a54c91eb6d2c658ee203eb6ae37eeabea5' })), recording ? (index.h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (index.h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (index.h("span", { class: "bs-composer__spacer" })), index.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 ? index.h(StopIcon, null) : index.h(MicIcon, null)), index.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()), index.h("slot", { key: '4de2116117e03382f89c1a409fcb2ecb38aa89ff', name: "actions-end" }))));
|
|
175
175
|
}
|
|
176
176
|
static get delegatesFocus() { return true; }
|
|
177
177
|
};
|
|
@@ -60,11 +60,11 @@ const BsDataTable = class {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
render() {
|
|
63
|
-
return (index.h("table", { key: '
|
|
63
|
+
return (index.h("table", { key: 'a1a9d0c92eb2af12f8f9cab9ba4ae0994a10958a', part: "table", class: "bs-data-table" }, index.h("thead", { key: '2b51500b221465d750b55c31e00af94684367eb2', part: "head" }, index.h("tr", { key: '57aa25ca9b255213f155b5b30841e284d1eebaf8' }, this.selectable && (index.h("th", { key: '44b709a7cd1f2072934efe8fef44a63b2ed20d62', class: "bs-data-table__select-col" }, this.rows.length > 0 && (index.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 => {
|
|
64
64
|
const isSorted = this.sortColumn === column.key;
|
|
65
65
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
66
66
|
return (index.h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (index.h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && index.h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
67
|
-
}))), index.h("tbody", { key: '
|
|
67
|
+
}))), index.h("tbody", { key: '0438897652b9f8909ff67ae9f7b22d0950f1e5e8', part: "body" }, this.rows.map(row => (index.h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (index.h("td", { class: "bs-data-table__select-col" }, index.h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
68
68
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
69
69
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
70
70
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-D7e6DfLV.js');
|
|
4
|
+
|
|
5
|
+
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}}`;
|
|
6
|
+
|
|
7
|
+
const BsFileUploadItem = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.bsCancel = index.createEvent(this, "bsCancel");
|
|
11
|
+
this.bsRemove = index.createEvent(this, "bsRemove");
|
|
12
|
+
}
|
|
13
|
+
/** Where the upload is. `loading` = working with no known percentage (indeterminate bar);
|
|
14
|
+
* `in-progress` = uploading with a known `progress`; `error` and `success` are final. */
|
|
15
|
+
state = 'loading';
|
|
16
|
+
/** The file name. */
|
|
17
|
+
fileName = '';
|
|
18
|
+
/** The file size, already formatted (e.g. "8MB"). */
|
|
19
|
+
fileSize;
|
|
20
|
+
/** Upload progress, 0-100. Only used when `state="in-progress"`. */
|
|
21
|
+
progress = 0;
|
|
22
|
+
/** The status text. Defaults per state: "Loading..." (`loading`), "{progress}% uploaded"
|
|
23
|
+
* (`in-progress`), "Upload failed" (`error`), "File uploaded successfully" (`success`). Provide
|
|
24
|
+
* your own for localisation or a specific error. */
|
|
25
|
+
message;
|
|
26
|
+
/** A preview image of the file. Shown instead of the placeholder icon when set. */
|
|
27
|
+
thumbnailSrc;
|
|
28
|
+
/** Alt text for `thumbnailSrc`. Leave empty when the file name already says it all. */
|
|
29
|
+
thumbnailAlt = '';
|
|
30
|
+
/** Accessible name of the cancel button (`loading`, `in-progress`, `error`). */
|
|
31
|
+
cancelLabel = 'Cancel upload';
|
|
32
|
+
/** Accessible name of the remove button (`success`). */
|
|
33
|
+
removeLabel = 'Remove file';
|
|
34
|
+
/** Fires when the cancel button is clicked (`loading`, `in-progress`, `error`). The consumer
|
|
35
|
+
* stops the upload and removes the item. */
|
|
36
|
+
bsCancel;
|
|
37
|
+
/** Fires when the remove button is clicked (`success`). The consumer removes the file. */
|
|
38
|
+
bsRemove;
|
|
39
|
+
get clampedProgress() {
|
|
40
|
+
return Math.min(100, Math.max(0, Math.round(Number.isFinite(this.progress) ? this.progress : 0)));
|
|
41
|
+
}
|
|
42
|
+
get statusText() {
|
|
43
|
+
if (this.message)
|
|
44
|
+
return this.message;
|
|
45
|
+
switch (this.state) {
|
|
46
|
+
case 'in-progress':
|
|
47
|
+
return `${this.clampedProgress}% uploaded`;
|
|
48
|
+
case 'error':
|
|
49
|
+
return 'Upload failed';
|
|
50
|
+
case 'success':
|
|
51
|
+
return 'File uploaded successfully';
|
|
52
|
+
case 'loading':
|
|
53
|
+
default:
|
|
54
|
+
return 'Loading...';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
onAction = () => {
|
|
58
|
+
if (this.state === 'success')
|
|
59
|
+
this.bsRemove.emit();
|
|
60
|
+
else
|
|
61
|
+
this.bsCancel.emit();
|
|
62
|
+
};
|
|
63
|
+
renderStatus() {
|
|
64
|
+
const uploading = this.state === 'loading' || this.state === 'in-progress';
|
|
65
|
+
if (uploading) {
|
|
66
|
+
return (index.h("bs-progress-linear", { part: "progress", size: "small", type: this.state === 'loading' ? 'indeterminate' : 'determinate', value: this.clampedProgress, ariaLabel: this.fileName || 'Upload progress' }, this.statusText));
|
|
67
|
+
}
|
|
68
|
+
// Final states are announced once (role="status"); the progress bar above is deliberately not
|
|
69
|
+
// a live region, so frequent percentage updates don't flood a screen reader.
|
|
70
|
+
return (index.h("div", { part: "status", class: `bs-file-upload-item__status bs-file-upload-item__status--${this.state}`, role: "status" }, this.state === 'success' ? index.h(CheckCircleIcon, null) : index.h(XCircleIcon, null), index.h("span", { class: "bs-file-upload-item__status-text" }, this.statusText)));
|
|
71
|
+
}
|
|
72
|
+
render() {
|
|
73
|
+
const removing = this.state === 'success';
|
|
74
|
+
return (index.h("div", { key: 'd26aebbbdb7858444d2ff3084c421ce1e70acd9e', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, index.h("div", { key: '2bf21442cc31bc9f85178e97bdae140de59fd7ce', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, index.h("slot", { key: 'fb9a9d723855e6d2556e61fb5cc7414e296ddf89', name: "thumbnail" }, this.thumbnailSrc ? (index.h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (index.h(ImageIcon, null)))), index.h("div", { key: 'ca1cab03c21d93b4fe754e8e4575bbee5c6c11bd', class: "bs-file-upload-item__content" }, index.h("div", { key: '072532a7cfb4a699ab9920594ed4299bd094eea3', class: "bs-file-upload-item__meta" }, index.h("span", { key: 'f30ec89b3af9d5a4fc3ea2cf9252713f47a68ba2', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (index.h("span", { key: '63aeb6db94d78011a649fa1a0771d488890c330b', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), index.h("bs-icon-button", { key: '5434d917777db308f8b16f84e2ccd5efcfb46dc8', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? index.h(TrashIcon, null) : index.h(CloseIcon, null))));
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
// Figma exports, recolored via currentColor so the CSS tokens drive the color.
|
|
78
|
+
const ImageIcon = () => (index.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" }, index.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" }), index.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" }), index.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" }), index.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" })));
|
|
79
|
+
const CheckCircleIcon = () => (index.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" }, index.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" })));
|
|
80
|
+
const XCircleIcon = () => (index.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" }, index.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" })));
|
|
81
|
+
const CloseIcon = () => (index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M18.75 5.25L5.25 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M18.75 18.75L5.25 5.25", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
82
|
+
const TrashIcon = () => (index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M20.25 5.25H3.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M9.75 9.75V15.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M14.25 9.75V15.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.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" }), index.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" })));
|
|
83
|
+
BsFileUploadItem.style = bsFileUploadItemCss();
|
|
84
|
+
|
|
85
|
+
exports.bs_file_upload_item = BsFileUploadItem;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-D7e6DfLV.js');
|
|
4
|
+
|
|
5
|
+
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}}`;
|
|
6
|
+
|
|
7
|
+
const BsFileUpload = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
this.bsFilesSelect = index.createEvent(this, "bsFilesSelect");
|
|
11
|
+
this.bsFilesReject = index.createEvent(this, "bsFilesReject");
|
|
12
|
+
}
|
|
13
|
+
get el() { return index.getElement(this); }
|
|
14
|
+
inputEl;
|
|
15
|
+
/** Layout: icon beside the text (`horizontal`) or stacked above it, centered (`vertical`). */
|
|
16
|
+
direction = 'horizontal';
|
|
17
|
+
/** Heading text (e.g. "Upload your documents"). */
|
|
18
|
+
heading;
|
|
19
|
+
/** Guidelines under the heading (e.g. "PDF or JPG, up to 8MB"). */
|
|
20
|
+
description;
|
|
21
|
+
/** Label of the browse button. Override for localisation. */
|
|
22
|
+
buttonLabel = 'Browse file';
|
|
23
|
+
/** Which files are accepted, same syntax as the native `accept` attribute: comma-separated
|
|
24
|
+
* extensions (`.pdf`), MIME types (`image/png`) or wildcards (`image/*`). Applied to the picker
|
|
25
|
+
* and also to dropped files, which the browser does not filter. */
|
|
26
|
+
accept;
|
|
27
|
+
/** Allows selecting/dropping more than one file. Without it only the first file is taken. */
|
|
28
|
+
multiple = false;
|
|
29
|
+
/** Disables the browse button and ignores drops. */
|
|
30
|
+
disabled = false;
|
|
31
|
+
/** Whether a file is currently being dragged over the dropzone (the Figma "Drop" state). Set by
|
|
32
|
+
* the component during a drag; mutable and reflected so it can also be set to show the state
|
|
33
|
+
* statically. */
|
|
34
|
+
dragging = false;
|
|
35
|
+
/** Fires with the accepted files, after the picker closes or files are dropped. */
|
|
36
|
+
bsFilesSelect;
|
|
37
|
+
/** Fires with files that were not taken: they didn't match `accept`, or were extra files
|
|
38
|
+
* dropped while `multiple` is off. */
|
|
39
|
+
bsFilesReject;
|
|
40
|
+
matchesAccept(file) {
|
|
41
|
+
const tokens = (this.accept ?? '')
|
|
42
|
+
.split(',')
|
|
43
|
+
.map(t => t.trim().toLowerCase())
|
|
44
|
+
.filter(Boolean);
|
|
45
|
+
if (tokens.length === 0)
|
|
46
|
+
return true;
|
|
47
|
+
const name = file.name.toLowerCase();
|
|
48
|
+
const type = (file.type || '').toLowerCase();
|
|
49
|
+
return tokens.some(token => {
|
|
50
|
+
if (token.startsWith('.'))
|
|
51
|
+
return name.endsWith(token);
|
|
52
|
+
if (token.endsWith('/*'))
|
|
53
|
+
return type.startsWith(token.slice(0, -1));
|
|
54
|
+
return type === token;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
handleFiles(files) {
|
|
58
|
+
const matching = files.filter(f => this.matchesAccept(f));
|
|
59
|
+
const rejected = files.filter(f => !this.matchesAccept(f));
|
|
60
|
+
const accepted = this.multiple ? matching : matching.slice(0, 1);
|
|
61
|
+
if (!this.multiple)
|
|
62
|
+
rejected.push(...matching.slice(1));
|
|
63
|
+
if (accepted.length)
|
|
64
|
+
this.bsFilesSelect.emit(accepted);
|
|
65
|
+
if (rejected.length)
|
|
66
|
+
this.bsFilesReject.emit(rejected);
|
|
67
|
+
}
|
|
68
|
+
onBrowse = () => {
|
|
69
|
+
if (!this.disabled)
|
|
70
|
+
this.inputEl?.click();
|
|
71
|
+
};
|
|
72
|
+
onInputChange = () => {
|
|
73
|
+
const files = Array.from(this.inputEl?.files ?? []);
|
|
74
|
+
// Reset so choosing the same file again still fires `change`.
|
|
75
|
+
if (this.inputEl)
|
|
76
|
+
this.inputEl.value = '';
|
|
77
|
+
if (files.length)
|
|
78
|
+
this.handleFiles(files);
|
|
79
|
+
};
|
|
80
|
+
onDragOver = (ev) => {
|
|
81
|
+
if (this.disabled)
|
|
82
|
+
return;
|
|
83
|
+
ev.preventDefault();
|
|
84
|
+
this.dragging = true;
|
|
85
|
+
};
|
|
86
|
+
onDragLeave = (ev) => {
|
|
87
|
+
// dragleave also fires when crossing between child elements; only clear when leaving the zone.
|
|
88
|
+
const next = ev.relatedTarget;
|
|
89
|
+
if (next && ev.currentTarget.contains(next))
|
|
90
|
+
return;
|
|
91
|
+
this.dragging = false;
|
|
92
|
+
};
|
|
93
|
+
onDrop = (ev) => {
|
|
94
|
+
if (this.disabled)
|
|
95
|
+
return;
|
|
96
|
+
ev.preventDefault();
|
|
97
|
+
this.dragging = false;
|
|
98
|
+
const files = Array.from(ev.dataTransfer?.files ?? []);
|
|
99
|
+
if (files.length)
|
|
100
|
+
this.handleFiles(files);
|
|
101
|
+
};
|
|
102
|
+
render() {
|
|
103
|
+
return (index.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 }, index.h("div", { key: 'c5fe3207ba56506a272c42097ec23881bcf863d4', part: "icon", class: "bs-file-upload__icon" }, index.h("slot", { key: 'd33d8f0f7b17bab679124823c61a1b7c6d031345', name: "icon" }, index.h(UploadIcon, { key: 'd0356e97a031867f323de21905a2bbca57963962' }))), index.h("div", { key: 'a5f4fb403556b2b596291bfddad2b73b1765f91f', class: "bs-file-upload__content" }, index.h("div", { key: 'b99afac250a8d40e54c97f74afde42620da2ff07', class: "bs-file-upload__text" }, this.heading && (index.h("span", { key: '33a2ce5aac1d8bf15c55dcf8ccfe4fbce6892fd1', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (index.h("span", { key: 'eec7f2fcc598412107e7b9c78efae30a3714c674', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), index.h("bs-button", { key: 'f44a5747bb0e9452aefa1fe2fc1d51b1af7da9b1', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), index.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 })));
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
// Figma's "UploadSimple" icon (3272:50330), exported SVG, recolored via currentColor.
|
|
107
|
+
const UploadIcon = () => (index.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" }, index.h("path", { d: "M16 18V4", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M27 18V26H5V18", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M11 9L16 4L21 9", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
108
|
+
BsFileUpload.style = bsFileUploadCss();
|
|
109
|
+
|
|
110
|
+
exports.bs_file_upload = BsFileUpload;
|
|
@@ -31,7 +31,7 @@ const BsIconButton = class {
|
|
|
31
31
|
*/
|
|
32
32
|
ariaLabel = null;
|
|
33
33
|
render() {
|
|
34
|
-
return (index.h("button", { key: '
|
|
34
|
+
return (index.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 }, index.h("span", { key: '8c69f815b6ca603cfcfab34e3530f4c783da0ee7', part: "icon", class: "bs-icon-button__icon" }, index.h("slot", { key: '8533f8ecfae182d6bd7d7e0dd6af328015948864' }))));
|
|
35
35
|
}
|
|
36
36
|
static get delegatesFocus() { return true; }
|
|
37
37
|
};
|
|
@@ -61,7 +61,7 @@ const BsInlineTab = class {
|
|
|
61
61
|
};
|
|
62
62
|
render() {
|
|
63
63
|
const iconOnly = this.hasIcon && !this.hasLabel;
|
|
64
|
-
return (index.h("button", { key: '
|
|
64
|
+
return (index.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 }, index.h("span", { key: '26381015d527bbb2d7b598e117dd61512b5acdac', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, index.h("slot", { key: '9902a6a2263b7bac63063817859924decd8b3518', name: "icon", onSlotchange: this.onIconSlotchange })), index.h("span", { key: '1982f864c34bb1869085c46237eb1620da47449d', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, index.h("slot", { key: '5029733093fd8dd68565af803bb74444e5470eef', onSlotchange: this.onLabelSlotchange }))));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
BsInlineTab.style = bsInlineTabCss();
|
|
@@ -308,10 +308,10 @@ const BsInput = class {
|
|
|
308
308
|
return (index.h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, Array.from({ length: this.length }).map((_, i) => (index.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) })))));
|
|
309
309
|
}
|
|
310
310
|
render() {
|
|
311
|
-
return (index.h("div", { key: '
|
|
311
|
+
return (index.h("div", { key: 'd65ab3191cd18c77385ffbb8b827e6161dafceaf', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
312
312
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
313
313
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
314
|
-
index.h("label", { key: '
|
|
314
|
+
index.h("label", { key: '762c10bb8afcd1f0609ba75b0d6d8162c483b5b5', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (index.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 ? (index.h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, index.h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, index.h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), index.h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), index.h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (index.h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
|
|
315
315
|
}
|
|
316
316
|
static get delegatesFocus() { return true; }
|
|
317
317
|
};
|
|
@@ -26,7 +26,7 @@ const BsMenuItem = class {
|
|
|
26
26
|
this.bsSelect.emit();
|
|
27
27
|
};
|
|
28
28
|
render() {
|
|
29
|
-
return (index.h("button", { key: '
|
|
29
|
+
return (index.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 }, index.h("span", { key: 'fb36594dd48bd601a26d9debda9fb1c9bde37f88', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, index.h("slot", { key: '19049f5f1f79e6136cd9cc8bcb3669ff97d79c18', name: "icon", onSlotchange: this.onIconSlotchange })), index.h("span", { key: '6ac351a3d3a07bea5bbb5f69bd58c1a7189283fe', part: "label", class: "bs-menu-item__label" }, index.h("slot", { key: '04215578eb545d824c090cb72f1e493474dca409' }))));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
BsMenuItem.style = bsMenuItemCss();
|
|
@@ -9,7 +9,7 @@ const BsMenu = class {
|
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (index.h("div", { key: '
|
|
12
|
+
return (index.h("div", { key: '6d24ccbadf6c68bba52b6737e91c4d131fbce331', part: "list", class: "bs-menu", role: "menu" }, index.h("slot", { key: '94cc6884049a7836b3438a2fc112f0a2c7a1473a' })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
BsMenu.style = bsMenuCss();
|
|
@@ -93,7 +93,7 @@ const BsNavigationDrawerItem = class {
|
|
|
93
93
|
// incorrectly also toggle this parent row on every child click. Both are wrapped in a
|
|
94
94
|
// `display: contents` container so render() still returns a single root node (this codebase's
|
|
95
95
|
// convention, e.g. bs-input.tsx) without that wrapper affecting layout at all.
|
|
96
|
-
return (index.h("div", { key: '
|
|
96
|
+
return (index.h("div", { key: 'bb51c715175ff08caa34b5c2e3c5f7fecdd92059', class: "bs-navigation-drawer-item__root" }, index.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 && (index.h("span", { key: '78cf9b9281f94d44928b8f7e93de4ed327ca2e6e', part: "icon", class: `bs-navigation-drawer-item__icon ${this.hasIcon ? 'bs-navigation-drawer-item__icon--has-content' : ''}` }, index.h("slot", { key: '94b6037e69f7f1aa77a5abf3c726ae1f02eb55e0', name: "icon", onSlotchange: this.onIconSlotchange }))), index.h("span", { key: 'f7b355c4ef9b4a1d115083fbcb19003aee1a56a4', part: "label", class: "bs-navigation-drawer-item__label" }, index.h("slot", { key: '68ad8fb87791f5533a13eafa1348990f0acff6d4' })), this.expandable && (index.h("span", { key: 'd0f2ef997e4ee619013d63a0793008bb797b2776', part: "chevron", class: `bs-navigation-drawer-item__chevron ${this.expanded ? 'bs-navigation-drawer-item__chevron--expanded' : ''}` }, index.h(ChevronDownIcon, { key: '20286773f2ec74c370335bdcb30b36cd868c3a58' })))), this.expandable && (index.h("span", { key: 'e9b7a658742af43fcc570c33e82f28bbb87b5a05', part: "children", class: "bs-navigation-drawer-item__children" }, index.h("slot", { key: '172adb88df778a8411cbe3de3250af1917564b5d', name: "children" })))));
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
99
|
// 16x16 native viewBox (not a 24x24 icon scaled down) -- authored directly at display size, per
|
|
@@ -71,7 +71,7 @@ const BsNavigationDrawer = class {
|
|
|
71
71
|
this.bsSearchClick.emit();
|
|
72
72
|
};
|
|
73
73
|
render() {
|
|
74
|
-
return (index.h("nav", { key: '
|
|
74
|
+
return (index.h("nav", { key: '4f39df22dc1027094a67c3d331021a90c471bef6', class: "bs-navigation-drawer", "aria-label": this.heading }, this.showLogo && (index.h("div", { key: '68101afc424bba6fd56d6b155d8130b77fcb42a9', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--full" }, index.h("bs-logo", { key: '7ec295e0411d6fe6ed33ea67e632fcda72a49611', variant: "full", background: this.logoBackground }))), this.showLogo && (index.h("div", { key: 'ee9db23aeb0c7ad6297bed6a4baa17dbe4b2f6d4', part: "logo", class: "bs-navigation-drawer__logo bs-navigation-drawer__logo--mark" }, index.h("bs-logo", { key: 'e69f31b910c3302d2c5851ae9bfdbfec1999fd4e', variant: "mark", background: this.logoBackground }))), index.h("div", { key: '8d69e56009e183c1745ddafebc75417ce6ea5bdc', class: "bs-navigation-drawer__title-row" }, index.h("span", { key: '434dd310adc86473876e125fab81f97b0beb5c4b', part: "title", class: "bs-navigation-drawer__title" }, this.heading), this.collapsible && (index.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 }, index.h(CaretLeftIcon, { key: '96ee586ecd6edc378a95a0afcc114919230a52af' })))), index.h("div", { key: '3b20ffc4e837b7a2e7229ba575b429e54fc9f3ac', part: "search", class: "bs-navigation-drawer__search" }, index.h("slot", { key: 'f62aae2397c1eada4c0d52fd6d4cba778f475a58', name: "search" })), index.h("button", { key: 'a00b4871692f612c62d5e1b6de9511ca7ce7ebe3', type: "button", part: "search-trigger", class: "bs-navigation-drawer__search-trigger", "aria-label": "Search", onClick: this.onSearchTriggerClick }, index.h(SearchIcon, { key: '8402ace02e086a862bcc3bc92beb324940f7fda0' })), index.h("div", { key: '3ac74499c23530d89061d04fa23c4fd6a7e8c7b4', part: "items", class: "bs-navigation-drawer__items" }, index.h("slot", { key: '89baa650f1449c813f7a1e9f29f6525dcf6e2699' }))));
|
|
75
75
|
}
|
|
76
76
|
static get watchers() { return {
|
|
77
77
|
"collapsed": [{
|
|
@@ -36,7 +36,7 @@ const BsNavigationHeader = class {
|
|
|
36
36
|
render() {
|
|
37
37
|
const showLogo = this.alignment !== 'with-navigation-drawer';
|
|
38
38
|
const rootClasses = `bs-navigation-header bs-navigation-header--${this.alignment}`;
|
|
39
|
-
return (index.h("header", { key: '
|
|
39
|
+
return (index.h("header", { key: '0dc99abb8f2db96f0befe1b838a2db037636a75c', class: rootClasses, "aria-label": this.ariaLabel ?? undefined }, this.skipToContentHref && (index.h("a", { key: '1f906366d5398aa62d2485afdb1c9cf350354f05', part: "skip-link", class: "bs-navigation-header__skip-link", href: this.skipToContentHref }, this.skipToContentLabel)), showLogo && (index.h("bs-logo", { key: 'c735b4647acc92ff5b6725dc72bfbab421230a9c', part: "logo", class: "bs-navigation-header__logo", variant: "full", background: this.logoBackground })), index.h("div", { key: '845c1d60319daf2aa7aa57f0f8ba71e0f633598e', part: "left", class: "bs-navigation-header__left" }, index.h("slot", { key: '67436745b63a843e86a79163f927f2b563b6e2e4', name: "left" })), index.h("div", { key: '4c6d514d7cf238b5be8476f9fede7292b1dc1c10', part: "right", class: "bs-navigation-header__right" }, index.h("slot", { key: 'a6c12231c6cc728314fdfc076a48fd1ce0f79ede', name: "right" }))));
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
BsNavigationHeader.style = bsNavigationHeaderCss();
|
|
@@ -70,7 +70,7 @@ const BsPagination = class {
|
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
72
|
const pageList = this.getPageList();
|
|
73
|
-
return (index.h("nav", { key: '
|
|
73
|
+
return (index.h("nav", { key: 'f5f1e20a72ffc81ca14b05ad735e3ca714069ed3', "aria-label": "Pagination" }, index.h("ul", { key: '416ef86fe6aca589869e529d1248cbca7ad254ac', part: "list", class: "bs-pagination__list" }, index.h("li", { key: 'c550eada1eb765db7734e0971f4a2222ad1488e8', part: "item", class: "bs-pagination__item" }, index.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) }, index.h(ChevronLeftIcon, { key: 'ea30181c70ff4c7c39852cb978b4cc9307bfa736' }))), pageList.map((item, index$1) => item === 'ellipsis' ? (index.h("li", { part: "item", class: "bs-pagination__item", key: `ellipsis-${index$1}` }, index.h("span", { part: "ellipsis", class: "bs-pagination__ellipsis", "aria-hidden": "true" }, index.h(EllipsisIcon, null)))) : (index.h("li", { part: "item", class: "bs-pagination__item", key: item }, index.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)))), index.h("li", { key: '1c587333c1795e4b189c793b442c03e75937ab11', part: "item", class: "bs-pagination__item" }, index.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) }, index.h(ChevronRightIcon, { key: '5c94c76cbda7938da625f326ea2ef7ddadce3929' }))))));
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
function range(start, end) {
|
|
@@ -24,19 +24,24 @@ const BsProgressLinear = class {
|
|
|
24
24
|
/** Shows the slotted label below the bar. When `false`, or when no content is slotted, the
|
|
25
25
|
* label wrapper isn't rendered at all. Defaults to `true`. */
|
|
26
26
|
showLabel = true;
|
|
27
|
+
/** Accessible name for the progress bar (e.g. "Uploading report"). Required for assistive tech --
|
|
28
|
+
* a `role="progressbar"` with no name is an axe-core `aria-progressbar-name` violation. Setting
|
|
29
|
+
* `aria-label` on the host doesn't reach the inner element across the shadow boundary, so this
|
|
30
|
+
* prop binds it directly -- same pattern as `bs-button`'s `ariaLabel`. */
|
|
31
|
+
ariaLabel = null;
|
|
27
32
|
get clampedValue() {
|
|
28
33
|
return Math.min(100, Math.max(0, this.value));
|
|
29
34
|
}
|
|
30
35
|
render() {
|
|
31
36
|
const isDeterminate = this.type === 'determinate';
|
|
32
37
|
const value = this.clampedValue;
|
|
33
|
-
return (index.h("div", { key: '
|
|
38
|
+
return (index.h("div", { key: '279dbb0cd17b9584b500570d58cc09bd91e8a0d7', part: "container", class: "bs-progress-linear" }, index.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 ? (index.h("div", { part: "fill", class: "bs-progress-linear__fill", style: { width: `${value}%` } })) : (
|
|
34
39
|
// Figma's indeterminate bar is a soft "comet" gradient segment (transparent -> blue ->
|
|
35
40
|
// transparent) sliding left-to-right across the track's full width in a loop -- the
|
|
36
41
|
// same fade concept as bs-progress's indeterminate ring's conic-gradient comet tail,
|
|
37
42
|
// but along a straight line via a linear-gradient + `transform: translateX(...)`
|
|
38
43
|
// keyframe animation instead of a rotating conic-gradient.
|
|
39
|
-
index.h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (index.h("span", { key: '
|
|
44
|
+
index.h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (index.h("span", { key: '51a75cae90630fec1d8757d483c239a534385aa7', part: "label", class: "bs-progress-linear__label" }, index.h("slot", { key: '7e6639ff4f7219cbb3fa09d7c7570268534530b4' })))));
|
|
40
45
|
}
|
|
41
46
|
// The default slot's assigned content lives in the host's light DOM regardless of whether a
|
|
42
47
|
// <slot> is currently rendered in the shadow tree, so this can be computed directly from the
|
|
@@ -52,7 +52,7 @@ const BsProgress = class {
|
|
|
52
52
|
const isDeterminate = this.type === 'determinate';
|
|
53
53
|
const value = this.clampedValue;
|
|
54
54
|
const dashOffset = circumference * (1 - value / 100);
|
|
55
|
-
return (index.h("div", { key: '
|
|
55
|
+
return (index.h("div", { key: '0534b118c5954b821dc3e9f1bb0b4a0ac746633a', part: "container", class: "bs-progress" }, index.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 ? (index.h("svg", { class: "bs-progress__ring", width: diameter, height: diameter, viewBox: `0 0 ${diameter} ${diameter}` }, index.h("circle", { part: "track", class: "bs-progress__track", cx: diameter / 2, cy: diameter / 2, r: radius, "stroke-width": this.strokeWidth, fill: "none" }), index.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 }))) : (
|
|
56
56
|
// Figma's indeterminate ring is a fading "comet tail" (transparent -> solid color),
|
|
57
57
|
// not a flat-colored partial arc -- SVG has no angular/conic gradient primitive, so a
|
|
58
58
|
// CSS conic-gradient (color varying by angle) + a radial-gradient mask (carving the
|
|
@@ -61,7 +61,7 @@ const BsProgress = class {
|
|
|
61
61
|
index.h("div", { part: "arc", class: "bs-progress__spinner", style: {
|
|
62
62
|
'--bs-progress-spinner-stroke-width': `${this.strokeWidth}px`,
|
|
63
63
|
'--bs-progress-spinner-sweep': `${INDETERMINATE_SWEEP_DEGREES}deg`,
|
|
64
|
-
} }))), isDeterminate && this.showLabel && (index.h("span", { key: '
|
|
64
|
+
} }))), isDeterminate && this.showLabel && (index.h("span", { key: '20b74322a926ff40188de525103f91992d9bc508', part: "label", class: `bs-progress__label bs-progress__label--${this.size}` }, value, "%"))));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
BsProgress.style = bsProgressCss();
|
|
@@ -40,7 +40,7 @@ const BsRadio = class {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
render() {
|
|
43
|
-
return (index.h("label", { key: '
|
|
43
|
+
return (index.h("label", { key: '9aed6afb95bd1875b02e96aa17ff9419f15f52df', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, index.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 }), index.h("span", { key: 'dd68936424c34d8395b1b3540e875a0efb154365', class: "bs-radio__hit-area" }, index.h("span", { key: 'a5d17ebb7a01851ce3cd0a2acc3c16be911ffc53', class: "bs-radio__state-layer" }, index.h("span", { key: '46ed4553f672712b4c2fc26b8e229a93bb4ad575', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && index.h("span", { key: '18d9f81c031ff77ee4361a0ce8c73665bd6c1b75', part: "dot", class: "bs-radio__dot" })))), index.h("span", { key: 'a48cfc6d0689e523ab70450853b9fb2450c172e9', part: "label", class: "bs-radio__label" }, index.h("slot", { key: '7b1a801812fe510eb392c7266e8253bc9408c3db' }))));
|
|
44
44
|
}
|
|
45
45
|
static get delegatesFocus() { return true; }
|
|
46
46
|
};
|
|
@@ -182,7 +182,7 @@ const BsSlider = class {
|
|
|
182
182
|
render() {
|
|
183
183
|
const isRange = this.type === 'range';
|
|
184
184
|
const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
|
|
185
|
-
return (index.h("div", { key: '
|
|
185
|
+
return (index.h("div", { key: '602cadcb8377457bc5911161b238c612545592b4', class: rootClasses }, this.showLabel && (index.h("div", { key: '02b4d3d785665b4563dd04708a5926e116c8f5d7', class: "bs-slider__header" }, index.h("span", { key: '6a1ddf9c9a50b823231c779610fcbd2cef944701', id: "bs-slider-label", part: "label", class: "bs-slider__label" }, this.label), isRange ? (index.h("span", { class: "bs-slider__value-fields" }, this.renderPercentField(this.percent(this.effectiveValueStart), this.onStartPercentFieldChange, this.ariaLabel ?? 'Start value'), index.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')))), index.h("div", { key: '841a41446845737e38d88ca122ec5c626da5ba53', class: "bs-slider__row" }, this.showLabel && (index.h("span", { key: 'a978c0bf50a02ae281925ecd2a21d4aec6458be8', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (index.h("span", { key: 'beb8e6ffb9113c9e6d1185f67db27fd77e6eec4c', part: "bound", class: "bs-slider__bound" }, this.max)))));
|
|
186
186
|
}
|
|
187
187
|
static get delegatesFocus() { return true; }
|
|
188
188
|
};
|
|
@@ -41,7 +41,7 @@ const BsSnackbar = class {
|
|
|
41
41
|
this.bsDismiss.emit();
|
|
42
42
|
};
|
|
43
43
|
render() {
|
|
44
|
-
return (index.h("div", { key: '
|
|
44
|
+
return (index.h("div", { key: 'c84de130f993938339fd16d9f534f1da18fe6c0a', part: "container", class: `bs-snackbar bs-snackbar--${this.variant}`, role: "status", "aria-live": this.variant === 'error' ? 'assertive' : 'polite' }, index.h("div", { key: '0941f900229f6b3208f8268d34b0cde49e4dba22', class: "bs-snackbar__content" }, index.h("span", { key: 'cf89eff5ea640950573f9b610d6eff46e5d0154e', part: "icon", class: "bs-snackbar__icon", "aria-hidden": "true" }, this.loading ? index.h("span", { class: "bs-snackbar__spinner" }) : index.h(CheckCircleIcon, null)), index.h("span", { key: 'd4ae7e62ecaea7b53962b08d69bae435ecf0a810', part: "message", class: "bs-snackbar__message" }, index.h("slot", { key: 'a99ec601f27f79f42fc61cd14c0fed742d2fa334' }))), index.h("div", { key: 'a139c0287e2eacb26ccbd604ff0343bca23eeb5d', class: "bs-snackbar__actions" }, this.actionLabel && (index.h("bs-button", { key: 'f22c4a63903fdb50da087ab2c38dd076298a12ed', part: "action", variant: ACTION_VARIANT[this.variant], size: "sm", onClick: this.onAction }, this.actionLabel)), index.h("bs-icon-button", { key: '4cd5c8f367ee71f11dad1f6f47ff1cdf6436a764', part: "close", variant: "subtle", size: "md", ariaLabel: "Dismiss", onClick: this.onDismiss }, index.h(CloseIcon, { key: 'a52e6af7acf7c95a54aa6cb5237f2b53e30ea601' })))));
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
const CheckCircleIcon = () => (index.h("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M8.25 12.75L10.5 15L15.75 9.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.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" })));
|
|
@@ -26,8 +26,8 @@ const BsSourceLink = class {
|
|
|
26
26
|
};
|
|
27
27
|
render() {
|
|
28
28
|
const inner = [
|
|
29
|
-
index.h("span", { key: '
|
|
30
|
-
index.h("span", { key: '
|
|
29
|
+
index.h("span", { key: '5c6382ad80cc971f302da1d80af089306a612e73', class: "bs-source-link__left" }, index.h("span", { key: '07c8591469e23fe4304846e9282cea0a9eae3ba2', class: "bs-source-link__filename-row" }, index.h("span", { key: 'ffdb99816134be212cc4d30ebdbf8dd8bcdc085f', part: "icon", class: "bs-source-link__icon" }, index.h("slot", { key: '475cd85bcb5caa1d3a82d08318731ef4bdf6cb60', name: "icon" }, index.h(FileTextIcon, { key: '6915810a89f15b823b2b744d30db5b2cefff8162' }))), index.h("p", { key: '14facc92c71f91701654ea2ce2f9f2ef4b980c5e', part: "filename", class: "bs-source-link__filename" }, this.fileName)), index.h("span", { key: 'ecd7080f8bc8ce5d7e169f917aaae275ac7a474e', class: "bs-source-link__meta" }, this.sourceName && (index.h("span", { key: 'f1697d3e278225b26909ec1c40ce2c4cb51c884b', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && index.h("span", { key: '8efe25341dc7c68ec9c66b91f5f399c9b8ed659f', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (index.h("span", { key: 'cddd46792f911af65434554e56d1cb72d2b88cae', part: "version", class: "bs-source-link__version" }, this.version)))),
|
|
30
|
+
index.h("span", { key: '166b5070329771cd7e8f20689e5b257d3f6f1fd0', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, index.h(ArrowUpRightIcon, { key: 'c2a820c6b36ead5f1bbfd74d84c70cb9894c8f1f' })),
|
|
31
31
|
];
|
|
32
32
|
return this.href ? (index.h("a", { class: "bs-source-link", href: this.href, target: this.target, rel: "noopener noreferrer", onClick: this.onClick }, inner)) : (index.h("button", { type: "button", class: "bs-source-link", onClick: this.onClick }, inner));
|
|
33
33
|
}
|
|
@@ -34,7 +34,7 @@ const BsStepperStep = class {
|
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
36
|
const state = this.state;
|
|
37
|
-
return (index.h(index.Host, { key: '
|
|
37
|
+
return (index.h(index.Host, { key: 'fe270c356f44c25a3a12450eec8e1a7657d4d88f', role: "listitem", class: `bs-stepper-step--${this.direction}` }, index.h("div", { key: '1bc833a5ca917d141078e3b69e9e455ec8d877ad', class: "bs-stepper-step__top" }, index.h("span", { key: 'aa91b7e91d600b08c389be456b28f4a65450d72e', part: "icon", class: `bs-stepper-step__icon bs-stepper-step__icon--${state}` }, state === 'current' && index.h("span", { key: 'e3fee594c97bf9f5d47e1b922bf9adffa1c0d438', class: "bs-stepper-step__icon-dot" }), state === 'done' && index.h(CheckIcon, { key: '4930e7653d7c81c8fcf18920fdd0a9a0e975eee4' }), state === 'error' && index.h(ExclamationIcon, { key: 'ca757e769dd4411c987bf5f22b7cda904d9fd067' })), index.h("span", { key: '2b0621849727e355d4d0944087ff1d9eacb5b5f7', part: "connector", class: "bs-stepper-step__connector", "aria-hidden": "true" }, index.h("span", { key: '0d08b9591ea2c9a967ebf85dce105f667cb86370', class: "bs-stepper-step__connector-line" }))), index.h("span", { key: '3bd0490ef190a4e4f33f822383be230e4e20e7dc', part: "label", class: `bs-stepper-step__label bs-stepper-step__label--${state}` }, index.h("span", { key: 'cf6cb4f72fcf546a954085d125a72548cfe521fe', part: "name", class: "bs-stepper-step__name" }, this.name), this.showDescription && this.description && (index.h("span", { key: 'b0ef234071983ae8c87d68440e7bfa4a491a35f5', part: "description", class: "bs-stepper-step__description" }, this.description)))));
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
const CheckIcon = () => (index.h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("path", { d: "M2.5 9L6 12.5L14 4.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|