@brandsync/wc 0.0.12 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1672 -226
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-00bb9bda.entry.js +1 -0
- package/dist/brandsync-wc/{p-64e2a7d7.entry.js → p-0847f5c0.entry.js} +1 -1
- package/dist/brandsync-wc/p-0ba35c3b.entry.js +1 -0
- package/dist/brandsync-wc/{p-2a65aabb.entry.js → p-0f3cb0c4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-72a33f88.entry.js → p-10f6f3cd.entry.js} +1 -1
- package/dist/brandsync-wc/{p-88a0abee.entry.js → p-111974df.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ef8522b5.entry.js → p-11f3fceb.entry.js} +1 -1
- package/dist/brandsync-wc/p-171fed0c.entry.js +1 -0
- package/dist/brandsync-wc/{p-57fdbb76.entry.js → p-18813680.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f04db1b0.entry.js → p-1b7c9928.entry.js} +1 -1
- package/dist/brandsync-wc/p-1ce7dd64.entry.js +1 -0
- package/dist/brandsync-wc/p-2063a6d6.entry.js +1 -0
- package/dist/brandsync-wc/{p-1900f6ce.entry.js → p-20c24179.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6e854e92.entry.js → p-321ed4d3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0eee5477.entry.js → p-38aad266.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1c6fa697.entry.js → p-43e37883.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8049f9f2.entry.js → p-55a8d4b5.entry.js} +1 -1
- package/dist/brandsync-wc/p-59ac2495.entry.js +1 -0
- package/dist/brandsync-wc/p-5ae9e60e.entry.js +1 -0
- package/dist/brandsync-wc/{p-8b662ee3.entry.js → p-6b469b2d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-56c66448.entry.js → p-6d85fba4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-46ddc8e1.entry.js → p-6e95eb36.entry.js} +1 -1
- package/dist/brandsync-wc/{p-20dbc6a1.entry.js → p-73217b90.entry.js} +1 -1
- package/dist/brandsync-wc/p-752c04c8.entry.js +1 -0
- package/dist/brandsync-wc/{p-12ec9e92.entry.js → p-79af762c.entry.js} +1 -1
- package/dist/brandsync-wc/p-81d49240.entry.js +1 -0
- package/dist/brandsync-wc/{p-3b31f7c7.entry.js → p-91551e7b.entry.js} +1 -1
- package/dist/brandsync-wc/p-917a5bbc.entry.js +1 -0
- package/dist/brandsync-wc/{p-dd09d335.entry.js → p-9876e83c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c320b6b4.entry.js → p-9bcd99aa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d4e3ca77.entry.js → p-9c4768aa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-DST5-cTx.js → p-Do3l4of3.js} +2 -2
- package/dist/brandsync-wc/{p-0fa017ce.entry.js → p-aa43d478.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a5b15061.entry.js → p-c3079ad7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-23457a21.entry.js → p-c3c383dc.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b24a980b.entry.js → p-cc79e75f.entry.js} +1 -1
- package/dist/brandsync-wc/p-ce7fc368.entry.js +1 -0
- package/dist/brandsync-wc/{p-2c51d738.entry.js → p-d3265e70.entry.js} +1 -1
- package/dist/brandsync-wc/p-d55bbcec.entry.js +1 -0
- package/dist/brandsync-wc/{p-1adc59be.entry.js → p-e93e944b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-aba300a9.entry.js → p-eb04c578.entry.js} +1 -1
- package/dist/brandsync-wc/p-f0ae2740.entry.js +1 -0
- package/dist/brandsync-wc/p-f4f22015.entry.js +1 -0
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +2 -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 +1 -1
- package/dist/cjs/bs-avatar.cjs.entry.js +60 -0
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +56 -0
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +33 -0
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +49 -0
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/bs-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-card.cjs.entry.js +10 -3
- 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-skeleton.cjs.entry.js +20 -0
- package/dist/cjs/bs-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +2 -2
- package/dist/cjs/bs-composer.cjs.entry.js +2 -2
- package/dist/cjs/bs-data-table.cjs.entry.js +3 -3
- package/dist/cjs/bs-dialog.cjs.entry.js +110 -0
- package/dist/cjs/bs-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/bs-input.cjs.entry.js +24 -12
- package/dist/cjs/bs-logo.cjs.entry.js +1 -1
- package/dist/cjs/{bs-menu_2.cjs.entry.js → bs-menu-item.cjs.entry.js} +2 -15
- package/dist/cjs/bs-menu.cjs.entry.js +17 -0
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +3 -3
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +8 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-pagination.cjs.entry.js +85 -0
- package/dist/cjs/bs-radio.cjs.entry.js +2 -2
- package/dist/cjs/bs-slider.cjs.entry.js +2 -2
- package/dist/cjs/bs-snackbar.cjs.entry.js +41 -0
- package/dist/cjs/bs-source-link.cjs.entry.js +3 -3
- package/dist/cjs/bs-switch.cjs.entry.js +2 -2
- package/dist/cjs/bs-tab.cjs.entry.js +2 -2
- package/dist/cjs/bs-tabs.cjs.entry.js +2 -2
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{index-B3sdhEGk.js → index-DHVw-IPK.js} +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -1
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +1 -1
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +1 -1
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-avatar/bs-avatar.cmp.test.js +54 -0
- package/dist/collection/components/bs-avatar/bs-avatar.css +197 -0
- package/dist/collection/components/bs-avatar/bs-avatar.js +251 -0
- package/dist/collection/components/bs-avatar/bs-avatar.stories.js +67 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.js +62 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.css +93 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +130 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.js +118 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.css +125 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +192 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.cmp.test.js +58 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.css +18 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +129 -0
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.stories.js +84 -0
- package/dist/collection/components/bs-button/bs-button/bs-button.js +1 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.cmp.test.js +19 -0
- package/dist/collection/components/bs-card/bs-card.css +37 -5
- package/dist/collection/components/bs-card/bs-card.js +18 -2
- package/dist/collection/components/bs-card/bs-card.stories.js +17 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.css +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.cmp.test.js +23 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.css +64 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +81 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.stories.js +25 -0
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.stories.js +12 -0
- package/dist/collection/components/bs-composer/bs-composer.js +1 -1
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +1 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/{bs-modal/bs-modal.cmp.test.js → bs-dialog/bs-dialog.cmp.test.js} +63 -19
- package/dist/collection/components/bs-dialog/bs-dialog.css +130 -0
- package/dist/collection/components/bs-dialog/bs-dialog.js +273 -0
- package/dist/collection/components/bs-dialog/bs-dialog.stories.js +115 -0
- package/dist/collection/components/bs-input/bs-input.cmp.test.js +20 -0
- package/dist/collection/components/bs-input/bs-input.css +80 -2
- package/dist/collection/components/bs-input/bs-input.js +28 -10
- package/dist/collection/components/bs-input/bs-input.stories.js +14 -11
- 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-pagination/bs-pagination.cmp.test.js +102 -0
- package/dist/collection/components/bs-pagination/bs-pagination.css +120 -0
- package/dist/collection/components/bs-pagination/bs-pagination.js +233 -0
- package/dist/collection/components/bs-pagination/bs-pagination.stories.js +43 -0
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.cmp.test.js +77 -0
- package/dist/collection/components/bs-snackbar/bs-snackbar.css +321 -0
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +172 -0
- package/dist/collection/components/bs-snackbar/bs-snackbar.stories.js +59 -0
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.cmp.test.js +12 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +34 -6
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.js +74 -2
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.css +5 -5
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.js +258 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/{bs-modal.d.ts → bs-avatar.d.ts} +4 -4
- package/dist/components/bs-avatar.js +1 -0
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.d.ts +11 -0
- package/dist/components/bs-breadcrumb-overflow.js +1 -0
- package/dist/components/bs-breadcrumb.d.ts +11 -0
- package/dist/components/bs-breadcrumb.js +1 -0
- package/dist/components/bs-breadcrumbs.d.ts +11 -0
- package/dist/components/bs-breadcrumbs.js +1 -0
- 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-skeleton.d.ts +11 -0
- package/dist/components/bs-checkbox-skeleton.js +1 -0
- 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-dialog.d.ts +11 -0
- package/dist/components/bs-dialog.js +1 -0
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-logo.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-pagination.d.ts +11 -0
- package/dist/components/bs-pagination.js +1 -0
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.d.ts +11 -0
- package/dist/components/bs-snackbar.js +1 -0
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BAOJc0V0.js → p-BFcVSpES.js} +1 -1
- package/dist/components/{p-Be1Pfcnm.js → p-BJZYe7M4.js} +1 -1
- package/dist/components/{p-CaWqTQBZ.js → p-BKaZWFE1.js} +1 -1
- package/dist/components/{p-DivZLd6i.js → p-BtX5URLk.js} +1 -1
- package/dist/components/{p-BqYyMGrB.js → p-CgaPcyEJ.js} +1 -1
- package/dist/components/{p-xfx69LQx.js → p-qK1XlpTA.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-ai-disclaimer.entry.js +2 -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 +1 -1
- package/dist/esm/bs-avatar.entry.js +58 -0
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +54 -0
- package/dist/esm/bs-breadcrumb.entry.js +31 -0
- package/dist/esm/bs-breadcrumbs.entry.js +47 -0
- package/dist/esm/bs-button-skeleton.entry.js +2 -2
- package/dist/esm/bs-button.entry.js +2 -2
- package/dist/esm/bs-card.entry.js +10 -3
- 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-skeleton.entry.js +18 -0
- package/dist/esm/bs-checkbox.entry.js +2 -2
- package/dist/esm/bs-composer-status-banner.entry.js +2 -2
- package/dist/esm/bs-composer.entry.js +2 -2
- package/dist/esm/bs-data-table.entry.js +3 -3
- package/dist/esm/bs-dialog.entry.js +108 -0
- package/dist/esm/bs-icon-button.entry.js +2 -2
- package/dist/esm/bs-inline-tab.entry.js +2 -2
- package/dist/esm/bs-input.entry.js +24 -12
- package/dist/esm/bs-logo.entry.js +1 -1
- package/dist/esm/{bs-menu_2.entry.js → bs-menu-item.entry.js} +3 -15
- package/dist/esm/bs-menu.entry.js +15 -0
- package/dist/esm/bs-navigation-drawer-item.entry.js +3 -3
- package/dist/esm/bs-navigation-drawer.entry.js +8 -2
- package/dist/esm/bs-navigation-header.entry.js +2 -2
- package/dist/esm/bs-pagination.entry.js +83 -0
- package/dist/esm/bs-radio.entry.js +2 -2
- package/dist/esm/bs-slider.entry.js +2 -2
- package/dist/esm/bs-snackbar.entry.js +39 -0
- package/dist/esm/bs-source-link.entry.js +3 -3
- package/dist/esm/bs-switch.entry.js +2 -2
- package/dist/esm/bs-tab.entry.js +2 -2
- package/dist/esm/bs-tabs.entry.js +2 -2
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/{index-DST5-cTx.js → index-Do3l4of3.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-avatar/bs-avatar.d.ts +67 -0
- package/dist/types/components/bs-avatar/bs-avatar.stories.d.ts +20 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.d.ts +44 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.d.ts +69 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.d.ts +45 -0
- package/dist/types/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.stories.d.ts +14 -0
- package/dist/types/components/bs-card/bs-card.d.ts +10 -1
- package/dist/types/components/bs-card/bs-card.stories.d.ts +1 -0
- package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.d.ts +36 -0
- package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.stories.d.ts +10 -0
- package/dist/types/components/bs-checkbox/bs-checkbox.stories.d.ts +1 -0
- package/dist/types/components/bs-dialog/bs-dialog.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-dialog/bs-dialog.d.ts +74 -0
- package/dist/types/components/{bs-modal/bs-modal.stories.d.ts → bs-dialog/bs-dialog.stories.d.ts} +5 -3
- package/dist/types/components/bs-input/bs-input.d.ts +8 -1
- package/dist/types/components/bs-pagination/bs-pagination.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-pagination/bs-pagination.d.ts +51 -0
- package/dist/types/components/bs-pagination/bs-pagination.stories.d.ts +14 -0
- package/dist/types/components/bs-snackbar/bs-snackbar.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-snackbar/bs-snackbar.d.ts +51 -0
- package/dist/types/components/bs-snackbar/bs-snackbar.stories.d.ts +16 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +13 -5
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.stories.d.ts +3 -0
- package/dist/types/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.stories.d.ts +4 -0
- package/dist/types/components.d.ts +1109 -104
- package/package.json +1 -1
- package/dist/brandsync-wc/p-09aa03d1.entry.js +0 -1
- package/dist/brandsync-wc/p-1cf715aa.entry.js +0 -1
- package/dist/brandsync-wc/p-266f5dde.entry.js +0 -1
- package/dist/brandsync-wc/p-8ded1eb6.entry.js +0 -1
- package/dist/brandsync-wc/p-b289450a.entry.js +0 -1
- package/dist/brandsync-wc/p-b8a2f882.entry.js +0 -1
- package/dist/cjs/bs-modal.cjs.entry.js +0 -69
- package/dist/collection/components/bs-modal/bs-modal.css +0 -66
- package/dist/collection/components/bs-modal/bs-modal.js +0 -198
- package/dist/collection/components/bs-modal/bs-modal.stories.js +0 -38
- package/dist/components/bs-modal.js +0 -1
- package/dist/esm/bs-modal.entry.js +0 -67
- package/dist/types/components/bs-modal/bs-modal.d.ts +0 -45
- /package/dist/types/components/{bs-modal/bs-modal.cmp.test.d.ts → bs-avatar/bs-avatar.cmp.test.d.ts} +0 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-avatar-size-xs: Width/height at size="xs". 24px, matching Figma's own six-step scale.
|
|
3
|
+
* @prop --bs-avatar-size-sm: Width/height at size="sm". 32px.
|
|
4
|
+
* @prop --bs-avatar-size-md: Width/height at size="md". 44px.
|
|
5
|
+
* @prop --bs-avatar-size-lg: Width/height at size="lg". 64px.
|
|
6
|
+
* @prop --bs-avatar-size-xl: Width/height at size="xl". 96px.
|
|
7
|
+
* @prop --bs-avatar-size-xxl: Width/height at size="xxl". 128px.
|
|
8
|
+
* @prop --bs-avatar-radius: Corner radius -- always a full circle regardless of size. Aliased to
|
|
9
|
+
* --bs-border-radius-full.
|
|
10
|
+
* @prop --bs-avatar-border-width: Border width at every size except xxl. Aliased to
|
|
11
|
+
* --bs-border-width-thin (1px).
|
|
12
|
+
* @prop --bs-avatar-border-width-xxl: Border width at size="xxl" specifically -- Figma specs this
|
|
13
|
+
* one size a hair thicker (1.333px) than the other five, not a rounding artifact.
|
|
14
|
+
* @prop --bs-avatar-bg-dafault: Background, resting. Aliased to --bs-surface-raised. Named
|
|
15
|
+
* "dafault" (not a typo introduced here) -- this is this library's own vendored
|
|
16
|
+
* brandsync-tokens token verbatim; see CLAUDE.md's note on pre-existing malformed vendored
|
|
17
|
+
* token names.
|
|
18
|
+
* @prop --bs-avatar-bg-hover: Background on hover. Aliased to --bs-surface-raised -- identical to
|
|
19
|
+
* the resting value; only the border recolors on hover (see below).
|
|
20
|
+
* @prop --bs-avatar-bg-pressed: Background while pressed. Aliased to --bs-surface-raised, same
|
|
21
|
+
* reasoning as hover.
|
|
22
|
+
* @prop --bs-avatar-bg-focused: Background while focused. Aliased to --bs-surface-raised, same
|
|
23
|
+
* reasoning as hover.
|
|
24
|
+
* @prop --bs-avatar-border-primary: Border color, resting. Aliased to
|
|
25
|
+
* --bs-border-neutral-container.
|
|
26
|
+
* @prop --bs-avatar-border-hover: Border color on hover. Aliased to
|
|
27
|
+
* --bs-border-neutral-container-hover.
|
|
28
|
+
* @prop --bs-avatar-border-pressed: Border color while pressed. Aliased to
|
|
29
|
+
* --bs-border-neutral-container-pressed.
|
|
30
|
+
* @prop --bs-avatar-border-focused: Border color while focused -- Figma keeps this identical to
|
|
31
|
+
* the resting --bs-avatar-border-primary; the focus ring (--bs-avatar-border-focus below) is a
|
|
32
|
+
* separate, additional ring, not a border recolor.
|
|
33
|
+
* @prop --bs-avatar-border-focus: Focus ring color -- a separate ring drawn just outside the
|
|
34
|
+
* avatar's own border, not the border's own color (see --bs-avatar-border-focused above).
|
|
35
|
+
* Aliased to --bs-border-neutral-focus.
|
|
36
|
+
* @prop --bs-avatar-icon-primary: Fallback user-icon color (type="icon"). Aliased to
|
|
37
|
+
* --bs-icon-muted.
|
|
38
|
+
* @prop --bs-avatar-text-default: Initials text color (type="initials"). Aliased to
|
|
39
|
+
* --bs-text-default.
|
|
40
|
+
*
|
|
41
|
+
* All of the --bs-avatar-* custom properties above are this library's existing vendored
|
|
42
|
+
* brandsync-tokens tokens (see tokens.css), not new ones invented for this component --
|
|
43
|
+
* brandsync-tokens already ships a full avatar-specific token set, referenced here directly
|
|
44
|
+
* rather than re-aliased through component-local names the way most other components in this
|
|
45
|
+
* library do, since there's nothing left to add a layer of indirection over.
|
|
46
|
+
*/
|
|
47
|
+
:host {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
vertical-align: middle;
|
|
50
|
+
|
|
51
|
+
--bs-avatar-size-xs: 24px;
|
|
52
|
+
--bs-avatar-size-sm: 32px;
|
|
53
|
+
--bs-avatar-size-md: 44px;
|
|
54
|
+
--bs-avatar-size-lg: 64px;
|
|
55
|
+
--bs-avatar-size-xl: 96px;
|
|
56
|
+
--bs-avatar-size-xxl: 128px;
|
|
57
|
+
|
|
58
|
+
--bs-avatar-radius: var(--bs-border-radius-full);
|
|
59
|
+
--bs-avatar-border-width: var(--bs-border-width-thin);
|
|
60
|
+
--bs-avatar-border-width-xxl: 1.333px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.bs-avatar {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
border-radius: var(--bs-avatar-radius);
|
|
70
|
+
border: var(--bs-avatar-border-width) solid var(--bs-avatar-border-primary);
|
|
71
|
+
background: var(--bs-avatar-bg-dafault);
|
|
72
|
+
flex-shrink: 0;
|
|
73
|
+
/* Prevents the initials text (or a stray click-drag anywhere in the circle) from highlighting
|
|
74
|
+
like ordinary selectable text -- this component is meant to read as a single glyph/photo, not
|
|
75
|
+
text content, especially once a consuming app makes it interactive (see the class doc in
|
|
76
|
+
bs-avatar.tsx). Same convention already used for bs-data-table's own clickable sort header. */
|
|
77
|
+
user-select: none;
|
|
78
|
+
-webkit-user-select: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.bs-avatar--xs {
|
|
82
|
+
width: var(--bs-avatar-size-xs);
|
|
83
|
+
height: var(--bs-avatar-size-xs);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.bs-avatar--sm {
|
|
87
|
+
width: var(--bs-avatar-size-sm);
|
|
88
|
+
height: var(--bs-avatar-size-sm);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.bs-avatar--md {
|
|
92
|
+
width: var(--bs-avatar-size-md);
|
|
93
|
+
height: var(--bs-avatar-size-md);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.bs-avatar--lg {
|
|
97
|
+
width: var(--bs-avatar-size-lg);
|
|
98
|
+
height: var(--bs-avatar-size-lg);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.bs-avatar--xl {
|
|
102
|
+
width: var(--bs-avatar-size-xl);
|
|
103
|
+
height: var(--bs-avatar-size-xl);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.bs-avatar--xxl {
|
|
107
|
+
width: var(--bs-avatar-size-xxl);
|
|
108
|
+
height: var(--bs-avatar-size-xxl);
|
|
109
|
+
border-width: var(--bs-avatar-border-width-xxl);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* type="image" */
|
|
113
|
+
.bs-avatar__image {
|
|
114
|
+
display: block;
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 100%;
|
|
117
|
+
object-fit: cover;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* type="icon" -- proportional to the container regardless of size, so one shared viewBox scales
|
|
121
|
+
cleanly across all six sizes without needing a per-size icon custom property. */
|
|
122
|
+
.bs-avatar__icon {
|
|
123
|
+
width: 60%;
|
|
124
|
+
height: 60%;
|
|
125
|
+
color: var(--bs-avatar-icon-primary);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* type="initials" -- font styling genuinely varies per size, not a simple linear scale (xs/sm
|
|
129
|
+
share one tier, lg sits between md and xl/xxl using a different font family/weight despite
|
|
130
|
+
matching md's font SIZE) -- matching Figma's own per-size type styles exactly rather than
|
|
131
|
+
interpolating a "cleaner" scale of our own. */
|
|
132
|
+
.bs-avatar__initials {
|
|
133
|
+
color: var(--bs-avatar-text-default);
|
|
134
|
+
font-family: var(--bs-typography-font-family-body);
|
|
135
|
+
font-weight: var(--bs-font-weight-medium);
|
|
136
|
+
text-align: center;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.bs-avatar--xs .bs-avatar__initials,
|
|
141
|
+
.bs-avatar--sm .bs-avatar__initials {
|
|
142
|
+
font-size: var(--bs-fontsize-caption-sm);
|
|
143
|
+
line-height: calc(var(--bs-line-height-caption-sm) * 1px);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.bs-avatar--md .bs-avatar__initials {
|
|
147
|
+
font-family: var(--bs-typography-font-family-heading);
|
|
148
|
+
font-weight: var(--bs-font-weight-bold);
|
|
149
|
+
font-size: var(--bs-fontsize-heading-h6);
|
|
150
|
+
line-height: calc(var(--bs-line-height-heading-h6) * 1px);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.bs-avatar--lg .bs-avatar__initials {
|
|
154
|
+
font-size: var(--bs-fontsize-body-md);
|
|
155
|
+
line-height: calc(var(--bs-line-height-body-md) * 1px);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.bs-avatar--xl .bs-avatar__initials,
|
|
159
|
+
.bs-avatar--xxl .bs-avatar__initials {
|
|
160
|
+
font-family: var(--bs-typography-font-family-heading);
|
|
161
|
+
font-weight: var(--bs-font-weight-bold);
|
|
162
|
+
font-size: var(--bs-fontsize-heading-h4);
|
|
163
|
+
line-height: calc(var(--bs-line-height-heading-h4) * 1px);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Interaction states -- real :hover/:focus-visible/:active on the HOST itself (not a wrapping
|
|
167
|
+
button this component doesn't render), so a consuming app gets this treatment for free just by
|
|
168
|
+
making the <bs-avatar> element itself interactive (a click handler + tabindex, or wrapping it in
|
|
169
|
+
their own <button>) -- see the class doc in bs-avatar.tsx for why. Guarded by :not([disabled])
|
|
170
|
+
so a disabled avatar never shows a hover/focus/pressed treatment even if a consumer's own
|
|
171
|
+
wrapping control still lets these pseudo-classes match. */
|
|
172
|
+
:host(:hover:not([disabled])) .bs-avatar {
|
|
173
|
+
background: var(--bs-avatar-bg-hover);
|
|
174
|
+
border-color: var(--bs-avatar-border-hover);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
:host(:active:not([disabled])) .bs-avatar {
|
|
178
|
+
background: var(--bs-avatar-bg-pressed);
|
|
179
|
+
border-color: var(--bs-avatar-border-pressed);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Focus keeps the resting border color (--bs-avatar-border-focused is identical to
|
|
183
|
+
--bs-avatar-border-primary in Figma) and adds a separate ring just outside it instead of
|
|
184
|
+
recoloring the border itself -- unlike hover/pressed above. */
|
|
185
|
+
:host(:focus-visible:not([disabled])) {
|
|
186
|
+
outline: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
:host(:focus-visible:not([disabled])) .bs-avatar {
|
|
190
|
+
background: var(--bs-avatar-bg-focused);
|
|
191
|
+
border-color: var(--bs-avatar-border-focused);
|
|
192
|
+
box-shadow: 0 0 0 3px var(--bs-avatar-border-focus);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:host([disabled]) {
|
|
196
|
+
opacity: 0.5;
|
|
197
|
+
}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A circular representation of a person or entity -- a photo, initials, or (as a fallback when
|
|
4
|
+
* neither is available) a generic user-silhouette icon.
|
|
5
|
+
*
|
|
6
|
+
* ## When to use
|
|
7
|
+
* - Representing a specific user or account: in a header, a comment, a member list, etc.
|
|
8
|
+
* - `type="initials"` when a photo isn't available but a name is (e.g. "Sam Lee" -> "SL").
|
|
9
|
+
* - `type="icon"` (the default) as the generic fallback when neither a photo nor a name/initials
|
|
10
|
+
* is available yet.
|
|
11
|
+
*
|
|
12
|
+
* ## When not to use
|
|
13
|
+
* - A company/brand logo -- use `bs-logo` instead.
|
|
14
|
+
*
|
|
15
|
+
* This component is decorative/informational by default, not an interactive control -- it renders
|
|
16
|
+
* a plain `<span>`/`<img>`, not a `<button>`. Figma's own component set includes hover/focused/
|
|
17
|
+
* pressed states (e.g. for an account-switcher trigger use case), which this implements as real
|
|
18
|
+
* `:hover`/`:focus-visible`/`:active` CSS on the host itself -- so wrapping this in your own
|
|
19
|
+
* `<button>`, or setting `tabindex` and a click handler on the `<bs-avatar>` element directly, gets
|
|
20
|
+
* the matching visual treatment for free with no extra wiring. Left genuinely non-interactive
|
|
21
|
+
* (no implicit role/tabindex of its own) so it doesn't misrepresent a purely decorative avatar
|
|
22
|
+
* (e.g. next to a comment) as a control when it isn't one.
|
|
23
|
+
*
|
|
24
|
+
* @part container - The circular wrapper (all three `type`s render this; `image` additionally
|
|
25
|
+
* wraps a real `<img>` inside it, since the border/background/radius treatment is identical
|
|
26
|
+
* across types and factoring it into one shared part keeps `::part(container)` overrides
|
|
27
|
+
* consistent regardless of which `type` ends up rendering).
|
|
28
|
+
* @part image - The `<img>` itself. Only rendered for `type="image"`.
|
|
29
|
+
* @part initials - The initials text. Only rendered for `type="initials"`.
|
|
30
|
+
* @part icon - The fallback user-silhouette icon. Only rendered for `type="icon"`.
|
|
31
|
+
*/
|
|
32
|
+
// Note: this component's CSS Custom Properties are documented via @prop comments in bs-avatar.css,
|
|
33
|
+
// not here -- see bs-navigation-header.css's identical note. Most of them are this library's
|
|
34
|
+
// existing vendored --bs-avatar-* tokens (see tokens.css), not new ones invented for this
|
|
35
|
+
// component -- brandsync-tokens already ships a full avatar-specific token set.
|
|
36
|
+
export class BsAvatar {
|
|
37
|
+
/** What to render inside the circle. `icon` (default) is the generic fallback for when neither
|
|
38
|
+
* a photo nor initials are available yet. */
|
|
39
|
+
type = 'icon';
|
|
40
|
+
/** Sizing scale -- `xs` (24px) through `xxl` (128px), matching Figma's own six-step scale. */
|
|
41
|
+
size = 'md';
|
|
42
|
+
/** `type="initials"` only: the initials text to display (e.g. `"SL"` for "Sam Lee"). Ignored
|
|
43
|
+
* for `icon`/`image`. */
|
|
44
|
+
initials = null;
|
|
45
|
+
/** `type="image"` only: the photo URL. This component does not fetch it itself -- network
|
|
46
|
+
* calls, loading/error states, and caching are the consuming app's responsibility, same
|
|
47
|
+
* convention as `bs-logo`'s own `src` prop. Ignored for `icon`/`initials`. */
|
|
48
|
+
src = null;
|
|
49
|
+
/** `type="image"` only: accessible alt text for the photo, set directly on the real `<img>`
|
|
50
|
+
* this renders -- a person's photo is meaningful content, not decorative, so pass something
|
|
51
|
+
* real (e.g. their name). Falls back to `alt=""` (decorative to assistive tech) when unset,
|
|
52
|
+
* rather than omitting the attribute entirely, but don't rely on that fallback. Ignored for
|
|
53
|
+
* `icon`/`initials` -- see `ariaLabel` for those instead. */
|
|
54
|
+
alt = null;
|
|
55
|
+
/** `type="icon"`/`"initials"` only: accessible name for the avatar, set as `aria-label` on the
|
|
56
|
+
* `role="img"` wrapper this renders (neither is a real `<img>`, so there's no native `alt` to
|
|
57
|
+
* set). Setting a plain `aria-label` attribute on the `<bs-avatar>` host does NOT work for this
|
|
58
|
+
* -- that attribute stays on the light-DOM host and never crosses into the shadow DOM, so the
|
|
59
|
+
* actual `role="img"` element stays nameless. Same pattern as `bs-checkbox`'s identical
|
|
60
|
+
* `ariaLabel` prop. Ignored for `image` -- see `alt` for that instead. */
|
|
61
|
+
ariaLabel = null;
|
|
62
|
+
/** Applies the disabled treatment (50% opacity) and suppresses the hover/focus/pressed CSS
|
|
63
|
+
* states -- this doesn't set a native `disabled` attribute (this component renders no native
|
|
64
|
+
* form control), it's purely a visual/interaction-state flag for when a consuming app has
|
|
65
|
+
* wrapped this in its own disabled control. Reflected so the `:host([disabled])` CSS selector
|
|
66
|
+
* that drives all of the above still matches when a consumer sets the JS property directly
|
|
67
|
+
* (`el.disabled = true`) rather than the HTML attribute. */
|
|
68
|
+
disabled = false;
|
|
69
|
+
render() {
|
|
70
|
+
const classes = `bs-avatar bs-avatar--${this.type} bs-avatar--${this.size}`;
|
|
71
|
+
if (this.type === 'image') {
|
|
72
|
+
return (h("span", { part: "container", class: classes }, h("img", { part: "image", class: "bs-avatar__image", src: this.src ?? undefined, alt: this.alt ?? '' })));
|
|
73
|
+
}
|
|
74
|
+
return (h("span", { part: "container", class: classes, role: "img", "aria-label": this.ariaLabel ?? undefined }, this.type === 'initials' ? (h("span", { part: "initials", class: "bs-avatar__initials" }, this.initials)) : (h(UserIcon, null))));
|
|
75
|
+
}
|
|
76
|
+
static get is() { return "bs-avatar"; }
|
|
77
|
+
static get encapsulation() { return "shadow"; }
|
|
78
|
+
static get originalStyleUrls() {
|
|
79
|
+
return {
|
|
80
|
+
"$": ["bs-avatar.css"]
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
static get styleUrls() {
|
|
84
|
+
return {
|
|
85
|
+
"$": ["bs-avatar.css"]
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
static get properties() {
|
|
89
|
+
return {
|
|
90
|
+
"type": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "BsAvatarType",
|
|
95
|
+
"resolved": "\"icon\" | \"image\" | \"initials\"",
|
|
96
|
+
"references": {
|
|
97
|
+
"BsAvatarType": {
|
|
98
|
+
"location": "local",
|
|
99
|
+
"path": "/Users/vivka/brandsync-web-components/src/components/bs-avatar/bs-avatar.tsx",
|
|
100
|
+
"id": "src/components/bs-avatar/bs-avatar.tsx::BsAvatarType"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": false,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "What to render inside the circle. `icon` (default) is the generic fallback for when neither\na photo nor initials are available yet."
|
|
109
|
+
},
|
|
110
|
+
"getter": false,
|
|
111
|
+
"setter": false,
|
|
112
|
+
"reflect": false,
|
|
113
|
+
"attribute": "type",
|
|
114
|
+
"defaultValue": "'icon'"
|
|
115
|
+
},
|
|
116
|
+
"size": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "BsAvatarSize",
|
|
121
|
+
"resolved": "\"lg\" | \"md\" | \"sm\" | \"xl\" | \"xs\" | \"xxl\"",
|
|
122
|
+
"references": {
|
|
123
|
+
"BsAvatarSize": {
|
|
124
|
+
"location": "local",
|
|
125
|
+
"path": "/Users/vivka/brandsync-web-components/src/components/bs-avatar/bs-avatar.tsx",
|
|
126
|
+
"id": "src/components/bs-avatar/bs-avatar.tsx::BsAvatarSize"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "Sizing scale -- `xs` (24px) through `xxl` (128px), matching Figma's own six-step scale."
|
|
135
|
+
},
|
|
136
|
+
"getter": false,
|
|
137
|
+
"setter": false,
|
|
138
|
+
"reflect": false,
|
|
139
|
+
"attribute": "size",
|
|
140
|
+
"defaultValue": "'md'"
|
|
141
|
+
},
|
|
142
|
+
"initials": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "string | null",
|
|
147
|
+
"resolved": "string",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "`type=\"initials\"` only: the initials text to display (e.g. `\"SL\"` for \"Sam Lee\"). Ignored\nfor `icon`/`image`."
|
|
155
|
+
},
|
|
156
|
+
"getter": false,
|
|
157
|
+
"setter": false,
|
|
158
|
+
"reflect": false,
|
|
159
|
+
"attribute": "initials",
|
|
160
|
+
"defaultValue": "null"
|
|
161
|
+
},
|
|
162
|
+
"src": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "string | null",
|
|
167
|
+
"resolved": "string",
|
|
168
|
+
"references": {}
|
|
169
|
+
},
|
|
170
|
+
"required": false,
|
|
171
|
+
"optional": false,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": "`type=\"image\"` only: the photo URL. This component does not fetch it itself -- network\ncalls, loading/error states, and caching are the consuming app's responsibility, same\nconvention as `bs-logo`'s own `src` prop. Ignored for `icon`/`initials`."
|
|
175
|
+
},
|
|
176
|
+
"getter": false,
|
|
177
|
+
"setter": false,
|
|
178
|
+
"reflect": false,
|
|
179
|
+
"attribute": "src",
|
|
180
|
+
"defaultValue": "null"
|
|
181
|
+
},
|
|
182
|
+
"alt": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"mutable": false,
|
|
185
|
+
"complexType": {
|
|
186
|
+
"original": "string | null",
|
|
187
|
+
"resolved": "string",
|
|
188
|
+
"references": {}
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"optional": false,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": "`type=\"image\"` only: accessible alt text for the photo, set directly on the real `<img>`\nthis renders -- a person's photo is meaningful content, not decorative, so pass something\nreal (e.g. their name). Falls back to `alt=\"\"` (decorative to assistive tech) when unset,\nrather than omitting the attribute entirely, but don't rely on that fallback. Ignored for\n`icon`/`initials` -- see `ariaLabel` for those instead."
|
|
195
|
+
},
|
|
196
|
+
"getter": false,
|
|
197
|
+
"setter": false,
|
|
198
|
+
"reflect": false,
|
|
199
|
+
"attribute": "alt",
|
|
200
|
+
"defaultValue": "null"
|
|
201
|
+
},
|
|
202
|
+
"ariaLabel": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"mutable": false,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "string | null",
|
|
207
|
+
"resolved": "string",
|
|
208
|
+
"references": {}
|
|
209
|
+
},
|
|
210
|
+
"required": false,
|
|
211
|
+
"optional": false,
|
|
212
|
+
"docs": {
|
|
213
|
+
"tags": [],
|
|
214
|
+
"text": "`type=\"icon\"`/`\"initials\"` only: accessible name for the avatar, set as `aria-label` on the\n`role=\"img\"` wrapper this renders (neither is a real `<img>`, so there's no native `alt` to\nset). Setting a plain `aria-label` attribute on the `<bs-avatar>` host does NOT work for this\n-- that attribute stays on the light-DOM host and never crosses into the shadow DOM, so the\nactual `role=\"img\"` element stays nameless. Same pattern as `bs-checkbox`'s identical\n`ariaLabel` prop. Ignored for `image` -- see `alt` for that instead."
|
|
215
|
+
},
|
|
216
|
+
"getter": false,
|
|
217
|
+
"setter": false,
|
|
218
|
+
"reflect": false,
|
|
219
|
+
"attribute": "aria-label",
|
|
220
|
+
"defaultValue": "null"
|
|
221
|
+
},
|
|
222
|
+
"disabled": {
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"mutable": false,
|
|
225
|
+
"complexType": {
|
|
226
|
+
"original": "boolean",
|
|
227
|
+
"resolved": "boolean",
|
|
228
|
+
"references": {}
|
|
229
|
+
},
|
|
230
|
+
"required": false,
|
|
231
|
+
"optional": false,
|
|
232
|
+
"docs": {
|
|
233
|
+
"tags": [],
|
|
234
|
+
"text": "Applies the disabled treatment (50% opacity) and suppresses the hover/focus/pressed CSS\nstates -- this doesn't set a native `disabled` attribute (this component renders no native\nform control), it's purely a visual/interaction-state flag for when a consuming app has\nwrapped this in its own disabled control. Reflected so the `:host([disabled])` CSS selector\nthat drives all of the above still matches when a consumer sets the JS property directly\n(`el.disabled = true`) rather than the HTML attribute."
|
|
235
|
+
},
|
|
236
|
+
"getter": false,
|
|
237
|
+
"setter": false,
|
|
238
|
+
"reflect": true,
|
|
239
|
+
"attribute": "disabled",
|
|
240
|
+
"defaultValue": "false"
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
// A generic, standard "user" silhouette (head + shoulders bust) -- not a pixel port of Figma's own
|
|
246
|
+
// exported icon asset (a plain raster/vector glyph this common isn't a proprietary brand asset
|
|
247
|
+
// worth treating as a fixed image import, unlike e.g. bs-logo's actual wordmark), same
|
|
248
|
+
// inline-icon-helper-function pattern as bs-chatbot-header.tsx's NewChatIcon/ExpandIcon/etc. Single
|
|
249
|
+
// shared viewBox scales cleanly to every avatar size via plain CSS width/height, so one glyph
|
|
250
|
+
// covers all six sizes.
|
|
251
|
+
const UserIcon = () => (h("svg", { part: "icon", class: "bs-avatar__icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { cx: "12", cy: "8", r: "4", fill: "currentColor" }), h("path", { d: "M4 20.5C4 16.634 7.582 13.5 12 13.5C16.418 13.5 20 16.634 20 20.5", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })));
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
3
|
+
const types = ['icon', 'initials', 'image'];
|
|
4
|
+
const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
5
|
+
// A placeholder photo for the "image" demo stories -- this component never fetches a photo
|
|
6
|
+
// itself (see its own class doc), this is purely story content standing in for a real user photo
|
|
7
|
+
// a consuming app would supply.
|
|
8
|
+
const PLACEHOLDER_PHOTO = 'https://i.pravatar.cc/256?img=68';
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'Components/bs-avatar',
|
|
11
|
+
parameters: { docs: { description: { component: componentDescription('bs-avatar') } } },
|
|
12
|
+
render: args => html `
|
|
13
|
+
<bs-avatar
|
|
14
|
+
type=${args.type}
|
|
15
|
+
size=${args.size}
|
|
16
|
+
initials=${args.initials}
|
|
17
|
+
src=${args.src}
|
|
18
|
+
alt=${args.alt}
|
|
19
|
+
aria-label=${args.ariaLabel}
|
|
20
|
+
?disabled=${args.disabled}
|
|
21
|
+
></bs-avatar>
|
|
22
|
+
`,
|
|
23
|
+
argTypes: {
|
|
24
|
+
type: { control: 'select', options: types, description: propDescription('bs-avatar', 'type') },
|
|
25
|
+
size: { control: 'select', options: sizes, description: propDescription('bs-avatar', 'size') },
|
|
26
|
+
initials: { control: 'text', description: propDescription('bs-avatar', 'initials') },
|
|
27
|
+
src: { control: 'text', description: propDescription('bs-avatar', 'src') },
|
|
28
|
+
alt: { control: 'text', description: propDescription('bs-avatar', 'alt') },
|
|
29
|
+
ariaLabel: { control: 'text', description: propDescription('bs-avatar', 'ariaLabel') },
|
|
30
|
+
disabled: { control: 'boolean', description: propDescription('bs-avatar', 'disabled') },
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
type: 'icon',
|
|
34
|
+
size: 'md',
|
|
35
|
+
initials: 'SL',
|
|
36
|
+
src: '',
|
|
37
|
+
alt: '',
|
|
38
|
+
ariaLabel: 'Sam Lee',
|
|
39
|
+
disabled: false,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export default meta;
|
|
43
|
+
export const Icon = {};
|
|
44
|
+
export const Initials = {
|
|
45
|
+
args: { type: 'initials' },
|
|
46
|
+
};
|
|
47
|
+
export const Image = {
|
|
48
|
+
args: { type: 'image', src: PLACEHOLDER_PHOTO, alt: 'Sam Lee' },
|
|
49
|
+
};
|
|
50
|
+
export const Sizes = {
|
|
51
|
+
render: args => html `
|
|
52
|
+
<div style="display:flex; gap:16px; align-items:center;">
|
|
53
|
+
${sizes.map(size => html `<bs-avatar type=${args.type} size=${size} initials=${args.initials} aria-label=${args.ariaLabel}></bs-avatar>`)}
|
|
54
|
+
</div>
|
|
55
|
+
`,
|
|
56
|
+
};
|
|
57
|
+
export const Disabled = {
|
|
58
|
+
args: { disabled: true },
|
|
59
|
+
};
|
|
60
|
+
// Not a special prop -- this just sets tabindex="0" directly on the element (a consuming app's
|
|
61
|
+
// own choice to make an avatar interactive, e.g. an account-switcher trigger) to demonstrate that
|
|
62
|
+
// the real :hover/:focus-visible/:active CSS states apply with no extra wiring -- see the class
|
|
63
|
+
// doc in bs-avatar.tsx for why. Tab to it (or click/hold it) to see the states.
|
|
64
|
+
export const Interactive = {
|
|
65
|
+
args: { type: 'initials' },
|
|
66
|
+
render: args => html `<bs-avatar type=${args.type} size=${args.size} initials=${args.initials} aria-label=${args.ariaLabel} tabindex="0"></bs-avatar>`,
|
|
67
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-breadcrumb', () => {
|
|
3
|
+
it('sets role="listitem" on the host', async () => {
|
|
4
|
+
const { root } = await render(h("bs-breadcrumb", { href: "/" }, "Home"));
|
|
5
|
+
expect(root).toEqualAttribute('role', 'listitem');
|
|
6
|
+
});
|
|
7
|
+
it('renders a separator marked aria-hidden', async () => {
|
|
8
|
+
const { root } = await render(h("bs-breadcrumb", { href: "/" }, "Home"));
|
|
9
|
+
const separator = root.shadowRoot.querySelector('[part="separator"]');
|
|
10
|
+
expect(separator).not.toBeNull();
|
|
11
|
+
expect(separator).toEqualAttribute('aria-hidden', 'true');
|
|
12
|
+
});
|
|
13
|
+
it('current renders a non-link <span aria-current="page">, even when href is also set', async () => {
|
|
14
|
+
const { root } = await render(h("bs-breadcrumb", { href: "/should-be-ignored", current: true }, "Edit"));
|
|
15
|
+
const current = root.shadowRoot.querySelector('[part="current"]');
|
|
16
|
+
expect(current).not.toBeNull();
|
|
17
|
+
expect(current.tagName).toBe('SPAN');
|
|
18
|
+
expect(current).toEqualAttribute('aria-current', 'page');
|
|
19
|
+
// `current`'s own shadow-DOM textContent is empty -- it only contains a <slot>, and
|
|
20
|
+
// `Element.textContent` doesn't traverse slotted/assigned light-DOM nodes. Check the host's
|
|
21
|
+
// textContent instead, which does include its own light-DOM children.
|
|
22
|
+
expect(root.textContent.trim()).toBe('Edit');
|
|
23
|
+
expect(root.shadowRoot.querySelector('a')).toBeNull();
|
|
24
|
+
});
|
|
25
|
+
it('href (not current) renders a real <a href>', async () => {
|
|
26
|
+
const { root } = await render(h("bs-breadcrumb", { href: "/settings" }, "Settings"));
|
|
27
|
+
const link = root.shadowRoot.querySelector('[part="link"]');
|
|
28
|
+
expect(link).not.toBeNull();
|
|
29
|
+
expect(link.tagName).toBe('A');
|
|
30
|
+
expect(link).toEqualAttribute('href', '/settings');
|
|
31
|
+
});
|
|
32
|
+
it('neither href nor current renders a plain, non-interactive <span>', async () => {
|
|
33
|
+
const { root } = await render(h("bs-breadcrumb", null, "No Link"));
|
|
34
|
+
const link = root.shadowRoot.querySelector('[part="link"]');
|
|
35
|
+
expect(link).not.toBeNull();
|
|
36
|
+
expect(link.tagName).toBe('SPAN');
|
|
37
|
+
expect(root.shadowRoot.querySelector('a')).toBeNull();
|
|
38
|
+
});
|
|
39
|
+
it("hides the first crumb's separator, regardless of tag, and shows the second's", async () => {
|
|
40
|
+
const { root } = await render(h("bs-breadcrumbs", null, h("bs-breadcrumb", { href: "/" }, "Home"), h("bs-breadcrumb", { href: "/settings" }, "Settings")));
|
|
41
|
+
const crumbs = root.querySelectorAll('bs-breadcrumb');
|
|
42
|
+
const [first, second] = Array.from(crumbs);
|
|
43
|
+
const firstSeparator = first.shadowRoot.querySelector('[part="separator"]');
|
|
44
|
+
const secondSeparator = second.shadowRoot.querySelector('[part="separator"]');
|
|
45
|
+
expect(getComputedStyle(firstSeparator).display).toBe('none');
|
|
46
|
+
expect(getComputedStyle(secondSeparator).display).not.toBe('none');
|
|
47
|
+
});
|
|
48
|
+
describe('size', () => {
|
|
49
|
+
it('defaults to "md" and reflects the attribute', async () => {
|
|
50
|
+
const { root } = await render(h("bs-breadcrumb", { href: "/" }, "Home"));
|
|
51
|
+
expect(root).toEqualAttribute('size', 'md');
|
|
52
|
+
});
|
|
53
|
+
it('reflects a "sm" size and scales down the computed font-size', async () => {
|
|
54
|
+
const mdRender = await render(h("bs-breadcrumb", { href: "/" }, "Home"));
|
|
55
|
+
const smRender = await render(h("bs-breadcrumb", { href: "/", size: "sm" }, "Home"));
|
|
56
|
+
expect(smRender.root).toEqualAttribute('size', 'sm');
|
|
57
|
+
const mdFontSize = getComputedStyle(mdRender.root).fontSize;
|
|
58
|
+
const smFontSize = getComputedStyle(smRender.root).fontSize;
|
|
59
|
+
expect(smFontSize).not.toBe(mdFontSize);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|