@brandsync/wc 1.9.0 → 1.11.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/custom-elements.json +8864 -3754
- package/dist/brandsync-wc/brandsync-wc.css +33 -0
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/{p-9f8852a0.entry.js → p-00a0d489.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a5feaad4.entry.js → p-061ddc46.entry.js} +1 -1
- package/dist/brandsync-wc/{p-360452c2.entry.js → p-09435f41.entry.js} +1 -1
- package/dist/brandsync-wc/{p-107b1c5d.entry.js → p-09bc1923.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1f7208cb.entry.js → p-09cbf05b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-7c94e6ae.entry.js → p-0b2d3b7e.entry.js} +1 -1
- package/dist/brandsync-wc/p-0b7c77c1.entry.js +1 -0
- package/dist/brandsync-wc/p-0ee4126c.entry.js +1 -0
- package/dist/brandsync-wc/{p-0e39b9cc.entry.js → p-0f8cd2e8.entry.js} +1 -1
- package/dist/brandsync-wc/{p-1c0db4d6.entry.js → p-1261f0b0.entry.js} +1 -1
- package/dist/brandsync-wc/{p-6bf2f116.entry.js → p-1978e63c.entry.js} +1 -1
- package/dist/brandsync-wc/p-1aab6d07.entry.js +1 -0
- package/dist/brandsync-wc/{p-6fd7dd6a.entry.js → p-20030f4d.entry.js} +1 -1
- package/dist/brandsync-wc/p-2177042f.entry.js +1 -0
- package/dist/brandsync-wc/{p-33e44094.entry.js → p-2368a92e.entry.js} +1 -1
- package/dist/brandsync-wc/{p-29027559.entry.js → p-247e36ad.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ae978c9a.entry.js → p-2497d128.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fc240aa0.entry.js → p-282ddbee.entry.js} +1 -1
- package/dist/brandsync-wc/{p-0eed6813.entry.js → p-2f4e08e1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c3f72584.entry.js → p-34e5feaf.entry.js} +1 -1
- package/dist/brandsync-wc/{p-062cfa34.entry.js → p-39a26c64.entry.js} +1 -1
- package/dist/brandsync-wc/p-3a1af63a.entry.js +1 -0
- package/dist/brandsync-wc/{p-9f6fe37d.entry.js → p-3f09296a.entry.js} +1 -1
- package/dist/brandsync-wc/p-416322bd.entry.js +1 -0
- package/dist/brandsync-wc/{p-bbcc47b0.entry.js → p-491b51e6.entry.js} +1 -1
- package/dist/brandsync-wc/p-52cb2358.entry.js +1 -0
- package/dist/brandsync-wc/{p-3ec74d35.entry.js → p-56c37e0a.entry.js} +1 -1
- package/dist/brandsync-wc/p-5ba90a13.entry.js +1 -0
- package/dist/brandsync-wc/{p-2181378f.entry.js → p-5f27f04d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a09e157f.entry.js → p-617bd13a.entry.js} +1 -1
- package/dist/brandsync-wc/p-68fcd4a4.entry.js +1 -0
- package/dist/brandsync-wc/{p-cfcf3f0a.entry.js → p-69c0a85d.entry.js} +1 -1
- package/dist/brandsync-wc/{p-9f65f998.entry.js → p-6a696161.entry.js} +1 -1
- package/dist/brandsync-wc/{p-8ee0153b.entry.js → p-6c6cdf77.entry.js} +1 -1
- package/dist/brandsync-wc/{p-051d3064.entry.js → p-6e735e37.entry.js} +1 -1
- package/dist/brandsync-wc/{p-fc58c663.entry.js → p-73f214ed.entry.js} +1 -1
- package/dist/brandsync-wc/{p-be2c1740.entry.js → p-7796b93f.entry.js} +1 -1
- package/dist/brandsync-wc/p-78a69a59.entry.js +1 -0
- package/dist/brandsync-wc/{p-27bbed83.entry.js → p-78f4fcf0.entry.js} +1 -1
- package/dist/brandsync-wc/p-7f954939.entry.js +1 -0
- package/dist/brandsync-wc/{p-835a8dc7.entry.js → p-81605b82.entry.js} +1 -1
- package/dist/brandsync-wc/{p-de7c946d.entry.js → p-823ab3b2.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a92eec48.entry.js → p-89fabf27.entry.js} +1 -1
- package/dist/brandsync-wc/{p-AgoOSYvW.js → p-DqQRXQMx.js} +2 -2
- package/dist/brandsync-wc/{p-70f64b25.entry.js → p-a9169157.entry.js} +1 -1
- package/dist/brandsync-wc/{p-05c7de28.entry.js → p-afb07368.entry.js} +1 -1
- package/dist/brandsync-wc/{p-235ae012.entry.js → p-b84366a7.entry.js} +1 -1
- package/dist/brandsync-wc/p-b9a4042e.entry.js +1 -0
- package/dist/brandsync-wc/{p-275072dd.entry.js → p-b9ccd9d1.entry.js} +1 -1
- package/dist/brandsync-wc/{p-61c1a2a3.entry.js → p-be3dd446.entry.js} +1 -1
- package/dist/brandsync-wc/p-c0a92750.entry.js +1 -0
- package/dist/brandsync-wc/{p-6331de9c.entry.js → p-d754ee13.entry.js} +1 -1
- package/dist/brandsync-wc/{p-e9b43754.entry.js → p-d75f3f87.entry.js} +1 -1
- package/dist/brandsync-wc/{p-3176d1d3.entry.js → p-d8b29a53.entry.js} +1 -1
- package/dist/brandsync-wc/p-de110ad0.entry.js +1 -0
- package/dist/brandsync-wc/p-e2556b4e.entry.js +1 -0
- package/dist/brandsync-wc/{p-4574a707.entry.js → p-e5daa6ca.entry.js} +1 -1
- package/dist/brandsync-wc/{p-c4de155c.entry.js → p-f15d9524.entry.js} +1 -1
- package/dist/brandsync-wc/p-f5180578.entry.js +1 -0
- package/dist/brandsync-wc/{p-114d2fd8.entry.js → p-f7d15fbe.entry.js} +1 -1
- package/dist/brandsync-wc/{p-a0d5a620.entry.js → p-fc069773.entry.js} +1 -1
- package/dist/brandsync-wc/p-fcee0dc4.entry.js +1 -0
- package/dist/cjs/brandsync-wc.cjs.js +2 -2
- 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 +1 -1
- 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 +2 -2
- package/dist/cjs/bs-button.cjs.entry.js +3 -3
- package/dist/cjs/bs-card.cjs.entry.js +3 -3
- package/dist/cjs/bs-carousel.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +2 -2
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-checkbox-skeleton.cjs.entry.js +2 -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 +1 -1
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer.cjs.entry.js +1 -1
- package/dist/cjs/bs-cookie-consent.cjs.entry.js +186 -0
- package/dist/cjs/bs-data-table.cjs.entry.js +1 -1
- package/dist/cjs/bs-datepicker.cjs.entry.js +414 -0
- package/dist/cjs/bs-dialog.cjs.entry.js +1 -1
- package/dist/cjs/bs-error-page.cjs.entry.js +103 -0
- package/dist/cjs/bs-file-upload-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-file-upload.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-button.cjs.entry.js +2 -2
- package/dist/cjs/bs-icon-tile.cjs.entry.js +52 -0
- package/dist/cjs/bs-inline-tab.cjs.entry.js +2 -2
- package/dist/cjs/{bs-input.cjs.entry.js → bs-input_3.cjs.entry.js} +74 -6
- package/dist/cjs/bs-logo.cjs.entry.js +1 -1
- package/dist/cjs/bs-navigation-drawer-item.cjs.entry.js +2 -2
- package/dist/cjs/bs-navigation-drawer.cjs.entry.js +3 -3
- package/dist/cjs/bs-navigation-header.cjs.entry.js +2 -2
- package/dist/cjs/bs-onboarding-checklist.cjs.entry.js +161 -0
- package/dist/cjs/bs-pagination.cjs.entry.js +2 -2
- package/dist/cjs/bs-product-tour.cjs.entry.js +78 -0
- package/dist/cjs/bs-progress-linear.cjs.entry.js +4 -4
- package/dist/cjs/bs-progress.cjs.entry.js +3 -3
- package/dist/cjs/bs-qr-code.cjs.entry.js +148 -0
- package/dist/cjs/bs-radio.cjs.entry.js +2 -2
- package/dist/cjs/bs-session-timeout.cjs.entry.js +215 -0
- package/dist/cjs/bs-slider.cjs.entry.js +2 -2
- package/dist/cjs/bs-snackbar.cjs.entry.js +9 -3
- package/dist/cjs/bs-source-link.cjs.entry.js +3 -3
- 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 +255 -0
- package/dist/cjs/bs-timepicker.cjs.entry.js +209 -0
- package/dist/cjs/bs-toast.cjs.entry.js +2 -2
- package/dist/cjs/bs-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/bs-whats-new.cjs.entry.js +144 -0
- package/dist/cjs/{index-kk9YXF2S.js → index-tFJjflK5.js} +15 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +11 -0
- package/dist/collection/components/bs-a11y.cmp.test.js +26 -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-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/bs-button/bs-button.cmp.test.js +28 -0
- package/dist/collection/components/bs-button/bs-button/bs-button.css +8 -2
- package/dist/collection/components/bs-button/bs-button/bs-button.js +4 -1
- package/dist/collection/components/bs-button/bs-icon-button/bs-icon-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.cmp.test.js +48 -0
- package/dist/collection/components/bs-card/bs-card.css +37 -16
- package/dist/collection/components/bs-card/bs-card.js +2 -2
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +1 -1
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +1 -1
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-checkbox/bs-checkbox-skeleton/bs-checkbox-skeleton.js +1 -1
- package/dist/collection/components/bs-cookie-consent/bs-cookie-consent.cmp.test.js +217 -0
- package/dist/collection/components/bs-cookie-consent/bs-cookie-consent.css +350 -0
- package/dist/collection/components/bs-cookie-consent/bs-cookie-consent.js +668 -0
- package/dist/collection/components/bs-cookie-consent/bs-cookie-consent.stories.js +103 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.cmp.test.js +191 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.css +325 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.js +788 -0
- package/dist/collection/components/bs-datepicker/bs-datepicker.stories.js +64 -0
- package/dist/collection/components/bs-error-page/bs-error-page.cmp.test.js +99 -0
- package/dist/collection/components/bs-error-page/bs-error-page.css +105 -0
- package/dist/collection/components/bs-error-page/bs-error-page.js +328 -0
- package/dist/collection/components/bs-error-page/bs-error-page.stories.js +57 -0
- package/dist/collection/components/bs-file-upload/bs-file-upload.js +1 -1
- package/dist/collection/components/bs-file-upload-item/bs-file-upload-item.js +1 -1
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.cmp.test.js +175 -0
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.css +112 -0
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.js +158 -0
- package/dist/collection/components/bs-icon-tile/bs-icon-tile.stories.js +45 -0
- package/dist/collection/components/bs-input/bs-input.cmp.test.js +14 -0
- package/dist/collection/components/bs-input/bs-input.css +9 -2
- package/dist/collection/components/bs-input/bs-input.js +7 -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-onboarding-checklist/bs-onboarding-checklist.cmp.test.js +280 -0
- package/dist/collection/components/bs-onboarding-checklist/bs-onboarding-checklist.css +488 -0
- package/dist/collection/components/bs-onboarding-checklist/bs-onboarding-checklist.js +674 -0
- package/dist/collection/components/bs-onboarding-checklist/bs-onboarding-checklist.stories.js +92 -0
- package/dist/collection/components/bs-pagination/bs-pagination.js +1 -1
- package/dist/collection/components/bs-product-tour/bs-product-tour.cmp.test.js +116 -0
- package/dist/collection/components/bs-product-tour/bs-product-tour.css +265 -0
- package/dist/collection/components/bs-product-tour/bs-product-tour.js +391 -0
- package/dist/collection/components/bs-product-tour/bs-product-tour.stories.js +68 -0
- package/dist/collection/components/bs-progress/bs-progress.js +2 -2
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.css +1 -1
- package/dist/collection/components/bs-progress-linear/bs-progress-linear.js +2 -2
- package/dist/collection/components/bs-qr-code/bs-qr-code.cmp.test.js +152 -0
- package/dist/collection/components/bs-qr-code/bs-qr-code.css +307 -0
- package/dist/collection/components/bs-qr-code/bs-qr-code.js +767 -0
- package/dist/collection/components/bs-qr-code/bs-qr-code.stories.js +99 -0
- package/dist/collection/components/bs-radio/bs-radio.js +1 -1
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.cmp.test.js +202 -0
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.css +239 -0
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.js +772 -0
- package/dist/collection/components/bs-session-timeout/bs-session-timeout.stories.js +88 -0
- package/dist/collection/components/bs-slider/bs-slider.js +1 -1
- package/dist/collection/components/bs-snackbar/bs-snackbar.cmp.test.js +20 -0
- package/dist/collection/components/bs-snackbar/bs-snackbar.css +6 -4
- package/dist/collection/components/bs-snackbar/bs-snackbar.js +53 -1
- package/dist/collection/components/bs-source-link/bs-source-link.js +2 -2
- 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.cmp.test.js +141 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.css +204 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.js +511 -0
- package/dist/collection/components/bs-timepicker/bs-timepicker.stories.js +44 -0
- package/dist/collection/components/bs-toast/bs-toast.js +1 -1
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/collection/components/bs-whats-new/bs-whats-new.cmp.test.js +200 -0
- package/dist/collection/components/bs-whats-new/bs-whats-new.css +315 -0
- package/dist/collection/components/bs-whats-new/bs-whats-new.js +790 -0
- package/dist/collection/components/bs-whats-new/bs-whats-new.stories.js +105 -0
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.cmp.test.js +79 -0
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.css +131 -0
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.js +295 -0
- package/dist/collection/components/bs-whats-new-entry/bs-whats-new-entry.stories.js +67 -0
- package/dist/collection/components/ui-shell/bs-navigation-drawer/bs-navigation-drawer/bs-navigation-drawer.js +2 -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/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-composer-status-banner.js +1 -1
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-cookie-consent.d.ts +11 -0
- package/dist/components/bs-cookie-consent.js +1 -0
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-datepicker.d.ts +11 -0
- package/dist/components/bs-datepicker.js +1 -0
- package/dist/components/bs-dialog.js +1 -1
- package/dist/components/bs-error-page.d.ts +11 -0
- package/dist/components/bs-error-page.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/bs-icon-tile.js +1 -0
- 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-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.d.ts +11 -0
- package/dist/components/bs-onboarding-checklist.js +1 -0
- package/dist/components/bs-pagination.js +1 -1
- package/dist/components/bs-product-tour.d.ts +11 -0
- package/dist/components/bs-product-tour.js +1 -0
- package/dist/components/bs-progress-linear.js +1 -1
- package/dist/components/bs-progress.js +1 -1
- package/dist/components/bs-qr-code.d.ts +11 -0
- package/dist/components/bs-qr-code.js +1 -0
- package/dist/components/bs-radio.js +1 -1
- package/dist/components/bs-session-timeout.d.ts +11 -0
- package/dist/components/bs-session-timeout.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-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.d.ts +11 -0
- package/dist/components/bs-timepicker.js +1 -0
- package/dist/components/bs-toast.js +1 -1
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/bs-whats-new-entry.d.ts +11 -0
- package/dist/components/bs-whats-new-entry.js +1 -0
- package/dist/components/bs-whats-new.d.ts +11 -0
- package/dist/components/bs-whats-new.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-R2MlkUzD.js → p-BEEoVNRu.js} +1 -1
- package/dist/components/{p-EtXc94lJ.js → p-BZ3M4lOU.js} +1 -1
- package/dist/components/p-B_I4UEMp.js +1 -0
- package/dist/components/{p-BfEyD6Ku.js → p-Be9L4_Fe.js} +1 -1
- package/dist/components/p-Be_Pmccm.js +1 -0
- package/dist/components/p-Bl_tVzeq.js +1 -0
- package/dist/components/p-C8yT2Ucq.js +1 -0
- package/dist/components/p-CA31vqjL.js +1 -0
- package/dist/components/p-CUfs0ROR.js +1 -0
- package/dist/components/{p-JYlmcxBn.js → p-CVrEuVFo.js} +1 -1
- package/dist/components/{p-BA3c9Rom.js → p-C_j_jDM6.js} +1 -1
- package/dist/components/p-CbimDNGY.js +1 -0
- package/dist/components/{p-Buly0d5G.js → p-CeUK3n7D.js} +1 -1
- package/dist/components/p-CncySD_-.js +1 -0
- package/dist/components/p-DE8K7fg0.js +1 -0
- package/dist/components/p-Dr0Qk9Zc.js +1 -0
- package/dist/components/p-DuLL7Ouw.js +1 -0
- package/dist/components/p-YsHQLXET.js +1 -0
- package/dist/components/p-qmS2CBqi.js +1 -0
- package/dist/components/{p-BoeorHNv.js → p-zTHlbyH6.js} +1 -1
- package/dist/esm/brandsync-wc.js +3 -3
- 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 +1 -1
- 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 +2 -2
- package/dist/esm/bs-button.entry.js +3 -3
- package/dist/esm/bs-card.entry.js +3 -3
- package/dist/esm/bs-carousel.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +2 -2
- package/dist/esm/bs-chatbot-header.entry.js +2 -2
- package/dist/esm/bs-chatbot-response-action.entry.js +2 -2
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +2 -2
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +2 -2
- package/dist/esm/bs-checkbox-skeleton.entry.js +2 -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 +1 -1
- package/dist/esm/bs-composer-status-banner.entry.js +1 -1
- package/dist/esm/bs-composer.entry.js +1 -1
- package/dist/esm/bs-cookie-consent.entry.js +184 -0
- package/dist/esm/bs-data-table.entry.js +1 -1
- package/dist/esm/bs-datepicker.entry.js +412 -0
- package/dist/esm/bs-dialog.entry.js +1 -1
- package/dist/esm/bs-error-page.entry.js +101 -0
- package/dist/esm/bs-file-upload-item.entry.js +2 -2
- package/dist/esm/bs-file-upload.entry.js +2 -2
- package/dist/esm/bs-icon-button.entry.js +2 -2
- package/dist/esm/bs-icon-tile.entry.js +50 -0
- package/dist/esm/bs-inline-tab.entry.js +2 -2
- package/dist/esm/{bs-input.entry.js → bs-input_3.entry.js} +73 -7
- package/dist/esm/bs-logo.entry.js +1 -1
- package/dist/esm/bs-navigation-drawer-item.entry.js +2 -2
- package/dist/esm/bs-navigation-drawer.entry.js +3 -3
- package/dist/esm/bs-navigation-header.entry.js +2 -2
- package/dist/esm/bs-onboarding-checklist.entry.js +159 -0
- package/dist/esm/bs-pagination.entry.js +2 -2
- package/dist/esm/bs-product-tour.entry.js +76 -0
- package/dist/esm/bs-progress-linear.entry.js +4 -4
- package/dist/esm/bs-progress.entry.js +3 -3
- package/dist/esm/bs-qr-code.entry.js +146 -0
- package/dist/esm/bs-radio.entry.js +2 -2
- package/dist/esm/bs-session-timeout.entry.js +213 -0
- package/dist/esm/bs-slider.entry.js +2 -2
- package/dist/esm/bs-snackbar.entry.js +9 -3
- package/dist/esm/bs-source-link.entry.js +3 -3
- 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 +251 -0
- package/dist/esm/bs-timepicker.entry.js +207 -0
- package/dist/esm/bs-toast.entry.js +2 -2
- package/dist/esm/bs-tooltip.entry.js +2 -2
- package/dist/esm/bs-whats-new.entry.js +142 -0
- package/dist/esm/{index-AgoOSYvW.js → index-DqQRXQMx.js} +15 -3
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/bs-button/bs-button/bs-button.d.ts +3 -0
- package/dist/types/components/bs-cookie-consent/bs-cookie-consent.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-cookie-consent/bs-cookie-consent.d.ts +136 -0
- package/dist/types/components/bs-cookie-consent/bs-cookie-consent.stories.d.ts +16 -0
- package/dist/types/components/bs-datepicker/bs-datepicker.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-datepicker/bs-datepicker.d.ts +138 -0
- package/dist/types/components/bs-datepicker/bs-datepicker.stories.d.ts +20 -0
- package/dist/types/components/bs-error-page/bs-error-page.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-error-page/bs-error-page.d.ts +60 -0
- package/dist/types/components/bs-error-page/bs-error-page.stories.d.ts +22 -0
- package/dist/types/components/bs-icon-tile/bs-icon-tile.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-icon-tile/bs-icon-tile.d.ts +40 -0
- package/dist/types/components/bs-icon-tile/bs-icon-tile.stories.d.ts +13 -0
- package/dist/types/components/bs-onboarding-checklist/bs-onboarding-checklist.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-onboarding-checklist/bs-onboarding-checklist.d.ts +140 -0
- package/dist/types/components/bs-onboarding-checklist/bs-onboarding-checklist.stories.d.ts +18 -0
- package/dist/types/components/bs-product-tour/bs-product-tour.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-product-tour/bs-product-tour.d.ts +78 -0
- package/dist/types/components/bs-product-tour/bs-product-tour.stories.d.ts +19 -0
- package/dist/types/components/bs-qr-code/bs-qr-code.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-qr-code/bs-qr-code.d.ts +124 -0
- package/dist/types/components/bs-qr-code/bs-qr-code.stories.d.ts +28 -0
- package/dist/types/components/bs-session-timeout/bs-session-timeout.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-session-timeout/bs-session-timeout.d.ts +141 -0
- package/dist/types/components/bs-session-timeout/bs-session-timeout.stories.d.ts +19 -0
- package/dist/types/components/bs-snackbar/bs-snackbar.d.ts +7 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.d.ts +103 -0
- package/dist/types/components/bs-timepicker/bs-timepicker.stories.d.ts +14 -0
- package/dist/types/components/bs-whats-new/bs-whats-new.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-whats-new/bs-whats-new.d.ts +147 -0
- package/dist/types/components/bs-whats-new/bs-whats-new.stories.d.ts +14 -0
- package/dist/types/components/bs-whats-new-entry/bs-whats-new-entry.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-whats-new-entry/bs-whats-new-entry.d.ts +53 -0
- package/dist/types/components/bs-whats-new-entry/bs-whats-new-entry.stories.d.ts +18 -0
- package/dist/types/components.d.ts +3072 -17
- package/package.json +1 -1
- package/dist/brandsync-wc/p-2891d40b.entry.js +0 -1
- package/dist/brandsync-wc/p-36bf37d9.entry.js +0 -1
- package/dist/brandsync-wc/p-3b64e3cd.entry.js +0 -1
- package/dist/brandsync-wc/p-4e5dcaff.entry.js +0 -1
- package/dist/brandsync-wc/p-7b00dd36.entry.js +0 -1
- package/dist/brandsync-wc/p-c10d2529.entry.js +0 -1
- package/dist/brandsync-wc/p-f006d962.entry.js +0 -1
- package/dist/brandsync-wc/p-f074f94e.entry.js +0 -1
- package/dist/brandsync-wc/p-f7d47c17.entry.js +0 -1
- package/dist/brandsync-wc/p-fddc7bd1.entry.js +0 -1
- package/dist/cjs/bs-menu-item.cjs.entry.js +0 -34
- package/dist/cjs/bs-menu.cjs.entry.js +0 -39
- package/dist/cjs/bs-tab.cjs.entry.js +0 -88
- package/dist/cjs/bs-tabs.cjs.entry.js +0 -133
- package/dist/components/p-CpUHnsq9.js +0 -1
- package/dist/components/p-wei0Ija2.js +0 -1
- package/dist/esm/bs-menu-item.entry.js +0 -32
- package/dist/esm/bs-menu.entry.js +0 -37
- package/dist/esm/bs-tab.entry.js +0 -86
- package/dist/esm/bs-tabs.entry.js +0 -131
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/bs-session-timeout',
|
|
6
|
+
parameters: { docs: { description: { component: componentDescription('bs-session-timeout') } } },
|
|
7
|
+
decorators: [story => html `<div style="padding: 24px; background: var(--bs-color-neutral-container);">${story()}</div>`],
|
|
8
|
+
render: args => html `
|
|
9
|
+
<bs-session-timeout
|
|
10
|
+
type=${args.type}
|
|
11
|
+
seconds-left=${args.secondsLeft}
|
|
12
|
+
total-seconds=${args.totalSeconds}
|
|
13
|
+
?countdown=${args.countdown}
|
|
14
|
+
saved-message=${ifDefined(args.savedMessage || undefined)}
|
|
15
|
+
account-name=${ifDefined(args.accountName || undefined)}
|
|
16
|
+
account-email=${ifDefined(args.accountEmail || undefined)}
|
|
17
|
+
password-error=${ifDefined(args.passwordError || undefined)}
|
|
18
|
+
@bsPrimary=${(ev) => console.log('bsPrimary', ev.detail)}
|
|
19
|
+
@bsSecondary=${() => console.log('bsSecondary')}
|
|
20
|
+
@bsAlternative=${(ev) => console.log('bsAlternative', ev.detail)}
|
|
21
|
+
@bsCancel=${() => console.log('bsCancel')}
|
|
22
|
+
@bsExpire=${() => console.log('bsExpire')}
|
|
23
|
+
></bs-session-timeout>
|
|
24
|
+
`,
|
|
25
|
+
argTypes: {
|
|
26
|
+
type: { control: 'inline-radio', options: ['warning', 'signed-out', 'confirm-identity'], description: propDescription('bs-session-timeout', 'type') },
|
|
27
|
+
secondsLeft: { control: { type: 'number', min: 0 }, description: propDescription('bs-session-timeout', 'secondsLeft') },
|
|
28
|
+
totalSeconds: { control: { type: 'number', min: 0 }, description: propDescription('bs-session-timeout', 'totalSeconds') },
|
|
29
|
+
countdown: { control: 'boolean', description: propDescription('bs-session-timeout', 'countdown') },
|
|
30
|
+
savedMessage: { control: 'text', description: propDescription('bs-session-timeout', 'savedMessage') },
|
|
31
|
+
accountName: { control: 'text', description: propDescription('bs-session-timeout', 'accountName') },
|
|
32
|
+
accountEmail: { control: 'text', description: propDescription('bs-session-timeout', 'accountEmail') },
|
|
33
|
+
passwordError: { control: 'text', description: propDescription('bs-session-timeout', 'passwordError') },
|
|
34
|
+
},
|
|
35
|
+
args: {
|
|
36
|
+
type: 'warning',
|
|
37
|
+
secondsLeft: 112,
|
|
38
|
+
totalSeconds: 335,
|
|
39
|
+
countdown: false,
|
|
40
|
+
savedMessage: 'Your draft of INV-2041 is saved automatically.',
|
|
41
|
+
accountName: 'Mette Jensen',
|
|
42
|
+
accountEmail: 'mette.jensen@nordlys.no',
|
|
43
|
+
passwordError: '',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export default meta;
|
|
47
|
+
export const Warning = {
|
|
48
|
+
render: args => html `
|
|
49
|
+
<bs-session-timeout
|
|
50
|
+
seconds-left=${args.secondsLeft}
|
|
51
|
+
total-seconds=${args.totalSeconds}
|
|
52
|
+
?countdown=${args.countdown}
|
|
53
|
+
saved-message=${args.savedMessage}
|
|
54
|
+
description="For your security, we sign you out after 30 minutes without activity."
|
|
55
|
+
></bs-session-timeout>
|
|
56
|
+
`,
|
|
57
|
+
};
|
|
58
|
+
export const LiveCountdown = {
|
|
59
|
+
name: 'Live countdown',
|
|
60
|
+
args: { secondsLeft: 20, totalSeconds: 20, countdown: true },
|
|
61
|
+
};
|
|
62
|
+
export const SignedOut = {
|
|
63
|
+
name: 'Signed out',
|
|
64
|
+
args: { type: 'signed-out' },
|
|
65
|
+
render: args => html `
|
|
66
|
+
<bs-session-timeout
|
|
67
|
+
type="signed-out"
|
|
68
|
+
account-name=${args.accountName}
|
|
69
|
+
account-email=${args.accountEmail}
|
|
70
|
+
description="You were inactive for 30 minutes. Your draft of INV-2041 was saved and will be there when you sign in."
|
|
71
|
+
></bs-session-timeout>
|
|
72
|
+
`,
|
|
73
|
+
};
|
|
74
|
+
export const ConfirmIdentity = {
|
|
75
|
+
name: 'Confirm identity',
|
|
76
|
+
args: { type: 'confirm-identity' },
|
|
77
|
+
render: args => html `
|
|
78
|
+
<bs-session-timeout
|
|
79
|
+
type="confirm-identity"
|
|
80
|
+
password-error=${ifDefined(args.passwordError || undefined)}
|
|
81
|
+
description="Changing bank account details needs a fresh sign-in. Signed in as mette.jensen@nordlys.no."
|
|
82
|
+
></bs-session-timeout>
|
|
83
|
+
`,
|
|
84
|
+
};
|
|
85
|
+
export const WrongPassword = {
|
|
86
|
+
name: 'Wrong password',
|
|
87
|
+
args: { type: 'confirm-identity', passwordError: 'That password isn’t right. Try again.' },
|
|
88
|
+
};
|
|
@@ -229,7 +229,7 @@ export class BsSlider {
|
|
|
229
229
|
render() {
|
|
230
230
|
const isRange = this.type === 'range';
|
|
231
231
|
const rootClasses = ['bs-slider', this.disabled ? 'bs-slider--disabled' : ''].filter(Boolean).join(' ');
|
|
232
|
-
return (h("div", { key: '
|
|
232
|
+
return (h("div", { key: '7fb6a534e41e91efe00bcba839641550398eed13', class: rootClasses }, this.showLabel && (h("div", { key: '5892936540c9e4f74dfadd3ad9088ffd2c04fef5', class: "bs-slider__header" }, h("span", { key: '220c0db8a2cc5f5f29cf99830fa0b4d30ec90d32', 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 ?? 'Start value'), h("span", { class: "bs-slider__separator" }, "\u2013"), this.renderPercentField(this.percent(this.effectiveValueEnd), this.onEndPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} end` : 'End value'))) : (this.renderPercentField(this.percent(this.value), this.onPercentFieldChange, this.ariaLabel ? `${this.ariaLabel} value` : 'Value')))), h("div", { key: '67830218b3aa9d927ab87c4c6ca419b3a24ca0af', class: "bs-slider__row" }, this.showLabel && (h("span", { key: 'b2569e64400853a503d1566825500f8d10fe0318', part: "bound", class: "bs-slider__bound" }, this.min)), isRange ? this.renderRangeThumbs() : this.renderSingleThumb(), this.showLabel && (h("span", { key: '2b5ac8ff8dd48f4db7a0d4db3698bb64a4f9277a', part: "bound", class: "bs-slider__bound" }, this.max)))));
|
|
233
233
|
}
|
|
234
234
|
static get is() { return "bs-slider"; }
|
|
235
235
|
static get encapsulation() { return "shadow"; }
|
|
@@ -66,6 +66,26 @@ describe('bs-snackbar', () => {
|
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
describe('aria-live', () => {
|
|
69
|
+
it('shows the close button by default and hides it with hideClose', async () => {
|
|
70
|
+
const a = await render(h("bs-snackbar", null, "Saved"));
|
|
71
|
+
expect(a.root.shadowRoot.querySelector('[part="close"]')).not.toBeNull();
|
|
72
|
+
const b = await render(h("bs-snackbar", { hideClose: true }, "Saved"));
|
|
73
|
+
expect(b.root.shadowRoot.querySelector('[part="close"]')).toBeNull();
|
|
74
|
+
});
|
|
75
|
+
it('uses the variant-matched action button unless actionVariant is set', async () => {
|
|
76
|
+
const a = await render(h("bs-snackbar", { actionLabel: "Undo" }, "Saved"));
|
|
77
|
+
expect(a.root.shadowRoot.querySelector('[part="action"]').variant).toBe('outlined');
|
|
78
|
+
const b = await render(h("bs-snackbar", { actionLabel: "Undo", actionVariant: "subtle" }, "Saved"));
|
|
79
|
+
expect(b.root.shadowRoot.querySelector('[part="action"]').variant).toBe('subtle');
|
|
80
|
+
});
|
|
81
|
+
it('has a 24px icon by default and takes --bs-snackbar-icon-size', async () => {
|
|
82
|
+
const a = await render(h("bs-snackbar", null, "Saved"));
|
|
83
|
+
expect(a.root.shadowRoot.querySelector('[part="icon"]').getBoundingClientRect().width).toBe(24);
|
|
84
|
+
const b = await render(h("bs-snackbar", { style: { '--bs-snackbar-icon-size': '32px' } }, "Saved"));
|
|
85
|
+
const icon = b.root.shadowRoot.querySelector('[part="icon"]');
|
|
86
|
+
expect(icon.getBoundingClientRect().width).toBe(32);
|
|
87
|
+
expect(icon.querySelector('svg').getBoundingClientRect().width).toBe(32);
|
|
88
|
+
});
|
|
69
89
|
it('uses aria-live="polite" for non-error variants', async () => {
|
|
70
90
|
const { root } = await render(h("bs-snackbar", { variant: "success" }, "Message"));
|
|
71
91
|
const container = root.shadowRoot.querySelector('[part="container"]');
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @prop --bs-snackbar-gap: Gap between the content area and the actions area. Aliased to --bs-spacing-100.
|
|
5
5
|
* @prop --bs-snackbar-content-padding-y: Top/bottom padding of the content area. Aliased to --bs-spacing-200.
|
|
6
6
|
* @prop --bs-snackbar-content-padding-x: Left padding of the content area (the bar's own left edge). Aliased to --bs-spacing-200.
|
|
7
|
+
* @prop --bs-snackbar-icon-size: Width/height of the leading icon or spinner. 24px.
|
|
7
8
|
* @prop --bs-snackbar-content-gap: Gap between the icon and the message. Aliased to --bs-spacing-150.
|
|
8
9
|
* @prop --bs-snackbar-font-size: Message font size. Aliased to --bs-font-size-md.
|
|
9
10
|
* @prop --bs-snackbar-line-height: Message line height. Aliased to --bs-line-height-body-md.
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
--bs-snackbar-content-padding-y: var(--bs-spacing-200);
|
|
37
38
|
--bs-snackbar-content-padding-x: var(--bs-spacing-200);
|
|
38
39
|
--bs-snackbar-content-gap: var(--bs-spacing-150);
|
|
40
|
+
--bs-snackbar-icon-size: 24px;
|
|
39
41
|
--bs-snackbar-font-size: var(--bs-font-size-md);
|
|
40
42
|
--bs-snackbar-line-height: var(--bs-line-height-body-md);
|
|
41
43
|
|
|
@@ -115,15 +117,15 @@
|
|
|
115
117
|
display: flex;
|
|
116
118
|
align-items: center;
|
|
117
119
|
justify-content: center;
|
|
118
|
-
width:
|
|
119
|
-
height:
|
|
120
|
+
width: var(--bs-snackbar-icon-size);
|
|
121
|
+
height: var(--bs-snackbar-icon-size);
|
|
120
122
|
flex-shrink: 0;
|
|
121
123
|
color: inherit;
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
.bs-snackbar__icon svg {
|
|
125
|
-
width:
|
|
126
|
-
height:
|
|
127
|
+
width: var(--bs-snackbar-icon-size);
|
|
128
|
+
height: var(--bs-snackbar-icon-size);
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
/* Same border-spin technique as bs-attachment's own upload spinner -- a light track ring plus one
|
|
@@ -49,6 +49,12 @@ export class BsSnackbar {
|
|
|
49
49
|
/** Label for the optional action button (e.g. "Undo", "Retry"). Omit this prop entirely to
|
|
50
50
|
* render no action button at all -- its presence, not a boolean flag, is what shows it. */
|
|
51
51
|
actionLabel;
|
|
52
|
+
/** Variant of the action button. Defaults to the one that matches `variant` (outlined for `default`).
|
|
53
|
+
* Use `subtle` for a plain text action; colour it with `--bs-button-subtle-color` on `::part(action)`. */
|
|
54
|
+
actionVariant;
|
|
55
|
+
/** Hides the close button, for a confirmation that goes away on its own or whose only control is
|
|
56
|
+
* the action. A snackbar with no way to dismiss it must be removed by the consumer. */
|
|
57
|
+
hideClose = false;
|
|
52
58
|
/** Fires when the action button is clicked. Ignored/never fires if `actionLabel` isn't set. */
|
|
53
59
|
bsAction;
|
|
54
60
|
/** Fires when the close button is clicked. This component doesn't remove itself from the DOM --
|
|
@@ -61,7 +67,7 @@ export class BsSnackbar {
|
|
|
61
67
|
this.bsDismiss.emit();
|
|
62
68
|
};
|
|
63
69
|
render() {
|
|
64
|
-
return (h("div", { key: '
|
|
70
|
+
return (h("div", { key: '291914fd21d4d8634f49aad410f8cda212c7d07c', part: "container", class: `bs-snackbar bs-snackbar--${this.variant}`, role: "status", "aria-live": this.variant === 'error' ? 'assertive' : 'polite' }, h("div", { key: '5d50b75478197ad433c96d66ed9de3fd22360b56', class: "bs-snackbar__content" }, h("span", { key: 'd625eb5d139d7811a28d781b8eb4fffa370debab', part: "icon", class: "bs-snackbar__icon", "aria-hidden": "true" }, this.loading ? h("span", { class: "bs-snackbar__spinner" }) : h(CheckCircleIcon, null)), h("span", { key: '6c7666f8cd8d3bddf44d35a7d8e9d9c645def13f', part: "message", class: "bs-snackbar__message" }, h("slot", { key: '96e8eb40bb7a6c9292d948ac47f6e630dc843bb5' }))), h("div", { key: '60380f06bc10c964155c7cc97eb036a84506a103', class: "bs-snackbar__actions" }, this.actionLabel && (h("bs-button", { key: '843054ee154c565034ddaf7b000419d7ecc4bf63', part: "action", variant: this.actionVariant ?? ACTION_VARIANT[this.variant], size: "sm", onClick: this.onAction }, this.actionLabel)), !this.hideClose && (h("bs-icon-button", { key: '383ea23e7e5f7681651b7a6394cb39b453e5f8cb', part: "close", variant: "subtle", size: "md", ariaLabel: "Dismiss", onClick: this.onDismiss }, h(CloseIcon, { key: '6ec39615ed1e82f3bb6e45a5917fa6a35166d3f1' }))))));
|
|
65
71
|
}
|
|
66
72
|
static get is() { return "bs-snackbar"; }
|
|
67
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -141,6 +147,52 @@ export class BsSnackbar {
|
|
|
141
147
|
"setter": false,
|
|
142
148
|
"reflect": false,
|
|
143
149
|
"attribute": "action-label"
|
|
150
|
+
},
|
|
151
|
+
"actionVariant": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"mutable": false,
|
|
154
|
+
"complexType": {
|
|
155
|
+
"original": "BsButtonVariant",
|
|
156
|
+
"resolved": "\"error\" | \"info\" | \"neutral\" | \"outlined\" | \"primary\" | \"subtle\" | \"success\" | \"warning\"",
|
|
157
|
+
"references": {
|
|
158
|
+
"BsButtonVariant": {
|
|
159
|
+
"location": "import",
|
|
160
|
+
"path": "../bs-button/bs-button/bs-button",
|
|
161
|
+
"id": "src/components/bs-button/bs-button/bs-button.tsx::BsButtonVariant",
|
|
162
|
+
"referenceLocation": "BsButtonVariant"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": "Variant of the action button. Defaults to the one that matches `variant` (outlined for `default`).\nUse `subtle` for a plain text action; colour it with `--bs-button-subtle-color` on `::part(action)`."
|
|
171
|
+
},
|
|
172
|
+
"getter": false,
|
|
173
|
+
"setter": false,
|
|
174
|
+
"reflect": false,
|
|
175
|
+
"attribute": "action-variant"
|
|
176
|
+
},
|
|
177
|
+
"hideClose": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "boolean",
|
|
182
|
+
"resolved": "boolean",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Hides the close button, for a confirmation that goes away on its own or whose only control is\nthe action. A snackbar with no way to dismiss it must be removed by the consumer."
|
|
190
|
+
},
|
|
191
|
+
"getter": false,
|
|
192
|
+
"setter": false,
|
|
193
|
+
"reflect": false,
|
|
194
|
+
"attribute": "hide-close",
|
|
195
|
+
"defaultValue": "false"
|
|
144
196
|
}
|
|
145
197
|
};
|
|
146
198
|
}
|
|
@@ -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: '4f7296f4d35b7779c91e791a7e674fff3f963239', class: "bs-source-link__left" }, h("span", { key: 'e8a03fb6ee46d64d8d9b2e86a39d15d36164a23d', class: "bs-source-link__filename-row" }, h("span", { key: '16ed535a5ab56b54edab2a39d02659c9be9cfc69', part: "icon", class: "bs-source-link__icon" }, h("slot", { key: '56661ab02c9628fd407f364c95db3832d9b86fdd', name: "icon" }, h(FileTextIcon, { key: 'c7a6f19c9dfee1c8b1e4ef24334c541fd8c88cbd' }))), h("p", { key: '5dac08dcde183f2a714c04cc0e700c4b2778bf7e', part: "filename", class: "bs-source-link__filename" }, this.fileName)), h("span", { key: 'bc4cd84ea0d990b5c456d7962bce8881cdaaf1b7', class: "bs-source-link__meta" }, this.sourceName && (h("span", { key: '94efb5a9ff386f86546ce56dbe2a8b386a342d16', part: "source", class: "bs-source-link__source" }, this.sourceName)), this.sourceName && this.version && h("span", { key: 'd084d96de4afe4522fc9ef28c6f870fa49ca68bc', class: "bs-source-link__dot", "aria-hidden": "true" }), this.version && (h("span", { key: 'e2b976a66185a53dbd682081399ed946e1bbb318', part: "version", class: "bs-source-link__version" }, this.version)))),
|
|
55
|
+
h("span", { key: '23f361d9af84c4804e88d7f019623e2223fe7a33', part: "arrow", class: "bs-source-link__arrow", "aria-hidden": "true" }, h(ArrowUpRightIcon, { key: '0316db74234f0c66afc0372d5299b8fd19691163' })),
|
|
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
|
}
|
|
@@ -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: '8a3c0b5ce7ffd6dfc34b0c5ae602ef4bca42e33c', role: "list" }, h("slot", { key: 'fcc69d5e89dfa5f1ae7aa2ae38667a7826fee89d', 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: '07f068e7e9d54124e72e6f3c395532b1df28bf4d', role: "listitem", class: `bs-stepper-step--${this.direction}` }, h("div", { key: 'aa2c8cf568f8823be576b7cd8453db51dbc28ca3', class: "bs-stepper-step__top" }, h("span", { key: '55053a617f92b0f300987fad2f171d0c5a00cb48', part: "icon", class: `bs-stepper-step__icon bs-stepper-step__icon--${state}` }, state === 'current' && h("span", { key: '83f5206192f6e3363ee37c1819e2c7584d2b4395', class: "bs-stepper-step__icon-dot" }), state === 'done' && h(CheckIcon, { key: '19960813f546d3bed470d486d64cda1f4f9ae05d' }), state === 'error' && h(ExclamationIcon, { key: '5dff15dc5e8183b6ebe75592dddd0710fe6318f3' })), h("span", { key: 'aa91c2544a472e836d79361453eccc6cc3c0ded2', part: "connector", class: "bs-stepper-step__connector", "aria-hidden": "true" }, h("span", { key: 'b4db85cdeed8fcd895ce5fe38fa98aaf9e40401d', class: "bs-stepper-step__connector-line" }))), h("span", { key: 'c4dcd488f9c177eab29d8d9cedee9ff139844049', part: "label", class: `bs-stepper-step__label bs-stepper-step__label--${state}` }, h("span", { key: 'd486ade27072093c9bf90824e89b24ab4ff5b8a5', part: "name", class: "bs-stepper-step__name" }, this.name), this.showDescription && this.description && (h("span", { key: 'eae26f6a683805ebc8eeb780df82060cf3ec699f', 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: '3c1ef40b924c852077b0e82e6f177c3ef029d578', class: `bs-switch ${this.disabled ? 'bs-switch--disabled' : ''}` }, h("input", { key: '05b9d74d9264d85efad043d3fed9582294245e14', 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: '1df589ae299b9d78841b66964803be1431a902f0', part: "track", class: trackClasses }, h("span", { key: '56f65a6b2c672c13b566eeb94bed37985dd225e1', part: "knob", class: knobClasses })), h("span", { key: '293393bcd0c93a6b67fee20761f2fec6ae350d1f', part: "label", class: "bs-switch__label" }, h("slot", { key: 'a4a89ba0581cb44382b9f81564adb6dd1e3809bc' }))));
|
|
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: '84e1e70ea67dba9c45e55cfcbc9afecb5be41b7e', 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: '118ed482a69348bf7ed5b633df36d714c643eea2', part: "icon", class: `bs-inline-tab__icon ${this.hasIcon ? 'bs-inline-tab__icon--has-content' : ''}` }, h("slot", { key: 'bde742484441571b7e907702c90dff00ff12a515', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: 'c1c0df916c0d6bbc3c51f74ffc4a659cc731cb5d', part: "label", class: `bs-inline-tab__label ${this.hasLabel ? 'bs-inline-tab__label--has-content' : ''}` }, h("slot", { key: 'f3ed571ab6a28cd43f08b479eca9a5d70b4851ea', 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: '6cb94a173877a8e339585dd41bfca7cdb5152277', 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: '87fc3d0b1e958295bb3ff41c3a4f6a76803c4b31', part: "icon", class: `bs-tab__icon ${this.hasIcon ? 'bs-tab__icon--has-content' : ''}` }, h("slot", { key: '5fb74ca62c8f60b50d7f53cd5b77b02cfb547365', name: "icon", onSlotchange: this.onIconSlotchange })), h("span", { key: '4774748fa4d8d5f441914aaca0cc8729c3d85857', part: "label", class: `bs-tab__label ${this.hasLabel ? 'bs-tab__label--has-content' : ''}` }, h("slot", { key: '87d793b4e8088f51ff64dd388f3769aebd5c507d', onSlotchange: this.onLabelSlotchange })), h("span", { key: 'ddfc8532be46adab986a6f4a6b0e46d2c8fcc8f4', part: "badge", class: `bs-tab__badge ${showBadge ? 'bs-tab__badge--has-content' : ''}` }, h("slot", { key: '729a03df8dbca1814725d06ceb23d1d1c694cc63', name: "badge", onSlotchange: this.onBadgeSlotchange })), h("span", { key: 'd873545b4148383e3df42fe1ff76aab027d4a0f8', 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: 'e7f42dc2b8504a99f03c35fa3617155ac430def0', part: "tablist", role: "tablist", "aria-orientation": this.orientation, class: `bs-tabs bs-tabs--${this.type} ${vertical ? 'bs-tabs--vertical' : ''}` }, h("slot", { key: 'a9a96d3fca150110a8490b42d516db9609677903', onSlotchange: () => this.syncRovingTabindex() })));
|
|
139
139
|
}
|
|
140
140
|
static get is() { return "bs-tabs"; }
|
|
141
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
const sr = (root) => root.shadowRoot;
|
|
3
|
+
const spin = (root, label) => sr(root).querySelector(`[role="spinbutton"][aria-label="${label}"]`);
|
|
4
|
+
const text = (root, label) => spin(root, label).textContent;
|
|
5
|
+
const key = (el, k) => el.dispatchEvent(new KeyboardEvent('keydown', { key: k, bubbles: true }));
|
|
6
|
+
const steps = (root) => Array.from(sr(root).querySelectorAll('[part="step"]'));
|
|
7
|
+
// order: hour up, hour down, minute up, minute down
|
|
8
|
+
const period = (root) => sr(root).querySelector('[part="period"]');
|
|
9
|
+
describe('bs-timepicker', () => {
|
|
10
|
+
it('defaults to 12h, 12:00 AM with no value', async () => {
|
|
11
|
+
const { root } = await render(h("bs-timepicker", null));
|
|
12
|
+
expect(text(root, 'Hour')).toBe('12');
|
|
13
|
+
expect(text(root, 'Minute')).toBe('00');
|
|
14
|
+
expect(period(root).value).toBe('AM');
|
|
15
|
+
});
|
|
16
|
+
it('shows a 24-hour value as 12h with PM', async () => {
|
|
17
|
+
const { root } = await render(h("bs-timepicker", { value: "14:05" }));
|
|
18
|
+
expect(text(root, 'Hour')).toBe('02');
|
|
19
|
+
expect(text(root, 'Minute')).toBe('05');
|
|
20
|
+
expect(period(root).value).toBe('PM');
|
|
21
|
+
});
|
|
22
|
+
it('shows 00-23 and no AM/PM in 24h format', async () => {
|
|
23
|
+
const { root } = await render(h("bs-timepicker", { format: "24h", value: "14:05" }));
|
|
24
|
+
expect(text(root, 'Hour')).toBe('14');
|
|
25
|
+
expect(period(root)).toBeNull();
|
|
26
|
+
});
|
|
27
|
+
it('has hour/minute spinbuttons with ARIA values', async () => {
|
|
28
|
+
const { root } = await render(h("bs-timepicker", { format: "24h", value: "14:05" }));
|
|
29
|
+
const hourEl = spin(root, 'Hour');
|
|
30
|
+
expect(hourEl.getAttribute('aria-valuenow')).toBe('14');
|
|
31
|
+
expect(hourEl.getAttribute('aria-valuemin')).toBe('0');
|
|
32
|
+
expect(hourEl.getAttribute('aria-valuemax')).toBe('23');
|
|
33
|
+
expect(spin(root, 'Minute').getAttribute('aria-valuemax')).toBe('59');
|
|
34
|
+
});
|
|
35
|
+
it('caret buttons step and wrap the hour (12h: 12 -> 1, keeps PM)', async () => {
|
|
36
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { value: "12:00" }));
|
|
37
|
+
expect(period(root).value).toBe('PM');
|
|
38
|
+
steps(root)[0].click();
|
|
39
|
+
await waitForChanges();
|
|
40
|
+
expect(text(root, 'Hour')).toBe('01');
|
|
41
|
+
expect(period(root).value).toBe('PM');
|
|
42
|
+
steps(root)[1].click();
|
|
43
|
+
await waitForChanges();
|
|
44
|
+
expect(text(root, 'Hour')).toBe('12');
|
|
45
|
+
});
|
|
46
|
+
it('minutes wrap without touching the hour', async () => {
|
|
47
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { format: "24h", value: "09:59" }));
|
|
48
|
+
steps(root)[2].click();
|
|
49
|
+
await waitForChanges();
|
|
50
|
+
expect(text(root, 'Minute')).toBe('00');
|
|
51
|
+
expect(text(root, 'Hour')).toBe('09');
|
|
52
|
+
});
|
|
53
|
+
it('honours minuteStep', async () => {
|
|
54
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { format: "24h", value: "09:00", minuteStep: 15 }));
|
|
55
|
+
steps(root)[2].click();
|
|
56
|
+
await waitForChanges();
|
|
57
|
+
expect(text(root, 'Minute')).toBe('15');
|
|
58
|
+
steps(root)[3].click();
|
|
59
|
+
steps(root)[3].click();
|
|
60
|
+
await waitForChanges();
|
|
61
|
+
expect(text(root, 'Minute')).toBe('45');
|
|
62
|
+
});
|
|
63
|
+
it('ArrowUp/ArrowDown/Home/End work on a focused value', async () => {
|
|
64
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { format: "24h", value: "09:30" }));
|
|
65
|
+
key(spin(root, 'Hour'), 'ArrowUp');
|
|
66
|
+
await waitForChanges();
|
|
67
|
+
expect(text(root, 'Hour')).toBe('10');
|
|
68
|
+
key(spin(root, 'Hour'), 'End');
|
|
69
|
+
await waitForChanges();
|
|
70
|
+
expect(text(root, 'Hour')).toBe('23');
|
|
71
|
+
key(spin(root, 'Hour'), 'ArrowUp');
|
|
72
|
+
await waitForChanges();
|
|
73
|
+
expect(text(root, 'Hour')).toBe('00');
|
|
74
|
+
});
|
|
75
|
+
it('typing digits sets the value', async () => {
|
|
76
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { format: "24h", value: "00:00" }));
|
|
77
|
+
key(spin(root, 'Hour'), '1');
|
|
78
|
+
key(spin(root, 'Hour'), '7');
|
|
79
|
+
await waitForChanges();
|
|
80
|
+
expect(text(root, 'Hour')).toBe('17');
|
|
81
|
+
// 9 can't start a valid 24h hour pair beyond 9x, but 9 itself is valid.
|
|
82
|
+
key(spin(root, 'Minute'), '4');
|
|
83
|
+
key(spin(root, 'Minute'), '2');
|
|
84
|
+
await waitForChanges();
|
|
85
|
+
expect(text(root, 'Minute')).toBe('42');
|
|
86
|
+
});
|
|
87
|
+
it('the AM/PM dropdown flips the period without changing the displayed hour', async () => {
|
|
88
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { value: "09:15" }));
|
|
89
|
+
period(root).dispatchEvent(new CustomEvent('bsChange', { detail: 'PM' }));
|
|
90
|
+
await waitForChanges();
|
|
91
|
+
expect(period(root).value).toBe('PM');
|
|
92
|
+
expect(text(root, 'Hour')).toBe('09');
|
|
93
|
+
});
|
|
94
|
+
it('the 24h switch converts the display without changing the time', async () => {
|
|
95
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { value: "14:30" }));
|
|
96
|
+
sr(root).querySelector('bs-switch').dispatchEvent(new CustomEvent('bsChange', { detail: true }));
|
|
97
|
+
await waitForChanges();
|
|
98
|
+
expect(root).toEqualAttribute('format', '24h');
|
|
99
|
+
expect(text(root, 'Hour')).toBe('14');
|
|
100
|
+
});
|
|
101
|
+
it('nothing is committed until Confirm, which emits 24-hour HH:mm', async () => {
|
|
102
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { value: "09:15" }));
|
|
103
|
+
const events = [];
|
|
104
|
+
root.addEventListener('bsChange', (e) => events.push(e.detail));
|
|
105
|
+
period(root).dispatchEvent(new CustomEvent('bsChange', { detail: 'PM' }));
|
|
106
|
+
steps(root)[0].click();
|
|
107
|
+
await waitForChanges();
|
|
108
|
+
expect(root.value).toBe('09:15');
|
|
109
|
+
expect(events).toEqual([]);
|
|
110
|
+
sr(root).querySelector('[part="confirm"]').click();
|
|
111
|
+
await waitForChanges();
|
|
112
|
+
expect(events).toEqual([{ value: '22:15' }]);
|
|
113
|
+
expect(root.value).toBe('22:15');
|
|
114
|
+
});
|
|
115
|
+
it('Cancel discards the draft and emits bsCancel', async () => {
|
|
116
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { format: "24h", value: "09:15" }));
|
|
117
|
+
let cancelled = 0;
|
|
118
|
+
root.addEventListener('bsCancel', () => cancelled++);
|
|
119
|
+
steps(root)[0].click();
|
|
120
|
+
await waitForChanges();
|
|
121
|
+
expect(text(root, 'Hour')).toBe('10');
|
|
122
|
+
sr(root).querySelector('[part="cancel"]').click();
|
|
123
|
+
await waitForChanges();
|
|
124
|
+
expect(cancelled).toBe(1);
|
|
125
|
+
expect(text(root, 'Hour')).toBe('09');
|
|
126
|
+
expect(root.value).toBe('09:15');
|
|
127
|
+
});
|
|
128
|
+
it('setting value programmatically updates the display without emitting', async () => {
|
|
129
|
+
const { root, waitForChanges } = await render(h("bs-timepicker", { format: "24h", value: "09:15" }));
|
|
130
|
+
let fired = 0;
|
|
131
|
+
root.addEventListener('bsChange', () => fired++);
|
|
132
|
+
root.value = '18:45';
|
|
133
|
+
await waitForChanges();
|
|
134
|
+
expect(text(root, 'Hour')).toBe('18');
|
|
135
|
+
expect(fired).toBe(0);
|
|
136
|
+
});
|
|
137
|
+
it('ignores an invalid value', async () => {
|
|
138
|
+
const { root } = await render(h("bs-timepicker", { format: "24h", value: "25:99" }));
|
|
139
|
+
expect(text(root, 'Hour')).toBe('00');
|
|
140
|
+
});
|
|
141
|
+
});
|