@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,43 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
3
|
+
const variants = ['text', 'rect', 'circle'];
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/bs-skeleton',
|
|
6
|
+
parameters: { docs: { description: { component: componentDescription('bs-skeleton') } } },
|
|
7
|
+
render: args => html `
|
|
8
|
+
<bs-skeleton
|
|
9
|
+
variant=${args.variant}
|
|
10
|
+
width=${args.width || undefined}
|
|
11
|
+
height=${args.height || undefined}
|
|
12
|
+
lines=${args.lines}
|
|
13
|
+
.animated=${args.animated}
|
|
14
|
+
label=${args.label || undefined}
|
|
15
|
+
></bs-skeleton>
|
|
16
|
+
`,
|
|
17
|
+
argTypes: {
|
|
18
|
+
variant: { control: 'select', options: variants, description: propDescription('bs-skeleton', 'variant') },
|
|
19
|
+
width: { control: 'text', description: propDescription('bs-skeleton', 'width') },
|
|
20
|
+
height: { control: 'text', description: propDescription('bs-skeleton', 'height') },
|
|
21
|
+
lines: { control: 'number', description: propDescription('bs-skeleton', 'lines') },
|
|
22
|
+
animated: { control: 'boolean', description: propDescription('bs-skeleton', 'animated') },
|
|
23
|
+
label: { control: 'text', description: propDescription('bs-skeleton', 'label') },
|
|
24
|
+
},
|
|
25
|
+
args: { variant: 'text', width: '', height: '', lines: 1, animated: true, label: '' },
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
export const Default = {};
|
|
29
|
+
export const Variants = {
|
|
30
|
+
render: () => html `
|
|
31
|
+
<div style="display:flex; flex-direction:column; gap:16px; width:320px;">
|
|
32
|
+
<bs-skeleton variant="text"></bs-skeleton>
|
|
33
|
+
<bs-skeleton variant="rect" height="80px"></bs-skeleton>
|
|
34
|
+
<bs-skeleton variant="circle" width="48px"></bs-skeleton>
|
|
35
|
+
</div>
|
|
36
|
+
`,
|
|
37
|
+
};
|
|
38
|
+
export const MultiLineText = {
|
|
39
|
+
render: () => html `<div style="width:320px;"><bs-skeleton variant="text" lines="4"></bs-skeleton></div>`,
|
|
40
|
+
};
|
|
41
|
+
export const WithLabel = {
|
|
42
|
+
render: () => html `<div style="width:320px;"><bs-skeleton variant="rect" height="80px" label="Loading content"></bs-skeleton></div>`,
|
|
43
|
+
};
|
|
@@ -65,6 +65,10 @@ export class BsSlider {
|
|
|
65
65
|
/** Disables the slider: sets the native `disabled` attribute on the range input(s), suppresses
|
|
66
66
|
* hover/focus/drag styling and the value tooltip, and prevents interaction. */
|
|
67
67
|
disabled = false;
|
|
68
|
+
/** Accessible name of the lower-bound thumb / percent field when `ariaLabel` is unset. */
|
|
69
|
+
startValueLabel = 'Start value';
|
|
70
|
+
/** Accessible name of the upper-bound thumb / percent field when `ariaLabel` is unset. */
|
|
71
|
+
endValueLabel = 'End value';
|
|
68
72
|
/**
|
|
69
73
|
* Accessible name for the slider's native range input(s). Required whenever `showLabel` is
|
|
70
74
|
* `false` (a bare track with no visible "Label" text) -- without it, the internal native
|
|
@@ -224,12 +228,12 @@ export class BsSlider {
|
|
|
224
228
|
// near one end, only the topmost one is reachable by click, and the topmost one is always the
|
|
225
229
|
// one rendered last (the end thumb) unless we compensate.
|
|
226
230
|
const startOnTop = this.percent(start) > 50;
|
|
227
|
-
return (h("div", { class: "bs-slider__track-wrapper", style: { '--bs-slider-fill-start': `${fillStart}%`, '--bs-slider-fill-end': `${fillEnd}%` } }, h("div", { part: "track", class: "bs-slider__track" }, h("div", { part: "fill", class: "bs-slider__track-fill" })), h("input", { type: "range", part: "control", class: "bs-slider__input bs-slider__input--start", style: { zIndex: startOnTop ? '4' : '3' }, min: this.min, max: this.max, step: this.step, value: start, disabled: this.disabled, "aria-label": this.ariaLabel ??
|
|
231
|
+
return (h("div", { class: "bs-slider__track-wrapper", style: { '--bs-slider-fill-start': `${fillStart}%`, '--bs-slider-fill-end': `${fillEnd}%` } }, h("div", { part: "track", class: "bs-slider__track" }, h("div", { part: "fill", class: "bs-slider__track-fill" })), h("input", { type: "range", part: "control", class: "bs-slider__input bs-slider__input--start", style: { zIndex: startOnTop ? '4' : '3' }, min: this.min, max: this.max, step: this.step, value: start, disabled: this.disabled, "aria-label": this.ariaLabel ?? this.startValueLabel, onInput: this.onStartInputChange, onChange: this.onStartInputChange }), h("input", { type: "range", part: "control", class: "bs-slider__input bs-slider__input--end", style: { zIndex: startOnTop ? '3' : '4' }, min: this.min, max: this.max, step: this.step, value: end, disabled: this.disabled, "aria-label": this.ariaLabel ? `${this.ariaLabel} end` : this.endValueLabel, onInput: this.onEndInputChange, onChange: this.onEndInputChange }), h("span", { class: "bs-slider__tooltip bs-slider__tooltip--start", part: "tooltip", style: { left: `${fillStart}%` }, "aria-hidden": "true" }, Math.round(this.percent(start)), "%"), h("span", { class: "bs-slider__tooltip bs-slider__tooltip--end", part: "tooltip", style: { left: `${fillEnd}%` }, "aria-hidden": "true" }, Math.round(this.percent(end)), "%")));
|
|
228
232
|
}
|
|
229
233
|
render() {
|
|
230
234
|
const isRange = this.type === 'range';
|
|
231
235
|
const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
|
|
232
|
-
return (h("div", { key: '
|
|
236
|
+
return (h("div", { key: '24883c8b7d1f00df7a700de4e296ecdfc293bf47', class: rootClasses }, this.showLabel && (h("div", { key: 'd41690990898df937f99a5285f2f407b550d881c', class: "bs-slider__header" }, h("span", { key: '2519779a06f6bb9911be0bdb4539b36c3c16f725', id: "bs-slider-label", part: "label", class: "bs-slider__label" }, this.label), isRange ? (h("span", { class: "bs-slider__value-fields" }, this.renderPercentField(this.percent(this.effectiveValueStart), this.onStartPercentFieldChange, this.ariaLabel ?? this.startValueLabel), h("span", { class: "bs-slider__separator" }, "\u2013"), this.renderPercentField(this.percent(this.effectiveValueEnd), this.onEndPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} end` : this.endValueLabel))) : (this.renderPercentField(this.percent(this.value), this.onPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} value` : 'Value')))), h("div", { key: 'd0525503f51fc1dc3f9753fce131e008db7ded54', class: "bs-slider__row" }, this.showLabel && (h("span", { key: '98ecbdd3462da354a2fb7c719b8eb48c81a0c809', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (h("span", { key: '3e1690be98b45b3f595991d5cdde35f0abfe0da3', part: "bound", class: "bs-slider__bound" }, this.max)))));
|
|
233
237
|
}
|
|
234
238
|
static get is() { return "bs-slider"; }
|
|
235
239
|
static get encapsulation() { return "shadow"; }
|
|
@@ -490,6 +494,46 @@ export class BsSlider {
|
|
|
490
494
|
"attribute": "disabled",
|
|
491
495
|
"defaultValue": "false"
|
|
492
496
|
},
|
|
497
|
+
"startValueLabel": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"mutable": false,
|
|
500
|
+
"complexType": {
|
|
501
|
+
"original": "string",
|
|
502
|
+
"resolved": "string",
|
|
503
|
+
"references": {}
|
|
504
|
+
},
|
|
505
|
+
"required": false,
|
|
506
|
+
"optional": false,
|
|
507
|
+
"docs": {
|
|
508
|
+
"tags": [],
|
|
509
|
+
"text": "Accessible name of the lower-bound thumb / percent field when `ariaLabel` is unset."
|
|
510
|
+
},
|
|
511
|
+
"getter": false,
|
|
512
|
+
"setter": false,
|
|
513
|
+
"reflect": false,
|
|
514
|
+
"attribute": "start-value-label",
|
|
515
|
+
"defaultValue": "'Start value'"
|
|
516
|
+
},
|
|
517
|
+
"endValueLabel": {
|
|
518
|
+
"type": "string",
|
|
519
|
+
"mutable": false,
|
|
520
|
+
"complexType": {
|
|
521
|
+
"original": "string",
|
|
522
|
+
"resolved": "string",
|
|
523
|
+
"references": {}
|
|
524
|
+
},
|
|
525
|
+
"required": false,
|
|
526
|
+
"optional": false,
|
|
527
|
+
"docs": {
|
|
528
|
+
"tags": [],
|
|
529
|
+
"text": "Accessible name of the upper-bound thumb / percent field when `ariaLabel` is unset."
|
|
530
|
+
},
|
|
531
|
+
"getter": false,
|
|
532
|
+
"setter": false,
|
|
533
|
+
"reflect": false,
|
|
534
|
+
"attribute": "end-value-label",
|
|
535
|
+
"defaultValue": "'End value'"
|
|
536
|
+
},
|
|
493
537
|
"ariaLabel": {
|
|
494
538
|
"type": "string",
|
|
495
539
|
"mutable": false,
|
|
@@ -67,7 +67,7 @@ export class BsSnackbar {
|
|
|
67
67
|
this.bsDismiss.emit();
|
|
68
68
|
};
|
|
69
69
|
render() {
|
|
70
|
-
return (h("div", { key: '
|
|
70
|
+
return (h("div", { key: '869f548001524a78fa66a0b295c177a43160531e', part: "container", class: `bs-snackbar bs-snackbar--${this.variant}`, role: "status", "aria-live": this.variant === 'error' ? 'assertive' : 'polite' }, h("div", { key: 'eca8a98a1ae3dff7ecadd7e370bd59c855a56025', class: "bs-snackbar__content" }, h("span", { key: 'ffba923b45ff59cd8501f7d3da9bd5260113de83', part: "icon", class: "bs-snackbar__icon", "aria-hidden": "true" }, this.loading ? h("span", { class: "bs-snackbar__spinner" }) : h(CheckCircleIcon, null)), h("span", { key: '803f3247af157e79e2e2c2822977ae55cc058a98', part: "message", class: "bs-snackbar__message" }, h("slot", { key: 'fd66b14457361cca63be3a152003a098b56aa43e' }))), h("div", { key: 'ba808bf880cfb2f0c32a70f53ff4e0b2df05eb17', class: "bs-snackbar__actions" }, this.actionLabel && (h("bs-button", { key: '4e7ca40abdfd155cd064d153fee866e87ad64e26', part: "action", variant: this.actionVariant ?? ACTION_VARIANT[this.variant], size: "sm", onClick: this.onAction }, this.actionLabel)), !this.hideClose && (h("bs-icon-button", { key: '89ba5909db07c9e910136e5723bb5df25d0a4b51', part: "close", variant: "subtle", size: "md", ariaLabel: "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: '6e3f8d010cf3f234d0e199b3a5d96c8200b25bcc' }))))));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "bs-snackbar"; }
|
|
73
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,8 +51,8 @@ export class BsSourceLink {
|
|
|
51
51
|
};
|
|
52
52
|
render() {
|
|
53
53
|
const inner = [
|
|
54
|
-
h("span", { key: '
|
|
55
|
-
h("span", { key: '
|
|
54
|
+
h("span", { key: '37082ba8b750f01d04cec4e437fc3d5481768f27', class: "bs-source-link__left" }, h("span", { key: '10f49ce451047e0b2656d0ec724a5841b112046a', class: "bs-source-link__filename-row" }, h("span", { key: '63b4c0dcb376053f68a5d62c6232a205451f1826', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: '6df8546c36387bd130b68cda5f8aa5e3c35fd388', name: "icon" }, h(FileTextIcon, { key: '8ba49429459a63d05324e31b6994fa5f3b5c6534' }))), h("p", { key: '0b6d7826f62526c903048a25610bfed99381bce0', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'f71e6440d5fe06486d5a10493ab5c7b17e2cfd78', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: 'a4d97d5fd1be65d17d9dca52d30eaa9d1a022f0e', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: '809b5e51e436270dd304db280f98e164f2722eda', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: '5e30c00db6cf2d659c62a6fc863a7c6fd8111d12', part: "version", class: "bs-source-link__version" }, this.version)))),
|
|
55
|
+
h("span", { key: '89dcb19eec419f95ed277d729925296ecfe0e4b1', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '8d2c8521747a1f3d7cd8b6bff5385ee04b2a7923' })),
|
|
56
56
|
];
|
|
57
57
|
return this.href ? (h("a", { class: "bs-source-link", href: this.href, target: this.target, rel: "noopener noreferrer", onClick: this.onClick }, inner)) : (h("button", { type: "button", class: "bs-source-link", onClick: this.onClick }, inner));
|
|
58
58
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
describe('bs-spinner', () => {
|
|
3
|
+
it('defaults to size inherit and is aria-hidden without a label', async () => {
|
|
4
|
+
const { root } = await render(h("bs-spinner", null));
|
|
5
|
+
const c = root.shadowRoot.querySelector('[part="container"]');
|
|
6
|
+
expect(c).toHaveClass('bs-spinner--inherit');
|
|
7
|
+
expect(c).toEqualAttribute('aria-hidden', 'true');
|
|
8
|
+
expect(c.hasAttribute('role')).toBe(false);
|
|
9
|
+
});
|
|
10
|
+
it('uses role="status" and aria-label when label is set', async () => {
|
|
11
|
+
const { root } = await render(h("bs-spinner", { label: "Saving" }));
|
|
12
|
+
const c = root.shadowRoot.querySelector('[part="container"]');
|
|
13
|
+
expect(c).toEqualAttribute('role', 'status');
|
|
14
|
+
expect(c).toEqualAttribute('aria-label', 'Saving');
|
|
15
|
+
expect(c.hasAttribute('aria-hidden')).toBe(false);
|
|
16
|
+
});
|
|
17
|
+
it('applies the size class for each size', async () => {
|
|
18
|
+
const { root, setProps } = await render(h("bs-spinner", { size: "xs" }));
|
|
19
|
+
const c = root.shadowRoot.querySelector('[part="container"]');
|
|
20
|
+
expect(c).toHaveClass('bs-spinner--xs');
|
|
21
|
+
await setProps({ size: 'sm' });
|
|
22
|
+
expect(c).toHaveClass('bs-spinner--sm');
|
|
23
|
+
await setProps({ size: 'md' });
|
|
24
|
+
expect(c).toHaveClass('bs-spinner--md');
|
|
25
|
+
});
|
|
26
|
+
it('renders an svg with track and arc', async () => {
|
|
27
|
+
const { root } = await render(h("bs-spinner", null));
|
|
28
|
+
expect(root.shadowRoot.querySelector('svg[part="svg"]')).not.toBeNull();
|
|
29
|
+
expect(root.shadowRoot.querySelector('.bs-spinner__track')).not.toBeNull();
|
|
30
|
+
expect(root.shadowRoot.querySelector('.bs-spinner__arc')).not.toBeNull();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
vertical-align: middle;
|
|
4
|
+
--bs-spinner-size-xs: var(--bs-spacing-200);
|
|
5
|
+
--bs-spinner-size-sm: var(--bs-spacing-250);
|
|
6
|
+
--bs-spinner-size-md: var(--bs-spacing-300);
|
|
7
|
+
--bs-spinner-color: currentColor;
|
|
8
|
+
--bs-spinner-track-opacity: 0.25;
|
|
9
|
+
--bs-spinner-duration: 0.8s;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.bs-spinner {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
width: 1em;
|
|
15
|
+
height: 1em;
|
|
16
|
+
color: inherit;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.bs-spinner--xs {
|
|
20
|
+
width: var(--bs-spinner-size-xs);
|
|
21
|
+
height: var(--bs-spinner-size-xs);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.bs-spinner--sm {
|
|
25
|
+
width: var(--bs-spinner-size-sm);
|
|
26
|
+
height: var(--bs-spinner-size-sm);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.bs-spinner--md {
|
|
30
|
+
width: var(--bs-spinner-size-md);
|
|
31
|
+
height: var(--bs-spinner-size-md);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.bs-spinner__svg {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
animation: bs-spinner-spin var(--bs-spinner-duration) linear infinite;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.bs-spinner__track {
|
|
41
|
+
stroke: var(--bs-spinner-color);
|
|
42
|
+
opacity: var(--bs-spinner-track-opacity);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bs-spinner__arc {
|
|
46
|
+
stroke: var(--bs-spinner-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@keyframes bs-spinner-spin {
|
|
50
|
+
to {
|
|
51
|
+
transform: rotate(360deg);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Reduced motion: slow the rotation rather than stopping it, so "busy" is still conveyed
|
|
56
|
+
(same approach as bs-progress's indeterminate ring). */
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
.bs-spinner__svg {
|
|
59
|
+
animation-duration: calc(var(--bs-spinner-duration) * 4);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* A small inline spinner sized for text. By default (`size="inherit"`) it is `1em` square so it
|
|
4
|
+
* scales with the surrounding font size, and it draws in `currentColor` so it matches the
|
|
5
|
+
* surrounding text. Built as plain inline SVG: `bs-progress` has fixed pixel diameters and a
|
|
6
|
+
* block layout, so it can't sit inline with text.
|
|
7
|
+
*
|
|
8
|
+
* ## When to use
|
|
9
|
+
* - Inline "busy" feedback next to or inside text, e.g. "Saving..." or within a button label.
|
|
10
|
+
*
|
|
11
|
+
* ## When not to use
|
|
12
|
+
* - For a large or standalone loading indicator, or one with a known percentage -- use `bs-progress`.
|
|
13
|
+
* - As a content placeholder -- use `bs-skeleton`.
|
|
14
|
+
*
|
|
15
|
+
* @part container - The outer inline wrapper (carries the status role).
|
|
16
|
+
* @part svg - The spinner SVG.
|
|
17
|
+
* @prop --bs-spinner-size-xs - Diameter at `size="xs"`. Aliased to `--bs-spacing-200`.
|
|
18
|
+
* @prop --bs-spinner-size-sm - Diameter at `size="sm"`. Aliased to `--bs-spacing-250`.
|
|
19
|
+
* @prop --bs-spinner-size-md - Diameter at `size="md"`. Aliased to `--bs-spacing-300`.
|
|
20
|
+
* @prop --bs-spinner-color - Spinner color. Defaults to `currentColor`.
|
|
21
|
+
* @prop --bs-spinner-track-opacity - Opacity of the background track ring. Defaults to `0.25`.
|
|
22
|
+
* @prop --bs-spinner-duration - Rotation duration. Defaults to `0.8s`.
|
|
23
|
+
*/
|
|
24
|
+
export class BsSpinner {
|
|
25
|
+
/** `xs`/`sm`/`md` use fixed token sizes; `inherit` (default) is `1em`, following the font size. */
|
|
26
|
+
size = 'inherit';
|
|
27
|
+
/** Accessible name (e.g. "Loading"). When set, the spinner gets `role="status"` and this
|
|
28
|
+
* `aria-label`; when omitted it is `aria-hidden="true"` (use it next to visible text that already
|
|
29
|
+
* says what is happening). */
|
|
30
|
+
label;
|
|
31
|
+
render() {
|
|
32
|
+
const hasLabel = !!this.label;
|
|
33
|
+
return (h("span", { key: '31531b80418f912ded9ffabafc1ad36b48e1c4e1', part: "container", class: `bs-spinner bs-spinner--${this.size}`, role: hasLabel ? 'status' : undefined, "aria-label": hasLabel ? this.label : undefined, "aria-hidden": hasLabel ? undefined : 'true' }, h("svg", { key: '7c820016daa154c8e8486a8d5a60505a39d37bde', part: "svg", class: "bs-spinner__svg", viewBox: "0 0 24 24", fill: "none", focusable: "false" }, h("circle", { key: '60b8dce8ac87753a2a9d3c3521ce387bcf6e9491', class: "bs-spinner__track", cx: "12", cy: "12", r: "9", "stroke-width": "3" }), h("path", { key: '3548aee65c89828fed57465a95b72e15c50807f4', class: "bs-spinner__arc", d: "M12 3a9 9 0 0 1 9 9", "stroke-width": "3", "stroke-linecap": "round" }))));
|
|
34
|
+
}
|
|
35
|
+
static get is() { return "bs-spinner"; }
|
|
36
|
+
static get encapsulation() { return "shadow"; }
|
|
37
|
+
static get originalStyleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["bs-spinner.css"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get styleUrls() {
|
|
43
|
+
return {
|
|
44
|
+
"$": ["bs-spinner.css"]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get properties() {
|
|
48
|
+
return {
|
|
49
|
+
"size": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "BsSpinnerSize",
|
|
54
|
+
"resolved": "\"inherit\" | \"md\" | \"sm\" | \"xs\"",
|
|
55
|
+
"references": {
|
|
56
|
+
"BsSpinnerSize": {
|
|
57
|
+
"location": "local",
|
|
58
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-spinner/bs-spinner.tsx",
|
|
59
|
+
"id": "src/components/bs-spinner/bs-spinner.tsx::BsSpinnerSize"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"required": false,
|
|
64
|
+
"optional": false,
|
|
65
|
+
"docs": {
|
|
66
|
+
"tags": [],
|
|
67
|
+
"text": "`xs`/`sm`/`md` use fixed token sizes; `inherit` (default) is `1em`, following the font size."
|
|
68
|
+
},
|
|
69
|
+
"getter": false,
|
|
70
|
+
"setter": false,
|
|
71
|
+
"reflect": false,
|
|
72
|
+
"attribute": "size",
|
|
73
|
+
"defaultValue": "'inherit'"
|
|
74
|
+
},
|
|
75
|
+
"label": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"mutable": false,
|
|
78
|
+
"complexType": {
|
|
79
|
+
"original": "string",
|
|
80
|
+
"resolved": "string",
|
|
81
|
+
"references": {}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": true,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": "Accessible name (e.g. \"Loading\"). When set, the spinner gets `role=\"status\"` and this\n`aria-label`; when omitted it is `aria-hidden=\"true\"` (use it next to visible text that already\nsays what is happening)."
|
|
88
|
+
},
|
|
89
|
+
"getter": false,
|
|
90
|
+
"setter": false,
|
|
91
|
+
"reflect": false,
|
|
92
|
+
"attribute": "label"
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
3
|
+
const sizes = ['xs', 'sm', 'md', 'inherit'];
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/bs-spinner',
|
|
6
|
+
parameters: { docs: { description: { component: componentDescription('bs-spinner') } } },
|
|
7
|
+
render: args => html `<bs-spinner size=${args.size} label=${args.label || undefined}></bs-spinner>`,
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: { control: 'select', options: sizes, description: propDescription('bs-spinner', 'size') },
|
|
10
|
+
label: { control: 'text', description: propDescription('bs-spinner', 'label') },
|
|
11
|
+
},
|
|
12
|
+
args: { size: 'inherit', label: 'Loading' },
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
export const Default = {};
|
|
16
|
+
export const Sizes = {
|
|
17
|
+
render: () => html `
|
|
18
|
+
<div style="display:flex; gap:16px; align-items:center;">
|
|
19
|
+
<bs-spinner size="xs" label="Loading"></bs-spinner>
|
|
20
|
+
<bs-spinner size="sm" label="Loading"></bs-spinner>
|
|
21
|
+
<bs-spinner size="md" label="Loading"></bs-spinner>
|
|
22
|
+
</div>
|
|
23
|
+
`,
|
|
24
|
+
};
|
|
25
|
+
export const InlineWithText = {
|
|
26
|
+
render: () => html `
|
|
27
|
+
<p style="font-size:14px;"><bs-spinner></bs-spinner> Saving...</p>
|
|
28
|
+
<p style="font-size:24px; color:var(--bs-color-primary-default);"><bs-spinner></bs-spinner> Uploading...</p>
|
|
29
|
+
`,
|
|
30
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
const mount = (props = {}, panes = 3) => render(h("div", { style: { width: '900px', height: '400px' } }, h("bs-split-pane", { ...props }, h("div", { slot: "pane-1" }, "One"), h("div", { slot: "pane-2" }, "Two"), panes === 3 && h("div", { slot: "pane-3" }, "Three"))));
|
|
3
|
+
const size = (el, axis = 'width') => el.getBoundingClientRect()[axis];
|
|
4
|
+
describe('bs-split-pane', () => {
|
|
5
|
+
it('renders one divider per gap between panes, with separator semantics', async () => {
|
|
6
|
+
const { root } = await mount();
|
|
7
|
+
const split = root.querySelector('bs-split-pane');
|
|
8
|
+
const dividers = split.shadowRoot.querySelectorAll('[part="divider"]');
|
|
9
|
+
expect(dividers.length).toBe(2);
|
|
10
|
+
expect(dividers[0]).toEqualAttribute('role', 'separator');
|
|
11
|
+
expect(dividers[0]).toEqualAttribute('aria-orientation', 'vertical');
|
|
12
|
+
expect(dividers[0]).toEqualAttribute('aria-label', 'Resize panes');
|
|
13
|
+
expect(dividers[0]).toEqualAttribute('tabindex', '0');
|
|
14
|
+
expect(split.shadowRoot.querySelectorAll('[part~="pane"]').length).toBe(3);
|
|
15
|
+
});
|
|
16
|
+
it('follows the filled slots: two panes means one divider', async () => {
|
|
17
|
+
const { root } = await mount({}, 2);
|
|
18
|
+
const split = root.querySelector('bs-split-pane');
|
|
19
|
+
expect(split.shadowRoot.querySelectorAll('[part="divider"]').length).toBe(1);
|
|
20
|
+
});
|
|
21
|
+
it('uses horizontal dividers when vertical', async () => {
|
|
22
|
+
const { root } = await mount({ orientation: 'vertical' });
|
|
23
|
+
const split = root.querySelector('bs-split-pane');
|
|
24
|
+
expect(split.shadowRoot.querySelector('[part="divider"]')).toEqualAttribute('aria-orientation', 'horizontal');
|
|
25
|
+
});
|
|
26
|
+
it('gives the first pane its fixed size and shrinks it to the rail when collapsed', async () => {
|
|
27
|
+
const { root, waitForChanges } = await mount();
|
|
28
|
+
const split = root.querySelector('bs-split-pane');
|
|
29
|
+
const first = split.shadowRoot.querySelector('[part~="pane-1"]');
|
|
30
|
+
expect(Math.round(size(first))).toBe(333);
|
|
31
|
+
split.setAttribute('collapsed', '');
|
|
32
|
+
await waitForChanges();
|
|
33
|
+
expect(Math.round(size(first))).toBe(106);
|
|
34
|
+
});
|
|
35
|
+
it('resizes the first pane with arrow keys and emits bsResize', async () => {
|
|
36
|
+
const { root, waitForChanges } = await mount();
|
|
37
|
+
const split = root.querySelector('bs-split-pane');
|
|
38
|
+
const events = [];
|
|
39
|
+
split.addEventListener('bsResize', (e) => events.push(e.detail));
|
|
40
|
+
const first = split.shadowRoot.querySelector('[part~="pane-1"]');
|
|
41
|
+
const divider = split.shadowRoot.querySelector('[part="divider"]');
|
|
42
|
+
divider.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight', bubbles: true, cancelable: true }));
|
|
43
|
+
await waitForChanges();
|
|
44
|
+
expect(Math.round(size(first))).toBe(349);
|
|
45
|
+
divider.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowLeft', shiftKey: true, bubbles: true, cancelable: true }));
|
|
46
|
+
await waitForChanges();
|
|
47
|
+
expect(Math.round(size(first))).toBe(285);
|
|
48
|
+
expect(events.length).toBe(2);
|
|
49
|
+
expect(events[1][0]).toBe(285);
|
|
50
|
+
});
|
|
51
|
+
it('clamps to the minimum size with Home', async () => {
|
|
52
|
+
const { root, waitForChanges } = await mount();
|
|
53
|
+
const split = root.querySelector('bs-split-pane');
|
|
54
|
+
const first = split.shadowRoot.querySelector('[part~="pane-1"]');
|
|
55
|
+
const divider = split.shadowRoot.querySelector('[part="divider"]');
|
|
56
|
+
divider.dispatchEvent(new KeyboardEvent('keydown', { key: 'Home', bubbles: true, cancelable: true }));
|
|
57
|
+
await waitForChanges();
|
|
58
|
+
expect(Math.round(size(first))).toBe(96);
|
|
59
|
+
});
|
|
60
|
+
it('resizes by dragging with the pointer', async () => {
|
|
61
|
+
const { root, waitForChanges } = await mount();
|
|
62
|
+
const split = root.querySelector('bs-split-pane');
|
|
63
|
+
const first = split.shadowRoot.querySelector('[part~="pane-1"]');
|
|
64
|
+
const divider = split.shadowRoot.querySelector('[part="divider"]');
|
|
65
|
+
const fire = (type, clientX) => divider.dispatchEvent(new PointerEvent(type, { clientX, pointerId: 1, bubbles: true, cancelable: true }));
|
|
66
|
+
// setPointerCapture throws for synthetic pointer ids; the component only needs the move/up events.
|
|
67
|
+
divider.setPointerCapture = () => { };
|
|
68
|
+
fire('pointerdown', 340);
|
|
69
|
+
fire('pointermove', 440);
|
|
70
|
+
await waitForChanges();
|
|
71
|
+
expect(Math.round(size(first))).toBe(433);
|
|
72
|
+
fire('pointerup', 440);
|
|
73
|
+
await waitForChanges();
|
|
74
|
+
expect(Math.round(size(first))).toBe(433);
|
|
75
|
+
});
|
|
76
|
+
it('toggles collapsed with Enter on the first divider and emits bsCollapsedChange', async () => {
|
|
77
|
+
const { root, waitForChanges } = await mount();
|
|
78
|
+
const split = root.querySelector('bs-split-pane');
|
|
79
|
+
const events = [];
|
|
80
|
+
split.addEventListener('bsCollapsedChange', (e) => events.push(e.detail));
|
|
81
|
+
const divider = split.shadowRoot.querySelector('[part="divider"]');
|
|
82
|
+
divider.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true, cancelable: true }));
|
|
83
|
+
await waitForChanges();
|
|
84
|
+
expect(split.collapsed).toBe(true);
|
|
85
|
+
expect(split).toHaveAttribute('collapsed');
|
|
86
|
+
expect(events).toEqual([true]);
|
|
87
|
+
});
|
|
88
|
+
it('is not focusable and ignores keys when resizable is false', async () => {
|
|
89
|
+
const { root, waitForChanges } = await mount({ resizable: false });
|
|
90
|
+
const split = root.querySelector('bs-split-pane');
|
|
91
|
+
const first = split.shadowRoot.querySelector('[part~="pane-1"]');
|
|
92
|
+
const divider = split.shadowRoot.querySelector('[part="divider"]');
|
|
93
|
+
expect(divider).not.toHaveAttribute('tabindex');
|
|
94
|
+
divider.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight', bubbles: true, cancelable: true }));
|
|
95
|
+
await waitForChanges();
|
|
96
|
+
expect(Math.round(size(first))).toBe(333);
|
|
97
|
+
});
|
|
98
|
+
it('follows dark mode: slotted text and panes use the dark tokens', async () => {
|
|
99
|
+
const { root } = await render(h("div", { "data-theme": "dark", style: { width: '600px', height: '300px' } }, h("bs-split-pane", null, h("div", { slot: "pane-1" }, "One"), h("div", { slot: "pane-2" }, "Two"))));
|
|
100
|
+
const split = root.querySelector('bs-split-pane');
|
|
101
|
+
const pane = split.shadowRoot.querySelector('[part~="pane-1"]');
|
|
102
|
+
const container = split.shadowRoot.querySelector('.bs-split-pane');
|
|
103
|
+
expect(getComputedStyle(root.querySelector('[slot="pane-1"]')).color).toBe('rgb(255, 255, 255)');
|
|
104
|
+
expect(getComputedStyle(pane).backgroundColor).not.toBe('rgb(255, 255, 255)');
|
|
105
|
+
expect(getComputedStyle(container).color).toBe('rgb(255, 255, 255)');
|
|
106
|
+
});
|
|
107
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
height: 100%;
|
|
4
|
+
min-height: 0;
|
|
5
|
+
--bs-split-pane-radius: var(--bs-border-radius-100);
|
|
6
|
+
--bs-split-pane-bg: var(--bs-surface-base);
|
|
7
|
+
--bs-split-pane-color: var(--bs-text-default);
|
|
8
|
+
/* Pane sizes below are the literal values from the Figma "Split pane" variants (333 / 106). */
|
|
9
|
+
--bs-split-pane-first-size: 333px;
|
|
10
|
+
--bs-split-pane-collapsed-size: 106px;
|
|
11
|
+
--bs-split-pane-min-size: 96px;
|
|
12
|
+
--bs-split-pane-divider-size: var(--bs-spacing-75);
|
|
13
|
+
--bs-split-pane-divider-bg: var(--bs-surface-container);
|
|
14
|
+
--bs-split-pane-divider-thumb: var(--bs-border-neutral-container);
|
|
15
|
+
--bs-split-pane-divider-thumb-active: var(--bs-border-neutral-hover);
|
|
16
|
+
--bs-split-pane-divider-thumb-length: 250px;
|
|
17
|
+
--bs-split-pane-border: var(--bs-border-neutral-container);
|
|
18
|
+
--bs-split-pane-focus-ring: var(--bs-border-neutral-focus);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.bs-split-pane {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
overflow: clip;
|
|
27
|
+
border-radius: var(--bs-split-pane-radius);
|
|
28
|
+
background: var(--bs-split-pane-bg);
|
|
29
|
+
color: var(--bs-split-pane-color);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.bs-split-pane--vertical {
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.bs-split-pane__pane {
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
min-width: 0;
|
|
39
|
+
min-height: 0;
|
|
40
|
+
overflow: auto;
|
|
41
|
+
background: var(--bs-split-pane-bg);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bs-split-pane--horizontal > .bs-split-pane__pane {
|
|
45
|
+
min-width: min(var(--bs-split-pane-min-size), 100%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bs-split-pane--vertical > .bs-split-pane__pane {
|
|
49
|
+
min-height: min(var(--bs-split-pane-min-size), 100%);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.bs-split-pane__divider {
|
|
53
|
+
position: relative;
|
|
54
|
+
flex: 0 0 var(--bs-split-pane-divider-size);
|
|
55
|
+
display: flex;
|
|
56
|
+
background: var(--bs-split-pane-divider-bg);
|
|
57
|
+
touch-action: none;
|
|
58
|
+
outline: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.bs-split-pane--horizontal > .bs-split-pane__divider {
|
|
62
|
+
cursor: col-resize;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bs-split-pane--vertical > .bs-split-pane__divider {
|
|
67
|
+
cursor: row-resize;
|
|
68
|
+
flex-direction: row;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.bs-split-pane__divider--static {
|
|
72
|
+
cursor: default;
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.bs-split-pane__thumb {
|
|
77
|
+
display: block;
|
|
78
|
+
border-radius: var(--bs-border-radius-full);
|
|
79
|
+
background: var(--bs-split-pane-divider-thumb);
|
|
80
|
+
transition: background-color var(--bs-duration-fast) var(--bs-easing-standard);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.bs-split-pane--horizontal > .bs-split-pane__divider > .bs-split-pane__thumb {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: min(var(--bs-split-pane-divider-thumb-length), 100%);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.bs-split-pane--vertical > .bs-split-pane__divider > .bs-split-pane__thumb {
|
|
89
|
+
height: 100%;
|
|
90
|
+
width: min(var(--bs-split-pane-divider-thumb-length), 100%);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.bs-split-pane__divider:hover > .bs-split-pane__thumb,
|
|
94
|
+
.bs-split-pane__divider--active > .bs-split-pane__thumb,
|
|
95
|
+
.bs-split-pane__divider:focus-visible > .bs-split-pane__thumb {
|
|
96
|
+
background: var(--bs-split-pane-divider-thumb-active);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bs-split-pane__divider:focus-visible {
|
|
100
|
+
outline: 2px solid var(--bs-split-pane-focus-ring);
|
|
101
|
+
outline-offset: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (prefers-reduced-motion: reduce) {
|
|
105
|
+
.bs-split-pane__thumb {
|
|
106
|
+
transition: none;
|
|
107
|
+
}
|
|
108
|
+
}
|