@brandsync/wc 1.12.1 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/CONVENTIONS.md +109 -0
- package/REFERENCE.md +1357 -0
- package/custom-elements.json +2628 -338
- package/dist/brandsync-wc/brandsync-wc.css +1 -1783
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-83c90489.entry.js → p-00be9a64.entry.js} +1 -1
- package/dist/brandsync-wc/{p-b9ccd9d1.entry.js → p-020cb767.entry.js} +1 -1
- package/dist/brandsync-wc/p-046a53de.entry.js +1 -0
- package/dist/brandsync-wc/{p-282ddbee.entry.js → p-07966676.entry.js} +1 -1
- package/dist/brandsync-wc/p-0cb6fc39.entry.js +1 -0
- package/dist/brandsync-wc/{p-2497d128.entry.js → p-0e940ee1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e5daa6ca.entry.js → p-10290c41.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e2556b4e.entry.js → p-144b6ac8.entry.js} +1 -1
- package/dist/brandsync-wc/p-1b5cc9b8.entry.js +1 -0
- package/dist/brandsync-wc/p-23b56775.entry.js +1 -0
- package/dist/brandsync-wc/{p-a9169157.entry.js → p-23cc532f.entry.js} +1 -1
- package/dist/brandsync-wc/{p-81605b82.entry.js → p-361aef36.entry.js} +1 -1
- package/dist/brandsync-wc/{p-89fabf27.entry.js → p-3789c7a5.entry.js} +1 -1
- package/dist/brandsync-wc/p-3f6682f8.entry.js +1 -0
- package/dist/brandsync-wc/{p-f5180578.entry.js → p-4054a944.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fc069773.entry.js → p-45cb3e6d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-de110ad0.entry.js → p-47b7fe76.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2f4e08e1.entry.js → p-47cd19aa.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3a1af63a.entry.js → p-4bbc4809.entry.js} +1 -1
- package/dist/brandsync-wc/{p-247e36ad.entry.js → p-4ea435a6.entry.js} +1 -1
- package/dist/brandsync-wc/{p-56c37e0a.entry.js → p-4ea9b6a1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1978e63c.entry.js → p-53362609.entry.js} +1 -1
- package/dist/brandsync-wc/p-658532b7.entry.js +1 -0
- package/dist/brandsync-wc/p-68f0be29.entry.js +1 -0
- package/dist/brandsync-wc/{p-09bc1923.entry.js → p-694fe468.entry.js} +1 -1
- package/dist/brandsync-wc/{p-78f4fcf0.entry.js → p-6ca1e51b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-52cb2358.entry.js → p-6e923ebc.entry.js} +1 -1
- package/dist/brandsync-wc/p-7e24dbd7.entry.js +1 -0
- package/dist/brandsync-wc/{p-00a0d489.entry.js → p-8048d033.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2368a92e.entry.js → p-8184d7de.entry.js} +1 -1
- package/dist/brandsync-wc/p-8390a155.entry.js +1 -0
- package/dist/brandsync-wc/{p-0b2d3b7e.entry.js → p-86028548.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fcee0dc4.entry.js → p-89fa7567.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7796b93f.entry.js → p-8c9938a5.entry.js} +1 -1
- package/dist/brandsync-wc/{p-68fcd4a4.entry.js → p-9125632c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-416322bd.entry.js → p-94d435a2.entry.js} +1 -1
- package/dist/brandsync-wc/{p-69c0a85d.entry.js → p-95f034fc.entry.js} +1 -1
- package/dist/brandsync-wc/p-9b58c0c5.entry.js +1 -0
- package/dist/brandsync-wc/{p-39a26c64.entry.js → p-9cf8274a.entry.js} +1 -1
- package/dist/brandsync-wc/p-9d12b1fb.entry.js +1 -0
- package/dist/brandsync-wc/{p-5ba90a13.entry.js → p-9d660c03.entry.js} +1 -1
- package/dist/brandsync-wc/p-D3SkQJpw.js +3 -0
- package/dist/brandsync-wc/{p-7f954939.entry.js → p-a28ef52e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-09435f41.entry.js → p-a5659499.entry.js} +1 -1
- package/dist/brandsync-wc/p-ab07c9b5.entry.js +1 -0
- package/dist/brandsync-wc/p-b0b2e525.entry.js +1 -0
- package/dist/brandsync-wc/p-b6ac1b50.entry.js +1 -0
- package/dist/brandsync-wc/p-bee30626.entry.js +1 -0
- package/dist/brandsync-wc/p-bf8bd386.entry.js +1 -0
- package/dist/brandsync-wc/{p-1aab6d07.entry.js → p-c05ee501.entry.js} +1 -1
- package/dist/brandsync-wc/p-c3da3080.entry.js +1 -0
- package/dist/brandsync-wc/p-c679b631.entry.js +1 -0
- package/dist/brandsync-wc/p-cceb8484.entry.js +1 -0
- package/dist/brandsync-wc/p-cd53bba9.entry.js +1 -0
- package/dist/brandsync-wc/p-ce16f038.entry.js +1 -0
- package/dist/brandsync-wc/{p-491b51e6.entry.js → p-d5a6098d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f15d9524.entry.js → p-d64cae57.entry.js} +1 -1
- package/dist/brandsync-wc/p-dfad8c0a.entry.js +1 -0
- package/dist/brandsync-wc/p-e0504a4b.entry.js +1 -0
- package/dist/brandsync-wc/{p-0ee4126c.entry.js → p-e1b7bea7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0b7c77c1.entry.js → p-e65d286c.entry.js} +1 -1
- package/dist/brandsync-wc/p-ed5c2d97.entry.js +1 -0
- package/dist/brandsync-wc/p-f134a502.entry.js +1 -0
- package/dist/brandsync-wc/p-f271e1d2.entry.js +1 -0
- package/dist/brandsync-wc/{p-3f09296a.entry.js → p-f3eca1ce.entry.js} +1 -1
- package/dist/brandsync-wc/{p-617bd13a.entry.js → p-f8d47004.entry.js} +1 -1
- package/dist/brandsync-wc/p-fa34fe20.entry.js +1 -0
- package/dist/brandsync-wc/{p-2177042f.entry.js → p-fa6b9750.entry.js} +1 -1
- package/dist/brandsync-wc/p-fb4d0093.entry.js +1 -0
- package/dist/brandsync-wc/{p-78a69a59.entry.js → p-fc76031e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-be3dd446.entry.js → p-ffc07eb5.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- package/dist/cjs/bs-accordion-group.cjs.entry.js +33 -0
- package/dist/cjs/bs-accordion.cjs.entry.js +1 -1
- 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 +9 -5
- 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 +4 -2
- package/dist/cjs/bs-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-carousel.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +18 -2
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +20 -2
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +25 -3
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +4 -2
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +3 -3
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +4 -2
- package/dist/cjs/bs-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-filter.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-informative.cjs.entry.js +1 -1
- package/dist/cjs/bs-chip-input.cjs.entry.js +4 -2
- package/dist/cjs/bs-citation-preview.cjs.entry.js +29 -0
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +11 -3
- package/dist/cjs/bs-composer.cjs.entry.js +36 -7
- package/dist/cjs/bs-cookie-consent.cjs.entry.js +1 -1
- package/dist/cjs/bs-data-table.cjs.entry.js +5 -3
- package/dist/cjs/bs-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/bs-dialog.cjs.entry.js +4 -2
- package/dist/cjs/bs-error-page.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +1 -1
- package/dist/cjs/bs-file-upload.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-icon-tile.cjs.entry.js +1 -1
- package/dist/cjs/bs-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/bs-input_3.cjs.entry.js +15 -7
- package/dist/cjs/bs-logo.cjs.entry.js +1 -1
- package/dist/cjs/bs-message-list.cjs.entry.js +71 -0
- package/dist/cjs/bs-message.cjs.entry.js +25 -0
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +9 -3
- package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-onboarding-checklist.cjs.entry.js +1 -1
- package/dist/cjs/bs-pagination.cjs.entry.js +6 -2
- package/dist/cjs/bs-popover.cjs.entry.js +153 -0
- package/dist/cjs/bs-product-tour.cjs.entry.js +1 -1
- 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-qr-code.cjs.entry.js +2 -2
- package/dist/cjs/bs-radio.cjs.entry.js +2 -2
- package/dist/cjs/bs-session-timeout.cjs.entry.js +2 -2
- package/dist/cjs/bs-side-panel.cjs.entry.js +164 -0
- package/dist/cjs/bs-skeleton.cjs.entry.js +51 -0
- package/dist/cjs/bs-slider.cjs.entry.js +7 -3
- 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-spinner.cjs.entry.js +24 -0
- 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_3.cjs.entry.js +4 -4
- package/dist/cjs/bs-timepicker.cjs.entry.js +8 -4
- package/dist/cjs/bs-toast.cjs.entry.js +4 -2
- package/dist/cjs/bs-tooltip-trigger.cjs.entry.js +46 -0
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/bs-whats-new.cjs.entry.js +1 -1
- package/dist/cjs/index-BYfMRtlW.js +1863 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +9 -0
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.cmp.test.js +39 -0
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.css +10 -0
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.js +86 -0
- package/dist/collection/components/bs-accordion-group/bs-accordion-group.stories.js +18 -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 +48 -4
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +1 -1
- package/dist/collection/components/bs-breadcrumb/bs-breadcrumbs/bs-breadcrumbs.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +23 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.cmp.test.js +10 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +178 -2
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.cmp.test.js +6 -0
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +200 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.cmp.test.js +8 -0
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.css +4 -0
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +223 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +24 -2
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.css +1 -4
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +3 -6
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +23 -1
- package/dist/collection/components/bs-chip/bs-chip-input/bs-chip-input.js +23 -1
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.cmp.test.js +34 -0
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.css +36 -0
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.js +154 -0
- package/dist/collection/components/bs-citation-preview/bs-citation-preview.stories.js +22 -0
- package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +29 -2
- package/dist/collection/components/bs-composer/bs-composer.css +16 -0
- package/dist/collection/components/bs-composer/bs-composer.js +234 -6
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +5 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.css +16 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +49 -1
- package/dist/collection/components/bs-data-table/bs-data-table.js +24 -2
- package/dist/collection/components/bs-dialog/bs-dialog.js +23 -1
- package/dist/collection/components/bs-input/bs-input.js +92 -4
- 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-message/bs-message.cmp.test.js +36 -0
- package/dist/collection/components/bs-message/bs-message.css +77 -0
- package/dist/collection/components/bs-message/bs-message.js +156 -0
- package/dist/collection/components/bs-message/bs-message.stories.js +33 -0
- package/dist/collection/components/bs-message-list/bs-message-list.cmp.test.js +58 -0
- package/dist/collection/components/bs-message-list/bs-message-list.css +40 -0
- package/dist/collection/components/bs-message-list/bs-message-list.js +161 -0
- package/dist/collection/components/bs-message-list/bs-message-list.stories.js +17 -0
- package/dist/collection/components/bs-pagination/bs-pagination.cmp.test.js +5 -0
- package/dist/collection/components/bs-pagination/bs-pagination.js +45 -1
- package/dist/collection/components/bs-popover/bs-popover.cmp.test.js +107 -0
- package/dist/collection/components/bs-popover/bs-popover.css +61 -0
- package/dist/collection/components/bs-popover/bs-popover.js +247 -0
- package/dist/collection/components/bs-popover/bs-popover.stories.js +26 -0
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-qr-code/bs-qr-code.js +1 -1
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +1 -1
- package/dist/collection/components/bs-side-panel/bs-side-panel.cmp.test.js +117 -0
- package/dist/collection/components/bs-side-panel/bs-side-panel.css +77 -0
- package/dist/collection/components/bs-side-panel/bs-side-panel.js +325 -0
- package/dist/collection/components/bs-side-panel/bs-side-panel.stories.js +24 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.cmp.test.js +49 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.css +62 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.js +204 -0
- package/dist/collection/components/bs-skeleton/bs-skeleton.stories.js +43 -0
- package/dist/collection/components/bs-slider/bs-slider.js +46 -2
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- package/dist/collection/components/bs-spinner/bs-spinner.cmp.test.js +32 -0
- package/dist/collection/components/bs-spinner/bs-spinner.css +61 -0
- package/dist/collection/components/bs-spinner/bs-spinner.js +96 -0
- package/dist/collection/components/bs-spinner/bs-spinner.stories.js +30 -0
- package/dist/collection/components/bs-stepper/bs-stepper/bs-stepper.js +1 -1
- package/dist/collection/components/bs-stepper/bs-stepper-step/bs-stepper-step.js +1 -1
- package/dist/collection/components/bs-switch/bs-switch.js +1 -1
- package/dist/collection/components/bs-tab/bs-inline-tab/bs-inline-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tab/bs-tab.js +1 -1
- package/dist/collection/components/bs-tab/bs-tabs/bs-tabs.js +1 -1
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +48 -4
- package/dist/collection/components/bs-toast/bs-toast.js +23 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.cmp.test.js +73 -0
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.css +52 -0
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.js +140 -0
- package/dist/collection/components/bs-tooltip-trigger/bs-tooltip-trigger.stories.js +21 -0
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +68 -2
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer-item/bs-navigation-drawer-item.js +1 -1
- package/dist/collection/components/ui-shell/bs-navigation-header/bs-navigation-header/bs-navigation-header.js +1 -1
- package/dist/collection/global/brand-theming.cmp.test.js +44 -0
- package/dist/components/bs-accordion-group.d.ts +11 -0
- package/dist/components/bs-accordion-group.js +1 -0
- package/dist/components/bs-accordion.js +1 -1
- package/dist/components/bs-ai-disclaimer.js +1 -1
- package/dist/components/bs-ai-greeting.js +1 -1
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.js +1 -1
- package/dist/components/bs-attachment.js +1 -1
- package/dist/components/bs-avatar.js +1 -1
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-breadcrumb-overflow.js +1 -1
- package/dist/components/bs-breadcrumb.js +1 -1
- package/dist/components/bs-breadcrumbs.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-carousel.js +1 -1
- package/dist/components/bs-chatbot-feedback.js +1 -1
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.js +1 -1
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-checkbox-skeleton.js +1 -1
- package/dist/components/bs-checkbox.js +1 -1
- package/dist/components/bs-chip-filter.js +1 -1
- package/dist/components/bs-chip-informative.js +1 -1
- package/dist/components/bs-chip-input.js +1 -1
- package/dist/components/bs-citation-preview.d.ts +11 -0
- package/dist/components/bs-citation-preview.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-cookie-consent.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.js +1 -1
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-error-page.js +1 -1
- package/dist/components/bs-file-upload-item.js +1 -1
- package/dist/components/bs-file-upload.js +1 -1
- package/dist/components/bs-icon-button.js +1 -1
- package/dist/components/bs-icon-tile.js +1 -1
- package/dist/components/bs-inline-tab.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-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-message-list.d.ts +11 -0
- package/dist/components/bs-message-list.js +1 -0
- package/dist/components/bs-message.d.ts +11 -0
- package/dist/components/bs-message.js +1 -0
- package/dist/components/bs-navigation-drawer-item.js +1 -1
- package/dist/components/bs-navigation-drawer.js +1 -1
- package/dist/components/bs-navigation-header.js +1 -1
- package/dist/components/bs-onboarding-checklist.js +1 -1
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-popover.d.ts +11 -0
- package/dist/components/bs-popover.js +1 -0
- package/dist/components/bs-product-tour.js +1 -1
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-qr-code.js +1 -1
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-session-timeout.js +1 -1
- package/dist/components/bs-side-panel.d.ts +11 -0
- package/dist/components/bs-side-panel.js +1 -0
- package/dist/components/bs-skeleton.d.ts +11 -0
- package/dist/components/bs-skeleton.js +1 -0
- package/dist/components/bs-slider.js +1 -1
- package/dist/components/bs-snackbar.js +1 -1
- package/dist/components/bs-source-link.js +1 -1
- package/dist/components/bs-spinner.d.ts +11 -0
- package/dist/components/bs-spinner.js +1 -0
- package/dist/components/bs-stepper-step.js +1 -1
- package/dist/components/bs-stepper.js +1 -1
- package/dist/components/bs-switch.js +1 -1
- package/dist/components/bs-tab.js +1 -1
- package/dist/components/bs-tabs.js +1 -1
- package/dist/components/bs-timepicker.js +1 -1
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip-trigger.d.ts +11 -0
- package/dist/components/bs-tooltip-trigger.js +1 -0
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/bs-whats-new-entry.js +1 -1
- package/dist/components/bs-whats-new.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-B2gx7SZk.js +1 -0
- package/dist/components/{p-BEEoVNRu.js → p-BTPdjnXT.js} +1 -1
- package/dist/components/{p-Be9L4_Fe.js → p-BVhF8cZQ.js} +1 -1
- package/dist/components/{p-C_j_jDM6.js → p-Bfq5YVOv.js} +1 -1
- package/dist/components/{p-DE8K7fg0.js → p-C2NR1v3p.js} +1 -1
- package/dist/components/{p-YsHQLXET.js → p-C9jIMBG3.js} +1 -1
- package/dist/components/{p-DuLL7Ouw.js → p-CRtvJlh8.js} +1 -1
- package/dist/components/{p-Dr0Qk9Zc.js → p-ChcaPfNL.js} +1 -1
- package/dist/components/{p-CbimDNGY.js → p-CrmEXUwm.js} +1 -1
- package/dist/components/p-Cu-aeY9t.js +1 -0
- package/dist/components/{p-zTHlbyH6.js → p-DAwSBMeM.js} +1 -1
- package/dist/components/{p-qmS2CBqi.js → p-DYuzgzxI.js} +1 -1
- package/dist/components/p-DfzrJKwN.js +1 -0
- package/dist/components/{p-CUfs0ROR.js → p-DpVeeIko.js} +1 -1
- package/dist/components/p-DqXI9V2A.js +1 -0
- package/dist/components/p-Dqg8l1y6.js +1 -0
- package/dist/components/{p-CA31vqjL.js → p-DvNED6Lb.js} +1 -1
- package/dist/components/{p-C8yT2Ucq.js → p-QnTjSed5.js} +1 -1
- package/dist/components/{p-CncySD_-.js → p-Rx4bpeYN.js} +1 -1
- package/dist/components/{p-Be_Pmccm.js → p-owdeCW0M.js} +1 -1
- package/dist/components/{p-Bl_tVzeq.js → p-uHvS81XA.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- package/dist/esm/bs-accordion-group.entry.js +31 -0
- package/dist/esm/bs-accordion.entry.js +1 -1
- 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 +9 -5
- 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 +4 -2
- package/dist/esm/bs-button.entry.js +1 -1
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-carousel.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +18 -2
- package/dist/esm/bs-chatbot-header.entry.js +20 -2
- package/dist/esm/bs-chatbot-response-action.entry.js +25 -3
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +4 -2
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +3 -3
- package/dist/esm/bs-checkbox-skeleton.entry.js +4 -2
- package/dist/esm/bs-checkbox.entry.js +1 -1
- package/dist/esm/bs-chip-filter.entry.js +1 -1
- package/dist/esm/bs-chip-informative.entry.js +1 -1
- package/dist/esm/bs-chip-input.entry.js +4 -2
- package/dist/esm/bs-citation-preview.entry.js +27 -0
- package/dist/esm/bs-composer-status-banner.entry.js +11 -3
- package/dist/esm/bs-composer.entry.js +36 -7
- package/dist/esm/bs-cookie-consent.entry.js +1 -1
- package/dist/esm/bs-data-table.entry.js +5 -3
- package/dist/esm/bs-datepicker.entry.js +1 -1
- package/dist/esm/bs-dialog.entry.js +4 -2
- package/dist/esm/bs-error-page.entry.js +1 -1
- package/dist/esm/bs-file-upload-item.entry.js +1 -1
- package/dist/esm/bs-file-upload.entry.js +1 -1
- package/dist/esm/bs-icon-button.entry.js +1 -1
- package/dist/esm/bs-icon-tile.entry.js +1 -1
- package/dist/esm/bs-inline-tab.entry.js +2 -2
- package/dist/esm/bs-input_3.entry.js +15 -7
- package/dist/esm/bs-logo.entry.js +1 -1
- package/dist/esm/bs-message-list.entry.js +69 -0
- package/dist/esm/bs-message.entry.js +23 -0
- package/dist/esm/bs-navigation-drawer-item.entry.js +2 -2
- package/dist/esm/bs-navigation-drawer.entry.js +9 -3
- package/dist/esm/bs-navigation-header.entry.js +2 -2
- package/dist/esm/bs-onboarding-checklist.entry.js +1 -1
- package/dist/esm/bs-pagination.entry.js +6 -2
- package/dist/esm/bs-popover.entry.js +151 -0
- package/dist/esm/bs-product-tour.entry.js +1 -1
- package/dist/esm/bs-progress-linear.entry.js +3 -3
- package/dist/esm/bs-progress.entry.js +3 -3
- package/dist/esm/bs-qr-code.entry.js +2 -2
- package/dist/esm/bs-radio.entry.js +2 -2
- package/dist/esm/bs-session-timeout.entry.js +2 -2
- package/dist/esm/bs-side-panel.entry.js +162 -0
- package/dist/esm/bs-skeleton.entry.js +49 -0
- package/dist/esm/bs-slider.entry.js +7 -3
- package/dist/esm/bs-snackbar.entry.js +2 -2
- package/dist/esm/bs-source-link.entry.js +3 -3
- package/dist/esm/bs-spinner.entry.js +22 -0
- 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_3.entry.js +4 -4
- package/dist/esm/bs-timepicker.entry.js +8 -4
- package/dist/esm/bs-toast.entry.js +4 -2
- package/dist/esm/bs-tooltip-trigger.entry.js +44 -0
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/bs-whats-new.entry.js +1 -1
- package/dist/esm/index-D3SkQJpw.js +1853 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-accordion-group/bs-accordion-group.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-accordion-group/bs-accordion-group.d.ts +25 -0
- package/dist/types/components/bs-accordion-group/bs-accordion-group.stories.d.ts +9 -0
- package/dist/types/components/bs-attachment/bs-attachment.d.ts +4 -0
- package/dist/types/components/bs-button-skeleton/bs-button-skeleton.d.ts +2 -0
- package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.d.ts +16 -0
- package/dist/types/components/bs-chatbot-header/bs-chatbot-header.d.ts +19 -0
- package/dist/types/components/bs-chatbot-response-action/bs-chatbot-response-action.d.ts +22 -0
- package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.d.ts +2 -0
- package/dist/types/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.d.ts +2 -5
- package/dist/types/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.d.ts +2 -0
- package/dist/types/components/bs-chip/bs-chip-input/bs-chip-input.d.ts +2 -0
- package/dist/types/components/bs-citation-preview/bs-citation-preview.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-citation-preview/bs-citation-preview.d.ts +40 -0
- package/dist/types/components/bs-citation-preview/bs-citation-preview.stories.d.ts +13 -0
- package/dist/types/components/bs-composer/bs-composer.d.ts +25 -1
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +5 -0
- package/dist/types/components/bs-data-table/bs-data-table.d.ts +2 -0
- package/dist/types/components/bs-dialog/bs-dialog.d.ts +2 -0
- package/dist/types/components/bs-input/bs-input.d.ts +8 -0
- package/dist/types/components/bs-message/bs-message.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-message/bs-message.d.ts +49 -0
- package/dist/types/components/bs-message/bs-message.stories.d.ts +15 -0
- package/dist/types/components/bs-message-list/bs-message-list.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-message-list/bs-message-list.d.ts +44 -0
- package/dist/types/components/bs-message-list/bs-message-list.stories.d.ts +8 -0
- package/dist/types/components/bs-pagination/bs-pagination.d.ts +4 -0
- package/dist/types/components/bs-popover/bs-popover.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-popover/bs-popover.d.ts +58 -0
- package/dist/types/components/bs-popover/bs-popover.stories.d.ts +11 -0
- package/dist/types/components/bs-side-panel/bs-side-panel.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-side-panel/bs-side-panel.d.ts +67 -0
- package/dist/types/components/bs-side-panel/bs-side-panel.stories.d.ts +14 -0
- package/dist/types/components/bs-skeleton/bs-skeleton.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-skeleton/bs-skeleton.d.ts +44 -0
- package/dist/types/components/bs-skeleton/bs-skeleton.stories.d.ts +17 -0
- package/dist/types/components/bs-slider/bs-slider.d.ts +4 -0
- package/dist/types/components/bs-spinner/bs-spinner.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-spinner/bs-spinner.d.ts +32 -0
- package/dist/types/components/bs-spinner/bs-spinner.stories.d.ts +12 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.d.ts +4 -0
- package/dist/types/components/bs-toast/bs-toast.d.ts +2 -0
- package/dist/types/components/bs-tooltip-trigger/bs-tooltip-trigger.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-tooltip-trigger/bs-tooltip-trigger.d.ts +35 -0
- package/dist/types/components/bs-tooltip-trigger/bs-tooltip-trigger.stories.d.ts +10 -0
- package/dist/types/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.d.ts +6 -0
- package/dist/types/components.d.ts +1778 -38
- package/dist/types/global/brand-theming.cmp.test.d.ts +1 -0
- package/package.json +21 -5
- package/reference.d.ts +242 -0
- package/reference.json +4176 -0
- package/reference.mjs +2 -0
- package/tailwind-preset.cjs +36 -0
- package/testing/vitest-setup.mjs +41 -0
- package/dist/brandsync-wc/p-09cbf05b.entry.js +0 -1
- package/dist/brandsync-wc/p-0f8cd2e8.entry.js +0 -1
- package/dist/brandsync-wc/p-1261f0b0.entry.js +0 -1
- package/dist/brandsync-wc/p-20030f4d.entry.js +0 -1
- package/dist/brandsync-wc/p-22f8201a.entry.js +0 -1
- package/dist/brandsync-wc/p-34e5feaf.entry.js +0 -1
- package/dist/brandsync-wc/p-452f9c1c.entry.js +0 -1
- package/dist/brandsync-wc/p-6a696161.entry.js +0 -1
- package/dist/brandsync-wc/p-6c6cdf77.entry.js +0 -1
- package/dist/brandsync-wc/p-6e735e37.entry.js +0 -1
- package/dist/brandsync-wc/p-73f214ed.entry.js +0 -1
- package/dist/brandsync-wc/p-823ab3b2.entry.js +0 -1
- package/dist/brandsync-wc/p-DqQRXQMx.js +0 -3
- package/dist/brandsync-wc/p-b84366a7.entry.js +0 -1
- package/dist/brandsync-wc/p-b8d2ce91.entry.js +0 -1
- package/dist/brandsync-wc/p-b9a4042e.entry.js +0 -1
- package/dist/brandsync-wc/p-d754ee13.entry.js +0 -1
- package/dist/brandsync-wc/p-d75f3f87.entry.js +0 -1
- package/dist/brandsync-wc/p-d8b29a53.entry.js +0 -1
- package/dist/brandsync-wc/p-f7d15fbe.entry.js +0 -1
- package/dist/cjs/index-tFJjflK5.js +0 -1863
- package/dist/components/p-BGW5q5LZ.js +0 -1
- package/dist/components/p-BZ3M4lOU.js +0 -1
- package/dist/components/p-CVrEuVFo.js +0 -1
- package/dist/components/p-CeUK3n7D.js +0 -1
- package/dist/esm/index-DqQRXQMx.js +0 -1853
|
@@ -82,6 +82,11 @@ export class BsComposerStatusBanner {
|
|
|
82
82
|
showButton = false;
|
|
83
83
|
/** Label for the action button, only rendered when `showButton` is true. */
|
|
84
84
|
actionLabel = 'Continue';
|
|
85
|
+
/** Shows a spinner in place of the default leading icon (a custom `icon` slot still wins) and
|
|
86
|
+
* sets `aria-busy` on the banner. Use for in-progress states such as "Continuing...". */
|
|
87
|
+
loading = false;
|
|
88
|
+
/** Accessible name of the close button. */
|
|
89
|
+
closeLabel = 'Dismiss';
|
|
85
90
|
/** Whether the close button is rendered. */
|
|
86
91
|
allowClose = true;
|
|
87
92
|
/** Fires when the action button is clicked. Only relevant when `showButton` is true. */
|
|
@@ -103,10 +108,12 @@ export class BsComposerStatusBanner {
|
|
|
103
108
|
* weak match for error/warning, which get a warning-triangle icon instead. Either default is
|
|
104
109
|
* still overridable via the `icon` slot. */
|
|
105
110
|
renderDefaultIcon() {
|
|
111
|
+
if (this.loading)
|
|
112
|
+
return h(SpinnerIcon, null);
|
|
106
113
|
return this.type === 'error' || this.type === 'warning' ? h(WarningIcon, null) : h(ClockIcon, null);
|
|
107
114
|
}
|
|
108
115
|
render() {
|
|
109
|
-
return (h("div", { key: '
|
|
116
|
+
return (h("div", { key: '7ddbbad5af14adf35a87097ce7e7644fd9e50ec3', role: this.roleForType(), "aria-busy": this.loading ? 'true' : undefined, class: `bs-composer-status-banner bs-composer-status-banner--${this.type}` }, h("div", { key: '1fb9a5fb707db89056115ec0992484b310a47590', class: "bs-composer-status-banner__message-group" }, this.showIcon && (h("span", { key: 'c9cf1d3be7dd33b73f8a2813295ed90e2dbc865a', part: "icon", class: "bs-composer-status-banner__icon" }, h("slot", { key: '86735a463ca03af8359ef17d971a63d5c518f587', name: "icon" }, this.renderDefaultIcon()))), h("p", { key: '046dad63d8a6b12c5c4fe766edef811d945b427f', part: "message", class: "bs-composer-status-banner__message" }, this.message)), this.showButton && (h("button", { key: '3c8d3d824413b32ff596f63b579c8b7ce683af81', type: "button", part: "action", class: "bs-composer-status-banner__action", onClick: this.onActionClick }, this.actionLabel)), this.allowClose && (h("button", { key: '3d5dbe65b4ba7e04202fc260b0ca665a4eb3b516', type: "button", part: "close", class: "bs-composer-status-banner__close", "aria-label": this.closeLabel, onClick: this.onCloseClick }, h(CloseIcon, { key: '86efc37f964fd1440ac10cc47077605dbc0664ce' })))));
|
|
110
117
|
}
|
|
111
118
|
static get is() { return "bs-composer-status-banner"; }
|
|
112
119
|
static get encapsulation() { return "shadow"; }
|
|
@@ -228,6 +235,46 @@ export class BsComposerStatusBanner {
|
|
|
228
235
|
"attribute": "action-label",
|
|
229
236
|
"defaultValue": "'Continue'"
|
|
230
237
|
},
|
|
238
|
+
"loading": {
|
|
239
|
+
"type": "boolean",
|
|
240
|
+
"mutable": false,
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "boolean",
|
|
243
|
+
"resolved": "boolean",
|
|
244
|
+
"references": {}
|
|
245
|
+
},
|
|
246
|
+
"required": false,
|
|
247
|
+
"optional": false,
|
|
248
|
+
"docs": {
|
|
249
|
+
"tags": [],
|
|
250
|
+
"text": "Shows a spinner in place of the default leading icon (a custom `icon` slot still wins) and\nsets `aria-busy` on the banner. Use for in-progress states such as \"Continuing...\"."
|
|
251
|
+
},
|
|
252
|
+
"getter": false,
|
|
253
|
+
"setter": false,
|
|
254
|
+
"reflect": false,
|
|
255
|
+
"attribute": "loading",
|
|
256
|
+
"defaultValue": "false"
|
|
257
|
+
},
|
|
258
|
+
"closeLabel": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"mutable": false,
|
|
261
|
+
"complexType": {
|
|
262
|
+
"original": "string",
|
|
263
|
+
"resolved": "string",
|
|
264
|
+
"references": {}
|
|
265
|
+
},
|
|
266
|
+
"required": false,
|
|
267
|
+
"optional": false,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [],
|
|
270
|
+
"text": "Accessible name of the close button."
|
|
271
|
+
},
|
|
272
|
+
"getter": false,
|
|
273
|
+
"setter": false,
|
|
274
|
+
"reflect": false,
|
|
275
|
+
"attribute": "close-label",
|
|
276
|
+
"defaultValue": "'Dismiss'"
|
|
277
|
+
},
|
|
231
278
|
"allowClose": {
|
|
232
279
|
"type": "boolean",
|
|
233
280
|
"mutable": false,
|
|
@@ -284,6 +331,7 @@ export class BsComposerStatusBanner {
|
|
|
284
331
|
}];
|
|
285
332
|
}
|
|
286
333
|
}
|
|
334
|
+
const SpinnerIcon = () => (h("svg", { class: "bs-composer-status-banner__spinner", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-opacity": "0.25", "stroke-width": "1.5" }), h("path", { d: "M17.25 10A7.25 7.25 0 0 0 10 2.75", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" })));
|
|
287
335
|
const ClockIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", "stroke-width": "1.3" }), h("path", { d: "M10 5.83V10L12.5 11.67", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
288
336
|
const WarningIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M10 3L18 17H2L10 3Z", stroke: "currentColor", "stroke-width": "1.3", "stroke-linejoin": "round" }), h("path", { d: "M10 8V11.5", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round" }), h("circle", { cx: "10", cy: "14", r: "0.75", fill: "currentColor" })));
|
|
289
337
|
const CloseIcon = () => (h("svg", { viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M15 5L5 15", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M15 15L5 5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -28,6 +28,8 @@ export class BsDataTable {
|
|
|
28
28
|
rows = [];
|
|
29
29
|
sortColumn;
|
|
30
30
|
sortDirection = 'asc';
|
|
31
|
+
/** Accessible name of the select-all checkbox in the header (when `selectable`). */
|
|
32
|
+
selectAllLabel = 'Select all rows';
|
|
31
33
|
selectable = false;
|
|
32
34
|
/** Optional custom cell renderer, for rich cells such as a status badge, a link or an actions
|
|
33
35
|
* column. It returns an **HTML string** that is inserted into the cell as real markup
|
|
@@ -85,11 +87,11 @@ export class BsDataTable {
|
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
render() {
|
|
88
|
-
return (h("table", { key: '
|
|
90
|
+
return (h("table", { key: '1d9ca0e7153818331ea760d70a2e2f15b1be67bc', part: "table", class: "bs-data-table" }, h("thead", { key: 'af48bd83574fc4d358010b3091f14bc04db5f935', part: "head" }, h("tr", { key: '0cc77b6e5c46c175444b14dcfdb6c43b41a02d01' }, this.selectable && (h("th", { key: 'a8140bfad21744d05b02065d4034b85228f75da0', class: "bs-data-table__select-col" }, this.rows.length > 0 && (h("input", { key: '634a2b62fb9f26b0684622c6794170aaf5080b3e', type: "checkbox", "aria-label": this.selectAllLabel, 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 => {
|
|
89
91
|
const isSorted = this.sortColumn === column.key;
|
|
90
92
|
const ariaSort = column.sortable ? (isSorted ? (this.sortDirection === 'asc' ? 'ascending' : 'descending') : 'none') : undefined;
|
|
91
93
|
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)));
|
|
92
|
-
}))), h("tbody", { key: '
|
|
94
|
+
}))), h("tbody", { key: 'a90a9e866a63f9da370a6d20a4381b15bec14c82', 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 ? (
|
|
93
95
|
// cellRenderer is a developer-supplied, trusted function (JS-property-only, never
|
|
94
96
|
// derived from untrusted input) -- its HTML output is intentionally not escaped,
|
|
95
97
|
// same trust model as React's dangerouslySetInnerHTML.
|
|
@@ -199,6 +201,26 @@ export class BsDataTable {
|
|
|
199
201
|
"attribute": "sort-direction",
|
|
200
202
|
"defaultValue": "'asc'"
|
|
201
203
|
},
|
|
204
|
+
"selectAllLabel": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"mutable": false,
|
|
207
|
+
"complexType": {
|
|
208
|
+
"original": "string",
|
|
209
|
+
"resolved": "string",
|
|
210
|
+
"references": {}
|
|
211
|
+
},
|
|
212
|
+
"required": false,
|
|
213
|
+
"optional": false,
|
|
214
|
+
"docs": {
|
|
215
|
+
"tags": [],
|
|
216
|
+
"text": "Accessible name of the select-all checkbox in the header (when `selectable`)."
|
|
217
|
+
},
|
|
218
|
+
"getter": false,
|
|
219
|
+
"setter": false,
|
|
220
|
+
"reflect": false,
|
|
221
|
+
"attribute": "select-all-label",
|
|
222
|
+
"defaultValue": "'Select all rows'"
|
|
223
|
+
},
|
|
202
224
|
"selectable": {
|
|
203
225
|
"type": "boolean",
|
|
204
226
|
"mutable": false,
|
|
@@ -38,6 +38,8 @@ export class BsDialog {
|
|
|
38
38
|
* the same way a native `<dialog>` does, while still emitting `bsClose` for the consumer to react to. */
|
|
39
39
|
open = false;
|
|
40
40
|
heading;
|
|
41
|
+
/** Accessible name of the close button. */
|
|
42
|
+
closeLabel = 'Close';
|
|
41
43
|
size = 'md';
|
|
42
44
|
/** Switches to the Figma "Icon Centered" layout: heading/body text centered, the `icon` slot
|
|
43
45
|
* rendered above the heading, and the close button floating top-right of the dialog instead of
|
|
@@ -134,7 +136,7 @@ export class BsDialog {
|
|
|
134
136
|
// The close button floats (absolute, over the top of the dialog) whenever there's a hero image
|
|
135
137
|
// to sit over, or the centered layout has no header row to put an inline close button in.
|
|
136
138
|
const floatingClose = this.centered || this.hasImage;
|
|
137
|
-
return (h("div", { part: "backdrop", class: "bs-dialog__backdrop", onClick: this.onBackdropClick }, h("div", { ref: el => (this.dialogRef = el), tabIndex: -1, part: "dialog", class: `bs-dialog__dialog bs-dialog__dialog--${this.size}`, role: "dialog", "aria-modal": "true", "aria-label": this.heading }, floatingClose && (h("bs-icon-button", { part: "close", class: "bs-dialog__close--floating", variant: "neutral", size: "md", "aria-label":
|
|
139
|
+
return (h("div", { part: "backdrop", class: "bs-dialog__backdrop", onClick: this.onBackdropClick }, h("div", { ref: el => (this.dialogRef = el), tabIndex: -1, part: "dialog", class: `bs-dialog__dialog bs-dialog__dialog--${this.size}`, role: "dialog", "aria-modal": "true", "aria-label": this.heading }, floatingClose && (h("bs-icon-button", { part: "close", class: "bs-dialog__close--floating", variant: "neutral", size: "md", "aria-label": this.closeLabel, onClick: this.close }, h(CloseIcon, null))), h("div", { part: "image", class: `bs-dialog__image ${this.hasImage ? 'bs-dialog__image--visible' : ''}` }, h("slot", { name: "image", onSlotchange: this.onImageSlotchange })), this.centered && (h("div", { part: "icon", class: `bs-dialog__icon ${this.hasIcon ? 'bs-dialog__icon--visible' : ''}` }, h("slot", { name: "icon", onSlotchange: this.onIconSlotchange }))), h("div", { part: "header", class: `bs-dialog__header ${this.centered ? 'bs-dialog__header--centered' : ''}` }, h("span", { class: "bs-dialog__heading" }, this.heading), !floatingClose && (h("bs-icon-button", { part: "close", variant: "subtle", size: "md", "aria-label": this.closeLabel, onClick: this.close }, h(CloseIcon, null)))), h("div", { part: "body", class: `bs-dialog__body ${this.centered ? 'bs-dialog__body--centered' : ''}` }, h("slot", null)), h("div", { part: "footer", class: `bs-dialog__footer ${this.hasFooter ? 'bs-dialog__footer--visible' : ''}` }, h("slot", { name: "footer", onSlotchange: this.onFooterSlotchange })))));
|
|
138
140
|
}
|
|
139
141
|
static get is() { return "bs-dialog"; }
|
|
140
142
|
static get encapsulation() { return "shadow"; }
|
|
@@ -189,6 +191,26 @@ export class BsDialog {
|
|
|
189
191
|
"reflect": false,
|
|
190
192
|
"attribute": "heading"
|
|
191
193
|
},
|
|
194
|
+
"closeLabel": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "string",
|
|
199
|
+
"resolved": "string",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": "Accessible name of the close button."
|
|
207
|
+
},
|
|
208
|
+
"getter": false,
|
|
209
|
+
"setter": false,
|
|
210
|
+
"reflect": false,
|
|
211
|
+
"attribute": "close-label",
|
|
212
|
+
"defaultValue": "'Close'"
|
|
213
|
+
},
|
|
192
214
|
"size": {
|
|
193
215
|
"type": "string",
|
|
194
216
|
"mutable": false,
|
|
@@ -60,6 +60,14 @@ export class BsInput {
|
|
|
60
60
|
* component re-dispatches them as `bsInput`/`bsChange` custom events instead. Mutable so the
|
|
61
61
|
* `number` type's stepper buttons can update it directly. */
|
|
62
62
|
value = '';
|
|
63
|
+
/** Accessible name of the password toggle while the password is hidden. */
|
|
64
|
+
showPasswordLabel = 'Show password';
|
|
65
|
+
/** Accessible name of the password toggle while the password is visible. */
|
|
66
|
+
hidePasswordLabel = 'Hide password';
|
|
67
|
+
/** Accessible name of the number stepper's increment button. */
|
|
68
|
+
incrementLabel = 'Increment';
|
|
69
|
+
/** Accessible name of the number stepper's decrement button. */
|
|
70
|
+
decrementLabel = 'Decrement';
|
|
63
71
|
type = 'text';
|
|
64
72
|
label;
|
|
65
73
|
placeholder;
|
|
@@ -302,10 +310,10 @@ export class BsInput {
|
|
|
302
310
|
}
|
|
303
311
|
renderEndIconContent() {
|
|
304
312
|
if (this.type === 'number') {
|
|
305
|
-
return (h("span", { class: "bs-input__stepper" }, h("button", { type: "button", part: "control", class: "bs-input__stepper-btn", "aria-label":
|
|
313
|
+
return (h("span", { class: "bs-input__stepper" }, h("button", { type: "button", part: "control", class: "bs-input__stepper-btn", "aria-label": this.incrementLabel, tabIndex: -1, disabled: this.disabled, onClick: this.onStepperIncrement }, h("svg", { viewBox: "0 0 10 6", width: "10", height: "6", "aria-hidden": "true" }, h("path", { d: "M1 5L5 1L9 5", stroke: "currentColor", "stroke-width": "1.3", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { type: "button", part: "control", class: "bs-input__stepper-btn", "aria-label": this.decrementLabel, tabIndex: -1, disabled: this.disabled, onClick: this.onStepperDecrement }, h("svg", { viewBox: "0 0 10 6", width: "10", height: "6", "aria-hidden": "true" }, h("path", { d: "M1 1L5 5L9 1", stroke: "currentColor", "stroke-width": "1.3", fill: "none", "stroke-linecap": "round", "stroke-linejoin": "round" })))));
|
|
306
314
|
}
|
|
307
315
|
if (this.type === 'password') {
|
|
308
|
-
return (h("button", { type: "button", part: "control", class: "bs-input__password-toggle", "aria-label": this.passwordVisible ?
|
|
316
|
+
return (h("button", { type: "button", part: "control", class: "bs-input__password-toggle", "aria-label": this.passwordVisible ? this.hidePasswordLabel : this.showPasswordLabel, disabled: this.disabled, onClick: this.onTogglePasswordVisibility }, this.passwordVisible ? (h("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z", stroke: "currentColor", "stroke-width": "1.2", "stroke-linejoin": "round" }), h("circle", { cx: "8", cy: "8", r: "2", stroke: "currentColor", "stroke-width": "1.2" }), h("path", { d: "M2 2L14 14", stroke: "currentColor", "stroke-width": "1.2", "stroke-linecap": "round" }))) : (h("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("path", { d: "M1 8C2.2 5.5 4.9 3 8 3C11.1 3 13.8 5.5 15 8C13.8 10.5 11.1 13 8 13C4.9 13 2.2 10.5 1 8Z", stroke: "currentColor", "stroke-width": "1.2", "stroke-linejoin": "round" }), h("circle", { cx: "8", cy: "8", r: "2", stroke: "currentColor", "stroke-width": "1.2" })))));
|
|
309
317
|
}
|
|
310
318
|
if (this.type === 'dropdown') {
|
|
311
319
|
return (h("svg", { class: "bs-input__chevron", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true" }, h("path", { d: "M4 6L8 10L12 6", stroke: "currentColor", "stroke-width": "1.3", "stroke-linecap": "round", "stroke-linejoin": "round" })));
|
|
@@ -389,10 +397,10 @@ export class BsInput {
|
|
|
389
397
|
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) })))));
|
|
390
398
|
}
|
|
391
399
|
render() {
|
|
392
|
-
return (h("div", { key: '
|
|
400
|
+
return (h("div", { key: 'a7ecdb4eb28bae12ac91283a450819daed021207', class: `bs-input ${this.error ? 'bs-input--error' : ''}` }, this.label && (
|
|
393
401
|
// "control" is a fixed id, not a generated one -- safe because Shadow DOM scopes ids
|
|
394
402
|
// to this instance's own shadow root, so it can never collide with another bs-input.
|
|
395
|
-
h("label", { key: '
|
|
403
|
+
h("label", { key: '48577ca03f18fa46e1a4d6a04d3ad40851b93713', part: "label", class: "bs-input__label", htmlFor: "control" }, this.label, this.required && (h("span", { key: '2103cd741fa889e5e169c157b912cd9275c208b5', 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));
|
|
396
404
|
}
|
|
397
405
|
static get is() { return "bs-input"; }
|
|
398
406
|
static get encapsulation() { return "shadow"; }
|
|
@@ -449,6 +457,86 @@ export class BsInput {
|
|
|
449
457
|
"attribute": "value",
|
|
450
458
|
"defaultValue": "''"
|
|
451
459
|
},
|
|
460
|
+
"showPasswordLabel": {
|
|
461
|
+
"type": "string",
|
|
462
|
+
"mutable": false,
|
|
463
|
+
"complexType": {
|
|
464
|
+
"original": "string",
|
|
465
|
+
"resolved": "string",
|
|
466
|
+
"references": {}
|
|
467
|
+
},
|
|
468
|
+
"required": false,
|
|
469
|
+
"optional": false,
|
|
470
|
+
"docs": {
|
|
471
|
+
"tags": [],
|
|
472
|
+
"text": "Accessible name of the password toggle while the password is hidden."
|
|
473
|
+
},
|
|
474
|
+
"getter": false,
|
|
475
|
+
"setter": false,
|
|
476
|
+
"reflect": false,
|
|
477
|
+
"attribute": "show-password-label",
|
|
478
|
+
"defaultValue": "'Show password'"
|
|
479
|
+
},
|
|
480
|
+
"hidePasswordLabel": {
|
|
481
|
+
"type": "string",
|
|
482
|
+
"mutable": false,
|
|
483
|
+
"complexType": {
|
|
484
|
+
"original": "string",
|
|
485
|
+
"resolved": "string",
|
|
486
|
+
"references": {}
|
|
487
|
+
},
|
|
488
|
+
"required": false,
|
|
489
|
+
"optional": false,
|
|
490
|
+
"docs": {
|
|
491
|
+
"tags": [],
|
|
492
|
+
"text": "Accessible name of the password toggle while the password is visible."
|
|
493
|
+
},
|
|
494
|
+
"getter": false,
|
|
495
|
+
"setter": false,
|
|
496
|
+
"reflect": false,
|
|
497
|
+
"attribute": "hide-password-label",
|
|
498
|
+
"defaultValue": "'Hide password'"
|
|
499
|
+
},
|
|
500
|
+
"incrementLabel": {
|
|
501
|
+
"type": "string",
|
|
502
|
+
"mutable": false,
|
|
503
|
+
"complexType": {
|
|
504
|
+
"original": "string",
|
|
505
|
+
"resolved": "string",
|
|
506
|
+
"references": {}
|
|
507
|
+
},
|
|
508
|
+
"required": false,
|
|
509
|
+
"optional": false,
|
|
510
|
+
"docs": {
|
|
511
|
+
"tags": [],
|
|
512
|
+
"text": "Accessible name of the number stepper's increment button."
|
|
513
|
+
},
|
|
514
|
+
"getter": false,
|
|
515
|
+
"setter": false,
|
|
516
|
+
"reflect": false,
|
|
517
|
+
"attribute": "increment-label",
|
|
518
|
+
"defaultValue": "'Increment'"
|
|
519
|
+
},
|
|
520
|
+
"decrementLabel": {
|
|
521
|
+
"type": "string",
|
|
522
|
+
"mutable": false,
|
|
523
|
+
"complexType": {
|
|
524
|
+
"original": "string",
|
|
525
|
+
"resolved": "string",
|
|
526
|
+
"references": {}
|
|
527
|
+
},
|
|
528
|
+
"required": false,
|
|
529
|
+
"optional": false,
|
|
530
|
+
"docs": {
|
|
531
|
+
"tags": [],
|
|
532
|
+
"text": "Accessible name of the number stepper's decrement button."
|
|
533
|
+
},
|
|
534
|
+
"getter": false,
|
|
535
|
+
"setter": false,
|
|
536
|
+
"reflect": false,
|
|
537
|
+
"attribute": "decrement-label",
|
|
538
|
+
"defaultValue": "'Decrement'"
|
|
539
|
+
},
|
|
452
540
|
"type": {
|
|
453
541
|
"type": "string",
|
|
454
542
|
"mutable": false,
|
|
@@ -44,7 +44,7 @@ export class BsMenu {
|
|
|
44
44
|
items[next].shadowRoot?.querySelector('button')?.focus();
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h("div", { key: '
|
|
47
|
+
return (h("div", { key: 'a253d57d609dd1de870bed9f92f4db77b5c91da3', part: "list", class: "bs-menu", role: "menu" }, h("slot", { key: 'f21dbcc6486767e6f4bdd81c120e685d7ff3e5c2' })));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "bs-menu"; }
|
|
50
50
|
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: '5c0692a72087255606a36fd452062c1463e99ec1', 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: '75d3dd4c67d6ea26e588b11dc7c08f33b8bf7612', part: "icon", class: `bs-menu-item__icon ${this.hasIcon ? 'bs-menu-item__icon--has-content' : ''}` }, h("slot", { key: '1a0d15291612045dc17b89de6b9e8badbed42f79', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '4208bb1d52c455d477fcd3ae77c1bd657096a30e', part: "label", class: "bs-menu-item__label" }, h("slot", { key: 'bc093e94c6ffa4a86d4ad2b4b9c98a9374257729' }))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "bs-menu-item"; }
|
|
53
53
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-message', () => {
|
|
3
|
+
it('defaults to the assistant role and default status', async () => {
|
|
4
|
+
const { root } = await render(h("bs-message", null, "Hello"));
|
|
5
|
+
expect(root).toEqualAttribute('role', 'assistant');
|
|
6
|
+
expect(root).toEqualAttribute('status', 'default');
|
|
7
|
+
});
|
|
8
|
+
it('reflects the user role', async () => {
|
|
9
|
+
const { root } = await render(h("bs-message", { role: "user" }, "Hi"));
|
|
10
|
+
expect(root).toEqualAttribute('role', 'user');
|
|
11
|
+
});
|
|
12
|
+
it('renders a <time> with datetime from timestamp props', async () => {
|
|
13
|
+
const { root } = await render(h("bs-message", { timestamp: "10:42", datetime: "2026-01-01T10:42:00Z" }));
|
|
14
|
+
const time = root.shadowRoot.querySelector('time');
|
|
15
|
+
expect(time).toHaveTextContent('10:42');
|
|
16
|
+
expect(time).toEqualAttribute('datetime', '2026-01-01T10:42:00Z');
|
|
17
|
+
});
|
|
18
|
+
it('renders no <time> when timestamp is unset', async () => {
|
|
19
|
+
const { root } = await render(h("bs-message", null));
|
|
20
|
+
expect(root.shadowRoot.querySelector('time')).toBeNull();
|
|
21
|
+
});
|
|
22
|
+
it('sets aria-busy only while pending', async () => {
|
|
23
|
+
const { root, waitForChanges } = await render(h("bs-message", { status: "pending" }));
|
|
24
|
+
expect(root.shadowRoot.querySelector('.bs-message')).toEqualAttribute('aria-busy', 'true');
|
|
25
|
+
root.status = 'error';
|
|
26
|
+
await waitForChanges();
|
|
27
|
+
expect(root.shadowRoot.querySelector('.bs-message').hasAttribute('aria-busy')).toBe(false);
|
|
28
|
+
});
|
|
29
|
+
it('composes the bubble from bs-card and exposes avatar/footer/timestamp slots', async () => {
|
|
30
|
+
const { root } = await render(h("bs-message", null));
|
|
31
|
+
expect(root.shadowRoot.querySelector('bs-card[part="container"]')).not.toBeNull();
|
|
32
|
+
for (const name of ['avatar', 'footer', 'timestamp']) {
|
|
33
|
+
expect(root.shadowRoot.querySelector(`slot[name="${name}"]`)).not.toBeNull();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
--bs-message-gap: var(--bs-spacing-100);
|
|
4
|
+
--bs-message-max-width: 80%;
|
|
5
|
+
--bs-message-padding: var(--bs-spacing-150);
|
|
6
|
+
--bs-message-radius: var(--bs-border-radius-150);
|
|
7
|
+
--bs-message-user-bg: var(--bs-color-primary-container);
|
|
8
|
+
--bs-message-user-color: var(--bs-text-default);
|
|
9
|
+
--bs-message-assistant-bg: var(--bs-color-neutral-container);
|
|
10
|
+
--bs-message-assistant-color: var(--bs-text-default);
|
|
11
|
+
--bs-message-error-bg: var(--bs-color-error-container);
|
|
12
|
+
--bs-message-error-color: var(--bs-text-error);
|
|
13
|
+
--bs-message-pending-opacity: 0.6;
|
|
14
|
+
--bs-message-timestamp-color: var(--bs-text-secondary);
|
|
15
|
+
--bs-message-timestamp-font-size: var(--bs-font-size-xs);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bs-message {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: flex-start;
|
|
21
|
+
gap: var(--bs-message-gap);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host([role='user']) .bs-message {
|
|
25
|
+
flex-direction: row-reverse;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.bs-message__avatar {
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.bs-message__column {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
gap: var(--bs-spacing-50);
|
|
36
|
+
min-width: 0;
|
|
37
|
+
max-width: var(--bs-message-max-width);
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([role='user']) .bs-message__column {
|
|
42
|
+
align-items: flex-end;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bs-message__bubble {
|
|
46
|
+
--bs-card-bg: var(--bs-message-assistant-bg);
|
|
47
|
+
--bs-card-radius: var(--bs-message-radius);
|
|
48
|
+
--bs-card-padding: var(--bs-message-padding);
|
|
49
|
+
--bs-card-shadow: none;
|
|
50
|
+
color: var(--bs-message-assistant-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:host([role='user']) .bs-message__bubble {
|
|
54
|
+
--bs-card-bg: var(--bs-message-user-bg);
|
|
55
|
+
color: var(--bs-message-user-color);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host([status='error']) .bs-message__bubble {
|
|
59
|
+
--bs-card-bg: var(--bs-message-error-bg);
|
|
60
|
+
color: var(--bs-message-error-color);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host([status='pending']) .bs-message__bubble {
|
|
64
|
+
opacity: var(--bs-message-pending-opacity);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.bs-message__content {
|
|
68
|
+
overflow-wrap: anywhere;
|
|
69
|
+
font-size: var(--bs-font-size-md);
|
|
70
|
+
line-height: var(--bs-line-height-normal);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.bs-message__timestamp {
|
|
74
|
+
color: var(--bs-message-timestamp-color);
|
|
75
|
+
font-size: var(--bs-message-timestamp-font-size);
|
|
76
|
+
line-height: var(--bs-line-height-normal);
|
|
77
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A single chat message bubble. User messages align to the end with a primary-tinted bubble;
|
|
4
|
+
* assistant messages align to the start on a neutral bubble. The consumer renders the content
|
|
5
|
+
* (e.g. markdown) into the default slot.
|
|
6
|
+
*
|
|
7
|
+
* Composed from: `bs-card` (the bubble surface).
|
|
8
|
+
*
|
|
9
|
+
* ## When to use
|
|
10
|
+
* - One entry per turn in a chat transcript, usually inside `bs-message-list`.
|
|
11
|
+
*
|
|
12
|
+
* ## When not to use
|
|
13
|
+
* - For transient notices or system banners -- use `bs-toast` / `bs-composer-status-banner`.
|
|
14
|
+
*
|
|
15
|
+
* @slot - The message content. The consumer renders markdown/rich content here.
|
|
16
|
+
* @slot avatar - Optional avatar (e.g. `bs-avatar`) beside the bubble.
|
|
17
|
+
* @slot footer - Optional content below the bubble (e.g. `bs-chatbot-response-action`).
|
|
18
|
+
* @slot timestamp - Overrides the default `<time>` element rendered from `timestamp`.
|
|
19
|
+
* @part container - The bubble (`bs-card`).
|
|
20
|
+
* @part avatar - The avatar wrapper.
|
|
21
|
+
* @part content - The message content wrapper.
|
|
22
|
+
* @part footer - The footer wrapper.
|
|
23
|
+
* @part timestamp - The timestamp wrapper.
|
|
24
|
+
* @prop --bs-message-gap - Gap between avatar and message column. Aliased to `--bs-spacing-100`.
|
|
25
|
+
* @prop --bs-message-max-width - Max width of the message column. Defaults to `80%`.
|
|
26
|
+
* @prop --bs-message-padding - Bubble padding. Aliased to `--bs-spacing-150`.
|
|
27
|
+
* @prop --bs-message-radius - Bubble corner radius. Aliased to `--bs-border-radius-150`.
|
|
28
|
+
* @prop --bs-message-user-bg - User bubble background. Aliased to `--bs-color-primary-container`.
|
|
29
|
+
* @prop --bs-message-user-color - User bubble text color. Aliased to `--bs-text-default`.
|
|
30
|
+
* @prop --bs-message-assistant-bg - Assistant bubble background. Aliased to `--bs-color-neutral-container`.
|
|
31
|
+
* @prop --bs-message-assistant-color - Assistant bubble text color. Aliased to `--bs-text-default`.
|
|
32
|
+
* @prop --bs-message-error-bg - Error bubble background. Aliased to `--bs-color-error-container`.
|
|
33
|
+
* @prop --bs-message-error-color - Error bubble text color. Aliased to `--bs-text-error`.
|
|
34
|
+
* @prop --bs-message-pending-opacity - Bubble opacity while pending. Defaults to `0.6`.
|
|
35
|
+
* @prop --bs-message-timestamp-color - Timestamp color. Aliased to `--bs-text-secondary`.
|
|
36
|
+
* @prop --bs-message-timestamp-font-size - Timestamp font size. Aliased to `--bs-font-size-xs`.
|
|
37
|
+
*/
|
|
38
|
+
export class BsMessage {
|
|
39
|
+
/** Who sent the message. Controls alignment and colour. */
|
|
40
|
+
role = 'assistant';
|
|
41
|
+
/** Human-readable timestamp text shown inside a `<time>` element. Omit to render none. */
|
|
42
|
+
timestamp;
|
|
43
|
+
/** Machine-readable value for the `<time>` element's `datetime` attribute. */
|
|
44
|
+
datetime;
|
|
45
|
+
/** Delivery/render state. `error` uses error colours; `pending` dims the bubble and sets `aria-busy`. */
|
|
46
|
+
status = 'default';
|
|
47
|
+
render() {
|
|
48
|
+
return (h("div", { key: '76e0e1d307de73bca97c5a79b3ff607278311d3e', class: "bs-message", "aria-busy": this.status === 'pending' ? 'true' : undefined }, h("div", { key: '00c91e1ab7a3cf9e81401e36b50b331c0d7d2735', part: "avatar", class: "bs-message__avatar" }, h("slot", { key: 'a3b0577cbafcd699ecf37c3299757f76e88cd572', name: "avatar" })), h("div", { key: '10b3dc86e24ae0860fffccedb5aaa9fed78f44c5', class: "bs-message__column" }, h("bs-card", { key: '3a88a28a5e9cb9898562860daf576b4280a8e601', part: "container", class: "bs-message__bubble", surface: "base" }, h("div", { key: '95a9c8394c55789cbf7a976b16466d7a9593fae6', part: "content", class: "bs-message__content" }, h("slot", { key: '81c214388b65904f4e15bfae23ddbc34ed35e267' }))), h("div", { key: '27768ab59923180c6f31f7bce893fefa11c967d1', part: "footer", class: "bs-message__footer" }, h("slot", { key: '606f025032c40e01c2490b1d18441c1d2557beac', name: "footer" })), h("div", { key: '79acf174363c391a37ca1907ececf87c9c1cdb45', part: "timestamp", class: "bs-message__timestamp" }, h("slot", { key: '08060d46ea218a3c9315bd2fc89165c605e54ddd', name: "timestamp" }, this.timestamp && h("time", { key: 'a9829bf9725b3c41eb5032427822a2d6fbb2cb6f', dateTime: this.datetime }, this.timestamp))))));
|
|
49
|
+
}
|
|
50
|
+
static get is() { return "bs-message"; }
|
|
51
|
+
static get encapsulation() { return "shadow"; }
|
|
52
|
+
static get originalStyleUrls() {
|
|
53
|
+
return {
|
|
54
|
+
"$": ["bs-message.css"]
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
static get styleUrls() {
|
|
58
|
+
return {
|
|
59
|
+
"$": ["bs-message.css"]
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
static get properties() {
|
|
63
|
+
return {
|
|
64
|
+
"role": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"mutable": false,
|
|
67
|
+
"complexType": {
|
|
68
|
+
"original": "BsMessageRole",
|
|
69
|
+
"resolved": "\"assistant\" | \"user\"",
|
|
70
|
+
"references": {
|
|
71
|
+
"BsMessageRole": {
|
|
72
|
+
"location": "local",
|
|
73
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-message/bs-message.tsx",
|
|
74
|
+
"id": "src/components/bs-message/bs-message.tsx::BsMessageRole"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": "Who sent the message. Controls alignment and colour."
|
|
83
|
+
},
|
|
84
|
+
"getter": false,
|
|
85
|
+
"setter": false,
|
|
86
|
+
"reflect": true,
|
|
87
|
+
"attribute": "role",
|
|
88
|
+
"defaultValue": "'assistant'"
|
|
89
|
+
},
|
|
90
|
+
"timestamp": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"mutable": false,
|
|
93
|
+
"complexType": {
|
|
94
|
+
"original": "string",
|
|
95
|
+
"resolved": "string",
|
|
96
|
+
"references": {}
|
|
97
|
+
},
|
|
98
|
+
"required": false,
|
|
99
|
+
"optional": true,
|
|
100
|
+
"docs": {
|
|
101
|
+
"tags": [],
|
|
102
|
+
"text": "Human-readable timestamp text shown inside a `<time>` element. Omit to render none."
|
|
103
|
+
},
|
|
104
|
+
"getter": false,
|
|
105
|
+
"setter": false,
|
|
106
|
+
"reflect": false,
|
|
107
|
+
"attribute": "timestamp"
|
|
108
|
+
},
|
|
109
|
+
"datetime": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "string",
|
|
114
|
+
"resolved": "string",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": true,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "Machine-readable value for the `<time>` element's `datetime` attribute."
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"reflect": false,
|
|
126
|
+
"attribute": "datetime"
|
|
127
|
+
},
|
|
128
|
+
"status": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"mutable": false,
|
|
131
|
+
"complexType": {
|
|
132
|
+
"original": "BsMessageStatus",
|
|
133
|
+
"resolved": "\"default\" | \"error\" | \"pending\"",
|
|
134
|
+
"references": {
|
|
135
|
+
"BsMessageStatus": {
|
|
136
|
+
"location": "local",
|
|
137
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-message/bs-message.tsx",
|
|
138
|
+
"id": "src/components/bs-message/bs-message.tsx::BsMessageStatus"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"optional": false,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": "Delivery/render state. `error` uses error colours; `pending` dims the bubble and sets `aria-busy`."
|
|
147
|
+
},
|
|
148
|
+
"getter": false,
|
|
149
|
+
"setter": false,
|
|
150
|
+
"reflect": true,
|
|
151
|
+
"attribute": "status",
|
|
152
|
+
"defaultValue": "'default'"
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
}
|