@brandsync/wc 1.12.1 → 1.14.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 +22 -0
- package/CONVENTIONS.md +109 -0
- package/REFERENCE.md +1388 -0
- package/custom-elements.json +5069 -2575
- 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-056608f0.entry.js +1 -0
- package/dist/brandsync-wc/p-0cb6fc39.entry.js +1 -0
- package/dist/brandsync-wc/p-0e738622.entry.js +1 -0
- 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-56c37e0a.entry.js → p-16c78ff6.entry.js} +1 -1
- package/dist/brandsync-wc/p-1b5cc9b8.entry.js +1 -0
- package/dist/brandsync-wc/p-204cc690.entry.js +1 -0
- package/dist/brandsync-wc/p-221244a9.entry.js +1 -0
- package/dist/brandsync-wc/p-227a5182.entry.js +1 -0
- package/dist/brandsync-wc/p-23b56775.entry.js +1 -0
- package/dist/brandsync-wc/p-2967240d.entry.js +1 -0
- package/dist/brandsync-wc/p-2c1efaa1.entry.js +1 -0
- package/dist/brandsync-wc/p-2e68b76e.entry.js +1 -0
- package/dist/brandsync-wc/{p-a9169157.entry.js → p-315b510c.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1978e63c.entry.js → p-31cd66e0.entry.js} +1 -1
- package/dist/brandsync-wc/p-3477539c.entry.js +1 -0
- 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-2497d128.entry.js → p-3dabf202.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-f15d9524.entry.js → p-4b40a596.entry.js} +1 -1
- package/dist/brandsync-wc/p-51f40972.entry.js +1 -0
- package/dist/brandsync-wc/{p-39a26c64.entry.js → p-617bd76d.entry.js} +1 -1
- package/dist/brandsync-wc/p-658532b7.entry.js +1 -0
- package/dist/brandsync-wc/{p-617bd13a.entry.js → p-686297f1.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-00a0d489.entry.js → p-8048d033.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0b2d3b7e.entry.js → p-80700878.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2368a92e.entry.js → p-8184d7de.entry.js} +1 -1
- package/dist/brandsync-wc/p-833f9dc4.entry.js +1 -0
- package/dist/brandsync-wc/p-8390a155.entry.js +1 -0
- 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-9d12b1fb.entry.js +1 -0
- package/dist/brandsync-wc/{p-5ba90a13.entry.js → p-9d660c03.entry.js} +1 -1
- package/dist/brandsync-wc/p-9fa67924.entry.js +1 -0
- 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-a2e59aca.entry.js +1 -0
- package/dist/brandsync-wc/{p-09435f41.entry.js → p-a5659499.entry.js} +1 -1
- package/dist/brandsync-wc/p-b6ac1b50.entry.js +1 -0
- package/dist/brandsync-wc/{p-69c0a85d.entry.js → p-b793a0d6.entry.js} +1 -1
- package/dist/brandsync-wc/p-bee30626.entry.js +1 -0
- package/dist/brandsync-wc/{p-1aab6d07.entry.js → p-c05ee501.entry.js} +1 -1
- package/dist/brandsync-wc/p-c488cc8b.entry.js +1 -0
- package/dist/brandsync-wc/p-c67bc817.entry.js +1 -0
- package/dist/brandsync-wc/{p-247e36ad.entry.js → p-cc1055e6.entry.js} +1 -1
- package/dist/brandsync-wc/p-cc25ee67.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-282ddbee.entry.js → p-d892277f.entry.js} +1 -1
- package/dist/brandsync-wc/p-dd52209a.entry.js +1 -0
- package/dist/brandsync-wc/{p-09bc1923.entry.js → p-df3e7973.entry.js} +1 -1
- package/dist/brandsync-wc/p-dfad8c0a.entry.js +1 -0
- package/dist/brandsync-wc/p-e0927a9a.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-f5180578.entry.js → p-e6fc2cd4.entry.js} +1 -1
- 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-2177042f.entry.js → p-fa6b9750.entry.js} +1 -1
- 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-split-pane.cjs.entry.js +193 -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 +10 -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-split-pane/bs-split-pane.cmp.test.js +107 -0
- package/dist/collection/components/bs-split-pane/bs-split-pane.css +108 -0
- package/dist/collection/components/bs-split-pane/bs-split-pane.js +404 -0
- package/dist/collection/components/bs-split-pane/bs-split-pane.stories.js +47 -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-split-pane.d.ts +11 -0
- package/dist/components/bs-split-pane.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-C_j_jDM6.js → p-BESyTlfT.js} +1 -1
- package/dist/components/{p-YsHQLXET.js → p-BIW9eUic.js} +1 -1
- package/dist/components/{p-Be_Pmccm.js → p-BJR8KVFc.js} +1 -1
- package/dist/components/{p-BEEoVNRu.js → p-BTPdjnXT.js} +1 -1
- package/dist/components/{p-Be9L4_Fe.js → p-CDYw4Eyj.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-DE8K7fg0.js → p-CiSEDtbE.js} +1 -1
- package/dist/components/{p-CbimDNGY.js → p-CrmEXUwm.js} +1 -1
- 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-Dm3TqgV_.js +1 -0
- package/dist/components/{p-CUfs0ROR.js → p-DpVeeIko.js} +1 -1
- package/dist/components/{p-CA31vqjL.js → p-DvNED6Lb.js} +1 -1
- package/dist/components/{p-Bl_tVzeq.js → p-HAmR4gM2.js} +1 -1
- package/dist/components/p-HzaOqQ0U.js +1 -0
- 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-nC2VxRNo.js +1 -0
- package/dist/components/p-zscW5LNR.js +1 -0
- 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-split-pane.entry.js +191 -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-split-pane/bs-split-pane.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-split-pane/bs-split-pane.d.ts +85 -0
- package/dist/types/components/bs-split-pane/bs-split-pane.stories.d.ts +15 -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 +1995 -39
- package/dist/types/global/brand-theming.cmp.test.d.ts +1 -0
- package/package.json +21 -5
- package/reference.d.ts +245 -0
- package/reference.json +4284 -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-3a1af63a.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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Presentational card previewing a cited source: file name, originating system, page number and a
|
|
4
|
+
* snippet of the cited text. It does no fetching -- the consumer supplies content through slots.
|
|
5
|
+
* When `href` is set, the header becomes a link action.
|
|
6
|
+
*
|
|
7
|
+
* Composed from: `bs-card` (the surface) and `bs-source-link` (the file name / source header and
|
|
8
|
+
* open action).
|
|
9
|
+
*
|
|
10
|
+
* ## When to use
|
|
11
|
+
* - Showing the passage a chat answer was grounded in, e.g. on citation hover/click.
|
|
12
|
+
*
|
|
13
|
+
* ## When not to use
|
|
14
|
+
* - As a list row of sources -- use `bs-source-link` directly in `bs-chatbot-sources-drawer`.
|
|
15
|
+
*
|
|
16
|
+
* @slot - The snippet / preview content (text, highlighted excerpt, image).
|
|
17
|
+
* @slot footer - Overrides the default footer (page label).
|
|
18
|
+
* @part container - The card surface (`bs-card`).
|
|
19
|
+
* @part header - The `bs-source-link` header.
|
|
20
|
+
* @part snippet - The snippet wrapper.
|
|
21
|
+
* @part page - The page label.
|
|
22
|
+
* @prop --bs-citation-preview-gap - Gap between header, snippet and footer. Aliased to `--bs-spacing-100`.
|
|
23
|
+
* @prop --bs-citation-preview-snippet-color - Snippet text color. Aliased to `--bs-text-default`.
|
|
24
|
+
* @prop --bs-citation-preview-snippet-bg - Snippet background. Aliased to `--bs-surface-base`.
|
|
25
|
+
* @prop --bs-citation-preview-snippet-radius - Snippet corner radius. Aliased to `--bs-border-radius-100`.
|
|
26
|
+
* @prop --bs-citation-preview-page-color - Page label color. Aliased to `--bs-text-secondary`.
|
|
27
|
+
*/
|
|
28
|
+
export class BsCitationPreview {
|
|
29
|
+
/** The cited document's file name. */
|
|
30
|
+
fileName = 'Source';
|
|
31
|
+
/** The system/app the document came from. */
|
|
32
|
+
sourceName;
|
|
33
|
+
/** Page (or page range) of the citation, shown as "Page N". */
|
|
34
|
+
page;
|
|
35
|
+
/** If set, the header becomes a link that opens this URL. */
|
|
36
|
+
href;
|
|
37
|
+
/** Fires when the header action is activated (whether or not `href` is set). */
|
|
38
|
+
bsOpen;
|
|
39
|
+
render() {
|
|
40
|
+
const hasPage = this.page !== undefined && this.page !== null && this.page !== '';
|
|
41
|
+
return (h("bs-card", { key: 'e36c3d18f75f3d7a90aa18896889e135903dd646', part: "container", class: "bs-citation-preview", surface: "base" }, h("div", { key: 'f4e41670ebf4db3e335ce67b34d4f074af171be9', class: "bs-citation-preview__body" }, h("bs-source-link", { key: '4ec6c8a5c43eccb5d2f5a5bc725d4a43140e2fa2', part: "header", fileName: this.fileName, sourceName: this.sourceName, href: this.href, onBsOpen: () => this.bsOpen.emit() }), h("div", { key: '187e76af345603c54639211e287fd5d6c9f7c5b0', part: "snippet", class: "bs-citation-preview__snippet" }, h("slot", { key: 'af7cc7f6020888416c4efef5068584337f93e3af' })), h("div", { key: '75e18be6c910a8d1dd9953b8640c2a446c41b6a0', class: "bs-citation-preview__footer" }, h("slot", { key: '109bc862aa76158bddfc0474464a5fbcebbbae62', name: "footer" }, hasPage && (h("span", { key: 'de8bdfd079b158f9a7c9dbfb0c96f72e6e5ed35b', part: "page", class: "bs-citation-preview__page" }, "Page ", this.page)))))));
|
|
42
|
+
}
|
|
43
|
+
static get is() { return "bs-citation-preview"; }
|
|
44
|
+
static get encapsulation() { return "shadow"; }
|
|
45
|
+
static get originalStyleUrls() {
|
|
46
|
+
return {
|
|
47
|
+
"$": ["bs-citation-preview.css"]
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
static get styleUrls() {
|
|
51
|
+
return {
|
|
52
|
+
"$": ["bs-citation-preview.css"]
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
static get properties() {
|
|
56
|
+
return {
|
|
57
|
+
"fileName": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "string",
|
|
62
|
+
"resolved": "string",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": "The cited document's file name."
|
|
70
|
+
},
|
|
71
|
+
"getter": false,
|
|
72
|
+
"setter": false,
|
|
73
|
+
"reflect": false,
|
|
74
|
+
"attribute": "file-name",
|
|
75
|
+
"defaultValue": "'Source'"
|
|
76
|
+
},
|
|
77
|
+
"sourceName": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "string",
|
|
82
|
+
"resolved": "string",
|
|
83
|
+
"references": {}
|
|
84
|
+
},
|
|
85
|
+
"required": false,
|
|
86
|
+
"optional": true,
|
|
87
|
+
"docs": {
|
|
88
|
+
"tags": [],
|
|
89
|
+
"text": "The system/app the document came from."
|
|
90
|
+
},
|
|
91
|
+
"getter": false,
|
|
92
|
+
"setter": false,
|
|
93
|
+
"reflect": false,
|
|
94
|
+
"attribute": "source-name"
|
|
95
|
+
},
|
|
96
|
+
"page": {
|
|
97
|
+
"type": "any",
|
|
98
|
+
"mutable": false,
|
|
99
|
+
"complexType": {
|
|
100
|
+
"original": "string | number",
|
|
101
|
+
"resolved": "number | string",
|
|
102
|
+
"references": {}
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"optional": true,
|
|
106
|
+
"docs": {
|
|
107
|
+
"tags": [],
|
|
108
|
+
"text": "Page (or page range) of the citation, shown as \"Page N\"."
|
|
109
|
+
},
|
|
110
|
+
"getter": false,
|
|
111
|
+
"setter": false,
|
|
112
|
+
"reflect": false,
|
|
113
|
+
"attribute": "page"
|
|
114
|
+
},
|
|
115
|
+
"href": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "string",
|
|
120
|
+
"resolved": "string",
|
|
121
|
+
"references": {}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": true,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [],
|
|
127
|
+
"text": "If set, the header becomes a link that opens this URL."
|
|
128
|
+
},
|
|
129
|
+
"getter": false,
|
|
130
|
+
"setter": false,
|
|
131
|
+
"reflect": false,
|
|
132
|
+
"attribute": "href"
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static get events() {
|
|
137
|
+
return [{
|
|
138
|
+
"method": "bsOpen",
|
|
139
|
+
"name": "bsOpen",
|
|
140
|
+
"bubbles": true,
|
|
141
|
+
"cancelable": true,
|
|
142
|
+
"composed": true,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": "Fires when the header action is activated (whether or not `href` is set)."
|
|
146
|
+
},
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "void",
|
|
149
|
+
"resolved": "void",
|
|
150
|
+
"references": {}
|
|
151
|
+
}
|
|
152
|
+
}];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Genie AI Components/bs-citation-preview',
|
|
5
|
+
parameters: { docs: { description: { component: componentDescription('bs-citation-preview') } } },
|
|
6
|
+
render: args => html `
|
|
7
|
+
<bs-citation-preview file-name=${args.fileName} source-name=${args.sourceName} page=${args.page} href=${args.href}>
|
|
8
|
+
Employees accrue 25 days of paid leave per calendar year, pro rata for part-time contracts.
|
|
9
|
+
</bs-citation-preview>
|
|
10
|
+
`,
|
|
11
|
+
argTypes: {
|
|
12
|
+
fileName: { control: 'text', description: propDescription('bs-citation-preview', 'fileName') },
|
|
13
|
+
sourceName: { control: 'text', description: propDescription('bs-citation-preview', 'sourceName') },
|
|
14
|
+
page: { control: 'text', description: propDescription('bs-citation-preview', 'page') },
|
|
15
|
+
href: { control: 'text', description: propDescription('bs-citation-preview', 'href') },
|
|
16
|
+
},
|
|
17
|
+
args: { fileName: 'Employee Handbook 2026', sourceName: 'HoltePortalen', page: '12', href: '' },
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
export const Default = {};
|
|
21
|
+
export const WithoutPage = { name: 'Without page', args: { page: '' } };
|
|
22
|
+
export const WithLink = { name: 'With link', args: { href: 'https://example.com/handbook.pdf' } };
|
|
@@ -135,7 +135,7 @@ describe('bs-composer', () => {
|
|
|
135
135
|
});
|
|
136
136
|
describe('state="idle"', () => {
|
|
137
137
|
it('shows the send icon and enabled action/mic buttons, and emits bsSubmit on action click', async () => {
|
|
138
|
-
const { root, spyOnEvent } = await render(h("bs-composer", { state: "idle" }));
|
|
138
|
+
const { root, spyOnEvent } = await render(h("bs-composer", { state: "idle", value: "hello" }));
|
|
139
139
|
const submitSpy = spyOnEvent('bsSubmit');
|
|
140
140
|
const stopSpy = spyOnEvent('bsStop');
|
|
141
141
|
const confirmSpy = spyOnEvent('bsVoiceConfirm');
|
|
@@ -153,12 +153,18 @@ describe('bs-composer', () => {
|
|
|
153
153
|
expect(spy).toHaveReceivedEventTimes(1);
|
|
154
154
|
});
|
|
155
155
|
it('emits bsSubmit when Enter alone is pressed in the text field', async () => {
|
|
156
|
-
const { root, spyOnEvent } = await render(h("bs-composer", { state: "idle" }));
|
|
156
|
+
const { root, spyOnEvent } = await render(h("bs-composer", { state: "idle", value: "hello" }));
|
|
157
157
|
const spy = spyOnEvent('bsSubmit');
|
|
158
158
|
const textarea = root.shadowRoot.querySelector('textarea');
|
|
159
159
|
textarea.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true, composed: true, cancelable: true }));
|
|
160
160
|
expect(spy).toHaveReceivedEventTimes(1);
|
|
161
161
|
});
|
|
162
|
+
it('does not emit bsSubmit when the value is empty or whitespace-only', async () => {
|
|
163
|
+
const { root, spyOnEvent } = await render(h("bs-composer", { state: "idle", value: " " }));
|
|
164
|
+
const spy = spyOnEvent('bsSubmit');
|
|
165
|
+
root.shadowRoot.querySelector('[part="action"]').click();
|
|
166
|
+
expect(spy.length).toBe(0);
|
|
167
|
+
});
|
|
162
168
|
it('does not emit bsSubmit and inserts a newline when Shift+Enter is pressed', async () => {
|
|
163
169
|
const { root, spyOnEvent } = await render(h("bs-composer", { state: "idle" }));
|
|
164
170
|
const spy = spyOnEvent('bsSubmit');
|
|
@@ -239,4 +245,25 @@ describe('bs-composer', () => {
|
|
|
239
245
|
await waitForChanges();
|
|
240
246
|
expect(root).toEqualAttribute('state', 'recording');
|
|
241
247
|
});
|
|
248
|
+
it('removes the attach and mic buttons from the DOM with hideAttach / hideMic', async () => {
|
|
249
|
+
const { root } = await render(h("bs-composer", { hideAttach: true, hideMic: true }));
|
|
250
|
+
expect(root.shadowRoot.querySelector('[part="attach"]')).toBeNull();
|
|
251
|
+
expect(root.shadowRoot.querySelector('[part="mic"]')).toBeNull();
|
|
252
|
+
expect(root.shadowRoot.querySelector('[part="action"]')).not.toBeNull();
|
|
253
|
+
});
|
|
254
|
+
it('applies maxLength to the textarea and overrides labels', async () => {
|
|
255
|
+
const { root } = await render(h("bs-composer", { maxLength: 5, sendLabel: "Send it", attachLabel: "Vedh\u00E6ft" }));
|
|
256
|
+
expect(root.shadowRoot.querySelector('textarea').maxLength).toBe(5);
|
|
257
|
+
expect(root.shadowRoot.querySelector('[part="action"]')).toEqualAttribute('aria-label', 'Send it');
|
|
258
|
+
expect(root.shadowRoot.querySelector('[part="attach"]')).toEqualAttribute('aria-label', 'Vedhæft');
|
|
259
|
+
});
|
|
260
|
+
it('shows a spinner, sets aria-busy and ignores submit while loading', async () => {
|
|
261
|
+
const { root, spyOnEvent } = await render(h("bs-composer", { state: "idle", value: "hello", loading: true }));
|
|
262
|
+
const spy = spyOnEvent('bsSubmit');
|
|
263
|
+
const action = root.shadowRoot.querySelector('[part="action"]');
|
|
264
|
+
expect(action.querySelector('.bs-composer__spinner')).not.toBeNull();
|
|
265
|
+
expect(action).toEqualAttribute('aria-busy', 'true');
|
|
266
|
+
action.click();
|
|
267
|
+
expect(spy.length).toBe(0);
|
|
268
|
+
});
|
|
242
269
|
});
|
|
@@ -210,3 +210,19 @@
|
|
|
210
210
|
color: var(--bs-composer-action-icon-disabled);
|
|
211
211
|
cursor: not-allowed;
|
|
212
212
|
}
|
|
213
|
+
|
|
214
|
+
.bs-composer__spinner {
|
|
215
|
+
animation: bs-composer-spin 1s linear infinite;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes bs-composer-spin {
|
|
219
|
+
to {
|
|
220
|
+
transform: rotate(360deg);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@media (prefers-reduced-motion: reduce) {
|
|
225
|
+
.bs-composer__spinner {
|
|
226
|
+
animation-duration: 4s;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
@@ -100,13 +100,37 @@ export class BsComposer {
|
|
|
100
100
|
* accessible name -- set it in every real usage.
|
|
101
101
|
*/
|
|
102
102
|
ariaLabel = null;
|
|
103
|
+
/** Waiting state (e.g. the request was sent but no token has streamed in yet): replaces the send
|
|
104
|
+
* icon with a spinner, sets `aria-busy`, and makes the primary action inert so a second submit
|
|
105
|
+
* can't fire. Only has an effect while `state="idle"`; use `state="generating"` once streaming
|
|
106
|
+
* starts so the Stop button appears. */
|
|
107
|
+
loading = false;
|
|
108
|
+
/** Maximum number of characters the text field accepts (native `maxlength`). Unset = unlimited. */
|
|
109
|
+
maxLength;
|
|
110
|
+
/** Removes the attach ("+") button from the DOM. */
|
|
111
|
+
hideAttach = false;
|
|
112
|
+
/** Removes the mic button from the DOM. */
|
|
113
|
+
hideMic = false;
|
|
114
|
+
/** Accessible name of the attach button. */
|
|
115
|
+
attachLabel = 'Attach';
|
|
116
|
+
/** Accessible name of the mic button while not recording. */
|
|
117
|
+
micLabel = 'Start voice input';
|
|
118
|
+
/** Accessible name of the mic button while `state="recording"`. */
|
|
119
|
+
stopRecordingLabel = 'Stop recording';
|
|
120
|
+
/** Accessible name of the primary action button in `idle` / `disabled` state. */
|
|
121
|
+
sendLabel = 'Send';
|
|
122
|
+
/** Accessible name of the primary action button while `state="generating"`. */
|
|
123
|
+
stopLabel = 'Stop';
|
|
124
|
+
/** Accessible name of the primary action button while `state="recording"`. */
|
|
125
|
+
confirmLabel = 'Confirm';
|
|
103
126
|
/** Tracks whether the `attachments` slot has assigned content, so the row above the text field
|
|
104
127
|
* (padding, border) only takes up space when a consumer has actually put something there --
|
|
105
128
|
* same reasoning/pattern as `hasIcon`/`hasLabel` in `bs-attachment`. */
|
|
106
129
|
hasAttachments = false;
|
|
107
130
|
/** Fires on every keystroke in the text field, with the current value. */
|
|
108
131
|
bsInput;
|
|
109
|
-
/** Fires when the primary action button is clicked while `state="idle"
|
|
132
|
+
/** Fires when the primary action button is clicked while `state="idle"` and `value` is non-empty
|
|
133
|
+
* (whitespace-only counts as empty). */
|
|
110
134
|
bsSubmit;
|
|
111
135
|
/** Fires when the primary action button is clicked while `state="generating"`. */
|
|
112
136
|
bsStop;
|
|
@@ -179,6 +203,8 @@ export class BsComposer {
|
|
|
179
203
|
};
|
|
180
204
|
onActionClick = () => {
|
|
181
205
|
if (this.state === 'idle') {
|
|
206
|
+
if (this.loading || !this.value.trim())
|
|
207
|
+
return;
|
|
182
208
|
this.bsSubmit.emit();
|
|
183
209
|
}
|
|
184
210
|
else if (this.state === 'generating') {
|
|
@@ -190,12 +216,14 @@ export class BsComposer {
|
|
|
190
216
|
};
|
|
191
217
|
actionLabel() {
|
|
192
218
|
if (this.state === 'generating')
|
|
193
|
-
return
|
|
219
|
+
return this.stopLabel;
|
|
194
220
|
if (this.state === 'recording')
|
|
195
|
-
return
|
|
196
|
-
return
|
|
221
|
+
return this.confirmLabel;
|
|
222
|
+
return this.sendLabel;
|
|
197
223
|
}
|
|
198
224
|
renderActionIcon() {
|
|
225
|
+
if (this.loading && this.state === 'idle')
|
|
226
|
+
return h(SpinnerIcon, null);
|
|
199
227
|
if (this.state === 'generating')
|
|
200
228
|
return h(StopIcon, null);
|
|
201
229
|
if (this.state === 'recording')
|
|
@@ -206,7 +234,7 @@ export class BsComposer {
|
|
|
206
234
|
const placeholder = this.placeholder ?? DEFAULT_PLACEHOLDERS[this.variant];
|
|
207
235
|
const disabled = this.state === 'disabled';
|
|
208
236
|
const recording = this.state === 'recording';
|
|
209
|
-
return (h("div", { key: '
|
|
237
|
+
return (h("div", { key: '2ce76ec3bd4b265f11bb99dee3a3c90d9172597c', class: `bs-composer bs-composer--${this.state} bs-composer--${this.variant}` }, h("div", { key: '413304d4f29b85642bf75beb879a9551d5be8263', part: "attachments", class: `bs-composer__attachments-row ${this.hasAttachments ? 'bs-composer__attachments-row--visible' : ''}` }, h("slot", { key: 'e548c8e0f26f25748f4873c22ad97431f9de3ce8', name: "attachments", onSlotchange: this.onAttachmentsSlotchange })), h("div", { key: '1df76f515366b9ef952714b8454b6aa36fd905c8', class: "bs-composer__text-row" }, h("textarea", { key: '27f0367c0eb47824e66f41cd6d90838e18116b7a', ref: el => (this.inputEl = el), part: "input", class: "bs-composer__input", rows: 1, value: this.value, placeholder: placeholder, disabled: disabled, maxLength: this.maxLength, "aria-label": this.ariaLabel, onInput: this.onInput, onKeyDown: this.onInputKeydown })), h("div", { key: 'b27a014146d993fc41d80c233365964de65cf34c', class: "bs-composer__controls-row" }, !this.hideAttach && (h("button", { key: 'b1fe110b360b29a371a68626a1507213e11facf1', type: "button", part: "attach", class: "bs-composer__attach", "aria-label": this.attachLabel, onClick: this.onAttachClick }, h(PlusIcon, { key: 'b925e8b4e010f17594edf604401423b00ff72cba' }))), recording ? (h("span", { class: "bs-composer__waveform", "aria-hidden": "true" }, WAVEFORM_BAR_HEIGHTS.map(height => (h("span", { class: "bs-composer__waveform-bar", style: { '--bs-composer-bar-height': `${height}px` } }))))) : (h("span", { class: "bs-composer__spacer" })), !this.hideMic && (h("button", { key: '52248240911d69cbb69d11ef2368a9dbce2d545a', type: "button", part: "mic", class: `bs-composer__mic ${recording ? 'bs-composer__mic--recording' : ''}`, "aria-label": recording ? this.stopRecordingLabel : this.micLabel, disabled: disabled, onClick: this.onMicClick }, recording ? h(StopIcon, null) : h(MicIcon, null))), h("button", { key: '653e4a36899abaddb91ebf975e53514b400d2497', type: "button", part: "action", class: `bs-composer__action bs-composer__action--${this.state}`, "aria-label": this.actionLabel(), disabled: disabled, "aria-busy": this.loading && this.state === 'idle' ? 'true' : undefined, onClick: this.onActionClick }, this.renderActionIcon()), h("slot", { key: 'de551ed30be4f5008c58c4ec441daf8842209edd', name: "actions-end" }))));
|
|
210
238
|
}
|
|
211
239
|
static get is() { return "bs-composer"; }
|
|
212
240
|
static get encapsulation() { return "shadow"; }
|
|
@@ -333,6 +361,205 @@ export class BsComposer {
|
|
|
333
361
|
"reflect": false,
|
|
334
362
|
"attribute": "aria-label",
|
|
335
363
|
"defaultValue": "null"
|
|
364
|
+
},
|
|
365
|
+
"loading": {
|
|
366
|
+
"type": "boolean",
|
|
367
|
+
"mutable": false,
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "boolean",
|
|
370
|
+
"resolved": "boolean",
|
|
371
|
+
"references": {}
|
|
372
|
+
},
|
|
373
|
+
"required": false,
|
|
374
|
+
"optional": false,
|
|
375
|
+
"docs": {
|
|
376
|
+
"tags": [],
|
|
377
|
+
"text": "Waiting state (e.g. the request was sent but no token has streamed in yet): replaces the send\nicon with a spinner, sets `aria-busy`, and makes the primary action inert so a second submit\ncan't fire. Only has an effect while `state=\"idle\"`; use `state=\"generating\"` once streaming\nstarts so the Stop button appears."
|
|
378
|
+
},
|
|
379
|
+
"getter": false,
|
|
380
|
+
"setter": false,
|
|
381
|
+
"reflect": false,
|
|
382
|
+
"attribute": "loading",
|
|
383
|
+
"defaultValue": "false"
|
|
384
|
+
},
|
|
385
|
+
"maxLength": {
|
|
386
|
+
"type": "number",
|
|
387
|
+
"mutable": false,
|
|
388
|
+
"complexType": {
|
|
389
|
+
"original": "number",
|
|
390
|
+
"resolved": "number",
|
|
391
|
+
"references": {}
|
|
392
|
+
},
|
|
393
|
+
"required": false,
|
|
394
|
+
"optional": true,
|
|
395
|
+
"docs": {
|
|
396
|
+
"tags": [],
|
|
397
|
+
"text": "Maximum number of characters the text field accepts (native `maxlength`). Unset = unlimited."
|
|
398
|
+
},
|
|
399
|
+
"getter": false,
|
|
400
|
+
"setter": false,
|
|
401
|
+
"reflect": false,
|
|
402
|
+
"attribute": "max-length"
|
|
403
|
+
},
|
|
404
|
+
"hideAttach": {
|
|
405
|
+
"type": "boolean",
|
|
406
|
+
"mutable": false,
|
|
407
|
+
"complexType": {
|
|
408
|
+
"original": "boolean",
|
|
409
|
+
"resolved": "boolean",
|
|
410
|
+
"references": {}
|
|
411
|
+
},
|
|
412
|
+
"required": false,
|
|
413
|
+
"optional": false,
|
|
414
|
+
"docs": {
|
|
415
|
+
"tags": [],
|
|
416
|
+
"text": "Removes the attach (\"+\") button from the DOM."
|
|
417
|
+
},
|
|
418
|
+
"getter": false,
|
|
419
|
+
"setter": false,
|
|
420
|
+
"reflect": false,
|
|
421
|
+
"attribute": "hide-attach",
|
|
422
|
+
"defaultValue": "false"
|
|
423
|
+
},
|
|
424
|
+
"hideMic": {
|
|
425
|
+
"type": "boolean",
|
|
426
|
+
"mutable": false,
|
|
427
|
+
"complexType": {
|
|
428
|
+
"original": "boolean",
|
|
429
|
+
"resolved": "boolean",
|
|
430
|
+
"references": {}
|
|
431
|
+
},
|
|
432
|
+
"required": false,
|
|
433
|
+
"optional": false,
|
|
434
|
+
"docs": {
|
|
435
|
+
"tags": [],
|
|
436
|
+
"text": "Removes the mic button from the DOM."
|
|
437
|
+
},
|
|
438
|
+
"getter": false,
|
|
439
|
+
"setter": false,
|
|
440
|
+
"reflect": false,
|
|
441
|
+
"attribute": "hide-mic",
|
|
442
|
+
"defaultValue": "false"
|
|
443
|
+
},
|
|
444
|
+
"attachLabel": {
|
|
445
|
+
"type": "string",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "string",
|
|
449
|
+
"resolved": "string",
|
|
450
|
+
"references": {}
|
|
451
|
+
},
|
|
452
|
+
"required": false,
|
|
453
|
+
"optional": false,
|
|
454
|
+
"docs": {
|
|
455
|
+
"tags": [],
|
|
456
|
+
"text": "Accessible name of the attach button."
|
|
457
|
+
},
|
|
458
|
+
"getter": false,
|
|
459
|
+
"setter": false,
|
|
460
|
+
"reflect": false,
|
|
461
|
+
"attribute": "attach-label",
|
|
462
|
+
"defaultValue": "'Attach'"
|
|
463
|
+
},
|
|
464
|
+
"micLabel": {
|
|
465
|
+
"type": "string",
|
|
466
|
+
"mutable": false,
|
|
467
|
+
"complexType": {
|
|
468
|
+
"original": "string",
|
|
469
|
+
"resolved": "string",
|
|
470
|
+
"references": {}
|
|
471
|
+
},
|
|
472
|
+
"required": false,
|
|
473
|
+
"optional": false,
|
|
474
|
+
"docs": {
|
|
475
|
+
"tags": [],
|
|
476
|
+
"text": "Accessible name of the mic button while not recording."
|
|
477
|
+
},
|
|
478
|
+
"getter": false,
|
|
479
|
+
"setter": false,
|
|
480
|
+
"reflect": false,
|
|
481
|
+
"attribute": "mic-label",
|
|
482
|
+
"defaultValue": "'Start voice input'"
|
|
483
|
+
},
|
|
484
|
+
"stopRecordingLabel": {
|
|
485
|
+
"type": "string",
|
|
486
|
+
"mutable": false,
|
|
487
|
+
"complexType": {
|
|
488
|
+
"original": "string",
|
|
489
|
+
"resolved": "string",
|
|
490
|
+
"references": {}
|
|
491
|
+
},
|
|
492
|
+
"required": false,
|
|
493
|
+
"optional": false,
|
|
494
|
+
"docs": {
|
|
495
|
+
"tags": [],
|
|
496
|
+
"text": "Accessible name of the mic button while `state=\"recording\"`."
|
|
497
|
+
},
|
|
498
|
+
"getter": false,
|
|
499
|
+
"setter": false,
|
|
500
|
+
"reflect": false,
|
|
501
|
+
"attribute": "stop-recording-label",
|
|
502
|
+
"defaultValue": "'Stop recording'"
|
|
503
|
+
},
|
|
504
|
+
"sendLabel": {
|
|
505
|
+
"type": "string",
|
|
506
|
+
"mutable": false,
|
|
507
|
+
"complexType": {
|
|
508
|
+
"original": "string",
|
|
509
|
+
"resolved": "string",
|
|
510
|
+
"references": {}
|
|
511
|
+
},
|
|
512
|
+
"required": false,
|
|
513
|
+
"optional": false,
|
|
514
|
+
"docs": {
|
|
515
|
+
"tags": [],
|
|
516
|
+
"text": "Accessible name of the primary action button in `idle` / `disabled` state."
|
|
517
|
+
},
|
|
518
|
+
"getter": false,
|
|
519
|
+
"setter": false,
|
|
520
|
+
"reflect": false,
|
|
521
|
+
"attribute": "send-label",
|
|
522
|
+
"defaultValue": "'Send'"
|
|
523
|
+
},
|
|
524
|
+
"stopLabel": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"mutable": false,
|
|
527
|
+
"complexType": {
|
|
528
|
+
"original": "string",
|
|
529
|
+
"resolved": "string",
|
|
530
|
+
"references": {}
|
|
531
|
+
},
|
|
532
|
+
"required": false,
|
|
533
|
+
"optional": false,
|
|
534
|
+
"docs": {
|
|
535
|
+
"tags": [],
|
|
536
|
+
"text": "Accessible name of the primary action button while `state=\"generating\"`."
|
|
537
|
+
},
|
|
538
|
+
"getter": false,
|
|
539
|
+
"setter": false,
|
|
540
|
+
"reflect": false,
|
|
541
|
+
"attribute": "stop-label",
|
|
542
|
+
"defaultValue": "'Stop'"
|
|
543
|
+
},
|
|
544
|
+
"confirmLabel": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"mutable": false,
|
|
547
|
+
"complexType": {
|
|
548
|
+
"original": "string",
|
|
549
|
+
"resolved": "string",
|
|
550
|
+
"references": {}
|
|
551
|
+
},
|
|
552
|
+
"required": false,
|
|
553
|
+
"optional": false,
|
|
554
|
+
"docs": {
|
|
555
|
+
"tags": [],
|
|
556
|
+
"text": "Accessible name of the primary action button while `state=\"recording\"`."
|
|
557
|
+
},
|
|
558
|
+
"getter": false,
|
|
559
|
+
"setter": false,
|
|
560
|
+
"reflect": false,
|
|
561
|
+
"attribute": "confirm-label",
|
|
562
|
+
"defaultValue": "'Confirm'"
|
|
336
563
|
}
|
|
337
564
|
};
|
|
338
565
|
}
|
|
@@ -365,7 +592,7 @@ export class BsComposer {
|
|
|
365
592
|
"composed": true,
|
|
366
593
|
"docs": {
|
|
367
594
|
"tags": [],
|
|
368
|
-
"text": "Fires when the primary action button is clicked while `state=\"idle\"
|
|
595
|
+
"text": "Fires when the primary action button is clicked while `state=\"idle\"` and `value` is non-empty\n(whitespace-only counts as empty)."
|
|
369
596
|
},
|
|
370
597
|
"complexType": {
|
|
371
598
|
"original": "void",
|
|
@@ -436,6 +663,7 @@ export class BsComposer {
|
|
|
436
663
|
}
|
|
437
664
|
static get elementRef() { return "el"; }
|
|
438
665
|
}
|
|
666
|
+
const SpinnerIcon = () => (h("svg", { class: "bs-composer__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" })));
|
|
439
667
|
const PlusIcon = () => (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M8 2.5V13.5M2.5 8H13.5", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" })));
|
|
440
668
|
const MicIcon = () => (h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, h("path", { d: "M8 9.5C9.10457 9.5 10 8.60457 10 7.5V3.5C10 2.39543 9.10457 1.5 8 1.5C6.89543 1.5 6 2.39543 6 3.5V7.5C6 8.60457 6.89543 9.5 8 9.5Z", stroke: "currentColor", "stroke-width": "1.4" }), h("path", { d: "M3.5 7V7.5C3.5 9.98528 5.51472 12 8 12C10.4853 12 12.5 9.98528 12.5 7.5V7", stroke: "currentColor", "stroke-width": "1.4", "stroke-linecap": "round" }), h("path", { d: "M8 12V14.5", stroke: "currentColor", "stroke-width": "1.4", "stroke-linecap": "round" })));
|
|
441
669
|
// Exact "PaperPlaneRight" path from the Figma design (node 45:95), not a hand-drawn approximation.
|
package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js
CHANGED
|
@@ -85,4 +85,9 @@ describe('bs-composer-status-banner', () => {
|
|
|
85
85
|
root.shadowRoot.querySelector('[part="close"]').click();
|
|
86
86
|
expect(closeSpy).toHaveReceivedEventTimes(1);
|
|
87
87
|
});
|
|
88
|
+
it('shows a spinner and aria-busy while loading', async () => {
|
|
89
|
+
const { root } = await render(h("bs-composer-status-banner", { type: "info", loading: true }));
|
|
90
|
+
expect(root.shadowRoot.querySelector('.bs-composer-status-banner__spinner')).not.toBeNull();
|
|
91
|
+
expect(root.shadowRoot.querySelector('[role]')).toEqualAttribute('aria-busy', 'true');
|
|
92
|
+
});
|
|
88
93
|
});
|
|
@@ -171,3 +171,19 @@
|
|
|
171
171
|
outline: 2px solid var(--bs-border-neutral-focus);
|
|
172
172
|
outline-offset: 1px;
|
|
173
173
|
}
|
|
174
|
+
|
|
175
|
+
.bs-composer-status-banner__spinner {
|
|
176
|
+
animation: bs-composer-status-banner-spin 1s linear infinite;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
@keyframes bs-composer-status-banner-spin {
|
|
180
|
+
to {
|
|
181
|
+
transform: rotate(360deg);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (prefers-reduced-motion: reduce) {
|
|
186
|
+
.bs-composer-status-banner__spinner {
|
|
187
|
+
animation-duration: 4s;
|
|
188
|
+
}
|
|
189
|
+
}
|