@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
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var x = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { css as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { ref as
|
|
10
|
-
import { SbbFocusTrapController as
|
|
4
|
+
var C = (s, i, r) => i.has(s) || x("Cannot " + r);
|
|
5
|
+
var m = (s, i, r) => (C(s, i, "read from private field"), r ? r.call(s) : i.get(s)), g = (s, i, r) => i.has(s) ? x("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, r), h = (s, i, r, o) => (C(s, i, "write to private field"), o ? o.call(s, r) : i.set(s, r), r);
|
|
6
|
+
import { __esDecorate as _, __runInitializers as u } from "tslib";
|
|
7
|
+
import { css as L, isServer as O, html as M } from "lit";
|
|
8
|
+
import { customElement as B, property as S } from "lit/decorators.js";
|
|
9
|
+
import { ref as T } from "lit/directives/ref.js";
|
|
10
|
+
import { SbbFocusTrapController as I, isArrowKeyOrPageKeysPressed as P, interactivityChecker as D, getNextElementIndex as U } from "../../core/a11y.js";
|
|
11
11
|
import { SbbOpenCloseBaseElement as z } from "../../core/base-elements.js";
|
|
12
|
-
import { SbbEscapableOverlayController as
|
|
13
|
-
import { idReference as
|
|
14
|
-
import { SbbScrollHandler as
|
|
15
|
-
import { forwardEvent as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
12
|
+
import { SbbEscapableOverlayController as R, SbbInertController as K, SbbMediaQueryBreakpointSmallAndBelow as $, SbbMediaMatcherController as H, SbbDarkModeController as q, SbbLanguageController as F } from "../../core/controllers.js";
|
|
13
|
+
import { idReference as Z, forceType as j } from "../../core/decorators.js";
|
|
14
|
+
import { SbbScrollHandler as V, isZeroAnimationDuration as W } from "../../core/dom.js";
|
|
15
|
+
import { forwardEvent as G } from "../../core/eventing.js";
|
|
16
|
+
import { i18nGoBack as Q } from "../../core/i18n/i18n.js";
|
|
17
|
+
import { SbbNamedSlotListMixin as J } from "../../core/mixins.js";
|
|
18
|
+
import { isEventOnElement as A, removeAriaOverlayTriggerAttributes as X, setAriaOverlayTriggerAttributes as Y, getElementPosition as ee, getElementPositionHorizontal as te } from "../../core/overlay.js";
|
|
19
|
+
import "../../divider.js";
|
|
20
|
+
import "../menu-button.js";
|
|
21
|
+
const se = L`*,:before,:after{box-sizing:border-box}:host{display:contents;--sbb-menu-position-x: 0;--sbb-menu-position-y: 0;--sbb-menu-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) );--sbb-menu-animation-easing: ease;--sbb-menu-transform-y: 100%;--sbb-menu-transform-x: 0%;--sbb-menu-max-width: 100%;--sbb-menu-min-width: 100%;--sbb-menu-inset: 0 auto auto 0;--sbb-menu-container-height: 100dvh;--sbb-menu-max-height: calc(85vh - var(--sbb-spacing-fixed-8x));--sbb-menu-min-height: 3.03125rem;--sbb-menu-border-radius: var(--sbb-border-radius-4x);--sbb-menu-visibility: hidden;--sbb-menu-backdrop-color: transparent;--sbb-menu-color: var(--sbb-color-2-inverted);--sbb-menu-background-color: var(--sbb-background-color-1-inverted);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: color-mix(in srgb, var(--sbb-color-white) 30%, transparent);--sbb-scrollbar-color-hover: color-mix(in srgb, var(--sbb-color-white) 60%, transparent);--sbb-scrollbar-track-color: transparent}@media (min-width: 52.5rem){:host{--sbb-menu-transform-y: var(--sbb-spacing-fixed-2x);--sbb-menu-max-width: 20rem;--sbb-menu-min-width: 11.25rem;--sbb-menu-back-button-display: none}}:host(:is([data-state=opened],[data-state=opening])){--sbb-menu-visibility: visible;--sbb-menu-backdrop-color: color-mix(in srgb, var(--sbb-color-black) 20%, transparent)}@media (min-width: 52.5rem){:host(:is([data-state=opened],[data-state=opening])){--sbb-menu-backdrop-color: transparent}}:host(:not(:is(:state(nested),[state--nested]))){--sbb-menu-back-button-display: none}:host(:not([data-state=closed])){--sbb-menu-inset: 0}:host(:is(:state(dark),[state--dark])){--sbb-focus-outline-color: var(--sbb-focus-outline-color-default);--sbb-scrollbar-color: color-mix(in srgb, var(--sbb-color-black) 30%, transparent);--sbb-scrollbar-color-hover: color-mix(in srgb, var(--sbb-color-black) 60%, transparent)}@media (max-width: 52.4375rem){:host(:is(:state(skip-animation),[state--skip-animation])){--sbb-menu-animation-duration: 0ms}:host(:is(:state(nested-child),[state--nested-child])){--sbb-menu-transform-x: -100%}:host(:is(:state(nested),[state--nested])[data-state]:not([data-state=closed])){--sbb-menu-open-animation-name: open-sideways}:host([data-state][data-state=closing]:is(:state(nested),[state--nested]):not(:is(:state(close-all),[state--close-all]))){--sbb-menu-close-animation-name: close-sideways}}::slotted(:not(sbb-menu-button,sbb-menu-link,sbb-divider)){display:block;padding-inline:var(--sbb-spacing-fixed-5x)}sbb-divider,::slotted(sbb-divider){--sbb-divider-color: var(--sbb-background-color-4-inverted);margin-block:var(--sbb-spacing-fixed-2x)}sbb-divider,#sbb-menu__back-button{display:var(--sbb-menu-back-button-display, block)}.sbb-menu__container{position:fixed;pointer-events:none;inset:var(--sbb-menu-inset);height:var(--sbb-menu-container-height);z-index:var(--sbb-menu-z-index, var(--sbb-overlay-default-z-index))}.sbb-menu__container:before{content:"";visibility:var(--sbb-menu-visibility);pointer-events:all;position:fixed;inset:var(--sbb-menu-inset);height:var(--sbb-menu-container-height);background-color:var(--sbb-menu-backdrop-color);transition-duration:var(--sbb-menu-animation-duration);transition-timing-function:var(--sbb-menu-animation-easing);transition-property:background-color,visibility}:host(:is(:state(nested),[state--nested])) .sbb-menu__container:before{display:none}.sbb-menu{display:none;opacity:0;pointer-events:none;max-width:var(--sbb-menu-max-width);min-width:var(--sbb-menu-min-width);text-align:start;position:absolute;inset-inline-start:0;inset-block-start:unset;inset-block-end:0;inset-inline-end:unset;color:var(--sbb-menu-color);border:none;border-radius:var(--sbb-menu-border-radius) var(--sbb-menu-border-radius) 0 0;background-color:var(--sbb-menu-background-color);padding:0;overflow:hidden;translate:var(--sbb-menu-transform-x) 0;transition:translate var(--sbb-menu-animation-duration)}:host([data-state]:not([data-state=closed])) .sbb-menu{display:block;opacity:1;pointer-events:all;animation-name:var(--sbb-menu-open-animation-name, open);animation-duration:var(--sbb-menu-animation-duration);animation-timing-function:var(--sbb-menu-animation-easing)}:host([data-state][data-state=closing]) .sbb-menu{pointer-events:none;animation-name:var(--sbb-menu-close-animation-name, close)}@media (forced-colors: active){.sbb-menu{outline:var(--sbb-border-width-1x) solid CanvasText}}@media (min-width: 52.5rem){.sbb-menu{top:0;bottom:unset;left:0;right:unset;max-height:fit-content;border-radius:var(--sbb-menu-border-radius)}:host(:not([data-state=closed])) .sbb-menu{top:var(--sbb-menu-position-y);left:var(--sbb-menu-position-x);max-height:var(--sbb-menu-max-height);min-height:var(--sbb-menu-min-height)}}.sbb-menu__content{--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x)}.sbb-menu__content::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-menu__content::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-menu__content::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-menu__content::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-menu__content::-webkit-scrollbar-button,.sbb-menu__content::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-menu__content{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-menu__content{max-height:var(--sbb-menu-max-height);padding-block:var(--sbb-spacing-fixed-1x);overflow:auto;outline:none}.sbb-menu__content:after{content:"";display:block;height:var(--sbb-spacing-fixed-8x)}@media (min-width: 52.5rem){.sbb-menu__content{max-height:fit-content}:host(:not([data-state=closed])) .sbb-menu__content{max-height:var(--sbb-menu-max-height);min-height:var(--sbb-menu-min-height)}.sbb-menu__content:after{display:none}}.sbb-menu-list{list-style:none;margin:0;padding:0;font-size:inherit}::slotted(:is([data-sbb-link],[data-sbb-button])){color-scheme:only light}@keyframes open{0%{opacity:0;translate:0 var(--sbb-menu-transform-y)}to{opacity:1;translate:0 0}}@keyframes close{0%{opacity:1;translate:0 0}to{opacity:0;translate:0 var(--sbb-menu-transform-y)}}@keyframes open-sideways{0%{translate:100% 0}to{translate:0 0}}@keyframes close-sideways{0%{translate:0 0}to{translate:100% 0}}`, N = 8, ie = -4, ne = [
|
|
19
22
|
"A",
|
|
20
23
|
"BUTTON",
|
|
21
24
|
"SBB-BUTTON",
|
|
@@ -23,25 +26,29 @@ const G = T`*,:before,:after{box-sizing:border-box}:host{display:contents;--sbb-
|
|
|
23
26
|
"SBB-LINK",
|
|
24
27
|
"SBB-BLOCK-LINK",
|
|
25
28
|
"SBB-LINK-BUTTON",
|
|
26
|
-
"SBB-BLOCK-LINK-BUTTON"
|
|
29
|
+
"SBB-BLOCK-LINK-BUTTON",
|
|
30
|
+
"SBB-MENU-BUTTON",
|
|
31
|
+
"SBB-MENU-LINK"
|
|
27
32
|
];
|
|
28
|
-
let
|
|
29
|
-
var l, b,
|
|
30
|
-
let
|
|
31
|
-
return
|
|
33
|
+
let re = 0, Ee = (() => {
|
|
34
|
+
var l, b, a;
|
|
35
|
+
let s = [B("sbb-menu")], i, r = [], o, p = J(z), v, f = [], w = [], y, k = [], E = [];
|
|
36
|
+
return a = class extends p {
|
|
32
37
|
constructor() {
|
|
33
38
|
super();
|
|
34
39
|
g(this, l);
|
|
35
40
|
g(this, b);
|
|
36
|
-
this.listChildLocalNames = ["sbb-menu-button", "sbb-menu-link"],
|
|
37
|
-
[
|
|
41
|
+
this.listChildLocalNames = ["sbb-menu-button", "sbb-menu-link"], h(this, l, u(this, f, null)), h(this, b, (u(this, w), u(this, k, ""))), this._menu = u(this, E), this._triggerElement = null, this._isPointerDownEventOnMenu = !1, this._escapableOverlayController = new R(this), this._focusTrapController = new I(this), this._scrollHandler = new V(), this._inertController = new K(this), this._mobileBreakpoint = $, this._mediaMatcher = new H(this, {
|
|
42
|
+
[this._mobileBreakpoint]: (e) => {
|
|
38
43
|
e && (this.state === "opening" || this.state === "opened") ? this._scrollHandler.disableScroll() : this._scrollHandler.enableScroll();
|
|
39
44
|
}
|
|
40
|
-
}), this._pointerDownListener = (e) => {
|
|
41
|
-
|
|
45
|
+
}), this._darkModeController = new q(this, () => this._syncNegative()), this._language = new F(this), this._nestedMenu = null, this._pointerDownListener = (e) => {
|
|
46
|
+
const t = e.target.closest("sbb-menu");
|
|
47
|
+
this._isPointerDownEventOnMenu = A(this._menu, e) || this._nestedMenus().some((n) => t === n);
|
|
42
48
|
}, this._closeOnBackdropClick = (e) => {
|
|
43
|
-
|
|
44
|
-
|
|
49
|
+
const t = e.target;
|
|
50
|
+
!this._isPointerDownEventOnMenu && !A(this._menu, e) && !this._nestedMenus().some((n) => n === t) && this.closeAll();
|
|
51
|
+
}, this.addEventListener?.("keydown", (e) => this._handleKeyDown(e));
|
|
45
52
|
}
|
|
46
53
|
/**
|
|
47
54
|
* The element that will trigger the menu overlay.
|
|
@@ -49,64 +56,85 @@ let ee = 0, ge = (() => {
|
|
|
49
56
|
* For attribute usage, provide an id reference.
|
|
50
57
|
*/
|
|
51
58
|
get trigger() {
|
|
52
|
-
return
|
|
59
|
+
return m(this, l);
|
|
53
60
|
}
|
|
54
61
|
set trigger(e) {
|
|
55
|
-
|
|
62
|
+
h(this, l, e);
|
|
56
63
|
}
|
|
57
64
|
/**
|
|
58
65
|
* This will be forwarded as aria-label to the inner list.
|
|
59
66
|
* Used only if the menu automatically renders the actions inside as a list.
|
|
60
67
|
*/
|
|
61
68
|
get listAccessibilityLabel() {
|
|
62
|
-
return
|
|
69
|
+
return m(this, b);
|
|
63
70
|
}
|
|
64
71
|
set listAccessibilityLabel(e) {
|
|
65
|
-
|
|
72
|
+
h(this, b, e);
|
|
73
|
+
}
|
|
74
|
+
firstUpdated(e) {
|
|
75
|
+
super.firstUpdated(e), this._configureTrigger();
|
|
76
|
+
}
|
|
77
|
+
escapeStrategy() {
|
|
78
|
+
this.closeAll();
|
|
66
79
|
}
|
|
67
80
|
/**
|
|
68
81
|
* Opens the menu on trigger click.
|
|
69
82
|
*/
|
|
70
83
|
open() {
|
|
71
|
-
this.state === "closing" ||
|
|
84
|
+
if (!(this.state === "closing" || this.state === "opened" || !this._menu || !this.dispatchBeforeOpenEvent())) {
|
|
85
|
+
if (this._isNested()) {
|
|
86
|
+
const e = this._parentMenu();
|
|
87
|
+
e.toggleState("nested-child", !0), e._nestedMenu !== this && e._nestedMenu?.close(), e._nestedMenu = this;
|
|
88
|
+
}
|
|
89
|
+
this.showPopover?.(), this.state = "opening", this._setMenuPosition(), this._triggerElement?.setAttribute("aria-expanded", "true"), this._isMobile() && this._scrollHandler.disableScroll(), this._isZeroAnimationDuration() && this._handleOpening();
|
|
90
|
+
}
|
|
72
91
|
}
|
|
73
|
-
/**
|
|
74
|
-
* Closes the menu.
|
|
75
|
-
*/
|
|
92
|
+
/** Closes the menu and all its nested menus. */
|
|
76
93
|
close() {
|
|
77
|
-
this.
|
|
94
|
+
this._close();
|
|
95
|
+
}
|
|
96
|
+
/** Closes the menu and all related menus nested and parent menus). */
|
|
97
|
+
closeAll() {
|
|
98
|
+
this._mainMenu()._close(!0);
|
|
99
|
+
}
|
|
100
|
+
/** @param [closeAll='false'] - If true, it ensures animations are correct by toggling some states when closing all related menus at once. */
|
|
101
|
+
_close(e = !1) {
|
|
102
|
+
if (!(this.state === "opening" && !this._isNested() || !this.dispatchBeforeCloseEvent())) {
|
|
103
|
+
if (this._nestedMenu?._close(e), this._isNested()) {
|
|
104
|
+
const t = this._parentMenu();
|
|
105
|
+
this.toggleState("close-all", e), t.toggleState("skip-animation", e), t.toggleState("nested-child", !1), t._nestedMenu = null;
|
|
106
|
+
}
|
|
107
|
+
this.state = "closing", this._triggerElement?.setAttribute("aria-expanded", "false"), this._isZeroAnimationDuration() && this._handleClosing();
|
|
108
|
+
}
|
|
78
109
|
}
|
|
79
110
|
_isZeroAnimationDuration() {
|
|
80
|
-
return
|
|
111
|
+
return W(this, "--sbb-menu-animation-duration");
|
|
81
112
|
}
|
|
82
113
|
_handleOpening() {
|
|
83
|
-
this.state = "opened", this._inertController.activate(), this._escapableOverlayController.connect(), this._focusTrapController.focusInitialElement(), this._focusTrapController.enabled = !0, this._attachWindowEvents(), this.dispatchOpenEvent();
|
|
114
|
+
this.state = "opened", this._isNested() ? this._updateNestedInert() : this._inertController.activate(), this._escapableOverlayController.connect(), this._focusTrapController.focusInitialElement(), this._focusTrapController.enabled = !0, this._attachWindowEvents(), this.dispatchOpenEvent();
|
|
84
115
|
}
|
|
85
116
|
_handleClosing() {
|
|
86
|
-
this.state = "closed", this.hidePopover?.(), this._menu?.firstElementChild?.scrollTo(0, 0), this._inertController.deactivate(), this._triggerElement?.focus({
|
|
117
|
+
this.state = "closed", this.toggleState("skip-animation", !1), this.toggleState("close-all", !1), this.hidePopover?.(), this._menu?.firstElementChild?.scrollTo(0, 0), this._isNested() ? this._updateNestedInert() : this._inertController.deactivate(), this._triggerElement?.focus({
|
|
87
118
|
// When inside the sbb-header, we prevent the scroll to avoid the snapping to the top of the page
|
|
88
|
-
preventScroll:
|
|
119
|
+
preventScroll: ["sbb-header-button", "sbb-header-link"].includes(this._triggerElement.localName)
|
|
89
120
|
}), this._escapableOverlayController.disconnect(), this.dispatchCloseEvent(), this._windowEventsController?.abort(), this._focusTrapController.enabled = !1, this._scrollHandler.enableScroll();
|
|
90
121
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Handles click and checks if its target is a sbb-menu-button/sbb-menu-link.
|
|
93
|
-
*/
|
|
94
|
-
_onClick(e) {
|
|
95
|
-
const t = e.target;
|
|
96
|
-
(t?.localName === "sbb-menu-button" || t?.localName === "sbb-menu-link") && this.close();
|
|
97
|
-
}
|
|
98
122
|
_handleKeyDown(e) {
|
|
99
|
-
if (!
|
|
123
|
+
if (!P(e))
|
|
100
124
|
return;
|
|
101
125
|
e.preventDefault();
|
|
102
|
-
const t = Array.from(this.querySelectorAll("sbb-menu-button, sbb-menu-link")).filter((
|
|
126
|
+
const t = Array.from(this.querySelectorAll("sbb-menu-button, sbb-menu-link")).concat(this.shadowRoot.querySelector("sbb-menu-button")).filter((d) => (!d.disabled || d.disabledInteractive) && D.isVisible(d)), n = t.findIndex((d) => d === e.target);
|
|
103
127
|
let c;
|
|
104
128
|
switch (e.key) {
|
|
105
129
|
case "ArrowUp":
|
|
106
130
|
case "ArrowDown":
|
|
131
|
+
c = U(e, n, t.length);
|
|
132
|
+
break;
|
|
107
133
|
case "ArrowLeft":
|
|
134
|
+
this._isNested() && this.close();
|
|
135
|
+
break;
|
|
108
136
|
case "ArrowRight":
|
|
109
|
-
|
|
137
|
+
e.target.hasAttribute("data-sbb-menu-trigger") && e.target.click();
|
|
110
138
|
break;
|
|
111
139
|
case "PageUp":
|
|
112
140
|
case "Home":
|
|
@@ -116,39 +144,35 @@ let ee = 0, ge = (() => {
|
|
|
116
144
|
case "PageDown":
|
|
117
145
|
c = t.length - 1;
|
|
118
146
|
break;
|
|
119
|
-
// this should never happen since all the case allowed by `isArrowKeyOrPageKeysPressed` should be covered
|
|
120
|
-
default:
|
|
121
|
-
c = 0;
|
|
122
147
|
}
|
|
123
|
-
t[c].focus();
|
|
148
|
+
c !== void 0 && t[c].focus();
|
|
124
149
|
}
|
|
125
150
|
// Removes trigger click listener on trigger change.
|
|
126
151
|
createRenderRoot() {
|
|
127
152
|
const e = super.createRenderRoot();
|
|
128
|
-
return this.shadowRoot?.addEventListener("slotchange", (t) =>
|
|
153
|
+
return this.shadowRoot?.addEventListener("slotchange", (t) => {
|
|
154
|
+
this._syncNegative(), this._checkListCase(t);
|
|
155
|
+
}, {
|
|
129
156
|
capture: !0
|
|
130
157
|
}), e;
|
|
131
158
|
}
|
|
132
159
|
connectedCallback() {
|
|
133
|
-
this.popover = "manual", super.connectedCallback(), this.id ||= `sbb-menu-${
|
|
160
|
+
this.popover = "manual", super.connectedCallback(), this.id ||= `sbb-menu-${re++}`, this.hasUpdated && this._configureTrigger();
|
|
134
161
|
}
|
|
135
162
|
disconnectedCallback() {
|
|
136
163
|
super.disconnectedCallback(), this._triggerElement = null, this._triggerAbortController?.abort(), this._windowEventsController?.abort(), this._scrollHandler.enableScroll();
|
|
137
164
|
}
|
|
138
|
-
requestUpdate(e, t,
|
|
139
|
-
super.requestUpdate(e, t,
|
|
140
|
-
}
|
|
141
|
-
firstUpdated(e) {
|
|
142
|
-
super.firstUpdated(e), this._configureTrigger();
|
|
165
|
+
requestUpdate(e, t, n) {
|
|
166
|
+
super.requestUpdate(e, t, n), !O && (!e || e === "trigger") && this.hasUpdated && this._configureTrigger();
|
|
143
167
|
}
|
|
144
168
|
_checkListCase(e) {
|
|
145
169
|
this.children?.length && Array.from(this.children ?? []).every((t) => t.localName === "sbb-menu-button" || t.localName === "sbb-menu-link") || (e.stopImmediatePropagation(), this.listChildren.length && (this.listChildren.forEach((t) => t.removeAttribute("slot")), this.listChildren = []));
|
|
146
170
|
}
|
|
147
171
|
// Check if the trigger is valid and attach click event listeners.
|
|
148
172
|
_configureTrigger() {
|
|
149
|
-
this.trigger !== this._triggerElement && (this._triggerAbortController?.abort(),
|
|
173
|
+
this.trigger !== this._triggerElement && (this._triggerAbortController?.abort(), X(this._triggerElement), this._triggerElement = this.trigger, this._triggerElement && (Y(this._triggerElement, "menu", this.id, this.state), this._triggerAbortController = new AbortController(), this._triggerElement.addEventListener("click", () => this.open(), {
|
|
150
174
|
signal: this._triggerAbortController.signal
|
|
151
|
-
})));
|
|
175
|
+
}), this.toggleState("nested", ["sbb-menu-button", "sbb-menu-link"].includes(this._triggerElement.localName)), this._triggerElement.toggleAttribute("data-sbb-menu-trigger", !0)));
|
|
152
176
|
}
|
|
153
177
|
_attachWindowEvents() {
|
|
154
178
|
this._windowEventsController = new AbortController(), document.addEventListener("scroll", () => this._setMenuPosition(), {
|
|
@@ -160,61 +184,108 @@ let ee = 0, ge = (() => {
|
|
|
160
184
|
}), window.addEventListener("resize", () => this._setMenuPosition(), {
|
|
161
185
|
passive: !0,
|
|
162
186
|
signal: this._windowEventsController.signal
|
|
163
|
-
}), window.addEventListener("pointerdown", this._pointerDownListener, {
|
|
187
|
+
}), this._isNested() || (window.addEventListener("pointerdown", this._pointerDownListener, {
|
|
164
188
|
signal: this._windowEventsController.signal
|
|
165
189
|
}), window.addEventListener("pointerup", this._closeOnBackdropClick, {
|
|
166
190
|
signal: this._windowEventsController.signal
|
|
167
|
-
});
|
|
191
|
+
}));
|
|
168
192
|
}
|
|
169
193
|
// Close menu at any click on an interactive element inside the <sbb-menu> that bubbles to the container.
|
|
170
|
-
|
|
194
|
+
_interactiveElementClick(e) {
|
|
171
195
|
const t = e.target;
|
|
172
|
-
|
|
196
|
+
ne.includes(t.nodeName) && !t.hasAttribute("disabled") && !t.hasAttribute("data-sbb-menu-trigger") && t.id !== "sbb-menu__back-button" && this.closeAll();
|
|
197
|
+
}
|
|
198
|
+
/** Converts the linked list into an array of SbbMenuElement. */
|
|
199
|
+
_nestedMenus() {
|
|
200
|
+
const e = [];
|
|
201
|
+
let t = this._nestedMenu;
|
|
202
|
+
for (; t; )
|
|
203
|
+
e.push(t), t = t._nestedMenu;
|
|
204
|
+
return e;
|
|
205
|
+
}
|
|
206
|
+
_parentMenu() {
|
|
207
|
+
return this._triggerElement?.closest("sbb-menu") ?? null;
|
|
208
|
+
}
|
|
209
|
+
/** The outermost menu. */
|
|
210
|
+
_mainMenu() {
|
|
211
|
+
return this._isNested() ? this._parentMenu()?._mainMenu() ?? this : this;
|
|
212
|
+
}
|
|
213
|
+
_isNested() {
|
|
214
|
+
return !!this._parentMenu();
|
|
215
|
+
}
|
|
216
|
+
_updateNestedInert() {
|
|
217
|
+
this._inertController.restoreAllExempted(), this._mainMenu()._nestedMenus().forEach((e) => this._inertController.exempt(e));
|
|
218
|
+
}
|
|
219
|
+
// Check if nested menu should be closed.
|
|
220
|
+
_handleMouseOver(e) {
|
|
221
|
+
const t = e.target, n = this._isMobile();
|
|
222
|
+
!n && this._nestedMenu && !t.classList.contains("sbb-menu__content") && t.getAttribute("aria-expanded") !== "true" && this._nestedMenu.close(), t.hasAttribute("data-sbb-menu-trigger") && !n && t.click();
|
|
173
223
|
}
|
|
174
224
|
// Set menu position (x, y) to '0' once the menu is closed and the transition ended to prevent the
|
|
175
225
|
// viewport from overflowing. And set the focus to the first focusable element once the menu is open.
|
|
176
226
|
// In rare cases it can be that the animationEnd event is triggered twice.
|
|
177
227
|
// To avoid entering a corrupt state, exit when state is not expected.
|
|
178
228
|
_onMenuAnimationEnd(e) {
|
|
179
|
-
e.animationName === "open" && this.state === "opening" ? this._handleOpening() : e.animationName === "close" && this.state === "closing" && this._handleClosing();
|
|
229
|
+
(e.animationName === "open" || e.animationName === "open-sideways") && this.state === "opening" ? this._handleOpening() : (e.animationName === "close" || e.animationName === "close-sideways") && this.state === "closing" && this._handleClosing();
|
|
180
230
|
}
|
|
181
231
|
// Set menu position and max height if the breakpoint is medium-ultra.
|
|
182
232
|
_setMenuPosition() {
|
|
183
|
-
if (
|
|
233
|
+
if (this._isMobile() || !this._menu || !this._triggerElement || this.state === "closing")
|
|
184
234
|
return;
|
|
185
|
-
const e =
|
|
186
|
-
|
|
235
|
+
const e = this._isNested() ? te(this.shadowRoot.querySelector(".sbb-menu__content"), this._triggerElement, this.shadowRoot.querySelector(".sbb-menu__container"), {
|
|
236
|
+
horizontalOffset: N,
|
|
237
|
+
verticalOffset: ie,
|
|
238
|
+
contentSelector: ".sbb-menu__content"
|
|
239
|
+
}) : ee(this.shadowRoot.querySelector(".sbb-menu__content"), this._triggerElement, this.shadowRoot.querySelector(".sbb-menu__container"), {
|
|
240
|
+
verticalOffset: N
|
|
187
241
|
});
|
|
188
242
|
this.style.setProperty("--sbb-menu-position-x", `${e.left}px`), this.style.setProperty("--sbb-menu-position-y", `${e.top}px`), this.style.setProperty("--sbb-menu-max-height", e.maxHeight);
|
|
189
243
|
}
|
|
244
|
+
_syncNegative() {
|
|
245
|
+
this.querySelectorAll("[data-sbb-link], [data-sbb-button]")?.forEach((e) => {
|
|
246
|
+
customElements.upgrade(e), e.negative = !this._darkModeController.matches();
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
_isMobile() {
|
|
250
|
+
return this._mediaMatcher.matches(this._mobileBreakpoint) ?? !0;
|
|
251
|
+
}
|
|
190
252
|
render() {
|
|
191
|
-
return
|
|
253
|
+
return M`
|
|
192
254
|
<div class="sbb-menu__container">
|
|
193
255
|
<div
|
|
194
256
|
@animationend=${this._onMenuAnimationEnd}
|
|
257
|
+
@mouseover=${(e) => this._handleMouseOver(e)}
|
|
195
258
|
class="sbb-menu"
|
|
196
|
-
${
|
|
259
|
+
${T((e) => this._menu = e)}
|
|
197
260
|
>
|
|
198
261
|
<div
|
|
199
|
-
@click=${(e) => this.
|
|
200
|
-
@scroll=${(e) =>
|
|
262
|
+
@click=${(e) => this._interactiveElementClick(e)}
|
|
263
|
+
@scroll=${(e) => G(e, document)}
|
|
201
264
|
class="sbb-menu__content"
|
|
202
265
|
>
|
|
203
|
-
${this.listChildren.length ? this.renderList({ class: "sbb-menu-list", ariaLabel: this.listAccessibilityLabel }) :
|
|
266
|
+
${this.listChildren.length ? this.renderList({ class: "sbb-menu-list", ariaLabel: this.listAccessibilityLabel }) : M`<slot></slot>`}
|
|
267
|
+
<sbb-divider></sbb-divider>
|
|
268
|
+
<sbb-menu-button
|
|
269
|
+
id="sbb-menu__back-button"
|
|
270
|
+
@click=${() => this.close()}
|
|
271
|
+
icon-name="chevron-small-left-small"
|
|
272
|
+
>
|
|
273
|
+
${Q[this._language.current]}
|
|
274
|
+
</sbb-menu-button>
|
|
204
275
|
</div>
|
|
205
276
|
</div>
|
|
206
277
|
</div>
|
|
207
278
|
`;
|
|
208
279
|
}
|
|
209
|
-
}, l = new WeakMap(), b = new WeakMap(),
|
|
210
|
-
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
211
|
-
|
|
212
|
-
t.trigger =
|
|
213
|
-
} }, metadata: e },
|
|
214
|
-
t.listAccessibilityLabel =
|
|
215
|
-
} }, metadata: e },
|
|
216
|
-
})(),
|
|
280
|
+
}, l = new WeakMap(), b = new WeakMap(), o = a, (() => {
|
|
281
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(p[Symbol.metadata] ?? null) : void 0;
|
|
282
|
+
v = [Z(), S()], y = [j(), S({ attribute: "list-accessibility-label" })], _(a, null, v, { kind: "accessor", name: "trigger", static: !1, private: !1, access: { has: (t) => "trigger" in t, get: (t) => t.trigger, set: (t, n) => {
|
|
283
|
+
t.trigger = n;
|
|
284
|
+
} }, metadata: e }, f, w), _(a, null, y, { kind: "accessor", name: "listAccessibilityLabel", static: !1, private: !1, access: { has: (t) => "listAccessibilityLabel" in t, get: (t) => t.listAccessibilityLabel, set: (t, n) => {
|
|
285
|
+
t.listAccessibilityLabel = n;
|
|
286
|
+
} }, metadata: e }, k, E), _(null, i = { value: o }, s, { kind: "class", name: o.name, metadata: e }, null, r), o = i.value, e && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
287
|
+
})(), a.styles = se, a.role = "menu", u(o, r), o;
|
|
217
288
|
})();
|
|
218
289
|
export {
|
|
219
|
-
|
|
290
|
+
Ee as SbbMenuElement
|
|
220
291
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { __esDecorate as
|
|
1
|
+
import { __esDecorate as n, __runInitializers as m } from "tslib";
|
|
2
2
|
import { css as c, LitElement as g, html as d } from "lit";
|
|
3
|
-
import { customElement as
|
|
4
|
-
const
|
|
3
|
+
import { customElement as v } from "lit/decorators.js";
|
|
4
|
+
const f = c`*,:before,:after{box-sizing:border-box}:host{--sbb-message-subtitle-color: var(--sbb-color-granite);--sbb-message-subtitle-color: light-dark(var(--sbb-color-granite), var(--sbb-color-platinum));--sbb-message-image-margin-block: 0 var(--sbb-spacing-responsive-s);--sbb-message-image-border-radius: var(--sbb-border-radius-4x);--sbb-message-legend-margin-block: var(--sbb-spacing-responsive-xxxs) 0;--sbb-message-action-margin-block: var(--sbb-spacing-responsive-xxxs) 0;display:block}.sbb-message__container{text-align:center}::slotted(sbb-title[slot=title]){margin:0}::slotted([slot=image]){display:block;margin-inline:auto!important;margin-block:var(--sbb-message-image-margin-block)!important;width:100%}::slotted([slot=subtitle]){--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-message-subtitle-color);margin:0}::slotted([slot=legend]){--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);padding:0;color:var(--sbb-color-granite);color:light-dark(var(--sbb-color-granite),var(--sbb-color-cement));margin-block:var(--sbb-message-legend-margin-block)}::slotted([slot=action]){margin-block:var(--sbb-message-action-margin-block)}`;
|
|
5
5
|
let y = (() => {
|
|
6
6
|
var e;
|
|
7
|
-
let
|
|
8
|
-
return e = class extends
|
|
7
|
+
let r = [v("sbb-message")], o, l = [], t, i = g;
|
|
8
|
+
return e = class extends i {
|
|
9
9
|
_configureTitle(s) {
|
|
10
|
-
const a = s.target.assignedElements().find((
|
|
10
|
+
const a = s.target.assignedElements().find((b) => b.localName === "sbb-title");
|
|
11
11
|
a && (customElements.upgrade(a), a.visualLevel = "5");
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
@@ -22,9 +22,9 @@ let y = (() => {
|
|
|
22
22
|
`;
|
|
23
23
|
}
|
|
24
24
|
}, t = e, (() => {
|
|
25
|
-
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
26
|
-
|
|
27
|
-
})(), e.styles =
|
|
25
|
+
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(i[Symbol.metadata] ?? null) : void 0;
|
|
26
|
+
n(null, o = { value: t }, r, { kind: "class", name: t.name, metadata: s }, null, l), t = o.value, s && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s });
|
|
27
|
+
})(), e.styles = f, m(t, l), t;
|
|
28
28
|
})();
|
|
29
29
|
export {
|
|
30
30
|
y as SbbMessageElement
|
|
@@ -2,21 +2,21 @@ var v = (t) => {
|
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
4
|
var h = (t, i, e) => i.has(t) || v("Cannot " + e);
|
|
5
|
-
var g = (t, i, e) => (h(t, i, "read from private field"), e ? e.call(t) : i.get(t)), f = (t, i, e) => i.has(t) ? v("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e),
|
|
5
|
+
var g = (t, i, e) => (h(t, i, "read from private field"), e ? e.call(t) : i.get(t)), f = (t, i, e) => i.has(t) ? v("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), r = (t, i, e, s) => (h(t, i, "write to private field"), s ? s.call(t, e) : i.set(t, e), e);
|
|
6
6
|
import { __esDecorate as m, __runInitializers as u } from "tslib";
|
|
7
7
|
import { property as p } from "lit/decorators.js";
|
|
8
8
|
import { html as y } from "lit/static-html.js";
|
|
9
9
|
import { isLean as z } from "../../core/dom.js";
|
|
10
10
|
import { css as x } from "lit";
|
|
11
11
|
import "../../icon.js";
|
|
12
|
-
const k = x`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-action-color: var(--sbb-color-
|
|
12
|
+
const k = x`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-action-color: var(--sbb-color-4-negative);--sbb-navigation-action-icon-display: none;display:block;outline:none!important}:host([data-section-action][data-action-active].sbb-active){--sbb-navigation-action-icon-display: block}:host([data-action-active]){--sbb-navigation-action-color: var(--sbb-color-5)}@media (forced-colors: active){:host([data-action-active]){--sbb-navigation-action-color: Highlight}}sbb-icon{display:var(--sbb-navigation-action-icon-display);position:absolute;inset-inline-start:calc((var(--sbb-size-icon-ui-small) + var(--sbb-spacing-fixed-1x)) * -1);inset-block-start:calc(1em * var(--sbb-typo-line-height-body-text) / 2);translate:0 -50%}@media (any-hover: hover){:host(:hover){--sbb-navigation-action-color: var(--sbb-color-5)}}@media (forced-colors: active){:host([data-button]){--sbb-navigation-action-color: ButtonText}}:is(.sbb-navigation-button,.sbb-navigation-link){--sbb-title-font-size: var(--sbb-title-font-size-level-4);margin-block:var(--sbb-title-margin-block-start, 0) var(--sbb-title-margin-block-end, 0);margin-inline:0;font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height, var(--sbb-typo-line-height-titles));letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);cursor:pointer;position:relative;text-decoration:none;display:flex;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;transition:color var(--sbb-disable-animation-duration, var(--sbb-animation-duration-3x)) ease;-webkit-hyphens:auto;hyphens:auto;text-align:left;color:var(--sbb-navigation-action-color);outline:none}@media (forced-colors: active){:is(.sbb-navigation-button,.sbb-navigation-link){transition:none}}:host([size=m]) :is(.sbb-navigation-button,.sbb-navigation-link){--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host([size=s]) :is(.sbb-navigation-button,.sbb-navigation-link){--sbb-text-font-size: var(--sbb-font-size-text-xxs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}:host(:focus-visible) :is(.sbb-navigation-button,.sbb-navigation-link),:is(.sbb-navigation-button,.sbb-navigation-link):focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);border-radius:calc(var(--sbb-border-radius-4x) - var(--sbb-focus-outline-offset))}`, I = (t) => (() => {
|
|
13
13
|
var n, o;
|
|
14
14
|
let e = t, s, l = [], c = [];
|
|
15
15
|
return o = class extends e {
|
|
16
16
|
constructor(...a) {
|
|
17
17
|
super(...a);
|
|
18
18
|
f(this, n);
|
|
19
|
-
|
|
19
|
+
r(this, n, u(this, l, z() ? "s" : "l")), this.connectedSection = u(this, c), this._navigationMarker = null, this._navigationSection = null, this.addEventListener?.("click", () => {
|
|
20
20
|
!this.hasAttribute("data-action-active") && this._navigationMarker && !this.connectedSection && this.marker?.select(this);
|
|
21
21
|
});
|
|
22
22
|
}
|
|
@@ -28,7 +28,7 @@ const k = x`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-action
|
|
|
28
28
|
return g(this, n);
|
|
29
29
|
}
|
|
30
30
|
set size(a) {
|
|
31
|
-
|
|
31
|
+
r(this, n, a);
|
|
32
32
|
}
|
|
33
33
|
/** The navigation marker in which the action is nested. */
|
|
34
34
|
get marker() {
|
|
@@ -46,8 +46,8 @@ const k = x`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-action
|
|
|
46
46
|
}
|
|
47
47
|
}, n = new WeakMap(), (() => {
|
|
48
48
|
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(e[Symbol.metadata] ?? null) : void 0;
|
|
49
|
-
s = [p({ reflect: !0 })], m(o, null, s, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (
|
|
50
|
-
|
|
49
|
+
s = [p({ reflect: !0 })], m(o, null, s, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (b) => "size" in b, get: (b) => b.size, set: (b, d) => {
|
|
50
|
+
b.size = d;
|
|
51
51
|
} }, metadata: a }, l, c), a && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
|
|
52
52
|
})(), o.styles = k, o;
|
|
53
53
|
})();
|