@sbb-esta/lyne-elements 3.0.0-next.0 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.component.js +19 -22
- package/action-group/action-group.component.js +3 -5
- package/alert/alert/alert.component.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 -37
- package/core/styles/mixins/table.scss +1 -24
- package/core/styles/mixins/typo.scss +0 -1
- 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 -1
- package/custom-elements.json +5804 -3207
- 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 -56
- package/development/stepper/step/step.component.d.ts +2 -1
- package/development/stepper/step/step.component.d.ts.map +1 -1
- package/development/stepper/step/step.component.js +16 -15
- package/development/stepper/step-label/step-label.component.d.ts +3 -3
- package/development/stepper/step-label/step-label.component.d.ts.map +1 -1
- package/development/stepper/step-label/step-label.component.js +16 -17
- 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 -50
- 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 +28 -30
- 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 +12 -19
- 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 -26
- 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 -1
- package/stepper/step/step.component.d.ts.map +1 -1
- package/stepper/step/step.component.js +26 -24
- package/stepper/step-label/step-label.component.d.ts +3 -3
- package/stepper/step-label/step-label.component.d.ts.map +1 -1
- package/stepper/step-label/step-label.component.js +15 -15
- 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 +36 -40
- 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,122 +1,43 @@
|
|
|
1
|
-
import { CSSResultGroup,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
readonly?: boolean;
|
|
6
|
-
min?: string | number;
|
|
7
|
-
max?: string | number;
|
|
8
|
-
}
|
|
1
|
+
import { CSSResultGroup, PropertyDeclaration, TemplateResult } from 'lit';
|
|
2
|
+
import { CalendarView } from '../../calendar.js';
|
|
3
|
+
import { SbbDateInputElement, SbbDateInputAssociated } from '../../date-input.js';
|
|
4
|
+
import { SbbPopoverBaseElement } from '../../popover.js';
|
|
9
5
|
/**
|
|
10
|
-
*
|
|
6
|
+
* A datepicker component that allows users to select a date from a calendar view.
|
|
11
7
|
*
|
|
12
|
-
* @event {CustomEvent<void>}
|
|
13
|
-
* @event {CustomEvent<void>}
|
|
14
|
-
* @event {CustomEvent<
|
|
15
|
-
*
|
|
16
|
-
* @event {CustomEvent<
|
|
8
|
+
* @event {CustomEvent<void>} willOpen - Emits whenever the `sbb-datepicker` starts the opening transition. Can be canceled.
|
|
9
|
+
* @event {CustomEvent<void>} didOpen - Emits whenever the `sbb-datepicker` is opened.
|
|
10
|
+
* @event {CustomEvent<{ closeTarget: HTMLElement }>} willClose - Emits whenever the `sbb-datepicker` begins the closing
|
|
11
|
+
* transition. Can be canceled.
|
|
12
|
+
* @event {CustomEvent<{ closeTarget: HTMLElement }>} didClose - Emits whenever the `sbb-datepicker` is closed.
|
|
13
|
+
* @event {CustomEvent<T>} dateSelected - Event emitted on date selection.
|
|
17
14
|
*/
|
|
18
|
-
export declare class SbbDatepickerElement<T = Date> extends
|
|
15
|
+
export declare class SbbDatepickerElement<T = Date> extends SbbPopoverBaseElement implements SbbDateInputAssociated<T> {
|
|
19
16
|
static styles: CSSResultGroup;
|
|
20
|
-
static readonly
|
|
21
|
-
readonly change: "change";
|
|
22
|
-
readonly inputUpdated: "inputUpdated";
|
|
23
|
-
readonly datePickerUpdated: "datePickerUpdated";
|
|
24
|
-
readonly validationChange: "validationChange";
|
|
25
|
-
};
|
|
17
|
+
static readonly sbbDateInputAssociated = true;
|
|
26
18
|
/** If set to true, two months are displayed. */
|
|
27
19
|
accessor wide: boolean;
|
|
28
20
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
set dateFilter(value: (date: T | null) => boolean);
|
|
33
|
-
get dateFilter(): (date: T | null) => boolean;
|
|
34
|
-
private _dateFilter?;
|
|
35
|
-
/**
|
|
36
|
-
* Reference of the sbb-date-input instance or the native input connected to the datepicker.
|
|
37
|
-
* If given a string, it will be treated as an id reference and an attempt is
|
|
38
|
-
* made to be resolved for the containing document fragment.
|
|
39
|
-
* If given a HTMLElement instance, it will be used as is.
|
|
40
|
-
*/
|
|
41
|
-
accessor input: string | HTMLElement | null;
|
|
42
|
-
/**
|
|
43
|
-
* A configured date which acts as the current date instead of the real current date.
|
|
44
|
-
* Only recommended for testing purposes.
|
|
21
|
+
* Reference to the sbb-date-input instance or the native input connected to the datepicker.
|
|
22
|
+
*
|
|
23
|
+
* For attribute usage, provide an id reference.
|
|
45
24
|
*/
|
|
46
|
-
accessor
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
set valueAsDate(value: T | null);
|
|
52
|
-
get valueAsDate(): T | null;
|
|
53
|
-
private _valueAsDate?;
|
|
54
|
-
/** The resolved associated input element, as defined by `input`. */
|
|
55
|
-
get inputElement(): HTMLInputElement | SbbDateInputElement<T> | null;
|
|
56
|
-
private accessor _inputElement;
|
|
57
|
-
/** Notifies that the connected input has changes. */
|
|
58
|
-
private _change;
|
|
59
|
-
/** Notifies that the attributes of the input connected to the datepicker have changes. */
|
|
60
|
-
private _inputUpdated;
|
|
61
|
-
/** Notifies that the attributes of the datepicker have changes. */
|
|
62
|
-
private _datePickerUpdated;
|
|
63
|
-
/** Emits whenever the internal validation state changes. */
|
|
64
|
-
private _validationChange;
|
|
65
|
-
private _inputElementPlaceholderMutable;
|
|
66
|
-
private _inputAbortController;
|
|
67
|
-
private _inputIdReferenceController;
|
|
68
|
-
private _inputObserver;
|
|
25
|
+
accessor input: SbbDateInputElement<T> | null;
|
|
26
|
+
/** The initial view of calendar which should be displayed on opening. */
|
|
27
|
+
accessor view: CalendarView;
|
|
28
|
+
private _inputAbortController?;
|
|
69
29
|
private _dateAdapter;
|
|
70
30
|
private _language;
|
|
71
|
-
|
|
31
|
+
constructor();
|
|
72
32
|
connectedCallback(): void;
|
|
73
33
|
requestUpdate(name?: PropertyKey, oldValue?: unknown, options?: PropertyDeclaration): void;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
77
|
-
/**
|
|
78
|
-
* @internal
|
|
79
|
-
* Whether a custom now is configured.
|
|
80
|
-
*/
|
|
81
|
-
hasCustomNow(): boolean;
|
|
82
|
-
private _configureInputElement;
|
|
83
|
-
private _emitInputUpdated;
|
|
84
|
-
private _handleInputChange;
|
|
85
|
-
private _tryApplyFormatToInput;
|
|
86
|
-
private _validateDate;
|
|
87
|
-
private _parseInput;
|
|
88
|
-
private _setAriaLiveMessage;
|
|
34
|
+
private _updateStatus;
|
|
35
|
+
protected renderContent(): TemplateResult;
|
|
89
36
|
protected render(): TemplateResult;
|
|
90
|
-
/**
|
|
91
|
-
* Calculates the first available date before the given one,
|
|
92
|
-
* considering the SbbDatepickerElement `dateFilter` property and `min` parameter (e.g. from the self-named input's attribute).
|
|
93
|
-
* @param date The starting date for calculations.
|
|
94
|
-
*/
|
|
95
|
-
findPreviousAvailableDate(date: T): T;
|
|
96
|
-
/**
|
|
97
|
-
* Calculates the first available date after the given one,
|
|
98
|
-
* considering the SbbDatepickerElement `dateFilter` property and `max` parameter (e.g. from the self-named input's attribute).
|
|
99
|
-
* @param date The starting date for calculations.
|
|
100
|
-
*/
|
|
101
|
-
findNextAvailableDate(date: T): T;
|
|
102
|
-
/**
|
|
103
|
-
* Returns the first available date before or after a given one, considering the `dateFilter` property.
|
|
104
|
-
* @param date The starting date for calculations.
|
|
105
|
-
* @param delta The number of days to add/subtract from the starting one.
|
|
106
|
-
*/
|
|
107
|
-
private _findAvailableDate;
|
|
108
|
-
/**
|
|
109
|
-
* Checks if valueAsDate is valid, considering the SbbDatepickerElement `dateFilter` property
|
|
110
|
-
* and `min` and `max` parameters (e.g. from the self-named input's attributes).
|
|
111
|
-
*/
|
|
112
|
-
private _isDateAvailable;
|
|
113
37
|
}
|
|
114
38
|
declare global {
|
|
115
39
|
interface HTMLElementTagNameMap {
|
|
116
40
|
'sbb-datepicker': SbbDatepickerElement;
|
|
117
41
|
}
|
|
118
|
-
interface GlobalEventHandlersEventMap {
|
|
119
|
-
inputUpdated: CustomEvent<SbbInputUpdateEvent>;
|
|
120
|
-
}
|
|
121
42
|
}
|
|
122
43
|
//# sourceMappingURL=datepicker.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker/datepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"datepicker.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker/datepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAInB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAGb,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMtD,OAAO,EAAE,mBAAmB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAKzD,OAAO,mBAAmB,CAAC;AAI3B;;;;;;;;;GASG;AACH,qBAEM,oBAAoB,CAAC,CAAC,GAAG,IAAI,CACjC,SAAQ,qBACR,YAAW,sBAAsB,CAAC,CAAC,CAAC;IAEpC,OAAuB,MAAM,EAAE,cAAc,CAAyC;IACtF,gBAAuB,sBAAsB,QAAQ;IAErD,gDAAgD;IAChD,SAEgB,IAAI,EAAE,OAAO,CAAS;IAEtC;;;;OAIG;IACH,SAEgB,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAQ;IAE5D,yEAAyE;IACzE,SAA4B,IAAI,EAAE,YAAY,CAAS;IAEvD,OAAO,CAAC,qBAAqB,CAAC,CAAkB;IAChD,OAAO,CAAC,YAAY,CAA4E;IAChG,OAAO,CAAC,SAAS,CAAmC;;IAYpC,iBAAiB,IAAI,IAAI;IAezB,aAAa,CAC3B,IAAI,CAAC,EAAE,WAAW,EAClB,QAAQ,CAAC,EAAE,OAAO,EAClB,OAAO,CAAC,EAAE,mBAAmB,GAC5B,IAAI;IAkBP,OAAO,CAAC,aAAa;cAmBF,aAAa,IAAI,cAAc;cAwB/B,MAAM,IAAI,cAAc;CAG5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,gBAAgB,EAAE,oBAAoB,CAAC;KACxC;CACF"}
|
|
@@ -1,256 +1,114 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var D = (i) => {
|
|
2
|
+
throw TypeError(i);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import {
|
|
7
|
-
import { css as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { readConfig as
|
|
10
|
-
import {
|
|
11
|
-
import { defaultDateAdapter as
|
|
12
|
-
import { forceType as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _ = (l = class extends I {
|
|
4
|
+
var $ = (i, s, a) => s.has(i) || D("Cannot " + a);
|
|
5
|
+
var h = (i, s, a) => ($(i, s, "read from private field"), a ? a.call(i) : s.get(i)), m = (i, s, a) => s.has(i) ? D("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, a), l = (i, s, a, n) => ($(i, s, "write to private field"), n ? n.call(i, a) : s.set(i, a), a);
|
|
6
|
+
import { __esDecorate as b, __runInitializers as u } from "tslib";
|
|
7
|
+
import { css as R, isServer as I, html as q, nothing as U } from "lit";
|
|
8
|
+
import { customElement as B, property as _ } from "lit/decorators.js";
|
|
9
|
+
import { readConfig as F } from "../../core/config.js";
|
|
10
|
+
import { SbbLanguageController as L } from "../../core/controllers.js";
|
|
11
|
+
import { defaultDateAdapter as O } from "../../core/datetime.js";
|
|
12
|
+
import { forceType as P, idReference as T } from "../../core/decorators.js";
|
|
13
|
+
import { i18nDateChangedTo as j } from "../../core/i18n.js";
|
|
14
|
+
import { SbbDateInputElement as G } from "../../date-input.js";
|
|
15
|
+
import { SbbPopoverBaseElement as f } from "../../popover.js";
|
|
16
|
+
import "../../calendar.js";
|
|
17
|
+
const H = R`#status-container{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
18
|
+
let J = 0, at = (() => {
|
|
19
|
+
var d, p, c, r;
|
|
20
|
+
let i = [B("sbb-datepicker")], s, a = [], n, w = f, v, g = [], y = [], A, S = [], x = [], E, k = [], C = [];
|
|
21
|
+
return r = class extends w {
|
|
23
22
|
constructor() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
bubbles: !0
|
|
32
|
-
})), this._inputUpdated = new C(this, _.events.inputUpdated, { bubbles: !0, cancelable: !0 }), this._datePickerUpdated = new C(this, _.events.datePickerUpdated, {
|
|
33
|
-
bubbles: !0,
|
|
34
|
-
cancelable: !0
|
|
35
|
-
}), this._validationChange = new C(this, _.events.validationChange), this._inputElementPlaceholderMutable = !1, this._inputIdReferenceController = new tt(this, "input"), this._inputObserver = G ? null : new MutationObserver((e) => {
|
|
36
|
-
var i;
|
|
37
|
-
if (this._emitInputUpdated(), (i = this._associationController) == null || i.updateControls(), this.inputElement && !p(this.inputElement) && (e != null && e.some((a) => a.attributeName === "value"))) {
|
|
38
|
-
const a = this.inputElement.getAttribute("value");
|
|
39
|
-
this.valueAsDate = this._dateAdapter.parse(a, this.now) ?? this._dateAdapter.deserialize(a);
|
|
40
|
-
}
|
|
41
|
-
}), this._dateAdapter = ((t = Z().datetime) == null ? void 0 : t.dateAdapter) ?? it, this._language = new et(this), this._associationController = new rt(this);
|
|
23
|
+
super();
|
|
24
|
+
m(this, d);
|
|
25
|
+
m(this, p);
|
|
26
|
+
m(this, c);
|
|
27
|
+
l(this, d, u(this, g, !1)), l(this, p, (u(this, y), u(this, S, null))), l(this, c, (u(this, x), u(this, k, "day"))), this._inputAbortController = u(this, C), this._dateAdapter = F().datetime?.dateAdapter ?? O, this._language = new L(this), this.addEventListener(f.events.willOpen, () => {
|
|
28
|
+
this.shadowRoot?.querySelector("sbb-calendar")?.resetPosition?.();
|
|
29
|
+
}), !I && this.hydrationRequired && this.hydrationComplete.then(() => this.requestUpdate());
|
|
42
30
|
}
|
|
43
31
|
/** If set to true, two months are displayed. */
|
|
44
32
|
get wide() {
|
|
45
|
-
return
|
|
33
|
+
return h(this, d);
|
|
46
34
|
}
|
|
47
|
-
set wide(
|
|
48
|
-
|
|
35
|
+
set wide(e) {
|
|
36
|
+
l(this, d, e);
|
|
49
37
|
}
|
|
50
38
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
|
|
54
|
-
set dateFilter(t) {
|
|
55
|
-
this._dateFilter = t;
|
|
56
|
-
}
|
|
57
|
-
get dateFilter() {
|
|
58
|
-
return this._dateFilter ?? (p(this.inputElement) ? this.inputElement.dateFilter : null) ?? (() => !0);
|
|
59
|
-
}
|
|
60
|
-
// TODO: Replace HTMLElement by HTMLInputElement | SbbDateInputElement
|
|
61
|
-
/**
|
|
62
|
-
* Reference of the sbb-date-input instance or the native input connected to the datepicker.
|
|
63
|
-
* If given a string, it will be treated as an id reference and an attempt is
|
|
64
|
-
* made to be resolved for the containing document fragment.
|
|
65
|
-
* If given a HTMLElement instance, it will be used as is.
|
|
39
|
+
* Reference to the sbb-date-input instance or the native input connected to the datepicker.
|
|
40
|
+
*
|
|
41
|
+
* For attribute usage, provide an id reference.
|
|
66
42
|
*/
|
|
67
43
|
get input() {
|
|
68
|
-
return
|
|
69
|
-
}
|
|
70
|
-
set input(t) {
|
|
71
|
-
o(this, f, t);
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* A configured date which acts as the current date instead of the real current date.
|
|
75
|
-
* Only recommended for testing purposes.
|
|
76
|
-
*/
|
|
77
|
-
get now() {
|
|
78
|
-
return E(this, v);
|
|
79
|
-
}
|
|
80
|
-
set now(t) {
|
|
81
|
-
o(this, v, t);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* The currently selected date as a Date or custom date provider instance.
|
|
85
|
-
* @deprecated Use valueAsDate from SbbDateInputElement.
|
|
86
|
-
*/
|
|
87
|
-
set valueAsDate(t) {
|
|
88
|
-
if (t = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)), p(this.inputElement)) {
|
|
89
|
-
this.inputElement.valueAsDate = t;
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
this._valueAsDate = t, this._tryApplyFormatToInput() && this.inputElement.dispatchEvent(new Event("blur", { composed: !0 }));
|
|
44
|
+
return h(this, p);
|
|
93
45
|
}
|
|
94
|
-
|
|
95
|
-
|
|
46
|
+
set input(e) {
|
|
47
|
+
l(this, p, e);
|
|
96
48
|
}
|
|
97
|
-
/** The
|
|
98
|
-
get
|
|
99
|
-
return this
|
|
49
|
+
/** The initial view of calendar which should be displayed on opening. */
|
|
50
|
+
get view() {
|
|
51
|
+
return h(this, c);
|
|
100
52
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
set _inputElement(t) {
|
|
105
|
-
o(this, b, t);
|
|
53
|
+
set view(e) {
|
|
54
|
+
l(this, c, e);
|
|
106
55
|
}
|
|
107
56
|
connectedCallback() {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
disconnectedCallback() {
|
|
117
|
-
var t, e;
|
|
118
|
-
super.disconnectedCallback(), (t = this._inputObserver) == null || t.disconnect(), (e = this._inputAbortController) == null || e.abort(), this._inputElement = null;
|
|
119
|
-
}
|
|
120
|
-
firstUpdated(t) {
|
|
121
|
-
super.firstUpdated(t), this._setAriaLiveMessage();
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* @internal
|
|
125
|
-
* Whether a custom now is configured.
|
|
126
|
-
*/
|
|
127
|
-
hasCustomNow() {
|
|
128
|
-
return this._dateAdapter.compareDate(this.now, this._dateAdapter.today()) !== 0;
|
|
129
|
-
}
|
|
130
|
-
_configureInputElement() {
|
|
131
|
-
var a, h, D, H, R, j;
|
|
132
|
-
const t = this.input instanceof HTMLInputElement || this.input instanceof HTMLElement && p(this.input) ? this.input : this._inputIdReferenceController.find() ?? ((h = (a = this.closest) == null ? void 0 : a.call(this, "sbb-form-field")) == null ? void 0 : h.querySelector("input,sbb-date-input")) ?? null;
|
|
133
|
-
if (t === this.inputElement || ((D = this._inputAbortController) == null || D.abort(), (H = this._inputObserver) == null || H.disconnect(), this._inputElement = t, !this.inputElement))
|
|
134
|
-
return;
|
|
135
|
-
const e = !p(this.inputElement);
|
|
136
|
-
this._inputAbortController = new AbortController(), (R = this._inputObserver) == null || R.observe(this.inputElement, {
|
|
137
|
-
attributeFilter: ["disabled", "readonly", "min", "max", "value"]
|
|
138
|
-
}), e && (this._inputElementPlaceholderMutable = !this.inputElement.placeholder, this.inputElement.type = "text", this._inputElementPlaceholderMutable && (this.inputElement.placeholder = J[this._language.current]));
|
|
139
|
-
const i = { signal: this._inputAbortController.signal };
|
|
140
|
-
this.inputElement.addEventListener("input", (w) => {
|
|
141
|
-
nt(w, this), this._parseInput();
|
|
142
|
-
}, i), this.inputElement.addEventListener("change", () => this._handleInputChange(), i), this.inputElement.addEventListener("ɵchange", () => {
|
|
143
|
-
var w;
|
|
144
|
-
return (w = this._associationController) == null ? void 0 : w.updateControls();
|
|
145
|
-
}, i), this._parseInput(!0), this._tryApplyFormatToInput(), this._validateDate(), this._emitInputUpdated(), (j = this._associationController) == null || j.updateControls();
|
|
146
|
-
}
|
|
147
|
-
_emitInputUpdated() {
|
|
148
|
-
const { disabled: t, readOnly: e, min: i, max: a } = this.inputElement ?? {}, h = i && typeof i != "string" ? this._dateAdapter.toIso8601(i) : i, D = a && typeof a != "string" ? this._dateAdapter.toIso8601(a) : a;
|
|
149
|
-
this._inputUpdated.emit({ disabled: t, readonly: e, min: h, max: D });
|
|
150
|
-
}
|
|
151
|
-
_handleInputChange() {
|
|
152
|
-
var t;
|
|
153
|
-
this._tryApplyFormatToInput() || (this._validateDate(), this._setAriaLiveMessage(), this._change.emit(), (t = this._associationController) == null || t.updateControls());
|
|
154
|
-
}
|
|
155
|
-
_tryApplyFormatToInput() {
|
|
156
|
-
if (!this.inputElement || p(this.inputElement))
|
|
157
|
-
return !1;
|
|
158
|
-
const t = this.valueAsDate ? this._dateAdapter.format(this.valueAsDate) : "";
|
|
159
|
-
return t && this.inputElement.value !== t ? (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set.call(this.inputElement, t), this.inputElement.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })), this.inputElement.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), !0) : !1;
|
|
57
|
+
this.id ||= `sbb-datepicker-${++J}`, super.connectedCallback();
|
|
58
|
+
const e = this.closest?.("sbb-form-field");
|
|
59
|
+
if (e) {
|
|
60
|
+
G.resolveAssociation(this);
|
|
61
|
+
const t = e.querySelector("sbb-datepicker-toggle");
|
|
62
|
+
t && !t.hasAttribute("datepicker") && (t.datepicker ??= this);
|
|
63
|
+
}
|
|
160
64
|
}
|
|
161
|
-
|
|
162
|
-
if (
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
65
|
+
requestUpdate(e, t, o) {
|
|
66
|
+
if (super.requestUpdate(e, t, o), e === "input" && this.input !== t && (this._inputAbortController?.abort(), this.input)) {
|
|
67
|
+
const { signal: z } = this._inputAbortController = new AbortController();
|
|
68
|
+
this.input?.addEventListener("ɵchange", () => {
|
|
69
|
+
super.requestUpdate(), this._updateStatus();
|
|
70
|
+
}, { signal: z });
|
|
71
|
+
}
|
|
166
72
|
}
|
|
167
|
-
|
|
168
|
-
|
|
73
|
+
_updateStatus() {
|
|
74
|
+
const e = this.shadowRoot?.getElementById("status-container");
|
|
75
|
+
if (!e)
|
|
169
76
|
return;
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
77
|
+
const t = this._dateAdapter.isValid(this.input?.valueAsDate) ? `${j[this._language.current]} ${this._dateAdapter.format(this.input.valueAsDate, {
|
|
78
|
+
weekdayStyle: "long"
|
|
79
|
+
})}` : "";
|
|
80
|
+
e.textContent !== t && (e.textContent = t);
|
|
81
|
+
}
|
|
82
|
+
renderContent() {
|
|
83
|
+
return q`
|
|
84
|
+
<p id="status-container" role="status"></p>
|
|
85
|
+
<sbb-calendar
|
|
86
|
+
.view=${this.view}
|
|
87
|
+
.min=${this.input?.min ?? null}
|
|
88
|
+
.max=${this.input?.max ?? null}
|
|
89
|
+
.dateFilter=${this.input?.dateFilter ?? null}
|
|
90
|
+
.selected=${this.input?.valueAsDate ?? null}
|
|
91
|
+
?wide=${this.wide}
|
|
92
|
+
@dateSelected=${(e) => {
|
|
93
|
+
this.input && (this.input.valueAsDate = e.detail, this.input.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })), this.input.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), this.input.dispatchEvent(new Event("blur", { composed: !0 })));
|
|
94
|
+
}}
|
|
95
|
+
></sbb-calendar>
|
|
96
|
+
`;
|
|
184
97
|
}
|
|
185
98
|
render() {
|
|
186
|
-
return
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* Calculates the first available date after the given one,
|
|
200
|
-
* considering the SbbDatepickerElement `dateFilter` property and `max` parameter (e.g. from the self-named input's attribute).
|
|
201
|
-
* @param date The starting date for calculations.
|
|
202
|
-
*/
|
|
203
|
-
findNextAvailableDate(t) {
|
|
204
|
-
var a;
|
|
205
|
-
const e = this._findAvailableDate(t, 1), i = this._dateAdapter.deserialize((a = this.inputElement) == null ? void 0 : a.max);
|
|
206
|
-
return !i || this._dateAdapter.isValid(i) && this._dateAdapter.compareDate(e, i) <= 0 ? e : t;
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Returns the first available date before or after a given one, considering the `dateFilter` property.
|
|
210
|
-
* @param date The starting date for calculations.
|
|
211
|
-
* @param delta The number of days to add/subtract from the starting one.
|
|
212
|
-
*/
|
|
213
|
-
_findAvailableDate(t, e) {
|
|
214
|
-
let i = this._dateAdapter.addCalendarDays(t, e);
|
|
215
|
-
if (this.dateFilter)
|
|
216
|
-
for (; !this.dateFilter(i); )
|
|
217
|
-
i = this._dateAdapter.addCalendarDays(i, e);
|
|
218
|
-
return i;
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Checks if valueAsDate is valid, considering the SbbDatepickerElement `dateFilter` property
|
|
222
|
-
* and `min` and `max` parameters (e.g. from the self-named input's attributes).
|
|
223
|
-
*/
|
|
224
|
-
_isDateAvailable() {
|
|
225
|
-
var i, a, h;
|
|
226
|
-
if (!this.valueAsDate)
|
|
227
|
-
return !1;
|
|
228
|
-
const t = this._dateAdapter.deserialize((i = this.inputElement) == null ? void 0 : i.min), e = this._dateAdapter.deserialize((a = this.inputElement) == null ? void 0 : a.max);
|
|
229
|
-
return this._dateAdapter.isValid(t) && this._dateAdapter.compareDate(this.valueAsDate, t) < 0 || this._dateAdapter.isValid(e) && this._dateAdapter.compareDate(this.valueAsDate, e) > 0 ? !1 : ((h = this.dateFilter) == null ? void 0 : h.call(this, this.valueAsDate)) ?? !0;
|
|
230
|
-
}
|
|
231
|
-
}, m = new WeakMap(), f = new WeakMap(), v = new WeakMap(), b = new WeakMap(), u = l, (() => {
|
|
232
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(I[Symbol.metadata] ?? null) : void 0;
|
|
233
|
-
x = [at(), g({ type: Boolean })], F = [g({ attribute: !1 })], z = [g()], S = [st({ fallback: (e) => e.today() }), g()], P = [g({ attribute: !1 })], L = [Y()], c(l, null, x, { kind: "accessor", name: "wide", static: !1, private: !1, access: { has: (e) => "wide" in e, get: (e) => e.wide, set: (e, i) => {
|
|
234
|
-
e.wide = i;
|
|
235
|
-
} }, metadata: t }, k, U), c(l, null, F, { kind: "setter", name: "dateFilter", static: !1, private: !1, access: { has: (e) => "dateFilter" in e, set: (e, i) => {
|
|
236
|
-
e.dateFilter = i;
|
|
237
|
-
} }, metadata: t }, null, y), c(l, null, z, { kind: "accessor", name: "input", static: !1, private: !1, access: { has: (e) => "input" in e, get: (e) => e.input, set: (e, i) => {
|
|
238
|
-
e.input = i;
|
|
239
|
-
} }, metadata: t }, M, O), c(l, null, S, { kind: "accessor", name: "now", static: !1, private: !1, access: { has: (e) => "now" in e, get: (e) => e.now, set: (e, i) => {
|
|
240
|
-
e.now = i;
|
|
241
|
-
} }, metadata: t }, V, T), c(l, null, P, { kind: "setter", name: "valueAsDate", static: !1, private: !1, access: { has: (e) => "valueAsDate" in e, set: (e, i) => {
|
|
242
|
-
e.valueAsDate = i;
|
|
243
|
-
} }, metadata: t }, null, y), c(l, null, L, { kind: "accessor", name: "_inputElement", static: !1, private: !1, access: { has: (e) => "_inputElement" in e, get: (e) => e._inputElement, set: (e, i) => {
|
|
244
|
-
e._inputElement = i;
|
|
245
|
-
} }, metadata: t }, N, q), c(null, n = { value: u }, s, { kind: "class", name: u.name, metadata: t }, null, r), _ = u = n.value, t && Object.defineProperty(u, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
246
|
-
})(), l.styles = ut, l.events = {
|
|
247
|
-
change: "change",
|
|
248
|
-
inputUpdated: "inputUpdated",
|
|
249
|
-
datePickerUpdated: "datePickerUpdated",
|
|
250
|
-
validationChange: "validationChange"
|
|
251
|
-
}, d(u, r), l);
|
|
252
|
-
return _ = u;
|
|
99
|
+
return I || this.hydrationRequired ? q`${U}` : super.render();
|
|
100
|
+
}
|
|
101
|
+
}, d = new WeakMap(), p = new WeakMap(), c = new WeakMap(), n = r, (() => {
|
|
102
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(w[Symbol.metadata] ?? null) : void 0;
|
|
103
|
+
v = [P(), _({ type: Boolean })], A = [T(), _()], E = [_()], b(r, null, v, { kind: "accessor", name: "wide", static: !1, private: !1, access: { has: (t) => "wide" in t, get: (t) => t.wide, set: (t, o) => {
|
|
104
|
+
t.wide = o;
|
|
105
|
+
} }, metadata: e }, g, y), b(r, null, A, { kind: "accessor", name: "input", static: !1, private: !1, access: { has: (t) => "input" in t, get: (t) => t.input, set: (t, o) => {
|
|
106
|
+
t.input = o;
|
|
107
|
+
} }, metadata: e }, S, x), b(r, null, E, { kind: "accessor", name: "view", static: !1, private: !1, access: { has: (t) => "view" in t, get: (t) => t.view, set: (t, o) => {
|
|
108
|
+
t.view = o;
|
|
109
|
+
} }, metadata: e }, k, C), b(null, s = { value: n }, i, { kind: "class", name: n.name, metadata: e }, null, a), n = s.value, e && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
110
|
+
})(), r.styles = [f.styles, H], r.sbbDateInputAssociated = !0, u(n, a), n;
|
|
253
111
|
})();
|
|
254
112
|
export {
|
|
255
|
-
|
|
113
|
+
at as SbbDatepickerElement
|
|
256
114
|
};
|
|
@@ -9,8 +9,8 @@ export declare class SbbDatepickerNextDayElement<T = Date> extends SbbDatepicker
|
|
|
9
9
|
protected iconName: string;
|
|
10
10
|
protected i18nOffBoundaryDay: Record<string, string>;
|
|
11
11
|
protected i18nSelectOffBoundaryDay: (currentDate: string) => Record<string, string>;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
protected findAvailableDate(date: T): T | null;
|
|
13
|
+
private _isAfterMaxDate;
|
|
14
14
|
}
|
|
15
15
|
declare global {
|
|
16
16
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker-next-day.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker-next-day/datepicker-next-day.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD;;;GAGG;AACH,qBAEM,2BAA2B,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IACxE,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAA+B;IACzD,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAe;IACnE,SAAS,CAAC,wBAAwB,kDAAqB;
|
|
1
|
+
{"version":3,"file":"datepicker-next-day.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker-next-day/datepicker-next-day.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD;;;GAGG;AACH,qBAEM,2BAA2B,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IACxE,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAA+B;IACzD,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAe;IACnE,SAAS,CAAC,wBAAwB,kDAAqB;IAEvD,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI;IAmB9C,OAAO,CAAC,eAAe;CAGxB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,yBAAyB,EAAE,2BAA2B,CAAC;KACxD;CACF"}
|
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
import { __esDecorate as
|
|
2
|
-
import { customElement as
|
|
3
|
-
import { i18nNextDay as
|
|
4
|
-
import { SbbDatepickerButton as
|
|
5
|
-
import { css as
|
|
6
|
-
const
|
|
7
|
-
let
|
|
1
|
+
import { __esDecorate as d, __runInitializers as l } from "tslib";
|
|
2
|
+
import { customElement as c } from "lit/decorators.js";
|
|
3
|
+
import { i18nNextDay as u, i18nSelectNextDay as v } from "../../core/i18n.js";
|
|
4
|
+
import { SbbDatepickerButton as h } from "../common.js";
|
|
5
|
+
import { css as m } from "lit";
|
|
6
|
+
const p = m`*,:before,:after{box-sizing:border-box}:host{display:inline-block;-webkit-tap-highlight-color:transparent;height:fit-content;outline:none!important;--sbb-button-color-text: var(--sbb-color-charcoal);--sbb-button-color-default-background: var(--sbb-color-black-alpha-0);--sbb-button-color-hover-background: var(--sbb-color-milk);--sbb-button-color-active-background: var(--sbb-color-cloud);--sbb-button-color-disabled-background: var(--sbb-color-milk);--sbb-button-color-disabled-border: var(--sbb-color-smoke);--sbb-button-color-disabled-text: var(--sbb-color-granite);--sbb-button-border-disabled-width: var(--sbb-border-width-1x);--sbb-button-border-disabled-style: dashed;--sbb-button-border-radius: var(--sbb-border-radius-infinity);--sbb-button-transition-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-button-transition-easing-function: var(--sbb-animation-easing)}@media (forced-colors: active){:host{--sbb-button-color-text: ButtonText !important;--sbb-button-color-hover-background: Highlight !important;--sbb-button-color-active-background: Highlight !important;--sbb-button-color-disabled-background: Canvas !important;--sbb-button-color-disabled-border: GrayText !important;--sbb-button-color-disabled-text: GrayText !important}}:host .sbb-datepicker-next-day{position:relative;transition-duration:var(--sbb-button-transition-duration);transition-timing-function:var(--sbb-button-transition-easing-function);transition-property:color;border-radius:var(--sbb-button-border-radius);color:var(--sbb-button-color-text);cursor:pointer;-webkit-user-select:none;user-select:none;display:flex}:host .sbb-datepicker-next-day:before{position:absolute;content:"";inset:0;border-radius:var(--sbb-button-border-radius);background-color:var(--sbb-button-color-default-background);transition-duration:var(--sbb-button-transition-duration);transition-timing-function:var(--sbb-button-transition-easing-function);transition-property:inset,background-color}sbb-icon{transition:transform var(--sbb-button-transition-duration) var(--sbb-button-transition-easing-function);transform:translateY(var(--sbb-button-translate-y-content-hover, 0rem));display:flex}:host([negative]){--sbb-button-color-text: var(--sbb-color-milk);--sbb-button-color-default-background: var(--sbb-color-black-alpha-0);--sbb-button-color-hover-background: var(--sbb-color-charcoal);--sbb-button-color-active-background: var(--sbb-color-iron);--sbb-button-color-disabled-background: var(--sbb-color-charcoal);--sbb-button-color-disabled-border: var(--sbb-color-smoke);--sbb-button-color-disabled-text: var(--sbb-color-smoke)}:host(:is([disabled],:disabled,[disabled-interactive],[data-disabled],[data-group-disabled])) .sbb-datepicker-next-day{color:var(--sbb-button-color-disabled-text);cursor:default;pointer-events:none}:host(:is([disabled],:disabled,[disabled-interactive],[data-disabled],[data-group-disabled])) .sbb-datepicker-next-day:before{background-color:var(--sbb-button-color-disabled-background);border:var(--sbb-button-border-disabled-width) var(--sbb-button-border-disabled-style) var(--sbb-button-color-disabled-border)}:host(:is([data-focus-visible],:focus-visible)) .sbb-datepicker-next-day:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width)}:host([data-focus-visible]){--sbb-focus-outline-style: initial}@media (any-hover: hover){:host(:not([disabled],:disabled,[disabled-interactive],[data-disabled],[data-group-disabled],:active,[data-active]):hover){--sbb-button-translate-y-content-hover: -.0625rem}}@media (any-hover: hover){:host(:not([disabled],:disabled,[disabled-interactive],[data-disabled],[data-group-disabled],:active,[data-active]):hover) .sbb-datepicker-next-day:before{background-color:var(--sbb-button-color-hover-background)}}:host(:not([disabled],:disabled,[disabled-interactive],[data-disabled],[data-group-disabled]):is(:active,[data-active])) .sbb-datepicker-next-day:before{background-color:var(--sbb-button-color-active-background)}.sbb-datepicker-next-day{margin:auto;-webkit-tap-highlight-color:transparent}`;
|
|
7
|
+
let D = (() => {
|
|
8
8
|
var o;
|
|
9
|
-
let
|
|
10
|
-
return o = class extends
|
|
9
|
+
let n = [c("sbb-datepicker-next-day")], e, b = [], t, i = h;
|
|
10
|
+
return o = class extends i {
|
|
11
11
|
constructor() {
|
|
12
|
-
super(...arguments), this.iconName = "chevron-small-right-small", this.i18nOffBoundaryDay =
|
|
13
|
-
}
|
|
14
|
-
connectedCallback() {
|
|
15
|
-
super.connectedCallback(), this.slot || (this.slot = "suffix");
|
|
12
|
+
super(...arguments), this.iconName = "chevron-small-right-small", this.i18nOffBoundaryDay = u, this.i18nSelectOffBoundaryDay = v;
|
|
16
13
|
}
|
|
17
14
|
findAvailableDate(a) {
|
|
18
|
-
|
|
15
|
+
let r = this.dateAdapter.addCalendarDays(a, 1);
|
|
16
|
+
if (this._isAfterMaxDate(r))
|
|
17
|
+
return null;
|
|
18
|
+
const s = this.input.dateFilter;
|
|
19
|
+
if (s) {
|
|
20
|
+
for (; !s(r); )
|
|
21
|
+
if (r = this.dateAdapter.addCalendarDays(r, 1), this._isAfterMaxDate(r))
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return r;
|
|
25
|
+
}
|
|
26
|
+
_isAfterMaxDate(a) {
|
|
27
|
+
return !!this.input.max && this.dateAdapter.compareDate(a, this.input.max) > 0;
|
|
19
28
|
}
|
|
20
29
|
}, t = o, (() => {
|
|
21
|
-
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
22
|
-
|
|
23
|
-
})(), o.styles =
|
|
30
|
+
const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(i[Symbol.metadata] ?? null) : void 0;
|
|
31
|
+
d(null, e = { value: t }, n, { kind: "class", name: t.name, metadata: a }, null, b), t = e.value, a && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
|
|
32
|
+
})(), o.styles = p, l(t, b), t;
|
|
24
33
|
})();
|
|
25
34
|
export {
|
|
26
|
-
|
|
35
|
+
D as SbbDatepickerNextDayElement
|
|
27
36
|
};
|
|
@@ -9,8 +9,8 @@ export declare class SbbDatepickerPreviousDayElement<T = Date> extends SbbDatepi
|
|
|
9
9
|
protected iconName: string;
|
|
10
10
|
protected i18nOffBoundaryDay: Record<string, string>;
|
|
11
11
|
protected i18nSelectOffBoundaryDay: (currentDate: string) => Record<string, string>;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
protected findAvailableDate(date: T): T | null;
|
|
13
|
+
private _isBeforeMinDate;
|
|
14
14
|
}
|
|
15
15
|
declare global {
|
|
16
16
|
interface HTMLElementTagNameMap {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datepicker-previous-day.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker-previous-day/datepicker-previous-day.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD;;;GAGG;AACH,qBAEM,+BAA+B,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAC5E,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAA8B;IACxD,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAmB;IACvE,SAAS,CAAC,wBAAwB,kDAAyB;
|
|
1
|
+
{"version":3,"file":"datepicker-previous-day.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/datepicker/datepicker-previous-day/datepicker-previous-day.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD;;;GAGG;AACH,qBAEM,+BAA+B,CAAC,CAAC,GAAG,IAAI,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAC5E,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD,SAAS,CAAC,QAAQ,EAAE,MAAM,CAA8B;IACxD,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAmB;IACvE,SAAS,CAAC,wBAAwB,kDAAyB;IAE3D,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI;IAmB9C,OAAO,CAAC,gBAAgB;CAGzB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,6BAA6B,EAAE,+BAA+B,CAAC;KAChE;CACF"}
|