@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,130 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface BsCompany {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** Organisation number, shown as "Org. no. {orgNumber}". */
|
|
6
|
+
orgNumber: string;
|
|
7
|
+
/** Country code shown before the org. number, e.g. "NO". */
|
|
8
|
+
country: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A company (tenant) switcher: a trigger showing the current company, and a panel to find and switch to
|
|
12
|
+
* another one. The panel has a search field, the current / recent / all groups, a filtered "matches" view,
|
|
13
|
+
* a no-results state and a footer with "Manage Companies" and "Add companies" actions.
|
|
14
|
+
*
|
|
15
|
+
* Built from `bs-popover` (open/close, Escape, outside click, flipping), `bs-card` (panel surface),
|
|
16
|
+
* `bs-input` (search), `bs-list-item` (rows), `bs-avatar` (initials), `bs-spinner` (switching),
|
|
17
|
+
* `bs-empty-state` (no results), `bs-divider` and `bs-button` (footer). The trigger is a native `<button>`:
|
|
18
|
+
* no `bs-*` component is a composite "avatar + two lines + chevron" button.
|
|
19
|
+
*
|
|
20
|
+
* ## When to use
|
|
21
|
+
* - An app header or side navigation where a user belongs to several companies and works in one at a time.
|
|
22
|
+
*
|
|
23
|
+
* ## When not to use
|
|
24
|
+
* - Picking a value in a form -- use `bs-input type="dropdown"`.
|
|
25
|
+
* - Switching between a handful of fixed views -- use `bs-tab`.
|
|
26
|
+
*
|
|
27
|
+
* `companies` is an array and must be set as a JS property. You own the data and the switch itself: listen to
|
|
28
|
+
* `bsCompanySwitch`, do the work, then update `currentId`. To show the switching state set `switchingId`
|
|
29
|
+
* (from the `bsCompanySwitch` handler, or later) and the panel stays open until you clear it and set `open`
|
|
30
|
+
* to `false`. If `switchingId` is not set by the time the handler returns, the panel closes immediately.
|
|
31
|
+
*
|
|
32
|
+
* @part trigger - The trigger button.
|
|
33
|
+
* @part avatar - The trigger's `bs-avatar`.
|
|
34
|
+
* @part name - The company name in the trigger.
|
|
35
|
+
* @part subtitle - The org. number (or "Switching…") line in the trigger.
|
|
36
|
+
* @part panel - The panel surface (`bs-card`).
|
|
37
|
+
* @part search - The search field wrapper (combobox).
|
|
38
|
+
* @part list - The listbox.
|
|
39
|
+
* @part group - One group (header and rows).
|
|
40
|
+
* @part group-header - A group header.
|
|
41
|
+
* @part row - A company row (`bs-list-item`).
|
|
42
|
+
* @part empty - The no-results state (`bs-empty-state`).
|
|
43
|
+
* @part footer - The footer actions.
|
|
44
|
+
* @prop --bs-company-switcher-width - Trigger width. Defaults to `260px` (Figma); capped at 100%.
|
|
45
|
+
* @prop --bs-company-switcher-panel-width - Panel width. Defaults to `360px` (Figma); capped at the viewport.
|
|
46
|
+
* @prop --bs-company-switcher-radius - Trigger and panel corner radius. Aliased to `--bs-border-radius-100`.
|
|
47
|
+
* @prop --bs-company-switcher-trigger-bg - Trigger resting background. `transparent`.
|
|
48
|
+
* @prop --bs-company-switcher-trigger-bg-hover - Aliased to `--bs-surface-hover`.
|
|
49
|
+
* @prop --bs-company-switcher-trigger-bg-pressed - Aliased to `--bs-surface-pressed`.
|
|
50
|
+
* @prop --bs-company-switcher-trigger-bg-open - Aliased to `--bs-surface-selected`.
|
|
51
|
+
* @prop --bs-company-switcher-focus-ring - Trigger focus outline. Aliased to `--bs-border-neutral-focus`.
|
|
52
|
+
* @prop --bs-company-switcher-panel-bg - Panel background. Aliased to `--bs-surface-base`.
|
|
53
|
+
* @prop --bs-company-switcher-panel-border-color - Panel border. Aliased to `--bs-border-default`.
|
|
54
|
+
* @prop --bs-company-switcher-shadow - Panel shadow. Aliased to `--bs-shadow-md`.
|
|
55
|
+
* @prop --bs-company-switcher-max-height - Maximum height of the scrolling list. Defaults to `320px`.
|
|
56
|
+
* @prop --bs-company-switcher-text-color - Names. Aliased to `--bs-text-default`.
|
|
57
|
+
* @prop --bs-company-switcher-muted-color - Org. numbers. Aliased to `--bs-text-secondary`.
|
|
58
|
+
* @prop --bs-company-switcher-header-color - Group headers. Aliased to `--bs-text-muted`.
|
|
59
|
+
* @prop --bs-company-switcher-z-index - Panel stacking. Aliased to `--bs-z-index-popover`.
|
|
60
|
+
*/
|
|
61
|
+
export declare class BsCompanySwitcher {
|
|
62
|
+
el: HTMLElement;
|
|
63
|
+
private id;
|
|
64
|
+
private inputEl?;
|
|
65
|
+
private focusSearch;
|
|
66
|
+
/** The companies the user can switch between. JS property only (an array cannot be an attribute). */
|
|
67
|
+
companies: BsCompany[];
|
|
68
|
+
/** `id` of the current company. */
|
|
69
|
+
currentId?: string;
|
|
70
|
+
/** `id`s of recently used companies, most recent first. The current company is not repeated in the Recent group. */
|
|
71
|
+
recentIds: string[];
|
|
72
|
+
/** `id` of the company being switched to. Shows the switching state: a spinner in the trigger and on that row. */
|
|
73
|
+
switchingId?: string;
|
|
74
|
+
/** Whether the panel is open. */
|
|
75
|
+
open: boolean;
|
|
76
|
+
/** Text of the trigger when there is no current company. */
|
|
77
|
+
placeholderLabel: string;
|
|
78
|
+
/** Placeholder (and accessible name) of the search field. */
|
|
79
|
+
searchPlaceholder: string;
|
|
80
|
+
/** Accessible name of the company listbox. */
|
|
81
|
+
listLabel: string;
|
|
82
|
+
/** Header of the current company group. */
|
|
83
|
+
currentLabel: string;
|
|
84
|
+
/** Header of the recent companies group. */
|
|
85
|
+
recentLabel: string;
|
|
86
|
+
/** Header of the all companies group (the count is appended). */
|
|
87
|
+
allLabel: string;
|
|
88
|
+
/** Header of the search view when there are several matches ("3 matches"). */
|
|
89
|
+
matchesLabel: string;
|
|
90
|
+
/** Header of the search view when there is one match ("1 match"). */
|
|
91
|
+
matchLabel: string;
|
|
92
|
+
/** Prefix of the org. number, e.g. "Org. no.". */
|
|
93
|
+
orgNumberLabel: string;
|
|
94
|
+
/** Trigger subtitle while switching. */
|
|
95
|
+
switchingLabel: string;
|
|
96
|
+
/** No-results heading. `{query}` is replaced by the query. */
|
|
97
|
+
emptyHeading: string;
|
|
98
|
+
/** No-results description. */
|
|
99
|
+
emptyDescription: string;
|
|
100
|
+
/** Text of the "Manage Companies" footer button. */
|
|
101
|
+
manageLabel: string;
|
|
102
|
+
/** Text of the "Add companies" footer button. */
|
|
103
|
+
addLabel: string;
|
|
104
|
+
query: string;
|
|
105
|
+
activeId: string | null;
|
|
106
|
+
/** Fires when a company other than the current one is chosen (click or Enter), with the company. */
|
|
107
|
+
bsCompanySwitch: EventEmitter<BsCompany>;
|
|
108
|
+
/** Fires when "Manage Companies" is pressed. */
|
|
109
|
+
bsManageCompanies: EventEmitter<void>;
|
|
110
|
+
/** Fires when "Add companies" is pressed. */
|
|
111
|
+
bsAddCompanies: EventEmitter<void>;
|
|
112
|
+
/** Fires when the panel opens or closes through user interaction, with the new state. */
|
|
113
|
+
bsOpenChange: EventEmitter<boolean>;
|
|
114
|
+
onOpen(next: boolean): void;
|
|
115
|
+
componentDidRender(): void;
|
|
116
|
+
private byId;
|
|
117
|
+
private get q();
|
|
118
|
+
private matches;
|
|
119
|
+
private groups;
|
|
120
|
+
private rowId;
|
|
121
|
+
private setOpen;
|
|
122
|
+
private choose;
|
|
123
|
+
private onPopoverOpenChange;
|
|
124
|
+
private onInput;
|
|
125
|
+
private onKeyDown;
|
|
126
|
+
private subtitle;
|
|
127
|
+
private renderTrigger;
|
|
128
|
+
private renderRow;
|
|
129
|
+
render(): any;
|
|
130
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
/** Sample data (invented for the stories and tests, not real organisations). */
|
|
3
|
+
export declare const COMPANIES: {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
orgNumber: string;
|
|
7
|
+
country: string;
|
|
8
|
+
}[];
|
|
9
|
+
export declare const RECENT_IDS: string[];
|
|
10
|
+
interface BsCompanySwitcherArgs {
|
|
11
|
+
currentId?: string;
|
|
12
|
+
recentIds: string[];
|
|
13
|
+
switchingId?: string;
|
|
14
|
+
open: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const meta: Meta<BsCompanySwitcherArgs>;
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<BsCompanySwitcherArgs>;
|
|
19
|
+
export declare const Closed: Story;
|
|
20
|
+
export declare const Open: Story;
|
|
21
|
+
export declare const Switching: Story;
|
|
22
|
+
export declare const SwitchingClosed: Story;
|
|
23
|
+
export declare const Search: Story;
|
|
24
|
+
export declare const NoResults: Story;
|
|
25
|
+
export declare const Interactive: Story;
|
|
@@ -25,6 +25,7 @@ export type BsIconTileIntent = 'default' | 'success' | 'warning' | 'error' | 'br
|
|
|
25
25
|
* @part text - The wrapper around the `text` slot (only shown when something is slotted).
|
|
26
26
|
*/
|
|
27
27
|
export declare class BsIconTile {
|
|
28
|
+
el: HTMLElement;
|
|
28
29
|
/** Tile size: `sm` 24px, `md` 32px, `lg` 48px. */
|
|
29
30
|
size: BsIconTileSize;
|
|
30
31
|
/** Colour and default glyph. `brand` uses the brand colours; `information` the info palette. */
|
|
@@ -36,5 +37,9 @@ export declare class BsIconTile {
|
|
|
36
37
|
hasCustomIcon: boolean;
|
|
37
38
|
/** True while something is assigned to the `text` slot, so the text wrapper (and its gap) only exists then. */
|
|
38
39
|
hasText: boolean;
|
|
40
|
+
/** `slotchange` alone is not enough: when the icon is already a child at first render (or is added in the same
|
|
41
|
+
* pass that upgrades this element) the event can fire before the handler is attached, leaving the default
|
|
42
|
+
* glyph drawn next to the slotted icon. Read the light DOM once up front. */
|
|
43
|
+
componentWillLoad(): void;
|
|
39
44
|
render(): any[];
|
|
40
45
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export interface BsMegaMenuItem {
|
|
3
|
+
id: string;
|
|
4
|
+
/** The link text. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** One line under the label. Only shown in `type="columns"`. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** URL of a monochrome SVG, painted with the icon colour. Only shown in `type="columns"`. */
|
|
9
|
+
icon?: string;
|
|
10
|
+
/** Short chip text beside the label, e.g. "New". Only shown in `type="columns"`. */
|
|
11
|
+
badge?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BsMegaMenuColumn {
|
|
14
|
+
id: string;
|
|
15
|
+
/** The group heading, e.g. "Sell". */
|
|
16
|
+
label: string;
|
|
17
|
+
items: BsMegaMenuItem[];
|
|
18
|
+
}
|
|
19
|
+
export interface BsMegaMenuFeatured {
|
|
20
|
+
title: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
}
|
|
23
|
+
export type BsMegaMenuType = 'columns' | 'compact';
|
|
24
|
+
/**
|
|
25
|
+
* The dropdown panel under a navigation header tab: columns of links grouped under headings, an optional
|
|
26
|
+
* featured area on the right, and a footer with recently used items and a shortcut hint. Matches the Figma
|
|
27
|
+
* "Mega menu" (types Columns, Column with featured, Compact and Compact with featured).
|
|
28
|
+
*
|
|
29
|
+
* This is the panel only. Put it in `bs-navigation-header`'s `menu` slot, which anchors it under the bar at the
|
|
30
|
+
* header's full width, and toggle the host's `hidden` attribute from the tab that
|
|
31
|
+
* opens it; the panel does not open or close itself. Escape inside the panel fires `bsClose` so you can close it.
|
|
32
|
+
*
|
|
33
|
+
* Built from `bs-card` (panel surface), `bs-menu-block` or `bs-compact-menu-block` (the links), `bs-divider` and
|
|
34
|
+
* `bs-key-caps` (the shortcut). The column layout, headings, featured text and footer row are plain layout
|
|
35
|
+
* markup: no component covers them.
|
|
36
|
+
*
|
|
37
|
+
* ## Responsive
|
|
38
|
+
* The panel reacts to its own width (a container query), not the viewport's. Below 600px it becomes one column (heading
|
|
39
|
+
* above its links, featured area below), titles and descriptions wrap, links are at least 44px tall, the footer stacks
|
|
40
|
+
* and the default shortcut hint is hidden (`display: none`; a keyboard hint means nothing on a touch screen). A custom
|
|
41
|
+
* `footer-end` slot is not hidden.
|
|
42
|
+
*
|
|
43
|
+
* ## When to use
|
|
44
|
+
* - A header tab that leads to many destinations that need grouping (Sell, Finance, Inventory).
|
|
45
|
+
*
|
|
46
|
+
* ## When not to use
|
|
47
|
+
* - A short list of commands -- use `bs-menu` in a `bs-popover`.
|
|
48
|
+
* - Switching app or company -- use `bs-app-switcher` or `bs-company-switcher`.
|
|
49
|
+
*
|
|
50
|
+
* `columns`, `featured` and `recent` are arrays or objects and must be set as JS properties. Each item's `icon` is
|
|
51
|
+
* the URL of a monochrome SVG. You own the data: listen to `bsMenuSelect` (cancelable: `preventDefault()` cancels the
|
|
52
|
+
* originating click).
|
|
53
|
+
*
|
|
54
|
+
* @slot featured - The featured area on the right. Overrides the `featured` prop.
|
|
55
|
+
* @slot footer-start - Left side of the footer. Overrides the recently used line.
|
|
56
|
+
* @slot footer-end - Right side of the footer. Overrides the shortcut hint.
|
|
57
|
+
* @part panel - The panel surface (`bs-card`).
|
|
58
|
+
* @part columns - The grid of columns and the featured area.
|
|
59
|
+
* @part column - One column (group).
|
|
60
|
+
* @part heading - A column heading.
|
|
61
|
+
* @part list - A column's list of links.
|
|
62
|
+
* @part block - A link (`bs-menu-block` or `bs-compact-menu-block`).
|
|
63
|
+
* @part featured - The featured area.
|
|
64
|
+
* @part featured-title - The featured title.
|
|
65
|
+
* @part featured-description - The featured description.
|
|
66
|
+
* @part footer - The footer.
|
|
67
|
+
* @part shortcut - The shortcut hint's key caps (`bs-key-caps`).
|
|
68
|
+
* @prop --bs-mega-menu-width - Panel width. Defaults to `1100px` (Figma); capped at the viewport.
|
|
69
|
+
* @prop --bs-mega-menu-radius - Panel corner radius. Aliased to `--bs-border-radius-150`.
|
|
70
|
+
* @prop --bs-mega-menu-bg - Panel background. Aliased to `--bs-surface-base`.
|
|
71
|
+
* @prop --bs-mega-menu-border-color - Panel border. Aliased to `--bs-border-default`.
|
|
72
|
+
* @prop --bs-mega-menu-shadow - Panel shadow (elevation level 3). Aliased to the `--bs-shadow-*` position and blur tokens and `--bs-elevation-high`.
|
|
73
|
+
* @prop --bs-mega-menu-padding - Padding around the columns. Aliased to `--bs-spacing-300` and `--bs-spacing-350`.
|
|
74
|
+
* @prop --bs-mega-menu-gap - Gap between columns. Aliased to `--bs-spacing-300`.
|
|
75
|
+
* @prop --bs-mega-menu-heading-color - Column headings. Aliased to `--bs-text-muted`.
|
|
76
|
+
* @prop --bs-mega-menu-text-color - Featured title. Aliased to `--bs-text-default`.
|
|
77
|
+
* @prop --bs-mega-menu-muted-color - Featured description and footer text. Aliased to `--bs-text-secondary`.
|
|
78
|
+
*/
|
|
79
|
+
export declare class BsMegaMenu {
|
|
80
|
+
el: HTMLElement;
|
|
81
|
+
private id;
|
|
82
|
+
/** `columns` shows menu blocks with icon and description; `compact` plain text links. */
|
|
83
|
+
type: BsMegaMenuType;
|
|
84
|
+
/** The groups of links. JS property only (an array cannot be an attribute). */
|
|
85
|
+
columns: BsMegaMenuColumn[];
|
|
86
|
+
/** The featured area on the right. JS property only. The `featured` slot overrides it. */
|
|
87
|
+
featured?: BsMegaMenuFeatured;
|
|
88
|
+
/** Recently used destinations, already translated, shown in the footer. JS property only. */
|
|
89
|
+
recent: string[];
|
|
90
|
+
/** Accessible name of the panel. */
|
|
91
|
+
label: string;
|
|
92
|
+
/** Text before the recently used items. */
|
|
93
|
+
recentLabel: string;
|
|
94
|
+
/** Text before the shortcut keys. */
|
|
95
|
+
shortcutLabel: string;
|
|
96
|
+
/** The shortcut keys, joined by "+". */
|
|
97
|
+
shortcutKeys: string;
|
|
98
|
+
/** Accessible name of the shortcut keys. Defaults to the keys joined with " plus ". */
|
|
99
|
+
shortcutKeysLabel?: string;
|
|
100
|
+
/** Fires when a link is chosen (click or Enter), with the item. Cancelable: `preventDefault()` cancels the originating click. */
|
|
101
|
+
bsMenuSelect: EventEmitter<BsMegaMenuItem>;
|
|
102
|
+
/** Fires when Escape is pressed inside the panel, so you can close it. */
|
|
103
|
+
bsClose: EventEmitter<void>;
|
|
104
|
+
private select;
|
|
105
|
+
private onKeyDown;
|
|
106
|
+
private renderItem;
|
|
107
|
+
private renderColumn;
|
|
108
|
+
private renderFeatured;
|
|
109
|
+
render(): any;
|
|
110
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
/** Phosphor (regular) icons as monochrome SVG data URIs; a real app supplies its own URLs. */
|
|
3
|
+
export declare const ICONS: Record<string, string>;
|
|
4
|
+
/** Sample data (invented for the stories and tests; not real EG products). */
|
|
5
|
+
export declare const COLUMNS: {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
items: ({
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
description: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
badge?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
description: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
badge: string;
|
|
20
|
+
})[];
|
|
21
|
+
}[];
|
|
22
|
+
export declare const COMPACT_COLUMNS: {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
items: {
|
|
26
|
+
id: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}[];
|
|
29
|
+
}[];
|
|
30
|
+
export declare const FEATURED: {
|
|
31
|
+
title: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
export declare const RECENT: string[];
|
|
35
|
+
interface BsMegaMenuArgs {
|
|
36
|
+
type: 'columns' | 'compact';
|
|
37
|
+
featured: boolean;
|
|
38
|
+
}
|
|
39
|
+
declare const meta: Meta<BsMegaMenuArgs>;
|
|
40
|
+
export default meta;
|
|
41
|
+
type Story = StoryObj<BsMegaMenuArgs>;
|
|
42
|
+
export declare const Columns: Story;
|
|
43
|
+
export declare const ColumnWithFeatured: Story;
|
|
44
|
+
export declare const Compact: Story;
|
|
45
|
+
export declare const CompactWithFeatured: Story;
|
|
46
|
+
/** Wired up: pick a link, press Escape, and the last event is printed below. */
|
|
47
|
+
export declare const Interactive: Story;
|
|
48
|
+
/** The mega menu in `bs-navigation-header`'s `menu` slot, opened by the "Sales" tab (sample data; columns type). */
|
|
49
|
+
export declare const InNavigationHeader: Story;
|
|
50
|
+
/** Compact type with the featured area, in the same header composition. */
|
|
51
|
+
export declare const InNavigationHeaderCompact: Story;
|
|
52
|
+
/** The same composition at 375px: the tabs scroll inside the bar, the panel is one column with no shortcut hint. */
|
|
53
|
+
export declare const InNavigationHeaderMobile: Story;
|
|
54
|
+
/** Compact with featured at 375px. */
|
|
55
|
+
export declare const InNavigationHeaderCompactMobile: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A rich entry in a mega menu: an icon tile, a title with an optional "New" chip, and a one-line description.
|
|
3
|
+
* Matches the Figma "Menu block" component (Default, Hover, Pressed and Focused).
|
|
4
|
+
*
|
|
5
|
+
* The block is always a native button and only emits events; it never navigates. Hover, pressed and focus come from the
|
|
6
|
+
* native element. Its accessible name is its text: the title, the badge and the description, read once.
|
|
7
|
+
*
|
|
8
|
+
* Built from `bs-icon-tile` (the icon) and `bs-chip-informative` (the badge). The icon is either a URL of a
|
|
9
|
+
* monochrome SVG in `icon` (painted with the theme's icon colour through a CSS mask, so it follows light and
|
|
10
|
+
* dark mode), or any element in the default slot (an `<svg>` drawn with `currentColor`).
|
|
11
|
+
*
|
|
12
|
+
* ## When to use
|
|
13
|
+
* - A destination in a mega menu that needs an icon and a sentence of explanation, usually inside `bs-mega-menu`.
|
|
14
|
+
*
|
|
15
|
+
* ## When not to use
|
|
16
|
+
* - A plain text destination -- use `bs-compact-menu-block`.
|
|
17
|
+
* - A command in a dropdown list -- use `bs-menu-item`.
|
|
18
|
+
*
|
|
19
|
+
* @slot - The icon (16px, `currentColor`). Overrides the `icon` prop.
|
|
20
|
+
* @part container - The button.
|
|
21
|
+
* @part icon - The icon tile (`bs-icon-tile`).
|
|
22
|
+
* @part name - The title.
|
|
23
|
+
* @part badge - The badge chip (`bs-chip-informative`).
|
|
24
|
+
* @part description - The description.
|
|
25
|
+
* @prop --bs-menu-block-padding - Padding inside the block. Aliased to `--bs-spacing-150`.
|
|
26
|
+
* @prop --bs-menu-block-gap - Gap between icon and text. Aliased to `--bs-spacing-150`.
|
|
27
|
+
* @prop --bs-menu-block-radius - Corner radius. Aliased to `--bs-border-radius-100`.
|
|
28
|
+
* @prop --bs-menu-block-bg - Resting background. `transparent`.
|
|
29
|
+
* @prop --bs-menu-block-bg-hover - Aliased to `--bs-surface-hover`.
|
|
30
|
+
* @prop --bs-menu-block-bg-pressed - Aliased to `--bs-surface-pressed`.
|
|
31
|
+
* @prop --bs-menu-block-icon-bg - Icon square background. Aliased to `--bs-color-neutral-container`; `--bs-surface-base` while hovered or pressed.
|
|
32
|
+
* @prop --bs-menu-block-color - Title colour. Aliased to `--bs-text-default`.
|
|
33
|
+
* @prop --bs-menu-block-color-muted - Description colour. Aliased to `--bs-text-secondary`.
|
|
34
|
+
* @prop --bs-menu-block-focus-ring - Focus ring colour. Aliased to `--bs-border-info`.
|
|
35
|
+
* @prop --bs-menu-block-white-space - `white-space` of the title and description. `nowrap` (single line, ellipsis); set `normal` to let them wrap.
|
|
36
|
+
*/
|
|
37
|
+
export declare class BsMenuBlock {
|
|
38
|
+
/** The title, and the start of the accessible name. */
|
|
39
|
+
name: string;
|
|
40
|
+
/** One line under the title; part of the accessible name. */
|
|
41
|
+
description?: string;
|
|
42
|
+
/** URL of a monochrome SVG painted with the icon colour. The default slot overrides it. */
|
|
43
|
+
icon?: string;
|
|
44
|
+
/** Short text for a chip beside the title, e.g. "New". */
|
|
45
|
+
badge?: string;
|
|
46
|
+
render(): any;
|
|
47
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
interface BsMenuBlockArgs {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
badge: string;
|
|
6
|
+
}
|
|
7
|
+
declare const meta: Meta<BsMenuBlockArgs>;
|
|
8
|
+
export default meta;
|
|
9
|
+
type Story = StoryObj<BsMenuBlockArgs>;
|
|
10
|
+
export declare const Default: Story;
|
|
11
|
+
export declare const WithBadge: Story;
|
|
12
|
+
/** The four states in the design. Hover, pressed and focus come from the native element: point at a block, press it, or Tab to it. */
|
|
13
|
+
export declare const States: Story;
|
|
14
|
+
/** A slotted `<svg>` instead of the `icon` URL. */
|
|
15
|
+
export declare const SlottedIcon: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
type SlotName = 'breadcrumb' | 'status' | 'meta' | 'actions' | 'tabs';
|
|
3
|
+
/**
|
|
4
|
+
* The header at the top of a page's content area: breadcrumb trail, the page title (a real heading) with an
|
|
5
|
+
* optional back button, status and favourite toggle, a meta line, page-level actions on the right and an
|
|
6
|
+
* optional row of tabs. Matches the Figma "Page header" (types List page, Record, Record with tabs and Sticky
|
|
7
|
+
* compact).
|
|
8
|
+
*
|
|
9
|
+
* Built from `bs-breadcrumbs`/`bs-breadcrumb` (slotted by you), `bs-icon-button` (the built-in back and favourite
|
|
10
|
+
* buttons), `bs-chip-informative` (the status you slot), `bs-button` and `bs-icon-button` (the actions you slot),
|
|
11
|
+
* `bs-tabs`/`bs-tab` (the tab row you slot) and `bs-divider` (under the tabs). The title block, meta line and
|
|
12
|
+
* actions area are plain layout markup, because no component covers them. The back arrow and the star are
|
|
13
|
+
* inline SVG (Phosphor "arrow-left", "star" and "star-fill") until the library has an icon component.
|
|
14
|
+
*
|
|
15
|
+
* ## Compact (sticky)
|
|
16
|
+
* `compact` is the condensed state a record header takes once the page scrolls: one row (back, title, status,
|
|
17
|
+
* meta inline, actions), a level 2 shadow, no breadcrumb and no tabs, and `position: sticky`. Set it yourself
|
|
18
|
+
* from a scroll observer. Because the header covers the top of the scroll area, give the scroll container
|
|
19
|
+
* `scroll-padding-top` equal to its height (80px by default) so focused or anchored content is not hidden under it.
|
|
20
|
+
*
|
|
21
|
+
* ## Responsive
|
|
22
|
+
* The header reacts to its own width (a container query), not the viewport's. Below 640px the actions wrap
|
|
23
|
+
* below the title block, slotted buttons grow to 44px tall, the title and meta wrap, and the tab row scrolls
|
|
24
|
+
* sideways inside itself. The page never gets wider.
|
|
25
|
+
*
|
|
26
|
+
* ## When to use
|
|
27
|
+
* - The top of a list page or a single record (an invoice, a customer) inside the app shell's content area.
|
|
28
|
+
*
|
|
29
|
+
* ## When not to use
|
|
30
|
+
* - The app-wide bar with logo, search and user: use `bs-navigation-header`.
|
|
31
|
+
* - The heading of a card, dialog or panel: use that component's own `heading`.
|
|
32
|
+
*
|
|
33
|
+
* ## Accessibility notes
|
|
34
|
+
* The root is a plain `div`, not a `<header>`: a `<header>` that is not inside `<main>`/`<article>`/`<section>`
|
|
35
|
+
* is a second banner landmark. The title is a real heading (`<h1>` by default, `headingLevel` 1 to 6); the
|
|
36
|
+
* status is next to it, not inside it. If you want a landmark, wrap `bs-page-header` yourself.
|
|
37
|
+
*
|
|
38
|
+
* @slot breadcrumb - A `bs-breadcrumbs` trail, shown above the title. Not shown when `compact`.
|
|
39
|
+
* @slot status - A status chip next to the title, e.g. `<bs-chip-informative color="error" size="sm">Overdue</bs-chip-informative>`.
|
|
40
|
+
* @slot meta - The line under the title (inline after it when `compact`). Overrides the `meta` prop. Plain text.
|
|
41
|
+
* @slot actions - The page-level actions on the right, e.g. `bs-button`s and an icon-only "more" `bs-icon-button`.
|
|
42
|
+
* @slot tabs - A `bs-tabs` row under the meta line. Not shown when `compact`.
|
|
43
|
+
* @part container - The root element.
|
|
44
|
+
* @part breadcrumb - The breadcrumb area.
|
|
45
|
+
* @part row - The row holding the title block and the actions.
|
|
46
|
+
* @part main - The title block (back button, title row and meta).
|
|
47
|
+
* @part back - The back `bs-icon-button`.
|
|
48
|
+
* @part title - The row holding the heading, status and favourite button.
|
|
49
|
+
* @part heading - The heading element.
|
|
50
|
+
* @part status - The status area.
|
|
51
|
+
* @part favorite - The favourite `bs-icon-button`.
|
|
52
|
+
* @part meta - The meta line.
|
|
53
|
+
* @part actions - The actions area.
|
|
54
|
+
* @part tabs - The tab row (scrolls sideways when narrow).
|
|
55
|
+
* @part divider - The `bs-divider` under the tabs.
|
|
56
|
+
* @prop --bs-page-header-bg - Background. Aliased to `--bs-surface-base`.
|
|
57
|
+
* @prop --bs-page-header-padding-x - Left and right padding. Aliased to `--bs-spacing-200`.
|
|
58
|
+
* @prop --bs-page-header-padding-y - Top and bottom padding. Aliased to `--bs-spacing-300`.
|
|
59
|
+
* @prop --bs-page-header-gap - Gap between the breadcrumb, title block and tabs, and between the title block and the actions. Aliased to `--bs-spacing-150`.
|
|
60
|
+
* @prop --bs-page-header-title-gap - Gap between the heading, status and favourite button. Aliased to `--bs-spacing-150`.
|
|
61
|
+
* @prop --bs-page-header-actions-gap - Gap between the actions. Aliased to `--bs-spacing-100`.
|
|
62
|
+
* @prop --bs-page-header-text-color - Heading. Aliased to `--bs-text-default`.
|
|
63
|
+
* @prop --bs-page-header-meta-color - Meta line. Aliased to `--bs-text-secondary`.
|
|
64
|
+
* @prop --bs-page-header-shadow - Shadow of the compact header (elevation level 2). Aliased to the `--bs-shadow-*` position and blur tokens and `--bs-elevation-medium`.
|
|
65
|
+
* @prop --bs-page-header-sticky-offset - The `top` of the compact header. Defaults to `0px`; set it to the height of a sticky bar above (e.g. the navigation header).
|
|
66
|
+
* @prop --bs-page-header-z-index - Stacking order of the compact header. Aliased to `--bs-z-index-sticky`.
|
|
67
|
+
*/
|
|
68
|
+
export declare class BsPageHeader {
|
|
69
|
+
el: HTMLElement;
|
|
70
|
+
/** The page title, rendered as the heading. */
|
|
71
|
+
heading: string;
|
|
72
|
+
/** HTML heading level for the title, 1 to 6. Use 1 unless the page already has its own `h1`. */
|
|
73
|
+
headingLevel: number;
|
|
74
|
+
/** The line under the title, plain text, e.g. "214 invoices · 38 open". The `meta` slot overrides it. */
|
|
75
|
+
meta?: string;
|
|
76
|
+
/** The condensed, sticky state: one row, a level 2 shadow, no breadcrumb and no tabs. Reflected. */
|
|
77
|
+
compact: boolean;
|
|
78
|
+
/** Shows a back button before the title. It emits `bsBack`; you navigate. */
|
|
79
|
+
back: boolean;
|
|
80
|
+
/** Accessible name of the back button. */
|
|
81
|
+
backLabel: string;
|
|
82
|
+
/** Shows the favourite (star) toggle after the title. */
|
|
83
|
+
favoritable: boolean;
|
|
84
|
+
/** Whether the record is a favourite. Mutable: it follows the user's toggle unless `bsFavoriteChange` is cancelled. */
|
|
85
|
+
favorite: boolean;
|
|
86
|
+
/** Accessible name of the favourite toggle. It stays the same in both states; `aria-pressed` carries the state. */
|
|
87
|
+
favoriteLabel: string;
|
|
88
|
+
/** Fires when the back button is clicked. Not cancelable: the component has no default action to cancel. */
|
|
89
|
+
bsBack: EventEmitter<void>;
|
|
90
|
+
/** Fires when the user toggles the favourite button, with the new value. Cancelable: `preventDefault()` keeps the old value. */
|
|
91
|
+
bsFavoriteChange: EventEmitter<{
|
|
92
|
+
favorite: boolean;
|
|
93
|
+
}>;
|
|
94
|
+
slotted: Record<SlotName, boolean>;
|
|
95
|
+
componentWillLoad(): void;
|
|
96
|
+
private onSlotChange;
|
|
97
|
+
private onFavoriteClick;
|
|
98
|
+
render(): any;
|
|
99
|
+
}
|
|
100
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
/** Phosphor (regular) icons as monochrome SVG data URIs; a real app supplies its own. */
|
|
3
|
+
export declare const ICONS: Record<string, string>;
|
|
4
|
+
/** Sample data (invented for the stories and tests; not real invoices, customers or amounts). */
|
|
5
|
+
export declare const SAMPLE: {
|
|
6
|
+
heading: string;
|
|
7
|
+
listMeta: string;
|
|
8
|
+
customerMeta: string;
|
|
9
|
+
};
|
|
10
|
+
interface BsPageHeaderArgs {
|
|
11
|
+
heading: string;
|
|
12
|
+
headingLevel: number;
|
|
13
|
+
meta: string;
|
|
14
|
+
compact: boolean;
|
|
15
|
+
back: boolean;
|
|
16
|
+
favoritable: boolean;
|
|
17
|
+
favorite: boolean;
|
|
18
|
+
backLabel: string;
|
|
19
|
+
favoriteLabel: string;
|
|
20
|
+
}
|
|
21
|
+
declare const meta: Meta<BsPageHeaderArgs>;
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<BsPageHeaderArgs>;
|
|
24
|
+
/** Type "List page": breadcrumb, title, a meta line and the page actions on the right. */
|
|
25
|
+
export declare const ListPage: Story;
|
|
26
|
+
/** Type "Record": back button, status chip and favourite toggle beside the title; the meta line lines up with the title. */
|
|
27
|
+
export declare const Record: Story;
|
|
28
|
+
/** Type "Record with tabs": a `bs-tabs` row under the meta line with a full-width divider below it. */
|
|
29
|
+
export declare const RecordWithTabs: Story;
|
|
30
|
+
/** Type "Sticky compact": one row with an inline meta and a level 2 shadow. Scroll the box: the header stays at the top. */
|
|
31
|
+
export declare const StickyCompact: Story;
|
|
32
|
+
/** A favourited record: the star is filled and the button reports `aria-pressed="true"`. */
|
|
33
|
+
export declare const Favourited: Story;
|
|
34
|
+
/** No actions and no status: the title block and the meta line only. */
|
|
35
|
+
export declare const NoActions: Story;
|
|
36
|
+
/** A long title wraps inside the title block; the status, favourite toggle and actions stay in place. */
|
|
37
|
+
export declare const LongTitle: Story;
|
|
38
|
+
/** The Record with tabs at 375px: actions wrap below the title, buttons are 44px tall, the tabs scroll inside their row. */
|
|
39
|
+
export declare const Mobile: Story;
|
|
40
|
+
/** Wired up: click back or the star; the last event is printed below. `bsFavoriteChange` is cancelable. */
|
|
41
|
+
export declare const Interactive: Story;
|
|
@@ -22,12 +22,18 @@ export type BsNavigationHeaderAlignment = 'default' | 'center' | 'with-navigatio
|
|
|
22
22
|
* @slot left - Menu/action content immediately after the logo (or, in `with-navigation-drawer`
|
|
23
23
|
* mode, at the bar's left edge). Typically one or more `bs-button`/`bs-icon-button` elements.
|
|
24
24
|
* @slot right - Menu/action content pushed to the bar's far right.
|
|
25
|
+
* @slot menu - A panel anchored directly below the bar, spanning the header's full width and
|
|
26
|
+
* overlaying the page content under it (typically a `bs-mega-menu`). It takes no space while
|
|
27
|
+
* empty or hidden. The slot only positions the panel: it does not own open/close state -- the
|
|
28
|
+
* consumer's trigger toggles the panel's `hidden`, closes it on its `bsClose` event and on an
|
|
29
|
+
* outside click, and restores focus to the trigger.
|
|
25
30
|
* @part logo - The BrandSync brand mark, rendered via a nested `bs-logo` element (`part="logo"` is
|
|
26
31
|
* set directly on that element -- the same pattern `bs-attachment` uses for its own nested
|
|
27
32
|
* `bs-icon-button`'s `remove` part -- so `bs-navigation-header::part(logo)` still targets it
|
|
28
33
|
* directly, no forwarding needed). Not rendered in `with-navigation-drawer` mode.
|
|
29
34
|
* @part left - The wrapper around the `left` slot.
|
|
30
35
|
* @part right - The wrapper around the `right` slot.
|
|
36
|
+
* @part menu - The wrapper around the `menu` slot (absolutely positioned under the bar).
|
|
31
37
|
* @part skip-link - The "Skip to main content" link (only rendered when `skipToContentHref` is set).
|
|
32
38
|
*/
|
|
33
39
|
export declare class BsNavigationHeader {
|
|
@@ -56,5 +62,5 @@ export declare class BsNavigationHeader {
|
|
|
56
62
|
* explicitly only if you've overridden `--bs-navigation-header-bg` to something dark yourself
|
|
57
63
|
* *without* setting `[data-theme="dark"]`, and need to pin the logo regardless of theme. */
|
|
58
64
|
logoBackground: 'auto' | 'light' | 'dark';
|
|
59
|
-
render(): any;
|
|
65
|
+
render(): any[];
|
|
60
66
|
}
|