@brandsync/wc 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/REFERENCE.md +313 -0
- package/custom-elements.json +4760 -1555
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-044ac86c.entry.js +1 -0
- package/dist/brandsync-wc/p-065c7e7c.entry.js +1 -0
- package/dist/brandsync-wc/p-07673a48.entry.js +1 -0
- package/dist/brandsync-wc/{p-54f9529f.entry.js → p-08e96f13.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f3cc961b.entry.js → p-0bbaef51.entry.js} +1 -1
- package/dist/brandsync-wc/p-11d80e17.entry.js +1 -0
- package/dist/brandsync-wc/{p-c85fe37b.entry.js → p-1bd99669.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f4d1d56e.entry.js → p-225148be.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6df48031.entry.js → p-2bd30709.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e294f698.entry.js → p-32297416.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d165a742.entry.js → p-35f76ea7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ca40386.entry.js → p-3bad5e1b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ed71eb02.entry.js → p-3bdeeb9d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1bf8fbbb.entry.js → p-3c6ec5d0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-abfa43f5.entry.js → p-3cb79512.entry.js} +1 -1
- package/dist/brandsync-wc/p-3d2c62a6.entry.js +1 -0
- package/dist/brandsync-wc/{p-23379d7c.entry.js → p-3d7b0708.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2e285364.entry.js → p-43d5f708.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d81c4f58.entry.js → p-4b460eda.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b6081bba.entry.js → p-4eaa9ed4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c25553bc.entry.js → p-4f4c0c68.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a56bc608.entry.js → p-5057e4fe.entry.js} +1 -1
- package/dist/brandsync-wc/p-54d91ac9.entry.js +1 -0
- package/dist/brandsync-wc/{p-65fa1b21.entry.js → p-57ff14ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-538d5b58.entry.js → p-5b933ff4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b67a0c8f.entry.js → p-5c61eb06.entry.js} +1 -1
- package/dist/brandsync-wc/{p-86774165.entry.js → p-5eb5795f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b663ee67.entry.js → p-61deb48c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ac9472ec.entry.js → p-67f125e8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3488c4fc.entry.js → p-6ea02b98.entry.js} +1 -1
- package/dist/brandsync-wc/p-70c650b2.entry.js +1 -0
- package/dist/brandsync-wc/p-79fc849c.entry.js +1 -0
- package/dist/brandsync-wc/{p-5a45ef51.entry.js → p-7ed071fb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3c21d0bf.entry.js → p-8134f97c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ed00786.entry.js → p-844205d9.entry.js} +1 -1
- package/dist/brandsync-wc/p-84d6d6eb.entry.js +1 -0
- package/dist/brandsync-wc/{p-401b3d3d.entry.js → p-857987f9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b9c9bcba.entry.js → p-8c4dfccb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-38ac9aad.entry.js → p-90ba3032.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1ca8b01e.entry.js → p-9396c67e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e9b6b30f.entry.js → p-9d740928.entry.js} +1 -1
- package/dist/brandsync-wc/{p-baa3d37a.entry.js → p-a7fa839a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f271e1d2.entry.js → p-a7fb0b59.entry.js} +1 -1
- package/dist/brandsync-wc/{p-89ea6366.entry.js → p-ab14a07d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-912629c6.entry.js → p-aec2dfeb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8390a155.entry.js → p-b02bf1ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9beeb30c.entry.js → p-b142d8c9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7a072e64.entry.js → p-b4511ad3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5ed1f45e.entry.js → p-b5710db6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-34b0c048.entry.js → p-baa39c08.entry.js} +1 -1
- package/dist/brandsync-wc/{p-87d44938.entry.js → p-be7aac52.entry.js} +1 -1
- package/dist/brandsync-wc/p-c835afb7.entry.js +1 -0
- package/dist/brandsync-wc/{p-45986ad4.entry.js → p-d25adab2.entry.js} +1 -1
- package/dist/brandsync-wc/p-d2a15599.entry.js +1 -0
- package/dist/brandsync-wc/{p-b9c0b481.entry.js → p-d7956c51.entry.js} +1 -1
- package/dist/brandsync-wc/p-d9184940.entry.js +1 -0
- package/dist/brandsync-wc/{p-0f97fe35.entry.js → p-dcbeb143.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cf287ff1.entry.js → p-debc83cc.entry.js} +1 -1
- package/dist/brandsync-wc/{p-dcacee29.entry.js → p-e0a9f2d1.entry.js} +1 -1
- package/dist/brandsync-wc/p-e123b391.entry.js +1 -0
- package/dist/brandsync-wc/p-e8ae626d.entry.js +1 -0
- package/dist/brandsync-wc/p-e8e22238.entry.js +1 -0
- package/dist/brandsync-wc/{p-6cb21302.entry.js → p-eb0dc5bf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1b4c0971.entry.js → p-f43a7f16.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7b3518b8.entry.js → p-f82a9f0d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f0be9125.entry.js → p-f98dfa85.entry.js} +1 -1
- package/dist/brandsync-wc/{p-36fe783a.entry.js → p-fdc168ec.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bc97ece8.entry.js → p-ffccc1ee.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-app-shell.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
- package/dist/cjs/bs-command-palette.cjs.entry.js +374 -0
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-container.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/bs-divider.cjs.entry.js +1 -1
- package/dist/cjs/bs-empty-state.cjs.entry.js +47 -0
- package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-global-search.cjs.entry.js +326 -0
- package/dist/cjs/bs-grid.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-tile.cjs.entry.js +2 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
- package/dist/cjs/bs-key-caps.cjs.entry.js +39 -0
- package/dist/cjs/bs-key.cjs.entry.js +28 -0
- package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +112 -0
- package/dist/cjs/bs-list-item.cjs.entry.js +66 -0
- package/dist/cjs/bs-list.cjs.entry.js +103 -0
- package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-message.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-popover.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-qr-code.cjs.entry.js +1 -1
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-search-item.cjs.entry.js +47 -0
- package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
- package/dist/cjs/bs-shortcut-row.cjs.entry.js +27 -0
- package/dist/cjs/bs-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-slider.cjs.entry.js +1 -1
- package/dist/cjs/bs-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +2 -2
- package/dist/cjs/bs-spinner.cjs.entry.js +1 -1
- package/dist/cjs/bs-split-pane.cjs.entry.js +1 -1
- package/dist/cjs/bs-stack.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper-step.cjs.entry.js +1 -1
- package/dist/cjs/bs-stepper.cjs.entry.js +1 -1
- package/dist/cjs/bs-switch.cjs.entry.js +1 -1
- package/dist/cjs/bs-tab_3.cjs.entry.js +3 -3
- package/dist/cjs/bs-timepicker.cjs.entry.js +2 -2
- package/dist/cjs/bs-toast.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +1 -1
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/bs-tree-item.cjs.entry.js +94 -0
- package/dist/cjs/bs-tree.cjs.entry.js +197 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-app-shell/bs-app-shell.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
- package/dist/collection/components/bs-command-palette/bs-command-palette.cmp.test.js +207 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.css +214 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.js +1114 -0
- package/dist/collection/components/bs-command-palette/bs-command-palette.stories.js +194 -0
- package/dist/collection/components/bs-composer/bs-composer.js +1 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
- package/dist/collection/components/bs-container/bs-container.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +1 -1
- package/dist/collection/components/bs-divider/bs-divider.js +1 -1
- package/dist/collection/components/bs-empty-state/bs-empty-state.cmp.test.js +102 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.css +45 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.js +175 -0
- package/dist/collection/components/bs-empty-state/bs-empty-state.stories.js +52 -0
- package/dist/collection/components/bs-error-page/bs-error-page.js +1 -1
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-global-search/bs-global-search.cmp.test.js +491 -0
- package/dist/collection/components/bs-global-search/bs-global-search.css +115 -0
- package/dist/collection/components/bs-global-search/bs-global-search.js +1024 -0
- package/dist/collection/components/bs-global-search/bs-global-search.stories.js +146 -0
- package/dist/collection/components/bs-grid/bs-grid.js +2 -2
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +2 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-key/bs-key.cmp.test.js +59 -0
- package/dist/collection/components/bs-key/bs-key.css +58 -0
- package/dist/collection/components/bs-key/bs-key.js +84 -0
- package/dist/collection/components/bs-key/bs-key.stories.js +19 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.cmp.test.js +60 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.css +28 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.js +120 -0
- package/dist/collection/components/bs-key-caps/bs-key-caps.stories.js +29 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.js +194 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.css +138 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +485 -0
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.js +111 -0
- package/dist/collection/components/bs-list/bs-list.cmp.test.js +99 -0
- package/dist/collection/components/bs-list/bs-list.css +15 -0
- package/dist/collection/components/bs-list/bs-list.js +241 -0
- package/dist/collection/components/bs-list/bs-list.stories.js +43 -0
- package/dist/collection/components/bs-list-item/bs-list-item.cmp.test.js +137 -0
- package/dist/collection/components/bs-list-item/bs-list-item.css +139 -0
- package/dist/collection/components/bs-list-item/bs-list-item.js +343 -0
- package/dist/collection/components/bs-list-item/bs-list-item.stories.js +86 -0
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.cmp.test.js +6 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-message/bs-message.js +1 -1
- package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-popover/bs-popover.js +1 -1
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-search-item/bs-search-item.cmp.test.js +147 -0
- package/dist/collection/components/bs-search-item/bs-search-item.css +112 -0
- package/dist/collection/components/bs-search-item/bs-search-item.js +222 -0
- package/dist/collection/components/bs-search-item/bs-search-item.stories.js +31 -0
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.cmp.test.js +60 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.css +42 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +154 -0
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.stories.js +24 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-spinner/bs-spinner.js +1 -1
- package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
- package/dist/collection/components/bs-stack/bs-stack.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
- package/dist/collection/components/bs-toast/bs-toast.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
- package/dist/collection/components/bs-tree/bs-tree.cmp.test.js +166 -0
- package/dist/collection/components/bs-tree/bs-tree.css +8 -0
- package/dist/collection/components/bs-tree/bs-tree.js +354 -0
- package/dist/collection/components/bs-tree/bs-tree.stories.js +34 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.cmp.test.js +187 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.css +161 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.js +305 -0
- package/dist/collection/components/bs-tree-item/bs-tree-item.stories.js +54 -0
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/components/bs-accordion-group.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-app-shell.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-carousel.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-citation-preview.js +1 -1
- package/dist/components/bs-command-palette.d.ts +11 -0
- package/dist/components/bs-command-palette.js +1 -0
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-container.js +1 -1
- package/dist/components/bs-cookie-consent.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.js +1 -1
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-divider.js +1 -1
- package/dist/components/bs-empty-state.d.ts +11 -0
- package/dist/components/bs-empty-state.js +1 -0
- package/dist/components/bs-error-page.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-global-search.d.ts +11 -0
- package/dist/components/bs-global-search.js +1 -0
- package/dist/components/bs-grid.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-icon-tile.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-key-caps.d.ts +11 -0
- package/dist/components/bs-key-caps.js +1 -0
- package/dist/components/bs-key.d.ts +11 -0
- package/dist/components/bs-key.js +1 -0
- package/dist/components/bs-keyboard-shortcuts.d.ts +11 -0
- package/dist/components/bs-keyboard-shortcuts.js +1 -0
- package/dist/components/bs-list-item.d.ts +11 -0
- package/dist/components/bs-list-item.js +1 -0
- package/dist/components/bs-list.d.ts +11 -0
- package/dist/components/bs-list.js +1 -0
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-message-list.js +1 -1
- package/dist/components/bs-message.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-onboarding-checklist.js +1 -1
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-popover.js +1 -1
- package/dist/components/bs-product-tour.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-qr-code.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-search-item.d.ts +11 -0
- package/dist/components/bs-search-item.js +1 -0
- package/dist/components/bs-session-timeout.js +1 -1
- package/dist/components/bs-shortcut-row.d.ts +11 -0
- package/dist/components/bs-shortcut-row.js +1 -0
- package/dist/components/bs-side-panel.js +1 -1
- package/dist/components/bs-skeleton.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-spinner.js +1 -1
- package/dist/components/bs-split-pane.js +1 -1
- package/dist/components/bs-stack.js +1 -1
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-timepicker.js +1 -1
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip-trigger.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/bs-tree-item.d.ts +11 -0
- package/dist/components/bs-tree-item.js +1 -0
- package/dist/components/bs-tree.d.ts +11 -0
- package/dist/components/bs-tree.js +1 -0
- package/dist/components/bs-whats-new-entry.js +1 -1
- package/dist/components/bs-whats-new.js +1 -1
- package/dist/components/{p-GTDI4Ibw.js → p-B32Kl4IB.js} +1 -1
- package/dist/components/{p-B128GX8H.js → p-BDnZvjlq.js} +1 -1
- package/dist/components/{p-Bqe4waKJ.js → p-BUpnOUIM.js} +1 -1
- package/dist/components/p-BcYNrEOB.js +1 -0
- package/dist/components/{p-B80vOwH6.js → p-BcbaiZLh.js} +1 -1
- package/dist/components/p-Bp3DIxjT.js +1 -0
- package/dist/components/p-CH5atin4.js +1 -0
- package/dist/components/{p-kDJsWjTN.js → p-CRM1wIX9.js} +1 -1
- package/dist/components/{p-Mf1jorXP.js → p-CYzBTzzf.js} +1 -1
- package/dist/components/p-CervX0wH.js +1 -0
- package/dist/components/{p-ElcsxZSh.js → p-Cpe2k7ZC.js} +1 -1
- package/dist/components/{p-BvYkZcOU.js → p-D7AXo5NT.js} +1 -1
- package/dist/components/{p-B3l4WpgS.js → p-D8bvv9QQ.js} +1 -1
- package/dist/components/{p-ByKcHsj0.js → p-DG9eT5yi.js} +1 -1
- package/dist/components/{p-D0KM1R2i.js → p-DMLfXpva.js} +1 -1
- package/dist/components/{p-CQjSDdH7.js → p-DYDk73TF.js} +1 -1
- package/dist/components/{p-C7RZ6qZC.js → p-DcjgRtSQ.js} +1 -1
- package/dist/components/p-Dt4JNhHT.js +1 -0
- package/dist/components/{p-CK7fiES5.js → p-DtYTs9Kh.js} +1 -1
- package/dist/components/{p-BsbtyRJV.js → p-TAY9S9yG.js} +1 -1
- package/dist/components/{p-ByLUtXxO.js → p-w-DkdA4O.js} +1 -1
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-accordion-group.entry.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-app-shell.entry.js +1 -1
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-citation-preview.entry.js +1 -1
- package/dist/esm/bs-command-palette.entry.js +372 -0
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-container.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-datepicker.entry.js +1 -1
- package/dist/esm/bs-divider.entry.js +1 -1
- package/dist/esm/bs-empty-state.entry.js +45 -0
- package/dist/esm/bs-error-page.entry.js +1 -1
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-global-search.entry.js +324 -0
- package/dist/esm/bs-grid.entry.js +2 -2
- package/dist/esm/bs-icon-button.entry.js +1 -1
- package/dist/esm/bs-icon-tile.entry.js +2 -2
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/bs-input_3.entry.js +4 -4
- package/dist/esm/bs-key-caps.entry.js +37 -0
- package/dist/esm/bs-key.entry.js +26 -0
- package/dist/esm/bs-keyboard-shortcuts.entry.js +110 -0
- package/dist/esm/bs-list-item.entry.js +64 -0
- package/dist/esm/bs-list.entry.js +101 -0
- package/dist/esm/bs-message-list.entry.js +1 -1
- package/dist/esm/bs-message.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +2 -2
- package/dist/esm/bs-navigation-header.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-popover.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +2 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-qr-code.entry.js +1 -1
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-search-item.entry.js +45 -0
- package/dist/esm/bs-session-timeout.entry.js +1 -1
- package/dist/esm/bs-shortcut-row.entry.js +25 -0
- package/dist/esm/bs-skeleton.entry.js +1 -1
- package/dist/esm/bs-slider.entry.js +1 -1
- package/dist/esm/bs-snackbar.entry.js +1 -1
- package/dist/esm/bs-source-link.entry.js +2 -2
- package/dist/esm/bs-spinner.entry.js +1 -1
- package/dist/esm/bs-split-pane.entry.js +1 -1
- package/dist/esm/bs-stack.entry.js +1 -1
- package/dist/esm/bs-stepper-step.entry.js +1 -1
- package/dist/esm/bs-stepper.entry.js +1 -1
- package/dist/esm/bs-switch.entry.js +1 -1
- package/dist/esm/bs-tab_3.entry.js +3 -3
- package/dist/esm/bs-timepicker.entry.js +2 -2
- package/dist/esm/bs-toast.entry.js +1 -1
- package/dist/esm/bs-tooltip-trigger.entry.js +1 -1
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/bs-tree-item.entry.js +92 -0
- package/dist/esm/bs-tree.entry.js +195 -0
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-command-palette/bs-command-palette.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.d.ts +172 -0
- package/dist/types/components/bs-command-palette/bs-command-palette.stories.d.ts +56 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.d.ts +50 -0
- package/dist/types/components/bs-empty-state/bs-empty-state.stories.d.ts +13 -0
- package/dist/types/components/bs-global-search/bs-global-search.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-global-search/bs-global-search.d.ts +166 -0
- package/dist/types/components/bs-global-search/bs-global-search.stories.d.ts +61 -0
- package/dist/types/components/bs-key/bs-key.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key/bs-key.d.ts +36 -0
- package/dist/types/components/bs-key/bs-key.stories.d.ts +11 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.d.ts +31 -0
- package/dist/types/components/bs-key-caps/bs-key-caps.stories.d.ts +15 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.d.ts +95 -0
- package/dist/types/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.stories.d.ts +43 -0
- package/dist/types/components/bs-list/bs-list.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-list/bs-list.d.ts +42 -0
- package/dist/types/components/bs-list/bs-list.stories.d.ts +13 -0
- package/dist/types/components/bs-list-item/bs-list-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-list-item/bs-list-item.d.ts +85 -0
- package/dist/types/components/bs-list-item/bs-list-item.stories.d.ts +22 -0
- package/dist/types/components/bs-search-item/bs-search-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-search-item/bs-search-item.d.ts +61 -0
- package/dist/types/components/bs-search-item/bs-search-item.stories.d.ts +13 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.d.ts +38 -0
- package/dist/types/components/bs-shortcut-row/bs-shortcut-row.stories.d.ts +13 -0
- package/dist/types/components/bs-tree/bs-tree.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tree/bs-tree.d.ts +53 -0
- package/dist/types/components/bs-tree/bs-tree.stories.d.ts +11 -0
- package/dist/types/components/bs-tree-item/bs-tree-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tree-item/bs-tree-item.d.ts +60 -0
- package/dist/types/components/bs-tree-item/bs-tree-item.stories.d.ts +19 -0
- package/dist/types/components.d.ts +2700 -199
- package/package.json +1 -1
- package/reference.d.ts +36 -0
- package/reference.json +1076 -47
- package/dist/brandsync-wc/p-769c5b4a.entry.js +0 -1
- package/dist/brandsync-wc/p-e5f50e93.entry.js +0 -1
- package/dist/brandsync-wc/p-e72dd05e.entry.js +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription } from "../../stories-utils";
|
|
3
|
+
const RETURN_ICON = html `<svg slot="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9 14 4 9l5-5" /><path d="M4 9h10.5a5.5 5.5 0 0 1 0 11H11" /></svg>`;
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/bs-key-caps',
|
|
6
|
+
parameters: { docs: { description: { component: componentDescription('bs-key-caps') } } },
|
|
7
|
+
render: args => html `<bs-key-caps keys=${args.keys} ?disabled=${args.disabled}></bs-key-caps>`,
|
|
8
|
+
argTypes: { keys: { control: 'text' }, disabled: { control: 'boolean' } },
|
|
9
|
+
args: { keys: 'Ctrl+K', disabled: false },
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Default = {};
|
|
13
|
+
export const OneKey = { args: { keys: 'Esc' } };
|
|
14
|
+
export const ThreeKeys = { args: { keys: 'Ctrl+Shift+K' } };
|
|
15
|
+
export const FourKeys = { args: { keys: 'Ctrl+Alt+Shift+Del' } };
|
|
16
|
+
export const Disabled = { args: { keys: 'Ctrl+K', disabled: true } };
|
|
17
|
+
export const WithIconKey = {
|
|
18
|
+
name: 'With an icon key (slotted)',
|
|
19
|
+
render: () => html `
|
|
20
|
+
<bs-key-caps label="Control plus Return">
|
|
21
|
+
<bs-key label="Ctrl"></bs-key>
|
|
22
|
+
<bs-key>${RETURN_ICON}</bs-key>
|
|
23
|
+
</bs-key-caps>
|
|
24
|
+
`,
|
|
25
|
+
};
|
|
26
|
+
export const LiteralPlusKey = {
|
|
27
|
+
name: 'Literal "+" key (array)',
|
|
28
|
+
render: () => html `<bs-key-caps .keys=${['Ctrl', '+']}></bs-key-caps>`,
|
|
29
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
import { runAxeCheck } from "../../test/helpers/conventions";
|
|
3
|
+
import { SHORTCUT_GROUPS, SHORTCUT_GROUPS_SINGLE_KEY_OFF, FILTERED_GROUPS } from "./bs-keyboard-shortcuts.stories";
|
|
4
|
+
const sr = (h) => h.shadowRoot;
|
|
5
|
+
const q = (h, s) => sr(h).querySelector(s);
|
|
6
|
+
const qa = (h, s) => Array.from(sr(h).querySelectorAll(s));
|
|
7
|
+
const titles = (h) => qa(h, '[part="group-title"]').map(t => t.textContent);
|
|
8
|
+
const rows = (h) => qa(h, 'bs-shortcut-row');
|
|
9
|
+
const rowCaps = (r) => r.shadowRoot.querySelector('bs-key-caps');
|
|
10
|
+
const capsOpacity = (r) => getComputedStyle(rowCaps(r).shadowRoot.querySelector('[part="container"]')).opacity;
|
|
11
|
+
const actionOf = (r) => r.action;
|
|
12
|
+
const make = async (props = {}) => {
|
|
13
|
+
const r = await render(h("bs-keyboard-shortcuts", null));
|
|
14
|
+
const el = r.root;
|
|
15
|
+
el.groups = SHORTCUT_GROUPS;
|
|
16
|
+
Object.assign(el, props);
|
|
17
|
+
await r.waitForChanges();
|
|
18
|
+
return { ...r, el };
|
|
19
|
+
};
|
|
20
|
+
describe('bs-keyboard-shortcuts', () => {
|
|
21
|
+
it('has the Figma geometry and two columns', async () => {
|
|
22
|
+
const { el } = await make();
|
|
23
|
+
const card = q(el, '[part="container"]');
|
|
24
|
+
expect(Math.round(el.getBoundingClientRect().width)).toBe(720);
|
|
25
|
+
const body = card.shadowRoot.querySelector('.bs-card__content');
|
|
26
|
+
const cs = getComputedStyle(body);
|
|
27
|
+
expect(cs.paddingLeft).toBe('16px');
|
|
28
|
+
expect(getComputedStyle(card.shadowRoot.querySelector('.bs-card')).borderRadius).toBe('12px');
|
|
29
|
+
const groups = q(el, '[part="groups"]');
|
|
30
|
+
expect(getComputedStyle(groups).columnGap).toBe('48px');
|
|
31
|
+
const cols = qa(el, '.bs-keyboard-shortcuts__column');
|
|
32
|
+
expect(cols.length).toBe(2);
|
|
33
|
+
expect(Array.from(cols[0].querySelectorAll('[part="group-title"]')).map(t => t.textContent)).toEqual(['General', 'Navigation']);
|
|
34
|
+
expect(Array.from(cols[1].querySelectorAll('[part="group-title"]')).map(t => t.textContent)).toEqual(['Table', 'Editing']);
|
|
35
|
+
const row = rows(el)[0];
|
|
36
|
+
expect(Math.round(row.getBoundingClientRect().width)).toBe(320);
|
|
37
|
+
});
|
|
38
|
+
it('splits groups by the greedy rule', async () => {
|
|
39
|
+
const mk = (...n) => n.map((c, i) => ({ title: `G${i}`, shortcuts: Array.from({ length: c }, (_, j) => ({ action: `a${i}${j}`, keys: 'X' })) }));
|
|
40
|
+
const { el, waitForChanges } = await make();
|
|
41
|
+
el.groups = mk(5, 1, 1, 1);
|
|
42
|
+
await waitForChanges();
|
|
43
|
+
expect(qa(el, '.bs-keyboard-shortcuts__column').map(c => c.querySelectorAll('[part="group"]').length)).toEqual([1, 3]);
|
|
44
|
+
el.groups = mk(2, 2);
|
|
45
|
+
await waitForChanges();
|
|
46
|
+
expect(qa(el, '.bs-keyboard-shortcuts__column').map(c => c.querySelectorAll('[part="group"]').length)).toEqual([1, 1]);
|
|
47
|
+
el.groups = mk(3);
|
|
48
|
+
await waitForChanges();
|
|
49
|
+
expect(qa(el, '.bs-keyboard-shortcuts__column').length).toBe(1);
|
|
50
|
+
});
|
|
51
|
+
it('filters by action or keys text, keeps titles of groups with hits, and drops empty groups', async () => {
|
|
52
|
+
const { el, waitForChanges } = await make();
|
|
53
|
+
el.query = 'save';
|
|
54
|
+
await waitForChanges();
|
|
55
|
+
expect(titles(el)).toEqual(['Editing']);
|
|
56
|
+
expect(rows(el).map(actionOf)).toEqual(['Save']);
|
|
57
|
+
el.query = ' CTRL+Z ';
|
|
58
|
+
await waitForChanges();
|
|
59
|
+
expect(rows(el).map(actionOf)).toEqual(['Undo']);
|
|
60
|
+
el.query = 'go to';
|
|
61
|
+
await waitForChanges();
|
|
62
|
+
expect(titles(el)).toEqual(['Navigation']);
|
|
63
|
+
el.query = '';
|
|
64
|
+
await waitForChanges();
|
|
65
|
+
expect(rows(el).length).toBe(13);
|
|
66
|
+
});
|
|
67
|
+
it('shows a status line when nothing matches', async () => {
|
|
68
|
+
const { el, waitForChanges } = await make({ query: 'zzz' });
|
|
69
|
+
await waitForChanges();
|
|
70
|
+
const empty = q(el, '[part="empty"]');
|
|
71
|
+
expect(empty.textContent).toBe('No shortcuts match');
|
|
72
|
+
expect(empty).toEqualAttribute('role', 'status');
|
|
73
|
+
expect(rows(el).length).toBe(0);
|
|
74
|
+
expect(q(el, '[aria-live="polite"]').textContent).toBe('0 shortcuts');
|
|
75
|
+
});
|
|
76
|
+
it('announces the result count', async () => {
|
|
77
|
+
const { el } = await make();
|
|
78
|
+
expect(q(el, '[aria-live="polite"]').textContent).toBe('13 shortcuts');
|
|
79
|
+
});
|
|
80
|
+
it('with single-key off dims exactly the single-key rows', async () => {
|
|
81
|
+
const { el, waitForChanges } = await make({ singleKeyEnabled: false });
|
|
82
|
+
await waitForChanges();
|
|
83
|
+
const dimmed = rows(el).filter(r => r.disabled).map(actionOf);
|
|
84
|
+
expect(dimmed.sort()).toEqual(['New order', 'Next row', 'Previous row', 'Show shortcuts'].sort());
|
|
85
|
+
const r = rows(el).find(x => actionOf(x) === 'Next row');
|
|
86
|
+
expect(capsOpacity(r)).toBe('0.38');
|
|
87
|
+
const normal = rows(el).find(x => actionOf(x) === 'Save');
|
|
88
|
+
expect(capsOpacity(normal)).toBe('1');
|
|
89
|
+
expect(getComputedStyle(r.shadowRoot.querySelector('[part="container"]')).color).not.toBe(getComputedStyle(normal.shadowRoot.querySelector('[part="container"]')).color);
|
|
90
|
+
});
|
|
91
|
+
it('honours an explicit singleKey and the disabled flag', async () => {
|
|
92
|
+
const { el, waitForChanges } = await make({ singleKeyEnabled: false, groups: SHORTCUT_GROUPS_SINGLE_KEY_OFF });
|
|
93
|
+
await waitForChanges();
|
|
94
|
+
const dimmed = rows(el).filter(r => r.disabled).map(actionOf);
|
|
95
|
+
expect(dimmed).toContain('Close dialog');
|
|
96
|
+
expect(dimmed).not.toContain('Select row');
|
|
97
|
+
el.singleKeyEnabled = true;
|
|
98
|
+
el.groups = [{ title: 'T', shortcuts: [{ action: 'Off', keys: 'Ctrl+K', disabled: true }, { action: 'On', keys: 'J', singleKey: false }] }];
|
|
99
|
+
await waitForChanges();
|
|
100
|
+
expect(rows(el).map(r => r.disabled)).toEqual([true, false]);
|
|
101
|
+
});
|
|
102
|
+
it('filtered + single-key off keeps the Figma frame', async () => {
|
|
103
|
+
const { el, waitForChanges } = await make({ groups: FILTERED_GROUPS, query: 'save', singleKeyEnabled: false });
|
|
104
|
+
await waitForChanges();
|
|
105
|
+
expect(rows(el).map(r => r.disabled)).toEqual([false, false, true]);
|
|
106
|
+
});
|
|
107
|
+
it('sets list semantics', async () => {
|
|
108
|
+
const { el } = await make();
|
|
109
|
+
const g = qa(el, '[part="group"]')[0];
|
|
110
|
+
const title = g.querySelector('[part="group-title"]');
|
|
111
|
+
expect(g).toEqualAttribute('role', 'group');
|
|
112
|
+
expect(g).toEqualAttribute('aria-labelledby', title.id);
|
|
113
|
+
expect(g.querySelector('[role="list"]')).not.toBeNull();
|
|
114
|
+
expect(rows(el)[0].shadowRoot.querySelector('[part="container"]')).toEqualAttribute('role', 'listitem');
|
|
115
|
+
});
|
|
116
|
+
it('emits bsClose from the button and Escape', async () => {
|
|
117
|
+
const { el } = await make();
|
|
118
|
+
let n = 0;
|
|
119
|
+
el.addEventListener('bsClose', () => n++);
|
|
120
|
+
q(el, '[part="close"]').click();
|
|
121
|
+
expect(n).toBe(1);
|
|
122
|
+
expect(q(el, '[part="close"]')).toEqualAttribute('aria-label', 'Close');
|
|
123
|
+
q(el, '[part="search"]').dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true, composed: true }));
|
|
124
|
+
expect(n).toBe(2);
|
|
125
|
+
});
|
|
126
|
+
it('syncs query and emits bsQueryChange', async () => {
|
|
127
|
+
const { el, waitForChanges } = await make();
|
|
128
|
+
const seen = [];
|
|
129
|
+
el.addEventListener('bsQueryChange', e => seen.push(e.detail));
|
|
130
|
+
const input = q(el, '[part="search"]');
|
|
131
|
+
input.dispatchEvent(new CustomEvent('bsInput', { detail: 'undo', bubbles: true }));
|
|
132
|
+
await waitForChanges();
|
|
133
|
+
expect(seen).toEqual(['undo']);
|
|
134
|
+
expect(el.query).toBe('undo');
|
|
135
|
+
expect(rows(el).map(actionOf)).toEqual(['Undo']);
|
|
136
|
+
});
|
|
137
|
+
it('emits bsSingleKeyChange from the switch', async () => {
|
|
138
|
+
const { el, waitForChanges } = await make();
|
|
139
|
+
let v;
|
|
140
|
+
el.addEventListener('bsSingleKeyChange', e => (v = e.detail));
|
|
141
|
+
q(el, 'bs-switch').dispatchEvent(new CustomEvent('bsChange', { detail: false }));
|
|
142
|
+
await waitForChanges();
|
|
143
|
+
expect(v).toBe(false);
|
|
144
|
+
expect(el.singleKeyEnabled).toBe(false);
|
|
145
|
+
});
|
|
146
|
+
it('hides the switch and the footer via props', async () => {
|
|
147
|
+
const { el, waitForChanges } = await make();
|
|
148
|
+
expect(q(el, '[part="switch"]')).not.toBeNull();
|
|
149
|
+
expect(q(el, '[part="footer"]').textContent).toContain('Press');
|
|
150
|
+
Object.assign(el, { showSingleKeySwitch: false, showFooterHint: false });
|
|
151
|
+
await waitForChanges();
|
|
152
|
+
expect(q(el, '[part="switch"]')).toBeNull();
|
|
153
|
+
expect(q(el, '[part="footer"]')).toBeNull();
|
|
154
|
+
});
|
|
155
|
+
it('uses default texts', async () => {
|
|
156
|
+
const { el } = await make();
|
|
157
|
+
expect(q(el, '[part="heading"]').textContent).toBe('Keyboard shortcuts');
|
|
158
|
+
expect(q(el, '.bs-keyboard-shortcuts__switch-title').textContent).toBe('Single-key shortcuts');
|
|
159
|
+
expect(getComputedStyle(q(el, '[part="heading"]')).fontSize).toBe('24px');
|
|
160
|
+
});
|
|
161
|
+
it('uses the light and dark text colour from tokens', async () => {
|
|
162
|
+
const { el, waitForChanges } = await make();
|
|
163
|
+
const light = getComputedStyle(q(el, '[part="heading"]')).color;
|
|
164
|
+
document.documentElement.setAttribute('data-theme', 'dark');
|
|
165
|
+
try {
|
|
166
|
+
await waitForChanges();
|
|
167
|
+
await new Promise(r => setTimeout(r, 100));
|
|
168
|
+
expect(getComputedStyle(q(el, '[part="heading"]')).color).not.toBe(light);
|
|
169
|
+
}
|
|
170
|
+
finally {
|
|
171
|
+
document.documentElement.removeAttribute('data-theme');
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
it('passes axe', async () => {
|
|
175
|
+
const { el } = await make();
|
|
176
|
+
await runAxeCheck(el);
|
|
177
|
+
});
|
|
178
|
+
it('uses the Figma level-4 shadow (0 8px 8px) and strengthens it from 12% to 25% black in dark mode', async () => {
|
|
179
|
+
const shadowOf = async (dark) => {
|
|
180
|
+
if (dark)
|
|
181
|
+
document.documentElement.setAttribute('data-theme', 'dark');
|
|
182
|
+
try {
|
|
183
|
+
const { el } = await make();
|
|
184
|
+
const card = q(el, '[part="container"]');
|
|
185
|
+
return getComputedStyle(card.shadowRoot.querySelector('.bs-card')).boxShadow;
|
|
186
|
+
}
|
|
187
|
+
finally {
|
|
188
|
+
document.documentElement.removeAttribute('data-theme');
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
expect(await shadowOf(false)).toBe('rgba(0, 0, 0, 0.12) 0px 8px 8px 0px');
|
|
192
|
+
expect(await shadowOf(true)).toBe('rgba(0, 0, 0, 0.25) 0px 8px 8px 0px');
|
|
193
|
+
});
|
|
194
|
+
});
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
width: var(--bs-keyboard-shortcuts-width);
|
|
4
|
+
min-width: var(--bs-keyboard-shortcuts-width);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
--bs-keyboard-shortcuts-width: 720px;
|
|
7
|
+
--bs-keyboard-shortcuts-bg: var(--bs-surface-base);
|
|
8
|
+
--bs-keyboard-shortcuts-radius: var(--bs-border-radius-150);
|
|
9
|
+
--bs-keyboard-shortcuts-padding: var(--bs-spacing-200);
|
|
10
|
+
--bs-keyboard-shortcuts-gap: var(--bs-spacing-200);
|
|
11
|
+
/* Figma "elevation/level 4": 0 8px 8px in --bs-elevation-higher, which is 12% black in light mode and
|
|
12
|
+
25% black in dark mode, so the shadow strengthens on dark surfaces automatically. */
|
|
13
|
+
--bs-keyboard-shortcuts-shadow: 0 var(--bs-shadow-position-100) var(--bs-shadow-blur-100) 0 var(--bs-elevation-higher);
|
|
14
|
+
--bs-keyboard-shortcuts-column-gap: var(--bs-spacing-600);
|
|
15
|
+
--bs-keyboard-shortcuts-color: var(--bs-text-default);
|
|
16
|
+
--bs-keyboard-shortcuts-color-secondary: var(--bs-text-secondary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.bs-keyboard-shortcuts {
|
|
20
|
+
display: block;
|
|
21
|
+
--bs-card-bg: var(--bs-keyboard-shortcuts-bg);
|
|
22
|
+
--bs-card-radius: var(--bs-keyboard-shortcuts-radius);
|
|
23
|
+
--bs-card-padding: var(--bs-keyboard-shortcuts-padding);
|
|
24
|
+
--bs-card-shadow: var(--bs-keyboard-shortcuts-shadow);
|
|
25
|
+
--bs-card-overflow: visible;
|
|
26
|
+
color: var(--bs-keyboard-shortcuts-color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.bs-keyboard-shortcuts__body {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: var(--bs-keyboard-shortcuts-gap);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.bs-keyboard-shortcuts__head {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
gap: var(--bs-spacing-100);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.bs-keyboard-shortcuts__icon {
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
color: var(--bs-keyboard-shortcuts-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.bs-keyboard-shortcuts__heading {
|
|
47
|
+
flex: 1;
|
|
48
|
+
margin: 0;
|
|
49
|
+
color: var(--bs-keyboard-shortcuts-color);
|
|
50
|
+
font-size: var(--bs-font-size-2xl);
|
|
51
|
+
font-weight: var(--bs-font-weight-bold);
|
|
52
|
+
line-height: calc(var(--bs-line-height-heading-h4) * 1px);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bs-keyboard-shortcuts__switch {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--bs-spacing-200);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.bs-keyboard-shortcuts__switch-text {
|
|
62
|
+
flex: 1;
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: column;
|
|
65
|
+
gap: var(--bs-spacing-25);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.bs-keyboard-shortcuts__switch-title {
|
|
69
|
+
color: var(--bs-keyboard-shortcuts-color);
|
|
70
|
+
font-size: var(--bs-font-size-sm);
|
|
71
|
+
font-weight: var(--bs-font-weight-medium);
|
|
72
|
+
line-height: calc(var(--bs-line-height-body-sm) * 1px);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bs-keyboard-shortcuts__switch-caption {
|
|
76
|
+
color: var(--bs-keyboard-shortcuts-color-secondary);
|
|
77
|
+
font-size: var(--bs-font-size-xs);
|
|
78
|
+
line-height: calc(var(--bs-line-height-caption-sm) * 1px);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.bs-keyboard-shortcuts__live {
|
|
82
|
+
position: absolute;
|
|
83
|
+
width: 1px;
|
|
84
|
+
height: 1px;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
clip-path: inset(50%);
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.bs-keyboard-shortcuts__groups {
|
|
91
|
+
display: grid;
|
|
92
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
93
|
+
column-gap: var(--bs-keyboard-shortcuts-column-gap);
|
|
94
|
+
align-items: start;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.bs-keyboard-shortcuts__column {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
gap: var(--bs-spacing-200);
|
|
101
|
+
min-width: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bs-keyboard-shortcuts__group {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: var(--bs-spacing-25);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.bs-keyboard-shortcuts__group-title {
|
|
111
|
+
color: var(--bs-keyboard-shortcuts-color-secondary);
|
|
112
|
+
font-size: var(--bs-font-size-xs);
|
|
113
|
+
font-weight: var(--bs-font-weight-semibold);
|
|
114
|
+
line-height: calc(var(--bs-line-height-caption-sm) * 1px);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.bs-keyboard-shortcuts__rows {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
gap: var(--bs-spacing-25);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.bs-keyboard-shortcuts__empty {
|
|
124
|
+
margin: 0;
|
|
125
|
+
color: var(--bs-keyboard-shortcuts-color-secondary);
|
|
126
|
+
font-size: var(--bs-font-size-sm);
|
|
127
|
+
line-height: calc(var(--bs-line-height-body-sm) * 1px);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.bs-keyboard-shortcuts__footer {
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
gap: var(--bs-spacing-75);
|
|
134
|
+
color: var(--bs-keyboard-shortcuts-color-secondary);
|
|
135
|
+
font-size: var(--bs-font-size-xs);
|
|
136
|
+
line-height: calc(var(--bs-line-height-caption-sm) * 1px);
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
}
|