@brandsync/wc 1.12.0 → 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 +24 -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 +16 -8
- 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 +93 -5
- package/dist/collection/components/bs-input/bs-input.stories.js +7 -23
- 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 +16 -8
- 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-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-89099a39.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-BUskqBR6.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,117 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-side-panel', () => {
|
|
3
|
+
it('renders nothing when closed', async () => {
|
|
4
|
+
const { root } = await render(h("bs-side-panel", { heading: "History" }, "Body"));
|
|
5
|
+
expect(root.shadowRoot.querySelector('[role="dialog"]')).toBeNull();
|
|
6
|
+
});
|
|
7
|
+
it('renders a labelled dialog when open', async () => {
|
|
8
|
+
const { root } = await render(h("bs-side-panel", { open: true, heading: "History" }, "Body"));
|
|
9
|
+
const dialog = root.shadowRoot.querySelector('[role="dialog"]');
|
|
10
|
+
const heading = root.shadowRoot.querySelector('[part="heading"]');
|
|
11
|
+
expect(dialog.getAttribute('aria-labelledby')).toBe(heading.id);
|
|
12
|
+
expect(heading).toHaveTextContent('History');
|
|
13
|
+
});
|
|
14
|
+
it('closes on Escape and emits bsClose', async () => {
|
|
15
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-side-panel", { open: true, heading: "History" }, "Body"));
|
|
16
|
+
const spy = spyOnEvent('bsClose');
|
|
17
|
+
root.shadowRoot.querySelector('[role="dialog"]').dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true, composed: true }));
|
|
18
|
+
await waitForChanges();
|
|
19
|
+
expect(spy).toHaveReceivedEvent();
|
|
20
|
+
expect(root.open).toBe(false);
|
|
21
|
+
});
|
|
22
|
+
it('closes via the close button, using closeLabel', async () => {
|
|
23
|
+
const { root, waitForChanges, spyOnEvent } = await render(h("bs-side-panel", { open: true, heading: "H", closeLabel: "Dismiss" }, "Body"));
|
|
24
|
+
const spy = spyOnEvent('bsClose');
|
|
25
|
+
const btn = root.shadowRoot.querySelector('bs-icon-button');
|
|
26
|
+
expect(btn.getAttribute('aria-label') ?? btn.ariaLabel).toBe('Dismiss');
|
|
27
|
+
btn.click();
|
|
28
|
+
await waitForChanges();
|
|
29
|
+
expect(spy).toHaveReceivedEvent();
|
|
30
|
+
expect(root.open).toBe(false);
|
|
31
|
+
});
|
|
32
|
+
it('only renders the overlay when requested, and overlay click closes', async () => {
|
|
33
|
+
const { root, waitForChanges } = await render(h("bs-side-panel", { open: true, overlay: true, heading: "H" }, "Body"));
|
|
34
|
+
const overlay = root.shadowRoot.querySelector('[part="overlay"]');
|
|
35
|
+
expect(overlay).not.toBeNull();
|
|
36
|
+
overlay.click();
|
|
37
|
+
await waitForChanges();
|
|
38
|
+
expect(root.open).toBe(false);
|
|
39
|
+
});
|
|
40
|
+
it('has no overlay by default and reflects side', async () => {
|
|
41
|
+
const { root } = await render(h("bs-side-panel", { open: true, side: "start", heading: "H" }));
|
|
42
|
+
expect(root.shadowRoot.querySelector('[part="overlay"]')).toBeNull();
|
|
43
|
+
expect(root).toEqualAttribute('side', 'start');
|
|
44
|
+
});
|
|
45
|
+
it('moves focus in on open and restores it on close', async () => {
|
|
46
|
+
const outer = document.createElement('button');
|
|
47
|
+
document.body.appendChild(outer);
|
|
48
|
+
outer.focus();
|
|
49
|
+
const { root, waitForChanges } = await render(h("bs-side-panel", { heading: "H" }, "Body"));
|
|
50
|
+
outer.focus();
|
|
51
|
+
root.open = true;
|
|
52
|
+
await waitForChanges();
|
|
53
|
+
expect(document.activeElement).toBe(root);
|
|
54
|
+
expect(root.shadowRoot.activeElement).toBe(root.shadowRoot.querySelector('[role="dialog"]'));
|
|
55
|
+
root.open = false;
|
|
56
|
+
await waitForChanges();
|
|
57
|
+
expect(document.activeElement).toBe(outer);
|
|
58
|
+
outer.remove();
|
|
59
|
+
});
|
|
60
|
+
it('sets aria-modal on the dialog', async () => {
|
|
61
|
+
const { root } = await render(h("bs-side-panel", { open: true, heading: "H" }));
|
|
62
|
+
expect(root.shadowRoot.querySelector('[role="dialog"]')).toEqualAttribute('aria-modal', 'true');
|
|
63
|
+
});
|
|
64
|
+
it('traps Tab and Shift+Tab through slotted content', async () => {
|
|
65
|
+
const { root, waitForChanges } = await render(h("bs-side-panel", { open: true, heading: "H" }, h("button", { id: "a" }, "A"), h("button", { id: "b" }, "B")));
|
|
66
|
+
await waitForChanges();
|
|
67
|
+
const a = root.querySelector('#a');
|
|
68
|
+
const b = root.querySelector('#b');
|
|
69
|
+
const key = (target, shiftKey = false) => {
|
|
70
|
+
const ev = new KeyboardEvent('keydown', { key: 'Tab', shiftKey, bubbles: true, composed: true, cancelable: true });
|
|
71
|
+
target.dispatchEvent(ev);
|
|
72
|
+
return ev;
|
|
73
|
+
};
|
|
74
|
+
b.focus();
|
|
75
|
+
expect(key(b).defaultPrevented).toBe(true);
|
|
76
|
+
// Forward from the last focusable wraps to the first (the header close button).
|
|
77
|
+
expect(root.shadowRoot.activeElement).not.toBeNull();
|
|
78
|
+
expect(document.activeElement).toBe(root);
|
|
79
|
+
a.focus();
|
|
80
|
+
expect(key(a, true).defaultPrevented).toBe(false);
|
|
81
|
+
// Shift+Tab from the first focusable (close button) wraps to the last slotted element.
|
|
82
|
+
const close = root.shadowRoot.querySelector('bs-icon-button');
|
|
83
|
+
close.focus();
|
|
84
|
+
expect(key(close, true).defaultPrevented).toBe(true);
|
|
85
|
+
expect(document.activeElement).toBe(b);
|
|
86
|
+
});
|
|
87
|
+
it('makes siblings inert with overlay and restores prior state', async () => {
|
|
88
|
+
const plain = document.createElement('div');
|
|
89
|
+
const already = document.createElement('div');
|
|
90
|
+
already.inert = true;
|
|
91
|
+
const { root, waitForChanges } = await render(h("bs-side-panel", { heading: "H", overlay: true }));
|
|
92
|
+
document.body.append(plain, already);
|
|
93
|
+
root.open = true;
|
|
94
|
+
await waitForChanges();
|
|
95
|
+
expect(plain.inert).toBe(true);
|
|
96
|
+
expect(root.inert).toBe(false);
|
|
97
|
+
root.open = false;
|
|
98
|
+
await waitForChanges();
|
|
99
|
+
expect(plain.inert).toBe(false);
|
|
100
|
+
expect(already.inert).toBe(true);
|
|
101
|
+
plain.remove();
|
|
102
|
+
already.remove();
|
|
103
|
+
});
|
|
104
|
+
it('does not set inert without overlay, and restores on disconnect', async () => {
|
|
105
|
+
const plain = document.createElement('div');
|
|
106
|
+
const { root, waitForChanges } = await render(h("bs-side-panel", { heading: "H", open: true }));
|
|
107
|
+
document.body.append(plain);
|
|
108
|
+
await waitForChanges();
|
|
109
|
+
expect(plain.inert).toBe(false);
|
|
110
|
+
root.overlay = true;
|
|
111
|
+
await waitForChanges();
|
|
112
|
+
expect(plain.inert).toBe(true);
|
|
113
|
+
root.remove();
|
|
114
|
+
expect(plain.inert).toBe(false);
|
|
115
|
+
plain.remove();
|
|
116
|
+
});
|
|
117
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--bs-side-panel-bg: var(--bs-surface-raised);
|
|
3
|
+
--bs-side-panel-width: calc(var(--bs-scale-1600) * 3);
|
|
4
|
+
--bs-side-panel-padding: var(--bs-spacing-200);
|
|
5
|
+
--bs-side-panel-shadow: var(--bs-shadow-md);
|
|
6
|
+
--bs-side-panel-overlay-bg: var(--bs-surface-overlay);
|
|
7
|
+
--bs-side-panel-color: var(--bs-text-default);
|
|
8
|
+
--bs-side-panel-z-index: var(--bs-z-index-modal);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.bs-side-panel {
|
|
12
|
+
position: fixed;
|
|
13
|
+
inset: 0;
|
|
14
|
+
z-index: var(--bs-side-panel-z-index);
|
|
15
|
+
pointer-events: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bs-side-panel__overlay {
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
background: var(--bs-side-panel-overlay-bg);
|
|
22
|
+
pointer-events: auto;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.bs-side-panel__panel {
|
|
26
|
+
position: absolute;
|
|
27
|
+
top: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
width: var(--bs-side-panel-width);
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
background: var(--bs-side-panel-bg);
|
|
35
|
+
color: var(--bs-side-panel-color);
|
|
36
|
+
box-shadow: var(--bs-side-panel-shadow);
|
|
37
|
+
pointer-events: auto;
|
|
38
|
+
outline: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.bs-side-panel--start .bs-side-panel__panel {
|
|
42
|
+
left: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bs-side-panel--end .bs-side-panel__panel {
|
|
46
|
+
right: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.bs-side-panel__header {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
gap: var(--bs-spacing-100);
|
|
54
|
+
padding: var(--bs-side-panel-padding);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.bs-side-panel__heading {
|
|
58
|
+
margin: 0;
|
|
59
|
+
font-size: var(--bs-font-size-lg);
|
|
60
|
+
font-weight: var(--bs-font-weight-semibold);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.bs-side-panel__actions {
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: var(--bs-spacing-100);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.bs-side-panel__body {
|
|
70
|
+
flex: 1;
|
|
71
|
+
overflow-y: auto;
|
|
72
|
+
padding: 0 var(--bs-side-panel-padding);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.bs-side-panel__footer {
|
|
76
|
+
padding: var(--bs-side-panel-padding);
|
|
77
|
+
}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
let panelId = 0;
|
|
3
|
+
/**
|
|
4
|
+
* A generic slide-in panel (drawer) anchored to the start or end edge, for history, filters, FAQ
|
|
5
|
+
* and similar secondary content. Closes via its close button or Escape and emits `bsClose`.
|
|
6
|
+
*
|
|
7
|
+
* Composed from `bs-icon-button` (close button).
|
|
8
|
+
*
|
|
9
|
+
* While open, Tab/Shift+Tab are trapped in the panel; with `overlay`, the rest of the page is made `inert`.
|
|
10
|
+
*
|
|
11
|
+
* ## When to use
|
|
12
|
+
* - Secondary content that sits beside the page without leaving it.
|
|
13
|
+
*
|
|
14
|
+
* ## When not to use
|
|
15
|
+
* - A blocking confirmation (use `bs-dialog`).
|
|
16
|
+
*
|
|
17
|
+
* @slot - Default slot: the panel body.
|
|
18
|
+
* @slot header-actions - Extra actions shown in the header next to the close button.
|
|
19
|
+
* @slot footer - Optional footer area (e.g. apply/reset buttons).
|
|
20
|
+
* @part overlay - The backdrop (only when `overlay` is set).
|
|
21
|
+
* @part panel - The panel surface (role="dialog").
|
|
22
|
+
* @part header - The header row.
|
|
23
|
+
* @part heading - The heading text.
|
|
24
|
+
* @part body - The scrollable body.
|
|
25
|
+
* @part footer - The footer wrapper.
|
|
26
|
+
* @prop --bs-side-panel-bg - Panel background. Aliased to `--bs-surface-raised`.
|
|
27
|
+
* @prop --bs-side-panel-width - Panel width. Aliased to `calc(var(--bs-scale-1600) * 3)`.
|
|
28
|
+
* @prop --bs-side-panel-padding - Header/body/footer padding. Aliased to `--bs-spacing-200`.
|
|
29
|
+
* @prop --bs-side-panel-shadow - Panel shadow. Aliased to `--bs-shadow-md`.
|
|
30
|
+
* @prop --bs-side-panel-overlay-bg - Backdrop color. Aliased to `--bs-surface-overlay`.
|
|
31
|
+
* @prop --bs-side-panel-color - Text color. Aliased to `--bs-text-default`.
|
|
32
|
+
* @prop --bs-side-panel-z-index - Stacking order. Aliased to `--bs-z-index-modal`.
|
|
33
|
+
*/
|
|
34
|
+
export class BsSidePanel {
|
|
35
|
+
el;
|
|
36
|
+
/** Whether the panel is visible. */
|
|
37
|
+
open = false;
|
|
38
|
+
/** Panel title; also its accessible name. */
|
|
39
|
+
heading = '';
|
|
40
|
+
/** Edge the panel is anchored to. */
|
|
41
|
+
side = 'end';
|
|
42
|
+
/** Accessible label of the close button. */
|
|
43
|
+
closeLabel = 'Close';
|
|
44
|
+
/** Shows a backdrop behind the panel; clicking it closes the panel. */
|
|
45
|
+
overlay = false;
|
|
46
|
+
/** Emitted when the panel requests to close (close button, Escape, overlay click). */
|
|
47
|
+
bsClose;
|
|
48
|
+
headingId = `bs-side-panel-heading-${++panelId}`;
|
|
49
|
+
previouslyFocused = null;
|
|
50
|
+
panelEl;
|
|
51
|
+
/** Elements we set `inert` on (so we only undo our own changes). */
|
|
52
|
+
inertified = [];
|
|
53
|
+
onOpenChange(next) {
|
|
54
|
+
if (next) {
|
|
55
|
+
this.previouslyFocused = document.activeElement ?? null;
|
|
56
|
+
this.applyInert();
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.restoreInert();
|
|
60
|
+
this.previouslyFocused?.focus?.();
|
|
61
|
+
this.previouslyFocused = null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
onOverlayChange() {
|
|
65
|
+
if (!this.open)
|
|
66
|
+
return;
|
|
67
|
+
this.restoreInert();
|
|
68
|
+
this.applyInert();
|
|
69
|
+
}
|
|
70
|
+
connectedCallback() {
|
|
71
|
+
if (this.open)
|
|
72
|
+
this.applyInert();
|
|
73
|
+
}
|
|
74
|
+
disconnectedCallback() {
|
|
75
|
+
this.restoreInert();
|
|
76
|
+
}
|
|
77
|
+
/** Marks everything outside the panel as inert (modal overlay only). */
|
|
78
|
+
applyInert() {
|
|
79
|
+
if (!this.overlay || this.inertified.length)
|
|
80
|
+
return;
|
|
81
|
+
let node = this.el;
|
|
82
|
+
while (node && node !== document.body) {
|
|
83
|
+
const parent = node.parentElement;
|
|
84
|
+
if (!parent)
|
|
85
|
+
break;
|
|
86
|
+
Array.from(parent.children).forEach(sib => {
|
|
87
|
+
if (sib === node || !(sib instanceof HTMLElement) || sib.inert)
|
|
88
|
+
return;
|
|
89
|
+
sib.inert = true;
|
|
90
|
+
this.inertified.push(sib);
|
|
91
|
+
});
|
|
92
|
+
node = parent;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
restoreInert() {
|
|
96
|
+
this.inertified.forEach(el => (el.inert = false));
|
|
97
|
+
this.inertified = [];
|
|
98
|
+
}
|
|
99
|
+
getFocusables() {
|
|
100
|
+
const sel = 'a[href],button:not([disabled]),input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"]),bs-icon-button,[contenteditable="true"]';
|
|
101
|
+
const out = [];
|
|
102
|
+
const visit = (root) => {
|
|
103
|
+
Array.from(root.children).forEach(child => {
|
|
104
|
+
if (child instanceof HTMLSlotElement) {
|
|
105
|
+
const assigned = child.assignedElements({ flatten: true });
|
|
106
|
+
assigned.forEach(a => consider(a));
|
|
107
|
+
}
|
|
108
|
+
else
|
|
109
|
+
consider(child);
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
const consider = (el) => {
|
|
113
|
+
if (!(el instanceof HTMLElement) || el.hidden || el.inert)
|
|
114
|
+
return;
|
|
115
|
+
if (el.matches(sel) && el.getAttribute('tabindex') !== '-1') {
|
|
116
|
+
// A custom element that delegates focus is itself the tab stop.
|
|
117
|
+
out.push(el);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
visit(el.shadowRoot ?? el);
|
|
121
|
+
};
|
|
122
|
+
if (this.panelEl)
|
|
123
|
+
visit(this.panelEl);
|
|
124
|
+
return out;
|
|
125
|
+
}
|
|
126
|
+
trapTab(ev) {
|
|
127
|
+
const items = this.getFocusables();
|
|
128
|
+
if (!items.length) {
|
|
129
|
+
ev.preventDefault();
|
|
130
|
+
this.panelEl?.focus();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
const first = items[0];
|
|
134
|
+
const last = items[items.length - 1];
|
|
135
|
+
const path = ev.composedPath();
|
|
136
|
+
const active = items.find(i => path.includes(i));
|
|
137
|
+
const atPanel = path[0] === this.panelEl;
|
|
138
|
+
if (ev.shiftKey && (atPanel || active === first || !active)) {
|
|
139
|
+
ev.preventDefault();
|
|
140
|
+
last.focus();
|
|
141
|
+
}
|
|
142
|
+
else if (!ev.shiftKey && (active === last || (!active && !atPanel))) {
|
|
143
|
+
ev.preventDefault();
|
|
144
|
+
first.focus();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
componentDidRender() {
|
|
148
|
+
if (this.open && this.panelEl && !this.focusedIn) {
|
|
149
|
+
this.focusedIn = true;
|
|
150
|
+
this.panelEl.focus();
|
|
151
|
+
}
|
|
152
|
+
else if (!this.open) {
|
|
153
|
+
this.focusedIn = false;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
focusedIn = false;
|
|
157
|
+
close = () => {
|
|
158
|
+
this.open = false;
|
|
159
|
+
this.bsClose.emit();
|
|
160
|
+
};
|
|
161
|
+
onKeyDown = (ev) => {
|
|
162
|
+
if (ev.key === 'Escape' && this.open) {
|
|
163
|
+
ev.stopPropagation();
|
|
164
|
+
this.close();
|
|
165
|
+
}
|
|
166
|
+
else if (ev.key === 'Tab' && this.open) {
|
|
167
|
+
this.trapTab(ev);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
render() {
|
|
171
|
+
if (!this.open)
|
|
172
|
+
return null;
|
|
173
|
+
return (h("div", { class: `bs-side-panel bs-side-panel--${this.side}`, onKeyDown: this.onKeyDown }, this.overlay && h("div", { part: "overlay", class: "bs-side-panel__overlay", onClick: this.close }), h("div", { part: "panel", class: "bs-side-panel__panel", role: "dialog", "aria-modal": "true", "aria-labelledby": this.headingId, tabindex: "-1", ref: el => (this.panelEl = el) }, h("div", { part: "header", class: "bs-side-panel__header" }, h("h2", { part: "heading", id: this.headingId, class: "bs-side-panel__heading" }, this.heading), h("div", { class: "bs-side-panel__actions" }, h("slot", { name: "header-actions" }), h("bs-icon-button", { variant: "subtle", ariaLabel: this.closeLabel, onClick: this.close }, h("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { d: "M6 6L18 18M18 6L6 18", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" }))))), h("div", { part: "body", class: "bs-side-panel__body" }, h("slot", null)), h("div", { part: "footer", class: "bs-side-panel__footer" }, h("slot", { name: "footer" })))));
|
|
174
|
+
}
|
|
175
|
+
static get is() { return "bs-side-panel"; }
|
|
176
|
+
static get encapsulation() { return "shadow"; }
|
|
177
|
+
static get originalStyleUrls() {
|
|
178
|
+
return {
|
|
179
|
+
"$": ["bs-side-panel.css"]
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
static get styleUrls() {
|
|
183
|
+
return {
|
|
184
|
+
"$": ["bs-side-panel.css"]
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
static get properties() {
|
|
188
|
+
return {
|
|
189
|
+
"open": {
|
|
190
|
+
"type": "boolean",
|
|
191
|
+
"mutable": true,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "boolean",
|
|
194
|
+
"resolved": "boolean",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "Whether the panel is visible."
|
|
202
|
+
},
|
|
203
|
+
"getter": false,
|
|
204
|
+
"setter": false,
|
|
205
|
+
"reflect": true,
|
|
206
|
+
"attribute": "open",
|
|
207
|
+
"defaultValue": "false"
|
|
208
|
+
},
|
|
209
|
+
"heading": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"mutable": false,
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "string",
|
|
214
|
+
"resolved": "string",
|
|
215
|
+
"references": {}
|
|
216
|
+
},
|
|
217
|
+
"required": false,
|
|
218
|
+
"optional": false,
|
|
219
|
+
"docs": {
|
|
220
|
+
"tags": [],
|
|
221
|
+
"text": "Panel title; also its accessible name."
|
|
222
|
+
},
|
|
223
|
+
"getter": false,
|
|
224
|
+
"setter": false,
|
|
225
|
+
"reflect": false,
|
|
226
|
+
"attribute": "heading",
|
|
227
|
+
"defaultValue": "''"
|
|
228
|
+
},
|
|
229
|
+
"side": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "BsSidePanelSide",
|
|
234
|
+
"resolved": "\"end\" | \"start\"",
|
|
235
|
+
"references": {
|
|
236
|
+
"BsSidePanelSide": {
|
|
237
|
+
"location": "local",
|
|
238
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-side-panel/bs-side-panel.tsx",
|
|
239
|
+
"id": "src/components/bs-side-panel/bs-side-panel.tsx::BsSidePanelSide"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"required": false,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": "Edge the panel is anchored to."
|
|
248
|
+
},
|
|
249
|
+
"getter": false,
|
|
250
|
+
"setter": false,
|
|
251
|
+
"reflect": true,
|
|
252
|
+
"attribute": "side",
|
|
253
|
+
"defaultValue": "'end'"
|
|
254
|
+
},
|
|
255
|
+
"closeLabel": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"mutable": false,
|
|
258
|
+
"complexType": {
|
|
259
|
+
"original": "string",
|
|
260
|
+
"resolved": "string",
|
|
261
|
+
"references": {}
|
|
262
|
+
},
|
|
263
|
+
"required": false,
|
|
264
|
+
"optional": false,
|
|
265
|
+
"docs": {
|
|
266
|
+
"tags": [],
|
|
267
|
+
"text": "Accessible label of the close button."
|
|
268
|
+
},
|
|
269
|
+
"getter": false,
|
|
270
|
+
"setter": false,
|
|
271
|
+
"reflect": false,
|
|
272
|
+
"attribute": "close-label",
|
|
273
|
+
"defaultValue": "'Close'"
|
|
274
|
+
},
|
|
275
|
+
"overlay": {
|
|
276
|
+
"type": "boolean",
|
|
277
|
+
"mutable": false,
|
|
278
|
+
"complexType": {
|
|
279
|
+
"original": "boolean",
|
|
280
|
+
"resolved": "boolean",
|
|
281
|
+
"references": {}
|
|
282
|
+
},
|
|
283
|
+
"required": false,
|
|
284
|
+
"optional": false,
|
|
285
|
+
"docs": {
|
|
286
|
+
"tags": [],
|
|
287
|
+
"text": "Shows a backdrop behind the panel; clicking it closes the panel."
|
|
288
|
+
},
|
|
289
|
+
"getter": false,
|
|
290
|
+
"setter": false,
|
|
291
|
+
"reflect": true,
|
|
292
|
+
"attribute": "overlay",
|
|
293
|
+
"defaultValue": "false"
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
static get events() {
|
|
298
|
+
return [{
|
|
299
|
+
"method": "bsClose",
|
|
300
|
+
"name": "bsClose",
|
|
301
|
+
"bubbles": true,
|
|
302
|
+
"cancelable": true,
|
|
303
|
+
"composed": true,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": "Emitted when the panel requests to close (close button, Escape, overlay click)."
|
|
307
|
+
},
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "void",
|
|
310
|
+
"resolved": "void",
|
|
311
|
+
"references": {}
|
|
312
|
+
}
|
|
313
|
+
}];
|
|
314
|
+
}
|
|
315
|
+
static get elementRef() { return "el"; }
|
|
316
|
+
static get watchers() {
|
|
317
|
+
return [{
|
|
318
|
+
"propName": "open",
|
|
319
|
+
"methodName": "onOpenChange"
|
|
320
|
+
}, {
|
|
321
|
+
"propName": "overlay",
|
|
322
|
+
"methodName": "onOverlayChange"
|
|
323
|
+
}];
|
|
324
|
+
}
|
|
325
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription } from "../../stories-utils";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Components/bs-side-panel',
|
|
5
|
+
parameters: { docs: { description: { component: componentDescription('bs-side-panel') } } },
|
|
6
|
+
render: args => html `
|
|
7
|
+
<bs-side-panel ?open=${args.open} heading=${args.heading} side=${args.side} close-label=${args.closeLabel} ?overlay=${args.overlay}>
|
|
8
|
+
<p>Panel body content.</p>
|
|
9
|
+
<bs-button slot="footer">Apply</bs-button>
|
|
10
|
+
</bs-side-panel>
|
|
11
|
+
`,
|
|
12
|
+
argTypes: {
|
|
13
|
+
open: { control: 'boolean' },
|
|
14
|
+
heading: { control: 'text' },
|
|
15
|
+
side: { control: 'inline-radio', options: ['start', 'end'] },
|
|
16
|
+
closeLabel: { control: 'text' },
|
|
17
|
+
overlay: { control: 'boolean' },
|
|
18
|
+
},
|
|
19
|
+
args: { open: true, heading: 'History', side: 'end', closeLabel: 'Close', overlay: false },
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export const Default = {};
|
|
23
|
+
export const WithOverlay = { name: 'With overlay', args: { overlay: true } };
|
|
24
|
+
export const Start = { name: 'Start side', args: { side: 'start' } };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-skeleton', () => {
|
|
3
|
+
it('is aria-hidden by default with no role', async () => {
|
|
4
|
+
const { root } = await render(h("bs-skeleton", null));
|
|
5
|
+
const c = root.shadowRoot.querySelector('[part="container"]');
|
|
6
|
+
expect(c).toEqualAttribute('aria-hidden', 'true');
|
|
7
|
+
expect(c.hasAttribute('role')).toBe(false);
|
|
8
|
+
});
|
|
9
|
+
it('uses role="status" + aria-label when label is set', async () => {
|
|
10
|
+
const { root } = await render(h("bs-skeleton", { label: "Loading profile" }));
|
|
11
|
+
const c = root.shadowRoot.querySelector('[part="container"]');
|
|
12
|
+
expect(c).toEqualAttribute('role', 'status');
|
|
13
|
+
expect(c).toEqualAttribute('aria-label', 'Loading profile');
|
|
14
|
+
expect(c.hasAttribute('aria-hidden')).toBe(false);
|
|
15
|
+
});
|
|
16
|
+
it('renders one line per `lines` for text, with a shorter last line', async () => {
|
|
17
|
+
const { root } = await render(h("bs-skeleton", { lines: 3 }));
|
|
18
|
+
const lines = root.shadowRoot.querySelectorAll('[part="line"]');
|
|
19
|
+
expect(lines.length).toBe(3);
|
|
20
|
+
expect(lines[2]).toHaveClass('bs-skeleton__line--short');
|
|
21
|
+
expect(lines[0]).not.toHaveClass('bs-skeleton__line--short');
|
|
22
|
+
});
|
|
23
|
+
it('ignores `lines` for non-text variants and clamps invalid values', async () => {
|
|
24
|
+
const { root, setProps } = await render(h("bs-skeleton", { variant: "rect", lines: 4 }));
|
|
25
|
+
expect(root.shadowRoot.querySelectorAll('[part="line"]').length).toBe(1);
|
|
26
|
+
await setProps({ variant: 'text', lines: 0 });
|
|
27
|
+
expect(root.shadowRoot.querySelectorAll('[part="line"]').length).toBe(1);
|
|
28
|
+
});
|
|
29
|
+
it('applies the variant class and width/height inline', async () => {
|
|
30
|
+
const { root } = await render(h("bs-skeleton", { variant: "rect", width: "200px", height: "40px" }));
|
|
31
|
+
const line = root.shadowRoot.querySelector('[part="line"]');
|
|
32
|
+
expect(line).toHaveClass('bs-skeleton__line--rect');
|
|
33
|
+
expect(line.style.width).toBe('200px');
|
|
34
|
+
expect(line.style.height).toBe('40px');
|
|
35
|
+
});
|
|
36
|
+
it('circle mirrors a single dimension', async () => {
|
|
37
|
+
const { root } = await render(h("bs-skeleton", { variant: "circle", width: "48px" }));
|
|
38
|
+
const line = root.shadowRoot.querySelector('[part="line"]');
|
|
39
|
+
expect(line.style.width).toBe('48px');
|
|
40
|
+
expect(line.style.height).toBe('48px');
|
|
41
|
+
});
|
|
42
|
+
it('animated toggles the animation class', async () => {
|
|
43
|
+
const { root, setProps } = await render(h("bs-skeleton", null));
|
|
44
|
+
const c = root.shadowRoot.querySelector('[part="container"]');
|
|
45
|
+
expect(c).toHaveClass('bs-skeleton--animated');
|
|
46
|
+
await setProps({ animated: false });
|
|
47
|
+
expect(c).not.toHaveClass('bs-skeleton--animated');
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
--bs-skeleton-bg: var(--bs-color-neutral-container);
|
|
4
|
+
--bs-skeleton-radius: var(--bs-border-radius-100);
|
|
5
|
+
--bs-skeleton-width: 100%;
|
|
6
|
+
--bs-skeleton-text-height: 1em;
|
|
7
|
+
--bs-skeleton-rect-height: 96px;
|
|
8
|
+
--bs-skeleton-gap: var(--bs-spacing-100);
|
|
9
|
+
--bs-skeleton-duration: 1.5s;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.bs-skeleton {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: var(--bs-skeleton-gap);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.bs-skeleton__line {
|
|
19
|
+
display: block;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
width: var(--bs-skeleton-width);
|
|
22
|
+
background: var(--bs-skeleton-bg);
|
|
23
|
+
border-radius: var(--bs-skeleton-radius);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.bs-skeleton__line--text {
|
|
27
|
+
height: var(--bs-skeleton-text-height);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.bs-skeleton__line--rect {
|
|
31
|
+
height: var(--bs-skeleton-rect-height);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.bs-skeleton__line--circle {
|
|
35
|
+
height: var(--bs-skeleton-rect-height);
|
|
36
|
+
width: var(--bs-skeleton-rect-height);
|
|
37
|
+
border-radius: var(--bs-border-radius-full);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.bs-skeleton__line--short {
|
|
41
|
+
width: 60%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bs-skeleton--animated .bs-skeleton__line {
|
|
45
|
+
animation: bs-skeleton-pulse var(--bs-skeleton-duration) ease-in-out infinite;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes bs-skeleton-pulse {
|
|
49
|
+
0%,
|
|
50
|
+
100% {
|
|
51
|
+
opacity: 1;
|
|
52
|
+
}
|
|
53
|
+
50% {
|
|
54
|
+
opacity: 0.5;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
.bs-skeleton--animated .bs-skeleton__line {
|
|
60
|
+
animation: none;
|
|
61
|
+
}
|
|
62
|
+
}
|