@sbb-esta/lyne-elements 2.11.1 → 2.11.2
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/accordion/accordion.component.js +19 -22
- package/action-group/action-group.component.js +3 -5
- package/alert/alert/alert.component.js +1 -2
- package/alert/alert-group/alert-group.component.js +2 -3
- package/autocomplete/autocomplete-base-element.js +71 -82
- package/autocomplete/autocomplete.component.js +31 -36
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +44 -52
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +3 -4
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +17 -20
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +23 -26
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +9 -9
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +29 -33
- package/button/mini-button/mini-button.component.js +1 -1
- package/button/mini-button-group/mini-button-group.component.js +1 -2
- package/calendar/calendar.component.js +8 -13
- package/card/card/card.component.js +12 -12
- package/card/card-badge/card-badge.component.js +16 -16
- package/card/common/card-action-common.js +23 -25
- package/checkbox/checkbox/checkbox.component.js +17 -20
- package/checkbox/checkbox-group/checkbox-group.component.js +39 -52
- package/checkbox/checkbox-panel/checkbox-panel.component.js +22 -25
- package/checkbox/common/checkbox-common.js +13 -15
- package/chip/chip-group/chip-group.component.js +59 -70
- package/clock/clock.component.js +50 -60
- package/container/container/container.component.js +28 -29
- package/container/sticky-bar/sticky-bar.component.js +26 -27
- package/core/a11y/focus-trap-controller.js +11 -14
- package/core/a11y/focus.js +27 -29
- package/core/a11y/input-modality-detector.js +18 -19
- package/core/a11y/interactivity-checker.js +10 -10
- package/core/base-elements/button-base-element.js +13 -18
- package/core/base-elements/link-base-element.js +3 -6
- package/core/base-elements/open-close-base-element.js +1 -1
- package/core/controllers/connected-abort-controller.js +2 -4
- package/core/controllers/escapable-overlay-controller.js +10 -12
- package/core/controllers/id-reference-controller.js +13 -14
- package/core/controllers/inert-controller.js +8 -10
- package/core/controllers/slot-state-controller.js +16 -26
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/date-adapter.js +21 -21
- package/core/datetime/native-date-adapter.js +11 -11
- package/core/decorators/date-converter.js +10 -12
- package/core/decorators/date-only-type.js +5 -6
- package/core/decorators/force-type.js +4 -5
- package/core/dom/breakpoint.js +8 -8
- package/core/dom/input-element.js +4 -9
- package/core/eventing/event-emitter.js +4 -5
- package/core/mixins/form-associated-checkbox-mixin.js +32 -37
- package/core/mixins/form-associated-input-mixin.js +58 -64
- package/core/mixins/form-associated-mixin.js +42 -44
- package/core/mixins/form-associated-radio-button-mixin.js +3 -5
- package/core/mixins/hydration-mixin.js +12 -13
- package/core/mixins/named-slot-list-mixin.js +32 -37
- package/core/mixins/panel-mixin.js +26 -27
- package/core/mixins.js +1 -1
- package/core/overlay/position.js +23 -23
- package/core/styles/core/mediaqueries.scss +1 -1
- package/core/styles/core.scss +27 -28
- package/core/styles/mixins/table.scss +1 -24
- package/core/testing/event-spy.js +2 -4
- package/core/testing/wait-for-image-ready.js +8 -9
- package/core/testing/wait-for-render.js +8 -9
- package/custom-elements.json +2 -2
- package/date-input/date-input.component.js +2 -4
- package/datepicker/common/datepicker-association-controllers.js +21 -24
- package/datepicker/common/datepicker-button.js +53 -57
- package/datepicker/datepicker/datepicker.component.js +82 -95
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +74 -81
- package/development/accordion/accordion.component.js +4 -7
- package/development/action-group/action-group.component.js +3 -5
- package/development/alert/alert/alert.component.js +2 -3
- package/development/alert/alert-group/alert-group.component.js +2 -3
- package/development/autocomplete/autocomplete-base-element.js +19 -30
- package/development/autocomplete/autocomplete.component.js +7 -12
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +10 -18
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +3 -4
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +4 -7
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +4 -7
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -2
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +1 -1
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +5 -9
- package/development/button/accent-button/accent-button.component.js +1 -1
- package/development/button/accent-button-link/accent-button-link.component.js +1 -1
- package/development/button/accent-button-static/accent-button-static.component.js +1 -1
- package/development/button/button/button.component.js +1 -1
- package/development/button/button-link/button-link.component.js +1 -1
- package/development/button/button-static/button-static.component.js +1 -1
- package/development/button/common/button-common.js +1 -1
- package/development/button/mini-button/mini-button.component.js +1 -1
- package/development/button/mini-button-group/mini-button-group.component.js +2 -3
- package/development/button/secondary-button/secondary-button.component.js +1 -1
- package/development/button/secondary-button-link/secondary-button-link.component.js +1 -1
- package/development/button/secondary-button-static/secondary-button-static.component.js +1 -1
- package/development/button/transparent-button/transparent-button.component.js +1 -1
- package/development/button/transparent-button-link/transparent-button-link.component.js +1 -1
- package/development/button/transparent-button-static/transparent-button-static.component.js +1 -1
- package/development/calendar/calendar.component.js +9 -14
- package/development/card/card/card.component.js +1 -1
- package/development/card/card-badge/card-badge.component.js +1 -1
- package/development/card/card-button/card-button.component.js +1 -1
- package/development/card/card-link/card-link.component.js +1 -1
- package/development/card/common/card-action-common.js +3 -5
- package/development/checkbox/checkbox/checkbox.component.js +2 -5
- package/development/checkbox/checkbox-group/checkbox-group.component.js +8 -21
- package/development/checkbox/checkbox-panel/checkbox-panel.component.js +2 -5
- package/development/checkbox/common/checkbox-common.js +3 -5
- package/development/chip/chip/chip.component.js +1 -1
- package/development/chip/chip-group/chip-group.component.js +15 -26
- package/development/chip-label/chip-label.component.js +1 -1
- package/development/clock/clock.component.js +23 -33
- package/development/container/container/container.component.js +2 -3
- package/development/container/sticky-bar/sticky-bar.component.js +2 -3
- package/development/core/a11y/arrow-navigation.js +1 -1
- package/development/core/a11y/fake-event-detection.js +1 -1
- package/development/core/a11y/focus-trap-controller.js +6 -9
- package/development/core/a11y/focus-visible-within-controller.js +1 -1
- package/development/core/a11y/focus.js +8 -10
- package/development/core/a11y/input-modality-detector.js +2 -3
- package/development/core/a11y/interactivity-checker.js +2 -2
- package/development/core/base-elements/action-base-element.js +2 -3
- package/development/core/base-elements/button-base-element.js +6 -11
- package/development/core/base-elements/link-base-element.js +4 -7
- package/development/core/base-elements/open-close-base-element.js +2 -2
- package/development/core/config/config.js +1 -1
- package/development/core/controllers/connected-abort-controller.js +3 -5
- package/development/core/controllers/escapable-overlay-controller.js +3 -5
- package/development/core/controllers/id-reference-controller.js +2 -3
- package/development/core/controllers/inert-controller.js +4 -6
- package/development/core/controllers/language-controller.js +1 -1
- package/development/core/controllers/media-matchers-controller.js +1 -1
- package/development/core/controllers/slot-state-controller.js +8 -18
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/date-adapter.js +5 -5
- package/development/core/datetime/native-date-adapter.js +2 -2
- package/development/core/decorators/date-converter.js +3 -5
- package/development/core/decorators/date-only-type.js +2 -3
- package/development/core/decorators/force-type.js +3 -4
- package/development/core/decorators/get-override.js +1 -1
- package/development/core/decorators/handle-distinct-change.js +1 -1
- package/development/core/decorators/host-attributes.js +1 -1
- package/development/core/decorators/slot-state.js +1 -1
- package/development/core/dom/animation.js +1 -1
- package/development/core/dom/breakpoint.js +2 -2
- package/development/core/dom/find-referenced-element.js +1 -1
- package/development/core/dom/host-context.js +1 -1
- package/development/core/dom/input-element.js +3 -4
- package/development/core/dom/platform.js +1 -1
- package/development/core/dom/scroll.js +1 -1
- package/development/core/dom/set-or-remove-attribute.js +1 -1
- package/development/core/eventing/composed-path-has-attribute.js +1 -1
- package/development/core/eventing/event-emitter.js +2 -3
- package/development/core/eventing/form-element-handlers.js +1 -1
- package/development/core/eventing/forward-event.js +1 -1
- package/development/core/eventing/throttle.js +1 -1
- package/development/core/i18n/i18n.js +1 -1
- package/development/core/mixins/animation-complete-mixin.js +1 -1
- package/development/core/mixins/disabled-mixin.js +1 -1
- package/development/core/mixins/form-associated-checkbox-mixin.js +6 -9
- package/development/core/mixins/form-associated-input-mixin.js +14 -20
- package/development/core/mixins/form-associated-mixin.js +5 -7
- package/development/core/mixins/form-associated-radio-button-mixin.js +7 -9
- package/development/core/mixins/hydration-mixin.js +3 -4
- package/development/core/mixins/named-slot-list-mixin.js +4 -7
- package/development/core/mixins/negative-mixin.js +1 -1
- package/development/core/mixins/panel-mixin.js +2 -3
- package/development/core/mixins/required-mixin.js +1 -1
- package/development/core/mixins/update-scheduler-mixin.js +1 -1
- package/development/core/overlay/overlay-option-panel.js +1 -1
- package/development/core/overlay/overlay-trigger-attributes.js +1 -1
- package/development/core/overlay/overlay.js +1 -1
- package/development/core/overlay/position.js +5 -5
- package/development/core/testing/event-spy.js +3 -5
- package/development/core/testing/mocha-extensions.js +1 -1
- package/development/core/testing/wait-for-condition.js +1 -1
- package/development/core/testing/wait-for-image-ready.js +2 -3
- package/development/core/testing/wait-for-render.js +2 -3
- package/development/date-input/date-input.component.js +4 -6
- package/development/datepicker/common/datepicker-association-controllers.js +6 -9
- package/development/datepicker/common/datepicker-button.js +7 -11
- package/development/datepicker/datepicker/datepicker.component.js +22 -35
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.js +13 -20
- package/development/dialog/dialog/dialog.component.js +16 -27
- package/development/dialog/dialog-actions/dialog-actions.component.js +1 -1
- package/development/dialog/dialog-content/dialog-content.component.js +1 -1
- package/development/dialog/dialog-title/dialog-title.component.js +1 -1
- package/development/divider/divider.component.js +1 -1
- package/development/expansion-panel/expansion-panel/expansion-panel.component.js +9 -13
- package/development/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +4 -5
- package/development/file-selector/common/file-selector-common.js +2 -3
- package/development/file-selector/file-selector/file-selector.component.js +1 -1
- package/development/file-selector/file-selector-dropzone/file-selector-dropzone.component.js +1 -1
- package/development/flip-card/flip-card/flip-card.component.js +7 -13
- package/development/flip-card/flip-card-details/flip-card-details.component.js +2 -3
- package/development/flip-card/flip-card-summary/flip-card-summary.component.js +2 -3
- package/development/footer/footer.component.js +1 -1
- package/development/form-error/form-error.component.js +3 -4
- package/development/form-field/form-field/form-field.component.js +19 -30
- package/development/form-field/form-field-clear/form-field-clear.component.js +4 -6
- package/development/header/common/header-action-common.js +1 -1
- package/development/header/header/header.component.js +5 -8
- package/development/header/header-button/header-button.component.js +1 -1
- package/development/header/header-link/header-link.component.js +1 -1
- package/development/icon/icon-base.js +1 -1
- package/development/icon/icon-name-mixin.js +1 -1
- package/development/icon/icon-request.js +2 -3
- package/development/icon/icon-validate.js +1 -1
- package/development/icon/icon.component.js +1 -1
- package/development/image/image.component.js +7 -9
- package/development/journey-header/journey-header.component.js +1 -1
- package/development/lead-container/lead-container.component.js +1 -1
- package/development/link/block-link/block-link.component.js +1 -1
- package/development/link/block-link-button/block-link-button.component.js +1 -1
- package/development/link/block-link-static/block-link-static.component.js +1 -1
- package/development/link/common/block-link-common.js +1 -1
- package/development/link/common/inline-link-common.js +1 -1
- package/development/link/link/link.component.js +1 -1
- package/development/link/link-button/link-button.component.js +1 -1
- package/development/link/link-static/link-static.component.js +1 -1
- package/development/link-common-CJEWffDZ.js +1 -1
- package/development/link-list/common/link-list-base.js +1 -1
- package/development/link-list/link-list/link-list.component.js +1 -1
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +1 -1
- package/development/loading-indicator/loading-indicator.component.js +1 -1
- package/development/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
- package/development/logo/logo.component.js +1 -1
- package/development/map-container/map-container.component.js +2 -3
- package/development/menu/common/menu-action-common.js +1 -1
- package/development/menu/menu/menu.component.js +17 -25
- package/development/menu/menu-button/menu-button.component.js +1 -1
- package/development/menu/menu-link/menu-link.component.js +1 -1
- package/development/message/message.component.js +1 -1
- package/development/navigation/common/navigation-action-common.js +3 -5
- package/development/navigation/navigation/navigation.component.js +19 -35
- package/development/navigation/navigation-button/navigation-button.component.js +1 -1
- package/development/navigation/navigation-link/navigation-link.component.js +1 -1
- package/development/navigation/navigation-list/navigation-list.component.js +1 -1
- package/development/navigation/navigation-marker/navigation-marker.component.js +4 -6
- package/development/navigation/navigation-section/navigation-section.component.js +22 -32
- package/development/notification/notification.component.js +22 -24
- package/development/option/optgroup/optgroup-base-element.js +4 -6
- package/development/option/optgroup/optgroup.component.js +6 -10
- package/development/option/option/option-base-element.js +3 -4
- package/development/option/option/option.component.js +7 -10
- package/development/overlay/overlay-base-element.js +4 -6
- package/development/overlay/overlay.component.js +7 -9
- package/development/paginator/common/paginator-common.js +1 -1
- package/development/paginator/compact-paginator/compact-paginator.component.js +1 -1
- package/development/paginator/paginator/paginator.component.js +2 -3
- package/development/popover/popover/popover.component.js +12 -17
- package/development/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/development/radio-button/common/radio-button-common.js +6 -10
- package/development/radio-button/radio-button/radio-button.component.js +2 -5
- package/development/radio-button/radio-button-group/radio-button-group.component.js +8 -24
- package/development/radio-button/radio-button-panel/radio-button-panel.component.js +3 -7
- package/development/screen-reader-only/screen-reader-only.component.js +1 -1
- package/development/select/select.component.js +26 -48
- package/development/selection-expansion-panel/selection-expansion-panel.component.js +7 -11
- package/development/sidebar/icon-sidebar/icon-sidebar.component.js +1 -1
- package/development/sidebar/icon-sidebar-button/icon-sidebar-button.component.js +1 -1
- package/development/sidebar/icon-sidebar-container/icon-sidebar-container.component.js +4 -7
- package/development/sidebar/icon-sidebar-content/icon-sidebar-content.component.js +1 -1
- package/development/sidebar/icon-sidebar-link/icon-sidebar-link.component.js +1 -1
- package/development/sidebar/sidebar/sidebar.component.js +8 -15
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.js +1 -1
- package/development/sidebar/sidebar-container/sidebar-container.component.js +9 -13
- package/development/sidebar/sidebar-content/sidebar-content.component.js +1 -1
- package/development/sidebar/sidebar-title/sidebar-title.component.js +2 -2
- package/development/signet/signet.component.js +1 -1
- package/development/skiplink-list/skiplink-list.component.js +1 -1
- package/development/slider/slider.component.js +3 -4
- package/development/status/status.component.js +1 -1
- package/development/stepper/step/step.component.js +5 -7
- package/development/stepper/step-label/step-label.component.js +3 -4
- package/development/stepper/stepper/stepper.component.js +16 -29
- package/development/table/table-wrapper/table-wrapper.component.js +2 -7
- package/development/tabs/tab/tab.component.js +1 -1
- package/development/tabs/tab-group/tab-group.component.js +23 -38
- package/development/tabs/tab-label/tab-label.component.js +1 -1
- package/development/tag/tag/tag.component.js +6 -12
- package/development/tag/tag-group/tag-group.component.js +5 -13
- package/development/teaser/teaser.component.js +1 -1
- package/development/teaser-hero/teaser-hero.component.js +1 -1
- package/development/teaser-product/common/teaser-product-common.js +1 -1
- package/development/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/development/teaser-product/teaser-product-static/teaser-product-static.component.js +1 -1
- package/development/time-input/time-input.component.js +8 -12
- package/development/timetable-occupancy/timetable-occupancy.component.js +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.js +2 -3
- package/development/title/title-base.js +1 -1
- package/development/title/title.component.js +1 -1
- package/development/toast/toast.component.js +4 -7
- package/development/toggle/toggle/toggle.component.js +8 -12
- package/development/toggle/toggle-option/toggle-option.component.js +9 -16
- package/development/toggle-check/toggle-check.component.js +1 -1
- package/development/train/train/train.component.js +1 -1
- package/development/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/development/train/train-formation/train-formation.component.js +5 -7
- package/development/train/train-wagon/train-wagon.component.js +1 -1
- package/development/visual-checkbox/visual-checkbox.component.js +1 -1
- package/dialog/dialog/dialog.component.js +59 -70
- package/expansion-panel/expansion-panel/expansion-panel.component.js +5 -9
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +31 -32
- package/file-selector/common/file-selector-common.js +1 -2
- package/flip-card/flip-card/flip-card.component.js +48 -54
- package/flip-card/flip-card-details/flip-card-details.component.js +16 -17
- package/flip-card/flip-card-summary/flip-card-summary.component.js +18 -19
- package/form-error/form-error.component.js +13 -14
- package/form-field/form-field/form-field.component.js +128 -139
- package/form-field/form-field-clear/form-field-clear.component.js +20 -22
- package/header/header/header.component.js +25 -28
- package/icon/icon-request.js +10 -11
- package/icon-sidebar-button-common-CM-ueEhH.js +7 -0
- package/image/image.component.js +4 -6
- package/map-container/map-container.component.js +1 -2
- package/menu/menu/menu.component.js +48 -56
- package/navigation/common/navigation-action-common.js +19 -21
- package/navigation/navigation/navigation.component.js +74 -93
- package/navigation/navigation-marker/navigation-marker.component.js +26 -28
- package/navigation/navigation-section/navigation-section.component.js +79 -89
- package/notification/notification.component.js +18 -20
- package/option/optgroup/optgroup-base-element.js +40 -42
- package/option/optgroup/optgroup.component.js +16 -20
- package/option/option/option-base-element.js +3 -4
- package/option/option/option.component.js +28 -31
- package/overlay/overlay-base-element.js +25 -27
- package/overlay/overlay.component.js +38 -40
- package/package.json +1 -1
- package/paginator/paginator/paginator.component.js +3 -4
- package/popover/popover/popover.component.js +82 -91
- package/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/radio-button/common/radio-button-common.js +11 -15
- package/radio-button/radio-button/radio-button.component.js +20 -23
- package/radio-button/radio-button-group/radio-button-group.component.js +27 -43
- package/radio-button/radio-button-panel/radio-button-panel.component.js +31 -35
- package/select/select.component.js +89 -111
- package/selection-expansion-panel/selection-expansion-panel.component.js +35 -39
- package/sidebar/common.js +1 -1
- package/sidebar/icon-sidebar-container/icon-sidebar-container.component.js +10 -13
- package/sidebar/sidebar/sidebar.component.js +61 -68
- package/sidebar/sidebar-container/sidebar-container.component.js +29 -33
- package/sidebar/sidebar-title/sidebar-title.component.js +1 -1
- package/sidebar.js +1 -1
- package/slider/slider.component.js +3 -4
- package/standard-theme.css +0 -25
- package/stepper/step/step.component.js +22 -24
- package/stepper/step-label/step-label.component.js +2 -3
- package/stepper/stepper/stepper.component.js +72 -86
- package/table/table-wrapper/table-wrapper.component.js +13 -14
- package/table.css +0 -25
- package/tabs/tab-group/tab-group.component.js +77 -92
- package/tabs/tab-label/tab-label.component.js +10 -10
- package/tag/tag/tag.component.js +55 -61
- package/tag/tag-group/tag-group.component.js +21 -29
- package/teaser/teaser.component.js +1 -1
- package/teaser-product/common.js +1 -1
- package/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/teaser-product-common-C8oSkIxy.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +62 -66
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +9 -10
- package/toast/toast.component.js +4 -7
- package/toggle/toggle/toggle.component.js +38 -42
- package/toggle/toggle-option/toggle-option.component.js +47 -54
- package/train/train-formation/train-formation.component.js +41 -43
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +0 -530
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +0 -1123
- package/icon-sidebar-button-common-DG8bnrBu.js +0 -7
- package/teaser-product-common-CpMAlYEp.js +0 -5
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var I = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { css as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { SbbFocusTrapController as
|
|
10
|
-
import { SbbIdReferenceController as
|
|
11
|
-
import { hostAttributes as
|
|
12
|
-
import { setOrRemoveAttribute as
|
|
13
|
-
import { i18nGoBack as
|
|
14
|
-
import { SbbUpdateSchedulerMixin as
|
|
15
|
-
import { removeAriaOverlayTriggerAttributes as
|
|
4
|
+
var U = (e, a, n) => a.has(e) || I("Cannot " + n);
|
|
5
|
+
var v = (e, a, n) => (U(e, a, "read from private field"), n ? n.call(e) : a.get(e)), _ = (e, a, n) => a.has(e) ? I("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, n), l = (e, a, n, r) => (U(e, a, "write to private field"), r ? r.call(e, n) : a.set(e, n), n);
|
|
6
|
+
import { __esDecorate as p, __runInitializers as b } from "tslib";
|
|
7
|
+
import { css as O, LitElement as D, isServer as K, nothing as M, html as R } from "lit";
|
|
8
|
+
import { customElement as q, property as m } from "lit/decorators.js";
|
|
9
|
+
import { SbbFocusTrapController as $, sbbInputModalityDetector as P, IS_FOCUSABLE_QUERY as Z } from "../../core/a11y.js";
|
|
10
|
+
import { SbbIdReferenceController as H, SbbLanguageController as j, SbbMediaMatcherController as F, SbbMediaQueryBreakpointMediumAndBelow as Q } from "../../core/controllers.js";
|
|
11
|
+
import { hostAttributes as W, forceType as f, omitEmptyConverter as G } from "../../core/decorators.js";
|
|
12
|
+
import { setOrRemoveAttribute as Y, isZeroAnimationDuration as J, isBreakpoint as V } from "../../core/dom.js";
|
|
13
|
+
import { i18nGoBack as X } from "../../core/i18n.js";
|
|
14
|
+
import { SbbUpdateSchedulerMixin as tt } from "../../core/mixins.js";
|
|
15
|
+
import { removeAriaOverlayTriggerAttributes as it, setAriaOverlayTriggerAttributes as et } from "../../core/overlay.js";
|
|
16
16
|
import "../../button/transparent-button.js";
|
|
17
17
|
import "../../divider.js";
|
|
18
|
-
const
|
|
19
|
-
let
|
|
20
|
-
var g, d, h,
|
|
21
|
-
let
|
|
18
|
+
const at = O`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-section-display: none;--sbb-navigation-section-column: 1 / 5;--sbb-navigation-section-position: fixed;--sbb-navigation-section-pointer-events: none;--sbb-navigation-section-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-3x) );--sbb-navigation-section-animation-easing: ease-out;--sbb-navigation-section-padding-inline: var(--sbb-layout-base-offset-responsive);--sbb-navigation-section-padding-block: var(--sbb-spacing-responsive-l);--sbb-navigation-section-translate: 100%;--sbb-navigation-section-content-padding-inline-start: var(--sbb-spacing-fixed-12x);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-navigation-section-width: 100dvw;--sbb-navigation-section-height: 100dvh;display:var(--sbb-navigation-section-display);position:var(--sbb-navigation-section-position);grid-column:var(--sbb-navigation-section-column);inset-inline-start:0;inset-block-start:0;width:var(--sbb-navigation-section-width);height:var(--sbb-navigation-section-height);z-index:var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index))}@media (min-width: 64rem){:host{--sbb-navigation-section-column: 5 / 9;--sbb-navigation-section-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-navigation-section-padding-block: var(--sbb-spacing-responsive-xl);--sbb-navigation-section-padding-inline: var(--sbb-spacing-fixed-8x) var(--sbb-layout-base-offset-responsive);--sbb-navigation-section-position: relative;--sbb-navigation-section-translate: 0;--sbb-navigation-section-content-padding-inline-start: 0;--sbb-navigation-section-width: calc( 100% + var(--sbb-layout-base-offset-responsive) + var(--sbb-grid-base-gutter-responsive) );translate:calc(var(--sbb-grid-base-gutter-responsive) * -1) 0}}@media (min-width: 80rem){:host{--sbb-navigation-section-column: 5 / 13}}@media (min-width: 90rem){:host{--sbb-navigation-section-column: 6 / 17;--sbb-navigation-section-padding-block: var(--sbb-spacing-responsive-xxl) var(--sbb-spacing-responsive-l)}}:host([data-state=opened]){--sbb-navigation-section-pointer-events: all}:host([data-state=opening]){--sbb-navigation-section-position: absolute}:host(:is([data-state=opening],[data-state=closing])){--sbb-navigation-section-pointer-events: none}:host([data-state]:not([data-state=closed])){--sbb-navigation-section-display: block}::slotted(*){padding-inline-start:var(--sbb-navigation-section-content-padding-inline-start)}::slotted([data-sbb-button]){grid-column-start:1}.sbb-navigation-section__container{pointer-events:var(--sbb-navigation-section-pointer-events);height:var(--sbb-navigation-section-height)}.sbb-navigation-section{display:none;border:none;margin:0;width:100%;height:100%;color:var(--sbb-color-white);background-color:transparent;padding:0;overflow:hidden}:host([data-state]:not([data-state=closed])) .sbb-navigation-section{display:block;animation-name:open;animation-duration:var(--sbb-navigation-section-animation-duration);animation-timing-function:var(--sbb-navigation-section-animation-easing)}:host([data-state][data-state=closing]) .sbb-navigation-section{animation-name:close}@media (forced-colors: active){.sbb-navigation-section{outline:var(--sbb-border-width-1x) solid CanvasText}}.sbb-navigation-section__wrapper{--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: var(--sbb-color-white-alpha-30);--sbb-scrollbar-color-hover: var(--sbb-color-white-alpha-60);--sbb-scrollbar-track-color: transparent;--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x)}.sbb-navigation-section__wrapper::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation-section__wrapper::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation-section__wrapper::-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-navigation-section__wrapper::-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-navigation-section__wrapper::-webkit-scrollbar-button,.sbb-navigation-section__wrapper::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-navigation-section__wrapper{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-navigation-section__wrapper{height:100%;padding-block:var(--sbb-navigation-section-padding-block);outline:none;overflow-y:auto}:host(:is([data-state=opening],[data-state=closing])) .sbb-navigation-section__wrapper{--sbb-scrollbar-color: transparent;scrollbar-color:transparent transparent}.sbb-navigation-section__header{position:relative;display:flex;align-items:center;gap:var(--sbb-spacing-fixed-1x);margin-block-start:var(--sbb-spacing-responsive-xxl);padding-inline-start:var(--sbb-navigation-section-content-padding-inline-start)}@media (min-width: 64rem){.sbb-navigation-section__header{margin-block-start:0;padding-inline-start:0}}@media (min-width: 80rem){.sbb-navigation-section__header{grid-column:1/4}}.sbb-navigation-section__back{position:absolute;translate:calc((100% + var(--sbb-spacing-fixed-1x)) * -1) 0}@media (min-width: 64rem){.sbb-navigation-section__back{display:none}}.sbb-navigation-section__title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-4)}@media (min-width: 64rem){.sbb-navigation-section__title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-2)}}.sbb-navigation-section__content{display:grid;grid-template-columns:1fr;grid-gap:var(--sbb-spacing-responsive-l) var(--sbb-grid-base-gutter-responsive);padding-inline:var(--sbb-navigation-section-padding-inline)}@media (min-width: 64rem){.sbb-navigation-section__content{opacity:0;translate:0 var(--sbb-spacing-fixed-3x);transition-duration:var(--sbb-navigation-section-animation-duration);transition-delay:var(--sbb-navigation-section-animation-duration);transition-timing-function:var(--sbb-navigation-section-animation-easing);transition-property:opacity,translate}:host([data-state=opened]) .sbb-navigation-section__content{opacity:1;translate:0 0}}@media (min-width: 80rem){.sbb-navigation-section__content{grid-template-columns:repeat(3,1fr)}}:host([data-state=closing]) .sbb-navigation-section__content{transition-delay:0s}@keyframes open{0%{translate:var(--sbb-navigation-section-translate) 0}to{translate:0 0}}@keyframes close{0%{translate:0 0}to{translate:var(--sbb-navigation-section-translate) 0}}`;
|
|
19
|
+
let nt = 0, ft = (() => {
|
|
20
|
+
var c, g, d, h, o;
|
|
21
|
+
let e = [q("sbb-navigation-section"), W({
|
|
22
22
|
slot: "navigation-section"
|
|
23
|
-
})],
|
|
24
|
-
return o = class extends
|
|
23
|
+
})], a, n = [], r, y = tt(D), w, k = [], E = [], C, x = [], L = [], A, S = [], z = [], B, N = [], T = [];
|
|
24
|
+
return o = class extends y {
|
|
25
25
|
constructor() {
|
|
26
|
-
var t, i;
|
|
27
26
|
super();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, this.addController(new
|
|
35
|
-
[
|
|
36
|
-
this._state !== "closed" && this._setNavigationInert(
|
|
27
|
+
_(this, c);
|
|
28
|
+
_(this, g);
|
|
29
|
+
_(this, d);
|
|
30
|
+
_(this, h);
|
|
31
|
+
l(this, c, b(this, k, "")), l(this, g, (b(this, E), b(this, x, null))), l(this, d, (b(this, L), b(this, S, ""))), l(this, h, (b(this, z), b(this, N, ""))), this._firstLevelNavigation = (b(this, T), null), this._triggerElement = null, this._triggerIdReferenceController = new H(this, "trigger"), this._language = new j(this), this._focusTrapController = new $(this), this._lastKeydownEvent = null, this._handleNavigationSectionClose = (t) => {
|
|
32
|
+
t.composedPath().filter((i) => i instanceof HTMLElement).some((i) => this._isCloseElement(i)) && this.close();
|
|
33
|
+
}, this.addController(new F(this, {
|
|
34
|
+
[Q]: (t) => {
|
|
35
|
+
this._state !== "closed" && this._setNavigationInert(t);
|
|
37
36
|
}
|
|
38
|
-
})),
|
|
39
|
-
this._lastKeydownEvent =
|
|
40
|
-
}),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(O = this._triggerElement) == null || O.focus();
|
|
37
|
+
})), this.addEventListener?.("keydown", (t) => {
|
|
38
|
+
this._lastKeydownEvent = t;
|
|
39
|
+
}), this.addEventListener?.("focusout", (t) => {
|
|
40
|
+
if (t.relatedTarget instanceof HTMLElement && !this.contains(t.relatedTarget) && P.mostRecentModality === "keyboard" && this._lastKeydownEvent?.key === "Tab" && this._triggerElement) {
|
|
41
|
+
const i = this.closest("sbb-navigation"), s = Array.from(i?.querySelectorAll(Z) ?? []).filter((u) => !this.contains(u));
|
|
42
|
+
if (this._lastKeydownEvent.shiftKey || !s.length)
|
|
43
|
+
this._triggerElement?.focus();
|
|
46
44
|
else {
|
|
47
|
-
const
|
|
48
|
-
(
|
|
45
|
+
const u = s.indexOf(this._triggerElement);
|
|
46
|
+
(s[u + 1] ?? i.closeButton)?.focus();
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
});
|
|
@@ -54,44 +52,44 @@ let bt = 0, Ct = (() => {
|
|
|
54
52
|
* The label to be shown before the action list.
|
|
55
53
|
*/
|
|
56
54
|
get titleContent() {
|
|
57
|
-
return
|
|
55
|
+
return v(this, c);
|
|
58
56
|
}
|
|
59
57
|
set titleContent(t) {
|
|
60
|
-
|
|
58
|
+
l(this, c, t);
|
|
61
59
|
}
|
|
62
60
|
/**
|
|
63
61
|
* The element that will trigger the navigation section.
|
|
64
62
|
* Accepts both a string (id of an element) or an SbbNavigationButtonElement.
|
|
65
63
|
*/
|
|
66
64
|
get trigger() {
|
|
67
|
-
return
|
|
65
|
+
return v(this, g);
|
|
68
66
|
}
|
|
69
67
|
set trigger(t) {
|
|
70
|
-
|
|
68
|
+
l(this, g, t);
|
|
71
69
|
}
|
|
72
70
|
/**
|
|
73
71
|
* This will be forwarded as aria-label to the nav element and is read as a title of the navigation-section.
|
|
74
72
|
*/
|
|
75
73
|
get accessibilityLabel() {
|
|
76
|
-
return
|
|
74
|
+
return v(this, d);
|
|
77
75
|
}
|
|
78
76
|
set accessibilityLabel(t) {
|
|
79
|
-
|
|
77
|
+
l(this, d, t);
|
|
80
78
|
}
|
|
81
79
|
/**
|
|
82
80
|
* This will be forwarded as aria-label to the back button element.
|
|
83
81
|
*/
|
|
84
82
|
get accessibilityBackLabel() {
|
|
85
|
-
return
|
|
83
|
+
return v(this, h);
|
|
86
84
|
}
|
|
87
85
|
set accessibilityBackLabel(t) {
|
|
88
|
-
|
|
86
|
+
l(this, h, t);
|
|
89
87
|
}
|
|
90
88
|
/**
|
|
91
89
|
* The state of the navigation section.
|
|
92
90
|
*/
|
|
93
91
|
set _state(t) {
|
|
94
|
-
this.setAttribute("data-state", t),
|
|
92
|
+
this.setAttribute("data-state", t), Y(this, "aria-hidden", this._state !== "opened" ? "true" : null);
|
|
95
93
|
}
|
|
96
94
|
get _state() {
|
|
97
95
|
return this.getAttribute("data-state");
|
|
@@ -100,44 +98,38 @@ let bt = 0, Ct = (() => {
|
|
|
100
98
|
* Opens the navigation section on trigger click.
|
|
101
99
|
*/
|
|
102
100
|
open() {
|
|
103
|
-
|
|
104
|
-
this._state !== "closed" || !this.hasUpdated || (this._isNavigationButton(this._triggerElement) && ((i = (t = this._triggerElement) == null ? void 0 : t.marker) == null || i.select(this._triggerElement)), this._closePreviousNavigationSection(), this._state = "opening", this.startUpdate(), this.inert = !0, (e = this._triggerElement) == null || e.setAttribute("aria-expanded", "true"), this._isZeroAnimationDuration() && this._handleOpening());
|
|
101
|
+
this._state !== "closed" || !this.hasUpdated || (this._isNavigationButton(this._triggerElement) && this._triggerElement?.marker?.select(this._triggerElement), this._closePreviousNavigationSection(), this._state = "opening", this.startUpdate(), this.inert = !0, this._triggerElement?.setAttribute("aria-expanded", "true"), this._isZeroAnimationDuration() && this._handleOpening());
|
|
105
102
|
}
|
|
106
103
|
_isZeroAnimationDuration() {
|
|
107
|
-
return
|
|
104
|
+
return J(this, "--sbb-navigation-section-animation-duration");
|
|
108
105
|
}
|
|
109
106
|
_handleOpening() {
|
|
110
107
|
this._state = "opened", this.inert = !1, this._attachWindowEvents(), this._setNavigationInert(), this._focusTrapController.focusInitialElement(), this._checkActiveAction(), this.completeUpdate();
|
|
111
108
|
}
|
|
112
109
|
_handleClosing() {
|
|
113
|
-
|
|
114
|
-
this._state = "closed", (i = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".sbb-navigation-section__container")) == null || i.scrollTo(0, 0), (e = this._windowEventsController) == null || e.abort(), this._resetLists(), this._setNavigationInert(), this._isBelowLarge() && this._triggerElement && this._triggerElement.focus(), this.completeUpdate();
|
|
110
|
+
this._state = "closed", this.shadowRoot?.querySelector(".sbb-navigation-section__container")?.scrollTo(0, 0), this._windowEventsController?.abort(), this._resetLists(), this._setNavigationInert(), this._isBelowLarge() && this._triggerElement && this._triggerElement.focus(), this.completeUpdate();
|
|
115
111
|
}
|
|
116
112
|
_closePreviousNavigationSection() {
|
|
117
|
-
|
|
118
|
-
(i = (t = this._firstLevelNavigation) == null ? void 0 : t.activeNavigationSection) == null || i.close();
|
|
113
|
+
this._firstLevelNavigation?.activeNavigationSection?.close();
|
|
119
114
|
}
|
|
120
115
|
/**
|
|
121
116
|
* Closes the navigation section.
|
|
122
117
|
*/
|
|
123
118
|
close() {
|
|
124
|
-
|
|
125
|
-
this._state === "opened" && (this._state = "closing", this.startUpdate(), this.inert = !0, (t = this._triggerElement) == null || t.setAttribute("aria-expanded", "false"), this._isZeroAnimationDuration() && this._handleClosing());
|
|
119
|
+
this._state === "opened" && (this._state = "closing", this.startUpdate(), this.inert = !0, this._triggerElement?.setAttribute("aria-expanded", "false"), this._isZeroAnimationDuration() && this._handleClosing());
|
|
126
120
|
}
|
|
127
121
|
// Check if the trigger is valid and attach click event listeners.
|
|
128
122
|
_configureTrigger() {
|
|
129
|
-
var i, e, l;
|
|
130
123
|
const t = this.trigger instanceof HTMLElement ? this.trigger : this._triggerIdReferenceController.find();
|
|
131
|
-
t !== this._triggerElement && (
|
|
124
|
+
t !== this._triggerElement && (this._triggerAbortController?.abort(), it(this._triggerElement), this._triggerElement = t, this._triggerElement && (et(this._triggerElement, "menu", this.id, this._state), this._triggerAbortController = new AbortController(), this._isNavigationButton(this._triggerElement) && (this._triggerElement.connectedSection = this), this._triggerElement.addEventListener("click", () => this.open(), {
|
|
132
125
|
signal: this._triggerAbortController.signal
|
|
133
|
-
}), this._firstLevelNavigation =
|
|
126
|
+
}), this._firstLevelNavigation = this._triggerElement?.closest?.("sbb-navigation")));
|
|
134
127
|
}
|
|
135
128
|
_isNavigationButton(t) {
|
|
136
|
-
return
|
|
129
|
+
return t?.localName === "sbb-navigation-button";
|
|
137
130
|
}
|
|
138
131
|
_setNavigationInert(t = this._isBelowLarge()) {
|
|
139
|
-
|
|
140
|
-
const i = (e = this._firstLevelNavigation) == null ? void 0 : e.navigationContent;
|
|
132
|
+
const i = this._firstLevelNavigation?.navigationContent;
|
|
141
133
|
i && (i.inert = t && this._state !== "closed");
|
|
142
134
|
}
|
|
143
135
|
// In rare cases it can be that the animationEnd event is triggered twice.
|
|
@@ -159,37 +151,35 @@ let bt = 0, Ct = (() => {
|
|
|
159
151
|
return t.nodeName === "A" || !t.hasAttribute("disabled") && (t.hasAttribute("sbb-navigation-close") || t.hasAttribute("sbb-navigation-section-close"));
|
|
160
152
|
}
|
|
161
153
|
_isBelowLarge() {
|
|
162
|
-
return
|
|
154
|
+
return V("zero", "large") ?? !1;
|
|
163
155
|
}
|
|
164
156
|
// Closes the navigation on "Esc" key pressed.
|
|
165
157
|
_onKeydownEvent(t) {
|
|
166
158
|
this._state === "opened" && t.key === "Escape" && this.close();
|
|
167
159
|
}
|
|
168
160
|
_checkActiveAction() {
|
|
169
|
-
|
|
170
|
-
(t = this.querySelector(":is(sbb-navigation-button, sbb-navigation-link).sbb-active")) == null || t.toggleAttribute("data-action-active", !0);
|
|
161
|
+
this.querySelector(":is(sbb-navigation-button, sbb-navigation-link).sbb-active")?.toggleAttribute("data-action-active", !0);
|
|
171
162
|
}
|
|
172
163
|
connectedCallback() {
|
|
173
|
-
super.connectedCallback(), this.id
|
|
164
|
+
super.connectedCallback(), this.id ||= `sbb-navigation-section-${nt++}`, this._state ||= "closed", this.hasUpdated && this._configureTrigger();
|
|
174
165
|
}
|
|
175
166
|
disconnectedCallback() {
|
|
176
|
-
|
|
177
|
-
super.disconnectedCallback(), this._triggerElement = null, (t = this._triggerAbortController) == null || t.abort(), (i = this._windowEventsController) == null || i.abort();
|
|
167
|
+
super.disconnectedCallback(), this._triggerElement = null, this._triggerAbortController?.abort(), this._windowEventsController?.abort();
|
|
178
168
|
}
|
|
179
|
-
requestUpdate(t, i,
|
|
180
|
-
super.requestUpdate(t, i,
|
|
169
|
+
requestUpdate(t, i, s) {
|
|
170
|
+
super.requestUpdate(t, i, s), !K && (!t || t === "trigger") && this.hasUpdated && this._configureTrigger();
|
|
181
171
|
}
|
|
182
172
|
firstUpdated(t) {
|
|
183
173
|
super.firstUpdated(t), this._configureTrigger();
|
|
184
174
|
}
|
|
185
175
|
render() {
|
|
186
|
-
return
|
|
176
|
+
return R`
|
|
187
177
|
<div class="sbb-navigation-section__container">
|
|
188
178
|
<nav
|
|
189
179
|
@animationend=${this._onAnimationEnd}
|
|
190
180
|
class="sbb-navigation-section"
|
|
191
|
-
aria-labelledby=${this.accessibilityLabel ?
|
|
192
|
-
aria-label=${this.accessibilityLabel ? this.accessibilityLabel :
|
|
181
|
+
aria-labelledby=${this.accessibilityLabel ? M : "title"}
|
|
182
|
+
aria-label=${this.accessibilityLabel ? this.accessibilityLabel : M}
|
|
193
183
|
>
|
|
194
184
|
<div class="sbb-navigation-section__wrapper">
|
|
195
185
|
<div class="sbb-navigation-section__content">
|
|
@@ -198,7 +188,7 @@ let bt = 0, Ct = (() => {
|
|
|
198
188
|
<sbb-transparent-button
|
|
199
189
|
id="sbb-navigation-section-back-button"
|
|
200
190
|
class="sbb-navigation-section__back"
|
|
201
|
-
aria-label=${this.accessibilityBackLabel ||
|
|
191
|
+
aria-label=${this.accessibilityBackLabel || X[this._language.current]}
|
|
202
192
|
negative
|
|
203
193
|
size="m"
|
|
204
194
|
type="button"
|
|
@@ -217,19 +207,19 @@ let bt = 0, Ct = (() => {
|
|
|
217
207
|
</div>
|
|
218
208
|
`;
|
|
219
209
|
}
|
|
220
|
-
},
|
|
221
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
222
|
-
|
|
223
|
-
i.titleContent =
|
|
224
|
-
} }, metadata: t },
|
|
225
|
-
i.trigger =
|
|
226
|
-
} }, metadata: t },
|
|
227
|
-
i.accessibilityLabel =
|
|
228
|
-
} }, metadata: t },
|
|
229
|
-
i.accessibilityBackLabel =
|
|
230
|
-
} }, metadata: t },
|
|
231
|
-
})(), o.styles =
|
|
210
|
+
}, c = new WeakMap(), g = new WeakMap(), d = new WeakMap(), h = new WeakMap(), r = o, (() => {
|
|
211
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(y[Symbol.metadata] ?? null) : void 0;
|
|
212
|
+
w = [f(), m({ attribute: "title-content", reflect: !0, converter: G })], C = [m()], A = [f(), m({ attribute: "accessibility-label" })], B = [f(), m({ attribute: "accessibility-back-label" })], p(o, null, w, { kind: "accessor", name: "titleContent", static: !1, private: !1, access: { has: (i) => "titleContent" in i, get: (i) => i.titleContent, set: (i, s) => {
|
|
213
|
+
i.titleContent = s;
|
|
214
|
+
} }, metadata: t }, k, E), p(o, null, C, { kind: "accessor", name: "trigger", static: !1, private: !1, access: { has: (i) => "trigger" in i, get: (i) => i.trigger, set: (i, s) => {
|
|
215
|
+
i.trigger = s;
|
|
216
|
+
} }, metadata: t }, x, L), p(o, null, A, { kind: "accessor", name: "accessibilityLabel", static: !1, private: !1, access: { has: (i) => "accessibilityLabel" in i, get: (i) => i.accessibilityLabel, set: (i, s) => {
|
|
217
|
+
i.accessibilityLabel = s;
|
|
218
|
+
} }, metadata: t }, S, z), p(o, null, B, { kind: "accessor", name: "accessibilityBackLabel", static: !1, private: !1, access: { has: (i) => "accessibilityBackLabel" in i, get: (i) => i.accessibilityBackLabel, set: (i, s) => {
|
|
219
|
+
i.accessibilityBackLabel = s;
|
|
220
|
+
} }, metadata: t }, N, T), p(null, a = { value: r }, e, { kind: "class", name: r.name, metadata: t }, null, n), r = a.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
221
|
+
})(), o.styles = at, b(r, n), r;
|
|
232
222
|
})();
|
|
233
223
|
export {
|
|
234
|
-
|
|
224
|
+
ft as SbbNavigationSectionElement
|
|
235
225
|
};
|
|
@@ -3,7 +3,7 @@ var B = (e) => {
|
|
|
3
3
|
};
|
|
4
4
|
var M = (e, a, n) => a.has(e) || B("Cannot " + n);
|
|
5
5
|
var c = (e, a, n) => (M(e, a, "read from private field"), n ? n.call(e) : a.get(e)), d = (e, a, n) => a.has(e) ? B("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, n), s = (e, a, n, l) => (M(e, a, "write to private field"), l ? l.call(e, n) : a.set(e, n), n);
|
|
6
|
-
import { __runInitializers as r, __esDecorate as
|
|
6
|
+
import { __runInitializers as r, __esDecorate as h } from "tslib";
|
|
7
7
|
import { ResizeController as F } from "@lit-labs/observers/resize-controller.js";
|
|
8
8
|
import { css as G, LitElement as J, nothing as K, html as P } from "lit";
|
|
9
9
|
import { customElement as Q, property as y } from "lit/decorators.js";
|
|
@@ -16,7 +16,7 @@ import "../button/secondary-button.js";
|
|
|
16
16
|
import "../divider.js";
|
|
17
17
|
import "../icon.js";
|
|
18
18
|
import "../title.js";
|
|
19
|
-
const ei = G`*,:before,:after{box-sizing:border-box}:host{--sbb-notification-margin: 0;--sbb-notification-padding-block: var(--sbb-spacing-responsive-xxs);--sbb-notification-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-notification-color: var(--sbb-color-charcoal);--sbb-notification-icon-color: var(--sbb-notification-type-color);--sbb-notification-icon-margin-block-start: 0;--sbb-notification-border-width: var(--sbb-border-width-1x);--sbb-notification-border: var(--sbb-notification-border-width) solid var(--sbb-notification-type-color);--sbb-notification-base-radius: var(--sbb-border-radius-4x);--sbb-notification-border-radius: calc(var(--sbb-notification-base-radius) / 2) var(--sbb-notification-base-radius) var(--sbb-notification-base-radius) calc(var(--sbb-notification-base-radius) / 2);--sbb-notification-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-notification-timing-function: ease-in;--sbb-notification-content-padding-inline: var(--sbb-spacing-responsive-xxxs) var(--sbb-spacing-responsive-xs);--sbb-focus-outline-color: var(--sbb-focus-outline-color-default);display:block}:host([data-state=opening]:not([animation=open],[animation=all])){--sbb-disable-animation-duration: 0s}:host([data-state=closing]:not([animation=close],[animation=all])){--sbb-disable-animation-duration: 0s}:host([data-resize-disable-animation]){--sbb-disable-animation-duration: 0s}:host([type=info]){--sbb-notification-type-color: var(--sbb-color-smoke);--sbb-notification-type-color-sass: rgb(249.3, 249.3, 249.3);--sbb-notification-icon-color: var(--sbb-notification-color)}:host([type=success]){--sbb-notification-type-color: var(--sbb-color-green);--sbb-notification-type-color-sass: rgb(242.25, 249.15, 244.95)}:host([type=warn]){--sbb-notification-type-color: var(--sbb-color-peach);--sbb-notification-type-color-sass: rgb(254.85, 251.6, 242.25);--sbb-notification-icon-color: var(--sbb-notification-color)}:host([type=error]){--sbb-notification-type-color: var(--sbb-color-red);--sbb-notification-type-color-sass: rgb(254, 242.25, 242.25)}:host([size=s]){--sbb-notification-padding-block: var(--sbb-spacing-responsive-xxxs);--sbb-notification-padding-inline: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs);--sbb-notification-content-padding-inline: var(--sbb-spacing-responsive-xxxs) var(--sbb-spacing-responsive-xxs)}@media (min-width: 37.5rem){:host{--sbb-notification-
|
|
19
|
+
const ei = G`*,:before,:after{box-sizing:border-box}:host{--sbb-notification-margin: 0;--sbb-notification-padding-block: var(--sbb-spacing-responsive-xxs);--sbb-notification-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-notification-color: var(--sbb-color-charcoal);--sbb-notification-icon-color: var(--sbb-notification-type-color);--sbb-notification-icon-margin-block-start: 0;--sbb-notification-border-width: var(--sbb-border-width-1x);--sbb-notification-border: var(--sbb-notification-border-width) solid var(--sbb-notification-type-color);--sbb-notification-base-radius: var(--sbb-border-radius-4x);--sbb-notification-border-radius: calc(var(--sbb-notification-base-radius) / 2) var(--sbb-notification-base-radius) var(--sbb-notification-base-radius) calc(var(--sbb-notification-base-radius) / 2);--sbb-notification-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-notification-timing-function: ease-in;--sbb-notification-content-padding-inline: var(--sbb-spacing-responsive-xxxs) var(--sbb-spacing-responsive-xs);--_sbb-notification-icon-authoritative-font-size: 1em;--_sbb-notification-icon-authoritative-line-height: var(--sbb-typo-line-height-body-text);--sbb-focus-outline-color: var(--sbb-focus-outline-color-default);display:block}:host([data-state=opening]:not([animation=open],[animation=all])){--sbb-disable-animation-duration: 0s}:host([data-state=closing]:not([animation=close],[animation=all])){--sbb-disable-animation-duration: 0s}:host([data-resize-disable-animation]){--sbb-disable-animation-duration: 0s}:host([type=info]){--sbb-notification-type-color: var(--sbb-color-smoke);--sbb-notification-type-color-sass: rgb(249.3, 249.3, 249.3);--sbb-notification-icon-color: var(--sbb-notification-color)}:host([type=success]){--sbb-notification-type-color: var(--sbb-color-green);--sbb-notification-type-color-sass: rgb(242.25, 249.15, 244.95)}:host([type=warn]){--sbb-notification-type-color: var(--sbb-color-peach);--sbb-notification-type-color-sass: rgb(254.85, 251.6, 242.25);--sbb-notification-icon-color: var(--sbb-notification-color)}:host([type=error]){--sbb-notification-type-color: var(--sbb-color-red);--sbb-notification-type-color-sass: rgb(254, 242.25, 242.25)}:host([size=s]){--sbb-notification-padding-block: var(--sbb-spacing-responsive-xxxs);--sbb-notification-padding-inline: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs);--sbb-notification-content-padding-inline: var(--sbb-spacing-responsive-xxxs) var(--sbb-spacing-responsive-xxs)}@media (min-width: 37.5rem){:host([size=s]){--sbb-notification-padding-inline: var(--sbb-spacing-responsive-xxs)}}:host(:where([data-slot-names~=title],[title-content])){--_sbb-notification-icon-authoritative-font-size: var(--sbb-font-size-title-5);--_sbb-notification-icon-authoritative-line-height: var(--sbb-typo-line-height-titles)}:host([size=s]:where([data-slot-names~=title],[title-content])){--_sbb-notification-icon-authoritative-font-size: var(--sbb-font-size-title-6);--_sbb-notification-icon-authoritative-line-height: var(--sbb-typo-line-height-body-text)}.sbb-notification__wrapper{position:relative;inset-inline-start:calc(var(--sbb-notification-base-radius) - var(--sbb-notification-border-width));width:calc(100% - (var(--sbb-notification-base-radius) - var(--sbb-notification-border-width)));border:var(--sbb-notification-border);border-radius:var(--sbb-notification-border-radius);opacity:0;max-height:0;margin:0}.sbb-notification__wrapper:before{content:"";position:absolute;inset:calc(var(--sbb-notification-border-width) * -1) var(--sbb-notification-base-radius) calc(var(--sbb-notification-border-width) * -1) calc(var(--sbb-notification-base-radius) * -1);background-color:var(--sbb-notification-type-color);border:var(--sbb-notification-border);border-radius:var(--sbb-notification-base-radius)}:host(:is([data-state=opened],[data-state=closing])) .sbb-notification__wrapper{opacity:1;max-height:calc(var(--sbb-notification-height) + var(--sbb-notification-border-width) * 2);margin:var(--sbb-notification-margin, 0)}:host([data-state=opening]) .sbb-notification__wrapper{animation-name:open;animation-fill-mode:forwards;animation-duration:var(--sbb-notification-animation-duration);animation-timing-function:var(--sbb-notification-timing-function)}:host([data-state=closing]) .sbb-notification__wrapper{animation-name:close,close-height;animation-fill-mode:forwards;animation-duration:var(--sbb-notification-animation-duration);animation-timing-function:var(--sbb-notification-timing-function);animation-delay:0s,var(--sbb-disable-animation-duration, var(--sbb-animation-duration-2x))}.sbb-notification{--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);position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;padding-block:var(--sbb-notification-padding-block);padding-inline:var(--sbb-notification-padding-inline);color:var(--sbb-notification-color);border-radius:var(--sbb-notification-border-radius);overflow:hidden;background-color:var(--sbb-notification-type-color-sass)}@supports (background-color: color-mix(in srgb,transparent 5%,white)){.sbb-notification{background-color:color-mix(in srgb,var(--sbb-notification-type-color) 5%,white)}}@media (min-width: 37.5rem){.sbb-notification{grid-template-columns:auto 1fr auto;align-items:flex-start}}:host([size=s]) .sbb-notification{--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)}.sbb-notification__icon{color:var(--sbb-notification-icon-color);--sbb-icon-svg-width: var(--sbb-notification-icon-size)}@media (min-width: 37.5rem){.sbb-notification__icon{margin-block-start:max(0rem,(var(--_sbb-notification-icon-authoritative-font-size) * var(--_sbb-notification-icon-authoritative-line-height) - var(--sbb-size-icon-ui-small)) / 2)}}.sbb-notification__title{margin:0}:host(:not([data-slot-names~=title],[title-content])) .sbb-notification__title{display:none}.sbb-notification__content{order:3;grid-area:2/1/3/3;margin-block-start:var(--sbb-spacing-fixed-2x)}@media (min-width: 37.5rem){.sbb-notification__content{order:initial;grid-area:initial;margin-block-start:0;padding-inline:var(--sbb-notification-content-padding-inline)}}.sbb-notification__close-wrapper{display:flex;align-items:center;gap:var(--sbb-spacing-responsive-xxs);height:100%}.sbb-notification__divider{--sbb-divider-color: var(--sbb-notification-type-color);display:none;position:relative;inset-inline-start:var(--sbb-border-width-1x);opacity:.2}@media (min-width: 37.5rem){.sbb-notification__divider{display:block;height:calc(100% - var(--sbb-spacing-fixed-1x) * 2)}}@keyframes open{0%{opacity:0;max-height:0;margin:0}to{opacity:1;max-height:calc(var(--sbb-notification-height) + var(--sbb-notification-border-width) * 2);margin:var(--sbb-notification-margin, 0)}}@keyframes close{0%{opacity:1;margin:var(--sbb-notification-margin, 0)}to{opacity:0;margin:0}}@keyframes close-height{0%{max-height:calc(var(--sbb-notification-height) + var(--sbb-notification-border-width) * 2)}to{max-height:0}}`, ai = /* @__PURE__ */ new Map([
|
|
20
20
|
["info", "circle-information-small"],
|
|
21
21
|
["success", "circle-tick-small"],
|
|
22
22
|
["warn", "circle-exclamation-point-small"],
|
|
@@ -24,8 +24,8 @@ const ei = G`*,:before,:after{box-sizing:border-box}:host{--sbb-notification-mar
|
|
|
24
24
|
]), oi = 150;
|
|
25
25
|
let yi = (() => {
|
|
26
26
|
var m, p, v, _, g, u, o;
|
|
27
|
-
let e = [Q("sbb-notification"), W()], a, n = [], l,
|
|
28
|
-
var
|
|
27
|
+
let e = [Q("sbb-notification"), W()], a, n = [], l, z = J, w, C = [], k = [], O, E = [], L = [], N, T = [], A = [], I, S = [], $ = [], D, R = [], H = [], Z, U = [], j = [];
|
|
28
|
+
var f = (o = class extends z {
|
|
29
29
|
constructor() {
|
|
30
30
|
super(...arguments);
|
|
31
31
|
d(this, m);
|
|
@@ -34,11 +34,11 @@ let yi = (() => {
|
|
|
34
34
|
d(this, _);
|
|
35
35
|
d(this, g);
|
|
36
36
|
d(this, u);
|
|
37
|
-
s(this, m, r(this,
|
|
37
|
+
s(this, m, r(this, C, "info")), s(this, p, (r(this, k), r(this, E, ""))), s(this, v, (r(this, L), r(this, T, "3"))), s(this, _, (r(this, A), r(this, S, !1))), s(this, g, (r(this, $), r(this, R, Y() ? "s" : "m"))), s(this, u, (r(this, H), r(this, U, "all"))), this._notificationElement = r(this, j), this._resizeObserverTimeout = null, this._language = new V(this), this._notificationResizeObserver = new F(this, {
|
|
38
38
|
target: null,
|
|
39
39
|
skipInitial: !0,
|
|
40
40
|
callback: () => this._onNotificationResize()
|
|
41
|
-
}), this._willOpen = new x(this,
|
|
41
|
+
}), this._willOpen = new x(this, f.events.willOpen, { cancelable: !0 }), this._didOpen = new x(this, f.events.didOpen, { cancelable: !0 }), this._willClose = new x(this, f.events.willClose, { cancelable: !0 }), this._didClose = new x(this, f.events.didClose, { cancelable: !0 });
|
|
42
42
|
}
|
|
43
43
|
/** The type of the notification. */
|
|
44
44
|
get type() {
|
|
@@ -102,18 +102,16 @@ let yi = (() => {
|
|
|
102
102
|
this._state === "opened" && this._willClose.emit() && (this._state = "closing", this._isZeroAnimationDuration() && this._handleClosing());
|
|
103
103
|
}
|
|
104
104
|
connectedCallback() {
|
|
105
|
-
this._state
|
|
105
|
+
this._state ||= "closed", super.connectedCallback();
|
|
106
106
|
}
|
|
107
107
|
async firstUpdated(t) {
|
|
108
|
-
|
|
109
|
-
super.firstUpdated(t), this._notificationElement = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".sbb-notification__wrapper"), await this.updateComplete, this._setNotificationHeight(), this._open();
|
|
108
|
+
super.firstUpdated(t), this._notificationElement = this.shadowRoot?.querySelector(".sbb-notification__wrapper"), await this.updateComplete, this._setNotificationHeight(), this._open();
|
|
110
109
|
}
|
|
111
110
|
_isZeroAnimationDuration() {
|
|
112
111
|
return ii(this, "--sbb-notification-animation-duration");
|
|
113
112
|
}
|
|
114
113
|
_setNotificationHeight() {
|
|
115
|
-
|
|
116
|
-
if (!((i = this._notificationElement) != null && i.scrollHeight))
|
|
114
|
+
if (!this._notificationElement?.scrollHeight)
|
|
117
115
|
return;
|
|
118
116
|
const t = `${this._notificationElement.scrollHeight}px`;
|
|
119
117
|
this.style.setProperty("--sbb-notification-height", t);
|
|
@@ -165,27 +163,27 @@ let yi = (() => {
|
|
|
165
163
|
`;
|
|
166
164
|
}
|
|
167
165
|
}, m = new WeakMap(), p = new WeakMap(), v = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), u = new WeakMap(), l = o, (() => {
|
|
168
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
169
|
-
|
|
166
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(z[Symbol.metadata] ?? null) : void 0;
|
|
167
|
+
w = [y({ reflect: !0 })], O = [q(), y({ attribute: "title-content", reflect: !0, converter: X })], N = [y({ attribute: "title-level" })], I = [q(), y({ reflect: !0, type: Boolean })], D = [y({ reflect: !0 })], Z = [y({ reflect: !0 })], h(o, null, w, { kind: "accessor", name: "type", static: !1, private: !1, access: { has: (i) => "type" in i, get: (i) => i.type, set: (i, b) => {
|
|
170
168
|
i.type = b;
|
|
171
|
-
} }, metadata: t },
|
|
169
|
+
} }, metadata: t }, C, k), h(o, null, O, { kind: "accessor", name: "titleContent", static: !1, private: !1, access: { has: (i) => "titleContent" in i, get: (i) => i.titleContent, set: (i, b) => {
|
|
172
170
|
i.titleContent = b;
|
|
173
|
-
} }, metadata: t }, E, L),
|
|
171
|
+
} }, metadata: t }, E, L), h(o, null, N, { kind: "accessor", name: "titleLevel", static: !1, private: !1, access: { has: (i) => "titleLevel" in i, get: (i) => i.titleLevel, set: (i, b) => {
|
|
174
172
|
i.titleLevel = b;
|
|
175
|
-
} }, metadata: t }, T, A),
|
|
173
|
+
} }, metadata: t }, T, A), h(o, null, I, { kind: "accessor", name: "readonly", static: !1, private: !1, access: { has: (i) => "readonly" in i, get: (i) => i.readonly, set: (i, b) => {
|
|
176
174
|
i.readonly = b;
|
|
177
|
-
} }, metadata: t }, S, $),
|
|
175
|
+
} }, metadata: t }, S, $), h(o, null, D, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (i) => "size" in i, get: (i) => i.size, set: (i, b) => {
|
|
178
176
|
i.size = b;
|
|
179
|
-
} }, metadata: t }, R, H),
|
|
177
|
+
} }, metadata: t }, R, H), h(o, null, Z, { kind: "accessor", name: "animation", static: !1, private: !1, access: { has: (i) => "animation" in i, get: (i) => i.animation, set: (i, b) => {
|
|
180
178
|
i.animation = b;
|
|
181
|
-
} }, metadata: t }, U, j),
|
|
179
|
+
} }, metadata: t }, U, j), h(null, a = { value: l }, e, { kind: "class", name: l.name, metadata: t }, null, n), f = l = a.value, t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
182
180
|
})(), o.styles = ei, o.events = {
|
|
183
181
|
willOpen: "willOpen",
|
|
184
182
|
didOpen: "didOpen",
|
|
185
183
|
willClose: "willClose",
|
|
186
184
|
didClose: "didClose"
|
|
187
185
|
}, r(l, n), o);
|
|
188
|
-
return
|
|
186
|
+
return f = l;
|
|
189
187
|
})();
|
|
190
188
|
export {
|
|
191
189
|
yi as SbbNotificationElement
|