@brandsync/wc 1.16.0 → 1.18.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 +20 -0
- package/REFERENCE.md +476 -0
- package/custom-elements.json +10039 -5497
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-f271e1d2.entry.js → p-0082db6a.entry.js} +1 -1
- package/dist/brandsync-wc/p-07e0b444.entry.js +1 -0
- package/dist/brandsync-wc/{p-b67a0c8f.entry.js → p-08e0e704.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d165a742.entry.js → p-0a6f22fe.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8390a155.entry.js → p-14b4f4c4.entry.js} +1 -1
- package/dist/brandsync-wc/p-15f06226.entry.js +1 -0
- package/dist/brandsync-wc/{p-a5659499.entry.js → p-186e3b78.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c85fe37b.entry.js → p-1a47774e.entry.js} +1 -1
- package/dist/brandsync-wc/p-1a62e5b7.entry.js +1 -0
- package/dist/brandsync-wc/p-1aa0f9a3.entry.js +1 -0
- package/dist/brandsync-wc/{p-e9b6b30f.entry.js → p-1d8c2ec1.entry.js} +1 -1
- package/dist/brandsync-wc/p-246036cd.entry.js +1 -0
- package/dist/brandsync-wc/{p-45986ad4.entry.js → p-31ca98c3.entry.js} +1 -1
- package/dist/brandsync-wc/p-344695a8.entry.js +1 -0
- package/dist/brandsync-wc/{p-c25553bc.entry.js → p-345b5ef3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-dcacee29.entry.js → p-34851d6d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6cb21302.entry.js → p-348fef11.entry.js} +1 -1
- package/dist/brandsync-wc/p-3e6f430a.entry.js +1 -0
- package/dist/brandsync-wc/p-43f8afda.entry.js +1 -0
- package/dist/brandsync-wc/{p-361aef36.entry.js → p-47929dca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cc4c8c1d.entry.js → p-47ce984f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d5a6098d.entry.js → p-4d4997af.entry.js} +1 -1
- package/dist/brandsync-wc/p-4ff649f1.entry.js +1 -0
- package/dist/brandsync-wc/p-50c116eb.entry.js +1 -0
- package/dist/brandsync-wc/{p-f3eca1ce.entry.js → p-50f60ed6.entry.js} +1 -1
- package/dist/brandsync-wc/p-52d61070.entry.js +1 -0
- package/dist/brandsync-wc/{p-2e285364.entry.js → p-55d336da.entry.js} +1 -1
- package/dist/brandsync-wc/{p-38fe9d07.entry.js → p-55d97d1d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9beeb30c.entry.js → p-56a45582.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e9afb553.entry.js → p-58179e15.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1ca8b01e.entry.js → p-5868793d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-38ac9aad.entry.js → p-5ac75555.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7b3518b8.entry.js → p-5cd1abc7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-dfad8c0a.entry.js → p-5e36d46f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-54f9529f.entry.js → p-64f8eb7e.entry.js} +1 -1
- package/dist/brandsync-wc/p-6b019a88.entry.js +1 -0
- package/dist/brandsync-wc/{p-f0be9125.entry.js → p-6c987bc9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5ed1f45e.entry.js → p-757cd066.entry.js} +1 -1
- package/dist/brandsync-wc/{p-47b7fe76.entry.js → p-78114ea3.entry.js} +1 -1
- package/dist/brandsync-wc/p-7c29678d.entry.js +1 -0
- package/dist/brandsync-wc/{p-9d12b1fb.entry.js → p-7cfb1be6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ed00786.entry.js → p-841a80b4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a56bc608.entry.js → p-87a10ee1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c05ee501.entry.js → p-8962abe0.entry.js} +1 -1
- package/dist/brandsync-wc/p-8e46a262.entry.js +1 -0
- package/dist/brandsync-wc/p-8f82ea7e.entry.js +1 -0
- package/dist/brandsync-wc/p-95c7f350.entry.js +1 -0
- package/dist/brandsync-wc/{p-3488c4fc.entry.js → p-9787bc0f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0159f0da.entry.js → p-998b95d3.entry.js} +1 -1
- package/dist/brandsync-wc/p-9bd739e5.entry.js +1 -0
- package/dist/brandsync-wc/p-a424a709.entry.js +1 -0
- package/dist/brandsync-wc/{p-b6081bba.entry.js → p-a51355d9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ca40386.entry.js → p-a8c2855c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b663ee67.entry.js → p-a9d0a730.entry.js} +1 -1
- package/dist/brandsync-wc/{p-15f4c343.entry.js → p-ae207fd5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8048d033.entry.js → p-b1edc9b7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-949a4270.entry.js → p-b759ae72.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7dc59e0b.entry.js → p-b7bbc52f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-912629c6.entry.js → p-bd901b06.entry.js} +1 -1
- package/dist/brandsync-wc/p-be7272ce.entry.js +1 -0
- package/dist/brandsync-wc/{p-401b3d3d.entry.js → p-bfff7cbb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-298158da.entry.js → p-c020ffdf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-abfa43f5.entry.js → p-c02ed03d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-baa3d37a.entry.js → p-cb002195.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ffc07eb5.entry.js → p-d3fe8cea.entry.js} +1 -1
- package/dist/brandsync-wc/{p-42b79d95.entry.js → p-d42a26c1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e72dd05e.entry.js → p-d985e569.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cf287ff1.entry.js → p-e2491db8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-36fe783a.entry.js → p-e32a6df1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-65fa1b21.entry.js → p-e3e15670.entry.js} +1 -1
- package/dist/brandsync-wc/{p-67629178.entry.js → p-e4e9c961.entry.js} +1 -1
- package/dist/brandsync-wc/{p-521d0fc2.entry.js → p-e99c0937.entry.js} +1 -1
- package/dist/brandsync-wc/{p-89ea6366.entry.js → p-e9adfa44.entry.js} +1 -1
- package/dist/brandsync-wc/{p-76748795.entry.js → p-eb3bacb9.entry.js} +1 -1
- package/dist/brandsync-wc/p-ee00d3a5.entry.js +1 -0
- package/dist/brandsync-wc/{p-ed71eb02.entry.js → p-ee63423c.entry.js} +1 -1
- package/dist/brandsync-wc/p-f4628861.entry.js +1 -0
- package/dist/brandsync-wc/{p-d81c4f58.entry.js → p-f47b8673.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b9c9bcba.entry.js → p-f6caa623.entry.js} +1 -1
- package/dist/brandsync-wc/p-f86b58bf.entry.js +1 -0
- package/dist/brandsync-wc/{p-00be9a64.entry.js → p-fa91106e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-538d5b58.entry.js → p-fb84002e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a12691d8.entry.js → p-fbc219c6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f3cc961b.entry.js → p-fd78ff22.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-app-recent-item_3.cjs.entry.js +133 -0
- package/dist/cjs/bs-app-shell.cjs.entry.js +1 -1
- package/dist/cjs/bs-app-switcher.cjs.entry.js +208 -0
- 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-avatar.cjs.entry.js +1 -1
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +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.cjs.entry.js +1 -1
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-carousel.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-filter.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-informative.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-input.cjs.entry.js +1 -1
- package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
- package/dist/cjs/bs-command-palette.cjs.entry.js +374 -0
- package/dist/cjs/bs-compact-menu-block_2.cjs.entry.js +46 -0
- package/dist/cjs/bs-company-switcher.cjs.entry.js +211 -0
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-container.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/bs-divider.cjs.entry.js +1 -1
- package/dist/cjs/bs-empty-state.cjs.entry.js +47 -0
- package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-global-search.cjs.entry.js +326 -0
- package/dist/cjs/bs-grid.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-button.cjs.entry.js +8 -1
- package/dist/cjs/bs-icon-tile.cjs.entry.js +10 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
- package/dist/cjs/bs-key-caps.cjs.entry.js +39 -0
- package/dist/cjs/bs-key.cjs.entry.js +28 -0
- package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +112 -0
- package/dist/cjs/bs-list-item_2.cjs.entry.js +215 -0
- package/dist/cjs/bs-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-mega-menu.cjs.entry.js +70 -0
- package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-message.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +5 -2
- package/dist/cjs/bs-page-header.cjs.entry.js +66 -0
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-qr-code.cjs.entry.js +1 -1
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-search-item.cjs.entry.js +47 -0
- package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
- package/dist/cjs/bs-shortcut-row.cjs.entry.js +27 -0
- package/dist/cjs/bs-slider.cjs.entry.js +1 -1
- package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bs-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/bs-stack.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bs-switch.cjs.entry.js +1 -1
- package/dist/cjs/bs-tab_3.cjs.entry.js +3 -3
- package/dist/cjs/bs-timepicker.cjs.entry.js +2 -2
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/bs-tree-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-tree.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +17 -1
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.cmp.test.js +52 -0
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.css +111 -0
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.js +184 -0
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.stories.js +28 -0
- package/dist/collection/components/bs-app-shell/bs-app-shell.js +1 -1
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.cmp.test.js +179 -0
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.css +173 -0
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.js +902 -0
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.stories.js +91 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.cmp.test.js +58 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.css +104 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.js +190 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.stories.js +43 -0
- 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-avatar/bs-avatar.css +3 -3
- 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.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +13 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +27 -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.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +1 -1
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
- package/dist/collection/components/bs-command-palette/bs-command-palette.cmp.test.js +207 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.css +214 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.js +1114 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.stories.js +194 -0
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.cmp.test.js +32 -0
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.css +43 -0
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.js +67 -0
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.stories.js +25 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.cmp.test.js +171 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.css +196 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.js +720 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.stories.js +78 -0
- package/dist/collection/components/bs-composer/bs-composer.js +1 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
- package/dist/collection/components/bs-container/bs-container.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +1 -1
- package/dist/collection/components/bs-divider/bs-divider.js +1 -1
- package/dist/collection/components/bs-empty-state/bs-empty-state.cmp.test.js +102 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.css +45 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.js +175 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.stories.js +52 -0
- package/dist/collection/components/bs-error-page/bs-error-page.js +1 -1
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-global-search/bs-global-search.cmp.test.js +491 -0
- package/dist/collection/components/bs-global-search/bs-global-search.css +115 -0
- package/dist/collection/components/bs-global-search/bs-global-search.js +1024 -0
- package/dist/collection/components/bs-global-search/bs-global-search.stories.js +146 -0
- package/dist/collection/components/bs-grid/bs-grid.js +2 -2
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +11 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-key/bs-key.cmp.test.js +59 -0
- package/dist/collection/components/bs-key/bs-key.css +58 -0
- package/dist/collection/components/bs-key/bs-key.js +84 -0
- package/dist/collection/components/bs-key/bs-key.stories.js +19 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.cmp.test.js +60 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.css +28 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.js +120 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.stories.js +29 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.js +194 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.css +138 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +485 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.js +111 -0
- package/dist/collection/components/bs-list/bs-list.js +1 -1
- package/dist/collection/components/bs-list-item/bs-list-item.js +1 -1
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.cmp.test.js +131 -0
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.css +139 -0
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.js +358 -0
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.stories.js +188 -0
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-block/bs-menu-block.cmp.test.js +44 -0
- package/dist/collection/components/bs-menu-block/bs-menu-block.css +106 -0
- package/dist/collection/components/bs-menu-block/bs-menu-block.js +147 -0
- package/dist/collection/components/bs-menu-block/bs-menu-block.stories.js +36 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-message/bs-message.js +1 -1
- package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
- package/dist/collection/components/bs-page-header/bs-page-header.cmp.test.js +206 -0
- package/dist/collection/components/bs-page-header/bs-page-header.css +252 -0
- package/dist/collection/components/bs-page-header/bs-page-header.js +351 -0
- package/dist/collection/components/bs-page-header/bs-page-header.stories.js +177 -0
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-popover/bs-popover.js +1 -1
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-search-item/bs-search-item.cmp.test.js +147 -0
- package/dist/collection/components/bs-search-item/bs-search-item.css +112 -0
- package/dist/collection/components/bs-search-item/bs-search-item.js +222 -0
- package/dist/collection/components/bs-search-item/bs-search-item.stories.js +31 -0
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.cmp.test.js +60 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.css +42 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +154 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.stories.js +24 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-spinner/bs-spinner.js +1 -1
- package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
- package/dist/collection/components/bs-stack/bs-stack.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
- package/dist/collection/components/bs-toast/bs-toast.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
- package/dist/collection/components/bs-tree/bs-tree.js +1 -1
- package/dist/collection/components/bs-tree-item/bs-tree-item.js +2 -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.cmp.test.js +79 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +46 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +10 -1
- package/dist/components/bs-accordion-group.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-app-recent-item.d.ts +11 -0
- package/dist/components/bs-app-recent-item.js +1 -0
- package/dist/components/bs-app-shell.js +1 -1
- package/dist/components/bs-app-switcher.d.ts +11 -0
- package/dist/components/bs-app-switcher.js +1 -0
- package/dist/components/bs-app-tile.d.ts +11 -0
- package/dist/components/bs-app-tile.js +1 -0
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-avatar.js +1 -1
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-carousel.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.d.ts +11 -0
- package/dist/components/bs-command-palette.js +1 -0
- package/dist/components/bs-compact-menu-block.d.ts +11 -0
- package/dist/components/bs-compact-menu-block.js +1 -0
- package/dist/components/bs-company-switcher.d.ts +11 -0
- package/dist/components/bs-company-switcher.js +1 -0
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-container.js +1 -1
- package/dist/components/bs-cookie-consent.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.js +1 -1
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-divider.js +1 -1
- package/dist/components/bs-empty-state.d.ts +11 -0
- package/dist/components/bs-empty-state.js +1 -0
- package/dist/components/bs-error-page.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-global-search.d.ts +11 -0
- package/dist/components/bs-global-search.js +1 -0
- package/dist/components/bs-grid.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-icon-tile.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-key-caps.d.ts +11 -0
- package/dist/components/bs-key-caps.js +1 -0
- package/dist/components/bs-key.d.ts +11 -0
- package/dist/components/bs-key.js +1 -0
- package/dist/components/bs-keyboard-shortcuts.d.ts +11 -0
- package/dist/components/bs-keyboard-shortcuts.js +1 -0
- package/dist/components/bs-list-item.js +1 -1
- package/dist/components/bs-list.js +1 -1
- package/dist/components/bs-mega-menu.d.ts +11 -0
- package/dist/components/bs-mega-menu.js +1 -0
- package/dist/components/bs-menu-block.d.ts +11 -0
- package/dist/components/bs-menu-block.js +1 -0
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-message-list.js +1 -1
- package/dist/components/bs-message.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-onboarding-checklist.js +1 -1
- package/dist/components/bs-page-header.d.ts +11 -0
- package/dist/components/bs-page-header.js +1 -0
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-popover.js +1 -1
- package/dist/components/bs-product-tour.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-qr-code.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-search-item.d.ts +11 -0
- package/dist/components/bs-search-item.js +1 -0
- package/dist/components/bs-session-timeout.js +1 -1
- package/dist/components/bs-shortcut-row.d.ts +11 -0
- package/dist/components/bs-shortcut-row.js +1 -0
- package/dist/components/bs-side-panel.js +1 -1
- package/dist/components/bs-skeleton.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-spinner.js +1 -1
- package/dist/components/bs-split-pane.js +1 -1
- package/dist/components/bs-stack.js +1 -1
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-timepicker.js +1 -1
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip-trigger.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/bs-tree-item.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-B6KgEbdM.js +1 -0
- package/dist/components/{p-CQjSDdH7.js → p-B8kw9EOx.js} +1 -1
- package/dist/components/p-BLPNwyiT.js +1 -0
- package/dist/components/{p-J9cxcDhY.js → p-BP1l6Q3Z.js} +1 -1
- package/dist/components/p-BS7ySxJZ.js +1 -0
- package/dist/components/{p-DYuzgzxI.js → p-BmdSbmFg.js} +1 -1
- package/dist/components/{p-CRtvJlh8.js → p-C1owRphU.js} +1 -1
- package/dist/components/{p-BsbtyRJV.js → p-C2rRVRIu.js} +1 -1
- package/dist/components/p-C3erqJFy.js +1 -0
- package/dist/components/p-Cd7p-48Q.js +1 -0
- package/dist/components/{p-CK7fiES5.js → p-CmlzHRkn.js} +1 -1
- package/dist/components/p-Co36mHEU.js +1 -0
- package/dist/components/p-D4_8H0vn.js +1 -0
- package/dist/components/{p-D0KM1R2i.js → p-D9dDFyPB.js} +1 -1
- package/dist/components/{p-DvNED6Lb.js → p-DBvhi__l.js} +1 -1
- package/dist/components/{p-kDJsWjTN.js → p-DFd4pP4i.js} +1 -1
- package/dist/components/{p-BdkE4auv.js → p-DVjuZdjF.js} +1 -1
- package/dist/components/{p-Bb1-2M8K.js → p-DW0Dw2LS.js} +1 -1
- package/dist/components/p-DcdFuKG9.js +1 -0
- package/dist/components/p-Deq0LzGO.js +1 -0
- package/dist/components/{p-BaJEv6rL.js → p-DgY5pxXd.js} +1 -1
- package/dist/components/{p-ByLUtXxO.js → p-DhhXayh6.js} +1 -1
- package/dist/components/p-DiORQQg3.js +1 -0
- package/dist/components/p-Dl0FedE5.js +1 -0
- package/dist/components/p-DsBToIYE.js +1 -0
- package/dist/components/{p-DFKc3lLA.js → p-DtbeCgXo.js} +1 -1
- package/dist/components/{p-C7RZ6qZC.js → p-DzvXbBvk.js} +1 -1
- package/dist/components/p-I1_Q3HQu.js +1 -0
- package/dist/components/{p-C93ymWm7.js → p-TXAiCnSZ.js} +1 -1
- package/dist/components/p-c-g3-oVu.js +1 -0
- package/dist/components/p-erdtytMq.js +1 -0
- package/dist/components/{p-B128GX8H.js → p-qXdgl7VG.js} +1 -1
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-accordion-group.entry.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-app-recent-item_3.entry.js +129 -0
- package/dist/esm/bs-app-shell.entry.js +1 -1
- package/dist/esm/bs-app-switcher.entry.js +206 -0
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-attachment.entry.js +1 -1
- package/dist/esm/bs-avatar.entry.js +1 -1
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +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.entry.js +1 -1
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-carousel.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-checkbox.entry.js +1 -1
- package/dist/esm/bs-chip-filter.entry.js +1 -1
- package/dist/esm/bs-chip-informative.entry.js +1 -1
- package/dist/esm/bs-chip-input.entry.js +1 -1
- package/dist/esm/bs-citation-preview.entry.js +1 -1
- package/dist/esm/bs-command-palette.entry.js +372 -0
- package/dist/esm/bs-compact-menu-block_2.entry.js +43 -0
- package/dist/esm/bs-company-switcher.entry.js +209 -0
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-container.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-datepicker.entry.js +1 -1
- package/dist/esm/bs-divider.entry.js +1 -1
- package/dist/esm/bs-empty-state.entry.js +45 -0
- package/dist/esm/bs-error-page.entry.js +1 -1
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-global-search.entry.js +324 -0
- package/dist/esm/bs-grid.entry.js +2 -2
- package/dist/esm/bs-icon-button.entry.js +8 -1
- package/dist/esm/bs-icon-tile.entry.js +11 -3
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/bs-input_3.entry.js +4 -4
- package/dist/esm/bs-key-caps.entry.js +37 -0
- package/dist/esm/bs-key.entry.js +26 -0
- package/dist/esm/bs-keyboard-shortcuts.entry.js +110 -0
- package/dist/esm/bs-list-item_2.entry.js +212 -0
- package/dist/esm/bs-list.entry.js +1 -1
- package/dist/esm/bs-mega-menu.entry.js +68 -0
- package/dist/esm/bs-message-list.entry.js +1 -1
- package/dist/esm/bs-message.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +2 -2
- package/dist/esm/bs-navigation-header.entry.js +5 -2
- package/dist/esm/bs-page-header.entry.js +64 -0
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +2 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-qr-code.entry.js +1 -1
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-search-item.entry.js +45 -0
- package/dist/esm/bs-session-timeout.entry.js +1 -1
- package/dist/esm/bs-shortcut-row.entry.js +25 -0
- package/dist/esm/bs-slider.entry.js +1 -1
- package/dist/esm/bs-snackbar.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-spinner.entry.js +1 -1
- package/dist/esm/bs-split-pane.entry.js +1 -1
- package/dist/esm/bs-stack.entry.js +1 -1
- package/dist/esm/bs-stepper-step.entry.js +1 -1
- package/dist/esm/bs-stepper.entry.js +1 -1
- package/dist/esm/bs-switch.entry.js +1 -1
- package/dist/esm/bs-tab_3.entry.js +3 -3
- package/dist/esm/bs-timepicker.entry.js +2 -2
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/bs-tree-item.entry.js +2 -2
- package/dist/esm/bs-tree.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-app-recent-item/bs-app-recent-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-app-recent-item/bs-app-recent-item.d.ts +51 -0
- package/dist/types/components/bs-app-recent-item/bs-app-recent-item.stories.d.ts +15 -0
- package/dist/types/components/bs-app-switcher/bs-app-switcher.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-app-switcher/bs-app-switcher.d.ts +159 -0
- package/dist/types/components/bs-app-switcher/bs-app-switcher.stories.d.ts +34 -0
- package/dist/types/components/bs-app-tile/bs-app-tile.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-app-tile/bs-app-tile.d.ts +51 -0
- package/dist/types/components/bs-app-tile/bs-app-tile.stories.d.ts +18 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +7 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.d.ts +172 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.stories.d.ts +56 -0
- package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.d.ts +28 -0
- package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.stories.d.ts +10 -0
- package/dist/types/components/bs-company-switcher/bs-company-switcher.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-company-switcher/bs-company-switcher.d.ts +130 -0
- package/dist/types/components/bs-company-switcher/bs-company-switcher.stories.d.ts +25 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.d.ts +50 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.stories.d.ts +13 -0
- package/dist/types/components/bs-global-search/bs-global-search.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-global-search/bs-global-search.d.ts +166 -0
- package/dist/types/components/bs-global-search/bs-global-search.stories.d.ts +61 -0
- package/dist/types/components/bs-icon-tile/bs-icon-tile.d.ts +5 -0
- package/dist/types/components/bs-key/bs-key.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key/bs-key.d.ts +36 -0
- package/dist/types/components/bs-key/bs-key.stories.d.ts +11 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.d.ts +31 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.stories.d.ts +15 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.d.ts +95 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.d.ts +43 -0
- package/dist/types/components/bs-mega-menu/bs-mega-menu.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-mega-menu/bs-mega-menu.d.ts +110 -0
- package/dist/types/components/bs-mega-menu/bs-mega-menu.stories.d.ts +55 -0
- package/dist/types/components/bs-menu-block/bs-menu-block.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-menu-block/bs-menu-block.d.ts +47 -0
- package/dist/types/components/bs-menu-block/bs-menu-block.stories.d.ts +15 -0
- package/dist/types/components/bs-page-header/bs-page-header.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-page-header/bs-page-header.d.ts +100 -0
- package/dist/types/components/bs-page-header/bs-page-header.stories.d.ts +41 -0
- package/dist/types/components/bs-search-item/bs-search-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-search-item/bs-search-item.d.ts +61 -0
- package/dist/types/components/bs-search-item/bs-search-item.stories.d.ts +13 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.d.ts +38 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.stories.d.ts +13 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.d.ts +7 -1
- package/dist/types/components.d.ts +3920 -71
- package/dist/types/svg-inline.d.ts +5 -0
- package/package.json +2 -1
- package/reference.d.ts +50 -2
- package/reference.json +1701 -31
- package/dist/brandsync-wc/p-0228a584.entry.js +0 -1
- package/dist/brandsync-wc/p-0f97fe35.entry.js +0 -1
- package/dist/brandsync-wc/p-23379d7c.entry.js +0 -1
- package/dist/brandsync-wc/p-34b0c048.entry.js +0 -1
- package/dist/brandsync-wc/p-3789c7a5.entry.js +0 -1
- package/dist/brandsync-wc/p-5a45ef51.entry.js +0 -1
- package/dist/brandsync-wc/p-769c5b4a.entry.js +0 -1
- package/dist/brandsync-wc/p-86774165.entry.js +0 -1
- package/dist/brandsync-wc/p-e5f50e93.entry.js +0 -1
- package/dist/brandsync-wc/p-f4d1d56e.entry.js +0 -1
- package/dist/cjs/bs-list-item.cjs.entry.js +0 -66
- package/dist/cjs/bs-popover.cjs.entry.js +0 -153
- package/dist/cjs/bs-skeleton.cjs.entry.js +0 -51
- package/dist/components/p-B80vOwH6.js +0 -1
- package/dist/components/p-ChcaPfNL.js +0 -1
- package/dist/components/p-GTDI4Ibw.js +0 -1
- package/dist/esm/bs-list-item.entry.js +0 -64
- package/dist/esm/bs-popover.entry.js +0 -151
- package/dist/esm/bs-skeleton.entry.js +0 -49
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as t,H as s,c as a,h as i}from"./p-B2gx7SZk.js";import{d as r}from"./p-DvNED6Lb.js";import{d}from"./p-CRtvJlh8.js";import{d as n}from"./p-GTDI4Ibw.js";import{d as o}from"./p-J9cxcDhY.js";import{d as c}from"./p-BaJEv6rL.js";import{d as b}from"./p-Bb1-2M8K.js";const l=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsChange=a(this,"bsChange"),this.internals=this.attachInternals()}get el(){return this}internals;initialValue="";initialStart="";initialEnd="";name;range=!1;value="";start="";end="";min;max;locale="en-GB";firstDayOfWeek=0;startLabel="Start date";endLabel="End date";monthLabel="Month";yearLabel="Year";previousLabel="Previous month";nextLabel="Next month";bsChange;viewDate=k(new Date);focusedIso="";hoverIso="";draft={};openMenu=null;shouldFocusDay=!1;menuToScroll=!1;componentWillLoad(){this.initialValue=this.value,this.initialStart=this.start,this.initialEnd=this.end,this.showSelection(),this.syncFormValue()}componentDidRender(){if(this.menuToScroll){this.menuToScroll=!1;const e=()=>{const e=this.el.shadowRoot?.querySelector(".bs-datepicker__menu"),t=e?.querySelector("[data-current]");e&&t&&(e.scrollTop=t.offsetTop-e.clientHeight/2+t.offsetHeight/2)};requestAnimationFrame((()=>requestAnimationFrame(e)))}if(!this.shouldFocusDay)return;this.shouldFocusDay=!1;const e=this.el.shadowRoot.querySelector(`[data-date="${this.focusedIso}"]`);e?.focus()}onSelectionChange(){this.syncFormValue()}onSelectionJump(){this.showSelection()}formResetCallback(){this.value=this.initialValue,this.start=this.initialStart,this.end=this.initialEnd,this.draft={}}showSelection(){const e=u(this.range?this.start:this.value);e&&(this.viewDate=k(e))}syncFormValue(){if(this.internals?.setFormValue)if(this.range){if(!this.name)return void this.internals.setFormValue(null);const e=new FormData;e.append(this.name+"-start",this.start??""),e.append(this.name+"-end",this.end??""),this.internals.setFormValue(e)}else this.internals.setFormValue(this.value??"")}isDisabled(e){const t=u(this.min),s=u(this.max);return!!t&&e<t||!!s&&e>s}selectDay(e){if(this.isDisabled(e))return;const t=h(e);if(e.getMonth()===this.viewDate.getMonth()&&e.getFullYear()===this.viewDate.getFullYear()||(this.viewDate=k(e)),this.focusedIso=t,!this.range)return this.value=t,void this.bsChange.emit({value:t});!this.start||this.end||t<this.start?(this.start=t,this.end=""):this.end=t,this.hoverIso="",this.draft={},this.bsChange.emit({start:this.start,end:this.end})}commitDraft(e){const t=this.draft[e];if(void 0===t)return;const s=u(t),a={...this.draft};if(delete a[e],this.draft=a,!s||this.isDisabled(s))return;let i="start"===e?h(s):this.start,r="end"===e?h(s):this.end;i&&r&&r<i&&("start"===e?r="":i=""),this.start=i,this.end=r,this.showSelection(),this.bsChange.emit({start:i,end:r})}moveView(e){const t=this.viewDate;this.viewDate=new Date(t.getFullYear(),t.getMonth()+e,1)}onKeyDown=(e,t)=>{const s={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};let a;if(e.key in s)a=v(t,s[e.key]);else if("Home"===e.key||"End"===e.key){const s=(t.getDay()-this.safeFirstDay+7)%7;a=v(t,"Home"===e.key?-s:6-s)}else{if("PageUp"!==e.key&&"PageDown"!==e.key)return;{const s="PageUp"===e.key?-1:1;a=function(e,t){const s=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return new Date(s.getFullYear(),s.getMonth(),Math.min(e.getDate(),a))}(t,e.shiftKey?12*s:s)}}e.preventDefault(),this.focusedIso=h(a),this.viewDate=k(a),this.shouldFocusDay=!0};get safeFirstDay(){const e=Math.trunc(Number(this.firstDayOfWeek));return Number.isFinite(e)?(e%7+7)%7:0}get fmt(){const e=this.locale||"en-GB";try{return e}catch{return"en-GB"}}formatField(e){const t=u(e);return t?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"short",year:"numeric"}).format(t):""}titleText(){const e=this.range?void 0:u(this.value);return e?new Intl.DateTimeFormat(this.fmt,{day:"numeric",month:"long",year:"numeric"}).format(e):new Intl.DateTimeFormat(this.fmt,{month:"long",year:"numeric"}).format(this.viewDate)}monthOptions(){const e=new Intl.DateTimeFormat(this.fmt,{month:"long"});return Array.from({length:12},((t,s)=>({label:e.format(new Date(2e3,s,1)),value:s+""})))}yearOptions(){const e=this.viewDate.getFullYear(),t=u(this.min)?.getFullYear()??e-100,s=u(this.max)?.getFullYear()??e+100,a=[];for(let i=Math.min(t,e);i<=Math.max(s,e);i++)a.push({label:i+"",value:i+""});return a}weekdays(){const e=new Intl.DateTimeFormat(this.fmt,{weekday:"short"});return Array.from({length:7},((t,s)=>e.format(new Date(2023,0,1+(this.safeFirstDay+s)%7))))}gridDays(){const e=this.viewDate,t=(e.getDay()-this.safeFirstDay+7)%7,s=v(e,-t);return Array.from({length:42},((e,t)=>v(s,t)))}renderHeader(){if(this.range){const e=(e,t)=>i("bs-input",{label:t,placeholder:"YYYY-MM-DD",value:this.draft[e]??this.formatField(this[e]),onBsInput:t=>this.draft={...this.draft,[e]:t.detail},onBsChange:()=>this.commitDraft(e),onFocusin:()=>{void 0===this.draft[e]&&(this.draft={...this.draft,[e]:this[e]})},onFocusout:()=>this.commitDraft(e)});return i("div",{part:"header",class:"bs-datepicker__header bs-datepicker__header--range"},e("start",this.startLabel),e("end",this.endLabel))}return i("div",{part:"header",class:"bs-datepicker__header"},this.renderDropdown("month",this.monthLabel,this.monthOptions(),this.viewDate.getMonth()+"",(e=>this.viewDate=new Date(this.viewDate.getFullYear(),Number(e),1))),this.renderDropdown("year",this.yearLabel,this.yearOptions(),this.viewDate.getFullYear()+"",(e=>this.viewDate=new Date(Number(e),this.viewDate.getMonth(),1))))}renderDropdown(e,t,s,a,r){const d=this.openMenu===e,n=()=>{this.openMenu=null};return i("div",{class:"bs-datepicker__dropdown",onKeyDown:e=>{"Escape"===e.key&&d&&(n(),e.currentTarget.querySelector("bs-input")?.focus())},onFocusout:e=>{const t=e.relatedTarget;!d||t&&e.currentTarget.contains(t)||n()}},i("bs-input",{type:"dropdown",class:"bs-datepicker__select",label:t,value:s.find((e=>e.value===a))?.label??"",open:d,onBsOpen:()=>{this.menuToScroll=!d,this.openMenu=d?null:e}}),d&&i("bs-menu",{part:"menu",class:"bs-datepicker__menu",role:"listbox"},s.map((e=>i("bs-menu-item",{key:e.value,"data-current":e.value===a?"":void 0,"aria-current":e.value===a?"true":void 0,onBsSelect:()=>{r(e.value),n(),this.el.shadowRoot.querySelector(`.bs-datepicker__dropdown bs-input[label="${t}"]`)?.focus()}},i("span",{class:"bs-datepicker__option"},i("span",null,e.label),e.value===a&&i("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{d:"M5 12.5L10 17.5L19 7.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))))))))}render(){const e=this.gridDays(),t=h(new Date),s=this.range?this.start:this.value,a=this.range?this.end:"",r=this.range&&this.start&&!this.end&&this.hoverIso>this.start?this.hoverIso:a,d=e.some((e=>h(e)===this.focusedIso&&e.getMonth()===this.viewDate.getMonth()))?this.focusedIso:this.defaultTabbable(e),n=e=>!!s&&!!r&&e>s&&e<r,o=this.weekdays();return i("bs-card",{key:"d2794a112b72b3dc871360b1e57273c9ef097fc4",part:"container",class:"bs-datepicker",surface:"raised"},i("div",{key:"bee55a1cd06aa44171f40babae77b1f2f742d160",class:"bs-datepicker__body"},this.renderHeader(),i("div",{key:"d4ab1cfd76fcea8b64daeb951da7b36300c036f0",part:"nav",class:"bs-datepicker__nav"},i("button",{key:"5fcbb3f928db51049fd034beb3519400afe4f128",part:"prev",type:"button",class:"bs-datepicker__nav-button","aria-label":this.previousLabel,onClick:()=>this.moveView(-1)},i("svg",{key:"18889f8f9dd9364bd73595635b72515b91d35ade",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"3d648cd4be611ef4de37cc08f9017809388d36e3",d:"M15 18L9 12L15 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{key:"c0647871f1c140472807ae51e04604c6d87ccaa4",part:"title",class:"bs-datepicker__title","aria-live":"polite"},this.titleText()),i("button",{key:"ec3d33aeea146534d6640ac336905a002d0e7dc2",part:"next",type:"button",class:"bs-datepicker__nav-button","aria-label":this.nextLabel,onClick:()=>this.moveView(1)},i("svg",{key:"5cbac8630a30064d940e5f03ce767b525c09dd7c",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},i("path",{key:"2c47ca0911b8b42cd3590ff053905df327363e9f",d:"M9 18L15 12L9 6",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})))),i("div",{key:"91a6942792287f3044962fd278e36ed04ec03878",part:"grid",class:"bs-datepicker__grid",role:"grid","aria-label":this.titleText()},i("div",{key:"445e0548f0913426fe2eb730f291423d9165f839",class:"bs-datepicker__row",role:"row"},o.map((e=>i("div",{part:"weekday",class:"bs-datepicker__weekday",role:"columnheader"},e)))),Array.from({length:6},((r,o)=>{const c=e.slice(7*o,7*o+7);return i("div",{class:"bs-datepicker__row",role:"row"},c.map(((e,r)=>{const o=h(e),b=e.getMonth()!==this.viewDate.getMonth(),l=o===s||!!a&&o===a,p=n(o),u={"bs-datepicker__cell":!0,"bs-datepicker__cell--in-range":p,"bs-datepicker__cell--band-start":p&&!(r>0&&n(h(c[r-1]))),"bs-datepicker__cell--band-end":p&&!(r<6&&n(h(c[r+1])))},k=["day",l&&"selected",p&&"in-range",b&&"outside",o===t&&"today"].filter(Boolean).join(" ");return i("div",{class:u,role:"gridcell","aria-selected":l||p?"true":"false"},i("button",{part:k,type:"button",class:{"bs-datepicker__day":!0,"bs-datepicker__day--selected":l,"bs-datepicker__day--in-range":p,"bs-datepicker__day--outside":b,"bs-datepicker__day--today":o===t},"data-date":o,tabindex:o===d?0:-1,disabled:this.isDisabled(e),"aria-current":o===t?"date":void 0,"aria-label":new Intl.DateTimeFormat(this.fmt,{weekday:"long",day:"2-digit",month:"long",year:"numeric"}).format(e),onClick:()=>this.selectDay(e),onKeyDown:t=>this.onKeyDown(t,e),onMouseEnter:()=>{this.range&&this.start&&!this.end&&(this.hoverIso=o)}},(e.getDate()+"").padStart(2,"0")))})))})))))}defaultTabbable(e){const t=t=>e.some((e=>h(e)===t&&e.getMonth()===this.viewDate.getMonth())),s=this.range?this.start:this.value;if(s&&t(s))return s;const a=h(new Date);return t(a)?a:h(this.viewDate)}static get formAssociated(){return!0}static get watchers(){return{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}}static get style(){return":host{display:inline-block;--bs-datepicker-width:364px;--bs-datepicker-bg:var(--bs-paper-bg-raised);--bs-datepicker-radius:var(--bs-border-radius-150);--bs-datepicker-padding:var(--bs-spacing-200);--bs-datepicker-gap:var(--bs-spacing-150);--bs-datepicker-shadow:var(--bs-shadow-md);--bs-datepicker-menu-max-height:280px;--bs-datepicker-day-size:var(--bs-spacing-550);--bs-datepicker-day-radius:var(--bs-border-radius-100);--bs-datepicker-day-gap:var(--bs-spacing-50);--bs-datepicker-band-bridge:var(--bs-spacing-50);--bs-datepicker-font-size:var(--bs-font-size-md);--bs-datepicker-line-height:var(--bs-line-height-body-md);--bs-datepicker-weekday-font-size:var(--bs-font-size-sm);--bs-datepicker-weekday-line-height:var(--bs-line-height-body-sm);--bs-datepicker-color:var(--bs-text-default);--bs-datepicker-color-muted:var(--bs-text-muted);--bs-datepicker-color-weekday:var(--bs-text-secondary);--bs-datepicker-color-disabled:var(--bs-text-on-disabled);--bs-datepicker-hover:var(--bs-surface-hover);--bs-datepicker-pressed:var(--bs-surface-pressed);--bs-datepicker-focus-bg:var(--bs-surface-focus);--bs-datepicker-selected-bg:var(--bs-color-primary-default);--bs-datepicker-selected-bg-hover:var(--bs-color-primary-hover);--bs-datepicker-selected-bg-pressed:var(--bs-color-primary-pressed);--bs-datepicker-selected-bg-focus:var(--bs-color-primary-focused);--bs-datepicker-selected-bg-disabled:var(--bs-surface-action-disabled);--bs-datepicker-selected-color:var(--bs-text-on-action);--bs-datepicker-range-bg:var(--bs-color-primary-container);--bs-datepicker-today-border:var(--bs-border-primary);--bs-datepicker-focus-ring-color:var(--bs-border-neutral-focus)}.bs-datepicker{width:var(--bs-datepicker-width);max-width:100%;color:var(--bs-datepicker-color);font-size:var(--bs-datepicker-font-size);--bs-card-bg:var(--bs-datepicker-bg);--bs-card-radius:var(--bs-datepicker-radius);--bs-card-padding:var(--bs-datepicker-padding);--bs-card-shadow:var(--bs-datepicker-shadow);--bs-card-overflow:visible}.bs-datepicker__body{display:flex;flex-direction:column;gap:var(--bs-datepicker-gap)}.bs-datepicker__header{display:flex;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-datepicker__header--range>bs-input{--bs-input-label-font-size:var(--bs-font-size-md);--bs-input-label-font-weight:var(--bs-font-weight-semibold);--bs-input-label-line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-datepicker__header>bs-input{flex:1 1 0;min-width:0}.bs-datepicker__select::part(label){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.bs-datepicker__dropdown{position:relative;flex:1 1 0;min-width:0}.bs-datepicker__dropdown bs-input{width:100%}.bs-datepicker__menu{position:absolute;top:calc(100% + var(--bs-spacing-50));inset-inline:0;z-index:2;max-height:var(--bs-datepicker-menu-max-height);overflow-y:auto;border-radius:var(--bs-border-radius-100);background:var(--bs-surface-raised);box-shadow:var(--bs-shadow-md);--bs-menu-shadow:none}.bs-datepicker__menu bs-menu-item{--bs-menu-item-color:var(--bs-datepicker-color)}.bs-datepicker__menu bs-menu-item::part(label){flex:1;text-align:start}.bs-datepicker__option{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-100)}.bs-datepicker__option svg{width:20px;height:20px;flex:none}.bs-datepicker__nav{display:flex;align-items:center;justify-content:space-between}.bs-datepicker__title{font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-line-height) * 1px)}.bs-datepicker__nav-button{display:flex;align-items:center;justify-content:center;width:var(--bs-spacing-600);height:var(--bs-spacing-600);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-icon-default);cursor:pointer}.bs-datepicker__nav-button svg{width:24px;height:24px}.bs-datepicker__nav-button:hover{background:var(--bs-datepicker-hover)}.bs-datepicker__grid{display:flex;flex-direction:column;gap:var(--bs-datepicker-day-gap)}.bs-datepicker__row{display:grid;grid-template-columns:repeat(7, var(--bs-datepicker-day-size));justify-content:space-between}.bs-datepicker__weekday{display:flex;align-items:center;justify-content:center;height:var(--bs-datepicker-day-size);color:var(--bs-datepicker-color-weekday);font-size:var(--bs-datepicker-weekday-font-size);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-datepicker-weekday-line-height) * 1px)}.bs-datepicker__cell{display:flex;justify-content:center}.bs-datepicker__cell--in-range{background:var(--bs-datepicker-range-bg);box-shadow:calc(var(--bs-datepicker-band-bridge) + 1px) 0 0 var(--bs-datepicker-range-bg)}.bs-datepicker__cell--band-start{border-start-start-radius:var(--bs-datepicker-day-radius);border-end-start-radius:var(--bs-datepicker-day-radius)}.bs-datepicker__cell--band-end{border-start-end-radius:var(--bs-datepicker-day-radius);border-end-end-radius:var(--bs-datepicker-day-radius);box-shadow:none}.bs-datepicker__day{width:var(--bs-datepicker-day-size);height:var(--bs-datepicker-day-size);padding:0;border:none;border-radius:var(--bs-datepicker-day-radius);background:transparent;color:var(--bs-datepicker-color);font-family:inherit;font-size:var(--bs-datepicker-font-size);line-height:calc(var(--bs-datepicker-line-height) * 1px);cursor:pointer}.bs-datepicker__day--outside{color:var(--bs-datepicker-color-muted)}.bs-datepicker__day--today{box-shadow:inset 0 0 0 1px var(--bs-datepicker-today-border)}.bs-datepicker__day:not(:disabled):hover{background:var(--bs-datepicker-hover)}.bs-datepicker__day:not(:disabled):active{background:var(--bs-datepicker-pressed)}.bs-datepicker__day--in-range:not(:disabled):hover,.bs-datepicker__day--in-range:not(:disabled):active{background:var(--bs-datepicker-range-bg)}.bs-datepicker__day--selected,.bs-datepicker__day--selected.bs-datepicker__day--outside{background:var(--bs-datepicker-selected-bg);color:var(--bs-datepicker-selected-color)}.bs-datepicker__day--selected:not(:disabled):hover{background:var(--bs-datepicker-selected-bg-hover)}.bs-datepicker__day--selected:not(:disabled):active{background:var(--bs-datepicker-selected-bg-pressed)}.bs-datepicker__day:disabled{color:var(--bs-datepicker-color-disabled);cursor:not-allowed}.bs-datepicker__day--selected:disabled{background:var(--bs-datepicker-selected-bg-disabled)}.bs-datepicker__day:focus-visible{background:var(--bs-datepicker-focus-bg);outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:0}.bs-datepicker__day--selected:focus-visible{background:var(--bs-datepicker-selected-bg-focus)}.bs-datepicker__nav-button:focus-visible{outline:2px solid var(--bs-datepicker-focus-ring-color);outline-offset:2px}"}},[577,"bs-datepicker",{name:[513],range:[516],value:[1537],start:[1537],end:[1537],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],startLabel:[1,"start-label"],endLabel:[1,"end-label"],monthLabel:[1,"month-label"],yearLabel:[1,"year-label"],previousLabel:[1,"previous-label"],nextLabel:[1,"next-label"],viewDate:[32],focusedIso:[32],hoverIso:[32],draft:[32],openMenu:[32]},void 0,{value:[{onSelectionChange:0},{onSelectionJump:0}],start:[{onSelectionChange:0},{onSelectionJump:0}],end:[{onSelectionChange:0}],range:[{onSelectionChange:0}],name:[{onSelectionChange:0}]}]);function p(e){return(e+"").padStart(2,"0")}function h(e){return`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`}function u(e){const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec((e??"").trim());if(!t)return;const s=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return h(s)===`${t[1]}-${t[2]}-${t[3]}`?s:void 0}function k(e){return new Date(e.getFullYear(),e.getMonth(),1)}function v(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function g(){"undefined"!=typeof customElements&&["bs-datepicker","bs-card","bs-chip-informative","bs-icon-button","bs-input","bs-menu","bs-menu-item"].forEach((t=>{switch(t){case"bs-datepicker":customElements.get(e(t))||customElements.define(e(t),l);break;case"bs-card":customElements.get(e(t))||r();break;case"bs-chip-informative":customElements.get(e(t))||d();break;case"bs-icon-button":customElements.get(e(t))||n();break;case"bs-input":customElements.get(e(t))||o();break;case"bs-menu":customElements.get(e(t))||c();break;case"bs-menu-item":customElements.get(e(t))||b()}}))}g();const f=l,m=g;export{f as BsDatepicker,m as defineCustomElement}
|
|
1
|
+
import{t as e,p as t,H as s,c as a,h as i}from"./p-B2gx7SZk.js";import{d as r}from"./p-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 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as i,p as s,H as e,c as o,h as a}from"./p-B2gx7SZk.js";import{d as t}from"./p-DiORQQg3.js";const n=s(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.bsClose=o(this,"bsClose")}open=!1;heading;closeLabel="Close";size="md";centered=!1;bsClose;hasFooter=!1;hasImage=!1;hasIcon=!1;onFooterSlotchange=i=>{this.hasFooter=i.target.assignedNodes().length>0};onImageSlotchange=i=>{this.hasImage=i.target.assignedNodes().length>0};onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};dialogRef;previouslyFocused;previousBodyOverflow;wasOpen=!1;close=()=>{this.open=!1,this.bsClose.emit()};onKeydown(i){this.open&&"Escape"===i.key&&this.close()}onBackdropClick=i=>{i.target===i.currentTarget&&this.close()};onFocusIn(i){this.open&&this.dialogRef?.isConnected&&!i.composedPath().includes(this.dialogRef)&&this.dialogRef.focus()}componentDidRender(){this.open&&!this.wasOpen?(this.previouslyFocused=document.activeElement,requestAnimationFrame((()=>this.dialogRef?.focus())),this.previousBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden"):!this.open&&this.wasOpen&&(this.previouslyFocused?.focus(),document.body.style.overflow=this.previousBodyOverflow??""),this.wasOpen=this.open}disconnectedCallback(){this.wasOpen&&(document.body.style.overflow=this.previousBodyOverflow??"")}render(){if(!this.open)return null;const i=this.centered||this.hasImage;return a("div",{part:"backdrop",class:"bs-dialog__backdrop",onClick:this.onBackdropClick},a("div",{ref:i=>this.dialogRef=i,tabIndex:-1,part:"dialog",class:"bs-dialog__dialog bs-dialog__dialog--"+this.size,role:"dialog","aria-modal":"true","aria-label":this.heading},i&&a("bs-icon-button",{part:"close",class:"bs-dialog__close--floating",variant:"neutral",size:"md","aria-label":this.closeLabel,onClick:this.close},a(l,null)),a("div",{part:"image",class:"bs-dialog__image "+(this.hasImage?"bs-dialog__image--visible":"")},a("slot",{name:"image",onSlotchange:this.onImageSlotchange})),this.centered&&a("div",{part:"icon",class:"bs-dialog__icon "+(this.hasIcon?"bs-dialog__icon--visible":"")},a("slot",{name:"icon",onSlotchange:this.onIconSlotchange})),a("div",{part:"header",class:"bs-dialog__header "+(this.centered?"bs-dialog__header--centered":"")},a("span",{class:"bs-dialog__heading"},this.heading),!i&&a("bs-icon-button",{part:"close",variant:"subtle",size:"md","aria-label":this.closeLabel,onClick:this.close},a(l,null))),a("div",{part:"body",class:"bs-dialog__body "+(this.centered?"bs-dialog__body--centered":"")},a("slot",null)),a("div",{part:"footer",class:"bs-dialog__footer "+(this.hasFooter?"bs-dialog__footer--visible":"")},a("slot",{name:"footer",onSlotchange:this.onFooterSlotchange}))))}static get style(){return".bs-dialog__backdrop{position:fixed;inset:0;z-index:var(--bs-z-index-modal);display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.4)}.bs-dialog__dialog{position:relative;display:flex;flex-direction:column;max-height:calc(100vh - var(--bs-spacing-800));background:var(--bs-surface-base);color:var(--bs-text-default);border-radius:var(--bs-border-radius-200);box-shadow:var(--bs-shadow-xl);font-family:inherit}.bs-dialog__dialog--sm{width:360px}.bs-dialog__dialog--md{width:560px}.bs-dialog__dialog--lg{width:800px}.bs-dialog__header{display:flex;align-items:center;justify-content:space-between;padding:var(--bs-spacing-200) var(--bs-spacing-200) var(--bs-spacing-100)}.bs-dialog__image--visible+.bs-dialog__header,.bs-dialog__icon--visible+.bs-dialog__header{padding-top:0}.bs-dialog__heading{font-size:var(--bs-font-size-lg);font-weight:var(--bs-font-weight-semibold);color:var(--bs-text-default)}.bs-dialog__close--floating{position:absolute;top:var(--bs-spacing-200);inset-inline-end:var(--bs-spacing-200);z-index:1}.bs-dialog__body{padding:0 var(--bs-spacing-200) var(--bs-spacing-200);overflow-y:auto}.bs-dialog__body--centered{text-align:center}.bs-dialog__footer--visible{display:flex;justify-content:flex-end;gap:var(--bs-spacing-200);padding:0 var(--bs-spacing-200) var(--bs-spacing-200)}.bs-dialog__image--visible{overflow:hidden;border-radius:var(--bs-border-radius-200) var(--bs-border-radius-200) 0 0;margin-bottom:var(--bs-spacing-200)}.bs-dialog__image--visible ::slotted(img){display:block;width:100%;height:auto;object-fit:cover}.bs-dialog__icon--visible{display:flex;align-items:center;justify-content:center;padding:var(--bs-spacing-200) var(--bs-spacing-200) 0;margin-bottom:var(--bs-spacing-200)}.bs-dialog__icon--visible ::slotted(*){width:64px;height:64px}.bs-dialog__header--centered{justify-content:center;text-align:center}@media (forced-colors: active){.bs-dialog__dialog{border:1px solid CanvasText}}"}},[769,"bs-dialog",{open:[1540],heading:[1],closeLabel:[1,"close-label"],size:[1],centered:[516],hasFooter:[32],hasImage:[32],hasIcon:[32]},[[4,"keydown","onKeydown"],[4,"focusin","onFocusIn"]]]),l=()=>a("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},a("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),a("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}));function d(){"undefined"!=typeof customElements&&["bs-dialog","bs-icon-button"].forEach((s=>{switch(s){case"bs-dialog":customElements.get(i(s))||customElements.define(i(s),n);break;case"bs-icon-button":customElements.get(i(s))||t()}}))}d();const r=n,c=d;export{r as BsDialog,c as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-DzvXbBvk.js";const p=o,r=s;export{p as BsDivider,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsEmptyState extends Components.BsEmptyState, HTMLElement {}
|
|
4
|
+
export const BsEmptyState: {
|
|
5
|
+
prototype: BsEmptyState;
|
|
6
|
+
new (): BsEmptyState;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as o,d as s}from"./p-I1_Q3HQu.js";const p=o,r=s;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 o}from"./p-B2gx7SZk.js";import{d as t}from"./p-
|
|
1
|
+
import{h as e,t as r,p as a,H as s,c as o}from"./p-B2gx7SZk.js";import{d as t}from"./p-BmdSbmFg.js";import{d as n}from"./p-DBvhi__l.js";import{d as i}from"./p-C3erqJFy.js";const c=a(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsPrimary=o(this,"bsPrimary"),this.bsSecondary=o(this,"bsSecondary")}type="not-found";code;heading;headingLevel=1;description;primaryLabel;secondaryLabel;reference;bsPrimary;bsSecondary;get defaults(){return d[this.type]??d["not-found"]}render(){const r=this.defaults,a=this.code??r.code,s=this.heading??r.heading,o=this.description??r.description,t=this.primaryLabel??r.primary,n=this.secondaryLabel??r.secondary,i=Math.min(6,Math.max(1,Math.trunc(Number(this.headingLevel))||1));return e("bs-card",{key:"4214c79438721c66089be3a4ae64fcd6bdcbdea6",part:"container",class:"bs-error-page",surface:"base"},e("div",{key:"39b2a7292d488442fc2465635a5be9dd704dc42e",class:"bs-error-page__body"},e("div",{key:"beb353eefb6b77b03fe7d1ea3894b6a625eebe06",class:"bs-error-page__art-group"},e("bs-icon-tile",{key:"516a9c87ddb3ac5140d2880d4638eb5eca01db73",part:"art",class:"bs-error-page__art "+(r.info?"bs-error-page__art--info":""),intent:r.intent,size:"lg"},e("slot",{key:"3c3029ce78413f49c4bb839260c432848329b428",name:"icon"},r.glyph())),a&&e("span",{key:"fc4058b507c0b60ca417f09f7838664716b17fc3",part:"code",class:"bs-error-page__code"},a)),e("h"+i,{part:"heading",class:{"bs-error-page__heading":!0}},s),o&&e("p",{key:"b914f77506217b401e26694205104d623596d270",part:"description",class:"bs-error-page__description"},o),(t||n)&&e("div",{key:"b6dc2e92b34960f754a54b31a659337135e63607",part:"actions",class:"bs-error-page__actions"},t&&e("bs-button",{key:"e4f85bf6e86a80fbf1bd09fc77e16768c435a97b",part:"primary",variant:"primary",onClick:()=>this.bsPrimary.emit()},t),n&&e("bs-button",{key:"a1469448cfbf1edb0bb8fe1d613101782dc87145",part:"secondary",variant:"outlined",onClick:()=>this.bsSecondary.emit()},n)),this.reference&&e("p",{key:"e8f32f0cc84051d02418bb48bc6116675ec55097",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),d={"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 p(){"undefined"!=typeof customElements&&["bs-error-page","bs-button","bs-card","bs-icon-tile"].forEach((e=>{switch(e){case"bs-error-page":customElements.get(r(e))||customElements.define(r(e),c);break;case"bs-button":customElements.get(r(e))||t();break;case"bs-card":customElements.get(r(e))||n();break;case"bs-icon-tile":customElements.get(r(e))||i()}}))}p();const g=c,l=p;export{g as BsErrorPage,l as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e,p as s,H as i,c as t,h as o}from"./p-B2gx7SZk.js";import{d as l}from"./p-GTDI4Ibw.js";import{d as a}from"./p-B128GX8H.js";const r=s(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsCancel=t(this,"bsCancel"),this.bsRemove=t(this,"bsRemove")}state="loading";fileName="";fileSize;progress=0;message;thumbnailSrc;thumbnailAlt="";cancelLabel="Cancel upload";removeLabel="Remove file";bsCancel;bsRemove;get clampedProgress(){return Math.min(100,Math.max(0,Math.round(Number.isFinite(this.progress)?this.progress:0)))}get statusText(){if(this.message)return this.message;switch(this.state){case"in-progress":return this.clampedProgress+"% uploaded";case"error":return"Upload failed";case"success":return"File uploaded successfully";default:return"Loading..."}}onAction=()=>{"success"===this.state?this.bsRemove.emit():this.bsCancel.emit()};renderStatus(){return"loading"===this.state||"in-progress"===this.state?o("bs-progress-linear",{part:"progress",size:"small",type:"loading"===this.state?"indeterminate":"determinate",value:this.clampedProgress,ariaLabel:this.fileName||"Upload progress"},this.statusText):o("div",{part:"status",class:"bs-file-upload-item__status bs-file-upload-item__status--"+this.state,role:"status"},o("success"===this.state?d:u,null),o("span",{class:"bs-file-upload-item__status-text"},this.statusText))}render(){const e="success"===this.state;return o("div",{key:"e109650dda74a0a0db7af7f621da5e70079a7830",part:"item",class:"bs-file-upload-item bs-file-upload-item--"+this.state},o("div",{key:"800f1bd6a8cabd97c0aa43fe9a521876d4e6feb8",part:"thumbnail",class:"bs-file-upload-item__thumbnail"},o("slot",{key:"e5696a2cf9d69579ff8fd79688f83879c4093c74",name:"thumbnail"},this.thumbnailSrc?o("img",{class:"bs-file-upload-item__image",src:this.thumbnailSrc,alt:this.thumbnailAlt}):o(n,null))),o("div",{key:"bc52ee589c5cf4040dcb1aa86cce0150136d71ae",class:"bs-file-upload-item__content"},o("div",{key:"a70dc514e89ebfb1de3e772652e6ab8b2987007a",class:"bs-file-upload-item__meta"},o("span",{key:"1c0a8e151f284a8344650fb00912582c17d2d5ee",part:"name",class:"bs-file-upload-item__name"},this.fileName),this.fileSize&&o("span",{key:"f608a1ee6e44e34e9e67600622a180e676fb960a",part:"size",class:"bs-file-upload-item__size"},this.fileSize)),this.renderStatus()),o("bs-icon-button",{key:"5781f2aa401d12d3a4f4b0172d64cb0b9ceacf00",part:"action",variant:"subtle",size:"lg",ariaLabel:e?this.removeLabel:this.cancelLabel,onClick:this.onAction},o(e?b:c,null)))}static get style(){return":host{display:block;--bs-file-upload-item-bg:var(--bs-surface-base);--bs-file-upload-item-border-color:var(--bs-border-default);--bs-file-upload-item-border-width:var(--bs-border-width-thin);--bs-file-upload-item-radius:var(--bs-border-radius-150);--bs-file-upload-item-padding:var(--bs-spacing-200);--bs-file-upload-item-gap:var(--bs-spacing-150);--bs-file-upload-item-thumbnail-size:80px;--bs-file-upload-item-thumbnail-radius:var(--bs-border-radius-100);--bs-file-upload-item-thumbnail-bg:var(--bs-surface-container);--bs-file-upload-item-thumbnail-icon-color:var(--bs-icon-muted);--bs-file-upload-item-content-gap:var(--bs-spacing-100);--bs-file-upload-item-name-color:var(--bs-text-default);--bs-file-upload-item-size-color:var(--bs-text-default);--bs-file-upload-item-success-color:var(--bs-text-success);--bs-file-upload-item-success-icon-color:var(--bs-icon-success);--bs-file-upload-item-error-color:var(--bs-text-error);--bs-file-upload-item-error-icon-color:var(--bs-icon-error)}.bs-file-upload-item{box-sizing:border-box;display:flex;align-items:flex-start;gap:var(--bs-file-upload-item-gap);padding:var(--bs-file-upload-item-padding);border:var(--bs-file-upload-item-border-width) solid var(--bs-file-upload-item-border-color);border-radius:var(--bs-file-upload-item-radius);background:var(--bs-file-upload-item-bg);font-size:var(--bs-font-size-md);line-height:calc(var(--bs-line-height-body-md) * 1px)}.bs-file-upload-item__thumbnail{display:flex;flex:none;align-items:center;justify-content:center;width:var(--bs-file-upload-item-thumbnail-size);height:var(--bs-file-upload-item-thumbnail-size);overflow:hidden;border-radius:var(--bs-file-upload-item-thumbnail-radius);background:var(--bs-file-upload-item-thumbnail-bg);color:var(--bs-file-upload-item-thumbnail-icon-color)}.bs-file-upload-item__placeholder{display:block;width:32px;height:32px}.bs-file-upload-item__image{display:block;width:100%;height:100%;object-fit:cover}.bs-file-upload-item__content{display:flex;flex:1;flex-direction:column;justify-content:center;gap:var(--bs-file-upload-item-content-gap);align-self:stretch;min-width:0}.bs-file-upload-item__meta{display:flex;flex-direction:column}.bs-file-upload-item__name{color:var(--bs-file-upload-item-name-color);font-weight:600;overflow-wrap:anywhere}.bs-file-upload-item__size{color:var(--bs-file-upload-item-size-color);font-size:var(--bs-font-size-sm);line-height:calc(var(--bs-line-height-body-sm) * 1px)}.bs-file-upload-item__status{display:flex;align-items:center;gap:var(--bs-spacing-50);min-height:24px}.bs-file-upload-item__status-icon{display:block;flex:none;width:16px;height:16px}.bs-file-upload-item__status--success{color:var(--bs-file-upload-item-success-color)}.bs-file-upload-item__status--success .bs-file-upload-item__status-icon{color:var(--bs-file-upload-item-success-icon-color)}.bs-file-upload-item__status--error{color:var(--bs-file-upload-item-error-color)}.bs-file-upload-item__status--error .bs-file-upload-item__status-icon{color:var(--bs-file-upload-item-error-icon-color)}bs-progress-linear{width:100%}bs-icon-button{flex:none;--bs-icon-neutral-default:var(--bs-icon-default)}@media (forced-colors: active){.bs-file-upload-item{border-color:CanvasText}}"}},[769,"bs-file-upload-item",{state:[513],fileName:[1,"file-name"],fileSize:[1,"file-size"],progress:[2],message:[1],thumbnailSrc:[1,"thumbnail-src"],thumbnailAlt:[1,"thumbnail-alt"],cancelLabel:[1,"cancel-label"],removeLabel:[1,"remove-label"]}]),n=()=>o("svg",{class:"bs-file-upload-item__placeholder",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M5 6H27C27.5523 6 28 6.44772 28 7V25C28 25.5523 27.5523 26 27 26H5C4.44772 26 4 25.5523 4 25V7C4 6.44772 4.44772 6 5 6Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M19.5 14C20.3284 14 21 13.3284 21 12.5C21 11.6716 20.3284 11 19.5 11C18.6716 11 18 11.6716 18 12.5C18 13.3284 18.6716 14 19.5 14Z",fill:"currentColor"}),o("path",{d:"M18.4137 20.5L21.625 17.2925C21.8125 17.1051 22.0668 16.9998 22.3319 16.9998C22.597 16.9998 22.8512 17.1051 23.0387 17.2925L28 22.2575",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M4 21.0863L10.7925 14.2925C10.8854 14.1995 10.9957 14.1258 11.1171 14.0754C11.2385 14.0251 11.3686 13.9992 11.5 13.9992C11.6314 13.9992 11.7615 14.0251 11.8829 14.0754C12.0043 14.1258 12.1146 14.1995 12.2075 14.2925L23.9137 26",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),d=()=>o("svg",{class:"bs-file-upload-item__status-icon",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M11.0306 5.96938C11.1005 6.03905 11.156 6.12185 11.1939 6.21301C11.2317 6.30417 11.2512 6.40191 11.2512 6.50063C11.2512 6.59934 11.2317 6.69708 11.1939 6.78824C11.156 6.8794 11.1005 6.9622 11.0306 7.03188L7.53062 10.5319C7.46095 10.6018 7.37815 10.6573 7.28699 10.6951C7.19582 10.733 7.09809 10.7525 6.99937 10.7525C6.90066 10.7525 6.80292 10.733 6.71176 10.6951C6.6206 10.6573 6.5378 10.6018 6.46812 10.5319L4.96812 9.03187C4.89836 8.96211 4.84302 8.87929 4.80526 8.78814C4.76751 8.69698 4.74807 8.59929 4.74807 8.50062C4.74807 8.40196 4.76751 8.30427 4.80526 8.21311C4.84302 8.12196 4.89836 8.03914 4.96812 7.96938C5.03789 7.89961 5.12071 7.84427 5.21186 7.80651C5.30302 7.76876 5.40071 7.74932 5.49937 7.74932C5.59804 7.74932 5.69573 7.76876 5.78689 7.80651C5.87804 7.84427 5.96086 7.89961 6.03062 7.96938L7 8.9375L9.96937 5.9675C10.0392 5.89789 10.122 5.84272 10.2131 5.80513C10.3042 5.76755 10.4018 5.7483 10.5004 5.74847C10.599 5.74865 10.6965 5.76825 10.7875 5.80615C10.8785 5.84405 10.9611 5.89952 11.0306 5.96938ZM14.75 8C14.75 9.33502 14.3541 10.6401 13.6124 11.7501C12.8707 12.8601 11.8165 13.7253 10.5831 14.2362C9.34971 14.7471 7.99251 14.8808 6.68314 14.6203C5.37377 14.3598 4.17103 13.717 3.22703 12.773C2.28302 11.829 1.64015 10.6262 1.3797 9.31686C1.11925 8.00749 1.25292 6.65029 1.76381 5.41689C2.2747 4.18349 3.13987 3.12928 4.2499 2.38758C5.35993 1.64588 6.66498 1.25 8 1.25C9.7896 1.25199 11.5053 1.96378 12.7708 3.22922C14.0362 4.49466 14.748 6.2104 14.75 8ZM13.25 8C13.25 6.96165 12.9421 5.94661 12.3652 5.08326C11.7883 4.2199 10.9684 3.54699 10.0091 3.14963C9.04978 2.75227 7.99418 2.6483 6.97578 2.85088C5.95738 3.05345 5.02191 3.55346 4.28769 4.28769C3.55346 5.02191 3.05345 5.95738 2.85088 6.97578C2.6483 7.99418 2.75227 9.04978 3.14963 10.0091C3.54699 10.9684 4.2199 11.7883 5.08326 12.3652C5.94661 12.9421 6.96165 13.25 8 13.25C9.39193 13.2485 10.7264 12.6949 11.7107 11.7107C12.6949 10.7264 13.2485 9.39193 13.25 8Z",fill:"currentColor"})),u=()=>o("svg",{class:"bs-file-upload-item__status-icon",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M10.5306 6.53062L9.0625 8L10.5325 9.46937C10.6734 9.61027 10.7526 9.80137 10.7526 10.0006C10.7526 10.1999 10.6734 10.391 10.5325 10.5319C10.3916 10.6728 10.2005 10.7519 10.0013 10.7519C9.80199 10.7519 9.6109 10.6728 9.47 10.5319L8 9.0625L6.53062 10.5325C6.38973 10.6734 6.19863 10.7526 5.99937 10.7526C5.80012 10.7526 5.60902 10.6734 5.46812 10.5325C5.32723 10.3916 5.24807 10.2005 5.24807 10.0013C5.24807 9.80199 5.32723 9.6109 5.46812 9.47L6.9375 8L5.46937 6.53062C5.39961 6.46086 5.34427 6.37804 5.30651 6.28689C5.26876 6.19573 5.24932 6.09804 5.24932 5.99937C5.24932 5.80012 5.32848 5.60902 5.46937 5.46812C5.61027 5.32723 5.80137 5.24807 6.00062 5.24807C6.19988 5.24807 6.39098 5.32723 6.53187 5.46812L8 6.9375L9.46937 5.4675C9.61027 5.3266 9.80137 5.24745 10.0006 5.24745C10.1999 5.24745 10.391 5.3266 10.5319 5.4675C10.6728 5.6084 10.7519 5.79949 10.7519 5.99875C10.7519 6.19801 10.6728 6.3891 10.5319 6.53L10.5306 6.53062ZM14.75 8C14.75 9.33502 14.3541 10.6401 13.6124 11.7501C12.8707 12.8601 11.8165 13.7253 10.5831 14.2362C9.34971 14.7471 7.99251 14.8808 6.68314 14.6203C5.37377 14.3598 4.17103 13.717 3.22703 12.773C2.28302 11.829 1.64015 10.6262 1.3797 9.31686C1.11925 8.00749 1.25292 6.65029 1.76381 5.41689C2.2747 4.18349 3.13987 3.12928 4.2499 2.38758C5.35993 1.64588 6.66498 1.25 8 1.25C9.7896 1.25199 11.5053 1.96378 12.7708 3.22922C14.0362 4.49466 14.748 6.2104 14.75 8ZM13.25 8C13.25 6.96165 12.9421 5.94661 12.3652 5.08326C11.7883 4.2199 10.9684 3.54699 10.0091 3.14963C9.04978 2.75227 7.99418 2.6483 6.97578 2.85088C5.95738 3.05345 5.02191 3.55346 4.28769 4.28769C3.55346 5.02191 3.05345 5.95738 2.85088 6.97578C2.6483 7.99418 2.75227 9.04978 3.14963 10.0091C3.54699 10.9684 4.2199 11.7883 5.08326 12.3652C5.94661 12.9421 6.96165 13.25 8 13.25C9.39193 13.2485 10.7264 12.6949 11.7107 11.7107C12.6949 10.7264 13.2485 9.39193 13.25 8Z",fill:"currentColor"})),c=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M18.75 5.25L5.25 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M18.75 18.75L5.25 5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})),b=()=>o("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M20.25 5.25H3.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M9.75 9.75V15.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M14.25 9.75V15.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M18.75 5.25V19.5C18.75 19.6989 18.671 19.8897 18.5303 20.0303C18.3897 20.171 18.1989 20.25 18 20.25H6C5.80109 20.25 5.61032 20.171 5.46967 20.0303C5.32902 19.8897 5.25 19.6989 5.25 19.5V5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M15.75 5.25V3.75C15.75 3.35218 15.592 2.97064 15.3107 2.68934C15.0294 2.40804 14.6478 2.25 14.25 2.25H9.75C9.35218 2.25 8.97064 2.40804 8.68934 2.68934C8.40804 2.97064 8.25 3.35218 8.25 3.75V5.25",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));function p(){"undefined"!=typeof customElements&&["bs-file-upload-item","bs-icon-button","bs-progress-linear"].forEach((s=>{switch(s){case"bs-file-upload-item":customElements.get(e(s))||customElements.define(e(s),r);break;case"bs-icon-button":customElements.get(e(s))||l();break;case"bs-progress-linear":customElements.get(e(s))||a()}}))}p();const m=r,f=p;export{m as BsFileUploadItem,f as defineCustomElement}
|
|
1
|
+
import{t as e,p as s,H as i,c as t,h as 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 +1 @@
|
|
|
1
|
-
import{t as e,p as i,H as
|
|
1
|
+
import{t as e,p as i,H as a,c as s,h as o}from"./p-B2gx7SZk.js";import{d as l}from"./p-BmdSbmFg.js";const t=i(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsFilesSelect=s(this,"bsFilesSelect"),this.bsFilesReject=s(this,"bsFilesReject")}get el(){return this}inputEl;direction="horizontal";heading;description;buttonLabel="Browse file";accept;multiple=!1;disabled=!1;dragging=!1;bsFilesSelect;bsFilesReject;matchesAccept(e){const i=(this.accept??"").split(",").map((e=>e.trim().toLowerCase())).filter(Boolean);if(0===i.length)return!0;const a=e.name.toLowerCase(),s=(e.type||"").toLowerCase();return i.some((e=>e.startsWith(".")?a.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e))}handleFiles(e){const i=e.filter((e=>this.matchesAccept(e))),a=e.filter((e=>!this.matchesAccept(e))),s=this.multiple?i:i.slice(0,1);this.multiple||a.push(...i.slice(1)),s.length&&this.bsFilesSelect.emit(s),a.length&&this.bsFilesReject.emit(a)}onBrowse=()=>{this.disabled||this.inputEl?.click()};onInputChange=()=>{const e=Array.from(this.inputEl?.files??[]);this.inputEl&&(this.inputEl.value=""),e.length&&this.handleFiles(e)};onDragOver=e=>{this.disabled||(e.preventDefault(),this.dragging=!0)};onDragLeave=e=>{const i=e.relatedTarget;i&&e.currentTarget.contains(i)||(this.dragging=!1)};onDrop=e=>{if(this.disabled)return;e.preventDefault(),this.dragging=!1;const i=Array.from(e.dataTransfer?.files??[]);i.length&&this.handleFiles(i)};render(){return o("div",{key:"5312a866a1db63fd378f265fc200a509bfd50ce1",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:"7276ccfa10a086d933b5563a208393a75e0dd821",part:"icon",class:"bs-file-upload__icon"},o("slot",{key:"e828eaa70303c82cb2bea5e647807079946b62e7",name:"icon"},o(r,{key:"bd6ee5b8b20996ee68f972cb79db7c47f645c4d3"}))),o("div",{key:"784440974685713b31ba97642b931b99e64433a3",class:"bs-file-upload__content"},o("div",{key:"c7568214218e02ecb794f3429b843462f88bf216",class:"bs-file-upload__text"},this.heading&&o("span",{key:"4872f617be4f30b9ab98aeca2dca7012d9391905",part:"heading",class:"bs-file-upload__heading"},this.heading),this.description&&o("span",{key:"d8f446f1f8690ec773b094aeeb66af49ec1de291",part:"description",id:"description",class:"bs-file-upload__description"},this.description)),o("bs-button",{key:"bb0634e3e0dcb4a4ef59fa7c5daeaacbff5bceda",part:"browse",variant:"neutral",size:"sm",disabled:this.disabled,onClick:this.onBrowse},this.buttonLabel)),o("input",{key:"f55602446ec222ca46b7dab95aaff26d6d5b1632",ref:e=>this.inputEl=e,class:"bs-file-upload__input",type:"file",hidden:!0,tabindex:-1,accept:this.accept,multiple:this.multiple,disabled:this.disabled,"aria-describedby":this.description?"description":void 0,onChange:this.onInputChange}))}static get style(){return":host{display:block;--bs-file-upload-bg:var(--bs-surface-raised);--bs-file-upload-bg-dragging:var(--bs-surface-container);--bs-file-upload-border-color:var(--bs-border-neutral-container);--bs-file-upload-border-color-dragging:var(--bs-border-neutral-container-pressed);--bs-file-upload-border-width:var(--bs-border-width-medium);--bs-file-upload-radius:var(--bs-border-radius-150);--bs-file-upload-padding:var(--bs-spacing-300);--bs-file-upload-gap:var(--bs-spacing-300);--bs-file-upload-icon-size:102px;--bs-file-upload-icon-bg:var(--bs-surface-hover);--bs-file-upload-icon-bg-dragging:var(--bs-surface-raised);--bs-file-upload-icon-color:var(--bs-icon-default);--bs-file-upload-content-gap:var(--bs-spacing-100);--bs-file-upload-text-gap:var(--bs-spacing-25);--bs-file-upload-heading-color:var(--bs-text-default);--bs-file-upload-description-color:var(--bs-text-secondary);--bs-file-upload-font-size:var(--bs-font-size-md);--bs-file-upload-line-height:var(--bs-line-height-body-md)}.bs-file-upload{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:var(--bs-file-upload-gap);padding:var(--bs-file-upload-padding);border:var(--bs-file-upload-border-width) dashed var(--bs-file-upload-border-color);border-radius:var(--bs-file-upload-radius);background:var(--bs-file-upload-bg);font-size:var(--bs-file-upload-font-size);line-height:calc(var(--bs-file-upload-line-height) * 1px)}.bs-file-upload--horizontal{flex-direction:row;justify-content:flex-start}.bs-file-upload--vertical{flex-direction:column;text-align:center}.bs-file-upload--dragging{background:var(--bs-file-upload-bg-dragging);border-color:var(--bs-file-upload-border-color-dragging)}.bs-file-upload__icon{display:flex;flex:none;align-items:center;justify-content:center;width:var(--bs-file-upload-icon-size);height:var(--bs-file-upload-icon-size);border-radius:var(--bs-border-radius-full);background:var(--bs-file-upload-icon-bg);color:var(--bs-file-upload-icon-color)}.bs-file-upload--dragging .bs-file-upload__icon{background:var(--bs-file-upload-icon-bg-dragging)}.bs-file-upload__icon-svg,.bs-file-upload__icon ::slotted(*){display:block;width:32px;height:32px}.bs-file-upload__content{display:flex;flex-direction:column;gap:var(--bs-file-upload-content-gap);min-width:0}.bs-file-upload--horizontal .bs-file-upload__content{align-items:flex-start}.bs-file-upload--vertical .bs-file-upload__content{align-items:center}.bs-file-upload__text{display:flex;flex-direction:column;gap:var(--bs-file-upload-text-gap)}.bs-file-upload__heading{color:var(--bs-file-upload-heading-color);font-weight:600}.bs-file-upload__description{color:var(--bs-file-upload-description-color)}.bs-file-upload--disabled{cursor:not-allowed}@media (forced-colors: active){.bs-file-upload{border-color:CanvasText}.bs-file-upload--dragging{border-color:Highlight}}"}},[769,"bs-file-upload",{direction:[513],heading:[1],description:[1],buttonLabel:[1,"button-label"],accept:[1],multiple:[4],disabled:[516],dragging:[1540]}]),r=()=>o("svg",{class:"bs-file-upload__icon-svg",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},o("path",{d:"M16 18V4",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M27 18V26H5V18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),o("path",{d:"M11 9L16 4L21 9",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}));function d(){"undefined"!=typeof customElements&&["bs-file-upload","bs-button"].forEach((i=>{switch(i){case"bs-file-upload":customElements.get(e(i))||customElements.define(e(i),t);break;case"bs-button":customElements.get(e(i))||l()}}))}d();const n=t,b=d;export{n as BsFileUpload,b as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsGlobalSearch extends Components.BsGlobalSearch, HTMLElement {}
|
|
4
|
+
export const BsGlobalSearch: {
|
|
5
|
+
prototype: BsGlobalSearch;
|
|
6
|
+
new (): BsGlobalSearch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +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 +1 @@
|
|
|
1
|
-
import{t,p as s,H as i,h as r}from"./p-B2gx7SZk.js";const e=["0","25","50","75","100","150","200","250","300","350","400","500","550","600","700","800","1000","1200","1500"],n=["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&&e.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,e=n.includes(this.align)?this.align:"stretch";return r("div",{key:"
|
|
1
|
+
import{t,p as s,H as i,h as r}from"./p-B2gx7SZk.js";const e=["0","25","50","75","100","150","200","250","300","350","400","500","550","600","700","800","1000","1200","1500"],n=["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&&e.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,e=n.includes(this.align)?this.align:"stretch";return r("div",{key:"d504eaf0d6db8c106094f3efb60600b65774ea4d",class:"bs-grid",part:"container",style:{gridTemplateColumns:this.template(),rowGap:`var(--bs-grid-row-gap, ${s})`,columnGap:`var(--bs-grid-column-gap, ${i})`,alignItems:e}},r("slot",{key:"d127b6a767777b1d2cc3fe981e1846e5a8726a60"}))}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-DiORQQg3.js";const p=o,r=s;export{p as BsIconButton,r as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as
|
|
1
|
+
import{B as o,d as r}from"./p-C3erqJFy.js";const s=o,p=r;export{s as BsIconTile,p as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as i,p as e,H as n,c as a,h as t}from"./p-B2gx7SZk.js";const b=e(class extends n{constructor(i){super(),!1!==i&&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(i){return Array.from(this.el.childNodes).some((e=>e.nodeType===Node.ELEMENT_NODE?e.getAttribute("slot")===i:null===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onLabelSlotchange=i=>{this.hasLabel=i.target.assignedNodes().length>0};onClick=()=>{this.disabled||this.bsSelect.emit()};render(){return t("button",{key:"
|
|
1
|
+
import{t as i,p as e,H as n,c as a,h as t}from"./p-B2gx7SZk.js";const b=e(class extends n{constructor(i){super(),!1!==i&&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(i){return Array.from(this.el.childNodes).some((e=>e.nodeType===Node.ELEMENT_NODE?e.getAttribute("slot")===i:null===i))}onIconSlotchange=i=>{this.hasIcon=i.target.assignedNodes().length>0};onLabelSlotchange=i=>{this.hasLabel=i.target.assignedNodes().length>0};onClick=()=>{this.disabled||this.bsSelect.emit()};render(){return t("button",{key:"593a07fb914f26cb831c92319993fcd161ee7f0d",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},t("span",{key:"42a07b0dfd4cd676f25616f8693ddfa75c55e6fe",part:"icon",class:"bs-inline-tab__icon "+(this.hasIcon?"bs-inline-tab__icon--has-content":"")},t("slot",{key:"da847d9052ac9cbec891de26f4550b706107aff1",name:"icon",onSlotchange:this.onIconSlotchange})),t("span",{key:"85e3dfb8f6c266c1b225b9814194c8eed6d97edd",part:"label",class:"bs-inline-tab__label "+(this.hasLabel?"bs-inline-tab__label--has-content":"")},t("slot",{key:"f99da4b89292a8399f1d615bd01a1dec7913abdb",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{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 s(){"undefined"!=typeof customElements&&["bs-inline-tab"].forEach((e=>{"bs-inline-tab"===e&&(customElements.get(i(e))||customElements.define(i(e),b))}))}s();const l=b,o=s;export{l as BsInlineTab,o as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as o,d as s}from"./p-
|
|
1
|
+
import{B as o,d as s}from"./p-BP1l6Q3Z.js";const p=o,r=s;export{p as BsInput,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsKeyCaps extends Components.BsKeyCaps, HTMLElement {}
|
|
4
|
+
export const BsKeyCaps: {
|
|
5
|
+
prototype: BsKeyCaps;
|
|
6
|
+
new (): BsKeyCaps;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as o,d as s}from"./p-Dl0FedE5.js";const p=o,r=s;export{p as BsKeyCaps,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsKey extends Components.BsKey, HTMLElement {}
|
|
4
|
+
export const BsKey: {
|
|
5
|
+
prototype: BsKey;
|
|
6
|
+
new (): BsKey;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{B as o,d as s}from"./p-Co36mHEU.js";const m=o,p=s;export{m as BsKey,p as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsKeyboardShortcuts extends Components.BsKeyboardShortcuts, HTMLElement {}
|
|
4
|
+
export const BsKeyboardShortcuts: {
|
|
5
|
+
prototype: BsKeyboardShortcuts;
|
|
6
|
+
new (): BsKeyboardShortcuts;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B as o,d as s}from"./p-BLPNwyiT.js";const p=o,r=s;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:"3483a207be9fb42c6d6c4e2385b3d03e3351b05c",part:"list",class:"bs-list",role:this.selectable?"listbox":"list","aria-label":this.ariaLabel??void 0},l("slot",{key:"cc497c226b4fc18f04121a3aff3fe5e10891bf82",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 o(){"undefined"!=typeof customElements&&["bs-list"].forEach((s=>{"bs-list"===s&&(customElements.get(t(s))||customElements.define(t(s),n))}))}o();const a=n,r=o;export{a as BsList,r as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface BsMegaMenu extends Components.BsMegaMenu, HTMLElement {}
|
|
4
|
+
export const BsMegaMenu: {
|
|
5
|
+
prototype: BsMegaMenu;
|
|
6
|
+
new (): BsMegaMenu;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e,p as s,H as a,c as t,h as n}from"./p-B2gx7SZk.js";import{d as r}from"./p-DBvhi__l.js";import{d as i}from"./p-C1owRphU.js";import{d as o}from"./p-D4_8H0vn.js";import{d as c}from"./p-DzvXbBvk.js";import{d as m}from"./p-C3erqJFy.js";import{d as b}from"./p-Co36mHEU.js";import{d as l}from"./p-Dl0FedE5.js";import{d}from"./p-erdtytMq.js";let u=0;const p=s(class extends a{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bsMenuSelect=t(this,"bsMenuSelect"),this.bsClose=t(this,"bsClose")}get el(){return this}id="bs-mm-"+ ++u;type="columns";columns=[];featured;recent=[];label="Menu";recentLabel="Recently used:";shortcutLabel="Can’t find it? Press";shortcutKeys="Ctrl+K";shortcutKeysLabel;bsMenuSelect;bsClose;select(e,s){this.bsMenuSelect.emit(e).defaultPrevented&&s.preventDefault()}onKeyDown=e=>{"Escape"===e.key&&this.bsClose.emit()};renderItem(e){const s=s=>this.select(e,s);return n("li",null,"compact"===this.type?n("bs-compact-menu-block",{part:"block",name:e.label,onClick:s}):n("bs-menu-block",{part:"block",name:e.label,description:e.description,icon:e.icon,badge:e.badge,onClick:s}))}renderColumn(e){const s=`${this.id}-h-${e.id}`;return n("div",{part:"column",class:"bs-mega-menu__column",role:"group","aria-labelledby":s},n("div",{part:"heading",id:s,class:"bs-mega-menu__heading"},e.label),n("ul",{part:"list",role:"list",class:"bs-mega-menu__list"},e.items.map((e=>this.renderItem(e)))))}renderFeatured(){const e=this.id+"-featured";return n("div",{part:"featured",class:"bs-mega-menu__featured",role:"group","aria-labelledby":this.featured?e:void 0},n("slot",{name:"featured"},this.featured&&[n("p",{part:"featured-title",id:e,class:"bs-mega-menu__featured-title"},this.featured.title),this.featured.description&&n("p",{part:"featured-description",class:"bs-mega-menu__featured-description"},this.featured.description)]))}render(){const e=!!this.featured||!!this.el.querySelector(':scope > [slot="featured"]');return n("bs-card",{key:"005653cc6235b7aa26268e3bf97b1a985df89843",part:"panel",class:"bs-mega-menu",surface:"base",role:"navigation","aria-label":this.label,onKeyDown:this.onKeyDown},n("div",{key:"22808dd74ea84ae0511dc92e4a3d2d3045a8157c",part:"columns",class:"bs-mega-menu__columns",style:{"--bs-mega-menu-tracks":Math.max(this.columns.length+(e?1:0),1)+""}},this.columns.map((e=>this.renderColumn(e))),e&&this.renderFeatured()),n("bs-divider",{key:"105dd2102501c21303f0cd115f2a8797a8996195",decorative:!0}),n("div",{key:"0f20d9d01cb29d29735612d2708cb48af2e30bf0",part:"footer",class:"bs-mega-menu__footer"},n("span",{key:"e2d7e8bf77b15b735015342ef6a21b946cdcf2cb",class:"bs-mega-menu__footer-start"},n("slot",{key:"1d34e50c301329ea2bd381a08ffab99b9bce5394",name:"footer-start"},this.recent.length>0&&`${this.recentLabel} ${this.recent.join(", ")}`)),n("span",{key:"773eae68920c131c8dea1182a41a78e6ceef4222",class:"bs-mega-menu__footer-end"},n("slot",{key:"70e2b5dce40e19423b55c1df869d1326f5fdbfa4",name:"footer-end"},n("span",{key:"10bb8e18aaa162b06209f65f7e9136ff716466f8",class:"bs-mega-menu__shortcut"},this.shortcutLabel,n("bs-key-caps",{key:"a9991ceab494255b81fccb97e8290432bcc0cff2",part:"shortcut",keys:this.shortcutKeys,label:this.shortcutKeysLabel}))))))}static get style(){return":host{display:block;box-sizing:border-box;container-type:inline-size;width:var(--bs-mega-menu-width);max-width:100%;--bs-mega-menu-width:1100px;--bs-mega-menu-radius:var(--bs-border-radius-150);--bs-mega-menu-bg:var(--bs-surface-base);--bs-mega-menu-border-color:var(--bs-border-default);--bs-mega-menu-shadow:var(--bs-shadow-position-0) var(--bs-shadow-position-50) var(--bs-shadow-blur-100) var(--bs-elevation-high);--bs-mega-menu-padding:var(--bs-spacing-300) calc(var(--bs-spacing-300) + var(--bs-spacing-50));--bs-mega-menu-gap:var(--bs-spacing-300);--bs-mega-menu-heading-color:var(--bs-text-muted);--bs-mega-menu-text-color:var(--bs-text-default);--bs-mega-menu-muted-color:var(--bs-text-secondary)}:host([hidden]){display:none}.bs-mega-menu{display:block;--bs-card-bg:var(--bs-mega-menu-bg);--bs-card-radius:var(--bs-mega-menu-radius);--bs-card-padding:0px;--bs-card-border-width:1px;--bs-card-border-color:var(--bs-mega-menu-border-color);--bs-card-shadow:var(--bs-mega-menu-shadow);font-family:var(--bs-typography-font-family-body, Roboto), sans-serif}.bs-mega-menu__columns{display:grid;grid-template-columns:repeat(var(--bs-mega-menu-tracks), minmax(0, 1fr));gap:var(--bs-mega-menu-gap);padding:var(--bs-mega-menu-padding);padding-bottom:var(--bs-spacing-100)}.bs-mega-menu__heading{margin:0 0 var(--bs-spacing-50);color:var(--bs-mega-menu-heading-color);font-size:var(--bs-fontsize-caption-sm);font-weight:var(--bs-font-weight-semibold);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-mega-menu__list{display:block;margin:0;padding:0;list-style:none}.bs-mega-menu__featured{padding-top:var(--bs-spacing-300)}.bs-mega-menu__featured-title,.bs-mega-menu__featured-description{margin:0}.bs-mega-menu__featured-title{color:var(--bs-mega-menu-text-color);font-size:var(--bs-fontsize-caption-sm);font-weight:var(--bs-font-weight-bold);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-mega-menu__featured-description{margin-top:var(--bs-spacing-100);color:var(--bs-mega-menu-muted-color);font-size:var(--bs-fontsize-caption-sm);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-mega-menu__footer{display:flex;align-items:center;justify-content:space-between;gap:var(--bs-spacing-200);padding:var(--bs-spacing-150) var(--bs-spacing-200);color:var(--bs-mega-menu-muted-color);font-size:var(--bs-fontsize-caption-sm);line-height:calc(var(--bs-line-height-caption-sm) * 1px)}.bs-mega-menu__footer-end{display:inline-flex;align-items:center;gap:var(--bs-spacing-100)}.bs-mega-menu__shortcut{display:inline-flex;align-items:center;gap:var(--bs-spacing-100)}@container (max-width: 599px){.bs-mega-menu__columns{grid-template-columns:minmax(0, 1fr);padding:var(--bs-spacing-200);padding-bottom:var(--bs-spacing-100)}bs-menu-block{--bs-menu-block-white-space:normal;min-height:var(--bs-scale-550)}bs-compact-menu-block{--bs-compact-menu-block-padding:var(--bs-spacing-150) var(--bs-spacing-100);min-height:var(--bs-scale-550)}.bs-mega-menu__featured{padding-top:var(--bs-spacing-100)}.bs-mega-menu__footer{flex-direction:column;align-items:flex-start;gap:var(--bs-spacing-100)}.bs-mega-menu__shortcut{display:none}}"}},[769,"bs-mega-menu",{type:[513],columns:[16],featured:[16],recent:[16],label:[1],recentLabel:[1,"recent-label"],shortcutLabel:[1,"shortcut-label"],shortcutKeys:[1,"shortcut-keys"],shortcutKeysLabel:[1,"shortcut-keys-label"]}]);function g(){"undefined"!=typeof customElements&&["bs-mega-menu","bs-card","bs-chip-informative","bs-compact-menu-block","bs-divider","bs-icon-tile","bs-key","bs-key-caps","bs-menu-block"].forEach((s=>{switch(s){case"bs-mega-menu":customElements.get(e(s))||customElements.define(e(s),p);break;case"bs-card":customElements.get(e(s))||r();break;case"bs-chip-informative":customElements.get(e(s))||i();break;case"bs-compact-menu-block":customElements.get(e(s))||o();break;case"bs-divider":customElements.get(e(s))||c();break;case"bs-icon-tile":customElements.get(e(s))||m();break;case"bs-key":customElements.get(e(s))||b();break;case"bs-key-caps":customElements.get(e(s))||l();break;case"bs-menu-block":customElements.get(e(s))||d()}}))}g();const h=p,f=g;export{h as BsMegaMenu,f as defineCustomElement}
|