@brandsync/wc 1.3.0 → 1.5.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 +302 -91
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-7ea0133f.entry.js → p-1b16b6e4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5d118af1.entry.js → p-1bfc80c3.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2a7cc40c.entry.js → p-1d094352.entry.js} +1 -1
- package/dist/brandsync-wc/p-27741046.entry.js +1 -0
- package/dist/brandsync-wc/{p-0c8050e8.entry.js → p-2c2057f5.entry.js} +1 -1
- package/dist/brandsync-wc/p-2e8bf5da.entry.js +1 -0
- package/dist/brandsync-wc/{p-a73bfd31.entry.js → p-3145cc00.entry.js} +1 -1
- package/dist/brandsync-wc/{p-d589fa72.entry.js → p-35850bfe.entry.js} +1 -1
- package/dist/brandsync-wc/p-3e4a9f38.entry.js +1 -0
- package/dist/brandsync-wc/p-3f6980bf.entry.js +1 -0
- package/dist/brandsync-wc/p-42f428b0.entry.js +1 -0
- package/dist/brandsync-wc/{p-b2704450.entry.js → p-46957b76.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0d5cc77f.entry.js → p-4df71e00.entry.js} +1 -1
- package/dist/brandsync-wc/{p-72e02bd5.entry.js → p-58969b2b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0299e8e1.entry.js → p-5ea24f7e.entry.js} +1 -1
- package/dist/brandsync-wc/p-5f233b4e.entry.js +1 -0
- package/dist/brandsync-wc/{p-19c98e13.entry.js → p-692fd5f0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9ad278f4.entry.js → p-69c76966.entry.js} +1 -1
- package/dist/brandsync-wc/{p-be675b82.entry.js → p-6acdf2e1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-673546bf.entry.js → p-6b62bf53.entry.js} +1 -1
- package/dist/brandsync-wc/{p-23758f81.entry.js → p-6fd1fb04.entry.js} +1 -1
- package/dist/brandsync-wc/{p-29c360f3.entry.js → p-76a37a98.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8b5f4ca7.entry.js → p-83bda5f1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a16afeaa.entry.js → p-899d24f8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-94266d72.entry.js → p-8f90e906.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5a4db480.entry.js → p-906b4faa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-eae7587e.entry.js → p-943fc6b9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7de20530.entry.js → p-95e0fb92.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ca74c7d9.entry.js → p-9d5cf289.entry.js} +1 -1
- package/dist/brandsync-wc/{p-CvfB8CQv.js → p-CcPfH1dJ.js} +2 -2
- package/dist/brandsync-wc/{p-04c26826.entry.js → p-a34c7553.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bf4a5b1b.entry.js → p-a55a3d87.entry.js} +1 -1
- package/dist/brandsync-wc/{p-76d391d7.entry.js → p-a64b64f8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f196642a.entry.js → p-a77a5438.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8acb623e.entry.js → p-a96ec9a1.entry.js} +1 -1
- package/dist/brandsync-wc/p-ac2ccc4b.entry.js +1 -0
- package/dist/brandsync-wc/{p-18e0cff4.entry.js → p-b332fe01.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8ec95da5.entry.js → p-b4211012.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f652d79c.entry.js → p-ba650ca9.entry.js} +1 -1
- package/dist/brandsync-wc/{p-96d1ce21.entry.js → p-c91eb3eb.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bcafba87.entry.js → p-cd90ed34.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7091f130.entry.js → p-d1dfd37d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e58b1dbb.entry.js → p-d69e5034.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b63362e7.entry.js → p-da6fa359.entry.js} +1 -1
- package/dist/brandsync-wc/p-dadbb3f1.entry.js +1 -0
- package/dist/brandsync-wc/{p-d5d15d9f.entry.js → p-dbd49107.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9f9c1a1d.entry.js → p-dc974a34.entry.js} +1 -1
- package/dist/brandsync-wc/{p-35d98580.entry.js → p-e9a89ea0.entry.js} +1 -1
- package/dist/brandsync-wc/p-eb1c98a5.entry.js +1 -0
- package/dist/brandsync-wc/{p-bd2cc2c6.entry.js → p-f0a6ff05.entry.js} +1 -1
- package/dist/brandsync-wc/{p-39204377.entry.js → p-f4cb1337.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c4a16564.entry.js → p-fd1acc0f.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-accordion.cjs.entry.js +54 -0
- 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 +2 -2
- package/dist/cjs/bs-avatar.cjs.entry.js +1 -1
- package/dist/cjs/bs-badge.cjs.entry.js +2 -2
- package/dist/cjs/bs-breadcrumb-overflow.cjs.entry.js +2 -2
- package/dist/cjs/bs-breadcrumb.cjs.entry.js +2 -2
- 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 +3 -3
- 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 +2 -2
- package/dist/cjs/bs-chip-filter.cjs.entry.js +10 -6
- package/dist/cjs/bs-chip-informative.cjs.entry.js +2 -2
- package/dist/cjs/bs-chip-input.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 +26 -3
- package/dist/cjs/bs-data-table.cjs.entry.js +21 -4
- package/dist/cjs/bs-dialog.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-button.cjs.entry.js +3 -3
- 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 +3 -3
- package/dist/cjs/bs-navigation-header.cjs.entry.js +3 -3
- package/dist/cjs/bs-pagination.cjs.entry.js +2 -2
- package/dist/cjs/bs-progress-linear.cjs.entry.js +3 -3
- package/dist/cjs/bs-progress.cjs.entry.js +3 -3
- 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 +13 -3
- 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-toast.cjs.entry.js +2 -2
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{index-CdAh5BFg.js → index-Bj1mNOtg.js} +17 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/bs-accordion/bs-accordion.cmp.test.js +112 -0
- package/dist/collection/components/bs-accordion/bs-accordion.css +174 -0
- package/dist/collection/components/bs-accordion/bs-accordion.js +203 -0
- package/dist/collection/components/bs-accordion/bs-accordion.stories.js +63 -0
- 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-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.css +15 -5
- 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.css +15 -7
- 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.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 +19 -5
- package/dist/collection/components/bs-chip/bs-chip-filter/bs-chip-filter.js +11 -7
- package/dist/collection/components/bs-chip/bs-chip-informative/bs-chip-informative.js +1 -1
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +1 -1
- package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +44 -0
- package/dist/collection/components/bs-composer/bs-composer.js +29 -6
- 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.cmp.test.js +108 -0
- package/dist/collection/components/bs-data-table/bs-data-table.css +5 -3
- package/dist/collection/components/bs-data-table/bs-data-table.js +40 -2
- package/dist/collection/components/bs-input/bs-input.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-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- 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 +4 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.css +8 -155
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +11 -1
- 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 +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-toast/bs-toast.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 +6 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.css +43 -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.css +25 -0
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/components/bs-accordion.d.ts +11 -0
- package/dist/components/bs-accordion.js +1 -0
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-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.js +1 -1
- package/dist/components/bs-chip-informative.js +1 -1
- package/dist/components/bs-chip-input.js +1 -1
- package/dist/components/bs-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-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-progress-linear.js +1 -1
- package/dist/components/bs-progress.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-toast.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/p-Byl-ZwBI.js +1 -0
- package/dist/components/p-D4omPSOU.js +1 -0
- package/dist/components/{p-BIgPiuc-.js → p-DOApNIwD.js} +1 -1
- package/dist/components/{p-BUtz3sub.js → p-Dkv8x1_Z.js} +1 -1
- package/dist/components/{p-Rn1IWs8l.js → p-lvnXqw5g.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-accordion.entry.js +52 -0
- 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 +2 -2
- package/dist/esm/bs-avatar.entry.js +1 -1
- package/dist/esm/bs-badge.entry.js +2 -2
- package/dist/esm/bs-breadcrumb-overflow.entry.js +2 -2
- package/dist/esm/bs-breadcrumb.entry.js +2 -2
- 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 +3 -3
- 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 +2 -2
- package/dist/esm/bs-chip-filter.entry.js +10 -6
- package/dist/esm/bs-chip-informative.entry.js +2 -2
- package/dist/esm/bs-chip-input.entry.js +2 -2
- package/dist/esm/bs-composer-status-banner.entry.js +2 -2
- package/dist/esm/bs-composer.entry.js +26 -3
- package/dist/esm/bs-data-table.entry.js +21 -4
- package/dist/esm/bs-dialog.entry.js +1 -1
- package/dist/esm/bs-icon-button.entry.js +3 -3
- 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 +3 -3
- package/dist/esm/bs-navigation-header.entry.js +3 -3
- package/dist/esm/bs-pagination.entry.js +2 -2
- package/dist/esm/bs-progress-linear.entry.js +3 -3
- package/dist/esm/bs-progress.entry.js +3 -3
- 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 +13 -3
- 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-toast.entry.js +2 -2
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/{index-CvfB8CQv.js → index-CcPfH1dJ.js} +17 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-accordion/bs-accordion.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-accordion/bs-accordion.d.ts +51 -0
- package/dist/types/components/bs-accordion/bs-accordion.stories.d.ts +20 -0
- package/dist/types/components/bs-chip/bs-chip-filter/bs-chip-filter.d.ts +7 -2
- package/dist/types/components/bs-composer/bs-composer.d.ts +15 -1
- package/dist/types/components/bs-data-table/bs-data-table.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-data-table/bs-data-table.d.ts +5 -0
- package/dist/types/components.d.ts +133 -6
- package/package.json +1 -1
- package/dist/brandsync-wc/p-00d40aca.entry.js +0 -1
- package/dist/brandsync-wc/p-03676f8a.entry.js +0 -1
- package/dist/brandsync-wc/p-127d698d.entry.js +0 -1
- package/dist/brandsync-wc/p-1780224d.entry.js +0 -1
- package/dist/brandsync-wc/p-35bcb932.entry.js +0 -1
- package/dist/brandsync-wc/p-b2abd8d9.entry.js +0 -1
- package/dist/brandsync-wc/p-cd703364.entry.js +0 -1
- package/dist/brandsync-wc/p-fc9d52d4.entry.js +0 -1
- package/dist/components/p-B8JpGodL.js +0 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
const columns = [
|
|
3
|
+
{ key: 'name', label: 'Name' },
|
|
4
|
+
{ key: 'status', label: 'Status' },
|
|
5
|
+
];
|
|
6
|
+
const rows = [
|
|
7
|
+
{ id: 1, name: 'Amelia', status: 'Active' },
|
|
8
|
+
{ id: 2, name: 'Noah', status: 'Active' },
|
|
9
|
+
{ id: 3, name: 'Priya', status: 'On leave' },
|
|
10
|
+
];
|
|
11
|
+
describe('bs-data-table', () => {
|
|
12
|
+
describe('select-all checkbox', () => {
|
|
13
|
+
it('renders a select-all checkbox in the header when selectable', async () => {
|
|
14
|
+
const { root } = await render(h("bs-data-table", { selectable: true, columns: columns, rows: rows }));
|
|
15
|
+
const selectAll = root.shadowRoot.querySelector('thead input[type="checkbox"]');
|
|
16
|
+
expect(selectAll).not.toBeNull();
|
|
17
|
+
expect(selectAll.checked).toBe(false);
|
|
18
|
+
expect(selectAll.indeterminate).toBe(false);
|
|
19
|
+
});
|
|
20
|
+
it('does not render a select-all checkbox when not selectable', async () => {
|
|
21
|
+
const { root } = await render(h("bs-data-table", { columns: columns, rows: rows }));
|
|
22
|
+
expect(root.shadowRoot.querySelector('thead input[type="checkbox"]')).toBeNull();
|
|
23
|
+
});
|
|
24
|
+
it('becomes indeterminate when some but not all rows are selected', async () => {
|
|
25
|
+
const { root, waitForChanges } = await render(h("bs-data-table", { selectable: true, columns: columns, rows: rows }));
|
|
26
|
+
const rowCheckbox = root.shadowRoot.querySelector('tbody input[type="checkbox"]');
|
|
27
|
+
rowCheckbox.checked = true;
|
|
28
|
+
rowCheckbox.dispatchEvent(new Event('change'));
|
|
29
|
+
await waitForChanges();
|
|
30
|
+
const selectAll = root.shadowRoot.querySelector('thead input[type="checkbox"]');
|
|
31
|
+
expect(selectAll.indeterminate).toBe(true);
|
|
32
|
+
expect(selectAll.checked).toBe(false);
|
|
33
|
+
});
|
|
34
|
+
it('is checked when every row is selected', async () => {
|
|
35
|
+
const { root, waitForChanges } = await render(h("bs-data-table", { selectable: true, columns: columns, rows: rows }));
|
|
36
|
+
const rowCheckboxes = Array.from(root.shadowRoot.querySelectorAll('tbody input[type="checkbox"]'));
|
|
37
|
+
for (const checkbox of rowCheckboxes) {
|
|
38
|
+
checkbox.checked = true;
|
|
39
|
+
checkbox.dispatchEvent(new Event('change'));
|
|
40
|
+
}
|
|
41
|
+
await waitForChanges();
|
|
42
|
+
const selectAll = root.shadowRoot.querySelector('thead input[type="checkbox"]');
|
|
43
|
+
expect(selectAll.checked).toBe(true);
|
|
44
|
+
expect(selectAll.indeterminate).toBe(false);
|
|
45
|
+
});
|
|
46
|
+
it('selects all rows and emits bsRowSelect for each row when clicked', async () => {
|
|
47
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-data-table", { selectable: true, columns: columns, rows: rows }));
|
|
48
|
+
const selectSpy = spyOnEvent('bsRowSelect');
|
|
49
|
+
const selectAll = root.shadowRoot.querySelector('thead input[type="checkbox"]');
|
|
50
|
+
selectAll.checked = true;
|
|
51
|
+
selectAll.dispatchEvent(new Event('change'));
|
|
52
|
+
await waitForChanges();
|
|
53
|
+
expect(selectSpy).toHaveReceivedEventTimes(3);
|
|
54
|
+
const rowCheckboxes = Array.from(root.shadowRoot.querySelectorAll('tbody input[type="checkbox"]'));
|
|
55
|
+
expect(rowCheckboxes.every(checkbox => checkbox.checked)).toBe(true);
|
|
56
|
+
});
|
|
57
|
+
it('deselects all rows when unchecked', async () => {
|
|
58
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-data-table", { selectable: true, columns: columns, rows: rows }));
|
|
59
|
+
const selectAll = root.shadowRoot.querySelector('thead input[type="checkbox"]');
|
|
60
|
+
selectAll.checked = true;
|
|
61
|
+
selectAll.dispatchEvent(new Event('change'));
|
|
62
|
+
await waitForChanges();
|
|
63
|
+
const selectSpy = spyOnEvent('bsRowSelect');
|
|
64
|
+
selectAll.checked = false;
|
|
65
|
+
selectAll.dispatchEvent(new Event('change'));
|
|
66
|
+
await waitForChanges();
|
|
67
|
+
expect(selectSpy).toHaveReceivedEventTimes(3);
|
|
68
|
+
const rowCheckboxes = Array.from(root.shadowRoot.querySelectorAll('tbody input[type="checkbox"]'));
|
|
69
|
+
expect(rowCheckboxes.every(checkbox => !checkbox.checked)).toBe(true);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
describe('clearSelection()', () => {
|
|
73
|
+
it('resets selection state and emits bsRowSelect for previously selected rows', async () => {
|
|
74
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-data-table", { selectable: true, columns: columns, rows: rows }));
|
|
75
|
+
const rowCheckbox = root.shadowRoot.querySelector('tbody input[type="checkbox"]');
|
|
76
|
+
rowCheckbox.checked = true;
|
|
77
|
+
rowCheckbox.dispatchEvent(new Event('change'));
|
|
78
|
+
await waitForChanges();
|
|
79
|
+
const selectSpy = spyOnEvent('bsRowSelect');
|
|
80
|
+
await root.clearSelection();
|
|
81
|
+
await waitForChanges();
|
|
82
|
+
expect(selectSpy).toHaveReceivedEventTimes(1);
|
|
83
|
+
expect(selectSpy).toHaveReceivedEventDetail({ id: 1, selected: false });
|
|
84
|
+
const checkboxesAfterClear = Array.from(root.shadowRoot.querySelectorAll('tbody input[type="checkbox"]'));
|
|
85
|
+
expect(checkboxesAfterClear.every(checkbox => !checkbox.checked)).toBe(true);
|
|
86
|
+
});
|
|
87
|
+
it('emits no event when nothing was selected', async () => {
|
|
88
|
+
const { root, spyOnEvent } = await render(h("bs-data-table", { selectable: true, columns: columns, rows: rows }));
|
|
89
|
+
const selectSpy = spyOnEvent('bsRowSelect');
|
|
90
|
+
await root.clearSelection();
|
|
91
|
+
expect(selectSpy).toHaveReceivedEventTimes(0);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
describe('cellRenderer', () => {
|
|
95
|
+
it('renders default cell values as escaped text, never interpreted as HTML', async () => {
|
|
96
|
+
const maliciousRows = [{ id: 1, name: '<img src=x onerror="window.__xss = true">', status: 'Active' }];
|
|
97
|
+
const { root } = await render(h("bs-data-table", { columns: columns, rows: maliciousRows }));
|
|
98
|
+
const cell = root.shadowRoot.querySelector('tbody td');
|
|
99
|
+
expect(cell.querySelector('img')).toBeNull();
|
|
100
|
+
expect(cell.textContent).toBe('<img src=x onerror="window.__xss = true">');
|
|
101
|
+
});
|
|
102
|
+
it('still allows cellRenderer to render trusted custom HTML when explicitly supplied', async () => {
|
|
103
|
+
const { root } = await render(h("bs-data-table", { columns: columns, rows: rows, cellRenderer: () => '<button type="button">Edit</button>' }));
|
|
104
|
+
const cell = root.shadowRoot.querySelector('tbody td');
|
|
105
|
+
expect(cell.querySelector('button')).not.toBeNull();
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
|
+
--bs-data-table-cell-padding-y: var(--bs-spacing-200);
|
|
4
|
+
--bs-data-table-cell-padding-x: var(--bs-spacing-300);
|
|
3
5
|
}
|
|
4
6
|
|
|
5
7
|
.bs-data-table {
|
|
@@ -12,7 +14,7 @@
|
|
|
12
14
|
|
|
13
15
|
.bs-data-table__header-cell {
|
|
14
16
|
text-align: left;
|
|
15
|
-
padding: var(--bs-
|
|
17
|
+
padding: var(--bs-data-table-cell-padding-y) var(--bs-data-table-cell-padding-x);
|
|
16
18
|
border-bottom: 1px solid var(--bs-border-default);
|
|
17
19
|
font-weight: var(--bs-font-weight-semibold);
|
|
18
20
|
color: var(--bs-text-secondary);
|
|
@@ -45,12 +47,12 @@
|
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
.bs-data-table__cell {
|
|
48
|
-
padding: var(--bs-
|
|
50
|
+
padding: var(--bs-data-table-cell-padding-y) var(--bs-data-table-cell-padding-x);
|
|
49
51
|
border-bottom: 1px solid var(--bs-border-default);
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
.bs-data-table__select-col {
|
|
53
55
|
width: var(--bs-spacing-500);
|
|
54
|
-
padding: var(--bs-
|
|
56
|
+
padding: var(--bs-data-table-cell-padding-y) var(--bs-data-table-cell-padding-x);
|
|
55
57
|
border-bottom: 1px solid var(--bs-border-default);
|
|
56
58
|
}
|
|
@@ -53,12 +53,29 @@ export class BsDataTable {
|
|
|
53
53
|
this.selectedIds = next;
|
|
54
54
|
this.bsRowSelect.emit({ id: row.id, selected });
|
|
55
55
|
};
|
|
56
|
+
onSelectAllChange = (ev) => {
|
|
57
|
+
const selected = ev.target.checked;
|
|
58
|
+
this.selectedIds = selected ? new Set(this.rows.map(row => row.id)) : new Set();
|
|
59
|
+
for (const row of this.rows) {
|
|
60
|
+
this.bsRowSelect.emit({ id: row.id, selected });
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
/** Clears the current row selection and emits `bsRowSelect` for each row that was selected, so
|
|
64
|
+
* parent-held selection state stays in sync. Lets consumers reset selection without remounting
|
|
65
|
+
* the whole table. */
|
|
66
|
+
async clearSelection() {
|
|
67
|
+
const previouslySelected = Array.from(this.selectedIds);
|
|
68
|
+
this.selectedIds = new Set();
|
|
69
|
+
for (const id of previouslySelected) {
|
|
70
|
+
this.bsRowSelect.emit({ id, selected: false });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
56
73
|
render() {
|
|
57
|
-
return (h("table", { key: '
|
|
74
|
+
return (h("table", { key: '0b894a3cac62202447a21d4dd982236ef60b4ed0', part: "table", class: "bs-data-table" }, h("thead", { key: '9af94643a3cd4702a7b6fcbe2f713a3fea6773a9', part: "head" }, h("tr", { key: '3f5680cea9daeecf078a11d19f7a77f3e4de3145' }, this.selectable && (h("th", { key: '053da4081fdd79727c5cee13f11f725e4b92e1cb', class: "bs-data-table__select-col" }, this.rows.length > 0 && (h("input", { key: 'd45b4e81976dca3fc114c9685deb53e0f27ec8f5', type: "checkbox", "aria-label": "Select all rows", checked: this.selectedIds.size > 0 && this.selectedIds.size === this.rows.length, indeterminate: this.selectedIds.size > 0 && this.selectedIds.size < this.rows.length, onChange: this.onSelectAllChange })))), this.columns.map(column => {
|
|
58
75
|
const isSorted = this.sortColumn === column.key;
|
|
59
76
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
60
77
|
return (h("th", { part: "header-cell", class: "bs-data-table__header-cell", "aria-sort": ariaSort }, column.sortable ? (h("button", { type: "button", class: "bs-data-table__sort-button", onClick: () => this.onHeaderClick(column) }, column.label, isSorted && h("span", { class: "bs-data-table__sort-indicator" }, this.sortDirection === 'asc' ? ' ▲' : ' ▼'))) : (column.label)));
|
|
61
|
-
}))), h("tbody", { key: '
|
|
78
|
+
}))), h("tbody", { key: '8d3183f03ef2a4f39e8f4f8cdad66c8c57df5dca', part: "body" }, this.rows.map(row => (h("tr", { part: "row", class: "bs-data-table__row" }, this.selectable && (h("td", { class: "bs-data-table__select-col" }, h("input", { type: "checkbox", checked: this.selectedIds.has(row.id), onChange: ev => this.onRowCheckboxChange(row, ev) }))), this.columns.map(column => this.cellRenderer ? (
|
|
62
79
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
63
80
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
64
81
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -256,4 +273,25 @@ export class BsDataTable {
|
|
|
256
273
|
}
|
|
257
274
|
}];
|
|
258
275
|
}
|
|
276
|
+
static get methods() {
|
|
277
|
+
return {
|
|
278
|
+
"clearSelection": {
|
|
279
|
+
"complexType": {
|
|
280
|
+
"signature": "() => Promise<void>",
|
|
281
|
+
"parameters": [],
|
|
282
|
+
"references": {
|
|
283
|
+
"Promise": {
|
|
284
|
+
"location": "global",
|
|
285
|
+
"id": "global::Promise"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"return": "Promise<void>"
|
|
289
|
+
},
|
|
290
|
+
"docs": {
|
|
291
|
+
"text": "Clears the current row selection and emits `bsRowSelect` for each row that was selected, so\nparent-held selection state stays in sync. Lets consumers reset selection without remounting\nthe whole table.",
|
|
292
|
+
"tags": []
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
}
|
|
259
297
|
}
|
|
@@ -341,10 +341,10 @@ export class BsInput {
|
|
|
341
341
|
return (h("div", { part: "field", class: `bs-input__field bs-input__field--pin ${errorClass} ${disabledClass}` }, Array.from({ length: this.length }).map((_, i) => (h("input", { id: i === 0 ? 'control' : undefined, ref: el => (this.pinInputs[i] = el), part: "control", class: "bs-input__pin-cell", type: "text", inputMode: "numeric", maxLength: 1, value: this.value[i] ?? '', disabled: this.disabled, "aria-required": this.required ? 'true' : undefined, onInput: this.onPinInput(i), onKeyDown: this.onPinKeydown(i) })))));
|
|
342
342
|
}
|
|
343
343
|
render() {
|
|
344
|
-
return (h("div", { key: '
|
|
344
|
+
return (h("div", { key: '68d08fa3dce086122838a91898c60de837b7228e', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
345
345
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
346
346
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
347
|
-
h("label", { key: '
|
|
347
|
+
h("label", { key: '8b21f1f9873841feb455343960c0152576269314', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '622be18a55520512f9b5b4001e7435e7f544512e', part: "required", class: "bs-input__required", "aria-hidden": "true" }, "*")))), this.type === 'pin' ? this.renderPinField() : this.type === 'initials' ? this.renderInitialsField() : this.renderField(), this.error ? (h("span", { id: "description-or-error", part: "error", class: "bs-input__error" }, h("svg", { part: "error-icon", class: "bs-input__error-icon", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M8 5V8.5", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }), h("circle", { cx: "8", cy: "11", r: "0.75", fill: "currentColor" })), this.error)) : this.description ? (h("span", { id: "description-or-error", part: "description", class: "bs-input__description" }, this.description)) : null));
|
|
348
348
|
}
|
|
349
349
|
static get is() { return "bs-input"; }
|
|
350
350
|
static get encapsulation() { return "shadow"; }
|
|
@@ -22,7 +22,7 @@ import { h } from "@stencil/core";
|
|
|
22
22
|
*/
|
|
23
23
|
export class BsMenu {
|
|
24
24
|
render() {
|
|
25
|
-
return (h("div", { key: '
|
|
25
|
+
return (h("div", { key: '6dab08819f32793e41598ffe621761d319d45c1a', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: '6f391e9b01ea7e2d60fa8f9703a16af3d57a9b74' })));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "bs-menu"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -47,7 +47,7 @@ export class BsMenuItem {
|
|
|
47
47
|
this.bsSelect.emit();
|
|
48
48
|
};
|
|
49
49
|
render() {
|
|
50
|
-
return (h("button", { key: '
|
|
50
|
+
return (h("button", { key: '237e49e6c177aa2dc7427d55a00867ba48922c63', type: "button", part: "item", role: "menuitem", class: `bs-menu-item ${this.disabled ? 'bs-menu-item--disabled' : ''}`, disabled: this.disabled, "aria-disabled": this.disabled ? 'true' : undefined, onClick: this.onClick }, h("span", { key: '0e66b5e5fdcdc16348d0c6ba0b3ca4ee972ea6fa', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '15f7cc57d8783b3c2b23720b640b40b1748a7e4b', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '8d2c92e06c0fd88f02cbbc1d77604af1c30ae26c', part: "label", class: "bs-menu-item__label" }, h("slot", { key: '8b6c088f606f99538411f6366b349462924fc4d9' }))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "bs-menu-item"; }
|
|
53
53
|
static get encapsulation() { return "shadow"; }
|
|
@@ -87,7 +87,7 @@ export class BsPagination {
|
|
|
87
87
|
}
|
|
88
88
|
render() {
|
|
89
89
|
const pageList = this.getPageList();
|
|
90
|
-
return (h("nav", { key: '
|
|
90
|
+
return (h("nav", { key: '679f591fdfc485a7cd963238177c2586030f2354', "aria-label": "Pagination" }, h("ul", { key: '7d6f19579c56a49e749a523587b08d3c408c22f0', part: "list", class: "bs-pagination__list" }, h("li", { key: '1499d8990fc69d22b4367d1105a81dbac88fa3bb', part: "item", class: "bs-pagination__item" }, h("button", { key: '5b3b180e4334558780cf871f92e772c477bff843', part: "prev", type: "button", class: "bs-pagination__control", "aria-label": this.previousLabel, disabled: this.currentPage <= 1, onClick: () => this.goToPage(this.currentPage - 1) }, h(ChevronLeftIcon, { key: 'c50e237ec8b8208387334cd9bfb0deea5e348088' }))), pageList.map((item, index) => item === 'ellipsis' ? (h("li", { part: "item", class: "bs-pagination__item", key: `ellipsis-${index}` }, h("span", { part: "ellipsis", class: "bs-pagination__ellipsis", "aria-hidden": "true" }, h(EllipsisIcon, null)))) : (h("li", { part: "item", class: "bs-pagination__item", key: item }, h("button", { part: item === this.currentPage ? 'page current' : 'page', type: "button", class: `bs-pagination__control bs-pagination__page ${item === this.currentPage ? 'bs-pagination__page--current' : ''}`, "aria-label": `Go to page ${item}`, "aria-current": item === this.currentPage ? 'page' : undefined, onClick: () => this.goToPage(item) }, item)))), h("li", { key: '845a96e60020024653b93d0e0a5640d9f538fefa', part: "item", class: "bs-pagination__item" }, h("button", { key: '8173081e2dfd190d8b4665a21cdf46e698bd4f4b', part: "next", type: "button", class: "bs-pagination__control", "aria-label": this.nextLabel, disabled: this.currentPage >= this.safeTotalPages, onClick: () => this.goToPage(this.currentPage + 1) }, h(ChevronRightIcon, { key: '4ca0e3c1ac5b3529fad3296ce478111e881aeceb' }))))));
|
|
91
91
|
}
|
|
92
92
|
static get is() { return "bs-pagination"; }
|
|
93
93
|
static get encapsulation() { return "shadow"; }
|
|
@@ -64,7 +64,7 @@ export class BsProgress {
|
|
|
64
64
|
const isDeterminate = this.type === 'determinate';
|
|
65
65
|
const value = this.clampedValue;
|
|
66
66
|
const dashOffset = circumference * (1 - value / 100);
|
|
67
|
-
return (h("div", { key: '
|
|
67
|
+
return (h("div", { key: 'be12c5ee854fc0d82e66719458355543627f28b5', part: "container", class: "bs-progress" }, h("div", { key: '59eb972d0aeb33feea5ef4e8f4fa4eef99f7fcde', class: "bs-progress__box", style: { width: `${diameter}px`, height: `${diameter}px` }, role: "progressbar", "aria-valuemin": isDeterminate ? '0' : undefined, "aria-valuemax": isDeterminate ? '100' : undefined, "aria-valuenow": isDeterminate ? String(value) : undefined, "aria-busy": isDeterminate ? undefined : 'true' }, isDeterminate ? (h("svg", { class: "bs-progress__ring", width: diameter, height: diameter, viewBox: `0 0 ${diameter} ${diameter}` }, h("circle", { part: "track", class: "bs-progress__track", cx: diameter / 2, cy: diameter / 2, r: radius, "stroke-width": this.strokeWidth, fill: "none" }), h("circle", { part: "arc", class: "bs-progress__arc", cx: diameter / 2, cy: diameter / 2, r: radius, "stroke-width": this.strokeWidth, fill: "none", "stroke-linecap": "round", "stroke-dasharray": circumference, "stroke-dashoffset": dashOffset }))) : (
|
|
68
68
|
// Figma's indeterminate ring is a fading "comet tail" (transparent -> solid color),
|
|
69
69
|
// not a flat-colored partial arc -- SVG has no angular/conic gradient primitive, so a
|
|
70
70
|
// CSS conic-gradient (color varying by angle) + a radial-gradient mask (carving the
|
|
@@ -73,7 +73,7 @@ export class BsProgress {
|
|
|
73
73
|
h("div", { part: "arc", class: "bs-progress__spinner", style: {
|
|
74
74
|
'--bs-progress-spinner-stroke-width': `${this.strokeWidth}px`,
|
|
75
75
|
'--bs-progress-spinner-sweep': `${INDETERMINATE_SWEEP_DEGREES}deg`,
|
|
76
|
-
} }))), isDeterminate && this.showLabel && (h("span", { key: '
|
|
76
|
+
} }))), isDeterminate && this.showLabel && (h("span", { key: 'dab01ef700c872174a1f0ff9eff0ef9b534f6f89', part: "label", class: `bs-progress__label bs-progress__label--${this.size}` }, value, "%"))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "bs-progress"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -46,13 +46,13 @@ export class BsProgressLinear {
|
|
|
46
46
|
render() {
|
|
47
47
|
const isDeterminate = this.type === 'determinate';
|
|
48
48
|
const value = this.clampedValue;
|
|
49
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: 'a740b860487e2f163fe7103191bd34b7fb1633ad', part: "container", class: "bs-progress-linear" }, h("div", { key: 'a1400ddeb695c45edaff4a6501589e191237c0aa', part: "track", class: `bs-progress-linear__track bs-progress-linear__track--${this.size}`, role: "progressbar", "aria-valuemin": isDeterminate ? '0' : undefined, "aria-valuemax": isDeterminate ? '100' : undefined, "aria-valuenow": isDeterminate ? String(value) : undefined, "aria-busy": isDeterminate ? undefined : 'true' }, isDeterminate ? (h("div", { part: "fill", class: "bs-progress-linear__fill", style: { width: `${value}%` } })) : (
|
|
50
50
|
// Figma's indeterminate bar is a soft "comet" gradient segment (transparent -> blue ->
|
|
51
51
|
// transparent) sliding left-to-right across the track's full width in a loop -- the
|
|
52
52
|
// same fade concept as bs-progress's indeterminate ring's conic-gradient comet tail,
|
|
53
53
|
// but along a straight line via a linear-gradient + `transform: translateX(...)`
|
|
54
54
|
// keyframe animation instead of a rotating conic-gradient.
|
|
55
|
-
h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (h("span", { key: '
|
|
55
|
+
h("div", { part: "fill", class: "bs-progress-linear__fill bs-progress-linear__fill--indeterminate" }))), this.showLabel && this.hasLabelContent && (h("span", { key: '30ea4feeb5fa09cea28a89b515366b8d08fe6425', part: "label", class: "bs-progress-linear__label" }, h("slot", { key: 'b361ed81b85f3cd76ccb885ab1a0de5ec10b97b9' })))));
|
|
56
56
|
}
|
|
57
57
|
// The default slot's assigned content lives in the host's light DOM regardless of whether a
|
|
58
58
|
// <slot> is currently rendered in the shadow tree, so this can be computed directly from the
|
|
@@ -51,7 +51,7 @@ export class BsRadio {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
render() {
|
|
54
|
-
return (h("label", { key: '
|
|
54
|
+
return (h("label", { key: '0301eaf2b9f71e6e1eb7189ee424afa3eb66e3ea', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: 'dd12fc11f43171fbfa1955747477d2e538f0d1db', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, onChange: this.onChange }), h("span", { key: '3d6af7472becac1be3f080093587c54e5acbbb04', class: "bs-radio__hit-area" }, h("span", { key: 'e6b7384a4e87d6c216030bd4c5831b91f1bd409f', class: "bs-radio__state-layer" }, h("span", { key: '4b7c97752705660b97a6fb8b2157b5fcd37cd2e9', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: '5944fa6ac89d4806e8f243d8f216939f35d3f56f', part: "dot", class: "bs-radio__dot" })))), h("span", { key: 'df20ccc3d840b649f2b7a3ca627282e9a9ba480c', part: "label", class: "bs-radio__label" }, h("slot", { key: 'fc042c04e85bf2991b463d2fe0147ed9724c2aa5' }))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "bs-radio"; }
|
|
57
57
|
static get encapsulation() { return "shadow"; }
|
|
@@ -199,7 +199,7 @@ export class BsSlider {
|
|
|
199
199
|
render() {
|
|
200
200
|
const isRange = this.type === 'range';
|
|
201
201
|
const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
|
|
202
|
-
return (h("div", { key: '
|
|
202
|
+
return (h("div", { key: 'eea08bf9b13476683a75c02c3b2880acc2a5830d', class: rootClasses }, this.showLabel && (h("div", { key: 'ce7a0f60767b6eccf537e121ab588a273d82170b', class: "bs-slider__header" }, h("span", { key: '9de6ffe94a76e896e007d9928e11f1599443aa76', id: "bs-slider-label", part: "label", class: "bs-slider__label" }, this.label), isRange ? (h("span", { class: "bs-slider__value-fields" }, this.renderPercentField(this.percent(this.effectiveValueStart), this.onStartPercentFieldChange, this.ariaLabel ?? 'Start value'), h("span", { class: "bs-slider__separator" }, "\u2013"), this.renderPercentField(this.percent(this.effectiveValueEnd), this.onEndPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} end` : 'End value'))) : (this.renderPercentField(this.percent(this.value), this.onPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} value` : 'Value')))), h("div", { key: '7c1d900c13c1890b587c5ac4e326434b44e33895', class: "bs-slider__row" }, this.showLabel && (h("span", { key: '5ed265337a997272765c4a94a985081dc25cebea', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (h("span", { key: '63da44c53587366349113f9f7f7ec0bc290dad35', part: "bound", class: "bs-slider__bound" }, this.max)))));
|
|
203
203
|
}
|
|
204
204
|
static get is() { return "bs-slider"; }
|
|
205
205
|
static get encapsulation() { return "shadow"; }
|
|
@@ -53,7 +53,10 @@ describe('bs-snackbar', () => {
|
|
|
53
53
|
const { root } = await render(h("bs-snackbar", null, "Message"));
|
|
54
54
|
const close = root.shadowRoot.querySelector('[part="close"]');
|
|
55
55
|
expect(close).not.toBeNull();
|
|
56
|
-
|
|
56
|
+
// bs-icon-button sets aria-label on its OWN inner <button> (inside its own shadow DOM), not
|
|
57
|
+
// on its host element -- so the accessible name lives one shadow root deeper than `close` itself.
|
|
58
|
+
const innerButton = close.shadowRoot.querySelector('button');
|
|
59
|
+
expect(innerButton).toEqualAttribute('aria-label', 'Dismiss');
|
|
57
60
|
});
|
|
58
61
|
it('emits bsDismiss when the close button is clicked', async () => {
|
|
59
62
|
const { root, spyOnEvent } = await render(h("bs-snackbar", null, "Message"));
|
|
@@ -10,37 +10,21 @@
|
|
|
10
10
|
* @prop --bs-snackbar-actions-padding-y: Top/bottom padding of the actions area. Aliased to --bs-spacing-50.
|
|
11
11
|
* @prop --bs-snackbar-actions-padding-x: Right padding of the actions area (the bar's own right edge). Aliased to --bs-spacing-100.
|
|
12
12
|
* @prop --bs-snackbar-actions-gap: Gap between the action button and the close button. Aliased to --bs-spacing-50.
|
|
13
|
-
* @prop --bs-snackbar-action-radius: Corner radius of the action button. Aliased to --bs-border-radius-100.
|
|
14
|
-
* @prop --bs-snackbar-action-font-size: Action button font size. Aliased to --bs-font-size-sm.
|
|
15
|
-
* @prop --bs-snackbar-action-font-weight: Action button font weight. Aliased to --bs-font-weight-medium.
|
|
16
|
-
* @prop --bs-snackbar-action-line-height: Action button line height. Aliased to --bs-line-height-body-sm.
|
|
17
|
-
* @prop --bs-snackbar-close-radius: Corner radius of the close button. Aliased to --bs-border-radius-100.
|
|
18
13
|
* @prop --bs-snackbar-surface-default: Bar background, variant="default". Aliased to --bs-snackbar-bg-default (brandsync-tokens).
|
|
19
14
|
* @prop --bs-snackbar-color-default: Icon/message/close color, variant="default". Aliased to --bs-snackbar-text-default (brandsync-tokens) -- named "-color-", not "-text-", solely to avoid colliding with that vendored token's own name.
|
|
20
|
-
* @prop --bs-snackbar-action-border-default: Action button border, variant="default" (outlined, not filled). Aliased to --bs-blue-300.
|
|
21
|
-
* @prop --bs-snackbar-action-text-default: Action button text, variant="default". Aliased to --bs-snackbar-action-text (brandsync-tokens).
|
|
22
15
|
* @prop --bs-snackbar-surface-info: Bar background, variant="info". Aliased to --bs-color-info-container.
|
|
23
16
|
* @prop --bs-snackbar-text-info: Icon/message/close color, variant="info". Aliased to --bs-text-info.
|
|
24
|
-
* @prop --bs-snackbar-action-bg-info: Action button background, variant="info". Aliased to --bs-snackbar-bg-info (brandsync-tokens).
|
|
25
|
-
* @prop --bs-snackbar-action-bg-info-hover: Action button background, variant="info", hover. Aliased to --bs-color-info-hover.
|
|
26
|
-
* @prop --bs-snackbar-action-bg-info-pressed: Action button background, variant="info", pressed. Aliased to --bs-color-info-pressed.
|
|
27
17
|
* @prop --bs-snackbar-surface-warning: Bar background, variant="warning". Aliased to --bs-color-warning-container.
|
|
28
18
|
* @prop --bs-snackbar-text-warning: Icon/message/close color, variant="warning". Aliased to --bs-text-warning.
|
|
29
|
-
* @prop --bs-snackbar-action-bg-warning: Action button background, variant="warning". Aliased to --bs-snackbar-bg-warning (brandsync-tokens).
|
|
30
|
-
* @prop --bs-snackbar-action-bg-warning-hover: Action button background, variant="warning", hover. Aliased to --bs-color-warning-hover.
|
|
31
|
-
* @prop --bs-snackbar-action-bg-warning-pressed: Action button background, variant="warning", pressed. Aliased to --bs-color-warning-pressed.
|
|
32
19
|
* @prop --bs-snackbar-surface-success: Bar background, variant="success". Aliased to --bs-color-success-container.
|
|
33
20
|
* @prop --bs-snackbar-text-success: Icon/message/close color, variant="success". Aliased to --bs-text-success.
|
|
34
|
-
* @prop --bs-snackbar-action-bg-success: Action button background, variant="success". Aliased to --bs-snackbar-bg-success (brandsync-tokens).
|
|
35
|
-
* @prop --bs-snackbar-action-bg-success-hover: Action button background, variant="success", hover. Aliased to --bs-color-success-hover.
|
|
36
|
-
* @prop --bs-snackbar-action-bg-success-pressed: Action button background, variant="success", pressed. Aliased to --bs-color-success-pressed.
|
|
37
21
|
* @prop --bs-snackbar-surface-error: Bar background, variant="error". Aliased to --bs-color-error-container.
|
|
38
22
|
* @prop --bs-snackbar-text-error: Icon/message/close color, variant="error". Aliased to --bs-text-error.
|
|
39
|
-
* @prop --bs-snackbar-action-bg-error: Action button background, variant="error". Aliased to --bs-snackbar-bg-error (brandsync-tokens).
|
|
40
|
-
* @prop --bs-snackbar-action-bg-error-hover: Action button background, variant="error", hover. Aliased to --bs-color-error-hover.
|
|
41
|
-
* @prop --bs-snackbar-action-bg-error-pressed: Action button background, variant="error", pressed. Aliased to --bs-color-error-pressed.
|
|
42
|
-
* @prop --bs-snackbar-action-text-on-action: Action button text, every colored (filled) variant. Aliased to --bs-text-on-action.
|
|
43
23
|
* @prop --bs-snackbar-spinner-track: Loading spinner's background ring. Aliased to --bs-neutral-200.
|
|
24
|
+
*
|
|
25
|
+
* The action/close buttons are composed from bs-button/bs-icon-button (see bs-snackbar.tsx) --
|
|
26
|
+
* their own fill colors, hover/pressed states, and focus rings are governed by THOSE components'
|
|
27
|
+
* own custom properties (--bs-button-*, --bs-icon-button-*), not duplicated here.
|
|
44
28
|
*/
|
|
45
29
|
:host {
|
|
46
30
|
display: inline-flex;
|
|
@@ -59,13 +43,6 @@
|
|
|
59
43
|
--bs-snackbar-actions-padding-x: var(--bs-spacing-100);
|
|
60
44
|
--bs-snackbar-actions-gap: var(--bs-spacing-50);
|
|
61
45
|
|
|
62
|
-
--bs-snackbar-action-radius: var(--bs-border-radius-100);
|
|
63
|
-
--bs-snackbar-action-font-size: var(--bs-font-size-sm);
|
|
64
|
-
--bs-snackbar-action-font-weight: var(--bs-font-weight-medium);
|
|
65
|
-
--bs-snackbar-action-line-height: var(--bs-line-height-body-sm);
|
|
66
|
-
|
|
67
|
-
--bs-snackbar-close-radius: var(--bs-border-radius-100);
|
|
68
|
-
|
|
69
46
|
--bs-snackbar-surface-default: var(--bs-snackbar-bg-default);
|
|
70
47
|
/* Named "-color-", not "-text-", solely to avoid a self-referential cycle: the brandsync-tokens
|
|
71
48
|
vendored token is ALSO literally named --bs-snackbar-text-default, so declaring a property of
|
|
@@ -73,34 +50,19 @@
|
|
|
73
50
|
per the CSS spec -- the property would compute to its initial value (nothing), not fall back
|
|
74
51
|
to the vendored one. */
|
|
75
52
|
--bs-snackbar-color-default: var(--bs-snackbar-text-default);
|
|
76
|
-
--bs-snackbar-action-border-default: var(--bs-blue-300);
|
|
77
|
-
--bs-snackbar-action-text-default: var(--bs-snackbar-action-text);
|
|
78
53
|
|
|
79
54
|
--bs-snackbar-surface-info: var(--bs-color-info-container);
|
|
80
55
|
--bs-snackbar-text-info: var(--bs-text-info);
|
|
81
|
-
--bs-snackbar-action-bg-info: var(--bs-snackbar-bg-info);
|
|
82
|
-
--bs-snackbar-action-bg-info-hover: var(--bs-color-info-hover);
|
|
83
|
-
--bs-snackbar-action-bg-info-pressed: var(--bs-color-info-pressed);
|
|
84
56
|
|
|
85
57
|
--bs-snackbar-surface-warning: var(--bs-color-warning-container);
|
|
86
58
|
--bs-snackbar-text-warning: var(--bs-text-warning);
|
|
87
|
-
--bs-snackbar-action-bg-warning: var(--bs-snackbar-bg-warning);
|
|
88
|
-
--bs-snackbar-action-bg-warning-hover: var(--bs-color-warning-hover);
|
|
89
|
-
--bs-snackbar-action-bg-warning-pressed: var(--bs-color-warning-pressed);
|
|
90
59
|
|
|
91
60
|
--bs-snackbar-surface-success: var(--bs-color-success-container);
|
|
92
61
|
--bs-snackbar-text-success: var(--bs-text-success);
|
|
93
|
-
--bs-snackbar-action-bg-success: var(--bs-snackbar-bg-success);
|
|
94
|
-
--bs-snackbar-action-bg-success-hover: var(--bs-color-success-hover);
|
|
95
|
-
--bs-snackbar-action-bg-success-pressed: var(--bs-color-success-pressed);
|
|
96
62
|
|
|
97
63
|
--bs-snackbar-surface-error: var(--bs-color-error-container);
|
|
98
64
|
--bs-snackbar-text-error: var(--bs-text-error);
|
|
99
|
-
--bs-snackbar-action-bg-error: var(--bs-snackbar-bg-error);
|
|
100
|
-
--bs-snackbar-action-bg-error-hover: var(--bs-color-error-hover);
|
|
101
|
-
--bs-snackbar-action-bg-error-pressed: var(--bs-color-error-pressed);
|
|
102
65
|
|
|
103
|
-
--bs-snackbar-action-text-on-action: var(--bs-text-on-action);
|
|
104
66
|
--bs-snackbar-spinner-track: var(--bs-neutral-200);
|
|
105
67
|
}
|
|
106
68
|
|
|
@@ -206,116 +168,7 @@
|
|
|
206
168
|
padding: var(--bs-snackbar-actions-padding-y) var(--bs-snackbar-actions-padding-x) var(--bs-snackbar-actions-padding-y) 0;
|
|
207
169
|
}
|
|
208
170
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
font-family: inherit;
|
|
214
|
-
font-size: var(--bs-snackbar-action-font-size);
|
|
215
|
-
font-weight: var(--bs-snackbar-action-font-weight);
|
|
216
|
-
line-height: calc(var(--bs-snackbar-action-line-height) * 1px);
|
|
217
|
-
white-space: nowrap;
|
|
218
|
-
cursor: pointer;
|
|
219
|
-
border: none;
|
|
220
|
-
background: transparent;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
/* default is the only variant whose action button is outlined (transparent, bordered) rather than
|
|
224
|
-
filled -- matches the Figma spec's dark neutral bar using a lighter bordered button instead of a
|
|
225
|
-
solid fill, since a solid fill would need its own distinct color unrelated to the bar's own dark
|
|
226
|
-
surface. */
|
|
227
|
-
.bs-snackbar--default .bs-snackbar__action {
|
|
228
|
-
border: 1px solid var(--bs-snackbar-action-border-default);
|
|
229
|
-
color: var(--bs-snackbar-action-text-default);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.bs-snackbar--info .bs-snackbar__action {
|
|
233
|
-
background: var(--bs-snackbar-action-bg-info);
|
|
234
|
-
color: var(--bs-snackbar-action-text-on-action);
|
|
235
|
-
}
|
|
236
|
-
.bs-snackbar--info .bs-snackbar__action:hover {
|
|
237
|
-
background: var(--bs-snackbar-action-bg-info-hover);
|
|
238
|
-
}
|
|
239
|
-
.bs-snackbar--info .bs-snackbar__action:active {
|
|
240
|
-
background: var(--bs-snackbar-action-bg-info-pressed);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.bs-snackbar--warning .bs-snackbar__action {
|
|
244
|
-
background: var(--bs-snackbar-action-bg-warning);
|
|
245
|
-
color: var(--bs-snackbar-action-text-on-action);
|
|
246
|
-
}
|
|
247
|
-
.bs-snackbar--warning .bs-snackbar__action:hover {
|
|
248
|
-
background: var(--bs-snackbar-action-bg-warning-hover);
|
|
249
|
-
}
|
|
250
|
-
.bs-snackbar--warning .bs-snackbar__action:active {
|
|
251
|
-
background: var(--bs-snackbar-action-bg-warning-pressed);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
.bs-snackbar--success .bs-snackbar__action {
|
|
255
|
-
background: var(--bs-snackbar-action-bg-success);
|
|
256
|
-
color: var(--bs-snackbar-action-text-on-action);
|
|
257
|
-
}
|
|
258
|
-
.bs-snackbar--success .bs-snackbar__action:hover {
|
|
259
|
-
background: var(--bs-snackbar-action-bg-success-hover);
|
|
260
|
-
}
|
|
261
|
-
.bs-snackbar--success .bs-snackbar__action:active {
|
|
262
|
-
background: var(--bs-snackbar-action-bg-success-pressed);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
.bs-snackbar--error .bs-snackbar__action {
|
|
266
|
-
background: var(--bs-snackbar-action-bg-error);
|
|
267
|
-
color: var(--bs-snackbar-action-text-on-action);
|
|
268
|
-
}
|
|
269
|
-
.bs-snackbar--error .bs-snackbar__action:hover {
|
|
270
|
-
background: var(--bs-snackbar-action-bg-error-hover);
|
|
271
|
-
}
|
|
272
|
-
.bs-snackbar--error .bs-snackbar__action:active {
|
|
273
|
-
background: var(--bs-snackbar-action-bg-error-pressed);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.bs-snackbar__close {
|
|
277
|
-
display: flex;
|
|
278
|
-
align-items: center;
|
|
279
|
-
justify-content: center;
|
|
280
|
-
width: 44px;
|
|
281
|
-
height: 44px;
|
|
282
|
-
flex-shrink: 0;
|
|
283
|
-
padding: 0;
|
|
284
|
-
border: none;
|
|
285
|
-
background: transparent;
|
|
286
|
-
border-radius: var(--bs-snackbar-close-radius);
|
|
287
|
-
color: inherit;
|
|
288
|
-
cursor: pointer;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.bs-snackbar__close svg {
|
|
292
|
-
width: 24px;
|
|
293
|
-
height: 24px;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/* Hover/active feedback for the close button (every variant) and the default variant's outlined
|
|
297
|
-
action button -- both have a transparent background with only text/border color, so there's no
|
|
298
|
-
solid fill to darken the way the filled colored-variant action buttons above do. `opacity` was
|
|
299
|
-
tried here first and was wrong: dimming a transparent element's opacity blends it TOWARD
|
|
300
|
-
whatever's behind it, which on the light pastel info/warning/success/error surfaces made a
|
|
301
|
-
"pressed" dark-colored button look LIGHTER/washed-out -- backwards from a pressed state. A
|
|
302
|
-
`color-mix()` tint using `currentColor` fixes that (a real added tint, not a blend-toward-behind)
|
|
303
|
-
while still doing the right thing on the dark `default` surface, where content is white and a
|
|
304
|
-
light-tint hover is the correct/expected direction (same idea as a ripple highlight on a dark
|
|
305
|
-
surface). Also automatically matches whichever variant's color is active, no separate per-variant
|
|
306
|
-
hover token needed here. */
|
|
307
|
-
.bs-snackbar--default .bs-snackbar__action:hover,
|
|
308
|
-
.bs-snackbar__close:hover {
|
|
309
|
-
background: color-mix(in srgb, currentColor 12%, transparent);
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.bs-snackbar--default .bs-snackbar__action:active,
|
|
313
|
-
.bs-snackbar__close:active {
|
|
314
|
-
background: color-mix(in srgb, currentColor 24%, transparent);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.bs-snackbar__action:focus-visible,
|
|
318
|
-
.bs-snackbar__close:focus-visible {
|
|
319
|
-
outline: 2px solid currentColor;
|
|
320
|
-
outline-offset: 2px;
|
|
321
|
-
}
|
|
171
|
+
/* The action/close buttons are now composed from the shared bs-button/bs-icon-button components
|
|
172
|
+
(see bs-snackbar.tsx) instead of hand-rolled <button> markup -- all the button-level styling
|
|
173
|
+
(fill colors, hover/pressed states, focus rings, and slotted-icon sizing) lives in those
|
|
174
|
+
components' own CSS, so there's nothing left to style here. */
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
// Maps each snackbar variant to the bs-button variant its action button composes -- 'default'
|
|
3
|
+
// (the dark neutral bar) uses 'outlined' since there's no bs-button variant tuned for a dark
|
|
4
|
+
// surface; every colored variant maps 1:1 to the same-named bs-button variant.
|
|
5
|
+
const ACTION_VARIANT = {
|
|
6
|
+
default: 'outlined',
|
|
7
|
+
info: 'info',
|
|
8
|
+
warning: 'warning',
|
|
9
|
+
success: 'success',
|
|
10
|
+
error: 'error',
|
|
11
|
+
};
|
|
2
12
|
/**
|
|
3
13
|
* A transient status bar for confirming the result of an action (e.g. "Files uploaded
|
|
4
14
|
* successfully.") -- an icon (or loading spinner), a message, an optional action, and a close
|
|
@@ -51,7 +61,7 @@ export class BsSnackbar {
|
|
|
51
61
|
this.bsDismiss.emit();
|
|
52
62
|
};
|
|
53
63
|
render() {
|
|
54
|
-
return (h("div", { key: '
|
|
64
|
+
return (h("div", { key: '21d9ad89971ec2f6c8a546bb601caf9fe0fdeaad', part: "container", class: `bs-snackbar bs-snackbar--${this.variant}`, role: "status", "aria-live": this.variant === 'error' ? 'assertive' : 'polite' }, h("div", { key: '4c0a6eeae82f0183269952d12203030c8e38707f', class: "bs-snackbar__content" }, h("span", { key: 'd7702b65066518434b571fdc2a9bba4b715daf80', part: "icon", class: "bs-snackbar__icon", "aria-hidden": "true" }, this.loading ? h("span", { class: "bs-snackbar__spinner" }) : h(CheckCircleIcon, null)), h("span", { key: '943f72a2a1829a2859daef2cf1852d35d8da8a1e', part: "message", class: "bs-snackbar__message" }, h("slot", { key: 'c5cc1160992c936603abb57201beabe1e6eb4664' }))), h("div", { key: '31764bce2583aa5c794084ea1f532b5bca7e1f8c', class: "bs-snackbar__actions" }, this.actionLabel && (h("bs-button", { key: 'b7ae59d32bd58358f9090251f0fcd033925b4cba', part: "action", variant: ACTION_VARIANT[this.variant], size: "sm", onClick: this.onAction }, this.actionLabel)), h("bs-icon-button", { key: 'ce995bb3ba94cd67628bb0d281395b700c6075df', part: "close", variant: "subtle", size: "md", ariaLabel: "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: '51562d0658077d511ce46466386735456c4b6a77' })))));
|
|
55
65
|
}
|
|
56
66
|
static get is() { return "bs-snackbar"; }
|
|
57
67
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,8 +51,8 @@ export class BsSourceLink {
|
|
|
51
51
|
};
|
|
52
52
|
render() {
|
|
53
53
|
const inner = [
|
|
54
|
-
h("span", { key: '
|
|
55
|
-
h("span", { key: '
|
|
54
|
+
h("span", { key: 'c492c873401ffec62e4079b9254f9e8d82ef2160', class: "bs-source-link__left" }, h("span", { key: 'aa6e13547e540d9bd649a31fd185edb75db27af0', class: "bs-source-link__filename-row" }, h("span", { key: 'f540d25f1504c5a70dfcff3d46b69545b30cc3ce', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: 'bb9c39f0f55161fef91d693da05d966ed0e8b52f', name: "icon" }, h(FileTextIcon, { key: 'cd092cc8acc6c4dc94b1fd0df3813eea321a6322' }))), h("p", { key: '8b80cdf2e65bba6f79ce4df85df9e7891b4688eb', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: '6b1403dc64d26773e61a385ce79c15a9e526bca8', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: 'a10ac29439339287e551cd5d67a68b57ba32a732', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '219e40bd91dd4c9f830f2124474408c10d660241', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: '47da27d3758239a74b6f3baf246c5cdc90dbeaec', part: "version", class: "bs-source-link__version" }, this.version)))),
|
|
55
|
+
h("span", { key: '383bdb322e97930920f11312d6b3e475fc490c0e', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '543df594e433598dfe2275fab1e0af2ba3431788' })),
|
|
56
56
|
];
|
|
57
57
|
return this.href ? (h("a", { class: "bs-source-link", href: this.href, target: this.target, rel: "noopener noreferrer", onClick: this.onClick }, inner)) : (h("button", { type: "button", class: "bs-source-link", onClick: this.onClick }, inner));
|
|
58
58
|
}
|