@sbb-esta/lyne-elements 1.16.0 → 2.0.1
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.d.ts +4 -1
- package/accordion/accordion.d.ts.map +1 -1
- package/accordion.js +31 -22
- package/action-group/action-group.d.ts +6 -4
- package/action-group/action-group.d.ts.map +1 -1
- package/action-group.js +20 -17
- package/alert/alert/alert.d.ts +7 -23
- package/alert/alert/alert.d.ts.map +1 -1
- package/alert/alert-group/alert-group.d.ts +0 -4
- package/alert/alert-group/alert-group.d.ts.map +1 -1
- package/alert/alert-group.js +46 -47
- package/alert/alert.js +74 -132
- package/animation.css +4 -8
- package/autocomplete/autocomplete-base-element.d.ts +7 -6
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete.d.ts +0 -1
- package/autocomplete/autocomplete.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts +0 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +11 -11
- package/autocomplete-grid/autocomplete-grid.js +0 -3
- package/autocomplete.js +68 -67
- package/button/accent-button/accent-button.d.ts +19 -0
- package/button/accent-button/accent-button.d.ts.map +1 -0
- package/button/accent-button-link/accent-button-link.d.ts +19 -0
- package/button/accent-button-link/accent-button-link.d.ts.map +1 -0
- package/button/accent-button-link.d.ts +2 -0
- package/button/accent-button-link.d.ts.map +1 -0
- package/button/accent-button-link.js +17 -0
- package/button/accent-button-static/accent-button-static.d.ts +19 -0
- package/button/accent-button-static/accent-button-static.d.ts.map +1 -0
- package/button/accent-button-static.d.ts +2 -0
- package/button/accent-button-static.d.ts.map +1 -0
- package/button/accent-button-static.js +17 -0
- package/button/accent-button.d.ts +2 -0
- package/button/accent-button.d.ts.map +1 -0
- package/button/accent-button.js +17 -0
- package/button/common/button-common.d.ts.map +1 -1
- package/button/common.d.ts.map +1 -1
- package/button/common.js +20 -16
- package/button/mini-button/mini-button.d.ts +4 -3
- package/button/mini-button/mini-button.d.ts.map +1 -1
- package/button/mini-button-group/mini-button-group.d.ts +4 -1
- package/button/mini-button-group/mini-button-group.d.ts.map +1 -1
- package/button/mini-button-group.js +12 -8
- package/button/mini-button.d.ts +0 -1
- package/button/mini-button.d.ts.map +1 -1
- package/button/mini-button.js +10 -20
- package/button.d.ts +3 -3
- package/button.d.ts.map +1 -1
- package/button.js +3 -3
- package/calendar.js +25 -25
- package/card/card/card.d.ts +4 -1
- package/card/card/card.d.ts.map +1 -1
- package/card/card.js +10 -6
- package/checkbox/checkbox/checkbox.d.ts +4 -6
- package/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts +4 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/checkbox/checkbox-group.js +14 -10
- package/checkbox/checkbox-panel/checkbox-panel.d.ts +4 -4
- package/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/checkbox/checkbox-panel.js +21 -18
- package/checkbox/checkbox.js +28 -26
- package/{chip/chip.d.ts → chip-label/chip-label.d.ts} +4 -4
- package/chip-label/chip-label.d.ts.map +1 -0
- package/chip-label.d.ts +2 -0
- package/chip-label.d.ts.map +1 -0
- package/chip-label.js +54 -0
- package/clock.js +1 -1
- package/container/container.js +21 -21
- package/container/sticky-bar/sticky-bar.d.ts +1 -0
- package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/container/sticky-bar.js +20 -12
- package/core/base-elements/button-base-element.d.ts +27 -18
- package/core/base-elements/button-base-element.d.ts.map +1 -1
- package/core/base-elements/open-close-base-element.d.ts.map +1 -1
- package/core/base-elements.js +135 -138
- package/core/datetime/date-adapter.d.ts +2 -1
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.d.ts +1 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime.js +29 -28
- package/core/dom/animation.d.ts +2 -0
- package/core/dom/animation.d.ts.map +1 -0
- package/core/dom/lean-context.d.ts +5 -0
- package/core/dom/lean-context.d.ts.map +1 -0
- package/core/dom.d.ts +2 -2
- package/core/dom.d.ts.map +1 -1
- package/core/dom.js +50 -55
- package/core/eventing/form-element-handlers.d.ts +0 -7
- package/core/eventing/form-element-handlers.d.ts.map +1 -1
- package/core/eventing.d.ts +0 -1
- package/core/eventing.d.ts.map +1 -1
- package/core/eventing.js +28 -49
- package/core/i18n/i18n.d.ts +4 -2
- package/core/i18n/i18n.d.ts.map +1 -1
- package/core/i18n.js +147 -140
- package/core/mixins/disabled-mixin.d.ts +2 -7
- package/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-radio-button-mixin.d.ts +35 -0
- package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -0
- package/core/mixins.d.ts +1 -0
- package/core/mixins.d.ts.map +1 -1
- package/core/mixins.js +347 -220
- package/core/styles/_index.scss +1 -0
- package/core/styles/core.scss +150 -0
- package/core/styles/image.scss +66 -0
- package/core/styles/mixins/animation.scss +2 -4
- package/core/styles/mixins/buttons.scss +7 -4
- package/core/styles/mixins/card.scss +1 -1
- package/core/styles/mixins/chip.scss +35 -35
- package/core/styles/mixins/image.scss +34 -0
- package/core/styles/mixins/overlay.scss +1 -1
- package/core/styles/mixins/panel.scss +1 -1
- package/core/styles/standard-theme.scss +1 -0
- package/core/styles/table.scss +4 -0
- package/core/testing/event-spy.d.ts +2 -1
- package/core/testing/event-spy.d.ts.map +1 -1
- package/core/testing.d.ts +0 -1
- package/core/testing.d.ts.map +1 -1
- package/core/testing.js +48 -57
- package/core.css +113 -0
- package/custom-elements.json +25946 -21671
- package/datepicker/common/datepicker-button.d.ts +3 -5
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.js +30 -29
- package/datepicker/datepicker/datepicker.d.ts +25 -72
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.d.ts +1 -3
- package/datepicker/datepicker-next-day/datepicker-next-day.d.ts.map +1 -1
- package/datepicker/datepicker-next-day.js +10 -12
- package/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts +1 -3
- package/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts.map +1 -1
- package/datepicker/datepicker-previous-day.js +11 -13
- package/datepicker/datepicker.js +129 -157
- package/development/accordion/accordion.d.ts +4 -1
- package/development/accordion/accordion.d.ts.map +1 -1
- package/development/accordion.js +16 -5
- package/development/action-group/action-group.d.ts +6 -4
- package/development/action-group/action-group.d.ts.map +1 -1
- package/development/action-group.js +10 -7
- package/development/alert/alert/alert.d.ts +7 -23
- package/development/alert/alert/alert.d.ts.map +1 -1
- package/development/alert/alert-group/alert-group.d.ts +0 -4
- package/development/alert/alert-group/alert-group.d.ts.map +1 -1
- package/development/alert/alert-group.js +10 -12
- package/development/alert/alert.js +38 -122
- package/development/autocomplete/autocomplete-base-element.d.ts +7 -6
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete.d.ts +0 -1
- package/development/autocomplete/autocomplete.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts +0 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button.js +6 -6
- package/development/autocomplete-grid/autocomplete-grid.js +1 -7
- package/development/autocomplete.js +23 -19
- package/development/button/accent-button/accent-button.d.ts +19 -0
- package/development/button/accent-button/accent-button.d.ts.map +1 -0
- package/development/button/accent-button-link/accent-button-link.d.ts +19 -0
- package/development/button/accent-button-link/accent-button-link.d.ts.map +1 -0
- package/development/button/accent-button-link.d.ts +2 -0
- package/development/button/accent-button-link.d.ts.map +1 -0
- package/development/button/accent-button-link.js +25 -0
- package/development/button/accent-button-static/accent-button-static.d.ts +19 -0
- package/development/button/accent-button-static/accent-button-static.d.ts.map +1 -0
- package/development/button/accent-button-static.d.ts +2 -0
- package/development/button/accent-button-static.d.ts.map +1 -0
- package/development/button/accent-button-static.js +25 -0
- package/development/button/accent-button.d.ts +2 -0
- package/development/button/accent-button.d.ts.map +1 -0
- package/development/button/accent-button.js +25 -0
- package/development/button/common/button-common.d.ts.map +1 -1
- package/development/button/common.d.ts.map +1 -1
- package/development/button/common.js +20 -16
- package/development/button/mini-button/mini-button.d.ts +4 -3
- package/development/button/mini-button/mini-button.d.ts.map +1 -1
- package/development/button/mini-button-group/mini-button-group.d.ts +4 -1
- package/development/button/mini-button-group/mini-button-group.d.ts.map +1 -1
- package/development/button/mini-button-group.js +7 -3
- package/development/button/mini-button.d.ts +0 -1
- package/development/button/mini-button.d.ts.map +1 -1
- package/development/button/mini-button.js +14 -32
- package/development/button.d.ts +3 -3
- package/development/button.d.ts.map +1 -1
- package/development/button.js +3 -3
- package/development/calendar.js +1 -1
- package/development/card/card/card.d.ts +4 -1
- package/development/card/card/card.d.ts.map +1 -1
- package/development/card/card.js +8 -4
- package/development/checkbox/checkbox/checkbox.d.ts +4 -6
- package/development/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts +4 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/development/checkbox/checkbox-group.js +7 -3
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts +4 -4
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/development/checkbox/checkbox-panel.js +7 -4
- package/development/checkbox/checkbox.js +8 -6
- package/development/{chip/chip.d.ts → chip-label/chip-label.d.ts} +4 -4
- package/development/chip-label/chip-label.d.ts.map +1 -0
- package/development/chip-label.d.ts +2 -0
- package/development/chip-label.d.ts.map +1 -0
- package/development/{chip.js → chip-label.js} +26 -26
- package/development/clock.js +1 -1
- package/development/container/container.js +8 -12
- package/development/container/sticky-bar/sticky-bar.d.ts +1 -0
- package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/development/container/sticky-bar.js +18 -10
- package/development/core/base-elements/button-base-element.d.ts +27 -18
- package/development/core/base-elements/button-base-element.d.ts.map +1 -1
- package/development/core/base-elements/open-close-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +66 -74
- package/development/core/datetime/date-adapter.d.ts +2 -1
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.d.ts +1 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime.js +4 -3
- package/development/core/dom/animation.d.ts +2 -0
- package/development/core/dom/animation.d.ts.map +1 -0
- package/development/core/dom/lean-context.d.ts +5 -0
- package/development/core/dom/lean-context.d.ts.map +1 -0
- package/development/core/dom.d.ts +2 -2
- package/development/core/dom.d.ts.map +1 -1
- package/development/core/dom.js +13 -21
- package/development/core/eventing/form-element-handlers.d.ts +0 -7
- package/development/core/eventing/form-element-handlers.d.ts.map +1 -1
- package/development/core/eventing.d.ts +0 -1
- package/development/core/eventing.d.ts.map +1 -1
- package/development/core/eventing.js +1 -25
- package/development/core/i18n/i18n.d.ts +4 -2
- package/development/core/i18n/i18n.d.ts.map +1 -1
- package/development/core/i18n.js +27 -23
- package/development/core/mixins/disabled-mixin.d.ts +2 -7
- package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts +35 -0
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -0
- package/development/core/mixins.d.ts +1 -0
- package/development/core/mixins.d.ts.map +1 -1
- package/development/core/mixins.js +221 -30
- package/development/core/testing/event-spy.d.ts +2 -1
- package/development/core/testing/event-spy.d.ts.map +1 -1
- package/development/core/testing.d.ts +0 -1
- package/development/core/testing.d.ts.map +1 -1
- package/development/core/testing.js +4 -15
- package/development/datepicker/common/datepicker-button.d.ts +3 -5
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.js +13 -12
- package/development/datepicker/datepicker/datepicker.d.ts +25 -72
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day/datepicker-next-day.d.ts +1 -3
- package/development/datepicker/datepicker-next-day/datepicker-next-day.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day.js +9 -15
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts +1 -3
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts.map +1 -1
- package/development/datepicker/datepicker-previous-day.js +9 -15
- package/development/datepicker/datepicker.js +74 -115
- package/development/dialog/dialog/dialog.d.ts +3 -0
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog-title.js +2 -1
- package/development/dialog/dialog.js +46 -39
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts +7 -1
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-header.js +3 -3
- package/development/expansion-panel/expansion-panel.js +32 -17
- package/development/file-selector/common/file-selector-common.d.ts +23 -0
- package/development/file-selector/common/file-selector-common.d.ts.map +1 -0
- package/development/file-selector/common.d.ts +2 -0
- package/development/file-selector/common.d.ts.map +1 -0
- package/development/file-selector/common.js +382 -0
- package/development/file-selector/file-selector/file-selector.d.ts +24 -0
- package/development/file-selector/file-selector/file-selector.d.ts.map +1 -0
- package/development/file-selector/file-selector-dropzone/file-selector-dropzone.d.ts +33 -0
- package/development/file-selector/file-selector-dropzone/file-selector-dropzone.d.ts.map +1 -0
- package/development/file-selector/file-selector-dropzone.d.ts +2 -0
- package/development/file-selector/file-selector-dropzone.d.ts.map +1 -0
- package/development/file-selector/file-selector-dropzone.js +181 -0
- package/development/file-selector/file-selector.d.ts +1 -87
- package/development/file-selector/file-selector.d.ts.map +1 -1
- package/development/file-selector/file-selector.js +52 -0
- package/development/file-selector.d.ts +2 -0
- package/development/file-selector.d.ts.map +1 -1
- package/development/file-selector.js +4 -552
- package/development/flip-card/flip-card-details.js +1 -1
- package/development/flip-card/flip-card-summary.js +3 -11
- package/development/flip-card/flip-card.js +6 -6
- package/development/form-field/form-field/form-field.d.ts +5 -10
- package/development/form-field/form-field/form-field.d.ts.map +1 -1
- package/development/form-field/form-field-clear.js +6 -6
- package/development/form-field/form-field.js +32 -40
- package/development/header/common.js +2 -2
- package/development/header/header/header.d.ts +5 -3
- package/development/header/header/header.d.ts.map +1 -1
- package/development/header/header.js +15 -20
- package/development/image/image.d.ts +0 -30
- package/development/image/image.d.ts.map +1 -1
- package/development/image.js +62 -273
- package/development/journey-header/journey-header.d.ts +4 -1
- package/development/journey-header/journey-header.d.ts.map +1 -1
- package/development/journey-header.js +7 -3
- package/development/lead-container.js +2 -10
- package/development/link/common/link-common.d.ts.map +1 -1
- package/development/link/common.js +9 -8
- package/development/link-list/common/link-list-base.d.ts +1 -0
- package/development/link-list/common/link-list-base.d.ts.map +1 -1
- package/development/link-list/common.js +4 -2
- package/development/link-list/link-list-anchor.js +4 -4
- package/development/loading-indicator/loading-indicator.d.ts +1 -3
- package/development/loading-indicator/loading-indicator.d.ts.map +1 -1
- package/development/loading-indicator-circle/loading-indicator-circle.d.ts +16 -0
- package/development/loading-indicator-circle/loading-indicator-circle.d.ts.map +1 -0
- package/development/loading-indicator-circle.d.ts +2 -0
- package/development/loading-indicator-circle.d.ts.map +1 -0
- package/development/loading-indicator-circle.js +146 -0
- package/development/loading-indicator.js +81 -182
- package/development/map-container/map-container.d.ts.map +1 -1
- package/development/map-container.js +5 -5
- package/development/menu/common.js +5 -5
- package/development/menu/menu/menu.d.ts +3 -0
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +39 -24
- package/development/message.js +4 -2
- package/development/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/development/navigation/common.js +9 -5
- package/development/navigation/navigation/navigation.d.ts +3 -0
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation-list/navigation-list.d.ts.map +1 -1
- package/development/navigation/navigation-list.js +3 -2
- package/development/navigation/navigation-marker/navigation-marker.d.ts +2 -1
- package/development/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/development/navigation/navigation-marker.js +6 -4
- package/development/navigation/navigation-section/navigation-section.d.ts +3 -0
- package/development/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/development/navigation/navigation-section.js +38 -22
- package/development/navigation/navigation.js +42 -27
- package/development/notification/notification.d.ts +6 -2
- package/development/notification/notification.d.ts.map +1 -1
- package/development/notification.js +27 -21
- package/development/option/option/option-base-element.d.ts +0 -7
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option.js +5 -26
- package/development/overlay/overlay-base-element.d.ts +2 -0
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay.d.ts +3 -0
- package/development/overlay/overlay.d.ts.map +1 -1
- package/development/overlay.js +43 -31
- package/development/paginator/common/paginator-common.d.ts.map +1 -1
- package/development/paginator/common.js +7 -3
- package/development/paginator/paginator.js +1 -1
- package/development/popover/popover/popover.d.ts +3 -0
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover-trigger.js +9 -9
- package/development/popover/popover.js +41 -26
- package/development/radio-button/common/radio-button-common.d.ts +3 -10
- package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/development/radio-button/common.js +44 -121
- package/development/radio-button/radio-button/radio-button.d.ts +9 -1
- package/development/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts +19 -26
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +87 -123
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts +19 -1
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/development/radio-button/radio-button-panel.js +35 -15
- package/development/radio-button/radio-button.js +11 -15
- package/development/select/select.d.ts +3 -9
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +27 -25
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts +4 -1
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +28 -16
- package/development/skiplink-list/skiplink-list.d.ts.map +1 -1
- package/development/skiplink-list.js +3 -2
- package/development/slider/slider.d.ts +0 -1
- package/development/slider/slider.d.ts.map +1 -1
- package/development/slider.js +2 -2
- package/development/stepper/step-label/step-label.d.ts +0 -2
- package/development/stepper/step-label/step-label.d.ts.map +1 -1
- package/development/stepper/step-label.js +10 -11
- package/development/stepper/step.js +1 -1
- package/development/stepper/stepper/stepper.d.ts +4 -1
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +9 -7
- package/development/tabs/tab-group/tab-group.d.ts +4 -1
- package/development/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/development/tabs/tab-group.js +8 -4
- package/development/tabs/tab-label.js +1 -1
- package/development/tag/tag/tag.d.ts +4 -1
- package/development/tag/tag/tag.d.ts.map +1 -1
- package/development/tag/tag-group/tag-group.d.ts +5 -2
- package/development/tag/tag-group/tag-group.d.ts.map +1 -1
- package/development/tag/tag-group.js +7 -4
- package/development/tag/tag.js +16 -12
- package/development/teaser/teaser.d.ts +2 -2
- package/development/teaser/teaser.d.ts.map +1 -1
- package/development/teaser-hero/teaser-hero.d.ts +2 -6
- package/development/teaser-hero/teaser-hero.d.ts.map +1 -1
- package/development/teaser-hero.js +9 -60
- package/development/teaser-product/common.js +7 -14
- package/development/teaser-product/teaser-product.js +1 -21
- package/development/teaser.js +14 -32
- package/development/time-input/time-input.d.ts +3 -6
- package/development/time-input/time-input.d.ts.map +1 -1
- package/development/time-input.js +33 -27
- package/development/toast/toast.d.ts +3 -0
- package/development/toast/toast.d.ts.map +1 -1
- package/development/toast.js +27 -13
- package/development/toggle/toggle/toggle.d.ts +4 -8
- package/development/toggle/toggle/toggle.d.ts.map +1 -1
- package/development/toggle/toggle.js +9 -12
- package/development/toggle-check/toggle-check.d.ts +4 -6
- package/development/toggle-check/toggle-check.d.ts.map +1 -1
- package/development/toggle-check.js +9 -7
- package/development/train/train/train.d.ts.map +1 -1
- package/development/train/train-blocked-passage.js +2 -2
- package/development/train/train-formation/train-formation.d.ts +3 -11
- package/development/train/train-formation/train-formation.d.ts.map +1 -1
- package/development/train/train-formation.js +43 -74
- package/development/train/train-wagon/train-wagon.d.ts +11 -8
- package/development/train/train-wagon/train-wagon.d.ts.map +1 -1
- package/development/train/train-wagon.js +149 -124
- package/development/train/train.js +35 -112
- package/development/visual-checkbox/visual-checkbox.d.ts +4 -1
- package/development/visual-checkbox/visual-checkbox.d.ts.map +1 -1
- package/development/visual-checkbox.js +7 -3
- package/dialog/dialog/dialog.d.ts +3 -0
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog-title.js +9 -9
- package/dialog/dialog.js +56 -51
- package/expansion-panel/expansion-panel/expansion-panel.d.ts +7 -1
- package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-header.js +1 -1
- package/expansion-panel/expansion-panel.js +41 -28
- package/file-selector/common/file-selector-common.d.ts +23 -0
- package/file-selector/common/file-selector-common.d.ts.map +1 -0
- package/file-selector/common.d.ts +2 -0
- package/file-selector/common.d.ts.map +1 -0
- package/file-selector/common.js +210 -0
- package/file-selector/file-selector/file-selector.d.ts +24 -0
- package/file-selector/file-selector/file-selector.d.ts.map +1 -0
- package/file-selector/file-selector-dropzone/file-selector-dropzone.d.ts +33 -0
- package/file-selector/file-selector-dropzone/file-selector-dropzone.d.ts.map +1 -0
- package/file-selector/file-selector-dropzone.d.ts +2 -0
- package/file-selector/file-selector-dropzone.d.ts.map +1 -0
- package/file-selector/file-selector-dropzone.js +97 -0
- package/file-selector/file-selector.d.ts +1 -87
- package/file-selector/file-selector.d.ts.map +1 -1
- package/file-selector/file-selector.js +44 -0
- package/file-selector.d.ts +2 -0
- package/file-selector.d.ts.map +1 -1
- package/file-selector.js +3 -301
- package/flip-card/flip-card-details.js +5 -5
- package/flip-card/flip-card-summary.js +7 -7
- package/flip-card/flip-card.js +9 -9
- package/form-field/form-field/form-field.d.ts +5 -10
- package/form-field/form-field/form-field.d.ts.map +1 -1
- package/form-field/form-field-clear.js +12 -12
- package/form-field/form-field.js +143 -141
- package/header/common.js +10 -10
- package/header/header/header.d.ts +5 -3
- package/header/header/header.d.ts.map +1 -1
- package/header/header.js +28 -31
- package/image/image.d.ts +0 -30
- package/image/image.d.ts.map +1 -1
- package/image.js +187 -281
- package/index.d.ts +13 -9
- package/index.js +13 -9
- package/journey-header/journey-header.d.ts +4 -1
- package/journey-header/journey-header.d.ts.map +1 -1
- package/journey-header.js +29 -25
- package/lead-container.js +5 -5
- package/link/common/link-common.d.ts.map +1 -1
- package/link/common.js +18 -16
- package/link-list/common/link-list-base.d.ts +1 -0
- package/link-list/common/link-list-base.d.ts.map +1 -1
- package/link-list/common.js +11 -9
- package/link-list/link-list-anchor.js +8 -8
- package/loading-indicator/loading-indicator.d.ts +1 -3
- package/loading-indicator/loading-indicator.d.ts.map +1 -1
- package/loading-indicator-circle/loading-indicator-circle.d.ts +16 -0
- package/loading-indicator-circle/loading-indicator-circle.d.ts.map +1 -0
- package/loading-indicator-circle.d.ts +2 -0
- package/loading-indicator-circle.d.ts.map +1 -0
- package/loading-indicator-circle.js +46 -0
- package/loading-indicator.js +41 -51
- package/map-container/map-container.d.ts.map +1 -1
- package/map-container.js +7 -7
- package/menu/common.js +8 -8
- package/menu/menu/menu.d.ts +3 -0
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu.js +52 -43
- package/message.js +12 -12
- package/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/navigation/common.js +10 -6
- package/navigation/navigation/navigation.d.ts +3 -0
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-list/navigation-list.d.ts.map +1 -1
- package/navigation/navigation-list.js +17 -16
- package/navigation/navigation-marker/navigation-marker.d.ts +2 -1
- package/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/navigation/navigation-marker.js +12 -10
- package/navigation/navigation-section/navigation-section.d.ts +3 -0
- package/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/navigation/navigation-section.js +46 -37
- package/navigation/navigation.js +30 -21
- package/notification/notification.d.ts +6 -2
- package/notification/notification.d.ts.map +1 -1
- package/notification.js +55 -51
- package/option/option/option-base-element.d.ts +0 -7
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option.js +110 -125
- package/overlay/overlay-base-element.d.ts +2 -0
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay.d.ts +3 -0
- package/overlay/overlay.d.ts.map +1 -1
- package/overlay.js +83 -77
- package/package.json +40 -25
- package/paginator/common/paginator-common.d.ts.map +1 -1
- package/paginator/common.js +21 -17
- package/paginator/paginator.js +1 -1
- package/popover/popover/popover.d.ts +3 -0
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover-trigger.js +6 -6
- package/popover/popover.js +114 -109
- package/radio-button/common/radio-button-common.d.ts +3 -10
- package/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/radio-button/common.js +43 -90
- package/radio-button/radio-button/radio-button.d.ts +9 -1
- package/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts +19 -26
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +112 -131
- package/radio-button/radio-button-panel/radio-button-panel.d.ts +19 -1
- package/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/radio-button/radio-button-panel.js +56 -44
- package/radio-button/radio-button.js +34 -38
- package/select/select.d.ts +3 -9
- package/select/select.d.ts.map +1 -1
- package/select.js +65 -66
- package/selection-expansion-panel/selection-expansion-panel.d.ts +4 -1
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +41 -31
- package/skiplink-list/skiplink-list.d.ts.map +1 -1
- package/skiplink-list.js +14 -13
- package/slider/slider.d.ts +0 -1
- package/slider/slider.d.ts.map +1 -1
- package/slider.js +1 -1
- package/standard-theme.css +238 -8
- package/stepper/step-label/step-label.d.ts +0 -2
- package/stepper/step-label/step-label.d.ts.map +1 -1
- package/stepper/step-label.js +6 -6
- package/stepper/step.js +4 -4
- package/stepper/stepper/stepper.d.ts +4 -1
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +22 -19
- package/table.css +15 -0
- package/tabs/tab-group/tab-group.d.ts +4 -1
- package/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/tabs/tab-group.js +24 -20
- package/tabs/tab-label.js +1 -1
- package/tag/tag/tag.d.ts +4 -1
- package/tag/tag/tag.d.ts.map +1 -1
- package/tag/tag-group/tag-group.d.ts +5 -2
- package/tag/tag-group/tag-group.d.ts.map +1 -1
- package/tag/tag-group.js +13 -10
- package/tag/tag.js +25 -21
- package/teaser/teaser.d.ts +2 -2
- package/teaser/teaser.d.ts.map +1 -1
- package/teaser-hero/teaser-hero.d.ts +2 -6
- package/teaser-hero/teaser-hero.d.ts.map +1 -1
- package/teaser-hero.js +32 -57
- package/teaser-product/common.js +1 -1
- package/teaser-product/teaser-product.js +13 -13
- package/teaser.js +28 -28
- package/time-input/time-input.d.ts +3 -6
- package/time-input/time-input.d.ts.map +1 -1
- package/time-input.js +56 -55
- package/toast/toast.d.ts +3 -0
- package/toast/toast.d.ts.map +1 -1
- package/toast.js +51 -42
- package/toggle/toggle/toggle.d.ts +4 -8
- package/toggle/toggle/toggle.d.ts.map +1 -1
- package/toggle/toggle.js +48 -48
- package/toggle-check/toggle-check.d.ts +4 -6
- package/toggle-check/toggle-check.d.ts.map +1 -1
- package/toggle-check.js +23 -21
- package/train/train/train.d.ts.map +1 -1
- package/train/train-blocked-passage.js +1 -1
- package/train/train-formation/train-formation.d.ts +3 -11
- package/train/train-formation/train-formation.d.ts.map +1 -1
- package/train/train-formation.js +47 -65
- package/train/train-wagon/train-wagon.d.ts +11 -8
- package/train/train-wagon/train-wagon.d.ts.map +1 -1
- package/train/train-wagon.js +123 -134
- package/train/train.js +74 -78
- package/visual-checkbox/visual-checkbox.d.ts +4 -1
- package/visual-checkbox/visual-checkbox.d.ts.map +1 -1
- package/visual-checkbox.js +21 -17
- package/button/mini-button/mini-button-base-element.d.ts +0 -8
- package/button/mini-button/mini-button-base-element.d.ts.map +0 -1
- package/button/tertiary-button/tertiary-button.d.ts +0 -19
- package/button/tertiary-button/tertiary-button.d.ts.map +0 -1
- package/button/tertiary-button-link/tertiary-button-link.d.ts +0 -19
- package/button/tertiary-button-link/tertiary-button-link.d.ts.map +0 -1
- package/button/tertiary-button-link.d.ts +0 -2
- package/button/tertiary-button-link.d.ts.map +0 -1
- package/button/tertiary-button-link.js +0 -17
- package/button/tertiary-button-static/tertiary-button-static.d.ts +0 -19
- package/button/tertiary-button-static/tertiary-button-static.d.ts.map +0 -1
- package/button/tertiary-button-static.d.ts +0 -2
- package/button/tertiary-button-static.d.ts.map +0 -1
- package/button/tertiary-button-static.js +0 -17
- package/button/tertiary-button.d.ts +0 -2
- package/button/tertiary-button.d.ts.map +0 -1
- package/button/tertiary-button.js +0 -17
- package/chip/chip.d.ts.map +0 -1
- package/chip.d.ts +0 -2
- package/chip.d.ts.map +0 -1
- package/chip.js +0 -54
- package/core/dom/get-document-writing-mode.d.ts +0 -5
- package/core/dom/get-document-writing-mode.d.ts.map +0 -1
- package/core/dom/ssr.d.ts +0 -13
- package/core/dom/ssr.d.ts.map +0 -1
- package/core/eventing/handler-repository.d.ts +0 -28
- package/core/eventing/handler-repository.d.ts.map +0 -1
- package/core/observers/intersection-observer.d.ts +0 -20
- package/core/observers/intersection-observer.d.ts.map +0 -1
- package/core/observers/mutation-observer.d.ts +0 -13
- package/core/observers/mutation-observer.d.ts.map +0 -1
- package/core/observers/resize-observer.d.ts +0 -16
- package/core/observers/resize-observer.d.ts.map +0 -1
- package/core/observers.d.ts +0 -4
- package/core/observers.d.ts.map +0 -1
- package/core/observers.js +0 -38
- package/core/testing/wait-for-event.d.ts +0 -2
- package/core/testing/wait-for-event.d.ts.map +0 -1
- package/development/button/mini-button/mini-button-base-element.d.ts +0 -8
- package/development/button/mini-button/mini-button-base-element.d.ts.map +0 -1
- package/development/button/tertiary-button/tertiary-button.d.ts +0 -19
- package/development/button/tertiary-button/tertiary-button.d.ts.map +0 -1
- package/development/button/tertiary-button-link/tertiary-button-link.d.ts +0 -19
- package/development/button/tertiary-button-link/tertiary-button-link.d.ts.map +0 -1
- package/development/button/tertiary-button-link.d.ts +0 -2
- package/development/button/tertiary-button-link.d.ts.map +0 -1
- package/development/button/tertiary-button-link.js +0 -25
- package/development/button/tertiary-button-static/tertiary-button-static.d.ts +0 -19
- package/development/button/tertiary-button-static/tertiary-button-static.d.ts.map +0 -1
- package/development/button/tertiary-button-static.d.ts +0 -2
- package/development/button/tertiary-button-static.d.ts.map +0 -1
- package/development/button/tertiary-button-static.js +0 -25
- package/development/button/tertiary-button.d.ts +0 -2
- package/development/button/tertiary-button.d.ts.map +0 -1
- package/development/button/tertiary-button.js +0 -25
- package/development/chip/chip.d.ts.map +0 -1
- package/development/chip.d.ts +0 -2
- package/development/chip.d.ts.map +0 -1
- package/development/core/dom/get-document-writing-mode.d.ts +0 -5
- package/development/core/dom/get-document-writing-mode.d.ts.map +0 -1
- package/development/core/dom/ssr.d.ts +0 -13
- package/development/core/dom/ssr.d.ts.map +0 -1
- package/development/core/eventing/handler-repository.d.ts +0 -28
- package/development/core/eventing/handler-repository.d.ts.map +0 -1
- package/development/core/observers/intersection-observer.d.ts +0 -20
- package/development/core/observers/intersection-observer.d.ts.map +0 -1
- package/development/core/observers/mutation-observer.d.ts +0 -13
- package/development/core/observers/mutation-observer.d.ts.map +0 -1
- package/development/core/observers/resize-observer.d.ts +0 -16
- package/development/core/observers/resize-observer.d.ts.map +0 -1
- package/development/core/observers.d.ts +0 -4
- package/development/core/observers.d.ts.map +0 -1
- package/development/core/observers.js +0 -39
- package/development/core/testing/wait-for-event.d.ts +0 -2
- package/development/core/testing/wait-for-event.d.ts.map +0 -1
package/navigation/navigation.js
CHANGED
|
@@ -6,27 +6,27 @@ var d = (n, e, o) => (N(n, e, "read from private field"), o ? o.call(n) : e.get(
|
|
|
6
6
|
import { __esDecorate as g, __runInitializers as c } from "tslib";
|
|
7
7
|
import { MutationController as T } from "@lit-labs/observers/mutation-controller.js";
|
|
8
8
|
import { ResizeController as I } from "@lit-labs/observers/resize-controller.js";
|
|
9
|
-
import { css as
|
|
10
|
-
import { customElement as
|
|
11
|
-
import { ref as
|
|
9
|
+
import { css as D, html as A } from "lit";
|
|
10
|
+
import { customElement as H, property as O, state as B } from "lit/decorators.js";
|
|
11
|
+
import { ref as z } from "lit/directives/ref.js";
|
|
12
12
|
import { SbbFocusHandler as F, setModalityOnNextFocus as L } from "../core/a11y.js";
|
|
13
13
|
import { SbbOpenCloseBaseElement as R } from "../core/base-elements.js";
|
|
14
14
|
import { SbbConnectedAbortController as q, SbbLanguageController as M, SbbInertController as P } from "../core/controllers.js";
|
|
15
|
-
import { hostAttributes as
|
|
16
|
-
import { SbbScrollHandler as X, findReferencedElement as j } from "../core/dom.js";
|
|
15
|
+
import { hostAttributes as U, forceType as $ } from "../core/decorators.js";
|
|
16
|
+
import { SbbScrollHandler as X, isZeroAnimationDuration as Z, findReferencedElement as j } from "../core/dom.js";
|
|
17
17
|
import { i18nCloseNavigation as V } from "../core/i18n.js";
|
|
18
18
|
import { SbbUpdateSchedulerMixin as G } from "../core/mixins.js";
|
|
19
19
|
import { isEventOnElement as m, removeAriaOverlayTriggerAttributes as K, setAriaOverlayTriggerAttributes as W } from "../core/overlay.js";
|
|
20
20
|
import "../button/transparent-button.js";
|
|
21
|
-
const J =
|
|
21
|
+
const J = D`*,:before,:after{box-sizing:border-box}:host{--sbb-navigation-grid-column: 1 / 5;--sbb-navigation-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-3x) );--sbb-navigation-animation-easing: ease-in;--sbb-navigation-padding-inline: var(--sbb-layout-base-offset-responsive);--sbb-navigation-padding-block-start: var(--sbb-spacing-responsive-l);--sbb-navigation-padding-block-end: var(--sbb-spacing-responsive-xl);--sbb-navigation-backdrop-visibility: hidden;--sbb-navigation-backdrop-pointer-events: none;--sbb-navigation-backdrop-color: transparent;--sbb-navigation-list-margin-block-start: var(--sbb-spacing-responsive-xxl);--sbb-navigation-inline-start: 0;--sbb-navigation-expanded-width: 100%;--sbb-navigation-inset: 0 auto auto 0;--sbb-navigation-transform: translateX(-100%);--sbb-navigation-content-transform: translateX(0);--sbb-navigation-width: 100%;--sbb-navigation-height: 100dvh;--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);display:block;position:fixed;inset:var(--sbb-navigation-inset);z-index:var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index));overflow:hidden}@media (min-width: 52.5rem){:host{--sbb-navigation-grid-column: 1 / 9}}@media (min-width: 64rem){:host{--sbb-navigation-grid-column: 1 / 5;--sbb-navigation-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) );--sbb-navigation-padding-block-start: var(--sbb-spacing-responsive-xl);--sbb-navigation-padding-inline: var(--sbb-layout-base-offset-responsive) 0;--sbb-navigation-list-margin-block-start: var(--sbb-spacing-fixed-1x);--sbb-navigation-inline-start: calc(var(--sbb-layout-base-offset-responsive) * -1);--sbb-navigation-width: calc(100% + var(--sbb-layout-base-offset-responsive))}}@media (min-width: 90rem){:host{--sbb-navigation-grid-column: 1 / 6;--sbb-navigation-padding-block-start: var(--sbb-spacing-responsive-xxl)}}:host([data-state=opened]){--sbb-navigation-animation-easing: ease-out}:host(:is([data-state=opened],[data-state=opening])){--sbb-navigation-backdrop-visibility: visible;--sbb-navigation-backdrop-pointer-events: all;--sbb-navigation-backdrop-color: var(--sbb-color-black-alpha-70)}:host(:not([data-state=closed])){--sbb-navigation-inset: 0;--sbb-navigation-transform: translateX(0)}:host([data-has-navigation-section]){--sbb-navigation-content-transform: translateX(-100%)}@media (min-width: 64rem){:host([data-has-navigation-section]){--sbb-navigation-expanded-width: 100dvw;--sbb-navigation-content-transform: translateX(0%)}}:host([data-resize-disable-animation]){--sbb-disable-animation-duration: 0s}.sbb-navigation__container{display:grid;gap:var(--sbb-grid-base-gutter-responsive);grid-template-columns:repeat(var(--sbb-grid-base-columns),1fr);padding-inline:0;pointer-events:none;transform:var(--sbb-navigation-transform)}@media (min-width: 64rem){.sbb-navigation__container{padding-inline:var(--sbb-layout-base-offset-responsive)}.sbb-navigation__container:before{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:background-color,visibility;content:"";visibility:var(--sbb-navigation-backdrop-visibility);pointer-events:var(--sbb-navigation-backdrop-pointer-events);position:fixed;inset:var(--sbb-navigation-inset);background-color:var(--sbb-navigation-backdrop-color)}}.sbb-navigation{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:width;display:none;width:var(--sbb-navigation-width);grid-column:var(--sbb-navigation-grid-column);padding:0;margin:0;position:relative;inset-inline-start:var(--sbb-navigation-inline-start);inset-block-start:0;border:none;pointer-events:none;height:var(--sbb-navigation-height);color:var(--sbb-color-white);background-color:var(--sbb-color-midnight)}.sbb-navigation:before{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:width;content:"";position:absolute;width:var(--sbb-navigation-expanded-width);height:var(--sbb-navigation-height);background:var(--sbb-color-midnight)}:host([data-state]:not([data-state=closed])) .sbb-navigation{display:block;pointer-events:all;animation-name:open;animation-duration:var(--sbb-navigation-animation-duration);animation-timing-function:var(--sbb-navigation-animation-easing)}:host([data-state][data-state=closing]) .sbb-navigation{pointer-events:none;animation-name:close}@media (forced-colors: active){.sbb-navigation{outline:var(--sbb-border-width-1x) solid CanvasText}}.sbb-navigation__wrapper{outline:none}.sbb-navigation__header{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:width;display:flex;justify-content:flex-end;position:absolute;width:var(--sbb-navigation-expanded-width);pointer-events:none;padding:var(--sbb-spacing-responsive-xs);z-index:calc(var(--sbb-navigation-z-index, var(--sbb-overlay-default-z-index)) + 1)}.sbb-navigation__close{pointer-events:all}.sbb-navigation__content{transition-duration:var(--sbb-navigation-animation-duration);transition-timing-function:var(--sbb-navigation-animation-easing);transition-property:transform;--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__content::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation__content::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-navigation__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-navigation__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-navigation__content::-webkit-scrollbar-button,.sbb-navigation__content::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-navigation__content{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-navigation__content{display:flex;flex-direction:column;gap:var(--sbb-spacing-responsive-xxl);position:relative;height:var(--sbb-navigation-height);padding-inline:var(--sbb-navigation-padding-inline);padding-block:var(--sbb-navigation-padding-block-start) var(--sbb-navigation-padding-block-end);overflow-y:auto;transform:var(--sbb-navigation-content-transform)}::slotted(:first-child){margin-block-start:var(--sbb-navigation-list-margin-block-start)}@keyframes open{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes close{0%{transform:translate(0)}to{transform:translate(-100%)}}`, Q = {
|
|
22
22
|
subtree: !0,
|
|
23
23
|
attributeFilter: ["data-state"]
|
|
24
24
|
};
|
|
25
25
|
let Y = 0;
|
|
26
|
-
const
|
|
27
|
-
let
|
|
26
|
+
const tt = 150;
|
|
27
|
+
let _t = (() => {
|
|
28
28
|
var b, l, r;
|
|
29
|
-
let n = [
|
|
29
|
+
let n = [H("sbb-navigation"), U({
|
|
30
30
|
role: "navigation"
|
|
31
31
|
})], e, o = [], s, u = G(R), p = [], _, f, w = [], k = [], y, C = [], E = [];
|
|
32
32
|
return r = class extends u {
|
|
@@ -85,7 +85,7 @@ let pt = (() => {
|
|
|
85
85
|
*/
|
|
86
86
|
open() {
|
|
87
87
|
var t;
|
|
88
|
-
this.state !== "closed" || !this._navigation || this.willOpen.emit() && (this.state = "opening", this._checkActiveActions(), this._checkActiveSection(), this.startUpdate(), this._scrollHandler.disableScroll(), (t = this._triggerElement) == null || t.setAttribute("aria-expanded", "true"));
|
|
88
|
+
this.state !== "closed" || !this._navigation || this.willOpen.emit() && (this.state = "opening", this._checkActiveActions(), this._checkActiveSection(), this.startUpdate(), this._scrollHandler.disableScroll(), (t = this._triggerElement) == null || t.setAttribute("aria-expanded", "true"), this._isZeroAnimationDuration() && this._handleOpening());
|
|
89
89
|
}
|
|
90
90
|
_checkActiveSection() {
|
|
91
91
|
var i;
|
|
@@ -104,7 +104,17 @@ let pt = (() => {
|
|
|
104
104
|
*/
|
|
105
105
|
close() {
|
|
106
106
|
var t;
|
|
107
|
-
this.state === "opened" && this.willClose.emit() && (this.state = "closing", this.startUpdate(), (t = this._triggerElement) == null || t.setAttribute("aria-expanded", "false"));
|
|
107
|
+
this.state === "opened" && this.willClose.emit() && (this.state = "closing", this.startUpdate(), (t = this._triggerElement) == null || t.setAttribute("aria-expanded", "false"), this._isZeroAnimationDuration() && this._handleClosing());
|
|
108
|
+
}
|
|
109
|
+
_isZeroAnimationDuration() {
|
|
110
|
+
return Z(this, "--sbb-navigation-animation-duration");
|
|
111
|
+
}
|
|
112
|
+
_handleClosing() {
|
|
113
|
+
var t, i;
|
|
114
|
+
this.state = "closed", this._navigationContentElement.scrollTo(0, 0), L(this._triggerElement), this._inertController.deactivate(), (t = this._triggerElement) == null || t.focus(), this.didClose.emit(), this._navigationResizeObserver.unobserve(this), this._resetMarkers(), (i = this._windowEventsController) == null || i.abort(), this._focusHandler.disconnect(), this._scrollHandler.enableScroll(), this.completeUpdate();
|
|
115
|
+
}
|
|
116
|
+
_handleOpening() {
|
|
117
|
+
this.state = "opened", this.didOpen.emit(), this._navigationResizeObserver.observe(this), this._inertController.activate(), this._focusHandler.trap(this, { filter: this._trapFocusFilter }), this._attachWindowEvents(), this._setNavigationFocus(), this.completeUpdate();
|
|
108
118
|
}
|
|
109
119
|
// Removes trigger click listener on trigger change.
|
|
110
120
|
_removeTriggerClickListener(t, i) {
|
|
@@ -121,8 +131,7 @@ let pt = (() => {
|
|
|
121
131
|
// In rare cases it can be that the animationEnd event is triggered twice.
|
|
122
132
|
// To avoid entering a corrupt state, exit when state is not expected.
|
|
123
133
|
_onAnimationEnd(t) {
|
|
124
|
-
|
|
125
|
-
t.animationName === "open" && this.state === "opening" ? (this.state = "opened", this.didOpen.emit(), this._navigationResizeObserver.observe(this), this._inertController.activate(), this._focusHandler.trap(this, { filter: this._trapFocusFilter }), this._attachWindowEvents(), this._setNavigationFocus()) : t.animationName === "close" && this.state === "closing" && (this.state = "closed", this._navigationContentElement.scrollTo(0, 0), L(this._triggerElement), this._inertController.deactivate(), (i = this._triggerElement) == null || i.focus(), this.didClose.emit(), this._navigationResizeObserver.unobserve(this), this._resetMarkers(), (a = this._windowEventsController) == null || a.abort(), this._focusHandler.disconnect(), this._scrollHandler.enableScroll()), this.completeUpdate();
|
|
134
|
+
t.animationName === "open" && this.state === "opening" ? this._handleOpening() : t.animationName === "close" && this.state === "closing" && this._handleClosing();
|
|
126
135
|
}
|
|
127
136
|
_resetMarkers() {
|
|
128
137
|
const t = Array.from(this.querySelectorAll(":is(sbb-navigation-button, sbb-navigation-link)[data-action-active]:not(.sbb-active)"));
|
|
@@ -157,7 +166,7 @@ let pt = (() => {
|
|
|
157
166
|
i.target.nodeName === "SBB-NAVIGATION-SECTION" && (this._activeNavigationSection = this.querySelector('sbb-navigation-section[data-state="opening"], sbb-navigation-section[data-state="opened"]'), this.toggleAttribute("data-has-navigation-section", !!this._activeNavigationSection));
|
|
158
167
|
}
|
|
159
168
|
_onNavigationResize() {
|
|
160
|
-
this.state === "opened" && (this._resizeObserverTimeout && clearTimeout(this._resizeObserverTimeout), this.toggleAttribute("data-resize-disable-animation", !0), this._resizeObserverTimeout = setTimeout(() => this.removeAttribute("data-resize-disable-animation"),
|
|
169
|
+
this.state === "opened" && (this._resizeObserverTimeout && clearTimeout(this._resizeObserverTimeout), this.toggleAttribute("data-resize-disable-animation", !0), this._resizeObserverTimeout = setTimeout(() => this.removeAttribute("data-resize-disable-animation"), tt));
|
|
161
170
|
}
|
|
162
171
|
connectedCallback() {
|
|
163
172
|
super.connectedCallback(), this.id || (this.id = `sbb-navigation-${Y++}`);
|
|
@@ -169,7 +178,7 @@ let pt = (() => {
|
|
|
169
178
|
super.disconnectedCallback(), (t = this._navigationController) == null || t.abort(), (i = this._windowEventsController) == null || i.abort(), this._focusHandler.disconnect(), this._scrollHandler.enableScroll();
|
|
170
179
|
}
|
|
171
180
|
render() {
|
|
172
|
-
const t =
|
|
181
|
+
const t = A`
|
|
173
182
|
<sbb-transparent-button
|
|
174
183
|
id="sbb-navigation-close-button"
|
|
175
184
|
class="sbb-navigation__close"
|
|
@@ -182,19 +191,19 @@ let pt = (() => {
|
|
|
182
191
|
sbb-navigation-close
|
|
183
192
|
></sbb-transparent-button>
|
|
184
193
|
`;
|
|
185
|
-
return
|
|
194
|
+
return A`
|
|
186
195
|
<div class="sbb-navigation__container">
|
|
187
196
|
<div
|
|
188
197
|
id="sbb-navigation-overlay"
|
|
189
|
-
@animationend=${
|
|
198
|
+
@animationend=${this._onAnimationEnd}
|
|
190
199
|
class="sbb-navigation"
|
|
191
|
-
${
|
|
200
|
+
${z((i) => this._navigation = i)}
|
|
192
201
|
>
|
|
193
202
|
<div class="sbb-navigation__header">${t}</div>
|
|
194
203
|
<div class="sbb-navigation__wrapper">
|
|
195
204
|
<div
|
|
196
205
|
class="sbb-navigation__content"
|
|
197
|
-
${
|
|
206
|
+
${z((i) => this._navigationContentElement = i)}
|
|
198
207
|
>
|
|
199
208
|
<slot></slot>
|
|
200
209
|
</div>
|
|
@@ -206,7 +215,7 @@ let pt = (() => {
|
|
|
206
215
|
}
|
|
207
216
|
}, b = new WeakMap(), l = new WeakMap(), s = r, (() => {
|
|
208
217
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
209
|
-
_ = [
|
|
218
|
+
_ = [O()], f = [$(), O({ attribute: "accessibility-close-label" })], y = [B()], g(r, null, _, { kind: "setter", name: "trigger", static: !1, private: !1, access: { has: (i) => "trigger" in i, set: (i, a) => {
|
|
210
219
|
i.trigger = a;
|
|
211
220
|
} }, metadata: t }, null, p), g(r, null, f, { kind: "accessor", name: "accessibilityCloseLabel", static: !1, private: !1, access: { has: (i) => "accessibilityCloseLabel" in i, get: (i) => i.accessibilityCloseLabel, set: (i, a) => {
|
|
212
221
|
i.accessibilityCloseLabel = a;
|
|
@@ -216,5 +225,5 @@ let pt = (() => {
|
|
|
216
225
|
})(), r.styles = J, c(s, o), s;
|
|
217
226
|
})();
|
|
218
227
|
export {
|
|
219
|
-
|
|
228
|
+
_t as SbbNavigationElement
|
|
220
229
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSResultGroup, PropertyValues, TemplateResult
|
|
1
|
+
import { CSSResultGroup, LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
2
2
|
import { SbbTitleLevel } from '../title.js';
|
|
3
3
|
/**
|
|
4
4
|
* It displays messages which require a user's attention without interrupting its tasks.
|
|
@@ -31,7 +31,10 @@ export declare class SbbNotificationElement extends LitElement {
|
|
|
31
31
|
* In readonly mode, there is no dismiss button offered to the user.
|
|
32
32
|
*/
|
|
33
33
|
accessor readonly: boolean;
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Size variant, either s or m.
|
|
36
|
+
* @default 'm' / 's' (lean)
|
|
37
|
+
*/
|
|
35
38
|
accessor size: 'm' | 's';
|
|
36
39
|
/** The enabled animations. */
|
|
37
40
|
accessor animation: 'open' | 'close' | 'all' | 'none';
|
|
@@ -54,6 +57,7 @@ export declare class SbbNotificationElement extends LitElement {
|
|
|
54
57
|
close(): void;
|
|
55
58
|
connectedCallback(): void;
|
|
56
59
|
protected firstUpdated(changedProperties: PropertyValues<this>): Promise<void>;
|
|
60
|
+
private _isZeroAnimationDuration;
|
|
57
61
|
private _setNotificationHeight;
|
|
58
62
|
private _onNotificationResize;
|
|
59
63
|
private _onNotificationAnimationEnd;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/elements/notification/notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"notification.d.ts","sourceRoot":"","sources":["../../../src/elements/notification/notification.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAEnB,UAAU,EAEV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AASb,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAIjD,OAAO,+BAA+B,CAAC;AACvC,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,aAAa,CAAC;AAWrB;;;;;;;;;;;GAWG;AACH,qBAGM,sBAAuB,SAAQ,UAAU;IAE7C,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;;;;MAKlB;IAEX,oCAAoC;IACpC,SAA6C,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAU;IAElG,wBAAwB;IACxB,SAEgB,YAAY,EAAE,MAAM,CAAM;IAE1C,yFAAyF;IACzF,SAAwD,UAAU,EAAE,aAAa,CAAO;IAExF;;;OAGG;IACH,SAEgB,QAAQ,EAAE,OAAO,CAAS;IAE1C;;;OAGG;IACH,SAA6C,IAAI,EAAE,GAAG,GAAG,GAAG,CAAwB;IAEpF,8BAA8B;IAC9B,SAA6C,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAS;IAElG,qCAAqC;IACrC,OAAO,KAAK,MAAM,QAEjB;IACD,OAAO,KAAK,MAAM,GAEjB;IAED,OAAO,CAAC,oBAAoB,CAAe;IAC3C,OAAO,CAAC,sBAAsB,CAA8C;IAC5E,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,2BAA2B,CAIhC;IAEH,2EAA2E;IAC3E,OAAO,CAAC,SAAS,CAIf;IAEF,uDAAuD;IACvD,OAAO,CAAC,QAAQ,CAId;IAEF,2EAA2E;IAC3E,OAAO,CAAC,UAAU,CAIhB;IAEF,uDAAuD;IACvD,OAAO,CAAC,SAAS,CAIf;IAEF,OAAO,CAAC,KAAK;IAaN,KAAK,IAAI,IAAI;IAYJ,iBAAiB,IAAI,IAAI;cAMhB,YAAY,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAa7F,OAAO,CAAC,wBAAwB;IAIhC,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,qBAAqB;IAoB7B,OAAO,CAAC,2BAA2B;IAUnC,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;cAOH,MAAM,IAAI,cAAc;CAoC5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,kBAAkB,EAAE,sBAAsB,CAAC;KAC5C;CACF"}
|
package/notification.js
CHANGED
|
@@ -1,88 +1,92 @@
|
|
|
1
|
-
var
|
|
1
|
+
var B = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var c = (e, a,
|
|
4
|
+
var M = (e, a, n) => a.has(e) || B("Cannot " + n);
|
|
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
6
|
import { __runInitializers as r, __esDecorate as f } from "tslib";
|
|
7
|
-
import { ResizeController as
|
|
8
|
-
import { css as
|
|
9
|
-
import { customElement as
|
|
10
|
-
import { SbbLanguageController as
|
|
11
|
-
import { slotState as
|
|
7
|
+
import { ResizeController as F } from "@lit-labs/observers/resize-controller.js";
|
|
8
|
+
import { css as G, html as P, nothing as J, LitElement as K } from "lit";
|
|
9
|
+
import { customElement as Q, property as y } from "lit/decorators.js";
|
|
10
|
+
import { SbbLanguageController as V } from "./core/controllers.js";
|
|
11
|
+
import { slotState as W, forceType as q, omitEmptyConverter as X } from "./core/decorators.js";
|
|
12
|
+
import { isLean as Y, isZeroAnimationDuration as ii } from "./core/dom.js";
|
|
12
13
|
import { EventEmitter as x } from "./core/eventing.js";
|
|
13
|
-
import { i18nCloseNotification as
|
|
14
|
+
import { i18nCloseNotification as ti } from "./core/i18n.js";
|
|
14
15
|
import "./button/secondary-button.js";
|
|
15
16
|
import "./divider.js";
|
|
16
17
|
import "./icon.js";
|
|
17
18
|
import "./title.js";
|
|
18
|
-
const
|
|
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-icon-margin-block-start: calc( ((1em * var(--sbb-typo-line-height-body-text)) - var(--sbb-size-icon-ui-small)) / 2 )}:host(:where([data-slot-names~=title],[title-content])){--sbb-notification-icon-margin-block-start: calc( ( (var(--sbb-font-size-title-5) * var(--sbb-typo-line-height-body-text)) - var( --sbb-size-icon-ui-small ) ) / 2 )}:host([size=s]){--sbb-notification-padding-inline: var(--sbb-spacing-responsive-xxs);--sbb-notification-icon-margin-block-start: 0}}.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);margin-block-start:var(--sbb-notification-icon-margin-block-start);--sbb-icon-svg-width: var(--sbb-notification-icon-size)}.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([
|
|
19
20
|
["info", "circle-information-small"],
|
|
20
21
|
["success", "circle-tick-small"],
|
|
21
22
|
["warn", "circle-exclamation-point-small"],
|
|
22
23
|
["error", "circle-cross-small"]
|
|
23
|
-
]),
|
|
24
|
-
let
|
|
25
|
-
var
|
|
26
|
-
let e = [
|
|
27
|
-
var
|
|
24
|
+
]), oi = 150;
|
|
25
|
+
let yi = (() => {
|
|
26
|
+
var m, p, v, _, g, u, o;
|
|
27
|
+
let e = [Q("sbb-notification"), W()], a, n = [], l, w = K, z, k = [], C = [], O, E = [], L = [], N, T = [], A = [], I, S = [], $ = [], D, R = [], H = [], Z, U = [], j = [];
|
|
28
|
+
var h = (o = class extends w {
|
|
28
29
|
constructor() {
|
|
29
30
|
super(...arguments);
|
|
30
|
-
d(this,
|
|
31
|
+
d(this, m);
|
|
31
32
|
d(this, p);
|
|
32
33
|
d(this, v);
|
|
33
|
-
d(this, g);
|
|
34
34
|
d(this, _);
|
|
35
|
+
d(this, g);
|
|
35
36
|
d(this, u);
|
|
36
|
-
|
|
37
|
+
s(this, m, r(this, k, "info")), s(this, p, (r(this, C), 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, {
|
|
37
38
|
target: null,
|
|
38
39
|
skipInitial: !0,
|
|
39
40
|
callback: () => this._onNotificationResize()
|
|
40
|
-
}), this._willOpen = new x(this,
|
|
41
|
+
}), this._willOpen = new x(this, h.events.willOpen, { cancelable: !0 }), this._didOpen = new x(this, h.events.didOpen, { cancelable: !0 }), this._willClose = new x(this, h.events.willClose, { cancelable: !0 }), this._didClose = new x(this, h.events.didClose, { cancelable: !0 });
|
|
41
42
|
}
|
|
42
43
|
/** The type of the notification. */
|
|
43
44
|
get type() {
|
|
44
|
-
return c(this,
|
|
45
|
+
return c(this, m);
|
|
45
46
|
}
|
|
46
47
|
set type(t) {
|
|
47
|
-
|
|
48
|
+
s(this, m, t);
|
|
48
49
|
}
|
|
49
50
|
/** Content of title. */
|
|
50
51
|
get titleContent() {
|
|
51
52
|
return c(this, p);
|
|
52
53
|
}
|
|
53
54
|
set titleContent(t) {
|
|
54
|
-
|
|
55
|
+
s(this, p, t);
|
|
55
56
|
}
|
|
56
57
|
/** Level of title, it will be rendered as heading tag (e.g. h3). Defaults to level 3. */
|
|
57
58
|
get titleLevel() {
|
|
58
59
|
return c(this, v);
|
|
59
60
|
}
|
|
60
61
|
set titleLevel(t) {
|
|
61
|
-
|
|
62
|
+
s(this, v, t);
|
|
62
63
|
}
|
|
63
64
|
/**
|
|
64
65
|
* Whether the notification is readonly.
|
|
65
66
|
* In readonly mode, there is no dismiss button offered to the user.
|
|
66
67
|
*/
|
|
67
68
|
get readonly() {
|
|
68
|
-
return c(this,
|
|
69
|
+
return c(this, _);
|
|
69
70
|
}
|
|
70
71
|
set readonly(t) {
|
|
71
|
-
|
|
72
|
+
s(this, _, t);
|
|
72
73
|
}
|
|
73
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Size variant, either s or m.
|
|
76
|
+
* @default 'm' / 's' (lean)
|
|
77
|
+
*/
|
|
74
78
|
get size() {
|
|
75
|
-
return c(this,
|
|
79
|
+
return c(this, g);
|
|
76
80
|
}
|
|
77
81
|
set size(t) {
|
|
78
|
-
|
|
82
|
+
s(this, g, t);
|
|
79
83
|
}
|
|
80
84
|
/** The enabled animations. */
|
|
81
85
|
get animation() {
|
|
82
86
|
return c(this, u);
|
|
83
87
|
}
|
|
84
88
|
set animation(t) {
|
|
85
|
-
|
|
89
|
+
s(this, u, t);
|
|
86
90
|
}
|
|
87
91
|
/** The state of the notification. */
|
|
88
92
|
set _state(t) {
|
|
@@ -92,10 +96,10 @@ let gi = (() => {
|
|
|
92
96
|
return this.getAttribute("data-state");
|
|
93
97
|
}
|
|
94
98
|
_open() {
|
|
95
|
-
this._state === "closed" && (this._state = "opening", this._willOpen.emit());
|
|
99
|
+
this._state === "closed" && (this._state = "opening", this._willOpen.emit(), this._isZeroAnimationDuration() && this._handleOpening());
|
|
96
100
|
}
|
|
97
101
|
close() {
|
|
98
|
-
this._state === "opened" && (this._state = "closing", this.
|
|
102
|
+
this._state === "opened" && this._willClose.emit() && (this._state = "closing", this._isZeroAnimationDuration() && this._handleClosing());
|
|
99
103
|
}
|
|
100
104
|
connectedCallback() {
|
|
101
105
|
this._state || (this._state = "closed"), super.connectedCallback();
|
|
@@ -104,6 +108,9 @@ let gi = (() => {
|
|
|
104
108
|
var i;
|
|
105
109
|
super.firstUpdated(t), this._notificationElement = (i = this.shadowRoot) == null ? void 0 : i.querySelector(".sbb-notification__wrapper"), await this.updateComplete, this._setNotificationHeight(), this._open();
|
|
106
110
|
}
|
|
111
|
+
_isZeroAnimationDuration() {
|
|
112
|
+
return ii(this, "--sbb-notification-animation-duration");
|
|
113
|
+
}
|
|
107
114
|
_setNotificationHeight() {
|
|
108
115
|
var i;
|
|
109
116
|
if (!((i = this._notificationElement) != null && i.scrollHeight))
|
|
@@ -112,7 +119,7 @@ let gi = (() => {
|
|
|
112
119
|
this.style.setProperty("--sbb-notification-height", t);
|
|
113
120
|
}
|
|
114
121
|
_onNotificationResize() {
|
|
115
|
-
this._state === "opened" && (this._resizeObserverTimeout && clearTimeout(this._resizeObserverTimeout), this.toggleAttribute("data-resize-disable-animation", !0), this._resizeObserverTimeout = setTimeout(() => this.removeAttribute("data-resize-disable-animation"),
|
|
122
|
+
this._state === "opened" && (this._resizeObserverTimeout && clearTimeout(this._resizeObserverTimeout), this.toggleAttribute("data-resize-disable-animation", !0), this._resizeObserverTimeout = setTimeout(() => this.removeAttribute("data-resize-disable-animation"), oi), setTimeout(() => this._setNotificationHeight()));
|
|
116
123
|
}
|
|
117
124
|
_onNotificationAnimationEnd(t) {
|
|
118
125
|
this._state === "opening" && t.animationName === "open" && this._handleOpening(), this._state === "closing" && t.animationName === "close-height" && this._handleClosing();
|
|
@@ -124,15 +131,12 @@ let gi = (() => {
|
|
|
124
131
|
this._state = "closed", this._didClose.emit(), this._notificationResizeObserver.unobserve(this._notificationElement), setTimeout(() => this.remove());
|
|
125
132
|
}
|
|
126
133
|
render() {
|
|
127
|
-
return
|
|
128
|
-
<div
|
|
129
|
-
class="sbb-notification__wrapper"
|
|
130
|
-
@animationend=${(t) => this._onNotificationAnimationEnd(t)}
|
|
131
|
-
>
|
|
134
|
+
return P`
|
|
135
|
+
<div class="sbb-notification__wrapper" @animationend=${this._onNotificationAnimationEnd}>
|
|
132
136
|
<div class="sbb-notification">
|
|
133
137
|
<sbb-icon
|
|
134
138
|
class="sbb-notification__icon"
|
|
135
|
-
name=${
|
|
139
|
+
name=${ai.get(this.type)}
|
|
136
140
|
></sbb-icon>
|
|
137
141
|
|
|
138
142
|
<span class="sbb-notification__content">
|
|
@@ -146,13 +150,13 @@ let gi = (() => {
|
|
|
146
150
|
<slot></slot>
|
|
147
151
|
</span>
|
|
148
152
|
|
|
149
|
-
${this.readonly ?
|
|
153
|
+
${this.readonly ? J : P`<span class="sbb-notification__close-wrapper">
|
|
150
154
|
<sbb-divider class="sbb-notification__divider" orientation="vertical"></sbb-divider>
|
|
151
155
|
<sbb-secondary-button
|
|
152
156
|
size=${this.size}
|
|
153
157
|
icon-name="cross-small"
|
|
154
158
|
@click=${() => this.close()}
|
|
155
|
-
aria-label=${
|
|
159
|
+
aria-label=${ti[this._language.current]}
|
|
156
160
|
class="sbb-notification__close"
|
|
157
161
|
></sbb-secondary-button>
|
|
158
162
|
</span>`}
|
|
@@ -160,29 +164,29 @@ let gi = (() => {
|
|
|
160
164
|
</div>
|
|
161
165
|
`;
|
|
162
166
|
}
|
|
163
|
-
},
|
|
164
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
165
|
-
|
|
167
|
+
}, 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(w[Symbol.metadata] ?? null) : void 0;
|
|
169
|
+
z = [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 })], f(o, null, z, { kind: "accessor", name: "type", static: !1, private: !1, access: { has: (i) => "type" in i, get: (i) => i.type, set: (i, b) => {
|
|
166
170
|
i.type = b;
|
|
167
171
|
} }, metadata: t }, k, C), f(o, null, O, { kind: "accessor", name: "titleContent", static: !1, private: !1, access: { has: (i) => "titleContent" in i, get: (i) => i.titleContent, set: (i, b) => {
|
|
168
172
|
i.titleContent = b;
|
|
169
173
|
} }, metadata: t }, E, L), f(o, null, N, { kind: "accessor", name: "titleLevel", static: !1, private: !1, access: { has: (i) => "titleLevel" in i, get: (i) => i.titleLevel, set: (i, b) => {
|
|
170
174
|
i.titleLevel = b;
|
|
171
|
-
} }, metadata: t }, T,
|
|
175
|
+
} }, metadata: t }, T, A), f(o, null, I, { kind: "accessor", name: "readonly", static: !1, private: !1, access: { has: (i) => "readonly" in i, get: (i) => i.readonly, set: (i, b) => {
|
|
172
176
|
i.readonly = b;
|
|
173
|
-
} }, metadata: t },
|
|
177
|
+
} }, metadata: t }, S, $), f(o, null, D, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (i) => "size" in i, get: (i) => i.size, set: (i, b) => {
|
|
174
178
|
i.size = b;
|
|
175
|
-
} }, metadata: t },
|
|
179
|
+
} }, metadata: t }, R, H), f(o, null, Z, { kind: "accessor", name: "animation", static: !1, private: !1, access: { has: (i) => "animation" in i, get: (i) => i.animation, set: (i, b) => {
|
|
176
180
|
i.animation = b;
|
|
177
|
-
} }, metadata: t },
|
|
178
|
-
})(), o.styles =
|
|
181
|
+
} }, metadata: t }, U, j), f(null, a = { value: l }, e, { kind: "class", name: l.name, metadata: t }, null, n), h = l = a.value, t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
182
|
+
})(), o.styles = ei, o.events = {
|
|
179
183
|
willOpen: "willOpen",
|
|
180
184
|
didOpen: "didOpen",
|
|
181
185
|
willClose: "willClose",
|
|
182
186
|
didClose: "didClose"
|
|
183
|
-
}, r(l,
|
|
184
|
-
return
|
|
187
|
+
}, r(l, n), o);
|
|
188
|
+
return h = l;
|
|
185
189
|
})();
|
|
186
190
|
export {
|
|
187
|
-
|
|
191
|
+
yi as SbbNotificationElement
|
|
188
192
|
};
|
|
@@ -11,13 +11,6 @@ export declare abstract class SbbOptionBaseElement extends SbbOptionBaseElement_
|
|
|
11
11
|
*/
|
|
12
12
|
set value(value: string);
|
|
13
13
|
get value(): string;
|
|
14
|
-
/**
|
|
15
|
-
* Whether the option is currently active.
|
|
16
|
-
* TODO: remove with next major version.
|
|
17
|
-
* @deprecated
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
accessor active: boolean;
|
|
21
14
|
/** Whether the option is selected. */
|
|
22
15
|
set selected(value: boolean);
|
|
23
16
|
get selected(): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/option/option/option-base-element.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAM1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,6BAA6B,CAAC;;AAgBrC,8BAEe,oBAAqB,SAAQ,yBAE3C;IACC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAEpC;;;;;OAKG;IACH,IACW,KAAK,CAAC,KAAK,EAAE,MAAM,EAE7B;IACD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED
|
|
1
|
+
{"version":3,"file":"option-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/option/option/option-base-element.ts"],"names":[],"mappings":"AACA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAM1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,6BAA6B,CAAC;;AAgBrC,8BAEe,oBAAqB,SAAQ,yBAE3C;IACC,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAEpC;;;;;OAKG;IACH,IACW,KAAK,CAAC,KAAK,EAAE,MAAM,EAE7B;IACD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,sCAAsC;IACtC,IACW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAGjC;IACD,IAAW,QAAQ,IAAI,OAAO,CAE7B;IAED,sDAAsD;IACtD,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,YAAY,CAAC;IAEjD,iDAAiD;IACjD,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,YAAY,CAAC;IAEhD,4CAA4C;IACnC,SAAS,CAAC,QAAQ,CAAC,QAAQ,UAAS;IAE7C,yFAAyF;IAChF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,UAAS;IAE7C,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAC;IAE3C,0CAA0C;IACjC,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAS;IAEnE,4CAA4C;IACnC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IAExD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAEnD,OAAO,CAAC,MAAM,CAAyC;;IAmBvC,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GAAG,IAAI,EAClB,KAAK,EAAE,MAAM,GAAG,IAAI,GACnB,IAAI;IAMP;;;;OAIG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIrC;;OAEG;IACI,6BAA6B,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAQ7C,iBAAiB,IAAI,IAAI;cAUtB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cASzD,YAAY,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAO9E,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IACzD,SAAS,CAAC,QAAQ,CAAC,sBAAsB,IAAI,IAAI;IAEjD,SAAS,CAAC,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAKzD;;;OAGG;IACI,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAItC,SAAS,CAAC,IAAI,IAAI,IAAI;IAStB,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAQpC,OAAO,CAAC,mBAAmB;IAI3B,yEAAyE;IACzE,SAAS,CAAC,wBAAwB,CAAC,aAAa,EAAE,cAAc,EAAE,GAAG,IAAI;IAWzE,SAAS,CAAC,oBAAoB,IAAI,IAAI;IAuBtC,SAAS,CAAC,mBAAmB,IAAI,cAAc;IAwB/C,SAAS,CAAC,UAAU,IAAI,cAAc;IAItC,SAAS,CAAC,WAAW,IAAI,cAAc,GAAG,OAAO,OAAO;IAIxD,SAAS,CAAC,UAAU,IAAI,cAAc,GAAG,OAAO,OAAO;cAIpC,MAAM,IAAI,cAAc;CAmB5C"}
|