@brandsync/wc 1.0.0 → 1.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 +587 -162
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-00d40aca.entry.js +1 -0
- package/dist/brandsync-wc/{p-6e95eb36.entry.js → p-0299e8e1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-613ff380.entry.js → p-0921ca0d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4f8459ae.entry.js → p-0a2d690f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b5cbe30b.entry.js → p-0cf117f4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-aa43d478.entry.js → p-127d698d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9bcd99aa.entry.js → p-1780224d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-55a8d4b5.entry.js → p-18e0cff4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e2a37bda.entry.js → p-1abacfe8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-10f6f3cd.entry.js → p-2a7cc40c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9f1e4a91.entry.js → p-2e7586dd.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e3ce0c8c.entry.js → p-31b28025.entry.js} +1 -1
- package/dist/brandsync-wc/{p-17a695af.entry.js → p-32fe390d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-38aad266.entry.js → p-35bcb932.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0ba35c3b.entry.js → p-393efb5d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-37365a51.entry.js → p-3e61d206.entry.js} +1 -1
- package/dist/brandsync-wc/{p-baa4e2e0.entry.js → p-3e8728dc.entry.js} +1 -1
- package/dist/brandsync-wc/{p-45016a37.entry.js → p-5321186f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-4ec24ccb.entry.js → p-579fbe4d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-16c960b5.entry.js → p-63906504.entry.js} +1 -1
- package/dist/brandsync-wc/{p-59ac2495.entry.js → p-673546bf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-69c5bc2e.entry.js → p-696f885c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-27cce165.entry.js → p-6ef0a0ed.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e231e4cf.entry.js → p-6fc78ccf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-917a5bbc.entry.js → p-7091f130.entry.js} +1 -1
- package/dist/brandsync-wc/{p-752c04c8.entry.js → p-72e02bd5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c04cf1bb.entry.js → p-778fcc55.entry.js} +1 -1
- package/dist/brandsync-wc/{p-63167373.entry.js → p-790fadf9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-196cfcf0.entry.js → p-82953f42.entry.js} +1 -1
- package/dist/brandsync-wc/p-8b5f4ca7.entry.js +1 -0
- package/dist/brandsync-wc/{p-Do3l4of3.js → p-CvfB8CQv.js} +2 -2
- package/dist/brandsync-wc/{p-c3079ad7.entry.js → p-a16afeaa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-cc79e75f.entry.js → p-a73bfd31.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c90f5a74.entry.js → p-a7704457.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1fcc9f47.entry.js → p-aa1cc2b6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d037b619.entry.js → p-ac12372f.entry.js} +1 -1
- package/dist/brandsync-wc/p-b2abd8d9.entry.js +1 -0
- package/dist/brandsync-wc/p-b63362e7.entry.js +1 -0
- package/dist/brandsync-wc/{p-ab8de9b6.entry.js → p-bb2ec290.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7e544766.entry.js → p-c7427962.entry.js} +1 -1
- package/dist/brandsync-wc/{p-48000949.entry.js → p-c76ca89f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-43e37883.entry.js → p-c7b9a5c7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c3c383dc.entry.js → p-ca74c7d9.entry.js} +1 -1
- package/dist/brandsync-wc/p-cc9f85d6.entry.js +1 -0
- package/dist/brandsync-wc/p-cff188cb.entry.js +1 -0
- package/dist/brandsync-wc/{p-b18e4845.entry.js → p-e230ed08.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5ae9e60e.entry.js → p-f652d79c.entry.js} +1 -1
- package/dist/brandsync-wc/p-fc9d52d4.entry.js +1 -0
- package/dist/cjs/brandsync-wc.cjs.js +3 -3
- 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 +1 -1
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bs-breadcrumbs.cjs.entry.js +2 -2
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +2 -2
- package/dist/cjs/bs-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-card.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/bs-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-filter.cjs.entry.js +68 -0
- package/dist/cjs/bs-chip-informative.cjs.entry.js +42 -0
- package/dist/cjs/bs-chip-input.cjs.entry.js +76 -0
- 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 +13 -3
- 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 +3 -3
- package/dist/cjs/bs-logo.cjs.entry.js +1 -1
- package/dist/cjs/bs-menu-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-menu.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-pagination.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/bs-source-link.cjs.entry.js +3 -3
- package/dist/cjs/bs-stepper-step.cjs.entry.js +2 -2
- package/dist/cjs/bs-stepper.cjs.entry.js +2 -2
- 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-DHVw-IPK.js → index-CdAh5BFg.js} +27 -14
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -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/bs-attachment.js +1 -1
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-avatar/bs-avatar.js +2 -2
- package/dist/collection/components/bs-badge/bs-badge.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb/bs-breadcrumb.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumb-overflow/bs-breadcrumb-overflow.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button/bs-button/bs-button.js +2 -2
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +3 -3
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.css +6 -0
- package/dist/collection/components/bs-card/bs-card.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.cmp.test.js +99 -0
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.css +156 -0
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.js +222 -0
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.stories.js +76 -0
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.cmp.test.js +43 -0
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.css +135 -0
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +143 -0
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.stories.js +70 -0
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.cmp.test.js +93 -0
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.css +172 -0
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +208 -0
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.stories.js +67 -0
- package/dist/collection/components/bs-composer/bs-composer.js +3 -3
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +2 -2
- package/dist/collection/components/bs-data-table/bs-data-table.js +6 -6
- package/dist/collection/components/bs-dialog/bs-dialog.cmp.test.js +6 -0
- package/dist/collection/components/bs-dialog/bs-dialog.js +13 -3
- package/dist/collection/components/bs-input/bs-input.js +2 -2
- package/dist/collection/components/bs-logo/bs-logo.js +2 -2
- 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.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-slider/bs-slider.js +2 -2
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +2 -2
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +3 -3
- package/dist/collection/components/bs-switch/bs-switch.js +2 -2
- 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 +2 -2
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +3 -3
- 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.js +1 -1
- 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 +2 -2
- 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-avatar.js +1 -1
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-checkbox.js +1 -1
- package/dist/components/bs-chip-filter.d.ts +11 -0
- package/dist/components/bs-chip-filter.js +1 -0
- package/dist/components/bs-chip-informative.d.ts +11 -0
- package/dist/components/bs-chip-informative.js +1 -0
- package/dist/components/bs-chip-input.d.ts +11 -0
- package/dist/components/bs-chip-input.js +1 -0
- package/dist/components/bs-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-dialog.js +1 -1
- 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.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-BFcVSpES.js → p-B8JpGodL.js} +1 -1
- package/dist/components/{p-CUa8zihb.js → p-BFVUq5m5.js} +1 -1
- package/dist/components/{p-Bs7nEbqK.js → p-BPUNjzjH.js} +1 -1
- package/dist/components/{p-CPSCOLIf.js → p-Bb6vh9PN.js} +1 -1
- package/dist/components/{p-BJZYe7M4.js → p-CsnFdZ3v.js} +1 -1
- package/dist/components/{p-BKaZWFE1.js → p-DwVm6HIb.js} +1 -1
- package/dist/esm/brandsync-wc.js +4 -4
- 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 +1 -1
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-breadcrumb-overflow.entry.js +1 -1
- package/dist/esm/bs-breadcrumb.entry.js +1 -1
- package/dist/esm/bs-breadcrumbs.entry.js +2 -2
- package/dist/esm/bs-button-skeleton.entry.js +2 -2
- package/dist/esm/bs-button.entry.js +1 -1
- package/dist/esm/bs-card.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/bs-checkbox.entry.js +1 -1
- package/dist/esm/bs-chip-filter.entry.js +66 -0
- package/dist/esm/bs-chip-informative.entry.js +40 -0
- package/dist/esm/bs-chip-input.entry.js +74 -0
- 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 +13 -3
- 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 +3 -3
- package/dist/esm/bs-logo.entry.js +1 -1
- package/dist/esm/bs-menu-item.entry.js +2 -2
- package/dist/esm/bs-menu.entry.js +2 -2
- package/dist/esm/bs-navigation-drawer-item.entry.js +2 -2
- package/dist/esm/bs-navigation-drawer.entry.js +2 -2
- package/dist/esm/bs-navigation-header.entry.js +2 -2
- package/dist/esm/bs-pagination.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/bs-source-link.entry.js +3 -3
- package/dist/esm/bs-stepper-step.entry.js +2 -2
- package/dist/esm/bs-stepper.entry.js +2 -2
- 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-Do3l4of3.js → index-CvfB8CQv.js} +27 -14
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-chip/bs-chip-filter/bs-chip-filter.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chip/bs-chip-filter/bs-chip-filter.d.ts +56 -0
- package/dist/types/components/bs-chip/bs-chip-filter/bs-chip-filter.stories.d.ts +20 -0
- package/dist/types/components/bs-chip/bs-chip-informative/bs-chip-informative.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chip/bs-chip-informative/bs-chip-informative.d.ts +41 -0
- package/dist/types/components/bs-chip/bs-chip-informative/bs-chip-informative.stories.d.ts +21 -0
- package/dist/types/components/bs-chip/bs-chip-input/bs-chip-input.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chip/bs-chip-input/bs-chip-input.d.ts +60 -0
- package/dist/types/components/bs-chip/bs-chip-input/bs-chip-input.stories.d.ts +18 -0
- package/dist/types/components.d.ts +355 -0
- package/dist/types/stencil-public-runtime.d.ts +62 -55
- package/loader/index.d.ts +1 -1
- package/package.json +6 -5
- package/dist/brandsync-wc/p-3efb76dd.entry.js +0 -1
- package/dist/brandsync-wc/p-ce7fc368.entry.js +0 -1
- package/dist/brandsync-wc/p-d22990c0.entry.js +0 -1
- package/dist/brandsync-wc/p-f0ae2740.entry.js +0 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A pill-shaped, non-interactive label for conveying a category or status at a glance, optionally
|
|
4
|
+
* paired with a leading icon. Unlike `bs-chip-filter`/`bs-chip-input`, this is purely informational
|
|
5
|
+
* -- no click/select/remove behavior, no hover/focus/pressed states.
|
|
6
|
+
*
|
|
7
|
+
* ## When to use
|
|
8
|
+
* - Conveying a category or status inline with other content, with more color options and an
|
|
9
|
+
* optional icon than `bs-badge` offers.
|
|
10
|
+
*
|
|
11
|
+
* ## When not to use
|
|
12
|
+
* - Anything clickable/selectable -- use `bs-chip-filter`.
|
|
13
|
+
* - A short, fixed status label with no color/icon needs -- `bs-badge` is the simpler choice.
|
|
14
|
+
*
|
|
15
|
+
* @slot - Default slot: the chip's label content.
|
|
16
|
+
* @slot icon - Optional leading icon.
|
|
17
|
+
* @part icon - The icon wrapper element.
|
|
18
|
+
* @part label - The text label element.
|
|
19
|
+
*/
|
|
20
|
+
export class BsChipInformative {
|
|
21
|
+
el;
|
|
22
|
+
/** Semantic color. Maps directly to the brandsync-tokens `--bs-chip-bg-*-container`/
|
|
23
|
+
* `--bs-chip-text-*` sets. Ignored (in favor of the disabled token set) when `disabled` is
|
|
24
|
+
* set -- same override relationship `bs-stepper-step`'s `error`/`disabled` props have. */
|
|
25
|
+
color = 'neutral';
|
|
26
|
+
/** Sizing scale. Controls height and font-size/line-height together -- unlike
|
|
27
|
+
* `bs-chip-filter`/`bs-chip-input`, Figma specs a distinct (smaller) font at `size="sm"`, not
|
|
28
|
+
* just a shorter pill. */
|
|
29
|
+
size = 'lg';
|
|
30
|
+
/** Overrides `color` with the disabled token set, regardless of its value. Reflected so
|
|
31
|
+
* `:host([disabled])` can apply it in CSS. */
|
|
32
|
+
disabled = false;
|
|
33
|
+
/** Tracks whether the `icon` slot has assigned content, so the icon/label gap and left-edge
|
|
34
|
+
* padding only apply when there's actually a leading icon. */
|
|
35
|
+
hasIcon = false;
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.hasIcon = this.hasSlottedContent('icon');
|
|
38
|
+
}
|
|
39
|
+
hasSlottedContent(slotName) {
|
|
40
|
+
return Array.from(this.el.childNodes).some(node => node.nodeType === Node.ELEMENT_NODE && node.getAttribute('slot') === slotName);
|
|
41
|
+
}
|
|
42
|
+
onIconSlotchange = (ev) => {
|
|
43
|
+
this.hasIcon = ev.target.assignedNodes().length > 0;
|
|
44
|
+
};
|
|
45
|
+
render() {
|
|
46
|
+
const paddingVariant = this.hasIcon ? 'icon' : 'text';
|
|
47
|
+
return (h(Host, { key: '333f8eb96435393dc676b7422de79a43f0e3d9d8', class: `bs-chip-informative bs-chip-informative--${this.color} bs-chip-informative--${this.size} bs-chip-informative--${paddingVariant}` }, h("span", { key: '5af00525b1ce8e1cee16e896c6fd1bee1e8344c0', part: "icon", class: `bs-chip-informative__icon ${this.hasIcon ? 'bs-chip-informative__icon--visible' : ''}` }, h("slot", { key: 'd6e72f0ea1a913b2a313441b83f1430549dcc5cc', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '617013d83715e1d916e4bfc40185d31879acfab3', part: "label", class: "bs-chip-informative__label" }, h("slot", { key: 'dc6db50bff31169c3da18f472002528a78ed210a' }))));
|
|
48
|
+
}
|
|
49
|
+
static get is() { return "bs-chip-informative"; }
|
|
50
|
+
static get encapsulation() { return "shadow"; }
|
|
51
|
+
static get originalStyleUrls() {
|
|
52
|
+
return {
|
|
53
|
+
"$": ["bs-chip-informative.css"]
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
static get styleUrls() {
|
|
57
|
+
return {
|
|
58
|
+
"$": ["bs-chip-informative.css"]
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static get properties() {
|
|
62
|
+
return {
|
|
63
|
+
"color": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "BsChipInformativeColor",
|
|
68
|
+
"resolved": "\"error\" | \"info\" | \"neutral\" | \"success\" | \"warning\"",
|
|
69
|
+
"references": {
|
|
70
|
+
"BsChipInformativeColor": {
|
|
71
|
+
"location": "local",
|
|
72
|
+
"path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-chip/bs-chip-informative/bs-chip-informative.tsx",
|
|
73
|
+
"id": "src/components/bs-chip/bs-chip-informative/bs-chip-informative.tsx::BsChipInformativeColor"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": "Semantic color. Maps directly to the brandsync-tokens `--bs-chip-bg-*-container`/\n`--bs-chip-text-*` sets. Ignored (in favor of the disabled token set) when `disabled` is\nset -- same override relationship `bs-stepper-step`'s `error`/`disabled` props have."
|
|
82
|
+
},
|
|
83
|
+
"getter": false,
|
|
84
|
+
"setter": false,
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"attribute": "color",
|
|
87
|
+
"defaultValue": "'neutral'"
|
|
88
|
+
},
|
|
89
|
+
"size": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "BsChipInformativeSize",
|
|
94
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
95
|
+
"references": {
|
|
96
|
+
"BsChipInformativeSize": {
|
|
97
|
+
"location": "local",
|
|
98
|
+
"path": "/home/runner/work/Brandsync-web-components/Brandsync-web-components/packages/wc/src/components/bs-chip/bs-chip-informative/bs-chip-informative.tsx",
|
|
99
|
+
"id": "src/components/bs-chip/bs-chip-informative/bs-chip-informative.tsx::BsChipInformativeSize"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": "Sizing scale. Controls height and font-size/line-height together -- unlike\n`bs-chip-filter`/`bs-chip-input`, Figma specs a distinct (smaller) font at `size=\"sm\"`, not\njust a shorter pill."
|
|
108
|
+
},
|
|
109
|
+
"getter": false,
|
|
110
|
+
"setter": false,
|
|
111
|
+
"reflect": false,
|
|
112
|
+
"attribute": "size",
|
|
113
|
+
"defaultValue": "'lg'"
|
|
114
|
+
},
|
|
115
|
+
"disabled": {
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "boolean",
|
|
120
|
+
"resolved": "boolean",
|
|
121
|
+
"references": {}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": "Overrides `color` with the disabled token set, regardless of its value. Reflected so\n`:host([disabled])` can apply it in CSS."
|
|
128
|
+
},
|
|
129
|
+
"getter": false,
|
|
130
|
+
"setter": false,
|
|
131
|
+
"reflect": true,
|
|
132
|
+
"attribute": "disabled",
|
|
133
|
+
"defaultValue": "false"
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get states() {
|
|
138
|
+
return {
|
|
139
|
+
"hasIcon": {}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
static get elementRef() { return "el"; }
|
|
143
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../../stories-utils";
|
|
3
|
+
const colors = ['neutral', 'warning', 'success', 'info', 'error'];
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/bs-chip/bs-chip-informative',
|
|
6
|
+
parameters: { docs: { description: { component: componentDescription('bs-chip-informative') } } },
|
|
7
|
+
render: args => html ` <bs-chip-informative color=${args.color} size=${args.size} ?disabled=${args.disabled}>${args.label}</bs-chip-informative> `,
|
|
8
|
+
argTypes: {
|
|
9
|
+
color: { control: { type: 'select' }, options: colors, description: propDescription('bs-chip-informative', 'color') },
|
|
10
|
+
size: { control: { type: 'select' }, options: ['sm', 'md', 'lg'], description: propDescription('bs-chip-informative', 'size') },
|
|
11
|
+
disabled: { control: 'boolean', description: propDescription('bs-chip-informative', 'disabled') },
|
|
12
|
+
label: { control: 'text', description: 'Slotted label content (not a real attribute -- see the default slot).' },
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
color: 'neutral',
|
|
16
|
+
size: 'lg',
|
|
17
|
+
disabled: false,
|
|
18
|
+
label: 'Label',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export const Neutral = {};
|
|
23
|
+
export const Warning = {
|
|
24
|
+
args: { color: 'warning' },
|
|
25
|
+
};
|
|
26
|
+
export const Success = {
|
|
27
|
+
args: { color: 'success' },
|
|
28
|
+
};
|
|
29
|
+
export const Info = {
|
|
30
|
+
args: { color: 'info' },
|
|
31
|
+
};
|
|
32
|
+
export const Error = {
|
|
33
|
+
args: { color: 'error' },
|
|
34
|
+
};
|
|
35
|
+
export const WithIcon = {
|
|
36
|
+
name: 'With icon',
|
|
37
|
+
render: args => html `
|
|
38
|
+
<bs-chip-informative color=${args.color} size=${args.size} ?disabled=${args.disabled}>
|
|
39
|
+
<svg slot="icon" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
40
|
+
<path d="M8 3.5V12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
41
|
+
<path d="M3.5 8H12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
42
|
+
</svg>
|
|
43
|
+
${args.label}
|
|
44
|
+
</bs-chip-informative>
|
|
45
|
+
`,
|
|
46
|
+
};
|
|
47
|
+
export const Disabled = {
|
|
48
|
+
args: { disabled: true },
|
|
49
|
+
};
|
|
50
|
+
export const Small = {
|
|
51
|
+
args: { size: 'sm' },
|
|
52
|
+
};
|
|
53
|
+
export const Medium = {
|
|
54
|
+
args: { size: 'md' },
|
|
55
|
+
};
|
|
56
|
+
export const AllVariants = {
|
|
57
|
+
name: 'All variants',
|
|
58
|
+
render: () => html `
|
|
59
|
+
<div style="display:flex; gap:12px; flex-wrap:wrap; align-items:center;">
|
|
60
|
+
<bs-chip-informative color="neutral">Neutral</bs-chip-informative>
|
|
61
|
+
<bs-chip-informative color="warning">Warning</bs-chip-informative>
|
|
62
|
+
<bs-chip-informative color="success">Success</bs-chip-informative>
|
|
63
|
+
<bs-chip-informative color="info">Info</bs-chip-informative>
|
|
64
|
+
<bs-chip-informative color="error">Error</bs-chip-informative>
|
|
65
|
+
<bs-chip-informative disabled>Disabled</bs-chip-informative>
|
|
66
|
+
<bs-chip-informative size="md">Medium</bs-chip-informative>
|
|
67
|
+
<bs-chip-informative size="sm">Small</bs-chip-informative>
|
|
68
|
+
</div>
|
|
69
|
+
`,
|
|
70
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-chip-input', () => {
|
|
3
|
+
it('renders an unselected chip by default', async () => {
|
|
4
|
+
const { root } = await render(h("bs-chip-input", null, "Label"));
|
|
5
|
+
const body = root.shadowRoot.querySelector('[part="body"]');
|
|
6
|
+
expect(body).toEqualAttribute('aria-pressed', 'false');
|
|
7
|
+
expect(root).not.toEqualAttribute('selected', '');
|
|
8
|
+
});
|
|
9
|
+
it('reflects the selected prop to the host attribute and the body button', async () => {
|
|
10
|
+
const { root } = await render(h("bs-chip-input", { selected: true }, "Label"));
|
|
11
|
+
expect(root).toEqualAttribute('selected', '');
|
|
12
|
+
const body = root.shadowRoot.querySelector('[part="body"]');
|
|
13
|
+
expect(body).toEqualAttribute('aria-pressed', 'true');
|
|
14
|
+
});
|
|
15
|
+
it('clicking the body toggles selected and emits bsChange with the new value', async () => {
|
|
16
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chip-input", null, "Label"));
|
|
17
|
+
const bsChangeSpy = spyOnEvent('bsChange');
|
|
18
|
+
const body = root.shadowRoot.querySelector('[part="body"]');
|
|
19
|
+
body.click();
|
|
20
|
+
await waitForChanges();
|
|
21
|
+
expect(root.selected).toBe(true);
|
|
22
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(1);
|
|
23
|
+
expect(bsChangeSpy).toHaveReceivedEventDetail(true);
|
|
24
|
+
body.click();
|
|
25
|
+
await waitForChanges();
|
|
26
|
+
expect(root.selected).toBe(false);
|
|
27
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(2);
|
|
28
|
+
expect(bsChangeSpy).toHaveReceivedEventDetail(false);
|
|
29
|
+
});
|
|
30
|
+
it('clicking the remove button emits bsRemove and does not affect selected', async () => {
|
|
31
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chip-input", { selected: true }, "Label"));
|
|
32
|
+
const bsRemoveSpy = spyOnEvent('bsRemove');
|
|
33
|
+
const bsChangeSpy = spyOnEvent('bsChange');
|
|
34
|
+
const removeButton = root.shadowRoot.querySelector('[part="remove"]');
|
|
35
|
+
removeButton.click();
|
|
36
|
+
await waitForChanges();
|
|
37
|
+
expect(bsRemoveSpy).toHaveReceivedEventTimes(1);
|
|
38
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(0);
|
|
39
|
+
expect(root.selected).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
it('sets the remove button accessible name from the slotted label text', async () => {
|
|
42
|
+
const { root } = await render(h("bs-chip-input", null, "Active users"));
|
|
43
|
+
const removeButton = root.shadowRoot.querySelector('[part="remove"]');
|
|
44
|
+
expect(removeButton).toEqualAttribute('aria-label', 'Remove Active users');
|
|
45
|
+
});
|
|
46
|
+
describe('disabled', () => {
|
|
47
|
+
it('sets the disabled attribute on both the body and remove buttons', async () => {
|
|
48
|
+
const { root } = await render(h("bs-chip-input", { disabled: true }, "Label"));
|
|
49
|
+
expect(root.shadowRoot.querySelector('[part="body"]')).toHaveAttribute('disabled');
|
|
50
|
+
expect(root.shadowRoot.querySelector('[part="remove"]')).toHaveAttribute('disabled');
|
|
51
|
+
});
|
|
52
|
+
it('prevents toggling selected via click', async () => {
|
|
53
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chip-input", { disabled: true }, "Label"));
|
|
54
|
+
const bsChangeSpy = spyOnEvent('bsChange');
|
|
55
|
+
const body = root.shadowRoot.querySelector('[part="body"]');
|
|
56
|
+
body.click();
|
|
57
|
+
await waitForChanges();
|
|
58
|
+
expect(root.selected).toBe(false);
|
|
59
|
+
expect(bsChangeSpy).toHaveReceivedEventTimes(0);
|
|
60
|
+
});
|
|
61
|
+
it('prevents removal via click', async () => {
|
|
62
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-chip-input", { disabled: true }, "Label"));
|
|
63
|
+
const bsRemoveSpy = spyOnEvent('bsRemove');
|
|
64
|
+
const removeButton = root.shadowRoot.querySelector('[part="remove"]');
|
|
65
|
+
removeButton.click();
|
|
66
|
+
await waitForChanges();
|
|
67
|
+
expect(bsRemoveSpy).toHaveReceivedEventTimes(0);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
['md', 'lg'].forEach(size => {
|
|
71
|
+
it(`renders size="${size}" with the matching modifier class`, async () => {
|
|
72
|
+
const { root } = await render(h("bs-chip-input", { size: size }, "Label"));
|
|
73
|
+
expect(root).toHaveClass(`bs-chip-input--${size}`);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
describe('icon slot and padding variant', () => {
|
|
77
|
+
it('has no icon and the text padding variant by default', async () => {
|
|
78
|
+
const { root } = await render(h("bs-chip-input", null, "Label"));
|
|
79
|
+
expect(root.shadowRoot.querySelector('[part="icon"]')).not.toHaveClass('bs-chip-input__icon--visible');
|
|
80
|
+
expect(root).toHaveClass('bs-chip-input--text');
|
|
81
|
+
});
|
|
82
|
+
it('marks the icon visible and picks the icon padding variant when the icon slot has content', async () => {
|
|
83
|
+
const { root, waitForChanges } = await render(h("bs-chip-input", null, h("svg", { slot: "icon" }), "Label"));
|
|
84
|
+
await waitForChanges();
|
|
85
|
+
expect(root.shadowRoot.querySelector('[part="icon"]')).toHaveClass('bs-chip-input__icon--visible');
|
|
86
|
+
expect(root).toHaveClass('bs-chip-input--icon');
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
it('renders label slot content', async () => {
|
|
90
|
+
const { root } = await render(h("bs-chip-input", null, "Active users"));
|
|
91
|
+
expect(root).toHaveTextContent('Active users');
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-chip-input-height-md: Height at size="md". Aliased to --bs-spacing-300.
|
|
3
|
+
* @prop --bs-chip-input-height-lg: Height at size="lg". Aliased to --bs-spacing-400.
|
|
4
|
+
* @prop --bs-chip-input-gap: Gap between icon/label/remove. Aliased to --bs-spacing-50.
|
|
5
|
+
* @prop --bs-chip-input-padding-x-glyph-side: Horizontal padding on an edge adjacent to a glyph
|
|
6
|
+
* (the icon on the left, or the remove button on the right, which is always present). Aliased to
|
|
7
|
+
* --bs-spacing-100.
|
|
8
|
+
* @prop --bs-chip-input-padding-x-plain-side: Left-edge padding when there's no leading icon.
|
|
9
|
+
* Aliased to --bs-spacing-150.
|
|
10
|
+
* @prop --bs-chip-input-font-size: Aliased to --bs-font-size-sm.
|
|
11
|
+
* @prop --bs-chip-input-line-height: Aliased to --bs-line-height-body-sm.
|
|
12
|
+
* @prop --bs-chip-input-font-weight: Aliased to --bs-font-weight-regular.
|
|
13
|
+
*
|
|
14
|
+
* Color (background/text per selected/hover/focus/pressed/disabled state) comes directly from
|
|
15
|
+
* brandsync-tokens' own pre-built chip token set (--bs-chip-bg-..., --bs-chip-text-...,
|
|
16
|
+
* --bs-chip-border-...) below -- shared across the whole bs-chip family, not local to this
|
|
17
|
+
* component, consumed directly rather than re-aliased under a bs-chip-input-specific name.
|
|
18
|
+
*/
|
|
19
|
+
:host {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
gap: var(--bs-chip-input-gap);
|
|
24
|
+
border-radius: var(--bs-border-radius-full);
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
font-size: var(--bs-chip-input-font-size);
|
|
27
|
+
font-weight: var(--bs-chip-input-font-weight);
|
|
28
|
+
line-height: calc(var(--bs-chip-input-line-height) * 1px);
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
background: var(--bs-chip-bg-primary-container);
|
|
31
|
+
color: var(--bs-chip-text-primary);
|
|
32
|
+
transition: background-color var(--bs-duration-fast, 120ms) var(--bs-easing-standard, ease);
|
|
33
|
+
|
|
34
|
+
--bs-chip-input-height-md: var(--bs-spacing-300);
|
|
35
|
+
--bs-chip-input-height-lg: var(--bs-spacing-400);
|
|
36
|
+
--bs-chip-input-gap: var(--bs-spacing-50);
|
|
37
|
+
--bs-chip-input-padding-x-glyph-side: var(--bs-spacing-100);
|
|
38
|
+
--bs-chip-input-padding-x-plain-side: var(--bs-spacing-150);
|
|
39
|
+
--bs-chip-input-font-size: var(--bs-font-size-sm);
|
|
40
|
+
--bs-chip-input-line-height: var(--bs-line-height-body-sm);
|
|
41
|
+
--bs-chip-input-font-weight: var(--bs-font-weight-regular);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:host(.bs-chip-input--md) {
|
|
45
|
+
height: var(--bs-chip-input-height-md);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host(.bs-chip-input--lg) {
|
|
49
|
+
height: var(--bs-chip-input-height-lg);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Reset -- both are plain, borderless, transparent flex items. Background/color/focus-ring all
|
|
53
|
+
live on :host (see below), so the whole pill reacts uniformly no matter which button is
|
|
54
|
+
actually hovered/focused/pressed -- :hover/:focus-within/:active on a host all match whenever
|
|
55
|
+
the pointer/focus is on any shadow-DOM descendant, not just the host element itself. */
|
|
56
|
+
.bs-chip-input__body,
|
|
57
|
+
.bs-chip-input__remove {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
height: 100%;
|
|
61
|
+
border: none;
|
|
62
|
+
background: transparent;
|
|
63
|
+
padding: 0;
|
|
64
|
+
margin: 0;
|
|
65
|
+
font: inherit;
|
|
66
|
+
color: inherit;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.bs-chip-input__body {
|
|
71
|
+
gap: var(--bs-chip-input-gap);
|
|
72
|
+
padding-right: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host(.bs-chip-input--icon) .bs-chip-input__body {
|
|
76
|
+
padding-left: var(--bs-chip-input-padding-x-glyph-side);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:host(.bs-chip-input--text) .bs-chip-input__body {
|
|
80
|
+
padding-left: var(--bs-chip-input-padding-x-plain-side);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.bs-chip-input__remove {
|
|
84
|
+
padding-left: 0;
|
|
85
|
+
padding-right: var(--bs-chip-input-padding-x-glyph-side);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.bs-chip-input__icon {
|
|
89
|
+
display: none;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.bs-chip-input__icon--visible {
|
|
94
|
+
display: flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Defaults slotted content to 16px, matching bs-chip-filter's icon slot -- a plain <svg> with no
|
|
99
|
+
intrinsic width/height otherwise collapses to 0x0 as a flex item (confirmed by measuring a real
|
|
100
|
+
render). bs-avatar is exempted: Figma specs it at 24px with its own border ring matching
|
|
101
|
+
--chip/border-inverse exactly (verified, --bs-border-neutral-container resolves to the same
|
|
102
|
+
#c2c7d3 hex), so it needs to keep sizing itself via its own `size` prop instead. */
|
|
103
|
+
.bs-chip-input__icon ::slotted(*) {
|
|
104
|
+
display: block;
|
|
105
|
+
width: 16px;
|
|
106
|
+
height: 16px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.bs-chip-input__icon ::slotted(bs-avatar) {
|
|
110
|
+
width: auto;
|
|
111
|
+
height: auto;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.bs-chip-input__label {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.bs-chip-input__remove svg {
|
|
120
|
+
display: block;
|
|
121
|
+
width: 16px;
|
|
122
|
+
height: 16px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Unselected (default): the light "container" background set. :active is declared AFTER
|
|
126
|
+
:focus-within so a mouse click's pressed background wins the cascade -- a mousedown makes both
|
|
127
|
+
equally true at once (clicking a button focuses it too), and with matching specificity the
|
|
128
|
+
later rule otherwise wins, which put the focused (not pressed) color on a plain click
|
|
129
|
+
(confirmed via a real computed-style check). The focus outline itself still applies regardless
|
|
130
|
+
of source order, since the active rule below only ever sets background. */
|
|
131
|
+
:host(:hover:not([disabled])) {
|
|
132
|
+
background: var(--bs-chip-bg-primary-container-hover);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:host(:focus-within:not([disabled])) {
|
|
136
|
+
background: var(--bs-chip-bg-primary-container-focused);
|
|
137
|
+
outline: 2px solid var(--bs-chip-border-focus);
|
|
138
|
+
outline-offset: 2px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:host(:active:not([disabled])) {
|
|
142
|
+
background: var(--bs-chip-bg-primary-container-pressed);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Selected: the dark "primary" background set, inverse (white) text -- swaps every state above
|
|
146
|
+
to its --primary-* (not --primary-container-*) counterpart. */
|
|
147
|
+
:host([selected]) {
|
|
148
|
+
background: var(--bs-chip-bg-primary);
|
|
149
|
+
color: var(--bs-chip-text-inverse);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host([selected]:hover:not([disabled])) {
|
|
153
|
+
background: var(--bs-chip-bg-primary-hover);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:host([selected]:focus-within:not([disabled])) {
|
|
157
|
+
background: var(--bs-chip-bg-primary-focused);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
:host([selected]:active:not([disabled])) {
|
|
161
|
+
background: var(--bs-chip-bg-primary-pressed);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([disabled]) {
|
|
165
|
+
background: var(--bs-chip-bg-disabled);
|
|
166
|
+
color: var(--bs-chip-text-disabled);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.bs-chip-input__body:disabled,
|
|
170
|
+
.bs-chip-input__remove:disabled {
|
|
171
|
+
cursor: not-allowed;
|
|
172
|
+
}
|