@brandsync/wc 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/REFERENCE.md +231 -0
- package/custom-elements.json +3902 -1547
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-0228a584.entry.js → p-044ac86c.entry.js} +1 -1
- package/dist/brandsync-wc/p-065c7e7c.entry.js +1 -0
- package/dist/brandsync-wc/{p-e9afb553.entry.js → p-07673a48.entry.js} +1 -1
- package/dist/brandsync-wc/{p-54f9529f.entry.js → p-08e96f13.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f3cc961b.entry.js → p-0bbaef51.entry.js} +1 -1
- package/dist/brandsync-wc/p-11d80e17.entry.js +1 -0
- package/dist/brandsync-wc/{p-c85fe37b.entry.js → p-1bd99669.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f4d1d56e.entry.js → p-225148be.entry.js} +1 -1
- package/dist/brandsync-wc/{p-15f4c343.entry.js → p-2bd30709.entry.js} +1 -1
- package/dist/brandsync-wc/{p-76748795.entry.js → p-32297416.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d165a742.entry.js → p-35f76ea7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ca40386.entry.js → p-3bad5e1b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ed71eb02.entry.js → p-3bdeeb9d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-67629178.entry.js → p-3c6ec5d0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-abfa43f5.entry.js → p-3cb79512.entry.js} +1 -1
- package/dist/brandsync-wc/p-3d2c62a6.entry.js +1 -0
- package/dist/brandsync-wc/{p-23379d7c.entry.js → p-3d7b0708.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2e285364.entry.js → p-43d5f708.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d81c4f58.entry.js → p-4b460eda.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b6081bba.entry.js → p-4eaa9ed4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c25553bc.entry.js → p-4f4c0c68.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a56bc608.entry.js → p-5057e4fe.entry.js} +1 -1
- package/dist/brandsync-wc/p-54d91ac9.entry.js +1 -0
- package/dist/brandsync-wc/{p-65fa1b21.entry.js → p-57ff14ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-538d5b58.entry.js → p-5b933ff4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b67a0c8f.entry.js → p-5c61eb06.entry.js} +1 -1
- package/dist/brandsync-wc/{p-86774165.entry.js → p-5eb5795f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b663ee67.entry.js → p-61deb48c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cc4c8c1d.entry.js → p-67f125e8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3488c4fc.entry.js → p-6ea02b98.entry.js} +1 -1
- package/dist/brandsync-wc/p-70c650b2.entry.js +1 -0
- package/dist/brandsync-wc/{p-949a4270.entry.js → p-79fc849c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5a45ef51.entry.js → p-7ed071fb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-298158da.entry.js → p-8134f97c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ed00786.entry.js → p-844205d9.entry.js} +1 -1
- package/dist/brandsync-wc/p-84d6d6eb.entry.js +1 -0
- package/dist/brandsync-wc/{p-401b3d3d.entry.js → p-857987f9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b9c9bcba.entry.js → p-8c4dfccb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-38ac9aad.entry.js → p-90ba3032.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1ca8b01e.entry.js → p-9396c67e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e9b6b30f.entry.js → p-9d740928.entry.js} +1 -1
- package/dist/brandsync-wc/{p-baa3d37a.entry.js → p-a7fa839a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f271e1d2.entry.js → p-a7fb0b59.entry.js} +1 -1
- package/dist/brandsync-wc/{p-89ea6366.entry.js → p-ab14a07d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-912629c6.entry.js → p-aec2dfeb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8390a155.entry.js → p-b02bf1ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9beeb30c.entry.js → p-b142d8c9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a12691d8.entry.js → p-b4511ad3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5ed1f45e.entry.js → p-b5710db6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-34b0c048.entry.js → p-baa39c08.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0159f0da.entry.js → p-be7aac52.entry.js} +1 -1
- package/dist/brandsync-wc/p-c835afb7.entry.js +1 -0
- package/dist/brandsync-wc/{p-45986ad4.entry.js → p-d25adab2.entry.js} +1 -1
- package/dist/brandsync-wc/p-d2a15599.entry.js +1 -0
- package/dist/brandsync-wc/{p-521d0fc2.entry.js → p-d7956c51.entry.js} +1 -1
- package/dist/brandsync-wc/p-d9184940.entry.js +1 -0
- package/dist/brandsync-wc/{p-0f97fe35.entry.js → p-dcbeb143.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cf287ff1.entry.js → p-debc83cc.entry.js} +1 -1
- package/dist/brandsync-wc/{p-dcacee29.entry.js → p-e0a9f2d1.entry.js} +1 -1
- package/dist/brandsync-wc/p-e123b391.entry.js +1 -0
- package/dist/brandsync-wc/{p-7dc59e0b.entry.js → p-e8ae626d.entry.js} +1 -1
- package/dist/brandsync-wc/p-e8e22238.entry.js +1 -0
- package/dist/brandsync-wc/{p-6cb21302.entry.js → p-eb0dc5bf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-38fe9d07.entry.js → p-f43a7f16.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7b3518b8.entry.js → p-f82a9f0d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f0be9125.entry.js → p-f98dfa85.entry.js} +1 -1
- package/dist/brandsync-wc/{p-36fe783a.entry.js → p-fdc168ec.entry.js} +1 -1
- package/dist/brandsync-wc/{p-42b79d95.entry.js → p-ffccc1ee.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-app-shell.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
- package/dist/cjs/bs-command-palette.cjs.entry.js +374 -0
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-container.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/bs-divider.cjs.entry.js +1 -1
- package/dist/cjs/bs-empty-state.cjs.entry.js +47 -0
- package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-global-search.cjs.entry.js +326 -0
- package/dist/cjs/bs-grid.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-tile.cjs.entry.js +2 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
- package/dist/cjs/bs-key-caps.cjs.entry.js +39 -0
- package/dist/cjs/bs-key.cjs.entry.js +28 -0
- package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +112 -0
- package/dist/cjs/bs-list-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-message.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-popover.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-qr-code.cjs.entry.js +1 -1
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-search-item.cjs.entry.js +47 -0
- package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
- package/dist/cjs/bs-shortcut-row.cjs.entry.js +27 -0
- package/dist/cjs/bs-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-slider.cjs.entry.js +1 -1
- package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bs-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/bs-stack.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bs-switch.cjs.entry.js +1 -1
- package/dist/cjs/bs-tab_3.cjs.entry.js +3 -3
- package/dist/cjs/bs-timepicker.cjs.entry.js +2 -2
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/bs-tree-item.cjs.entry.js +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 +9 -1
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-app-shell/bs-app-shell.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
- package/dist/collection/components/bs-command-palette/bs-command-palette.cmp.test.js +207 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.css +214 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.js +1114 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.stories.js +194 -0
- package/dist/collection/components/bs-composer/bs-composer.js +1 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
- package/dist/collection/components/bs-container/bs-container.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +1 -1
- package/dist/collection/components/bs-divider/bs-divider.js +1 -1
- package/dist/collection/components/bs-empty-state/bs-empty-state.cmp.test.js +102 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.css +45 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.js +175 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.stories.js +52 -0
- package/dist/collection/components/bs-error-page/bs-error-page.js +1 -1
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-global-search/bs-global-search.cmp.test.js +491 -0
- package/dist/collection/components/bs-global-search/bs-global-search.css +115 -0
- package/dist/collection/components/bs-global-search/bs-global-search.js +1024 -0
- package/dist/collection/components/bs-global-search/bs-global-search.stories.js +146 -0
- package/dist/collection/components/bs-grid/bs-grid.js +2 -2
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +2 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-key/bs-key.cmp.test.js +59 -0
- package/dist/collection/components/bs-key/bs-key.css +58 -0
- package/dist/collection/components/bs-key/bs-key.js +84 -0
- package/dist/collection/components/bs-key/bs-key.stories.js +19 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.cmp.test.js +60 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.css +28 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.js +120 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.stories.js +29 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.js +194 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.css +138 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +485 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.js +111 -0
- package/dist/collection/components/bs-list/bs-list.js +1 -1
- package/dist/collection/components/bs-list-item/bs-list-item.js +1 -1
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-message/bs-message.js +1 -1
- package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-popover/bs-popover.js +1 -1
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-search-item/bs-search-item.cmp.test.js +147 -0
- package/dist/collection/components/bs-search-item/bs-search-item.css +112 -0
- package/dist/collection/components/bs-search-item/bs-search-item.js +222 -0
- package/dist/collection/components/bs-search-item/bs-search-item.stories.js +31 -0
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.cmp.test.js +60 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.css +42 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +154 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.stories.js +24 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-spinner/bs-spinner.js +1 -1
- package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
- package/dist/collection/components/bs-stack/bs-stack.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
- package/dist/collection/components/bs-toast/bs-toast.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
- package/dist/collection/components/bs-tree/bs-tree.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.js +1 -1
- package/dist/components/bs-accordion-group.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-app-shell.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-carousel.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-citation-preview.js +1 -1
- package/dist/components/bs-command-palette.d.ts +11 -0
- package/dist/components/bs-command-palette.js +1 -0
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-container.js +1 -1
- package/dist/components/bs-cookie-consent.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.js +1 -1
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-divider.js +1 -1
- package/dist/components/bs-empty-state.d.ts +11 -0
- package/dist/components/bs-empty-state.js +1 -0
- package/dist/components/bs-error-page.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-global-search.d.ts +11 -0
- package/dist/components/bs-global-search.js +1 -0
- package/dist/components/bs-grid.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-icon-tile.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-key-caps.d.ts +11 -0
- package/dist/components/bs-key-caps.js +1 -0
- package/dist/components/bs-key.d.ts +11 -0
- package/dist/components/bs-key.js +1 -0
- package/dist/components/bs-keyboard-shortcuts.d.ts +11 -0
- package/dist/components/bs-keyboard-shortcuts.js +1 -0
- package/dist/components/bs-list-item.js +1 -1
- package/dist/components/bs-list.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-message-list.js +1 -1
- package/dist/components/bs-message.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-onboarding-checklist.js +1 -1
- package/dist/components/bs-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-GTDI4Ibw.js → p-B32Kl4IB.js} +1 -1
- package/dist/components/{p-B128GX8H.js → p-BDnZvjlq.js} +1 -1
- package/dist/components/{p-BdkE4auv.js → p-BUpnOUIM.js} +1 -1
- package/dist/components/p-BcYNrEOB.js +1 -0
- package/dist/components/{p-B80vOwH6.js → p-BcbaiZLh.js} +1 -1
- package/dist/components/p-Bp3DIxjT.js +1 -0
- package/dist/components/p-CH5atin4.js +1 -0
- package/dist/components/{p-kDJsWjTN.js → p-CRM1wIX9.js} +1 -1
- package/dist/components/p-CYzBTzzf.js +1 -0
- package/dist/components/p-CervX0wH.js +1 -0
- package/dist/components/{p-C93ymWm7.js → p-Cpe2k7ZC.js} +1 -1
- package/dist/components/{p-Bb1-2M8K.js → p-D7AXo5NT.js} +1 -1
- package/dist/components/{p-J9cxcDhY.js → p-D8bvv9QQ.js} +1 -1
- package/dist/components/{p-DFKc3lLA.js → p-DG9eT5yi.js} +1 -1
- package/dist/components/{p-D0KM1R2i.js → p-DMLfXpva.js} +1 -1
- package/dist/components/{p-CQjSDdH7.js → p-DYDk73TF.js} +1 -1
- package/dist/components/{p-C7RZ6qZC.js → p-DcjgRtSQ.js} +1 -1
- package/dist/components/p-Dt4JNhHT.js +1 -0
- package/dist/components/{p-CK7fiES5.js → p-DtYTs9Kh.js} +1 -1
- package/dist/components/{p-BsbtyRJV.js → p-TAY9S9yG.js} +1 -1
- package/dist/components/{p-ByLUtXxO.js → p-w-DkdA4O.js} +1 -1
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-accordion-group.entry.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-app-shell.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-citation-preview.entry.js +1 -1
- package/dist/esm/bs-command-palette.entry.js +372 -0
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-container.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-datepicker.entry.js +1 -1
- package/dist/esm/bs-divider.entry.js +1 -1
- package/dist/esm/bs-empty-state.entry.js +45 -0
- package/dist/esm/bs-error-page.entry.js +1 -1
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-global-search.entry.js +324 -0
- package/dist/esm/bs-grid.entry.js +2 -2
- package/dist/esm/bs-icon-button.entry.js +1 -1
- package/dist/esm/bs-icon-tile.entry.js +2 -2
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/bs-input_3.entry.js +4 -4
- package/dist/esm/bs-key-caps.entry.js +37 -0
- package/dist/esm/bs-key.entry.js +26 -0
- package/dist/esm/bs-keyboard-shortcuts.entry.js +110 -0
- package/dist/esm/bs-list-item.entry.js +1 -1
- package/dist/esm/bs-list.entry.js +1 -1
- package/dist/esm/bs-message-list.entry.js +1 -1
- package/dist/esm/bs-message.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +2 -2
- package/dist/esm/bs-navigation-header.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-popover.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +2 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-qr-code.entry.js +1 -1
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-search-item.entry.js +45 -0
- package/dist/esm/bs-session-timeout.entry.js +1 -1
- package/dist/esm/bs-shortcut-row.entry.js +25 -0
- package/dist/esm/bs-skeleton.entry.js +1 -1
- package/dist/esm/bs-slider.entry.js +1 -1
- package/dist/esm/bs-snackbar.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-spinner.entry.js +1 -1
- package/dist/esm/bs-split-pane.entry.js +1 -1
- package/dist/esm/bs-stack.entry.js +1 -1
- package/dist/esm/bs-stepper-step.entry.js +1 -1
- package/dist/esm/bs-stepper.entry.js +1 -1
- package/dist/esm/bs-switch.entry.js +1 -1
- package/dist/esm/bs-tab_3.entry.js +3 -3
- package/dist/esm/bs-timepicker.entry.js +2 -2
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/bs-tree-item.entry.js +2 -2
- package/dist/esm/bs-tree.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-command-palette/bs-command-palette.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.d.ts +172 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.stories.d.ts +56 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.d.ts +50 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.stories.d.ts +13 -0
- package/dist/types/components/bs-global-search/bs-global-search.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-global-search/bs-global-search.d.ts +166 -0
- package/dist/types/components/bs-global-search/bs-global-search.stories.d.ts +61 -0
- package/dist/types/components/bs-key/bs-key.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key/bs-key.d.ts +36 -0
- package/dist/types/components/bs-key/bs-key.stories.d.ts +11 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.d.ts +31 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.stories.d.ts +15 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.d.ts +95 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.d.ts +43 -0
- package/dist/types/components/bs-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.d.ts +1902 -76
- package/package.json +1 -1
- package/reference.d.ts +24 -0
- package/reference.json +855 -76
- package/dist/brandsync-wc/p-769c5b4a.entry.js +0 -1
- package/dist/brandsync-wc/p-e5f50e93.entry.js +0 -1
- package/dist/brandsync-wc/p-e72dd05e.entry.js +0 -1
- package/dist/components/p-BaJEv6rL.js +0 -1
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BYfMRtlW.js');
|
|
4
|
+
|
|
5
|
+
const bsCommandPaletteCss = () => `:host{display:contents;--bs-command-palette-width:640px;--bs-command-palette-top:12vh;--bs-command-palette-max-height:60vh;--bs-command-palette-radius:var(--bs-border-radius-150);--bs-command-palette-bg:var(--bs-surface-base);--bs-command-palette-shadow:0 var(--bs-shadow-position-100) var(--bs-shadow-blur-200) 0 var(--bs-elevation-higher);--bs-command-palette-overlay:var(--bs-surface-overlay);--bs-command-palette-footer-bg:var(--bs-surface-container);--bs-command-palette-divider-color:var(--bs-border-default);--bs-command-palette-header-border-color:var(--bs-border-neutral-container);--bs-command-palette-header-color:var(--bs-text-muted);--bs-command-palette-hint-color:var(--bs-text-secondary);--bs-command-palette-z-index:var(--bs-z-index-modal)}.bs-command-palette{box-sizing:border-box;width:min(var(--bs-command-palette-width), calc(100vw - 2 * var(--bs-spacing-200)));max-width:none;max-height:none;margin:var(--bs-command-palette-top) auto auto;padding:0;border:0;background:transparent;color:var(--bs-text-default);overflow:visible;z-index:var(--bs-command-palette-z-index)}.bs-command-palette::backdrop{background:var(--bs-command-palette-overlay, var(--bs-surface-overlay))}.bs-command-palette__panel{display:flex;flex-direction:column;box-sizing:border-box;overflow:clip;border-radius:var(--bs-command-palette-radius);background:var(--bs-command-palette-bg);box-shadow:var(--bs-command-palette-shadow)}@media (prefers-reduced-motion: no-preference){.bs-command-palette[open] .bs-command-palette__panel{animation:bs-command-palette-in 120ms ease-out}}@keyframes bs-command-palette-in{from{opacity:0;transform:scale(0.98)}}.bs-command-palette__search{position:relative;display:flex;align-items:center;gap:var(--bs-spacing-100);padding:var(--bs-spacing-150)}.bs-command-palette__field{flex:1 1 auto;min-width:0}.bs-command-palette__field bs-input{width:100%}.bs-command-palette__scope{flex:none}.bs-command-palette__esc{position:absolute;top:50%;right:calc(var(--bs-spacing-150) + 9px);transform:translateY(-50%);display:inline-flex;pointer-events:none}.bs-command-palette__divider{height:1px;background:var(--bs-command-palette-divider-color)}.bs-command-palette__results{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--bs-spacing-100);padding:var(--bs-spacing-100);max-height:var(--bs-command-palette-max-height);overflow-y:auto}.bs-command-palette__list{display:flex;flex-direction:column;gap:var(--bs-spacing-100)}.bs-command-palette__section{display:flex;flex-direction:column}.bs-command-palette__section-header{padding:var(--bs-spacing-150) var(--bs-spacing-150) var(--bs-spacing-100);border-bottom:1px solid var(--bs-command-palette-header-border-color);color:var(--bs-command-palette-header-color);font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-medium);line-height:20px}.bs-command-palette__loading{display:flex;align-items:center;justify-content:center;gap:var(--bs-spacing-100);padding:var(--bs-spacing-300) var(--bs-spacing-200);color:var(--bs-text-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-command-palette__empty{display:flex;flex-direction:column;align-items:center;gap:var(--bs-spacing-100);padding:var(--bs-spacing-300) var(--bs-spacing-200);text-align:center}.bs-command-palette__empty-icon{width:32px;height:32px;color:var(--bs-icon-default)}.bs-command-palette__empty-heading{color:var(--bs-text-default);font-size:var(--bs-font-size-md);font-weight:var(--bs-font-weight-semibold);line-height:24px}.bs-command-palette__empty-description{color:var(--bs-text-secondary);font-size:var(--bs-font-size-sm);line-height:20px}.bs-command-palette__link{margin:0;padding:0;border:0;border-bottom:1px solid var(--bs-border-info);background:none;color:var(--bs-text-link);font:inherit;line-height:20px;cursor:pointer}.bs-command-palette__link:focus-visible{outline:2px solid var(--bs-border-info);outline-offset:2px}.bs-command-palette__footer{display:flex;align-items:center;gap:var(--bs-spacing-200);padding:10px var(--bs-spacing-200);background:var(--bs-command-palette-footer-bg)}.bs-command-palette__hint{display:inline-flex;align-items:center;gap:var(--bs-spacing-50);color:var(--bs-command-palette-hint-color);font-size:var(--bs-font-size-sm);line-height:20px;white-space:nowrap}.bs-command-palette__spacer{flex:1 1 0}.bs-command-palette__live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}`;
|
|
6
|
+
|
|
7
|
+
/** The result sections, in display (and keyboard) order. */
|
|
8
|
+
const RESULT_SECTIONS = ['recent', 'suggested', 'commands', 'navigation', 'records'];
|
|
9
|
+
const ALL_SECTIONS = [...RESULT_SECTIONS, 'try-instead'];
|
|
10
|
+
let uid = 0;
|
|
11
|
+
const svgProps = {
|
|
12
|
+
viewBox: '0 0 24 24',
|
|
13
|
+
fill: 'none',
|
|
14
|
+
stroke: 'currentColor',
|
|
15
|
+
'stroke-width': '1.8',
|
|
16
|
+
'stroke-linecap': 'round',
|
|
17
|
+
'stroke-linejoin': 'round',
|
|
18
|
+
'aria-hidden': 'true',
|
|
19
|
+
};
|
|
20
|
+
const BsCommandPalette = class {
|
|
21
|
+
constructor(hostRef) {
|
|
22
|
+
index.registerInstance(this, hostRef);
|
|
23
|
+
this.bsInput = index.createEvent(this, "bsInput");
|
|
24
|
+
this.bsSelect = index.createEvent(this, "bsSelect");
|
|
25
|
+
this.bsSuggestion = index.createEvent(this, "bsSuggestion");
|
|
26
|
+
this.bsOpenChange = index.createEvent(this, "bsOpenChange");
|
|
27
|
+
this.bsScopeExit = index.createEvent(this, "bsScopeExit");
|
|
28
|
+
}
|
|
29
|
+
get el() { return index.getElement(this); }
|
|
30
|
+
id = `bs-cp-${++uid}`;
|
|
31
|
+
itemSeq = 0;
|
|
32
|
+
observer;
|
|
33
|
+
dialogEl;
|
|
34
|
+
comboEl;
|
|
35
|
+
inputEl;
|
|
36
|
+
previousFocus;
|
|
37
|
+
userMoved = false;
|
|
38
|
+
/** The field value. Two-way. A leading `>` means commands-only mode. */
|
|
39
|
+
value = '';
|
|
40
|
+
/** Whether the palette is open. */
|
|
41
|
+
open = false;
|
|
42
|
+
/** Derived from `value` (it starts with `>`). Read-only; set `value` instead. */
|
|
43
|
+
commandsOnly = false;
|
|
44
|
+
/** Which view to show. You choose it; nothing is inferred from `value`. `default` and `results` render the same; they differ for screen readers only. */
|
|
45
|
+
status = 'default';
|
|
46
|
+
/** Accessible name of the dialog. */
|
|
47
|
+
label = 'Command palette';
|
|
48
|
+
/** Placeholder of the field. */
|
|
49
|
+
placeholder = 'Type a command or search…';
|
|
50
|
+
/** Keep the palette open after an item is chosen. */
|
|
51
|
+
keepOpenOnSelect = false;
|
|
52
|
+
/** Shows the footer of keyboard hints. */
|
|
53
|
+
showFooter = true;
|
|
54
|
+
/** Global shortcut that toggles the palette, e.g. `mod+k` (`mod` is Cmd on Mac, Ctrl elsewhere). Empty = off. */
|
|
55
|
+
hotkey = '';
|
|
56
|
+
/** Nested scope: shows this text as a chip before the field. Backspace on an empty field emits `bsScopeExit`. */
|
|
57
|
+
scopeLabel;
|
|
58
|
+
/** Section headers. */
|
|
59
|
+
recentLabel = 'Recent';
|
|
60
|
+
suggestedLabel = 'Suggested';
|
|
61
|
+
commandsLabel = 'Commands';
|
|
62
|
+
navigationLabel = 'Navigation';
|
|
63
|
+
recordsLabel = 'Records';
|
|
64
|
+
tryInsteadLabel = 'Try instead';
|
|
65
|
+
/** Footer hint texts. */
|
|
66
|
+
navigateLabel = 'Navigate';
|
|
67
|
+
openLabel = 'Open';
|
|
68
|
+
closeLabel = 'Close';
|
|
69
|
+
commandsOnlyLabel = 'Commands only';
|
|
70
|
+
allResultsLabel = 'All results';
|
|
71
|
+
/** No-results view copy. Include the query in `emptyHeading` yourself. */
|
|
72
|
+
emptyHeading = 'No commands or records';
|
|
73
|
+
emptyDescription = 'Check the spelling, or search records instead.';
|
|
74
|
+
/** A suggested correction; the "Did you mean" line shows while it is set. */
|
|
75
|
+
didYouMean;
|
|
76
|
+
didYouMeanLabel = 'Did you mean';
|
|
77
|
+
/** Text of the loading row. */
|
|
78
|
+
loadingLabel = 'Loading…';
|
|
79
|
+
/** Accessible name of the results listbox. */
|
|
80
|
+
listLabel = 'Results';
|
|
81
|
+
filled = { recent: false, suggested: false, commands: false, navigation: false, records: false, 'try-instead': false };
|
|
82
|
+
activeId = null;
|
|
83
|
+
/** Fires on every keystroke with `{ value, query, commandsOnly }`. */
|
|
84
|
+
bsInput;
|
|
85
|
+
/** Fires when an item is chosen (click or Enter) with `{ value, section, commandsOnly }`. */
|
|
86
|
+
bsSelect;
|
|
87
|
+
/** Fires when the "Did you mean" suggestion is pressed, with its text. */
|
|
88
|
+
bsSuggestion;
|
|
89
|
+
/** Fires when the palette opens or closes through user interaction (hotkey, Esc, scrim, selection). */
|
|
90
|
+
bsOpenChange;
|
|
91
|
+
/** Fires on Backspace in an empty field while `scopeLabel` is set. */
|
|
92
|
+
bsScopeExit;
|
|
93
|
+
/** Opens the palette. */
|
|
94
|
+
async show() {
|
|
95
|
+
this.open = true;
|
|
96
|
+
}
|
|
97
|
+
/** Closes the palette and restores focus. */
|
|
98
|
+
async close() {
|
|
99
|
+
this.open = false;
|
|
100
|
+
}
|
|
101
|
+
onValueChange() {
|
|
102
|
+
this.commandsOnly = this.value.startsWith('>');
|
|
103
|
+
}
|
|
104
|
+
resetMoved() {
|
|
105
|
+
this.userMoved = false;
|
|
106
|
+
}
|
|
107
|
+
componentWillLoad() {
|
|
108
|
+
this.commandsOnly = this.value.startsWith('>');
|
|
109
|
+
this.readFilled();
|
|
110
|
+
this.prepareItems();
|
|
111
|
+
}
|
|
112
|
+
connectedCallback() {
|
|
113
|
+
document.addEventListener('keydown', this.onDocKeyDown);
|
|
114
|
+
this.observer = new MutationObserver(() => {
|
|
115
|
+
this.readFilled();
|
|
116
|
+
this.prepareItems();
|
|
117
|
+
this.syncActive();
|
|
118
|
+
});
|
|
119
|
+
this.observer.observe(this.el, { childList: true });
|
|
120
|
+
}
|
|
121
|
+
disconnectedCallback() {
|
|
122
|
+
document.removeEventListener('keydown', this.onDocKeyDown);
|
|
123
|
+
this.observer?.disconnect();
|
|
124
|
+
if (this.dialogEl?.open)
|
|
125
|
+
this.dialogEl.close();
|
|
126
|
+
}
|
|
127
|
+
componentDidRender() {
|
|
128
|
+
this.syncDialog();
|
|
129
|
+
this.prepareItems();
|
|
130
|
+
this.syncActive();
|
|
131
|
+
}
|
|
132
|
+
syncDialog() {
|
|
133
|
+
const d = this.dialogEl;
|
|
134
|
+
if (!d)
|
|
135
|
+
return;
|
|
136
|
+
if (this.open && !d.open) {
|
|
137
|
+
this.previousFocus = document.activeElement;
|
|
138
|
+
d.showModal();
|
|
139
|
+
this.focusInput();
|
|
140
|
+
}
|
|
141
|
+
else if (!this.open && d.open) {
|
|
142
|
+
d.close();
|
|
143
|
+
const prev = this.previousFocus;
|
|
144
|
+
this.previousFocus = null;
|
|
145
|
+
if (prev && prev.isConnected)
|
|
146
|
+
prev.focus?.();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
focusInput() {
|
|
150
|
+
this.inputEl?.focus();
|
|
151
|
+
const native = this.inputEl?.shadowRoot?.querySelector('input');
|
|
152
|
+
native?.select?.();
|
|
153
|
+
}
|
|
154
|
+
onDocKeyDown = (ev) => {
|
|
155
|
+
if (!this.hotkey || ev.defaultPrevented)
|
|
156
|
+
return;
|
|
157
|
+
const parts = this.hotkey.toLowerCase().split('+').map(p => p.trim());
|
|
158
|
+
const key = parts[parts.length - 1];
|
|
159
|
+
const mods = parts.slice(0, -1);
|
|
160
|
+
const isMac = /mac|iphone|ipad/i.test(navigator.platform || navigator.userAgent);
|
|
161
|
+
const want = (m) => mods.includes(m);
|
|
162
|
+
const wantMeta = want('meta') || want('cmd') || (want('mod') && isMac);
|
|
163
|
+
const wantCtrl = want('ctrl') || (want('mod') && !isMac);
|
|
164
|
+
if (ev.key.toLowerCase() !== key)
|
|
165
|
+
return;
|
|
166
|
+
if (ev.metaKey !== wantMeta || ev.ctrlKey !== wantCtrl || ev.altKey !== want('alt') || ev.shiftKey !== want('shift'))
|
|
167
|
+
return;
|
|
168
|
+
ev.preventDefault();
|
|
169
|
+
this.setOpen(!this.open);
|
|
170
|
+
};
|
|
171
|
+
setOpen(next) {
|
|
172
|
+
if (this.open === next)
|
|
173
|
+
return;
|
|
174
|
+
this.open = next;
|
|
175
|
+
this.bsOpenChange.emit(next);
|
|
176
|
+
}
|
|
177
|
+
allItems() {
|
|
178
|
+
return Array.from(this.el.children).filter(c => c.tagName === 'BS-SEARCH-ITEM' && ALL_SECTIONS.includes(c.getAttribute('slot')));
|
|
179
|
+
}
|
|
180
|
+
shownSections() {
|
|
181
|
+
if (this.status === 'loading')
|
|
182
|
+
return [];
|
|
183
|
+
if (this.status === 'empty')
|
|
184
|
+
return ['try-instead'];
|
|
185
|
+
return RESULT_SECTIONS;
|
|
186
|
+
}
|
|
187
|
+
visibleItems() {
|
|
188
|
+
if (!this.open)
|
|
189
|
+
return [];
|
|
190
|
+
const items = this.allItems();
|
|
191
|
+
return this.shownSections().flatMap(s => items.filter(i => i.getAttribute('slot') === s));
|
|
192
|
+
}
|
|
193
|
+
enabledItems() {
|
|
194
|
+
return this.visibleItems().filter(i => !i.disabled);
|
|
195
|
+
}
|
|
196
|
+
readFilled() {
|
|
197
|
+
const next = { ...this.filled };
|
|
198
|
+
let changed = false;
|
|
199
|
+
for (const s of ALL_SECTIONS) {
|
|
200
|
+
const has = Array.from(this.el.children).some(c => c.getAttribute('slot') === s);
|
|
201
|
+
if (next[s] !== has) {
|
|
202
|
+
next[s] = has;
|
|
203
|
+
changed = true;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (changed)
|
|
207
|
+
this.filled = next;
|
|
208
|
+
}
|
|
209
|
+
prepareItems() {
|
|
210
|
+
for (const item of this.allItems()) {
|
|
211
|
+
if (item.selectionRole !== 'option')
|
|
212
|
+
item.selectionRole = 'option';
|
|
213
|
+
if (!item.id)
|
|
214
|
+
item.id = `${this.id}-opt-${++this.itemSeq}`;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/** First enabled item is active unless the user moved the highlight (and it still exists). */
|
|
218
|
+
syncActive() {
|
|
219
|
+
const enabled = this.enabledItems();
|
|
220
|
+
let id = this.activeId;
|
|
221
|
+
if (!this.open || !enabled.length)
|
|
222
|
+
id = null;
|
|
223
|
+
else if (!this.userMoved || !enabled.some(i => i.id === id))
|
|
224
|
+
id = enabled[0].id;
|
|
225
|
+
if (id !== this.activeId)
|
|
226
|
+
this.activeId = id;
|
|
227
|
+
let activeItem;
|
|
228
|
+
for (const item of this.allItems()) {
|
|
229
|
+
const on = !!id && item.id === id;
|
|
230
|
+
if (on)
|
|
231
|
+
activeItem = item;
|
|
232
|
+
if (item.active !== on)
|
|
233
|
+
item.active = on;
|
|
234
|
+
}
|
|
235
|
+
// The items live in the light DOM, so an id reference cannot reach them from this shadow root; the
|
|
236
|
+
// element-reference property can (the light DOM is an ancestor scope).
|
|
237
|
+
if (this.comboEl)
|
|
238
|
+
this.comboEl.ariaActiveDescendantElement = activeItem ?? null;
|
|
239
|
+
}
|
|
240
|
+
setActive(item) {
|
|
241
|
+
this.userMoved = true;
|
|
242
|
+
this.activeId = item.id;
|
|
243
|
+
for (const i of this.allItems())
|
|
244
|
+
i.active = i.id === item.id;
|
|
245
|
+
if (this.comboEl)
|
|
246
|
+
this.comboEl.ariaActiveDescendantElement = item;
|
|
247
|
+
item.scrollIntoView?.({ block: 'nearest' });
|
|
248
|
+
}
|
|
249
|
+
onInput = (ev) => {
|
|
250
|
+
ev.stopPropagation();
|
|
251
|
+
this.value = ev.detail;
|
|
252
|
+
this.userMoved = false;
|
|
253
|
+
const commandsOnly = this.value.startsWith('>');
|
|
254
|
+
this.bsInput.emit({ value: this.value, query: (commandsOnly ? this.value.slice(1) : this.value).trim(), commandsOnly });
|
|
255
|
+
};
|
|
256
|
+
onKeyDown = (ev) => {
|
|
257
|
+
switch (ev.key) {
|
|
258
|
+
case 'ArrowDown':
|
|
259
|
+
case 'ArrowUp': {
|
|
260
|
+
ev.preventDefault();
|
|
261
|
+
const items = this.enabledItems();
|
|
262
|
+
if (!items.length)
|
|
263
|
+
return;
|
|
264
|
+
const idx = items.findIndex(i => i.id === this.activeId);
|
|
265
|
+
const next = ev.key === 'ArrowDown' ? (idx + 1) % items.length : idx <= 0 ? items.length - 1 : idx - 1;
|
|
266
|
+
this.setActive(items[next]);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
case 'Enter': {
|
|
270
|
+
const active = this.enabledItems().find(i => i.id === this.activeId);
|
|
271
|
+
if (active) {
|
|
272
|
+
ev.preventDefault();
|
|
273
|
+
active.click();
|
|
274
|
+
}
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
case 'Backspace':
|
|
278
|
+
if (this.scopeLabel && this.value === '')
|
|
279
|
+
this.bsScopeExit.emit();
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
onDialogKeyDown = (ev) => {
|
|
284
|
+
if (ev.key === 'Escape') {
|
|
285
|
+
ev.preventDefault();
|
|
286
|
+
ev.stopPropagation();
|
|
287
|
+
this.setOpen(false);
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
/** Native cancel (Esc through another path): handle it ourselves so state and focus stay in sync. */
|
|
291
|
+
onCancel = (ev) => {
|
|
292
|
+
ev.preventDefault();
|
|
293
|
+
this.setOpen(false);
|
|
294
|
+
};
|
|
295
|
+
/** A click that lands on the `<dialog>` itself is a click on the backdrop (the scrim). */
|
|
296
|
+
onDialogClick = (ev) => {
|
|
297
|
+
if (ev.target === this.dialogEl)
|
|
298
|
+
this.setOpen(false);
|
|
299
|
+
};
|
|
300
|
+
onItemSelect(ev) {
|
|
301
|
+
const item = ev.target;
|
|
302
|
+
if (!item || item.tagName !== 'BS-SEARCH-ITEM')
|
|
303
|
+
return;
|
|
304
|
+
ev.stopPropagation();
|
|
305
|
+
this.bsSelect.emit({ value: ev.detail, section: item.getAttribute('slot') ?? '', commandsOnly: this.commandsOnly });
|
|
306
|
+
if (!this.keepOpenOnSelect)
|
|
307
|
+
this.setOpen(false);
|
|
308
|
+
}
|
|
309
|
+
onResultsMouseOver = (ev) => {
|
|
310
|
+
const item = ev.composedPath().find(n => n.tagName === 'BS-SEARCH-ITEM');
|
|
311
|
+
if (item && !item.disabled && item.id !== this.activeId)
|
|
312
|
+
this.setActive(item);
|
|
313
|
+
};
|
|
314
|
+
sectionLabel(s) {
|
|
315
|
+
return {
|
|
316
|
+
recent: this.recentLabel,
|
|
317
|
+
suggested: this.suggestedLabel,
|
|
318
|
+
commands: this.commandsLabel,
|
|
319
|
+
navigation: this.navigationLabel,
|
|
320
|
+
records: this.recordsLabel,
|
|
321
|
+
'try-instead': this.tryInsteadLabel,
|
|
322
|
+
}[s];
|
|
323
|
+
}
|
|
324
|
+
renderSection(s) {
|
|
325
|
+
const hid = `${this.id}-h-${s}`;
|
|
326
|
+
return (index.h("div", { part: "section", class: "bs-command-palette__section", role: "group", "aria-labelledby": hid }, index.h("div", { part: "section-header", id: hid, class: "bs-command-palette__section-header" }, this.sectionLabel(s)), index.h("slot", { name: s })));
|
|
327
|
+
}
|
|
328
|
+
renderHint(keys, label) {
|
|
329
|
+
return (index.h("span", { part: "hint", class: "bs-command-palette__hint" }, keys, index.h("span", { class: "bs-command-palette__hint-text" }, label)));
|
|
330
|
+
}
|
|
331
|
+
renderFooter() {
|
|
332
|
+
const arrow = (d) => (index.h("bs-key", null, index.h("svg", { slot: "icon", ...svgProps }, index.h("path", { d: d }))));
|
|
333
|
+
return (index.h("div", { part: "footer", class: "bs-command-palette__footer" }, this.renderHint([arrow('M12 19V5M5 12l7-7 7 7'), arrow('M12 5v14M5 12l7 7 7-7')], this.navigateLabel), this.renderHint([
|
|
334
|
+
index.h("bs-key", null, index.h("svg", { slot: "icon", ...svgProps }, index.h("path", { d: "M9 14 4 9l5-5" }), index.h("path", { d: "M4 9h10.5a5.5 5.5 0 0 1 0 11H11" }))),
|
|
335
|
+
], this.openLabel), this.renderHint([index.h("bs-key", { label: "Esc" })], this.closeLabel), index.h("span", { class: "bs-command-palette__spacer" }), this.commandsOnly
|
|
336
|
+
? this.renderHint([index.h("bs-key", { label: "Backspace" })], this.allResultsLabel)
|
|
337
|
+
: this.renderHint([index.h("bs-key", { label: ">" })], this.commandsOnlyLabel)));
|
|
338
|
+
}
|
|
339
|
+
renderEmpty() {
|
|
340
|
+
return (index.h("div", { part: "empty", class: "bs-command-palette__empty" }, index.h("svg", { class: "bs-command-palette__empty-icon", ...svgProps, "stroke-width": "1.5" }, index.h("circle", { cx: "11", cy: "11", r: "7" }), index.h("path", { d: "m20 20-3.5-3.5M8.5 11h5" })), index.h("div", { class: "bs-command-palette__empty-heading" }, this.emptyHeading), index.h("div", { class: "bs-command-palette__empty-description" }, this.emptyDescription), this.didYouMean && (index.h("div", { class: "bs-command-palette__empty-description" }, this.didYouMeanLabel, ' ', index.h("button", { type: "button", class: "bs-command-palette__link", onClick: () => this.bsSuggestion.emit(this.didYouMean) }, this.didYouMean)))));
|
|
341
|
+
}
|
|
342
|
+
announcement() {
|
|
343
|
+
if (!this.open)
|
|
344
|
+
return '';
|
|
345
|
+
if (this.status === 'empty')
|
|
346
|
+
return this.emptyHeading;
|
|
347
|
+
if (this.status === 'loading')
|
|
348
|
+
return this.loadingLabel;
|
|
349
|
+
return '';
|
|
350
|
+
}
|
|
351
|
+
render() {
|
|
352
|
+
const listId = `${this.id}-listbox`;
|
|
353
|
+
const loading = this.status === 'loading';
|
|
354
|
+
const empty = this.status === 'empty';
|
|
355
|
+
const sections = this.shownSections().filter(s => this.filled[s]);
|
|
356
|
+
const hasList = sections.length > 0;
|
|
357
|
+
const showResults = loading || empty || hasList;
|
|
358
|
+
return (index.h("dialog", { key: '55a38e90a59faa6f0314c7e26ae90326fc82d7dc', ref: el => (this.dialogEl = el), part: "dialog", class: "bs-command-palette", "aria-label": this.label, "aria-modal": "true", role: "dialog", onCancel: this.onCancel, onClose: () => this.open && this.setOpen(false), onClick: this.onDialogClick, onKeyDown: this.onDialogKeyDown }, index.h("div", { key: '793f0509daba42c4a208d3f5ff3cdfa7d963989a', part: "panel", class: "bs-command-palette__panel" }, index.h("div", { key: '9af1794a677b7696e242df6a4e9e7775a8efdbea', part: "search", class: "bs-command-palette__search" }, this.scopeLabel && (index.h("bs-chip-informative", { key: '506dd50cecd610c48d61b24723e5a700a05ec693', class: "bs-command-palette__scope", color: "info" }, this.scopeLabel)), index.h("div", { key: 'ae0d016a687820e4960b9ff3d59c74cd937796bf', class: "bs-command-palette__field", ref: el => (this.comboEl = el), role: "combobox", "aria-label": this.placeholder, "aria-expanded": String(hasList), "aria-haspopup": "listbox", "aria-controls": hasList ? listId : undefined, onKeyDown: this.onKeyDown }, index.h("bs-input", { key: 'd444f70cfd6878434d19364ee1668987ae7da1c2', part: "input", ref: el => (this.inputEl = el), type: "search", value: this.value, placeholder: this.placeholder, onBsInput: this.onInput })), index.h("span", { key: '8baa325a3af0bd2c4b09e7201c315fbbb37f55e9', class: "bs-command-palette__esc", "aria-hidden": "true" }, index.h("bs-key", { key: 'a9bc3f695d63b32ab227b93a8a46db33da56da27', label: "Esc" }))), showResults && index.h("div", { key: 'e97114037b44d14a51872929314773aa637d64f1', class: "bs-command-palette__divider", role: "presentation" }), showResults && (index.h("div", { key: 'c8bc5e63b0ff902c8a2730775ae7294f025a7dc6', part: "results", class: "bs-command-palette__results", "aria-busy": String(loading), onMouseOver: this.onResultsMouseOver }, loading && (index.h("div", { key: 'c4bfacce3dc902aab472d825494d1e67ca593c32', class: "bs-command-palette__loading", role: "status" }, index.h("bs-spinner", { key: 'fcf43a2a30cc94b67075bbded0eaae329c4e18a4', size: "sm" }), index.h("span", { key: 'b9f195cacbd6ad6acfcd151f47c52b0c937ff1f5' }, this.loadingLabel))), empty && this.renderEmpty(), hasList && (index.h("div", { key: 'e4da543ad73a9b7dc209876d6e8dd1d057f4048e', id: listId, class: "bs-command-palette__list", role: "listbox", "aria-label": this.listLabel }, sections.map(s => this.renderSection(s)))))), this.showFooter && this.renderFooter()), index.h("span", { key: 'c4aab5214af689a0332a9730753ca187b91b5ec3', class: "bs-command-palette__live", "aria-live": "polite" }, this.announcement())));
|
|
359
|
+
}
|
|
360
|
+
static get watchers() { return {
|
|
361
|
+
"value": [{
|
|
362
|
+
"onValueChange": 0
|
|
363
|
+
}],
|
|
364
|
+
"status": [{
|
|
365
|
+
"resetMoved": 0
|
|
366
|
+
}],
|
|
367
|
+
"open": [{
|
|
368
|
+
"resetMoved": 0
|
|
369
|
+
}]
|
|
370
|
+
}; }
|
|
371
|
+
};
|
|
372
|
+
BsCommandPalette.style = bsCommandPaletteCss();
|
|
373
|
+
|
|
374
|
+
exports.bs_command_palette = BsCommandPalette;
|
|
@@ -51,7 +51,7 @@ const BsComposerStatusBanner = class {
|
|
|
51
51
|
return this.type === 'error' || this.type === 'warning' ? index.h(WarningIcon, null) : index.h(ClockIcon, null);
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (index.h("div", { key: '
|
|
54
|
+
return (index.h("div", { key: '9a18ded6392d5374cdf4357650498f1eff8bc896', role: this.roleForType(), "aria-busy": this.loading ? 'true' : undefined, class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, index.h("div", { key: '8acfc215792a889e80d01a08e86a0aa96bfe8967', class: "bs-composer-status-banner__message-group" }, this.showIcon && (index.h("span", { key: '2a4e0a5fe6b4f2fef30d534eae0c15009f813d33', part: "icon", class: "bs-composer-status-banner__icon" }, index.h("slot", { key: '5378cfaf8b1fed689eedac4f6a2bf892dda043f8', name: "icon" }, this.renderDefaultIcon()))), index.h("p", { key: '9fe869051bbf300c12f0ec8006d409abf4bebf56', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (index.h("button", { key: '6fe2f55c57523ee917ae6d96e2a070f1006f0a44', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (index.h("button", { key: '18d5ec846134a57c11c46810bb0b35acac0a20b6', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": this.closeLabel, onClick: this.onCloseClick }, index.h(CloseIcon, { key: 'cbf7993e299eacc8a05efc55cf0dc4539ba9d424' })))));
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
const SpinnerIcon = () => (index.h("svg", { class: "bs-composer-status-banner__spinner", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-opacity": "0.25", "stroke-width": "1.5" }), index.h("path", { d: "M17.25 10A7.25 7.25 0 0 0 10 2.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" })));
|
|
@@ -199,7 +199,7 @@ const BsComposer = class {
|
|
|
199
199
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
200
200
|
const disabled = this.state === 'disabled';
|
|
201
201
|
const recording = this.state === 'recording';
|
|
202
|
-
return (index.h("div", { key: '
|
|
202
|
+
return (index.h("div", { key: 'f1ccd8ab2299efcf83dc8f858845e87ba87f9c41', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, index.h("div", { key: '2edd5ab5b6a67d108d2f8067a639e74b6ab4f39f', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, index.h("slot", { key: 'a7b2acfea4b2498792749e24aaf9329e521a93df', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), index.h("div", { key: '0de284b100f38a60b472eadfd89f06690023a1a1', class: "bs-composer__text-row" }, index.h("textarea", { key: '0c46b8e4f54234b2df62af566f0b6bf9b1f978d1', ref: el => (this.inputEl = el), part: "input", class: "bs-composer__input", rows: 1, value: this.value, placeholder: placeholder, disabled: disabled, maxLength: this.maxLength, "aria-label": this.ariaLabel, onInput: this.onInput, onKeyDown: this.onInputKeydown })), index.h("div", { key: 'a3ca22299095e398b6dd7a62c9b6ce93a4d49dab', class: "bs-composer__controls-row" }, !this.hideAttach && (index.h("button", { key: 'c06cad301027ce2fdef180189945bebd2f876081', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": this.attachLabel, onClick: this.onAttachClick }, index.h(PlusIcon, { key: 'd863cc1734ca9b67447b2cbbe19a2ba75266d169' }))), recording ? (index.h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (index.h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (index.h("span", { class: "bs-composer__spacer" })), !this.hideMic && (index.h("button", { key: 'aadf13bf18c9215045cf7ea326bbc1495ab21288', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? this.stopRecordingLabel : this.micLabel, disabled: disabled, onClick: this.onMicClick }, recording ? index.h(StopIcon, null) : index.h(MicIcon, null))), index.h("button", { key: '36ca7d3824349cd65473553e0a20b14c41b74b8b', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, "aria-busy": this.loading && this.state === 'idle' ? 'true' : undefined, onClick: this.onActionClick }, this.renderActionIcon()), index.h("slot", { key: '0965e567d4cb590d7cd072ecf72c10c2c97e1f69', name: "actions-end" }))));
|
|
203
203
|
}
|
|
204
204
|
static get delegatesFocus() { return true; }
|
|
205
205
|
};
|
|
@@ -15,7 +15,7 @@ const BsContainer = class {
|
|
|
15
15
|
padding = '300';
|
|
16
16
|
render() {
|
|
17
17
|
const pad = SPACING_TOKENS.includes(String(this.padding)) ? String(this.padding) : '300';
|
|
18
|
-
return (index.h(index.Host, { key: '
|
|
18
|
+
return (index.h(index.Host, { key: 'af5052dbda078e66b8afcf84e842f124748353b9', style: { '--bs-container-padding-token': `var(--bs-spacing-${pad})` } }, index.h("slot", { key: '2493e7614d7fcaf07b24e350e68a65b06fd77640' })));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
BsContainer.style = bsContainerCss();
|
|
@@ -76,11 +76,11 @@ const BsDataTable = class {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (index.h("table", { key: '
|
|
79
|
+
return (index.h("table", { key: '72d4058323ac137aa589476e5b89ed47bd8b996e', part: "table", class: "bs-data-table" }, index.h("thead", { key: '65e27a1aba0b9eb6892df5b0581672c9fb18ce13', part: "head" }, index.h("tr", { key: '690d1fab0effa5b0e9e44160ac91d77ab1290079' }, this.selectable && (index.h("th", { key: 'cf96e314093743b5e6341cf2fce3e0ac6b5e99ef', class: "bs-data-table__select-col" }, this.rows.length > 0 && (index.h("input", { key: 'fe6fe4d41420f9a37f11337044173ce5b13340d4', type: "checkbox", "aria-label": this.selectAllLabel, checked: this.selectedIds.size > 0 && this.selectedIds.size === this.rows.length, indeterminate: this.selectedIds.size > 0 && this.selectedIds.size < this.rows.length, onChange: this.onSelectAllChange })))), this.columns.map(column => {
|
|
80
80
|
const isSorted = this.sortColumn === column.key;
|
|
81
81
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
82
82
|
return (index.h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (index.h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && index.h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
83
|
-
}))), index.h("tbody", { key: '
|
|
83
|
+
}))), index.h("tbody", { key: '34e3bb93c663862d1d8b29956c22392b3c2400ac', part: "body" }, this.rows.map(row => (index.h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (index.h("td", { class: "bs-data-table__select-col" }, index.h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
84
84
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
85
85
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
86
86
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -314,7 +314,7 @@ const BsDatepicker = class {
|
|
|
314
314
|
: this.defaultTabbable(days);
|
|
315
315
|
const isInRange = (iso) => !!selectedStart && !!previewEnd && iso > selectedStart && iso < previewEnd;
|
|
316
316
|
const weekdays = this.weekdays();
|
|
317
|
-
return (index.h("bs-card", { key: '
|
|
317
|
+
return (index.h("bs-card", { key: '280abccf2d86d04f392f4daeb9811bf34d71dc6b', part: "container", class: "bs-datepicker", surface: "raised" }, index.h("div", { key: '624706b13929083f05bab4210a5c8444240f8a53', class: "bs-datepicker__body" }, this.renderHeader(), index.h("div", { key: '69d8f66f154e0e194b77b091bede097407c43902', part: "nav", class: "bs-datepicker__nav" }, index.h("button", { key: '089809f514e4513624749748d639ef6da997618b', part: "prev", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.previousLabel, onClick: () => this.moveView(-1) }, index.h("svg", { key: 'd78f4940665d866752772f69de2e8058390bf6e5', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, index.h("path", { key: 'f34d431a9f77b036fe4417c033f197c72780c1bf', d: "M15 18L9 12L15 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), index.h("div", { key: '36a37548a0bc04db3416f5e206c0990f0d1189eb', part: "title", class: "bs-datepicker__title", "aria-live": "polite" }, this.titleText()), index.h("button", { key: '3bf5616d93ea0d5f8968691692b2b64ce6334d0b', part: "next", type: "button", class: "bs-datepicker__nav-button", "aria-label": this.nextLabel, onClick: () => this.moveView(1) }, index.h("svg", { key: '5f9aac5a4e1658051908f5bad88b6c196f6dfea7', viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, index.h("path", { key: '0515eaeb3cd01b48633675668292cb01634c134a', d: "M9 18L15 12L9 6", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), index.h("div", { key: '2decbaa1fc82ee83c58ae19cd19bd53c51aabe0d', part: "grid", class: "bs-datepicker__grid", role: "grid", "aria-label": this.titleText() }, index.h("div", { key: '4720f7dbda3ca990885a56d00860eaf4ab7689e8', class: "bs-datepicker__row", role: "row" }, weekdays.map(w => (index.h("div", { part: "weekday", class: "bs-datepicker__weekday", role: "columnheader" }, w)))), Array.from({ length: 6 }, (_, r) => {
|
|
318
318
|
const row = days.slice(r * 7, r * 7 + 7);
|
|
319
319
|
return (index.h("div", { class: "bs-datepicker__row", role: "row" }, row.map((d, c) => {
|
|
320
320
|
const iso = toIso(d);
|
|
@@ -21,7 +21,7 @@ const BsDivider = class {
|
|
|
21
21
|
const a11y = this.decorative
|
|
22
22
|
? { role: 'none', 'aria-hidden': 'true' }
|
|
23
23
|
: { role: 'separator', 'aria-orientation': orientation };
|
|
24
|
-
return (index.h(index.Host, { key: '
|
|
24
|
+
return (index.h(index.Host, { key: '0146af9f63ddd328e30262cf9767222445da478b', ...a11y }, index.h("div", { key: 'a621923c43fd326fe5ee6e7223bd5e7103b01e9e', class: "line", part: "line" })));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
BsDivider.style = bsDividerCss();
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-BYfMRtlW.js');
|
|
4
|
+
|
|
5
|
+
const bsEmptyStateCss = () => `:host{display:block;box-sizing:border-box;--bs-empty-state-padding-y:var(--bs-spacing-700);--bs-empty-state-padding-x:var(--bs-spacing-300);--bs-empty-state-gap:var(--bs-spacing-150);--bs-empty-state-heading-color:var(--bs-text-default);--bs-empty-state-description-color:var(--bs-text-secondary)}.bs-empty-state{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:var(--bs-empty-state-gap);padding:var(--bs-empty-state-padding-y) var(--bs-empty-state-padding-x);text-align:center}.bs-empty-state__heading{margin:0;align-self:stretch;color:var(--bs-empty-state-heading-color);font-family:inherit;font-size:var(--bs-font-size-xl);font-weight:var(--bs-font-weight-bold);line-height:24px}.bs-empty-state__description{margin:0;align-self:stretch;color:var(--bs-empty-state-description-color);font-family:inherit;font-size:var(--bs-font-size-sm);font-weight:var(--bs-font-weight-regular);line-height:20px}.bs-empty-state__action{display:flex;justify-content:center}`;
|
|
6
|
+
|
|
7
|
+
const BsEmptyState = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
index.registerInstance(this, hostRef);
|
|
10
|
+
}
|
|
11
|
+
get el() { return index.getElement(this); }
|
|
12
|
+
/** The heading text. */
|
|
13
|
+
heading;
|
|
14
|
+
/** The description text. The default slot overrides it. */
|
|
15
|
+
description;
|
|
16
|
+
/** Colour and default glyph of the icon tile. Use `error` for failures. */
|
|
17
|
+
intent = 'default';
|
|
18
|
+
/** Heading level, 2 to 6 (renders `h2`..`h6`). Pick the one that fits the page outline. */
|
|
19
|
+
headingLevel = 3;
|
|
20
|
+
hasIcon = false;
|
|
21
|
+
hasDescriptionSlot = false;
|
|
22
|
+
hasAction = false;
|
|
23
|
+
observer;
|
|
24
|
+
componentWillLoad() {
|
|
25
|
+
this.readSlots();
|
|
26
|
+
this.observer = new MutationObserver(() => this.readSlots());
|
|
27
|
+
this.observer.observe(this.el, { childList: true, subtree: false, characterData: false });
|
|
28
|
+
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
this.observer?.disconnect();
|
|
31
|
+
}
|
|
32
|
+
readSlots() {
|
|
33
|
+
const nodes = Array.from(this.el.childNodes);
|
|
34
|
+
const slotOf = (n) => (n.nodeType === Node.ELEMENT_NODE ? n.getAttribute('slot') : null);
|
|
35
|
+
this.hasIcon = nodes.some(n => slotOf(n) === 'icon');
|
|
36
|
+
this.hasAction = nodes.some(n => slotOf(n) === 'action');
|
|
37
|
+
this.hasDescriptionSlot = nodes.some(n => !slotOf(n) && (n.nodeType === Node.ELEMENT_NODE || (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim())));
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
const level = Math.min(6, Math.max(2, Math.round(Number(this.headingLevel)) || 3));
|
|
41
|
+
const Heading = `h${level}`;
|
|
42
|
+
return (index.h("div", { key: '0f841411b4b0f38d29487f3f52f79cb7a281f32a', part: "container", class: "bs-empty-state" }, index.h("bs-icon-tile", { key: '69c1e66424d966aed5e29582c2947bbfe0725cde', part: "icon", size: "lg", intent: this.intent }, this.hasIcon && index.h("slot", { key: '3243c54d7760d27cee1463ffe1acd1d886929a77', name: "icon" })), this.heading && (index.h(Heading, { key: '06075e06b4917ba28276c8b4c77e7dcc000c6f23', part: "heading", class: "bs-empty-state__heading" }, this.heading)), (this.description || this.hasDescriptionSlot) && (index.h("p", { key: '00dab545646803b8ed2f9723e6aa80f620f085a1', part: "description", class: "bs-empty-state__description" }, this.hasDescriptionSlot ? index.h("slot", null) : this.description)), this.hasAction && (index.h("div", { key: '1a984f1efd3bfbe6e5fd981e2f367ddd25e6f3c7', part: "action", class: "bs-empty-state__action" }, index.h("slot", { key: 'ea9b962f5652238d74625a11627992f0f4fb34bf', name: "action" })))));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
BsEmptyState.style = bsEmptyStateCss();
|
|
46
|
+
|
|
47
|
+
exports.bs_empty_state = BsEmptyState;
|
|
@@ -46,7 +46,7 @@ const BsErrorPage = class {
|
|
|
46
46
|
const primary = this.primaryLabel ?? d.primary;
|
|
47
47
|
const secondary = this.secondaryLabel ?? d.secondary;
|
|
48
48
|
const level = Math.min(6, Math.max(1, Math.trunc(Number(this.headingLevel)) || 1));
|
|
49
|
-
return (index.h("bs-card", { key: '
|
|
49
|
+
return (index.h("bs-card", { key: '376ab30f0eeaf89fb522373b375d0c68eebe8e99', part: "container", class: "bs-error-page", surface: "base" }, index.h("div", { key: '380013c4a4ac5208823856bb565f841e4b9aace3', class: "bs-error-page__body" }, index.h("div", { key: 'ce3ed8170977a0e2c4b1247140734fa3ba4c4896', class: "bs-error-page__art-group" }, index.h("bs-icon-tile", { key: '625d8cef3b2969f15e6ba5e94913359f54f277dd', part: "art", class: `bs-error-page__art ${d.info ? 'bs-error-page__art--info' : ''}`, intent: d.intent, size: "lg" }, index.h("slot", { key: 'e4415c41729cc3e9b52f1c61dfb8906a1d8dcc6a', name: "icon" }, d.glyph())), code && (index.h("span", { key: 'a6d8d24456746f9da3387c2acae20410382d7b62', part: "code", class: "bs-error-page__code" }, code))), index.h(`h${level}`, { part: 'heading', class: { 'bs-error-page__heading': true } }, heading), description && (index.h("p", { key: '4cace21798cbd9f40f2eb493938b5c12db43be97', part: "description", class: "bs-error-page__description" }, description)), (primary || secondary) && (index.h("div", { key: 'aca6cc9c414530bbb657e02c0910bbc4cae35ae6', part: "actions", class: "bs-error-page__actions" }, primary && (index.h("bs-button", { key: 'e5ec7c649b3b49e42e2f8132372e5b1b25f850bf', part: "primary", variant: "primary", onClick: () => this.bsPrimary.emit() }, primary)), secondary && (index.h("bs-button", { key: '7414d2d76186402404cf36ad662340f30e4b65aa', part: "secondary", variant: "outlined", onClick: () => this.bsSecondary.emit() }, secondary)))), this.reference && (index.h("p", { key: 'cf2fff2d7d2a77dd9f5a1fca1464ae0f687e4b5a', part: "reference", class: "bs-error-page__reference" }, this.reference)))));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
const icon = (children) => () => (index.h("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" }, children));
|
|
@@ -71,7 +71,7 @@ const BsFileUploadItem = class {
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
const removing = this.state === 'success';
|
|
74
|
-
return (index.h("div", { key: '
|
|
74
|
+
return (index.h("div", { key: '02ddff16491c33fa61626bca72275ea0a1037c14', part: "item", class: `bs-file-upload-item bs-file-upload-item--${this.state}` }, index.h("div", { key: 'c465a9216d363ee858933d24abb468d73d66190e', part: "thumbnail", class: "bs-file-upload-item__thumbnail" }, index.h("slot", { key: '5aeaec4d3e9120163dab89c9bb3ca71e8976cae3', name: "thumbnail" }, this.thumbnailSrc ? (index.h("img", { class: "bs-file-upload-item__image", src: this.thumbnailSrc, alt: this.thumbnailAlt })) : (index.h(ImageIcon, null)))), index.h("div", { key: '3fdf5cb05270ae986e59404758f487932da10fbe', class: "bs-file-upload-item__content" }, index.h("div", { key: 'eb783412a8f97eaf6d566c06283c0ca0cc735570', class: "bs-file-upload-item__meta" }, index.h("span", { key: 'a456cfbcbaa19329715d55d80845a6b824bb2d64', part: "name", class: "bs-file-upload-item__name" }, this.fileName), this.fileSize && (index.h("span", { key: '7810e2855de50d3fa42d7ee29af81e2c58ea1a42', part: "size", class: "bs-file-upload-item__size" }, this.fileSize))), this.renderStatus()), index.h("bs-icon-button", { key: '7be3bf3d73ec51a2ce3bc23b4e401306c2d6bcc9', part: "action", variant: "subtle", size: "lg", ariaLabel: removing ? this.removeLabel : this.cancelLabel, onClick: this.onAction }, removing ? index.h(TrashIcon, null) : index.h(CloseIcon, null))));
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
// Figma exports, recolored via currentColor so the CSS tokens drive the color.
|
|
@@ -100,7 +100,7 @@ const BsFileUpload = class {
|
|
|
100
100
|
this.handleFiles(files);
|
|
101
101
|
};
|
|
102
102
|
render() {
|
|
103
|
-
return (index.h("div", { key: '
|
|
103
|
+
return (index.h("div", { key: '58fece79d4fb5204ba4edadbdac4a26b5ef3186b', part: "dropzone", class: `bs-file-upload bs-file-upload--${this.direction} ${this.dragging ? 'bs-file-upload--dragging' : ''} ${this.disabled ? 'bs-file-upload--disabled' : ''}`, onDragEnter: this.onDragOver, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onDrop: this.onDrop }, index.h("div", { key: '9339e7a61fd8d2d337c442518b0feca4eac56f4e', part: "icon", class: "bs-file-upload__icon" }, index.h("slot", { key: 'b361ea7dda65426da604485f8d00022520e96643', name: "icon" }, index.h(UploadIcon, { key: 'fb08c4f2ec4250293ca66ab7a84c0b77599b15b9' }))), index.h("div", { key: '1ee60fe58d4196a8aaf95d38e7ba1d6aaaf269fb', class: "bs-file-upload__content" }, index.h("div", { key: '57e91a29e74a9e02831b32e3ab674607a256e68c', class: "bs-file-upload__text" }, this.heading && (index.h("span", { key: '389ea949446b63bb976071fec70d3e5398d3ebef', part: "heading", class: "bs-file-upload__heading" }, this.heading)), this.description && (index.h("span", { key: 'f6709820df651e915ee7b0073672820478e3c483', part: "description", id: "description", class: "bs-file-upload__description" }, this.description))), index.h("bs-button", { key: '29abda9026efccb881b26794ca5441888ef4c02c', part: "browse", variant: "neutral", size: "sm", disabled: this.disabled, onClick: this.onBrowse }, this.buttonLabel)), index.h("input", { key: '3ea4af2d866795676c74138f5ce6f75f5cb13111', ref: el => (this.inputEl = el), class: "bs-file-upload__input", type: "file", hidden: true, tabindex: -1, accept: this.accept, multiple: this.multiple, disabled: this.disabled, "aria-describedby": this.description ? 'description' : undefined, onChange: this.onInputChange })));
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
// Figma's "UploadSimple" icon (3272:50330), exported SVG, recolored via currentColor.
|