@brandsync/wc 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/REFERENCE.md +245 -0
- package/custom-elements.json +5218 -3031
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-a7fb0b59.entry.js → p-0082db6a.entry.js} +1 -1
- package/dist/brandsync-wc/p-07e0b444.entry.js +1 -0
- package/dist/brandsync-wc/{p-5c61eb06.entry.js → p-08e0e704.entry.js} +1 -1
- package/dist/brandsync-wc/{p-35f76ea7.entry.js → p-0a6f22fe.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b02bf1ca.entry.js → p-14b4f4c4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-54d91ac9.entry.js → p-15f06226.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a5659499.entry.js → p-186e3b78.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1bd99669.entry.js → p-1a47774e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-70c650b2.entry.js → p-1a62e5b7.entry.js} +1 -1
- package/dist/brandsync-wc/p-1aa0f9a3.entry.js +1 -0
- package/dist/brandsync-wc/{p-9d740928.entry.js → p-1d8c2ec1.entry.js} +1 -1
- package/dist/brandsync-wc/p-246036cd.entry.js +1 -0
- package/dist/brandsync-wc/{p-d25adab2.entry.js → p-31ca98c3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-84d6d6eb.entry.js → p-344695a8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4f4c0c68.entry.js → p-345b5ef3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e0a9f2d1.entry.js → p-34851d6d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-eb0dc5bf.entry.js → p-348fef11.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d2a15599.entry.js → p-3e6f430a.entry.js} +1 -1
- package/dist/brandsync-wc/{p-065c7e7c.entry.js → p-43f8afda.entry.js} +1 -1
- package/dist/brandsync-wc/{p-361aef36.entry.js → p-47929dca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-67f125e8.entry.js → p-47ce984f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d5a6098d.entry.js → p-4d4997af.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d9184940.entry.js → p-4ff649f1.entry.js} +1 -1
- package/dist/brandsync-wc/p-50c116eb.entry.js +1 -0
- package/dist/brandsync-wc/{p-f3eca1ce.entry.js → p-50f60ed6.entry.js} +1 -1
- package/dist/brandsync-wc/p-52d61070.entry.js +1 -0
- package/dist/brandsync-wc/{p-43d5f708.entry.js → p-55d336da.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f43a7f16.entry.js → p-55d97d1d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b142d8c9.entry.js → p-56a45582.entry.js} +1 -1
- package/dist/brandsync-wc/{p-07673a48.entry.js → p-58179e15.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9396c67e.entry.js → p-5868793d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-90ba3032.entry.js → p-5ac75555.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f82a9f0d.entry.js → p-5cd1abc7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-dfad8c0a.entry.js → p-5e36d46f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-08e96f13.entry.js → p-64f8eb7e.entry.js} +1 -1
- package/dist/brandsync-wc/p-6b019a88.entry.js +1 -0
- package/dist/brandsync-wc/{p-f98dfa85.entry.js → p-6c987bc9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b5710db6.entry.js → p-757cd066.entry.js} +1 -1
- package/dist/brandsync-wc/{p-47b7fe76.entry.js → p-78114ea3.entry.js} +1 -1
- package/dist/brandsync-wc/p-7c29678d.entry.js +1 -0
- package/dist/brandsync-wc/{p-9d12b1fb.entry.js → p-7cfb1be6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-844205d9.entry.js → p-841a80b4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5057e4fe.entry.js → p-87a10ee1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c05ee501.entry.js → p-8962abe0.entry.js} +1 -1
- package/dist/brandsync-wc/p-8e46a262.entry.js +1 -0
- package/dist/brandsync-wc/p-8f82ea7e.entry.js +1 -0
- package/dist/brandsync-wc/p-95c7f350.entry.js +1 -0
- package/dist/brandsync-wc/{p-6ea02b98.entry.js → p-9787bc0f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-be7aac52.entry.js → p-998b95d3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-11d80e17.entry.js → p-9bd739e5.entry.js} +1 -1
- package/dist/brandsync-wc/p-a424a709.entry.js +1 -0
- package/dist/brandsync-wc/{p-4eaa9ed4.entry.js → p-a51355d9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3bad5e1b.entry.js → p-a8c2855c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-61deb48c.entry.js → p-a9d0a730.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2bd30709.entry.js → p-ae207fd5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8048d033.entry.js → p-b1edc9b7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-79fc849c.entry.js → p-b759ae72.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e8ae626d.entry.js → p-b7bbc52f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-aec2dfeb.entry.js → p-bd901b06.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c835afb7.entry.js → p-be7272ce.entry.js} +1 -1
- package/dist/brandsync-wc/{p-857987f9.entry.js → p-bfff7cbb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8134f97c.entry.js → p-c020ffdf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3cb79512.entry.js → p-c02ed03d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a7fa839a.entry.js → p-cb002195.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ffc07eb5.entry.js → p-d3fe8cea.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ffccc1ee.entry.js → p-d42a26c1.entry.js} +1 -1
- package/dist/brandsync-wc/p-d985e569.entry.js +1 -0
- package/dist/brandsync-wc/{p-debc83cc.entry.js → p-e2491db8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fdc168ec.entry.js → p-e32a6df1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-57ff14ca.entry.js → p-e3e15670.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3c6ec5d0.entry.js → p-e4e9c961.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d7956c51.entry.js → p-e99c0937.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ab14a07d.entry.js → p-e9adfa44.entry.js} +1 -1
- package/dist/brandsync-wc/{p-32297416.entry.js → p-eb3bacb9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3d2c62a6.entry.js → p-ee00d3a5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3bdeeb9d.entry.js → p-ee63423c.entry.js} +1 -1
- package/dist/brandsync-wc/p-f4628861.entry.js +1 -0
- package/dist/brandsync-wc/{p-4b460eda.entry.js → p-f47b8673.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8c4dfccb.entry.js → p-f6caa623.entry.js} +1 -1
- package/dist/brandsync-wc/p-f86b58bf.entry.js +1 -0
- package/dist/brandsync-wc/{p-00be9a64.entry.js → p-fa91106e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5b933ff4.entry.js → p-fb84002e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b4511ad3.entry.js → p-fbc219c6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0bbaef51.entry.js → p-fd78ff22.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +1 -1
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +1 -1
- package/dist/cjs/bs-app-recent-item_3.cjs.entry.js +133 -0
- package/dist/cjs/bs-app-shell.cjs.entry.js +1 -1
- package/dist/cjs/bs-app-switcher.cjs.entry.js +208 -0
- package/dist/cjs/bs-attachment-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-attachment.cjs.entry.js +1 -1
- package/dist/cjs/bs-avatar.cjs.entry.js +1 -1
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-carousel.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-filter.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-informative.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-input.cjs.entry.js +1 -1
- package/dist/cjs/bs-citation-preview.cjs.entry.js +1 -1
- package/dist/cjs/bs-command-palette.cjs.entry.js +1 -1
- package/dist/cjs/bs-compact-menu-block_2.cjs.entry.js +46 -0
- package/dist/cjs/bs-company-switcher.cjs.entry.js +211 -0
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-container.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/bs-divider.cjs.entry.js +1 -1
- package/dist/cjs/bs-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-global-search.cjs.entry.js +2 -2
- package/dist/cjs/bs-grid.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-button.cjs.entry.js +8 -1
- package/dist/cjs/bs-icon-tile.cjs.entry.js +10 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/bs-input_3.cjs.entry.js +4 -4
- package/dist/cjs/bs-key-caps.cjs.entry.js +1 -1
- package/dist/cjs/bs-key.cjs.entry.js +1 -1
- package/dist/cjs/bs-keyboard-shortcuts.cjs.entry.js +2 -2
- package/dist/cjs/bs-list-item_2.cjs.entry.js +215 -0
- package/dist/cjs/bs-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-mega-menu.cjs.entry.js +70 -0
- package/dist/cjs/bs-message-list.cjs.entry.js +1 -1
- package/dist/cjs/bs-message.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +5 -2
- package/dist/cjs/bs-page-header.cjs.entry.js +66 -0
- package/dist/cjs/bs-pagination.cjs.entry.js +1 -1
- package/dist/cjs/bs-progress-linear.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress.cjs.entry.js +2 -2
- package/dist/cjs/bs-qr-code.cjs.entry.js +1 -1
- package/dist/cjs/bs-radio.cjs.entry.js +1 -1
- package/dist/cjs/bs-search-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-session-timeout.cjs.entry.js +1 -1
- package/dist/cjs/bs-shortcut-row.cjs.entry.js +1 -1
- package/dist/cjs/bs-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 +8 -0
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +1 -1
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.cmp.test.js +52 -0
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.css +111 -0
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.js +184 -0
- package/dist/collection/components/bs-app-recent-item/bs-app-recent-item.stories.js +28 -0
- package/dist/collection/components/bs-app-shell/bs-app-shell.js +1 -1
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.cmp.test.js +179 -0
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.css +173 -0
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.js +902 -0
- package/dist/collection/components/bs-app-switcher/bs-app-switcher.stories.js +91 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.cmp.test.js +58 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.css +104 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.js +190 -0
- package/dist/collection/components/bs-app-tile/bs-app-tile.stories.js +43 -0
- package/dist/collection/components/bs-attachment/bs-attachment.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-avatar/bs-avatar.css +3 -3
- package/dist/collection/components/bs-badge/bs-badge.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-button/bs-button.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +13 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +27 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.js +1 -1
- package/dist/collection/components/bs-carousel/bs-carousel.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +1 -1
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +1 -1
- package/dist/collection/components/bs-command-palette/bs-command-palette.js +1 -1
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.cmp.test.js +32 -0
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.css +43 -0
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.js +67 -0
- package/dist/collection/components/bs-compact-menu-block/bs-compact-menu-block.stories.js +25 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.cmp.test.js +171 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.css +196 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.js +720 -0
- package/dist/collection/components/bs-company-switcher/bs-company-switcher.stories.js +78 -0
- package/dist/collection/components/bs-composer/bs-composer.js +1 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
- package/dist/collection/components/bs-container/bs-container.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +1 -1
- package/dist/collection/components/bs-divider/bs-divider.js +1 -1
- package/dist/collection/components/bs-empty-state/bs-empty-state.js +1 -1
- package/dist/collection/components/bs-error-page/bs-error-page.js +1 -1
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-global-search/bs-global-search.js +2 -2
- package/dist/collection/components/bs-grid/bs-grid.js +2 -2
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +11 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-key/bs-key.js +1 -1
- package/dist/collection/components/bs-key-caps/bs-key-caps.js +1 -1
- package/dist/collection/components/bs-keyboard-shortcuts/bs-keyboard-shortcuts.js +2 -2
- package/dist/collection/components/bs-list/bs-list.js +1 -1
- package/dist/collection/components/bs-list-item/bs-list-item.js +1 -1
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.cmp.test.js +131 -0
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.css +139 -0
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.js +358 -0
- package/dist/collection/components/bs-mega-menu/bs-mega-menu.stories.js +188 -0
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-block/bs-menu-block.cmp.test.js +44 -0
- package/dist/collection/components/bs-menu-block/bs-menu-block.css +106 -0
- package/dist/collection/components/bs-menu-block/bs-menu-block.js +147 -0
- package/dist/collection/components/bs-menu-block/bs-menu-block.stories.js +36 -0
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-message/bs-message.js +1 -1
- package/dist/collection/components/bs-message-list/bs-message-list.js +1 -1
- package/dist/collection/components/bs-page-header/bs-page-header.cmp.test.js +206 -0
- package/dist/collection/components/bs-page-header/bs-page-header.css +252 -0
- package/dist/collection/components/bs-page-header/bs-page-header.js +351 -0
- package/dist/collection/components/bs-page-header/bs-page-header.stories.js +177 -0
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-popover/bs-popover.js +1 -1
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-search-item/bs-search-item.js +1 -1
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
- package/dist/collection/components/bs-shortcut-row/bs-shortcut-row.js +1 -1
- package/dist/collection/components/bs-skeleton/bs-skeleton.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-spinner/bs-spinner.js +1 -1
- package/dist/collection/components/bs-split-pane/bs-split-pane.js +1 -1
- package/dist/collection/components/bs-stack/bs-stack.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +2 -2
- package/dist/collection/components/bs-toast/bs-toast.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +1 -1
- package/dist/collection/components/bs-tree/bs-tree.js +1 -1
- package/dist/collection/components/bs-tree-item/bs-tree-item.js +2 -2
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -2
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.js +79 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +46 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +10 -1
- package/dist/components/bs-accordion-group.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-app-recent-item.d.ts +11 -0
- package/dist/components/bs-app-recent-item.js +1 -0
- package/dist/components/bs-app-shell.js +1 -1
- package/dist/components/bs-app-switcher.d.ts +11 -0
- package/dist/components/bs-app-switcher.js +1 -0
- package/dist/components/bs-app-tile.d.ts +11 -0
- package/dist/components/bs-app-tile.js +1 -0
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-avatar.js +1 -1
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-carousel.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-checkbox.js +1 -1
- package/dist/components/bs-chip-filter.js +1 -1
- package/dist/components/bs-chip-informative.js +1 -1
- package/dist/components/bs-chip-input.js +1 -1
- package/dist/components/bs-citation-preview.js +1 -1
- package/dist/components/bs-command-palette.js +1 -1
- package/dist/components/bs-compact-menu-block.d.ts +11 -0
- package/dist/components/bs-compact-menu-block.js +1 -0
- package/dist/components/bs-company-switcher.d.ts +11 -0
- package/dist/components/bs-company-switcher.js +1 -0
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-container.js +1 -1
- package/dist/components/bs-cookie-consent.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.js +1 -1
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-divider.js +1 -1
- package/dist/components/bs-empty-state.js +1 -1
- package/dist/components/bs-error-page.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-global-search.js +1 -1
- package/dist/components/bs-grid.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-icon-tile.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-key-caps.js +1 -1
- package/dist/components/bs-key.js +1 -1
- package/dist/components/bs-keyboard-shortcuts.js +1 -1
- package/dist/components/bs-list-item.js +1 -1
- package/dist/components/bs-list.js +1 -1
- package/dist/components/bs-mega-menu.d.ts +11 -0
- package/dist/components/bs-mega-menu.js +1 -0
- package/dist/components/bs-menu-block.d.ts +11 -0
- package/dist/components/bs-menu-block.js +1 -0
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-message-list.js +1 -1
- package/dist/components/bs-message.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-onboarding-checklist.js +1 -1
- package/dist/components/bs-page-header.d.ts +11 -0
- package/dist/components/bs-page-header.js +1 -0
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-popover.js +1 -1
- package/dist/components/bs-product-tour.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-qr-code.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-search-item.js +1 -1
- package/dist/components/bs-session-timeout.js +1 -1
- package/dist/components/bs-shortcut-row.js +1 -1
- package/dist/components/bs-side-panel.js +1 -1
- package/dist/components/bs-skeleton.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-spinner.js +1 -1
- package/dist/components/bs-split-pane.js +1 -1
- package/dist/components/bs-stack.js +1 -1
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-timepicker.js +1 -1
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip-trigger.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/bs-tree-item.js +1 -1
- package/dist/components/bs-tree.js +1 -1
- package/dist/components/bs-whats-new-entry.js +1 -1
- package/dist/components/bs-whats-new.js +1 -1
- package/dist/components/p-B6KgEbdM.js +1 -0
- package/dist/components/{p-DYDk73TF.js → p-B8kw9EOx.js} +1 -1
- package/dist/components/p-BLPNwyiT.js +1 -0
- package/dist/components/{p-D8bvv9QQ.js → p-BP1l6Q3Z.js} +1 -1
- package/dist/components/p-BS7ySxJZ.js +1 -0
- package/dist/components/{p-DYuzgzxI.js → p-BmdSbmFg.js} +1 -1
- package/dist/components/{p-CRtvJlh8.js → p-C1owRphU.js} +1 -1
- package/dist/components/{p-TAY9S9yG.js → p-C2rRVRIu.js} +1 -1
- package/dist/components/p-C3erqJFy.js +1 -0
- package/dist/components/{p-BcYNrEOB.js → p-Cd7p-48Q.js} +1 -1
- package/dist/components/{p-DtYTs9Kh.js → p-CmlzHRkn.js} +1 -1
- package/dist/components/{p-Bp3DIxjT.js → p-Co36mHEU.js} +1 -1
- package/dist/components/p-D4_8H0vn.js +1 -0
- package/dist/components/{p-DMLfXpva.js → p-D9dDFyPB.js} +1 -1
- package/dist/components/{p-DvNED6Lb.js → p-DBvhi__l.js} +1 -1
- package/dist/components/{p-CRM1wIX9.js → p-DFd4pP4i.js} +1 -1
- package/dist/components/{p-BUpnOUIM.js → p-DVjuZdjF.js} +1 -1
- package/dist/components/{p-D7AXo5NT.js → p-DW0Dw2LS.js} +1 -1
- package/dist/components/p-DcdFuKG9.js +1 -0
- package/dist/components/{p-CH5atin4.js → p-Deq0LzGO.js} +1 -1
- package/dist/components/p-DgY5pxXd.js +1 -0
- package/dist/components/{p-w-DkdA4O.js → p-DhhXayh6.js} +1 -1
- package/dist/components/p-DiORQQg3.js +1 -0
- package/dist/components/{p-Dt4JNhHT.js → p-Dl0FedE5.js} +1 -1
- package/dist/components/p-DsBToIYE.js +1 -0
- package/dist/components/{p-DG9eT5yi.js → p-DtbeCgXo.js} +1 -1
- package/dist/components/{p-DcjgRtSQ.js → p-DzvXbBvk.js} +1 -1
- package/dist/components/{p-CervX0wH.js → p-I1_Q3HQu.js} +1 -1
- package/dist/components/{p-Cpe2k7ZC.js → p-TXAiCnSZ.js} +1 -1
- package/dist/components/p-c-g3-oVu.js +1 -0
- package/dist/components/p-erdtytMq.js +1 -0
- package/dist/components/{p-BDnZvjlq.js → p-qXdgl7VG.js} +1 -1
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-accordion-group.entry.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +1 -1
- package/dist/esm/bs-ai-greeting.entry.js +1 -1
- package/dist/esm/bs-ai-thinking.entry.js +1 -1
- package/dist/esm/bs-app-recent-item_3.entry.js +129 -0
- package/dist/esm/bs-app-shell.entry.js +1 -1
- package/dist/esm/bs-app-switcher.entry.js +206 -0
- package/dist/esm/bs-attachment-list.entry.js +1 -1
- package/dist/esm/bs-attachment.entry.js +1 -1
- package/dist/esm/bs-avatar.entry.js +1 -1
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +1 -1
- package/dist/esm/bs-breadcrumb.entry.js +1 -1
- package/dist/esm/bs-breadcrumbs.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-button.entry.js +1 -1
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-carousel.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +1 -1
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +1 -1
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-checkbox-skeleton.entry.js +1 -1
- package/dist/esm/bs-checkbox.entry.js +1 -1
- package/dist/esm/bs-chip-filter.entry.js +1 -1
- package/dist/esm/bs-chip-informative.entry.js +1 -1
- package/dist/esm/bs-chip-input.entry.js +1 -1
- package/dist/esm/bs-citation-preview.entry.js +1 -1
- package/dist/esm/bs-command-palette.entry.js +1 -1
- package/dist/esm/bs-compact-menu-block_2.entry.js +43 -0
- package/dist/esm/bs-company-switcher.entry.js +209 -0
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-container.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-datepicker.entry.js +1 -1
- package/dist/esm/bs-divider.entry.js +1 -1
- package/dist/esm/bs-empty-state.entry.js +1 -1
- package/dist/esm/bs-error-page.entry.js +1 -1
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-global-search.entry.js +2 -2
- package/dist/esm/bs-grid.entry.js +2 -2
- package/dist/esm/bs-icon-button.entry.js +8 -1
- package/dist/esm/bs-icon-tile.entry.js +11 -3
- package/dist/esm/bs-inline-tab.entry.js +1 -1
- package/dist/esm/bs-input_3.entry.js +4 -4
- package/dist/esm/bs-key-caps.entry.js +1 -1
- package/dist/esm/bs-key.entry.js +1 -1
- package/dist/esm/bs-keyboard-shortcuts.entry.js +2 -2
- package/dist/esm/bs-list-item_2.entry.js +212 -0
- package/dist/esm/bs-list.entry.js +1 -1
- package/dist/esm/bs-mega-menu.entry.js +68 -0
- package/dist/esm/bs-message-list.entry.js +1 -1
- package/dist/esm/bs-message.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer.entry.js +2 -2
- package/dist/esm/bs-navigation-header.entry.js +5 -2
- package/dist/esm/bs-page-header.entry.js +64 -0
- package/dist/esm/bs-pagination.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +2 -2
- package/dist/esm/bs-progress.entry.js +2 -2
- package/dist/esm/bs-qr-code.entry.js +1 -1
- package/dist/esm/bs-radio.entry.js +1 -1
- package/dist/esm/bs-search-item.entry.js +1 -1
- package/dist/esm/bs-session-timeout.entry.js +1 -1
- package/dist/esm/bs-shortcut-row.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-app-recent-item/bs-app-recent-item.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-app-recent-item/bs-app-recent-item.d.ts +51 -0
- package/dist/types/components/bs-app-recent-item/bs-app-recent-item.stories.d.ts +15 -0
- package/dist/types/components/bs-app-switcher/bs-app-switcher.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-app-switcher/bs-app-switcher.d.ts +159 -0
- package/dist/types/components/bs-app-switcher/bs-app-switcher.stories.d.ts +34 -0
- package/dist/types/components/bs-app-tile/bs-app-tile.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-app-tile/bs-app-tile.d.ts +51 -0
- package/dist/types/components/bs-app-tile/bs-app-tile.stories.d.ts +18 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +7 -0
- package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.d.ts +28 -0
- package/dist/types/components/bs-compact-menu-block/bs-compact-menu-block.stories.d.ts +10 -0
- package/dist/types/components/bs-company-switcher/bs-company-switcher.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-company-switcher/bs-company-switcher.d.ts +130 -0
- package/dist/types/components/bs-company-switcher/bs-company-switcher.stories.d.ts +25 -0
- package/dist/types/components/bs-icon-tile/bs-icon-tile.d.ts +5 -0
- package/dist/types/components/bs-mega-menu/bs-mega-menu.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-mega-menu/bs-mega-menu.d.ts +110 -0
- package/dist/types/components/bs-mega-menu/bs-mega-menu.stories.d.ts +55 -0
- package/dist/types/components/bs-menu-block/bs-menu-block.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-menu-block/bs-menu-block.d.ts +47 -0
- package/dist/types/components/bs-menu-block/bs-menu-block.stories.d.ts +15 -0
- package/dist/types/components/bs-page-header/bs-page-header.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-page-header/bs-page-header.d.ts +100 -0
- package/dist/types/components/bs-page-header/bs-page-header.stories.d.ts +41 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.d.ts +7 -1
- package/dist/types/components.d.ts +2047 -24
- package/dist/types/svg-inline.d.ts +5 -0
- package/package.json +2 -1
- package/reference.d.ts +26 -2
- package/reference.json +947 -56
- package/dist/brandsync-wc/p-044ac86c.entry.js +0 -1
- package/dist/brandsync-wc/p-225148be.entry.js +0 -1
- package/dist/brandsync-wc/p-3789c7a5.entry.js +0 -1
- package/dist/brandsync-wc/p-3d7b0708.entry.js +0 -1
- package/dist/brandsync-wc/p-5eb5795f.entry.js +0 -1
- package/dist/brandsync-wc/p-7ed071fb.entry.js +0 -1
- package/dist/brandsync-wc/p-baa39c08.entry.js +0 -1
- package/dist/brandsync-wc/p-dcbeb143.entry.js +0 -1
- package/dist/brandsync-wc/p-e123b391.entry.js +0 -1
- package/dist/brandsync-wc/p-e8e22238.entry.js +0 -1
- package/dist/cjs/bs-list-item.cjs.entry.js +0 -66
- package/dist/cjs/bs-popover.cjs.entry.js +0 -153
- package/dist/cjs/bs-skeleton.cjs.entry.js +0 -51
- package/dist/components/p-B32Kl4IB.js +0 -1
- package/dist/components/p-BcbaiZLh.js +0 -1
- package/dist/components/p-CYzBTzzf.js +0 -1
- package/dist/components/p-ChcaPfNL.js +0 -1
- package/dist/esm/bs-list-item.entry.js +0 -64
- package/dist/esm/bs-popover.entry.js +0 -151
- package/dist/esm/bs-skeleton.entry.js +0 -49
|
@@ -0,0 +1,720 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
let uid = 0;
|
|
3
|
+
const svgProps = {
|
|
4
|
+
viewBox: '0 0 24 24',
|
|
5
|
+
fill: 'none',
|
|
6
|
+
stroke: 'currentColor',
|
|
7
|
+
'stroke-width': '1.8',
|
|
8
|
+
'stroke-linecap': 'round',
|
|
9
|
+
'stroke-linejoin': 'round',
|
|
10
|
+
'aria-hidden': 'true',
|
|
11
|
+
};
|
|
12
|
+
const initialsOf = (name) => name
|
|
13
|
+
.split(/\s+/)
|
|
14
|
+
.filter(Boolean)
|
|
15
|
+
.slice(0, 2)
|
|
16
|
+
.map(w => w[0].toUpperCase())
|
|
17
|
+
.join('');
|
|
18
|
+
const digits = (s) => s.replace(/\s+/g, '');
|
|
19
|
+
/**
|
|
20
|
+
* A company (tenant) switcher: a trigger showing the current company, and a panel to find and switch to
|
|
21
|
+
* another one. The panel has a search field, the current / recent / all groups, a filtered "matches" view,
|
|
22
|
+
* a no-results state and a footer with "Manage Companies" and "Add companies" actions.
|
|
23
|
+
*
|
|
24
|
+
* Built from `bs-popover` (open/close, Escape, outside click, flipping), `bs-card` (panel surface),
|
|
25
|
+
* `bs-input` (search), `bs-list-item` (rows), `bs-avatar` (initials), `bs-spinner` (switching),
|
|
26
|
+
* `bs-empty-state` (no results), `bs-divider` and `bs-button` (footer). The trigger is a native `<button>`:
|
|
27
|
+
* no `bs-*` component is a composite "avatar + two lines + chevron" button.
|
|
28
|
+
*
|
|
29
|
+
* ## When to use
|
|
30
|
+
* - An app header or side navigation where a user belongs to several companies and works in one at a time.
|
|
31
|
+
*
|
|
32
|
+
* ## When not to use
|
|
33
|
+
* - Picking a value in a form -- use `bs-input type="dropdown"`.
|
|
34
|
+
* - Switching between a handful of fixed views -- use `bs-tab`.
|
|
35
|
+
*
|
|
36
|
+
* `companies` is an array and must be set as a JS property. You own the data and the switch itself: listen to
|
|
37
|
+
* `bsCompanySwitch`, do the work, then update `currentId`. To show the switching state set `switchingId`
|
|
38
|
+
* (from the `bsCompanySwitch` handler, or later) and the panel stays open until you clear it and set `open`
|
|
39
|
+
* to `false`. If `switchingId` is not set by the time the handler returns, the panel closes immediately.
|
|
40
|
+
*
|
|
41
|
+
* @part trigger - The trigger button.
|
|
42
|
+
* @part avatar - The trigger's `bs-avatar`.
|
|
43
|
+
* @part name - The company name in the trigger.
|
|
44
|
+
* @part subtitle - The org. number (or "Switching…") line in the trigger.
|
|
45
|
+
* @part panel - The panel surface (`bs-card`).
|
|
46
|
+
* @part search - The search field wrapper (combobox).
|
|
47
|
+
* @part list - The listbox.
|
|
48
|
+
* @part group - One group (header and rows).
|
|
49
|
+
* @part group-header - A group header.
|
|
50
|
+
* @part row - A company row (`bs-list-item`).
|
|
51
|
+
* @part empty - The no-results state (`bs-empty-state`).
|
|
52
|
+
* @part footer - The footer actions.
|
|
53
|
+
* @prop --bs-company-switcher-width - Trigger width. Defaults to `260px` (Figma); capped at 100%.
|
|
54
|
+
* @prop --bs-company-switcher-panel-width - Panel width. Defaults to `360px` (Figma); capped at the viewport.
|
|
55
|
+
* @prop --bs-company-switcher-radius - Trigger and panel corner radius. Aliased to `--bs-border-radius-100`.
|
|
56
|
+
* @prop --bs-company-switcher-trigger-bg - Trigger resting background. `transparent`.
|
|
57
|
+
* @prop --bs-company-switcher-trigger-bg-hover - Aliased to `--bs-surface-hover`.
|
|
58
|
+
* @prop --bs-company-switcher-trigger-bg-pressed - Aliased to `--bs-surface-pressed`.
|
|
59
|
+
* @prop --bs-company-switcher-trigger-bg-open - Aliased to `--bs-surface-selected`.
|
|
60
|
+
* @prop --bs-company-switcher-focus-ring - Trigger focus outline. Aliased to `--bs-border-neutral-focus`.
|
|
61
|
+
* @prop --bs-company-switcher-panel-bg - Panel background. Aliased to `--bs-surface-base`.
|
|
62
|
+
* @prop --bs-company-switcher-panel-border-color - Panel border. Aliased to `--bs-border-default`.
|
|
63
|
+
* @prop --bs-company-switcher-shadow - Panel shadow. Aliased to `--bs-shadow-md`.
|
|
64
|
+
* @prop --bs-company-switcher-max-height - Maximum height of the scrolling list. Defaults to `320px`.
|
|
65
|
+
* @prop --bs-company-switcher-text-color - Names. Aliased to `--bs-text-default`.
|
|
66
|
+
* @prop --bs-company-switcher-muted-color - Org. numbers. Aliased to `--bs-text-secondary`.
|
|
67
|
+
* @prop --bs-company-switcher-header-color - Group headers. Aliased to `--bs-text-muted`.
|
|
68
|
+
* @prop --bs-company-switcher-z-index - Panel stacking. Aliased to `--bs-z-index-popover`.
|
|
69
|
+
*/
|
|
70
|
+
export class BsCompanySwitcher {
|
|
71
|
+
el;
|
|
72
|
+
id = `bs-cs-${++uid}`;
|
|
73
|
+
inputEl;
|
|
74
|
+
focusSearch = false;
|
|
75
|
+
/** The companies the user can switch between. JS property only (an array cannot be an attribute). */
|
|
76
|
+
companies = [];
|
|
77
|
+
/** `id` of the current company. */
|
|
78
|
+
currentId;
|
|
79
|
+
/** `id`s of recently used companies, most recent first. The current company is not repeated in the Recent group. */
|
|
80
|
+
recentIds = [];
|
|
81
|
+
/** `id` of the company being switched to. Shows the switching state: a spinner in the trigger and on that row. */
|
|
82
|
+
switchingId;
|
|
83
|
+
/** Whether the panel is open. */
|
|
84
|
+
open = false;
|
|
85
|
+
/** Text of the trigger when there is no current company. */
|
|
86
|
+
placeholderLabel = 'Select a company';
|
|
87
|
+
/** Placeholder (and accessible name) of the search field. */
|
|
88
|
+
searchPlaceholder = 'Find a company or org. number';
|
|
89
|
+
/** Accessible name of the company listbox. */
|
|
90
|
+
listLabel = 'Companies';
|
|
91
|
+
/** Header of the current company group. */
|
|
92
|
+
currentLabel = 'Current';
|
|
93
|
+
/** Header of the recent companies group. */
|
|
94
|
+
recentLabel = 'Recent';
|
|
95
|
+
/** Header of the all companies group (the count is appended). */
|
|
96
|
+
allLabel = 'All companies';
|
|
97
|
+
/** Header of the search view when there are several matches ("3 matches"). */
|
|
98
|
+
matchesLabel = 'matches';
|
|
99
|
+
/** Header of the search view when there is one match ("1 match"). */
|
|
100
|
+
matchLabel = 'match';
|
|
101
|
+
/** Prefix of the org. number, e.g. "Org. no.". */
|
|
102
|
+
orgNumberLabel = 'Org. no.';
|
|
103
|
+
/** Trigger subtitle while switching. */
|
|
104
|
+
switchingLabel = 'Switching…';
|
|
105
|
+
/** No-results heading. `{query}` is replaced by the query. */
|
|
106
|
+
emptyHeading = 'No companies match “{query}”';
|
|
107
|
+
/** No-results description. */
|
|
108
|
+
emptyDescription = 'Check the spelling, or search by org. number.';
|
|
109
|
+
/** Text of the "Manage Companies" footer button. */
|
|
110
|
+
manageLabel = 'Manage Companies';
|
|
111
|
+
/** Text of the "Add companies" footer button. */
|
|
112
|
+
addLabel = 'Add companies';
|
|
113
|
+
query = '';
|
|
114
|
+
activeId = null;
|
|
115
|
+
/** Fires when a company other than the current one is chosen (click or Enter), with the company. */
|
|
116
|
+
bsCompanySwitch;
|
|
117
|
+
/** Fires when "Manage Companies" is pressed. */
|
|
118
|
+
bsManageCompanies;
|
|
119
|
+
/** Fires when "Add companies" is pressed. */
|
|
120
|
+
bsAddCompanies;
|
|
121
|
+
/** Fires when the panel opens or closes through user interaction, with the new state. */
|
|
122
|
+
bsOpenChange;
|
|
123
|
+
onOpen(next) {
|
|
124
|
+
this.query = '';
|
|
125
|
+
this.activeId = null;
|
|
126
|
+
this.focusSearch = next;
|
|
127
|
+
}
|
|
128
|
+
componentDidRender() {
|
|
129
|
+
if (this.open && this.focusSearch) {
|
|
130
|
+
this.focusSearch = false;
|
|
131
|
+
this.inputEl?.focus();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
byId(id) {
|
|
135
|
+
return id ? this.companies.find(c => c.id === id) : undefined;
|
|
136
|
+
}
|
|
137
|
+
get q() {
|
|
138
|
+
return this.query.trim().toLowerCase();
|
|
139
|
+
}
|
|
140
|
+
matches() {
|
|
141
|
+
const q = this.q;
|
|
142
|
+
const qd = digits(q);
|
|
143
|
+
return this.companies.filter(c => c.name.toLowerCase().includes(q) || digits(c.orgNumber).includes(qd));
|
|
144
|
+
}
|
|
145
|
+
groups() {
|
|
146
|
+
if (this.q) {
|
|
147
|
+
const items = this.matches();
|
|
148
|
+
if (!items.length)
|
|
149
|
+
return [];
|
|
150
|
+
return [{ key: 'matches', header: `${items.length} ${items.length === 1 ? this.matchLabel : this.matchesLabel}`, items }];
|
|
151
|
+
}
|
|
152
|
+
const current = this.byId(this.currentId);
|
|
153
|
+
const recent = this.recentIds.map(i => this.byId(i)).filter((c) => !!c && c.id !== this.currentId);
|
|
154
|
+
const shown = new Set([current?.id, ...recent.map(c => c.id)]);
|
|
155
|
+
const rest = this.companies.filter(c => !shown.has(c.id));
|
|
156
|
+
const out = [];
|
|
157
|
+
if (current)
|
|
158
|
+
out.push({ key: 'current', header: this.currentLabel, items: [current] });
|
|
159
|
+
if (recent.length)
|
|
160
|
+
out.push({ key: 'recent', header: this.recentLabel, items: recent });
|
|
161
|
+
if (rest.length)
|
|
162
|
+
out.push({ key: 'all', header: `${this.allLabel} · ${rest.length}`, items: rest });
|
|
163
|
+
return out;
|
|
164
|
+
}
|
|
165
|
+
rowId(c) {
|
|
166
|
+
return `${this.id}-opt-${c.id}`;
|
|
167
|
+
}
|
|
168
|
+
setOpen(next) {
|
|
169
|
+
if (this.open === next)
|
|
170
|
+
return;
|
|
171
|
+
this.open = next;
|
|
172
|
+
this.bsOpenChange.emit(next);
|
|
173
|
+
}
|
|
174
|
+
choose(c) {
|
|
175
|
+
if (c.id === this.currentId || c.id === this.switchingId) {
|
|
176
|
+
this.setOpen(false);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this.bsCompanySwitch.emit(c);
|
|
180
|
+
// The consumer asks for the switching state from its handler; otherwise there is nothing to wait for.
|
|
181
|
+
if (!this.switchingId)
|
|
182
|
+
this.setOpen(false);
|
|
183
|
+
}
|
|
184
|
+
onPopoverOpenChange = (ev) => {
|
|
185
|
+
// bs-popover's own event would bubble out of this host too; ours replaces it.
|
|
186
|
+
ev.stopPropagation();
|
|
187
|
+
this.setOpen(ev.detail);
|
|
188
|
+
};
|
|
189
|
+
onInput = (ev) => {
|
|
190
|
+
ev.stopPropagation();
|
|
191
|
+
this.query = ev.detail;
|
|
192
|
+
this.activeId = null;
|
|
193
|
+
};
|
|
194
|
+
onKeyDown = (ev) => {
|
|
195
|
+
if (ev.key !== 'ArrowDown' && ev.key !== 'ArrowUp' && ev.key !== 'Enter')
|
|
196
|
+
return;
|
|
197
|
+
const rows = this.groups().flatMap(g => g.items);
|
|
198
|
+
if (ev.key === 'Enter') {
|
|
199
|
+
const active = rows.find(c => this.rowId(c) === this.activeId);
|
|
200
|
+
if (active) {
|
|
201
|
+
ev.preventDefault();
|
|
202
|
+
this.choose(active);
|
|
203
|
+
}
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
ev.preventDefault();
|
|
207
|
+
if (!rows.length)
|
|
208
|
+
return;
|
|
209
|
+
const idx = rows.findIndex(c => this.rowId(c) === this.activeId);
|
|
210
|
+
const next = ev.key === 'ArrowDown' ? (idx + 1) % rows.length : idx <= 0 ? rows.length - 1 : idx - 1;
|
|
211
|
+
this.activeId = this.rowId(rows[next]);
|
|
212
|
+
// Wait for the re-render so the row exists with its new state before scrolling to it.
|
|
213
|
+
requestAnimationFrame(() => this.el.shadowRoot?.getElementById(this.activeId ?? '')?.scrollIntoView?.({ block: 'nearest' }));
|
|
214
|
+
};
|
|
215
|
+
subtitle(c) {
|
|
216
|
+
return `${c.country} · ${this.orgNumberLabel} ${c.orgNumber}`;
|
|
217
|
+
}
|
|
218
|
+
renderTrigger() {
|
|
219
|
+
const switching = this.byId(this.switchingId);
|
|
220
|
+
const shown = switching ?? this.byId(this.currentId);
|
|
221
|
+
return (h("button", { slot: "trigger", part: "trigger", type: "button", class: "bs-company-switcher__trigger", "aria-haspopup": "listbox", "aria-expanded": String(this.open), "aria-busy": switching ? 'true' : undefined }, h("span", { "aria-hidden": "true", class: "bs-company-switcher__avatar" }, shown ? h("bs-avatar", { part: "avatar", type: "initials", size: "sm", initials: initialsOf(shown.name) }) : h("bs-avatar", { part: "avatar", type: "icon", size: "sm" })), h("span", { class: "bs-company-switcher__text" }, h("span", { part: "name", class: "bs-company-switcher__name" }, shown ? shown.name : this.placeholderLabel), shown && (h("span", { part: "subtitle", class: "bs-company-switcher__subtitle" }, switching ? this.switchingLabel : `${this.orgNumberLabel} ${shown.orgNumber}`))), switching ? (h("bs-spinner", { class: "bs-company-switcher__trail", size: "sm", label: this.switchingLabel })) : (h("svg", { class: "bs-company-switcher__trail bs-company-switcher__chevron", ...svgProps }, h("path", { d: "m6 9 6 6 6-6" })))));
|
|
222
|
+
}
|
|
223
|
+
renderRow(c) {
|
|
224
|
+
const id = this.rowId(c);
|
|
225
|
+
const isCurrent = c.id === this.currentId;
|
|
226
|
+
const isSwitching = c.id === this.switchingId;
|
|
227
|
+
return (h("bs-list-item", { part: "row", id: id, class: { 'bs-company-switcher__row': true, 'bs-company-switcher__row--active': this.activeId === id }, selectionRole: "option", value: c.id, selected: isCurrent, "aria-busy": isSwitching ? 'true' : undefined, onMouseEnter: () => (this.activeId = id), onBsItemClick: (ev) => {
|
|
228
|
+
ev.stopPropagation();
|
|
229
|
+
this.choose(c);
|
|
230
|
+
} }, h("span", { slot: "leading", "aria-hidden": "true" }, h("bs-avatar", { type: "initials", size: "sm", initials: initialsOf(c.name) })), h("span", { class: "bs-company-switcher__row-name" }, c.name), h("span", { class: "bs-company-switcher__row-sub" }, this.subtitle(c)), isSwitching ? (h("bs-spinner", { slot: "trailing", size: "sm", label: this.switchingLabel })) : isCurrent ? (h("svg", { slot: "trailing", class: "bs-company-switcher__check", ...svgProps }, h("path", { d: "m5 12.5 4.5 4.5L19 7.5" }))) : null));
|
|
231
|
+
}
|
|
232
|
+
render() {
|
|
233
|
+
const groups = this.groups();
|
|
234
|
+
const empty = !!this.q && groups.length === 0;
|
|
235
|
+
const listId = `${this.id}-listbox`;
|
|
236
|
+
const total = groups.reduce((n, g) => n + g.items.length, 0);
|
|
237
|
+
return (h("bs-popover", { key: 'cc655dc39514e72df47d69f8be630970be76b37f', class: "bs-company-switcher", open: this.open, placement: "bottom-start", onBsOpenChange: this.onPopoverOpenChange }, this.renderTrigger(), h("bs-card", { key: 'baf9e5cfd4e730962070dbdee2b3bf686f42ad97', part: "panel", class: "bs-company-switcher__panel", surface: "base" }, h("div", { key: 'e71781a9c7ad79eab8d850bb5f681ee1791178f4', class: "bs-company-switcher__search", onMouseDown: (ev) => ev.preventDefault() }, h("div", { key: 'f80b6e79ea19bcb8338f336775396409aae0dcf3', part: "search", role: "combobox", "aria-label": this.searchPlaceholder, "aria-expanded": "true", "aria-haspopup": "listbox", "aria-controls": groups.length ? listId : undefined, "aria-activedescendant": this.activeId ?? undefined, onKeyDown: this.onKeyDown }, h("bs-input", { key: '8bd76cccf990cc6b465a5f359d1dd0f1c48b315e', ref: el => (this.inputEl = el), type: "search", value: this.query, placeholder: this.searchPlaceholder, onBsInput: this.onInput }))), groups.length > 0 && (h("div", { key: '67d0149206610be71f55eed12b0a355e0cab16dd', id: listId, part: "list", class: "bs-company-switcher__list", role: "listbox", "aria-label": this.listLabel, onMouseDown: (ev) => ev.preventDefault(), onMouseLeave: () => (this.activeId = null) }, groups.map(g => {
|
|
238
|
+
const hid = `${this.id}-h-${g.key}`;
|
|
239
|
+
return (h("div", { part: "group", class: "bs-company-switcher__group", role: "group", "aria-labelledby": hid }, h("div", { part: "group-header", id: hid, class: "bs-company-switcher__group-header" }, g.header), g.items.map(c => this.renderRow(c))));
|
|
240
|
+
}))), empty && (h("bs-empty-state", { key: 'a7f485949bee4ed76fffe78b2a5d78279c172d22', part: "empty", class: "bs-company-switcher__empty", heading: this.emptyHeading.replace('{query}', this.query.trim()), description: this.emptyDescription }, h("svg", { key: '12885c0dc593629552f33d38e40180cd8ffaec04', slot: "icon", ...svgProps }, h("circle", { key: '8ee00209929c17a73243ca35c6f035ff86280147', cx: "11", cy: "11", r: "7" }), h("path", { key: '8c87279536c3a2f1945d2e9ed40362283b05c7e5', d: "m20 20-3.5-3.5" })))), h("bs-divider", { key: '6dc7d75e3050ef689a9c24bd925a8afa9e425270', class: "bs-company-switcher__divider", decorative: true }), h("div", { key: '5e0dc791b9c79bfd2ddf87798070bc985ff15000', part: "footer", class: "bs-company-switcher__footer" }, h("bs-button", { key: '159eb21eb73724bd6fc395b2a06a8cc03dc656dd', variant: "subtle", size: "sm", onClick: () => this.bsManageCompanies.emit() }, h("svg", { key: '56981b99ff02d600fb392492894d3e677b6c3baa', slot: "icon", ...svgProps }, h("circle", { key: 'e5113734e7139e5dbf4e1a51bb653206efa8a523', cx: "12", cy: "12", r: "3" }), h("path", { key: '371976988bd2c5ccdbdc98495256ee447223a88a', d: "M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1Z" })), this.manageLabel), h("bs-button", { key: '0f5c57df82c038e7f273d66d52e6bcf1a656b521', variant: "subtle", size: "sm", onClick: () => this.bsAddCompanies.emit() }, h("svg", { key: 'bd03689d5a44537f3b98fa728012e91f9f1fa923', slot: "icon", ...svgProps }, h("path", { key: '09a64a5cd36d3dfaa8924b69bd887d5a4f4cefd6', d: "M12 5v14M5 12h14" })), this.addLabel)), h("span", { key: '2c2123c995f2b891e7f73869c0d8cc8384b7e01b', class: "bs-company-switcher__live", "aria-live": "polite" }, this.open && this.q ? (empty ? this.emptyHeading.replace('{query}', this.query.trim()) : `${total} ${total === 1 ? this.matchLabel : this.matchesLabel}`) : ''))));
|
|
241
|
+
}
|
|
242
|
+
static get is() { return "bs-company-switcher"; }
|
|
243
|
+
static get encapsulation() { return "shadow"; }
|
|
244
|
+
static get originalStyleUrls() {
|
|
245
|
+
return {
|
|
246
|
+
"$": ["bs-company-switcher.css"]
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
static get styleUrls() {
|
|
250
|
+
return {
|
|
251
|
+
"$": ["bs-company-switcher.css"]
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
static get properties() {
|
|
255
|
+
return {
|
|
256
|
+
"companies": {
|
|
257
|
+
"type": "unknown",
|
|
258
|
+
"mutable": false,
|
|
259
|
+
"complexType": {
|
|
260
|
+
"original": "BsCompany[]",
|
|
261
|
+
"resolved": "BsCompany[]",
|
|
262
|
+
"references": {
|
|
263
|
+
"BsCompany": {
|
|
264
|
+
"location": "local",
|
|
265
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-company-switcher/bs-company-switcher.tsx",
|
|
266
|
+
"id": "src/components/bs-company-switcher/bs-company-switcher.tsx::BsCompany"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": false,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [],
|
|
274
|
+
"text": "The companies the user can switch between. JS property only (an array cannot be an attribute)."
|
|
275
|
+
},
|
|
276
|
+
"getter": false,
|
|
277
|
+
"setter": false,
|
|
278
|
+
"defaultValue": "[]"
|
|
279
|
+
},
|
|
280
|
+
"currentId": {
|
|
281
|
+
"type": "string",
|
|
282
|
+
"mutable": true,
|
|
283
|
+
"complexType": {
|
|
284
|
+
"original": "string",
|
|
285
|
+
"resolved": "string",
|
|
286
|
+
"references": {}
|
|
287
|
+
},
|
|
288
|
+
"required": false,
|
|
289
|
+
"optional": true,
|
|
290
|
+
"docs": {
|
|
291
|
+
"tags": [],
|
|
292
|
+
"text": "`id` of the current company."
|
|
293
|
+
},
|
|
294
|
+
"getter": false,
|
|
295
|
+
"setter": false,
|
|
296
|
+
"reflect": false,
|
|
297
|
+
"attribute": "current-id"
|
|
298
|
+
},
|
|
299
|
+
"recentIds": {
|
|
300
|
+
"type": "unknown",
|
|
301
|
+
"mutable": false,
|
|
302
|
+
"complexType": {
|
|
303
|
+
"original": "string[]",
|
|
304
|
+
"resolved": "string[]",
|
|
305
|
+
"references": {}
|
|
306
|
+
},
|
|
307
|
+
"required": false,
|
|
308
|
+
"optional": false,
|
|
309
|
+
"docs": {
|
|
310
|
+
"tags": [],
|
|
311
|
+
"text": "`id`s of recently used companies, most recent first. The current company is not repeated in the Recent group."
|
|
312
|
+
},
|
|
313
|
+
"getter": false,
|
|
314
|
+
"setter": false,
|
|
315
|
+
"defaultValue": "[]"
|
|
316
|
+
},
|
|
317
|
+
"switchingId": {
|
|
318
|
+
"type": "string",
|
|
319
|
+
"mutable": false,
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "string",
|
|
322
|
+
"resolved": "string",
|
|
323
|
+
"references": {}
|
|
324
|
+
},
|
|
325
|
+
"required": false,
|
|
326
|
+
"optional": true,
|
|
327
|
+
"docs": {
|
|
328
|
+
"tags": [],
|
|
329
|
+
"text": "`id` of the company being switched to. Shows the switching state: a spinner in the trigger and on that row."
|
|
330
|
+
},
|
|
331
|
+
"getter": false,
|
|
332
|
+
"setter": false,
|
|
333
|
+
"reflect": false,
|
|
334
|
+
"attribute": "switching-id"
|
|
335
|
+
},
|
|
336
|
+
"open": {
|
|
337
|
+
"type": "boolean",
|
|
338
|
+
"mutable": true,
|
|
339
|
+
"complexType": {
|
|
340
|
+
"original": "boolean",
|
|
341
|
+
"resolved": "boolean",
|
|
342
|
+
"references": {}
|
|
343
|
+
},
|
|
344
|
+
"required": false,
|
|
345
|
+
"optional": false,
|
|
346
|
+
"docs": {
|
|
347
|
+
"tags": [],
|
|
348
|
+
"text": "Whether the panel is open."
|
|
349
|
+
},
|
|
350
|
+
"getter": false,
|
|
351
|
+
"setter": false,
|
|
352
|
+
"reflect": true,
|
|
353
|
+
"attribute": "open",
|
|
354
|
+
"defaultValue": "false"
|
|
355
|
+
},
|
|
356
|
+
"placeholderLabel": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"mutable": false,
|
|
359
|
+
"complexType": {
|
|
360
|
+
"original": "string",
|
|
361
|
+
"resolved": "string",
|
|
362
|
+
"references": {}
|
|
363
|
+
},
|
|
364
|
+
"required": false,
|
|
365
|
+
"optional": false,
|
|
366
|
+
"docs": {
|
|
367
|
+
"tags": [],
|
|
368
|
+
"text": "Text of the trigger when there is no current company."
|
|
369
|
+
},
|
|
370
|
+
"getter": false,
|
|
371
|
+
"setter": false,
|
|
372
|
+
"reflect": false,
|
|
373
|
+
"attribute": "placeholder-label",
|
|
374
|
+
"defaultValue": "'Select a company'"
|
|
375
|
+
},
|
|
376
|
+
"searchPlaceholder": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"mutable": false,
|
|
379
|
+
"complexType": {
|
|
380
|
+
"original": "string",
|
|
381
|
+
"resolved": "string",
|
|
382
|
+
"references": {}
|
|
383
|
+
},
|
|
384
|
+
"required": false,
|
|
385
|
+
"optional": false,
|
|
386
|
+
"docs": {
|
|
387
|
+
"tags": [],
|
|
388
|
+
"text": "Placeholder (and accessible name) of the search field."
|
|
389
|
+
},
|
|
390
|
+
"getter": false,
|
|
391
|
+
"setter": false,
|
|
392
|
+
"reflect": false,
|
|
393
|
+
"attribute": "search-placeholder",
|
|
394
|
+
"defaultValue": "'Find a company or org. number'"
|
|
395
|
+
},
|
|
396
|
+
"listLabel": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"mutable": false,
|
|
399
|
+
"complexType": {
|
|
400
|
+
"original": "string",
|
|
401
|
+
"resolved": "string",
|
|
402
|
+
"references": {}
|
|
403
|
+
},
|
|
404
|
+
"required": false,
|
|
405
|
+
"optional": false,
|
|
406
|
+
"docs": {
|
|
407
|
+
"tags": [],
|
|
408
|
+
"text": "Accessible name of the company listbox."
|
|
409
|
+
},
|
|
410
|
+
"getter": false,
|
|
411
|
+
"setter": false,
|
|
412
|
+
"reflect": false,
|
|
413
|
+
"attribute": "list-label",
|
|
414
|
+
"defaultValue": "'Companies'"
|
|
415
|
+
},
|
|
416
|
+
"currentLabel": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"mutable": false,
|
|
419
|
+
"complexType": {
|
|
420
|
+
"original": "string",
|
|
421
|
+
"resolved": "string",
|
|
422
|
+
"references": {}
|
|
423
|
+
},
|
|
424
|
+
"required": false,
|
|
425
|
+
"optional": false,
|
|
426
|
+
"docs": {
|
|
427
|
+
"tags": [],
|
|
428
|
+
"text": "Header of the current company group."
|
|
429
|
+
},
|
|
430
|
+
"getter": false,
|
|
431
|
+
"setter": false,
|
|
432
|
+
"reflect": false,
|
|
433
|
+
"attribute": "current-label",
|
|
434
|
+
"defaultValue": "'Current'"
|
|
435
|
+
},
|
|
436
|
+
"recentLabel": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"mutable": false,
|
|
439
|
+
"complexType": {
|
|
440
|
+
"original": "string",
|
|
441
|
+
"resolved": "string",
|
|
442
|
+
"references": {}
|
|
443
|
+
},
|
|
444
|
+
"required": false,
|
|
445
|
+
"optional": false,
|
|
446
|
+
"docs": {
|
|
447
|
+
"tags": [],
|
|
448
|
+
"text": "Header of the recent companies group."
|
|
449
|
+
},
|
|
450
|
+
"getter": false,
|
|
451
|
+
"setter": false,
|
|
452
|
+
"reflect": false,
|
|
453
|
+
"attribute": "recent-label",
|
|
454
|
+
"defaultValue": "'Recent'"
|
|
455
|
+
},
|
|
456
|
+
"allLabel": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"mutable": false,
|
|
459
|
+
"complexType": {
|
|
460
|
+
"original": "string",
|
|
461
|
+
"resolved": "string",
|
|
462
|
+
"references": {}
|
|
463
|
+
},
|
|
464
|
+
"required": false,
|
|
465
|
+
"optional": false,
|
|
466
|
+
"docs": {
|
|
467
|
+
"tags": [],
|
|
468
|
+
"text": "Header of the all companies group (the count is appended)."
|
|
469
|
+
},
|
|
470
|
+
"getter": false,
|
|
471
|
+
"setter": false,
|
|
472
|
+
"reflect": false,
|
|
473
|
+
"attribute": "all-label",
|
|
474
|
+
"defaultValue": "'All companies'"
|
|
475
|
+
},
|
|
476
|
+
"matchesLabel": {
|
|
477
|
+
"type": "string",
|
|
478
|
+
"mutable": false,
|
|
479
|
+
"complexType": {
|
|
480
|
+
"original": "string",
|
|
481
|
+
"resolved": "string",
|
|
482
|
+
"references": {}
|
|
483
|
+
},
|
|
484
|
+
"required": false,
|
|
485
|
+
"optional": false,
|
|
486
|
+
"docs": {
|
|
487
|
+
"tags": [],
|
|
488
|
+
"text": "Header of the search view when there are several matches (\"3 matches\")."
|
|
489
|
+
},
|
|
490
|
+
"getter": false,
|
|
491
|
+
"setter": false,
|
|
492
|
+
"reflect": false,
|
|
493
|
+
"attribute": "matches-label",
|
|
494
|
+
"defaultValue": "'matches'"
|
|
495
|
+
},
|
|
496
|
+
"matchLabel": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"mutable": false,
|
|
499
|
+
"complexType": {
|
|
500
|
+
"original": "string",
|
|
501
|
+
"resolved": "string",
|
|
502
|
+
"references": {}
|
|
503
|
+
},
|
|
504
|
+
"required": false,
|
|
505
|
+
"optional": false,
|
|
506
|
+
"docs": {
|
|
507
|
+
"tags": [],
|
|
508
|
+
"text": "Header of the search view when there is one match (\"1 match\")."
|
|
509
|
+
},
|
|
510
|
+
"getter": false,
|
|
511
|
+
"setter": false,
|
|
512
|
+
"reflect": false,
|
|
513
|
+
"attribute": "match-label",
|
|
514
|
+
"defaultValue": "'match'"
|
|
515
|
+
},
|
|
516
|
+
"orgNumberLabel": {
|
|
517
|
+
"type": "string",
|
|
518
|
+
"mutable": false,
|
|
519
|
+
"complexType": {
|
|
520
|
+
"original": "string",
|
|
521
|
+
"resolved": "string",
|
|
522
|
+
"references": {}
|
|
523
|
+
},
|
|
524
|
+
"required": false,
|
|
525
|
+
"optional": false,
|
|
526
|
+
"docs": {
|
|
527
|
+
"tags": [],
|
|
528
|
+
"text": "Prefix of the org. number, e.g. \"Org. no.\"."
|
|
529
|
+
},
|
|
530
|
+
"getter": false,
|
|
531
|
+
"setter": false,
|
|
532
|
+
"reflect": false,
|
|
533
|
+
"attribute": "org-number-label",
|
|
534
|
+
"defaultValue": "'Org. no.'"
|
|
535
|
+
},
|
|
536
|
+
"switchingLabel": {
|
|
537
|
+
"type": "string",
|
|
538
|
+
"mutable": false,
|
|
539
|
+
"complexType": {
|
|
540
|
+
"original": "string",
|
|
541
|
+
"resolved": "string",
|
|
542
|
+
"references": {}
|
|
543
|
+
},
|
|
544
|
+
"required": false,
|
|
545
|
+
"optional": false,
|
|
546
|
+
"docs": {
|
|
547
|
+
"tags": [],
|
|
548
|
+
"text": "Trigger subtitle while switching."
|
|
549
|
+
},
|
|
550
|
+
"getter": false,
|
|
551
|
+
"setter": false,
|
|
552
|
+
"reflect": false,
|
|
553
|
+
"attribute": "switching-label",
|
|
554
|
+
"defaultValue": "'Switching\u2026'"
|
|
555
|
+
},
|
|
556
|
+
"emptyHeading": {
|
|
557
|
+
"type": "string",
|
|
558
|
+
"mutable": false,
|
|
559
|
+
"complexType": {
|
|
560
|
+
"original": "string",
|
|
561
|
+
"resolved": "string",
|
|
562
|
+
"references": {}
|
|
563
|
+
},
|
|
564
|
+
"required": false,
|
|
565
|
+
"optional": false,
|
|
566
|
+
"docs": {
|
|
567
|
+
"tags": [],
|
|
568
|
+
"text": "No-results heading. `{query}` is replaced by the query."
|
|
569
|
+
},
|
|
570
|
+
"getter": false,
|
|
571
|
+
"setter": false,
|
|
572
|
+
"reflect": false,
|
|
573
|
+
"attribute": "empty-heading",
|
|
574
|
+
"defaultValue": "'No companies match \u201C{query}\u201D'"
|
|
575
|
+
},
|
|
576
|
+
"emptyDescription": {
|
|
577
|
+
"type": "string",
|
|
578
|
+
"mutable": false,
|
|
579
|
+
"complexType": {
|
|
580
|
+
"original": "string",
|
|
581
|
+
"resolved": "string",
|
|
582
|
+
"references": {}
|
|
583
|
+
},
|
|
584
|
+
"required": false,
|
|
585
|
+
"optional": false,
|
|
586
|
+
"docs": {
|
|
587
|
+
"tags": [],
|
|
588
|
+
"text": "No-results description."
|
|
589
|
+
},
|
|
590
|
+
"getter": false,
|
|
591
|
+
"setter": false,
|
|
592
|
+
"reflect": false,
|
|
593
|
+
"attribute": "empty-description",
|
|
594
|
+
"defaultValue": "'Check the spelling, or search by org. number.'"
|
|
595
|
+
},
|
|
596
|
+
"manageLabel": {
|
|
597
|
+
"type": "string",
|
|
598
|
+
"mutable": false,
|
|
599
|
+
"complexType": {
|
|
600
|
+
"original": "string",
|
|
601
|
+
"resolved": "string",
|
|
602
|
+
"references": {}
|
|
603
|
+
},
|
|
604
|
+
"required": false,
|
|
605
|
+
"optional": false,
|
|
606
|
+
"docs": {
|
|
607
|
+
"tags": [],
|
|
608
|
+
"text": "Text of the \"Manage Companies\" footer button."
|
|
609
|
+
},
|
|
610
|
+
"getter": false,
|
|
611
|
+
"setter": false,
|
|
612
|
+
"reflect": false,
|
|
613
|
+
"attribute": "manage-label",
|
|
614
|
+
"defaultValue": "'Manage Companies'"
|
|
615
|
+
},
|
|
616
|
+
"addLabel": {
|
|
617
|
+
"type": "string",
|
|
618
|
+
"mutable": false,
|
|
619
|
+
"complexType": {
|
|
620
|
+
"original": "string",
|
|
621
|
+
"resolved": "string",
|
|
622
|
+
"references": {}
|
|
623
|
+
},
|
|
624
|
+
"required": false,
|
|
625
|
+
"optional": false,
|
|
626
|
+
"docs": {
|
|
627
|
+
"tags": [],
|
|
628
|
+
"text": "Text of the \"Add companies\" footer button."
|
|
629
|
+
},
|
|
630
|
+
"getter": false,
|
|
631
|
+
"setter": false,
|
|
632
|
+
"reflect": false,
|
|
633
|
+
"attribute": "add-label",
|
|
634
|
+
"defaultValue": "'Add companies'"
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
static get states() {
|
|
639
|
+
return {
|
|
640
|
+
"query": {},
|
|
641
|
+
"activeId": {}
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
static get events() {
|
|
645
|
+
return [{
|
|
646
|
+
"method": "bsCompanySwitch",
|
|
647
|
+
"name": "bsCompanySwitch",
|
|
648
|
+
"bubbles": true,
|
|
649
|
+
"cancelable": true,
|
|
650
|
+
"composed": true,
|
|
651
|
+
"docs": {
|
|
652
|
+
"tags": [],
|
|
653
|
+
"text": "Fires when a company other than the current one is chosen (click or Enter), with the company."
|
|
654
|
+
},
|
|
655
|
+
"complexType": {
|
|
656
|
+
"original": "BsCompany",
|
|
657
|
+
"resolved": "BsCompany",
|
|
658
|
+
"references": {
|
|
659
|
+
"BsCompany": {
|
|
660
|
+
"location": "local",
|
|
661
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-company-switcher/bs-company-switcher.tsx",
|
|
662
|
+
"id": "src/components/bs-company-switcher/bs-company-switcher.tsx::BsCompany"
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}, {
|
|
667
|
+
"method": "bsManageCompanies",
|
|
668
|
+
"name": "bsManageCompanies",
|
|
669
|
+
"bubbles": true,
|
|
670
|
+
"cancelable": true,
|
|
671
|
+
"composed": true,
|
|
672
|
+
"docs": {
|
|
673
|
+
"tags": [],
|
|
674
|
+
"text": "Fires when \"Manage Companies\" is pressed."
|
|
675
|
+
},
|
|
676
|
+
"complexType": {
|
|
677
|
+
"original": "void",
|
|
678
|
+
"resolved": "void",
|
|
679
|
+
"references": {}
|
|
680
|
+
}
|
|
681
|
+
}, {
|
|
682
|
+
"method": "bsAddCompanies",
|
|
683
|
+
"name": "bsAddCompanies",
|
|
684
|
+
"bubbles": true,
|
|
685
|
+
"cancelable": true,
|
|
686
|
+
"composed": true,
|
|
687
|
+
"docs": {
|
|
688
|
+
"tags": [],
|
|
689
|
+
"text": "Fires when \"Add companies\" is pressed."
|
|
690
|
+
},
|
|
691
|
+
"complexType": {
|
|
692
|
+
"original": "void",
|
|
693
|
+
"resolved": "void",
|
|
694
|
+
"references": {}
|
|
695
|
+
}
|
|
696
|
+
}, {
|
|
697
|
+
"method": "bsOpenChange",
|
|
698
|
+
"name": "bsOpenChange",
|
|
699
|
+
"bubbles": true,
|
|
700
|
+
"cancelable": true,
|
|
701
|
+
"composed": true,
|
|
702
|
+
"docs": {
|
|
703
|
+
"tags": [],
|
|
704
|
+
"text": "Fires when the panel opens or closes through user interaction, with the new state."
|
|
705
|
+
},
|
|
706
|
+
"complexType": {
|
|
707
|
+
"original": "boolean",
|
|
708
|
+
"resolved": "boolean",
|
|
709
|
+
"references": {}
|
|
710
|
+
}
|
|
711
|
+
}];
|
|
712
|
+
}
|
|
713
|
+
static get elementRef() { return "el"; }
|
|
714
|
+
static get watchers() {
|
|
715
|
+
return [{
|
|
716
|
+
"propName": "open",
|
|
717
|
+
"methodName": "onOpen"
|
|
718
|
+
}];
|
|
719
|
+
}
|
|
720
|
+
}
|