@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,99 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
|
+
import { componentDescription, propDescription } from "../../stories-utils";
|
|
4
|
+
// An illustrative 29x29 pattern with the three finder squares. It is NOT a scannable code -- in a
|
|
5
|
+
// product, generate the real matrix with a QR library (e.g. `qrcode`, `qrcode-generator`) and pass it
|
|
6
|
+
// as `matrix`, or put your own <img>/<svg>/<canvas> in the `code` slot.
|
|
7
|
+
const N = 29;
|
|
8
|
+
const demoMatrix = (() => {
|
|
9
|
+
const m = Array.from({ length: N }, (_, y) => Array.from({ length: N }, (_, x) => (x * 7 + y * 13 + x * y) % 5 < 2));
|
|
10
|
+
const finder = (ox, oy) => {
|
|
11
|
+
for (let y = 0; y < 7; y++) {
|
|
12
|
+
for (let x = 0; x < 7; x++) {
|
|
13
|
+
const edge = x === 0 || y === 0 || x === 6 || y === 6;
|
|
14
|
+
const core = x >= 2 && x <= 4 && y >= 2 && y <= 4;
|
|
15
|
+
m[oy + y][ox + x] = edge || core;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
finder(0, 0);
|
|
20
|
+
finder(N - 7, 0);
|
|
21
|
+
finder(0, N - 7);
|
|
22
|
+
return m;
|
|
23
|
+
})();
|
|
24
|
+
const meta = {
|
|
25
|
+
title: 'Components/bs-qr-code',
|
|
26
|
+
parameters: { docs: { description: { component: componentDescription('bs-qr-code') } } },
|
|
27
|
+
render: args => html `
|
|
28
|
+
<bs-qr-code
|
|
29
|
+
type=${args.type}
|
|
30
|
+
size=${args.size}
|
|
31
|
+
state=${args.state}
|
|
32
|
+
heading=${args.heading}
|
|
33
|
+
description=${args.description}
|
|
34
|
+
url=${args.url}
|
|
35
|
+
amount=${args.amount}
|
|
36
|
+
expiry=${ifDefined(args.expiry || undefined)}
|
|
37
|
+
?closable=${args.closable}
|
|
38
|
+
?hide-actions=${args.hideActions}
|
|
39
|
+
.matrix=${demoMatrix}
|
|
40
|
+
@bsDownload=${() => console.log('bsDownload')}
|
|
41
|
+
@bsCopy=${(ev) => console.log('bsCopy', ev.detail)}
|
|
42
|
+
@bsRetry=${() => console.log('bsRetry')}
|
|
43
|
+
@bsRefresh=${() => console.log('bsRefresh')}
|
|
44
|
+
@bsClose=${() => console.log('bsClose')}
|
|
45
|
+
></bs-qr-code>
|
|
46
|
+
`,
|
|
47
|
+
argTypes: {
|
|
48
|
+
type: { control: 'inline-radio', options: ['default', 'payment'], description: propDescription('bs-qr-code', 'type') },
|
|
49
|
+
size: { control: 'inline-radio', options: ['sm', 'md', 'lg'], description: propDescription('bs-qr-code', 'size') },
|
|
50
|
+
state: { control: 'select', options: ['default', 'loading', 'error', 'expired', 'scanned'], description: propDescription('bs-qr-code', 'state') },
|
|
51
|
+
heading: { control: 'text', description: propDescription('bs-qr-code', 'heading') },
|
|
52
|
+
description: { control: 'text', description: propDescription('bs-qr-code', 'description') },
|
|
53
|
+
url: { control: 'text', description: propDescription('bs-qr-code', 'url') },
|
|
54
|
+
amount: { control: 'text', description: propDescription('bs-qr-code', 'amount') },
|
|
55
|
+
expiry: { control: 'text', description: propDescription('bs-qr-code', 'expiry') },
|
|
56
|
+
closable: { control: 'boolean', description: propDescription('bs-qr-code', 'closable') },
|
|
57
|
+
hideActions: { control: 'boolean', description: propDescription('bs-qr-code', 'hideActions') },
|
|
58
|
+
},
|
|
59
|
+
args: {
|
|
60
|
+
type: 'default',
|
|
61
|
+
size: 'md',
|
|
62
|
+
state: 'default',
|
|
63
|
+
heading: 'Share the order',
|
|
64
|
+
description: 'Scan to open SO-10482 on your phone',
|
|
65
|
+
url: 'egsync.no/d/SO-10482',
|
|
66
|
+
amount: '148,00 kr',
|
|
67
|
+
expiry: '',
|
|
68
|
+
closable: false,
|
|
69
|
+
hideActions: false,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
export default meta;
|
|
73
|
+
export const Default = {};
|
|
74
|
+
export const Payment = {
|
|
75
|
+
args: { type: 'payment' },
|
|
76
|
+
};
|
|
77
|
+
export const WithLogo = {
|
|
78
|
+
name: 'With logo',
|
|
79
|
+
render: args => html `
|
|
80
|
+
<bs-qr-code heading=${args.heading} description=${args.description} url=${args.url} .matrix=${demoMatrix}>
|
|
81
|
+
<div slot="logo" style="display: grid; place-items: center; width: 100%; height: 100%; border-radius: 4px; background: var(--bs-color-primary-default); color: var(--bs-text-on-action); font-weight: 600; font-size: 14px;">EG</div>
|
|
82
|
+
</bs-qr-code>
|
|
83
|
+
`,
|
|
84
|
+
};
|
|
85
|
+
export const Small = { args: { size: 'sm' } };
|
|
86
|
+
export const Large = { args: { size: 'lg' } };
|
|
87
|
+
export const Loading = { args: { state: 'loading' } };
|
|
88
|
+
export const Error = { args: { state: 'error' } };
|
|
89
|
+
export const Expired = { args: { state: 'expired', expiry: 'Expires in 04:59' } };
|
|
90
|
+
export const Scanned = { args: { state: 'scanned' } };
|
|
91
|
+
export const PaymentReceived = {
|
|
92
|
+
name: 'Payment received',
|
|
93
|
+
args: { type: 'payment', state: 'scanned' },
|
|
94
|
+
};
|
|
95
|
+
export const WithExpiry = {
|
|
96
|
+
name: 'With expiry',
|
|
97
|
+
args: { expiry: 'Expires in 04:59' },
|
|
98
|
+
};
|
|
99
|
+
export const Closable = { args: { closable: true } };
|
|
@@ -104,7 +104,7 @@ export class BsRadio {
|
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
render() {
|
|
107
|
-
return (h("label", { key: '
|
|
107
|
+
return (h("label", { key: '62ae7bf3a50e1b0b6af17208685a5c7ffe6f5e5e', class: `bs-radio ${this.disabled ? 'bs-radio--disabled' : ''}` }, h("input", { key: '01b09c6a36c9765875d34abb96772554990ce095', class: "bs-radio__input", type: "radio", name: this.name, value: this.value, checked: this.checked, disabled: this.disabled, tabIndex: this.checked || !this.groupHasChecked ? 0 : -1, onKeyDown: this.onKeyDown, onChange: this.onChange }), h("span", { key: 'd56c108212d17d617e7abadc6189fd4b86dba233', class: "bs-radio__hit-area" }, h("span", { key: '63df5b0139573c1a7cbf64cf1c2e15009aeae8e2', class: "bs-radio__state-layer" }, h("span", { key: '43c32995245eba557d41a8c9a65ba9716d4a9766', part: "circle", class: `bs-radio__circle ${this.checked ? 'bs-radio__circle--selected' : ''}` }, this.checked && h("span", { key: '6ef4edf491bcaeac94b639abf5ef497e98cb8119', part: "dot", class: "bs-radio__dot" })))), h("span", { key: '60a21c23fdca6d92cbaad1bf69bd3c3c8441d24f', part: "label", class: "bs-radio__label" }, h("slot", { key: 'a920122f7b88b07ef743735e50f9ad71042be308' }))));
|
|
108
108
|
}
|
|
109
109
|
static get is() { return "bs-radio"; }
|
|
110
110
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { render, h, describe, it, expect } from "@stencil/vitest";
|
|
2
|
+
const sr = (root) => root.shadowRoot;
|
|
3
|
+
const part = (root, p) => sr(root).querySelector(`[part~="${p}"]`);
|
|
4
|
+
const wait = (ms) => new Promise(r => setTimeout(r, ms));
|
|
5
|
+
describe('bs-session-timeout', () => {
|
|
6
|
+
it('defaults to the warning type, built on bs-card, with the warning tile', async () => {
|
|
7
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 112 }));
|
|
8
|
+
expect(root).toEqualAttribute('type', 'warning');
|
|
9
|
+
expect(part(root, 'container').tagName).toBe('BS-CARD');
|
|
10
|
+
expect(part(root, 'art').intent).toBe('warning');
|
|
11
|
+
expect(part(root, 'heading').textContent).toBe('You’ll be signed out soon');
|
|
12
|
+
});
|
|
13
|
+
it('is 440px wide by default (Figma) and a labelled region', async () => {
|
|
14
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 60 }));
|
|
15
|
+
expect(root.getBoundingClientRect().width).toBe(440);
|
|
16
|
+
const card = part(root, 'container');
|
|
17
|
+
expect(card).toEqualAttribute('role', 'region');
|
|
18
|
+
expect(card).toEqualAttribute('aria-labelledby', 'heading');
|
|
19
|
+
expect(sr(root).getElementById('heading')).not.toBeNull();
|
|
20
|
+
});
|
|
21
|
+
describe('warning', () => {
|
|
22
|
+
it('shows the time as m:ss with its unit, and a bar for the time left', async () => {
|
|
23
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 112, totalSeconds: 300 }));
|
|
24
|
+
expect(part(root, 'time').textContent).toBe('1:52');
|
|
25
|
+
expect(part(root, 'time')).toEqualAttribute('role', 'timer');
|
|
26
|
+
expect(part(root, 'countdown').textContent).toContain('minutes left');
|
|
27
|
+
const bar = sr(root).querySelector('bs-progress-linear');
|
|
28
|
+
expect(Math.round(bar.value)).toBe(37);
|
|
29
|
+
});
|
|
30
|
+
it('switches the unit under a minute, and pads seconds', async () => {
|
|
31
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 9 }));
|
|
32
|
+
expect(part(root, 'time').textContent).toBe('0:09');
|
|
33
|
+
expect(part(root, 'countdown').textContent).toContain('seconds left');
|
|
34
|
+
});
|
|
35
|
+
it('uses the starting secondsLeft as the bar total when none is given', async () => {
|
|
36
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { secondsLeft: 100 }));
|
|
37
|
+
root.secondsLeft = 25;
|
|
38
|
+
await waitForChanges();
|
|
39
|
+
expect(Math.round(sr(root).querySelector('bs-progress-linear').value)).toBe(25);
|
|
40
|
+
});
|
|
41
|
+
it('shows the saved message only when set', async () => {
|
|
42
|
+
const a = await render(h("bs-session-timeout", { secondsLeft: 60 }));
|
|
43
|
+
expect(part(a.root, 'saved')).toBeNull();
|
|
44
|
+
const b = await render(h("bs-session-timeout", { secondsLeft: 60, savedMessage: "Draft saved." }));
|
|
45
|
+
expect(part(b.root, 'saved').textContent).toContain('Draft saved.');
|
|
46
|
+
});
|
|
47
|
+
it('has Sign out now / Stay signed in, emitting bsSecondary / bsPrimary', async () => {
|
|
48
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { secondsLeft: 60 }));
|
|
49
|
+
expect(part(root, 'secondary').textContent).toBe('Sign out now');
|
|
50
|
+
expect(part(root, 'primary').textContent).toBe('Stay signed in');
|
|
51
|
+
const events = [];
|
|
52
|
+
root.addEventListener('bsPrimary', () => events.push('primary'));
|
|
53
|
+
root.addEventListener('bsSecondary', () => events.push('secondary'));
|
|
54
|
+
part(root, 'secondary').click();
|
|
55
|
+
part(root, 'primary').click();
|
|
56
|
+
await waitForChanges();
|
|
57
|
+
expect(events).toEqual(['secondary', 'primary']);
|
|
58
|
+
});
|
|
59
|
+
it('does not tick unless countdown is set', async () => {
|
|
60
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 5 }));
|
|
61
|
+
await wait(1200);
|
|
62
|
+
expect(root.secondsLeft).toBe(5);
|
|
63
|
+
});
|
|
64
|
+
it('counts down once a second when countdown is set, and emits bsExpire once at zero', async () => {
|
|
65
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { secondsLeft: 2, countdown: true }));
|
|
66
|
+
let expired = 0;
|
|
67
|
+
root.addEventListener('bsExpire', () => expired++);
|
|
68
|
+
await wait(1150);
|
|
69
|
+
await waitForChanges();
|
|
70
|
+
expect(root.secondsLeft).toBe(1);
|
|
71
|
+
expect(part(root, 'time').textContent).toBe('0:01');
|
|
72
|
+
await wait(1150);
|
|
73
|
+
await waitForChanges();
|
|
74
|
+
expect(root.secondsLeft).toBe(0);
|
|
75
|
+
expect(expired).toBe(1);
|
|
76
|
+
await wait(1200);
|
|
77
|
+
expect(expired).toBe(1);
|
|
78
|
+
});
|
|
79
|
+
it('stops counting when countdown is switched off', async () => {
|
|
80
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { secondsLeft: 10, countdown: true }));
|
|
81
|
+
root.countdown = false;
|
|
82
|
+
await waitForChanges();
|
|
83
|
+
await wait(1200);
|
|
84
|
+
expect(root.secondsLeft).toBe(10);
|
|
85
|
+
});
|
|
86
|
+
it('announces the time left only at 60, 30 and 10 seconds', async () => {
|
|
87
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { secondsLeft: 11, countdown: true }));
|
|
88
|
+
const live = () => sr(root).querySelector('[aria-live="polite"]').textContent;
|
|
89
|
+
expect(live()).toBe('');
|
|
90
|
+
await wait(1150);
|
|
91
|
+
await waitForChanges();
|
|
92
|
+
expect(live()).toBe('0:10 seconds left');
|
|
93
|
+
});
|
|
94
|
+
it('lets you hide the icon tile', async () => {
|
|
95
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 60, hideIcon: true }));
|
|
96
|
+
expect(part(root, 'art')).toBeNull();
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
describe('signed-out', () => {
|
|
100
|
+
it('shows the lock tile, the account and Sign in again / Use a different account', async () => {
|
|
101
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { type: "signed-out", accountName: "Mette Jensen", accountEmail: "mette.jensen@nordlys.no" }));
|
|
102
|
+
expect(part(root, 'heading').textContent).toBe('You’ve been signed out');
|
|
103
|
+
expect(part(root, 'account').textContent).toContain('Mette Jensen');
|
|
104
|
+
expect(part(root, 'account').textContent).toContain('mette.jensen@nordlys.no');
|
|
105
|
+
expect(part(root, 'primary').textContent).toBe('Sign in again');
|
|
106
|
+
expect(part(root, 'secondary').textContent).toBe('Use a different account');
|
|
107
|
+
expect(part(root, 'countdown')).toBeNull();
|
|
108
|
+
const events = [];
|
|
109
|
+
root.addEventListener('bsPrimary', () => events.push('primary'));
|
|
110
|
+
root.addEventListener('bsSecondary', () => events.push('secondary'));
|
|
111
|
+
part(root, 'primary').click();
|
|
112
|
+
part(root, 'secondary').click();
|
|
113
|
+
await waitForChanges();
|
|
114
|
+
expect(events).toEqual(['primary', 'secondary']);
|
|
115
|
+
});
|
|
116
|
+
it('derives the avatar initials from the name unless given', async () => {
|
|
117
|
+
const a = await render(h("bs-session-timeout", { type: "signed-out", accountName: "Mette Jensen" }));
|
|
118
|
+
expect(sr(a.root).querySelector('bs-avatar').initials).toBe('MJ');
|
|
119
|
+
const b = await render(h("bs-session-timeout", { type: "signed-out", accountName: "Mette Jensen", accountInitials: "SL" }));
|
|
120
|
+
expect(sr(b.root).querySelector('bs-avatar').initials).toBe('SL');
|
|
121
|
+
});
|
|
122
|
+
it('omits the account box when there is no account', async () => {
|
|
123
|
+
const { root } = await render(h("bs-session-timeout", { type: "signed-out" }));
|
|
124
|
+
expect(part(root, 'account')).toBeNull();
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
describe('confirm-identity', () => {
|
|
128
|
+
it('has a password field, Confirm, the alternatives and Cancel', async () => {
|
|
129
|
+
const { root } = await render(h("bs-session-timeout", { type: "confirm-identity" }));
|
|
130
|
+
expect(part(root, 'heading').textContent).toBe('Confirm it’s you');
|
|
131
|
+
const field = part(root, 'password');
|
|
132
|
+
expect(field.type).toBe('password');
|
|
133
|
+
expect(field.label).toBe('Password');
|
|
134
|
+
expect(part(root, 'primary').textContent).toBe('Confirm');
|
|
135
|
+
expect(Array.from(part(root, 'alternatives').querySelectorAll('bs-button')).map(b => b.textContent.trim())).toEqual(['Use passkey', 'Use BankID']);
|
|
136
|
+
expect(part(root, 'divider').textContent).toContain('or');
|
|
137
|
+
expect(part(root, 'cancel').textContent).toBe('Cancel');
|
|
138
|
+
});
|
|
139
|
+
it('emits bsPrimary with the typed password', async () => {
|
|
140
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { type: "confirm-identity" }));
|
|
141
|
+
let detail;
|
|
142
|
+
root.addEventListener('bsPrimary', (e) => (detail = e.detail));
|
|
143
|
+
part(root, 'password').dispatchEvent(new CustomEvent('bsInput', { detail: 'hunter2' }));
|
|
144
|
+
await waitForChanges();
|
|
145
|
+
part(root, 'primary').click();
|
|
146
|
+
await waitForChanges();
|
|
147
|
+
expect(detail).toEqual({ password: 'hunter2' });
|
|
148
|
+
});
|
|
149
|
+
it('shows a password error', async () => {
|
|
150
|
+
const { root } = await render(h("bs-session-timeout", { type: "confirm-identity", passwordError: "Wrong password" }));
|
|
151
|
+
expect(part(root, 'password').error).toBe('Wrong password');
|
|
152
|
+
});
|
|
153
|
+
it('emits bsAlternative with the method id, and bsCancel', async () => {
|
|
154
|
+
const { root, waitForChanges } = await render(h("bs-session-timeout", { type: "confirm-identity" }));
|
|
155
|
+
const events = [];
|
|
156
|
+
root.addEventListener('bsAlternative', (e) => events.push(e.detail));
|
|
157
|
+
root.addEventListener('bsCancel', () => events.push('cancel'));
|
|
158
|
+
part(root, 'alternatives').querySelectorAll('bs-button')[1].click();
|
|
159
|
+
part(root, 'cancel').click();
|
|
160
|
+
await waitForChanges();
|
|
161
|
+
expect(events).toEqual([{ id: 'bankid' }, 'cancel']);
|
|
162
|
+
});
|
|
163
|
+
it('takes custom alternatives, and none hides the divider too', async () => {
|
|
164
|
+
const a = await render(h("bs-session-timeout", { type: "confirm-identity", alternatives: [{ id: 'sms', label: 'Text me a code' }] }));
|
|
165
|
+
expect(Array.from(part(a.root, 'alternatives').querySelectorAll('bs-button')).map(b => b.textContent.trim())).toEqual(['Text me a code']);
|
|
166
|
+
const b = await render(h("bs-session-timeout", { type: "confirm-identity", alternatives: [] }));
|
|
167
|
+
expect(part(b.root, 'alternatives')).toBeNull();
|
|
168
|
+
expect(part(b.root, 'divider')).toBeNull();
|
|
169
|
+
});
|
|
170
|
+
it('matches the Figma details: 16px semibold label, 16px gap to Confirm, 48px text buttons', async () => {
|
|
171
|
+
const { root } = await render(h("bs-session-timeout", { type: "confirm-identity" }));
|
|
172
|
+
await wait(200);
|
|
173
|
+
const field = part(root, 'password');
|
|
174
|
+
const label = getComputedStyle(field.shadowRoot.querySelector('.bs-input__label'));
|
|
175
|
+
expect(label.fontSize).toBe('16px');
|
|
176
|
+
expect(label.fontWeight).toBe('600');
|
|
177
|
+
const gap = part(root, 'primary').getBoundingClientRect().top - field.getBoundingClientRect().bottom;
|
|
178
|
+
expect(Math.round(gap)).toBe(16);
|
|
179
|
+
expect(part(root, 'cancel').getBoundingClientRect().height).toBe(48);
|
|
180
|
+
expect(part(root, 'primary').getBoundingClientRect().width).toBe(part(root, 'container').getBoundingClientRect().width - 32);
|
|
181
|
+
});
|
|
182
|
+
it('can hide Cancel', async () => {
|
|
183
|
+
const { root } = await render(h("bs-session-timeout", { type: "confirm-identity", cancelLabel: "" }));
|
|
184
|
+
expect(part(root, 'cancel')).toBeNull();
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
it('renders the heading at the requested level, clamped to 1-6', async () => {
|
|
188
|
+
const tags = [];
|
|
189
|
+
for (const level of [1, 2, 3, 9]) {
|
|
190
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 60, headingLevel: level }));
|
|
191
|
+
tags.push(part(root, 'heading').tagName);
|
|
192
|
+
}
|
|
193
|
+
expect(tags).toEqual(['H1', 'H2', 'H3', 'H6']);
|
|
194
|
+
});
|
|
195
|
+
it('lets props override the copy', async () => {
|
|
196
|
+
const { root } = await render(h("bs-session-timeout", { secondsLeft: 60, heading: "Heads up", description: "Custom.", primaryLabel: "Keep going", secondaryLabel: "" }));
|
|
197
|
+
expect(part(root, 'heading').textContent).toBe('Heads up');
|
|
198
|
+
expect(part(root, 'description').textContent).toBe('Custom.');
|
|
199
|
+
expect(part(root, 'primary').textContent).toBe('Keep going');
|
|
200
|
+
expect(part(root, 'secondary')).toBeNull();
|
|
201
|
+
});
|
|
202
|
+
});
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --bs-session-timeout-width: Card width. 440px (Figma); never narrower than the min or wider than the max below.
|
|
3
|
+
* @prop --bs-session-timeout-min-width: Minimum card width. 380px (Figma).
|
|
4
|
+
* @prop --bs-session-timeout-max-width: Maximum card width. 560px (Figma).
|
|
5
|
+
* @prop --bs-session-timeout-bg: Card background. Aliased to --bs-paper-bg-base (the `bs-card` base surface).
|
|
6
|
+
* @prop --bs-session-timeout-radius: Card corner radius. Aliased to --bs-border-radius-150 (12px).
|
|
7
|
+
* @prop --bs-session-timeout-padding: Card padding. Aliased to --bs-spacing-200 (16px).
|
|
8
|
+
* @prop --bs-session-timeout-gap: Gap between the card's rows. Aliased to --bs-spacing-150 (12px).
|
|
9
|
+
* @prop --bs-session-timeout-shadow: Card shadow. 0 8px 8px --bs-elevation-higher (Figma).
|
|
10
|
+
* @prop --bs-session-timeout-color: Heading and value colour. Aliased to --bs-text-default.
|
|
11
|
+
* @prop --bs-session-timeout-color-secondary: Paragraph, unit and note colour. Aliased to --bs-text-secondary.
|
|
12
|
+
* @prop --bs-session-timeout-countdown-bg: Background of the countdown box. Aliased to --bs-surface-container.
|
|
13
|
+
* @prop --bs-session-timeout-countdown-fill: Colour of the draining bar. Aliased to --bs-color-warning-default.
|
|
14
|
+
* @prop --bs-session-timeout-countdown-track: Track behind the bar. Aliased to --bs-surface-hover.
|
|
15
|
+
* @prop --bs-session-timeout-rule: Colour of the divider lines and the account box border. Aliased to --bs-border-default.
|
|
16
|
+
*/
|
|
17
|
+
:host {
|
|
18
|
+
display: block;
|
|
19
|
+
width: var(--bs-session-timeout-width);
|
|
20
|
+
min-width: var(--bs-session-timeout-min-width);
|
|
21
|
+
max-width: var(--bs-session-timeout-max-width);
|
|
22
|
+
|
|
23
|
+
--bs-session-timeout-width: 440px;
|
|
24
|
+
--bs-session-timeout-min-width: 380px;
|
|
25
|
+
--bs-session-timeout-max-width: 560px;
|
|
26
|
+
--bs-session-timeout-bg: var(--bs-paper-bg-base);
|
|
27
|
+
--bs-session-timeout-radius: var(--bs-border-radius-150);
|
|
28
|
+
--bs-session-timeout-padding: var(--bs-spacing-200);
|
|
29
|
+
--bs-session-timeout-gap: var(--bs-spacing-150);
|
|
30
|
+
--bs-session-timeout-shadow: 0 8px 8px var(--bs-elevation-higher);
|
|
31
|
+
--bs-session-timeout-color: var(--bs-text-default);
|
|
32
|
+
--bs-session-timeout-color-secondary: var(--bs-text-secondary);
|
|
33
|
+
--bs-session-timeout-countdown-bg: var(--bs-surface-container);
|
|
34
|
+
--bs-session-timeout-countdown-fill: var(--bs-color-warning-default);
|
|
35
|
+
--bs-session-timeout-countdown-track: var(--bs-surface-hover);
|
|
36
|
+
--bs-session-timeout-rule: var(--bs-border-default);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* bs-card supplies the surface; this only sets how it looks here. */
|
|
40
|
+
.bs-session-timeout {
|
|
41
|
+
--bs-card-bg: var(--bs-session-timeout-bg);
|
|
42
|
+
--bs-card-radius: var(--bs-session-timeout-radius);
|
|
43
|
+
--bs-card-padding: var(--bs-session-timeout-padding);
|
|
44
|
+
--bs-card-shadow: var(--bs-session-timeout-shadow);
|
|
45
|
+
color: var(--bs-session-timeout-color);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bs-session-timeout__body {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
align-items: stretch;
|
|
52
|
+
gap: var(--bs-session-timeout-gap);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
bs-icon-tile {
|
|
56
|
+
align-self: flex-start;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.bs-session-timeout__glyph,
|
|
60
|
+
::slotted([slot='icon']) {
|
|
61
|
+
width: 24px;
|
|
62
|
+
height: 24px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.bs-session-timeout__heading-group {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
gap: 6px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.bs-session-timeout__heading {
|
|
72
|
+
margin: 0;
|
|
73
|
+
font-size: var(--bs-font-size-2xl);
|
|
74
|
+
font-weight: var(--bs-font-weight-bold);
|
|
75
|
+
line-height: 32px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.bs-session-timeout__description {
|
|
79
|
+
margin: 0;
|
|
80
|
+
color: var(--bs-session-timeout-color-secondary);
|
|
81
|
+
font-size: var(--bs-font-size-md);
|
|
82
|
+
line-height: 24px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* --- warning -------------------------------------------------------------------------------- */
|
|
86
|
+
.bs-session-timeout__countdown {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
gap: var(--bs-spacing-100);
|
|
90
|
+
padding: var(--bs-spacing-200);
|
|
91
|
+
border-radius: var(--bs-border-radius-100);
|
|
92
|
+
background: var(--bs-session-timeout-countdown-bg);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Set on the bar itself: bs-progress-linear declares its own defaults on :host, which beat anything
|
|
96
|
+
merely inherited from an ancestor. */
|
|
97
|
+
.bs-session-timeout__countdown bs-progress-linear {
|
|
98
|
+
--bs-progress-linear-fill: var(--bs-session-timeout-countdown-fill);
|
|
99
|
+
--bs-progress-linear-track: var(--bs-session-timeout-countdown-track);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.bs-session-timeout__time-row {
|
|
103
|
+
display: flex;
|
|
104
|
+
align-items: flex-end;
|
|
105
|
+
gap: var(--bs-spacing-100);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.bs-session-timeout__time {
|
|
109
|
+
font-size: var(--bs-font-size-3xl);
|
|
110
|
+
font-weight: var(--bs-font-weight-bold);
|
|
111
|
+
line-height: 40px;
|
|
112
|
+
font-variant-numeric: tabular-nums;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.bs-session-timeout__unit {
|
|
116
|
+
padding-bottom: 6px;
|
|
117
|
+
color: var(--bs-session-timeout-color-secondary);
|
|
118
|
+
font-size: var(--bs-font-size-sm);
|
|
119
|
+
line-height: 20px;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.bs-session-timeout__saved {
|
|
123
|
+
display: flex;
|
|
124
|
+
align-items: center;
|
|
125
|
+
gap: var(--bs-spacing-100);
|
|
126
|
+
margin: 0;
|
|
127
|
+
color: var(--bs-session-timeout-color-secondary);
|
|
128
|
+
font-size: var(--bs-font-size-sm);
|
|
129
|
+
line-height: 20px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.bs-session-timeout__saved-icon {
|
|
133
|
+
flex: none;
|
|
134
|
+
width: 16px;
|
|
135
|
+
height: 16px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.bs-session-timeout__actions {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
justify-content: flex-end;
|
|
142
|
+
gap: var(--bs-spacing-100);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.bs-session-timeout__actions bs-button,
|
|
146
|
+
.bs-session-timeout__alternatives bs-button,
|
|
147
|
+
.bs-session-timeout__block-button {
|
|
148
|
+
--bs-button-height-md: var(--bs-spacing-550);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* --- signed-out ----------------------------------------------------------------------------- */
|
|
152
|
+
.bs-session-timeout__account {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
gap: var(--bs-spacing-200);
|
|
156
|
+
padding: var(--bs-spacing-150) var(--bs-spacing-200);
|
|
157
|
+
border: 1px solid var(--bs-session-timeout-rule);
|
|
158
|
+
border-radius: var(--bs-border-radius-100);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.bs-session-timeout__account-text {
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
gap: var(--bs-spacing-25);
|
|
165
|
+
min-width: 0;
|
|
166
|
+
line-height: 24px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.bs-session-timeout__account-name {
|
|
170
|
+
font-weight: var(--bs-font-weight-semibold);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.bs-session-timeout__account-email {
|
|
174
|
+
overflow-wrap: anywhere;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.bs-session-timeout__actions--stacked {
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
align-items: stretch;
|
|
180
|
+
justify-content: flex-start;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.bs-session-timeout__block-button,
|
|
184
|
+
.bs-session-timeout__alternatives bs-button,
|
|
185
|
+
.bs-session-timeout__actions--stacked bs-button {
|
|
186
|
+
--bs-button-width: 100%;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* The Figma's "text" buttons (Use a different account, Cancel) are blue. */
|
|
190
|
+
.bs-session-timeout__text-button {
|
|
191
|
+
--bs-button-subtle-color: var(--bs-text-action);
|
|
192
|
+
/* Figma: the text buttons are 48px high (bs-button's lg is 56px). */
|
|
193
|
+
--bs-button-height-lg: var(--bs-spacing-600);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* --- confirm-identity ----------------------------------------------------------------------- */
|
|
197
|
+
/* Figma: 16px between the password field and Confirm (the card's rows are 12px apart), and the label is
|
|
198
|
+
16px semibold with a 24px line (bs-input's own default is 14px medium). */
|
|
199
|
+
.bs-session-timeout__password {
|
|
200
|
+
display: block;
|
|
201
|
+
--bs-input-label-font-size: var(--bs-font-size-md);
|
|
202
|
+
--bs-input-label-font-weight: var(--bs-font-weight-semibold);
|
|
203
|
+
--bs-input-label-line-height: calc(var(--bs-line-height-body-md) * 1px);
|
|
204
|
+
margin-bottom: calc(var(--bs-spacing-200) - var(--bs-session-timeout-gap));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.bs-session-timeout__divider {
|
|
208
|
+
display: flex;
|
|
209
|
+
align-items: center;
|
|
210
|
+
gap: var(--bs-spacing-100);
|
|
211
|
+
align-self: center;
|
|
212
|
+
width: 320px;
|
|
213
|
+
max-width: 100%;
|
|
214
|
+
color: var(--bs-session-timeout-color-secondary);
|
|
215
|
+
font-size: var(--bs-font-size-xs);
|
|
216
|
+
line-height: 16px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.bs-session-timeout__rule {
|
|
220
|
+
flex: 1 1 0;
|
|
221
|
+
height: 1px;
|
|
222
|
+
background: var(--bs-session-timeout-rule);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.bs-session-timeout__alternatives {
|
|
226
|
+
display: grid;
|
|
227
|
+
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
|
|
228
|
+
gap: var(--bs-spacing-100);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.bs-session-timeout__sr-only {
|
|
232
|
+
position: absolute;
|
|
233
|
+
width: 1px;
|
|
234
|
+
height: 1px;
|
|
235
|
+
margin: -1px;
|
|
236
|
+
overflow: hidden;
|
|
237
|
+
clip-path: inset(50%);
|
|
238
|
+
white-space: nowrap;
|
|
239
|
+
}
|