@sbb-esta/lyne-elements 3.7.0 → 3.9.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/alert/alert/alert.component.d.ts +2 -0
- package/alert/alert/alert.component.d.ts.map +1 -1
- package/alert/alert/alert.component.js +44 -39
- package/autocomplete/autocomplete-base-element.js +20 -20
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +14 -14
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +9 -9
- package/badge.css +2 -2
- package/breadcrumb/breadcrumb/breadcrumb.component.js +12 -12
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +15 -15
- package/button/common.js +1 -1
- package/button/mini-button/mini-button.component.js +7 -7
- package/button/mini-button-group/mini-button-group.component.js +21 -21
- package/button.js +1 -1
- package/calendar/calendar.component.js +36 -36
- package/card/card/card.component.js +10 -10
- package/card/card-badge/card-badge.component.js +15 -15
- package/carousel/carousel/carousel.component.d.ts +1 -0
- package/carousel/carousel/carousel.component.d.ts.map +1 -1
- package/carousel/carousel/carousel.component.js +37 -33
- package/carousel/carousel-list/carousel-list.component.d.ts +2 -2
- package/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/carousel/carousel-list/carousel-list.component.js +32 -29
- package/checkbox/common.js +1 -1
- package/checkbox-common-gjHkSAmN.js +5 -0
- package/checkbox.js +1 -1
- package/chip/chip/chip.component.js +23 -23
- package/chip-label/chip-label.component.js +22 -22
- package/clock/clock.component.js +29 -29
- package/container/container/container.component.js +21 -21
- package/container/sticky-bar/sticky-bar.component.js +13 -13
- package/core/base-elements/open-close-base-element.d.ts +2 -0
- package/core/base-elements/open-close-base-element.d.ts.map +1 -1
- package/core/base-elements/open-close-base-element.js +4 -0
- package/core/config/config.d.ts +6 -0
- package/core/config/config.d.ts.map +1 -1
- package/core/controllers/escapable-overlay-controller.js +3 -3
- package/core/controllers/inert-controller.d.ts +8 -1
- package/core/controllers/inert-controller.d.ts.map +1 -1
- package/core/controllers/inert-controller.js +25 -13
- package/core/controllers/media-matchers-controller.d.ts +29 -0
- package/core/controllers/media-matchers-controller.d.ts.map +1 -1
- package/core/controllers/media-matchers-controller.js +73 -23
- package/core/controllers.js +16 -14
- package/core/dom/contains-pierce-shadow-dom.d.ts +3 -0
- package/core/dom/contains-pierce-shadow-dom.d.ts.map +1 -0
- package/core/dom/contains-pierce-shadow-dom.js +12 -0
- package/core/dom/queue-dom-content-loaded.d.ts +5 -0
- package/core/dom/queue-dom-content-loaded.d.ts.map +1 -0
- package/core/dom/queue-dom-content-loaded.js +7 -0
- package/core/dom/set-or-remove-attribute.d.ts +14 -0
- package/core/dom/set-or-remove-attribute.d.ts.map +1 -1
- package/core/dom/set-or-remove-attribute.js +11 -3
- package/core/dom.d.ts +2 -0
- package/core/dom.d.ts.map +1 -1
- package/core/dom.js +28 -22
- package/core/images.d.ts +4 -0
- package/core/images.d.ts.map +1 -1
- package/core/images.js +12 -12
- package/core/mixins.js +10 -10
- package/core/overlay/overlay-outside-pointer-event-listener.d.ts +26 -0
- package/core/overlay/overlay-outside-pointer-event-listener.d.ts.map +1 -0
- package/core/overlay/overlay-outside-pointer-event-listener.js +37 -0
- package/core/overlay/position.d.ts +20 -0
- package/core/overlay/position.d.ts.map +1 -1
- package/core/overlay/position.js +34 -23
- package/core/overlay.d.ts +1 -0
- package/core/overlay.d.ts.map +1 -1
- package/core/overlay.js +15 -11
- package/core/styles/core.scss +46 -12
- package/core/styles/mixins/badge.scss +2 -2
- package/core/styles/mixins/buttons.scss +14 -14
- package/core/styles/mixins/card.scss +9 -6
- package/core/styles/mixins/chip.scss +8 -8
- package/core/styles/mixins/image.scss +3 -0
- package/core/styles/mixins/link.scss +12 -7
- package/core/styles/mixins/lists.scss +6 -4
- package/core/styles/mixins/overlay.scss +6 -3
- package/core/styles/mixins/panel.scss +3 -3
- package/core/styles/mixins/pearl-chain-bullet.scss +9 -5
- package/core/styles/mixins/scrollbar.scss +12 -6
- package/core/styles/mixins/shadows.scss +32 -64
- package/core/styles/mixins/table.scss +13 -10
- package/core/styles/mixins/timetable-form.scss +3 -3
- package/core/styles/mixins/typo.scss +4 -4
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +49 -1
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +203 -5
- package/core/styles/off-brand-theme.scss +3 -0
- package/core/styles/safety-theme.scss +3 -0
- package/core/styles/standard-theme.scss +3 -14
- package/core/styles/theme.scss +18 -0
- package/core.css +259 -21
- package/custom-elements.json +2117 -366
- package/date-input/date-input.component.js +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +4 -4
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +6 -6
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +7 -7
- package/development/alert/alert/alert.component.d.ts +2 -0
- package/development/alert/alert/alert.component.d.ts.map +1 -1
- package/development/alert/alert/alert.component.js +22 -8
- package/development/autocomplete/autocomplete-base-element.js +23 -11
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +15 -14
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +5 -4
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +19 -11
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +4 -1
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +16 -8
- package/development/button/common.js +1 -1
- package/development/button/mini-button/mini-button.component.js +15 -14
- package/development/button/mini-button-group/mini-button-group.component.js +4 -4
- package/development/button.js +1 -1
- package/development/calendar/calendar.component.js +21 -11
- package/development/card/card/card.component.js +11 -6
- package/development/card/card-badge/card-badge.component.js +10 -9
- package/development/carousel/carousel/carousel.component.d.ts +1 -0
- package/development/carousel/carousel/carousel.component.d.ts.map +1 -1
- package/development/carousel/carousel/carousel.component.js +14 -4
- package/development/carousel/carousel-list/carousel-list.component.d.ts +2 -2
- package/development/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/development/carousel/carousel-list/carousel-list.component.js +29 -21
- package/development/checkbox/common.js +1 -1
- package/development/{checkbox-common-aMPOsPVA.js → checkbox-common-Dy_ofVhp.js} +4 -3
- package/development/checkbox.js +1 -1
- package/development/chip/chip/chip.component.js +15 -14
- package/development/chip-label/chip-label.component.js +12 -15
- package/development/clock/clock.component.js +11 -3
- package/development/container/container/container.component.js +6 -6
- package/development/container/sticky-bar/sticky-bar.component.js +6 -6
- package/development/core/base-elements/open-close-base-element.d.ts +2 -0
- package/development/core/base-elements/open-close-base-element.d.ts.map +1 -1
- package/development/core/base-elements/open-close-base-element.js +5 -1
- package/development/core/config/config.d.ts +6 -0
- package/development/core/config/config.d.ts.map +1 -1
- package/development/core/config/config.js +1 -1
- package/development/core/controllers/escapable-overlay-controller.js +2 -2
- package/development/core/controllers/inert-controller.d.ts +8 -1
- package/development/core/controllers/inert-controller.d.ts.map +1 -1
- package/development/core/controllers/inert-controller.js +49 -30
- package/development/core/controllers/media-matchers-controller.d.ts +29 -0
- package/development/core/controllers/media-matchers-controller.d.ts.map +1 -1
- package/development/core/controllers/media-matchers-controller.js +74 -1
- package/development/core/controllers.js +3 -1
- package/development/core/dom/contains-pierce-shadow-dom.d.ts +3 -0
- package/development/core/dom/contains-pierce-shadow-dom.d.ts.map +1 -0
- package/development/core/dom/contains-pierce-shadow-dom.js +14 -0
- package/development/core/dom/queue-dom-content-loaded.d.ts +5 -0
- package/development/core/dom/queue-dom-content-loaded.d.ts.map +1 -0
- package/development/core/dom/queue-dom-content-loaded.js +12 -0
- package/development/core/dom/set-or-remove-attribute.d.ts +14 -0
- package/development/core/dom/set-or-remove-attribute.d.ts.map +1 -1
- package/development/core/dom/set-or-remove-attribute.js +9 -1
- package/development/core/dom.d.ts +2 -0
- package/development/core/dom.d.ts.map +1 -1
- package/development/core/dom.js +8 -2
- package/development/core/images.d.ts +4 -0
- package/development/core/images.d.ts.map +1 -1
- package/development/core/images.js +11 -11
- package/development/core/mixins.js +7 -6
- package/development/core/overlay/overlay-outside-pointer-event-listener.d.ts +26 -0
- package/development/core/overlay/overlay-outside-pointer-event-listener.d.ts.map +1 -0
- package/development/core/overlay/overlay-outside-pointer-event-listener.js +61 -0
- package/development/core/overlay/position.d.ts +20 -0
- package/development/core/overlay/position.d.ts.map +1 -1
- package/development/core/overlay/position.js +41 -1
- package/development/core/overlay.d.ts +1 -0
- package/development/core/overlay.d.ts.map +1 -1
- package/development/core/overlay.js +6 -2
- package/development/date-input/date-input.component.js +2 -2
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.js +15 -14
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +15 -14
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.js +15 -14
- package/development/dialog/dialog/dialog.component.d.ts +1 -0
- package/development/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/development/dialog/dialog/dialog.component.js +28 -14
- package/development/dialog/dialog-actions/dialog-actions.component.js +1 -1
- package/development/dialog/dialog-title/dialog-title.component.js +1 -1
- package/development/divider/divider.component.js +2 -2
- package/development/expansion-panel/expansion-panel/expansion-panel.component.js +6 -6
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +6 -2
- package/development/file-selector/common.js +1 -1
- package/development/{file-selector-common-CRnQigIZ.js → file-selector-common-CRNAWFM_.js} +8 -5
- package/development/file-selector.js +1 -1
- package/development/flip-card/flip-card/flip-card.component.js +8 -3
- package/development/footer/footer.component.js +5 -4
- package/development/form-error/form-error.component.js +2 -2
- package/development/form-field/form-field/form-field.component.js +36 -22
- package/development/form-field/form-field-clear/form-field-clear.component.js +15 -14
- package/development/header/common/header-action-common.js +4 -4
- package/development/header/header/header.component.js +2 -2
- package/development/header/header-environment/header-environment.component.js +1 -1
- package/development/{icon-sidebar-button-common-CA_8TnFu.js → icon-sidebar-button-common-BGrKtvyM.js} +3 -2
- package/development/journey-header/journey-header.component.js +1 -1
- package/development/lead-container/lead-container.component.js +4 -2
- package/development/link/common/block-link-common.js +17 -5
- package/development/link/common/inline-link-common.js +9 -3
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +11 -9
- package/development/loading-indicator/loading-indicator.component.js +1 -1
- package/development/loading-indicator-circle/loading-indicator-circle.component.js +2 -2
- package/development/logo/logo.component.js +3 -2
- package/development/map-container/map-container.component.js +14 -6
- package/development/menu/common/menu-action-common.d.ts.map +1 -1
- package/development/menu/common/menu-action-common.js +23 -5
- package/development/menu/menu/menu.component.d.ts +23 -10
- package/development/menu/menu/menu.component.d.ts.map +1 -1
- package/development/menu/menu/menu.component.js +237 -72
- package/development/message/message.component.js +3 -1
- package/development/navigation/common/navigation-action-common.js +4 -4
- package/development/navigation/navigation/navigation.component.js +21 -19
- package/development/navigation/navigation-list/navigation-list.component.js +1 -1
- package/development/navigation/navigation-marker/navigation-marker.component.js +1 -1
- package/development/navigation/navigation-section/navigation-section.component.js +3 -3
- package/development/notification/notification.component.js +38 -18
- package/development/option/optgroup/optgroup-base-element.js +3 -2
- package/development/option/option/option.component.js +16 -12
- package/development/option/option-hint/option-hint.component.js +3 -2
- package/development/overlay/overlay.component.d.ts.map +1 -1
- package/development/overlay/overlay.component.js +28 -22
- package/development/paginator/compact-paginator/compact-paginator.component.js +3 -2
- package/development/paginator/paginator/paginator.component.js +18 -17
- package/development/popover/popover/popover.component.js +8 -6
- package/development/popover/popover-trigger/popover-trigger.component.js +20 -17
- package/development/radio-button/common.js +1 -1
- package/development/radio-button/radio-button/radio-button.component.js +3 -3
- package/development/radio-button/radio-button-panel/radio-button-panel.component.js +3 -3
- package/development/{radio-button-common-454JtP9b.js → radio-button-common-CgM3kQSW.js} +9 -8
- package/development/radio-button.js +1 -1
- package/development/sbb-tokens-CVLcOi-S.js +1 -1
- package/development/select/select.component.js +31 -13
- package/development/selection-action-panel/selection-action-panel.component.js +9 -5
- package/development/selection-expansion-panel/selection-expansion-panel.component.js +10 -6
- package/development/sidebar/common.js +1 -1
- package/development/sidebar/icon-sidebar/icon-sidebar.component.js +2 -2
- package/development/sidebar/sidebar/sidebar.component.js +14 -6
- package/development/sidebar.js +1 -1
- package/development/signet/signet.component.js +2 -2
- package/development/skiplink-list/skiplink-list.component.d.ts +3 -1
- package/development/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/development/skiplink-list/skiplink-list.component.js +26 -9
- package/development/slider/slider.component.js +15 -9
- package/development/status/status.component.js +7 -7
- package/development/stepper/step/step.component.js +1 -3
- package/development/stepper/step-label/step-label.component.js +7 -6
- package/development/stepper/stepper/stepper.component.js +5 -5
- package/development/tabs/tab/tab.component.d.ts +10 -4
- package/development/tabs/tab/tab.component.d.ts.map +1 -1
- package/development/tabs/tab/tab.component.js +15 -16
- package/development/tabs/tab-group/tab-group.component.d.ts +15 -14
- package/development/tabs/tab-group/tab-group.component.d.ts.map +1 -1
- package/development/tabs/tab-group/tab-group.component.js +46 -175
- package/development/tabs/tab-label/tab-label.component.d.ts +21 -2
- package/development/tabs/tab-label/tab-label.component.d.ts.map +1 -1
- package/development/tabs/tab-label/tab-label.component.js +97 -19
- package/development/tag/tag/tag.component.js +15 -9
- package/development/teaser/teaser.component.js +3 -2
- package/development/teaser-hero/teaser-hero.component.js +3 -3
- package/development/teaser-product/common.js +1 -1
- package/development/{teaser-product-common-D6fa6x3w.js → teaser-product-common-DvlBRkE_.js} +14 -6
- package/development/teaser-product.js +1 -1
- package/development/time-input/time-input.component.js +2 -2
- package/development/timetable-form/timetable-form/timetable-form.component.js +1 -1
- package/development/timetable-form/timetable-form-details/timetable-form-details.component.js +1 -1
- package/development/timetable-form/timetable-form-field/timetable-form-field.component.js +3 -3
- package/development/timetable-occupancy/timetable-occupancy.component.js +2 -2
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts +1 -0
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.js +4 -3
- package/development/title/title-base.js +2 -5
- package/development/title/title.component.js +1 -1
- package/development/toast/toast.component.d.ts +3 -1
- package/development/toast/toast.component.d.ts.map +1 -1
- package/development/toast/toast.component.js +31 -15
- package/development/toggle/toggle/toggle.component.js +8 -4
- package/development/toggle/toggle-option/toggle-option.component.js +5 -3
- package/development/toggle-check/toggle-check.component.js +13 -14
- package/development/tooltip/tooltip.component.d.ts +89 -0
- package/development/tooltip/tooltip.component.d.ts.map +1 -0
- package/development/tooltip/tooltip.component.js +473 -0
- package/development/tooltip.d.ts +5 -0
- package/development/tooltip.d.ts.map +1 -0
- package/development/tooltip.js +5 -0
- package/development/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/development/train/train-formation/train-formation.component.js +16 -4
- package/development/train/train-wagon/train-wagon.component.js +3 -12
- package/development/{transparent-button-COe-YB_U.js → transparent-button-DdSaBp_-.js} +141 -86
- package/development/visual-checkbox/visual-checkbox.component.js +12 -12
- package/dialog/dialog/dialog.component.d.ts +1 -0
- package/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/dialog/dialog/dialog.component.js +37 -36
- package/dialog/dialog-actions/dialog-actions.component.js +6 -6
- package/dialog/dialog-title/dialog-title.component.js +4 -4
- package/divider/divider.component.js +16 -16
- package/expansion-panel/expansion-panel/expansion-panel.component.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +3 -3
- package/file-selector/common.js +1 -1
- package/file-selector-common-D88J9PEh.js +5 -0
- package/file-selector.js +1 -1
- package/flip-card/flip-card/flip-card.component.js +14 -14
- package/footer/footer.component.js +18 -18
- package/form-error/form-error.component.js +4 -4
- package/form-field/form-field/form-field.component.js +1 -1
- package/form-field/form-field-clear/form-field-clear.component.js +9 -9
- package/header/common/header-action-common.js +1 -1
- package/header/header/header.component.js +19 -19
- package/header/header-environment/header-environment.component.js +1 -1
- package/icon-sidebar-button-common-BeRXvifI.js +7 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/journey-header/journey-header.component.js +1 -1
- package/lead-container/lead-container.component.js +5 -5
- package/link/common/block-link-common.js +23 -23
- package/link/common/inline-link-common.js +7 -7
- package/link-list/link-list-anchor/link-list-anchor.component.js +11 -11
- package/lists.css +5 -3
- package/loading-indicator/loading-indicator.component.js +1 -1
- package/loading-indicator-circle/loading-indicator-circle.component.js +13 -13
- package/logo/logo.component.js +9 -9
- package/map-container/map-container.component.js +15 -15
- package/menu/common/menu-action-common.d.ts.map +1 -1
- package/menu/common/menu-action-common.js +15 -12
- package/menu/menu/menu.component.d.ts +23 -10
- package/menu/menu/menu.component.d.ts.map +1 -1
- package/menu/menu/menu.component.js +156 -85
- package/message/message.component.js +9 -9
- package/navigation/common/navigation-action-common.js +6 -6
- package/navigation/navigation/navigation.component.js +19 -19
- package/navigation/navigation-list/navigation-list.component.js +1 -1
- package/navigation/navigation-marker/navigation-marker.component.js +1 -1
- package/navigation/navigation-section/navigation-section.component.js +1 -1
- package/notification/notification.component.js +8 -8
- package/off-brand-theme.css +3023 -0
- package/option/optgroup/optgroup-base-element.js +1 -1
- package/option/option/option.component.js +3 -3
- package/option/option-hint/option-hint.component.js +8 -8
- package/overlay/overlay.component.d.ts.map +1 -1
- package/overlay/overlay.component.js +47 -48
- package/package.json +14 -1
- package/paginator/compact-paginator/compact-paginator.component.js +4 -4
- package/paginator/paginator/paginator.component.js +10 -10
- package/popover/popover/popover.component.js +9 -9
- package/popover/popover-trigger/popover-trigger.component.js +5 -5
- package/radio-button/common.js +1 -1
- package/radio-button/radio-button/radio-button.component.js +13 -13
- package/radio-button/radio-button-panel/radio-button-panel.component.js +2 -2
- package/radio-button-common-Nm9ULjVb.js +5 -0
- package/radio-button.js +1 -1
- package/safety-theme.css +3023 -0
- package/scrollbar.css +52 -20
- package/select/select.component.js +45 -45
- package/selection-action-panel/selection-action-panel.component.js +6 -6
- package/selection-expansion-panel/selection-expansion-panel.component.js +11 -11
- package/sidebar/common.js +1 -1
- package/sidebar/icon-sidebar/icon-sidebar.component.js +12 -12
- package/sidebar/sidebar/sidebar.component.js +29 -29
- package/sidebar.js +1 -1
- package/signet/signet.component.js +1 -1
- package/skiplink-list/skiplink-list.component.d.ts +3 -1
- package/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/skiplink-list/skiplink-list.component.js +37 -30
- package/slider/slider.component.js +16 -16
- package/standard-theme.css +340 -58
- package/status/status.component.js +13 -13
- package/stepper/step/step.component.js +5 -5
- package/stepper/step-label/step-label.component.js +1 -1
- package/stepper/stepper/stepper.component.js +7 -7
- package/table.css +15 -9
- package/tabs/tab/tab.component.d.ts +10 -4
- package/tabs/tab/tab.component.d.ts.map +1 -1
- package/tabs/tab/tab.component.js +22 -24
- package/tabs/tab-group/tab-group.component.d.ts +15 -14
- package/tabs/tab-group/tab-group.component.d.ts.map +1 -1
- package/tabs/tab-group/tab-group.component.js +68 -122
- package/tabs/tab-label/tab-label.component.d.ts +21 -2
- package/tabs/tab-label/tab-label.component.d.ts.map +1 -1
- package/tabs/tab-label/tab-label.component.js +88 -46
- package/tag/tag/tag.component.js +14 -14
- package/teaser/teaser.component.js +1 -1
- package/teaser-hero/teaser-hero.component.js +12 -12
- package/teaser-product/common.js +1 -1
- package/teaser-product-common-DIra6aVg.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +1 -1
- package/timetable-form/timetable-form/timetable-form.component.js +6 -6
- package/timetable-form/timetable-form-details/timetable-form-details.component.js +4 -4
- package/timetable-form/timetable-form-field/timetable-form-field.component.js +5 -5
- package/timetable-form.css +3 -3
- package/timetable-occupancy/timetable-occupancy.component.js +7 -7
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts +1 -0
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +23 -23
- package/title/title-base.js +1 -1
- package/title/title.component.js +1 -1
- package/toast/toast.component.d.ts +3 -1
- package/toast/toast.component.d.ts.map +1 -1
- package/toast/toast.component.js +67 -59
- package/toggle/toggle/toggle.component.js +1 -1
- package/toggle/toggle-option/toggle-option.component.js +5 -5
- package/toggle-check/toggle-check.component.js +16 -16
- package/tooltip/tooltip.component.d.ts +89 -0
- package/tooltip/tooltip.component.d.ts.map +1 -0
- package/tooltip/tooltip.component.js +220 -0
- package/tooltip.d.ts +5 -0
- package/tooltip.d.ts.map +1 -0
- package/tooltip.js +4 -0
- package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/train/train-formation/train-formation.component.js +16 -16
- package/train/train-wagon/train-wagon.component.js +1 -1
- package/transparent-button-Bg9fU_iZ.js +9 -0
- package/typography.css +1 -0
- package/visual-checkbox/visual-checkbox.component.js +14 -14
- package/checkbox-common-CDzcyq8p.js +0 -5
- package/file-selector-common-OHK9hu3a.js +0 -5
- package/icon-sidebar-button-common-CM-ueEhH.js +0 -7
- package/radio-button-common-CUppr5FI.js +0 -5
- package/teaser-product-common-C8oSkIxy.js +0 -5
- package/transparent-button-xudJxob_.js +0 -9
package/clock/clock.component.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
var M = (s) => {
|
|
2
2
|
throw TypeError(s);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __runInitializers as
|
|
7
|
-
import { css as E, LitElement as A, isServer as
|
|
4
|
+
var g = (s, n, e) => n.has(s) || M("Cannot " + e);
|
|
5
|
+
var p = (s, n, e) => (g(s, n, "read from private field"), e ? e.call(s) : n.get(s)), H = (s, n, e) => n.has(s) ? M("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(s) : n.set(s, e), h = (s, n, e, a) => (g(s, n, "write to private field"), a ? a.call(s, e) : n.set(s, e), e);
|
|
6
|
+
import { __runInitializers as _, __esDecorate as f } from "tslib";
|
|
7
|
+
import { css as E, LitElement as A, isServer as y, html as O } from "lit";
|
|
8
8
|
import { customElement as T, property as I } from "lit/decorators.js";
|
|
9
|
-
import { ref as
|
|
10
|
-
const N = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="
|
|
9
|
+
import { ref as m } from "lit/directives/ref.js";
|
|
10
|
+
const N = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="var(--sbb-clock-background-color)" cx="52.5" cy="52.5" r="52.5"/><path d="M50.75 4h3.5v12h-3.5zM50.75 89h3.5v12h-3.5zM75.233 9.623l3.03 1.75-6 10.392-3.03-1.75zM32.734 83.233l3.03 1.75-6 10.392-3.03-1.75zM93.628 26.732l1.75 3.031-10.392 6-1.75-3.03zM20.017 69.234l1.75 3.031-10.392 6-1.75-3.03zM101 50.75v3.5H89v-3.5zM16 50.75v3.5H4v-3.5zM95.379 75.232l-1.75 3.031-10.392-6 1.75-3.03zM21.766 32.734l-1.75 3.031-10.392-6 1.75-3.03zM78.267 93.63l-3.03 1.75-6-10.393 3.03-1.75zM35.766 20.015l-3.03 1.75-6-10.392 3.03-1.75z"/><g><path d="M56.873 4.19l1.392.147-.366 3.48-1.392-.145zM47.101 97.177l1.393.146-.366 3.481-1.392-.146zM61.896 4.914l1.37.29-.728 3.424-1.37-.29zM42.458 96.366l1.37.29-.728 3.424-1.37-.291zM66.825 6.157l1.332.432-1.082 3.33-1.331-.434zM37.931 95.085l1.332.432-1.082 3.33-1.331-.433zM71.584 7.906l1.28.569-1.424 3.197-1.28-.57zM33.56 93.32l1.278.569-1.423 3.197-1.28-.57zM80.44 12.852l1.133.823-2.058 2.831-1.132-.823zM25.481 88.494l1.133.822-2.057 2.832-1.133-.823zM84.43 15.986l1.04.937-2.342 2.6-1.04-.936zM21.87 85.469l1.04.936-2.341 2.601-1.04-.937zM88.072 19.522l.937 1.04-2.6 2.343-.937-1.04zM18.593 82.088l.937 1.04-2.601 2.342-.937-1.04zM91.328 23.425l.823 1.133-2.832 2.057-.823-1.132zM15.684 78.385l.823 1.132-2.832 2.058-.822-1.133zM96.52 32.128l.57 1.279-3.198 1.423-.57-1.278zM11.109 70.161l.569 1.279-3.197 1.423-.57-1.279zM98.407 36.85l.433 1.332-3.33 1.081-.432-1.331zM9.483 65.74l.432 1.33-3.329 1.082-.432-1.331zM99.795 41.726l.291 1.37-3.423.727-.29-1.37zM8.34 61.17l.292 1.37-3.424.728-.29-1.37zM100.66 46.73l.146 1.393-3.48.366-.147-1.392zM7.674 56.506l.146 1.392-3.48.366-.147-1.392zM100.811 56.873l-.146 1.392-3.48-.365.145-1.393zM7.821 47.101l-.146 1.392-3.48-.365.145-1.393zM100.09 61.895l-.291 1.369-3.424-.728.291-1.369zM8.631 42.46l-.291 1.37-3.423-.728.29-1.37zM98.84 66.827l-.432 1.331-3.329-1.081.433-1.332zM9.918 37.93l-.433 1.331-3.329-1.082.433-1.331zM97.098 71.585l-.569 1.28-3.197-1.424.57-1.28zM11.677 33.558l-.57 1.28-3.197-1.424.57-1.279zM92.149 80.439l-.823 1.133-2.832-2.058.823-1.132zM16.506 25.482l-.823 1.133-2.831-2.057.823-1.133zM89.017 84.431l-.937 1.04-2.6-2.341.936-1.04zM19.528 21.869l-.936 1.04-2.601-2.342.936-1.04zM85.48 88.076l-1.041.936-2.342-2.6 1.04-.937zM22.91 18.59l-1.04.937-2.341-2.601 1.04-.937zM81.574 91.328l-1.133.823-2.057-2.831 1.132-.823zM26.617 15.684l-1.133.823-2.057-2.832 1.132-.823zM72.873 96.524l-1.279.57-1.423-3.198 1.278-.57zM34.838 11.105l-1.279.57-1.423-3.198 1.279-.57zM68.151 98.405l-1.331.432-1.082-3.329 1.332-.432zM39.259 9.485l-1.332.433-1.081-3.33 1.331-.432zM63.272 99.799l-1.369.29-.728-3.422 1.37-.291zM43.83 8.337l-1.369.291-.727-3.423 1.37-.291zM58.27 100.662l-1.393.146-.366-3.48 1.393-.147zM48.494 7.672l-1.392.147-.366-3.481 1.392-.147z"/></g></g></svg>
|
|
11
11
|
`, P = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path id="mod_clock_svg_hours" d="M55.7 64.5h-6.4l.6-44h5.2z"/></svg>
|
|
12
|
-
`,
|
|
13
|
-
`,
|
|
14
|
-
`, U = E`*,:before,:after{box-sizing:border-box}:host{--sbb-clock-hours-animation-start-angle: 0deg;--sbb-clock-seconds-animation-start-angle: 0deg;--sbb-clock-hours-animation-duration: 0s;--sbb-clock-seconds-animation-duration: 0s;--sbb-clock-animation-play-state: paused;--sbb-clock-seconds-hand-color: var(--sbb-color-
|
|
12
|
+
`, x = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M55.1,64.5h-5.2l0.8-58h3.6L55.1,64.5z"/></svg>
|
|
13
|
+
`, F = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M57.8,21.3c0-2.9-2.4-5.2-5.2-5.2s-5.3,2.3-5.3,5.2c0,2.7,2,4.8,4.5,5.2V69h1.5V26.5C55.8,26.2,57.8,24,57.8,21.3z"/></svg>
|
|
14
|
+
`, U = E`*,:before,:after{box-sizing:border-box}:host{--sbb-clock-hours-animation-start-angle: 0deg;--sbb-clock-seconds-animation-start-angle: 0deg;--sbb-clock-hours-animation-duration: 0s;--sbb-clock-seconds-animation-duration: 0s;--sbb-clock-animation-play-state: paused;--sbb-clock-seconds-hand-color: var(--sbb-color-brand);--sbb-clock-face-color: var(--sbb-color-1);--sbb-clock-background-color: var(--sbb-background-color-1);display:block}.sbb-clock{position:relative;width:100%;height:100%;aspect-ratio:1/1;overflow:hidden;contain:content}.sbb-clock__face,.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds{position:absolute;inset:0;transform-origin:center center;transform:rotate(0);transform-style:preserve-3d;backface-visibility:hidden}.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__face{fill:var(--sbb-clock-face-color)}.sbb-clock__hand-minutes{transition:transform var(--sbb-disable-animation-duration, .2s) cubic-bezier(.4,2.08,.55,.44)}@supports not (aspect-ratio: 1/1){.sbb-clock__hand-minutes{transform-origin:50% 49.625%}}.sbb-clock__hand-hours{animation-name:rotate;animation-duration:43200s;animation-iteration-count:infinite;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state)}.sbb-clock__hand-hours--initial-hour{animation-name:hand-hours-animation-initial-hour;animation-duration:var(--sbb-clock-hours-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}.sbb-clock__hand-minutes--no-transition{transition:none}.sbb-clock__hand-seconds{animation-name:hand-seconds-animation;animation-duration:60s;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:infinite;fill:var(--sbb-clock-seconds-hand-color)}.sbb-clock__hand-seconds--initial-minute{animation-name:hand-seconds-animation-initial-minute;animation-duration:var(--sbb-clock-seconds-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}:host(:not([data-initialized])) :is(.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds){display:none}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes hand-hours-animation-initial-hour{0%{transform:rotate(var(--sbb-clock-hours-animation-start-angle))}to{transform:rotate(360deg)}}@keyframes hand-seconds-animation{0%{transform:rotate(0)}97.5%,to{transform:rotate(360deg)}}@keyframes hand-seconds-animation-initial-minute{0%{transform:rotate(var(--sbb-clock-seconds-animation-start-angle))}97.5%,to{transform:rotate(360deg)}}`, $ = 12, D = 60, z = 60, V = 50, S = 360, w = 30, G = 6, R = 360 / 58.5, B = 60, L = 3600, K = L / 2, C = {
|
|
15
15
|
once: !0,
|
|
16
16
|
passive: !0
|
|
17
17
|
};
|
|
18
18
|
let X = (() => {
|
|
19
19
|
var c, o;
|
|
20
|
-
let s = [T("sbb-clock")], n, e = [],
|
|
20
|
+
let s = [T("sbb-clock")], n, e = [], a, u = A, b, k = [], v = [];
|
|
21
21
|
return o = class extends u {
|
|
22
22
|
constructor() {
|
|
23
23
|
super(...arguments);
|
|
24
24
|
H(this, c);
|
|
25
|
-
h(this, c,
|
|
25
|
+
h(this, c, _(this, k, null)), this._state = (_(this, v), "paused"), this._moveHoursHandFn = () => this._moveHoursHand(), this._moveMinutesHandFn = () => this._moveMinutesHand(), this._handlePageVisibilityChange = async () => {
|
|
26
26
|
this.now || (document.visibilityState === "hidden" ? await this._stopClock() : await this._startClock());
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -31,7 +31,7 @@ let X = (() => {
|
|
|
31
31
|
* @param value HH:MM:ss
|
|
32
32
|
*/
|
|
33
33
|
get now() {
|
|
34
|
-
return
|
|
34
|
+
return p(this, c);
|
|
35
35
|
}
|
|
36
36
|
set now(t) {
|
|
37
37
|
h(this, c, t);
|
|
@@ -40,10 +40,10 @@ let X = (() => {
|
|
|
40
40
|
super.connectedCallback(), this._resetIntervalId = setInterval(() => this._resetClock(), K * 1e3);
|
|
41
41
|
}
|
|
42
42
|
willUpdate(t) {
|
|
43
|
-
super.willUpdate(t), !
|
|
43
|
+
super.willUpdate(t), !y && t.has("now") && this._startOrConfigureClock();
|
|
44
44
|
}
|
|
45
45
|
firstUpdated(t) {
|
|
46
|
-
super.firstUpdated(t),
|
|
46
|
+
super.firstUpdated(t), y || (document.addEventListener("visibilitychange", this._handlePageVisibilityChange, !1), this._startOrConfigureClock());
|
|
47
47
|
}
|
|
48
48
|
disconnectedCallback() {
|
|
49
49
|
super.disconnectedCallback(), this._removeEventListeners(), clearInterval(this._resetIntervalId);
|
|
@@ -70,14 +70,14 @@ let X = (() => {
|
|
|
70
70
|
/** Set the starting position for the three hands on the clock face. */
|
|
71
71
|
_setHandsStartingPosition() {
|
|
72
72
|
this._assignCurrentTime();
|
|
73
|
-
const t =
|
|
73
|
+
const t = z - this._seconds, i = D - this._minutes, l = $ - this._hours;
|
|
74
74
|
let r = 0, d = 0;
|
|
75
|
-
t > 0 && (r += t, d = 1),
|
|
75
|
+
t > 0 && (r += t, d = 1), i > 0 && (r += (i - d) * B, d = 1), l > 0 && (r += (l - d) * L), this.style?.setProperty("--sbb-clock-hours-animation-start-angle", `${Math.ceil(this._hours * w + this._minutes / 2)}deg`), this.style?.setProperty("--sbb-clock-hours-animation-duration", `${r}s`), this.style?.setProperty("--sbb-clock-seconds-animation-start-angle", `${Math.ceil(this._seconds * R)}deg`), this.style?.setProperty("--sbb-clock-seconds-animation-duration", `${t}s`), this._setMinutesHand(), this._clockHandSeconds?.classList.add("sbb-clock__hand-seconds--initial-minute"), this._clockHandHours?.classList.add("sbb-clock__hand-hours--initial-hour"), this.toggleAttribute("data-initialized", !0);
|
|
76
76
|
}
|
|
77
77
|
/** Given the current date, calculates the hh/mm/ss values and the hh/mm/ss left to the next midnight. */
|
|
78
78
|
_assignCurrentTime() {
|
|
79
|
-
const t = this.now ? null : /* @__PURE__ */ new Date(), [
|
|
80
|
-
this._hours =
|
|
79
|
+
const t = this.now ? null : /* @__PURE__ */ new Date(), [i, l, r] = t ? [t.getHours(), t.getMinutes(), t.getSeconds()] : this.now.split(":").map((d) => +d);
|
|
80
|
+
this._hours = i % 12, this._minutes = l, this._seconds = r;
|
|
81
81
|
}
|
|
82
82
|
/** Set the starting position for the minutes hand. */
|
|
83
83
|
_setMinutesHand() {
|
|
@@ -91,7 +91,7 @@ let X = (() => {
|
|
|
91
91
|
}
|
|
92
92
|
/** Move the minutes hand to the next value. */
|
|
93
93
|
_moveMinutesHand() {
|
|
94
|
-
this._clockHandSeconds?.removeEventListener("animationend", this._moveMinutesHandFn), this._removeSecondsAnimationStyles(), this._addMinutesAndSetHands(), this._handMovement = setInterval(() => this._addMinutesAndSetHands(),
|
|
94
|
+
this._clockHandSeconds?.removeEventListener("animationend", this._moveMinutesHandFn), this._removeSecondsAnimationStyles(), this._addMinutesAndSetHands(), this._handMovement = setInterval(() => this._addMinutesAndSetHands(), z * 1e3);
|
|
95
95
|
}
|
|
96
96
|
_addMinutesAndSetHands() {
|
|
97
97
|
this._minutes++, this._setMinutesHand();
|
|
@@ -120,33 +120,33 @@ let X = (() => {
|
|
|
120
120
|
<span
|
|
121
121
|
class="sbb-clock__hand-hours"
|
|
122
122
|
.innerHTML=${P}
|
|
123
|
-
${
|
|
123
|
+
${m((t) => {
|
|
124
124
|
this._clockHandHours = t;
|
|
125
125
|
})}
|
|
126
126
|
></span>
|
|
127
127
|
<span
|
|
128
128
|
class="sbb-clock__hand-minutes sbb-clock__hand-minutes--no-transition"
|
|
129
|
-
.innerHTML=${
|
|
130
|
-
${
|
|
129
|
+
.innerHTML=${x}
|
|
130
|
+
${m((t) => {
|
|
131
131
|
this._clockHandMinutes = t;
|
|
132
132
|
})}
|
|
133
133
|
></span>
|
|
134
134
|
<span
|
|
135
135
|
class="sbb-clock__hand-seconds"
|
|
136
|
-
.innerHTML=${
|
|
137
|
-
${
|
|
136
|
+
.innerHTML=${F}
|
|
137
|
+
${m((t) => {
|
|
138
138
|
this._clockHandSeconds = t;
|
|
139
139
|
})}
|
|
140
140
|
></span>
|
|
141
141
|
</div>
|
|
142
142
|
`;
|
|
143
143
|
}
|
|
144
|
-
}, c = new WeakMap(),
|
|
144
|
+
}, c = new WeakMap(), a = o, (() => {
|
|
145
145
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
146
|
-
b = [I()],
|
|
147
|
-
|
|
148
|
-
} }, metadata: t }, k, v),
|
|
149
|
-
})(), o.styles = U,
|
|
146
|
+
b = [I()], f(o, null, b, { kind: "accessor", name: "now", static: !1, private: !1, access: { has: (i) => "now" in i, get: (i) => i.now, set: (i, l) => {
|
|
147
|
+
i.now = l;
|
|
148
|
+
} }, metadata: t }, k, v), f(null, n = { value: a }, s, { kind: "class", name: a.name, metadata: t }, null, e), a = n.value, t && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
149
|
+
})(), o.styles = U, _(a, e), a;
|
|
150
150
|
})();
|
|
151
151
|
export {
|
|
152
152
|
X as SbbClockElement
|
|
@@ -2,43 +2,43 @@ var I = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var D = (e, t, r) => t.has(e) || I("Cannot " + r);
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
5
|
+
var u = (e, t, r) => (D(e, t, "read from private field"), r ? r.call(e) : t.get(e)), p = (e, t, r) => t.has(e) ? I("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), g = (e, t, r, n) => (D(e, t, "write to private field"), n ? n.call(e, r) : t.set(e, r), r);
|
|
6
|
+
import { __esDecorate as h, __runInitializers as i } from "tslib";
|
|
7
7
|
import { css as U, LitElement as j, html as B } from "lit";
|
|
8
8
|
import { customElement as O, property as m } from "lit/decorators.js";
|
|
9
9
|
import { slotState as q, forceType as T } from "../../core/decorators.js";
|
|
10
|
-
const A = U`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{--sbb-container-background-border-radius: 0;--sbb-container-color: inherit;display:block}:host([color=white]){--sbb-container-background-color: var(--sbb-color-
|
|
10
|
+
const A = U`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{--sbb-container-background-border-radius: 0;--sbb-container-color: inherit;display:block}:host(:is(:not([color]),[color=white])){--sbb-container-background-color: var(--sbb-background-color-1)}:host([color=milk]){--sbb-container-background-color: var(--sbb-background-color-3)}:host([color=midnight]),:host([color=charcoal]){--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-container-color: var(--sbb-color-1-negative)}:host([color=midnight]){--sbb-container-background-color: var(--sbb-background-color-1-negative)}:host([color=charcoal]){--sbb-container-background-color: var(--sbb-background-color-2-negative)}:host([data-slot-names~=image]){--sbb-container-background-color: transparent;--sbb-container-padding: var(--sbb-spacing-responsive-xxl)}:host([background-expanded]:not([expanded])){background-color:var(--sbb-container-background-color)}:host([data-slot-names~=image][background-expanded]){position:relative}@media (min-width: 90rem){:host(:not([expanded],[background-expanded])){--sbb-container-background-border-radius: var(--sbb-border-radius-4x)}}.sbb-container{color:var(--sbb-container-color);background-color:var(--sbb-container-background-color);padding:var(--sbb-container-padding)}.sbb-container:after,.sbb-container:before{content:" ";display:block;visibility:hidden;height:0;overflow:hidden}:host([color=transparent]) .sbb-container{background-color:transparent}:host(:not([expanded])) .sbb-container{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([expanded])) .sbb-container{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([expanded]) .sbb-container{padding-inline:var(--sbb-spacing-responsive-xxs)}:host([data-slot-names~=image]:not([background-expanded])) .sbb-container{position:relative}:host([data-slot-names~=image]) .sbb-container__content{position:relative}::slotted([slot=image]){position:absolute;inset:0;height:100%;width:100%}`;
|
|
11
11
|
let K = (() => {
|
|
12
|
-
var c, d, l,
|
|
13
|
-
let e = [O("sbb-container"), q()], t, r = [],
|
|
14
|
-
return
|
|
12
|
+
var c, d, l, s;
|
|
13
|
+
let e = [O("sbb-container"), q()], t, r = [], n, x = j, k, v = [], _ = [], f, y = [], E = [], w, z = [], S = [];
|
|
14
|
+
return s = class extends x {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
p(this, c, i(this, v, !1));
|
|
18
|
+
p(this, d, (i(this, _), i(this, y, !1)));
|
|
19
|
+
p(this, l, (i(this, E), i(this, z, "white")));
|
|
20
20
|
i(this, S);
|
|
21
21
|
}
|
|
22
22
|
/** Whether the container is expanded. */
|
|
23
23
|
get expanded() {
|
|
24
|
-
return
|
|
24
|
+
return u(this, c);
|
|
25
25
|
}
|
|
26
26
|
set expanded(o) {
|
|
27
|
-
|
|
27
|
+
g(this, c, o);
|
|
28
28
|
}
|
|
29
29
|
/** Whether the background color is shown on full container width on large screens. */
|
|
30
30
|
get backgroundExpanded() {
|
|
31
|
-
return
|
|
31
|
+
return u(this, d);
|
|
32
32
|
}
|
|
33
33
|
set backgroundExpanded(o) {
|
|
34
|
-
|
|
34
|
+
g(this, d, o);
|
|
35
35
|
}
|
|
36
36
|
/** Color of the container, like transparent, white etc. */
|
|
37
37
|
get color() {
|
|
38
|
-
return
|
|
38
|
+
return u(this, l);
|
|
39
39
|
}
|
|
40
40
|
set color(o) {
|
|
41
|
-
|
|
41
|
+
g(this, l, o);
|
|
42
42
|
}
|
|
43
43
|
willUpdate(o) {
|
|
44
44
|
super.willUpdate(o), o.has("expanded") && this.querySelector?.("sbb-sticky-bar")?.toggleAttribute("data-expanded", this.expanded);
|
|
@@ -54,16 +54,16 @@ let K = (() => {
|
|
|
54
54
|
<slot name="sticky-bar"></slot>
|
|
55
55
|
`;
|
|
56
56
|
}
|
|
57
|
-
}, c = new WeakMap(), d = new WeakMap(), l = new WeakMap(),
|
|
57
|
+
}, c = new WeakMap(), d = new WeakMap(), l = new WeakMap(), n = s, (() => {
|
|
58
58
|
const o = typeof Symbol == "function" && Symbol.metadata ? Object.create(x[Symbol.metadata] ?? null) : void 0;
|
|
59
|
-
k = [T(), m({ type: Boolean, reflect: !0 })], f = [T(), m({ type: Boolean, reflect: !0, attribute: "background-expanded" })],
|
|
59
|
+
k = [T(), m({ type: Boolean, reflect: !0 })], f = [T(), m({ type: Boolean, reflect: !0, attribute: "background-expanded" })], w = [m({ reflect: !0 })], h(s, null, k, { kind: "accessor", name: "expanded", static: !1, private: !1, access: { has: (a) => "expanded" in a, get: (a) => a.expanded, set: (a, b) => {
|
|
60
60
|
a.expanded = b;
|
|
61
|
-
} }, metadata: o },
|
|
61
|
+
} }, metadata: o }, v, _), h(s, null, f, { kind: "accessor", name: "backgroundExpanded", static: !1, private: !1, access: { has: (a) => "backgroundExpanded" in a, get: (a) => a.backgroundExpanded, set: (a, b) => {
|
|
62
62
|
a.backgroundExpanded = b;
|
|
63
|
-
} }, metadata: o }, y,
|
|
63
|
+
} }, metadata: o }, y, E), h(s, null, w, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (a) => "color" in a, get: (a) => a.color, set: (a, b) => {
|
|
64
64
|
a.color = b;
|
|
65
|
-
} }, metadata: o }, z, S),
|
|
66
|
-
})(),
|
|
65
|
+
} }, metadata: o }, z, S), h(null, t = { value: n }, e, { kind: "class", name: n.name, metadata: o }, null, r), n = t.value, o && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: o });
|
|
66
|
+
})(), s.styles = A, i(n, r), n;
|
|
67
67
|
})();
|
|
68
68
|
export {
|
|
69
69
|
K as SbbContainerElement
|
|
@@ -2,23 +2,23 @@ var w = (a) => {
|
|
|
2
2
|
throw TypeError(a);
|
|
3
3
|
};
|
|
4
4
|
var x = (a, s, e) => s.has(a) || w("Cannot " + e);
|
|
5
|
-
var k = (a, s, e) => (x(a, s, "read from private field"), e ? e.call(a) : s.get(a)), u = (a, s, e) => s.has(a) ? w("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, e),
|
|
6
|
-
import { __runInitializers as
|
|
5
|
+
var k = (a, s, e) => (x(a, s, "read from private field"), e ? e.call(a) : s.get(a)), u = (a, s, e) => s.has(a) ? w("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, e), d = (a, s, e, r) => (x(a, s, "write to private field"), r ? r.call(a, e) : s.set(a, e), e);
|
|
6
|
+
import { __runInitializers as l, __esDecorate as y } from "tslib";
|
|
7
7
|
import { IntersectionController as S } from "@lit-labs/observers/intersection-controller.js";
|
|
8
8
|
import { css as A, LitElement as C, html as R } from "lit";
|
|
9
9
|
import { customElement as B, property as z } from "lit/decorators.js";
|
|
10
10
|
import { isLean as I, isZeroAnimationDuration as D } from "../../core/dom.js";
|
|
11
11
|
import { SbbUpdateSchedulerMixin as U } from "../../core/mixins.js";
|
|
12
|
-
const T = A`*,:before,:after{box-sizing:border-box}:host{--sbb-sticky-bar-position: sticky;--sbb-sticky-bar-padding-block: var(--sbb-spacing-responsive-xs);--sbb-sticky-bar-border-radius: var(--sbb-border-radius-8x);--sbb-sticky-bar-animation-easing: var(--sbb-animation-easing);--sbb-sticky-bar-fade-in-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-5x) );--sbb-sticky-bar-fade-out-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-sticky-bar-slide-vertically-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-sticky-bar-slide-vertically-animation-easing: ease-out;--sbb-sticky-bar-slide-vertically-animation-delay: 0s;--sbb-sticky-bar-slide-vertically-animation-name: unset;--_sbb-sticky-bar-background-animation-duration: var( --sbb-sticky-bar-fade-out-animation-duration );--_sbb-sticky-bar-intersector-background-color: transparent;--_sbb-sticky-bar-forced-colors-border: none;display:contents}:host([size=s]){--sbb-sticky-bar-padding-block: var(--sbb-spacing-responsive-xxxs)}:host([data-sticking]:not([data-state=unsticky])){--sbb-sticky-bar-sticky-background-color: var( --sbb-container-background-color, var(--sbb-color-
|
|
12
|
+
const T = A`*,:before,:after{box-sizing:border-box}:host{--sbb-sticky-bar-position: sticky;--sbb-sticky-bar-padding-block: var(--sbb-spacing-responsive-xs);--sbb-sticky-bar-border-radius: var(--sbb-border-radius-8x);--sbb-sticky-bar-animation-easing: var(--sbb-animation-easing);--sbb-sticky-bar-fade-in-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-5x) );--sbb-sticky-bar-fade-out-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-sticky-bar-slide-vertically-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-sticky-bar-slide-vertically-animation-easing: ease-out;--sbb-sticky-bar-slide-vertically-animation-delay: 0s;--sbb-sticky-bar-slide-vertically-animation-name: unset;--_sbb-sticky-bar-background-animation-duration: var( --sbb-sticky-bar-fade-out-animation-duration );--_sbb-sticky-bar-intersector-background-color: transparent;--_sbb-sticky-bar-forced-colors-border: none;display:contents}:host([size=s]){--sbb-sticky-bar-padding-block: var(--sbb-spacing-responsive-xxxs)}:host([data-sticking]:not([data-state=unsticky])){--sbb-sticky-bar-sticky-background-color: var( --sbb-container-background-color, var(--sbb-background-color-1) );--_sbb-sticky-bar-intersector-background-color: var(--sbb-sticky-bar-sticky-background-color);--_sbb-sticky-bar-background-animation-duration: var(--sbb-sticky-bar-fade-in-animation-duration)}@media (forced-colors: active){:host([data-sticking]:not([data-state=unsticky])){--_sbb-sticky-bar-forced-colors-border: var(--sbb-border-width-1x) solid CanvasText}}:host([data-sticking]:not([data-state=unsticky])[color=white]){--sbb-sticky-bar-sticky-background-color: var(--sbb-background-color-1)}:host([data-sticking]:not([data-state=unsticky])[color=milk]){--sbb-sticky-bar-sticky-background-color: var(--sbb-background-color-3)}:host([data-sticking]:not([data-state=unsticky])[color=midnight]){--sbb-sticky-bar-sticky-background-color: var(--sbb-background-color-1-negative)}:host([data-sticking]:not([data-state=unsticky])[color=charcoal]){--sbb-sticky-bar-sticky-background-color: var(--sbb-background-color-2-negative)}:host(:is([data-sticking]:is([data-slide-vertically],[data-state=sticking],[data-state=unsticking]),[data-state=unsticky])){--_sbb-sticky-bar-background-animation-duration: 0s}:host([data-sticking]:is([data-slide-vertically]:not([data-state=unsticky],[data-state=unsticking]),[data-state=sticking])){--sbb-sticky-bar-slide-vertically-animation-name: slide-in}:host([data-sticking][data-state=unsticking]){--sbb-sticky-bar-slide-vertically-animation-name: slide-out}:host(:is(:not([data-initialized]),[data-state=unsticky])){--sbb-sticky-bar-position: relative}.sbb-sticky-bar__wrapper{position:var(--sbb-sticky-bar-position);inset-block-end:0;display:block;z-index:var(--sbb-sticky-bar-z-index);animation-name:var(--sbb-sticky-bar-slide-vertically-animation-name);animation-duration:var(--sbb-sticky-bar-slide-vertically-animation-duration);animation-timing-function:var(--sbb-sticky-bar-slide-vertically-animation-easing);animation-delay:var(--sbb-sticky-bar-slide-vertically-animation-delay);animation-fill-mode:backwards}.sbb-sticky-bar__wrapper:after,.sbb-sticky-bar__wrapper:before{content:"";inset:0;position:absolute;display:block;z-index:-1}.sbb-sticky-bar__wrapper:before{background-color:var(--sbb-container-background-color);padding:0!important}:host(:not([data-expanded])) .sbb-sticky-bar__wrapper:before{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([data-expanded])) .sbb-sticky-bar__wrapper:before{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}.sbb-sticky-bar__wrapper:after{background-color:var(--sbb-sticky-bar-sticky-background-color, transparent);border-start-start-radius:var(--sbb-sticky-bar-border-radius);border-start-end-radius:var(--sbb-sticky-bar-border-radius);transition:background-color var(--_sbb-sticky-bar-background-animation-duration) var(--sbb-sticky-bar-animation-easing);border:var(--_sbb-sticky-bar-forced-colors-border)}.sbb-sticky-bar{display:flex;padding-block:var(--sbb-sticky-bar-padding-block);margin-block-end:-1px}.sbb-sticky-bar:before{content:"";position:absolute;inset:0;z-index:-1;border-start-start-radius:var(--sbb-sticky-bar-border-radius);border-start-end-radius:var(--sbb-sticky-bar-border-radius);transition:box-shadow var(--_sbb-sticky-bar-background-animation-duration) var(--sbb-sticky-bar-animation-easing);clip-path:polygon(-50% calc(-1 * var(--sbb-shadow-elevation-level-11-shadow-1-blur)),150% calc(-1 * var(--sbb-shadow-elevation-level-11-shadow-1-blur)),150% 50%,-50% 50%)}:host([data-sticking]:not([data-state=unsticky])) .sbb-sticky-bar:before{box-shadow:var(--sbb-shadow-elevation-level-11-shadow-2-offset-x) var(--sbb-shadow-elevation-level-11-shadow-2-offset-y) var(--sbb-shadow-elevation-level-11-shadow-2-blur) var(--sbb-shadow-elevation-level-11-shadow-2-spread) var(--sbb-shadow-color-soft-2),var(--sbb-shadow-elevation-level-11-shadow-1-offset-x) var(--sbb-shadow-elevation-level-11-shadow-1-offset-y) var(--sbb-shadow-elevation-level-11-shadow-1-blur) var(--sbb-shadow-elevation-level-11-shadow-1-spread) var(--sbb-shadow-color-soft-1)}:host(:not([data-expanded])) .sbb-sticky-bar{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([data-expanded])) .sbb-sticky-bar{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([data-expanded]) .sbb-sticky-bar{padding-inline:var(--sbb-spacing-responsive-xxs)}.sbb-sticky-bar__intersector{height:1px}.sbb-sticky-bar__intersector:after{content:"";display:block;position:absolute;width:100%;height:calc(var(--sbb-sticky-bar-bottom-overlapping-height, 0) + 1px);background-color:var(--_sbb-sticky-bar-intersector-background-color);pointer-events:none;transition:background-color var(--_sbb-sticky-bar-background-animation-duration) var(--sbb-sticky-bar-animation-easing)}@keyframes slide-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slide-out{0%{transform:translateY(0)}to{transform:translateY(100%)}}`;
|
|
13
13
|
let M = (() => {
|
|
14
14
|
var n, b, o;
|
|
15
|
-
let a = [B("sbb-sticky-bar")], s, e = [], r,
|
|
16
|
-
return o = class extends
|
|
15
|
+
let a = [B("sbb-sticky-bar")], s, e = [], r, h = U(C), v, m = [], g = [], _, p = [], f = [];
|
|
16
|
+
return o = class extends h {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
19
|
u(this, n);
|
|
20
20
|
u(this, b);
|
|
21
|
-
|
|
21
|
+
d(this, n, l(this, m, null)), d(this, b, (l(this, g), l(this, p, I() ? "s" : "m"))), this._intersector = l(this, f), this._observer = new S(this, {
|
|
22
22
|
// Although `this` is observed, we have to postpone observing
|
|
23
23
|
// into firstUpdated() to achieve a correct initial state.
|
|
24
24
|
target: null,
|
|
@@ -30,7 +30,7 @@ let M = (() => {
|
|
|
30
30
|
return k(this, n);
|
|
31
31
|
}
|
|
32
32
|
set color(t) {
|
|
33
|
-
|
|
33
|
+
d(this, n, t);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Size of the container.
|
|
@@ -40,7 +40,7 @@ let M = (() => {
|
|
|
40
40
|
return k(this, b);
|
|
41
41
|
}
|
|
42
42
|
set size(t) {
|
|
43
|
-
|
|
43
|
+
d(this, b, t);
|
|
44
44
|
}
|
|
45
45
|
/** The state of the component. */
|
|
46
46
|
set _state(t) {
|
|
@@ -102,18 +102,18 @@ let M = (() => {
|
|
|
102
102
|
`;
|
|
103
103
|
}
|
|
104
104
|
}, n = new WeakMap(), b = new WeakMap(), r = o, (() => {
|
|
105
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
106
|
-
v = [z({ reflect: !0 })],
|
|
105
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
|
|
106
|
+
v = [z({ reflect: !0 })], _ = [z({ reflect: !0 })], y(o, null, v, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (i) => "color" in i, get: (i) => i.color, set: (i, c) => {
|
|
107
107
|
i.color = c;
|
|
108
|
-
} }, metadata: t }, m,
|
|
108
|
+
} }, metadata: t }, m, g), y(o, null, _, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (i) => "size" in i, get: (i) => i.size, set: (i, c) => {
|
|
109
109
|
i.size = c;
|
|
110
|
-
} }, metadata: t },
|
|
110
|
+
} }, metadata: t }, p, f), y(null, s = { value: r }, a, { kind: "class", name: r.name, metadata: t }, null, e), r = s.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
111
111
|
})(), o.styles = T, o.events = {
|
|
112
112
|
beforestick: "beforestick",
|
|
113
113
|
stick: "stick",
|
|
114
114
|
beforeunstick: "beforeunstick",
|
|
115
115
|
unstick: "unstick"
|
|
116
|
-
},
|
|
116
|
+
}, l(r, e), r;
|
|
117
117
|
})();
|
|
118
118
|
export {
|
|
119
119
|
M as SbbStickyBarElement
|
|
@@ -21,6 +21,8 @@ export declare abstract class SbbOpenCloseBaseElement extends SbbOpenCloseBaseEl
|
|
|
21
21
|
/** Closes the component. */
|
|
22
22
|
abstract close(): void;
|
|
23
23
|
connectedCallback(): void;
|
|
24
|
+
/** The method which is called on escape key press. Defaults to calling close() */
|
|
25
|
+
escapeStrategy(): void;
|
|
24
26
|
protected dispatchBeforeOpenEvent(): boolean;
|
|
25
27
|
protected dispatchOpenEvent(): boolean;
|
|
26
28
|
protected dispatchBeforeCloseEvent(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-close-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/open-close-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;;AAG7D;;GAEG;AACH,8BAAsB,uBAAwB,SAAQ,4BAAoC;IACxF,gBAAuB,MAAM;;;;;MAKlB;IAEX,kCAAkC;IAClC,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE,oBAAoB,EAE9C;IACD,SAAS,KAAK,KAAK,IAAI,oBAAoB,CAE1C;IAED,mCAAmC;IACnC,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED,2BAA2B;aACX,IAAI,IAAI,IAAI;IAC5B,4BAA4B;aACZ,KAAK,IAAI,IAAI;IAEb,iBAAiB,IAAI,IAAI;IAKzC,SAAS,CAAC,uBAAuB,IAAI,OAAO;IAK5C,SAAS,CAAC,iBAAiB,IAAI,OAAO;IAKtC,SAAS,CAAC,wBAAwB,IAAI,OAAO;IAK7C,SAAS,CAAC,kBAAkB,IAAI,OAAO;CAIxC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,2BAA2B;QACnC,UAAU,EAAE,KAAK,CAAC;QAClB,WAAW,EAAE,KAAK,CAAC;QACnB,IAAI,EAAE,KAAK,CAAC;QACZ,KAAK,EAAE,KAAK,CAAC;KACd;CACF"}
|
|
1
|
+
{"version":3,"file":"open-close-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/base-elements/open-close-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;;AAG7D;;GAEG;AACH,8BAAsB,uBAAwB,SAAQ,4BAAoC;IACxF,gBAAuB,MAAM;;;;;MAKlB;IAEX,kCAAkC;IAClC,SAAS,KAAK,KAAK,CAAC,KAAK,EAAE,oBAAoB,EAE9C;IACD,SAAS,KAAK,KAAK,IAAI,oBAAoB,CAE1C;IAED,mCAAmC;IACnC,IAAW,MAAM,IAAI,OAAO,CAE3B;IAED,2BAA2B;aACX,IAAI,IAAI,IAAI;IAC5B,4BAA4B;aACZ,KAAK,IAAI,IAAI;IAEb,iBAAiB,IAAI,IAAI;IAKzC,kFAAkF;IAC3E,cAAc,IAAI,IAAI;IAI7B,SAAS,CAAC,uBAAuB,IAAI,OAAO;IAK5C,SAAS,CAAC,iBAAiB,IAAI,OAAO;IAKtC,SAAS,CAAC,wBAAwB,IAAI,OAAO;IAK7C,SAAS,CAAC,kBAAkB,IAAI,OAAO;CAIxC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,2BAA2B;QACnC,UAAU,EAAE,KAAK,CAAC;QAClB,WAAW,EAAE,KAAK,CAAC;QACnB,IAAI,EAAE,KAAK,CAAC;QACZ,KAAK,EAAE,KAAK,CAAC;KACd;CACF"}
|
|
@@ -15,6 +15,10 @@ const e = class e extends r(s) {
|
|
|
15
15
|
connectedCallback() {
|
|
16
16
|
super.connectedCallback(), this.state ||= "closed";
|
|
17
17
|
}
|
|
18
|
+
/** The method which is called on escape key press. Defaults to calling close() */
|
|
19
|
+
escapeStrategy() {
|
|
20
|
+
this.close();
|
|
21
|
+
}
|
|
18
22
|
dispatchBeforeOpenEvent() {
|
|
19
23
|
return this.dispatchEvent(new Event("beforeopen", { cancelable: !0 }));
|
|
20
24
|
}
|
package/core/config/config.d.ts
CHANGED
|
@@ -15,11 +15,17 @@ export interface SbbPopoverConfig {
|
|
|
15
15
|
openDelay?: number;
|
|
16
16
|
closeDelay?: number;
|
|
17
17
|
}
|
|
18
|
+
export interface SbbTooltipConfig {
|
|
19
|
+
openDelay?: number;
|
|
20
|
+
closeDelay?: number;
|
|
21
|
+
longPressCloseDelay?: number;
|
|
22
|
+
}
|
|
18
23
|
export interface SbbConfig {
|
|
19
24
|
language?: string;
|
|
20
25
|
icon?: SbbIconConfig;
|
|
21
26
|
datetime?: SbbDatetimeConfig;
|
|
22
27
|
popover?: SbbPopoverConfig;
|
|
28
|
+
tooltip?: SbbTooltipConfig;
|
|
23
29
|
}
|
|
24
30
|
export declare function readConfig(): SbbConfig;
|
|
25
31
|
export declare function mergeConfig(config: Partial<SbbConfig>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;KAChC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAgB,UAAU,IAAI,SAAS,CAKtC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAG5D;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,SAAS,EAAE,SAAS,CAAC;CAC1B"}
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/config/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;KAChC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED,wBAAgB,UAAU,IAAI,SAAS,CAKtC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,CAG5D;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,SAAS,EAAE,SAAS,CAAC;CAC1B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isServer as i } from "lit";
|
|
2
2
|
const o = new Array();
|
|
3
3
|
i || window.addEventListener("keydown", (t) => {
|
|
4
|
-
t.key === "Escape" && !t.defaultPrevented && (t.preventDefault(), o.at(-1)?.
|
|
4
|
+
t.key === "Escape" && !t.defaultPrevented && (t.preventDefault(), o.at(-1)?.escapeStrategy());
|
|
5
5
|
});
|
|
6
|
-
class
|
|
6
|
+
class c {
|
|
7
7
|
constructor(e, s = o) {
|
|
8
8
|
this._host = e, this._overlayStack = s, this._host.addController?.(this);
|
|
9
9
|
}
|
|
@@ -23,5 +23,5 @@ class n {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
c as SbbEscapableOverlayController
|
|
27
27
|
};
|
|
@@ -4,7 +4,8 @@ export declare class SbbInertController implements ReactiveController {
|
|
|
4
4
|
private _host;
|
|
5
5
|
private _inertElements;
|
|
6
6
|
private _inertOverlays;
|
|
7
|
-
|
|
7
|
+
private _exemptedElements;
|
|
8
|
+
constructor(_host: ReactiveControllerHost & SbbOpenCloseBaseElement, _inertElements?: Set<HTMLElement>, _inertOverlays?: Set<HTMLElement>, _exemptedElements?: Set<HTMLElement>);
|
|
8
9
|
hostConnected(): void;
|
|
9
10
|
hostDisconnected(): void;
|
|
10
11
|
/** Applies inert state to every other element on the page except the overlay. */
|
|
@@ -13,8 +14,14 @@ export declare class SbbInertController implements ReactiveController {
|
|
|
13
14
|
deactivate(): void;
|
|
14
15
|
/** Whether the assigned host is currently inert */
|
|
15
16
|
isInert(): boolean;
|
|
17
|
+
/** Temporarily removes all inert attributes from a given element. */
|
|
18
|
+
exempt(element: HTMLElement): void;
|
|
19
|
+
/** Inerts an element currently exempted from inert. */
|
|
20
|
+
restoreAllExempted(): void;
|
|
16
21
|
private _currentOverlay;
|
|
22
|
+
private _removeAllInertAttributes;
|
|
17
23
|
private _removeInertAttributes;
|
|
24
|
+
private _addAllInertAttributes;
|
|
18
25
|
private _addInertAttributes;
|
|
19
26
|
}
|
|
20
27
|
//# sourceMappingURL=inert-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inert-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/inert-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAEtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"inert-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/inert-controller.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAEtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAOnE,qBAAa,kBAAmB,YAAW,kBAAkB;IAEzD,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,iBAAiB;gBAHjB,KAAK,EAAE,sBAAsB,GAAG,uBAAuB,EACvD,cAAc,mBAAgB,EAC9B,cAAc,mBAAgB,EAC9B,iBAAiB,mBAAmB;IAKvC,aAAa,IAAI,IAAI;IAMrB,gBAAgB,IAAI,IAAI;IAM/B,iFAAiF;IAC1E,QAAQ,IAAI,IAAI;IAUvB,2BAA2B;IACpB,UAAU,IAAI,IAAI;IAyBzB,mDAAmD;IAC5C,OAAO,IAAI,OAAO;IAIzB,qEAAqE;IAC9D,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAQzC,uDAAuD;IAChD,kBAAkB,IAAI,IAAI;IAKjC,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,yBAAyB;IAOjC,OAAO,CAAC,sBAAsB;IAgB9B,OAAO,CAAC,sBAAsB;IAqB9B,OAAO,CAAC,mBAAmB;CAa5B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const r = ["script", "head", "template", "style"],
|
|
2
|
-
class
|
|
3
|
-
constructor(t, e = s, i = a) {
|
|
4
|
-
this._host = t, this._inertElements = e, this._inertOverlays = i, this._host.addController?.(this);
|
|
1
|
+
const r = ["script", "head", "template", "style"], n = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set();
|
|
2
|
+
class l {
|
|
3
|
+
constructor(t, e = n, s = h, i = a) {
|
|
4
|
+
this._host = t, this._inertElements = e, this._inertOverlays = s, this._exemptedElements = i, this._host.addController?.(this);
|
|
5
5
|
}
|
|
6
6
|
hostConnected() {
|
|
7
7
|
this._host.isOpen && this.activate();
|
|
@@ -11,7 +11,7 @@ class h {
|
|
|
11
11
|
}
|
|
12
12
|
/** Applies inert state to every other element on the page except the overlay. */
|
|
13
13
|
activate() {
|
|
14
|
-
this._inertOverlays.size && this.
|
|
14
|
+
this._inertOverlays.size && this._removeAllInertAttributes(), this._inertOverlays.add(this._host), this._addAllInertAttributes();
|
|
15
15
|
}
|
|
16
16
|
/** Removes inert state. */
|
|
17
17
|
deactivate() {
|
|
@@ -19,28 +19,40 @@ class h {
|
|
|
19
19
|
this._inertOverlays.has(this._host) && this._inertOverlays.delete(this._host);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
|
-
this.
|
|
22
|
+
this._removeAllInertAttributes(), this._inertOverlays.delete(this._host), this._inertOverlays.size && this._addAllInertAttributes();
|
|
23
23
|
}
|
|
24
24
|
/** Whether the assigned host is currently inert */
|
|
25
25
|
isInert() {
|
|
26
26
|
return this._inertOverlays.has(this._host);
|
|
27
27
|
}
|
|
28
|
+
/** Temporarily removes all inert attributes from a given element. */
|
|
29
|
+
exempt(t) {
|
|
30
|
+
this._inertElements.has(t) && !this._exemptedElements.has(t) && (this._removeInertAttributes(t), this._inertElements.delete(t), this._exemptedElements.add(t));
|
|
31
|
+
}
|
|
32
|
+
/** Inerts an element currently exempted from inert. */
|
|
33
|
+
restoreAllExempted() {
|
|
34
|
+
this._exemptedElements.forEach((t) => this._addInertAttributes(t)), this._exemptedElements.clear();
|
|
35
|
+
}
|
|
28
36
|
_currentOverlay() {
|
|
29
37
|
return [...this._inertOverlays].pop() ?? null;
|
|
30
38
|
}
|
|
31
|
-
|
|
32
|
-
this._inertElements.forEach((t) =>
|
|
33
|
-
t && (t.hasAttribute("data-sbb-inert") && (t.inert = !1, t.removeAttribute("data-sbb-inert")), t.hasAttribute("data-sbb-aria-hidden") && (t.removeAttribute("aria-hidden"), t.removeAttribute("data-sbb-aria-hidden")));
|
|
34
|
-
}), this._inertElements.clear();
|
|
39
|
+
_removeAllInertAttributes() {
|
|
40
|
+
this._inertElements.forEach((t) => this._removeInertAttributes(t)), this._inertElements.clear();
|
|
35
41
|
}
|
|
36
|
-
|
|
42
|
+
_removeInertAttributes(t) {
|
|
43
|
+
t && (t.hasAttribute("data-sbb-inert") && (t.inert = !1, t.removeAttribute("data-sbb-inert")), t.hasAttribute("data-sbb-aria-hidden") && (t.removeAttribute("aria-hidden"), t.removeAttribute("data-sbb-aria-hidden")));
|
|
44
|
+
}
|
|
45
|
+
_addAllInertAttributes() {
|
|
37
46
|
let t = this._currentOverlay();
|
|
38
47
|
for (; t !== document.documentElement && t !== null; )
|
|
39
48
|
Array.from((t?.parentElement ?? t?.getRootNode())?.childNodes ?? []).filter((e) => e !== t && e instanceof window.HTMLElement && !r.includes(e.localName) && !e.classList.contains("sbb-live-announcer-element")).forEach((e) => {
|
|
40
|
-
this.
|
|
49
|
+
this._addInertAttributes(e);
|
|
41
50
|
}), t = t?.parentElement ?? t?.getRootNode()?.host ?? null;
|
|
42
51
|
}
|
|
52
|
+
_addInertAttributes(t) {
|
|
53
|
+
this._inertElements.add(t), t.inert || (t.inert = !0, t.toggleAttribute("data-sbb-inert", !0)), t.hasAttribute("aria-hidden") || (t.setAttribute("aria-hidden", "true"), t.toggleAttribute("data-sbb-aria-hidden", !0));
|
|
54
|
+
}
|
|
43
55
|
}
|
|
44
56
|
export {
|
|
45
|
-
|
|
57
|
+
l as SbbInertController
|
|
46
58
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
import { SbbElementInternalsMixinType } from '../mixins.js';
|
|
2
3
|
export declare const SbbMediaQueryForcedColors = "(forced-colors: active)";
|
|
4
|
+
export declare const SbbMediaQueryDarkMode = "(prefers-color-scheme: dark)";
|
|
3
5
|
export declare const SbbMediaQueryHover = "(any-hover: hover)";
|
|
4
6
|
export declare const SbbMediaQueryPointerCoarse = "(pointer: coarse)";
|
|
5
7
|
export declare const SbbMediaQueryBreakpointMediumAndAbove: string;
|
|
@@ -30,4 +32,31 @@ export declare class SbbMediaMatcherController implements ReactiveController {
|
|
|
30
32
|
hostConnected(): void;
|
|
31
33
|
hostDisconnected(): void;
|
|
32
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A specialized version of the SbbMediaMatcherController, which
|
|
37
|
+
* takes the color-scheme CSS property into account when determining
|
|
38
|
+
* the dark mode state and updates a :state(dark) on the host.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* new SbbDarkModeController(this, (isDarkMode) => doSomething(isDarkMode));
|
|
42
|
+
*/
|
|
43
|
+
export declare class SbbDarkModeController extends SbbMediaMatcherController {
|
|
44
|
+
private _host;
|
|
45
|
+
/** The current mode based on the class attribute of the <html> element. */
|
|
46
|
+
private static _currentMode;
|
|
47
|
+
/** MutationObserver that observes the "class" attribute of the <html> element. */
|
|
48
|
+
private static readonly _observer;
|
|
49
|
+
private static readonly _observerConfig;
|
|
50
|
+
private readonly _onChangeWithStateUpdater;
|
|
51
|
+
constructor(_host: ReactiveControllerHost & HTMLElement & SbbElementInternalsMixinType, onChange: SbbMediaMatcherHandler);
|
|
52
|
+
private static _readLightDarkClass;
|
|
53
|
+
/**
|
|
54
|
+
* Requests an update of the dark mode state. This is needed when the color-scheme
|
|
55
|
+
* CSS property changes, as the media query does not pick this up automatically.
|
|
56
|
+
*/
|
|
57
|
+
static requestUpdate(): void;
|
|
58
|
+
hostConnected(): void;
|
|
59
|
+
hostDisconnected(): void;
|
|
60
|
+
matches(): boolean;
|
|
61
|
+
}
|
|
33
62
|
//# sourceMappingURL=media-matchers-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-matchers-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/media-matchers-controller.ts"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"media-matchers-controller.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/controllers/media-matchers-controller.ts"],"names":[],"mappings":"AAMA,OAAO,EAAY,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAErF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAKjE,eAAO,MAAM,yBAAyB,4BAA4B,CAAC;AACnE,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AACpE,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAC9D,eAAO,MAAM,qCAAqC,QAAuD,CAAC;AAC1G,eAAO,MAAM,qCAAqC,QAAuD,CAAC;AAC1G,eAAO,MAAM,oCAAoC,QAAsD,CAAC;AAGxG;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAehE;;;;;;;GAOG;AACH,qBAAa,yBAA0B,YAAW,kBAAkB;IAGhE,OAAO,CAAC,QAAQ;gBADhB,IAAI,EAAE,sBAAsB,EACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAK1D;;;;OAIG;IACI,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI;IAMtC,aAAa,IAAI,IAAI;IAoBrB,gBAAgB,IAAI,IAAI;CAWhC;AAED;;;;;;;GAOG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB;IAyBhE,OAAO,CAAC,KAAK;IAxBf,2EAA2E;IAC3E,OAAO,CAAC,MAAM,CAAC,YAAY,CAAsE;IAEjG,kFAAkF;IAClF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAUxB;IAET,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAGrC;IAEF,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAa;gBAG7C,KAAK,EAAE,sBAAsB,GAAG,WAAW,GAAG,4BAA4B,EAClF,QAAQ,EAAE,sBAAsB;IAYlC,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAYlC;;;OAGG;WAEW,aAAa,IAAI,IAAI;IAOnB,aAAa,IAAI,IAAI;IAerB,gBAAgB,IAAI,IAAI;IAQxB,OAAO,IAAI,OAAO;CAWnC"}
|