@brandsync/wc 0.0.11 → 0.0.12
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/custom-elements.json +3388 -598
- package/dist/brandsync-wc/brandsync-wc.css +20 -0
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-6254dcbe.entry.js → p-09aa03d1.entry.js} +1 -1
- package/dist/brandsync-wc/p-0eee5477.entry.js +1 -0
- package/dist/brandsync-wc/p-0fa017ce.entry.js +1 -0
- package/dist/brandsync-wc/p-12ec9e92.entry.js +1 -0
- package/dist/brandsync-wc/{p-4ca15322.entry.js → p-1900f6ce.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1bf0b2d5.entry.js → p-1adc59be.entry.js} +1 -1
- package/dist/brandsync-wc/p-1c6fa697.entry.js +1 -0
- package/dist/brandsync-wc/{p-8d78171b.entry.js → p-1cf715aa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-84ae4420.entry.js → p-20dbc6a1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-74a4dd91.entry.js → p-23457a21.entry.js} +1 -1
- package/dist/brandsync-wc/p-266f5dde.entry.js +1 -0
- package/dist/brandsync-wc/{p-073e5fee.entry.js → p-2a65aabb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-030a8ba7.entry.js → p-2c51d738.entry.js} +1 -1
- package/dist/brandsync-wc/p-3b31f7c7.entry.js +1 -0
- package/dist/brandsync-wc/p-46ddc8e1.entry.js +1 -0
- package/dist/brandsync-wc/p-56c66448.entry.js +1 -0
- package/dist/brandsync-wc/{p-dd224cb3.entry.js → p-57fdbb76.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8dff4f24.entry.js → p-64e2a7d7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b174403d.entry.js → p-6e854e92.entry.js} +1 -1
- package/dist/brandsync-wc/p-72a33f88.entry.js +1 -0
- package/dist/brandsync-wc/p-8049f9f2.entry.js +1 -0
- package/dist/brandsync-wc/{p-c6d330c3.entry.js → p-88a0abee.entry.js} +1 -1
- package/dist/brandsync-wc/p-8b662ee3.entry.js +1 -0
- package/dist/brandsync-wc/{p-41edb0a2.entry.js → p-8ded1eb6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-DP_bvuvB.js → p-DST5-cTx.js} +2 -2
- package/dist/brandsync-wc/p-a5b15061.entry.js +1 -0
- package/dist/brandsync-wc/{p-7a605d98.entry.js → p-aba300a9.entry.js} +1 -1
- package/dist/brandsync-wc/p-b24a980b.entry.js +1 -0
- package/dist/brandsync-wc/p-b289450a.entry.js +1 -0
- package/dist/brandsync-wc/{p-7131d0a1.entry.js → p-b8a2f882.entry.js} +1 -1
- package/dist/brandsync-wc/p-c320b6b4.entry.js +1 -0
- package/dist/brandsync-wc/{p-d1dc2ced.entry.js → p-d4e3ca77.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0b858120.entry.js → p-dd09d335.entry.js} +1 -1
- package/dist/brandsync-wc/p-ef8522b5.entry.js +1 -0
- package/dist/brandsync-wc/p-f04db1b0.entry.js +1 -0
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +3 -2
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +2 -2
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +2 -2
- package/dist/cjs/bs-attachment-list.cjs.entry.js +2 -2
- package/dist/cjs/bs-attachment.cjs.entry.js +3 -3
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/bs-button.cjs.entry.js +3 -3
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-checkbox.cjs.entry.js +14 -3
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +14 -2
- package/dist/cjs/bs-composer.cjs.entry.js +37 -4
- package/dist/cjs/bs-data-table.cjs.entry.js +3 -3
- package/dist/cjs/bs-icon-button.cjs.entry.js +40 -0
- package/dist/cjs/bs-inline-tab.cjs.entry.js +69 -0
- package/dist/cjs/bs-input.cjs.entry.js +3 -3
- package/dist/cjs/bs-logo.cjs.entry.js +165 -0
- package/dist/cjs/bs-menu_2.cjs.entry.js +3 -3
- package/dist/cjs/bs-modal.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +104 -0
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +81 -0
- package/dist/cjs/bs-navigation-header.cjs.entry.js +44 -0
- package/dist/cjs/bs-radio.cjs.entry.js +49 -0
- package/dist/cjs/bs-slider.cjs.entry.js +191 -0
- package/dist/cjs/bs-source-link.cjs.entry.js +3 -3
- package/dist/cjs/bs-switch.cjs.entry.js +57 -0
- package/dist/cjs/bs-tab.cjs.entry.js +80 -0
- package/dist/cjs/bs-tabs.cjs.entry.js +39 -0
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{index-CGrdFg95.js → index-B3sdhEGk.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +13 -2
- package/dist/collection/components/bs-ai-chatbot/bs-ai-chatbot.stories.js +26 -11
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +2 -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-attachment/bs-attachment.css +12 -33
- package/dist/collection/components/bs-attachment/bs-attachment.js +4 -10
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-button/{bs-button.cmp.test.js → bs-button/bs-button.cmp.test.js} +26 -0
- package/dist/collection/components/bs-button/{bs-button.css → bs-button/bs-button.css} +57 -6
- package/dist/collection/components/bs-button/{bs-button.js → bs-button/bs-button.js} +10 -5
- package/dist/collection/components/bs-button/{bs-button.stories.js → bs-button/bs-button.stories.js} +2 -27
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.js +83 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.css +346 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +185 -0
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.stories.js +74 -0
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +3 -3
- 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.cmp.test.js +10 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.css +7 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +32 -1
- package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +48 -7
- package/dist/collection/components/bs-composer/bs-composer.css +15 -0
- package/dist/collection/components/bs-composer/bs-composer.js +38 -4
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +47 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +20 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-logo/brandsync-logo-full-dark.js +44 -0
- package/dist/collection/components/bs-logo/brandsync-logo-full-light.js +40 -0
- package/dist/collection/components/bs-logo/brandsync-logo-mark.js +17 -0
- package/dist/collection/components/bs-logo/bs-logo.cmp.test.js +113 -0
- package/dist/collection/components/bs-logo/bs-logo.css +79 -0
- package/dist/collection/components/bs-logo/bs-logo.js +193 -0
- package/dist/collection/components/bs-logo/bs-logo.stories.js +69 -0
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.cmp.test.js +76 -0
- package/dist/collection/components/bs-radio/bs-radio.css +164 -0
- package/dist/collection/components/bs-radio/bs-radio.js +170 -0
- package/dist/collection/components/bs-radio/bs-radio.stories.js +56 -0
- package/dist/collection/components/bs-slider/bs-slider.cmp.test.js +139 -0
- package/dist/collection/components/bs-slider/bs-slider.css +409 -0
- package/dist/collection/components/bs-slider/bs-slider.js +499 -0
- package/dist/collection/components/bs-slider/bs-slider.stories.js +70 -0
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-switch/bs-switch.cmp.test.js +71 -0
- package/dist/collection/components/bs-switch/bs-switch.css +196 -0
- package/dist/collection/components/bs-switch/bs-switch.js +185 -0
- package/dist/collection/components/bs-switch/bs-switch.stories.js +60 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.js +104 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.css +163 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +192 -0
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.js +95 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.cmp.test.js +120 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.css +216 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +232 -0
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.stories.js +138 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.cmp.test.js +61 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.css +39 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +133 -0
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.stories.js +39 -0
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +131 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.css +257 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +253 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +202 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.js +172 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.css +325 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +314 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.js +78 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.js +77 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.css +106 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +188 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.js +189 -0
- 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-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-badge.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-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.js +1 -1
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-icon-button.d.ts +11 -0
- package/dist/components/bs-icon-button.js +1 -0
- package/dist/components/bs-inline-tab.d.ts +11 -0
- package/dist/components/bs-inline-tab.js +1 -0
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-logo.d.ts +11 -0
- package/dist/components/bs-logo.js +1 -0
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-modal.js +1 -1
- package/dist/components/bs-navigation-drawer-item.d.ts +11 -0
- package/dist/components/bs-navigation-drawer-item.js +1 -0
- package/dist/components/bs-navigation-drawer.d.ts +11 -0
- package/dist/components/bs-navigation-drawer.js +1 -0
- package/dist/components/bs-navigation-header.d.ts +11 -0
- package/dist/components/bs-navigation-header.js +1 -0
- package/dist/components/bs-radio.d.ts +11 -0
- package/dist/components/bs-radio.js +1 -0
- package/dist/components/bs-slider.d.ts +11 -0
- package/dist/components/bs-slider.js +1 -0
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-switch.d.ts +11 -0
- package/dist/components/bs-switch.js +1 -0
- package/dist/components/bs-tab.d.ts +11 -0
- package/dist/components/bs-tab.js +1 -0
- package/dist/components/bs-tabs.d.ts +11 -0
- package/dist/components/bs-tabs.js +1 -0
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BAOJc0V0.js +1 -0
- package/dist/components/{p-D1cYtKyN.js → p-Be1Pfcnm.js} +1 -1
- package/dist/components/{p-B9PrXIl_.js → p-BqYyMGrB.js} +1 -1
- package/dist/components/p-CaWqTQBZ.js +1 -0
- package/dist/components/{p-BUbGEXL7.js → p-DivZLd6i.js} +1 -1
- package/dist/components/{p-D2HDHZjz.js → p-xfx69LQx.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-ai-disclaimer.entry.js +3 -2
- package/dist/esm/bs-ai-greeting.entry.js +2 -2
- package/dist/esm/bs-ai-thinking.entry.js +2 -2
- package/dist/esm/bs-attachment-list.entry.js +2 -2
- package/dist/esm/bs-attachment.entry.js +3 -3
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +2 -2
- package/dist/esm/bs-button.entry.js +3 -3
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +2 -2
- package/dist/esm/bs-chatbot-header.entry.js +2 -2
- package/dist/esm/bs-chatbot-response-action.entry.js +2 -2
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +2 -2
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
- package/dist/esm/bs-checkbox.entry.js +14 -3
- package/dist/esm/bs-composer-status-banner.entry.js +14 -2
- package/dist/esm/bs-composer.entry.js +37 -4
- package/dist/esm/bs-data-table.entry.js +3 -3
- package/dist/esm/bs-icon-button.entry.js +38 -0
- package/dist/esm/bs-inline-tab.entry.js +67 -0
- package/dist/esm/bs-input.entry.js +3 -3
- package/dist/esm/bs-logo.entry.js +163 -0
- package/dist/esm/bs-menu_2.entry.js +3 -3
- package/dist/esm/bs-modal.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +102 -0
- package/dist/esm/bs-navigation-drawer.entry.js +79 -0
- package/dist/esm/bs-navigation-header.entry.js +42 -0
- package/dist/esm/bs-radio.entry.js +47 -0
- package/dist/esm/bs-slider.entry.js +189 -0
- package/dist/esm/bs-source-link.entry.js +3 -3
- package/dist/esm/bs-switch.entry.js +55 -0
- package/dist/esm/bs-tab.entry.js +78 -0
- package/dist/esm/bs-tabs.entry.js +37 -0
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/{index-DP_bvuvB.js → index-DST5-cTx.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-attachment/bs-attachment.d.ts +3 -9
- package/dist/types/components/bs-button/{bs-button.d.ts → bs-button/bs-button.d.ts} +5 -0
- package/dist/types/components/bs-button/{bs-button.stories.d.ts → bs-button/bs-button.stories.d.ts} +0 -2
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.d.ts +51 -0
- package/dist/types/components/bs-button/bs-icon-button/bs-icon-button.stories.d.ts +16 -0
- package/dist/types/components/bs-button-skeleton/bs-button-skeleton.d.ts +1 -1
- package/dist/types/components/bs-button-skeleton/bs-button-skeleton.stories.d.ts +1 -1
- package/dist/types/components/bs-checkbox/bs-checkbox.d.ts +11 -0
- package/dist/types/components/bs-composer/bs-composer.d.ts +26 -2
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +14 -0
- package/dist/types/components/bs-logo/brandsync-logo-full-dark.d.ts +1 -0
- package/dist/types/components/bs-logo/brandsync-logo-full-light.d.ts +1 -0
- package/dist/types/components/bs-logo/brandsync-logo-mark.d.ts +1 -0
- package/dist/types/components/bs-logo/bs-logo.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-logo/bs-logo.d.ts +73 -0
- package/dist/types/components/bs-logo/bs-logo.stories.d.ts +17 -0
- package/dist/types/components/bs-radio/bs-radio.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-radio/bs-radio.d.ts +45 -0
- package/dist/types/components/bs-radio/bs-radio.stories.d.ts +16 -0
- package/dist/types/components/bs-slider/bs-slider.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-slider/bs-slider.d.ts +109 -0
- package/dist/types/components/bs-slider/bs-slider.stories.d.ts +24 -0
- package/dist/types/components/bs-switch/bs-switch.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-switch/bs-switch.d.ts +45 -0
- package/dist/types/components/bs-switch/bs-switch.stories.d.ts +17 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.d.ts +65 -0
- package/dist/types/components/bs-tab/bs-inline-tab/bs-inline-tab.stories.d.ts +22 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.d.ts +74 -0
- package/dist/types/components/bs-tab/bs-tab/bs-tab.stories.d.ts +30 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.d.ts +45 -0
- package/dist/types/components/bs-tab/bs-tabs/bs-tabs.stories.d.ts +13 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.d.ts +1 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +96 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +16 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.cmp.test.d.ts +1 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.d.ts +103 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.stories.d.ts +20 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.cmp.test.d.ts +1 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.d.ts +60 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.d.ts +21 -0
- package/dist/types/components.d.ts +1842 -53
- package/package.json +1 -1
- package/dist/brandsync-wc/p-2598ca88.entry.js +0 -1
- package/dist/brandsync-wc/p-3c8fbaa8.entry.js +0 -1
- package/dist/brandsync-wc/p-3dd9b814.entry.js +0 -1
- package/dist/brandsync-wc/p-8c302968.entry.js +0 -1
- package/dist/brandsync-wc/p-93e44903.entry.js +0 -1
- package/dist/brandsync-wc/p-aa45d877.entry.js +0 -1
- /package/dist/types/components/bs-button/{bs-button.cmp.test.d.ts → bs-button/bs-button.cmp.test.d.ts} +0 -0
|
@@ -7,24 +7,38 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { BsAttachmentType } from "./components/bs-attachment/bs-attachment";
|
|
9
9
|
import { BsBadgeVariant } from "./components/bs-badge/bs-badge";
|
|
10
|
-
import { BsButtonSize, BsButtonVariant } from "./components/bs-button/bs-button";
|
|
11
|
-
import { BsButtonSize as BsButtonSize1 } from "./components/bs-button/bs-button";
|
|
10
|
+
import { BsButtonSize, BsButtonVariant } from "./components/bs-button/bs-button/bs-button";
|
|
11
|
+
import { BsButtonSize as BsButtonSize1 } from "./components/bs-button/bs-button/bs-button";
|
|
12
12
|
import { BsCardSurface } from "./components/bs-card/bs-card";
|
|
13
13
|
import { BsCheckboxSize } from "./components/bs-checkbox/bs-checkbox";
|
|
14
14
|
import { BsComposerState, BsComposerVariant } from "./components/bs-composer/bs-composer";
|
|
15
15
|
import { BsComposerStatusBannerType } from "./components/bs-composer-status-banner/bs-composer-status-banner";
|
|
16
16
|
import { BsDataTableColumn, BsDataTableRow } from "./components/bs-data-table/bs-data-table";
|
|
17
|
+
import { BsIconButtonSize, BsIconButtonVariant } from "./components/bs-button/bs-icon-button/bs-icon-button";
|
|
18
|
+
import { BsLogoBackground, BsLogoVariant } from "./components/bs-logo/bs-logo";
|
|
17
19
|
import { BsModalSize } from "./components/bs-modal/bs-modal";
|
|
20
|
+
import { BsNavigationHeaderAlignment } from "./components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header";
|
|
21
|
+
import { BsSliderType } from "./components/bs-slider/bs-slider";
|
|
22
|
+
import { BsSwitchSize } from "./components/bs-switch/bs-switch";
|
|
23
|
+
import { BsTabIconPosition } from "./components/bs-tab/bs-tab/bs-tab";
|
|
24
|
+
import { BsTabsOrientation, BsTabsType } from "./components/bs-tab/bs-tabs/bs-tabs";
|
|
18
25
|
export { BsAttachmentType } from "./components/bs-attachment/bs-attachment";
|
|
19
26
|
export { BsBadgeVariant } from "./components/bs-badge/bs-badge";
|
|
20
|
-
export { BsButtonSize, BsButtonVariant } from "./components/bs-button/bs-button";
|
|
21
|
-
export { BsButtonSize as BsButtonSize1 } from "./components/bs-button/bs-button";
|
|
27
|
+
export { BsButtonSize, BsButtonVariant } from "./components/bs-button/bs-button/bs-button";
|
|
28
|
+
export { BsButtonSize as BsButtonSize1 } from "./components/bs-button/bs-button/bs-button";
|
|
22
29
|
export { BsCardSurface } from "./components/bs-card/bs-card";
|
|
23
30
|
export { BsCheckboxSize } from "./components/bs-checkbox/bs-checkbox";
|
|
24
31
|
export { BsComposerState, BsComposerVariant } from "./components/bs-composer/bs-composer";
|
|
25
32
|
export { BsComposerStatusBannerType } from "./components/bs-composer-status-banner/bs-composer-status-banner";
|
|
26
33
|
export { BsDataTableColumn, BsDataTableRow } from "./components/bs-data-table/bs-data-table";
|
|
34
|
+
export { BsIconButtonSize, BsIconButtonVariant } from "./components/bs-button/bs-icon-button/bs-icon-button";
|
|
35
|
+
export { BsLogoBackground, BsLogoVariant } from "./components/bs-logo/bs-logo";
|
|
27
36
|
export { BsModalSize } from "./components/bs-modal/bs-modal";
|
|
37
|
+
export { BsNavigationHeaderAlignment } from "./components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header";
|
|
38
|
+
export { BsSliderType } from "./components/bs-slider/bs-slider";
|
|
39
|
+
export { BsSwitchSize } from "./components/bs-switch/bs-switch";
|
|
40
|
+
export { BsTabIconPosition } from "./components/bs-tab/bs-tab/bs-tab";
|
|
41
|
+
export { BsTabsOrientation, BsTabsType } from "./components/bs-tab/bs-tabs/bs-tabs";
|
|
28
42
|
export namespace Components {
|
|
29
43
|
/**
|
|
30
44
|
* A centered caption disclaimer for Genie AI surfaces, e.g. "AI can make mistakes. Please verify
|
|
@@ -114,7 +128,9 @@ export namespace Components {
|
|
|
114
128
|
/**
|
|
115
129
|
* A single file attachment preview for `bs-composer` -- an image thumbnail, or a filename card
|
|
116
130
|
* with a colored file-type badge (PDF/Document), with an optional upload-in-progress spinner and
|
|
117
|
-
* a hover/focus-revealed remove button
|
|
131
|
+
* a hover/focus-revealed remove button (a `bs-icon-button` with `size="xs"` `variant="neutral"` --
|
|
132
|
+
* the same 16x16px compact tier `bs-icon-button` documents as meant for exactly this kind of
|
|
133
|
+
* chip/tag "remove" control).
|
|
118
134
|
* ## When to use
|
|
119
135
|
* - Rendered by the consuming app for each file a user has attached to a Genie AI chat message,
|
|
120
136
|
* typically alongside or inside `bs-composer`.
|
|
@@ -131,14 +147,6 @@ export namespace Components {
|
|
|
131
147
|
* @prop --bs-attachment-badge-bg-pdf - PDF badge background. Aliased to `--bs-badge-bg-error`.
|
|
132
148
|
* @prop --bs-attachment-badge-bg-document - Document badge background. Aliased to
|
|
133
149
|
* `--bs-badge-bg-info`.
|
|
134
|
-
* @prop --bs-attachment-remove-bg - Remove button (neutral icon button) default background.
|
|
135
|
-
* Aliased to `--bs-button-neutral-container`.
|
|
136
|
-
* @prop --bs-attachment-remove-hover - Remove button hover background. Aliased to
|
|
137
|
-
* `--bs-button-neutral-hover`.
|
|
138
|
-
* @prop --bs-attachment-remove-pressed - Remove button active/pressed background. Aliased to
|
|
139
|
-
* `--bs-button-neutral-pressed`.
|
|
140
|
-
* @prop --bs-attachment-remove-focus - Remove button focus outline color. Aliased to
|
|
141
|
-
* `--bs-border-neutral-focus`.
|
|
142
150
|
*/
|
|
143
151
|
interface BsAttachment {
|
|
144
152
|
/**
|
|
@@ -233,6 +241,11 @@ export namespace Components {
|
|
|
233
241
|
* @prop --bs-button-height-sm - Height at `size="sm"`. Aliased to `--bs-spacing-500`.
|
|
234
242
|
* @prop --bs-button-height-md - Height at `size="md"`. Aliased to `--bs-spacing-600`.
|
|
235
243
|
* @prop --bs-button-height-lg - Height at `size="lg"`. Aliased to `--bs-spacing-700`.
|
|
244
|
+
* @prop --bs-button-neutral-border - Border color, `variant="neutral"`, default/disabled. Aliased to `--bs-border-neutral-container`.
|
|
245
|
+
* @prop --bs-button-neutral-border-hover - Border color, `variant="neutral"`, hover. Aliased to `--bs-border-neutral-container-hover`.
|
|
246
|
+
* @prop --bs-button-neutral-border-pressed - Border color, `variant="neutral"`, pressed. Aliased to `--bs-border-neutral-container-pressed`.
|
|
247
|
+
* @prop --bs-button-padding-x-icon-side - Horizontal padding on an edge that's adjacent to a leading/trailing icon (tighter than the plain text-only edge). Aliased to `--bs-spacing-150`.
|
|
248
|
+
* @prop --bs-button-padding-x-label-side - Horizontal padding on the opposite edge, when an icon on the other side needs compensating extra space to keep the button optically balanced. Aliased to `--bs-spacing-250`.
|
|
236
249
|
*/
|
|
237
250
|
interface BsButton {
|
|
238
251
|
/**
|
|
@@ -530,6 +543,11 @@ export namespace Components {
|
|
|
530
543
|
* - An on/off setting that takes effect immediately (no explicit form submission) -- use `bs-switch`.
|
|
531
544
|
*/
|
|
532
545
|
interface BsCheckbox {
|
|
546
|
+
/**
|
|
547
|
+
* Accessible name for the checkbox. Required whenever the default (label) slot is empty (e.g. a bare "select row" checkbox in a table) -- without it, the internal native `<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-checkbox>` host does NOT work for this: that attribute stays on the light-DOM host and is never forwarded into the shadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays nameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and `bs-tab`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal focusable element for the same reason.
|
|
548
|
+
* @default null
|
|
549
|
+
*/
|
|
550
|
+
"ariaLabel": string | null;
|
|
533
551
|
/**
|
|
534
552
|
* Whether the checkbox is checked. Mutable so clicking the label/input toggles it directly. When `indeterminate` is also true, `indeterminate` wins visually (shows the minus icon) regardless of this value -- same as native checkboxes.
|
|
535
553
|
* @default false
|
|
@@ -587,6 +605,7 @@ export namespace Components {
|
|
|
587
605
|
* @prop --bs-composer-mic-icon-disabled - Aliased to `--bs-icon-disabled`.
|
|
588
606
|
* @prop --bs-composer-subtle-hover - Background of the attach/mic buttons on hover (subtle-button treatment, same as `bs-button`'s `subtle` variant). Aliased to `--bs-color-neutral-container`.
|
|
589
607
|
* @prop --bs-composer-subtle-pressed - Background of the attach/mic buttons when pressed. Aliased to `--bs-color-neutral-container-pressed`.
|
|
608
|
+
* @prop --bs-composer-input-max-lines - How many lines the text field grows to before scrolling internally instead of growing further. Aliased to `10`.
|
|
590
609
|
*/
|
|
591
610
|
interface BsComposer {
|
|
592
611
|
/**
|
|
@@ -604,7 +623,7 @@ export namespace Components {
|
|
|
604
623
|
*/
|
|
605
624
|
"state": BsComposerState;
|
|
606
625
|
/**
|
|
607
|
-
* Current text value. Native `input` events don't cross the Shadow DOM boundary, so this component re-dispatches them as a `bsInput` custom event instead.
|
|
626
|
+
* Current text value. Native `input` events don't cross the Shadow DOM boundary, so this component re-dispatches them as a `bsInput` custom event instead. The field is a `<textarea>` (not a single-line `<input>`) that grows with its content, up to `--bs-composer-input-max-lines` (10 by default) -- beyond that it scrolls internally instead of growing further. Setting `value` as a prop (not just typing) also re-triggers the resize, so e.g. programmatically clearing the field after submit correctly shrinks it back down.
|
|
608
627
|
* @default ''
|
|
609
628
|
*/
|
|
610
629
|
"value": string;
|
|
@@ -625,6 +644,12 @@ export namespace Components {
|
|
|
625
644
|
* ## When not to use
|
|
626
645
|
* - A toast/snackbar notification unrelated to the composer -- this component is not
|
|
627
646
|
* self-dismissing and has no positioning of its own (it's a static block, not an overlay).
|
|
647
|
+
* ## Accessibility
|
|
648
|
+
* Sets `role="status"` for `type="info"`/`type="neutral"` and `role="alert"` for
|
|
649
|
+
* `type="error"`/`type="warning"` on its own root element automatically -- no opt-in prop needed.
|
|
650
|
+
* Both roles carry implicit ARIA live-region semantics (`status` is polite, `alert` is assertive),
|
|
651
|
+
* so a screen reader announces the message as soon as this banner is inserted into the DOM,
|
|
652
|
+
* without a consumer having to remember to add `role`/`aria-live` themselves.
|
|
628
653
|
* @prop --bs-composer-status-banner-radius - Corner radius of the top-left/top-right corners
|
|
629
654
|
* (bottom corners are square, so this sits flush above `bs-composer`). Aliased to
|
|
630
655
|
* `--bs-border-radius-150`.
|
|
@@ -739,6 +764,90 @@ export namespace Components {
|
|
|
739
764
|
*/
|
|
740
765
|
"sortDirection": 'asc' | 'desc';
|
|
741
766
|
}
|
|
767
|
+
/**
|
|
768
|
+
* A clickable, icon-only action element -- the icon-only sibling of `bs-button`, sharing the same
|
|
769
|
+
* 8 visual variants and color language, but ALWAYS rendering just a single icon, never a label.
|
|
770
|
+
* ## When to use
|
|
771
|
+
* - A compact action where the icon alone is unambiguous (e.g. a close/dismiss control, a toolbar
|
|
772
|
+
* action) and adding a text label would take up more space than the context allows.
|
|
773
|
+
* - The same variant guidance as `bs-button` applies: `primary` for the single most important
|
|
774
|
+
* action, `neutral`/`subtle`/`outlined` for lower-emphasis alternatives, `error` reserved for
|
|
775
|
+
* destructive/irreversible actions (never `neutral`, per BrandSync guidance), `success`/
|
|
776
|
+
* `warning`/`info` only when the action's own outcome is predictable and clearly communicated.
|
|
777
|
+
* ## When not to use
|
|
778
|
+
* - When the action isn't self-evident from the icon alone -- use `bs-button` with a visible label
|
|
779
|
+
* instead, don't rely on a tooltip to compensate for an unclear icon.
|
|
780
|
+
* - For navigation between pages -- use a link/nav component instead.
|
|
781
|
+
* Because this component is always icon-only, `ariaLabel` is required for every real usage (not
|
|
782
|
+
* just conditionally, unlike `bs-button`) -- there's no visible label text to fall back on for an
|
|
783
|
+
* accessible name.
|
|
784
|
+
*/
|
|
785
|
+
interface BsIconButton {
|
|
786
|
+
/**
|
|
787
|
+
* Accessible name for the button. Required -- this component is always icon-only, so there's no visible label text for screen readers to fall back on. Stencil reflects this camelCase prop to the `aria-label` HTML attribute automatically.
|
|
788
|
+
* @default null
|
|
789
|
+
*/
|
|
790
|
+
"ariaLabel": string | null;
|
|
791
|
+
/**
|
|
792
|
+
* Disables the button and applies the disabled token set.
|
|
793
|
+
* @default false
|
|
794
|
+
*/
|
|
795
|
+
"disabled": boolean;
|
|
796
|
+
/**
|
|
797
|
+
* Sizing scale. `xs` (16px, an 8px icon) is a distinct, much smaller tier meant for compact chip/tag "remove" controls, not just a smaller toolbar button -- verified against a separate Figma redline (EG BrandSync UI Kit v1.5, node 20731:18427) from the one `sm`/`md`/`lg` were built against.
|
|
798
|
+
* @default 'md'
|
|
799
|
+
*/
|
|
800
|
+
"size": BsIconButtonSize;
|
|
801
|
+
/**
|
|
802
|
+
* Native `<button>` type.
|
|
803
|
+
* @default 'button'
|
|
804
|
+
*/
|
|
805
|
+
"type": 'button' | 'submit' | 'reset';
|
|
806
|
+
/**
|
|
807
|
+
* Visual style. Maps to the same semantic token families as `bs-button`'s `variant`. `error` is for destructive/irreversible actions per BrandSync guidance, not a stronger emphasis alternative to `primary`.
|
|
808
|
+
* @default 'primary'
|
|
809
|
+
*/
|
|
810
|
+
"variant": BsIconButtonVariant;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* A pill-shaped tab button -- an optional leading icon plus a text label, rendered as a real
|
|
814
|
+
* `<button>` so it participates correctly in tab order and native click/keyboard activation.
|
|
815
|
+
* Unlike `bs-tab`'s underline indicator, selection here is communicated entirely by the pill's
|
|
816
|
+
* background fill color -- there is no separate indicator element.
|
|
817
|
+
* ## When to use
|
|
818
|
+
* - As one button within a segmented-control-style tab bar, where exactly one tab is
|
|
819
|
+
* selected/active at a time.
|
|
820
|
+
* ## When not to use
|
|
821
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-inline-tab`'s visual language
|
|
822
|
+
* (muted pill until selected/hovered) only makes sense as part of a set.
|
|
823
|
+
* `selected` is NOT self-toggling -- clicking a `bs-inline-tab` only emits `bsSelect`, it does not
|
|
824
|
+
* set its own `selected` prop, and it does not unselect any sibling tabs. Wrap your
|
|
825
|
+
* `<bs-inline-tab>` elements in `<bs-tabs type="bs-inline-tab">` -- it owns `role="tablist"` and
|
|
826
|
+
* coordinates selection (listening for `bsSelect` and setting `selected`/`false` across siblings)
|
|
827
|
+
* for you. Using `bs-inline-tab` standalone, outside a `<bs-tabs>` wrapper, still means `selected`
|
|
828
|
+
* doesn't self-toggle and `role="tablist"` isn't provided automatically -- a consumer doing that
|
|
829
|
+
* would still need to coordinate `selected` and supply `role="tablist"` manually, same as
|
|
830
|
+
* `bs-tab.mdx`/`bs-radio.mdx` document for their own components. See `bs-inline-tab.mdx`'s
|
|
831
|
+
* Accessibility section for the full requirement, including `role="tabpanel"` on the corresponding
|
|
832
|
+
* content panels.
|
|
833
|
+
*/
|
|
834
|
+
interface BsInlineTab {
|
|
835
|
+
/**
|
|
836
|
+
* Accessible name for the tab. Required for icon-only usage (no visible label text via the default slot) so screen readers still announce what the tab does -- without it, an icon-only tab has no discernible name at all (axe-core flags this as a critical `button-name` violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute automatically, same as `bs-tab`'s identical prop.
|
|
837
|
+
* @default null
|
|
838
|
+
*/
|
|
839
|
+
"ariaLabel": string | null;
|
|
840
|
+
/**
|
|
841
|
+
* Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents clicking from emitting `bsSelect`.
|
|
842
|
+
* @default false
|
|
843
|
+
*/
|
|
844
|
+
"disabled": boolean;
|
|
845
|
+
/**
|
|
846
|
+
* Whether this tab is the currently active one. NOT mutable and NOT self-toggling -- see the "Known gap" note in the class JSDoc. Still reflected as an attribute so consumers/CSS can target `bs-inline-tab[selected]`.
|
|
847
|
+
* @default false
|
|
848
|
+
*/
|
|
849
|
+
"selected": boolean;
|
|
850
|
+
}
|
|
742
851
|
/**
|
|
743
852
|
* A single-line text field with an optional label, description, and error state. Also covers a
|
|
744
853
|
* range of related "field" shapes (number stepper, password reveal, date, dropdown trigger,
|
|
@@ -849,6 +958,52 @@ export namespace Components {
|
|
|
849
958
|
*/
|
|
850
959
|
"value": string;
|
|
851
960
|
}
|
|
961
|
+
/**
|
|
962
|
+
* The BrandSync brand mark, as its own standalone component -- shared by `bs-navigation-header`
|
|
963
|
+
* and `bs-navigation-drawer`, which used to each render their own duplicated copy of this SVG
|
|
964
|
+
* (the drawer's collapsed state even faked an icon-only look by clipping the full wordmark asset
|
|
965
|
+
* down to a narrowed box, rather than using a real icon-only asset).
|
|
966
|
+
* ## When to use
|
|
967
|
+
* - Anywhere the BrandSync logo/icon needs to render: a navigation header, a nav drawer, etc.
|
|
968
|
+
* ## When not to use
|
|
969
|
+
* - The Genie AI chat panel's own brand mark -- that's a different logo (`bs-chatbot-header`'s
|
|
970
|
+
* own inline Genie asset), not this one.
|
|
971
|
+
* `variant` mirrors Figma's "Logo" component set (node 10909:30421) `Device` property
|
|
972
|
+
* ("Desktop" / "Tab and mobile"), which was originally meant to distinguish the full lockup from
|
|
973
|
+
* the icon-only mark at different responsive breakpoints -- renamed here to
|
|
974
|
+
* `variant: 'full' | 'mark'` since that's what it actually controls (how much of the logo
|
|
975
|
+
* renders), not literally a device/breakpoint switch.
|
|
976
|
+
* `variant="custom"` is not a Figma variant at all -- it's an escape hatch for a consuming app
|
|
977
|
+
* that needs to show a DIFFERENT product's logo in the same slot (e.g. a white-labeled deployment,
|
|
978
|
+
* or a logo fetched at runtime from a service like brand.dev), via `src`/`alt`, instead of the
|
|
979
|
+
* built-in BrandSync assets. This component deliberately does NOT fetch that image itself --
|
|
980
|
+
* network calls, loading/error states, and caching are the consuming app's responsibility, same as
|
|
981
|
+
* every other component in this library (e.g. `bs-attachment` takes `imageSrc` rather than fetching
|
|
982
|
+
* an image on its own). `background` has no effect on `variant="custom"` -- a consumer's own image
|
|
983
|
+
* is already designed for whatever surface it's placed on.
|
|
984
|
+
*/
|
|
985
|
+
interface BsLogo {
|
|
986
|
+
/**
|
|
987
|
+
* `variant="custom"` only: accessible alt text for the image -- a product logo is meaningful content (whose brand is this?), not decorative, so set this to something real (e.g. the product/company name). Falls back to `alt=""` (marking the image decorative to assistive tech) when unset, rather than omitting the `alt` attribute entirely -- an `<img>` with no `alt` attribute at all is a harder accessibility failure than one explicitly marked decorative, but an empty fallback is still worse than a real name, so don't rely on it. Ignored for `full`/`mark` (those already carry their own fixed `aria-label="BrandSync"`).
|
|
988
|
+
* @default null
|
|
989
|
+
*/
|
|
990
|
+
"alt": string | null;
|
|
991
|
+
/**
|
|
992
|
+
* Which pre-built asset to use for `variant="full"` -- Figma ships a genuinely separate, differently-drawn dark-background asset (every wordmark path filled solid white, and the icon's outer shape a single solid-white path instead of the light version's two-path white-fill-plus-border-ring), not a CSS currentColor swap of identical paths. `"auto"` (default) renders both assets and lets CSS pick one via `--bs-logo-asset-light-display`/`--bs-logo-asset-dark-display` (defined in `src/global/base.css`, flipped by the same `[data-theme="dark"]` attribute every other `--bs-*` token already reacts to) -- so the logo just follows the ambient theme with no wiring needed, the same way a consuming app's own dark mode already re-themes every other part of this library via ordinary CSS custom property inheritance. Set `"light"`/`"dark"` explicitly to pin one regardless of the ambient theme -- e.g. a dark sidebar that isn't otherwise dark-themed. Has no effect on `variant="mark"`: Figma's component set only has one real designed instance of the icon-only mark (`Device="Tab and mobile"`, `Background="Default"`) -- there's no separate dark version of it, so the mark renders identically regardless of this prop.
|
|
993
|
+
* @default 'auto'
|
|
994
|
+
*/
|
|
995
|
+
"background": BsLogoBackground;
|
|
996
|
+
/**
|
|
997
|
+
* `variant="custom"` only: the image URL to render (e.g. a URL your app already fetched from a logo API). Ignored for `full`/`mark`.
|
|
998
|
+
* @default null
|
|
999
|
+
*/
|
|
1000
|
+
"src": string | null;
|
|
1001
|
+
/**
|
|
1002
|
+
* How much of the logo to render. `full` is the icon + "EG BrandSync" wordmark (190.977x44 natural size); `mark` is just the icon (44x44 natural size), no wordmark; `custom` renders a consumer-supplied image via `src`/`alt` instead of a built-in BrandSync asset -- see the class doc above.
|
|
1003
|
+
* @default 'full'
|
|
1004
|
+
*/
|
|
1005
|
+
"variant": BsLogoVariant;
|
|
1006
|
+
}
|
|
852
1007
|
/**
|
|
853
1008
|
* A generic dropdown/popup menu container: a rounded, elevated list of items (typically
|
|
854
1009
|
* `bs-menu-item` elements).
|
|
@@ -918,6 +1073,271 @@ export namespace Components {
|
|
|
918
1073
|
*/
|
|
919
1074
|
"size": BsModalSize;
|
|
920
1075
|
}
|
|
1076
|
+
/**
|
|
1077
|
+
* A left-side persistent navigation sidebar: the BrandSync logo, a "Main Menu" title with a
|
|
1078
|
+
* collapse toggle, a reserved slot for a search field, and a scrollable list of nav items.
|
|
1079
|
+
* ## When to use
|
|
1080
|
+
* - The primary in-app navigation, shown alongside `bs-navigation-header` (typically that
|
|
1081
|
+
* header's `with-navigation-drawer` alignment, which omits its own logo since this component
|
|
1082
|
+
* already renders one).
|
|
1083
|
+
* ## When not to use
|
|
1084
|
+
* - The top navigation bar itself -- use `bs-navigation-header` instead.
|
|
1085
|
+
* This component renders a real `<nav>` landmark (no explicit `role` needed -- `<nav>` already
|
|
1086
|
+
* carries the implicit `navigation` role), labeled via `aria-label={heading}` so the landmark
|
|
1087
|
+
* still has a name even when collapsed (see below).
|
|
1088
|
+
* `collapsed` narrows the drawer to a 96px icon-only rail, per Figma node 8028:135374
|
|
1089
|
+
* ("Type=Collapsed"): the title text disappears, the logo swaps from the full "EG BrandSync"
|
|
1090
|
+
* wordmark (`bs-logo variant="full"`) to the real icon-only mark (`bs-logo variant="mark"` -- a
|
|
1091
|
+
* second, properly-designed asset, not a CSS crop of the full one) via CSS visibility toggling on
|
|
1092
|
+
* both, the same `:host([collapsed])` attribute-selector pattern already used for the
|
|
1093
|
+
* `search`/`search-trigger` swap below, the `search` slot is replaced by a compact built-in
|
|
1094
|
+
* search-trigger button (this component can't meaningfully shrink arbitrary slotted search-field
|
|
1095
|
+
* content down to icon size itself, so it emits `bsSearchClick` instead -- e.g. to open a full
|
|
1096
|
+
* search overlay), and every top-level
|
|
1097
|
+
* `bs-navigation-drawer-item`'s layout switches from icon-beside-label to icon-above-caption.
|
|
1098
|
+
* That last part is real prop propagation, not a CSS trick: this component keeps each direct-child
|
|
1099
|
+
* item's own `collapsed` prop in sync with its own (see `syncItemsCollapsed` below), the same
|
|
1100
|
+
* direct-children-prop-sync approach `bs-tabs` already uses for coordinating `selected` across its
|
|
1101
|
+
* `bs-tab` children. Clicking the toggle self-toggles `collapsed` (simple local UI state, not
|
|
1102
|
+
* something needing cross-component coordination -- closer to `bs-switch`'s self-toggling
|
|
1103
|
+
* `checked` than `bs-tab`'s non-self-toggling `selected`) and emits `bsCollapse` with the new
|
|
1104
|
+
* value. The toggle's own caret icon does NOT rotate when collapsed -- Figma's collapsed mock
|
|
1105
|
+
* reuses the identical left-pointing "CaretLeft" asset unchanged, confirmed by directly inspecting
|
|
1106
|
+
* that state, so this deliberately does not add the same "flip on toggle" idiom the drawer item's
|
|
1107
|
+
* own disclosure chevron does (that one really is an unconfirmed addition; this one was checked).
|
|
1108
|
+
*/
|
|
1109
|
+
interface BsNavigationDrawer {
|
|
1110
|
+
/**
|
|
1111
|
+
* Narrows the drawer to a 96px icon-only rail (Figma node 8028:135374). Mutable and reflected -- clicking the collapse toggle toggles this directly (self-toggling, see the class doc above for why), and this component keeps every direct-child `bs-navigation-drawer-item`'s own `collapsed` prop synced to match (see `syncItemsCollapsed`).
|
|
1112
|
+
* @default false
|
|
1113
|
+
*/
|
|
1114
|
+
"collapsed": boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* Whether this drawer can be collapsed at all. `false` renders no collapse toggle/chevron -- a "fixed" side nav (Carbon's terminology: a `Fixed Side Nav` never collapses, as opposed to a rail-capable one) that's always fully expanded. `collapsed` is ignored while this is `false`.
|
|
1117
|
+
* @default true
|
|
1118
|
+
*/
|
|
1119
|
+
"collapsible": boolean;
|
|
1120
|
+
/**
|
|
1121
|
+
* Heading text shown next to the collapse toggle, and used as the `<nav>` landmark's `aria-label` (so the landmark keeps a name even when `collapsed` hides the visible text).
|
|
1122
|
+
* @default 'Main Menu'
|
|
1123
|
+
*/
|
|
1124
|
+
"heading": string;
|
|
1125
|
+
/**
|
|
1126
|
+
* Forwarded straight to both internal `bs-logo` elements' own `background` prop. Defaults to `"auto"`, which follows the ambient `[data-theme="dark"]` state automatically (see `bs-logo`'s own docs) -- so if this drawer ends up on a dark surface via the normal theming mechanism, the logo switches to its dedicated dark-background asset with no wiring needed. Set `"light"`/`"dark"` explicitly only if you've overridden `--bs-navigation-drawer-bg` to something dark yourself *without* setting `[data-theme="dark"]`, and need to pin the logo regardless of theme. Has no visible effect on the `variant="mark"` logo shown while `collapsed` (see `bs-logo`'s own docs -- there's only one real designed mark asset, it's background-agnostic).
|
|
1127
|
+
* @default 'auto'
|
|
1128
|
+
*/
|
|
1129
|
+
"logoBackground": 'auto' | 'light' | 'dark';
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* A single row within a `bs-navigation-drawer`'s item list -- either a plain leaf nav item, or an
|
|
1133
|
+
* `expandable` group header that discloses nested `bs-navigation-drawer-item` children.
|
|
1134
|
+
* ## When to use
|
|
1135
|
+
* - Every row inside a `bs-navigation-drawer`'s default slot.
|
|
1136
|
+
* ## When not to use
|
|
1137
|
+
* - A standalone action outside a navigation drawer -- use `bs-button`/`bs-menu-item` instead.
|
|
1138
|
+
* Click behavior is mutually exclusive, based on `expandable`:
|
|
1139
|
+
* - `expandable = false` (a plain leaf item): clicking only emits `bsSelect`. `selected` is NOT
|
|
1140
|
+
* self-toggling -- same non-self-toggling precedent as `bs-tab`'s `selected` (see `bs-tab.tsx`'s
|
|
1141
|
+
* class doc): coordinating which sibling row is selected needs cross-item state a
|
|
1142
|
+
* consumer/wrapper owns, not something this component can reason about on its own.
|
|
1143
|
+
* - `expandable = true` (a group header, never shown with a `selected` tint): clicking toggles
|
|
1144
|
+
* `this.expanded` directly and emits `bsToggle` with the new value, and does NOT emit
|
|
1145
|
+
* `bsSelect`. This IS self-toggling, unlike `selected` above -- it's simple local disclosure
|
|
1146
|
+
* state with no cross-item coordination needed, closer to `bs-switch`'s self-toggling `checked`
|
|
1147
|
+
* than `bs-tab`'s non-self-toggling `selected`.
|
|
1148
|
+
* Nesting: put child `<bs-navigation-drawer-item nested>` elements inside a parent
|
|
1149
|
+
* `<bs-navigation-drawer-item expandable>` with `slot="children"`. The parent shows/hides that
|
|
1150
|
+
* slot's content based on its own `expanded` prop, via a pure-CSS attribute selector (no JS
|
|
1151
|
+
* visibility toggling needed, since `expanded` is reflected).
|
|
1152
|
+
* `collapsed` switches this row from its normal icon-beside-label row layout to a compact
|
|
1153
|
+
* icon-above-caption column (per Figma node 8028:135374, the drawer's "Type=Collapsed" state) --
|
|
1154
|
+
* you don't need to set this yourself on every item: a parent `bs-navigation-drawer` keeps its own
|
|
1155
|
+
* top-level items' `collapsed` prop in sync with its own `collapsed` state automatically (see
|
|
1156
|
+
* `bs-navigation-drawer.tsx`'s `syncItemsCollapsed`, the same direct-children-prop-sync approach
|
|
1157
|
+
* `bs-tabs` uses for coordinating `selected` across its own `bs-tab` children). It's still a public
|
|
1158
|
+
* prop so a standalone item (or this component's own stories) can be demoed without the parent.
|
|
1159
|
+
*/
|
|
1160
|
+
interface BsNavigationDrawerItem {
|
|
1161
|
+
/**
|
|
1162
|
+
* Optional accessible name override. Not required for `collapsed` rows -- unlike an icon-only button, the label caption stays visible (just restyled smaller, under the icon) in that mode per Figma, so the button's default accessible-name computation (its own text content) already works. Set this if you want a fuller/different name than the visible caption (e.g. truncated captions, or matching `bs-switch`/`bs-slider`'s `ariaLabel` convention for consistency).
|
|
1163
|
+
* @default null
|
|
1164
|
+
*/
|
|
1165
|
+
"ariaLabel": string | null;
|
|
1166
|
+
/**
|
|
1167
|
+
* Switches this row to the compact icon-above-caption column layout used when its parent `bs-navigation-drawer` is `collapsed` (see the class doc above). Reflected so `bs-navigation-drawer-item[collapsed]` is CSS-targetable. Also forces `expandable` rows' chevron and `children` slot to stay hidden regardless of `expanded` -- Figma's collapsed rail never shows a nested tree.
|
|
1168
|
+
* @default false
|
|
1169
|
+
*/
|
|
1170
|
+
"collapsed": boolean;
|
|
1171
|
+
/**
|
|
1172
|
+
* Renders this row as a disclosure/group header (trailing chevron, self-toggling `expanded`, `bsToggle` instead of `bsSelect` on click) instead of a plain navigable leaf item. See the class doc above for the full click-behavior split.
|
|
1173
|
+
* @default false
|
|
1174
|
+
*/
|
|
1175
|
+
"expandable": boolean;
|
|
1176
|
+
/**
|
|
1177
|
+
* Whether an `expandable` row's `children` slot is shown. Mutable and reflected -- clicking an `expandable` row toggles this directly (self-toggling, unlike `selected` above), and CSS shows/hides the `children` slot wrapper based on the reflected attribute. Ignored when `expandable` is false.
|
|
1178
|
+
* @default false
|
|
1179
|
+
*/
|
|
1180
|
+
"expanded": boolean;
|
|
1181
|
+
/**
|
|
1182
|
+
* Marks this as a child row nested under an `expandable` parent (via `slot="children"`) -- deepens the left indent and stops reserving `icon` slot space entirely (Figma's nested rows never have icons).
|
|
1183
|
+
* @default false
|
|
1184
|
+
*/
|
|
1185
|
+
"nested": boolean;
|
|
1186
|
+
/**
|
|
1187
|
+
* Tints the row's background/text to indicate it's the current destination. NOT self-toggling -- see the class doc above for why. Ignored (never applied) when `expandable` is true. Reflected so consumers/CSS can target `bs-navigation-drawer-item[selected]`.
|
|
1188
|
+
* @default false
|
|
1189
|
+
*/
|
|
1190
|
+
"selected": boolean;
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* The top-level navigation bar for a page: the BrandSync logo plus two consumer-provided slots
|
|
1194
|
+
* for menu/action content (e.g. `bs-button`/`bs-icon-button` elements).
|
|
1195
|
+
* ## When to use
|
|
1196
|
+
* - The persistent top bar of an application, above the page content.
|
|
1197
|
+
* ## When not to use
|
|
1198
|
+
* - The header of a Genie AI chat panel -- use `bs-chatbot-header` instead, which is purpose-built
|
|
1199
|
+
* for that narrower layout and its own fixed action buttons.
|
|
1200
|
+
* `alignment` controls both whether the logo renders and how the two slots are laid out:
|
|
1201
|
+
* - `default` (default): logo on the left, `left` slot content immediately after it, `right` slot
|
|
1202
|
+
* content pushed to the far right.
|
|
1203
|
+
* - `center`: logo and `right` slot both grow equally (`flex: 1`), which centers the `left` slot
|
|
1204
|
+
* content in the middle of the bar.
|
|
1205
|
+
* - `with-navigation-drawer`: no logo at all (this variant assumes a nav-drawer toggle is the
|
|
1206
|
+
* leftmost thing on the page instead) -- `left` slot content starts at the bar's own left edge,
|
|
1207
|
+
* `right` slot content pushed to the far right.
|
|
1208
|
+
*/
|
|
1209
|
+
interface BsNavigationHeader {
|
|
1210
|
+
/**
|
|
1211
|
+
* Controls whether the logo renders and how the `left`/`right` slots are laid out -- see the class doc above for the three variants' exact behavior.
|
|
1212
|
+
* @default 'default'
|
|
1213
|
+
*/
|
|
1214
|
+
"alignment": BsNavigationHeaderAlignment;
|
|
1215
|
+
/**
|
|
1216
|
+
* Accessible label for the header landmark, useful when a page has more than one `<header>` (e.g. this one plus a page-specific sub-header) and screen reader users need to tell them apart in the landmarks list.
|
|
1217
|
+
* @default null
|
|
1218
|
+
*/
|
|
1219
|
+
"ariaLabel": string | null;
|
|
1220
|
+
/**
|
|
1221
|
+
* Forwarded straight to the internal `bs-logo`'s own `background` prop. Defaults to `"auto"`, which follows the ambient `[data-theme="dark"]` state automatically (see `bs-logo`'s own docs) -- so if this bar ends up on a dark surface via the normal theming mechanism, the logo switches to its dedicated dark-background asset with no wiring needed. Set `"light"`/`"dark"` explicitly only if you've overridden `--bs-navigation-header-bg` to something dark yourself *without* setting `[data-theme="dark"]`, and need to pin the logo regardless of theme.
|
|
1222
|
+
* @default 'auto'
|
|
1223
|
+
*/
|
|
1224
|
+
"logoBackground": 'auto' | 'light' | 'dark';
|
|
1225
|
+
/**
|
|
1226
|
+
* Fragment/URL to jump to when the "Skip to main content" link is activated (e.g. `#main-content`, matching an id on your page's main landmark). Unset by default -- the link is opt-in rather than pointing at a guessed default id, since a skip link to a target that doesn't exist on the consumer's page is worse than no skip link at all (it silently does nothing when activated). Set this to the same id your page's `<main>` (or equivalent) already has to enable it.
|
|
1227
|
+
* @default null
|
|
1228
|
+
*/
|
|
1229
|
+
"skipToContentHref": string | null;
|
|
1230
|
+
/**
|
|
1231
|
+
* Link text for the skip-to-content link. Only rendered when `skipToContentHref` is set.
|
|
1232
|
+
* @default 'Skip to main content'
|
|
1233
|
+
*/
|
|
1234
|
+
"skipToContentLabel": string;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* A single radio button with its label, for one mutually-exclusive choice within a group.
|
|
1238
|
+
* ## When to use
|
|
1239
|
+
* - One option within a set of mutually-exclusive choices, where all options should stay visible
|
|
1240
|
+
* (a radio group).
|
|
1241
|
+
* ## When not to use
|
|
1242
|
+
* - An independent, non-exclusive binary choice, or one item in a set of independent choices --
|
|
1243
|
+
* use `bs-checkbox` instead.
|
|
1244
|
+
* - An on/off setting that takes effect immediately (no explicit form submission) -- use `bs-switch`.
|
|
1245
|
+
*/
|
|
1246
|
+
interface BsRadio {
|
|
1247
|
+
/**
|
|
1248
|
+
* Whether the radio is checked. Mutable so clicking the label/input sets it directly.
|
|
1249
|
+
* @default false
|
|
1250
|
+
*/
|
|
1251
|
+
"checked": boolean;
|
|
1252
|
+
/**
|
|
1253
|
+
* Disables the radio: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents toggling.
|
|
1254
|
+
* @default false
|
|
1255
|
+
*/
|
|
1256
|
+
"disabled": boolean;
|
|
1257
|
+
/**
|
|
1258
|
+
* The native radio input's `name` attribute. Passed straight through to the native input inside. NOTE: because each `bs-radio` renders its own shadow root, native `<input type="radio">` mutual-exclusion grouping (which the HTML spec scopes to a single DOM tree) does NOT extend across separate `bs-radio` instances sharing the same `name` -- checking one will not natively uncheck another. Within a single instance this still behaves like a normal radio input. See bs-radio.mdx's Accessibility section for this known gap; consumers building a group currently need to manage mutual exclusivity themselves (e.g. via `bsChange`) until a `bs-radio-group` wrapper exists.
|
|
1259
|
+
*/
|
|
1260
|
+
"name": string;
|
|
1261
|
+
/**
|
|
1262
|
+
* The native radio input's `value` attribute -- read from `event.target.value`, or used when wiring the group up to a form.
|
|
1263
|
+
*/
|
|
1264
|
+
"value": string;
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* A slider for picking a single numeric value (`type="default"`), a value snapped to evenly
|
|
1268
|
+
* spaced ticks (`type="segmented"`), or a min/max pair (`type="range"`) from within a bounded
|
|
1269
|
+
* `min`/`max` range.
|
|
1270
|
+
* ## When to use
|
|
1271
|
+
* - A numeric value that's easiest to reason about relative to its bounds (volume, brightness,
|
|
1272
|
+
* a price range) rather than typed digit-by-digit.
|
|
1273
|
+
* - `type="segmented"` when only a fixed number of discrete stops make sense (e.g. a 5-star
|
|
1274
|
+
* rating-like scale) but a visual track is still preferable to discrete buttons.
|
|
1275
|
+
* - `type="range"` for picking a min/max pair (e.g. a price range filter) with two thumbs.
|
|
1276
|
+
* ## When not to use
|
|
1277
|
+
* - A precise value where mis-dragging by a pixel matters more than the at-a-glance bounds --
|
|
1278
|
+
* use `bs-input[type="number"]` instead.
|
|
1279
|
+
* - A small, fixed set of mutually exclusive choices -- use a radio group instead.
|
|
1280
|
+
*/
|
|
1281
|
+
interface BsSlider {
|
|
1282
|
+
/**
|
|
1283
|
+
* Accessible name for the slider's native range input(s). Required whenever `showLabel` is `false` (a bare track with no visible "Label" text) -- without it, the internal native `<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-slider>` host does NOT work for this: that attribute stays on the light-DOM host and is never forwarded into the shadow DOM by the browser. Same pattern/reasoning as `bs-switch`'s and `bs-checkbox`'s identical `ariaLabel` prop. For `type="range"`, this labels the lower-bound thumb; the upper-bound thumb gets `"${ariaLabel} end"` (or `"End value"` when `ariaLabel` is unset).
|
|
1284
|
+
* @default null
|
|
1285
|
+
*/
|
|
1286
|
+
"ariaLabel": string | null;
|
|
1287
|
+
/**
|
|
1288
|
+
* Disables the slider: sets the native `disabled` attribute on the range input(s), suppresses hover/focus/drag styling and the value tooltip, and prevents interaction.
|
|
1289
|
+
* @default false
|
|
1290
|
+
*/
|
|
1291
|
+
"disabled": boolean;
|
|
1292
|
+
/**
|
|
1293
|
+
* Label text shown above the track when `showLabel` is set.
|
|
1294
|
+
* @default 'Label'
|
|
1295
|
+
*/
|
|
1296
|
+
"label": string;
|
|
1297
|
+
/**
|
|
1298
|
+
* Maximum selectable value, for all `type`s.
|
|
1299
|
+
* @default 100
|
|
1300
|
+
*/
|
|
1301
|
+
"max": number;
|
|
1302
|
+
/**
|
|
1303
|
+
* Minimum selectable value, for all `type`s.
|
|
1304
|
+
* @default 0
|
|
1305
|
+
*/
|
|
1306
|
+
"min": number;
|
|
1307
|
+
/**
|
|
1308
|
+
* Number of equal divisions marked by tick lines along the track, for `type="segmented"` only. The first tick (at the very start of the track) is rendered with `opacity: 0` to keep the tick spacing math consistent while not visually doubling up with the track's own start edge -- this matches the design spec, not a bug.
|
|
1309
|
+
* @default 10
|
|
1310
|
+
*/
|
|
1311
|
+
"segments": number;
|
|
1312
|
+
/**
|
|
1313
|
+
* Shows/hides the "Label" text and editable percentage field(s) above the track, and the static min/max bound labels flanking it. When `false`, only the bare track (and its knob/knobs) renders.
|
|
1314
|
+
* @default true
|
|
1315
|
+
*/
|
|
1316
|
+
"showLabel": boolean;
|
|
1317
|
+
/**
|
|
1318
|
+
* Step size between selectable values. For `type="segmented"`, the effective step is derived from `(max - min) / segments` instead, so the thumb always snaps to a tick.
|
|
1319
|
+
* @default 1
|
|
1320
|
+
*/
|
|
1321
|
+
"step": number;
|
|
1322
|
+
/**
|
|
1323
|
+
* Which slider shape to render. `range` uses two thumbs (`valueStart`/`valueEnd`); `default` and `segmented` use one thumb (`value`). `segmented` additionally draws `segments` tick marks along the track.
|
|
1324
|
+
* @default 'default'
|
|
1325
|
+
*/
|
|
1326
|
+
"type": BsSliderType;
|
|
1327
|
+
/**
|
|
1328
|
+
* Current value for `type="default"`/`type="segmented"`. Ignored for `type="range"` -- use `valueStart`/`valueEnd` instead. Mutable so dragging the thumb updates it directly.
|
|
1329
|
+
* @default 0
|
|
1330
|
+
*/
|
|
1331
|
+
"value": number;
|
|
1332
|
+
/**
|
|
1333
|
+
* Upper thumb's value for `type="range"`. Defaults to `max` when unset. Mutable so dragging the thumb updates it directly.
|
|
1334
|
+
*/
|
|
1335
|
+
"valueEnd"?: number;
|
|
1336
|
+
/**
|
|
1337
|
+
* Lower thumb's value for `type="range"`. Defaults to `min` when unset. Mutable so dragging the thumb updates it directly.
|
|
1338
|
+
*/
|
|
1339
|
+
"valueStart"?: number;
|
|
1340
|
+
}
|
|
921
1341
|
/**
|
|
922
1342
|
* A single citation row inside `bs-chatbot-sources-drawer` -- a file icon + filename on the first
|
|
923
1343
|
* line, the originating system and version on the second, and a trailing "open" arrow.
|
|
@@ -967,6 +1387,107 @@ export namespace Components {
|
|
|
967
1387
|
*/
|
|
968
1388
|
"version"?: string;
|
|
969
1389
|
}
|
|
1390
|
+
/**
|
|
1391
|
+
* A toggle switch for an on/off setting that takes effect immediately (no explicit form
|
|
1392
|
+
* submission required).
|
|
1393
|
+
* ## When to use
|
|
1394
|
+
* - A binary setting that applies right away (e.g. "Enable notifications", "Dark mode").
|
|
1395
|
+
* ## When not to use
|
|
1396
|
+
* - A binary choice that's part of a form submitted later, or one item within a group of
|
|
1397
|
+
* independent choices -- use `bs-checkbox` instead.
|
|
1398
|
+
* - A single mutually-exclusive choice from a set -- use a radio group instead.
|
|
1399
|
+
*/
|
|
1400
|
+
interface BsSwitch {
|
|
1401
|
+
/**
|
|
1402
|
+
* Accessible name for the switch. Required whenever the default (label) slot is empty (e.g. a bare "enabled" switch in a table row) -- without it, the internal native `<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-switch>` host does NOT work for this: that attribute stays on the light-DOM host and is never forwarded into the shadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays nameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and `bs-checkbox`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal focusable element for the same reason.
|
|
1403
|
+
* @default null
|
|
1404
|
+
*/
|
|
1405
|
+
"ariaLabel": string | null;
|
|
1406
|
+
/**
|
|
1407
|
+
* Whether the switch is on. Mutable so clicking the label/input toggles it directly, and reflected so consumers can target `bs-switch[checked]` via CSS.
|
|
1408
|
+
* @default false
|
|
1409
|
+
*/
|
|
1410
|
+
"checked": boolean;
|
|
1411
|
+
/**
|
|
1412
|
+
* Disables the switch: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents toggling.
|
|
1413
|
+
* @default false
|
|
1414
|
+
*/
|
|
1415
|
+
"disabled": boolean;
|
|
1416
|
+
/**
|
|
1417
|
+
* Sizing scale. Controls the track's width/height and the knob's diameter.
|
|
1418
|
+
* @default 'lg'
|
|
1419
|
+
*/
|
|
1420
|
+
"size": BsSwitchSize;
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* A single tab button -- an optional icon plus a text label, rendered as a real `<button>` so it
|
|
1424
|
+
* participates correctly in tab order and native click/keyboard activation.
|
|
1425
|
+
* ## When to use
|
|
1426
|
+
* - As one button within a tab bar, where exactly one tab is selected/active at a time.
|
|
1427
|
+
* ## When not to use
|
|
1428
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-tab`'s visual language (muted
|
|
1429
|
+
* until selected/hovered, underline indicator) only makes sense as part of a set.
|
|
1430
|
+
* `selected` is NOT self-toggling -- clicking a `bs-tab` only emits `bsSelect`, it does not set its
|
|
1431
|
+
* own `selected` prop, and it does not unselect any sibling tabs. Wrap your `<bs-tab>` elements in
|
|
1432
|
+
* `<bs-tabs type="bs-tab">` -- it owns `role="tablist"` and coordinates selection (listening for
|
|
1433
|
+
* `bsSelect` and setting `selected`/`false` across siblings) for you. Using `bs-tab` standalone,
|
|
1434
|
+
* outside a `<bs-tabs>` wrapper, still means `selected` doesn't self-toggle and `role="tablist"`
|
|
1435
|
+
* isn't provided automatically -- a consumer doing that would still need to coordinate `selected`
|
|
1436
|
+
* and supply `role="tablist"` manually, same as `bs-radio.mdx` documents for `bs-radio`'s missing
|
|
1437
|
+
* `bs-radio-group`. See `bs-tab.mdx`'s Accessibility section for the full requirement, including
|
|
1438
|
+
* `role="tabpanel"` on the corresponding content panels.
|
|
1439
|
+
*/
|
|
1440
|
+
interface BsTab {
|
|
1441
|
+
/**
|
|
1442
|
+
* Accessible name for the tab. Required for icon-only usage (no visible label text via the default slot) so screen readers still announce what the tab does -- without it, an icon-only tab has no discernible name at all (axe-core flags this as a critical `button-name` violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute automatically, same as `bs-button`'s identical prop.
|
|
1443
|
+
* @default null
|
|
1444
|
+
*/
|
|
1445
|
+
"ariaLabel": string | null;
|
|
1446
|
+
/**
|
|
1447
|
+
* Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents clicking from emitting `bsSelect`.
|
|
1448
|
+
* @default false
|
|
1449
|
+
*/
|
|
1450
|
+
"disabled": boolean;
|
|
1451
|
+
/**
|
|
1452
|
+
* Where the icon sits relative to the label, when both `icon` and the default slot are populated. Ignored for icon-only/text-only layouts.
|
|
1453
|
+
* @default 'start'
|
|
1454
|
+
*/
|
|
1455
|
+
"iconPosition": BsTabIconPosition;
|
|
1456
|
+
/**
|
|
1457
|
+
* Whether this tab is the currently active one. NOT mutable and NOT self-toggling -- see the "Known gap" note in the class JSDoc. Still reflected as an attribute so consumers/CSS can target `bs-tab[selected]`.
|
|
1458
|
+
* @default false
|
|
1459
|
+
*/
|
|
1460
|
+
"selected": boolean;
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* A tab-group wrapper: owns `role="tablist"` and coordinates selection across its slotted
|
|
1464
|
+
* `<bs-tab>` or `<bs-inline-tab>` children, so consumers no longer have to hand-roll this.
|
|
1465
|
+
* `bs-tab.mdx`/`bs-inline-tab.mdx` previously documented this coordination -- listening for
|
|
1466
|
+
* `bsSelect` and setting `selected`/`false` on siblings, plus supplying `role="tablist"` on
|
|
1467
|
+
* whatever element groups the tabs -- as a "Known gap"/manual consumer responsibility. This
|
|
1468
|
+
* component is that wrapper: it renders the `role="tablist"` element and listens for `bsSelect`
|
|
1469
|
+
* itself. Using `<bs-tab>`/`<bs-inline-tab>` standalone, outside a `<bs-tabs>` wrapper, still means
|
|
1470
|
+
* `selected` doesn't self-toggle -- a consumer doing that would still need to coordinate `selected`
|
|
1471
|
+
* manually -- but that's no longer the first recommended path.
|
|
1472
|
+
* ## When to use
|
|
1473
|
+
* - Wrapping a set of `<bs-tab>` (underline style) or `<bs-inline-tab>` (pill style) elements that
|
|
1474
|
+
* should behave as a single-selection tab bar.
|
|
1475
|
+
* ## When not to use
|
|
1476
|
+
* - For a single, standalone tab button not participating in a group -- use `bs-tab`/`bs-inline-tab`
|
|
1477
|
+
* directly.
|
|
1478
|
+
*/
|
|
1479
|
+
interface BsTabs {
|
|
1480
|
+
/**
|
|
1481
|
+
* Layout direction of the tab bar itself. Sets `aria-orientation` on the internal wrapper and switches `flex-direction`.
|
|
1482
|
+
* @default 'horizontal'
|
|
1483
|
+
*/
|
|
1484
|
+
"orientation": BsTabsOrientation;
|
|
1485
|
+
/**
|
|
1486
|
+
* Which tab-button family this group wraps. Governs the wrapper's own visual treatment (gap-only for `bs-tab`, a filled pill bar for `bs-inline-tab`). Not reflected as an attribute -- nothing external needs to target it via CSS attribute selector, it only drives internal class names.
|
|
1487
|
+
* @default 'bs-tab'
|
|
1488
|
+
*/
|
|
1489
|
+
"type": BsTabsType;
|
|
1490
|
+
}
|
|
970
1491
|
/**
|
|
971
1492
|
* A dark tooltip bubble with a pointer arrow, used to surface a short hint of extra information
|
|
972
1493
|
* next to a trigger element.
|
|
@@ -1042,6 +1563,10 @@ export interface BsDataTableCustomEvent<T> extends CustomEvent<T> {
|
|
|
1042
1563
|
detail: T;
|
|
1043
1564
|
target: HTMLBsDataTableElement;
|
|
1044
1565
|
}
|
|
1566
|
+
export interface BsInlineTabCustomEvent<T> extends CustomEvent<T> {
|
|
1567
|
+
detail: T;
|
|
1568
|
+
target: HTMLBsInlineTabElement;
|
|
1569
|
+
}
|
|
1045
1570
|
export interface BsInputCustomEvent<T> extends CustomEvent<T> {
|
|
1046
1571
|
detail: T;
|
|
1047
1572
|
target: HTMLBsInputElement;
|
|
@@ -1054,10 +1579,34 @@ export interface BsModalCustomEvent<T> extends CustomEvent<T> {
|
|
|
1054
1579
|
detail: T;
|
|
1055
1580
|
target: HTMLBsModalElement;
|
|
1056
1581
|
}
|
|
1582
|
+
export interface BsNavigationDrawerCustomEvent<T> extends CustomEvent<T> {
|
|
1583
|
+
detail: T;
|
|
1584
|
+
target: HTMLBsNavigationDrawerElement;
|
|
1585
|
+
}
|
|
1586
|
+
export interface BsNavigationDrawerItemCustomEvent<T> extends CustomEvent<T> {
|
|
1587
|
+
detail: T;
|
|
1588
|
+
target: HTMLBsNavigationDrawerItemElement;
|
|
1589
|
+
}
|
|
1590
|
+
export interface BsRadioCustomEvent<T> extends CustomEvent<T> {
|
|
1591
|
+
detail: T;
|
|
1592
|
+
target: HTMLBsRadioElement;
|
|
1593
|
+
}
|
|
1594
|
+
export interface BsSliderCustomEvent<T> extends CustomEvent<T> {
|
|
1595
|
+
detail: T;
|
|
1596
|
+
target: HTMLBsSliderElement;
|
|
1597
|
+
}
|
|
1057
1598
|
export interface BsSourceLinkCustomEvent<T> extends CustomEvent<T> {
|
|
1058
1599
|
detail: T;
|
|
1059
1600
|
target: HTMLBsSourceLinkElement;
|
|
1060
1601
|
}
|
|
1602
|
+
export interface BsSwitchCustomEvent<T> extends CustomEvent<T> {
|
|
1603
|
+
detail: T;
|
|
1604
|
+
target: HTMLBsSwitchElement;
|
|
1605
|
+
}
|
|
1606
|
+
export interface BsTabCustomEvent<T> extends CustomEvent<T> {
|
|
1607
|
+
detail: T;
|
|
1608
|
+
target: HTMLBsTabElement;
|
|
1609
|
+
}
|
|
1061
1610
|
declare global {
|
|
1062
1611
|
/**
|
|
1063
1612
|
* A centered caption disclaimer for Genie AI surfaces, e.g. "AI can make mistakes. Please verify
|
|
@@ -1148,7 +1697,9 @@ declare global {
|
|
|
1148
1697
|
/**
|
|
1149
1698
|
* A single file attachment preview for `bs-composer` -- an image thumbnail, or a filename card
|
|
1150
1699
|
* with a colored file-type badge (PDF/Document), with an optional upload-in-progress spinner and
|
|
1151
|
-
* a hover/focus-revealed remove button
|
|
1700
|
+
* a hover/focus-revealed remove button (a `bs-icon-button` with `size="xs"` `variant="neutral"` --
|
|
1701
|
+
* the same 16x16px compact tier `bs-icon-button` documents as meant for exactly this kind of
|
|
1702
|
+
* chip/tag "remove" control).
|
|
1152
1703
|
* ## When to use
|
|
1153
1704
|
* - Rendered by the consuming app for each file a user has attached to a Genie AI chat message,
|
|
1154
1705
|
* typically alongside or inside `bs-composer`.
|
|
@@ -1165,14 +1716,6 @@ declare global {
|
|
|
1165
1716
|
* @prop --bs-attachment-badge-bg-pdf - PDF badge background. Aliased to `--bs-badge-bg-error`.
|
|
1166
1717
|
* @prop --bs-attachment-badge-bg-document - Document badge background. Aliased to
|
|
1167
1718
|
* `--bs-badge-bg-info`.
|
|
1168
|
-
* @prop --bs-attachment-remove-bg - Remove button (neutral icon button) default background.
|
|
1169
|
-
* Aliased to `--bs-button-neutral-container`.
|
|
1170
|
-
* @prop --bs-attachment-remove-hover - Remove button hover background. Aliased to
|
|
1171
|
-
* `--bs-button-neutral-hover`.
|
|
1172
|
-
* @prop --bs-attachment-remove-pressed - Remove button active/pressed background. Aliased to
|
|
1173
|
-
* `--bs-button-neutral-pressed`.
|
|
1174
|
-
* @prop --bs-attachment-remove-focus - Remove button focus outline color. Aliased to
|
|
1175
|
-
* `--bs-border-neutral-focus`.
|
|
1176
1719
|
*/
|
|
1177
1720
|
interface HTMLBsAttachmentElement extends Components.BsAttachment, HTMLStencilElement {
|
|
1178
1721
|
addEventListener<K extends keyof HTMLBsAttachmentElementEventMap>(type: K, listener: (this: HTMLBsAttachmentElement, ev: BsAttachmentCustomEvent<HTMLBsAttachmentElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -1248,6 +1791,11 @@ declare global {
|
|
|
1248
1791
|
* @prop --bs-button-height-sm - Height at `size="sm"`. Aliased to `--bs-spacing-500`.
|
|
1249
1792
|
* @prop --bs-button-height-md - Height at `size="md"`. Aliased to `--bs-spacing-600`.
|
|
1250
1793
|
* @prop --bs-button-height-lg - Height at `size="lg"`. Aliased to `--bs-spacing-700`.
|
|
1794
|
+
* @prop --bs-button-neutral-border - Border color, `variant="neutral"`, default/disabled. Aliased to `--bs-border-neutral-container`.
|
|
1795
|
+
* @prop --bs-button-neutral-border-hover - Border color, `variant="neutral"`, hover. Aliased to `--bs-border-neutral-container-hover`.
|
|
1796
|
+
* @prop --bs-button-neutral-border-pressed - Border color, `variant="neutral"`, pressed. Aliased to `--bs-border-neutral-container-pressed`.
|
|
1797
|
+
* @prop --bs-button-padding-x-icon-side - Horizontal padding on an edge that's adjacent to a leading/trailing icon (tighter than the plain text-only edge). Aliased to `--bs-spacing-150`.
|
|
1798
|
+
* @prop --bs-button-padding-x-label-side - Horizontal padding on the opposite edge, when an icon on the other side needs compensating extra space to keep the button optically balanced. Aliased to `--bs-spacing-250`.
|
|
1251
1799
|
*/
|
|
1252
1800
|
interface HTMLBsButtonElement extends Components.BsButton, HTMLStencilElement {
|
|
1253
1801
|
}
|
|
@@ -1608,6 +2156,7 @@ declare global {
|
|
|
1608
2156
|
* @prop --bs-composer-mic-icon-disabled - Aliased to `--bs-icon-disabled`.
|
|
1609
2157
|
* @prop --bs-composer-subtle-hover - Background of the attach/mic buttons on hover (subtle-button treatment, same as `bs-button`'s `subtle` variant). Aliased to `--bs-color-neutral-container`.
|
|
1610
2158
|
* @prop --bs-composer-subtle-pressed - Background of the attach/mic buttons when pressed. Aliased to `--bs-color-neutral-container-pressed`.
|
|
2159
|
+
* @prop --bs-composer-input-max-lines - How many lines the text field grows to before scrolling internally instead of growing further. Aliased to `10`.
|
|
1611
2160
|
*/
|
|
1612
2161
|
interface HTMLBsComposerElement extends Components.BsComposer, HTMLStencilElement {
|
|
1613
2162
|
addEventListener<K extends keyof HTMLBsComposerElementEventMap>(type: K, listener: (this: HTMLBsComposerElement, ev: BsComposerCustomEvent<HTMLBsComposerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -1638,6 +2187,12 @@ declare global {
|
|
|
1638
2187
|
* ## When not to use
|
|
1639
2188
|
* - A toast/snackbar notification unrelated to the composer -- this component is not
|
|
1640
2189
|
* self-dismissing and has no positioning of its own (it's a static block, not an overlay).
|
|
2190
|
+
* ## Accessibility
|
|
2191
|
+
* Sets `role="status"` for `type="info"`/`type="neutral"` and `role="alert"` for
|
|
2192
|
+
* `type="error"`/`type="warning"` on its own root element automatically -- no opt-in prop needed.
|
|
2193
|
+
* Both roles carry implicit ARIA live-region semantics (`status` is polite, `alert` is assertive),
|
|
2194
|
+
* so a screen reader announces the message as soon as this banner is inserted into the DOM,
|
|
2195
|
+
* without a consumer having to remember to add `role`/`aria-live` themselves.
|
|
1641
2196
|
* @prop --bs-composer-status-banner-radius - Corner radius of the top-left/top-right corners
|
|
1642
2197
|
* (bottom corners are square, so this sits flush above `bs-composer`). Aliased to
|
|
1643
2198
|
* `--bs-border-radius-150`.
|
|
@@ -1727,18 +2282,81 @@ declare global {
|
|
|
1727
2282
|
prototype: HTMLBsDataTableElement;
|
|
1728
2283
|
new (): HTMLBsDataTableElement;
|
|
1729
2284
|
};
|
|
1730
|
-
interface HTMLBsInputElementEventMap {
|
|
1731
|
-
"bsInput": string;
|
|
1732
|
-
"bsChange": string;
|
|
1733
|
-
"bsOpen": boolean;
|
|
1734
|
-
"bsChipAdd": string;
|
|
1735
|
-
"bsChipRemove": string;
|
|
1736
|
-
"bsTitleChange": string;
|
|
1737
|
-
"bsCountryChange": string;
|
|
1738
|
-
}
|
|
1739
2285
|
/**
|
|
1740
|
-
* A
|
|
1741
|
-
*
|
|
2286
|
+
* A clickable, icon-only action element -- the icon-only sibling of `bs-button`, sharing the same
|
|
2287
|
+
* 8 visual variants and color language, but ALWAYS rendering just a single icon, never a label.
|
|
2288
|
+
* ## When to use
|
|
2289
|
+
* - A compact action where the icon alone is unambiguous (e.g. a close/dismiss control, a toolbar
|
|
2290
|
+
* action) and adding a text label would take up more space than the context allows.
|
|
2291
|
+
* - The same variant guidance as `bs-button` applies: `primary` for the single most important
|
|
2292
|
+
* action, `neutral`/`subtle`/`outlined` for lower-emphasis alternatives, `error` reserved for
|
|
2293
|
+
* destructive/irreversible actions (never `neutral`, per BrandSync guidance), `success`/
|
|
2294
|
+
* `warning`/`info` only when the action's own outcome is predictable and clearly communicated.
|
|
2295
|
+
* ## When not to use
|
|
2296
|
+
* - When the action isn't self-evident from the icon alone -- use `bs-button` with a visible label
|
|
2297
|
+
* instead, don't rely on a tooltip to compensate for an unclear icon.
|
|
2298
|
+
* - For navigation between pages -- use a link/nav component instead.
|
|
2299
|
+
* Because this component is always icon-only, `ariaLabel` is required for every real usage (not
|
|
2300
|
+
* just conditionally, unlike `bs-button`) -- there's no visible label text to fall back on for an
|
|
2301
|
+
* accessible name.
|
|
2302
|
+
*/
|
|
2303
|
+
interface HTMLBsIconButtonElement extends Components.BsIconButton, HTMLStencilElement {
|
|
2304
|
+
}
|
|
2305
|
+
var HTMLBsIconButtonElement: {
|
|
2306
|
+
prototype: HTMLBsIconButtonElement;
|
|
2307
|
+
new (): HTMLBsIconButtonElement;
|
|
2308
|
+
};
|
|
2309
|
+
interface HTMLBsInlineTabElementEventMap {
|
|
2310
|
+
"bsSelect": void;
|
|
2311
|
+
}
|
|
2312
|
+
/**
|
|
2313
|
+
* A pill-shaped tab button -- an optional leading icon plus a text label, rendered as a real
|
|
2314
|
+
* `<button>` so it participates correctly in tab order and native click/keyboard activation.
|
|
2315
|
+
* Unlike `bs-tab`'s underline indicator, selection here is communicated entirely by the pill's
|
|
2316
|
+
* background fill color -- there is no separate indicator element.
|
|
2317
|
+
* ## When to use
|
|
2318
|
+
* - As one button within a segmented-control-style tab bar, where exactly one tab is
|
|
2319
|
+
* selected/active at a time.
|
|
2320
|
+
* ## When not to use
|
|
2321
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-inline-tab`'s visual language
|
|
2322
|
+
* (muted pill until selected/hovered) only makes sense as part of a set.
|
|
2323
|
+
* `selected` is NOT self-toggling -- clicking a `bs-inline-tab` only emits `bsSelect`, it does not
|
|
2324
|
+
* set its own `selected` prop, and it does not unselect any sibling tabs. Wrap your
|
|
2325
|
+
* `<bs-inline-tab>` elements in `<bs-tabs type="bs-inline-tab">` -- it owns `role="tablist"` and
|
|
2326
|
+
* coordinates selection (listening for `bsSelect` and setting `selected`/`false` across siblings)
|
|
2327
|
+
* for you. Using `bs-inline-tab` standalone, outside a `<bs-tabs>` wrapper, still means `selected`
|
|
2328
|
+
* doesn't self-toggle and `role="tablist"` isn't provided automatically -- a consumer doing that
|
|
2329
|
+
* would still need to coordinate `selected` and supply `role="tablist"` manually, same as
|
|
2330
|
+
* `bs-tab.mdx`/`bs-radio.mdx` document for their own components. See `bs-inline-tab.mdx`'s
|
|
2331
|
+
* Accessibility section for the full requirement, including `role="tabpanel"` on the corresponding
|
|
2332
|
+
* content panels.
|
|
2333
|
+
*/
|
|
2334
|
+
interface HTMLBsInlineTabElement extends Components.BsInlineTab, HTMLStencilElement {
|
|
2335
|
+
addEventListener<K extends keyof HTMLBsInlineTabElementEventMap>(type: K, listener: (this: HTMLBsInlineTabElement, ev: BsInlineTabCustomEvent<HTMLBsInlineTabElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2336
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2337
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2338
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2339
|
+
removeEventListener<K extends keyof HTMLBsInlineTabElementEventMap>(type: K, listener: (this: HTMLBsInlineTabElement, ev: BsInlineTabCustomEvent<HTMLBsInlineTabElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2340
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2341
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2342
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2343
|
+
}
|
|
2344
|
+
var HTMLBsInlineTabElement: {
|
|
2345
|
+
prototype: HTMLBsInlineTabElement;
|
|
2346
|
+
new (): HTMLBsInlineTabElement;
|
|
2347
|
+
};
|
|
2348
|
+
interface HTMLBsInputElementEventMap {
|
|
2349
|
+
"bsInput": string;
|
|
2350
|
+
"bsChange": string;
|
|
2351
|
+
"bsOpen": boolean;
|
|
2352
|
+
"bsChipAdd": string;
|
|
2353
|
+
"bsChipRemove": string;
|
|
2354
|
+
"bsTitleChange": string;
|
|
2355
|
+
"bsCountryChange": string;
|
|
2356
|
+
}
|
|
2357
|
+
/**
|
|
2358
|
+
* A single-line text field with an optional label, description, and error state. Also covers a
|
|
2359
|
+
* range of related "field" shapes (number stepper, password reveal, date, dropdown trigger,
|
|
1742
2360
|
* select, textarea, chip input, initials, country, and pin) via the `type` prop, since they all
|
|
1743
2361
|
* share the same label/description/error/icon-slot chrome.
|
|
1744
2362
|
* ## When to use
|
|
@@ -1766,6 +2384,36 @@ declare global {
|
|
|
1766
2384
|
prototype: HTMLBsInputElement;
|
|
1767
2385
|
new (): HTMLBsInputElement;
|
|
1768
2386
|
};
|
|
2387
|
+
/**
|
|
2388
|
+
* The BrandSync brand mark, as its own standalone component -- shared by `bs-navigation-header`
|
|
2389
|
+
* and `bs-navigation-drawer`, which used to each render their own duplicated copy of this SVG
|
|
2390
|
+
* (the drawer's collapsed state even faked an icon-only look by clipping the full wordmark asset
|
|
2391
|
+
* down to a narrowed box, rather than using a real icon-only asset).
|
|
2392
|
+
* ## When to use
|
|
2393
|
+
* - Anywhere the BrandSync logo/icon needs to render: a navigation header, a nav drawer, etc.
|
|
2394
|
+
* ## When not to use
|
|
2395
|
+
* - The Genie AI chat panel's own brand mark -- that's a different logo (`bs-chatbot-header`'s
|
|
2396
|
+
* own inline Genie asset), not this one.
|
|
2397
|
+
* `variant` mirrors Figma's "Logo" component set (node 10909:30421) `Device` property
|
|
2398
|
+
* ("Desktop" / "Tab and mobile"), which was originally meant to distinguish the full lockup from
|
|
2399
|
+
* the icon-only mark at different responsive breakpoints -- renamed here to
|
|
2400
|
+
* `variant: 'full' | 'mark'` since that's what it actually controls (how much of the logo
|
|
2401
|
+
* renders), not literally a device/breakpoint switch.
|
|
2402
|
+
* `variant="custom"` is not a Figma variant at all -- it's an escape hatch for a consuming app
|
|
2403
|
+
* that needs to show a DIFFERENT product's logo in the same slot (e.g. a white-labeled deployment,
|
|
2404
|
+
* or a logo fetched at runtime from a service like brand.dev), via `src`/`alt`, instead of the
|
|
2405
|
+
* built-in BrandSync assets. This component deliberately does NOT fetch that image itself --
|
|
2406
|
+
* network calls, loading/error states, and caching are the consuming app's responsibility, same as
|
|
2407
|
+
* every other component in this library (e.g. `bs-attachment` takes `imageSrc` rather than fetching
|
|
2408
|
+
* an image on its own). `background` has no effect on `variant="custom"` -- a consumer's own image
|
|
2409
|
+
* is already designed for whatever surface it's placed on.
|
|
2410
|
+
*/
|
|
2411
|
+
interface HTMLBsLogoElement extends Components.BsLogo, HTMLStencilElement {
|
|
2412
|
+
}
|
|
2413
|
+
var HTMLBsLogoElement: {
|
|
2414
|
+
prototype: HTMLBsLogoElement;
|
|
2415
|
+
new (): HTMLBsLogoElement;
|
|
2416
|
+
};
|
|
1769
2417
|
/**
|
|
1770
2418
|
* A generic dropdown/popup menu container: a rounded, elevated list of items (typically
|
|
1771
2419
|
* `bs-menu-item` elements).
|
|
@@ -1854,6 +2502,187 @@ declare global {
|
|
|
1854
2502
|
prototype: HTMLBsModalElement;
|
|
1855
2503
|
new (): HTMLBsModalElement;
|
|
1856
2504
|
};
|
|
2505
|
+
interface HTMLBsNavigationDrawerElementEventMap {
|
|
2506
|
+
"bsCollapse": boolean;
|
|
2507
|
+
"bsSearchClick": void;
|
|
2508
|
+
}
|
|
2509
|
+
/**
|
|
2510
|
+
* A left-side persistent navigation sidebar: the BrandSync logo, a "Main Menu" title with a
|
|
2511
|
+
* collapse toggle, a reserved slot for a search field, and a scrollable list of nav items.
|
|
2512
|
+
* ## When to use
|
|
2513
|
+
* - The primary in-app navigation, shown alongside `bs-navigation-header` (typically that
|
|
2514
|
+
* header's `with-navigation-drawer` alignment, which omits its own logo since this component
|
|
2515
|
+
* already renders one).
|
|
2516
|
+
* ## When not to use
|
|
2517
|
+
* - The top navigation bar itself -- use `bs-navigation-header` instead.
|
|
2518
|
+
* This component renders a real `<nav>` landmark (no explicit `role` needed -- `<nav>` already
|
|
2519
|
+
* carries the implicit `navigation` role), labeled via `aria-label={heading}` so the landmark
|
|
2520
|
+
* still has a name even when collapsed (see below).
|
|
2521
|
+
* `collapsed` narrows the drawer to a 96px icon-only rail, per Figma node 8028:135374
|
|
2522
|
+
* ("Type=Collapsed"): the title text disappears, the logo swaps from the full "EG BrandSync"
|
|
2523
|
+
* wordmark (`bs-logo variant="full"`) to the real icon-only mark (`bs-logo variant="mark"` -- a
|
|
2524
|
+
* second, properly-designed asset, not a CSS crop of the full one) via CSS visibility toggling on
|
|
2525
|
+
* both, the same `:host([collapsed])` attribute-selector pattern already used for the
|
|
2526
|
+
* `search`/`search-trigger` swap below, the `search` slot is replaced by a compact built-in
|
|
2527
|
+
* search-trigger button (this component can't meaningfully shrink arbitrary slotted search-field
|
|
2528
|
+
* content down to icon size itself, so it emits `bsSearchClick` instead -- e.g. to open a full
|
|
2529
|
+
* search overlay), and every top-level
|
|
2530
|
+
* `bs-navigation-drawer-item`'s layout switches from icon-beside-label to icon-above-caption.
|
|
2531
|
+
* That last part is real prop propagation, not a CSS trick: this component keeps each direct-child
|
|
2532
|
+
* item's own `collapsed` prop in sync with its own (see `syncItemsCollapsed` below), the same
|
|
2533
|
+
* direct-children-prop-sync approach `bs-tabs` already uses for coordinating `selected` across its
|
|
2534
|
+
* `bs-tab` children. Clicking the toggle self-toggles `collapsed` (simple local UI state, not
|
|
2535
|
+
* something needing cross-component coordination -- closer to `bs-switch`'s self-toggling
|
|
2536
|
+
* `checked` than `bs-tab`'s non-self-toggling `selected`) and emits `bsCollapse` with the new
|
|
2537
|
+
* value. The toggle's own caret icon does NOT rotate when collapsed -- Figma's collapsed mock
|
|
2538
|
+
* reuses the identical left-pointing "CaretLeft" asset unchanged, confirmed by directly inspecting
|
|
2539
|
+
* that state, so this deliberately does not add the same "flip on toggle" idiom the drawer item's
|
|
2540
|
+
* own disclosure chevron does (that one really is an unconfirmed addition; this one was checked).
|
|
2541
|
+
*/
|
|
2542
|
+
interface HTMLBsNavigationDrawerElement extends Components.BsNavigationDrawer, HTMLStencilElement {
|
|
2543
|
+
addEventListener<K extends keyof HTMLBsNavigationDrawerElementEventMap>(type: K, listener: (this: HTMLBsNavigationDrawerElement, ev: BsNavigationDrawerCustomEvent<HTMLBsNavigationDrawerElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2544
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2545
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2546
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2547
|
+
removeEventListener<K extends keyof HTMLBsNavigationDrawerElementEventMap>(type: K, listener: (this: HTMLBsNavigationDrawerElement, ev: BsNavigationDrawerCustomEvent<HTMLBsNavigationDrawerElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2548
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2549
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2550
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2551
|
+
}
|
|
2552
|
+
var HTMLBsNavigationDrawerElement: {
|
|
2553
|
+
prototype: HTMLBsNavigationDrawerElement;
|
|
2554
|
+
new (): HTMLBsNavigationDrawerElement;
|
|
2555
|
+
};
|
|
2556
|
+
interface HTMLBsNavigationDrawerItemElementEventMap {
|
|
2557
|
+
"bsSelect": void;
|
|
2558
|
+
"bsToggle": boolean;
|
|
2559
|
+
}
|
|
2560
|
+
/**
|
|
2561
|
+
* A single row within a `bs-navigation-drawer`'s item list -- either a plain leaf nav item, or an
|
|
2562
|
+
* `expandable` group header that discloses nested `bs-navigation-drawer-item` children.
|
|
2563
|
+
* ## When to use
|
|
2564
|
+
* - Every row inside a `bs-navigation-drawer`'s default slot.
|
|
2565
|
+
* ## When not to use
|
|
2566
|
+
* - A standalone action outside a navigation drawer -- use `bs-button`/`bs-menu-item` instead.
|
|
2567
|
+
* Click behavior is mutually exclusive, based on `expandable`:
|
|
2568
|
+
* - `expandable = false` (a plain leaf item): clicking only emits `bsSelect`. `selected` is NOT
|
|
2569
|
+
* self-toggling -- same non-self-toggling precedent as `bs-tab`'s `selected` (see `bs-tab.tsx`'s
|
|
2570
|
+
* class doc): coordinating which sibling row is selected needs cross-item state a
|
|
2571
|
+
* consumer/wrapper owns, not something this component can reason about on its own.
|
|
2572
|
+
* - `expandable = true` (a group header, never shown with a `selected` tint): clicking toggles
|
|
2573
|
+
* `this.expanded` directly and emits `bsToggle` with the new value, and does NOT emit
|
|
2574
|
+
* `bsSelect`. This IS self-toggling, unlike `selected` above -- it's simple local disclosure
|
|
2575
|
+
* state with no cross-item coordination needed, closer to `bs-switch`'s self-toggling `checked`
|
|
2576
|
+
* than `bs-tab`'s non-self-toggling `selected`.
|
|
2577
|
+
* Nesting: put child `<bs-navigation-drawer-item nested>` elements inside a parent
|
|
2578
|
+
* `<bs-navigation-drawer-item expandable>` with `slot="children"`. The parent shows/hides that
|
|
2579
|
+
* slot's content based on its own `expanded` prop, via a pure-CSS attribute selector (no JS
|
|
2580
|
+
* visibility toggling needed, since `expanded` is reflected).
|
|
2581
|
+
* `collapsed` switches this row from its normal icon-beside-label row layout to a compact
|
|
2582
|
+
* icon-above-caption column (per Figma node 8028:135374, the drawer's "Type=Collapsed" state) --
|
|
2583
|
+
* you don't need to set this yourself on every item: a parent `bs-navigation-drawer` keeps its own
|
|
2584
|
+
* top-level items' `collapsed` prop in sync with its own `collapsed` state automatically (see
|
|
2585
|
+
* `bs-navigation-drawer.tsx`'s `syncItemsCollapsed`, the same direct-children-prop-sync approach
|
|
2586
|
+
* `bs-tabs` uses for coordinating `selected` across its own `bs-tab` children). It's still a public
|
|
2587
|
+
* prop so a standalone item (or this component's own stories) can be demoed without the parent.
|
|
2588
|
+
*/
|
|
2589
|
+
interface HTMLBsNavigationDrawerItemElement extends Components.BsNavigationDrawerItem, HTMLStencilElement {
|
|
2590
|
+
addEventListener<K extends keyof HTMLBsNavigationDrawerItemElementEventMap>(type: K, listener: (this: HTMLBsNavigationDrawerItemElement, ev: BsNavigationDrawerItemCustomEvent<HTMLBsNavigationDrawerItemElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2591
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2592
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2593
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2594
|
+
removeEventListener<K extends keyof HTMLBsNavigationDrawerItemElementEventMap>(type: K, listener: (this: HTMLBsNavigationDrawerItemElement, ev: BsNavigationDrawerItemCustomEvent<HTMLBsNavigationDrawerItemElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2595
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2596
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2597
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2598
|
+
}
|
|
2599
|
+
var HTMLBsNavigationDrawerItemElement: {
|
|
2600
|
+
prototype: HTMLBsNavigationDrawerItemElement;
|
|
2601
|
+
new (): HTMLBsNavigationDrawerItemElement;
|
|
2602
|
+
};
|
|
2603
|
+
/**
|
|
2604
|
+
* The top-level navigation bar for a page: the BrandSync logo plus two consumer-provided slots
|
|
2605
|
+
* for menu/action content (e.g. `bs-button`/`bs-icon-button` elements).
|
|
2606
|
+
* ## When to use
|
|
2607
|
+
* - The persistent top bar of an application, above the page content.
|
|
2608
|
+
* ## When not to use
|
|
2609
|
+
* - The header of a Genie AI chat panel -- use `bs-chatbot-header` instead, which is purpose-built
|
|
2610
|
+
* for that narrower layout and its own fixed action buttons.
|
|
2611
|
+
* `alignment` controls both whether the logo renders and how the two slots are laid out:
|
|
2612
|
+
* - `default` (default): logo on the left, `left` slot content immediately after it, `right` slot
|
|
2613
|
+
* content pushed to the far right.
|
|
2614
|
+
* - `center`: logo and `right` slot both grow equally (`flex: 1`), which centers the `left` slot
|
|
2615
|
+
* content in the middle of the bar.
|
|
2616
|
+
* - `with-navigation-drawer`: no logo at all (this variant assumes a nav-drawer toggle is the
|
|
2617
|
+
* leftmost thing on the page instead) -- `left` slot content starts at the bar's own left edge,
|
|
2618
|
+
* `right` slot content pushed to the far right.
|
|
2619
|
+
*/
|
|
2620
|
+
interface HTMLBsNavigationHeaderElement extends Components.BsNavigationHeader, HTMLStencilElement {
|
|
2621
|
+
}
|
|
2622
|
+
var HTMLBsNavigationHeaderElement: {
|
|
2623
|
+
prototype: HTMLBsNavigationHeaderElement;
|
|
2624
|
+
new (): HTMLBsNavigationHeaderElement;
|
|
2625
|
+
};
|
|
2626
|
+
interface HTMLBsRadioElementEventMap {
|
|
2627
|
+
"bsChange": string;
|
|
2628
|
+
}
|
|
2629
|
+
/**
|
|
2630
|
+
* A single radio button with its label, for one mutually-exclusive choice within a group.
|
|
2631
|
+
* ## When to use
|
|
2632
|
+
* - One option within a set of mutually-exclusive choices, where all options should stay visible
|
|
2633
|
+
* (a radio group).
|
|
2634
|
+
* ## When not to use
|
|
2635
|
+
* - An independent, non-exclusive binary choice, or one item in a set of independent choices --
|
|
2636
|
+
* use `bs-checkbox` instead.
|
|
2637
|
+
* - An on/off setting that takes effect immediately (no explicit form submission) -- use `bs-switch`.
|
|
2638
|
+
*/
|
|
2639
|
+
interface HTMLBsRadioElement extends Components.BsRadio, HTMLStencilElement {
|
|
2640
|
+
addEventListener<K extends keyof HTMLBsRadioElementEventMap>(type: K, listener: (this: HTMLBsRadioElement, ev: BsRadioCustomEvent<HTMLBsRadioElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2641
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2642
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2643
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2644
|
+
removeEventListener<K extends keyof HTMLBsRadioElementEventMap>(type: K, listener: (this: HTMLBsRadioElement, ev: BsRadioCustomEvent<HTMLBsRadioElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2645
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2646
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2647
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2648
|
+
}
|
|
2649
|
+
var HTMLBsRadioElement: {
|
|
2650
|
+
prototype: HTMLBsRadioElement;
|
|
2651
|
+
new (): HTMLBsRadioElement;
|
|
2652
|
+
};
|
|
2653
|
+
interface HTMLBsSliderElementEventMap {
|
|
2654
|
+
"bsChange": number;
|
|
2655
|
+
"bsRangeChange": { start: number; end: number };
|
|
2656
|
+
}
|
|
2657
|
+
/**
|
|
2658
|
+
* A slider for picking a single numeric value (`type="default"`), a value snapped to evenly
|
|
2659
|
+
* spaced ticks (`type="segmented"`), or a min/max pair (`type="range"`) from within a bounded
|
|
2660
|
+
* `min`/`max` range.
|
|
2661
|
+
* ## When to use
|
|
2662
|
+
* - A numeric value that's easiest to reason about relative to its bounds (volume, brightness,
|
|
2663
|
+
* a price range) rather than typed digit-by-digit.
|
|
2664
|
+
* - `type="segmented"` when only a fixed number of discrete stops make sense (e.g. a 5-star
|
|
2665
|
+
* rating-like scale) but a visual track is still preferable to discrete buttons.
|
|
2666
|
+
* - `type="range"` for picking a min/max pair (e.g. a price range filter) with two thumbs.
|
|
2667
|
+
* ## When not to use
|
|
2668
|
+
* - A precise value where mis-dragging by a pixel matters more than the at-a-glance bounds --
|
|
2669
|
+
* use `bs-input[type="number"]` instead.
|
|
2670
|
+
* - A small, fixed set of mutually exclusive choices -- use a radio group instead.
|
|
2671
|
+
*/
|
|
2672
|
+
interface HTMLBsSliderElement extends Components.BsSlider, HTMLStencilElement {
|
|
2673
|
+
addEventListener<K extends keyof HTMLBsSliderElementEventMap>(type: K, listener: (this: HTMLBsSliderElement, ev: BsSliderCustomEvent<HTMLBsSliderElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2674
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2675
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2676
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2677
|
+
removeEventListener<K extends keyof HTMLBsSliderElementEventMap>(type: K, listener: (this: HTMLBsSliderElement, ev: BsSliderCustomEvent<HTMLBsSliderElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2678
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2679
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2680
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2681
|
+
}
|
|
2682
|
+
var HTMLBsSliderElement: {
|
|
2683
|
+
prototype: HTMLBsSliderElement;
|
|
2684
|
+
new (): HTMLBsSliderElement;
|
|
2685
|
+
};
|
|
1857
2686
|
interface HTMLBsSourceLinkElementEventMap {
|
|
1858
2687
|
"bsOpen": void;
|
|
1859
2688
|
}
|
|
@@ -1896,6 +2725,91 @@ declare global {
|
|
|
1896
2725
|
prototype: HTMLBsSourceLinkElement;
|
|
1897
2726
|
new (): HTMLBsSourceLinkElement;
|
|
1898
2727
|
};
|
|
2728
|
+
interface HTMLBsSwitchElementEventMap {
|
|
2729
|
+
"bsChange": boolean;
|
|
2730
|
+
}
|
|
2731
|
+
/**
|
|
2732
|
+
* A toggle switch for an on/off setting that takes effect immediately (no explicit form
|
|
2733
|
+
* submission required).
|
|
2734
|
+
* ## When to use
|
|
2735
|
+
* - A binary setting that applies right away (e.g. "Enable notifications", "Dark mode").
|
|
2736
|
+
* ## When not to use
|
|
2737
|
+
* - A binary choice that's part of a form submitted later, or one item within a group of
|
|
2738
|
+
* independent choices -- use `bs-checkbox` instead.
|
|
2739
|
+
* - A single mutually-exclusive choice from a set -- use a radio group instead.
|
|
2740
|
+
*/
|
|
2741
|
+
interface HTMLBsSwitchElement extends Components.BsSwitch, HTMLStencilElement {
|
|
2742
|
+
addEventListener<K extends keyof HTMLBsSwitchElementEventMap>(type: K, listener: (this: HTMLBsSwitchElement, ev: BsSwitchCustomEvent<HTMLBsSwitchElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2743
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2744
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2745
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2746
|
+
removeEventListener<K extends keyof HTMLBsSwitchElementEventMap>(type: K, listener: (this: HTMLBsSwitchElement, ev: BsSwitchCustomEvent<HTMLBsSwitchElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2747
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2748
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2749
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2750
|
+
}
|
|
2751
|
+
var HTMLBsSwitchElement: {
|
|
2752
|
+
prototype: HTMLBsSwitchElement;
|
|
2753
|
+
new (): HTMLBsSwitchElement;
|
|
2754
|
+
};
|
|
2755
|
+
interface HTMLBsTabElementEventMap {
|
|
2756
|
+
"bsSelect": void;
|
|
2757
|
+
}
|
|
2758
|
+
/**
|
|
2759
|
+
* A single tab button -- an optional icon plus a text label, rendered as a real `<button>` so it
|
|
2760
|
+
* participates correctly in tab order and native click/keyboard activation.
|
|
2761
|
+
* ## When to use
|
|
2762
|
+
* - As one button within a tab bar, where exactly one tab is selected/active at a time.
|
|
2763
|
+
* ## When not to use
|
|
2764
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-tab`'s visual language (muted
|
|
2765
|
+
* until selected/hovered, underline indicator) only makes sense as part of a set.
|
|
2766
|
+
* `selected` is NOT self-toggling -- clicking a `bs-tab` only emits `bsSelect`, it does not set its
|
|
2767
|
+
* own `selected` prop, and it does not unselect any sibling tabs. Wrap your `<bs-tab>` elements in
|
|
2768
|
+
* `<bs-tabs type="bs-tab">` -- it owns `role="tablist"` and coordinates selection (listening for
|
|
2769
|
+
* `bsSelect` and setting `selected`/`false` across siblings) for you. Using `bs-tab` standalone,
|
|
2770
|
+
* outside a `<bs-tabs>` wrapper, still means `selected` doesn't self-toggle and `role="tablist"`
|
|
2771
|
+
* isn't provided automatically -- a consumer doing that would still need to coordinate `selected`
|
|
2772
|
+
* and supply `role="tablist"` manually, same as `bs-radio.mdx` documents for `bs-radio`'s missing
|
|
2773
|
+
* `bs-radio-group`. See `bs-tab.mdx`'s Accessibility section for the full requirement, including
|
|
2774
|
+
* `role="tabpanel"` on the corresponding content panels.
|
|
2775
|
+
*/
|
|
2776
|
+
interface HTMLBsTabElement extends Components.BsTab, HTMLStencilElement {
|
|
2777
|
+
addEventListener<K extends keyof HTMLBsTabElementEventMap>(type: K, listener: (this: HTMLBsTabElement, ev: BsTabCustomEvent<HTMLBsTabElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2778
|
+
addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2779
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2780
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
2781
|
+
removeEventListener<K extends keyof HTMLBsTabElementEventMap>(type: K, listener: (this: HTMLBsTabElement, ev: BsTabCustomEvent<HTMLBsTabElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
|
|
2782
|
+
removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2783
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2784
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
2785
|
+
}
|
|
2786
|
+
var HTMLBsTabElement: {
|
|
2787
|
+
prototype: HTMLBsTabElement;
|
|
2788
|
+
new (): HTMLBsTabElement;
|
|
2789
|
+
};
|
|
2790
|
+
/**
|
|
2791
|
+
* A tab-group wrapper: owns `role="tablist"` and coordinates selection across its slotted
|
|
2792
|
+
* `<bs-tab>` or `<bs-inline-tab>` children, so consumers no longer have to hand-roll this.
|
|
2793
|
+
* `bs-tab.mdx`/`bs-inline-tab.mdx` previously documented this coordination -- listening for
|
|
2794
|
+
* `bsSelect` and setting `selected`/`false` on siblings, plus supplying `role="tablist"` on
|
|
2795
|
+
* whatever element groups the tabs -- as a "Known gap"/manual consumer responsibility. This
|
|
2796
|
+
* component is that wrapper: it renders the `role="tablist"` element and listens for `bsSelect`
|
|
2797
|
+
* itself. Using `<bs-tab>`/`<bs-inline-tab>` standalone, outside a `<bs-tabs>` wrapper, still means
|
|
2798
|
+
* `selected` doesn't self-toggle -- a consumer doing that would still need to coordinate `selected`
|
|
2799
|
+
* manually -- but that's no longer the first recommended path.
|
|
2800
|
+
* ## When to use
|
|
2801
|
+
* - Wrapping a set of `<bs-tab>` (underline style) or `<bs-inline-tab>` (pill style) elements that
|
|
2802
|
+
* should behave as a single-selection tab bar.
|
|
2803
|
+
* ## When not to use
|
|
2804
|
+
* - For a single, standalone tab button not participating in a group -- use `bs-tab`/`bs-inline-tab`
|
|
2805
|
+
* directly.
|
|
2806
|
+
*/
|
|
2807
|
+
interface HTMLBsTabsElement extends Components.BsTabs, HTMLStencilElement {
|
|
2808
|
+
}
|
|
2809
|
+
var HTMLBsTabsElement: {
|
|
2810
|
+
prototype: HTMLBsTabsElement;
|
|
2811
|
+
new (): HTMLBsTabsElement;
|
|
2812
|
+
};
|
|
1899
2813
|
/**
|
|
1900
2814
|
* A dark tooltip bubble with a pointer arrow, used to surface a short hint of extra information
|
|
1901
2815
|
* next to a trigger element.
|
|
@@ -1948,11 +2862,22 @@ declare global {
|
|
|
1948
2862
|
"bs-composer": HTMLBsComposerElement;
|
|
1949
2863
|
"bs-composer-status-banner": HTMLBsComposerStatusBannerElement;
|
|
1950
2864
|
"bs-data-table": HTMLBsDataTableElement;
|
|
2865
|
+
"bs-icon-button": HTMLBsIconButtonElement;
|
|
2866
|
+
"bs-inline-tab": HTMLBsInlineTabElement;
|
|
1951
2867
|
"bs-input": HTMLBsInputElement;
|
|
2868
|
+
"bs-logo": HTMLBsLogoElement;
|
|
1952
2869
|
"bs-menu": HTMLBsMenuElement;
|
|
1953
2870
|
"bs-menu-item": HTMLBsMenuItemElement;
|
|
1954
2871
|
"bs-modal": HTMLBsModalElement;
|
|
2872
|
+
"bs-navigation-drawer": HTMLBsNavigationDrawerElement;
|
|
2873
|
+
"bs-navigation-drawer-item": HTMLBsNavigationDrawerItemElement;
|
|
2874
|
+
"bs-navigation-header": HTMLBsNavigationHeaderElement;
|
|
2875
|
+
"bs-radio": HTMLBsRadioElement;
|
|
2876
|
+
"bs-slider": HTMLBsSliderElement;
|
|
1955
2877
|
"bs-source-link": HTMLBsSourceLinkElement;
|
|
2878
|
+
"bs-switch": HTMLBsSwitchElement;
|
|
2879
|
+
"bs-tab": HTMLBsTabElement;
|
|
2880
|
+
"bs-tabs": HTMLBsTabsElement;
|
|
1956
2881
|
"bs-tooltip": HTMLBsTooltipElement;
|
|
1957
2882
|
}
|
|
1958
2883
|
}
|
|
@@ -2045,7 +2970,9 @@ declare namespace LocalJSX {
|
|
|
2045
2970
|
/**
|
|
2046
2971
|
* A single file attachment preview for `bs-composer` -- an image thumbnail, or a filename card
|
|
2047
2972
|
* with a colored file-type badge (PDF/Document), with an optional upload-in-progress spinner and
|
|
2048
|
-
* a hover/focus-revealed remove button
|
|
2973
|
+
* a hover/focus-revealed remove button (a `bs-icon-button` with `size="xs"` `variant="neutral"` --
|
|
2974
|
+
* the same 16x16px compact tier `bs-icon-button` documents as meant for exactly this kind of
|
|
2975
|
+
* chip/tag "remove" control).
|
|
2049
2976
|
* ## When to use
|
|
2050
2977
|
* - Rendered by the consuming app for each file a user has attached to a Genie AI chat message,
|
|
2051
2978
|
* typically alongside or inside `bs-composer`.
|
|
@@ -2062,14 +2989,6 @@ declare namespace LocalJSX {
|
|
|
2062
2989
|
* @prop --bs-attachment-badge-bg-pdf - PDF badge background. Aliased to `--bs-badge-bg-error`.
|
|
2063
2990
|
* @prop --bs-attachment-badge-bg-document - Document badge background. Aliased to
|
|
2064
2991
|
* `--bs-badge-bg-info`.
|
|
2065
|
-
* @prop --bs-attachment-remove-bg - Remove button (neutral icon button) default background.
|
|
2066
|
-
* Aliased to `--bs-button-neutral-container`.
|
|
2067
|
-
* @prop --bs-attachment-remove-hover - Remove button hover background. Aliased to
|
|
2068
|
-
* `--bs-button-neutral-hover`.
|
|
2069
|
-
* @prop --bs-attachment-remove-pressed - Remove button active/pressed background. Aliased to
|
|
2070
|
-
* `--bs-button-neutral-pressed`.
|
|
2071
|
-
* @prop --bs-attachment-remove-focus - Remove button focus outline color. Aliased to
|
|
2072
|
-
* `--bs-border-neutral-focus`.
|
|
2073
2992
|
*/
|
|
2074
2993
|
interface BsAttachment {
|
|
2075
2994
|
/**
|
|
@@ -2168,6 +3087,11 @@ declare namespace LocalJSX {
|
|
|
2168
3087
|
* @prop --bs-button-height-sm - Height at `size="sm"`. Aliased to `--bs-spacing-500`.
|
|
2169
3088
|
* @prop --bs-button-height-md - Height at `size="md"`. Aliased to `--bs-spacing-600`.
|
|
2170
3089
|
* @prop --bs-button-height-lg - Height at `size="lg"`. Aliased to `--bs-spacing-700`.
|
|
3090
|
+
* @prop --bs-button-neutral-border - Border color, `variant="neutral"`, default/disabled. Aliased to `--bs-border-neutral-container`.
|
|
3091
|
+
* @prop --bs-button-neutral-border-hover - Border color, `variant="neutral"`, hover. Aliased to `--bs-border-neutral-container-hover`.
|
|
3092
|
+
* @prop --bs-button-neutral-border-pressed - Border color, `variant="neutral"`, pressed. Aliased to `--bs-border-neutral-container-pressed`.
|
|
3093
|
+
* @prop --bs-button-padding-x-icon-side - Horizontal padding on an edge that's adjacent to a leading/trailing icon (tighter than the plain text-only edge). Aliased to `--bs-spacing-150`.
|
|
3094
|
+
* @prop --bs-button-padding-x-label-side - Horizontal padding on the opposite edge, when an icon on the other side needs compensating extra space to keep the button optically balanced. Aliased to `--bs-spacing-250`.
|
|
2171
3095
|
*/
|
|
2172
3096
|
interface BsButton {
|
|
2173
3097
|
/**
|
|
@@ -2533,6 +3457,11 @@ declare namespace LocalJSX {
|
|
|
2533
3457
|
* - An on/off setting that takes effect immediately (no explicit form submission) -- use `bs-switch`.
|
|
2534
3458
|
*/
|
|
2535
3459
|
interface BsCheckbox {
|
|
3460
|
+
/**
|
|
3461
|
+
* Accessible name for the checkbox. Required whenever the default (label) slot is empty (e.g. a bare "select row" checkbox in a table) -- without it, the internal native `<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-checkbox>` host does NOT work for this: that attribute stays on the light-DOM host and is never forwarded into the shadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays nameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and `bs-tab`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal focusable element for the same reason.
|
|
3462
|
+
* @default null
|
|
3463
|
+
*/
|
|
3464
|
+
"ariaLabel"?: string | null;
|
|
2536
3465
|
/**
|
|
2537
3466
|
* Whether the checkbox is checked. Mutable so clicking the label/input toggles it directly. When `indeterminate` is also true, `indeterminate` wins visually (shows the minus icon) regardless of this value -- same as native checkboxes.
|
|
2538
3467
|
* @default false
|
|
@@ -2594,6 +3523,7 @@ declare namespace LocalJSX {
|
|
|
2594
3523
|
* @prop --bs-composer-mic-icon-disabled - Aliased to `--bs-icon-disabled`.
|
|
2595
3524
|
* @prop --bs-composer-subtle-hover - Background of the attach/mic buttons on hover (subtle-button treatment, same as `bs-button`'s `subtle` variant). Aliased to `--bs-color-neutral-container`.
|
|
2596
3525
|
* @prop --bs-composer-subtle-pressed - Background of the attach/mic buttons when pressed. Aliased to `--bs-color-neutral-container-pressed`.
|
|
3526
|
+
* @prop --bs-composer-input-max-lines - How many lines the text field grows to before scrolling internally instead of growing further. Aliased to `10`.
|
|
2597
3527
|
*/
|
|
2598
3528
|
interface BsComposer {
|
|
2599
3529
|
/**
|
|
@@ -2635,7 +3565,7 @@ declare namespace LocalJSX {
|
|
|
2635
3565
|
*/
|
|
2636
3566
|
"state"?: BsComposerState;
|
|
2637
3567
|
/**
|
|
2638
|
-
* Current text value. Native `input` events don't cross the Shadow DOM boundary, so this component re-dispatches them as a `bsInput` custom event instead.
|
|
3568
|
+
* Current text value. Native `input` events don't cross the Shadow DOM boundary, so this component re-dispatches them as a `bsInput` custom event instead. The field is a `<textarea>` (not a single-line `<input>`) that grows with its content, up to `--bs-composer-input-max-lines` (10 by default) -- beyond that it scrolls internally instead of growing further. Setting `value` as a prop (not just typing) also re-triggers the resize, so e.g. programmatically clearing the field after submit correctly shrinks it back down.
|
|
2639
3569
|
* @default ''
|
|
2640
3570
|
*/
|
|
2641
3571
|
"value"?: string;
|
|
@@ -2656,6 +3586,12 @@ declare namespace LocalJSX {
|
|
|
2656
3586
|
* ## When not to use
|
|
2657
3587
|
* - A toast/snackbar notification unrelated to the composer -- this component is not
|
|
2658
3588
|
* self-dismissing and has no positioning of its own (it's a static block, not an overlay).
|
|
3589
|
+
* ## Accessibility
|
|
3590
|
+
* Sets `role="status"` for `type="info"`/`type="neutral"` and `role="alert"` for
|
|
3591
|
+
* `type="error"`/`type="warning"` on its own root element automatically -- no opt-in prop needed.
|
|
3592
|
+
* Both roles carry implicit ARIA live-region semantics (`status` is polite, `alert` is assertive),
|
|
3593
|
+
* so a screen reader announces the message as soon as this banner is inserted into the DOM,
|
|
3594
|
+
* without a consumer having to remember to add `role`/`aria-live` themselves.
|
|
2659
3595
|
* @prop --bs-composer-status-banner-radius - Corner radius of the top-left/top-right corners
|
|
2660
3596
|
* (bottom corners are square, so this sits flush above `bs-composer`). Aliased to
|
|
2661
3597
|
* `--bs-border-radius-150`.
|
|
@@ -2780,6 +3716,94 @@ declare namespace LocalJSX {
|
|
|
2780
3716
|
*/
|
|
2781
3717
|
"sortDirection"?: 'asc' | 'desc';
|
|
2782
3718
|
}
|
|
3719
|
+
/**
|
|
3720
|
+
* A clickable, icon-only action element -- the icon-only sibling of `bs-button`, sharing the same
|
|
3721
|
+
* 8 visual variants and color language, but ALWAYS rendering just a single icon, never a label.
|
|
3722
|
+
* ## When to use
|
|
3723
|
+
* - A compact action where the icon alone is unambiguous (e.g. a close/dismiss control, a toolbar
|
|
3724
|
+
* action) and adding a text label would take up more space than the context allows.
|
|
3725
|
+
* - The same variant guidance as `bs-button` applies: `primary` for the single most important
|
|
3726
|
+
* action, `neutral`/`subtle`/`outlined` for lower-emphasis alternatives, `error` reserved for
|
|
3727
|
+
* destructive/irreversible actions (never `neutral`, per BrandSync guidance), `success`/
|
|
3728
|
+
* `warning`/`info` only when the action's own outcome is predictable and clearly communicated.
|
|
3729
|
+
* ## When not to use
|
|
3730
|
+
* - When the action isn't self-evident from the icon alone -- use `bs-button` with a visible label
|
|
3731
|
+
* instead, don't rely on a tooltip to compensate for an unclear icon.
|
|
3732
|
+
* - For navigation between pages -- use a link/nav component instead.
|
|
3733
|
+
* Because this component is always icon-only, `ariaLabel` is required for every real usage (not
|
|
3734
|
+
* just conditionally, unlike `bs-button`) -- there's no visible label text to fall back on for an
|
|
3735
|
+
* accessible name.
|
|
3736
|
+
*/
|
|
3737
|
+
interface BsIconButton {
|
|
3738
|
+
/**
|
|
3739
|
+
* Accessible name for the button. Required -- this component is always icon-only, so there's no visible label text for screen readers to fall back on. Stencil reflects this camelCase prop to the `aria-label` HTML attribute automatically.
|
|
3740
|
+
* @default null
|
|
3741
|
+
*/
|
|
3742
|
+
"ariaLabel"?: string | null;
|
|
3743
|
+
/**
|
|
3744
|
+
* Disables the button and applies the disabled token set.
|
|
3745
|
+
* @default false
|
|
3746
|
+
*/
|
|
3747
|
+
"disabled"?: boolean;
|
|
3748
|
+
/**
|
|
3749
|
+
* Sizing scale. `xs` (16px, an 8px icon) is a distinct, much smaller tier meant for compact chip/tag "remove" controls, not just a smaller toolbar button -- verified against a separate Figma redline (EG BrandSync UI Kit v1.5, node 20731:18427) from the one `sm`/`md`/`lg` were built against.
|
|
3750
|
+
* @default 'md'
|
|
3751
|
+
*/
|
|
3752
|
+
"size"?: BsIconButtonSize;
|
|
3753
|
+
/**
|
|
3754
|
+
* Native `<button>` type.
|
|
3755
|
+
* @default 'button'
|
|
3756
|
+
*/
|
|
3757
|
+
"type"?: 'button' | 'submit' | 'reset';
|
|
3758
|
+
/**
|
|
3759
|
+
* Visual style. Maps to the same semantic token families as `bs-button`'s `variant`. `error` is for destructive/irreversible actions per BrandSync guidance, not a stronger emphasis alternative to `primary`.
|
|
3760
|
+
* @default 'primary'
|
|
3761
|
+
*/
|
|
3762
|
+
"variant"?: BsIconButtonVariant;
|
|
3763
|
+
}
|
|
3764
|
+
/**
|
|
3765
|
+
* A pill-shaped tab button -- an optional leading icon plus a text label, rendered as a real
|
|
3766
|
+
* `<button>` so it participates correctly in tab order and native click/keyboard activation.
|
|
3767
|
+
* Unlike `bs-tab`'s underline indicator, selection here is communicated entirely by the pill's
|
|
3768
|
+
* background fill color -- there is no separate indicator element.
|
|
3769
|
+
* ## When to use
|
|
3770
|
+
* - As one button within a segmented-control-style tab bar, where exactly one tab is
|
|
3771
|
+
* selected/active at a time.
|
|
3772
|
+
* ## When not to use
|
|
3773
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-inline-tab`'s visual language
|
|
3774
|
+
* (muted pill until selected/hovered) only makes sense as part of a set.
|
|
3775
|
+
* `selected` is NOT self-toggling -- clicking a `bs-inline-tab` only emits `bsSelect`, it does not
|
|
3776
|
+
* set its own `selected` prop, and it does not unselect any sibling tabs. Wrap your
|
|
3777
|
+
* `<bs-inline-tab>` elements in `<bs-tabs type="bs-inline-tab">` -- it owns `role="tablist"` and
|
|
3778
|
+
* coordinates selection (listening for `bsSelect` and setting `selected`/`false` across siblings)
|
|
3779
|
+
* for you. Using `bs-inline-tab` standalone, outside a `<bs-tabs>` wrapper, still means `selected`
|
|
3780
|
+
* doesn't self-toggle and `role="tablist"` isn't provided automatically -- a consumer doing that
|
|
3781
|
+
* would still need to coordinate `selected` and supply `role="tablist"` manually, same as
|
|
3782
|
+
* `bs-tab.mdx`/`bs-radio.mdx` document for their own components. See `bs-inline-tab.mdx`'s
|
|
3783
|
+
* Accessibility section for the full requirement, including `role="tabpanel"` on the corresponding
|
|
3784
|
+
* content panels.
|
|
3785
|
+
*/
|
|
3786
|
+
interface BsInlineTab {
|
|
3787
|
+
/**
|
|
3788
|
+
* Accessible name for the tab. Required for icon-only usage (no visible label text via the default slot) so screen readers still announce what the tab does -- without it, an icon-only tab has no discernible name at all (axe-core flags this as a critical `button-name` violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute automatically, same as `bs-tab`'s identical prop.
|
|
3789
|
+
* @default null
|
|
3790
|
+
*/
|
|
3791
|
+
"ariaLabel"?: string | null;
|
|
3792
|
+
/**
|
|
3793
|
+
* Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents clicking from emitting `bsSelect`.
|
|
3794
|
+
* @default false
|
|
3795
|
+
*/
|
|
3796
|
+
"disabled"?: boolean;
|
|
3797
|
+
/**
|
|
3798
|
+
* Fires when the tab is clicked. Does not toggle `selected` itself -- see the class JSDoc.
|
|
3799
|
+
*/
|
|
3800
|
+
"onBsSelect"?: (event: BsInlineTabCustomEvent<void>) => void;
|
|
3801
|
+
/**
|
|
3802
|
+
* Whether this tab is the currently active one. NOT mutable and NOT self-toggling -- see the "Known gap" note in the class JSDoc. Still reflected as an attribute so consumers/CSS can target `bs-inline-tab[selected]`.
|
|
3803
|
+
* @default false
|
|
3804
|
+
*/
|
|
3805
|
+
"selected"?: boolean;
|
|
3806
|
+
}
|
|
2783
3807
|
/**
|
|
2784
3808
|
* A single-line text field with an optional label, description, and error state. Also covers a
|
|
2785
3809
|
* range of related "field" shapes (number stepper, password reveal, date, dropdown trigger,
|
|
@@ -2912,6 +3936,52 @@ declare namespace LocalJSX {
|
|
|
2912
3936
|
*/
|
|
2913
3937
|
"value"?: string;
|
|
2914
3938
|
}
|
|
3939
|
+
/**
|
|
3940
|
+
* The BrandSync brand mark, as its own standalone component -- shared by `bs-navigation-header`
|
|
3941
|
+
* and `bs-navigation-drawer`, which used to each render their own duplicated copy of this SVG
|
|
3942
|
+
* (the drawer's collapsed state even faked an icon-only look by clipping the full wordmark asset
|
|
3943
|
+
* down to a narrowed box, rather than using a real icon-only asset).
|
|
3944
|
+
* ## When to use
|
|
3945
|
+
* - Anywhere the BrandSync logo/icon needs to render: a navigation header, a nav drawer, etc.
|
|
3946
|
+
* ## When not to use
|
|
3947
|
+
* - The Genie AI chat panel's own brand mark -- that's a different logo (`bs-chatbot-header`'s
|
|
3948
|
+
* own inline Genie asset), not this one.
|
|
3949
|
+
* `variant` mirrors Figma's "Logo" component set (node 10909:30421) `Device` property
|
|
3950
|
+
* ("Desktop" / "Tab and mobile"), which was originally meant to distinguish the full lockup from
|
|
3951
|
+
* the icon-only mark at different responsive breakpoints -- renamed here to
|
|
3952
|
+
* `variant: 'full' | 'mark'` since that's what it actually controls (how much of the logo
|
|
3953
|
+
* renders), not literally a device/breakpoint switch.
|
|
3954
|
+
* `variant="custom"` is not a Figma variant at all -- it's an escape hatch for a consuming app
|
|
3955
|
+
* that needs to show a DIFFERENT product's logo in the same slot (e.g. a white-labeled deployment,
|
|
3956
|
+
* or a logo fetched at runtime from a service like brand.dev), via `src`/`alt`, instead of the
|
|
3957
|
+
* built-in BrandSync assets. This component deliberately does NOT fetch that image itself --
|
|
3958
|
+
* network calls, loading/error states, and caching are the consuming app's responsibility, same as
|
|
3959
|
+
* every other component in this library (e.g. `bs-attachment` takes `imageSrc` rather than fetching
|
|
3960
|
+
* an image on its own). `background` has no effect on `variant="custom"` -- a consumer's own image
|
|
3961
|
+
* is already designed for whatever surface it's placed on.
|
|
3962
|
+
*/
|
|
3963
|
+
interface BsLogo {
|
|
3964
|
+
/**
|
|
3965
|
+
* `variant="custom"` only: accessible alt text for the image -- a product logo is meaningful content (whose brand is this?), not decorative, so set this to something real (e.g. the product/company name). Falls back to `alt=""` (marking the image decorative to assistive tech) when unset, rather than omitting the `alt` attribute entirely -- an `<img>` with no `alt` attribute at all is a harder accessibility failure than one explicitly marked decorative, but an empty fallback is still worse than a real name, so don't rely on it. Ignored for `full`/`mark` (those already carry their own fixed `aria-label="BrandSync"`).
|
|
3966
|
+
* @default null
|
|
3967
|
+
*/
|
|
3968
|
+
"alt"?: string | null;
|
|
3969
|
+
/**
|
|
3970
|
+
* Which pre-built asset to use for `variant="full"` -- Figma ships a genuinely separate, differently-drawn dark-background asset (every wordmark path filled solid white, and the icon's outer shape a single solid-white path instead of the light version's two-path white-fill-plus-border-ring), not a CSS currentColor swap of identical paths. `"auto"` (default) renders both assets and lets CSS pick one via `--bs-logo-asset-light-display`/`--bs-logo-asset-dark-display` (defined in `src/global/base.css`, flipped by the same `[data-theme="dark"]` attribute every other `--bs-*` token already reacts to) -- so the logo just follows the ambient theme with no wiring needed, the same way a consuming app's own dark mode already re-themes every other part of this library via ordinary CSS custom property inheritance. Set `"light"`/`"dark"` explicitly to pin one regardless of the ambient theme -- e.g. a dark sidebar that isn't otherwise dark-themed. Has no effect on `variant="mark"`: Figma's component set only has one real designed instance of the icon-only mark (`Device="Tab and mobile"`, `Background="Default"`) -- there's no separate dark version of it, so the mark renders identically regardless of this prop.
|
|
3971
|
+
* @default 'auto'
|
|
3972
|
+
*/
|
|
3973
|
+
"background"?: BsLogoBackground;
|
|
3974
|
+
/**
|
|
3975
|
+
* `variant="custom"` only: the image URL to render (e.g. a URL your app already fetched from a logo API). Ignored for `full`/`mark`.
|
|
3976
|
+
* @default null
|
|
3977
|
+
*/
|
|
3978
|
+
"src"?: string | null;
|
|
3979
|
+
/**
|
|
3980
|
+
* How much of the logo to render. `full` is the icon + "EG BrandSync" wordmark (190.977x44 natural size); `mark` is just the icon (44x44 natural size), no wordmark; `custom` renders a consumer-supplied image via `src`/`alt` instead of a built-in BrandSync asset -- see the class doc above.
|
|
3981
|
+
* @default 'full'
|
|
3982
|
+
*/
|
|
3983
|
+
"variant"?: BsLogoVariant;
|
|
3984
|
+
}
|
|
2915
3985
|
/**
|
|
2916
3986
|
* A generic dropdown/popup menu container: a rounded, elevated list of items (typically
|
|
2917
3987
|
* `bs-menu-item` elements).
|
|
@@ -2986,6 +4056,299 @@ declare namespace LocalJSX {
|
|
|
2986
4056
|
*/
|
|
2987
4057
|
"size"?: BsModalSize;
|
|
2988
4058
|
}
|
|
4059
|
+
/**
|
|
4060
|
+
* A left-side persistent navigation sidebar: the BrandSync logo, a "Main Menu" title with a
|
|
4061
|
+
* collapse toggle, a reserved slot for a search field, and a scrollable list of nav items.
|
|
4062
|
+
* ## When to use
|
|
4063
|
+
* - The primary in-app navigation, shown alongside `bs-navigation-header` (typically that
|
|
4064
|
+
* header's `with-navigation-drawer` alignment, which omits its own logo since this component
|
|
4065
|
+
* already renders one).
|
|
4066
|
+
* ## When not to use
|
|
4067
|
+
* - The top navigation bar itself -- use `bs-navigation-header` instead.
|
|
4068
|
+
* This component renders a real `<nav>` landmark (no explicit `role` needed -- `<nav>` already
|
|
4069
|
+
* carries the implicit `navigation` role), labeled via `aria-label={heading}` so the landmark
|
|
4070
|
+
* still has a name even when collapsed (see below).
|
|
4071
|
+
* `collapsed` narrows the drawer to a 96px icon-only rail, per Figma node 8028:135374
|
|
4072
|
+
* ("Type=Collapsed"): the title text disappears, the logo swaps from the full "EG BrandSync"
|
|
4073
|
+
* wordmark (`bs-logo variant="full"`) to the real icon-only mark (`bs-logo variant="mark"` -- a
|
|
4074
|
+
* second, properly-designed asset, not a CSS crop of the full one) via CSS visibility toggling on
|
|
4075
|
+
* both, the same `:host([collapsed])` attribute-selector pattern already used for the
|
|
4076
|
+
* `search`/`search-trigger` swap below, the `search` slot is replaced by a compact built-in
|
|
4077
|
+
* search-trigger button (this component can't meaningfully shrink arbitrary slotted search-field
|
|
4078
|
+
* content down to icon size itself, so it emits `bsSearchClick` instead -- e.g. to open a full
|
|
4079
|
+
* search overlay), and every top-level
|
|
4080
|
+
* `bs-navigation-drawer-item`'s layout switches from icon-beside-label to icon-above-caption.
|
|
4081
|
+
* That last part is real prop propagation, not a CSS trick: this component keeps each direct-child
|
|
4082
|
+
* item's own `collapsed` prop in sync with its own (see `syncItemsCollapsed` below), the same
|
|
4083
|
+
* direct-children-prop-sync approach `bs-tabs` already uses for coordinating `selected` across its
|
|
4084
|
+
* `bs-tab` children. Clicking the toggle self-toggles `collapsed` (simple local UI state, not
|
|
4085
|
+
* something needing cross-component coordination -- closer to `bs-switch`'s self-toggling
|
|
4086
|
+
* `checked` than `bs-tab`'s non-self-toggling `selected`) and emits `bsCollapse` with the new
|
|
4087
|
+
* value. The toggle's own caret icon does NOT rotate when collapsed -- Figma's collapsed mock
|
|
4088
|
+
* reuses the identical left-pointing "CaretLeft" asset unchanged, confirmed by directly inspecting
|
|
4089
|
+
* that state, so this deliberately does not add the same "flip on toggle" idiom the drawer item's
|
|
4090
|
+
* own disclosure chevron does (that one really is an unconfirmed addition; this one was checked).
|
|
4091
|
+
*/
|
|
4092
|
+
interface BsNavigationDrawer {
|
|
4093
|
+
/**
|
|
4094
|
+
* Narrows the drawer to a 96px icon-only rail (Figma node 8028:135374). Mutable and reflected -- clicking the collapse toggle toggles this directly (self-toggling, see the class doc above for why), and this component keeps every direct-child `bs-navigation-drawer-item`'s own `collapsed` prop synced to match (see `syncItemsCollapsed`).
|
|
4095
|
+
* @default false
|
|
4096
|
+
*/
|
|
4097
|
+
"collapsed"?: boolean;
|
|
4098
|
+
/**
|
|
4099
|
+
* Whether this drawer can be collapsed at all. `false` renders no collapse toggle/chevron -- a "fixed" side nav (Carbon's terminology: a `Fixed Side Nav` never collapses, as opposed to a rail-capable one) that's always fully expanded. `collapsed` is ignored while this is `false`.
|
|
4100
|
+
* @default true
|
|
4101
|
+
*/
|
|
4102
|
+
"collapsible"?: boolean;
|
|
4103
|
+
/**
|
|
4104
|
+
* Heading text shown next to the collapse toggle, and used as the `<nav>` landmark's `aria-label` (so the landmark keeps a name even when `collapsed` hides the visible text).
|
|
4105
|
+
* @default 'Main Menu'
|
|
4106
|
+
*/
|
|
4107
|
+
"heading"?: string;
|
|
4108
|
+
/**
|
|
4109
|
+
* Forwarded straight to both internal `bs-logo` elements' own `background` prop. Defaults to `"auto"`, which follows the ambient `[data-theme="dark"]` state automatically (see `bs-logo`'s own docs) -- so if this drawer ends up on a dark surface via the normal theming mechanism, the logo switches to its dedicated dark-background asset with no wiring needed. Set `"light"`/`"dark"` explicitly only if you've overridden `--bs-navigation-drawer-bg` to something dark yourself *without* setting `[data-theme="dark"]`, and need to pin the logo regardless of theme. Has no visible effect on the `variant="mark"` logo shown while `collapsed` (see `bs-logo`'s own docs -- there's only one real designed mark asset, it's background-agnostic).
|
|
4110
|
+
* @default 'auto'
|
|
4111
|
+
*/
|
|
4112
|
+
"logoBackground"?: 'auto' | 'light' | 'dark';
|
|
4113
|
+
/**
|
|
4114
|
+
* Fires with the new `collapsed` value when the collapse toggle button is clicked.
|
|
4115
|
+
*/
|
|
4116
|
+
"onBsCollapse"?: (event: BsNavigationDrawerCustomEvent<boolean>) => void;
|
|
4117
|
+
/**
|
|
4118
|
+
* Fires when the compact search-trigger button (shown instead of the `search` slot while `collapsed`) is clicked -- e.g. to open a full search overlay. This component has no visibility into what the `search` slot actually contains, so it can't drive a real search itself once shrunk to icon size.
|
|
4119
|
+
*/
|
|
4120
|
+
"onBsSearchClick"?: (event: BsNavigationDrawerCustomEvent<void>) => void;
|
|
4121
|
+
}
|
|
4122
|
+
/**
|
|
4123
|
+
* A single row within a `bs-navigation-drawer`'s item list -- either a plain leaf nav item, or an
|
|
4124
|
+
* `expandable` group header that discloses nested `bs-navigation-drawer-item` children.
|
|
4125
|
+
* ## When to use
|
|
4126
|
+
* - Every row inside a `bs-navigation-drawer`'s default slot.
|
|
4127
|
+
* ## When not to use
|
|
4128
|
+
* - A standalone action outside a navigation drawer -- use `bs-button`/`bs-menu-item` instead.
|
|
4129
|
+
* Click behavior is mutually exclusive, based on `expandable`:
|
|
4130
|
+
* - `expandable = false` (a plain leaf item): clicking only emits `bsSelect`. `selected` is NOT
|
|
4131
|
+
* self-toggling -- same non-self-toggling precedent as `bs-tab`'s `selected` (see `bs-tab.tsx`'s
|
|
4132
|
+
* class doc): coordinating which sibling row is selected needs cross-item state a
|
|
4133
|
+
* consumer/wrapper owns, not something this component can reason about on its own.
|
|
4134
|
+
* - `expandable = true` (a group header, never shown with a `selected` tint): clicking toggles
|
|
4135
|
+
* `this.expanded` directly and emits `bsToggle` with the new value, and does NOT emit
|
|
4136
|
+
* `bsSelect`. This IS self-toggling, unlike `selected` above -- it's simple local disclosure
|
|
4137
|
+
* state with no cross-item coordination needed, closer to `bs-switch`'s self-toggling `checked`
|
|
4138
|
+
* than `bs-tab`'s non-self-toggling `selected`.
|
|
4139
|
+
* Nesting: put child `<bs-navigation-drawer-item nested>` elements inside a parent
|
|
4140
|
+
* `<bs-navigation-drawer-item expandable>` with `slot="children"`. The parent shows/hides that
|
|
4141
|
+
* slot's content based on its own `expanded` prop, via a pure-CSS attribute selector (no JS
|
|
4142
|
+
* visibility toggling needed, since `expanded` is reflected).
|
|
4143
|
+
* `collapsed` switches this row from its normal icon-beside-label row layout to a compact
|
|
4144
|
+
* icon-above-caption column (per Figma node 8028:135374, the drawer's "Type=Collapsed" state) --
|
|
4145
|
+
* you don't need to set this yourself on every item: a parent `bs-navigation-drawer` keeps its own
|
|
4146
|
+
* top-level items' `collapsed` prop in sync with its own `collapsed` state automatically (see
|
|
4147
|
+
* `bs-navigation-drawer.tsx`'s `syncItemsCollapsed`, the same direct-children-prop-sync approach
|
|
4148
|
+
* `bs-tabs` uses for coordinating `selected` across its own `bs-tab` children). It's still a public
|
|
4149
|
+
* prop so a standalone item (or this component's own stories) can be demoed without the parent.
|
|
4150
|
+
*/
|
|
4151
|
+
interface BsNavigationDrawerItem {
|
|
4152
|
+
/**
|
|
4153
|
+
* Optional accessible name override. Not required for `collapsed` rows -- unlike an icon-only button, the label caption stays visible (just restyled smaller, under the icon) in that mode per Figma, so the button's default accessible-name computation (its own text content) already works. Set this if you want a fuller/different name than the visible caption (e.g. truncated captions, or matching `bs-switch`/`bs-slider`'s `ariaLabel` convention for consistency).
|
|
4154
|
+
* @default null
|
|
4155
|
+
*/
|
|
4156
|
+
"ariaLabel"?: string | null;
|
|
4157
|
+
/**
|
|
4158
|
+
* Switches this row to the compact icon-above-caption column layout used when its parent `bs-navigation-drawer` is `collapsed` (see the class doc above). Reflected so `bs-navigation-drawer-item[collapsed]` is CSS-targetable. Also forces `expandable` rows' chevron and `children` slot to stay hidden regardless of `expanded` -- Figma's collapsed rail never shows a nested tree.
|
|
4159
|
+
* @default false
|
|
4160
|
+
*/
|
|
4161
|
+
"collapsed"?: boolean;
|
|
4162
|
+
/**
|
|
4163
|
+
* Renders this row as a disclosure/group header (trailing chevron, self-toggling `expanded`, `bsToggle` instead of `bsSelect` on click) instead of a plain navigable leaf item. See the class doc above for the full click-behavior split.
|
|
4164
|
+
* @default false
|
|
4165
|
+
*/
|
|
4166
|
+
"expandable"?: boolean;
|
|
4167
|
+
/**
|
|
4168
|
+
* Whether an `expandable` row's `children` slot is shown. Mutable and reflected -- clicking an `expandable` row toggles this directly (self-toggling, unlike `selected` above), and CSS shows/hides the `children` slot wrapper based on the reflected attribute. Ignored when `expandable` is false.
|
|
4169
|
+
* @default false
|
|
4170
|
+
*/
|
|
4171
|
+
"expanded"?: boolean;
|
|
4172
|
+
/**
|
|
4173
|
+
* Marks this as a child row nested under an `expandable` parent (via `slot="children"`) -- deepens the left indent and stops reserving `icon` slot space entirely (Figma's nested rows never have icons).
|
|
4174
|
+
* @default false
|
|
4175
|
+
*/
|
|
4176
|
+
"nested"?: boolean;
|
|
4177
|
+
/**
|
|
4178
|
+
* Fires on click, only when `expandable` is false. See the class doc above.
|
|
4179
|
+
*/
|
|
4180
|
+
"onBsSelect"?: (event: BsNavigationDrawerItemCustomEvent<void>) => void;
|
|
4181
|
+
/**
|
|
4182
|
+
* Fires with the new `expanded` value on click, only when `expandable` is true. See the class doc above.
|
|
4183
|
+
*/
|
|
4184
|
+
"onBsToggle"?: (event: BsNavigationDrawerItemCustomEvent<boolean>) => void;
|
|
4185
|
+
/**
|
|
4186
|
+
* Tints the row's background/text to indicate it's the current destination. NOT self-toggling -- see the class doc above for why. Ignored (never applied) when `expandable` is true. Reflected so consumers/CSS can target `bs-navigation-drawer-item[selected]`.
|
|
4187
|
+
* @default false
|
|
4188
|
+
*/
|
|
4189
|
+
"selected"?: boolean;
|
|
4190
|
+
}
|
|
4191
|
+
/**
|
|
4192
|
+
* The top-level navigation bar for a page: the BrandSync logo plus two consumer-provided slots
|
|
4193
|
+
* for menu/action content (e.g. `bs-button`/`bs-icon-button` elements).
|
|
4194
|
+
* ## When to use
|
|
4195
|
+
* - The persistent top bar of an application, above the page content.
|
|
4196
|
+
* ## When not to use
|
|
4197
|
+
* - The header of a Genie AI chat panel -- use `bs-chatbot-header` instead, which is purpose-built
|
|
4198
|
+
* for that narrower layout and its own fixed action buttons.
|
|
4199
|
+
* `alignment` controls both whether the logo renders and how the two slots are laid out:
|
|
4200
|
+
* - `default` (default): logo on the left, `left` slot content immediately after it, `right` slot
|
|
4201
|
+
* content pushed to the far right.
|
|
4202
|
+
* - `center`: logo and `right` slot both grow equally (`flex: 1`), which centers the `left` slot
|
|
4203
|
+
* content in the middle of the bar.
|
|
4204
|
+
* - `with-navigation-drawer`: no logo at all (this variant assumes a nav-drawer toggle is the
|
|
4205
|
+
* leftmost thing on the page instead) -- `left` slot content starts at the bar's own left edge,
|
|
4206
|
+
* `right` slot content pushed to the far right.
|
|
4207
|
+
*/
|
|
4208
|
+
interface BsNavigationHeader {
|
|
4209
|
+
/**
|
|
4210
|
+
* Controls whether the logo renders and how the `left`/`right` slots are laid out -- see the class doc above for the three variants' exact behavior.
|
|
4211
|
+
* @default 'default'
|
|
4212
|
+
*/
|
|
4213
|
+
"alignment"?: BsNavigationHeaderAlignment;
|
|
4214
|
+
/**
|
|
4215
|
+
* Accessible label for the header landmark, useful when a page has more than one `<header>` (e.g. this one plus a page-specific sub-header) and screen reader users need to tell them apart in the landmarks list.
|
|
4216
|
+
* @default null
|
|
4217
|
+
*/
|
|
4218
|
+
"ariaLabel"?: string | null;
|
|
4219
|
+
/**
|
|
4220
|
+
* Forwarded straight to the internal `bs-logo`'s own `background` prop. Defaults to `"auto"`, which follows the ambient `[data-theme="dark"]` state automatically (see `bs-logo`'s own docs) -- so if this bar ends up on a dark surface via the normal theming mechanism, the logo switches to its dedicated dark-background asset with no wiring needed. Set `"light"`/`"dark"` explicitly only if you've overridden `--bs-navigation-header-bg` to something dark yourself *without* setting `[data-theme="dark"]`, and need to pin the logo regardless of theme.
|
|
4221
|
+
* @default 'auto'
|
|
4222
|
+
*/
|
|
4223
|
+
"logoBackground"?: 'auto' | 'light' | 'dark';
|
|
4224
|
+
/**
|
|
4225
|
+
* Fragment/URL to jump to when the "Skip to main content" link is activated (e.g. `#main-content`, matching an id on your page's main landmark). Unset by default -- the link is opt-in rather than pointing at a guessed default id, since a skip link to a target that doesn't exist on the consumer's page is worse than no skip link at all (it silently does nothing when activated). Set this to the same id your page's `<main>` (or equivalent) already has to enable it.
|
|
4226
|
+
* @default null
|
|
4227
|
+
*/
|
|
4228
|
+
"skipToContentHref"?: string | null;
|
|
4229
|
+
/**
|
|
4230
|
+
* Link text for the skip-to-content link. Only rendered when `skipToContentHref` is set.
|
|
4231
|
+
* @default 'Skip to main content'
|
|
4232
|
+
*/
|
|
4233
|
+
"skipToContentLabel"?: string;
|
|
4234
|
+
}
|
|
4235
|
+
/**
|
|
4236
|
+
* A single radio button with its label, for one mutually-exclusive choice within a group.
|
|
4237
|
+
* ## When to use
|
|
4238
|
+
* - One option within a set of mutually-exclusive choices, where all options should stay visible
|
|
4239
|
+
* (a radio group).
|
|
4240
|
+
* ## When not to use
|
|
4241
|
+
* - An independent, non-exclusive binary choice, or one item in a set of independent choices --
|
|
4242
|
+
* use `bs-checkbox` instead.
|
|
4243
|
+
* - An on/off setting that takes effect immediately (no explicit form submission) -- use `bs-switch`.
|
|
4244
|
+
*/
|
|
4245
|
+
interface BsRadio {
|
|
4246
|
+
/**
|
|
4247
|
+
* Whether the radio is checked. Mutable so clicking the label/input sets it directly.
|
|
4248
|
+
* @default false
|
|
4249
|
+
*/
|
|
4250
|
+
"checked"?: boolean;
|
|
4251
|
+
/**
|
|
4252
|
+
* Disables the radio: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents toggling.
|
|
4253
|
+
* @default false
|
|
4254
|
+
*/
|
|
4255
|
+
"disabled"?: boolean;
|
|
4256
|
+
/**
|
|
4257
|
+
* The native radio input's `name` attribute. Passed straight through to the native input inside. NOTE: because each `bs-radio` renders its own shadow root, native `<input type="radio">` mutual-exclusion grouping (which the HTML spec scopes to a single DOM tree) does NOT extend across separate `bs-radio` instances sharing the same `name` -- checking one will not natively uncheck another. Within a single instance this still behaves like a normal radio input. See bs-radio.mdx's Accessibility section for this known gap; consumers building a group currently need to manage mutual exclusivity themselves (e.g. via `bsChange`) until a `bs-radio-group` wrapper exists.
|
|
4258
|
+
*/
|
|
4259
|
+
"name"?: string;
|
|
4260
|
+
/**
|
|
4261
|
+
* Emitted with this radio's own `value` when it becomes checked via user interaction. Since native same-`name` grouping doesn't cross shadow-root boundaries (see the `name` prop's doc), a consumer wiring up a group of `bs-radio`s must itself set `checked = false` on the others in response to this event -- there's no automatic un-checking to rely on here.
|
|
4262
|
+
*/
|
|
4263
|
+
"onBsChange"?: (event: BsRadioCustomEvent<string>) => void;
|
|
4264
|
+
/**
|
|
4265
|
+
* The native radio input's `value` attribute -- read from `event.target.value`, or used when wiring the group up to a form.
|
|
4266
|
+
*/
|
|
4267
|
+
"value"?: string;
|
|
4268
|
+
}
|
|
4269
|
+
/**
|
|
4270
|
+
* A slider for picking a single numeric value (`type="default"`), a value snapped to evenly
|
|
4271
|
+
* spaced ticks (`type="segmented"`), or a min/max pair (`type="range"`) from within a bounded
|
|
4272
|
+
* `min`/`max` range.
|
|
4273
|
+
* ## When to use
|
|
4274
|
+
* - A numeric value that's easiest to reason about relative to its bounds (volume, brightness,
|
|
4275
|
+
* a price range) rather than typed digit-by-digit.
|
|
4276
|
+
* - `type="segmented"` when only a fixed number of discrete stops make sense (e.g. a 5-star
|
|
4277
|
+
* rating-like scale) but a visual track is still preferable to discrete buttons.
|
|
4278
|
+
* - `type="range"` for picking a min/max pair (e.g. a price range filter) with two thumbs.
|
|
4279
|
+
* ## When not to use
|
|
4280
|
+
* - A precise value where mis-dragging by a pixel matters more than the at-a-glance bounds --
|
|
4281
|
+
* use `bs-input[type="number"]` instead.
|
|
4282
|
+
* - A small, fixed set of mutually exclusive choices -- use a radio group instead.
|
|
4283
|
+
*/
|
|
4284
|
+
interface BsSlider {
|
|
4285
|
+
/**
|
|
4286
|
+
* Accessible name for the slider's native range input(s). Required whenever `showLabel` is `false` (a bare track with no visible "Label" text) -- without it, the internal native `<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-slider>` host does NOT work for this: that attribute stays on the light-DOM host and is never forwarded into the shadow DOM by the browser. Same pattern/reasoning as `bs-switch`'s and `bs-checkbox`'s identical `ariaLabel` prop. For `type="range"`, this labels the lower-bound thumb; the upper-bound thumb gets `"${ariaLabel} end"` (or `"End value"` when `ariaLabel` is unset).
|
|
4287
|
+
* @default null
|
|
4288
|
+
*/
|
|
4289
|
+
"ariaLabel"?: string | null;
|
|
4290
|
+
/**
|
|
4291
|
+
* Disables the slider: sets the native `disabled` attribute on the range input(s), suppresses hover/focus/drag styling and the value tooltip, and prevents interaction.
|
|
4292
|
+
* @default false
|
|
4293
|
+
*/
|
|
4294
|
+
"disabled"?: boolean;
|
|
4295
|
+
/**
|
|
4296
|
+
* Label text shown above the track when `showLabel` is set.
|
|
4297
|
+
* @default 'Label'
|
|
4298
|
+
*/
|
|
4299
|
+
"label"?: string;
|
|
4300
|
+
/**
|
|
4301
|
+
* Maximum selectable value, for all `type`s.
|
|
4302
|
+
* @default 100
|
|
4303
|
+
*/
|
|
4304
|
+
"max"?: number;
|
|
4305
|
+
/**
|
|
4306
|
+
* Minimum selectable value, for all `type`s.
|
|
4307
|
+
* @default 0
|
|
4308
|
+
*/
|
|
4309
|
+
"min"?: number;
|
|
4310
|
+
/**
|
|
4311
|
+
* Emitted when `value` changes via user interaction (dragging the thumb, or committing the value field), with the new value. Only fires for `type="default"`/`type="segmented"`.
|
|
4312
|
+
*/
|
|
4313
|
+
"onBsChange"?: (event: BsSliderCustomEvent<number>) => void;
|
|
4314
|
+
/**
|
|
4315
|
+
* Emitted when `valueStart`/`valueEnd` changes via user interaction, with both current values. Only fires for `type="range"`.
|
|
4316
|
+
*/
|
|
4317
|
+
"onBsRangeChange"?: (event: BsSliderCustomEvent<{ start: number; end: number }>) => void;
|
|
4318
|
+
/**
|
|
4319
|
+
* Number of equal divisions marked by tick lines along the track, for `type="segmented"` only. The first tick (at the very start of the track) is rendered with `opacity: 0` to keep the tick spacing math consistent while not visually doubling up with the track's own start edge -- this matches the design spec, not a bug.
|
|
4320
|
+
* @default 10
|
|
4321
|
+
*/
|
|
4322
|
+
"segments"?: number;
|
|
4323
|
+
/**
|
|
4324
|
+
* Shows/hides the "Label" text and editable percentage field(s) above the track, and the static min/max bound labels flanking it. When `false`, only the bare track (and its knob/knobs) renders.
|
|
4325
|
+
* @default true
|
|
4326
|
+
*/
|
|
4327
|
+
"showLabel"?: boolean;
|
|
4328
|
+
/**
|
|
4329
|
+
* Step size between selectable values. For `type="segmented"`, the effective step is derived from `(max - min) / segments` instead, so the thumb always snaps to a tick.
|
|
4330
|
+
* @default 1
|
|
4331
|
+
*/
|
|
4332
|
+
"step"?: number;
|
|
4333
|
+
/**
|
|
4334
|
+
* Which slider shape to render. `range` uses two thumbs (`valueStart`/`valueEnd`); `default` and `segmented` use one thumb (`value`). `segmented` additionally draws `segments` tick marks along the track.
|
|
4335
|
+
* @default 'default'
|
|
4336
|
+
*/
|
|
4337
|
+
"type"?: BsSliderType;
|
|
4338
|
+
/**
|
|
4339
|
+
* Current value for `type="default"`/`type="segmented"`. Ignored for `type="range"` -- use `valueStart`/`valueEnd` instead. Mutable so dragging the thumb updates it directly.
|
|
4340
|
+
* @default 0
|
|
4341
|
+
*/
|
|
4342
|
+
"value"?: number;
|
|
4343
|
+
/**
|
|
4344
|
+
* Upper thumb's value for `type="range"`. Defaults to `max` when unset. Mutable so dragging the thumb updates it directly.
|
|
4345
|
+
*/
|
|
4346
|
+
"valueEnd"?: number;
|
|
4347
|
+
/**
|
|
4348
|
+
* Lower thumb's value for `type="range"`. Defaults to `min` when unset. Mutable so dragging the thumb updates it directly.
|
|
4349
|
+
*/
|
|
4350
|
+
"valueStart"?: number;
|
|
4351
|
+
}
|
|
2989
4352
|
/**
|
|
2990
4353
|
* A single citation row inside `bs-chatbot-sources-drawer` -- a file icon + filename on the first
|
|
2991
4354
|
* line, the originating system and version on the second, and a trailing "open" arrow.
|
|
@@ -3039,6 +4402,115 @@ declare namespace LocalJSX {
|
|
|
3039
4402
|
*/
|
|
3040
4403
|
"version"?: string;
|
|
3041
4404
|
}
|
|
4405
|
+
/**
|
|
4406
|
+
* A toggle switch for an on/off setting that takes effect immediately (no explicit form
|
|
4407
|
+
* submission required).
|
|
4408
|
+
* ## When to use
|
|
4409
|
+
* - A binary setting that applies right away (e.g. "Enable notifications", "Dark mode").
|
|
4410
|
+
* ## When not to use
|
|
4411
|
+
* - A binary choice that's part of a form submitted later, or one item within a group of
|
|
4412
|
+
* independent choices -- use `bs-checkbox` instead.
|
|
4413
|
+
* - A single mutually-exclusive choice from a set -- use a radio group instead.
|
|
4414
|
+
*/
|
|
4415
|
+
interface BsSwitch {
|
|
4416
|
+
/**
|
|
4417
|
+
* Accessible name for the switch. Required whenever the default (label) slot is empty (e.g. a bare "enabled" switch in a table row) -- without it, the internal native `<input>` has no accessible name at all. Setting `aria-label` directly on the `<bs-switch>` host does NOT work for this: that attribute stays on the light-DOM host and is never forwarded into the shadow DOM by the browser, so the actual focusable element (the native `<input>` inside) stays nameless. This prop exists specifically to bridge that gap -- same pattern as `bs-button`'s and `bs-checkbox`'s identical `ariaLabel` prop, both of which explicitly bind it onto their own internal focusable element for the same reason.
|
|
4418
|
+
* @default null
|
|
4419
|
+
*/
|
|
4420
|
+
"ariaLabel"?: string | null;
|
|
4421
|
+
/**
|
|
4422
|
+
* Whether the switch is on. Mutable so clicking the label/input toggles it directly, and reflected so consumers can target `bs-switch[checked]` via CSS.
|
|
4423
|
+
* @default false
|
|
4424
|
+
*/
|
|
4425
|
+
"checked"?: boolean;
|
|
4426
|
+
/**
|
|
4427
|
+
* Disables the switch: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents toggling.
|
|
4428
|
+
* @default false
|
|
4429
|
+
*/
|
|
4430
|
+
"disabled"?: boolean;
|
|
4431
|
+
/**
|
|
4432
|
+
* Emitted when the checked state changes via user interaction, with the new `checked` value.
|
|
4433
|
+
*/
|
|
4434
|
+
"onBsChange"?: (event: BsSwitchCustomEvent<boolean>) => void;
|
|
4435
|
+
/**
|
|
4436
|
+
* Sizing scale. Controls the track's width/height and the knob's diameter.
|
|
4437
|
+
* @default 'lg'
|
|
4438
|
+
*/
|
|
4439
|
+
"size"?: BsSwitchSize;
|
|
4440
|
+
}
|
|
4441
|
+
/**
|
|
4442
|
+
* A single tab button -- an optional icon plus a text label, rendered as a real `<button>` so it
|
|
4443
|
+
* participates correctly in tab order and native click/keyboard activation.
|
|
4444
|
+
* ## When to use
|
|
4445
|
+
* - As one button within a tab bar, where exactly one tab is selected/active at a time.
|
|
4446
|
+
* ## When not to use
|
|
4447
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-tab`'s visual language (muted
|
|
4448
|
+
* until selected/hovered, underline indicator) only makes sense as part of a set.
|
|
4449
|
+
* `selected` is NOT self-toggling -- clicking a `bs-tab` only emits `bsSelect`, it does not set its
|
|
4450
|
+
* own `selected` prop, and it does not unselect any sibling tabs. Wrap your `<bs-tab>` elements in
|
|
4451
|
+
* `<bs-tabs type="bs-tab">` -- it owns `role="tablist"` and coordinates selection (listening for
|
|
4452
|
+
* `bsSelect` and setting `selected`/`false` across siblings) for you. Using `bs-tab` standalone,
|
|
4453
|
+
* outside a `<bs-tabs>` wrapper, still means `selected` doesn't self-toggle and `role="tablist"`
|
|
4454
|
+
* isn't provided automatically -- a consumer doing that would still need to coordinate `selected`
|
|
4455
|
+
* and supply `role="tablist"` manually, same as `bs-radio.mdx` documents for `bs-radio`'s missing
|
|
4456
|
+
* `bs-radio-group`. See `bs-tab.mdx`'s Accessibility section for the full requirement, including
|
|
4457
|
+
* `role="tabpanel"` on the corresponding content panels.
|
|
4458
|
+
*/
|
|
4459
|
+
interface BsTab {
|
|
4460
|
+
/**
|
|
4461
|
+
* Accessible name for the tab. Required for icon-only usage (no visible label text via the default slot) so screen readers still announce what the tab does -- without it, an icon-only tab has no discernible name at all (axe-core flags this as a critical `button-name` violation). Stencil reflects this camelCase prop to the `aria-label` HTML attribute automatically, same as `bs-button`'s identical prop.
|
|
4462
|
+
* @default null
|
|
4463
|
+
*/
|
|
4464
|
+
"ariaLabel"?: string | null;
|
|
4465
|
+
/**
|
|
4466
|
+
* Disables the tab: sets the native `disabled` attribute, suppresses hover/focus styling, and prevents clicking from emitting `bsSelect`.
|
|
4467
|
+
* @default false
|
|
4468
|
+
*/
|
|
4469
|
+
"disabled"?: boolean;
|
|
4470
|
+
/**
|
|
4471
|
+
* Where the icon sits relative to the label, when both `icon` and the default slot are populated. Ignored for icon-only/text-only layouts.
|
|
4472
|
+
* @default 'start'
|
|
4473
|
+
*/
|
|
4474
|
+
"iconPosition"?: BsTabIconPosition;
|
|
4475
|
+
/**
|
|
4476
|
+
* Fires when the tab is clicked. Does not toggle `selected` itself -- see the class JSDoc.
|
|
4477
|
+
*/
|
|
4478
|
+
"onBsSelect"?: (event: BsTabCustomEvent<void>) => void;
|
|
4479
|
+
/**
|
|
4480
|
+
* Whether this tab is the currently active one. NOT mutable and NOT self-toggling -- see the "Known gap" note in the class JSDoc. Still reflected as an attribute so consumers/CSS can target `bs-tab[selected]`.
|
|
4481
|
+
* @default false
|
|
4482
|
+
*/
|
|
4483
|
+
"selected"?: boolean;
|
|
4484
|
+
}
|
|
4485
|
+
/**
|
|
4486
|
+
* A tab-group wrapper: owns `role="tablist"` and coordinates selection across its slotted
|
|
4487
|
+
* `<bs-tab>` or `<bs-inline-tab>` children, so consumers no longer have to hand-roll this.
|
|
4488
|
+
* `bs-tab.mdx`/`bs-inline-tab.mdx` previously documented this coordination -- listening for
|
|
4489
|
+
* `bsSelect` and setting `selected`/`false` on siblings, plus supplying `role="tablist"` on
|
|
4490
|
+
* whatever element groups the tabs -- as a "Known gap"/manual consumer responsibility. This
|
|
4491
|
+
* component is that wrapper: it renders the `role="tablist"` element and listens for `bsSelect`
|
|
4492
|
+
* itself. Using `<bs-tab>`/`<bs-inline-tab>` standalone, outside a `<bs-tabs>` wrapper, still means
|
|
4493
|
+
* `selected` doesn't self-toggle -- a consumer doing that would still need to coordinate `selected`
|
|
4494
|
+
* manually -- but that's no longer the first recommended path.
|
|
4495
|
+
* ## When to use
|
|
4496
|
+
* - Wrapping a set of `<bs-tab>` (underline style) or `<bs-inline-tab>` (pill style) elements that
|
|
4497
|
+
* should behave as a single-selection tab bar.
|
|
4498
|
+
* ## When not to use
|
|
4499
|
+
* - For a single, standalone tab button not participating in a group -- use `bs-tab`/`bs-inline-tab`
|
|
4500
|
+
* directly.
|
|
4501
|
+
*/
|
|
4502
|
+
interface BsTabs {
|
|
4503
|
+
/**
|
|
4504
|
+
* Layout direction of the tab bar itself. Sets `aria-orientation` on the internal wrapper and switches `flex-direction`.
|
|
4505
|
+
* @default 'horizontal'
|
|
4506
|
+
*/
|
|
4507
|
+
"orientation"?: BsTabsOrientation;
|
|
4508
|
+
/**
|
|
4509
|
+
* Which tab-button family this group wraps. Governs the wrapper's own visual treatment (gap-only for `bs-tab`, a filled pill bar for `bs-inline-tab`). Not reflected as an attribute -- nothing external needs to target it via CSS attribute selector, it only drives internal class names.
|
|
4510
|
+
* @default 'bs-tab'
|
|
4511
|
+
*/
|
|
4512
|
+
"type"?: BsTabsType;
|
|
4513
|
+
}
|
|
3042
4514
|
/**
|
|
3043
4515
|
* A dark tooltip bubble with a pointer arrow, used to surface a short hint of extra information
|
|
3044
4516
|
* next to a trigger element.
|
|
@@ -3136,6 +4608,7 @@ declare namespace LocalJSX {
|
|
|
3136
4608
|
"indeterminate": boolean;
|
|
3137
4609
|
"disabled": boolean;
|
|
3138
4610
|
"error": boolean;
|
|
4611
|
+
"ariaLabel": string | null;
|
|
3139
4612
|
}
|
|
3140
4613
|
interface BsComposerAttributes {
|
|
3141
4614
|
"variant": BsComposerVariant;
|
|
@@ -3157,6 +4630,18 @@ declare namespace LocalJSX {
|
|
|
3157
4630
|
"sortDirection": 'asc' | 'desc';
|
|
3158
4631
|
"selectable": boolean;
|
|
3159
4632
|
}
|
|
4633
|
+
interface BsIconButtonAttributes {
|
|
4634
|
+
"variant": BsIconButtonVariant;
|
|
4635
|
+
"size": BsIconButtonSize;
|
|
4636
|
+
"disabled": boolean;
|
|
4637
|
+
"type": 'button' | 'submit' | 'reset';
|
|
4638
|
+
"ariaLabel": string | null;
|
|
4639
|
+
}
|
|
4640
|
+
interface BsInlineTabAttributes {
|
|
4641
|
+
"selected": boolean;
|
|
4642
|
+
"disabled": boolean;
|
|
4643
|
+
"ariaLabel": string | null;
|
|
4644
|
+
}
|
|
3160
4645
|
interface BsInputAttributes {
|
|
3161
4646
|
"value": string;
|
|
3162
4647
|
"type": | 'text'
|
|
@@ -3187,6 +4672,12 @@ declare namespace LocalJSX {
|
|
|
3187
4672
|
"length": number;
|
|
3188
4673
|
"open": boolean;
|
|
3189
4674
|
}
|
|
4675
|
+
interface BsLogoAttributes {
|
|
4676
|
+
"variant": BsLogoVariant;
|
|
4677
|
+
"background": BsLogoBackground;
|
|
4678
|
+
"src": string | null;
|
|
4679
|
+
"alt": string | null;
|
|
4680
|
+
}
|
|
3190
4681
|
interface BsMenuItemAttributes {
|
|
3191
4682
|
"disabled": boolean;
|
|
3192
4683
|
}
|
|
@@ -3195,6 +4686,47 @@ declare namespace LocalJSX {
|
|
|
3195
4686
|
"heading": string;
|
|
3196
4687
|
"size": BsModalSize;
|
|
3197
4688
|
}
|
|
4689
|
+
interface BsNavigationDrawerAttributes {
|
|
4690
|
+
"heading": string;
|
|
4691
|
+
"collapsible": boolean;
|
|
4692
|
+
"collapsed": boolean;
|
|
4693
|
+
"logoBackground": 'auto' | 'light' | 'dark';
|
|
4694
|
+
}
|
|
4695
|
+
interface BsNavigationDrawerItemAttributes {
|
|
4696
|
+
"selected": boolean;
|
|
4697
|
+
"expandable": boolean;
|
|
4698
|
+
"expanded": boolean;
|
|
4699
|
+
"nested": boolean;
|
|
4700
|
+
"ariaLabel": string | null;
|
|
4701
|
+
"collapsed": boolean;
|
|
4702
|
+
}
|
|
4703
|
+
interface BsNavigationHeaderAttributes {
|
|
4704
|
+
"alignment": BsNavigationHeaderAlignment;
|
|
4705
|
+
"ariaLabel": string | null;
|
|
4706
|
+
"skipToContentHref": string | null;
|
|
4707
|
+
"skipToContentLabel": string;
|
|
4708
|
+
"logoBackground": 'auto' | 'light' | 'dark';
|
|
4709
|
+
}
|
|
4710
|
+
interface BsRadioAttributes {
|
|
4711
|
+
"name": string;
|
|
4712
|
+
"value": string;
|
|
4713
|
+
"checked": boolean;
|
|
4714
|
+
"disabled": boolean;
|
|
4715
|
+
}
|
|
4716
|
+
interface BsSliderAttributes {
|
|
4717
|
+
"type": BsSliderType;
|
|
4718
|
+
"showLabel": boolean;
|
|
4719
|
+
"label": string;
|
|
4720
|
+
"min": number;
|
|
4721
|
+
"max": number;
|
|
4722
|
+
"step": number;
|
|
4723
|
+
"value": number;
|
|
4724
|
+
"valueStart": number;
|
|
4725
|
+
"valueEnd": number;
|
|
4726
|
+
"segments": number;
|
|
4727
|
+
"disabled": boolean;
|
|
4728
|
+
"ariaLabel": string | null;
|
|
4729
|
+
}
|
|
3198
4730
|
interface BsSourceLinkAttributes {
|
|
3199
4731
|
"fileName": string;
|
|
3200
4732
|
"sourceName": string;
|
|
@@ -3202,6 +4734,22 @@ declare namespace LocalJSX {
|
|
|
3202
4734
|
"href": string;
|
|
3203
4735
|
"target": string;
|
|
3204
4736
|
}
|
|
4737
|
+
interface BsSwitchAttributes {
|
|
4738
|
+
"size": BsSwitchSize;
|
|
4739
|
+
"checked": boolean;
|
|
4740
|
+
"disabled": boolean;
|
|
4741
|
+
"ariaLabel": string | null;
|
|
4742
|
+
}
|
|
4743
|
+
interface BsTabAttributes {
|
|
4744
|
+
"selected": boolean;
|
|
4745
|
+
"disabled": boolean;
|
|
4746
|
+
"iconPosition": BsTabIconPosition;
|
|
4747
|
+
"ariaLabel": string | null;
|
|
4748
|
+
}
|
|
4749
|
+
interface BsTabsAttributes {
|
|
4750
|
+
"type": BsTabsType;
|
|
4751
|
+
"orientation": BsTabsOrientation;
|
|
4752
|
+
}
|
|
3205
4753
|
interface BsTooltipAttributes {
|
|
3206
4754
|
"placement": 'top';
|
|
3207
4755
|
}
|
|
@@ -3225,11 +4773,22 @@ declare namespace LocalJSX {
|
|
|
3225
4773
|
"bs-composer": Omit<BsComposer, keyof BsComposerAttributes> & { [K in keyof BsComposer & keyof BsComposerAttributes]?: BsComposer[K] } & { [K in keyof BsComposer & keyof BsComposerAttributes as `attr:${K}`]?: BsComposerAttributes[K] } & { [K in keyof BsComposer & keyof BsComposerAttributes as `prop:${K}`]?: BsComposer[K] };
|
|
3226
4774
|
"bs-composer-status-banner": Omit<BsComposerStatusBanner, keyof BsComposerStatusBannerAttributes> & { [K in keyof BsComposerStatusBanner & keyof BsComposerStatusBannerAttributes]?: BsComposerStatusBanner[K] } & { [K in keyof BsComposerStatusBanner & keyof BsComposerStatusBannerAttributes as `attr:${K}`]?: BsComposerStatusBannerAttributes[K] } & { [K in keyof BsComposerStatusBanner & keyof BsComposerStatusBannerAttributes as `prop:${K}`]?: BsComposerStatusBanner[K] };
|
|
3227
4775
|
"bs-data-table": Omit<BsDataTable, keyof BsDataTableAttributes> & { [K in keyof BsDataTable & keyof BsDataTableAttributes]?: BsDataTable[K] } & { [K in keyof BsDataTable & keyof BsDataTableAttributes as `attr:${K}`]?: BsDataTableAttributes[K] } & { [K in keyof BsDataTable & keyof BsDataTableAttributes as `prop:${K}`]?: BsDataTable[K] };
|
|
4776
|
+
"bs-icon-button": Omit<BsIconButton, keyof BsIconButtonAttributes> & { [K in keyof BsIconButton & keyof BsIconButtonAttributes]?: BsIconButton[K] } & { [K in keyof BsIconButton & keyof BsIconButtonAttributes as `attr:${K}`]?: BsIconButtonAttributes[K] } & { [K in keyof BsIconButton & keyof BsIconButtonAttributes as `prop:${K}`]?: BsIconButton[K] };
|
|
4777
|
+
"bs-inline-tab": Omit<BsInlineTab, keyof BsInlineTabAttributes> & { [K in keyof BsInlineTab & keyof BsInlineTabAttributes]?: BsInlineTab[K] } & { [K in keyof BsInlineTab & keyof BsInlineTabAttributes as `attr:${K}`]?: BsInlineTabAttributes[K] } & { [K in keyof BsInlineTab & keyof BsInlineTabAttributes as `prop:${K}`]?: BsInlineTab[K] };
|
|
3228
4778
|
"bs-input": Omit<BsInput, keyof BsInputAttributes> & { [K in keyof BsInput & keyof BsInputAttributes]?: BsInput[K] } & { [K in keyof BsInput & keyof BsInputAttributes as `attr:${K}`]?: BsInputAttributes[K] } & { [K in keyof BsInput & keyof BsInputAttributes as `prop:${K}`]?: BsInput[K] };
|
|
4779
|
+
"bs-logo": Omit<BsLogo, keyof BsLogoAttributes> & { [K in keyof BsLogo & keyof BsLogoAttributes]?: BsLogo[K] } & { [K in keyof BsLogo & keyof BsLogoAttributes as `attr:${K}`]?: BsLogoAttributes[K] } & { [K in keyof BsLogo & keyof BsLogoAttributes as `prop:${K}`]?: BsLogo[K] };
|
|
3229
4780
|
"bs-menu": BsMenu;
|
|
3230
4781
|
"bs-menu-item": Omit<BsMenuItem, keyof BsMenuItemAttributes> & { [K in keyof BsMenuItem & keyof BsMenuItemAttributes]?: BsMenuItem[K] } & { [K in keyof BsMenuItem & keyof BsMenuItemAttributes as `attr:${K}`]?: BsMenuItemAttributes[K] } & { [K in keyof BsMenuItem & keyof BsMenuItemAttributes as `prop:${K}`]?: BsMenuItem[K] };
|
|
3231
4782
|
"bs-modal": Omit<BsModal, keyof BsModalAttributes> & { [K in keyof BsModal & keyof BsModalAttributes]?: BsModal[K] } & { [K in keyof BsModal & keyof BsModalAttributes as `attr:${K}`]?: BsModalAttributes[K] } & { [K in keyof BsModal & keyof BsModalAttributes as `prop:${K}`]?: BsModal[K] };
|
|
4783
|
+
"bs-navigation-drawer": Omit<BsNavigationDrawer, keyof BsNavigationDrawerAttributes> & { [K in keyof BsNavigationDrawer & keyof BsNavigationDrawerAttributes]?: BsNavigationDrawer[K] } & { [K in keyof BsNavigationDrawer & keyof BsNavigationDrawerAttributes as `attr:${K}`]?: BsNavigationDrawerAttributes[K] } & { [K in keyof BsNavigationDrawer & keyof BsNavigationDrawerAttributes as `prop:${K}`]?: BsNavigationDrawer[K] };
|
|
4784
|
+
"bs-navigation-drawer-item": Omit<BsNavigationDrawerItem, keyof BsNavigationDrawerItemAttributes> & { [K in keyof BsNavigationDrawerItem & keyof BsNavigationDrawerItemAttributes]?: BsNavigationDrawerItem[K] } & { [K in keyof BsNavigationDrawerItem & keyof BsNavigationDrawerItemAttributes as `attr:${K}`]?: BsNavigationDrawerItemAttributes[K] } & { [K in keyof BsNavigationDrawerItem & keyof BsNavigationDrawerItemAttributes as `prop:${K}`]?: BsNavigationDrawerItem[K] };
|
|
4785
|
+
"bs-navigation-header": Omit<BsNavigationHeader, keyof BsNavigationHeaderAttributes> & { [K in keyof BsNavigationHeader & keyof BsNavigationHeaderAttributes]?: BsNavigationHeader[K] } & { [K in keyof BsNavigationHeader & keyof BsNavigationHeaderAttributes as `attr:${K}`]?: BsNavigationHeaderAttributes[K] } & { [K in keyof BsNavigationHeader & keyof BsNavigationHeaderAttributes as `prop:${K}`]?: BsNavigationHeader[K] };
|
|
4786
|
+
"bs-radio": Omit<BsRadio, keyof BsRadioAttributes> & { [K in keyof BsRadio & keyof BsRadioAttributes]?: BsRadio[K] } & { [K in keyof BsRadio & keyof BsRadioAttributes as `attr:${K}`]?: BsRadioAttributes[K] } & { [K in keyof BsRadio & keyof BsRadioAttributes as `prop:${K}`]?: BsRadio[K] };
|
|
4787
|
+
"bs-slider": Omit<BsSlider, keyof BsSliderAttributes> & { [K in keyof BsSlider & keyof BsSliderAttributes]?: BsSlider[K] } & { [K in keyof BsSlider & keyof BsSliderAttributes as `attr:${K}`]?: BsSliderAttributes[K] } & { [K in keyof BsSlider & keyof BsSliderAttributes as `prop:${K}`]?: BsSlider[K] };
|
|
3232
4788
|
"bs-source-link": Omit<BsSourceLink, keyof BsSourceLinkAttributes> & { [K in keyof BsSourceLink & keyof BsSourceLinkAttributes]?: BsSourceLink[K] } & { [K in keyof BsSourceLink & keyof BsSourceLinkAttributes as `attr:${K}`]?: BsSourceLinkAttributes[K] } & { [K in keyof BsSourceLink & keyof BsSourceLinkAttributes as `prop:${K}`]?: BsSourceLink[K] };
|
|
4789
|
+
"bs-switch": Omit<BsSwitch, keyof BsSwitchAttributes> & { [K in keyof BsSwitch & keyof BsSwitchAttributes]?: BsSwitch[K] } & { [K in keyof BsSwitch & keyof BsSwitchAttributes as `attr:${K}`]?: BsSwitchAttributes[K] } & { [K in keyof BsSwitch & keyof BsSwitchAttributes as `prop:${K}`]?: BsSwitch[K] };
|
|
4790
|
+
"bs-tab": Omit<BsTab, keyof BsTabAttributes> & { [K in keyof BsTab & keyof BsTabAttributes]?: BsTab[K] } & { [K in keyof BsTab & keyof BsTabAttributes as `attr:${K}`]?: BsTabAttributes[K] } & { [K in keyof BsTab & keyof BsTabAttributes as `prop:${K}`]?: BsTab[K] };
|
|
4791
|
+
"bs-tabs": Omit<BsTabs, keyof BsTabsAttributes> & { [K in keyof BsTabs & keyof BsTabsAttributes]?: BsTabs[K] } & { [K in keyof BsTabs & keyof BsTabsAttributes as `attr:${K}`]?: BsTabsAttributes[K] } & { [K in keyof BsTabs & keyof BsTabsAttributes as `prop:${K}`]?: BsTabs[K] };
|
|
3233
4792
|
"bs-tooltip": Omit<BsTooltip, keyof BsTooltipAttributes> & { [K in keyof BsTooltip & keyof BsTooltipAttributes]?: BsTooltip[K] } & { [K in keyof BsTooltip & keyof BsTooltipAttributes as `attr:${K}`]?: BsTooltipAttributes[K] } & { [K in keyof BsTooltip & keyof BsTooltipAttributes as `prop:${K}`]?: BsTooltip[K] };
|
|
3234
4793
|
}
|
|
3235
4794
|
}
|
|
@@ -3308,7 +4867,9 @@ declare module "@stencil/core" {
|
|
|
3308
4867
|
/**
|
|
3309
4868
|
* A single file attachment preview for `bs-composer` -- an image thumbnail, or a filename card
|
|
3310
4869
|
* with a colored file-type badge (PDF/Document), with an optional upload-in-progress spinner and
|
|
3311
|
-
* a hover/focus-revealed remove button
|
|
4870
|
+
* a hover/focus-revealed remove button (a `bs-icon-button` with `size="xs"` `variant="neutral"` --
|
|
4871
|
+
* the same 16x16px compact tier `bs-icon-button` documents as meant for exactly this kind of
|
|
4872
|
+
* chip/tag "remove" control).
|
|
3312
4873
|
* ## When to use
|
|
3313
4874
|
* - Rendered by the consuming app for each file a user has attached to a Genie AI chat message,
|
|
3314
4875
|
* typically alongside or inside `bs-composer`.
|
|
@@ -3325,14 +4886,6 @@ declare module "@stencil/core" {
|
|
|
3325
4886
|
* @prop --bs-attachment-badge-bg-pdf - PDF badge background. Aliased to `--bs-badge-bg-error`.
|
|
3326
4887
|
* @prop --bs-attachment-badge-bg-document - Document badge background. Aliased to
|
|
3327
4888
|
* `--bs-badge-bg-info`.
|
|
3328
|
-
* @prop --bs-attachment-remove-bg - Remove button (neutral icon button) default background.
|
|
3329
|
-
* Aliased to `--bs-button-neutral-container`.
|
|
3330
|
-
* @prop --bs-attachment-remove-hover - Remove button hover background. Aliased to
|
|
3331
|
-
* `--bs-button-neutral-hover`.
|
|
3332
|
-
* @prop --bs-attachment-remove-pressed - Remove button active/pressed background. Aliased to
|
|
3333
|
-
* `--bs-button-neutral-pressed`.
|
|
3334
|
-
* @prop --bs-attachment-remove-focus - Remove button focus outline color. Aliased to
|
|
3335
|
-
* `--bs-border-neutral-focus`.
|
|
3336
4889
|
*/
|
|
3337
4890
|
"bs-attachment": LocalJSX.IntrinsicElements["bs-attachment"] & JSXBase.HTMLAttributes<HTMLBsAttachmentElement>;
|
|
3338
4891
|
/**
|
|
@@ -3385,6 +4938,11 @@ declare module "@stencil/core" {
|
|
|
3385
4938
|
* @prop --bs-button-height-sm - Height at `size="sm"`. Aliased to `--bs-spacing-500`.
|
|
3386
4939
|
* @prop --bs-button-height-md - Height at `size="md"`. Aliased to `--bs-spacing-600`.
|
|
3387
4940
|
* @prop --bs-button-height-lg - Height at `size="lg"`. Aliased to `--bs-spacing-700`.
|
|
4941
|
+
* @prop --bs-button-neutral-border - Border color, `variant="neutral"`, default/disabled. Aliased to `--bs-border-neutral-container`.
|
|
4942
|
+
* @prop --bs-button-neutral-border-hover - Border color, `variant="neutral"`, hover. Aliased to `--bs-border-neutral-container-hover`.
|
|
4943
|
+
* @prop --bs-button-neutral-border-pressed - Border color, `variant="neutral"`, pressed. Aliased to `--bs-border-neutral-container-pressed`.
|
|
4944
|
+
* @prop --bs-button-padding-x-icon-side - Horizontal padding on an edge that's adjacent to a leading/trailing icon (tighter than the plain text-only edge). Aliased to `--bs-spacing-150`.
|
|
4945
|
+
* @prop --bs-button-padding-x-label-side - Horizontal padding on the opposite edge, when an icon on the other side needs compensating extra space to keep the button optically balanced. Aliased to `--bs-spacing-250`.
|
|
3388
4946
|
*/
|
|
3389
4947
|
"bs-button": LocalJSX.IntrinsicElements["bs-button"] & JSXBase.HTMLAttributes<HTMLBsButtonElement>;
|
|
3390
4948
|
/**
|
|
@@ -3614,6 +5172,7 @@ declare module "@stencil/core" {
|
|
|
3614
5172
|
* @prop --bs-composer-mic-icon-disabled - Aliased to `--bs-icon-disabled`.
|
|
3615
5173
|
* @prop --bs-composer-subtle-hover - Background of the attach/mic buttons on hover (subtle-button treatment, same as `bs-button`'s `subtle` variant). Aliased to `--bs-color-neutral-container`.
|
|
3616
5174
|
* @prop --bs-composer-subtle-pressed - Background of the attach/mic buttons when pressed. Aliased to `--bs-color-neutral-container-pressed`.
|
|
5175
|
+
* @prop --bs-composer-input-max-lines - How many lines the text field grows to before scrolling internally instead of growing further. Aliased to `10`.
|
|
3617
5176
|
*/
|
|
3618
5177
|
"bs-composer": LocalJSX.IntrinsicElements["bs-composer"] & JSXBase.HTMLAttributes<HTMLBsComposerElement>;
|
|
3619
5178
|
/**
|
|
@@ -3627,6 +5186,12 @@ declare module "@stencil/core" {
|
|
|
3627
5186
|
* ## When not to use
|
|
3628
5187
|
* - A toast/snackbar notification unrelated to the composer -- this component is not
|
|
3629
5188
|
* self-dismissing and has no positioning of its own (it's a static block, not an overlay).
|
|
5189
|
+
* ## Accessibility
|
|
5190
|
+
* Sets `role="status"` for `type="info"`/`type="neutral"` and `role="alert"` for
|
|
5191
|
+
* `type="error"`/`type="warning"` on its own root element automatically -- no opt-in prop needed.
|
|
5192
|
+
* Both roles carry implicit ARIA live-region semantics (`status` is polite, `alert` is assertive),
|
|
5193
|
+
* so a screen reader announces the message as soon as this banner is inserted into the DOM,
|
|
5194
|
+
* without a consumer having to remember to add `role`/`aria-live` themselves.
|
|
3630
5195
|
* @prop --bs-composer-status-banner-radius - Corner radius of the top-left/top-right corners
|
|
3631
5196
|
* (bottom corners are square, so this sits flush above `bs-composer`). Aliased to
|
|
3632
5197
|
* `--bs-border-radius-150`.
|
|
@@ -3686,6 +5251,48 @@ declare module "@stencil/core" {
|
|
|
3686
5251
|
* - Deeply nested/hierarchical data — this component renders one flat row per record.
|
|
3687
5252
|
*/
|
|
3688
5253
|
"bs-data-table": LocalJSX.IntrinsicElements["bs-data-table"] & JSXBase.HTMLAttributes<HTMLBsDataTableElement>;
|
|
5254
|
+
/**
|
|
5255
|
+
* A clickable, icon-only action element -- the icon-only sibling of `bs-button`, sharing the same
|
|
5256
|
+
* 8 visual variants and color language, but ALWAYS rendering just a single icon, never a label.
|
|
5257
|
+
* ## When to use
|
|
5258
|
+
* - A compact action where the icon alone is unambiguous (e.g. a close/dismiss control, a toolbar
|
|
5259
|
+
* action) and adding a text label would take up more space than the context allows.
|
|
5260
|
+
* - The same variant guidance as `bs-button` applies: `primary` for the single most important
|
|
5261
|
+
* action, `neutral`/`subtle`/`outlined` for lower-emphasis alternatives, `error` reserved for
|
|
5262
|
+
* destructive/irreversible actions (never `neutral`, per BrandSync guidance), `success`/
|
|
5263
|
+
* `warning`/`info` only when the action's own outcome is predictable and clearly communicated.
|
|
5264
|
+
* ## When not to use
|
|
5265
|
+
* - When the action isn't self-evident from the icon alone -- use `bs-button` with a visible label
|
|
5266
|
+
* instead, don't rely on a tooltip to compensate for an unclear icon.
|
|
5267
|
+
* - For navigation between pages -- use a link/nav component instead.
|
|
5268
|
+
* Because this component is always icon-only, `ariaLabel` is required for every real usage (not
|
|
5269
|
+
* just conditionally, unlike `bs-button`) -- there's no visible label text to fall back on for an
|
|
5270
|
+
* accessible name.
|
|
5271
|
+
*/
|
|
5272
|
+
"bs-icon-button": LocalJSX.IntrinsicElements["bs-icon-button"] & JSXBase.HTMLAttributes<HTMLBsIconButtonElement>;
|
|
5273
|
+
/**
|
|
5274
|
+
* A pill-shaped tab button -- an optional leading icon plus a text label, rendered as a real
|
|
5275
|
+
* `<button>` so it participates correctly in tab order and native click/keyboard activation.
|
|
5276
|
+
* Unlike `bs-tab`'s underline indicator, selection here is communicated entirely by the pill's
|
|
5277
|
+
* background fill color -- there is no separate indicator element.
|
|
5278
|
+
* ## When to use
|
|
5279
|
+
* - As one button within a segmented-control-style tab bar, where exactly one tab is
|
|
5280
|
+
* selected/active at a time.
|
|
5281
|
+
* ## When not to use
|
|
5282
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-inline-tab`'s visual language
|
|
5283
|
+
* (muted pill until selected/hovered) only makes sense as part of a set.
|
|
5284
|
+
* `selected` is NOT self-toggling -- clicking a `bs-inline-tab` only emits `bsSelect`, it does not
|
|
5285
|
+
* set its own `selected` prop, and it does not unselect any sibling tabs. Wrap your
|
|
5286
|
+
* `<bs-inline-tab>` elements in `<bs-tabs type="bs-inline-tab">` -- it owns `role="tablist"` and
|
|
5287
|
+
* coordinates selection (listening for `bsSelect` and setting `selected`/`false` across siblings)
|
|
5288
|
+
* for you. Using `bs-inline-tab` standalone, outside a `<bs-tabs>` wrapper, still means `selected`
|
|
5289
|
+
* doesn't self-toggle and `role="tablist"` isn't provided automatically -- a consumer doing that
|
|
5290
|
+
* would still need to coordinate `selected` and supply `role="tablist"` manually, same as
|
|
5291
|
+
* `bs-tab.mdx`/`bs-radio.mdx` document for their own components. See `bs-inline-tab.mdx`'s
|
|
5292
|
+
* Accessibility section for the full requirement, including `role="tabpanel"` on the corresponding
|
|
5293
|
+
* content panels.
|
|
5294
|
+
*/
|
|
5295
|
+
"bs-inline-tab": LocalJSX.IntrinsicElements["bs-inline-tab"] & JSXBase.HTMLAttributes<HTMLBsInlineTabElement>;
|
|
3689
5296
|
/**
|
|
3690
5297
|
* A single-line text field with an optional label, description, and error state. Also covers a
|
|
3691
5298
|
* range of related "field" shapes (number stepper, password reveal, date, dropdown trigger,
|
|
@@ -3703,6 +5310,31 @@ declare module "@stencil/core" {
|
|
|
3703
5310
|
* options list at all (freeform chip entry).
|
|
3704
5311
|
*/
|
|
3705
5312
|
"bs-input": LocalJSX.IntrinsicElements["bs-input"] & JSXBase.HTMLAttributes<HTMLBsInputElement>;
|
|
5313
|
+
/**
|
|
5314
|
+
* The BrandSync brand mark, as its own standalone component -- shared by `bs-navigation-header`
|
|
5315
|
+
* and `bs-navigation-drawer`, which used to each render their own duplicated copy of this SVG
|
|
5316
|
+
* (the drawer's collapsed state even faked an icon-only look by clipping the full wordmark asset
|
|
5317
|
+
* down to a narrowed box, rather than using a real icon-only asset).
|
|
5318
|
+
* ## When to use
|
|
5319
|
+
* - Anywhere the BrandSync logo/icon needs to render: a navigation header, a nav drawer, etc.
|
|
5320
|
+
* ## When not to use
|
|
5321
|
+
* - The Genie AI chat panel's own brand mark -- that's a different logo (`bs-chatbot-header`'s
|
|
5322
|
+
* own inline Genie asset), not this one.
|
|
5323
|
+
* `variant` mirrors Figma's "Logo" component set (node 10909:30421) `Device` property
|
|
5324
|
+
* ("Desktop" / "Tab and mobile"), which was originally meant to distinguish the full lockup from
|
|
5325
|
+
* the icon-only mark at different responsive breakpoints -- renamed here to
|
|
5326
|
+
* `variant: 'full' | 'mark'` since that's what it actually controls (how much of the logo
|
|
5327
|
+
* renders), not literally a device/breakpoint switch.
|
|
5328
|
+
* `variant="custom"` is not a Figma variant at all -- it's an escape hatch for a consuming app
|
|
5329
|
+
* that needs to show a DIFFERENT product's logo in the same slot (e.g. a white-labeled deployment,
|
|
5330
|
+
* or a logo fetched at runtime from a service like brand.dev), via `src`/`alt`, instead of the
|
|
5331
|
+
* built-in BrandSync assets. This component deliberately does NOT fetch that image itself --
|
|
5332
|
+
* network calls, loading/error states, and caching are the consuming app's responsibility, same as
|
|
5333
|
+
* every other component in this library (e.g. `bs-attachment` takes `imageSrc` rather than fetching
|
|
5334
|
+
* an image on its own). `background` has no effect on `variant="custom"` -- a consumer's own image
|
|
5335
|
+
* is already designed for whatever surface it's placed on.
|
|
5336
|
+
*/
|
|
5337
|
+
"bs-logo": LocalJSX.IntrinsicElements["bs-logo"] & JSXBase.HTMLAttributes<HTMLBsLogoElement>;
|
|
3706
5338
|
/**
|
|
3707
5339
|
* A generic dropdown/popup menu container: a rounded, elevated list of items (typically
|
|
3708
5340
|
* `bs-menu-item` elements).
|
|
@@ -3754,6 +5386,115 @@ declare module "@stencil/core" {
|
|
|
3754
5386
|
* modal that just gets taller and taller.
|
|
3755
5387
|
*/
|
|
3756
5388
|
"bs-modal": LocalJSX.IntrinsicElements["bs-modal"] & JSXBase.HTMLAttributes<HTMLBsModalElement>;
|
|
5389
|
+
/**
|
|
5390
|
+
* A left-side persistent navigation sidebar: the BrandSync logo, a "Main Menu" title with a
|
|
5391
|
+
* collapse toggle, a reserved slot for a search field, and a scrollable list of nav items.
|
|
5392
|
+
* ## When to use
|
|
5393
|
+
* - The primary in-app navigation, shown alongside `bs-navigation-header` (typically that
|
|
5394
|
+
* header's `with-navigation-drawer` alignment, which omits its own logo since this component
|
|
5395
|
+
* already renders one).
|
|
5396
|
+
* ## When not to use
|
|
5397
|
+
* - The top navigation bar itself -- use `bs-navigation-header` instead.
|
|
5398
|
+
* This component renders a real `<nav>` landmark (no explicit `role` needed -- `<nav>` already
|
|
5399
|
+
* carries the implicit `navigation` role), labeled via `aria-label={heading}` so the landmark
|
|
5400
|
+
* still has a name even when collapsed (see below).
|
|
5401
|
+
* `collapsed` narrows the drawer to a 96px icon-only rail, per Figma node 8028:135374
|
|
5402
|
+
* ("Type=Collapsed"): the title text disappears, the logo swaps from the full "EG BrandSync"
|
|
5403
|
+
* wordmark (`bs-logo variant="full"`) to the real icon-only mark (`bs-logo variant="mark"` -- a
|
|
5404
|
+
* second, properly-designed asset, not a CSS crop of the full one) via CSS visibility toggling on
|
|
5405
|
+
* both, the same `:host([collapsed])` attribute-selector pattern already used for the
|
|
5406
|
+
* `search`/`search-trigger` swap below, the `search` slot is replaced by a compact built-in
|
|
5407
|
+
* search-trigger button (this component can't meaningfully shrink arbitrary slotted search-field
|
|
5408
|
+
* content down to icon size itself, so it emits `bsSearchClick` instead -- e.g. to open a full
|
|
5409
|
+
* search overlay), and every top-level
|
|
5410
|
+
* `bs-navigation-drawer-item`'s layout switches from icon-beside-label to icon-above-caption.
|
|
5411
|
+
* That last part is real prop propagation, not a CSS trick: this component keeps each direct-child
|
|
5412
|
+
* item's own `collapsed` prop in sync with its own (see `syncItemsCollapsed` below), the same
|
|
5413
|
+
* direct-children-prop-sync approach `bs-tabs` already uses for coordinating `selected` across its
|
|
5414
|
+
* `bs-tab` children. Clicking the toggle self-toggles `collapsed` (simple local UI state, not
|
|
5415
|
+
* something needing cross-component coordination -- closer to `bs-switch`'s self-toggling
|
|
5416
|
+
* `checked` than `bs-tab`'s non-self-toggling `selected`) and emits `bsCollapse` with the new
|
|
5417
|
+
* value. The toggle's own caret icon does NOT rotate when collapsed -- Figma's collapsed mock
|
|
5418
|
+
* reuses the identical left-pointing "CaretLeft" asset unchanged, confirmed by directly inspecting
|
|
5419
|
+
* that state, so this deliberately does not add the same "flip on toggle" idiom the drawer item's
|
|
5420
|
+
* own disclosure chevron does (that one really is an unconfirmed addition; this one was checked).
|
|
5421
|
+
*/
|
|
5422
|
+
"bs-navigation-drawer": LocalJSX.IntrinsicElements["bs-navigation-drawer"] & JSXBase.HTMLAttributes<HTMLBsNavigationDrawerElement>;
|
|
5423
|
+
/**
|
|
5424
|
+
* A single row within a `bs-navigation-drawer`'s item list -- either a plain leaf nav item, or an
|
|
5425
|
+
* `expandable` group header that discloses nested `bs-navigation-drawer-item` children.
|
|
5426
|
+
* ## When to use
|
|
5427
|
+
* - Every row inside a `bs-navigation-drawer`'s default slot.
|
|
5428
|
+
* ## When not to use
|
|
5429
|
+
* - A standalone action outside a navigation drawer -- use `bs-button`/`bs-menu-item` instead.
|
|
5430
|
+
* Click behavior is mutually exclusive, based on `expandable`:
|
|
5431
|
+
* - `expandable = false` (a plain leaf item): clicking only emits `bsSelect`. `selected` is NOT
|
|
5432
|
+
* self-toggling -- same non-self-toggling precedent as `bs-tab`'s `selected` (see `bs-tab.tsx`'s
|
|
5433
|
+
* class doc): coordinating which sibling row is selected needs cross-item state a
|
|
5434
|
+
* consumer/wrapper owns, not something this component can reason about on its own.
|
|
5435
|
+
* - `expandable = true` (a group header, never shown with a `selected` tint): clicking toggles
|
|
5436
|
+
* `this.expanded` directly and emits `bsToggle` with the new value, and does NOT emit
|
|
5437
|
+
* `bsSelect`. This IS self-toggling, unlike `selected` above -- it's simple local disclosure
|
|
5438
|
+
* state with no cross-item coordination needed, closer to `bs-switch`'s self-toggling `checked`
|
|
5439
|
+
* than `bs-tab`'s non-self-toggling `selected`.
|
|
5440
|
+
* Nesting: put child `<bs-navigation-drawer-item nested>` elements inside a parent
|
|
5441
|
+
* `<bs-navigation-drawer-item expandable>` with `slot="children"`. The parent shows/hides that
|
|
5442
|
+
* slot's content based on its own `expanded` prop, via a pure-CSS attribute selector (no JS
|
|
5443
|
+
* visibility toggling needed, since `expanded` is reflected).
|
|
5444
|
+
* `collapsed` switches this row from its normal icon-beside-label row layout to a compact
|
|
5445
|
+
* icon-above-caption column (per Figma node 8028:135374, the drawer's "Type=Collapsed" state) --
|
|
5446
|
+
* you don't need to set this yourself on every item: a parent `bs-navigation-drawer` keeps its own
|
|
5447
|
+
* top-level items' `collapsed` prop in sync with its own `collapsed` state automatically (see
|
|
5448
|
+
* `bs-navigation-drawer.tsx`'s `syncItemsCollapsed`, the same direct-children-prop-sync approach
|
|
5449
|
+
* `bs-tabs` uses for coordinating `selected` across its own `bs-tab` children). It's still a public
|
|
5450
|
+
* prop so a standalone item (or this component's own stories) can be demoed without the parent.
|
|
5451
|
+
*/
|
|
5452
|
+
"bs-navigation-drawer-item": LocalJSX.IntrinsicElements["bs-navigation-drawer-item"] & JSXBase.HTMLAttributes<HTMLBsNavigationDrawerItemElement>;
|
|
5453
|
+
/**
|
|
5454
|
+
* The top-level navigation bar for a page: the BrandSync logo plus two consumer-provided slots
|
|
5455
|
+
* for menu/action content (e.g. `bs-button`/`bs-icon-button` elements).
|
|
5456
|
+
* ## When to use
|
|
5457
|
+
* - The persistent top bar of an application, above the page content.
|
|
5458
|
+
* ## When not to use
|
|
5459
|
+
* - The header of a Genie AI chat panel -- use `bs-chatbot-header` instead, which is purpose-built
|
|
5460
|
+
* for that narrower layout and its own fixed action buttons.
|
|
5461
|
+
* `alignment` controls both whether the logo renders and how the two slots are laid out:
|
|
5462
|
+
* - `default` (default): logo on the left, `left` slot content immediately after it, `right` slot
|
|
5463
|
+
* content pushed to the far right.
|
|
5464
|
+
* - `center`: logo and `right` slot both grow equally (`flex: 1`), which centers the `left` slot
|
|
5465
|
+
* content in the middle of the bar.
|
|
5466
|
+
* - `with-navigation-drawer`: no logo at all (this variant assumes a nav-drawer toggle is the
|
|
5467
|
+
* leftmost thing on the page instead) -- `left` slot content starts at the bar's own left edge,
|
|
5468
|
+
* `right` slot content pushed to the far right.
|
|
5469
|
+
*/
|
|
5470
|
+
"bs-navigation-header": LocalJSX.IntrinsicElements["bs-navigation-header"] & JSXBase.HTMLAttributes<HTMLBsNavigationHeaderElement>;
|
|
5471
|
+
/**
|
|
5472
|
+
* A single radio button with its label, for one mutually-exclusive choice within a group.
|
|
5473
|
+
* ## When to use
|
|
5474
|
+
* - One option within a set of mutually-exclusive choices, where all options should stay visible
|
|
5475
|
+
* (a radio group).
|
|
5476
|
+
* ## When not to use
|
|
5477
|
+
* - An independent, non-exclusive binary choice, or one item in a set of independent choices --
|
|
5478
|
+
* use `bs-checkbox` instead.
|
|
5479
|
+
* - An on/off setting that takes effect immediately (no explicit form submission) -- use `bs-switch`.
|
|
5480
|
+
*/
|
|
5481
|
+
"bs-radio": LocalJSX.IntrinsicElements["bs-radio"] & JSXBase.HTMLAttributes<HTMLBsRadioElement>;
|
|
5482
|
+
/**
|
|
5483
|
+
* A slider for picking a single numeric value (`type="default"`), a value snapped to evenly
|
|
5484
|
+
* spaced ticks (`type="segmented"`), or a min/max pair (`type="range"`) from within a bounded
|
|
5485
|
+
* `min`/`max` range.
|
|
5486
|
+
* ## When to use
|
|
5487
|
+
* - A numeric value that's easiest to reason about relative to its bounds (volume, brightness,
|
|
5488
|
+
* a price range) rather than typed digit-by-digit.
|
|
5489
|
+
* - `type="segmented"` when only a fixed number of discrete stops make sense (e.g. a 5-star
|
|
5490
|
+
* rating-like scale) but a visual track is still preferable to discrete buttons.
|
|
5491
|
+
* - `type="range"` for picking a min/max pair (e.g. a price range filter) with two thumbs.
|
|
5492
|
+
* ## When not to use
|
|
5493
|
+
* - A precise value where mis-dragging by a pixel matters more than the at-a-glance bounds --
|
|
5494
|
+
* use `bs-input[type="number"]` instead.
|
|
5495
|
+
* - A small, fixed set of mutually exclusive choices -- use a radio group instead.
|
|
5496
|
+
*/
|
|
5497
|
+
"bs-slider": LocalJSX.IntrinsicElements["bs-slider"] & JSXBase.HTMLAttributes<HTMLBsSliderElement>;
|
|
3757
5498
|
/**
|
|
3758
5499
|
* A single citation row inside `bs-chatbot-sources-drawer` -- a file icon + filename on the first
|
|
3759
5500
|
* line, the originating system and version on the second, and a trailing "open" arrow.
|
|
@@ -3780,6 +5521,54 @@ declare module "@stencil/core" {
|
|
|
3780
5521
|
* `--bs-text-secondary`.
|
|
3781
5522
|
*/
|
|
3782
5523
|
"bs-source-link": LocalJSX.IntrinsicElements["bs-source-link"] & JSXBase.HTMLAttributes<HTMLBsSourceLinkElement>;
|
|
5524
|
+
/**
|
|
5525
|
+
* A toggle switch for an on/off setting that takes effect immediately (no explicit form
|
|
5526
|
+
* submission required).
|
|
5527
|
+
* ## When to use
|
|
5528
|
+
* - A binary setting that applies right away (e.g. "Enable notifications", "Dark mode").
|
|
5529
|
+
* ## When not to use
|
|
5530
|
+
* - A binary choice that's part of a form submitted later, or one item within a group of
|
|
5531
|
+
* independent choices -- use `bs-checkbox` instead.
|
|
5532
|
+
* - A single mutually-exclusive choice from a set -- use a radio group instead.
|
|
5533
|
+
*/
|
|
5534
|
+
"bs-switch": LocalJSX.IntrinsicElements["bs-switch"] & JSXBase.HTMLAttributes<HTMLBsSwitchElement>;
|
|
5535
|
+
/**
|
|
5536
|
+
* A single tab button -- an optional icon plus a text label, rendered as a real `<button>` so it
|
|
5537
|
+
* participates correctly in tab order and native click/keyboard activation.
|
|
5538
|
+
* ## When to use
|
|
5539
|
+
* - As one button within a tab bar, where exactly one tab is selected/active at a time.
|
|
5540
|
+
* ## When not to use
|
|
5541
|
+
* - As a standalone action button -- use `bs-button` instead, `bs-tab`'s visual language (muted
|
|
5542
|
+
* until selected/hovered, underline indicator) only makes sense as part of a set.
|
|
5543
|
+
* `selected` is NOT self-toggling -- clicking a `bs-tab` only emits `bsSelect`, it does not set its
|
|
5544
|
+
* own `selected` prop, and it does not unselect any sibling tabs. Wrap your `<bs-tab>` elements in
|
|
5545
|
+
* `<bs-tabs type="bs-tab">` -- it owns `role="tablist"` and coordinates selection (listening for
|
|
5546
|
+
* `bsSelect` and setting `selected`/`false` across siblings) for you. Using `bs-tab` standalone,
|
|
5547
|
+
* outside a `<bs-tabs>` wrapper, still means `selected` doesn't self-toggle and `role="tablist"`
|
|
5548
|
+
* isn't provided automatically -- a consumer doing that would still need to coordinate `selected`
|
|
5549
|
+
* and supply `role="tablist"` manually, same as `bs-radio.mdx` documents for `bs-radio`'s missing
|
|
5550
|
+
* `bs-radio-group`. See `bs-tab.mdx`'s Accessibility section for the full requirement, including
|
|
5551
|
+
* `role="tabpanel"` on the corresponding content panels.
|
|
5552
|
+
*/
|
|
5553
|
+
"bs-tab": LocalJSX.IntrinsicElements["bs-tab"] & JSXBase.HTMLAttributes<HTMLBsTabElement>;
|
|
5554
|
+
/**
|
|
5555
|
+
* A tab-group wrapper: owns `role="tablist"` and coordinates selection across its slotted
|
|
5556
|
+
* `<bs-tab>` or `<bs-inline-tab>` children, so consumers no longer have to hand-roll this.
|
|
5557
|
+
* `bs-tab.mdx`/`bs-inline-tab.mdx` previously documented this coordination -- listening for
|
|
5558
|
+
* `bsSelect` and setting `selected`/`false` on siblings, plus supplying `role="tablist"` on
|
|
5559
|
+
* whatever element groups the tabs -- as a "Known gap"/manual consumer responsibility. This
|
|
5560
|
+
* component is that wrapper: it renders the `role="tablist"` element and listens for `bsSelect`
|
|
5561
|
+
* itself. Using `<bs-tab>`/`<bs-inline-tab>` standalone, outside a `<bs-tabs>` wrapper, still means
|
|
5562
|
+
* `selected` doesn't self-toggle -- a consumer doing that would still need to coordinate `selected`
|
|
5563
|
+
* manually -- but that's no longer the first recommended path.
|
|
5564
|
+
* ## When to use
|
|
5565
|
+
* - Wrapping a set of `<bs-tab>` (underline style) or `<bs-inline-tab>` (pill style) elements that
|
|
5566
|
+
* should behave as a single-selection tab bar.
|
|
5567
|
+
* ## When not to use
|
|
5568
|
+
* - For a single, standalone tab button not participating in a group -- use `bs-tab`/`bs-inline-tab`
|
|
5569
|
+
* directly.
|
|
5570
|
+
*/
|
|
5571
|
+
"bs-tabs": LocalJSX.IntrinsicElements["bs-tabs"] & JSXBase.HTMLAttributes<HTMLBsTabsElement>;
|
|
3783
5572
|
/**
|
|
3784
5573
|
* A dark tooltip bubble with a pointer arrow, used to surface a short hint of extra information
|
|
3785
5574
|
* next to a trigger element.
|