@sbb-esta/lyne-elements 3.0.0-next.1 → 3.0.0-next.3
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.d.ts +5 -7
- package/alert/alert/alert.component.d.ts.map +1 -1
- package/alert/alert/alert.component.js +69 -84
- package/alert/alert-group/alert-group.component.js +2 -3
- package/autocomplete/autocomplete-base-element.js +83 -95
- package/autocomplete/autocomplete.component.js +28 -33
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +42 -50
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +1 -1
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +4 -5
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +17 -20
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +21 -24
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +5 -5
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +27 -31
- 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.d.ts +0 -5
- package/calendar/calendar.component.d.ts.map +1 -1
- package/calendar/calendar.component.js +129 -147
- package/card/card/card.component.js +12 -12
- package/card/card-badge/card-badge.component.js +17 -17
- package/card/common/card-action-common.js +20 -22
- 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 +18 -21
- package/checkbox/common/checkbox-common.js +13 -15
- package/chip/chip-group/chip-group.component.js +66 -80
- package/clock/clock.component.js +50 -60
- package/container/container/container.component.js +28 -29
- package/container/sticky-bar/sticky-bar.component.js +25 -26
- package/core/a11y/focus-trap-controller.js +11 -14
- package/core/a11y/input-modality-detector.js +15 -16
- package/core/a11y/interactivity-checker.js +10 -10
- package/core/a11y/live-announcer.js +12 -14
- package/core/base-elements/button-base-element.js +58 -63
- package/core/base-elements/link-base-element.js +3 -6
- package/core/base-elements/open-close-base-element.js +1 -1
- package/core/config/config.d.ts.map +1 -1
- 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 +1 -1
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/date-adapter.js +21 -21
- package/core/datetime/native-date-adapter.d.ts +1 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.js +28 -28
- package/core/decorators/force-type.js +4 -5
- package/core/decorators/id-reference.js +34 -37
- package/core/decorators/plain-date.js +16 -19
- package/core/dom/breakpoint.js +8 -8
- package/core/eventing/event-emitter.js +4 -5
- package/core/i18n/i18n.js +41 -41
- package/core/mixins/element-internals-mixin.d.ts +21 -0
- package/core/mixins/element-internals-mixin.d.ts.map +1 -1
- package/core/mixins/element-internals-mixin.js +109 -23
- package/core/mixins/form-associated-checkbox-mixin.js +32 -37
- package/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-input-mixin.js +69 -93
- package/core/mixins/form-associated-mixin.js +32 -35
- 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/readonly-mixin.d.ts.map +1 -1
- package/core/mixins/readonly-mixin.js +10 -11
- package/core/mixins.js +27 -25
- package/core/overlay/position.js +23 -23
- package/core/styles/core/mediaqueries.scss +1 -1
- package/core/styles/core.scss +70 -35
- 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/core.css +29 -0
- package/custom-elements.json +5233 -2634
- package/date-input/date-input.component.d.ts +16 -1
- package/date-input/date-input.component.d.ts.map +1 -1
- package/date-input/date-input.component.js +71 -58
- package/datepicker/common/datepicker-button.d.ts +31 -20
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common/datepicker-button.js +79 -74
- package/datepicker/common.d.ts +0 -1
- package/datepicker/common.d.ts.map +1 -1
- package/datepicker/common.js +3 -5
- package/datepicker/datepicker/datepicker.component.d.ts +23 -102
- package/datepicker/datepicker/datepicker.component.d.ts.map +1 -1
- package/datepicker/datepicker/datepicker.component.js +91 -233
- package/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts +2 -2
- package/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts.map +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +27 -18
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts +2 -2
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts.map +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +27 -18
- package/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts +6 -26
- package/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +36 -145
- package/datepicker.js +9 -11
- package/development/accordion/accordion.component.js +4 -7
- package/development/action-group/action-group.component.js +3 -5
- package/development/alert/alert/alert.component.d.ts +5 -7
- package/development/alert/alert/alert.component.d.ts.map +1 -1
- package/development/alert/alert/alert.component.js +34 -52
- package/development/alert/alert-group/alert-group.component.js +2 -3
- package/development/autocomplete/autocomplete-base-element.js +20 -32
- 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.d.ts +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +4 -9
- 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.d.ts +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
- 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.d.ts +0 -5
- package/development/calendar/calendar.component.d.ts.map +1 -1
- package/development/calendar/calendar.component.js +20 -44
- package/development/card/card/card.component.js +1 -1
- package/development/card/card-badge/card-badge.component.js +2 -2
- 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 +4 -6
- 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 +18 -32
- 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 +3 -4
- 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/input-modality-detector.js +2 -3
- package/development/core/a11y/interactivity-checker.js +2 -2
- package/development/core/a11y/live-announcer.js +6 -8
- 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.d.ts.map +1 -1
- package/development/core/config/config.js +1 -1
- 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 +1 -1
- 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.d.ts +1 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.js +4 -4
- 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/id-reference.js +4 -7
- package/development/core/decorators/plain-date.js +5 -8
- 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/host-context.js +1 -1
- 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 +18 -18
- package/development/core/mixins/animation-complete-mixin.js +1 -1
- package/development/core/mixins/disabled-mixin.js +1 -1
- package/development/core/mixins/element-internals-mixin.d.ts +21 -0
- package/development/core/mixins/element-internals-mixin.d.ts.map +1 -1
- package/development/core/mixins/element-internals-mixin.js +123 -2
- package/development/core/mixins/form-associated-checkbox-mixin.js +6 -9
- package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-input-mixin.js +29 -59
- package/development/core/mixins/form-associated-mixin.js +6 -9
- 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/readonly-mixin.d.ts.map +1 -1
- package/development/core/mixins/readonly-mixin.js +4 -6
- package/development/core/mixins/required-mixin.js +1 -1
- package/development/core/mixins/update-scheduler-mixin.js +1 -1
- package/development/core/mixins.js +4 -2
- 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.d.ts +16 -1
- package/development/date-input/date-input.component.d.ts.map +1 -1
- package/development/date-input/date-input.component.js +28 -11
- package/development/datepicker/common/datepicker-button.d.ts +31 -20
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common/datepicker-button.js +103 -90
- package/development/datepicker/common.d.ts +0 -1
- package/development/datepicker/common.d.ts.map +1 -1
- package/development/datepicker/common.js +4 -6
- package/development/datepicker/datepicker/datepicker.component.d.ts +23 -102
- package/development/datepicker/datepicker/datepicker.component.d.ts.map +1 -1
- package/development/datepicker/datepicker/datepicker.component.js +94 -337
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts +2 -2
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.js +18 -6
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts +2 -2
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts.map +1 -1
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +18 -6
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts +6 -26
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.js +137 -224
- package/development/datepicker.js +3 -5
- package/development/dialog/dialog/dialog.component.d.ts +7 -16
- package/development/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/development/dialog/dialog/dialog.component.js +78 -149
- package/development/dialog/dialog-actions/dialog-actions.component.d.ts +2 -2
- package/development/dialog/dialog-actions/dialog-actions.component.d.ts.map +1 -1
- package/development/dialog/dialog-actions/dialog-actions.component.js +20 -17
- package/development/dialog/dialog-content/dialog-content.component.d.ts.map +1 -1
- package/development/dialog/dialog-content/dialog-content.component.js +5 -46
- package/development/dialog/dialog-title/dialog-title.component.d.ts +2 -26
- package/development/dialog/dialog-title/dialog-title.component.d.ts.map +1 -1
- package/development/dialog/dialog-title/dialog-title.component.js +12 -179
- package/development/divider/divider.component.js +2 -2
- package/development/expansion-panel/expansion-panel/expansion-panel.component.js +9 -13
- package/development/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +2 -2
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +5 -6
- 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 +3 -4
- package/development/flip-card/flip-card-summary/flip-card-summary.component.js +3 -4
- 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.d.ts +1 -1
- package/development/form-field/form-field/form-field.component.d.ts.map +1 -1
- package/development/form-field/form-field/form-field.component.js +39 -67
- package/development/form-field/form-field-clear/form-field-clear.component.d.ts.map +1 -1
- package/development/form-field/form-field-clear/form-field-clear.component.js +6 -8
- 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.d.ts +5 -3
- package/development/icon/icon-base.d.ts.map +1 -1
- package/development/icon/icon-base.js +4 -7
- 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.d.ts +1 -2
- package/development/icon/icon.component.d.ts.map +1 -1
- package/development/icon/icon.component.js +8 -19
- package/development/image/image.component.js +7 -9
- package/development/journey-header/journey-header.component.d.ts +5 -5
- package/development/journey-header/journey-header.component.d.ts.map +1 -1
- package/development/journey-header/journey-header.component.js +26 -40
- 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-DPLJx5Uo.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.d.ts +4 -8
- package/development/message/message.component.d.ts.map +1 -1
- package/development/message/message.component.js +12 -54
- 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.d.ts +1 -1
- package/development/navigation/navigation-section/navigation-section.component.d.ts.map +1 -1
- package/development/navigation/navigation-section/navigation-section.component.js +27 -37
- package/development/notification/notification.component.d.ts +7 -9
- package/development/notification/notification.component.d.ts.map +1 -1
- package/development/notification/notification.component.js +47 -77
- package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/development/option/optgroup/optgroup-base-element.js +8 -14
- 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.d.ts +24 -6
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay-base-element.js +114 -15
- package/development/overlay/overlay.component.d.ts +2 -12
- package/development/overlay/overlay.component.d.ts.map +1 -1
- package/development/overlay/overlay.component.js +33 -98
- 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.d.ts +45 -34
- package/development/popover/popover/popover.component.d.ts.map +1 -1
- package/development/popover/popover/popover.component.js +215 -172
- package/development/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/development/popover/popover.js +2 -1
- package/development/popover.js +2 -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.d.ts +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.component.d.ts.map +1 -1
- 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 -49
- 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 +9 -16
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts +0 -1
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts.map +1 -1
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.js +3 -8
- 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.d.ts +2 -0
- package/development/sidebar/sidebar-title/sidebar-title.component.d.ts.map +1 -1
- package/development/sidebar/sidebar-title/sidebar-title.component.js +3 -9
- package/development/signet/signet.component.js +1 -1
- package/development/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/development/skiplink-list/skiplink-list.component.js +19 -10
- package/development/slider/slider.component.js +4 -6
- package/development/status/status.component.d.ts +4 -7
- package/development/status/status.component.d.ts.map +1 -1
- package/development/status/status.component.js +23 -57
- package/development/stepper/step/step.component.d.ts +2 -2
- package/development/stepper/step/step.component.d.ts.map +1 -1
- package/development/stepper/step/step.component.js +20 -22
- package/development/stepper/step-label/step-label.component.d.ts +3 -4
- package/development/stepper/step-label/step-label.component.d.ts.map +1 -1
- package/development/stepper/step-label/step-label.component.js +20 -24
- 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 +7 -13
- package/development/tag/tag-group/tag-group.component.js +5 -13
- package/development/teaser/teaser.component.d.ts +6 -10
- package/development/teaser/teaser.component.d.ts.map +1 -1
- package/development/teaser/teaser.component.js +48 -76
- 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 +10 -14
- package/development/timetable-occupancy/timetable-occupancy.component.js +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.js +2 -5
- package/development/title/title-base.d.ts +0 -8
- package/development/title/title-base.d.ts.map +1 -1
- package/development/title/title-base.js +17 -49
- package/development/title/title.component.d.ts +2 -0
- package/development/title/title.component.d.ts.map +1 -1
- package/development/title/title.component.js +9 -14
- package/development/toast/toast.component.d.ts.map +1 -1
- package/development/toast/toast.component.js +7 -16
- package/development/toggle/toggle/toggle.component.js +8 -12
- package/development/toggle/toggle-option/toggle-option.component.d.ts +1 -1
- package/development/toggle/toggle-option/toggle-option.component.d.ts.map +1 -1
- package/development/toggle/toggle-option/toggle-option.component.js +10 -17
- 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.d.ts +7 -16
- package/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/dialog/dialog/dialog.component.js +57 -87
- package/dialog/dialog-actions/dialog-actions.component.d.ts +2 -2
- package/dialog/dialog-actions/dialog-actions.component.d.ts.map +1 -1
- package/dialog/dialog-actions/dialog-actions.component.js +16 -16
- package/dialog/dialog-content/dialog-content.component.d.ts.map +1 -1
- package/dialog/dialog-content/dialog-content.component.js +14 -19
- package/dialog/dialog-title/dialog-title.component.d.ts +2 -26
- package/dialog/dialog-title/dialog-title.component.d.ts.map +1 -1
- package/dialog/dialog-title/dialog-title.component.js +16 -111
- package/divider/divider.component.js +3 -3
- package/expansion-panel/expansion-panel/expansion-panel.component.js +5 -9
- package/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +30 -31
- 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 +15 -16
- package/flip-card/flip-card-summary/flip-card-summary.component.js +19 -20
- package/form-error/form-error.component.js +13 -14
- package/form-field/form-field/form-field.component.d.ts +1 -1
- package/form-field/form-field/form-field.component.d.ts.map +1 -1
- package/form-field/form-field/form-field.component.js +149 -168
- package/form-field/form-field-clear/form-field-clear.component.d.ts.map +1 -1
- package/form-field/form-field-clear/form-field-clear.component.js +19 -21
- package/header/header/header.component.js +26 -29
- package/icon/icon-base.d.ts +5 -3
- package/icon/icon-base.d.ts.map +1 -1
- package/icon/icon-base.js +32 -34
- package/icon/icon-request.js +10 -11
- package/icon/icon.component.d.ts +1 -2
- package/icon/icon.component.d.ts.map +1 -1
- package/icon/icon.component.js +37 -37
- package/icon-sidebar-button-common-CM-ueEhH.js +7 -0
- package/image/image.component.js +4 -6
- package/journey-header/journey-header.component.d.ts +5 -5
- package/journey-header/journey-header.component.d.ts.map +1 -1
- package/journey-header/journey-header.component.js +50 -63
- package/map-container/map-container.component.js +1 -2
- package/menu/menu/menu.component.js +47 -55
- package/message/message.component.d.ts +4 -8
- package/message/message.component.d.ts.map +1 -1
- package/message/message.component.js +18 -47
- package/navigation/common/navigation-action-common.js +19 -21
- package/navigation/navigation/navigation.component.js +73 -92
- package/navigation/navigation-marker/navigation-marker.component.js +26 -28
- package/navigation/navigation-section/navigation-section.component.d.ts +1 -1
- package/navigation/navigation-section/navigation-section.component.d.ts.map +1 -1
- package/navigation/navigation-section/navigation-section.component.js +72 -82
- package/notification/notification.component.d.ts +7 -9
- package/notification/notification.component.d.ts.map +1 -1
- package/notification/notification.component.js +77 -95
- package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/option/optgroup/optgroup-base-element.js +36 -38
- package/option/optgroup/optgroup.component.js +16 -20
- package/option/option/option-base-element.js +3 -4
- package/option/option/option.component.js +26 -29
- package/overlay/overlay-base-element.d.ts +24 -6
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay-base-element.js +98 -51
- package/overlay/overlay.component.d.ts +2 -12
- package/overlay/overlay.component.d.ts.map +1 -1
- package/overlay/overlay.component.js +57 -95
- package/package.json +1 -1
- package/paginator/paginator/paginator.component.js +3 -4
- package/popover/popover/popover.component.d.ts +45 -34
- package/popover/popover/popover.component.d.ts.map +1 -1
- package/popover/popover/popover.component.js +194 -168
- package/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/popover/popover.js +2 -1
- package/popover.js +5 -4
- package/radio-button/common/radio-button-common.js +11 -15
- package/radio-button/radio-button/radio-button.component.js +16 -19
- package/radio-button/radio-button-group/radio-button-group.component.d.ts +1 -1
- package/radio-button/radio-button-group/radio-button-group.component.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.component.js +27 -43
- package/radio-button/radio-button-panel/radio-button-panel.component.js +33 -37
- package/select/select.component.js +94 -117
- 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 +62 -69
- package/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts +0 -1
- package/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts.map +1 -1
- package/sidebar/sidebar-close-button/sidebar-close-button.component.js +18 -18
- package/sidebar/sidebar-container/sidebar-container.component.js +29 -33
- package/sidebar/sidebar-title/sidebar-title.component.d.ts +2 -0
- package/sidebar/sidebar-title/sidebar-title.component.d.ts.map +1 -1
- package/sidebar/sidebar-title/sidebar-title.component.js +16 -16
- package/sidebar.js +1 -1
- package/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/skiplink-list/skiplink-list.component.js +36 -39
- package/slider/slider.component.js +11 -13
- package/standard-theme.css +29 -25
- package/status/status.component.d.ts +4 -7
- package/status/status.component.d.ts.map +1 -1
- package/status/status.component.js +34 -50
- package/stepper/step/step.component.d.ts +2 -2
- package/stepper/step/step.component.d.ts.map +1 -1
- package/stepper/step/step.component.js +29 -30
- package/stepper/step-label/step-label.component.d.ts +3 -4
- package/stepper/step-label/step-label.component.d.ts.map +1 -1
- package/stepper/step-label/step-label.component.js +22 -25
- package/stepper/stepper/stepper.component.js +72 -86
- package/table/table-wrapper/table-wrapper.component.js +17 -18
- package/table.css +0 -25
- package/tabs/tab-group/tab-group.component.js +77 -92
- package/tabs/tab-label/tab-label.component.js +12 -12
- package/tag/tag/tag.component.js +49 -55
- package/tag/tag-group/tag-group.component.js +37 -45
- package/teaser/teaser.component.d.ts +6 -10
- package/teaser/teaser.component.d.ts.map +1 -1
- package/teaser/teaser.component.js +45 -68
- 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 +29 -33
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +22 -25
- package/title/title-base.d.ts +0 -8
- package/title/title-base.d.ts.map +1 -1
- package/title/title-base.js +34 -53
- package/title/title.component.d.ts +2 -0
- package/title/title.component.d.ts.map +1 -1
- package/title/title.component.js +9 -9
- package/toast/toast.component.d.ts.map +1 -1
- package/toast/toast.component.js +6 -9
- package/toggle/toggle/toggle.component.js +27 -31
- package/toggle/toggle-option/toggle-option.component.d.ts +1 -1
- package/toggle/toggle-option/toggle-option.component.d.ts.map +1 -1
- package/toggle/toggle-option/toggle-option.component.js +44 -51
- 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/datepicker/common/datepicker-association-controllers.d.ts +0 -21
- package/datepicker/common/datepicker-association-controllers.d.ts.map +0 -1
- package/datepicker/common/datepicker-association-controllers.js +0 -58
- package/development/datepicker/common/datepicker-association-controllers.d.ts +0 -21
- package/development/datepicker/common/datepicker-association-controllers.d.ts.map +0 -1
- package/development/datepicker/common/datepicker-association-controllers.js +0 -82
- package/icon-sidebar-button-common-DG8bnrBu.js +0 -7
- package/teaser-product-common-CpMAlYEp.js +0 -5
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), (t = c.at(-1)) == null || t.close());
|
|
1
|
+
import { isServer as i } from "lit";
|
|
2
|
+
const o = new Array();
|
|
3
|
+
i || window.addEventListener("keydown", (t) => {
|
|
4
|
+
t.key === "Escape" && !t.defaultPrevented && (t.preventDefault(), o.at(-1)?.close());
|
|
6
5
|
});
|
|
7
|
-
class
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
10
|
-
this._host = t, this._overlayStack = s, (i = (o = this._host).addController) == null || i.call(o, this);
|
|
6
|
+
class n {
|
|
7
|
+
constructor(e, s = o) {
|
|
8
|
+
this._host = e, this._overlayStack = s, this._host.addController?.(this);
|
|
11
9
|
}
|
|
12
10
|
hostDisconnected() {
|
|
13
11
|
this.disconnect();
|
|
@@ -19,11 +17,11 @@ class r {
|
|
|
19
17
|
// This must be called when the overlay is closed
|
|
20
18
|
disconnect() {
|
|
21
19
|
if (this._overlayStack.length) {
|
|
22
|
-
const
|
|
23
|
-
|
|
20
|
+
const e = this._overlayStack.findIndex((s) => s === this._host);
|
|
21
|
+
e !== -1 && this._overlayStack.splice(e, 1);
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
export {
|
|
28
|
-
|
|
26
|
+
n as SbbEscapableOverlayController
|
|
29
27
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isServer as d } from "lit";
|
|
2
2
|
const h = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
class _ {
|
|
4
|
-
constructor(t,
|
|
5
|
-
this._host = t, this._idRef =
|
|
4
|
+
constructor(t, r, i = h) {
|
|
5
|
+
this._host = t, this._idRef = r, this._observers = i, this._rootNode = null, this._host.addController(this);
|
|
6
6
|
}
|
|
7
7
|
hostConnected() {
|
|
8
8
|
if (d)
|
|
@@ -12,17 +12,17 @@ class _ {
|
|
|
12
12
|
if (t)
|
|
13
13
|
t.controllers.add(this);
|
|
14
14
|
else {
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const r = /* @__PURE__ */ new Set([this]), i = new MutationObserver((n) => {
|
|
16
|
+
const s = /* @__PURE__ */ new Set();
|
|
17
17
|
for (const e of n)
|
|
18
18
|
if (e.type === "attributes")
|
|
19
|
-
|
|
19
|
+
s.add(e.oldValue), s.add(e.target.id);
|
|
20
20
|
else if (e.type === "childList")
|
|
21
|
-
for (const
|
|
22
|
-
|
|
23
|
-
for (const e of
|
|
24
|
-
const
|
|
25
|
-
|
|
21
|
+
for (const o of [...e.addedNodes, ...e.removedNodes])
|
|
22
|
+
o instanceof HTMLElement && (s.add(o.id), o.querySelectorAll("[id]").forEach((l) => s.add(l.id)));
|
|
23
|
+
for (const e of r) {
|
|
24
|
+
const o = e._host[e._idRef];
|
|
25
|
+
o && typeof o == "string" && s.has(o) && e._host.requestUpdate();
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
i.observe(this._rootNode, {
|
|
@@ -30,7 +30,7 @@ class _ {
|
|
|
30
30
|
childList: !0,
|
|
31
31
|
subtree: !0,
|
|
32
32
|
attributeOldValue: !0
|
|
33
|
-
}), this._observers.set(this._rootNode, { observer: i, controllers:
|
|
33
|
+
}), this._observers.set(this._rootNode, { observer: i, controllers: r });
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
hostDisconnected() {
|
|
@@ -47,12 +47,11 @@ class _ {
|
|
|
47
47
|
* Find the element by id in the current document fragment
|
|
48
48
|
*/
|
|
49
49
|
find() {
|
|
50
|
-
var t;
|
|
51
50
|
if (d || !this._rootNode)
|
|
52
51
|
return null;
|
|
53
52
|
{
|
|
54
|
-
const
|
|
55
|
-
return typeof
|
|
53
|
+
const t = this._host[this._idRef];
|
|
54
|
+
return typeof t == "string" ? this._rootNode?.getElementById(t) : null;
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
class
|
|
3
|
-
constructor(t,
|
|
4
|
-
|
|
5
|
-
this._host = t, this._inertElements = r, this._inertOverlays = e, (s = (i = this._host).addController) == null || s.call(i, this);
|
|
1
|
+
const r = ["script", "head", "template", "style"], s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
2
|
+
class h {
|
|
3
|
+
constructor(t, e = s, i = a) {
|
|
4
|
+
this._host = t, this._inertElements = e, this._inertOverlays = i, this._host.addController?.(this);
|
|
6
5
|
}
|
|
7
6
|
hostConnected() {
|
|
8
7
|
this._host.isOpen && this.activate();
|
|
@@ -35,14 +34,13 @@ class d {
|
|
|
35
34
|
}), this._inertElements.clear();
|
|
36
35
|
}
|
|
37
36
|
_addInertAttributes() {
|
|
38
|
-
var r, e;
|
|
39
37
|
let t = this._currentOverlay();
|
|
40
38
|
for (; t !== document.documentElement && t !== null; )
|
|
41
|
-
Array.from((
|
|
42
|
-
this._inertElements.add(
|
|
43
|
-
}), t =
|
|
39
|
+
Array.from((t?.parentElement ?? t?.getRootNode())?.childNodes ?? []).filter((e) => e !== t && e instanceof window.HTMLElement && !r.includes(e.localName) && !e.classList.contains("sbb-live-announcer-element")).forEach((e) => {
|
|
40
|
+
this._inertElements.add(e), e.inert || (e.inert = !0, e.toggleAttribute("data-sbb-inert", !0)), e.hasAttribute("aria-hidden") || (e.setAttribute("aria-hidden", "true"), e.toggleAttribute("data-sbb-aria-hidden", !0));
|
|
41
|
+
}), t = t?.parentElement ?? t?.getRootNode()?.host ?? null;
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
export {
|
|
47
|
-
|
|
45
|
+
h as SbbInertController
|
|
48
46
|
};
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
class
|
|
3
|
-
constructor(
|
|
4
|
-
this._host =
|
|
5
|
-
Array.from(this._host.childNodes).filter((
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}) ? this.slots.add("unnamed") : Array.from(this._host.children).every((o) => o.slot) && this.slots.delete("unnamed"), this._updateSlotNameAttribute();
|
|
9
|
-
}), this._slotchangeHandler = (t) => {
|
|
10
|
-
this._syncSlots(t.target);
|
|
1
|
+
import { isServer as n } from "lit";
|
|
2
|
+
class h {
|
|
3
|
+
constructor(s, t = null) {
|
|
4
|
+
this._host = s, this._onChangeCallback = t, this.slots = /* @__PURE__ */ new Set(), this._textObserver = !n && new MutationObserver(() => {
|
|
5
|
+
Array.from(this._host.childNodes).filter((e) => e.nodeType === e.TEXT_NODE).some((e) => e.textContent?.trim()) ? this.slots.add("unnamed") : Array.from(this._host.children).every((e) => e.slot) && this.slots.delete("unnamed"), this._updateSlotNameAttribute();
|
|
6
|
+
}), this._slotchangeHandler = (o) => {
|
|
7
|
+
this._syncSlots(o.target);
|
|
11
8
|
}, this._host.addController(this);
|
|
12
9
|
}
|
|
13
10
|
hostConnected() {
|
|
14
|
-
|
|
15
|
-
this._syncSlots(...((s = (e = this._host.shadowRoot) == null ? void 0 : e.querySelectorAll) == null ? void 0 : s.call(e, "slot")) ?? []), (t = this._host.shadowRoot) == null || t.addEventListener("slotchange", this._slotchangeHandler);
|
|
11
|
+
this._syncSlots(...this._host.shadowRoot?.querySelectorAll?.("slot") ?? []), this._host.shadowRoot?.addEventListener("slotchange", this._slotchangeHandler);
|
|
16
12
|
}
|
|
17
13
|
hostDisconnected() {
|
|
18
|
-
|
|
19
|
-
(e = this._host.shadowRoot) == null || e.removeEventListener("slotchange", this._slotchangeHandler), this._textObserver.disconnect();
|
|
14
|
+
this._host.shadowRoot?.removeEventListener("slotchange", this._slotchangeHandler), this._textObserver.disconnect();
|
|
20
15
|
}
|
|
21
|
-
_syncSlots(...
|
|
22
|
-
var s;
|
|
16
|
+
_syncSlots(...s) {
|
|
23
17
|
this._textObserver.disconnect();
|
|
24
|
-
for (const t of
|
|
18
|
+
for (const t of s) {
|
|
25
19
|
const o = t.name || "unnamed";
|
|
26
|
-
t.assignedNodes().some((
|
|
27
|
-
var a;
|
|
28
|
-
return "tagName" in n || ((a = n.textContent) == null ? void 0 : a.trim());
|
|
29
|
-
}) ? this.slots.add(o) : this.slots.delete(o), this._updateSlotNameAttribute();
|
|
20
|
+
t.assignedNodes().some((e) => "tagName" in e || e.textContent?.trim()) ? this.slots.add(o) : this.slots.delete(o), this._updateSlotNameAttribute();
|
|
30
21
|
}
|
|
31
|
-
|
|
22
|
+
s.find((t) => !t.name)?.assignedNodes().filter((t) => t.nodeType === t.TEXT_NODE).forEach((t) => this._textObserver.observe(t, { characterData: !0 }));
|
|
32
23
|
}
|
|
33
24
|
_updateSlotNameAttribute() {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
s ? this._host.getAttribute("data-slot-names") !== s && this._host.setAttribute("data-slot-names", s) : this._host.removeAttribute("data-slot-names"), s !== e && ((t = this._onChangeCallback) == null || t.call(this));
|
|
25
|
+
const s = this._host.getAttribute("data-slot-names"), t = [...this.slots].sort().join(" ");
|
|
26
|
+
t ? this._host.getAttribute("data-slot-names") !== t && this._host.setAttribute("data-slot-names", t) : this._host.removeAttribute("data-slot-names"), t !== s && this._onChangeCallback?.();
|
|
37
27
|
}
|
|
38
28
|
}
|
|
39
29
|
export {
|
|
40
|
-
|
|
30
|
+
h as SbbSlotStateController
|
|
41
31
|
};
|
|
@@ -111,7 +111,7 @@ export declare abstract class DateAdapter<T = any> {
|
|
|
111
111
|
* @param value The date in the format DD.MM.YYYY.
|
|
112
112
|
* @param now The current date as Date.
|
|
113
113
|
*/
|
|
114
|
-
abstract parse(value: string | null | undefined
|
|
114
|
+
abstract parse(value: string | null | undefined): T | null;
|
|
115
115
|
/**
|
|
116
116
|
* Format the given date as string.
|
|
117
117
|
* @param date The date to format.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/date-adapter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAU,CAAC;AACtC,eAAO,MAAM,cAAc,EAAE,MAAU,CAAC;AACxC,eAAO,MAAM,aAAa,EAAE,MAAU,CAAC;AACvC,eAAO,MAAM,eAAe,EAAE,MAAW,CAAC;AAC1C,eAAO,MAAM,cAAc,EAAE,MAAW,CAAC;AACzC,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/date-adapter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAU,CAAC;AACtC,eAAO,MAAM,cAAc,EAAE,MAAU,CAAC;AACxC,eAAO,MAAM,aAAa,EAAE,MAAU,CAAC;AACvC,eAAO,MAAM,eAAe,EAAE,MAAW,CAAC;AAC1C,eAAO,MAAM,cAAc,EAAE,MAAW,CAAC;AACzC,eAAO,MAAM,WAAW,QACyD,CAAC;AAClF,eAAO,MAAM,mBAAmB,QAAqD,CAAC;AAEtF;;;;GAIG;AACH,8BAAsB,WAAW,CAAC,CAAC,GAAG,GAAG;IACvC;;;OAGG;aACa,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAExC;;;;OAIG;aACa,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAEzC;;;OAGG;aACa,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAExC;;;OAGG;aACa,YAAY,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAE7C,kEAAkE;aAClD,iBAAiB,IAAI,MAAM;IAE3C;;;;OAIG;aACa,iBAAiB,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAElD;;;OAGG;aACa,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAE3E,6FAA6F;aAC7E,YAAY,IAAI,MAAM,EAAE;IAExC;;;OAGG;aACa,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAE/E,4BAA4B;aACZ,KAAK,IAAI,CAAC;IAE1B;;;OAGG;aACa,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,CAAC;IAE9D;;;OAGG;aACa,KAAK,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC;IAEjC;;;;;OAKG;aACa,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IAExE;;;;;;;OAOG;IACI,WAAW,CAAC,KAAK,EAAE,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,IAAI;IAUlE;;;;OAIG;aACa,gBAAgB,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC;IAE3D;;;;;;OAMG;aACa,iBAAiB,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,CAAC;IAE7D;;;;OAIG;aACa,eAAe,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC;IAEzD;;;;OAIG;aACa,0BAA0B,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM,GAAG,MAAM;IAEpE;;;;OAIG;aACa,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,CAAC,GAAG,IAAI;IAEjE;;;;OAIG;IACI,MAAM,CACX,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,EAC1B,OAAO,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;KAAE,GAChE,MAAM;IA4BT;;;OAGG;aACa,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAEjD;;;OAGG;aACa,OAAO,IAAI,CAAC;IAE5B;;;OAGG;IACI,SAAS,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAKjC;;;;;OAKG;IACI,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,CAAC,GAAG,IAAI;IAInD;;OAEG;IACI,kBAAkB,CAAC,IAAI,EAAE,CAAC,GAAG,MAAM;IAO1C;;;;;;OAMG;IACI,WAAW,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM;IAQ/C;;;;;;OAMG;IACI,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,GAAG,OAAO;IAY3D;;;;;;;OAOG;IACI,SAAS,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC;CAS7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
class
|
|
1
|
+
const h = 7, o = 4, D = 4, c = 12, g = 24, l = /(0?[1-9]|[12][0-9]|3[01])[.,\\/\-\s](0?[1-9]|1[0-2])[.,\\/\-\s]([0-9]{1,4}$)?/, u = /^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-3][0-9])$/;
|
|
2
|
+
class O {
|
|
3
3
|
/**
|
|
4
4
|
* Attempts to deserialize a value to a valid date object. This is different from parsing in that
|
|
5
5
|
* deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
|
|
@@ -19,23 +19,23 @@ class _ {
|
|
|
19
19
|
format(t, e) {
|
|
20
20
|
if (!this.isValid(t))
|
|
21
21
|
return "";
|
|
22
|
-
const
|
|
22
|
+
const s = /* @__PURE__ */ new Date(this.toIso8601(t) + "T00:00:00"), i = new Intl.DateTimeFormat("de-CH", {
|
|
23
23
|
day: "2-digit",
|
|
24
24
|
month: "2-digit",
|
|
25
25
|
year: "numeric"
|
|
26
26
|
});
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
29
|
-
const a =
|
|
30
|
-
let
|
|
31
|
-
return
|
|
27
|
+
if (e?.weekdayStyle === "none")
|
|
28
|
+
return i.format(s);
|
|
29
|
+
const a = e?.weekdayStyle ?? "short";
|
|
30
|
+
let r = this.getDayOfWeekNames(a)[this.getDayOfWeek(t)];
|
|
31
|
+
return r = r.charAt(0).toUpperCase() + r.substring(1), a === "short" && (r = r.substring(0, 2)), `${r}, ${i.format(s)}`;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Get the given date as ISO String.
|
|
35
35
|
* @param date The date to convert to ISO String.
|
|
36
36
|
*/
|
|
37
37
|
toIso8601(t) {
|
|
38
|
-
const e = (
|
|
38
|
+
const e = (s, i = 2) => `${s}`.padStart(i, "0");
|
|
39
39
|
return `${e(this.getYear(t), 4)}-${e(this.getMonth(t))}-${e(this.getDate(t))}`;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -73,8 +73,8 @@ class _ {
|
|
|
73
73
|
*/
|
|
74
74
|
sameDate(t, e) {
|
|
75
75
|
if (t && e) {
|
|
76
|
-
const
|
|
77
|
-
return
|
|
76
|
+
const s = this.isValid(t), i = this.isValid(e);
|
|
77
|
+
return s && i ? !this.compareDate(t, e) : s == i;
|
|
78
78
|
}
|
|
79
79
|
return t == e;
|
|
80
80
|
}
|
|
@@ -86,17 +86,17 @@ class _ {
|
|
|
86
86
|
* @returns `min` if `date` is less than `min`, `max` if date is greater than `max`,
|
|
87
87
|
* otherwise `date`.
|
|
88
88
|
*/
|
|
89
|
-
clampDate(t, e,
|
|
90
|
-
return e && this.compareDate(t, e) < 0 ? e :
|
|
89
|
+
clampDate(t, e, s) {
|
|
90
|
+
return e && this.compareDate(t, e) < 0 ? e : s && this.compareDate(t, s) > 0 ? s : t;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
h as DAYS_PER_ROW,
|
|
95
|
+
O as DateAdapter,
|
|
96
|
+
l as FORMAT_DATE,
|
|
97
|
+
u as ISO8601_FORMAT_DATE,
|
|
98
|
+
c as MONTHS_PER_PAGE,
|
|
99
|
+
o as MONTHS_PER_ROW,
|
|
100
|
+
g as YEARS_PER_PAGE,
|
|
101
|
+
D as YEARS_PER_ROW
|
|
102
102
|
};
|
|
@@ -56,7 +56,7 @@ export declare class NativeDateAdapter extends DateAdapter<Date> {
|
|
|
56
56
|
/** Creates a Date from a valid input (Date or ISO string). */
|
|
57
57
|
deserialize(date: Date | string | null | undefined): Date | null;
|
|
58
58
|
/** Returns the right format for the `valueAsDate` property. */
|
|
59
|
-
parse(value: string | null | undefined
|
|
59
|
+
parse(value: string | null | undefined): Date | null;
|
|
60
60
|
invalid(): Date;
|
|
61
61
|
/**
|
|
62
62
|
* Creates an array with the given length and fills it by mapping with the provided function.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/native-date-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoC,MAAM,mBAAmB,CAAC;AAUlF,qBAAa,iBAAkB,SAAQ,WAAW,CAAC,IAAI,CAAC;IACtD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;gBAExB,gBAAgB,GAAE,MAAW;IAKhD,uCAAuC;IAChC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIlC,wCAAwC;IACjC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAInC,sCAAsC;IAC/B,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIlC,kDAAkD;IAC3C,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIvC,yCAAyC;IAClC,0BAA0B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAS9D;;;;OAIG;IACI,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAKlE,iGAAiG;IAC1F,YAAY,IAAI,MAAM,EAAE;IAK/B;;;;OAIG;IACI,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAM/D,iBAAiB,IAAI,MAAM;IAIlC,6EAA6E;IACtE,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAI5C,4BAA4B;IACrB,KAAK,IAAI,IAAI;IAIpB,+FAA+F;IACxF,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAmBlE,gDAAgD;IACzC,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAIxC,uDAAuD;IAChD,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,IAAI;IAI3D,mDAAmD;IAC5C,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAI9B;;;;OAIG;IACI,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIxD;;;;OAIG;IACI,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ1D,yFAAyF;IAClF,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKtD,8DAA8D;IAC9C,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;IAahF,+DAA+D;IACxD,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"native-date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/native-date-adapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAoC,MAAM,mBAAmB,CAAC;AAUlF,qBAAa,iBAAkB,SAAQ,WAAW,CAAC,IAAI,CAAC;IACtD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;gBAExB,gBAAgB,GAAE,MAAW;IAKhD,uCAAuC;IAChC,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIlC,wCAAwC;IACjC,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAInC,sCAAsC;IAC/B,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIlC,kDAAkD;IAC3C,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAIvC,yCAAyC;IAClC,0BAA0B,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM;IAS9D;;;;OAIG;IACI,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAKlE,iGAAiG;IAC1F,YAAY,IAAI,MAAM,EAAE;IAK/B;;;;OAIG;IACI,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,EAAE;IAM/D,iBAAiB,IAAI,MAAM;IAIlC,6EAA6E;IACtE,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM;IAI5C,4BAA4B;IACrB,KAAK,IAAI,IAAI;IAIpB,+FAA+F;IACxF,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAmBlE,gDAAgD;IACzC,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAIxC,uDAAuD;IAChD,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,IAAI;IAI3D,mDAAmD;IAC5C,KAAK,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAI9B;;;;OAIG;IACI,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIxD;;;;OAIG;IACI,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAQ1D,yFAAyF;IAClF,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKtD,8DAA8D;IAC9C,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;IAahF,+DAA+D;IACxD,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;IAuC3C,OAAO,IAAI,IAAI;IAI/B;;;;OAIG;IACH,OAAO,CAAC,MAAM;IAId,gEAAgE;IAChE,OAAO,CAAC,uBAAuB;CAShC;AAED,eAAO,MAAM,kBAAkB,mBAA0B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SbbLanguageController as i } from "../controllers.js";
|
|
2
|
-
import { DateAdapter as
|
|
3
|
-
const
|
|
4
|
-
class
|
|
2
|
+
import { DateAdapter as u, ISO8601_FORMAT_DATE as l, FORMAT_DATE as h } from "./date-adapter.js";
|
|
3
|
+
const c = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
|
|
4
|
+
class D extends u {
|
|
5
5
|
constructor(t = 15) {
|
|
6
6
|
super(), this._cutoffYearOffset = t;
|
|
7
7
|
}
|
|
@@ -71,10 +71,10 @@ class f extends l {
|
|
|
71
71
|
throw Error(`Invalid month index "${e}". Month index has to be between 1 and 12.`);
|
|
72
72
|
if (r < 1)
|
|
73
73
|
throw Error(`Invalid date "${r}". Date has to be greater than 0.`);
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
74
|
+
const a = this._createDateWithOverflow(t, e - 1, r);
|
|
75
|
+
if (a.getMonth() + 1 !== e)
|
|
76
76
|
throw Error(`Invalid date "${r}" for month with index "${e}".`);
|
|
77
|
-
return
|
|
77
|
+
return a;
|
|
78
78
|
}
|
|
79
79
|
/** Checks whether the given `obj` is a Date. */
|
|
80
80
|
isDateInstance(t) {
|
|
@@ -102,8 +102,8 @@ class f extends l {
|
|
|
102
102
|
* E.g., with `date` = new Date(2022, 0, 31) and `months` = 1, it returns new Date(2022, 1, 28).
|
|
103
103
|
*/
|
|
104
104
|
addCalendarMonths(t, e) {
|
|
105
|
-
const r = t.getMonth() + e,
|
|
106
|
-
return new Date(this.clone(t).setMonth(r, Math.min(
|
|
105
|
+
const r = t.getMonth() + e, a = new Date(t.getFullYear(), r, 1, 0, 0, 0, 0), n = this.getNumDaysInMonth(a);
|
|
106
|
+
return new Date(this.clone(t).setMonth(r, Math.min(n, t.getDate())));
|
|
107
107
|
}
|
|
108
108
|
/** Creates a new date by adding the number of provided `days` to the provided `date`. */
|
|
109
109
|
addCalendarDays(t, e) {
|
|
@@ -114,32 +114,32 @@ class f extends l {
|
|
|
114
114
|
deserialize(t) {
|
|
115
115
|
if (typeof t == "string")
|
|
116
116
|
if (t) {
|
|
117
|
-
if (
|
|
117
|
+
if (c.test(t))
|
|
118
118
|
return this.getValidDateOrNull(new Date(t.includes("T") ? t : t + "T00:00:00"));
|
|
119
119
|
} else return null;
|
|
120
120
|
return super.deserialize(t);
|
|
121
121
|
}
|
|
122
122
|
/** Returns the right format for the `valueAsDate` property. */
|
|
123
|
-
parse(t
|
|
123
|
+
parse(t) {
|
|
124
124
|
if (!t)
|
|
125
125
|
return null;
|
|
126
|
-
let
|
|
127
|
-
const
|
|
126
|
+
let e = null;
|
|
127
|
+
const r = t.match(l);
|
|
128
128
|
try {
|
|
129
|
-
|
|
129
|
+
e = r ? this.createDate(+r[1], +r[2], +r[3]) : null;
|
|
130
130
|
} catch {
|
|
131
131
|
}
|
|
132
|
-
if (this.isValid(
|
|
133
|
-
return
|
|
134
|
-
const
|
|
135
|
-
if (!
|
|
132
|
+
if (this.isValid(e))
|
|
133
|
+
return e;
|
|
134
|
+
const n = t.replace(/\D/g, " ").trim()?.match(h);
|
|
135
|
+
if (!n || n.index !== 0 || n.length <= 2 || n.some((o) => o === void 0) || !this.isValid(this.createDate(+n[3], +n[2], +n[1])))
|
|
136
136
|
return null;
|
|
137
|
-
let
|
|
138
|
-
if (typeof
|
|
139
|
-
const
|
|
140
|
-
|
|
137
|
+
let s = +n[3];
|
|
138
|
+
if (typeof s == "number" && s < 100 && s >= 0) {
|
|
139
|
+
const o = this.today().getFullYear() - 2e3 + this._cutoffYearOffset;
|
|
140
|
+
s = s <= o ? 2e3 + s : 1900 + s;
|
|
141
141
|
}
|
|
142
|
-
return new Date(
|
|
142
|
+
return new Date(s, +n[2] - 1, +n[1]);
|
|
143
143
|
}
|
|
144
144
|
invalid() {
|
|
145
145
|
return /* @__PURE__ */ new Date(NaN);
|
|
@@ -150,16 +150,16 @@ class f extends l {
|
|
|
150
150
|
* @param valueFunction The function of array's index used to fill the array.
|
|
151
151
|
*/
|
|
152
152
|
_range(t, e) {
|
|
153
|
-
return Array.from({ length: t }).map((r,
|
|
153
|
+
return Array.from({ length: t }).map((r, a) => e(a));
|
|
154
154
|
}
|
|
155
155
|
/** Creates a date but allows the month and date to overflow. */
|
|
156
156
|
_createDateWithOverflow(t, e, r) {
|
|
157
|
-
const
|
|
158
|
-
return t >= 0 && t < 100 &&
|
|
157
|
+
const a = new Date(t, e, r);
|
|
158
|
+
return t >= 0 && t < 100 && a.setFullYear(this.getYear(a) - 1900), a;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
const
|
|
161
|
+
const m = new D();
|
|
162
162
|
export {
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
D as NativeDateAdapter,
|
|
164
|
+
m as defaultDateAdapter
|
|
165
165
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (e ?? (e = u), e === String ? e = (t) => t == null ? "" : String(t) : e === Number && (e = (t) => t == null ? NaN : Number(t)), r === "accessor")
|
|
1
|
+
const o = (e) => (i, l) => {
|
|
2
|
+
const { kind: r, metadata: s, name: a } = l, n = globalThis.litPropertyMetadata.get(s)?.get(a)?.type ?? String;
|
|
3
|
+
if (e ??= n, e === String ? e = (t) => t == null ? "" : String(t) : e === Number && (e = (t) => t == null ? NaN : Number(t)), r === "accessor")
|
|
5
4
|
return {
|
|
6
5
|
set(t) {
|
|
7
6
|
i.set.call(this, e(t));
|
|
@@ -14,5 +13,5 @@ const p = (e) => (i, a) => {
|
|
|
14
13
|
throw new Error(`Unsupported decorator location: ${r}`);
|
|
15
14
|
};
|
|
16
15
|
export {
|
|
17
|
-
|
|
16
|
+
o as forceType
|
|
18
17
|
};
|
|
@@ -1,79 +1,76 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (m)
|
|
1
|
+
import { isServer as b } from "lit";
|
|
2
|
+
const c = /* @__PURE__ */ new WeakMap(), h = /* @__PURE__ */ new WeakMap(), y = () => (g, n) => {
|
|
3
|
+
const { kind: l, metadata: N, name: a } = n;
|
|
4
|
+
if (l === "accessor") {
|
|
5
|
+
if (b)
|
|
7
6
|
return {};
|
|
8
|
-
const
|
|
9
|
-
return
|
|
7
|
+
const f = globalThis.litPropertyMetadata.get(N)?.get(a)?.attribute, s = typeof f == "string" ? f : a;
|
|
8
|
+
return n.addInitializer(function() {
|
|
10
9
|
this.addController({
|
|
11
10
|
host: this,
|
|
12
11
|
rootNode: null,
|
|
13
12
|
checkIdReference(t) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
d.access.get(this.host) !== o && d.access.set(this.host, o);
|
|
13
|
+
const e = this.host.getAttribute(s) ?? h.get(this.host);
|
|
14
|
+
if (e && typeof e == "string" && (!t || t.has(e))) {
|
|
15
|
+
const i = this.rootNode?.getElementById?.(e) ?? null;
|
|
16
|
+
n.access.get(this.host) !== i && n.access.set(this.host, i);
|
|
19
17
|
}
|
|
20
18
|
},
|
|
21
19
|
hostConnected() {
|
|
22
20
|
this.rootNode = this.host.getRootNode(), this.checkIdReference();
|
|
23
|
-
const t =
|
|
21
|
+
const t = c.get(this.rootNode);
|
|
24
22
|
if (t)
|
|
25
23
|
t.controllers.add(this);
|
|
26
24
|
else {
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
for (const
|
|
30
|
-
if (
|
|
31
|
-
|
|
32
|
-
else if (
|
|
33
|
-
for (const
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
const e = /* @__PURE__ */ new Set([this]), i = new MutationObserver((m) => {
|
|
26
|
+
const r = /* @__PURE__ */ new Set();
|
|
27
|
+
for (const o of m)
|
|
28
|
+
if (o.type === "attributes")
|
|
29
|
+
o.oldValue && r.add(o.oldValue), o.target.id && r.add(o.target.id);
|
|
30
|
+
else if (o.type === "childList")
|
|
31
|
+
for (const d of [...o.addedNodes, ...o.removedNodes])
|
|
32
|
+
d instanceof HTMLElement && (d.id && r.add(d.id), d.querySelectorAll("[id]").forEach((u) => {
|
|
33
|
+
u.id && r.add(u.id);
|
|
36
34
|
}));
|
|
37
|
-
|
|
35
|
+
e.forEach((o) => o.checkIdReference(r));
|
|
38
36
|
});
|
|
39
|
-
|
|
37
|
+
i.observe(this.rootNode, {
|
|
40
38
|
attributeFilter: ["id"],
|
|
41
39
|
attributeOldValue: !0,
|
|
42
40
|
childList: !0,
|
|
43
41
|
subtree: !0
|
|
44
|
-
}),
|
|
42
|
+
}), c.set(this.rootNode, { observer: i, controllers: e });
|
|
45
43
|
}
|
|
46
44
|
},
|
|
47
45
|
hostDisconnected() {
|
|
48
|
-
if (
|
|
46
|
+
if (b || !this.rootNode)
|
|
49
47
|
return;
|
|
50
|
-
const t =
|
|
48
|
+
const t = c.get(this.rootNode);
|
|
51
49
|
if (!t) {
|
|
52
50
|
this.rootNode = null;
|
|
53
51
|
return;
|
|
54
52
|
}
|
|
55
|
-
t.controllers.delete(this), t.controllers.size === 0 && (t.observer.disconnect(),
|
|
53
|
+
t.controllers.delete(this), t.controllers.size === 0 && (t.observer.disconnect(), c.delete(this.rootNode)), this.rootNode = null;
|
|
56
54
|
}
|
|
57
55
|
});
|
|
58
56
|
}), {
|
|
59
57
|
set(t) {
|
|
60
|
-
var s, e, r;
|
|
61
58
|
if (typeof t != "string")
|
|
62
|
-
|
|
59
|
+
h.delete(this), t instanceof HTMLElement && this.hasAttribute(s) && t.id !== this.getAttribute(s) && this.removeAttribute(s);
|
|
63
60
|
else {
|
|
64
|
-
if (this.hasAttribute(
|
|
61
|
+
if (this.hasAttribute(s) && this.getAttribute(s) !== t)
|
|
65
62
|
return;
|
|
66
63
|
{
|
|
67
|
-
const
|
|
68
|
-
|
|
64
|
+
const e = t ? this.getRootNode?.()?.getElementById?.(t) : null;
|
|
65
|
+
e ? t = e : t && (h.set(this, t), t = null);
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
|
-
|
|
68
|
+
g.set.call(this, t);
|
|
72
69
|
}
|
|
73
70
|
};
|
|
74
71
|
}
|
|
75
|
-
throw new Error(`Unsupported decorator location: ${
|
|
72
|
+
throw new Error(`Unsupported decorator location: ${l}`);
|
|
76
73
|
};
|
|
77
74
|
export {
|
|
78
|
-
|
|
75
|
+
y as idReference
|
|
79
76
|
};
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import { readConfig as
|
|
2
|
-
import { defaultDateAdapter as
|
|
3
|
-
const
|
|
4
|
-
toAttribute(r,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return o.isValid(r) ? o.toIso8601(r) : null;
|
|
1
|
+
import { readConfig as d } from "../config.js";
|
|
2
|
+
import { defaultDateAdapter as n } from "../datetime.js";
|
|
3
|
+
const p = {
|
|
4
|
+
toAttribute(r, o) {
|
|
5
|
+
const a = d().datetime?.dateAdapter ?? n;
|
|
6
|
+
return a.isValid(r) ? a.toIso8601(r) : null;
|
|
8
7
|
}
|
|
9
|
-
},
|
|
10
|
-
const { kind:
|
|
11
|
-
if (
|
|
8
|
+
}, l = (r) => (o, a) => {
|
|
9
|
+
const { kind: i } = a;
|
|
10
|
+
if (i === "accessor")
|
|
12
11
|
return {
|
|
13
12
|
set(t) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
t = e.getValidDateOrNull(e.deserialize(t)), t = t ? e.createDate(e.getYear(t), e.getMonth(t), e.getDate(t)) : null, s.set.call(this, t);
|
|
13
|
+
const e = d().datetime?.dateAdapter ?? n;
|
|
14
|
+
t = e.getValidDateOrNull(e.deserialize(t)), t = t ? e.createDate(e.getYear(t), e.getMonth(t), e.getDate(t)) : null, o.set.call(this, t);
|
|
17
15
|
},
|
|
18
16
|
get() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return t.isValid(e) ? t.clone(e) : (l = r == null ? void 0 : r.fallback) == null ? void 0 : l.call(r, t);
|
|
17
|
+
const t = d().datetime?.dateAdapter ?? n, e = o.get.call(this);
|
|
18
|
+
return t.isValid(e) ? t.clone(e) : r?.fallback?.(t);
|
|
22
19
|
}
|
|
23
20
|
};
|
|
24
|
-
throw new Error(`Unsupported decorator location: ${
|
|
21
|
+
throw new Error(`Unsupported decorator location: ${i}`);
|
|
25
22
|
};
|
|
26
23
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
l as plainDate,
|
|
25
|
+
p as plainDateConverter
|
|
29
26
|
};
|
package/core/dom/breakpoint.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
if (
|
|
1
|
+
import { isServer as d } from "lit";
|
|
2
|
+
const s = ["zero", "micro", "small", "medium", "large", "wide", "ultra"];
|
|
3
|
+
function u(n, i, a) {
|
|
4
|
+
if (d)
|
|
5
5
|
return null;
|
|
6
|
-
const
|
|
7
|
-
return window.matchMedia(`${
|
|
6
|
+
const o = getComputedStyle(document.documentElement), t = n ? o.getPropertyValue(`--sbb-breakpoint-${n}-min`) : "", e = i ? `${parseFloat(o.getPropertyValue(`--sbb-breakpoint-${i}-${a?.includeMaxBreakpoint ? "max" : "min"}`)) - (a?.includeMaxBreakpoint ? 0 : 0.0625)}rem` : "", r = t && `(min-width: ${t})`, m = e && `(max-width: ${e})`, c = t && e && " and ";
|
|
7
|
+
return window.matchMedia(`${r}${c}${m}`).matches;
|
|
8
8
|
}
|
|
9
9
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
s as breakpoints,
|
|
11
|
+
u as isBreakpoint
|
|
12
12
|
};
|