@brandsync/wc 1.15.0 → 1.17.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/CHANGELOG.md +16 -0
- package/REFERENCE.md +313 -0
- package/custom-elements.json +4760 -1555
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-044ac86c.entry.js +1 -0
- package/dist/brandsync-wc/p-065c7e7c.entry.js +1 -0
- package/dist/brandsync-wc/p-07673a48.entry.js +1 -0
- package/dist/brandsync-wc/{p-54f9529f.entry.js → p-08e96f13.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f3cc961b.entry.js → p-0bbaef51.entry.js} +1 -1
- package/dist/brandsync-wc/p-11d80e17.entry.js +1 -0
- package/dist/brandsync-wc/{p-c85fe37b.entry.js → p-1bd99669.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f4d1d56e.entry.js → p-225148be.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6df48031.entry.js → p-2bd30709.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e294f698.entry.js → p-32297416.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d165a742.entry.js → p-35f76ea7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ca40386.entry.js → p-3bad5e1b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ed71eb02.entry.js → p-3bdeeb9d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1bf8fbbb.entry.js → p-3c6ec5d0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-abfa43f5.entry.js → p-3cb79512.entry.js} +1 -1
- package/dist/brandsync-wc/p-3d2c62a6.entry.js +1 -0
- package/dist/brandsync-wc/{p-23379d7c.entry.js → p-3d7b0708.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2e285364.entry.js → p-43d5f708.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d81c4f58.entry.js → p-4b460eda.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b6081bba.entry.js → p-4eaa9ed4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c25553bc.entry.js → p-4f4c0c68.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a56bc608.entry.js → p-5057e4fe.entry.js} +1 -1
- package/dist/brandsync-wc/p-54d91ac9.entry.js +1 -0
- package/dist/brandsync-wc/{p-65fa1b21.entry.js → p-57ff14ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-538d5b58.entry.js → p-5b933ff4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b67a0c8f.entry.js → p-5c61eb06.entry.js} +1 -1
- package/dist/brandsync-wc/{p-86774165.entry.js → p-5eb5795f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b663ee67.entry.js → p-61deb48c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ac9472ec.entry.js → p-67f125e8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3488c4fc.entry.js → p-6ea02b98.entry.js} +1 -1
- package/dist/brandsync-wc/p-70c650b2.entry.js +1 -0
- package/dist/brandsync-wc/p-79fc849c.entry.js +1 -0
- package/dist/brandsync-wc/{p-5a45ef51.entry.js → p-7ed071fb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3c21d0bf.entry.js → p-8134f97c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ed00786.entry.js → p-844205d9.entry.js} +1 -1
- package/dist/brandsync-wc/p-84d6d6eb.entry.js +1 -0
- package/dist/brandsync-wc/{p-401b3d3d.entry.js → p-857987f9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b9c9bcba.entry.js → p-8c4dfccb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-38ac9aad.entry.js → p-90ba3032.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1ca8b01e.entry.js → p-9396c67e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e9b6b30f.entry.js → p-9d740928.entry.js} +1 -1
- package/dist/brandsync-wc/{p-baa3d37a.entry.js → p-a7fa839a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f271e1d2.entry.js → p-a7fb0b59.entry.js} +1 -1
- package/dist/brandsync-wc/{p-89ea6366.entry.js → p-ab14a07d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-912629c6.entry.js → p-aec2dfeb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8390a155.entry.js → p-b02bf1ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9beeb30c.entry.js → p-b142d8c9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7a072e64.entry.js → p-b4511ad3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5ed1f45e.entry.js → p-b5710db6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-34b0c048.entry.js → p-baa39c08.entry.js} +1 -1
- package/dist/brandsync-wc/{p-87d44938.entry.js → p-be7aac52.entry.js} +1 -1
- package/dist/brandsync-wc/p-c835afb7.entry.js +1 -0
- package/dist/brandsync-wc/{p-45986ad4.entry.js → p-d25adab2.entry.js} +1 -1
- package/dist/brandsync-wc/p-d2a15599.entry.js +1 -0
- package/dist/brandsync-wc/{p-b9c0b481.entry.js → p-d7956c51.entry.js} +1 -1
- package/dist/brandsync-wc/p-d9184940.entry.js +1 -0
- package/dist/brandsync-wc/{p-0f97fe35.entry.js → p-dcbeb143.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cf287ff1.entry.js → p-debc83cc.entry.js} +1 -1
- package/dist/brandsync-wc/{p-dcacee29.entry.js → p-e0a9f2d1.entry.js} +1 -1
- package/dist/brandsync-wc/p-e123b391.entry.js +1 -0
- package/dist/brandsync-wc/p-e8ae626d.entry.js +1 -0
- package/dist/brandsync-wc/p-e8e22238.entry.js +1 -0
- package/dist/brandsync-wc/{p-6cb21302.entry.js → p-eb0dc5bf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1b4c0971.entry.js → p-f43a7f16.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7b3518b8.entry.js → p-f82a9f0d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f0be9125.entry.js → p-f98dfa85.entry.js} +1 -1
- package/dist/brandsync-wc/{p-36fe783a.entry.js → p-fdc168ec.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bc97ece8.entry.js → p-ffccc1ee.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-accordion-group.cjs.entry.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-app-shell.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-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-citation-preview.cjs.entry.js +1 -1
- package/dist/cjs/bs-command-palette.cjs.entry.js +374 -0
- 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-container.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/bs-divider.cjs.entry.js +1 -1
- package/dist/cjs/bs-empty-state.cjs.entry.js +47 -0
- package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-global-search.cjs.entry.js +326 -0
- package/dist/cjs/bs-grid.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-tile.cjs.entry.js +2 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
- package/dist/cjs/bs-key-caps.cjs.entry.js +39 -0
- package/dist/cjs/bs-key.cjs.entry.js +28 -0
- package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +112 -0
- package/dist/cjs/bs-list-item.cjs.entry.js +66 -0
- package/dist/cjs/bs-list.cjs.entry.js +103 -0
- package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-message.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 +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-popover.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-qr-code.cjs.entry.js +1 -1
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-search-item.cjs.entry.js +47 -0
- package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
- package/dist/cjs/bs-shortcut-row.cjs.entry.js +27 -0
- package/dist/cjs/bs-skeleton.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-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bs-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/bs-stack.cjs.entry.js +1 -1
- 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_3.cjs.entry.js +3 -3
- package/dist/cjs/bs-timepicker.cjs.entry.js +2 -2
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/bs-tree-item.cjs.entry.js +94 -0
- package/dist/cjs/bs-tree.cjs.entry.js +197 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
- 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-app-shell/bs-app-shell.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-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-citation-preview/bs-citation-preview.js +1 -1
- package/dist/collection/components/bs-command-palette/bs-command-palette.cmp.test.js +207 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.css +214 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.js +1114 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.stories.js +194 -0
- 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-container/bs-container.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +1 -1
- package/dist/collection/components/bs-divider/bs-divider.js +1 -1
- package/dist/collection/components/bs-empty-state/bs-empty-state.cmp.test.js +102 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.css +45 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.js +175 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.stories.js +52 -0
- package/dist/collection/components/bs-error-page/bs-error-page.js +1 -1
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-global-search/bs-global-search.cmp.test.js +491 -0
- package/dist/collection/components/bs-global-search/bs-global-search.css +115 -0
- package/dist/collection/components/bs-global-search/bs-global-search.js +1024 -0
- package/dist/collection/components/bs-global-search/bs-global-search.stories.js +146 -0
- package/dist/collection/components/bs-grid/bs-grid.js +2 -2
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +2 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-key/bs-key.cmp.test.js +59 -0
- package/dist/collection/components/bs-key/bs-key.css +58 -0
- package/dist/collection/components/bs-key/bs-key.js +84 -0
- package/dist/collection/components/bs-key/bs-key.stories.js +19 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.cmp.test.js +60 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.css +28 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.js +120 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.stories.js +29 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.js +194 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.css +138 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +485 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.js +111 -0
- package/dist/collection/components/bs-list/bs-list.cmp.test.js +99 -0
- package/dist/collection/components/bs-list/bs-list.css +15 -0
- package/dist/collection/components/bs-list/bs-list.js +241 -0
- package/dist/collection/components/bs-list/bs-list.stories.js +43 -0
- package/dist/collection/components/bs-list-item/bs-list-item.cmp.test.js +137 -0
- package/dist/collection/components/bs-list-item/bs-list-item.css +139 -0
- package/dist/collection/components/bs-list-item/bs-list-item.js +343 -0
- package/dist/collection/components/bs-list-item/bs-list-item.stories.js +86 -0
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.cmp.test.js +6 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-message/bs-message.js +1 -1
- package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-popover/bs-popover.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 +2 -2
- package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-search-item/bs-search-item.cmp.test.js +147 -0
- package/dist/collection/components/bs-search-item/bs-search-item.css +112 -0
- package/dist/collection/components/bs-search-item/bs-search-item.js +222 -0
- package/dist/collection/components/bs-search-item/bs-search-item.stories.js +31 -0
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.cmp.test.js +60 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.css +42 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +154 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.stories.js +24 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.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-spinner/bs-spinner.js +1 -1
- package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
- package/dist/collection/components/bs-stack/bs-stack.js +1 -1
- 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-timepicker/bs-timepicker.js +2 -2
- 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/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
- package/dist/collection/components/bs-tree/bs-tree.cmp.test.js +166 -0
- package/dist/collection/components/bs-tree/bs-tree.css +8 -0
- package/dist/collection/components/bs-tree/bs-tree.js +354 -0
- package/dist/collection/components/bs-tree/bs-tree.stories.js +34 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.cmp.test.js +187 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.css +161 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.js +305 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.stories.js +54 -0
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
- 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/components/bs-accordion-group.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-app-shell.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.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-citation-preview.js +1 -1
- package/dist/components/bs-command-palette.d.ts +11 -0
- package/dist/components/bs-command-palette.js +1 -0
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-container.js +1 -1
- package/dist/components/bs-cookie-consent.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.js +1 -1
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-divider.js +1 -1
- package/dist/components/bs-empty-state.d.ts +11 -0
- package/dist/components/bs-empty-state.js +1 -0
- package/dist/components/bs-error-page.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-global-search.d.ts +11 -0
- package/dist/components/bs-global-search.js +1 -0
- package/dist/components/bs-grid.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-icon-tile.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-key-caps.d.ts +11 -0
- package/dist/components/bs-key-caps.js +1 -0
- package/dist/components/bs-key.d.ts +11 -0
- package/dist/components/bs-key.js +1 -0
- package/dist/components/bs-keyboard-shortcuts.d.ts +11 -0
- package/dist/components/bs-keyboard-shortcuts.js +1 -0
- package/dist/components/bs-list-item.d.ts +11 -0
- package/dist/components/bs-list-item.js +1 -0
- package/dist/components/bs-list.d.ts +11 -0
- package/dist/components/bs-list.js +1 -0
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-message-list.js +1 -1
- package/dist/components/bs-message.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-onboarding-checklist.js +1 -1
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-popover.js +1 -1
- package/dist/components/bs-product-tour.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-qr-code.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-search-item.d.ts +11 -0
- package/dist/components/bs-search-item.js +1 -0
- package/dist/components/bs-session-timeout.js +1 -1
- package/dist/components/bs-shortcut-row.d.ts +11 -0
- package/dist/components/bs-shortcut-row.js +1 -0
- package/dist/components/bs-side-panel.js +1 -1
- package/dist/components/bs-skeleton.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-spinner.js +1 -1
- package/dist/components/bs-split-pane.js +1 -1
- package/dist/components/bs-stack.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-timepicker.js +1 -1
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip-trigger.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/bs-tree-item.d.ts +11 -0
- package/dist/components/bs-tree-item.js +1 -0
- package/dist/components/bs-tree.d.ts +11 -0
- package/dist/components/bs-tree.js +1 -0
- package/dist/components/bs-whats-new-entry.js +1 -1
- package/dist/components/bs-whats-new.js +1 -1
- package/dist/components/{p-GTDI4Ibw.js → p-B32Kl4IB.js} +1 -1
- package/dist/components/{p-B128GX8H.js → p-BDnZvjlq.js} +1 -1
- package/dist/components/{p-Bqe4waKJ.js → p-BUpnOUIM.js} +1 -1
- package/dist/components/p-BcYNrEOB.js +1 -0
- package/dist/components/{p-B80vOwH6.js → p-BcbaiZLh.js} +1 -1
- package/dist/components/p-Bp3DIxjT.js +1 -0
- package/dist/components/p-CH5atin4.js +1 -0
- package/dist/components/{p-kDJsWjTN.js → p-CRM1wIX9.js} +1 -1
- package/dist/components/{p-Mf1jorXP.js → p-CYzBTzzf.js} +1 -1
- package/dist/components/p-CervX0wH.js +1 -0
- package/dist/components/{p-ElcsxZSh.js → p-Cpe2k7ZC.js} +1 -1
- package/dist/components/{p-BvYkZcOU.js → p-D7AXo5NT.js} +1 -1
- package/dist/components/{p-B3l4WpgS.js → p-D8bvv9QQ.js} +1 -1
- package/dist/components/{p-ByKcHsj0.js → p-DG9eT5yi.js} +1 -1
- package/dist/components/{p-D0KM1R2i.js → p-DMLfXpva.js} +1 -1
- package/dist/components/{p-CQjSDdH7.js → p-DYDk73TF.js} +1 -1
- package/dist/components/{p-C7RZ6qZC.js → p-DcjgRtSQ.js} +1 -1
- package/dist/components/p-Dt4JNhHT.js +1 -0
- package/dist/components/{p-CK7fiES5.js → p-DtYTs9Kh.js} +1 -1
- package/dist/components/{p-BsbtyRJV.js → p-TAY9S9yG.js} +1 -1
- package/dist/components/{p-ByLUtXxO.js → p-w-DkdA4O.js} +1 -1
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-accordion-group.entry.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-app-shell.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-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-citation-preview.entry.js +1 -1
- package/dist/esm/bs-command-palette.entry.js +372 -0
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-container.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-datepicker.entry.js +1 -1
- package/dist/esm/bs-divider.entry.js +1 -1
- package/dist/esm/bs-empty-state.entry.js +45 -0
- package/dist/esm/bs-error-page.entry.js +1 -1
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-global-search.entry.js +324 -0
- package/dist/esm/bs-grid.entry.js +2 -2
- package/dist/esm/bs-icon-button.entry.js +1 -1
- package/dist/esm/bs-icon-tile.entry.js +2 -2
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/bs-input_3.entry.js +4 -4
- package/dist/esm/bs-key-caps.entry.js +37 -0
- package/dist/esm/bs-key.entry.js +26 -0
- package/dist/esm/bs-keyboard-shortcuts.entry.js +110 -0
- package/dist/esm/bs-list-item.entry.js +64 -0
- package/dist/esm/bs-list.entry.js +101 -0
- package/dist/esm/bs-message-list.entry.js +1 -1
- package/dist/esm/bs-message.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +2 -2
- package/dist/esm/bs-navigation-header.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-popover.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +2 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-qr-code.entry.js +1 -1
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-search-item.entry.js +45 -0
- package/dist/esm/bs-session-timeout.entry.js +1 -1
- package/dist/esm/bs-shortcut-row.entry.js +25 -0
- package/dist/esm/bs-skeleton.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-spinner.entry.js +1 -1
- package/dist/esm/bs-split-pane.entry.js +1 -1
- package/dist/esm/bs-stack.entry.js +1 -1
- 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_3.entry.js +3 -3
- package/dist/esm/bs-timepicker.entry.js +2 -2
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/bs-tree-item.entry.js +92 -0
- package/dist/esm/bs-tree.entry.js +195 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-command-palette/bs-command-palette.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.d.ts +172 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.stories.d.ts +56 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.d.ts +50 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.stories.d.ts +13 -0
- package/dist/types/components/bs-global-search/bs-global-search.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-global-search/bs-global-search.d.ts +166 -0
- package/dist/types/components/bs-global-search/bs-global-search.stories.d.ts +61 -0
- package/dist/types/components/bs-key/bs-key.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key/bs-key.d.ts +36 -0
- package/dist/types/components/bs-key/bs-key.stories.d.ts +11 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.d.ts +31 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.stories.d.ts +15 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.d.ts +95 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.d.ts +43 -0
- package/dist/types/components/bs-list/bs-list.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-list/bs-list.d.ts +42 -0
- package/dist/types/components/bs-list/bs-list.stories.d.ts +13 -0
- package/dist/types/components/bs-list-item/bs-list-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-list-item/bs-list-item.d.ts +85 -0
- package/dist/types/components/bs-list-item/bs-list-item.stories.d.ts +22 -0
- package/dist/types/components/bs-search-item/bs-search-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-search-item/bs-search-item.d.ts +61 -0
- package/dist/types/components/bs-search-item/bs-search-item.stories.d.ts +13 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.d.ts +38 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.stories.d.ts +13 -0
- package/dist/types/components/bs-tree/bs-tree.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tree/bs-tree.d.ts +53 -0
- package/dist/types/components/bs-tree/bs-tree.stories.d.ts +11 -0
- package/dist/types/components/bs-tree-item/bs-tree-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tree-item/bs-tree-item.d.ts +60 -0
- package/dist/types/components/bs-tree-item/bs-tree-item.stories.d.ts +19 -0
- package/dist/types/components.d.ts +2700 -199
- package/package.json +1 -1
- package/reference.d.ts +36 -0
- package/reference.json +1076 -47
- package/dist/brandsync-wc/p-769c5b4a.entry.js +0 -1
- package/dist/brandsync-wc/p-e5f50e93.entry.js +0 -1
- package/dist/brandsync-wc/p-e72dd05e.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as r,H as o,c as e,h as
|
|
1
|
+
import{t as s,p as r,H as o,c as e,h as a}from"./p-B2gx7SZk.js";const n=r(class extends o{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsAction=e(this,"bsAction"),this.bsClose=e(this,"bsClose")}type="error";message="This is a message";showIcon=!0;showButton=!1;actionLabel="Continue";loading=!1;closeLabel="Dismiss";allowClose=!0;bsAction;bsClose;onActionClick=()=>{this.bsAction.emit()};onCloseClick=()=>{this.bsClose.emit()};roleForType(){return"error"===this.type||"warning"===this.type?"alert":"status"}renderDefaultIcon(){return a(this.loading?t:"error"===this.type||"warning"===this.type?i:b,null)}render(){return a("div",{key:"9a18ded6392d5374cdf4357650498f1eff8bc896",role:this.roleForType(),"aria-busy":this.loading?"true":void 0,class:"bs-composer-status-banner bs-composer-status-banner--"+this.type},a("div",{key:"8acfc215792a889e80d01a08e86a0aa96bfe8967",class:"bs-composer-status-banner__message-group"},this.showIcon&&a("span",{key:"2a4e0a5fe6b4f2fef30d534eae0c15009f813d33",part:"icon",class:"bs-composer-status-banner__icon"},a("slot",{key:"5378cfaf8b1fed689eedac4f6a2bf892dda043f8",name:"icon"},this.renderDefaultIcon())),a("p",{key:"9fe869051bbf300c12f0ec8006d409abf4bebf56",part:"message",class:"bs-composer-status-banner__message"},this.message)),this.showButton&&a("button",{key:"6fe2f55c57523ee917ae6d96e2a070f1006f0a44",type:"button",part:"action",class:"bs-composer-status-banner__action",onClick:this.onActionClick},this.actionLabel),this.allowClose&&a("button",{key:"18d5ec846134a57c11c46810bb0b35acac0a20b6",type:"button",part:"close",class:"bs-composer-status-banner__close","aria-label":this.closeLabel,onClick:this.onCloseClick},a(c,{key:"cbf7993e299eacc8a05efc55cf0dc4539ba9d424"})))}static get style(){return":host{display:block;--bs-composer-status-banner-radius:var(--bs-border-radius-150);--bs-composer-status-banner-padding-x:var(--bs-spacing-150);--bs-composer-status-banner-padding-top:var(--bs-spacing-100);--bs-composer-status-banner-padding-bottom:var(--bs-spacing-200);--bs-composer-status-banner-gap:var(--bs-spacing-100);--bs-composer-status-banner-icon-gap:var(--bs-spacing-75);--bs-composer-status-banner-error-bg:var(--bs-color-error-container);--bs-composer-status-banner-error-text:var(--bs-text-error);--bs-composer-status-banner-error-action-bg:var(--bs-color-error-default);--bs-composer-status-banner-error-action-bg-hover:var(--bs-color-error-hover);--bs-composer-status-banner-info-bg:var(--bs-color-info-container);--bs-composer-status-banner-info-text:var(--bs-text-info);--bs-composer-status-banner-info-action-bg:var(--bs-color-info-default);--bs-composer-status-banner-info-action-bg-hover:var(--bs-color-info-hover);--bs-composer-status-banner-neutral-bg:var(--bs-color-neutral-container);--bs-composer-status-banner-neutral-text:var(--bs-text-default);--bs-composer-status-banner-neutral-action-bg:var(--bs-color-neutral-container);--bs-composer-status-banner-neutral-action-bg-hover:var(--bs-color-neutral-container-hover);--bs-composer-status-banner-neutral-action-border:var(--bs-border-neutral-container);--bs-composer-status-banner-warning-bg:var(--bs-color-warning-container);--bs-composer-status-banner-warning-text:var(--bs-text-warning);--bs-composer-status-banner-warning-action-bg:var(--bs-color-warning-default);--bs-composer-status-banner-warning-action-bg-hover:var(--bs-color-warning-hover);--bs-composer-status-banner-close-hover-bg:var(--bs-color-neutral-container-hover)}.bs-composer-status-banner{box-sizing:border-box;display:flex;align-items:center;gap:var(--bs-composer-status-banner-gap);padding:var(--bs-composer-status-banner-padding-top) var(--bs-composer-status-banner-padding-x) var(--bs-composer-status-banner-padding-bottom);border-radius:var(--bs-composer-status-banner-radius) var(--bs-composer-status-banner-radius) 0 0;font-family:inherit}.bs-composer-status-banner--error{background:var(--bs-composer-status-banner-error-bg);color:var(--bs-composer-status-banner-error-text)}.bs-composer-status-banner--info{background:var(--bs-composer-status-banner-info-bg);color:var(--bs-composer-status-banner-info-text)}.bs-composer-status-banner--neutral{background:var(--bs-composer-status-banner-neutral-bg);color:var(--bs-composer-status-banner-neutral-text)}.bs-composer-status-banner--warning{background:var(--bs-composer-status-banner-warning-bg);color:var(--bs-composer-status-banner-warning-text)}.bs-composer-status-banner__message-group{box-sizing:border-box;display:flex;align-items:center;flex:1 0 0;min-width:0;gap:var(--bs-composer-status-banner-icon-gap)}.bs-composer-status-banner__icon{display:inline-flex;flex-shrink:0;width:20px;height:20px}.bs-composer-status-banner__icon ::slotted(*){display:block;width:100%;height:100%}.bs-composer-status-banner__message{margin:0;flex:1 0 0;min-width:0;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);word-break:break-word}.bs-composer-status-banner__action{box-sizing:border-box;flex-shrink:0;height:32px;padding:0 var(--bs-spacing-150);border:none;border-radius:var(--bs-border-radius-100);color:var(--bs-text-on-action);font-family:inherit;font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:calc(var(--bs-line-height-body-sm) * 1px);cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer-status-banner--error .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-error-action-bg)}.bs-composer-status-banner--error .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-error-action-bg-hover)}.bs-composer-status-banner--info .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-info-action-bg)}.bs-composer-status-banner--info .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-info-action-bg-hover)}.bs-composer-status-banner--warning .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-warning-action-bg)}.bs-composer-status-banner--warning .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-warning-action-bg-hover)}.bs-composer-status-banner--neutral .bs-composer-status-banner__action{background:var(--bs-composer-status-banner-neutral-action-bg);border:var(--bs-border-width-thin) solid var(--bs-composer-status-banner-neutral-action-border);color:var(--bs-text-default)}.bs-composer-status-banner--neutral .bs-composer-status-banner__action:hover{background:var(--bs-composer-status-banner-neutral-action-bg-hover)}.bs-composer-status-banner__close{box-sizing:border-box;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:32px;height:32px;padding:0;background:transparent;border:none;border-radius:var(--bs-border-radius-100);color:inherit;cursor:pointer;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer-status-banner__close:hover{background:var(--bs-composer-status-banner-close-hover-bg)}.bs-composer-status-banner__close svg{width:20px;height:20px}.bs-composer-status-banner__close:focus-visible,.bs-composer-status-banner__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:1px}.bs-composer-status-banner__spinner{animation:bs-composer-status-banner-spin 1s linear infinite}@keyframes bs-composer-status-banner-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.bs-composer-status-banner__spinner{animation-duration:4s}}"}},[769,"bs-composer-status-banner",{type:[1],message:[1],showIcon:[4,"show-icon"],showButton:[4,"show-button"],actionLabel:[1,"action-label"],loading:[4],closeLabel:[1,"close-label"],allowClose:[4,"allow-close"]}]),t=()=>a("svg",{class:"bs-composer-status-banner__spinner",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("circle",{cx:"10",cy:"10",r:"7.25",stroke:"currentColor","stroke-opacity":"0.25","stroke-width":"1.5"}),a("path",{d:"M17.25 10A7.25 7.25 0 0 0 10 2.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),b=()=>a("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("circle",{cx:"10",cy:"10",r:"7.25",stroke:"currentColor","stroke-width":"1.3"}),a("path",{d:"M10 5.83V10L12.5 11.67",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round","stroke-linejoin":"round"})),i=()=>a("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("path",{d:"M10 3L18 17H2L10 3Z",stroke:"currentColor","stroke-width":"1.3","stroke-linejoin":"round"}),a("path",{d:"M10 8V11.5",stroke:"currentColor","stroke-width":"1.3","stroke-linecap":"round"}),a("circle",{cx:"10",cy:"14",r:"0.75",fill:"currentColor"})),c=()=>a("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("path",{d:"M15 5L5 15",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M15 15L5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function u(){"undefined"!=typeof customElements&&["bs-composer-status-banner"].forEach((r=>{"bs-composer-status-banner"===r&&(customElements.get(s(r))||customElements.define(s(r),n))}))}u();const p=n,l=u;export{p as BsComposerStatusBanner,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as s,H as e,c as r,h as t}from"./p-B2gx7SZk.js";const i={ai:"Ask Genie something...",human:"Message your support agent..."},a=[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,18,14,34,22,22,10,28,18,12,24,6,20,30,14,8,26,16,32,10,22,18,12,28,8,20,14,24,10,16,30,12,22,6,18,26,8,14,32,20,10,24,6],c=s(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.bsInput=r(this,"bsInput"),this.bsSubmit=r(this,"bsSubmit"),this.bsStop=r(this,"bsStop"),this.bsVoiceConfirm=r(this,"bsVoiceConfirm"),this.bsAttach=r(this,"bsAttach"),this.bsMicToggle=r(this,"bsMicToggle")}get el(){return this}inputEl;variant="ai";placeholder;value="";state="idle";ariaLabel=null;loading=!1;maxLength;hideAttach=!1;hideMic=!1;attachLabel="Attach";micLabel="Start voice input";stopRecordingLabel="Stop recording";sendLabel="Send";stopLabel="Stop";confirmLabel="Confirm";hasAttachments=!1;bsInput;bsSubmit;bsStop;bsVoiceConfirm;bsAttach;bsMicToggle;componentWillLoad(){this.hasAttachments=Array.from(this.el.childNodes).some((o=>o.nodeType===Node.ELEMENT_NODE&&"attachments"===o.getAttribute("slot")))}componentDidLoad(){this.resizeInput()}componentDidUpdate(){this.resizeInput()}resizeInput(){this.inputEl&&(this.inputEl.style.height="auto",this.inputEl.style.height=this.inputEl.scrollHeight+"px")}onAttachmentsSlotchange=o=>{this.hasAttachments=o.target.assignedNodes().length>0};onInput=o=>{const s=o.target.value;this.value=s,this.resizeInput(),this.bsInput.emit(s)};onInputKeydown=o=>{"Enter"!==o.key||o.shiftKey||"disabled"===this.state||(o.preventDefault(),this.onActionClick())};onAttachClick=()=>{this.bsAttach.emit()};onMicClick=()=>{this.bsMicToggle.emit()};onActionClick=()=>{if("idle"===this.state){if(this.loading||!this.value.trim())return;this.bsSubmit.emit()}else"generating"===this.state?this.bsStop.emit():"recording"===this.state&&this.bsVoiceConfirm.emit()};actionLabel(){return"generating"===this.state?this.stopLabel:"recording"===this.state?this.confirmLabel:this.sendLabel}renderActionIcon(){return t(this.loading&&"idle"===this.state?n:"generating"===this.state?p:"recording"===this.state?h:l,null)}render(){const o=this.placeholder??i[this.variant],s="disabled"===this.state,e="recording"===this.state;return t("div",{key:"2ce76ec3bd4b265f11bb99dee3a3c90d9172597c",class:`bs-composer bs-composer--${this.state} bs-composer--${this.variant}`},t("div",{key:"413304d4f29b85642bf75beb879a9551d5be8263",part:"attachments",class:"bs-composer__attachments-row "+(this.hasAttachments?"bs-composer__attachments-row--visible":"")},t("slot",{key:"e548c8e0f26f25748f4873c22ad97431f9de3ce8",name:"attachments",onSlotchange:this.onAttachmentsSlotchange})),t("div",{key:"1df76f515366b9ef952714b8454b6aa36fd905c8",class:"bs-composer__text-row"},t("textarea",{key:"27f0367c0eb47824e66f41cd6d90838e18116b7a",ref:o=>this.inputEl=o,part:"input",class:"bs-composer__input",rows:1,value:this.value,placeholder:o,disabled:s,maxLength:this.maxLength,"aria-label":this.ariaLabel,onInput:this.onInput,onKeyDown:this.onInputKeydown})),t("div",{key:"b27a014146d993fc41d80c233365964de65cf34c",class:"bs-composer__controls-row"},!this.hideAttach&&t("button",{key:"b1fe110b360b29a371a68626a1507213e11facf1",type:"button",part:"attach",class:"bs-composer__attach","aria-label":this.attachLabel,onClick:this.onAttachClick},t(b,{key:"b925e8b4e010f17594edf604401423b00ff72cba"})),e?t("span",{class:"bs-composer__waveform","aria-hidden":"true"},a.map((o=>t("span",{class:"bs-composer__waveform-bar",style:{"--bs-composer-bar-height":o+"px"}})))):t("span",{class:"bs-composer__spacer"}),!this.hideMic&&t("button",{key:"52248240911d69cbb69d11ef2368a9dbce2d545a",type:"button",part:"mic",class:"bs-composer__mic "+(e?"bs-composer__mic--recording":""),"aria-label":e?this.stopRecordingLabel:this.micLabel,disabled:s,onClick:this.onMicClick},t(e?p:d,null)),t("button",{key:"653e4a36899abaddb91ebf975e53514b400d2497",type:"button",part:"action",class:"bs-composer__action bs-composer__action--"+this.state,"aria-label":this.actionLabel(),disabled:s,"aria-busy":this.loading&&"idle"===this.state?"true":void 0,onClick:this.onActionClick},this.renderActionIcon()),t("slot",{key:"de551ed30be4f5008c58c4ec441daf8842209edd",name:"actions-end"})))}static get delegatesFocus(){return!0}static get style(){return":host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-550);--bs-composer-bg:var(--bs-input-bg-default);--bs-composer-border:var(--bs-input-border-default);--bs-composer-border-focus:var(--bs-input-border-focus);--bs-composer-border-human:var(--bs-border-neutral-hover);--bs-composer-action-bg:var(--bs-color-primary-default);--bs-composer-action-bg-hover:var(--bs-color-primary-hover);--bs-composer-action-bg-pressed:var(--bs-color-primary-pressed);--bs-composer-action-bg-disabled:var(--bs-surface-action-disabled);--bs-composer-action-icon:var(--bs-text-on-action);--bs-composer-action-icon-disabled:var(--bs-text-on-disabled);--bs-composer-attach-icon:var(--bs-icon-default);--bs-composer-mic-icon:var(--bs-icon-default);--bs-composer-mic-icon-disabled:var(--bs-icon-disabled);--bs-composer-mic-recording-icon:var(--bs-icon-default);--bs-composer-subtle-hover:var(--bs-color-neutral-container);--bs-composer-subtle-pressed:var(--bs-color-neutral-container-pressed);--bs-composer-waveform-color:var(--bs-border-default);--bs-composer-input-max-lines:10}.bs-composer{box-sizing:border-box;display:flex;flex-direction:column;border:1px solid var(--bs-composer-border);border-radius:var(--bs-composer-radius);background:var(--bs-composer-bg);font-family:inherit}.bs-composer--human{border-style:dashed;border-color:var(--bs-composer-border-human)}.bs-composer:focus-within{border-color:var(--bs-composer-border-focus)}.bs-composer__attachments-row{display:none}.bs-composer__attachments-row--visible{display:block}.bs-composer__text-row{display:flex;align-items:center;gap:var(--bs-spacing-150);padding:var(--bs-spacing-150)}.bs-composer__input{flex:1;min-width:0;box-sizing:border-box;padding:0;border:none;outline:none;resize:none;background:transparent;color:var(--bs-input-text);font-family:inherit;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);max-height:calc(var(--bs-composer-input-max-lines) * var(--bs-line-height-body-md) * 1px);overflow-y:auto}.bs-composer__input::placeholder{color:var(--bs-input-placeholder)}.bs-composer__input:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-composer__waveform{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:3px;overflow:hidden}.bs-composer__waveform-bar{display:inline-block;flex-shrink:0;width:2.5px;border-radius:1.5px;background:var(--bs-composer-waveform-color);height:var(--bs-composer-bar-height, 6px)}.bs-composer__controls-row{display:flex;align-items:center;gap:var(--bs-spacing-100);padding:var(--bs-spacing-150)}.bs-composer__spacer{flex:1}.bs-composer__attach,.bs-composer__mic,.bs-composer__action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;font-family:inherit;border-radius:var(--bs-composer-button-radius);width:var(--bs-composer-button-size);height:var(--bs-composer-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer__attach:focus-visible,.bs-composer__mic:focus-visible,.bs-composer__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-composer__attach svg,.bs-composer__mic svg,.bs-composer__action svg{width:24px;height:24px}.bs-composer__attach,.bs-composer__mic{background:transparent}.bs-composer__attach:hover:not(:disabled),.bs-composer__mic:hover:not(:disabled){background:var(--bs-composer-subtle-hover)}.bs-composer__attach:active:not(:disabled),.bs-composer__mic:active:not(:disabled){background:var(--bs-composer-subtle-pressed)}.bs-composer__attach{color:var(--bs-composer-attach-icon)}.bs-composer__mic{color:var(--bs-composer-mic-icon)}.bs-composer__mic--recording{color:var(--bs-composer-mic-recording-icon)}.bs-composer__mic:disabled{color:var(--bs-composer-mic-icon-disabled);cursor:not-allowed}.bs-composer__action{background:var(--bs-composer-action-bg);color:var(--bs-composer-action-icon)}.bs-composer__action:hover:not(:disabled){background:var(--bs-composer-action-bg-hover)}.bs-composer__action:active:not(:disabled){background:var(--bs-composer-action-bg-pressed)}.bs-composer__action:disabled{background:var(--bs-composer-action-bg-disabled);color:var(--bs-composer-action-icon-disabled);cursor:not-allowed}.bs-composer__spinner{animation:bs-composer-spin 1s linear infinite}@keyframes bs-composer-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.bs-composer__spinner{animation-duration:4s}}"}},[785,"bs-composer",{variant:[1],placeholder:[1],value:[1025],state:[513],ariaLabel:[1,"aria-label"],loading:[4],maxLength:[2,"max-length"],hideAttach:[4,"hide-attach"],hideMic:[4,"hide-mic"],attachLabel:[1,"attach-label"],micLabel:[1,"mic-label"],stopRecordingLabel:[1,"stop-recording-label"],sendLabel:[1,"send-label"],stopLabel:[1,"stop-label"],confirmLabel:[1,"confirm-label"],hasAttachments:[32]}]),n=()=>t("svg",{class:"bs-composer__spinner",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("circle",{cx:"10",cy:"10",r:"7.25",stroke:"currentColor","stroke-opacity":"0.25","stroke-width":"1.5"}),t("path",{d:"M17.25 10A7.25 7.25 0 0 0 10 2.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),b=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 2.5V13.5M2.5 8H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),d=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 9.5C9.10457 9.5 10 8.60457 10 7.5V3.5C10 2.39543 9.10457 1.5 8 1.5C6.89543 1.5 6 2.39543 6 3.5V7.5C6 8.60457 6.89543 9.5 8 9.5Z",stroke:"currentColor","stroke-width":"1.4"}),t("path",{d:"M3.5 7V7.5C3.5 9.98528 5.51472 12 8 12C10.4853 12 12.5 9.98528 12.5 7.5V7",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),t("path",{d:"M8 12V14.5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})),l=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M13.5 12H7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M4.54594 20.745C4.4932 20.889 4.48589 21.0457 4.52499 21.1941C4.56409 21.3424 4.64771 21.4751 4.76459 21.5744C4.88147 21.6737 5.02599 21.7348 5.17866 21.7494C5.33133 21.7641 5.48482 21.7315 5.61844 21.6562L21.3684 12.6478C21.4857 12.583 21.5834 12.4879 21.6514 12.3725C21.7195 12.2571 21.7553 12.1255 21.7553 11.9916C21.7553 11.8576 21.7195 11.7261 21.6514 11.6107C21.5834 11.4952 21.4857 11.4002 21.3684 11.3353L5.61844 2.34937C5.48523 2.27487 5.33245 2.24278 5.18052 2.2574C5.02859 2.27201 4.88474 2.33264 4.76817 2.43117C4.65161 2.5297 4.56788 2.66145 4.52817 2.80882C4.48846 2.9562 4.49466 3.11218 4.54594 3.25594L7.5 12L4.54594 20.745Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),p=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("rect",{x:"6",y:"6",width:"8",height:"8",rx:"1.5",fill:"currentColor"})),h=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M4.5 10.5L8 14L15.5 6",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}));function m(){"undefined"!=typeof customElements&&["bs-composer"].forEach((s=>{"bs-composer"===s&&(customElements.get(o(s))||customElements.define(o(s),c))}))}m();const u=c,v=m;export{u as BsComposer,v as defineCustomElement}
|
|
1
|
+
import{t as o,p as s,H as e,c as r,h as t}from"./p-B2gx7SZk.js";const i={ai:"Ask Genie something...",human:"Message your support agent..."},a=[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,18,14,34,22,22,10,28,18,12,24,6,20,30,14,8,26,16,32,10,22,18,12,28,8,20,14,24,10,16,30,12,22,6,18,26,8,14,32,20,10,24,6],c=s(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.bsInput=r(this,"bsInput"),this.bsSubmit=r(this,"bsSubmit"),this.bsStop=r(this,"bsStop"),this.bsVoiceConfirm=r(this,"bsVoiceConfirm"),this.bsAttach=r(this,"bsAttach"),this.bsMicToggle=r(this,"bsMicToggle")}get el(){return this}inputEl;variant="ai";placeholder;value="";state="idle";ariaLabel=null;loading=!1;maxLength;hideAttach=!1;hideMic=!1;attachLabel="Attach";micLabel="Start voice input";stopRecordingLabel="Stop recording";sendLabel="Send";stopLabel="Stop";confirmLabel="Confirm";hasAttachments=!1;bsInput;bsSubmit;bsStop;bsVoiceConfirm;bsAttach;bsMicToggle;componentWillLoad(){this.hasAttachments=Array.from(this.el.childNodes).some((o=>o.nodeType===Node.ELEMENT_NODE&&"attachments"===o.getAttribute("slot")))}componentDidLoad(){this.resizeInput()}componentDidUpdate(){this.resizeInput()}resizeInput(){this.inputEl&&(this.inputEl.style.height="auto",this.inputEl.style.height=this.inputEl.scrollHeight+"px")}onAttachmentsSlotchange=o=>{this.hasAttachments=o.target.assignedNodes().length>0};onInput=o=>{const s=o.target.value;this.value=s,this.resizeInput(),this.bsInput.emit(s)};onInputKeydown=o=>{"Enter"!==o.key||o.shiftKey||"disabled"===this.state||(o.preventDefault(),this.onActionClick())};onAttachClick=()=>{this.bsAttach.emit()};onMicClick=()=>{this.bsMicToggle.emit()};onActionClick=()=>{if("idle"===this.state){if(this.loading||!this.value.trim())return;this.bsSubmit.emit()}else"generating"===this.state?this.bsStop.emit():"recording"===this.state&&this.bsVoiceConfirm.emit()};actionLabel(){return"generating"===this.state?this.stopLabel:"recording"===this.state?this.confirmLabel:this.sendLabel}renderActionIcon(){return t(this.loading&&"idle"===this.state?n:"generating"===this.state?p:"recording"===this.state?h:l,null)}render(){const o=this.placeholder??i[this.variant],s="disabled"===this.state,e="recording"===this.state;return t("div",{key:"f1ccd8ab2299efcf83dc8f858845e87ba87f9c41",class:`bs-composer bs-composer--${this.state} bs-composer--${this.variant}`},t("div",{key:"2edd5ab5b6a67d108d2f8067a639e74b6ab4f39f",part:"attachments",class:"bs-composer__attachments-row "+(this.hasAttachments?"bs-composer__attachments-row--visible":"")},t("slot",{key:"a7b2acfea4b2498792749e24aaf9329e521a93df",name:"attachments",onSlotchange:this.onAttachmentsSlotchange})),t("div",{key:"0de284b100f38a60b472eadfd89f06690023a1a1",class:"bs-composer__text-row"},t("textarea",{key:"0c46b8e4f54234b2df62af566f0b6bf9b1f978d1",ref:o=>this.inputEl=o,part:"input",class:"bs-composer__input",rows:1,value:this.value,placeholder:o,disabled:s,maxLength:this.maxLength,"aria-label":this.ariaLabel,onInput:this.onInput,onKeyDown:this.onInputKeydown})),t("div",{key:"a3ca22299095e398b6dd7a62c9b6ce93a4d49dab",class:"bs-composer__controls-row"},!this.hideAttach&&t("button",{key:"c06cad301027ce2fdef180189945bebd2f876081",type:"button",part:"attach",class:"bs-composer__attach","aria-label":this.attachLabel,onClick:this.onAttachClick},t(b,{key:"d863cc1734ca9b67447b2cbbe19a2ba75266d169"})),e?t("span",{class:"bs-composer__waveform","aria-hidden":"true"},a.map((o=>t("span",{class:"bs-composer__waveform-bar",style:{"--bs-composer-bar-height":o+"px"}})))):t("span",{class:"bs-composer__spacer"}),!this.hideMic&&t("button",{key:"aadf13bf18c9215045cf7ea326bbc1495ab21288",type:"button",part:"mic",class:"bs-composer__mic "+(e?"bs-composer__mic--recording":""),"aria-label":e?this.stopRecordingLabel:this.micLabel,disabled:s,onClick:this.onMicClick},t(e?p:d,null)),t("button",{key:"36ca7d3824349cd65473553e0a20b14c41b74b8b",type:"button",part:"action",class:"bs-composer__action bs-composer__action--"+this.state,"aria-label":this.actionLabel(),disabled:s,"aria-busy":this.loading&&"idle"===this.state?"true":void 0,onClick:this.onActionClick},this.renderActionIcon()),t("slot",{key:"0965e567d4cb590d7cd072ecf72c10c2c97e1f69",name:"actions-end"})))}static get delegatesFocus(){return!0}static get style(){return":host{display:block;--bs-composer-radius:var(--bs-border-radius-150);--bs-composer-button-radius:var(--bs-border-radius-100);--bs-composer-button-size:var(--bs-spacing-550);--bs-composer-bg:var(--bs-input-bg-default);--bs-composer-border:var(--bs-input-border-default);--bs-composer-border-focus:var(--bs-input-border-focus);--bs-composer-border-human:var(--bs-border-neutral-hover);--bs-composer-action-bg:var(--bs-color-primary-default);--bs-composer-action-bg-hover:var(--bs-color-primary-hover);--bs-composer-action-bg-pressed:var(--bs-color-primary-pressed);--bs-composer-action-bg-disabled:var(--bs-surface-action-disabled);--bs-composer-action-icon:var(--bs-text-on-action);--bs-composer-action-icon-disabled:var(--bs-text-on-disabled);--bs-composer-attach-icon:var(--bs-icon-default);--bs-composer-mic-icon:var(--bs-icon-default);--bs-composer-mic-icon-disabled:var(--bs-icon-disabled);--bs-composer-mic-recording-icon:var(--bs-icon-default);--bs-composer-subtle-hover:var(--bs-color-neutral-container);--bs-composer-subtle-pressed:var(--bs-color-neutral-container-pressed);--bs-composer-waveform-color:var(--bs-border-default);--bs-composer-input-max-lines:10}.bs-composer{box-sizing:border-box;display:flex;flex-direction:column;border:1px solid var(--bs-composer-border);border-radius:var(--bs-composer-radius);background:var(--bs-composer-bg);font-family:inherit}.bs-composer--human{border-style:dashed;border-color:var(--bs-composer-border-human)}.bs-composer:focus-within{border-color:var(--bs-composer-border-focus)}.bs-composer__attachments-row{display:none}.bs-composer__attachments-row--visible{display:block}.bs-composer__text-row{display:flex;align-items:center;gap:var(--bs-spacing-150);padding:var(--bs-spacing-150)}.bs-composer__input{flex:1;min-width:0;box-sizing:border-box;padding:0;border:none;outline:none;resize:none;background:transparent;color:var(--bs-input-text);font-family:inherit;font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px);max-height:calc(var(--bs-composer-input-max-lines) * var(--bs-line-height-body-md) * 1px);overflow-y:auto}.bs-composer__input::placeholder{color:var(--bs-input-placeholder)}.bs-composer__input:disabled{color:var(--bs-input-text-disabled);cursor:not-allowed}.bs-composer__waveform{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:3px;overflow:hidden}.bs-composer__waveform-bar{display:inline-block;flex-shrink:0;width:2.5px;border-radius:1.5px;background:var(--bs-composer-waveform-color);height:var(--bs-composer-bar-height, 6px)}.bs-composer__controls-row{display:flex;align-items:center;gap:var(--bs-spacing-100);padding:var(--bs-spacing-150)}.bs-composer__spacer{flex:1}.bs-composer__attach,.bs-composer__mic,.bs-composer__action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border:none;padding:0;cursor:pointer;font-family:inherit;border-radius:var(--bs-composer-button-radius);width:var(--bs-composer-button-size);height:var(--bs-composer-button-size);flex-shrink:0;transition:background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-composer__attach:focus-visible,.bs-composer__mic:focus-visible,.bs-composer__action:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-composer__attach svg,.bs-composer__mic svg,.bs-composer__action svg{width:24px;height:24px}.bs-composer__attach,.bs-composer__mic{background:transparent}.bs-composer__attach:hover:not(:disabled),.bs-composer__mic:hover:not(:disabled){background:var(--bs-composer-subtle-hover)}.bs-composer__attach:active:not(:disabled),.bs-composer__mic:active:not(:disabled){background:var(--bs-composer-subtle-pressed)}.bs-composer__attach{color:var(--bs-composer-attach-icon)}.bs-composer__mic{color:var(--bs-composer-mic-icon)}.bs-composer__mic--recording{color:var(--bs-composer-mic-recording-icon)}.bs-composer__mic:disabled{color:var(--bs-composer-mic-icon-disabled);cursor:not-allowed}.bs-composer__action{background:var(--bs-composer-action-bg);color:var(--bs-composer-action-icon)}.bs-composer__action:hover:not(:disabled){background:var(--bs-composer-action-bg-hover)}.bs-composer__action:active:not(:disabled){background:var(--bs-composer-action-bg-pressed)}.bs-composer__action:disabled{background:var(--bs-composer-action-bg-disabled);color:var(--bs-composer-action-icon-disabled);cursor:not-allowed}.bs-composer__spinner{animation:bs-composer-spin 1s linear infinite}@keyframes bs-composer-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.bs-composer__spinner{animation-duration:4s}}"}},[785,"bs-composer",{variant:[1],placeholder:[1],value:[1025],state:[513],ariaLabel:[1,"aria-label"],loading:[4],maxLength:[2,"max-length"],hideAttach:[4,"hide-attach"],hideMic:[4,"hide-mic"],attachLabel:[1,"attach-label"],micLabel:[1,"mic-label"],stopRecordingLabel:[1,"stop-recording-label"],sendLabel:[1,"send-label"],stopLabel:[1,"stop-label"],confirmLabel:[1,"confirm-label"],hasAttachments:[32]}]),n=()=>t("svg",{class:"bs-composer__spinner",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("circle",{cx:"10",cy:"10",r:"7.25",stroke:"currentColor","stroke-opacity":"0.25","stroke-width":"1.5"}),t("path",{d:"M17.25 10A7.25 7.25 0 0 0 10 2.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),b=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 2.5V13.5M2.5 8H13.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})),d=()=>t("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M8 9.5C9.10457 9.5 10 8.60457 10 7.5V3.5C10 2.39543 9.10457 1.5 8 1.5C6.89543 1.5 6 2.39543 6 3.5V7.5C6 8.60457 6.89543 9.5 8 9.5Z",stroke:"currentColor","stroke-width":"1.4"}),t("path",{d:"M3.5 7V7.5C3.5 9.98528 5.51472 12 8 12C10.4853 12 12.5 9.98528 12.5 7.5V7",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"}),t("path",{d:"M8 12V14.5",stroke:"currentColor","stroke-width":"1.4","stroke-linecap":"round"})),l=()=>t("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M13.5 12H7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("path",{d:"M4.54594 20.745C4.4932 20.889 4.48589 21.0457 4.52499 21.1941C4.56409 21.3424 4.64771 21.4751 4.76459 21.5744C4.88147 21.6737 5.02599 21.7348 5.17866 21.7494C5.33133 21.7641 5.48482 21.7315 5.61844 21.6562L21.3684 12.6478C21.4857 12.583 21.5834 12.4879 21.6514 12.3725C21.7195 12.2571 21.7553 12.1255 21.7553 11.9916C21.7553 11.8576 21.7195 11.7261 21.6514 11.6107C21.5834 11.4952 21.4857 11.4002 21.3684 11.3353L5.61844 2.34937C5.48523 2.27487 5.33245 2.24278 5.18052 2.2574C5.02859 2.27201 4.88474 2.33264 4.76817 2.43117C4.65161 2.5297 4.56788 2.66145 4.52817 2.80882C4.48846 2.9562 4.49466 3.11218 4.54594 3.25594L7.5 12L4.54594 20.745Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),p=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("rect",{x:"6",y:"6",width:"8",height:"8",rx:"1.5",fill:"currentColor"})),h=()=>t("svg",{viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{d:"M4.5 10.5L8 14L15.5 6",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"}));function m(){"undefined"!=typeof customElements&&["bs-composer"].forEach((s=>{"bs-composer"===s&&(customElements.get(o(s))||customElements.define(o(s),c))}))}m();const u=c,v=m;export{u as BsComposer,v as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as
|
|
1
|
+
import{t as s,p as e,H as n,h as i,d as t}from"./p-B2gx7SZk.js";const a=["0","25","50","75","100","150","200","250","300","350","400","500","550","600","700","800","1000","1200","1500"],o=e(class extends n{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow()}size="xl";padding="300";render(){const s=a.includes(this.padding+"")?this.padding+"":"300";return i(t,{key:"af5052dbda078e66b8afcf84e842f124748353b9",style:{"--bs-container-padding-token":`var(--bs-spacing-${s})`}},i("slot",{key:"2493e7614d7fcaf07b24e350e68a65b06fd77640"}))}static get style(){return":host{display:block;box-sizing:border-box;width:100%;margin-inline:auto;max-width:var(--bs-container-max-width, var(--bs-container-size, var(--bs-breakpoint-xl)));padding-inline:var(--bs-container-padding, var(--bs-container-padding-token, var(--bs-spacing-300)))}:host([size='sm']){--bs-container-size:var(--bs-breakpoint-sm)}:host([size='md']){--bs-container-size:var(--bs-breakpoint-md)}:host([size='lg']){--bs-container-size:var(--bs-breakpoint-lg)}:host([size='xl']){--bs-container-size:var(--bs-breakpoint-xl)}:host([size='2xl']){--bs-container-size:var(--bs-breakpoint-2xl)}:host([size='fluid']){--bs-container-size:none}"}},[769,"bs-container",{size:[513],padding:[1]}]);function r(){"undefined"!=typeof customElements&&["bs-container"].forEach((e=>{"bs-container"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))}r();const b=o,c=r;export{b as BsContainer,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as s,H as o,c as n,h as t}from"./p-B2gx7SZk.js";import{d as i}from"./p-DYuzgzxI.js";import{d as c}from"./p-DvNED6Lb.js";import{d as a}from"./p-CRtvJlh8.js";import{d as r}from"./p-GTDI4Ibw.js";import{d as b}from"./p-B80vOwH6.js";import{d as l}from"./p-CQjSDdH7.js";import{d}from"./p-D0KM1R2i.js";const p=s(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsAccept=n(this,"bsAccept"),this.bsReject=n(this,"bsReject"),this.bsCustomise=n(this,"bsCustomise"),this.bsSave=n(this,"bsSave"),this.bsChoice=n(this,"bsChoice"),this.bsClose=n(this,"bsClose"),this.bsManage=n(this,"bsManage")}type="banner";heading;headingLevel=2;description;policyUrl;policyLabel="Read the cookie policy";customiseLabel="Customise";rejectLabel="Reject optional";acceptLabel="Accept all";saveLabel="Save choices";changeLabel="Change";alwaysOnLabel="Always on";seeCookiesLabel="See {count} cookies";closeLabel="Close";categories=[{id:"necessary",label:"Strictly necessary",description:"Needed for sign-in, security and to keep the service running. These cannot be turned off.",required:!0,cookies:["Session cookie — keeps you signed in as you move between pages.","Security cookie — helps prevent fraud and unauthorized access.","Consent cookie — remembers your cookie consent choices."]},{id:"preferences",label:"Preferences",description:"Remember your language, theme and table layouts on this device.",enabled:!0},{id:"analytics",label:"Analytics",description:"Help us understand which features are used so we can improve them. Data is anonymised."},{id:"marketing",label:"Marketing",description:"Show relevant products on other websites."}];bsAccept;bsReject;bsCustomise;bsSave;bsChoice;bsClose;bsManage;choices={};open={};componentWillLoad(){this.resetChoices()}onCategoriesChange(){this.resetChoices()}resetChoices(){const e={};(this.categories??[]).forEach((s=>e[s.id]=!!s.required||!!s.enabled)),this.choices=e}all(e){const s={};return(this.categories??[]).forEach((o=>s[o.id]="required"===e?!!o.required:e)),s}get defaults(){return k[this.type]??k.banner}heading_(e){const s=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||2));return t("h"+s,{part:"heading",id:"heading",class:{"bs-cookie-consent__heading":!0}},e)}policy(){return this.policyUrl?t("a",{part:"policy",class:"bs-cookie-consent__policy",href:this.policyUrl},this.policyLabel):null}customise(){return t("bs-button",{part:"customise",class:"bs-cookie-consent__text-button",variant:"subtle",onClick:()=>this.bsCustomise.emit()},this.customiseLabel)}reject(e="outlined"){return t("bs-button",{part:"reject",variant:e,onClick:()=>this.bsReject.emit({choices:this.all("required")})},this.rejectLabel)}accept(e="primary"){return t("bs-button",{part:"accept",variant:e,onClick:()=>this.bsAccept.emit({choices:this.all(!0)})},this.acceptLabel)}renderBanner(e){return t("bs-card",{part:"container",class:"bs-cookie-consent bs-cookie-consent--banner",surface:"base",role:"region","aria-labelledby":"heading"},t("div",{class:"bs-cookie-consent__banner"},t("div",{class:"bs-cookie-consent__banner-content"},t("bs-icon-tile",{part:"art",size:"lg"},t("slot",{name:"icon"},t(h,null))),t("div",{class:"bs-cookie-consent__copy"},this.heading_(this.heading??e.heading),t("p",{part:"description",class:"bs-cookie-consent__description"},this.description??e.description),this.policy())),t("div",{part:"actions",class:"bs-cookie-consent__actions bs-cookie-consent__actions--banner"},this.customise(),this.reject(),this.accept())))}renderCard(e){return t("bs-card",{part:"container",class:"bs-cookie-consent bs-cookie-consent--card",surface:"base",role:"region","aria-labelledby":"heading"},t("div",{class:"bs-cookie-consent__card"},t("div",{class:"bs-cookie-consent__head"},t("bs-icon-tile",{part:"art",size:"md"},t("slot",{name:"icon"},t(h,null))),this.heading_(this.heading??e.heading)),t("p",{part:"description",class:"bs-cookie-consent__description"},this.description??e.description),this.policy(),t("div",{class:"bs-cookie-consent__rule"}),t("div",{part:"actions",class:"bs-cookie-consent__actions bs-cookie-consent__actions--card"},this.customise(),t("span",{class:"bs-cookie-consent__spacer"}),this.reject(),this.accept())))}renderCategory(e,s){const o=!!this.open[e.id],n=e.cookies?.length??0,i="cookies-"+e.id;return[t("div",{part:"category",class:"bs-cookie-consent__category"},t("div",{class:{"bs-cookie-consent__category-head":!0,"bs-cookie-consent__category-head--switch":!e.required}},t("span",{class:"bs-cookie-consent__category-name"},e.label),e.required?t("bs-chip-informative",{size:"sm",color:"neutral"},this.alwaysOnLabel):t("bs-switch",{part:"switch",size:"md",ariaLabel:e.label,checked:!!this.choices[e.id],onBsChange:s=>{this.choices={...this.choices,[e.id]:s.detail},this.bsChoice.emit({id:e.id,enabled:s.detail})}})),e.description&&t("p",{class:"bs-cookie-consent__category-text"},e.description),n>0&&t("div",{class:"bs-cookie-consent__details"},t("button",{type:"button",class:"bs-cookie-consent__disclosure","aria-expanded":o+"","aria-controls":i,onClick:()=>this.open={...this.open,[e.id]:!o}},t("span",null,this.seeCookiesLabel.replace("{count}",n+"")),t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},t("path",{d:o?"M6 15L12 9L18 15":"M6 9L12 15L18 9"}))),o&&t("ol",{id:i,class:"bs-cookie-consent__cookie-list"},e.cookies.map((e=>t("li",null,e)))))),!s&&t("div",{class:"bs-cookie-consent__rule"})]}renderPreferences(e){const s=this.categories??[];return t("bs-card",{part:"container",class:"bs-cookie-consent bs-cookie-consent--preferences",surface:"base",role:"group","aria-labelledby":"heading"},t("div",{class:"bs-cookie-consent__prefs"},t("div",{class:"bs-cookie-consent__head"},t("bs-icon-tile",{part:"art",size:"md"},t("slot",{name:"icon"},t(h,null))),this.heading_(this.heading??e.heading),t("span",{class:"bs-cookie-consent__spacer"}),t("bs-icon-button",{part:"close",variant:"subtle",size:"md",ariaLabel:this.closeLabel,onClick:()=>this.bsClose.emit()},t("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","aria-hidden":"true"},t("path",{d:"M5 5L15 15M15 5L5 15"})))),t("p",{part:"description",class:"bs-cookie-consent__description"},this.description??e.description),s.map(((e,o)=>this.renderCategory(e,o===s.length-1))),t("div",{class:"bs-cookie-consent__rule"}),t("div",{part:"actions",class:"bs-cookie-consent__actions bs-cookie-consent__actions--prefs"},this.reject(),this.accept("outlined"),t("span",{class:"bs-cookie-consent__spacer"}),t("bs-button",{part:"save",variant:"primary",onClick:()=>this.bsSave.emit({choices:{...this.choices}})},this.saveLabel))))}renderSaved(e){return t("bs-snackbar",{part:"container",class:"bs-cookie-consent bs-cookie-consent--saved",actionLabel:this.changeLabel,actionVariant:"subtle",hideClose:!0,onBsAction:()=>this.bsManage.emit()},this.description??e.description)}render(){const e=this.defaults;switch(this.type){case"card":return this.renderCard(e);case"preferences":return this.renderPreferences(e);case"saved":return this.renderSaved(e);default:return this.renderBanner(e)}}static get watchers(){return{categories:[{onCategoriesChange:0}]}}static get style(){return":host{display:block;container-type:inline-size;max-width:100%;--bs-cookie-consent-width:420px;--bs-cookie-consent-bg:var(--bs-paper-bg-base);--bs-cookie-consent-radius:var(--bs-border-radius-150);--bs-cookie-consent-padding:var(--bs-spacing-200);--bs-cookie-consent-shadow:0 8px 8px var(--bs-elevation-higher);--bs-cookie-consent-color:var(--bs-text-default);--bs-cookie-consent-color-secondary:var(--bs-text-secondary);--bs-cookie-consent-link:var(--bs-text-link);--bs-cookie-consent-link-underline:var(--bs-border-info);--bs-cookie-consent-rule:var(--bs-border-default)}:host([type='card']){width:var(--bs-cookie-consent-width)}:host([type='preferences']){--bs-cookie-consent-width:560px;width:var(--bs-cookie-consent-width)}:host([type='saved']){--bs-cookie-consent-width:660px;width:var(--bs-cookie-consent-width)}.bs-cookie-consent--banner,.bs-cookie-consent--card,.bs-cookie-consent--preferences{--bs-card-bg:var(--bs-cookie-consent-bg);--bs-card-radius:var(--bs-cookie-consent-radius);--bs-card-padding:var(--bs-cookie-consent-padding);--bs-card-shadow:var(--bs-cookie-consent-shadow);color:var(--bs-cookie-consent-color)}.bs-cookie-consent p{margin:0}.bs-cookie-consent__glyph,::slotted([slot='icon']){width:var(--bs-cookie-consent-glyph-size, 24px);height:var(--bs-cookie-consent-glyph-size, 24px)}bs-icon-tile[size='md']{--bs-cookie-consent-glyph-size:16px}.bs-cookie-consent__heading{margin:0;font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:32px}.bs-cookie-consent__description{color:var(--bs-cookie-consent-color-secondary);font-size:var(--bs-font-size-md);line-height:24px}.bs-cookie-consent__policy{align-self:flex-start;border-bottom:1px solid var(--bs-cookie-consent-link-underline);color:var(--bs-cookie-consent-link);font-size:var(--bs-font-size-sm);line-height:20px;text-decoration:none}.bs-cookie-consent__policy:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-cookie-consent__rule{height:8px;background:linear-gradient(var(--bs-cookie-consent-rule), var(--bs-cookie-consent-rule)) center / 100% 1px no-repeat}.bs-cookie-consent__spacer{flex:1 1 0}.bs-cookie-consent__actions bs-button{--bs-button-height-md:var(--bs-spacing-550)}.bs-cookie-consent__text-button{--bs-button-subtle-color:var(--bs-text-action)}.bs-cookie-consent__actions--banner bs-button{min-width:140px}.bs-cookie-consent__actions bs-button[part='reject']{min-width:140px}.bs-cookie-consent__actions bs-button[part='accept']{min-width:103px}.bs-cookie-consent__actions--banner bs-button[part='accept']{min-width:140px}.bs-cookie-consent__actions bs-button[part='save']{min-width:127px}.bs-cookie-consent__actions bs-button[part='customise']{min-width:109px}.bs-cookie-consent__actions--banner bs-button[part='customise']{min-width:140px}.bs-cookie-consent__banner{display:flex;align-items:center;gap:var(--bs-spacing-200)}.bs-cookie-consent__banner-content{display:flex;align-items:flex-start;gap:var(--bs-spacing-200);flex:1 1 0;min-width:0}bs-icon-tile{flex:none}.bs-cookie-consent__copy{display:flex;flex-direction:column;align-items:flex-start;gap:var(--bs-spacing-100);min-width:0}.bs-cookie-consent__actions{display:flex;align-items:center;gap:var(--bs-spacing-100)}.bs-cookie-consent__actions--banner{flex:none;justify-content:flex-end}@container (max-width: 719px){.bs-cookie-consent__banner{flex-direction:column;align-items:stretch}.bs-cookie-consent__banner-content{flex-direction:column;gap:var(--bs-spacing-150)}.bs-cookie-consent__actions--banner{flex-direction:column-reverse;align-items:stretch}.bs-cookie-consent__actions--banner bs-button{--bs-button-width:100%}}.bs-cookie-consent__card{display:flex;flex-direction:column;gap:var(--bs-spacing-100)}.bs-cookie-consent__prefs{display:flex;flex-direction:column;gap:var(--bs-spacing-150)}.bs-cookie-consent__card .bs-cookie-consent__policy{margin-bottom:0}.bs-cookie-consent__head{display:flex;align-items:center;gap:10px}.bs-cookie-consent--preferences .bs-cookie-consent__head{gap:var(--bs-spacing-100)}.bs-cookie-consent__head .bs-cookie-consent__heading{min-width:0}.bs-cookie-consent__head bs-icon-button svg{width:20px;height:20px}.bs-cookie-consent__actions--card,.bs-cookie-consent__actions--prefs{gap:var(--bs-spacing-100)}.bs-cookie-consent__actions--card{align-items:flex-end;justify-content:space-between}.bs-cookie-consent__category{display:flex;flex-direction:column;gap:6px}.bs-cookie-consent__prefs>.bs-cookie-consent__description+.bs-cookie-consent__category{padding:6px 0}.bs-cookie-consent__category-head{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-cookie-consent__category-head--switch{min-height:48px}.bs-cookie-consent__category-head--switch+.bs-cookie-consent__category-text{margin-top:-6px}.bs-cookie-consent__category-name{font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-semibold);line-height:20px}.bs-cookie-consent__category-text{color:var(--bs-cookie-consent-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-cookie-consent__disclosure{display:inline-flex;align-items:center;gap:var(--bs-spacing-100);min-height:32px;padding:0;border:none;background:transparent;color:var(--bs-text-action);font-family:inherit;font-size:var(--bs-font-size-md);font-weight:var(--bs-font-weight-semibold);line-height:24px;cursor:pointer}.bs-cookie-consent__disclosure svg{width:24px;height:24px}.bs-cookie-consent__disclosure:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px;border-radius:var(--bs-border-radius-50)}.bs-cookie-consent__cookie-list{margin:0;padding-inline-start:21px;color:var(--bs-cookie-consent-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-cookie-consent--saved{display:block;--bs-snackbar-icon-size:32px;--bs-snackbar-gap:0px}.bs-cookie-consent--saved::part(action){--bs-button-subtle-color:var(--bs-snackbar-text-default);--bs-button-subtle-hover:color-mix(in srgb, var(--bs-snackbar-text-default) 16%, transparent);--bs-button-subtle-pressed:color-mix(in srgb, var(--bs-snackbar-text-default) 24%, transparent);--bs-button-height-sm:var(--bs-spacing-550);--bs-button-padding-x-sm:var(--bs-spacing-200)}"}},[769,"bs-cookie-consent",{type:[513],heading:[1],headingLevel:[2,"heading-level"],description:[1],policyUrl:[1,"policy-url"],policyLabel:[1,"policy-label"],customiseLabel:[1,"customise-label"],rejectLabel:[1,"reject-label"],acceptLabel:[1,"accept-label"],saveLabel:[1,"save-label"],changeLabel:[1,"change-label"],alwaysOnLabel:[1,"always-on-label"],seeCookiesLabel:[1,"see-cookies-label"],closeLabel:[1,"close-label"],categories:[16],choices:[32],open:[32]},void 0,{categories:[{onCategoriesChange:0}]}]),h=()=>t("svg",{class:"bs-cookie-consent__glyph",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},t("path",{d:"M20.5 12.5A8.5 8.5 0 1 1 11.5 3.5A3.2 3.2 0 0 0 15 7A3.2 3.2 0 0 0 18.5 9.5A3 3 0 0 0 20.5 12.5Z"}),t("path",{d:"M9 9V9.01"}),t("path",{d:"M8.5 14.5V14.51"}),t("path",{d:"M13 13V13.01"}),t("path",{d:"M14 17V17.01"})),k={banner:{heading:"Your cookie choices",description:"We use necessary cookies to keep you signed in and secure. With your permission we also use cookies to remember your preferences and to understand how this service is used."},card:{heading:"Cookies on this site",description:"We use necessary cookies to keep you signed in. May we also use optional cookies for preferences and analytics?"},preferences:{heading:"Cookie preferences",description:"Choose which optional cookies we may use. You can change this at any time in your privacy settings."},saved:{heading:"",description:"Cookie choices saved. You can change them any time in your privacy settings."}};function u(){"undefined"!=typeof customElements&&["bs-cookie-consent","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-icon-tile","bs-snackbar","bs-switch"].forEach((s=>{switch(s){case"bs-cookie-consent":customElements.get(e(s))||customElements.define(e(s),p);break;case"bs-button":customElements.get(e(s))||i();break;case"bs-card":customElements.get(e(s))||c();break;case"bs-chip-informative":customElements.get(e(s))||a();break;case"bs-icon-button":customElements.get(e(s))||r();break;case"bs-icon-tile":customElements.get(e(s))||b();break;case"bs-snackbar":customElements.get(e(s))||l();break;case"bs-switch":customElements.get(e(s))||d()}}))}u();const _=p,g=u;export{_ as BsCookieConsent,g as defineCustomElement}
|
|
1
|
+
import{t as e,p as s,H as o,c as n,h as t}from"./p-B2gx7SZk.js";import{d as i}from"./p-DYuzgzxI.js";import{d as c}from"./p-DvNED6Lb.js";import{d as a}from"./p-CRtvJlh8.js";import{d as r}from"./p-B32Kl4IB.js";import{d as b}from"./p-BcbaiZLh.js";import{d as l}from"./p-DYDk73TF.js";import{d}from"./p-DMLfXpva.js";const p=s(class extends o{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsAccept=n(this,"bsAccept"),this.bsReject=n(this,"bsReject"),this.bsCustomise=n(this,"bsCustomise"),this.bsSave=n(this,"bsSave"),this.bsChoice=n(this,"bsChoice"),this.bsClose=n(this,"bsClose"),this.bsManage=n(this,"bsManage")}type="banner";heading;headingLevel=2;description;policyUrl;policyLabel="Read the cookie policy";customiseLabel="Customise";rejectLabel="Reject optional";acceptLabel="Accept all";saveLabel="Save choices";changeLabel="Change";alwaysOnLabel="Always on";seeCookiesLabel="See {count} cookies";closeLabel="Close";categories=[{id:"necessary",label:"Strictly necessary",description:"Needed for sign-in, security and to keep the service running. These cannot be turned off.",required:!0,cookies:["Session cookie — keeps you signed in as you move between pages.","Security cookie — helps prevent fraud and unauthorized access.","Consent cookie — remembers your cookie consent choices."]},{id:"preferences",label:"Preferences",description:"Remember your language, theme and table layouts on this device.",enabled:!0},{id:"analytics",label:"Analytics",description:"Help us understand which features are used so we can improve them. Data is anonymised."},{id:"marketing",label:"Marketing",description:"Show relevant products on other websites."}];bsAccept;bsReject;bsCustomise;bsSave;bsChoice;bsClose;bsManage;choices={};open={};componentWillLoad(){this.resetChoices()}onCategoriesChange(){this.resetChoices()}resetChoices(){const e={};(this.categories??[]).forEach((s=>e[s.id]=!!s.required||!!s.enabled)),this.choices=e}all(e){const s={};return(this.categories??[]).forEach((o=>s[o.id]="required"===e?!!o.required:e)),s}get defaults(){return k[this.type]??k.banner}heading_(e){const s=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||2));return t("h"+s,{part:"heading",id:"heading",class:{"bs-cookie-consent__heading":!0}},e)}policy(){return this.policyUrl?t("a",{part:"policy",class:"bs-cookie-consent__policy",href:this.policyUrl},this.policyLabel):null}customise(){return t("bs-button",{part:"customise",class:"bs-cookie-consent__text-button",variant:"subtle",onClick:()=>this.bsCustomise.emit()},this.customiseLabel)}reject(e="outlined"){return t("bs-button",{part:"reject",variant:e,onClick:()=>this.bsReject.emit({choices:this.all("required")})},this.rejectLabel)}accept(e="primary"){return t("bs-button",{part:"accept",variant:e,onClick:()=>this.bsAccept.emit({choices:this.all(!0)})},this.acceptLabel)}renderBanner(e){return t("bs-card",{part:"container",class:"bs-cookie-consent bs-cookie-consent--banner",surface:"base",role:"region","aria-labelledby":"heading"},t("div",{class:"bs-cookie-consent__banner"},t("div",{class:"bs-cookie-consent__banner-content"},t("bs-icon-tile",{part:"art",size:"lg"},t("slot",{name:"icon"},t(h,null))),t("div",{class:"bs-cookie-consent__copy"},this.heading_(this.heading??e.heading),t("p",{part:"description",class:"bs-cookie-consent__description"},this.description??e.description),this.policy())),t("div",{part:"actions",class:"bs-cookie-consent__actions bs-cookie-consent__actions--banner"},this.customise(),this.reject(),this.accept())))}renderCard(e){return t("bs-card",{part:"container",class:"bs-cookie-consent bs-cookie-consent--card",surface:"base",role:"region","aria-labelledby":"heading"},t("div",{class:"bs-cookie-consent__card"},t("div",{class:"bs-cookie-consent__head"},t("bs-icon-tile",{part:"art",size:"md"},t("slot",{name:"icon"},t(h,null))),this.heading_(this.heading??e.heading)),t("p",{part:"description",class:"bs-cookie-consent__description"},this.description??e.description),this.policy(),t("div",{class:"bs-cookie-consent__rule"}),t("div",{part:"actions",class:"bs-cookie-consent__actions bs-cookie-consent__actions--card"},this.customise(),t("span",{class:"bs-cookie-consent__spacer"}),this.reject(),this.accept())))}renderCategory(e,s){const o=!!this.open[e.id],n=e.cookies?.length??0,i="cookies-"+e.id;return[t("div",{part:"category",class:"bs-cookie-consent__category"},t("div",{class:{"bs-cookie-consent__category-head":!0,"bs-cookie-consent__category-head--switch":!e.required}},t("span",{class:"bs-cookie-consent__category-name"},e.label),e.required?t("bs-chip-informative",{size:"sm",color:"neutral"},this.alwaysOnLabel):t("bs-switch",{part:"switch",size:"md",ariaLabel:e.label,checked:!!this.choices[e.id],onBsChange:s=>{this.choices={...this.choices,[e.id]:s.detail},this.bsChoice.emit({id:e.id,enabled:s.detail})}})),e.description&&t("p",{class:"bs-cookie-consent__category-text"},e.description),n>0&&t("div",{class:"bs-cookie-consent__details"},t("button",{type:"button",class:"bs-cookie-consent__disclosure","aria-expanded":o+"","aria-controls":i,onClick:()=>this.open={...this.open,[e.id]:!o}},t("span",null,this.seeCookiesLabel.replace("{count}",n+"")),t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},t("path",{d:o?"M6 15L12 9L18 15":"M6 9L12 15L18 9"}))),o&&t("ol",{id:i,class:"bs-cookie-consent__cookie-list"},e.cookies.map((e=>t("li",null,e)))))),!s&&t("div",{class:"bs-cookie-consent__rule"})]}renderPreferences(e){const s=this.categories??[];return t("bs-card",{part:"container",class:"bs-cookie-consent bs-cookie-consent--preferences",surface:"base",role:"group","aria-labelledby":"heading"},t("div",{class:"bs-cookie-consent__prefs"},t("div",{class:"bs-cookie-consent__head"},t("bs-icon-tile",{part:"art",size:"md"},t("slot",{name:"icon"},t(h,null))),this.heading_(this.heading??e.heading),t("span",{class:"bs-cookie-consent__spacer"}),t("bs-icon-button",{part:"close",variant:"subtle",size:"md",ariaLabel:this.closeLabel,onClick:()=>this.bsClose.emit()},t("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","aria-hidden":"true"},t("path",{d:"M5 5L15 15M15 5L5 15"})))),t("p",{part:"description",class:"bs-cookie-consent__description"},this.description??e.description),s.map(((e,o)=>this.renderCategory(e,o===s.length-1))),t("div",{class:"bs-cookie-consent__rule"}),t("div",{part:"actions",class:"bs-cookie-consent__actions bs-cookie-consent__actions--prefs"},this.reject(),this.accept("outlined"),t("span",{class:"bs-cookie-consent__spacer"}),t("bs-button",{part:"save",variant:"primary",onClick:()=>this.bsSave.emit({choices:{...this.choices}})},this.saveLabel))))}renderSaved(e){return t("bs-snackbar",{part:"container",class:"bs-cookie-consent bs-cookie-consent--saved",actionLabel:this.changeLabel,actionVariant:"subtle",hideClose:!0,onBsAction:()=>this.bsManage.emit()},this.description??e.description)}render(){const e=this.defaults;switch(this.type){case"card":return this.renderCard(e);case"preferences":return this.renderPreferences(e);case"saved":return this.renderSaved(e);default:return this.renderBanner(e)}}static get watchers(){return{categories:[{onCategoriesChange:0}]}}static get style(){return":host{display:block;container-type:inline-size;max-width:100%;--bs-cookie-consent-width:420px;--bs-cookie-consent-bg:var(--bs-paper-bg-base);--bs-cookie-consent-radius:var(--bs-border-radius-150);--bs-cookie-consent-padding:var(--bs-spacing-200);--bs-cookie-consent-shadow:0 8px 8px var(--bs-elevation-higher);--bs-cookie-consent-color:var(--bs-text-default);--bs-cookie-consent-color-secondary:var(--bs-text-secondary);--bs-cookie-consent-link:var(--bs-text-link);--bs-cookie-consent-link-underline:var(--bs-border-info);--bs-cookie-consent-rule:var(--bs-border-default)}:host([type='card']){width:var(--bs-cookie-consent-width)}:host([type='preferences']){--bs-cookie-consent-width:560px;width:var(--bs-cookie-consent-width)}:host([type='saved']){--bs-cookie-consent-width:660px;width:var(--bs-cookie-consent-width)}.bs-cookie-consent--banner,.bs-cookie-consent--card,.bs-cookie-consent--preferences{--bs-card-bg:var(--bs-cookie-consent-bg);--bs-card-radius:var(--bs-cookie-consent-radius);--bs-card-padding:var(--bs-cookie-consent-padding);--bs-card-shadow:var(--bs-cookie-consent-shadow);color:var(--bs-cookie-consent-color)}.bs-cookie-consent p{margin:0}.bs-cookie-consent__glyph,::slotted([slot='icon']){width:var(--bs-cookie-consent-glyph-size, 24px);height:var(--bs-cookie-consent-glyph-size, 24px)}bs-icon-tile[size='md']{--bs-cookie-consent-glyph-size:16px}.bs-cookie-consent__heading{margin:0;font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:32px}.bs-cookie-consent__description{color:var(--bs-cookie-consent-color-secondary);font-size:var(--bs-font-size-md);line-height:24px}.bs-cookie-consent__policy{align-self:flex-start;border-bottom:1px solid var(--bs-cookie-consent-link-underline);color:var(--bs-cookie-consent-link);font-size:var(--bs-font-size-sm);line-height:20px;text-decoration:none}.bs-cookie-consent__policy:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-cookie-consent__rule{height:8px;background:linear-gradient(var(--bs-cookie-consent-rule), var(--bs-cookie-consent-rule)) center / 100% 1px no-repeat}.bs-cookie-consent__spacer{flex:1 1 0}.bs-cookie-consent__actions bs-button{--bs-button-height-md:var(--bs-spacing-550)}.bs-cookie-consent__text-button{--bs-button-subtle-color:var(--bs-text-action)}.bs-cookie-consent__actions--banner bs-button{min-width:140px}.bs-cookie-consent__actions bs-button[part='reject']{min-width:140px}.bs-cookie-consent__actions bs-button[part='accept']{min-width:103px}.bs-cookie-consent__actions--banner bs-button[part='accept']{min-width:140px}.bs-cookie-consent__actions bs-button[part='save']{min-width:127px}.bs-cookie-consent__actions bs-button[part='customise']{min-width:109px}.bs-cookie-consent__actions--banner bs-button[part='customise']{min-width:140px}.bs-cookie-consent__banner{display:flex;align-items:center;gap:var(--bs-spacing-200)}.bs-cookie-consent__banner-content{display:flex;align-items:flex-start;gap:var(--bs-spacing-200);flex:1 1 0;min-width:0}bs-icon-tile{flex:none}.bs-cookie-consent__copy{display:flex;flex-direction:column;align-items:flex-start;gap:var(--bs-spacing-100);min-width:0}.bs-cookie-consent__actions{display:flex;align-items:center;gap:var(--bs-spacing-100)}.bs-cookie-consent__actions--banner{flex:none;justify-content:flex-end}@container (max-width: 719px){.bs-cookie-consent__banner{flex-direction:column;align-items:stretch}.bs-cookie-consent__banner-content{flex-direction:column;gap:var(--bs-spacing-150)}.bs-cookie-consent__actions--banner{flex-direction:column-reverse;align-items:stretch}.bs-cookie-consent__actions--banner bs-button{--bs-button-width:100%}}.bs-cookie-consent__card{display:flex;flex-direction:column;gap:var(--bs-spacing-100)}.bs-cookie-consent__prefs{display:flex;flex-direction:column;gap:var(--bs-spacing-150)}.bs-cookie-consent__card .bs-cookie-consent__policy{margin-bottom:0}.bs-cookie-consent__head{display:flex;align-items:center;gap:10px}.bs-cookie-consent--preferences .bs-cookie-consent__head{gap:var(--bs-spacing-100)}.bs-cookie-consent__head .bs-cookie-consent__heading{min-width:0}.bs-cookie-consent__head bs-icon-button svg{width:20px;height:20px}.bs-cookie-consent__actions--card,.bs-cookie-consent__actions--prefs{gap:var(--bs-spacing-100)}.bs-cookie-consent__actions--card{align-items:flex-end;justify-content:space-between}.bs-cookie-consent__category{display:flex;flex-direction:column;gap:6px}.bs-cookie-consent__prefs>.bs-cookie-consent__description+.bs-cookie-consent__category{padding:6px 0}.bs-cookie-consent__category-head{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-cookie-consent__category-head--switch{min-height:48px}.bs-cookie-consent__category-head--switch+.bs-cookie-consent__category-text{margin-top:-6px}.bs-cookie-consent__category-name{font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-semibold);line-height:20px}.bs-cookie-consent__category-text{color:var(--bs-cookie-consent-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-cookie-consent__disclosure{display:inline-flex;align-items:center;gap:var(--bs-spacing-100);min-height:32px;padding:0;border:none;background:transparent;color:var(--bs-text-action);font-family:inherit;font-size:var(--bs-font-size-md);font-weight:var(--bs-font-weight-semibold);line-height:24px;cursor:pointer}.bs-cookie-consent__disclosure svg{width:24px;height:24px}.bs-cookie-consent__disclosure:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px;border-radius:var(--bs-border-radius-50)}.bs-cookie-consent__cookie-list{margin:0;padding-inline-start:21px;color:var(--bs-cookie-consent-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-cookie-consent--saved{display:block;--bs-snackbar-icon-size:32px;--bs-snackbar-gap:0px}.bs-cookie-consent--saved::part(action){--bs-button-subtle-color:var(--bs-snackbar-text-default);--bs-button-subtle-hover:color-mix(in srgb, var(--bs-snackbar-text-default) 16%, transparent);--bs-button-subtle-pressed:color-mix(in srgb, var(--bs-snackbar-text-default) 24%, transparent);--bs-button-height-sm:var(--bs-spacing-550);--bs-button-padding-x-sm:var(--bs-spacing-200)}"}},[769,"bs-cookie-consent",{type:[513],heading:[1],headingLevel:[2,"heading-level"],description:[1],policyUrl:[1,"policy-url"],policyLabel:[1,"policy-label"],customiseLabel:[1,"customise-label"],rejectLabel:[1,"reject-label"],acceptLabel:[1,"accept-label"],saveLabel:[1,"save-label"],changeLabel:[1,"change-label"],alwaysOnLabel:[1,"always-on-label"],seeCookiesLabel:[1,"see-cookies-label"],closeLabel:[1,"close-label"],categories:[16],choices:[32],open:[32]},void 0,{categories:[{onCategoriesChange:0}]}]),h=()=>t("svg",{class:"bs-cookie-consent__glyph",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},t("path",{d:"M20.5 12.5A8.5 8.5 0 1 1 11.5 3.5A3.2 3.2 0 0 0 15 7A3.2 3.2 0 0 0 18.5 9.5A3 3 0 0 0 20.5 12.5Z"}),t("path",{d:"M9 9V9.01"}),t("path",{d:"M8.5 14.5V14.51"}),t("path",{d:"M13 13V13.01"}),t("path",{d:"M14 17V17.01"})),k={banner:{heading:"Your cookie choices",description:"We use necessary cookies to keep you signed in and secure. With your permission we also use cookies to remember your preferences and to understand how this service is used."},card:{heading:"Cookies on this site",description:"We use necessary cookies to keep you signed in. May we also use optional cookies for preferences and analytics?"},preferences:{heading:"Cookie preferences",description:"Choose which optional cookies we may use. You can change this at any time in your privacy settings."},saved:{heading:"",description:"Cookie choices saved. You can change them any time in your privacy settings."}};function u(){"undefined"!=typeof customElements&&["bs-cookie-consent","bs-button","bs-card","bs-chip-informative","bs-icon-button","bs-icon-tile","bs-snackbar","bs-switch"].forEach((s=>{switch(s){case"bs-cookie-consent":customElements.get(e(s))||customElements.define(e(s),p);break;case"bs-button":customElements.get(e(s))||i();break;case"bs-card":customElements.get(e(s))||c();break;case"bs-chip-informative":customElements.get(e(s))||a();break;case"bs-icon-button":customElements.get(e(s))||r();break;case"bs-icon-tile":customElements.get(e(s))||b();break;case"bs-snackbar":customElements.get(e(s))||l();break;case"bs-switch":customElements.get(e(s))||d()}}))}u();const _=p,g=u;export{_ as BsCookieConsent,g as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as e,H as a,c as s,h as l}from"./p-B2gx7SZk.js";const
|
|
1
|
+
import{t,p as e,H as a,c as s,h as l}from"./p-B2gx7SZk.js";const o=e(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsSort=s(this,"bsSort"),this.bsRowSelect=s(this,"bsRowSelect")}columns=[];rows=[];sortColumn;sortDirection="asc";selectAllLabel="Select all rows";selectable=!1;cellRenderer;bsSort;bsRowSelect;selectedIds=new Set;onHeaderClick=t=>{t.sortable&&this.bsSort.emit({column:t.key,direction:this.sortColumn===t.key&&"asc"===this.sortDirection?"desc":"asc"})};onRowCheckboxChange=(t,e)=>{const a=e.target.checked,s=new Set(this.selectedIds);a?s.add(t.id):s.delete(t.id),this.selectedIds=s,this.bsRowSelect.emit({id:t.id,selected:a})};onSelectAllChange=t=>{const e=t.target.checked;this.selectedIds=e?new Set(this.rows.map((t=>t.id))):new Set;for(const t of this.rows)this.bsRowSelect.emit({id:t.id,selected:e})};async clearSelection(){const t=Array.from(this.selectedIds);this.selectedIds=new Set;for(const e of t)this.bsRowSelect.emit({id:e,selected:!1})}render(){return l("table",{key:"72d4058323ac137aa589476e5b89ed47bd8b996e",part:"table",class:"bs-data-table"},l("thead",{key:"65e27a1aba0b9eb6892df5b0581672c9fb18ce13",part:"head"},l("tr",{key:"690d1fab0effa5b0e9e44160ac91d77ab1290079"},this.selectable&&l("th",{key:"cf96e314093743b5e6341cf2fce3e0ac6b5e99ef",class:"bs-data-table__select-col"},this.rows.length>0&&l("input",{key:"fe6fe4d41420f9a37f11337044173ce5b13340d4",type:"checkbox","aria-label":this.selectAllLabel,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((t=>{const e=this.sortColumn===t.key;return l("th",{part:"header-cell",class:"bs-data-table__header-cell","aria-sort":t.sortable?e?"asc"===this.sortDirection?"ascending":"descending":"none":void 0},t.sortable?l("button",{type:"button",class:"bs-data-table__sort-button",onClick:()=>this.onHeaderClick(t)},t.label,e&&l("span",{class:"bs-data-table__sort-indicator"},"asc"===this.sortDirection?" ▲":" ▼")):t.label)})))),l("tbody",{key:"34e3bb93c663862d1d8b29956c22392b3c2400ac",part:"body"},this.rows.map((t=>l("tr",{part:"row",class:"bs-data-table__row"},this.selectable&&l("td",{class:"bs-data-table__select-col"},l("input",{type:"checkbox",checked:this.selectedIds.has(t.id),onChange:e=>this.onRowCheckboxChange(t,e)})),this.columns.map((e=>this.cellRenderer?l("td",{part:"cell",class:"bs-data-table__cell",innerHTML:this.cellRenderer(t,e)}):l("td",{part:"cell",class:"bs-data-table__cell"},(t[e.key]??"")+""))))))))}static get style(){return":host{display:block;--bs-data-table-cell-padding-y:var(--bs-spacing-200);--bs-data-table-cell-padding-x:var(--bs-spacing-300)}.bs-data-table{width:100%;border-collapse:collapse;font-family:inherit;font-size:var(--bs-font-size-sm);color:var(--bs-text-default)}.bs-data-table__header-cell{text-align:start;padding:var(--bs-data-table-cell-padding-y) var(--bs-data-table-cell-padding-x);border-bottom:1px solid var(--bs-border-default);font-weight:var(--bs-font-weight-semibold);color:var(--bs-text-secondary);white-space:nowrap}.bs-data-table__sort-button{display:inline-flex;align-items:center;border:none;background:none;padding:0;font:inherit;color:inherit;cursor:pointer;user-select:none}.bs-data-table__sort-button:focus-visible{outline:2px solid var(--bs-border-neutral-focus);outline-offset:2px}.bs-data-table__sort-indicator{color:var(--bs-text-action)}.bs-data-table__row:hover{background:var(--bs-surface-hover)}.bs-data-table__cell{padding:var(--bs-data-table-cell-padding-y) var(--bs-data-table-cell-padding-x);border-bottom:1px solid var(--bs-border-default)}.bs-data-table__select-col{width:var(--bs-spacing-500);padding:var(--bs-data-table-cell-padding-y) var(--bs-data-table-cell-padding-x);border-bottom:1px solid var(--bs-border-default)}"}},[513,"bs-data-table",{columns:[16],rows:[16],sortColumn:[1,"sort-column"],sortDirection:[1,"sort-direction"],selectAllLabel:[1,"select-all-label"],selectable:[4],cellRenderer:[16],selectedIds:[32],clearSelection:[64]}]);function c(){"undefined"!=typeof customElements&&["bs-data-table"].forEach((e=>{"bs-data-table"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))}c();const b=o,d=c;export{b as BsDataTable,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,c as a,h as i}from"./p-B2gx7SZk.js";import{d as r}from"./p-DvNED6Lb.js";import{d}from"./p-CRtvJlh8.js";import{d as n}from"./p-GTDI4Ibw.js";import{d as o}from"./p-B3l4WpgS.js";import{d as c}from"./p-Mf1jorXP.js";import{d as b}from"./p-BvYkZcOU.js";const l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=a(this,"bsChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";initialStart="";initialEnd="";name;range=!1;value="";start="";end="";min;max;locale="en-GB";firstDayOfWeek=0;startLabel="Start date";endLabel="End date";monthLabel="Month";yearLabel="Year";previousLabel="Previous month";nextLabel="Next month";bsChange;viewDate=k(new Date);focusedIso="";hoverIso="";draft={};openMenu=null;shouldFocusDay=!1;menuToScroll=!1;componentWillLoad(){this.initialValue=this.value,this.initialStart=this.start,this.initialEnd=this.end,this.showSelection(),this.syncFormValue()}componentDidRender(){if(this.menuToScroll){this.menuToScroll=!1;const e=()=>{const e=this.el.shadowRoot?.querySelector(".bs-datepicker__menu"),t=e?.querySelector("[data-current]");e&&t&&(e.scrollTop=t.offsetTop-e.clientHeight/2+t.offsetHeight/2)};requestAnimationFrame((()=>requestAnimationFrame(e)))}if(!this.shouldFocusDay)return;this.shouldFocusDay=!1;const e=this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);e?.focus()}onSelectionChange(){this.syncFormValue()}onSelectionJump(){this.showSelection()}formResetCallback(){this.value=this.initialValue,this.start=this.initialStart,this.end=this.initialEnd,this.draft={}}showSelection(){const e=u(this.range?this.start:this.value);e&&(this.viewDate=k(e))}syncFormValue(){if(this.internals?.setFormValue)if(this.range){if(!this.name)return void this.internals.setFormValue(null);const e=new FormData;e.append(this.name+"-start",this.start??""),e.append(this.name+"-end",this.end??""),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value??"")}isDisabled(e){const t=u(this.min),s=u(this.max);return!!t&&e<t||!!s&&e>s}selectDay(e){if(this.isDisabled(e))return;const t=h(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=k(e)),this.focusedIso=t,!this.range)return this.value=t,void this.bsChange.emit({value:t});!this.start||this.end||t<this.start?(this.start=t,this.end=""):this.end=t,this.hoverIso="",this.draft={},this.bsChange.emit({start:this.start,end:this.end})}commitDraft(e){const t=this.draft[e];if(void 0===t)return;const s=u(t),a={...this.draft};if(delete a[e],this.draft=a,!s||this.isDisabled(s))return;let i="start"===e?h(s):this.start,r="end"===e?h(s):this.end;i&&r&&r<i&&("start"===e?r="":i=""),this.start=i,this.end=r,this.showSelection(),this.bsChange.emit({start:i,end:r})}moveView(e){const t=this.viewDate;this.viewDate=new Date(t.getFullYear(),t.getMonth()+e,1)}onKeyDown=(e,t)=>{const s={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let a;if(e.key in s)a=v(t,s[e.key]);else if("Home"===e.key||"End"===e.key){const s=(t.getDay()-this.safeFirstDay+7)%7;a=v(t,"Home"===e.key?-s:6-s)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const s="PageUp"===e.key?-1:1;a=function(e,t){const s=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return new Date(s.getFullYear(),s.getMonth(),Math.min(e.getDate(),a))}(t,e.shiftKey?12*s:s)}}e.preventDefault(),this.focusedIso=h(a),this.viewDate=k(a),this.shouldFocusDay=!0};get safeFirstDay(){const e=Math.trunc(Number(this.firstDayOfWeek));return Number.isFinite(e)?(e%7+7)%7:0}get fmt(){const e=this.locale||"en-GB";try{return e}catch{return"en-GB"}}formatField(e){const t=u(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:u(this.value);return e?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"long",year:"numeric"}).format(e):new Intl.DateTimeFormat(this.fmt,{month:"long",year:"numeric"}).format(this.viewDate)}monthOptions(){const e=new Intl.DateTimeFormat(this.fmt,{month:"long"});return Array.from({length:12},((t,s)=>({label:e.format(new Date(2e3,s,1)),value:s+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=u(this.min)?.getFullYear()??e-100,s=u(this.max)?.getFullYear()??e+100,a=[];for(let i=Math.min(t,e);i<=Math.max(s,e);i++)a.push({label:i+"",value:i+""});return a}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,s)=>e.format(new Date(2023,0,1+(this.safeFirstDay+s)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,s=v(e,-t);return Array.from({length:42},((e,t)=>v(s,t)))}renderHeader(){if(this.range){const e=(e,t)=>i("bs-input",{label:t,placeholder:"YYYY-MM-DD",value:this.draft[e]??this.formatField(this[e]),onBsInput:t=>this.draft={...this.draft,[e]:t.detail},onBsChange:()=>this.commitDraft(e),onFocusin:()=>{void 0===this.draft[e]&&(this.draft={...this.draft,[e]:this[e]})},onFocusout:()=>this.commitDraft(e)});return i("div",{part:"header",class:"bs-datepicker__header bs-datepicker__header--range"},e("start",this.startLabel),e("end",this.endLabel))}return i("div",{part:"header",class:"bs-datepicker__header"},this.renderDropdown("month",this.monthLabel,this.monthOptions(),this.viewDate.getMonth()+"",(e=>this.viewDate=new Date(this.viewDate.getFullYear(),Number(e),1))),this.renderDropdown("year",this.yearLabel,this.yearOptions(),this.viewDate.getFullYear()+"",(e=>this.viewDate=new Date(Number(e),this.viewDate.getMonth(),1))))}renderDropdown(e,t,s,a,r){const d=this.openMenu===e,n=()=>{this.openMenu=null};return i("div",{class:"bs-datepicker__dropdown",onKeyDown:e=>{"Escape"===e.key&&d&&(n(),e.currentTarget.querySelector("bs-input")?.focus())},onFocusout:e=>{const t=e.relatedTarget;!d||t&&e.currentTarget.contains(t)||n()}},i("bs-input",{type:"dropdown",class:"bs-datepicker__select",label:t,value:s.find((e=>e.value===a))?.label??"",open:d,onBsOpen:()=>{this.menuToScroll=!d,this.openMenu=d?null:e}}),d&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},s.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===a?"":void 0,"aria-current":e.value===a?"true":void 0,onBsSelect:()=>{r(e.value),n(),this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${t}"]`)?.focus()}},i("span",{class:"bs-datepicker__option"},i("span",null,e.label),e.value===a&&i("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{d:"M5 12.5L10 17.5L19 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))))))}render(){const e=this.gridDays(),t=h(new Date),s=this.range?this.start:this.value,a=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:a,d=e.some((e=>h(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),n=e=>!!s&&!!r&&e>s&&e<r,o=this.weekdays();return i("bs-card",{key:"d2794a112b72b3dc871360b1e57273c9ef097fc4",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"bee55a1cd06aa44171f40babae77b1f2f742d160",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"d4ab1cfd76fcea8b64daeb951da7b36300c036f0",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"5fcbb3f928db51049fd034beb3519400afe4f128",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"18889f8f9dd9364bd73595635b72515b91d35ade",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"3d648cd4be611ef4de37cc08f9017809388d36e3",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"c0647871f1c140472807ae51e04604c6d87ccaa4",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"ec3d33aeea146534d6640ac336905a002d0e7dc2",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"5cbac8630a30064d940e5f03ce767b525c09dd7c",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"2c47ca0911b8b42cd3590ff053905df327363e9f",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"91a6942792287f3044962fd278e36ed04ec03878",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"445e0548f0913426fe2eb730f291423d9165f839",class:"bs-datepicker__row",role:"row"},o.map((e=>i("div",{part:"weekday",class:"bs-datepicker__weekday",role:"columnheader"},e)))),Array.from({length:6},((r,o)=>{const c=e.slice(7*o,7*o+7);return i("div",{class:"bs-datepicker__row",role:"row"},c.map(((e,r)=>{const o=h(e),b=e.getMonth()!==this.viewDate.getMonth(),l=o===s||!!a&&o===a,p=n(o),u={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&n(h(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&n(h(c[r+1])))},k=["day",l&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:u,role:"gridcell","aria-selected":l||p?"true":"false"},i("button",{part:k,type:"button",class:{"bs-datepicker__day":!0,"bs-datepicker__day--selected":l,"bs-datepicker__day--in-range":p,"bs-datepicker__day--outside":b,"bs-datepicker__day--today":o===t},"data-date":o,tabindex:o===d?0:-1,disabled:this.isDisabled(e),"aria-current":o===t?"date":void 0,"aria-label":new Intl.DateTimeFormat(this.fmt,{weekday:"long",day:"2-digit",month:"long",year:"numeric"}).format(e),onClick:()=>this.selectDay(e),onKeyDown:t=>this.onKeyDown(t,e),onMouseEnter:()=>{this.range&&this.start&&!this.end&&(this.hoverIso=o)}},(e.getDate()+"").padStart(2,"0")))})))})))))}defaultTabbable(e){const t=t=>e.some((e=>h(e)===t&&e.getMonth()===this.viewDate.getMonth())),s=this.range?this.start:this.value;if(s&&t(s))return s;const a=h(new Date);return t(a)?a:h(this.viewDate)}static get formAssociated(){return!0}static get watchers(){return{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}}static get style(){return":host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-paper-bg-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{width:var(--bs-datepicker-width);max-width:100%;color:var(--bs-datepicker-color);font-size:var(--bs-datepicker-font-size);--bs-card-bg:var(--bs-datepicker-bg);--bs-card-radius:var(--bs-datepicker-radius);--bs-card-padding:var(--bs-datepicker-padding);--bs-card-shadow:var(--bs-datepicker-shadow);--bs-card-overflow:visible}.bs-datepicker__body{display:flex;flex-direction:column;gap:var(--bs-datepicker-gap)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header--range>bs-input{--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}"}},[577,"bs-datepicker",{name:[513],range:[516],value:[1537],start:[1537],end:[1537],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],startLabel:[1,"start-label"],endLabel:[1,"end-label"],monthLabel:[1,"month-label"],yearLabel:[1,"year-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],viewDate:[32],focusedIso:[32],hoverIso:[32],draft:[32],openMenu:[32]},void 0,{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}]);function p(e){return(e+"").padStart(2,"0")}function h(e){return`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`}function u(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const s=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return h(s)===`${t[1]}-${t[2]}-${t[3]}`?s:void 0}function k(e){return new Date(e.getFullYear(),e.getMonth(),1)}function v(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function g(){"undefined"!=typeof customElements&&["bs-datepicker","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),l);break;case"bs-card":customElements.get(e(t))||r();break;case"bs-chip-informative":customElements.get(e(t))||d();break;case"bs-icon-button":customElements.get(e(t))||n();break;case"bs-input":customElements.get(e(t))||o();break;case"bs-menu":customElements.get(e(t))||c();break;case"bs-menu-item":customElements.get(e(t))||b()}}))}g();const f=l,m=g;export{f as BsDatepicker,m as defineCustomElement}
|
|
1
|
+
import{t as e,p as t,H as s,c as a,h as i}from"./p-B2gx7SZk.js";import{d as r}from"./p-DvNED6Lb.js";import{d as n}from"./p-CRtvJlh8.js";import{d}from"./p-B32Kl4IB.js";import{d as o}from"./p-D8bvv9QQ.js";import{d as c}from"./p-CYzBTzzf.js";import{d as b}from"./p-D7AXo5NT.js";const l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=a(this,"bsChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";initialStart="";initialEnd="";name;range=!1;value="";start="";end="";min;max;locale="en-GB";firstDayOfWeek=0;startLabel="Start date";endLabel="End date";monthLabel="Month";yearLabel="Year";previousLabel="Previous month";nextLabel="Next month";bsChange;viewDate=k(new Date);focusedIso="";hoverIso="";draft={};openMenu=null;shouldFocusDay=!1;menuToScroll=!1;componentWillLoad(){this.initialValue=this.value,this.initialStart=this.start,this.initialEnd=this.end,this.showSelection(),this.syncFormValue()}componentDidRender(){if(this.menuToScroll){this.menuToScroll=!1;const e=()=>{const e=this.el.shadowRoot?.querySelector(".bs-datepicker__menu"),t=e?.querySelector("[data-current]");e&&t&&(e.scrollTop=t.offsetTop-e.clientHeight/2+t.offsetHeight/2)};requestAnimationFrame((()=>requestAnimationFrame(e)))}if(!this.shouldFocusDay)return;this.shouldFocusDay=!1;const e=this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);e?.focus()}onSelectionChange(){this.syncFormValue()}onSelectionJump(){this.showSelection()}formResetCallback(){this.value=this.initialValue,this.start=this.initialStart,this.end=this.initialEnd,this.draft={}}showSelection(){const e=u(this.range?this.start:this.value);e&&(this.viewDate=k(e))}syncFormValue(){if(this.internals?.setFormValue)if(this.range){if(!this.name)return void this.internals.setFormValue(null);const e=new FormData;e.append(this.name+"-start",this.start??""),e.append(this.name+"-end",this.end??""),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value??"")}isDisabled(e){const t=u(this.min),s=u(this.max);return!!t&&e<t||!!s&&e>s}selectDay(e){if(this.isDisabled(e))return;const t=h(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=k(e)),this.focusedIso=t,!this.range)return this.value=t,void this.bsChange.emit({value:t});!this.start||this.end||t<this.start?(this.start=t,this.end=""):this.end=t,this.hoverIso="",this.draft={},this.bsChange.emit({start:this.start,end:this.end})}commitDraft(e){const t=this.draft[e];if(void 0===t)return;const s=u(t),a={...this.draft};if(delete a[e],this.draft=a,!s||this.isDisabled(s))return;let i="start"===e?h(s):this.start,r="end"===e?h(s):this.end;i&&r&&r<i&&("start"===e?r="":i=""),this.start=i,this.end=r,this.showSelection(),this.bsChange.emit({start:i,end:r})}moveView(e){const t=this.viewDate;this.viewDate=new Date(t.getFullYear(),t.getMonth()+e,1)}onKeyDown=(e,t)=>{const s={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let a;if(e.key in s)a=v(t,s[e.key]);else if("Home"===e.key||"End"===e.key){const s=(t.getDay()-this.safeFirstDay+7)%7;a=v(t,"Home"===e.key?-s:6-s)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const s="PageUp"===e.key?-1:1;a=function(e,t){const s=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return new Date(s.getFullYear(),s.getMonth(),Math.min(e.getDate(),a))}(t,e.shiftKey?12*s:s)}}e.preventDefault(),this.focusedIso=h(a),this.viewDate=k(a),this.shouldFocusDay=!0};get safeFirstDay(){const e=Math.trunc(Number(this.firstDayOfWeek));return Number.isFinite(e)?(e%7+7)%7:0}get fmt(){const e=this.locale||"en-GB";try{return e}catch{return"en-GB"}}formatField(e){const t=u(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:u(this.value);return e?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"long",year:"numeric"}).format(e):new Intl.DateTimeFormat(this.fmt,{month:"long",year:"numeric"}).format(this.viewDate)}monthOptions(){const e=new Intl.DateTimeFormat(this.fmt,{month:"long"});return Array.from({length:12},((t,s)=>({label:e.format(new Date(2e3,s,1)),value:s+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=u(this.min)?.getFullYear()??e-100,s=u(this.max)?.getFullYear()??e+100,a=[];for(let i=Math.min(t,e);i<=Math.max(s,e);i++)a.push({label:i+"",value:i+""});return a}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,s)=>e.format(new Date(2023,0,1+(this.safeFirstDay+s)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,s=v(e,-t);return Array.from({length:42},((e,t)=>v(s,t)))}renderHeader(){if(this.range){const e=(e,t)=>i("bs-input",{label:t,placeholder:"YYYY-MM-DD",value:this.draft[e]??this.formatField(this[e]),onBsInput:t=>this.draft={...this.draft,[e]:t.detail},onBsChange:()=>this.commitDraft(e),onFocusin:()=>{void 0===this.draft[e]&&(this.draft={...this.draft,[e]:this[e]})},onFocusout:()=>this.commitDraft(e)});return i("div",{part:"header",class:"bs-datepicker__header bs-datepicker__header--range"},e("start",this.startLabel),e("end",this.endLabel))}return i("div",{part:"header",class:"bs-datepicker__header"},this.renderDropdown("month",this.monthLabel,this.monthOptions(),this.viewDate.getMonth()+"",(e=>this.viewDate=new Date(this.viewDate.getFullYear(),Number(e),1))),this.renderDropdown("year",this.yearLabel,this.yearOptions(),this.viewDate.getFullYear()+"",(e=>this.viewDate=new Date(Number(e),this.viewDate.getMonth(),1))))}renderDropdown(e,t,s,a,r){const n=this.openMenu===e,d=()=>{this.openMenu=null};return i("div",{class:"bs-datepicker__dropdown",onKeyDown:e=>{"Escape"===e.key&&n&&(d(),e.currentTarget.querySelector("bs-input")?.focus())},onFocusout:e=>{const t=e.relatedTarget;!n||t&&e.currentTarget.contains(t)||d()}},i("bs-input",{type:"dropdown",class:"bs-datepicker__select",label:t,value:s.find((e=>e.value===a))?.label??"",open:n,onBsOpen:()=>{this.menuToScroll=!n,this.openMenu=n?null:e}}),n&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},s.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===a?"":void 0,"aria-current":e.value===a?"true":void 0,onBsSelect:()=>{r(e.value),d(),this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${t}"]`)?.focus()}},i("span",{class:"bs-datepicker__option"},i("span",null,e.label),e.value===a&&i("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{d:"M5 12.5L10 17.5L19 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))))))}render(){const e=this.gridDays(),t=h(new Date),s=this.range?this.start:this.value,a=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:a,n=e.some((e=>h(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),d=e=>!!s&&!!r&&e>s&&e<r,o=this.weekdays();return i("bs-card",{key:"280abccf2d86d04f392f4daeb9811bf34d71dc6b",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"624706b13929083f05bab4210a5c8444240f8a53",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"69d8f66f154e0e194b77b091bede097407c43902",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"089809f514e4513624749748d639ef6da997618b",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"d78f4940665d866752772f69de2e8058390bf6e5",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"f34d431a9f77b036fe4417c033f197c72780c1bf",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"36a37548a0bc04db3416f5e206c0990f0d1189eb",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"3bf5616d93ea0d5f8968691692b2b64ce6334d0b",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"5f9aac5a4e1658051908f5bad88b6c196f6dfea7",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"0515eaeb3cd01b48633675668292cb01634c134a",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"2decbaa1fc82ee83c58ae19cd19bd53c51aabe0d",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"4720f7dbda3ca990885a56d00860eaf4ab7689e8",class:"bs-datepicker__row",role:"row"},o.map((e=>i("div",{part:"weekday",class:"bs-datepicker__weekday",role:"columnheader"},e)))),Array.from({length:6},((r,o)=>{const c=e.slice(7*o,7*o+7);return i("div",{class:"bs-datepicker__row",role:"row"},c.map(((e,r)=>{const o=h(e),b=e.getMonth()!==this.viewDate.getMonth(),l=o===s||!!a&&o===a,p=d(o),u={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&d(h(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&d(h(c[r+1])))},k=["day",l&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:u,role:"gridcell","aria-selected":l||p?"true":"false"},i("button",{part:k,type:"button",class:{"bs-datepicker__day":!0,"bs-datepicker__day--selected":l,"bs-datepicker__day--in-range":p,"bs-datepicker__day--outside":b,"bs-datepicker__day--today":o===t},"data-date":o,tabindex:o===n?0:-1,disabled:this.isDisabled(e),"aria-current":o===t?"date":void 0,"aria-label":new Intl.DateTimeFormat(this.fmt,{weekday:"long",day:"2-digit",month:"long",year:"numeric"}).format(e),onClick:()=>this.selectDay(e),onKeyDown:t=>this.onKeyDown(t,e),onMouseEnter:()=>{this.range&&this.start&&!this.end&&(this.hoverIso=o)}},(e.getDate()+"").padStart(2,"0")))})))})))))}defaultTabbable(e){const t=t=>e.some((e=>h(e)===t&&e.getMonth()===this.viewDate.getMonth())),s=this.range?this.start:this.value;if(s&&t(s))return s;const a=h(new Date);return t(a)?a:h(this.viewDate)}static get formAssociated(){return!0}static get watchers(){return{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}}static get style(){return":host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-paper-bg-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{width:var(--bs-datepicker-width);max-width:100%;color:var(--bs-datepicker-color);font-size:var(--bs-datepicker-font-size);--bs-card-bg:var(--bs-datepicker-bg);--bs-card-radius:var(--bs-datepicker-radius);--bs-card-padding:var(--bs-datepicker-padding);--bs-card-shadow:var(--bs-datepicker-shadow);--bs-card-overflow:visible}.bs-datepicker__body{display:flex;flex-direction:column;gap:var(--bs-datepicker-gap)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header--range>bs-input{--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}"}},[577,"bs-datepicker",{name:[513],range:[516],value:[1537],start:[1537],end:[1537],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],startLabel:[1,"start-label"],endLabel:[1,"end-label"],monthLabel:[1,"month-label"],yearLabel:[1,"year-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],viewDate:[32],focusedIso:[32],hoverIso:[32],draft:[32],openMenu:[32]},void 0,{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}]);function p(e){return(e+"").padStart(2,"0")}function h(e){return`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`}function u(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const s=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return h(s)===`${t[1]}-${t[2]}-${t[3]}`?s:void 0}function k(e){return new Date(e.getFullYear(),e.getMonth(),1)}function v(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function g(){"undefined"!=typeof customElements&&["bs-datepicker","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),l);break;case"bs-card":customElements.get(e(t))||r();break;case"bs-chip-informative":customElements.get(e(t))||n();break;case"bs-icon-button":customElements.get(e(t))||d();break;case"bs-input":customElements.get(e(t))||o();break;case"bs-menu":customElements.get(e(t))||c();break;case"bs-menu-item":customElements.get(e(t))||b()}}))}g();const f=l,m=g;export{f as BsDatepicker,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as i,H as e,c as o,h as a}from"./p-B2gx7SZk.js";import{d as t}from"./p-
|
|
1
|
+
import{t as s,p as i,H as e,c as o,h as a}from"./p-B2gx7SZk.js";import{d as t}from"./p-B32Kl4IB.js";const n=i(class extends e{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsClose=o(this,"bsClose")}open=!1;heading;closeLabel="Close";size="md";centered=!1;bsClose;hasFooter=!1;hasImage=!1;hasIcon=!1;onFooterSlotchange=s=>{this.hasFooter=s.target.assignedNodes().length>0};onImageSlotchange=s=>{this.hasImage=s.target.assignedNodes().length>0};onIconSlotchange=s=>{this.hasIcon=s.target.assignedNodes().length>0};dialogRef;previouslyFocused;previousBodyOverflow;wasOpen=!1;close=()=>{this.open=!1,this.bsClose.emit()};onKeydown(s){this.open&&"Escape"===s.key&&this.close()}onBackdropClick=s=>{s.target===s.currentTarget&&this.close()};onFocusIn(s){this.open&&this.dialogRef?.isConnected&&!s.composedPath().includes(this.dialogRef)&&this.dialogRef.focus()}componentDidRender(){this.open&&!this.wasOpen?(this.previouslyFocused=document.activeElement,requestAnimationFrame((()=>this.dialogRef?.focus())),this.previousBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden"):!this.open&&this.wasOpen&&(this.previouslyFocused?.focus(),document.body.style.overflow=this.previousBodyOverflow??""),this.wasOpen=this.open}disconnectedCallback(){this.wasOpen&&(document.body.style.overflow=this.previousBodyOverflow??"")}render(){if(!this.open)return null;const s=this.centered||this.hasImage;return a("div",{part:"backdrop",class:"bs-dialog__backdrop",onClick:this.onBackdropClick},a("div",{ref:s=>this.dialogRef=s,tabIndex:-1,part:"dialog",class:"bs-dialog__dialog bs-dialog__dialog--"+this.size,role:"dialog","aria-modal":"true","aria-label":this.heading},s&&a("bs-icon-button",{part:"close",class:"bs-dialog__close--floating",variant:"neutral",size:"md","aria-label":this.closeLabel,onClick:this.close},a(l,null)),a("div",{part:"image",class:"bs-dialog__image "+(this.hasImage?"bs-dialog__image--visible":"")},a("slot",{name:"image",onSlotchange:this.onImageSlotchange})),this.centered&&a("div",{part:"icon",class:"bs-dialog__icon "+(this.hasIcon?"bs-dialog__icon--visible":"")},a("slot",{name:"icon",onSlotchange:this.onIconSlotchange})),a("div",{part:"header",class:"bs-dialog__header "+(this.centered?"bs-dialog__header--centered":"")},a("span",{class:"bs-dialog__heading"},this.heading),!s&&a("bs-icon-button",{part:"close",variant:"subtle",size:"md","aria-label":this.closeLabel,onClick:this.close},a(l,null))),a("div",{part:"body",class:"bs-dialog__body "+(this.centered?"bs-dialog__body--centered":"")},a("slot",null)),a("div",{part:"footer",class:"bs-dialog__footer "+(this.hasFooter?"bs-dialog__footer--visible":"")},a("slot",{name:"footer",onSlotchange:this.onFooterSlotchange}))))}static get style(){return".bs-dialog__backdrop{position:fixed;inset:0;z-index:var(--bs-z-index-modal);display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.4)}.bs-dialog__dialog{position:relative;display:flex;flex-direction:column;max-height:calc(100vh - var(--bs-spacing-800));background:var(--bs-surface-base);color:var(--bs-text-default);border-radius:var(--bs-border-radius-200);box-shadow:var(--bs-shadow-xl);font-family:inherit}.bs-dialog__dialog--sm{width:360px}.bs-dialog__dialog--md{width:560px}.bs-dialog__dialog--lg{width:800px}.bs-dialog__header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-spacing-200) var(--bs-spacing-200) var(--bs-spacing-100)}.bs-dialog__image--visible+.bs-dialog__header,.bs-dialog__icon--visible+.bs-dialog__header{padding-top:0}.bs-dialog__heading{font-size:var(--bs-font-size-lg);font-weight:var(--bs-font-weight-semibold);color:var(--bs-text-default)}.bs-dialog__close--floating{position:absolute;top:var(--bs-spacing-200);inset-inline-end:var(--bs-spacing-200);z-index:1}.bs-dialog__body{padding:0 var(--bs-spacing-200) var(--bs-spacing-200);overflow-y:auto}.bs-dialog__body--centered{text-align:center}.bs-dialog__footer--visible{display:flex;justify-content:flex-end;gap:var(--bs-spacing-200);padding:0 var(--bs-spacing-200) var(--bs-spacing-200)}.bs-dialog__image--visible{overflow:hidden;border-radius:var(--bs-border-radius-200) var(--bs-border-radius-200) 0 0;margin-bottom:var(--bs-spacing-200)}.bs-dialog__image--visible ::slotted(img){display:block;width:100%;height:auto;object-fit:cover}.bs-dialog__icon--visible{display:flex;align-items:center;justify-content:center;padding:var(--bs-spacing-200) var(--bs-spacing-200) 0;margin-bottom:var(--bs-spacing-200)}.bs-dialog__icon--visible ::slotted(*){width:64px;height:64px}.bs-dialog__header--centered{justify-content:center;text-align:center}@media (forced-colors: active){.bs-dialog__dialog{border:1px solid CanvasText}}"}},[769,"bs-dialog",{open:[1540],heading:[1],closeLabel:[1,"close-label"],size:[1],centered:[516],hasFooter:[32],hasImage:[32],hasIcon:[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]),l=()=>a("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function d(){"undefined"!=typeof customElements&&["bs-dialog","bs-icon-button"].forEach((i=>{switch(i){case"bs-dialog":customElements.get(s(i))||customElements.define(s(i),n);break;case"bs-icon-button":customElements.get(s(i))||t()}}))}d();const r=n,c=d;export{r as BsDialog,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-DcjgRtSQ.js";const t=o,p=s;export{t as BsDivider,p as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsEmptyState extends Components.BsEmptyState, HTMLElement {}
|
|
4
|
+
export const BsEmptyState: {
|
|
5
|
+
prototype: BsEmptyState;
|
|
6
|
+
new (): BsEmptyState;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as o,d as r}from"./p-CervX0wH.js";const s=o,p=r;export{s as BsEmptyState,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,t as r,p as a,H as s,c as o}from"./p-B2gx7SZk.js";import{d as t}from"./p-DYuzgzxI.js";import{d as n}from"./p-DvNED6Lb.js";import{d as i}from"./p-
|
|
1
|
+
import{h as e,t as r,p as a,H as s,c as o}from"./p-B2gx7SZk.js";import{d as t}from"./p-DYuzgzxI.js";import{d as n}from"./p-DvNED6Lb.js";import{d as i}from"./p-BcbaiZLh.js";const c=a(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsPrimary=o(this,"bsPrimary"),this.bsSecondary=o(this,"bsSecondary")}type="not-found";code;heading;headingLevel=1;description;primaryLabel;secondaryLabel;reference;bsPrimary;bsSecondary;get defaults(){return b[this.type]??b["not-found"]}render(){const r=this.defaults,a=this.code??r.code,s=this.heading??r.heading,o=this.description??r.description,t=this.primaryLabel??r.primary,n=this.secondaryLabel??r.secondary,i=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||1));return e("bs-card",{key:"376ab30f0eeaf89fb522373b375d0c68eebe8e99",part:"container",class:"bs-error-page",surface:"base"},e("div",{key:"380013c4a4ac5208823856bb565f841e4b9aace3",class:"bs-error-page__body"},e("div",{key:"ce3ed8170977a0e2c4b1247140734fa3ba4c4896",class:"bs-error-page__art-group"},e("bs-icon-tile",{key:"625d8cef3b2969f15e6ba5e94913359f54f277dd",part:"art",class:"bs-error-page__art "+(r.info?"bs-error-page__art--info":""),intent:r.intent,size:"lg"},e("slot",{key:"e4415c41729cc3e9b52f1c61dfb8906a1d8dcc6a",name:"icon"},r.glyph())),a&&e("span",{key:"a6d8d24456746f9da3387c2acae20410382d7b62",part:"code",class:"bs-error-page__code"},a)),e("h"+i,{part:"heading",class:{"bs-error-page__heading":!0}},s),o&&e("p",{key:"4cace21798cbd9f40f2eb493938b5c12db43be97",part:"description",class:"bs-error-page__description"},o),(t||n)&&e("div",{key:"aca6cc9c414530bbb657e02c0910bbc4cae35ae6",part:"actions",class:"bs-error-page__actions"},t&&e("bs-button",{key:"e5ec7c649b3b49e42e2f8132372e5b1b25f850bf",part:"primary",variant:"primary",onClick:()=>this.bsPrimary.emit()},t),n&&e("bs-button",{key:"7414d2d76186402404cf36ad662340f30e4b65aa",part:"secondary",variant:"outlined",onClick:()=>this.bsSecondary.emit()},n)),this.reference&&e("p",{key:"cf2fff2d7d2a77dd9f5a1fca1464ae0f687e4b5a",part:"reference",class:"bs-error-page__reference"},this.reference)))}static get style(){return":host{display:block;--bs-error-page-bg:var(--bs-paper-bg-base);--bs-error-page-radius:var(--bs-border-radius-100);--bs-error-page-padding:var(--bs-spacing-400);--bs-error-page-min-height:440px;--bs-error-page-gap:var(--bs-spacing-150);--bs-error-page-description-width:420px;--bs-error-page-color:var(--bs-text-default);--bs-error-page-color-secondary:var(--bs-text-secondary);--bs-error-page-color-muted:var(--bs-text-muted);--bs-error-page-info-bg:var(--bs-color-info-container)}.bs-error-page{--bs-card-bg:var(--bs-error-page-bg);--bs-card-radius:var(--bs-error-page-radius);--bs-card-padding:var(--bs-error-page-padding);--bs-card-shadow:none;color:var(--bs-error-page-color)}.bs-error-page__body{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--bs-error-page-gap);min-height:calc(var(--bs-error-page-min-height) - var(--bs-error-page-padding) * 2);text-align:center}.bs-error-page__art-group{display:flex;flex-direction:column;align-items:center;gap:var(--bs-spacing-150)}.bs-error-page__art--info{--bs-icon-tile-bg:var(--bs-error-page-info-bg)}.bs-error-page__glyph,::slotted([slot='icon']){width:24px;height:24px}.bs-error-page__code{color:var(--bs-error-page-color-secondary);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-semibold);line-height:20px}.bs-error-page__heading{margin:0;font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:32px}.bs-error-page__description{max-width:var(--bs-error-page-description-width);margin:0;color:var(--bs-error-page-color-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-error-page__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--bs-spacing-100);padding-top:var(--bs-spacing-100)}.bs-error-page__actions bs-button{--bs-button-height-md:var(--bs-spacing-550)}.bs-error-page__reference{margin:0;color:var(--bs-error-page-color-muted);font-size:var(--bs-font-size-xs);line-height:16px}"}},[769,"bs-error-page",{type:[513],code:[1],heading:[1],headingLevel:[2,"heading-level"],description:[1],primaryLabel:[1,"primary-label"],secondaryLabel:[1,"secondary-label"],reference:[1]}]),d=r=>()=>e("svg",{class:"bs-error-page__glyph",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},r),b={"not-found":{intent:"default",info:!0,code:"404",heading:"Page not found",description:"The link may be old, or the page has moved.",primary:"Go to Overview",secondary:"Search",glyph:d(e("g",null,e("circle",{cx:"10.5",cy:"10.5",r:"6.5"}),e("path",{d:"M15.5 15.5L20.5 20.5"})))},"server-error":{intent:"error",code:"500",heading:"Something went wrong on our side",description:"We’re working on it. Try again in a moment.",primary:"Try again",secondary:"Contact support",glyph:d(e("g",null,e("circle",{cx:"12",cy:"12",r:"9"}),e("path",{d:"M12 7.5V12.5"}),e("path",{d:"M12 16.2V16.3"})))},"no-access":{intent:"default",code:"403",heading:"You don’t have access",description:"Contact your administrator for the access.",primary:"Request access",secondary:"Go back",glyph:d(e("g",null,e("rect",{x:"5",y:"10.5",width:"14",height:"9.5",rx:"1.5"}),e("path",{d:"M8.5 10.5V8A3.5 3.5 0 0 1 15.5 8V10.5"})))},maintenance:{intent:"warning",code:"Maintenance",heading:"We’re upgrading the system",description:"We’ll be back shortly. Your data is safe.",primary:"View system status",secondary:"",glyph:d(e("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"}))},offline:{intent:"warning",code:"Offline",heading:"No internet connection",description:"Changes are saved locally and will be updated when you’re back online.",primary:"Try again",secondary:"",glyph:d(e("g",null,e("path",{d:"M4 4L20 20"}),e("path",{d:"M2.5 9.5A14 14 0 0 1 8 6.7"}),e("path",{d:"M21.5 9.5A14 14 0 0 0 14 6.2"}),e("path",{d:"M5.5 13A9.5 9.5 0 0 1 9.5 10.6"}),e("path",{d:"M18.5 13A9.5 9.5 0 0 0 16 11.3"}),e("path",{d:"M9 16.5A4.5 4.5 0 0 1 12 15.3"}),e("path",{d:"M12 19.2V19.3"})))}};function p(){"undefined"!=typeof customElements&&["bs-error-page","bs-button","bs-card","bs-icon-tile"].forEach((e=>{switch(e){case"bs-error-page":customElements.get(r(e))||customElements.define(r(e),c);break;case"bs-button":customElements.get(r(e))||t();break;case"bs-card":customElements.get(r(e))||n();break;case"bs-icon-tile":customElements.get(r(e))||i()}}))}p();const g=c,l=p;export{g as BsErrorPage,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as s,H as i,c as t,h as o}from"./p-B2gx7SZk.js";import{d as l}from"./p-GTDI4Ibw.js";import{d as a}from"./p-B128GX8H.js";const r=s(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsCancel=t(this,"bsCancel"),this.bsRemove=t(this,"bsRemove")}state="loading";fileName="";fileSize;progress=0;message;thumbnailSrc;thumbnailAlt="";cancelLabel="Cancel upload";removeLabel="Remove file";bsCancel;bsRemove;get clampedProgress(){return Math.min(100,Math.max(0,Math.round(Number.isFinite(this.progress)?this.progress:0)))}get statusText(){if(this.message)return this.message;switch(this.state){case"in-progress":return this.clampedProgress+"% uploaded";case"error":return"Upload failed";case"success":return"File uploaded successfully";default:return"Loading..."}}onAction=()=>{"success"===this.state?this.bsRemove.emit():this.bsCancel.emit()};renderStatus(){return"loading"===this.state||"in-progress"===this.state?o("bs-progress-linear",{part:"progress",size:"small",type:"loading"===this.state?"indeterminate":"determinate",value:this.clampedProgress,ariaLabel:this.fileName||"Upload progress"},this.statusText):o("div",{part:"status",class:"bs-file-upload-item__status bs-file-upload-item__status--"+this.state,role:"status"},o("success"===this.state?d:u,null),o("span",{class:"bs-file-upload-item__status-text"},this.statusText))}render(){const e="success"===this.state;return o("div",{key:"e109650dda74a0a0db7af7f621da5e70079a7830",part:"item",class:"bs-file-upload-item bs-file-upload-item--"+this.state},o("div",{key:"800f1bd6a8cabd97c0aa43fe9a521876d4e6feb8",part:"thumbnail",class:"bs-file-upload-item__thumbnail"},o("slot",{key:"e5696a2cf9d69579ff8fd79688f83879c4093c74",name:"thumbnail"},this.thumbnailSrc?o("img",{class:"bs-file-upload-item__image",src:this.thumbnailSrc,alt:this.thumbnailAlt}):o(n,null))),o("div",{key:"bc52ee589c5cf4040dcb1aa86cce0150136d71ae",class:"bs-file-upload-item__content"},o("div",{key:"a70dc514e89ebfb1de3e772652e6ab8b2987007a",class:"bs-file-upload-item__meta"},o("span",{key:"1c0a8e151f284a8344650fb00912582c17d2d5ee",part:"name",class:"bs-file-upload-item__name"},this.fileName),this.fileSize&&o("span",{key:"f608a1ee6e44e34e9e67600622a180e676fb960a",part:"size",class:"bs-file-upload-item__size"},this.fileSize)),this.renderStatus()),o("bs-icon-button",{key:"5781f2aa401d12d3a4f4b0172d64cb0b9ceacf00",part:"action",variant:"subtle",size:"lg",ariaLabel:e?this.removeLabel:this.cancelLabel,onClick:this.onAction},o(e?b:c,null)))}static get style(){return":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}}"}},[769,"bs-file-upload-item",{state:[513],fileName:[1,"file-name"],fileSize:[1,"file-size"],progress:[2],message:[1],thumbnailSrc:[1,"thumbnail-src"],thumbnailAlt:[1,"thumbnail-alt"],cancelLabel:[1,"cancel-label"],removeLabel:[1,"remove-label"]}]),n=()=>o("svg",{class:"bs-file-upload-item__placeholder",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("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"}),o("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"}),o("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"}),o("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"})),d=()=>o("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"},o("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"})),u=()=>o("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"},o("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"})),c=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),b=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M20.25 5.25H3.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M9.75 9.75V15.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M14.25 9.75V15.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("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"}),o("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"}));function p(){"undefined"!=typeof customElements&&["bs-file-upload-item","bs-icon-button","bs-progress-linear"].forEach((s=>{switch(s){case"bs-file-upload-item":customElements.get(e(s))||customElements.define(e(s),r);break;case"bs-icon-button":customElements.get(e(s))||l();break;case"bs-progress-linear":customElements.get(e(s))||a()}}))}p();const m=r,f=p;export{m as BsFileUploadItem,f as defineCustomElement}
|
|
1
|
+
import{t as e,p as s,H as i,c as t,h as l}from"./p-B2gx7SZk.js";import{d as o}from"./p-B32Kl4IB.js";import{d as a}from"./p-BDnZvjlq.js";const r=s(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsCancel=t(this,"bsCancel"),this.bsRemove=t(this,"bsRemove")}state="loading";fileName="";fileSize;progress=0;message;thumbnailSrc;thumbnailAlt="";cancelLabel="Cancel upload";removeLabel="Remove file";bsCancel;bsRemove;get clampedProgress(){return Math.min(100,Math.max(0,Math.round(Number.isFinite(this.progress)?this.progress:0)))}get statusText(){if(this.message)return this.message;switch(this.state){case"in-progress":return this.clampedProgress+"% uploaded";case"error":return"Upload failed";case"success":return"File uploaded successfully";default:return"Loading..."}}onAction=()=>{"success"===this.state?this.bsRemove.emit():this.bsCancel.emit()};renderStatus(){return"loading"===this.state||"in-progress"===this.state?l("bs-progress-linear",{part:"progress",size:"small",type:"loading"===this.state?"indeterminate":"determinate",value:this.clampedProgress,ariaLabel:this.fileName||"Upload progress"},this.statusText):l("div",{part:"status",class:"bs-file-upload-item__status bs-file-upload-item__status--"+this.state,role:"status"},l("success"===this.state?d:u,null),l("span",{class:"bs-file-upload-item__status-text"},this.statusText))}render(){const e="success"===this.state;return l("div",{key:"02ddff16491c33fa61626bca72275ea0a1037c14",part:"item",class:"bs-file-upload-item bs-file-upload-item--"+this.state},l("div",{key:"c465a9216d363ee858933d24abb468d73d66190e",part:"thumbnail",class:"bs-file-upload-item__thumbnail"},l("slot",{key:"5aeaec4d3e9120163dab89c9bb3ca71e8976cae3",name:"thumbnail"},this.thumbnailSrc?l("img",{class:"bs-file-upload-item__image",src:this.thumbnailSrc,alt:this.thumbnailAlt}):l(n,null))),l("div",{key:"3fdf5cb05270ae986e59404758f487932da10fbe",class:"bs-file-upload-item__content"},l("div",{key:"eb783412a8f97eaf6d566c06283c0ca0cc735570",class:"bs-file-upload-item__meta"},l("span",{key:"a456cfbcbaa19329715d55d80845a6b824bb2d64",part:"name",class:"bs-file-upload-item__name"},this.fileName),this.fileSize&&l("span",{key:"7810e2855de50d3fa42d7ee29af81e2c58ea1a42",part:"size",class:"bs-file-upload-item__size"},this.fileSize)),this.renderStatus()),l("bs-icon-button",{key:"7be3bf3d73ec51a2ce3bc23b4e401306c2d6bcc9",part:"action",variant:"subtle",size:"lg",ariaLabel:e?this.removeLabel:this.cancelLabel,onClick:this.onAction},l(e?b:c,null)))}static get style(){return":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}}"}},[769,"bs-file-upload-item",{state:[513],fileName:[1,"file-name"],fileSize:[1,"file-size"],progress:[2],message:[1],thumbnailSrc:[1,"thumbnail-src"],thumbnailAlt:[1,"thumbnail-alt"],cancelLabel:[1,"cancel-label"],removeLabel:[1,"remove-label"]}]),n=()=>l("svg",{class:"bs-file-upload-item__placeholder",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},l("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"}),l("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"}),l("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"}),l("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"})),d=()=>l("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"},l("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"})),u=()=>l("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"},l("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"})),c=()=>l("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},l("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),l("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),b=()=>l("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},l("path",{d:"M20.25 5.25H3.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),l("path",{d:"M9.75 9.75V15.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),l("path",{d:"M14.25 9.75V15.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),l("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"}),l("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"}));function p(){"undefined"!=typeof customElements&&["bs-file-upload-item","bs-icon-button","bs-progress-linear"].forEach((s=>{switch(s){case"bs-file-upload-item":customElements.get(e(s))||customElements.define(e(s),r);break;case"bs-icon-button":customElements.get(e(s))||o();break;case"bs-progress-linear":customElements.get(e(s))||a()}}))}p();const m=r,f=p;export{m as BsFileUploadItem,f as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as
|
|
1
|
+
import{t as e,p as i,H as a,c as s,h as o}from"./p-B2gx7SZk.js";import{d as l}from"./p-DYuzgzxI.js";const t=i(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsFilesSelect=s(this,"bsFilesSelect"),this.bsFilesReject=s(this,"bsFilesReject")}get el(){return this}inputEl;direction="horizontal";heading;description;buttonLabel="Browse file";accept;multiple=!1;disabled=!1;dragging=!1;bsFilesSelect;bsFilesReject;matchesAccept(e){const i=(this.accept??"").split(",").map((e=>e.trim().toLowerCase())).filter(Boolean);if(0===i.length)return!0;const a=e.name.toLowerCase(),s=(e.type||"").toLowerCase();return i.some((e=>e.startsWith(".")?a.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e))}handleFiles(e){const i=e.filter((e=>this.matchesAccept(e))),a=e.filter((e=>!this.matchesAccept(e))),s=this.multiple?i:i.slice(0,1);this.multiple||a.push(...i.slice(1)),s.length&&this.bsFilesSelect.emit(s),a.length&&this.bsFilesReject.emit(a)}onBrowse=()=>{this.disabled||this.inputEl?.click()};onInputChange=()=>{const e=Array.from(this.inputEl?.files??[]);this.inputEl&&(this.inputEl.value=""),e.length&&this.handleFiles(e)};onDragOver=e=>{this.disabled||(e.preventDefault(),this.dragging=!0)};onDragLeave=e=>{const i=e.relatedTarget;i&&e.currentTarget.contains(i)||(this.dragging=!1)};onDrop=e=>{if(this.disabled)return;e.preventDefault(),this.dragging=!1;const i=Array.from(e.dataTransfer?.files??[]);i.length&&this.handleFiles(i)};render(){return o("div",{key:"58fece79d4fb5204ba4edadbdac4a26b5ef3186b",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},o("div",{key:"9339e7a61fd8d2d337c442518b0feca4eac56f4e",part:"icon",class:"bs-file-upload__icon"},o("slot",{key:"b361ea7dda65426da604485f8d00022520e96643",name:"icon"},o(r,{key:"fb08c4f2ec4250293ca66ab7a84c0b77599b15b9"}))),o("div",{key:"1ee60fe58d4196a8aaf95d38e7ba1d6aaaf269fb",class:"bs-file-upload__content"},o("div",{key:"57e91a29e74a9e02831b32e3ab674607a256e68c",class:"bs-file-upload__text"},this.heading&&o("span",{key:"389ea949446b63bb976071fec70d3e5398d3ebef",part:"heading",class:"bs-file-upload__heading"},this.heading),this.description&&o("span",{key:"f6709820df651e915ee7b0073672820478e3c483",part:"description",id:"description",class:"bs-file-upload__description"},this.description)),o("bs-button",{key:"29abda9026efccb881b26794ca5441888ef4c02c",part:"browse",variant:"neutral",size:"sm",disabled:this.disabled,onClick:this.onBrowse},this.buttonLabel)),o("input",{key:"3ea4af2d866795676c74138f5ce6f75f5cb13111",ref:e=>this.inputEl=e,class:"bs-file-upload__input",type:"file",hidden:!0,tabindex:-1,accept:this.accept,multiple:this.multiple,disabled:this.disabled,"aria-describedby":this.description?"description":void 0,onChange:this.onInputChange}))}static get style(){return":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}}"}},[769,"bs-file-upload",{direction:[513],heading:[1],description:[1],buttonLabel:[1,"button-label"],accept:[1],multiple:[4],disabled:[516],dragging:[1540]}]),r=()=>o("svg",{class:"bs-file-upload__icon-svg",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M16 18V4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M27 18V26H5V18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M11 9L16 4L21 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));function d(){"undefined"!=typeof customElements&&["bs-file-upload","bs-button"].forEach((i=>{switch(i){case"bs-file-upload":customElements.get(e(i))||customElements.define(e(i),t);break;case"bs-button":customElements.get(e(i))||l()}}))}d();const n=t,b=d;export{n as BsFileUpload,b as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsGlobalSearch extends Components.BsGlobalSearch, HTMLElement {}
|
|
4
|
+
export const BsGlobalSearch: {
|
|
5
|
+
prototype: BsGlobalSearch;
|
|
6
|
+
new (): BsGlobalSearch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|