@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,404 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
const MAX_PANES = 3;
|
|
3
|
+
const DEFAULT_MIN_SIZE = 96;
|
|
4
|
+
/**
|
|
5
|
+
* A resizable layout of two or three panes separated by draggable, keyboard-operable dividers
|
|
6
|
+
* (the WAI-ARIA "window splitter" pattern). Content goes into the named slots `pane-1`, `pane-2`
|
|
7
|
+
* and (optionally) `pane-3`; the pane count follows which slots have content.
|
|
8
|
+
*
|
|
9
|
+
* `orientation="horizontal"` places panes side by side (vertical dividers); `"vertical"` stacks
|
|
10
|
+
* them (horizontal dividers). The first pane has a fixed size (`--bs-split-pane-first-size`) that
|
|
11
|
+
* the user can change by dragging; the last pane absorbs the remaining space. `collapsed` shrinks
|
|
12
|
+
* the first pane to a narrow rail (`--bs-split-pane-collapsed-size`) -- the component reflects the
|
|
13
|
+
* attribute so slotted content can switch to its compact rendering (e.g. icon-only list items).
|
|
14
|
+
*
|
|
15
|
+
* ## When to use
|
|
16
|
+
* - Master/detail layouts: a navigation or list pane next to one or two detail panes.
|
|
17
|
+
*
|
|
18
|
+
* ## When not to use
|
|
19
|
+
* - A temporary overlay panel (use `bs-side-panel`).
|
|
20
|
+
* - A fixed, non-resizable two-column layout (plain CSS grid; or set `resizable="false"` to keep
|
|
21
|
+
* the dividers purely visual).
|
|
22
|
+
*
|
|
23
|
+
* @slot pane-1 - The first pane (the one that collapses).
|
|
24
|
+
* @slot pane-2 - The second pane.
|
|
25
|
+
* @slot pane-3 - Optional third pane.
|
|
26
|
+
* @part container - The flex wrapper around all panes and dividers.
|
|
27
|
+
* @part pane - Every pane wrapper (`pane-1`, `pane-2`, `pane-3` are also exposed as separate parts).
|
|
28
|
+
* @part divider - Every divider (the focusable `role="separator"` element).
|
|
29
|
+
* @part divider-thumb - The visible thumb on a divider.
|
|
30
|
+
* @prop --bs-split-pane-radius - Corner radius of the container. Aliased to `--bs-border-radius-100`.
|
|
31
|
+
* @prop --bs-split-pane-bg - Pane background. Aliased to `--bs-surface-base`.
|
|
32
|
+
* @prop --bs-split-pane-color - Text colour inherited by slotted content. Aliased to `--bs-text-default`.
|
|
33
|
+
* @prop --bs-split-pane-first-size - Initial size of the first pane along the layout axis. Defaults to `333px` (Figma).
|
|
34
|
+
* @prop --bs-split-pane-collapsed-size - Size of the first pane while `collapsed`. Defaults to `106px` (Figma).
|
|
35
|
+
* @prop --bs-split-pane-min-size - Smallest size a resized pane may take. Defaults to `96px`.
|
|
36
|
+
* @prop --bs-split-pane-divider-size - Thickness of a divider. Aliased to `--bs-spacing-75`.
|
|
37
|
+
* @prop --bs-split-pane-divider-bg - Divider track colour. Aliased to `--bs-surface-container`.
|
|
38
|
+
* @prop --bs-split-pane-divider-thumb - Divider thumb colour. Aliased to `--bs-border-neutral-container`.
|
|
39
|
+
* @prop --bs-split-pane-divider-thumb-active - Divider thumb colour on hover, focus and drag. Aliased to `--bs-border-neutral-hover`.
|
|
40
|
+
* @prop --bs-split-pane-divider-thumb-length - Length of the divider thumb. Defaults to `250px` (Figma).
|
|
41
|
+
* @prop --bs-split-pane-border - Border between the first pane and the rest when dividers are not resizable. Aliased to `--bs-border-neutral-container`.
|
|
42
|
+
* @prop --bs-split-pane-focus-ring - Divider focus ring colour. Aliased to `--bs-border-neutral-focus`.
|
|
43
|
+
*/
|
|
44
|
+
export class BsSplitPane {
|
|
45
|
+
el;
|
|
46
|
+
/** `horizontal` = panes side by side, `vertical` = panes stacked. */
|
|
47
|
+
orientation = 'horizontal';
|
|
48
|
+
/** Collapses the first pane to a narrow rail. Mutable: the Enter key on the first divider toggles it. */
|
|
49
|
+
collapsed = false;
|
|
50
|
+
/** Whether the dividers can be dragged / operated by keyboard. `false` keeps them as visual separators. */
|
|
51
|
+
resizable = true;
|
|
52
|
+
/** Accessible name of each divider. */
|
|
53
|
+
dividerLabel = 'Resize panes';
|
|
54
|
+
/** Pixels moved per arrow-key press (Shift multiplies by 4). */
|
|
55
|
+
step = 16;
|
|
56
|
+
/** Fires after a resize (pointer release or key press) with the pixel size of every pane except the last. */
|
|
57
|
+
bsResize;
|
|
58
|
+
/** Fires when `collapsed` changes through user interaction. */
|
|
59
|
+
bsCollapsedChange;
|
|
60
|
+
paneCount = 2;
|
|
61
|
+
sizes = [];
|
|
62
|
+
draggingIndex = -1;
|
|
63
|
+
observer;
|
|
64
|
+
dragStart;
|
|
65
|
+
/** Toggles `collapsed` and emits `bsCollapsedChange`. */
|
|
66
|
+
async toggleCollapsed() {
|
|
67
|
+
this.collapsed = !this.collapsed;
|
|
68
|
+
this.bsCollapsedChange.emit(this.collapsed);
|
|
69
|
+
}
|
|
70
|
+
componentWillLoad() {
|
|
71
|
+
this.countPanes();
|
|
72
|
+
}
|
|
73
|
+
connectedCallback() {
|
|
74
|
+
this.observer = new MutationObserver(() => this.countPanes());
|
|
75
|
+
this.observer.observe(this.el, { childList: true, attributes: true, attributeFilter: ['slot'], subtree: false });
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
this.observer?.disconnect();
|
|
79
|
+
}
|
|
80
|
+
countPanes() {
|
|
81
|
+
let count = 1;
|
|
82
|
+
for (let i = 1; i <= MAX_PANES; i++) {
|
|
83
|
+
if (this.el.querySelector(`:scope > [slot="pane-${i}"]`))
|
|
84
|
+
count = i;
|
|
85
|
+
}
|
|
86
|
+
this.paneCount = Math.max(count, 1);
|
|
87
|
+
}
|
|
88
|
+
isRtl() {
|
|
89
|
+
return this.orientation === 'horizontal' && getComputedStyle(this.el).direction === 'rtl';
|
|
90
|
+
}
|
|
91
|
+
axisSize(pane) {
|
|
92
|
+
const rect = pane.getBoundingClientRect();
|
|
93
|
+
return this.orientation === 'horizontal' ? rect.width : rect.height;
|
|
94
|
+
}
|
|
95
|
+
minSize() {
|
|
96
|
+
const raw = parseFloat(getComputedStyle(this.el).getPropertyValue('--bs-split-pane-min-size'));
|
|
97
|
+
return Number.isFinite(raw) ? raw : DEFAULT_MIN_SIZE;
|
|
98
|
+
}
|
|
99
|
+
/** Largest size pane `index` may take: leave `minSize` for each pane after it, and the dividers. */
|
|
100
|
+
maxSize(index) {
|
|
101
|
+
const container = this.el.shadowRoot.querySelector('.bs-split-pane');
|
|
102
|
+
const total = this.axisSize(container);
|
|
103
|
+
const dividers = Array.from(container.querySelectorAll('.bs-split-pane__divider'));
|
|
104
|
+
const dividerTotal = dividers.reduce((sum, d) => sum + this.axisSize(d), 0);
|
|
105
|
+
const before = Array.from(container.querySelectorAll('.bs-split-pane__pane'))
|
|
106
|
+
.slice(0, index)
|
|
107
|
+
.reduce((sum, p) => sum + this.axisSize(p), 0);
|
|
108
|
+
const after = (this.paneCount - 1 - index) * this.minSize();
|
|
109
|
+
return Math.max(this.minSize(), total - dividerTotal - before - after);
|
|
110
|
+
}
|
|
111
|
+
paneEl(index) {
|
|
112
|
+
return this.el.shadowRoot.querySelectorAll('.bs-split-pane__pane')[index];
|
|
113
|
+
}
|
|
114
|
+
setSize(index, value) {
|
|
115
|
+
const clamped = Math.min(Math.max(value, this.minSize()), this.maxSize(index));
|
|
116
|
+
const next = this.sizes.slice();
|
|
117
|
+
next[index] = clamped;
|
|
118
|
+
this.sizes = next;
|
|
119
|
+
}
|
|
120
|
+
emitResize() {
|
|
121
|
+
const sizes = [];
|
|
122
|
+
// Prefer the size just committed to state: the DOM hasn't re-rendered yet when this runs.
|
|
123
|
+
for (let i = 0; i < this.paneCount - 1; i++)
|
|
124
|
+
sizes.push(Math.round(this.sizes[i] ?? this.axisSize(this.paneEl(i))));
|
|
125
|
+
this.bsResize.emit(sizes);
|
|
126
|
+
}
|
|
127
|
+
onPointerDown = (index) => (ev) => {
|
|
128
|
+
if (!this.resizable || (index === 0 && this.collapsed))
|
|
129
|
+
return;
|
|
130
|
+
ev.preventDefault();
|
|
131
|
+
ev.currentTarget.setPointerCapture(ev.pointerId);
|
|
132
|
+
this.dragStart = {
|
|
133
|
+
pointer: this.orientation === 'horizontal' ? ev.clientX : ev.clientY,
|
|
134
|
+
size: this.axisSize(this.paneEl(index)),
|
|
135
|
+
index,
|
|
136
|
+
};
|
|
137
|
+
this.draggingIndex = index;
|
|
138
|
+
};
|
|
139
|
+
onPointerMove = (ev) => {
|
|
140
|
+
if (!this.dragStart)
|
|
141
|
+
return;
|
|
142
|
+
const pointer = this.orientation === 'horizontal' ? ev.clientX : ev.clientY;
|
|
143
|
+
const delta = (pointer - this.dragStart.pointer) * (this.isRtl() ? -1 : 1);
|
|
144
|
+
this.setSize(this.dragStart.index, this.dragStart.size + delta);
|
|
145
|
+
};
|
|
146
|
+
onPointerUp = (ev) => {
|
|
147
|
+
if (!this.dragStart)
|
|
148
|
+
return;
|
|
149
|
+
ev.currentTarget.releasePointerCapture?.(ev.pointerId);
|
|
150
|
+
this.dragStart = undefined;
|
|
151
|
+
this.draggingIndex = -1;
|
|
152
|
+
this.emitResize();
|
|
153
|
+
};
|
|
154
|
+
onKeyDown = (index) => (ev) => {
|
|
155
|
+
if (!this.resizable)
|
|
156
|
+
return;
|
|
157
|
+
const horizontal = this.orientation === 'horizontal';
|
|
158
|
+
const grow = horizontal ? (this.isRtl() ? 'ArrowLeft' : 'ArrowRight') : 'ArrowDown';
|
|
159
|
+
const shrink = horizontal ? (this.isRtl() ? 'ArrowRight' : 'ArrowLeft') : 'ArrowUp';
|
|
160
|
+
const amount = this.step * (ev.shiftKey ? 4 : 1);
|
|
161
|
+
const current = this.axisSize(this.paneEl(index));
|
|
162
|
+
let handled = true;
|
|
163
|
+
if (ev.key === 'Enter' && index === 0) {
|
|
164
|
+
void this.toggleCollapsed();
|
|
165
|
+
}
|
|
166
|
+
else if (this.collapsed && index === 0) {
|
|
167
|
+
handled = false;
|
|
168
|
+
}
|
|
169
|
+
else if (ev.key === grow) {
|
|
170
|
+
this.setSize(index, current + amount);
|
|
171
|
+
}
|
|
172
|
+
else if (ev.key === shrink) {
|
|
173
|
+
this.setSize(index, current - amount);
|
|
174
|
+
}
|
|
175
|
+
else if (ev.key === 'Home') {
|
|
176
|
+
this.setSize(index, this.minSize());
|
|
177
|
+
}
|
|
178
|
+
else if (ev.key === 'End') {
|
|
179
|
+
this.setSize(index, this.maxSize(index));
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
handled = false;
|
|
183
|
+
}
|
|
184
|
+
if (!handled)
|
|
185
|
+
return;
|
|
186
|
+
ev.preventDefault();
|
|
187
|
+
this.emitResize();
|
|
188
|
+
};
|
|
189
|
+
paneStyle(index) {
|
|
190
|
+
const last = index === this.paneCount - 1;
|
|
191
|
+
if (index === 0 && this.collapsed && this.paneCount > 1) {
|
|
192
|
+
return { flex: '0 0 var(--bs-split-pane-collapsed-size)' };
|
|
193
|
+
}
|
|
194
|
+
const size = this.sizes[index];
|
|
195
|
+
if (size !== undefined && !last)
|
|
196
|
+
return { flex: `0 0 ${size}px` };
|
|
197
|
+
if (index === 0 && !last)
|
|
198
|
+
return { flex: '0 0 var(--bs-split-pane-first-size)' };
|
|
199
|
+
return { flex: '1 1 0' };
|
|
200
|
+
}
|
|
201
|
+
percentFor(index) {
|
|
202
|
+
const container = this.el.shadowRoot?.querySelector('.bs-split-pane');
|
|
203
|
+
const pane = this.el.shadowRoot?.querySelectorAll('.bs-split-pane__pane')[index];
|
|
204
|
+
if (!container || !pane)
|
|
205
|
+
return 0;
|
|
206
|
+
const total = this.axisSize(container);
|
|
207
|
+
return total ? Math.round((this.axisSize(pane) / total) * 100) : 0;
|
|
208
|
+
}
|
|
209
|
+
render() {
|
|
210
|
+
const dividerOrientation = this.orientation === 'horizontal' ? 'vertical' : 'horizontal';
|
|
211
|
+
const nodes = [];
|
|
212
|
+
for (let i = 0; i < this.paneCount; i++) {
|
|
213
|
+
nodes.push(h("div", { part: `pane pane-${i + 1}`, class: `bs-split-pane__pane bs-split-pane__pane--${i + 1}`, style: this.paneStyle(i) }, h("slot", { name: `pane-${i + 1}` })));
|
|
214
|
+
if (i < this.paneCount - 1) {
|
|
215
|
+
nodes.push(h("div", { part: "divider", class: { 'bs-split-pane__divider': true, 'bs-split-pane__divider--active': this.draggingIndex === i, 'bs-split-pane__divider--static': !this.resizable }, role: "separator", "aria-orientation": dividerOrientation, "aria-label": this.dividerLabel, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.percentFor(i), tabindex: this.resizable ? 0 : undefined, onPointerDown: this.onPointerDown(i), onPointerMove: this.onPointerMove, onPointerUp: this.onPointerUp, onPointerCancel: this.onPointerUp, onKeyDown: this.onKeyDown(i) }, h("span", { part: "divider-thumb", class: "bs-split-pane__thumb" })));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return (h("div", { key: '8ef79e5ccc0ac2e8d4204f82b3507bef387e95cc', part: "container", class: `bs-split-pane bs-split-pane--${this.orientation}` }, nodes));
|
|
219
|
+
}
|
|
220
|
+
static get is() { return "bs-split-pane"; }
|
|
221
|
+
static get encapsulation() { return "shadow"; }
|
|
222
|
+
static get originalStyleUrls() {
|
|
223
|
+
return {
|
|
224
|
+
"$": ["bs-split-pane.css"]
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
static get styleUrls() {
|
|
228
|
+
return {
|
|
229
|
+
"$": ["bs-split-pane.css"]
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
static get properties() {
|
|
233
|
+
return {
|
|
234
|
+
"orientation": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "BsSplitPaneOrientation",
|
|
239
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
240
|
+
"references": {
|
|
241
|
+
"BsSplitPaneOrientation": {
|
|
242
|
+
"location": "local",
|
|
243
|
+
"path": "/home/runner/work/eg-brandsync-storybook/eg-brandsync-storybook/packages/wc/src/components/bs-split-pane/bs-split-pane.tsx",
|
|
244
|
+
"id": "src/components/bs-split-pane/bs-split-pane.tsx::BsSplitPaneOrientation"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"required": false,
|
|
249
|
+
"optional": false,
|
|
250
|
+
"docs": {
|
|
251
|
+
"tags": [],
|
|
252
|
+
"text": "`horizontal` = panes side by side, `vertical` = panes stacked."
|
|
253
|
+
},
|
|
254
|
+
"getter": false,
|
|
255
|
+
"setter": false,
|
|
256
|
+
"reflect": true,
|
|
257
|
+
"attribute": "orientation",
|
|
258
|
+
"defaultValue": "'horizontal'"
|
|
259
|
+
},
|
|
260
|
+
"collapsed": {
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"mutable": true,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "boolean",
|
|
265
|
+
"resolved": "boolean",
|
|
266
|
+
"references": {}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Collapses the first pane to a narrow rail. Mutable: the Enter key on the first divider toggles it."
|
|
273
|
+
},
|
|
274
|
+
"getter": false,
|
|
275
|
+
"setter": false,
|
|
276
|
+
"reflect": true,
|
|
277
|
+
"attribute": "collapsed",
|
|
278
|
+
"defaultValue": "false"
|
|
279
|
+
},
|
|
280
|
+
"resizable": {
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"mutable": false,
|
|
283
|
+
"complexType": {
|
|
284
|
+
"original": "boolean",
|
|
285
|
+
"resolved": "boolean",
|
|
286
|
+
"references": {}
|
|
287
|
+
},
|
|
288
|
+
"required": false,
|
|
289
|
+
"optional": false,
|
|
290
|
+
"docs": {
|
|
291
|
+
"tags": [],
|
|
292
|
+
"text": "Whether the dividers can be dragged / operated by keyboard. `false` keeps them as visual separators."
|
|
293
|
+
},
|
|
294
|
+
"getter": false,
|
|
295
|
+
"setter": false,
|
|
296
|
+
"reflect": false,
|
|
297
|
+
"attribute": "resizable",
|
|
298
|
+
"defaultValue": "true"
|
|
299
|
+
},
|
|
300
|
+
"dividerLabel": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"mutable": false,
|
|
303
|
+
"complexType": {
|
|
304
|
+
"original": "string",
|
|
305
|
+
"resolved": "string",
|
|
306
|
+
"references": {}
|
|
307
|
+
},
|
|
308
|
+
"required": false,
|
|
309
|
+
"optional": false,
|
|
310
|
+
"docs": {
|
|
311
|
+
"tags": [],
|
|
312
|
+
"text": "Accessible name of each divider."
|
|
313
|
+
},
|
|
314
|
+
"getter": false,
|
|
315
|
+
"setter": false,
|
|
316
|
+
"reflect": false,
|
|
317
|
+
"attribute": "divider-label",
|
|
318
|
+
"defaultValue": "'Resize panes'"
|
|
319
|
+
},
|
|
320
|
+
"step": {
|
|
321
|
+
"type": "number",
|
|
322
|
+
"mutable": false,
|
|
323
|
+
"complexType": {
|
|
324
|
+
"original": "number",
|
|
325
|
+
"resolved": "number",
|
|
326
|
+
"references": {}
|
|
327
|
+
},
|
|
328
|
+
"required": false,
|
|
329
|
+
"optional": false,
|
|
330
|
+
"docs": {
|
|
331
|
+
"tags": [],
|
|
332
|
+
"text": "Pixels moved per arrow-key press (Shift multiplies by 4)."
|
|
333
|
+
},
|
|
334
|
+
"getter": false,
|
|
335
|
+
"setter": false,
|
|
336
|
+
"reflect": false,
|
|
337
|
+
"attribute": "step",
|
|
338
|
+
"defaultValue": "16"
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
static get states() {
|
|
343
|
+
return {
|
|
344
|
+
"paneCount": {},
|
|
345
|
+
"sizes": {},
|
|
346
|
+
"draggingIndex": {}
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
static get events() {
|
|
350
|
+
return [{
|
|
351
|
+
"method": "bsResize",
|
|
352
|
+
"name": "bsResize",
|
|
353
|
+
"bubbles": true,
|
|
354
|
+
"cancelable": true,
|
|
355
|
+
"composed": true,
|
|
356
|
+
"docs": {
|
|
357
|
+
"tags": [],
|
|
358
|
+
"text": "Fires after a resize (pointer release or key press) with the pixel size of every pane except the last."
|
|
359
|
+
},
|
|
360
|
+
"complexType": {
|
|
361
|
+
"original": "number[]",
|
|
362
|
+
"resolved": "number[]",
|
|
363
|
+
"references": {}
|
|
364
|
+
}
|
|
365
|
+
}, {
|
|
366
|
+
"method": "bsCollapsedChange",
|
|
367
|
+
"name": "bsCollapsedChange",
|
|
368
|
+
"bubbles": true,
|
|
369
|
+
"cancelable": true,
|
|
370
|
+
"composed": true,
|
|
371
|
+
"docs": {
|
|
372
|
+
"tags": [],
|
|
373
|
+
"text": "Fires when `collapsed` changes through user interaction."
|
|
374
|
+
},
|
|
375
|
+
"complexType": {
|
|
376
|
+
"original": "boolean",
|
|
377
|
+
"resolved": "boolean",
|
|
378
|
+
"references": {}
|
|
379
|
+
}
|
|
380
|
+
}];
|
|
381
|
+
}
|
|
382
|
+
static get methods() {
|
|
383
|
+
return {
|
|
384
|
+
"toggleCollapsed": {
|
|
385
|
+
"complexType": {
|
|
386
|
+
"signature": "() => Promise<void>",
|
|
387
|
+
"parameters": [],
|
|
388
|
+
"references": {
|
|
389
|
+
"Promise": {
|
|
390
|
+
"location": "global",
|
|
391
|
+
"id": "global::Promise"
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
"return": "Promise<void>"
|
|
395
|
+
},
|
|
396
|
+
"docs": {
|
|
397
|
+
"text": "Toggles `collapsed` and emits `bsCollapsedChange`.",
|
|
398
|
+
"tags": []
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
static get elementRef() { return "el"; }
|
|
404
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { componentDescription } from "../../stories-utils";
|
|
3
|
+
const list = html `
|
|
4
|
+
<div style="padding: var(--bs-spacing-300)">
|
|
5
|
+
<strong>Pane title</strong>
|
|
6
|
+
<div>Description</div>
|
|
7
|
+
</div>
|
|
8
|
+
`;
|
|
9
|
+
const detail = (title) => html `
|
|
10
|
+
<div style="padding: var(--bs-spacing-300)">
|
|
11
|
+
<strong>${title}</strong>
|
|
12
|
+
<div>Description</div>
|
|
13
|
+
<p>Title<br /><strong>Details</strong></p>
|
|
14
|
+
<p>Title<br /><strong>Details</strong></p>
|
|
15
|
+
</div>
|
|
16
|
+
`;
|
|
17
|
+
const meta = {
|
|
18
|
+
title: 'Components/bs-split-pane',
|
|
19
|
+
parameters: { docs: { description: { component: componentDescription('bs-split-pane') } } },
|
|
20
|
+
render: args => html `
|
|
21
|
+
<div style="height: 480px; border: 1px solid var(--bs-border-neutral-container)">
|
|
22
|
+
<bs-split-pane orientation=${args.orientation} ?collapsed=${args.collapsed} .resizable=${args.resizable}>
|
|
23
|
+
<div slot="pane-1">${list}</div>
|
|
24
|
+
<div slot="pane-2">${detail('Detail pane')}</div>
|
|
25
|
+
${args.panes === 3 ? html `<div slot="pane-3">${detail('Second detail pane')}</div>` : ''}
|
|
26
|
+
</bs-split-pane>
|
|
27
|
+
</div>
|
|
28
|
+
`,
|
|
29
|
+
argTypes: {
|
|
30
|
+
orientation: { control: 'inline-radio', options: ['horizontal', 'vertical'] },
|
|
31
|
+
collapsed: { control: 'boolean' },
|
|
32
|
+
resizable: { control: 'boolean' },
|
|
33
|
+
panes: { control: 'inline-radio', options: [2, 3] },
|
|
34
|
+
},
|
|
35
|
+
args: { orientation: 'horizontal', collapsed: false, resizable: true, panes: 3 },
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
export const Horizontal = {};
|
|
39
|
+
export const HorizontalCollapsed = { args: { collapsed: true } };
|
|
40
|
+
export const Vertical = { args: { orientation: 'vertical' } };
|
|
41
|
+
export const TwoPanes = {
|
|
42
|
+
args: {
|
|
43
|
+
panes: 2,
|
|
44
|
+
orientation: 'vertical',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export const NotResizable = { args: { resizable: false } };
|
|
@@ -62,7 +62,7 @@ export class BsStepper {
|
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
64
|
// role="list" so each bs-stepper-step's role="listitem" has the required parent.
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: '7956314c41e9add72583aa8e2bd7271e6cf1068b', role: "list" }, h("slot", { key: '0ace9928ce7f573d9202a11e489a50e976d0e351', onSlotchange: this.onSlotChange })));
|
|
66
66
|
}
|
|
67
67
|
static get is() { return "bs-stepper"; }
|
|
68
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -57,7 +57,7 @@ export class BsStepperStep {
|
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
59
|
const state = this.state;
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: 'f51401da1a777c73fa70faa5a9f05f0234f517f1', role: "listitem", class: `bs-stepper-step--${this.direction}` }, h("div", { key: '30a1c060295b4addfc53ab67757661c7750ca781', class: "bs-stepper-step__top" }, h("span", { key: 'c4acc0a90fe006ed779072025c0aefc30a96c43f', part: "icon", class: `bs-stepper-step__icon bs-stepper-step__icon--${state}` }, state === 'current' && h("span", { key: '2a03c4c0b2e07a3879b7dbbcfc2022c6d753072d', class: "bs-stepper-step__icon-dot" }), state === 'done' && h(CheckIcon, { key: 'a6492fbd22bc9659fa7e71340bab908eee807dbb' }), state === 'error' && h(ExclamationIcon, { key: '5390c086f6c8314040862b5a4f680685d67a1f86' })), h("span", { key: '535e553bca360fe96538afb4baf0063e18b88fd8', part: "connector", class: "bs-stepper-step__connector", "aria-hidden": "true" }, h("span", { key: 'a04809fbdb2a47a129cf1a499bf0f9956d425e95', class: "bs-stepper-step__connector-line" }))), h("span", { key: 'ff4b573a3f0b1bac78cabbc68d58d4ecfe330fe9', part: "label", class: `bs-stepper-step__label bs-stepper-step__label--${state}` }, h("span", { key: '2cecc129a85da61efaa8c670754feca4a56fe717', part: "name", class: "bs-stepper-step__name" }, this.name), this.showDescription && this.description && (h("span", { key: '5c06546a24247733d7df9c99c753074809272feb', part: "description", class: "bs-stepper-step__description" }, this.description)))));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "bs-stepper-step"; }
|
|
63
63
|
static get encapsulation() { return "shadow"; }
|
|
@@ -75,7 +75,7 @@ export class BsSwitch {
|
|
|
75
75
|
const knobClasses = ['bs-switch__knob', `bs-switch__knob--${this.size}`, this.disabled ? 'bs-switch__knob--disabled' : '']
|
|
76
76
|
.filter(Boolean)
|
|
77
77
|
.join(' ');
|
|
78
|
-
return (h("label", { key: '
|
|
78
|
+
return (h("label", { key: '11ad9e104dabafbecba8395436f4f88fff141449', class: `bs-switch ${this.disabled ? 'bs-switch--disabled' : ''}` }, h("input", { key: '4a6c4400f9193f481b1134517ed7d53828cca27d', class: "bs-switch__input", type: "checkbox", role: "switch", checked: this.checked, disabled: this.disabled, "aria-checked": String(this.checked), "aria-label": this.ariaLabel, onChange: this.onChange }), h("span", { key: 'f6dca44c46b5412135cb43220ece5a8d161018d0', part: "track", class: trackClasses }, h("span", { key: '6a06911e7f17822a4b5df219f9c564cf8d130fbb', part: "knob", class: knobClasses })), h("span", { key: '6628c4ef4e1097d5b41b0b8eaac47eb0af627722', part: "label", class: "bs-switch__label" }, h("slot", { key: 'd1ce12e2a63a3a1a067c4080bae9c7612e8dd933' }))));
|
|
79
79
|
}
|
|
80
80
|
static get is() { return "bs-switch"; }
|
|
81
81
|
static get encapsulation() { return "shadow"; }
|
|
@@ -94,7 +94,7 @@ export class BsInlineTab {
|
|
|
94
94
|
};
|
|
95
95
|
render() {
|
|
96
96
|
const iconOnly = this.hasIcon && !this.hasLabel;
|
|
97
|
-
return (h("button", { key: '
|
|
97
|
+
return (h("button", { key: 'bccfcaa980bc351de48dc6e0611614721f7e63aa', type: "button", part: "tab", role: "tab", class: `bs-inline-tab ${this.selected ? 'bs-inline-tab--selected' : ''} ${this.disabled ? 'bs-inline-tab--disabled' : ''} ${iconOnly ? 'bs-inline-tab--icon-only' : ''} ${this.hasIcon ? 'bs-inline-tab--has-icon' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: 'f9bb9caedc8fb34d90dd23a14e431714d2175389', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: '457be6231cd41bfe12198cda4780bff83af84d52', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'dea0e6da1a85682c7e04c93bb6c07165b720e168', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: '6e2c366f47f47a976cdcc667222e281306dbfc63', onSlotchange: this.onLabelSlotchange }))));
|
|
98
98
|
}
|
|
99
99
|
static get is() { return "bs-inline-tab"; }
|
|
100
100
|
static get encapsulation() { return "shadow"; }
|
|
@@ -107,7 +107,7 @@ export class BsTab {
|
|
|
107
107
|
const iconOnly = this.hasIcon && !this.hasLabel;
|
|
108
108
|
const vertical = this.hasIcon && this.hasLabel && this.iconPosition === 'top';
|
|
109
109
|
const showBadge = this.hasBadge && !iconOnly && !vertical;
|
|
110
|
-
return (h("button", { key: '
|
|
110
|
+
return (h("button", { key: '088ea367ad3b8b1afa36e8bb4cac7fb150aae7f2', type: "button", part: "tab", role: "tab", class: `bs-tab ${this.selected ? 'bs-tab--selected' : ''} ${this.disabled ? 'bs-tab--disabled' : ''} ${iconOnly ? 'bs-tab--icon-only' : ''} ${vertical ? 'bs-tab--vertical' : ''}`, disabled: this.disabled, "aria-selected": String(this.selected), "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": this.ariaLabel, tabIndex: this.tabbable === undefined ? undefined : this.tabbable ? 0 : -1, onClick: this.onClick }, h("span", { key: 'a68c2b1a582dbdae20dad694e4d69b80aa5223ea', part: "icon", class: `bs-tab__icon ${this.hasIcon ? 'bs-tab__icon--has-content' : ''}` }, h("slot", { key: '80a7d2856033c87f9f7cce7b3637e6a91106d76d', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '77e038473baf0bd124c589ce24c25ba0bebe2cde', part: "label", class: `bs-tab__label ${this.hasLabel ? 'bs-tab__label--has-content' : ''}` }, h("slot", { key: 'dd09813d9c8dcb66fd338ff238861b0b02a8df07', onSlotchange: this.onLabelSlotchange })), h("span", { key: '22f74bafa1ad5948c0e1f09e9eb6f20f3b8d16ae', part: "badge", class: `bs-tab__badge ${showBadge ? 'bs-tab__badge--has-content' : ''}` }, h("slot", { key: '65b8f288b9fcbfdb492d594226ef5da09fe082dd', name: "badge", onSlotchange: this.onBadgeSlotchange })), h("span", { key: 'fcda37d86c4c799e97ec0bf60ea7edd647e9c45e', part: "indicator", class: "bs-tab__indicator" })));
|
|
111
111
|
}
|
|
112
112
|
static get is() { return "bs-tab"; }
|
|
113
113
|
static get encapsulation() { return "shadow"; }
|
|
@@ -135,7 +135,7 @@ export class BsTabs {
|
|
|
135
135
|
}
|
|
136
136
|
render() {
|
|
137
137
|
const vertical = this.orientation === 'vertical';
|
|
138
|
-
return (h("div", { key: '
|
|
138
|
+
return (h("div", { key: '0bc0de64c29c4bca86e2709fd3f376e4c195eab2', part: "tablist", role: "tablist", "aria-orientation": this.orientation, class: `bs-tabs bs-tabs--${this.type} ${vertical ? 'bs-tabs--vertical' : ''}` }, h("slot", { key: '0751673c06ae93234a987fd809a49c9d5517d29c', onSlotchange: () => this.syncRovingTabindex() })));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "bs-tabs"; }
|
|
141
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -62,6 +62,10 @@ export class BsTimepicker {
|
|
|
62
62
|
/** Label of the Cancel button. */
|
|
63
63
|
cancelLabel = 'Cancel';
|
|
64
64
|
/** Accessible name of the hour spinner. */
|
|
65
|
+
/** Verb prefix of each column's increment button name ("Increase hour"). */
|
|
66
|
+
increaseLabel = 'Increase';
|
|
67
|
+
/** Verb prefix of each column's decrement button name ("Decrease hour"). */
|
|
68
|
+
decreaseLabel = 'Decrease';
|
|
65
69
|
hourLabel = 'Hour';
|
|
66
70
|
/** Accessible name of the minute spinner. */
|
|
67
71
|
minuteLabel = 'Minute';
|
|
@@ -193,17 +197,17 @@ export class BsTimepicker {
|
|
|
193
197
|
const [min, max] = this.bounds(col);
|
|
194
198
|
const n = this.shown(col);
|
|
195
199
|
const stepLabel = (dir) => `${dir} ${label.toLowerCase()}`;
|
|
196
|
-
return (h("div", { part: "spinner", class: "bs-timepicker__spinner" }, h("button", { part: "step", type: "button", class: "bs-timepicker__step", "aria-label": stepLabel(
|
|
200
|
+
return (h("div", { part: "spinner", class: "bs-timepicker__spinner" }, h("button", { part: "step", type: "button", class: "bs-timepicker__step", "aria-label": stepLabel(this.increaseLabel), tabindex: -1, onClick: () => this.stepBy(col, 1) }, h("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { d: "M18 15L12 9L6 15", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { part: "value", class: "bs-timepicker__value", role: "spinbutton", tabindex: 0, "aria-label": label, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": n, "aria-valuetext": pad(n), onKeyDown: this.onKeyDown(col), onBlur: () => (this.typed = '') }, pad(n)), h("button", { part: "step", type: "button", class: "bs-timepicker__step", "aria-label": stepLabel(this.decreaseLabel), tabindex: -1, onClick: () => this.stepBy(col, -1) }, h("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" }, h("path", { d: "M6 9L12 15L18 9", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))));
|
|
197
201
|
}
|
|
198
202
|
render() {
|
|
199
|
-
return (h("bs-card", { key: '
|
|
203
|
+
return (h("bs-card", { key: '74af930fdaa05b2d91f4ca447078175a1c978994', part: "container", class: "bs-timepicker", surface: "raised" }, h("div", { key: 'f67c4d6f522e5ee39dad612521324d87a1d2c48d', class: "bs-timepicker__body" }, h("div", { key: 'c9bef71e51c20f5a09ae38519f89b7823fd2f9ad', part: "header", class: "bs-timepicker__header" }, h("div", { key: '4c4aa31d8f11f92bb789d7720222a39914a283a7', part: "title", class: "bs-timepicker__title" }, this.heading), h("label", { key: 'db8fbe9176836ccf19d60079fd21655a6f078eed', class: "bs-timepicker__format" }, h("span", { key: '42dd4163160e475dc5b27ec99534edf5df1e5a3d' }, this.formatLabel), h("bs-switch", { key: '1eca77cb8284366630ec8a53c2e5ca00ecea4382', part: "format-toggle", size: "md", ariaLabel: this.formatLabel, checked: !this.is12h, onBsChange: (ev) => (this.format = ev.detail ? '24h' : '12h') }))), h("div", { key: 'ec60756f323a04ddc74f9cf8bd6c84276cbe2a0b', class: "bs-timepicker__divider" }), h("div", { key: '15609379e051fe0eddbe491f0ccaeb7efad3ae81', part: "selector", class: "bs-timepicker__selector" }, this.renderColumn('hour', this.hourLabel), h("div", { key: '40760ac8da6112c1c82554ed807f156c3998ceeb', part: "separator", class: "bs-timepicker__separator", "aria-hidden": "true" }, h("svg", { key: 'b15b5bf4db3790c167b13caae40e1d1e7e92bfb7', viewBox: "0 0 4 32", fill: "currentColor" }, h("circle", { key: 'cdc4cee6cd246b05be5f11939425b44160a65d54', cx: "2", cy: "10", r: "2" }), h("circle", { key: '65a5393d6f05c241d7c1aa3c8090c22266386b0e', cx: "2", cy: "22", r: "2" }))), this.renderColumn('minute', this.minuteLabel), this.is12h && (h("bs-input", { key: '4292168e81da8883d93b1ce9e3e60edd00726cfb', part: "period", class: "bs-timepicker__period", type: "dropdown", label: this.periodLabel, value: this.isPm ? 'PM' : 'AM', options: [
|
|
200
204
|
{ label: 'AM', value: 'AM' },
|
|
201
205
|
{ label: 'PM', value: 'PM' },
|
|
202
206
|
], onBsChange: (ev) => {
|
|
203
207
|
const pm = ev.detail === 'PM';
|
|
204
208
|
if (pm !== this.isPm)
|
|
205
209
|
this.hour = (this.hour + 12) % 24;
|
|
206
|
-
} }))), h("div", { key: '
|
|
210
|
+
} }))), h("div", { key: '9ceb4e065f2851ae0b4adc22fa6795d593df362a', class: "bs-timepicker__divider" }), h("div", { key: '8cbe32e5381d83e27ab7b97c50091fbf837428b8', part: "footer", class: "bs-timepicker__footer" }, h("bs-button", { key: '17fb1f5fcb3b40033951d13c460500c0bbc3f5a1', part: "cancel", variant: "subtle", onClick: this.cancel }, this.cancelLabel), h("bs-button", { key: '4a3a6a6bb3ef01a66e6198c1bcb148b94a164f8d', part: "confirm", variant: "primary", onClick: this.confirm }, this.confirmLabel)))));
|
|
207
211
|
}
|
|
208
212
|
static get is() { return "bs-timepicker"; }
|
|
209
213
|
static get encapsulation() { return "shadow"; }
|
|
@@ -379,6 +383,46 @@ export class BsTimepicker {
|
|
|
379
383
|
"attribute": "cancel-label",
|
|
380
384
|
"defaultValue": "'Cancel'"
|
|
381
385
|
},
|
|
386
|
+
"increaseLabel": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"mutable": false,
|
|
389
|
+
"complexType": {
|
|
390
|
+
"original": "string",
|
|
391
|
+
"resolved": "string",
|
|
392
|
+
"references": {}
|
|
393
|
+
},
|
|
394
|
+
"required": false,
|
|
395
|
+
"optional": false,
|
|
396
|
+
"docs": {
|
|
397
|
+
"tags": [],
|
|
398
|
+
"text": "Verb prefix of each column's increment button name (\"Increase hour\")."
|
|
399
|
+
},
|
|
400
|
+
"getter": false,
|
|
401
|
+
"setter": false,
|
|
402
|
+
"reflect": false,
|
|
403
|
+
"attribute": "increase-label",
|
|
404
|
+
"defaultValue": "'Increase'"
|
|
405
|
+
},
|
|
406
|
+
"decreaseLabel": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"mutable": false,
|
|
409
|
+
"complexType": {
|
|
410
|
+
"original": "string",
|
|
411
|
+
"resolved": "string",
|
|
412
|
+
"references": {}
|
|
413
|
+
},
|
|
414
|
+
"required": false,
|
|
415
|
+
"optional": false,
|
|
416
|
+
"docs": {
|
|
417
|
+
"tags": [],
|
|
418
|
+
"text": "Verb prefix of each column's decrement button name (\"Decrease hour\")."
|
|
419
|
+
},
|
|
420
|
+
"getter": false,
|
|
421
|
+
"setter": false,
|
|
422
|
+
"reflect": false,
|
|
423
|
+
"attribute": "decrease-label",
|
|
424
|
+
"defaultValue": "'Decrease'"
|
|
425
|
+
},
|
|
382
426
|
"hourLabel": {
|
|
383
427
|
"type": "string",
|
|
384
428
|
"mutable": false,
|
|
@@ -391,7 +435,7 @@ export class BsTimepicker {
|
|
|
391
435
|
"optional": false,
|
|
392
436
|
"docs": {
|
|
393
437
|
"tags": [],
|
|
394
|
-
"text": "
|
|
438
|
+
"text": ""
|
|
395
439
|
},
|
|
396
440
|
"getter": false,
|
|
397
441
|
"setter": false,
|