@brandsync/wc 1.18.0 → 1.19.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 +8 -0
- package/REFERENCE.md +71 -8
- package/custom-elements.json +382 -4
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-02314404.entry.js +1 -0
- package/dist/brandsync-wc/{p-fd78ff22.entry.js → p-028d3244.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f6caa623.entry.js → p-03ad83a3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5cd1abc7.entry.js → p-0819add7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-47ce984f.entry.js → p-08649f52.entry.js} +1 -1
- package/dist/brandsync-wc/p-0dff9822.entry.js +1 -0
- package/dist/brandsync-wc/{p-7cfb1be6.entry.js → p-10b8937f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bd901b06.entry.js → p-129a4de7.entry.js} +1 -1
- package/dist/brandsync-wc/p-1580c56c.entry.js +1 -0
- package/dist/brandsync-wc/p-15c6f0f3.entry.js +1 -0
- package/dist/brandsync-wc/{p-1d8c2ec1.entry.js → p-171fa239.entry.js} +1 -1
- package/dist/brandsync-wc/{p-95c7f350.entry.js → p-197ac73f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7c29678d.entry.js → p-1e33bc10.entry.js} +1 -1
- package/dist/brandsync-wc/{p-757cd066.entry.js → p-21e5d4d6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5ac75555.entry.js → p-2389f473.entry.js} +1 -1
- package/dist/brandsync-wc/{p-50c116eb.entry.js → p-25914efc.entry.js} +1 -1
- package/dist/brandsync-wc/{p-345b5ef3.entry.js → p-26e0ab15.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9787bc0f.entry.js → p-270b2cb0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-15f06226.entry.js → p-27663faf.entry.js} +1 -1
- package/dist/brandsync-wc/p-28c38959.entry.js +1 -0
- package/dist/brandsync-wc/{p-1a62e5b7.entry.js → p-2a8b2ac9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-344695a8.entry.js → p-2a967b45.entry.js} +1 -1
- package/dist/brandsync-wc/p-2b3d0bd4.entry.js +1 -0
- package/dist/brandsync-wc/p-30736034.entry.js +1 -0
- package/dist/brandsync-wc/{p-5868793d.entry.js → p-30ff0659.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cb002195.entry.js → p-313ec145.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e4e9c961.entry.js → p-3627e0c6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b7bbc52f.entry.js → p-38a2210a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a8c2855c.entry.js → p-391504ab.entry.js} +1 -1
- package/dist/brandsync-wc/{p-78114ea3.entry.js → p-3b212a8a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1aa0f9a3.entry.js → p-3c6980b9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4d4997af.entry.js → p-42fcf134.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8f82ea7e.entry.js → p-4928c4ad.entry.js} +1 -1
- package/dist/brandsync-wc/{p-841a80b4.entry.js → p-4c51da66.entry.js} +1 -1
- package/dist/brandsync-wc/{p-50f60ed6.entry.js → p-4d1ee16e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fb84002e.entry.js → p-4dfd4715.entry.js} +1 -1
- package/dist/brandsync-wc/p-4ffcf41a.entry.js +1 -0
- package/dist/brandsync-wc/{p-9bd739e5.entry.js → p-527fd08d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-55d336da.entry.js → p-5371b31c.entry.js} +1 -1
- package/dist/brandsync-wc/p-568de1b0.entry.js +1 -0
- package/dist/brandsync-wc/p-590deea0.entry.js +1 -0
- package/dist/brandsync-wc/{p-ae207fd5.entry.js → p-64e19200.entry.js} +1 -1
- package/dist/brandsync-wc/p-6afacd47.entry.js +1 -0
- package/dist/brandsync-wc/p-6f32a08e.entry.js +1 -0
- package/dist/brandsync-wc/{p-08e0e704.entry.js → p-70a5897b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c020ffdf.entry.js → p-7160a72e.entry.js} +1 -1
- package/dist/brandsync-wc/p-776b677f.entry.js +1 -0
- package/dist/brandsync-wc/{p-56a45582.entry.js → p-78c94cfe.entry.js} +1 -1
- package/dist/brandsync-wc/p-7bff3aa5.entry.js +1 -0
- package/dist/brandsync-wc/{p-e32a6df1.entry.js → p-7c741b8d.entry.js} +1 -1
- package/dist/brandsync-wc/p-86f04e9e.entry.js +1 -0
- package/dist/brandsync-wc/{p-a51355d9.entry.js → p-8a18864a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0a6f22fe.entry.js → p-8a606b38.entry.js} +1 -1
- package/dist/brandsync-wc/p-8ac86d16.entry.js +1 -0
- package/dist/brandsync-wc/{p-a424a709.entry.js → p-8b21f623.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1a47774e.entry.js → p-8d1ad4b0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-58179e15.entry.js → p-8e107d7a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ff649f1.entry.js → p-90d8d45f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f86b58bf.entry.js → p-9751a12d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bfff7cbb.entry.js → p-9868ee72.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6c987bc9.entry.js → p-9ba500f1.entry.js} +1 -1
- package/dist/brandsync-wc/p-9fa7bd83.entry.js +1 -0
- package/dist/brandsync-wc/p-BSt9HeTa.js +1 -0
- package/dist/brandsync-wc/{p-be7272ce.entry.js → p-a2bfbf02.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d42a26c1.entry.js → p-a50c5e68.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ee63423c.entry.js → p-a688a7ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-55d97d1d.entry.js → p-a92c0f06.entry.js} +1 -1
- package/dist/brandsync-wc/p-ab301e9d.entry.js +1 -0
- package/dist/brandsync-wc/{p-43f8afda.entry.js → p-ab99b8c3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c02ed03d.entry.js → p-c01e231e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d985e569.entry.js → p-d15e48eb.entry.js} +1 -1
- package/dist/brandsync-wc/p-d484e976.entry.js +1 -0
- package/dist/brandsync-wc/{p-31ca98c3.entry.js → p-d80eecf4.entry.js} +1 -1
- package/dist/brandsync-wc/p-dc2ea372.entry.js +1 -0
- package/dist/brandsync-wc/p-de0dfd1c.entry.js +1 -0
- package/dist/brandsync-wc/p-e1d30e31.entry.js +1 -0
- package/dist/brandsync-wc/{p-0082db6a.entry.js → p-e5235e76.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fa91106e.entry.js → p-e776d145.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d3fe8cea.entry.js → p-e7c80f48.entry.js} +1 -1
- package/dist/brandsync-wc/{p-34851d6d.entry.js → p-eb680cff.entry.js} +1 -1
- package/dist/brandsync-wc/p-ebcd105d.entry.js +1 -0
- package/dist/brandsync-wc/p-f10b19a8.entry.js +1 -0
- package/dist/brandsync-wc/{p-87a10ee1.entry.js → p-f3b60029.entry.js} +1 -1
- package/dist/brandsync-wc/{p-14b4f4c4.entry.js → p-f4796801.entry.js} +1 -1
- package/dist/brandsync-wc/p-f5e6fdf8.entry.js +1 -0
- package/dist/brandsync-wc/p-f93127e1.entry.js +1 -0
- package/dist/brandsync-wc/{p-e3e15670.entry.js → p-f96f45ae.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e2491db8.entry.js → p-feb46fa6.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-accordion.cjs.entry.js +60 -3
- 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-recent-item_3.cjs.entry.js +7 -7
- package/dist/cjs/bs-app-shell.cjs.entry.js +1 -1
- package/dist/cjs/bs-app-switcher.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment.cjs.entry.js +1 -1
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb.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-button_2.cjs.entry.js +198 -0
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-carousel.cjs.entry.js +70 -5
- 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 +2 -2
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/bs-chip-filter.cjs.entry.js +2 -2
- package/dist/cjs/bs-chip-informative.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-input.cjs.entry.js +2 -2
- package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
- package/dist/cjs/bs-command-palette.cjs.entry.js +1 -1
- package/dist/cjs/bs-compact-menu-block_2.cjs.entry.js +4 -4
- package/dist/cjs/bs-company-switcher.cjs.entry.js +2 -2
- 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-dialog.cjs.entry.js +54 -3
- package/dist/cjs/bs-divider.cjs.entry.js +1 -1
- package/dist/cjs/bs-empty-state.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/bs-grid.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-tile.cjs.entry.js +2 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/bs-input_3.cjs.entry.js +5 -5
- package/dist/cjs/bs-key-caps.cjs.entry.js +1 -1
- package/dist/cjs/bs-key.cjs.entry.js +1 -1
- package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +2 -2
- package/dist/cjs/bs-list-item_2.cjs.entry.js +51 -5
- package/dist/cjs/bs-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-mega-menu.cjs.entry.js +52 -2
- 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 +2 -2
- package/dist/cjs/bs-page-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +2 -2
- package/dist/cjs/bs-presence.cjs.entry.js +88 -0
- 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 +4 -4
- package/dist/cjs/bs-search-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
- package/dist/cjs/bs-shortcut-row.cjs.entry.js +1 -1
- package/dist/cjs/bs-side-panel.cjs.entry.js +52 -3
- 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 +4 -3
- 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 +4 -11
- 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 +61 -3
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/bs-tree-item.cjs.entry.js +3 -3
- package/dist/cjs/bs-tree.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/motion-DOlI71lc.js +43 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/bs-accordion/bs-accordion.cmp.test.js +21 -6
- package/dist/collection/components/bs-accordion/bs-accordion.css +15 -0
- package/dist/collection/components/bs-accordion/bs-accordion.js +71 -2
- 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-recent-item/bs-app-recent-item.js +3 -3
- package/dist/collection/components/bs-app-shell/bs-app-shell.js +1 -1
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.js +1 -1
- package/dist/collection/components/bs-app-tile/bs-app-tile.js +3 -3
- package/dist/collection/components/bs-attachment/bs-attachment.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-badge/bs-badge.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-button/bs-button.cmp.test.js +12 -0
- package/dist/collection/components/bs-button/bs-button/bs-button.css +2 -0
- package/dist/collection/components/bs-button/bs-button/bs-button.js +4 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.css +2 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +2 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.js +1 -1
- package/dist/collection/components/bs-carousel/bs-carousel.cmp.test.js +39 -1
- package/dist/collection/components/bs-carousel/bs-carousel.css +9 -0
- package/dist/collection/components/bs-carousel/bs-carousel.js +75 -4
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css +2 -0
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +2 -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.css +2 -0
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +2 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.css +7 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +2 -1
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.css +2 -0
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.js +2 -1
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.css +7 -0
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +2 -1
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
- package/dist/collection/components/bs-command-palette/bs-command-palette.js +1 -1
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.js +1 -1
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.js +2 -2
- 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-dialog/bs-dialog.cmp.test.js +32 -0
- package/dist/collection/components/bs-dialog/bs-dialog.css +16 -0
- package/dist/collection/components/bs-dialog/bs-dialog.js +61 -3
- package/dist/collection/components/bs-divider/bs-divider.js +1 -1
- package/dist/collection/components/bs-empty-state/bs-empty-state.js +1 -1
- 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.js +2 -2
- 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.js +1 -1
- package/dist/collection/components/bs-key-caps/bs-key-caps.js +1 -1
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +2 -2
- package/dist/collection/components/bs-list/bs-list.js +1 -1
- package/dist/collection/components/bs-list-item/bs-list-item.css +2 -0
- package/dist/collection/components/bs-list-item/bs-list-item.js +2 -1
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.cmp.test.js +73 -0
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.css +5 -1
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.js +89 -4
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.stories.js +5 -5
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-block/bs-menu-block.js +3 -3
- package/dist/collection/components/bs-menu-item/bs-menu-item.css +2 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +2 -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-page-header/bs-page-header.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.css +2 -0
- package/dist/collection/components/bs-pagination/bs-pagination.js +2 -1
- package/dist/collection/components/bs-popover/bs-popover.cmp.test.js +20 -0
- package/dist/collection/components/bs-popover/bs-popover.css +3 -0
- package/dist/collection/components/bs-popover/bs-popover.js +59 -2
- package/dist/collection/components/bs-presence/bs-presence.cmp.test.js +64 -0
- package/dist/collection/components/bs-presence/bs-presence.css +80 -0
- package/dist/collection/components/bs-presence/bs-presence.js +233 -0
- package/dist/collection/components/bs-presence/bs-presence.stories.js +101 -0
- 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.css +6 -0
- package/dist/collection/components/bs-radio/bs-radio.js +4 -3
- package/dist/collection/components/bs-ripple/bs-ripple.cmp.test.js +45 -0
- package/dist/collection/components/bs-ripple/bs-ripple.css +32 -0
- package/dist/collection/components/bs-ripple/bs-ripple.js +188 -0
- package/dist/collection/components/bs-ripple/bs-ripple.stories.js +33 -0
- package/dist/collection/components/bs-search-item/bs-search-item.css +2 -0
- package/dist/collection/components/bs-search-item/bs-search-item.js +2 -1
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +1 -1
- package/dist/collection/components/bs-side-panel/bs-side-panel.cmp.test.js +19 -0
- package/dist/collection/components/bs-side-panel/bs-side-panel.css +8 -0
- package/dist/collection/components/bs-side-panel/bs-side-panel.js +58 -2
- 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.css +2 -0
- package/dist/collection/components/bs-source-link/bs-source-link.js +4 -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.css +9 -0
- package/dist/collection/components/bs-switch/bs-switch.js +4 -10
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.css +2 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +2 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +2 -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.cmp.test.js +53 -2
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.css +3 -0
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +70 -3
- package/dist/collection/components/bs-tree/bs-tree.js +1 -1
- package/dist/collection/components/bs-tree-item/bs-tree-item.css +2 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.js +3 -2
- 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 +2 -2
- package/dist/collection/utils/motion.js +37 -0
- package/dist/components/bs-accordion-group.js +1 -1
- package/dist/components/bs-accordion.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-app-recent-item.js +1 -1
- package/dist/components/bs-app-shell.js +1 -1
- package/dist/components/bs-app-switcher.js +1 -1
- package/dist/components/bs-app-tile.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-carousel.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-checkbox.js +1 -1
- package/dist/components/bs-chip-filter.js +1 -1
- package/dist/components/bs-chip-informative.js +1 -1
- package/dist/components/bs-chip-input.js +1 -1
- package/dist/components/bs-citation-preview.js +1 -1
- package/dist/components/bs-command-palette.js +1 -1
- package/dist/components/bs-compact-menu-block.js +1 -1
- package/dist/components/bs-company-switcher.js +1 -1
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-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.js +1 -1
- 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.js +1 -1
- 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.js +1 -1
- package/dist/components/bs-key.js +1 -1
- package/dist/components/bs-keyboard-shortcuts.js +1 -1
- package/dist/components/bs-list-item.js +1 -1
- package/dist/components/bs-list.js +1 -1
- package/dist/components/bs-mega-menu.js +1 -1
- package/dist/components/bs-menu-block.js +1 -1
- 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-page-header.js +1 -1
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-popover.js +1 -1
- package/dist/components/bs-presence.d.ts +11 -0
- package/dist/components/bs-presence.js +1 -0
- 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-ripple.d.ts +11 -0
- package/dist/components/bs-ripple.js +1 -0
- package/dist/components/bs-search-item.js +1 -1
- package/dist/components/bs-session-timeout.js +1 -1
- package/dist/components/bs-shortcut-row.js +1 -1
- 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.js +1 -1
- package/dist/components/bs-tree.js +1 -1
- package/dist/components/bs-whats-new-entry.js +1 -1
- package/dist/components/bs-whats-new.js +1 -1
- package/dist/components/p--Tyv3LIl.js +1 -0
- package/dist/components/{p-D4_8H0vn.js → p-4yShCgRb.js} +1 -1
- package/dist/components/p-6Rr9bjVN.js +1 -0
- package/dist/components/{p-I1_Q3HQu.js → p-BHzj13sd.js} +1 -1
- package/dist/components/p-BIxcCDgl.js +1 -0
- package/dist/components/{p-DcdFuKG9.js → p-BQ4rSQDm.js} +1 -1
- package/dist/components/p-BSt9HeTa.js +1 -0
- package/dist/components/p-BWRkbt0f.js +1 -0
- package/dist/components/p-BfCah-Ij.js +1 -0
- package/dist/components/p-BpkPo4ay.js +1 -0
- package/dist/components/{p-Co36mHEU.js → p-CFR3Q0io.js} +1 -1
- package/dist/components/{p-C3erqJFy.js → p-CHZE_FrW.js} +1 -1
- package/dist/components/p-CVQycAap.js +1 -0
- package/dist/components/{p-CmlzHRkn.js → p-Cr8cHmpM.js} +1 -1
- package/dist/components/p-CvSewXZF.js +1 -0
- package/dist/components/{p-Dl0FedE5.js → p-D3PuUD8Z.js} +1 -1
- package/dist/components/p-D5eN9Lfa.js +1 -0
- package/dist/components/{p-qXdgl7VG.js → p-DDgzEg1C.js} +1 -1
- package/dist/components/p-DF2FcJPs.js +1 -0
- package/dist/components/{p-DzvXbBvk.js → p-DLnZG_G9.js} +1 -1
- package/dist/components/{p-Deq0LzGO.js → p-DXbcyEgd.js} +1 -1
- package/dist/components/{p-C1owRphU.js → p-DXwatzvM.js} +1 -1
- package/dist/components/{p-erdtytMq.js → p-DcD5eV_Z.js} +1 -1
- package/dist/components/{p-B6KgEbdM.js → p-Dj393s3S.js} +1 -1
- package/dist/components/p-DtkTnaOp.js +1 -0
- package/dist/components/{p-DBvhi__l.js → p-EGNLb4cQ.js} +1 -1
- package/dist/components/{p-DFd4pP4i.js → p-Jik5UkAe.js} +1 -1
- package/dist/components/p-XZXdZpt4.js +1 -0
- package/dist/components/{p-Cd7p-48Q.js → p-Y5FyLR8G.js} +1 -1
- package/dist/components/{p-DtbeCgXo.js → p-ZfE38vXZ.js} +1 -1
- package/dist/components/{p-c-g3-oVu.js → p-lPTgyF9v.js} +1 -1
- package/dist/components/p-syO0ipbw.js +1 -0
- package/dist/components/p-up01gvHY.js +1 -0
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-accordion-group.entry.js +1 -1
- package/dist/esm/bs-accordion.entry.js +61 -4
- 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-recent-item_3.entry.js +7 -7
- package/dist/esm/bs-app-shell.entry.js +1 -1
- package/dist/esm/bs-app-switcher.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-attachment.entry.js +1 -1
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +1 -1
- package/dist/esm/bs-breadcrumb.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-button_2.entry.js +195 -0
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-carousel.entry.js +70 -5
- 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 +2 -2
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-checkbox.entry.js +2 -2
- package/dist/esm/bs-chip-filter.entry.js +2 -2
- package/dist/esm/bs-chip-informative.entry.js +1 -1
- package/dist/esm/bs-chip-input.entry.js +2 -2
- package/dist/esm/bs-citation-preview.entry.js +1 -1
- package/dist/esm/bs-command-palette.entry.js +1 -1
- package/dist/esm/bs-compact-menu-block_2.entry.js +4 -4
- package/dist/esm/bs-company-switcher.entry.js +2 -2
- 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-dialog.entry.js +55 -4
- package/dist/esm/bs-divider.entry.js +1 -1
- package/dist/esm/bs-empty-state.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/bs-grid.entry.js +2 -2
- package/dist/esm/bs-icon-button.entry.js +2 -2
- package/dist/esm/bs-icon-tile.entry.js +2 -2
- package/dist/esm/bs-inline-tab.entry.js +2 -2
- package/dist/esm/bs-input_3.entry.js +5 -5
- package/dist/esm/bs-key-caps.entry.js +1 -1
- package/dist/esm/bs-key.entry.js +1 -1
- package/dist/esm/bs-keyboard-shortcuts.entry.js +2 -2
- package/dist/esm/bs-list-item_2.entry.js +51 -5
- package/dist/esm/bs-list.entry.js +1 -1
- package/dist/esm/bs-mega-menu.entry.js +53 -3
- 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 +2 -2
- package/dist/esm/bs-page-header.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +2 -2
- package/dist/esm/bs-presence.entry.js +86 -0
- 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 +4 -4
- package/dist/esm/bs-search-item.entry.js +2 -2
- package/dist/esm/bs-session-timeout.entry.js +1 -1
- package/dist/esm/bs-shortcut-row.entry.js +1 -1
- package/dist/esm/bs-side-panel.entry.js +52 -3
- 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 +4 -3
- 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 +4 -11
- 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 +62 -4
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/bs-tree-item.entry.js +3 -3
- package/dist/esm/bs-tree.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/motion-BSt9HeTa.js +39 -0
- package/dist/types/components/bs-accordion/bs-accordion.d.ts +22 -0
- package/dist/types/components/bs-button/bs-button/bs-button.d.ts +3 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +1 -0
- package/dist/types/components/bs-carousel/bs-carousel.d.ts +21 -1
- package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.d.ts +1 -0
- package/dist/types/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.d.ts +1 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +1 -0
- package/dist/types/components/bs-chip/bs-chip-filter/bs-chip-filter.d.ts +1 -0
- package/dist/types/components/bs-chip/bs-chip-input/bs-chip-input.d.ts +1 -0
- package/dist/types/components/bs-dialog/bs-dialog.d.ts +14 -0
- package/dist/types/components/bs-list-item/bs-list-item.d.ts +1 -0
- package/dist/types/components/bs-mega-menu/bs-mega-menu.d.ts +26 -2
- package/dist/types/components/bs-menu-item/bs-menu-item.d.ts +1 -0
- package/dist/types/components/bs-pagination/bs-pagination.d.ts +1 -0
- package/dist/types/components/bs-popover/bs-popover.d.ts +15 -0
- package/dist/types/components/bs-presence/bs-presence.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-presence/bs-presence.d.ts +50 -0
- package/dist/types/components/bs-presence/bs-presence.stories.d.ts +15 -0
- package/dist/types/components/bs-radio/bs-radio.d.ts +1 -0
- package/dist/types/components/bs-ripple/bs-ripple.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-ripple/bs-ripple.d.ts +52 -0
- package/dist/types/components/bs-ripple/bs-ripple.stories.d.ts +11 -0
- package/dist/types/components/bs-search-item/bs-search-item.d.ts +1 -0
- package/dist/types/components/bs-side-panel/bs-side-panel.d.ts +13 -0
- package/dist/types/components/bs-source-link/bs-source-link.d.ts +1 -0
- package/dist/types/components/bs-switch/bs-switch.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +1 -0
- package/dist/types/components/bs-tooltip-trigger/bs-tooltip-trigger.d.ts +18 -0
- package/dist/types/components/bs-tree-item/bs-tree-item.d.ts +1 -0
- package/dist/types/components.d.ts +407 -8
- package/dist/types/utils/motion.d.ts +21 -0
- package/package.json +1 -1
- package/reference.d.ts +28 -22
- package/reference.json +230 -9
- package/dist/brandsync-wc/p-046a53de.entry.js +0 -1
- package/dist/brandsync-wc/p-07e0b444.entry.js +0 -1
- package/dist/brandsync-wc/p-186e3b78.entry.js +0 -1
- package/dist/brandsync-wc/p-23b56775.entry.js +0 -1
- package/dist/brandsync-wc/p-246036cd.entry.js +0 -1
- package/dist/brandsync-wc/p-348fef11.entry.js +0 -1
- package/dist/brandsync-wc/p-3e6f430a.entry.js +0 -1
- package/dist/brandsync-wc/p-47929dca.entry.js +0 -1
- package/dist/brandsync-wc/p-52d61070.entry.js +0 -1
- package/dist/brandsync-wc/p-5e36d46f.entry.js +0 -1
- package/dist/brandsync-wc/p-64f8eb7e.entry.js +0 -1
- package/dist/brandsync-wc/p-6b019a88.entry.js +0 -1
- package/dist/brandsync-wc/p-8962abe0.entry.js +0 -1
- package/dist/brandsync-wc/p-8c9938a5.entry.js +0 -1
- package/dist/brandsync-wc/p-8e46a262.entry.js +0 -1
- package/dist/brandsync-wc/p-998b95d3.entry.js +0 -1
- package/dist/brandsync-wc/p-a9d0a730.entry.js +0 -1
- package/dist/brandsync-wc/p-b1edc9b7.entry.js +0 -1
- package/dist/brandsync-wc/p-b759ae72.entry.js +0 -1
- package/dist/brandsync-wc/p-e99c0937.entry.js +0 -1
- package/dist/brandsync-wc/p-e9adfa44.entry.js +0 -1
- package/dist/brandsync-wc/p-eb3bacb9.entry.js +0 -1
- package/dist/brandsync-wc/p-ee00d3a5.entry.js +0 -1
- package/dist/brandsync-wc/p-f47b8673.entry.js +0 -1
- package/dist/brandsync-wc/p-fbc219c6.entry.js +0 -1
- package/dist/cjs/bs-button.cjs.entry.js +0 -107
- package/dist/components/p-B8kw9EOx.js +0 -1
- package/dist/components/p-BLPNwyiT.js +0 -1
- package/dist/components/p-BP1l6Q3Z.js +0 -1
- package/dist/components/p-BS7ySxJZ.js +0 -1
- package/dist/components/p-BmdSbmFg.js +0 -1
- package/dist/components/p-C2rRVRIu.js +0 -1
- package/dist/components/p-D9dDFyPB.js +0 -1
- package/dist/components/p-DVjuZdjF.js +0 -1
- package/dist/components/p-DW0Dw2LS.js +0 -1
- package/dist/components/p-DgY5pxXd.js +0 -1
- package/dist/components/p-DhhXayh6.js +0 -1
- package/dist/components/p-DiORQQg3.js +0 -1
- package/dist/components/p-TXAiCnSZ.js +0 -1
- package/dist/esm/bs-button.entry.js +0 -105
|
@@ -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-DBvhi__l.js";import{d}from"./p-C1owRphU.js";import{d as n}from"./p-DiORQQg3.js";import{d as o}from"./p-BP1l6Q3Z.js";import{d as c}from"./p-DgY5pxXd.js";import{d as b}from"./p-DW0Dw2LS.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:"cdb34fb56c5dd485e68fdbaf846c13ecc0547117",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"348836d221ea9d88f81d74c756f6e33749185e77",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"19192cd83a674a876ddebb3048cf61392f5ce1b4",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"936dd7846972754b3e3e12e0b5d1ebf459f6626b",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"8adff95c2ac4160773ba27b2bba2690376bf7b6e",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"e07e13f74b49ef8676ef9b2b61648f2fbcd7ff26",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"60e2dccce60ce780002b5a37b7bce2cb77a7ded2",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"4ea132ee9b1d1b7df1dd3595dc52e9cd977dc9d4",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"e648752590a0483c152a06ff2ebe1a4c7f459fd1",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"61f9ebdc93a4636284fe3215f0ff6699ef7bb8de",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"d94bd61c202b575b3ae4b8312224f302cf13330e",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"ac7713f2ebdc1d429641d14856ed597866fb5a07",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 a,c as s,h as i}from"./p-B2gx7SZk.js";import{d as r}from"./p-EGNLb4cQ.js";import{d}from"./p-DXwatzvM.js";import{d as n}from"./p-BfCah-Ij.js";import{d as o}from"./p-CvSewXZF.js";import{d as c}from"./p-CVQycAap.js";import{d as b}from"./p-D5eN9Lfa.js";import{d as l}from"./p-DtkTnaOp.js";const p=t(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=s(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=v(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=k(this.range?this.start:this.value);e&&(this.viewDate=v(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=k(this.min),a=k(this.max);return!!t&&e<t||!!a&&e>a}selectDay(e){if(this.isDisabled(e))return;const t=u(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=v(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 a=k(t),s={...this.draft};if(delete s[e],this.draft=s,!a||this.isDisabled(a))return;let i="start"===e?u(a):this.start,r="end"===e?u(a):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 a={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let s;if(e.key in a)s=f(t,a[e.key]);else if("Home"===e.key||"End"===e.key){const a=(t.getDay()-this.safeFirstDay+7)%7;s=f(t,"Home"===e.key?-a:6-a)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const a="PageUp"===e.key?-1:1;s=function(e,t){const a=new Date(e.getFullYear(),e.getMonth()+t,1),s=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return new Date(a.getFullYear(),a.getMonth(),Math.min(e.getDate(),s))}(t,e.shiftKey?12*a:a)}}e.preventDefault(),this.focusedIso=u(s),this.viewDate=v(s),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=k(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:k(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,a)=>({label:e.format(new Date(2e3,a,1)),value:a+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=k(this.min)?.getFullYear()??e-100,a=k(this.max)?.getFullYear()??e+100,s=[];for(let i=Math.min(t,e);i<=Math.max(a,e);i++)s.push({label:i+"",value:i+""});return s}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,a)=>e.format(new Date(2023,0,1+(this.safeFirstDay+a)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,a=f(e,-t);return Array.from({length:42},((e,t)=>f(a,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,a,s,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:a.find((e=>e.value===s))?.label??"",open:d,onBsOpen:()=>{this.menuToScroll=!d,this.openMenu=d?null:e}}),d&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},a.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===s?"":void 0,"aria-current":e.value===s?"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===s&&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=u(new Date),a=this.range?this.start:this.value,s=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:s,d=e.some((e=>u(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),n=e=>!!a&&!!r&&e>a&&e<r,o=this.weekdays();return i("bs-card",{key:"7ec1a401f3de27dbfca02cec5bafddfd65ddb8b1",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"39ef955d7175fbaf485a138ad7bbe3fd00133700",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"304ef15f46dc9dfd30a3fdee1e4d9b4a8a31fd86",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"01ae2998d09497afb4b16950629287e0d6def2d4",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"7d9063f139f079abc906f43458e19bc21b3b05cb",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"7142cdbf7bfd7db26516831ab55c7d9203ab2485",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"492425990862fa53c2be547c7bf8d56b9c369109",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"895f8b4ad72fa0e801b9dcc4701f9b69aad72e83",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"998a268f59503b92a7f7ca0b4832c79d9ee48e78",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"22e141eb617d5a0b009f005bf18abe95c1189efe",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"e6fd0113d7682efee354bce15f74591cf7b9cc30",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"e4000fda3ac22ac7d382a89d1e5741bb4555ac8c",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=u(e),b=e.getMonth()!==this.viewDate.getMonth(),l=o===a||!!s&&o===s,p=n(o),h={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&n(u(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&n(u(c[r+1])))},k=["day",l&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:h,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=>u(e)===t&&e.getMonth()===this.viewDate.getMonth())),a=this.range?this.start:this.value;if(a&&t(a))return a;const s=u(new Date);return t(s)?s:u(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 h(e){return(e+"").padStart(2,"0")}function u(e){return`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}`}function k(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const a=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return u(a)===`${t[1]}-${t[2]}-${t[3]}`?a:void 0}function v(e){return new Date(e.getFullYear(),e.getMonth(),1)}function f(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","bs-ripple"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),p);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();break;case"bs-ripple":customElements.get(e(t))||l()}}))}g();const m=p,_=g;export{m as BsDatepicker,_ as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as s,p as i,H as t,c as a,h as e}from"./p-B2gx7SZk.js";import{c as o,r as n,p as l}from"./p-BSt9HeTa.js";import{d}from"./p-BfCah-Ij.js";import{d as r}from"./p-DtkTnaOp.js";const c=i(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsClose=a(this,"bsClose")}get el(){return this}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};closing=!1;backdropRef;enterPending=!1;exitPending=!1;motionRun=0;onOpenChange(s){this.motionRun++,o(this.backdropRef,this.dialogRef),s?(this.closing=!1,this.enterPending=!0):this.wasOpen&&n(this.el,"bs-dialog").ms>0&&(this.closing=!0,this.exitPending=!0)}playEnter(){const{ms:s,easing:i,distance:t}=n(this.el,"bs-dialog");0!==s&&(l(this.backdropRef,[{opacity:0},{opacity:1}],s,i),l(this.dialogRef,[{opacity:0,transform:`translateY(${t}px) scale(0.96)`},{opacity:1,transform:"none"}],s,i))}playExit(){const{ms:s,easing:i,distance:t}=n(this.el,"bs-dialog"),a=++this.motionRun;Promise.all([l(this.backdropRef,[{opacity:1},{opacity:0}],s,i,"forwards"),l(this.dialogRef,[{opacity:1,transform:"none"},{opacity:0,transform:`translateY(${t}px) scale(0.96)`}],s,i,"forwards")]).then((()=>{a===this.motionRun&&(this.closing=!1)}))}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.enterPending?(this.enterPending=!1,this.playEnter()):!this.open&&this.closing&&this.exitPending&&(this.exitPending=!1,this.playExit()),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&&!this.closing)return null;const s=this.centered||this.hasImage;return e("div",{ref:s=>this.backdropRef=s,part:"backdrop",class:"bs-dialog__backdrop "+(this.open?"":"bs-dialog__backdrop--closing"),onClick:this.onBackdropClick},e("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&&e("bs-icon-button",{part:"close",class:"bs-dialog__close--floating",variant:"neutral",size:"md","aria-label":this.closeLabel,onClick:this.close},e(g,null)),e("div",{part:"image",class:"bs-dialog__image "+(this.hasImage?"bs-dialog__image--visible":"")},e("slot",{name:"image",onSlotchange:this.onImageSlotchange})),this.centered&&e("div",{part:"icon",class:"bs-dialog__icon "+(this.hasIcon?"bs-dialog__icon--visible":"")},e("slot",{name:"icon",onSlotchange:this.onIconSlotchange})),e("div",{part:"header",class:"bs-dialog__header "+(this.centered?"bs-dialog__header--centered":"")},e("span",{class:"bs-dialog__heading"},this.heading),!s&&e("bs-icon-button",{part:"close",variant:"subtle",size:"md","aria-label":this.closeLabel,onClick:this.close},e(g,null))),e("div",{part:"body",class:"bs-dialog__body "+(this.centered?"bs-dialog__body--centered":"")},e("slot",null)),e("div",{part:"footer",class:"bs-dialog__footer "+(this.hasFooter?"bs-dialog__footer--visible":"")},e("slot",{name:"footer",onSlotchange:this.onFooterSlotchange}))))}static get watchers(){return{open:[{onOpenChange:0}]}}static get style(){return":host{--bs-dialog-duration:var(--bs-duration-default);--bs-dialog-easing:var(--bs-easing-standard);--bs-dialog-distance:var(--bs-spacing-200)}.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__backdrop--closing{pointer-events:none}.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],closing:[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]],{open:[{onOpenChange:0}]}]),g=()=>e("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),e("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function b(){"undefined"!=typeof customElements&&["bs-dialog","bs-icon-button","bs-ripple"].forEach((i=>{switch(i){case"bs-dialog":customElements.get(s(i))||customElements.define(s(i),c);break;case"bs-icon-button":customElements.get(s(i))||d();break;case"bs-ripple":customElements.get(s(i))||r()}}))}b();const h=c,p=b;export{h as BsDialog,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-DLnZG_G9.js";const p=o,r=s;export{p as BsDivider,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as
|
|
1
|
+
import{B as s,d as o}from"./p-BHzj13sd.js";const p=s,r=o;export{p as BsEmptyState,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,t as r,p as a,H as s,c as
|
|
1
|
+
import{h as e,t as r,p as a,H as s,c as t}from"./p-B2gx7SZk.js";import{d as o}from"./p-up01gvHY.js";import{d as n}from"./p-EGNLb4cQ.js";import{d as i}from"./p-CHZE_FrW.js";import{d as c}from"./p-DtkTnaOp.js";const d=a(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsPrimary=t(this,"bsPrimary"),this.bsSecondary=t(this,"bsSecondary")}type="not-found";code;heading;headingLevel=1;description;primaryLabel;secondaryLabel;reference;bsPrimary;bsSecondary;get defaults(){return p[this.type]??p["not-found"]}render(){const r=this.defaults,a=this.code??r.code,s=this.heading??r.heading,t=this.description??r.description,o=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:"b236e353ba68c47c300ca7bc8c87744b056261d3",part:"container",class:"bs-error-page",surface:"base"},e("div",{key:"dd65a6504d533bbaa7be0134a3853f041836c536",class:"bs-error-page__body"},e("div",{key:"450194e7695bbea5076ca9ce060f5f5aa0eb6aac",class:"bs-error-page__art-group"},e("bs-icon-tile",{key:"5a49ef75e17d2a565d34678792a83b62e64b2f4e",part:"art",class:"bs-error-page__art "+(r.info?"bs-error-page__art--info":""),intent:r.intent,size:"lg"},e("slot",{key:"06b3356dbc54741538ddeb633a99184c1d4f3e8d",name:"icon"},r.glyph())),a&&e("span",{key:"c11c2bdd41d504a5305164df96601b5ef2794027",part:"code",class:"bs-error-page__code"},a)),e("h"+i,{part:"heading",class:{"bs-error-page__heading":!0}},s),t&&e("p",{key:"a20c05d36c8b9e9d64119df40ffb8eb8da44dd06",part:"description",class:"bs-error-page__description"},t),(o||n)&&e("div",{key:"366cbecd6b82bb83a2b137b35bbf0520a2364e44",part:"actions",class:"bs-error-page__actions"},o&&e("bs-button",{key:"a71c32a3588e38592d3b20dd723ed4b4e17b7d94",part:"primary",variant:"primary",onClick:()=>this.bsPrimary.emit()},o),n&&e("bs-button",{key:"4fef13ed699b7df97916eb09686dc7e0b5ac90aa",part:"secondary",variant:"outlined",onClick:()=>this.bsSecondary.emit()},n)),this.reference&&e("p",{key:"87d6403fcebf8345fae40329d509f41c6d2d7bfe",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]}]),b=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),p={"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:b(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:b(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:b(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:b(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:b(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 g(){"undefined"!=typeof customElements&&["bs-error-page","bs-button","bs-card","bs-icon-tile","bs-ripple"].forEach((e=>{switch(e){case"bs-error-page":customElements.get(r(e))||customElements.define(r(e),d);break;case"bs-button":customElements.get(r(e))||o();break;case"bs-card":customElements.get(r(e))||n();break;case"bs-icon-tile":customElements.get(r(e))||i();break;case"bs-ripple":customElements.get(r(e))||c()}}))}g();const l=d,h=g;export{l as BsErrorPage,h 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-DiORQQg3.js";import{d as a}from"./p-qXdgl7VG.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:"26933845798c1cee2739c2a5a3d402175244717b",part:"item",class:"bs-file-upload-item bs-file-upload-item--"+this.state},o("div",{key:"b7312bfd0a7bcbeac8e098be4cb6d565283f2e0f",part:"thumbnail",class:"bs-file-upload-item__thumbnail"},o("slot",{key:"69350d5224f540e0f4d5033e3ac92ccff397b565",name:"thumbnail"},this.thumbnailSrc?o("img",{class:"bs-file-upload-item__image",src:this.thumbnailSrc,alt:this.thumbnailAlt}):o(n,null))),o("div",{key:"fbe429e0dd56af6fe5d955ce384a335c9ce3843a",class:"bs-file-upload-item__content"},o("div",{key:"b45f5b5500d760dcfb0d8fe3e87638db9325ae99",class:"bs-file-upload-item__meta"},o("span",{key:"7e5a8cd3ccca37c88182d0e430841f36f29f56e7",part:"name",class:"bs-file-upload-item__name"},this.fileName),this.fileSize&&o("span",{key:"114e9167c4542c9e071ebb21ee77d25d5c9221b4",part:"size",class:"bs-file-upload-item__size"},this.fileSize)),this.renderStatus()),o("bs-icon-button",{key:"f6a9a212a6436ac50eaab6b0224b58245171a7de",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 o}from"./p-B2gx7SZk.js";import{d as l}from"./p-BfCah-Ij.js";import{d as a}from"./p-DDgzEg1C.js";import{d as r}from"./p-DtkTnaOp.js";const n=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?u:c,null),o("span",{class:"bs-file-upload-item__status-text"},this.statusText))}render(){const e="success"===this.state;return o("div",{key:"aff0de0cc425f2bea76407bd4e805ba7662816f1",part:"item",class:"bs-file-upload-item bs-file-upload-item--"+this.state},o("div",{key:"e27d9ccd7f23a1a97eae0af9fa93fd5a45305bce",part:"thumbnail",class:"bs-file-upload-item__thumbnail"},o("slot",{key:"16e52a05a81a1c89e1f74d9e48311a0663d60dec",name:"thumbnail"},this.thumbnailSrc?o("img",{class:"bs-file-upload-item__image",src:this.thumbnailSrc,alt:this.thumbnailAlt}):o(d,null))),o("div",{key:"7b0dd4283f8412c51e3d74e6b3659c769e205c38",class:"bs-file-upload-item__content"},o("div",{key:"70f55bffad0b17cd2808d26c7117d00b1f1385ec",class:"bs-file-upload-item__meta"},o("span",{key:"759c23ce263cfab9230cb0b8a5d5322f0af46ca5",part:"name",class:"bs-file-upload-item__name"},this.fileName),this.fileSize&&o("span",{key:"9667c0fbb54d59d6e1803fabaea475f321bfd985",part:"size",class:"bs-file-upload-item__size"},this.fileSize)),this.renderStatus()),o("bs-icon-button",{key:"6dc6d78f8bceee678d18aae7747193e32d4bc637",part:"action",variant:"subtle",size:"lg",ariaLabel:e?this.removeLabel:this.cancelLabel,onClick:this.onAction},o(e?p:b,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"]}]),d=()=>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"})),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:"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"})),c=()=>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"})),b=()=>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"})),p=()=>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 m(){"undefined"!=typeof customElements&&["bs-file-upload-item","bs-icon-button","bs-progress-linear","bs-ripple"].forEach((s=>{switch(s){case"bs-file-upload-item":customElements.get(e(s))||customElements.define(e(s),n);break;case"bs-icon-button":customElements.get(e(s))||l();break;case"bs-progress-linear":customElements.get(e(s))||a();break;case"bs-ripple":customElements.get(e(s))||r()}}))}m();const f=n,h=m;export{f as BsFileUploadItem,h as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as
|
|
1
|
+
import{t as e,p as i,H as s,c as a,h as o}from"./p-B2gx7SZk.js";import{d as l}from"./p-up01gvHY.js";import{d as t}from"./p-DtkTnaOp.js";const r=i(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsFilesSelect=a(this,"bsFilesSelect"),this.bsFilesReject=a(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 s=e.name.toLowerCase(),a=(e.type||"").toLowerCase();return i.some((e=>e.startsWith(".")?s.endsWith(e):e.endsWith("/*")?a.startsWith(e.slice(0,-1)):a===e))}handleFiles(e){const i=e.filter((e=>this.matchesAccept(e))),s=e.filter((e=>!this.matchesAccept(e))),a=this.multiple?i:i.slice(0,1);this.multiple||s.push(...i.slice(1)),a.length&&this.bsFilesSelect.emit(a),s.length&&this.bsFilesReject.emit(s)}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:"dca680bf51b270a837fe7e8b59ec0e68aab5ccb2",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:"6553299e75c11c86f5d87a797066977712b40cec",part:"icon",class:"bs-file-upload__icon"},o("slot",{key:"f7807bf5237e14f230084ec31777c417efdf1715",name:"icon"},o(d,{key:"8070074c0c7ae30980632842609160604147fa15"}))),o("div",{key:"2d8635c020ee47ff7f69662f5cb3ceae51d7c700",class:"bs-file-upload__content"},o("div",{key:"a7274934366c0c99ec9691f3f34c7664a5e0dacf",class:"bs-file-upload__text"},this.heading&&o("span",{key:"d8bc7716995b017e7c7d9452d0cd57cbbb20cbaa",part:"heading",class:"bs-file-upload__heading"},this.heading),this.description&&o("span",{key:"2b42c3ef723f3d196ffb015fafec77a80c90a053",part:"description",id:"description",class:"bs-file-upload__description"},this.description)),o("bs-button",{key:"c1a2f9de60ef0b22f04a104fb582abfce703d7d2",part:"browse",variant:"neutral",size:"sm",disabled:this.disabled,onClick:this.onBrowse},this.buttonLabel)),o("input",{key:"8330b08007a1c6f9e1a4e161ab31da694ff10a23",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]}]),d=()=>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 n(){"undefined"!=typeof customElements&&["bs-file-upload","bs-button","bs-ripple"].forEach((i=>{switch(i){case"bs-file-upload":customElements.get(e(i))||customElements.define(e(i),r);break;case"bs-button":customElements.get(e(i))||l();break;case"bs-ripple":customElements.get(e(i))||t()}}))}n();const c=r,b=n;export{c as BsFileUpload,b as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as e,H as t,c as a,h as r}from"./p-B2gx7SZk.js";import{d as i}from"./p-BmdSbmFg.js";import{d as l}from"./p-C1owRphU.js";import{d as o}from"./p-I1_Q3HQu.js";import{d as c}from"./p-DiORQQg3.js";import{d as n}from"./p-C3erqJFy.js";import{d as h}from"./p-BP1l6Q3Z.js";import{d as b}from"./p-Co36mHEU.js";import{d as p}from"./p-DgY5pxXd.js";import{d}from"./p-DW0Dw2LS.js";const u={default:["recent","jump-to"],results:["top-matches","search-in"],empty:[],error:[]},g=["recent","jump-to","top-matches","search-in"];let m=0;const v={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},f=e(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsInput=a(this,"bsInput"),this.bsSearch=a(this,"bsSearch"),this.bsSelect=a(this,"bsSelect"),this.bsOpenChange=a(this,"bsOpenChange"),this.bsClearRecent=a(this,"bsClearRecent"),this.bsClearSearch=a(this,"bsClearSearch"),this.bsSeeAll=a(this,"bsSeeAll"),this.bsRetry=a(this,"bsRetry")}get el(){return this}id="bs-gs-"+ ++m;itemSeq=0;observer;inputEl;value="";placeholder="Search customers, orders, products…";label;disabled=!1;open=!1;status="default";totalResults;showFooter=!0;listLabel="Search suggestions";recentLabel="Recent searches";jumpToLabel="Jump to";topMatchesLabel="Top matches";searchInLabel="Search in";navigateLabel="Navigate";searchLabel="Search";closeLabel="Close";fullResultsLabel="Full results";clearRecentLabel="Clear recent";seeAllLabel="See all results";emptyHeading="No results";emptyDescription="Try a different search.";clearSearchLabel="Clear search";errorHeading="Search isn’t available right now";errorDescription="We couldn’t reach the server. Your query is kept — try again in a moment.";retryLabel="Try again";filled={recent:!1,"jump-to":!1,"top-matches":!1,"search-in":!1};activeId=null;bsInput;bsSearch;bsSelect;bsOpenChange;bsClearRecent;bsClearSearch;bsSeeAll;bsRetry;resetActive(){this.activeId=null}componentWillLoad(){this.readFilled(),this.prepareItems()}connectedCallback(){document.addEventListener("pointerdown",this.onDocPointerDown,!0),this.observer=new MutationObserver((()=>{this.readFilled(),this.prepareItems(),this.paintActive()})),this.observer.observe(this.el,{childList:!0})}disconnectedCallback(){document.removeEventListener("pointerdown",this.onDocPointerDown,!0),this.observer?.disconnect()}componentDidRender(){this.prepareItems(),this.paintActive()}allItems(){return Array.from(this.el.children).filter((s=>"BS-SEARCH-ITEM"===s.tagName&&g.includes(s.getAttribute("slot"))))}visibleItems(){if(!this.open)return[];const s=this.allItems();return(u[this.status]??[]).flatMap((e=>s.filter((s=>s.getAttribute("slot")===e))))}enabledItems(){return this.visibleItems().filter((s=>!s.disabled))}readFilled(){const s={...this.filled};let e=!1;for(const t of g){const a=Array.from(this.el.children).some((s=>s.getAttribute("slot")===t));s[t]!==a&&(s[t]=a,e=!0)}e&&(this.filled=s)}prepareItems(){for(const s of this.allItems())"option"!==s.selectionRole&&(s.selectionRole="option"),s.id||(s.id=`${this.id}-opt-${++this.itemSeq}`)}paintActive(){for(const s of this.allItems()){const e=!!this.activeId&&s.id===this.activeId;s.active!==e&&(s.active=e)}}setOpen(s){s&&this.disabled||this.open!==s&&(this.open=s,this.bsOpenChange.emit(s))}setActive(s){this.activeId=s?s.id:null,this.paintActive(),s?.scrollIntoView?.({block:"nearest"})}onDocPointerDown=s=>{this.open&&(s.composedPath().includes(this.el)||this.setOpen(!1))};onInput=s=>{s.stopPropagation(),this.value=s.detail,this.activeId=null,this.bsInput.emit(s.detail),this.setOpen(!0)};onKeyDown=s=>{switch(s.key){case"ArrowDown":case"ArrowUp":{if(s.preventDefault(),!this.open)return void this.setOpen(!0);const e=this.enabledItems();if(!e.length)return;const t=e.findIndex((s=>s.id===this.activeId));return void this.setActive(e["ArrowDown"===s.key?(t+1)%e.length:t<=0?e.length-1:t-1])}case"Enter":{const e=this.open?this.enabledItems().find((s=>s.id===this.activeId)):void 0;return void(e?(s.preventDefault(),e.click()):(this.bsSearch.emit(this.value),this.setOpen(!1)))}case"Escape":return void(this.open&&(s.preventDefault(),s.stopPropagation(),this.setOpen(!1)))}};onItemSelect(s){const e=s.target;e&&"BS-SEARCH-ITEM"===e.tagName&&(s.stopPropagation(),this.bsSelect.emit({value:s.detail,section:e.getAttribute("slot")??""}),this.setOpen(!1))}onPanelMouseOver=s=>{const e=s.composedPath().find((s=>"BS-SEARCH-ITEM"===s.tagName));e&&!e.disabled&&e.id!==this.activeId&&this.setActive(e)};clearSearch=()=>{this.value="",this.bsClearSearch.emit(),this.inputEl?.focus()};sectionLabel(s){return{recent:this.recentLabel,"jump-to":this.jumpToLabel,"top-matches":this.topMatchesLabel,"search-in":this.searchInLabel}[s]}renderHint(s,e){return r("span",{part:"hint",class:"bs-global-search__hint"},s,r("span",{class:"bs-global-search__hint-text"},e))}renderFooter(){const s="number"==typeof this.totalResults,e=r("bs-key",null,r("svg",{slot:"icon",...v},r("path",{d:"M9 14 4 9l5-5"}),r("path",{d:"M4 9h10.5a5.5 5.5 0 0 1 0 11H11"})));return"results"===this.status?r("div",{part:"footer",class:"bs-global-search__footer"},r("div",{part:"see-all",class:"bs-global-search__action",onClick:this.onActionWrapperClick((()=>this.seeAll()))},r("bs-button",{class:"bs-global-search__text-button",variant:"subtle",size:"sm",onClick:()=>this.seeAll()},s?`See all ${this.totalResults} results`:this.seeAllLabel)),r("span",{class:"bs-global-search__spacer"}),this.renderHint([e],this.fullResultsLabel)):r("div",{part:"footer",class:"bs-global-search__footer"},this.renderHint([r("bs-key",null,r("svg",{slot:"icon",...v},r("path",{d:"M12 19V5M5 12l7-7 7 7"}))),r("bs-key",null,r("svg",{slot:"icon",...v},r("path",{d:"M12 5v14M5 12l7 7 7-7"})))],this.navigateLabel),this.renderHint([e],this.searchLabel),this.renderHint([r("bs-key",{label:"Esc"})],this.closeLabel),r("span",{class:"bs-global-search__spacer"}),this.filled.recent&&r("div",{part:"clear-recent",class:"bs-global-search__action",onClick:this.onActionWrapperClick((()=>this.bsClearRecent.emit()))},r("bs-button",{class:"bs-global-search__text-button",variant:"subtle",size:"sm",onClick:()=>this.bsClearRecent.emit()},this.clearRecentLabel)))}seeAll(){this.bsSeeAll.emit(),this.setOpen(!1)}onActionWrapperClick=s=>e=>{e.target===e.currentTarget&&s()};renderStateBlock(s){const e="empty"===s;return r("slot",{name:s},r("bs-empty-state",{part:"empty",intent:e?"default":"error",heading:e?this.emptyHeading:this.errorHeading,description:e?this.emptyDescription:this.errorDescription},e?r("svg",{slot:"icon",...v},r("circle",{cx:"11",cy:"11",r:"7"}),r("path",{d:"m20 20-3.5-3.5"})):r("svg",{slot:"icon",...v},r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"M12 7.5v5M12 16.2v.1"})),r("bs-button",{slot:"action",variant:"outlined",onClick:()=>e?this.clearSearch():this.bsRetry.emit()},e?this.clearSearchLabel:this.retryLabel)))}announcement(){return this.open?"results"===this.status?"number"==typeof this.totalResults?this.totalResults+" results":"":"empty"===this.status?this.emptyHeading:"error"===this.status?this.errorHeading:"":""}render(){const s=(u[this.status]??[]).filter((s=>this.filled[s])),e=s.length>0,t=this.id+"-listbox",a="default"===this.status||"results"===this.status,i=this.showFooter&&a;return r("div",{key:"48912c3c2e6fdfefa05d234fa037e4b47e36cbd9",class:"bs-global-search"},r("div",{key:"aeb8a5d41463b5df24502aecb85290f2535184d6",part:"field",class:"bs-global-search__field",role:"combobox","aria-label":this.label||this.placeholder,"aria-expanded":(this.open&&e)+"","aria-haspopup":"listbox","aria-controls":this.open&&e?t:void 0,"aria-activedescendant":this.open&&this.activeId?this.activeId:void 0,onKeyDown:this.onKeyDown,onFocusin:()=>this.setOpen(!0),onClick:()=>this.setOpen(!0)},r("bs-input",{key:"0aec5505a09ca9fa08e152983b17e3a35619e5ce",ref:s=>this.inputEl=s,type:"search",value:this.value,placeholder:this.placeholder,disabled:this.disabled,onBsInput:this.onInput})),this.open&&r("div",{key:"c9b1589c7602b0522a5a33d895e50e2f57ae7e66",part:"panel",class:"bs-global-search__panel",onMouseDown:s=>s.preventDefault(),onMouseOver:this.onPanelMouseOver},a&&e&&r("div",{key:"aa49f77c49ea3aa5337a01aa8cf2e760ac8f6125",id:t,class:"bs-global-search__list",role:"listbox","aria-label":this.listLabel},s.map((s=>{const e=`${this.id}-h-${s}`;return r("div",{part:"section",class:"bs-global-search__section",role:"group","aria-labelledby":e},r("div",{part:"section-header",id:e,class:"bs-global-search__section-header"},this.sectionLabel(s)),r("slot",{name:s}))}))),"empty"===this.status&&this.renderStateBlock("empty"),"error"===this.status&&this.renderStateBlock("error"),i&&this.renderFooter()),r("span",{key:"591953d910a7986705dde045c325c3043df1387b",class:"bs-global-search__live","aria-live":"polite"},this.announcement()))}static get watchers(){return{status:[{resetActive:0}],open:[{resetActive:0}]}}static get style(){return":host{display:block;position:relative;box-sizing:border-box;width:var(--bs-global-search-width);max-width:100%;--bs-global-search-width:480px;--bs-global-search-panel-radius:var(--bs-border-radius-100);--bs-global-search-panel-padding:var(--bs-spacing-100);--bs-global-search-gap:var(--bs-spacing-100);--bs-global-search-panel-bg:var(--bs-surface-base);--bs-global-search-shadow:0 var(--bs-shadow-position-50) var(--bs-shadow-blur-100) 0 var(--bs-elevation-high);--bs-global-search-z-index:var(--bs-z-index-dropdown);--bs-global-search-divider-color:var(--bs-border-default);--bs-global-search-header-border-color:var(--bs-border-neutral-container);--bs-global-search-header-color:var(--bs-text-muted);--bs-global-search-hint-color:var(--bs-text-secondary)}.bs-global-search{position:relative}.bs-global-search__field bs-input{width:100%}.bs-global-search__panel{position:absolute;top:calc(100% + var(--bs-global-search-gap));left:0;right:0;z-index:var(--bs-global-search-z-index);box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-global-search-gap);padding:var(--bs-global-search-panel-padding);overflow:clip;border-radius:var(--bs-global-search-panel-radius);background:var(--bs-global-search-panel-bg);box-shadow:var(--bs-global-search-shadow)}.bs-global-search__list{display:flex;flex-direction:column;gap:var(--bs-global-search-gap)}.bs-global-search__section{display:flex;flex-direction:column}.bs-global-search__section-header{padding:var(--bs-spacing-150) var(--bs-spacing-150) var(--bs-spacing-100);border-bottom:1px solid var(--bs-global-search-header-border-color);color:var(--bs-global-search-header-color);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:20px}.bs-global-search__footer{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-100) var(--bs-spacing-100) var(--bs-spacing-50);border-top:1px solid var(--bs-global-search-divider-color)}.bs-global-search__hint{display:inline-flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-global-search-hint-color);font-size:var(--bs-font-size-sm);line-height:20px;white-space:nowrap}.bs-global-search__spacer{flex:1 1 0}.bs-global-search__action{display:flex;align-items:center;min-height:44px;cursor:pointer}.bs-global-search__text-button{--bs-button-height-sm:32px;--bs-button-padding-x-sm:var(--bs-spacing-150);--bs-button-radius:var(--bs-border-radius-100);--bs-button-subtle-color:var(--bs-text-default)}.bs-global-search__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}"}},[769,"bs-global-search",{value:[1025],placeholder:[1],label:[1],disabled:[516],open:[1540],status:[513],totalResults:[2,"total-results"],showFooter:[4,"show-footer"],listLabel:[1,"list-label"],recentLabel:[1,"recent-label"],jumpToLabel:[1,"jump-to-label"],topMatchesLabel:[1,"top-matches-label"],searchInLabel:[1,"search-in-label"],navigateLabel:[1,"navigate-label"],searchLabel:[1,"search-label"],closeLabel:[1,"close-label"],fullResultsLabel:[1,"full-results-label"],clearRecentLabel:[1,"clear-recent-label"],seeAllLabel:[1,"see-all-label"],emptyHeading:[1,"empty-heading"],emptyDescription:[1,"empty-description"],clearSearchLabel:[1,"clear-search-label"],errorHeading:[1,"error-heading"],errorDescription:[1,"error-description"],retryLabel:[1,"retry-label"],filled:[32],activeId:[32]},[[0,"bsItemSelect","onItemSelect"]],{status:[{resetActive:0}],open:[{resetActive:0}]}]);function y(){"undefined"!=typeof customElements&&["bs-global-search","bs-button","bs-chip-informative","bs-empty-state","bs-icon-button","bs-icon-tile","bs-input","bs-key","bs-menu","bs-menu-item"].forEach((e=>{switch(e){case"bs-global-search":customElements.get(s(e))||customElements.define(s(e),f);break;case"bs-button":customElements.get(s(e))||i();break;case"bs-chip-informative":customElements.get(s(e))||l();break;case"bs-empty-state":customElements.get(s(e))||o();break;case"bs-icon-button":customElements.get(s(e))||c();break;case"bs-icon-tile":customElements.get(s(e))||n();break;case"bs-input":customElements.get(s(e))||h();break;case"bs-key":customElements.get(s(e))||b();break;case"bs-menu":customElements.get(s(e))||p();break;case"bs-menu-item":customElements.get(s(e))||d()}}))}y();const _=f,x=y;export{_ as BsGlobalSearch,x as defineCustomElement}
|
|
1
|
+
import{t as s,p as e,H as t,c as a,h as r}from"./p-B2gx7SZk.js";import{d as i}from"./p-up01gvHY.js";import{d as l}from"./p-DXwatzvM.js";import{d as o}from"./p-BHzj13sd.js";import{d as c}from"./p-BfCah-Ij.js";import{d as n}from"./p-CHZE_FrW.js";import{d as b}from"./p-CvSewXZF.js";import{d as h}from"./p-CFR3Q0io.js";import{d as p}from"./p-CVQycAap.js";import{d}from"./p-D5eN9Lfa.js";import{d as u}from"./p-DtkTnaOp.js";const g={default:["recent","jump-to"],results:["top-matches","search-in"],empty:[],error:[]},m=["recent","jump-to","top-matches","search-in"];let v=0;const f={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},y=e(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsInput=a(this,"bsInput"),this.bsSearch=a(this,"bsSearch"),this.bsSelect=a(this,"bsSelect"),this.bsOpenChange=a(this,"bsOpenChange"),this.bsClearRecent=a(this,"bsClearRecent"),this.bsClearSearch=a(this,"bsClearSearch"),this.bsSeeAll=a(this,"bsSeeAll"),this.bsRetry=a(this,"bsRetry")}get el(){return this}id="bs-gs-"+ ++v;itemSeq=0;observer;inputEl;value="";placeholder="Search customers, orders, products…";label;disabled=!1;open=!1;status="default";totalResults;showFooter=!0;listLabel="Search suggestions";recentLabel="Recent searches";jumpToLabel="Jump to";topMatchesLabel="Top matches";searchInLabel="Search in";navigateLabel="Navigate";searchLabel="Search";closeLabel="Close";fullResultsLabel="Full results";clearRecentLabel="Clear recent";seeAllLabel="See all results";emptyHeading="No results";emptyDescription="Try a different search.";clearSearchLabel="Clear search";errorHeading="Search isn’t available right now";errorDescription="We couldn’t reach the server. Your query is kept — try again in a moment.";retryLabel="Try again";filled={recent:!1,"jump-to":!1,"top-matches":!1,"search-in":!1};activeId=null;bsInput;bsSearch;bsSelect;bsOpenChange;bsClearRecent;bsClearSearch;bsSeeAll;bsRetry;resetActive(){this.activeId=null}componentWillLoad(){this.readFilled(),this.prepareItems()}connectedCallback(){document.addEventListener("pointerdown",this.onDocPointerDown,!0),this.observer=new MutationObserver((()=>{this.readFilled(),this.prepareItems(),this.paintActive()})),this.observer.observe(this.el,{childList:!0})}disconnectedCallback(){document.removeEventListener("pointerdown",this.onDocPointerDown,!0),this.observer?.disconnect()}componentDidRender(){this.prepareItems(),this.paintActive()}allItems(){return Array.from(this.el.children).filter((s=>"BS-SEARCH-ITEM"===s.tagName&&m.includes(s.getAttribute("slot"))))}visibleItems(){if(!this.open)return[];const s=this.allItems();return(g[this.status]??[]).flatMap((e=>s.filter((s=>s.getAttribute("slot")===e))))}enabledItems(){return this.visibleItems().filter((s=>!s.disabled))}readFilled(){const s={...this.filled};let e=!1;for(const t of m){const a=Array.from(this.el.children).some((s=>s.getAttribute("slot")===t));s[t]!==a&&(s[t]=a,e=!0)}e&&(this.filled=s)}prepareItems(){for(const s of this.allItems())"option"!==s.selectionRole&&(s.selectionRole="option"),s.id||(s.id=`${this.id}-opt-${++this.itemSeq}`)}paintActive(){for(const s of this.allItems()){const e=!!this.activeId&&s.id===this.activeId;s.active!==e&&(s.active=e)}}setOpen(s){s&&this.disabled||this.open!==s&&(this.open=s,this.bsOpenChange.emit(s))}setActive(s){this.activeId=s?s.id:null,this.paintActive(),s?.scrollIntoView?.({block:"nearest"})}onDocPointerDown=s=>{this.open&&(s.composedPath().includes(this.el)||this.setOpen(!1))};onInput=s=>{s.stopPropagation(),this.value=s.detail,this.activeId=null,this.bsInput.emit(s.detail),this.setOpen(!0)};onKeyDown=s=>{switch(s.key){case"ArrowDown":case"ArrowUp":{if(s.preventDefault(),!this.open)return void this.setOpen(!0);const e=this.enabledItems();if(!e.length)return;const t=e.findIndex((s=>s.id===this.activeId));return void this.setActive(e["ArrowDown"===s.key?(t+1)%e.length:t<=0?e.length-1:t-1])}case"Enter":{const e=this.open?this.enabledItems().find((s=>s.id===this.activeId)):void 0;return void(e?(s.preventDefault(),e.click()):(this.bsSearch.emit(this.value),this.setOpen(!1)))}case"Escape":return void(this.open&&(s.preventDefault(),s.stopPropagation(),this.setOpen(!1)))}};onItemSelect(s){const e=s.target;e&&"BS-SEARCH-ITEM"===e.tagName&&(s.stopPropagation(),this.bsSelect.emit({value:s.detail,section:e.getAttribute("slot")??""}),this.setOpen(!1))}onPanelMouseOver=s=>{const e=s.composedPath().find((s=>"BS-SEARCH-ITEM"===s.tagName));e&&!e.disabled&&e.id!==this.activeId&&this.setActive(e)};clearSearch=()=>{this.value="",this.bsClearSearch.emit(),this.inputEl?.focus()};sectionLabel(s){return{recent:this.recentLabel,"jump-to":this.jumpToLabel,"top-matches":this.topMatchesLabel,"search-in":this.searchInLabel}[s]}renderHint(s,e){return r("span",{part:"hint",class:"bs-global-search__hint"},s,r("span",{class:"bs-global-search__hint-text"},e))}renderFooter(){const s="number"==typeof this.totalResults,e=r("bs-key",null,r("svg",{slot:"icon",...f},r("path",{d:"M9 14 4 9l5-5"}),r("path",{d:"M4 9h10.5a5.5 5.5 0 0 1 0 11H11"})));return"results"===this.status?r("div",{part:"footer",class:"bs-global-search__footer"},r("div",{part:"see-all",class:"bs-global-search__action",onClick:this.onActionWrapperClick((()=>this.seeAll()))},r("bs-button",{class:"bs-global-search__text-button",variant:"subtle",size:"sm",onClick:()=>this.seeAll()},s?`See all ${this.totalResults} results`:this.seeAllLabel)),r("span",{class:"bs-global-search__spacer"}),this.renderHint([e],this.fullResultsLabel)):r("div",{part:"footer",class:"bs-global-search__footer"},this.renderHint([r("bs-key",null,r("svg",{slot:"icon",...f},r("path",{d:"M12 19V5M5 12l7-7 7 7"}))),r("bs-key",null,r("svg",{slot:"icon",...f},r("path",{d:"M12 5v14M5 12l7 7 7-7"})))],this.navigateLabel),this.renderHint([e],this.searchLabel),this.renderHint([r("bs-key",{label:"Esc"})],this.closeLabel),r("span",{class:"bs-global-search__spacer"}),this.filled.recent&&r("div",{part:"clear-recent",class:"bs-global-search__action",onClick:this.onActionWrapperClick((()=>this.bsClearRecent.emit()))},r("bs-button",{class:"bs-global-search__text-button",variant:"subtle",size:"sm",onClick:()=>this.bsClearRecent.emit()},this.clearRecentLabel)))}seeAll(){this.bsSeeAll.emit(),this.setOpen(!1)}onActionWrapperClick=s=>e=>{e.target===e.currentTarget&&s()};renderStateBlock(s){const e="empty"===s;return r("slot",{name:s},r("bs-empty-state",{part:"empty",intent:e?"default":"error",heading:e?this.emptyHeading:this.errorHeading,description:e?this.emptyDescription:this.errorDescription},e?r("svg",{slot:"icon",...f},r("circle",{cx:"11",cy:"11",r:"7"}),r("path",{d:"m20 20-3.5-3.5"})):r("svg",{slot:"icon",...f},r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"M12 7.5v5M12 16.2v.1"})),r("bs-button",{slot:"action",variant:"outlined",onClick:()=>e?this.clearSearch():this.bsRetry.emit()},e?this.clearSearchLabel:this.retryLabel)))}announcement(){return this.open?"results"===this.status?"number"==typeof this.totalResults?this.totalResults+" results":"":"empty"===this.status?this.emptyHeading:"error"===this.status?this.errorHeading:"":""}render(){const s=(g[this.status]??[]).filter((s=>this.filled[s])),e=s.length>0,t=this.id+"-listbox",a="default"===this.status||"results"===this.status,i=this.showFooter&&a;return r("div",{key:"122fd2e1440ff04e7aeb9e12b8071287c9eae7ec",class:"bs-global-search"},r("div",{key:"dc2a228d802815873904ca8f0504f71f8ce73dd0",part:"field",class:"bs-global-search__field",role:"combobox","aria-label":this.label||this.placeholder,"aria-expanded":(this.open&&e)+"","aria-haspopup":"listbox","aria-controls":this.open&&e?t:void 0,"aria-activedescendant":this.open&&this.activeId?this.activeId:void 0,onKeyDown:this.onKeyDown,onFocusin:()=>this.setOpen(!0),onClick:()=>this.setOpen(!0)},r("bs-input",{key:"350322cbdeccd18ac2456fb358ec83589aa835c8",ref:s=>this.inputEl=s,type:"search",value:this.value,placeholder:this.placeholder,disabled:this.disabled,onBsInput:this.onInput})),this.open&&r("div",{key:"c250dc78b38158f9529dbd9c2bd1f2f3e9c107a4",part:"panel",class:"bs-global-search__panel",onMouseDown:s=>s.preventDefault(),onMouseOver:this.onPanelMouseOver},a&&e&&r("div",{key:"17c81ab7633498a3de7853a33b2d31db8b304633",id:t,class:"bs-global-search__list",role:"listbox","aria-label":this.listLabel},s.map((s=>{const e=`${this.id}-h-${s}`;return r("div",{part:"section",class:"bs-global-search__section",role:"group","aria-labelledby":e},r("div",{part:"section-header",id:e,class:"bs-global-search__section-header"},this.sectionLabel(s)),r("slot",{name:s}))}))),"empty"===this.status&&this.renderStateBlock("empty"),"error"===this.status&&this.renderStateBlock("error"),i&&this.renderFooter()),r("span",{key:"fc76b4785031c6ed1b3e3ba5668dfaacdbc0faa4",class:"bs-global-search__live","aria-live":"polite"},this.announcement()))}static get watchers(){return{status:[{resetActive:0}],open:[{resetActive:0}]}}static get style(){return":host{display:block;position:relative;box-sizing:border-box;width:var(--bs-global-search-width);max-width:100%;--bs-global-search-width:480px;--bs-global-search-panel-radius:var(--bs-border-radius-100);--bs-global-search-panel-padding:var(--bs-spacing-100);--bs-global-search-gap:var(--bs-spacing-100);--bs-global-search-panel-bg:var(--bs-surface-base);--bs-global-search-shadow:0 var(--bs-shadow-position-50) var(--bs-shadow-blur-100) 0 var(--bs-elevation-high);--bs-global-search-z-index:var(--bs-z-index-dropdown);--bs-global-search-divider-color:var(--bs-border-default);--bs-global-search-header-border-color:var(--bs-border-neutral-container);--bs-global-search-header-color:var(--bs-text-muted);--bs-global-search-hint-color:var(--bs-text-secondary)}.bs-global-search{position:relative}.bs-global-search__field bs-input{width:100%}.bs-global-search__panel{position:absolute;top:calc(100% + var(--bs-global-search-gap));left:0;right:0;z-index:var(--bs-global-search-z-index);box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-global-search-gap);padding:var(--bs-global-search-panel-padding);overflow:clip;border-radius:var(--bs-global-search-panel-radius);background:var(--bs-global-search-panel-bg);box-shadow:var(--bs-global-search-shadow)}.bs-global-search__list{display:flex;flex-direction:column;gap:var(--bs-global-search-gap)}.bs-global-search__section{display:flex;flex-direction:column}.bs-global-search__section-header{padding:var(--bs-spacing-150) var(--bs-spacing-150) var(--bs-spacing-100);border-bottom:1px solid var(--bs-global-search-header-border-color);color:var(--bs-global-search-header-color);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:20px}.bs-global-search__footer{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:var(--bs-spacing-100) var(--bs-spacing-100) var(--bs-spacing-50);border-top:1px solid var(--bs-global-search-divider-color)}.bs-global-search__hint{display:inline-flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-global-search-hint-color);font-size:var(--bs-font-size-sm);line-height:20px;white-space:nowrap}.bs-global-search__spacer{flex:1 1 0}.bs-global-search__action{display:flex;align-items:center;min-height:44px;cursor:pointer}.bs-global-search__text-button{--bs-button-height-sm:32px;--bs-button-padding-x-sm:var(--bs-spacing-150);--bs-button-radius:var(--bs-border-radius-100);--bs-button-subtle-color:var(--bs-text-default)}.bs-global-search__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}"}},[769,"bs-global-search",{value:[1025],placeholder:[1],label:[1],disabled:[516],open:[1540],status:[513],totalResults:[2,"total-results"],showFooter:[4,"show-footer"],listLabel:[1,"list-label"],recentLabel:[1,"recent-label"],jumpToLabel:[1,"jump-to-label"],topMatchesLabel:[1,"top-matches-label"],searchInLabel:[1,"search-in-label"],navigateLabel:[1,"navigate-label"],searchLabel:[1,"search-label"],closeLabel:[1,"close-label"],fullResultsLabel:[1,"full-results-label"],clearRecentLabel:[1,"clear-recent-label"],seeAllLabel:[1,"see-all-label"],emptyHeading:[1,"empty-heading"],emptyDescription:[1,"empty-description"],clearSearchLabel:[1,"clear-search-label"],errorHeading:[1,"error-heading"],errorDescription:[1,"error-description"],retryLabel:[1,"retry-label"],filled:[32],activeId:[32]},[[0,"bsItemSelect","onItemSelect"]],{status:[{resetActive:0}],open:[{resetActive:0}]}]);function _(){"undefined"!=typeof customElements&&["bs-global-search","bs-button","bs-chip-informative","bs-empty-state","bs-icon-button","bs-icon-tile","bs-input","bs-key","bs-menu","bs-menu-item","bs-ripple"].forEach((e=>{switch(e){case"bs-global-search":customElements.get(s(e))||customElements.define(s(e),y);break;case"bs-button":customElements.get(s(e))||i();break;case"bs-chip-informative":customElements.get(s(e))||l();break;case"bs-empty-state":customElements.get(s(e))||o();break;case"bs-icon-button":customElements.get(s(e))||c();break;case"bs-icon-tile":customElements.get(s(e))||n();break;case"bs-input":customElements.get(s(e))||b();break;case"bs-key":customElements.get(s(e))||h();break;case"bs-menu":customElements.get(s(e))||p();break;case"bs-menu-item":customElements.get(s(e))||d();break;case"bs-ripple":customElements.get(s(e))||u()}}))}_();const x=y,w=_;export{x as BsGlobalSearch,w as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as s,H as i,h as r}from"./p-B2gx7SZk.js";const
|
|
1
|
+
import{t,p as s,H as i,h as r}from"./p-B2gx7SZk.js";const n=["0","25","50","75","100","150","200","250","300","350","400","500","550","600","700","800","1000","1200","1500"],e=["start","center","end","stretch"],a=s(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}columns="1";gap="100";rowGap;columnGap;minColumnWidth;align="stretch";template(){const t=this.minColumnWidth?.trim();if(t)return`repeat(auto-fit, minmax(min(100%, ${t}), 1fr))`;const s=(this.columns??"1").trim();if(/^\d+$/.test(s)){const t=parseInt(s,10);return`repeat(${t>0?t:1}, minmax(0, 1fr))`}return s||"repeat(1, minmax(0, 1fr))"}token(t){const s=t?.trim();return`var(--bs-spacing-${s&&n.includes(s)?s:"100"})`}render(){const t=`var(--bs-grid-gap, ${this.token(this.gap)})`,s=this.rowGap?this.token(this.rowGap):t,i=this.columnGap?this.token(this.columnGap):t,n=e.includes(this.align)?this.align:"stretch";return r("div",{key:"cd02b8630bd31c42ffdf9a594a0808aa5f2cea92",class:"bs-grid",part:"container",style:{gridTemplateColumns:this.template(),rowGap:`var(--bs-grid-row-gap, ${s})`,columnGap:`var(--bs-grid-column-gap, ${i})`,alignItems:n}},r("slot",{key:"ff6f7beebdd212901e3b071f0c02270df6494219"}))}static get style(){return":host{display:block;min-width:0}.bs-grid{display:grid;width:100%;box-sizing:border-box}"}},[769,"bs-grid",{columns:[513],gap:[513],rowGap:[513,"row-gap"],columnGap:[513,"column-gap"],minColumnWidth:[513,"min-column-width"],align:[513]}]);function o(){"undefined"!=typeof customElements&&["bs-grid"].forEach((s=>{"bs-grid"===s&&(customElements.get(t(s))||customElements.define(t(s),a))}))}o();const c=a,m=o;export{c as BsGrid,m as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-BfCah-Ij.js";const a=o,p=s;export{a as BsIconButton,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as r}from"./p-
|
|
1
|
+
import{B as o,d as r}from"./p-CHZE_FrW.js";const s=o,p=r;export{s as BsIconTile,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as e,p as i,H as n,c as a,h as b}from"./p-B2gx7SZk.js";import{d as s}from"./p-DtkTnaOp.js";const t=i(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsSelect=a(this,"bsSelect")}get el(){return this}selected=!1;disabled=!1;ariaLabel=null;value;tabbable;hasIcon=!1;hasLabel=!1;bsSelect;componentWillLoad(){this.hasIcon=this.hasSlottedContent("icon"),this.hasLabel=this.hasSlottedContent(null)}hasSlottedContent(e){return Array.from(this.el.childNodes).some((i=>i.nodeType===Node.ELEMENT_NODE?i.getAttribute("slot")===e:null===e))}onIconSlotchange=e=>{this.hasIcon=e.target.assignedNodes().length>0};onLabelSlotchange=e=>{this.hasLabel=e.target.assignedNodes().length>0};onClick=()=>{this.disabled||this.bsSelect.emit()};render(){return b("button",{key:"8dc1570ed12bc71fd69e9fee3fe1159006785b52",type:"button",part:"tab",role:"tab",class:`bs-inline-tab ${this.selected?"bs-inline-tab--selected":""} ${this.disabled?"bs-inline-tab--disabled":""} ${this.hasIcon&&!this.hasLabel?"bs-inline-tab--icon-only":""} ${this.hasIcon?"bs-inline-tab--has-icon":""}`,disabled:this.disabled,"aria-selected":this.selected+"","aria-disabled":this.disabled?"true":void 0,"aria-label":this.ariaLabel,tabIndex:void 0===this.tabbable?void 0:this.tabbable?0:-1,onClick:this.onClick},b("bs-ripple",{key:"d7548736d118b53c5b0e3fa36af2e3ff8c7a6b5f",part:"ripple",centered:!1,disabled:this.disabled}),b("span",{key:"d5f1355d7b9fe756edc2a503bf32c9feafcb3ffc",part:"icon",class:"bs-inline-tab__icon "+(this.hasIcon?"bs-inline-tab__icon--has-content":"")},b("slot",{key:"ed0d0de3d21804e233b0593b96aebb9bbd07ac80",name:"icon",onSlotchange:this.onIconSlotchange})),b("span",{key:"6ab027e86d0d3d1c47e3e22bb53e7f846b32031c",part:"label",class:"bs-inline-tab__label "+(this.hasLabel?"bs-inline-tab__label--has-content":"")},b("slot",{key:"90b51e5ead7fb092ee1ee2f81b68709550b00b32",onSlotchange:this.onLabelSlotchange})))}static get style(){return":host{display:inline-block;--bs-inline-tab-radius:var(--bs-border-radius-full);--bs-inline-tab-padding-y:var(--bs-spacing-100);--bs-inline-tab-padding-x:var(--bs-spacing-200);--bs-inline-tab-padding-left-with-icon:var(--bs-spacing-150);--bs-inline-tab-padding-right-with-icon:var(--bs-spacing-200);--bs-inline-tab-gap:var(--bs-spacing-50);--bs-inline-tab-bg-default:var(--bs-color-neutral-container);--bs-inline-tab-color-default:var(--bs-text-secondary);--bs-inline-tab-bg-hover:var(--bs-color-neutral-container-hover);--bs-inline-tab-color-hover:var(--bs-text-default);--bs-inline-tab-bg-focus:var(--bs-color-neutral-container-focused);--bs-inline-tab-bg-pressed:var(--bs-color-neutral-container-pressed);--bs-inline-tab-focus-ring-color:var(--bs-border-neutral-focus);--bs-inline-tab-bg-disabled:var(--bs-surface-action-disabled);--bs-inline-tab-color-disabled:var(--bs-text-on-disabled);--bs-inline-tab-bg-selected:var(--bs-color-primary-default);--bs-inline-tab-color-selected:var(--bs-text-on-action);--bs-inline-tab-bg-selected-hover:var(--bs-color-primary-hover);--bs-inline-tab-bg-selected-focus:var(--bs-color-primary-focused);--bs-inline-tab-bg-selected-pressed:var(--bs-color-primary-pressed);--bs-inline-tab-font-size:var(--bs-font-size-sm);--bs-inline-tab-font-weight:var(--bs-font-weight-semibold);--bs-inline-tab-line-height:var(--bs-line-height-body-sm)}.bs-inline-tab{position:relative;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;border:none;cursor:pointer;font-family:inherit;border-radius:var(--bs-inline-tab-radius);padding:var(--bs-inline-tab-padding-y) var(--bs-inline-tab-padding-x);background:var(--bs-inline-tab-bg-default);color:var(--bs-inline-tab-color-default);transition:color var(--bs-duration-fast) var(--bs-easing-standard), background-color var(--bs-duration-fast) var(--bs-easing-standard)}.bs-inline-tab--has-icon{padding-top:var(--bs-inline-tab-padding-y);padding-bottom:var(--bs-inline-tab-padding-y);padding-inline-start:var(--bs-inline-tab-padding-left-with-icon);padding-inline-end:var(--bs-inline-tab-padding-right-with-icon);gap:var(--bs-inline-tab-gap)}.bs-inline-tab:focus-visible{outline:2px solid var(--bs-inline-tab-focus-ring-color);outline-offset:2px}.bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):hover{background:var(--bs-inline-tab-bg-hover);color:var(--bs-inline-tab-color-hover)}.bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):focus-visible{background:var(--bs-inline-tab-bg-focus);color:var(--bs-inline-tab-color-hover)}.bs-inline-tab:not(.bs-inline-tab--selected):not(.bs-inline-tab--disabled):active{background:var(--bs-inline-tab-bg-pressed);color:var(--bs-inline-tab-color-hover)}.bs-inline-tab--selected{background:var(--bs-inline-tab-bg-selected);color:var(--bs-inline-tab-color-selected)}.bs-inline-tab--selected:not(.bs-inline-tab--disabled):hover{background:var(--bs-inline-tab-bg-selected-hover)}.bs-inline-tab--selected:not(.bs-inline-tab--disabled):focus-visible{background:var(--bs-inline-tab-bg-selected-focus)}.bs-inline-tab--selected:not(.bs-inline-tab--disabled):active{background:var(--bs-inline-tab-bg-selected-pressed)}.bs-inline-tab--disabled{background:var(--bs-inline-tab-bg-disabled);color:var(--bs-inline-tab-color-disabled);cursor:not-allowed}.bs-inline-tab__icon{display:none;width:24px;height:24px;flex-shrink:0;color:inherit}.bs-inline-tab__icon--has-content{display:inline-flex;align-items:center;justify-content:center}.bs-inline-tab__icon ::slotted(svg){width:24px;height:24px}.bs-inline-tab__label{display:none;font-size:var(--bs-inline-tab-font-size);font-weight:var(--bs-inline-tab-font-weight);line-height:calc(var(--bs-inline-tab-line-height) * 1px);white-space:nowrap}.bs-inline-tab__label--has-content{display:inline-block}"}},[769,"bs-inline-tab",{selected:[516],disabled:[4],ariaLabel:[1,"aria-label"],value:[513],tabbable:[4],hasIcon:[32],hasLabel:[32]}]);function l(){"undefined"!=typeof customElements&&["bs-inline-tab","bs-ripple"].forEach((i=>{switch(i){case"bs-inline-tab":customElements.get(e(i))||customElements.define(e(i),t);break;case"bs-ripple":customElements.get(e(i))||s()}}))}l();const o=t,r=l;export{o as BsInlineTab,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-CvSewXZF.js";const p=o,r=s;export{p as BsInput,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-D3PuUD8Z.js";const p=o,r=s;export{p as BsKeyCaps,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-CFR3Q0io.js";const p=o,r=s;export{p as BsKey,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as e,H as t,c as o,h as a}from"./p-B2gx7SZk.js";import{d as r}from"./p-DBvhi__l.js";import{d as c}from"./p-C1owRphU.js";import{d as b}from"./p-DiORQQg3.js";import{d as i}from"./p-BP1l6Q3Z.js";import{d}from"./p-Co36mHEU.js";import{d as h}from"./p-Dl0FedE5.js";import{d as n}from"./p-DgY5pxXd.js";import{d as l}from"./p-DW0Dw2LS.js";import{d as u}from"./p-Deq0LzGO.js";import{d as y}from"./p-D9dDFyPB.js";let p=0;const f=s=>Array.isArray(s)?s.filter((s=>""!==s)):((s??"")+"").split("+").map((s=>s.trim())).filter(Boolean),k=s=>{if(void 0!==s.singleKey)return s.singleKey;const e=f(s.keys);return 1===e.length&&1===e[0].length},g=e(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsClose=o(this,"bsClose"),this.bsQueryChange=o(this,"bsQueryChange"),this.bsSingleKeyChange=o(this,"bsSingleKeyChange")}id="bs-ks-"+ ++p;groups=[];heading="Keyboard shortcuts";closeLabel="Close";searchPlaceholder="Search for an action";query="";showSingleKeySwitch=!0;singleKeyEnabled=!0;singleKeyLabel="Single-key shortcuts";singleKeyDescription="Turn off if they clash with a screen reader or other tools.";showFooterHint=!0;footerKey="?";footerText="anywhere to open this list. On Mac: Cmd instead of Ctrl.";footerPrefix="Press";noResultsText="No shortcuts match";bsClose;bsQueryChange;bsSingleKeyChange;visibleGroups(){const s=(this.query??"").trim().toLowerCase(),e=this.groups??[];return s?e.map((e=>({...e,shortcuts:(e.shortcuts??[]).filter((e=>e.action.toLowerCase().includes(s)||f(e.keys).join("+").toLowerCase().includes(s)))}))).filter((s=>s.shortcuts.length)):e.filter((s=>s.shortcuts?.length))}columns(s){const e=s.reduce(((s,e)=>s+e.shortcuts.length),0),t=[[],[]];let o=0;for(const a of s)t[o+a.shortcuts.length/2<=e/2?0:1].push(a),o+=a.shortcuts.length;return t[1].length?t:[t[0]]}onKeyDown=s=>{"Escape"===s.key&&this.bsClose.emit()};onInput=s=>{this.query=s.detail,this.bsQueryChange.emit(s.detail)};onSwitch=s=>{this.singleKeyEnabled=s.detail,this.bsSingleKeyChange.emit(s.detail)};render(){const s=this.visibleGroups(),e=s.reduce(((s,e)=>s+e.shortcuts.length),0),t=this.columns(s),o=this.id+"-heading",r=0===e&&""!==(this.query??"").trim();let c=0;return a("bs-card",{key:"7e825a3d2c214a2228c8b302bc6530ca23427b2f",part:"container",class:"bs-keyboard-shortcuts",surface:"base",role:"region","aria-labelledby":o,onKeyDown:this.onKeyDown},a("div",{key:"8595c3352463214acefb820a23a9adbdd66e6b76",class:"bs-keyboard-shortcuts__body"},a("div",{key:"bbdb0c462e6958d6fbeca96bd5ffb5dc99bdaf19",part:"head",class:"bs-keyboard-shortcuts__head"},a("svg",{key:"95641e98b3795b85caa6e70ebd9bd2deeecdc2aa",class:"bs-keyboard-shortcuts__icon",viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},a("rect",{key:"b1160b8146645716ea1b675c480f42675a4d6f29",x:"2",y:"5",width:"20",height:"14",rx:"2"}),a("path",{key:"18f2516e9113b2c335587bd3d17c49099496f1ec",d:"M6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M9 15.5h6"})),a("h4",{key:"299d3fa12acc958389b7cd6b7ec9c2cefe12ed43",part:"heading",id:o,class:"bs-keyboard-shortcuts__heading"},a("slot",{key:"80365f19a624d950cfa678b1d2cb7a2eb7dbeb33",name:"heading"},this.heading)),a("bs-icon-button",{key:"2e43986aac1914ab56527ac09e08889fbe6ca0ef",part:"close",variant:"subtle",size:"md","aria-label":this.closeLabel,onClick:()=>this.bsClose.emit()},a("svg",{key:"cd655a49a3142304b168c8a8f25c89b63c0fbc79",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true"},a("path",{key:"7a39bf4eb97bde3d6d81d3db53fea3589af6e8c9",d:"M6 6l12 12M18 6 6 18"})))),a("bs-input",{key:"b86dc235443e567aede36a767ddc015481ef08fa",part:"search",type:"search",placeholder:this.searchPlaceholder,value:this.query,onBsInput:this.onInput}),this.showSingleKeySwitch&&a("div",{key:"4fe525465a7dbae779af2aa9596669d06a8c7f71",part:"switch",class:"bs-keyboard-shortcuts__switch"},a("div",{key:"2821019a258b02c2d37679360001cd6ba390d304",class:"bs-keyboard-shortcuts__switch-text"},a("span",{key:"58f8f4dca914d41ad2b9b8883a117d4b865b4faa",class:"bs-keyboard-shortcuts__switch-title"},this.singleKeyLabel),a("span",{key:"41cfb03e58e546ed639a38452524b775065f1027",class:"bs-keyboard-shortcuts__switch-caption"},this.singleKeyDescription)),a("bs-switch",{key:"a974154d5c9388fc5fa6b4b077f148fbe37340c4",ariaLabel:this.singleKeyLabel,checked:this.singleKeyEnabled,onBsChange:this.onSwitch})),a("span",{key:"636f5d35847c6bd0dcfc2d0f00b4d126bb764fbc",class:"bs-keyboard-shortcuts__live","aria-live":"polite"},`${e} shortcut${1===e?"":"s"}`),r?a("p",{part:"empty",class:"bs-keyboard-shortcuts__empty",role:"status"},this.noResultsText):a("div",{part:"groups",class:"bs-keyboard-shortcuts__groups"},t.map((s=>a("div",{class:"bs-keyboard-shortcuts__column"},s.map((s=>{const e=`${this.id}-g${c++}`;return a("div",{part:"group",class:"bs-keyboard-shortcuts__group",role:"group","aria-labelledby":e},a("div",{part:"group-title",id:e,class:"bs-keyboard-shortcuts__group-title"},s.title),a("div",{class:"bs-keyboard-shortcuts__rows",role:"list"},s.shortcuts.map((s=>a("bs-shortcut-row",{part:"row",action:s.action,keys:s.keys,selectionRole:"listitem",disabled:!!s.disabled||!this.singleKeyEnabled&&k(s)})))))})))))),this.showFooterHint&&a("div",{key:"05833326cdbea5dbb994fd584bc54866c14cf615",part:"footer",class:"bs-keyboard-shortcuts__footer"},a("slot",{key:"eeb752068052c3f27cbfa0893f03a22f04328489",name:"footer"},a("span",{key:"55c95afd62dae51c2b82362210e558fad904f7b7"},this.footerPrefix),a("bs-key",{key:"b9f8ef5cd3b3e5e2fce7a99bd2b29d751a764901",label:this.footerKey}),a("span",{key:"13b4719f50cd4d3fadc2802cb22d31f04e775798"},this.footerText)))))}static get style(){return":host{display:block;width:var(--bs-keyboard-shortcuts-width);min-width:var(--bs-keyboard-shortcuts-width);box-sizing:border-box;--bs-keyboard-shortcuts-width:720px;--bs-keyboard-shortcuts-bg:var(--bs-surface-base);--bs-keyboard-shortcuts-radius:var(--bs-border-radius-150);--bs-keyboard-shortcuts-padding:var(--bs-spacing-200);--bs-keyboard-shortcuts-gap:var(--bs-spacing-200);--bs-keyboard-shortcuts-shadow:0 var(--bs-shadow-position-100) var(--bs-shadow-blur-100) 0 var(--bs-elevation-higher);--bs-keyboard-shortcuts-column-gap:var(--bs-spacing-600);--bs-keyboard-shortcuts-color:var(--bs-text-default);--bs-keyboard-shortcuts-color-secondary:var(--bs-text-secondary)}.bs-keyboard-shortcuts{display:block;--bs-card-bg:var(--bs-keyboard-shortcuts-bg);--bs-card-radius:var(--bs-keyboard-shortcuts-radius);--bs-card-padding:var(--bs-keyboard-shortcuts-padding);--bs-card-shadow:var(--bs-keyboard-shortcuts-shadow);--bs-card-overflow:visible;color:var(--bs-keyboard-shortcuts-color)}.bs-keyboard-shortcuts__body{display:flex;flex-direction:column;gap:var(--bs-keyboard-shortcuts-gap)}.bs-keyboard-shortcuts__head{display:flex;align-items:center;gap:var(--bs-spacing-100)}.bs-keyboard-shortcuts__icon{flex-shrink:0;color:var(--bs-keyboard-shortcuts-color)}.bs-keyboard-shortcuts__heading{flex:1;margin:0;color:var(--bs-keyboard-shortcuts-color);font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-line-height-heading-h4) * 1px)}.bs-keyboard-shortcuts__switch{display:flex;align-items:center;gap:var(--bs-spacing-200)}.bs-keyboard-shortcuts__switch-text{flex:1;display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__switch-title{color:var(--bs-keyboard-shortcuts-color);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-keyboard-shortcuts__switch-caption{color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-keyboard-shortcuts__live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-keyboard-shortcuts__groups{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));column-gap:var(--bs-keyboard-shortcuts-column-gap);align-items:start}.bs-keyboard-shortcuts__column{display:flex;flex-direction:column;gap:var(--bs-spacing-200);min-width:0}.bs-keyboard-shortcuts__group{display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__group-title{color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-keyboard-shortcuts__rows{display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__empty{margin:0;color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-sm);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-keyboard-shortcuts__footer{display:flex;align-items:center;gap:var(--bs-spacing-75);color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px);white-space:nowrap}"}},[769,"bs-keyboard-shortcuts",{groups:[16],heading:[1],closeLabel:[1,"close-label"],searchPlaceholder:[1,"search-placeholder"],query:[1025],showSingleKeySwitch:[4,"show-single-key-switch"],singleKeyEnabled:[1540,"single-key-enabled"],singleKeyLabel:[1,"single-key-label"],singleKeyDescription:[1,"single-key-description"],showFooterHint:[4,"show-footer-hint"],footerKey:[1,"footer-key"],footerText:[1,"footer-text"],footerPrefix:[1,"footer-prefix"],noResultsText:[1,"no-results-text"]}]);function m(){"undefined"!=typeof customElements&&["bs-keyboard-shortcuts","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-key","bs-key-caps","bs-menu","bs-menu-item","bs-shortcut-row","bs-switch"].forEach((e=>{switch(e){case"bs-keyboard-shortcuts":customElements.get(s(e))||customElements.define(s(e),g);break;case"bs-card":customElements.get(s(e))||r();break;case"bs-chip-informative":customElements.get(s(e))||c();break;case"bs-icon-button":customElements.get(s(e))||b();break;case"bs-input":customElements.get(s(e))||i();break;case"bs-key":customElements.get(s(e))||d();break;case"bs-key-caps":customElements.get(s(e))||h();break;case"bs-menu":customElements.get(s(e))||n();break;case"bs-menu-item":customElements.get(s(e))||l();break;case"bs-shortcut-row":customElements.get(s(e))||u();break;case"bs-switch":customElements.get(s(e))||y()}}))}m();const v=g,_=m;export{v as BsKeyboardShortcuts,_ as defineCustomElement}
|
|
1
|
+
import{t as s,p as e,H as t,c as o,h as a}from"./p-B2gx7SZk.js";import{d as r}from"./p-EGNLb4cQ.js";import{d as c}from"./p-DXwatzvM.js";import{d as i}from"./p-BfCah-Ij.js";import{d as b}from"./p-CvSewXZF.js";import{d}from"./p-CFR3Q0io.js";import{d as h}from"./p-D3PuUD8Z.js";import{d as n}from"./p-CVQycAap.js";import{d as l}from"./p-D5eN9Lfa.js";import{d as u}from"./p-DtkTnaOp.js";import{d as f}from"./p-DXbcyEgd.js";import{d as p}from"./p--Tyv3LIl.js";let y=0;const k=s=>Array.isArray(s)?s.filter((s=>""!==s)):((s??"")+"").split("+").map((s=>s.trim())).filter(Boolean),g=s=>{if(void 0!==s.singleKey)return s.singleKey;const e=k(s.keys);return 1===e.length&&1===e[0].length},m=e(class extends t{constructor(s){super(),!1!==s&&this.__registerHost(),this.__attachShadow(),this.bsClose=o(this,"bsClose"),this.bsQueryChange=o(this,"bsQueryChange"),this.bsSingleKeyChange=o(this,"bsSingleKeyChange")}id="bs-ks-"+ ++y;groups=[];heading="Keyboard shortcuts";closeLabel="Close";searchPlaceholder="Search for an action";query="";showSingleKeySwitch=!0;singleKeyEnabled=!0;singleKeyLabel="Single-key shortcuts";singleKeyDescription="Turn off if they clash with a screen reader or other tools.";showFooterHint=!0;footerKey="?";footerText="anywhere to open this list. On Mac: Cmd instead of Ctrl.";footerPrefix="Press";noResultsText="No shortcuts match";bsClose;bsQueryChange;bsSingleKeyChange;visibleGroups(){const s=(this.query??"").trim().toLowerCase(),e=this.groups??[];return s?e.map((e=>({...e,shortcuts:(e.shortcuts??[]).filter((e=>e.action.toLowerCase().includes(s)||k(e.keys).join("+").toLowerCase().includes(s)))}))).filter((s=>s.shortcuts.length)):e.filter((s=>s.shortcuts?.length))}columns(s){const e=s.reduce(((s,e)=>s+e.shortcuts.length),0),t=[[],[]];let o=0;for(const a of s)t[o+a.shortcuts.length/2<=e/2?0:1].push(a),o+=a.shortcuts.length;return t[1].length?t:[t[0]]}onKeyDown=s=>{"Escape"===s.key&&this.bsClose.emit()};onInput=s=>{this.query=s.detail,this.bsQueryChange.emit(s.detail)};onSwitch=s=>{this.singleKeyEnabled=s.detail,this.bsSingleKeyChange.emit(s.detail)};render(){const s=this.visibleGroups(),e=s.reduce(((s,e)=>s+e.shortcuts.length),0),t=this.columns(s),o=this.id+"-heading",r=0===e&&""!==(this.query??"").trim();let c=0;return a("bs-card",{key:"79e5266a0337b073391c6c82c629086f3f5a6dce",part:"container",class:"bs-keyboard-shortcuts",surface:"base",role:"region","aria-labelledby":o,onKeyDown:this.onKeyDown},a("div",{key:"ad81f8b924d8d2d5462efd14e3201746fb00d04b",class:"bs-keyboard-shortcuts__body"},a("div",{key:"54a8c9ea691523fe7f4c3f41157ffcaa814fff91",part:"head",class:"bs-keyboard-shortcuts__head"},a("svg",{key:"d11295fa495307b9d2117b5efda0be187eabbafb",class:"bs-keyboard-shortcuts__icon",viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},a("rect",{key:"ff8e19a76fc9c2d21605d9d7e5642465a0b0977b",x:"2",y:"5",width:"20",height:"14",rx:"2"}),a("path",{key:"e71f72087979fd4114439ca7db3722e5eba298d4",d:"M6 9h.01M10 9h.01M14 9h.01M18 9h.01M6 13h.01M18 13h.01M9 15.5h6"})),a("h4",{key:"b5fb4a70cedbf7104abdc873c147e1f0986cfcd5",part:"heading",id:o,class:"bs-keyboard-shortcuts__heading"},a("slot",{key:"c4d748a98ef98e02a26476c4c8b853d3e77bad11",name:"heading"},this.heading)),a("bs-icon-button",{key:"aff51431172e892da6de1181bf3344eca2909e76",part:"close",variant:"subtle",size:"md","aria-label":this.closeLabel,onClick:()=>this.bsClose.emit()},a("svg",{key:"eb80c782f7af169f434b4ff142c961f85eef3306",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","aria-hidden":"true"},a("path",{key:"c576a6aeca7ad33fb18922d6f6b327ac6e2aab5d",d:"M6 6l12 12M18 6 6 18"})))),a("bs-input",{key:"200bfa90b61cc7a8ecdde7f373fd6b0c7f438e7c",part:"search",type:"search",placeholder:this.searchPlaceholder,value:this.query,onBsInput:this.onInput}),this.showSingleKeySwitch&&a("div",{key:"41584586700e0589f078e996ab54497401c87059",part:"switch",class:"bs-keyboard-shortcuts__switch"},a("div",{key:"4987a67e712f50b2259c2a4cd2d945adc14a2786",class:"bs-keyboard-shortcuts__switch-text"},a("span",{key:"410cc42bbb55207ec1f8c6f18c6a6ed07eab58b5",class:"bs-keyboard-shortcuts__switch-title"},this.singleKeyLabel),a("span",{key:"55cf6495958aa22f6470fd852ca4fae07195b5bc",class:"bs-keyboard-shortcuts__switch-caption"},this.singleKeyDescription)),a("bs-switch",{key:"b7538cbce99447c3ac03c1dedceff7a4a84941f2",ariaLabel:this.singleKeyLabel,checked:this.singleKeyEnabled,onBsChange:this.onSwitch})),a("span",{key:"993d7c182bce54e4a0faad2873ab9a8a3257bfd7",class:"bs-keyboard-shortcuts__live","aria-live":"polite"},`${e} shortcut${1===e?"":"s"}`),r?a("p",{part:"empty",class:"bs-keyboard-shortcuts__empty",role:"status"},this.noResultsText):a("div",{part:"groups",class:"bs-keyboard-shortcuts__groups"},t.map((s=>a("div",{class:"bs-keyboard-shortcuts__column"},s.map((s=>{const e=`${this.id}-g${c++}`;return a("div",{part:"group",class:"bs-keyboard-shortcuts__group",role:"group","aria-labelledby":e},a("div",{part:"group-title",id:e,class:"bs-keyboard-shortcuts__group-title"},s.title),a("div",{class:"bs-keyboard-shortcuts__rows",role:"list"},s.shortcuts.map((s=>a("bs-shortcut-row",{part:"row",action:s.action,keys:s.keys,selectionRole:"listitem",disabled:!!s.disabled||!this.singleKeyEnabled&&g(s)})))))})))))),this.showFooterHint&&a("div",{key:"4b980ff2fa253a36021615fe9a9203707a728b64",part:"footer",class:"bs-keyboard-shortcuts__footer"},a("slot",{key:"b72e0707aef77ffd10c192a622a2c0bc6f387b29",name:"footer"},a("span",{key:"1324c58fd399271b2f0d983306b39f734e6e2d7f"},this.footerPrefix),a("bs-key",{key:"47d4279c83abd23982bb4030582a7c21262e99ce",label:this.footerKey}),a("span",{key:"8ab0550e4d65d4c85e8ff3395f5bc230f9faacf8"},this.footerText)))))}static get style(){return":host{display:block;width:var(--bs-keyboard-shortcuts-width);min-width:var(--bs-keyboard-shortcuts-width);box-sizing:border-box;--bs-keyboard-shortcuts-width:720px;--bs-keyboard-shortcuts-bg:var(--bs-surface-base);--bs-keyboard-shortcuts-radius:var(--bs-border-radius-150);--bs-keyboard-shortcuts-padding:var(--bs-spacing-200);--bs-keyboard-shortcuts-gap:var(--bs-spacing-200);--bs-keyboard-shortcuts-shadow:0 var(--bs-shadow-position-100) var(--bs-shadow-blur-100) 0 var(--bs-elevation-higher);--bs-keyboard-shortcuts-column-gap:var(--bs-spacing-600);--bs-keyboard-shortcuts-color:var(--bs-text-default);--bs-keyboard-shortcuts-color-secondary:var(--bs-text-secondary)}.bs-keyboard-shortcuts{display:block;--bs-card-bg:var(--bs-keyboard-shortcuts-bg);--bs-card-radius:var(--bs-keyboard-shortcuts-radius);--bs-card-padding:var(--bs-keyboard-shortcuts-padding);--bs-card-shadow:var(--bs-keyboard-shortcuts-shadow);--bs-card-overflow:visible;color:var(--bs-keyboard-shortcuts-color)}.bs-keyboard-shortcuts__body{display:flex;flex-direction:column;gap:var(--bs-keyboard-shortcuts-gap)}.bs-keyboard-shortcuts__head{display:flex;align-items:center;gap:var(--bs-spacing-100)}.bs-keyboard-shortcuts__icon{flex-shrink:0;color:var(--bs-keyboard-shortcuts-color)}.bs-keyboard-shortcuts__heading{flex:1;margin:0;color:var(--bs-keyboard-shortcuts-color);font-size:var(--bs-font-size-2xl);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-line-height-heading-h4) * 1px)}.bs-keyboard-shortcuts__switch{display:flex;align-items:center;gap:var(--bs-spacing-200)}.bs-keyboard-shortcuts__switch-text{flex:1;display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__switch-title{color:var(--bs-keyboard-shortcuts-color);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-keyboard-shortcuts__switch-caption{color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-keyboard-shortcuts__live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-keyboard-shortcuts__groups{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));column-gap:var(--bs-keyboard-shortcuts-column-gap);align-items:start}.bs-keyboard-shortcuts__column{display:flex;flex-direction:column;gap:var(--bs-spacing-200);min-width:0}.bs-keyboard-shortcuts__group{display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__group-title{color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-keyboard-shortcuts__rows{display:flex;flex-direction:column;gap:var(--bs-spacing-25)}.bs-keyboard-shortcuts__empty{margin:0;color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-sm);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-keyboard-shortcuts__footer{display:flex;align-items:center;gap:var(--bs-spacing-75);color:var(--bs-keyboard-shortcuts-color-secondary);font-size:var(--bs-font-size-xs);line-height:calc(var(--bs-line-height-caption-sm) * 1px);white-space:nowrap}"}},[769,"bs-keyboard-shortcuts",{groups:[16],heading:[1],closeLabel:[1,"close-label"],searchPlaceholder:[1,"search-placeholder"],query:[1025],showSingleKeySwitch:[4,"show-single-key-switch"],singleKeyEnabled:[1540,"single-key-enabled"],singleKeyLabel:[1,"single-key-label"],singleKeyDescription:[1,"single-key-description"],showFooterHint:[4,"show-footer-hint"],footerKey:[1,"footer-key"],footerText:[1,"footer-text"],footerPrefix:[1,"footer-prefix"],noResultsText:[1,"no-results-text"]}]);function v(){"undefined"!=typeof customElements&&["bs-keyboard-shortcuts","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-key","bs-key-caps","bs-menu","bs-menu-item","bs-ripple","bs-shortcut-row","bs-switch"].forEach((e=>{switch(e){case"bs-keyboard-shortcuts":customElements.get(s(e))||customElements.define(s(e),m);break;case"bs-card":customElements.get(s(e))||r();break;case"bs-chip-informative":customElements.get(s(e))||c();break;case"bs-icon-button":customElements.get(s(e))||i();break;case"bs-input":customElements.get(s(e))||b();break;case"bs-key":customElements.get(s(e))||d();break;case"bs-key-caps":customElements.get(s(e))||h();break;case"bs-menu":customElements.get(s(e))||n();break;case"bs-menu-item":customElements.get(s(e))||l();break;case"bs-ripple":customElements.get(s(e))||u();break;case"bs-shortcut-row":customElements.get(s(e))||f();break;case"bs-switch":customElements.get(s(e))||p()}}))}v();const w=m,_=v;export{w as BsKeyboardShortcuts,_ as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as
|
|
1
|
+
import{B as s,d as o}from"./p-syO0ipbw.js";const p=s,r=o;export{p as BsListItem,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as s,H as e,c as i,h as l}from"./p-B2gx7SZk.js";const n=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsChange=i(this,"bsChange")}get el(){return this}selectable=!1;value=null;dividers=!1;ariaLabel=null;bsChange;onChange(){this.sync()}componentDidLoad(){this.sync()}items(){return Array.from(this.el.children).filter((t=>"BS-LIST-ITEM"===t.tagName))}enabled(){return this.items().filter((t=>!t.disabled))}sync(){if(this.items().forEach((t=>{t.selectionRole=this.selectable?"option":"listitem",this.selectable&&(t.selected=null!=this.value&&t.value===this.value),t.removeAttribute("tabindex")})),!this.selectable)return;const t=this.enabled(),s=t.find((t=>t.selected))||t[0];t.forEach((t=>t.setAttribute("tabindex",t===s?"0":"-1")))}rove(t){this.enabled().forEach((s=>s.setAttribute("tabindex",s===t?"0":"-1")))}onItemClick(t){if(!this.selectable)return;const s=t.target;!s.disabled&&this.items().includes(s)&&(t.stopPropagation(),this.rove(s),this.value!==s.value&&(this.value=s.value,this.sync(),this.rove(s),this.bsChange.emit(this.value)))}onKeyDown(t){if(!this.selectable)return;const s=this.enabled(),e=s.indexOf(t.target);if(-1===e)return;let i=-1;"ArrowDown"===t.key?i=Math.min(e+1,s.length-1):"ArrowUp"===t.key?i=Math.max(e-1,0):"Home"===t.key?i=0:"End"===t.key&&(i=s.length-1),-1!==i&&(t.preventDefault(),this.rove(s[i]),s[i].focus())}render(){return l("div",{key:"
|
|
1
|
+
import{t,p as s,H as e,c as i,h as l}from"./p-B2gx7SZk.js";const n=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bsChange=i(this,"bsChange")}get el(){return this}selectable=!1;value=null;dividers=!1;ariaLabel=null;bsChange;onChange(){this.sync()}componentDidLoad(){this.sync()}items(){return Array.from(this.el.children).filter((t=>"BS-LIST-ITEM"===t.tagName))}enabled(){return this.items().filter((t=>!t.disabled))}sync(){if(this.items().forEach((t=>{t.selectionRole=this.selectable?"option":"listitem",this.selectable&&(t.selected=null!=this.value&&t.value===this.value),t.removeAttribute("tabindex")})),!this.selectable)return;const t=this.enabled(),s=t.find((t=>t.selected))||t[0];t.forEach((t=>t.setAttribute("tabindex",t===s?"0":"-1")))}rove(t){this.enabled().forEach((s=>s.setAttribute("tabindex",s===t?"0":"-1")))}onItemClick(t){if(!this.selectable)return;const s=t.target;!s.disabled&&this.items().includes(s)&&(t.stopPropagation(),this.rove(s),this.value!==s.value&&(this.value=s.value,this.sync(),this.rove(s),this.bsChange.emit(this.value)))}onKeyDown(t){if(!this.selectable)return;const s=this.enabled(),e=s.indexOf(t.target);if(-1===e)return;let i=-1;"ArrowDown"===t.key?i=Math.min(e+1,s.length-1):"ArrowUp"===t.key?i=Math.max(e-1,0):"Home"===t.key?i=0:"End"===t.key&&(i=s.length-1),-1!==i&&(t.preventDefault(),this.rove(s[i]),s[i].focus())}render(){return l("div",{key:"9956c0d827c6ea78a2ed0a93e823555eac9af301",part:"list",class:"bs-list",role:this.selectable?"listbox":"list","aria-label":this.ariaLabel??void 0},l("slot",{key:"054ef607c962bdb4171e2b3818928f7e1765f692",onSlotchange:()=>this.sync()}))}static get watchers(){return{value:[{onChange:0}],selectable:[{onChange:0}]}}static get style(){return":host{display:block;--bs-list-gap:0;--bs-list-divider-color:var(--bs-border-neutral-container)}.bs-list{display:flex;flex-direction:column;gap:var(--bs-list-gap)}:host([dividers]) ::slotted(bs-list-item:not(:last-child)){border-bottom:1px solid var(--bs-list-divider-color)}"}},[769,"bs-list",{selectable:[4],value:[1537],dividers:[516],ariaLabel:[1,"aria-label"]},[[0,"bsItemClick","onItemClick"],[0,"keydown","onKeyDown"]],{value:[{onChange:0}],selectable:[{onChange:0}]}]);function a(){"undefined"!=typeof customElements&&["bs-list"].forEach((s=>{"bs-list"===s&&(customElements.get(t(s))||customElements.define(t(s),n))}))}a();const o=n,r=a;export{o as BsList,r as defineCustomElement}
|