@sbb-esta/lyne-elements 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.d.ts +4 -8
- package/accordion/accordion.d.ts.map +1 -1
- package/accordion.js +90 -81
- package/action-group/action-group.d.ts +5 -5
- package/action-group/action-group.d.ts.map +1 -1
- package/action-group.js +100 -50
- package/alert/alert/alert.d.ts +11 -11
- package/alert/alert/alert.d.ts.map +1 -1
- package/alert/alert-group/alert-group.d.ts +4 -4
- package/alert/alert-group/alert-group.d.ts.map +1 -1
- package/alert/alert-group.js +101 -69
- package/alert/alert.js +191 -104
- package/autocomplete/autocomplete-base-element.d.ts +3 -7
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +1 -0
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +53 -60
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-cell.js +20 -22
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-optgroup.js +31 -35
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-option.js +45 -63
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-row.js +23 -25
- package/autocomplete-grid/autocomplete-grid.js +112 -133
- package/autocomplete.js +283 -295
- package/breadcrumb/breadcrumb/breadcrumb.d.ts +1 -1
- package/breadcrumb/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/breadcrumb/breadcrumb-group.js +107 -114
- package/breadcrumb/breadcrumb.js +44 -35
- package/button/button/button.d.ts.map +1 -1
- package/button/button-link/button-link.d.ts.map +1 -1
- package/button/button-link.js +15 -18
- package/button/button-static/button-static.d.ts.map +1 -1
- package/button/button-static.js +15 -18
- package/button/button.js +15 -18
- package/button/common/button-common.d.ts +4 -4
- package/button/common/button-common.d.ts.map +1 -1
- package/button/common.js +41 -30
- package/button/mini-button/mini-button-base-element.d.ts.map +1 -1
- package/button/mini-button/mini-button.d.ts.map +1 -1
- package/button/mini-button-group/mini-button-group.d.ts +2 -2
- package/button/mini-button-group/mini-button-group.d.ts.map +1 -1
- package/button/mini-button-group.js +55 -43
- package/button/mini-button.js +30 -34
- package/button/secondary-button/secondary-button.d.ts.map +1 -1
- package/button/secondary-button-link/secondary-button-link.d.ts.map +1 -1
- package/button/secondary-button-link.js +15 -18
- package/button/secondary-button-static/secondary-button-static.d.ts.map +1 -1
- package/button/secondary-button-static.js +15 -18
- package/button/secondary-button.js +15 -18
- package/button/tertiary-button/tertiary-button.d.ts.map +1 -1
- package/button/tertiary-button-link/tertiary-button-link.d.ts.map +1 -1
- package/button/tertiary-button-link.js +15 -18
- package/button/tertiary-button-static/tertiary-button-static.d.ts.map +1 -1
- package/button/tertiary-button-static.js +15 -18
- package/button/tertiary-button.js +15 -18
- package/button/transparent-button/transparent-button.d.ts.map +1 -1
- package/button/transparent-button-link/transparent-button-link.d.ts.map +1 -1
- package/button/transparent-button-link.js +15 -18
- package/button/transparent-button-static/transparent-button-static.d.ts.map +1 -1
- package/button/transparent-button-static.js +15 -18
- package/button/transparent-button.js +15 -18
- package/calendar/calendar.d.ts +7 -7
- package/calendar/calendar.d.ts.map +1 -1
- package/calendar.js +638 -692
- package/card/card/card.d.ts +2 -2
- package/card/card/card.d.ts.map +1 -1
- package/card/card-badge/card-badge.d.ts +1 -1
- package/card/card-badge/card-badge.d.ts.map +1 -1
- package/card/card-badge.js +45 -34
- package/card/card-button/card-button.d.ts.map +1 -1
- package/card/card-button.js +16 -16
- package/card/card-link/card-link.d.ts.map +1 -1
- package/card/card-link.js +17 -17
- package/card/card.js +55 -36
- package/card/common/card-action-common.d.ts +1 -1
- package/card/common/card-action-common.d.ts.map +1 -1
- package/card/common.js +27 -33
- package/checkbox/checkbox/checkbox.d.ts +3 -4
- package/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts +4 -4
- package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/checkbox/checkbox-group.js +99 -76
- package/checkbox/checkbox-panel/checkbox-panel.d.ts +2 -3
- package/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/checkbox/checkbox-panel.js +51 -50
- package/checkbox/checkbox.js +54 -43
- package/checkbox/common/checkbox-common.d.ts +1 -1
- package/checkbox/common/checkbox-common.d.ts.map +1 -1
- package/checkbox/common.js +39 -24
- package/chip/chip.d.ts +2 -2
- package/chip/chip.d.ts.map +1 -1
- package/chip.js +45 -26
- package/clock/clock.d.ts +1 -1
- package/clock/clock.d.ts.map +1 -1
- package/clock.js +136 -144
- package/container/container/container.d.ts +3 -3
- package/container/container/container.d.ts.map +1 -1
- package/container/container.js +60 -35
- package/container/sticky-bar/sticky-bar.d.ts +1 -1
- package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/container/sticky-bar.js +55 -47
- package/core/a11y.js +29 -51
- package/core/base-elements/action-base-element.d.ts.map +1 -1
- package/core/base-elements/button-base-element.d.ts +2 -2
- package/core/base-elements/button-base-element.d.ts.map +1 -1
- package/core/base-elements/link-base-element.d.ts +5 -5
- package/core/base-elements/link-base-element.d.ts.map +1 -1
- package/core/base-elements.js +243 -196
- package/core/controllers.js +8 -13
- package/core/decorators/base.d.ts +14 -0
- package/core/decorators/base.d.ts.map +1 -0
- package/core/decorators/force-type.d.ts +8 -0
- package/core/decorators/force-type.d.ts.map +1 -0
- package/core/decorators/get-override.d.ts +7 -0
- package/core/decorators/get-override.d.ts.map +1 -0
- package/core/decorators/handle-distinct-change.d.ts +8 -0
- package/core/decorators/handle-distinct-change.d.ts.map +1 -0
- package/core/decorators/omit-empty-converter.d.ts +8 -0
- package/core/decorators/omit-empty-converter.d.ts.map +1 -0
- package/core/decorators.d.ts +4 -0
- package/core/decorators.d.ts.map +1 -1
- package/core/decorators.js +59 -15
- package/core/dom.js +1 -5
- package/core/eventing.js +1 -4
- package/core/interfaces/paginator-page.d.ts +7 -0
- package/core/interfaces/paginator-page.d.ts.map +1 -0
- package/core/interfaces.d.ts +1 -0
- package/core/interfaces.d.ts.map +1 -1
- package/core/mixins/disabled-mixin.d.ts +2 -3
- package/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/core/mixins/named-slot-list-mixin.d.ts +1 -1
- package/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/core/mixins/negative-mixin.d.ts +1 -1
- package/core/mixins/negative-mixin.d.ts.map +1 -1
- package/core/mixins/panel-mixin.d.ts +3 -3
- package/core/mixins/panel-mixin.d.ts.map +1 -1
- package/core/mixins/required-mixin.d.ts +1 -2
- package/core/mixins/required-mixin.d.ts.map +1 -1
- package/core/mixins.js +290 -237
- package/core/testing/private.d.ts +1 -0
- package/core/testing/private.d.ts.map +1 -1
- package/core/testing.js +7 -13
- package/custom-elements.json +26385 -25594
- package/datepicker/common/datepicker-button.d.ts +2 -2
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.js +110 -116
- package/datepicker/datepicker/datepicker.d.ts +6 -6
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.d.ts.map +1 -1
- package/datepicker/datepicker-next-day.js +24 -26
- package/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts.map +1 -1
- package/datepicker/datepicker-previous-day.js +25 -27
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +6 -6
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +154 -136
- package/datepicker/datepicker.js +248 -213
- package/development/accordion/accordion.d.ts +4 -8
- package/development/accordion/accordion.d.ts.map +1 -1
- package/development/accordion.js +118 -93
- package/development/action-group/action-group.d.ts +5 -5
- package/development/action-group/action-group.d.ts.map +1 -1
- package/development/action-group.js +138 -64
- package/development/alert/alert/alert.d.ts +11 -11
- package/development/alert/alert/alert.d.ts.map +1 -1
- package/development/alert/alert-group/alert-group.d.ts +4 -4
- package/development/alert/alert-group/alert-group.d.ts.map +1 -1
- package/development/alert/alert-group.js +135 -79
- package/development/alert/alert.js +259 -109
- package/development/autocomplete/autocomplete-base-element.d.ts +3 -7
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +1 -0
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button.js +74 -75
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-cell.js +24 -24
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +38 -39
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option.js +57 -73
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-row.js +28 -28
- package/development/autocomplete-grid/autocomplete-grid.js +142 -160
- package/development/autocomplete.js +394 -393
- package/development/breadcrumb/breadcrumb/breadcrumb.d.ts +1 -1
- package/development/breadcrumb/breadcrumb/breadcrumb.d.ts.map +1 -1
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/development/breadcrumb/breadcrumb-group.js +130 -130
- package/development/breadcrumb/breadcrumb.js +53 -36
- package/development/button/button/button.d.ts.map +1 -1
- package/development/button/button-link/button-link.d.ts.map +1 -1
- package/development/button/button-link.js +18 -19
- package/development/button/button-static/button-static.d.ts.map +1 -1
- package/development/button/button-static.js +18 -19
- package/development/button/button.js +18 -19
- package/development/button/common/button-common.d.ts +4 -4
- package/development/button/common/button-common.d.ts.map +1 -1
- package/development/button/common.js +50 -29
- package/development/button/mini-button/mini-button-base-element.d.ts.map +1 -1
- package/development/button/mini-button/mini-button.d.ts.map +1 -1
- package/development/button/mini-button-group/mini-button-group.d.ts +2 -2
- package/development/button/mini-button-group/mini-button-group.d.ts.map +1 -1
- package/development/button/mini-button-group.js +77 -50
- package/development/button/mini-button.js +38 -37
- package/development/button/secondary-button/secondary-button.d.ts.map +1 -1
- package/development/button/secondary-button-link/secondary-button-link.d.ts.map +1 -1
- package/development/button/secondary-button-link.js +18 -19
- package/development/button/secondary-button-static/secondary-button-static.d.ts.map +1 -1
- package/development/button/secondary-button-static.js +18 -19
- package/development/button/secondary-button.js +18 -19
- package/development/button/tertiary-button/tertiary-button.d.ts.map +1 -1
- package/development/button/tertiary-button-link/tertiary-button-link.d.ts.map +1 -1
- package/development/button/tertiary-button-link.js +18 -19
- package/development/button/tertiary-button-static/tertiary-button-static.d.ts.map +1 -1
- package/development/button/tertiary-button-static.js +18 -19
- package/development/button/tertiary-button.js +18 -19
- package/development/button/transparent-button/transparent-button.d.ts.map +1 -1
- package/development/button/transparent-button-link/transparent-button-link.d.ts.map +1 -1
- package/development/button/transparent-button-link.js +18 -19
- package/development/button/transparent-button-static/transparent-button-static.d.ts.map +1 -1
- package/development/button/transparent-button-static.js +18 -19
- package/development/button/transparent-button.js +18 -19
- package/development/calendar/calendar.d.ts +7 -7
- package/development/calendar/calendar.d.ts.map +1 -1
- package/development/calendar.js +768 -766
- package/development/card/card/card.d.ts +2 -2
- package/development/card/card/card.d.ts.map +1 -1
- package/development/card/card-badge/card-badge.d.ts +1 -1
- package/development/card/card-badge/card-badge.d.ts.map +1 -1
- package/development/card/card-badge.js +65 -45
- package/development/card/card-button/card-button.d.ts.map +1 -1
- package/development/card/card-button.js +23 -20
- package/development/card/card-link/card-link.d.ts.map +1 -1
- package/development/card/card-link.js +23 -20
- package/development/card/card.js +72 -41
- package/development/card/common/card-action-common.d.ts +1 -1
- package/development/card/common/card-action-common.d.ts.map +1 -1
- package/development/card/common.js +74 -73
- package/development/checkbox/checkbox/checkbox.d.ts +3 -4
- package/development/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts +4 -4
- package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/development/checkbox/checkbox-group.js +139 -92
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts +2 -3
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/development/checkbox/checkbox-panel.js +68 -60
- package/development/checkbox/checkbox.js +69 -46
- package/development/checkbox/common/checkbox-common.d.ts +1 -1
- package/development/checkbox/common/checkbox-common.d.ts.map +1 -1
- package/development/checkbox/common.js +65 -46
- package/development/chip/chip.d.ts +2 -2
- package/development/chip/chip.d.ts.map +1 -1
- package/development/chip.js +64 -33
- package/development/clock/clock.d.ts +1 -1
- package/development/clock/clock.d.ts.map +1 -1
- package/development/clock.js +203 -201
- package/development/container/container/container.d.ts +3 -3
- package/development/container/container/container.d.ts.map +1 -1
- package/development/container/container.js +86 -45
- package/development/container/sticky-bar/sticky-bar.d.ts +1 -1
- package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/development/container/sticky-bar.js +76 -58
- package/development/core/a11y.js +40 -62
- package/development/core/base-elements/action-base-element.d.ts.map +1 -1
- package/development/core/base-elements/button-base-element.d.ts +2 -2
- package/development/core/base-elements/button-base-element.d.ts.map +1 -1
- package/development/core/base-elements/link-base-element.d.ts +5 -5
- package/development/core/base-elements/link-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +329 -226
- package/development/core/config.js +1 -1
- package/development/core/controllers.js +13 -21
- package/development/core/datetime.js +1 -1
- package/development/core/decorators/base.d.ts +14 -0
- package/development/core/decorators/base.d.ts.map +1 -0
- package/development/core/decorators/force-type.d.ts +8 -0
- package/development/core/decorators/force-type.d.ts.map +1 -0
- package/development/core/decorators/get-override.d.ts +7 -0
- package/development/core/decorators/get-override.d.ts.map +1 -0
- package/development/core/decorators/handle-distinct-change.d.ts +8 -0
- package/development/core/decorators/handle-distinct-change.d.ts.map +1 -0
- package/development/core/decorators/omit-empty-converter.d.ts +8 -0
- package/development/core/decorators/omit-empty-converter.d.ts.map +1 -0
- package/development/core/decorators.d.ts +4 -0
- package/development/core/decorators.d.ts.map +1 -1
- package/development/core/decorators.js +69 -5
- package/development/core/dom.js +2 -6
- package/development/core/eventing.js +2 -5
- package/development/core/i18n.js +1 -1
- package/development/core/interfaces/paginator-page.d.ts +7 -0
- package/development/core/interfaces/paginator-page.d.ts.map +1 -0
- package/development/core/interfaces.d.ts +1 -0
- package/development/core/interfaces.d.ts.map +1 -1
- package/development/core/mixins/disabled-mixin.d.ts +2 -3
- package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/development/core/mixins/named-slot-list-mixin.d.ts +1 -1
- package/development/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/development/core/mixins/negative-mixin.d.ts +1 -1
- package/development/core/mixins/negative-mixin.d.ts.map +1 -1
- package/development/core/mixins/panel-mixin.d.ts +3 -3
- package/development/core/mixins/panel-mixin.d.ts.map +1 -1
- package/development/core/mixins/required-mixin.d.ts +1 -2
- package/development/core/mixins/required-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +573 -475
- package/development/core/observers.js +1 -1
- package/development/core/overlay.js +1 -1
- package/development/core/testing/private.d.ts +1 -0
- package/development/core/testing/private.d.ts.map +1 -1
- package/development/core/testing.js +16 -22
- package/development/datepicker/common/datepicker-button.d.ts +2 -2
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.js +144 -142
- package/development/datepicker/datepicker/datepicker.d.ts +6 -6
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day/datepicker-next-day.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day.js +32 -32
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts.map +1 -1
- package/development/datepicker/datepicker-previous-day.js +32 -32
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +6 -6
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +227 -174
- package/development/datepicker/datepicker.js +327 -249
- package/development/dialog/dialog/dialog.d.ts +1 -1
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog-actions/dialog-actions.d.ts.map +1 -1
- package/development/dialog/dialog-actions.js +21 -20
- package/development/dialog/dialog-content/dialog-content.d.ts.map +1 -1
- package/development/dialog/dialog-content.js +22 -21
- package/development/dialog/dialog-title/dialog-title.d.ts +3 -3
- package/development/dialog/dialog-title/dialog-title.d.ts.map +1 -1
- package/development/dialog/dialog-title.js +121 -66
- package/development/dialog/dialog.js +205 -191
- package/development/divider/divider.d.ts +1 -1
- package/development/divider/divider.d.ts.map +1 -1
- package/development/divider.js +55 -36
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts +4 -4
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-content/expansion-panel-content.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-content.js +25 -25
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-header.js +56 -63
- package/development/expansion-panel/expansion-panel.js +227 -182
- package/development/file-selector/file-selector.d.ts +8 -7
- package/development/file-selector/file-selector.d.ts.map +1 -1
- package/development/file-selector.js +295 -198
- package/development/flip-card/flip-card/flip-card.d.ts +2 -2
- package/development/flip-card/flip-card/flip-card.d.ts.map +1 -1
- package/development/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
- package/development/flip-card/flip-card-details.js +39 -39
- package/development/flip-card/flip-card-summary/flip-card-summary.d.ts +1 -1
- package/development/flip-card/flip-card-summary/flip-card-summary.d.ts.map +1 -1
- package/development/flip-card/flip-card-summary.js +57 -38
- package/development/flip-card/flip-card.js +110 -78
- package/development/footer/footer.d.ts +4 -4
- package/development/footer/footer.d.ts.map +1 -1
- package/development/footer.js +103 -41
- package/development/form-error/form-error.d.ts.map +1 -1
- package/development/form-error.js +29 -28
- package/development/form-field/form-field/form-field.d.ts +10 -10
- package/development/form-field/form-field/form-field.d.ts.map +1 -1
- package/development/form-field/form-field-clear/form-field-clear.d.ts.map +1 -1
- package/development/form-field/form-field-clear.js +50 -50
- package/development/form-field/form-field.js +439 -328
- package/development/header/common/header-action-common.d.ts +2 -2
- package/development/header/common/header-action-common.d.ts.map +1 -1
- package/development/header/common.js +44 -24
- package/development/header/header/header.d.ts +4 -4
- package/development/header/header/header.d.ts.map +1 -1
- package/development/header/header-button/header-button.d.ts.map +1 -1
- package/development/header/header-button.js +19 -18
- package/development/header/header-link/header-link.d.ts.map +1 -1
- package/development/header/header-link.js +19 -16
- package/development/header/header.js +198 -140
- package/development/icon/icon-base.d.ts +3 -4
- package/development/icon/icon-base.d.ts.map +1 -1
- package/development/icon/icon-name-mixin.d.ts +1 -1
- package/development/icon/icon-name-mixin.d.ts.map +1 -1
- package/development/icon/icon.d.ts +2 -2
- package/development/icon/icon.d.ts.map +1 -1
- package/development/icon.js +258 -157
- package/development/image/image.d.ts +17 -17
- package/development/image/image.d.ts.map +1 -1
- package/development/image.js +584 -216
- package/development/journey-header/journey-header.d.ts +5 -5
- package/development/journey-header/journey-header.d.ts.map +1 -1
- package/development/journey-header.js +115 -43
- package/development/lead-container/lead-container.d.ts.map +1 -1
- package/development/lead-container.js +22 -21
- package/development/link/block-link/block-link.d.ts.map +1 -1
- package/development/link/block-link-button/block-link-button.d.ts.map +1 -1
- package/development/link/block-link-button.js +19 -18
- package/development/link/block-link-static/block-link-static.d.ts.map +1 -1
- package/development/link/block-link-static.js +19 -18
- package/development/link/block-link.js +19 -18
- package/development/link/common/block-link-common.d.ts +4 -3
- package/development/link/common/block-link-common.d.ts.map +1 -1
- package/development/link/common/link-common.d.ts +1 -1
- package/development/link/common/link-common.d.ts.map +1 -1
- package/development/link/common.js +81 -51
- package/development/link/link/link.d.ts.map +1 -1
- package/development/link/link-button/link-button.d.ts.map +1 -1
- package/development/link/link-button.js +19 -18
- package/development/link/link-static/link-static.d.ts.map +1 -1
- package/development/link/link-static.js +19 -18
- package/development/link/link.js +19 -18
- package/development/link-list/common/link-list-base.d.ts +3 -3
- package/development/link-list/common/link-list-base.d.ts.map +1 -1
- package/development/link-list/common.js +97 -48
- package/development/link-list/link-list/link-list.d.ts +2 -2
- package/development/link-list/link-list/link-list.d.ts.map +1 -1
- package/development/link-list/link-list-anchor/link-list-anchor.d.ts.map +1 -1
- package/development/link-list/link-list-anchor.js +18 -17
- package/development/link-list/link-list.js +60 -28
- package/development/loading-indicator/loading-indicator.d.ts +3 -3
- package/development/loading-indicator/loading-indicator.d.ts.map +1 -1
- package/development/loading-indicator.js +82 -40
- package/development/logo/logo.d.ts +2 -2
- package/development/logo/logo.d.ts.map +1 -1
- package/development/logo.js +64 -32
- package/development/map-container/map-container.d.ts +2 -2
- package/development/map-container/map-container.d.ts.map +1 -1
- package/development/map-container.js +107 -75
- package/development/menu/common/menu-action-common.d.ts +2 -2
- package/development/menu/common/menu-action-common.d.ts.map +1 -1
- package/development/menu/common.js +41 -20
- package/development/menu/menu/menu.d.ts +1 -1
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu-button/menu-button.d.ts.map +1 -1
- package/development/menu/menu-button.js +19 -18
- package/development/menu/menu-link/menu-link.d.ts.map +1 -1
- package/development/menu/menu-link.js +19 -18
- package/development/menu/menu.js +261 -241
- package/development/message/message.d.ts +2 -2
- package/development/message/message.d.ts.map +1 -1
- package/development/message.js +65 -32
- package/development/navigation/common/navigation-action-common.d.ts +1 -1
- package/development/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/development/navigation/common.js +63 -52
- package/development/navigation/navigation/navigation.d.ts +2 -2
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation-button/navigation-button.d.ts.map +1 -1
- package/development/navigation/navigation-button.js +19 -18
- package/development/navigation/navigation-link/navigation-link.d.ts.map +1 -1
- package/development/navigation/navigation-link.js +19 -18
- package/development/navigation/navigation-list/navigation-list.d.ts +1 -1
- package/development/navigation/navigation-list/navigation-list.d.ts.map +1 -1
- package/development/navigation/navigation-list.js +64 -41
- package/development/navigation/navigation-marker/navigation-marker.d.ts +1 -1
- package/development/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/development/navigation/navigation-marker.js +108 -91
- package/development/navigation/navigation-section/navigation-section.d.ts +3 -3
- package/development/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/development/navigation/navigation-section.js +282 -236
- package/development/navigation/navigation.js +278 -254
- package/development/notification/notification.d.ts +6 -6
- package/development/notification/notification.d.ts.map +1 -1
- package/development/notification.js +212 -146
- package/development/option/optgroup/optgroup-base-element.d.ts +3 -3
- package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/development/option/optgroup/optgroup.d.ts.map +1 -1
- package/development/option/optgroup.js +187 -142
- package/development/option/option/option-base-element.d.ts +7 -7
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option/option.d.ts.map +1 -1
- package/development/option/option.js +392 -296
- package/development/overlay/overlay-base-element.d.ts +1 -1
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay.d.ts +4 -4
- package/development/overlay/overlay.d.ts.map +1 -1
- package/development/overlay.js +260 -207
- package/development/paginator/common/paginator-common.d.ts +26 -0
- package/development/paginator/common/paginator-common.d.ts.map +1 -0
- package/development/paginator/common.d.ts +2 -0
- package/development/paginator/common.d.ts.map +1 -0
- package/development/paginator/common.js +189 -0
- package/development/paginator/compact-paginator/compact-paginator.d.ts +20 -0
- package/development/paginator/compact-paginator/compact-paginator.d.ts.map +1 -0
- package/development/paginator/compact-paginator.d.ts +2 -0
- package/development/paginator/compact-paginator.d.ts.map +1 -0
- package/development/paginator/compact-paginator.js +96 -0
- package/development/paginator/paginator/paginator.d.ts +51 -0
- package/development/paginator/paginator/paginator.d.ts.map +1 -0
- package/development/paginator/paginator.d.ts +1 -90
- package/development/paginator/paginator.d.ts.map +1 -1
- package/development/paginator/paginator.js +449 -0
- package/development/paginator.d.ts +2 -0
- package/development/paginator.d.ts.map +1 -1
- package/development/paginator.js +4 -541
- package/development/popover/popover/popover.d.ts +6 -7
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover-trigger/popover-trigger.d.ts.map +1 -1
- package/development/popover/popover-trigger.js +28 -29
- package/development/popover/popover.js +358 -303
- package/development/radio-button/common/radio-button-common.d.ts +1 -1
- package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/development/radio-button/common.js +170 -127
- package/development/radio-button/radio-button/radio-button.d.ts +2 -6
- package/development/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts +6 -6
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +269 -199
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts +2 -6
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/development/radio-button/radio-button-panel.js +60 -48
- package/development/radio-button/radio-button.js +54 -40
- package/development/screen-reader-only/screen-reader-only.d.ts.map +1 -1
- package/development/screen-reader-only.js +22 -21
- package/development/select/select.d.ts +5 -4
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +555 -555
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts +3 -3
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +223 -193
- package/development/signet/signet.d.ts +2 -2
- package/development/signet/signet.d.ts.map +1 -1
- package/development/signet.js +65 -33
- package/development/skiplink-list/skiplink-list.d.ts +2 -2
- package/development/skiplink-list/skiplink-list.d.ts.map +1 -1
- package/development/skiplink-list.js +74 -41
- package/development/slider/slider.d.ts +5 -4
- package/development/slider/slider.d.ts.map +1 -1
- package/development/slider.js +260 -184
- package/development/status/status.d.ts +3 -3
- package/development/status/status.d.ts.map +1 -1
- package/development/status.js +96 -51
- package/development/stepper/step/step.d.ts.map +1 -1
- package/development/stepper/step-label/step-label.d.ts.map +1 -1
- package/development/stepper/step-label.js +86 -90
- package/development/stepper/step.js +122 -126
- package/development/stepper/stepper/stepper.d.ts +3 -3
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +291 -241
- package/development/table/table-wrapper/table-wrapper.d.ts.map +1 -1
- package/development/table/table-wrapper.js +37 -39
- package/development/tabs/tab/tab.d.ts.map +1 -1
- package/development/tabs/tab-group/tab-group.d.ts +2 -2
- package/development/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/development/tabs/tab-group.js +296 -279
- package/development/tabs/tab-label/tab-label.d.ts +3 -3
- package/development/tabs/tab-label/tab-label.d.ts.map +1 -1
- package/development/tabs/tab-label.js +83 -37
- package/development/tabs/tab.js +40 -39
- package/development/tag/tag/tag.d.ts +3 -5
- package/development/tag/tag/tag.d.ts.map +1 -1
- package/development/tag/tag-group/tag-group.d.ts +3 -3
- package/development/tag/tag-group/tag-group.d.ts.map +1 -1
- package/development/tag/tag-group.js +143 -88
- package/development/tag/tag.js +126 -89
- package/development/teaser/teaser.d.ts +4 -4
- package/development/teaser/teaser.d.ts.map +1 -1
- package/development/teaser-hero/teaser-hero.d.ts +3 -3
- package/development/teaser-hero/teaser-hero.d.ts.map +1 -1
- package/development/teaser-hero.js +83 -36
- package/development/teaser-product/common/teaser-product-common.d.ts +1 -1
- package/development/teaser-product/common/teaser-product-common.d.ts.map +1 -1
- package/development/teaser-product/common.js +51 -26
- package/development/teaser-product/teaser-product/teaser-product.d.ts.map +1 -1
- package/development/teaser-product/teaser-product-static/teaser-product-static.d.ts.map +1 -1
- package/development/teaser-product/teaser-product-static.js +18 -19
- package/development/teaser-product/teaser-product.js +18 -19
- package/development/teaser.js +94 -40
- package/development/time-input/time-input.d.ts +1 -1
- package/development/time-input/time-input.d.ts.map +1 -1
- package/development/time-input.js +225 -219
- package/development/timetable-occupancy/timetable-occupancy.d.ts +2 -2
- package/development/timetable-occupancy/timetable-occupancy.d.ts.map +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.d.ts +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.d.ts.map +1 -1
- package/development/timetable-occupancy-icon.js +78 -57
- package/development/timetable-occupancy.js +67 -35
- package/development/title/title-base.d.ts +3 -3
- package/development/title/title-base.d.ts.map +1 -1
- package/development/title/title.d.ts.map +1 -1
- package/development/title.js +106 -58
- package/development/toast/toast.d.ts +4 -4
- package/development/toast/toast.d.ts.map +1 -1
- package/development/toast.js +204 -146
- package/development/toggle/toggle/toggle.d.ts +3 -5
- package/development/toggle/toggle/toggle.d.ts.map +1 -1
- package/development/toggle/toggle-option/toggle-option.d.ts +2 -2
- package/development/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/development/toggle/toggle-option.js +127 -93
- package/development/toggle/toggle.js +200 -163
- package/development/toggle-check/toggle-check.d.ts +4 -3
- package/development/toggle-check/toggle-check.d.ts.map +1 -1
- package/development/toggle-check.js +87 -49
- package/development/train/train/train.d.ts +5 -5
- package/development/train/train/train.d.ts.map +1 -1
- package/development/train/train-blocked-passage/train-blocked-passage.d.ts.map +1 -1
- package/development/train/train-blocked-passage.js +22 -21
- package/development/train/train-formation/train-formation.d.ts +2 -2
- package/development/train/train-formation/train-formation.d.ts.map +1 -1
- package/development/train/train-formation.js +113 -90
- package/development/train/train-wagon/train-wagon.d.ts +7 -9
- package/development/train/train-wagon/train-wagon.d.ts.map +1 -1
- package/development/train/train-wagon.js +166 -87
- package/development/train/train.js +142 -75
- package/development/visual-checkbox/visual-checkbox.d.ts +3 -3
- package/development/visual-checkbox/visual-checkbox.d.ts.map +1 -1
- package/development/visual-checkbox.js +79 -36
- package/dialog/dialog/dialog.d.ts +1 -1
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog-actions/dialog-actions.d.ts.map +1 -1
- package/dialog/dialog-actions.js +18 -19
- package/dialog/dialog-content/dialog-content.d.ts.map +1 -1
- package/dialog/dialog-content.js +17 -18
- package/dialog/dialog-title/dialog-title.d.ts +3 -3
- package/dialog/dialog-title/dialog-title.d.ts.map +1 -1
- package/dialog/dialog-title.js +98 -66
- package/dialog/dialog.js +120 -114
- package/divider/divider.d.ts +1 -1
- package/divider/divider.d.ts.map +1 -1
- package/divider.js +41 -30
- package/expansion-panel/expansion-panel/expansion-panel.d.ts +4 -4
- package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-content/expansion-panel-content.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-content.js +20 -22
- package/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-header.js +53 -61
- package/expansion-panel/expansion-panel.js +145 -130
- package/file-selector/file-selector.d.ts +8 -7
- package/file-selector/file-selector.d.ts.map +1 -1
- package/file-selector.js +224 -174
- package/flip-card/flip-card/flip-card.d.ts +2 -2
- package/flip-card/flip-card/flip-card.d.ts.map +1 -1
- package/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
- package/flip-card/flip-card-details.js +36 -38
- package/flip-card/flip-card-summary/flip-card-summary.d.ts +1 -1
- package/flip-card/flip-card-summary/flip-card-summary.d.ts.map +1 -1
- package/flip-card/flip-card-summary.js +42 -31
- package/flip-card/flip-card.js +88 -69
- package/footer/footer.d.ts +4 -4
- package/footer/footer.d.ts.map +1 -1
- package/footer.js +78 -37
- package/form-error/form-error.d.ts.map +1 -1
- package/form-error.js +24 -25
- package/form-field/form-field/form-field.d.ts +10 -10
- package/form-field/form-field/form-field.d.ts.map +1 -1
- package/form-field/form-field-clear/form-field-clear.d.ts.map +1 -1
- package/form-field/form-field-clear.js +39 -41
- package/form-field/form-field.js +295 -239
- package/header/common/header-action-common.d.ts +2 -2
- package/header/common/header-action-common.d.ts.map +1 -1
- package/header/common.js +36 -21
- package/header/header/header.d.ts +4 -4
- package/header/header/header.d.ts.map +1 -1
- package/header/header-button/header-button.d.ts.map +1 -1
- package/header/header-button.js +14 -16
- package/header/header-link/header-link.d.ts.map +1 -1
- package/header/header-link.js +14 -14
- package/header/header.js +138 -109
- package/icon/icon-base.d.ts +3 -4
- package/icon/icon-base.d.ts.map +1 -1
- package/icon/icon-name-mixin.d.ts +1 -1
- package/icon/icon-name-mixin.d.ts.map +1 -1
- package/icon/icon.d.ts +2 -2
- package/icon/icon.d.ts.map +1 -1
- package/icon.js +230 -165
- package/image/image.d.ts +17 -17
- package/image/image.d.ts.map +1 -1
- package/image.js +465 -195
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/journey-header/journey-header.d.ts +5 -5
- package/journey-header/journey-header.d.ts.map +1 -1
- package/journey-header.js +89 -49
- package/lead-container/lead-container.d.ts.map +1 -1
- package/lead-container.js +17 -18
- package/link/block-link/block-link.d.ts.map +1 -1
- package/link/block-link-button/block-link-button.d.ts.map +1 -1
- package/link/block-link-button.js +15 -17
- package/link/block-link-static/block-link-static.d.ts.map +1 -1
- package/link/block-link-static.js +14 -16
- package/link/block-link.js +15 -17
- package/link/common/block-link-common.d.ts +4 -3
- package/link/common/block-link-common.d.ts.map +1 -1
- package/link/common/link-common.d.ts +1 -1
- package/link/common/link-common.d.ts.map +1 -1
- package/link/common.js +64 -46
- package/link/link/link.d.ts.map +1 -1
- package/link/link-button/link-button.d.ts.map +1 -1
- package/link/link-button.js +15 -17
- package/link/link-static/link-static.d.ts.map +1 -1
- package/link/link-static.js +15 -17
- package/link/link.js +15 -17
- package/link-list/common/link-list-base.d.ts +3 -3
- package/link-list/common/link-list-base.d.ts.map +1 -1
- package/link-list/common.js +72 -44
- package/link-list/link-list/link-list.d.ts +2 -2
- package/link-list/link-list/link-list.d.ts.map +1 -1
- package/link-list/link-list-anchor/link-list-anchor.d.ts.map +1 -1
- package/link-list/link-list-anchor.js +15 -16
- package/link-list/link-list.js +43 -24
- package/loading-indicator/loading-indicator.d.ts +3 -3
- package/loading-indicator/loading-indicator.d.ts.map +1 -1
- package/loading-indicator.js +61 -36
- package/logo/logo.d.ts +2 -2
- package/logo/logo.d.ts.map +1 -1
- package/logo.js +47 -27
- package/map-container/map-container.d.ts +2 -2
- package/map-container/map-container.d.ts.map +1 -1
- package/map-container.js +84 -65
- package/menu/common/menu-action-common.d.ts +2 -2
- package/menu/common/menu-action-common.d.ts.map +1 -1
- package/menu/common.js +37 -22
- package/menu/menu/menu.d.ts +1 -1
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu-button/menu-button.d.ts.map +1 -1
- package/menu/menu-button.js +14 -16
- package/menu/menu-link/menu-link.d.ts.map +1 -1
- package/menu/menu-link.js +15 -17
- package/menu/menu.js +175 -170
- package/message/message.d.ts +2 -2
- package/message/message.d.ts.map +1 -1
- package/message.js +47 -27
- package/navigation/common/navigation-action-common.d.ts +1 -1
- package/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/navigation/common.js +38 -33
- package/navigation/navigation/navigation.d.ts +2 -2
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-button/navigation-button.d.ts.map +1 -1
- package/navigation/navigation-button.js +14 -16
- package/navigation/navigation-link/navigation-link.d.ts.map +1 -1
- package/navigation/navigation-link.js +14 -16
- package/navigation/navigation-list/navigation-list.d.ts +1 -1
- package/navigation/navigation-list/navigation-list.d.ts.map +1 -1
- package/navigation/navigation-list.js +48 -35
- package/navigation/navigation-marker/navigation-marker.d.ts +1 -1
- package/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/navigation/navigation-marker.js +77 -69
- package/navigation/navigation-section/navigation-section.d.ts +3 -3
- package/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/navigation/navigation-section.js +192 -171
- package/navigation/navigation.js +185 -181
- package/notification/notification.d.ts +6 -6
- package/notification/notification.d.ts.map +1 -1
- package/notification.js +147 -116
- package/option/optgroup/optgroup-base-element.d.ts +3 -3
- package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/option/optgroup/optgroup.d.ts.map +1 -1
- package/option/optgroup.js +131 -112
- package/option/option/option-base-element.d.ts +7 -7
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option/option.d.ts.map +1 -1
- package/option/option.js +295 -252
- package/overlay/overlay-base-element.d.ts +1 -1
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay.d.ts +4 -4
- package/overlay/overlay.d.ts.map +1 -1
- package/overlay.js +194 -165
- package/package.json +18 -2
- package/paginator/common/paginator-common.d.ts +26 -0
- package/paginator/common/paginator-common.d.ts.map +1 -0
- package/paginator/common.d.ts +2 -0
- package/paginator/common.d.ts.map +1 -0
- package/paginator/common.js +145 -0
- package/paginator/compact-paginator/compact-paginator.d.ts +20 -0
- package/paginator/compact-paginator/compact-paginator.d.ts.map +1 -0
- package/paginator/compact-paginator.d.ts +2 -0
- package/paginator/compact-paginator.d.ts.map +1 -0
- package/paginator/compact-paginator.js +40 -0
- package/paginator/paginator/paginator.d.ts +51 -0
- package/paginator/paginator/paginator.d.ts.map +1 -0
- package/paginator/paginator.d.ts +1 -90
- package/paginator/paginator.d.ts.map +1 -1
- package/paginator/paginator.js +171 -0
- package/paginator.d.ts +2 -0
- package/paginator.d.ts.map +1 -1
- package/paginator.js +3 -265
- package/popover/popover/popover.d.ts +6 -7
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover-trigger/popover-trigger.d.ts.map +1 -1
- package/popover/popover-trigger.js +26 -29
- package/popover/popover.js +230 -208
- package/radio-button/common/radio-button-common.d.ts +1 -1
- package/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/radio-button/common.js +67 -43
- package/radio-button/radio-button/radio-button.d.ts +2 -6
- package/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts +6 -6
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +192 -156
- package/radio-button/radio-button-panel/radio-button-panel.d.ts +2 -6
- package/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/radio-button/radio-button-panel.js +49 -45
- package/radio-button/radio-button.js +43 -37
- package/screen-reader-only/screen-reader-only.d.ts.map +1 -1
- package/screen-reader-only.js +17 -18
- package/select/select.d.ts +5 -4
- package/select/select.d.ts.map +1 -1
- package/select.js +377 -401
- package/selection-expansion-panel/selection-expansion-panel.d.ts +3 -3
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +157 -148
- package/signet/signet.d.ts +2 -2
- package/signet/signet.d.ts.map +1 -1
- package/signet.js +48 -28
- package/skiplink-list/skiplink-list.d.ts +2 -2
- package/skiplink-list/skiplink-list.d.ts.map +1 -1
- package/skiplink-list.js +54 -36
- package/slider/slider.d.ts +5 -4
- package/slider/slider.d.ts.map +1 -1
- package/slider.js +197 -158
- package/status/status.d.ts +3 -3
- package/status/status.d.ts.map +1 -1
- package/status.js +71 -46
- package/stepper/step/step.d.ts.map +1 -1
- package/stepper/step-label/step-label.d.ts.map +1 -1
- package/stepper/step-label.js +69 -75
- package/stepper/step.js +99 -104
- package/stepper/stepper/stepper.d.ts +3 -3
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +208 -188
- package/table/table-wrapper/table-wrapper.d.ts.map +1 -1
- package/table/table-wrapper.js +32 -36
- package/tabs/tab/tab.d.ts.map +1 -1
- package/tabs/tab-group/tab-group.d.ts +2 -2
- package/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/tabs/tab-group.js +200 -193
- package/tabs/tab-label/tab-label.d.ts +3 -3
- package/tabs/tab-label/tab-label.d.ts.map +1 -1
- package/tabs/tab-label.js +65 -37
- package/tabs/tab.js +34 -35
- package/tag/tag/tag.d.ts +3 -5
- package/tag/tag/tag.d.ts.map +1 -1
- package/tag/tag-group/tag-group.d.ts +3 -3
- package/tag/tag-group/tag-group.d.ts.map +1 -1
- package/tag/tag-group.js +107 -75
- package/tag/tag.js +92 -73
- package/teaser/teaser.d.ts +4 -4
- package/teaser/teaser.d.ts.map +1 -1
- package/teaser-hero/teaser-hero.d.ts +3 -3
- package/teaser-hero/teaser-hero.d.ts.map +1 -1
- package/teaser-hero.js +66 -38
- package/teaser-product/common/teaser-product-common.d.ts +1 -1
- package/teaser-product/common/teaser-product-common.d.ts.map +1 -1
- package/teaser-product/common.js +36 -21
- package/teaser-product/teaser-product/teaser-product.d.ts.map +1 -1
- package/teaser-product/teaser-product-static/teaser-product-static.d.ts.map +1 -1
- package/teaser-product/teaser-product-static.js +14 -17
- package/teaser-product/teaser-product.js +14 -17
- package/teaser.js +69 -37
- package/time-input/time-input.d.ts +1 -1
- package/time-input/time-input.d.ts.map +1 -1
- package/time-input.js +160 -166
- package/timetable-occupancy/timetable-occupancy.d.ts +2 -2
- package/timetable-occupancy/timetable-occupancy.d.ts.map +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.d.ts +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.d.ts.map +1 -1
- package/timetable-occupancy-icon.js +60 -48
- package/timetable-occupancy.js +55 -38
- package/title/title-base.d.ts +3 -3
- package/title/title-base.d.ts.map +1 -1
- package/title/title.d.ts.map +1 -1
- package/title.js +81 -53
- package/toast/toast.d.ts +4 -4
- package/toast/toast.d.ts.map +1 -1
- package/toast.js +156 -123
- package/toggle/toggle/toggle.d.ts +3 -5
- package/toggle/toggle/toggle.d.ts.map +1 -1
- package/toggle/toggle-option/toggle-option.d.ts +2 -2
- package/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/toggle/toggle-option.js +89 -72
- package/toggle/toggle.js +139 -122
- package/toggle-check/toggle-check.d.ts +4 -3
- package/toggle-check/toggle-check.d.ts.map +1 -1
- package/toggle-check.js +63 -41
- package/train/train/train.d.ts +5 -5
- package/train/train/train.d.ts.map +1 -1
- package/train/train-blocked-passage/train-blocked-passage.d.ts.map +1 -1
- package/train/train-blocked-passage.js +17 -18
- package/train/train-formation/train-formation.d.ts +2 -2
- package/train/train-formation/train-formation.d.ts.map +1 -1
- package/train/train-formation.js +96 -87
- package/train/train-wagon/train-wagon.d.ts +7 -9
- package/train/train-wagon/train-wagon.d.ts.map +1 -1
- package/train/train-wagon.js +150 -110
- package/train/train.js +108 -71
- package/visual-checkbox/visual-checkbox.d.ts +3 -3
- package/visual-checkbox/visual-checkbox.d.ts.map +1 -1
- package/visual-checkbox.js +59 -32
package/calendar.js
CHANGED
|
@@ -1,494 +1,492 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
var _e = (o) => {
|
|
2
|
+
throw TypeError(o);
|
|
3
|
+
};
|
|
4
|
+
var ue = (o, h, m) => h.has(o) || _e("Cannot " + m);
|
|
5
|
+
var v = (o, h, m) => (ue(o, h, "read from private field"), m ? m.call(o) : h.get(o)), w = (o, h, m) => h.has(o) ? _e("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(o) : h.set(o, m), u = (o, h, m, p) => (ue(o, h, "write to private field"), p ? p.call(o, m) : h.set(o, m), m);
|
|
6
|
+
import { __esDecorate as f, __runInitializers as c } from "tslib";
|
|
7
|
+
import { css as pe, LitElement as ve, isServer as me, html as n, nothing as g } from "lit";
|
|
8
|
+
import { customElement as we, property as y, state as F } from "lit/decorators.js";
|
|
9
|
+
import { classMap as R } from "lit/directives/class-map.js";
|
|
10
|
+
import { sbbInputModalityDetector as ye, isArrowKeyOrPageKeysPressed as Ae } from "./core/a11y.js";
|
|
11
|
+
import { readConfig as xe } from "./core/config.js";
|
|
12
|
+
import { SbbConnectedAbortController as De, SbbLanguageController as Ye } from "./core/controllers.js";
|
|
13
|
+
import { defaultDateAdapter as $e, YEARS_PER_PAGE as b, DAYS_PER_ROW as O, MONTHS_PER_ROW as I, YEARS_PER_ROW as S } from "./core/datetime.js";
|
|
14
|
+
import { forceType as Me } from "./core/decorators.js";
|
|
15
|
+
import { isBreakpoint as E } from "./core/dom.js";
|
|
16
|
+
import { EventEmitter as ke } from "./core/eventing.js";
|
|
17
|
+
import { i18nPreviousMonth as Ve, i18nNextMonth as ze, i18nYearMonthSelection as Fe, i18nPreviousYear as Re, i18nNextYear as Ie, i18nCalendarDateSelection as fe, i18nPreviousYearRange as Ce, i18nNextYearRange as Se } from "./core/i18n.js";
|
|
18
|
+
import { SbbHydrationMixin as Te } from "./core/mixins.js";
|
|
12
19
|
import "./button/secondary-button.js";
|
|
13
20
|
import "./icon.js";
|
|
14
21
|
import "./screen-reader-only.js";
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
this
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
this
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
22
|
+
const Ne = pe`*,:before,:after{box-sizing:border-box}:host{display:block;width:max-content;--sbb-calendar-cell-size: 2.5rem;--sbb-calendar-hover-shift: .0625rem;--sbb-calendar-wide-cell-size: 4.375rem;--sbb-calendar-cell-disabled-color: var(--sbb-color-granite);--sbb-calendar-header-color: var(--sbb-color-granite);--sbb-calendar-cell-background-color: transparent;--sbb-calendar-cell-padding: .125rem;--sbb-calendar-cell-color: var(--sbb-color-charcoal);--sbb-calendar-cell-selected-color: var(--sbb-color-white);--sbb-calendar-cell-selected-background-color: var(--sbb-color-charcoal);--sbb-calendar-cell-disabled-height: .09375rem;--sbb-calendar-cell-disabled-width: 1.59375rem;--sbb-calendar-cell-transition-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-2x) );--sbb-calendar-cell-transition-easing-function: var(--sbb-animation-easing);--sbb-calendar-tables-gap: var(--sbb-spacing-fixed-10x);--sbb-calendar-table-animation-shift: .00625rem;--sbb-calendar-table-animation-duration: .1ms;--sbb-calendar-table-column-spaces: 12;--sbb-calendar-control-view-change-height: 2.75rem;--sbb-calendar-control-view-change-color: var(--sbb-color-charcoal);--sbb-calendar-control-view-change-background: var(--sbb-color-white)}@media (min-width: 22.5rem){:host{--sbb-calendar-cell-size: 2.75rem;--sbb-calendar-wide-cell-size: 4.8125rem;--sbb-calendar-control-view-change-height: 3rem}}.sbb-calendar__wrapper{width:100%;display:block;transition-duration:var(--sbb-calendar-cell-transition-duration)}.sbb-calendar__controls{width:100%;display:inline-flex;align-items:center;gap:var(--sbb-spacing-fixed-2x);margin-block-end:var(--sbb-spacing-fixed-4x)}.sbb-calendar__controls-month{width:100%;display:flex;gap:var(--sbb-calendar-tables-gap)}#sbb-calendar__controls-previous,#sbb-calendar__controls-next{-webkit-tap-highlight-color:transparent}.sbb-calendar__controls-change-date{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;outline:none;border:none;border-radius:0;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;align-items:center;margin:auto;height:var(--sbb-calendar-control-view-change-height);text-transform:capitalize;cursor:pointer;padding-inline:var(--sbb-spacing-fixed-5x) var(--sbb-spacing-fixed-2x);border-radius:var(--sbb-border-radius-infinity);background-color:var(--sbb-calendar-control-view-change-background);color:var(--sbb-calendar-control-view-change-color);transition-duration:var(--sbb-calendar-cell-transition-duration);transition-timing-function:var(--sbb-calendar-cell-transition-easing-function);transition-property:background-color,padding-block-end}.sbb-calendar__controls-change-date:disabled{--sbb-calendar-control-view-change-background: var(--sbb-color-milk);--sbb-calendar-control-view-change-color: var(--sbb-calendar-cell-disabled-color);cursor:unset}.sbb-calendar__controls-change-date:focus-visible:not([data-focus-origin=mouse],[data-focus-origin=touch]){outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width);outline-offset:var(--sbb-spacing-fixed-1x)}@media (any-hover: hover){.sbb-calendar__controls-change-date:not(:active,:disabled):hover{padding-block-end:var(--sbb-calendar-hover-shift)}}.sbb-calendar__controls-change-date:not(:disabled):active{--sbb-calendar-control-view-change-background: var(--sbb-color-milk)}.sbb-calendar__table-month-view,.sbb-calendar__table-year-view{--sbb-calendar-table-column-spaces: 6}.sbb-calendar__table-container{display:flex;gap:var(--sbb-calendar-tables-gap);margin-inline:var(--sbb-calendar-margin);--sbb-calendar-min-width: calc(7 * var(--sbb-calendar-cell-size));--sbb-calendar-overflow: calc(100% - var(--sbb-calendar-min-width));--sbb-calendar-start-offset: min( 0px, -1 * (var(--sbb-calendar-overflow) / var(--sbb-calendar-table-column-spaces)) );--sbb-calendar-margin: var(--sbb-calendar-start-offset)}:host([data-wide]) .sbb-calendar__table-container{--sbb-calendar-min-width: calc( 2 * 7 * var(--sbb-calendar-cell-size) + var(--sbb-calendar-tables-gap) );--sbb-calendar-margin: calc(.5 * var(--sbb-calendar-start-offset))}.sbb-calendar__table{width:100%;border-collapse:collapse;height:max-content;animation-name:show;animation-duration:var(--sbb-calendar-table-animation-duration)}.sbb-calendar__table.sbb-calendar__table-hide{--sbb-calendar-cell-transition-duration: 0ms;animation-name:hide;animation-duration:var(--sbb-calendar-table-animation-duration)}:host(:not([data-wide])) .sbb-calendar__table{min-width:100%}.sbb-calendar__table-header{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-calendar-header-color);width:var(--sbb-calendar-cell-size);padding:0;padding-block-end:var(--sbb-spacing-fixed-4x);text-align:center}.sbb-calendar__table-data{position:relative;padding:0;text-align:center}.sbb-calendar__cell{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;margin:0;outline:none;border:none;border-radius:0;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);height:var(--sbb-calendar-cell-size);color:var(--sbb-calendar-cell-color);cursor:pointer;position:relative;z-index:0}.sbb-calendar__cell:before{content:"";position:absolute;inset:var(--sbb-calendar-cell-padding);background-color:var(--sbb-calendar-cell-background-color);border-radius:50%;z-index:-1;transition-duration:var(--sbb-calendar-cell-transition-duration);transition-timing-function:var(--sbb-calendar-cell-transition-easing-function);transition-property:background-color}@media (any-hover: hover){.sbb-calendar__cell:not(.sbb-calendar__selected,:active,:disabled):hover{--sbb-calendar-cell-background-color: var(--sbb-color-milk);padding-block-end:var(--sbb-calendar-hover-shift)}}@media (any-hover: hover) and (forced-colors: active){.sbb-calendar__cell:not(.sbb-calendar__selected,:active,:disabled):hover:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}}.sbb-calendar__cell:disabled{--sbb-calendar-cell-color: var(--sbb-calendar-cell-disabled-color);cursor:unset}.sbb-calendar__cell:focus-visible:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}.sbb-calendar__cell:not(.sbb-calendar__selected,:disabled):active{--sbb-calendar-cell-background-color: var(--sbb-color-cloud)}@media (forced-colors: active){.sbb-calendar__cell:not(.sbb-calendar__selected,:disabled):active:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}}.sbb-calendar__day{border-radius:50%;width:var(--sbb-calendar-cell-size)}.sbb-calendar__day:before{border-radius:50%}.sbb-calendar__pill{width:var(--sbb-calendar-wide-cell-size);border-radius:var(--sbb-border-radius-infinity)}.sbb-calendar__pill:before{border-radius:var(--sbb-border-radius-infinity)}.sbb-calendar__crossed-out:after{content:"";height:var(--sbb-calendar-cell-disabled-height);width:var(--sbb-calendar-cell-disabled-width);position:absolute;background-color:var(--sbb-calendar-cell-disabled-color);top:50%;left:50%;transform:translate(-50%,-50%) rotate(-45deg)}.sbb-calendar__cell-current{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700}.sbb-calendar__selected{--sbb-calendar-cell-color: var(--sbb-calendar-cell-selected-color);--sbb-calendar-cell-background-color: var(--sbb-calendar-cell-selected-background-color)}@media (forced-colors: active){.sbb-calendar__selected{--sbb-calendar-cell-background-color: ButtonText !important}}@keyframes show{0%{opacity:0;transform:translateY(var(--sbb-calendar-table-animation-shift))}to{opacity:1;transform:translateY(0)}}@keyframes hide{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(var(--sbb-calendar-table-animation-shift))}}`;
|
|
23
|
+
let at = (() => {
|
|
24
|
+
var x, D, Y, $, M, k, V, l;
|
|
25
|
+
let o = [we("sbb-calendar")], h, m = [], p, W = Te(ve), A = [], L, P = [], B = [], q, K = [], H = [], U, j, G, J, Q, X = [], Z = [], ee, te = [], ae = [], se, ie = [], re = [], ne, le, de = [], oe = [], ce, be = [], he = [];
|
|
26
|
+
var T = (l = class extends W {
|
|
27
|
+
constructor() {
|
|
28
|
+
var e;
|
|
29
|
+
super();
|
|
30
|
+
w(this, x);
|
|
31
|
+
w(this, D);
|
|
32
|
+
w(this, Y);
|
|
33
|
+
w(this, $);
|
|
34
|
+
w(this, M);
|
|
35
|
+
w(this, k);
|
|
36
|
+
w(this, V);
|
|
37
|
+
u(this, x, (c(this, A), c(this, P, !1))), u(this, D, (c(this, B), c(this, K, "day"))), this._min = c(this, H), this._now = null, u(this, Y, c(this, X, null)), this._dateAdapter = (c(this, Z), ((e = xe().datetime) == null ? void 0 : e.dateAdapter) ?? $e), this._dateSelected = new ke(this, T.events.dateSelected), u(this, $, c(this, te, this.now)), u(this, M, (c(this, ae), c(this, ie, void 0))), u(this, k, (c(this, re), c(this, de, "day"))), this._nextCalendarView = (c(this, oe), "day"), this._weeks = [], this._monthNames = this._dateAdapter.getMonthNames("long"), this._resetFocus = !1, u(this, V, c(this, be, !1)), this._abort = (c(this, he), new De(this)), this._language = new Ye(this).withHandler(() => {
|
|
38
|
+
this._monthNames = this._dateAdapter.getMonthNames("long"), this._createMonthRows();
|
|
39
|
+
}), this._createMonthRows(), this._setWeekdays();
|
|
40
|
+
}
|
|
41
|
+
/** If set to true, two months are displayed */
|
|
42
|
+
get wide() {
|
|
43
|
+
return v(this, x);
|
|
44
|
+
}
|
|
45
|
+
set wide(e) {
|
|
46
|
+
u(this, x, e);
|
|
47
|
+
}
|
|
48
|
+
/** The initial view of the calendar which should be displayed on opening. */
|
|
49
|
+
get view() {
|
|
50
|
+
return v(this, D);
|
|
51
|
+
}
|
|
52
|
+
set view(e) {
|
|
53
|
+
u(this, D, e);
|
|
54
|
+
}
|
|
55
|
+
/** The minimum valid date. Takes T Object, ISOString, and Unix Timestamp (number of seconds since Jan 1, 1970). */
|
|
56
|
+
set min(e) {
|
|
57
|
+
this._min = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));
|
|
58
|
+
}
|
|
59
|
+
get min() {
|
|
60
|
+
return this._min ?? null;
|
|
61
|
+
}
|
|
62
|
+
/** The maximum valid date. Takes T Object, ISOString, and Unix Timestamp (number of seconds since Jan 1, 1970). */
|
|
63
|
+
set max(e) {
|
|
64
|
+
this._max = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));
|
|
65
|
+
}
|
|
66
|
+
get max() {
|
|
67
|
+
return this._max ?? null;
|
|
68
|
+
}
|
|
69
|
+
/** A configured date which acts as the current date instead of the real current date. Recommended for testing purposes. */
|
|
70
|
+
set now(e) {
|
|
71
|
+
this._now = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e));
|
|
72
|
+
}
|
|
73
|
+
get now() {
|
|
74
|
+
return this._now ?? this._dateAdapter.today();
|
|
75
|
+
}
|
|
76
|
+
/** The selected date. Takes T Object, ISOString, and Unix Timestamp (number of seconds since Jan 1, 1970). */
|
|
77
|
+
set selected(e) {
|
|
78
|
+
this._selectedDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(e)), this._selectedDate && (!this._isDayInRange(this._dateAdapter.toIso8601(this._selectedDate)) || this._dateFilter(this._selectedDate)) ? this._selected = this._dateAdapter.toIso8601(this._selectedDate) : this._selected = void 0;
|
|
79
|
+
}
|
|
80
|
+
get selected() {
|
|
81
|
+
return this._selectedDate ?? null;
|
|
82
|
+
}
|
|
83
|
+
/** A function used to filter out dates. */
|
|
84
|
+
get dateFilter() {
|
|
85
|
+
return v(this, Y);
|
|
86
|
+
}
|
|
87
|
+
set dateFilter(e) {
|
|
88
|
+
u(this, Y, e);
|
|
89
|
+
}
|
|
90
|
+
/** The currently active date. */
|
|
91
|
+
get _activeDate() {
|
|
92
|
+
return v(this, $);
|
|
93
|
+
}
|
|
94
|
+
set _activeDate(e) {
|
|
95
|
+
u(this, $, e);
|
|
96
|
+
}
|
|
97
|
+
/** The selected date as ISOString. */
|
|
98
|
+
get _selected() {
|
|
99
|
+
return v(this, M);
|
|
100
|
+
}
|
|
101
|
+
set _selected(e) {
|
|
102
|
+
u(this, M, e);
|
|
103
|
+
}
|
|
104
|
+
/** The current wide property considering property value and breakpoints. From zero to small `wide` has always to be false. */
|
|
105
|
+
set _wide(e) {
|
|
106
|
+
this.toggleAttribute("data-wide", e);
|
|
107
|
+
}
|
|
108
|
+
get _wide() {
|
|
109
|
+
return this.hasAttribute("data-wide");
|
|
110
|
+
}
|
|
111
|
+
get _calendarView() {
|
|
112
|
+
return v(this, k);
|
|
113
|
+
}
|
|
114
|
+
set _calendarView(e) {
|
|
115
|
+
u(this, k, e);
|
|
116
|
+
}
|
|
117
|
+
/** A list of buttons corresponding to days, months or years depending on the view. */
|
|
118
|
+
get _cells() {
|
|
119
|
+
return Array.from(this.shadowRoot.querySelectorAll(".sbb-calendar__cell") ?? []);
|
|
120
|
+
}
|
|
121
|
+
get _initialized() {
|
|
122
|
+
return v(this, V);
|
|
123
|
+
}
|
|
124
|
+
set _initialized(e) {
|
|
125
|
+
u(this, V, e);
|
|
126
|
+
}
|
|
127
|
+
_dateFilter(e) {
|
|
128
|
+
var t;
|
|
129
|
+
return ((t = this.dateFilter) == null ? void 0 : t.call(this, e)) ?? !0;
|
|
130
|
+
}
|
|
131
|
+
/** Resets the active month according to the new state of the calendar. */
|
|
132
|
+
resetPosition() {
|
|
133
|
+
this._resetCalendarView(), this._init();
|
|
134
|
+
}
|
|
135
|
+
connectedCallback() {
|
|
136
|
+
var e;
|
|
137
|
+
super.connectedCallback(), this.resetPosition(), this.focus = () => {
|
|
138
|
+
this._resetFocus = !0, this._focusCell();
|
|
139
|
+
}, (e = globalThis.window) == null || e.addEventListener("resize", () => this._init(), {
|
|
140
|
+
passive: !0,
|
|
141
|
+
signal: this._abort.signal
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
willUpdate(e) {
|
|
145
|
+
super.willUpdate(e), this._initialized && (e.has("wide") && this.resetPosition(), e.has("view") && (this._setChosenYear(), this._chosenMonth = void 0, this._nextCalendarView = this._calendarView = this.view));
|
|
146
|
+
}
|
|
147
|
+
updated(e) {
|
|
148
|
+
super.updated(e), this._setTabIndex(), ye.mostRecentModality === "keyboard" && this._focusCell();
|
|
149
|
+
}
|
|
150
|
+
/** Initializes the component. */
|
|
151
|
+
_init(e) {
|
|
152
|
+
if (!me) {
|
|
153
|
+
if (this.hydrationRequired) {
|
|
154
|
+
this.hydrationComplete.then(() => this._init());
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
if (e && this._assignActiveDate(e), this._wide = E("medium") && this.wide, this._weeks = this._createWeekRows(this._activeDate), this._years = this._createYearRows(), this._nextMonthWeeks = [[]], this._nextMonthYears = [[]], this._wide) {
|
|
158
|
+
const t = this._dateAdapter.addCalendarMonths(this._activeDate, 1);
|
|
159
|
+
this._nextMonthWeeks = this._createWeekRows(t), this._nextMonthYears = this._createYearRows(b);
|
|
160
|
+
}
|
|
161
|
+
this._initialized = !0;
|
|
96
162
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
163
|
+
}
|
|
164
|
+
/** Focuses on a day cell prioritizing the selected day, the current day, and lastly, the first selectable day. */
|
|
165
|
+
_focusCell() {
|
|
166
|
+
var e;
|
|
167
|
+
this._resetFocus && ((e = this._getFirstFocusable()) == null || e.focus(), this._resetFocus = !1);
|
|
168
|
+
}
|
|
169
|
+
/** Creates the array of weekdays. */
|
|
170
|
+
_setWeekdays() {
|
|
171
|
+
const e = this._dateAdapter.getDayOfWeekNames("narrow"), a = this._dateAdapter.getDayOfWeekNames("long").map((s, r) => ({
|
|
172
|
+
long: s,
|
|
173
|
+
narrow: e[r]
|
|
174
|
+
})), i = this._dateAdapter.getFirstDayOfWeek();
|
|
175
|
+
this._weekdays = a.slice(i).concat(a.slice(0, i));
|
|
176
|
+
}
|
|
177
|
+
/** Creates the rows for each week. */
|
|
178
|
+
_createWeekRows(e) {
|
|
179
|
+
const t = this._dateAdapter.getNumDaysInMonth(e), a = this._dateAdapter.getDateNames(), i = [[]], s = this._dateAdapter.getFirstWeekOffset(e);
|
|
180
|
+
for (let r = 0, d = s; r < t; r++, d++) {
|
|
181
|
+
d === O && (i.push([]), d = 0);
|
|
182
|
+
const _ = this._dateAdapter.createDate(this._dateAdapter.getYear(e), this._dateAdapter.getMonth(e), r + 1);
|
|
183
|
+
i[i.length - 1].push({
|
|
184
|
+
value: this._dateAdapter.toIso8601(_),
|
|
185
|
+
dayValue: a[r],
|
|
186
|
+
monthValue: String(this._dateAdapter.getMonth(_)),
|
|
187
|
+
yearValue: String(this._dateAdapter.getYear(_))
|
|
188
|
+
});
|
|
100
189
|
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
190
|
+
return i;
|
|
191
|
+
}
|
|
192
|
+
/** Creates the rows for the month selection view. */
|
|
193
|
+
_createMonthRows() {
|
|
194
|
+
const e = this._dateAdapter.getMonthNames("short"), t = new Array(12).fill(null).map((s, r) => ({
|
|
195
|
+
value: e[r],
|
|
196
|
+
longValue: this._monthNames[r],
|
|
197
|
+
monthValue: r + 1
|
|
198
|
+
})), a = 12 / I, i = [];
|
|
199
|
+
for (let s = 0; s < a; s++)
|
|
200
|
+
i.push(t.slice(I * s, I * (s + 1)));
|
|
201
|
+
this._months = i;
|
|
202
|
+
}
|
|
203
|
+
/** Creates the rows for the year selection view. */
|
|
204
|
+
_createYearRows(e = 0) {
|
|
205
|
+
const t = this._getStartValueYearView(), a = new Array(b).fill(0).map((r, d) => t + e + d), i = b / S, s = [];
|
|
206
|
+
for (let r = 0; r < i; r++)
|
|
207
|
+
s.push(a.slice(S * r, S * (r + 1)));
|
|
208
|
+
return s;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Calculates the first year that will be shown in the year selection panel.
|
|
212
|
+
* If `minDate` and `maxDate` are both null, the starting year is calculated as
|
|
213
|
+
* the multiple of YEARS_PER_PAGE closest to and less than activeDate,
|
|
214
|
+
* e.g., with `YEARS_PER_PAGE` = 24 and `activeDate` = 2020, the function will return 2016 (24 * 83),
|
|
215
|
+
* while with `activeDate` = 2000, the function will return 1992 (24 * 82).
|
|
216
|
+
* If `minDate` is not null, it returns the corresponding year; if `maxDate` is not null,
|
|
217
|
+
* it returns the corresponding year minus `YEARS_PER_PAGE`, so that the `maxDate` is the last rendered year.
|
|
218
|
+
* If both are not null, `maxDate` has priority over `minDate`.
|
|
219
|
+
*/
|
|
220
|
+
_getStartValueYearView() {
|
|
221
|
+
let e = 0;
|
|
222
|
+
this.max ? e = this._dateAdapter.getYear(this.max) - b + 1 : this.min && (e = this._dateAdapter.getYear(this.min));
|
|
223
|
+
const t = this._dateAdapter.getYear(this._activeDate);
|
|
224
|
+
return t - ((t - e) % b + b) % b;
|
|
133
225
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
_createMonthRows() {
|
|
138
|
-
const e = this._dateAdapter.getMonthNames("short"), t = new Array(12).fill(null).map(
|
|
139
|
-
(s, i) => ({
|
|
140
|
-
value: e[i],
|
|
141
|
-
longValue: this._monthNames[i],
|
|
142
|
-
monthValue: i + 1
|
|
143
|
-
})
|
|
144
|
-
), a = 12 / g, r = [];
|
|
145
|
-
for (let s = 0; s < a; s++)
|
|
146
|
-
r.push(t.slice(g * s, g * (s + 1)));
|
|
147
|
-
this._months = r;
|
|
148
|
-
}
|
|
149
|
-
/** Creates the rows for the year selection view. */
|
|
150
|
-
_createYearRows(e = 0) {
|
|
151
|
-
const t = this._getStartValueYearView(), a = new Array(d).fill(0).map((i, n) => t + e + n), r = d / v, s = [];
|
|
152
|
-
for (let i = 0; i < r; i++)
|
|
153
|
-
s.push(a.slice(v * i, v * (i + 1)));
|
|
154
|
-
return s;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Calculates the first year that will be shown in the year selection panel.
|
|
158
|
-
* If `minDate` and `maxDate` are both null, the starting year is calculated as
|
|
159
|
-
* the multiple of YEARS_PER_PAGE closest to and less than activeDate,
|
|
160
|
-
* e.g., with `YEARS_PER_PAGE` = 24 and `activeDate` = 2020, the function will return 2016 (24 * 83),
|
|
161
|
-
* while with `activeDate` = 2000, the function will return 1992 (24 * 82).
|
|
162
|
-
* If `minDate` is not null, it returns the corresponding year; if `maxDate` is not null,
|
|
163
|
-
* it returns the corresponding year minus `YEARS_PER_PAGE`, so that the `maxDate` is the last rendered year.
|
|
164
|
-
* If both are not null, `maxDate` has priority over `minDate`.
|
|
165
|
-
*/
|
|
166
|
-
_getStartValueYearView() {
|
|
167
|
-
let e = 0;
|
|
168
|
-
this.max ? e = this._dateAdapter.getYear(this.max) - d + 1 : this.min && (e = this._dateAdapter.getYear(this.min));
|
|
169
|
-
const t = this._dateAdapter.getYear(this._activeDate);
|
|
170
|
-
return t - ((t - e) % d + d) % d;
|
|
171
|
-
}
|
|
172
|
-
/** Checks if date is within the min-max range. */
|
|
173
|
-
_isDayInRange(e) {
|
|
174
|
-
if (!this._min && !this._max)
|
|
175
|
-
return !0;
|
|
176
|
-
const t = this._dateAdapter.isValid(this._min) && this._dateAdapter.compareDate(this._min, this._dateAdapter.deserialize(e)) > 0, a = this._dateAdapter.isValid(this._max) && this._dateAdapter.compareDate(this._max, this._dateAdapter.deserialize(e)) < 0;
|
|
177
|
-
return !(t || a);
|
|
178
|
-
}
|
|
179
|
-
_isMonthInRange(e) {
|
|
180
|
-
if (!this._min && !this._max)
|
|
181
|
-
return !0;
|
|
182
|
-
const t = this._dateAdapter.isValid(this._min) && this._dateAdapter.getYear(this._min) >= this._chosenYear && this._dateAdapter.getMonth(this._min) > e, a = this._dateAdapter.isValid(this._max) && this._dateAdapter.getYear(this._max) <= this._chosenYear && this._dateAdapter.getMonth(this._max) < e;
|
|
183
|
-
return !(t || a);
|
|
184
|
-
}
|
|
185
|
-
_isYearInRange(e) {
|
|
186
|
-
if (!this._min && !this._max)
|
|
187
|
-
return !0;
|
|
188
|
-
const t = this._dateAdapter.isValid(this._min) && this._dateAdapter.getYear(this._min) > e, a = this._dateAdapter.isValid(this._max) && this._dateAdapter.getYear(this._max) < e;
|
|
189
|
-
return !(t || a);
|
|
190
|
-
}
|
|
191
|
-
// Implementation adapted from https://github.com/angular/components/blob/main/src/material/datepicker/year-view.ts#L366
|
|
192
|
-
_isMonthFilteredOut(e) {
|
|
193
|
-
if (!this.dateFilter)
|
|
194
|
-
return !0;
|
|
195
|
-
const t = this._dateAdapter.createDate(this._chosenYear, e, 1);
|
|
196
|
-
for (let a = t; this._dateAdapter.getMonth(a) == e; a = this._dateAdapter.addCalendarDays(a, 1))
|
|
197
|
-
if (this.dateFilter(a))
|
|
226
|
+
/** Checks if date is within the min-max range. */
|
|
227
|
+
_isDayInRange(e) {
|
|
228
|
+
if (!this._min && !this._max)
|
|
198
229
|
return !0;
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
230
|
+
const t = this._dateAdapter.isValid(this._min) && this._dateAdapter.compareDate(this._min, this._dateAdapter.deserialize(e)) > 0, a = this._dateAdapter.isValid(this._max) && this._dateAdapter.compareDate(this._max, this._dateAdapter.deserialize(e)) < 0;
|
|
231
|
+
return !(t || a);
|
|
232
|
+
}
|
|
233
|
+
_isMonthInRange(e) {
|
|
234
|
+
if (!this._min && !this._max)
|
|
235
|
+
return !0;
|
|
236
|
+
const t = this._dateAdapter.isValid(this._min) && this._dateAdapter.getYear(this._min) >= this._chosenYear && this._dateAdapter.getMonth(this._min) > e, a = this._dateAdapter.isValid(this._max) && this._dateAdapter.getYear(this._max) <= this._chosenYear && this._dateAdapter.getMonth(this._max) < e;
|
|
237
|
+
return !(t || a);
|
|
238
|
+
}
|
|
239
|
+
_isYearInRange(e) {
|
|
240
|
+
if (!this._min && !this._max)
|
|
241
|
+
return !0;
|
|
242
|
+
const t = this._dateAdapter.isValid(this._min) && this._dateAdapter.getYear(this._min) > e, a = this._dateAdapter.isValid(this._max) && this._dateAdapter.getYear(this._max) < e;
|
|
243
|
+
return !(t || a);
|
|
244
|
+
}
|
|
245
|
+
// Implementation adapted from https://github.com/angular/components/blob/main/src/material/datepicker/year-view.ts#L366
|
|
246
|
+
_isMonthFilteredOut(e) {
|
|
247
|
+
if (!this.dateFilter)
|
|
248
|
+
return !0;
|
|
249
|
+
const t = this._dateAdapter.createDate(this._chosenYear, e, 1);
|
|
250
|
+
for (let a = t; this._dateAdapter.getMonth(a) == e; a = this._dateAdapter.addCalendarDays(a, 1))
|
|
251
|
+
if (this.dateFilter(a))
|
|
252
|
+
return !0;
|
|
253
|
+
return !1;
|
|
254
|
+
}
|
|
255
|
+
// Implementation adapted from https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.ts#L351
|
|
256
|
+
_isYearFilteredOut(e) {
|
|
257
|
+
if (!this.dateFilter)
|
|
208
258
|
return !0;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
this.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
/** Goes to the month identified by the shift. */
|
|
232
|
-
_goToDifferentMonth(e) {
|
|
233
|
-
this._init(this._dateAdapter.addCalendarMonths(this._activeDate, e));
|
|
234
|
-
}
|
|
235
|
-
_goToDifferentYear(e) {
|
|
236
|
-
this._chosenYear += e, this._activeDate = this._dateAdapter.createDate(
|
|
237
|
-
this._chosenYear,
|
|
238
|
-
this._dateAdapter.getMonth(this._activeDate),
|
|
239
|
-
this._dateAdapter.getDate(this._activeDate)
|
|
240
|
-
), this._init();
|
|
241
|
-
}
|
|
242
|
-
_goToDifferentYearRange(e) {
|
|
243
|
-
this._init(this._dateAdapter.addCalendarYears(this._activeDate, e));
|
|
244
|
-
}
|
|
245
|
-
_prevDisabled(e) {
|
|
246
|
-
return this._min ? this._dateAdapter.compareDate(e, this._min) < 0 : !1;
|
|
247
|
-
}
|
|
248
|
-
_nextDisabled(e) {
|
|
249
|
-
return this._max ? this._dateAdapter.compareDate(e, this._max) > 0 : !1;
|
|
250
|
-
}
|
|
251
|
-
/** Checks if the "previous month" button should be disabled. */
|
|
252
|
-
_previousMonthDisabled() {
|
|
253
|
-
const e = this._dateAdapter.addCalendarDays(
|
|
254
|
-
this._activeDate,
|
|
255
|
-
this._dateAdapter.getDate(this._activeDate) * -1
|
|
256
|
-
);
|
|
257
|
-
return this._prevDisabled(e);
|
|
258
|
-
}
|
|
259
|
-
/** Checks if the "next month" button should be disabled. */
|
|
260
|
-
_nextMonthDisabled() {
|
|
261
|
-
let e = this._dateAdapter.addCalendarMonths(this._activeDate, this._wide ? 2 : 1);
|
|
262
|
-
return e = this._dateAdapter.createDate(
|
|
263
|
-
this._dateAdapter.getYear(e),
|
|
264
|
-
this._dateAdapter.getMonth(e),
|
|
265
|
-
1
|
|
266
|
-
), this._nextDisabled(e);
|
|
267
|
-
}
|
|
268
|
-
_previousYearDisabled() {
|
|
269
|
-
const e = this._dateAdapter.createDate(
|
|
270
|
-
this._dateAdapter.getYear(this._activeDate) - 1,
|
|
271
|
-
12,
|
|
272
|
-
31
|
|
273
|
-
);
|
|
274
|
-
return this._prevDisabled(e);
|
|
275
|
-
}
|
|
276
|
-
_nextYearDisabled() {
|
|
277
|
-
const e = this._dateAdapter.createDate(
|
|
278
|
-
this._dateAdapter.getYear(this._activeDate) + 1,
|
|
279
|
-
1,
|
|
280
|
-
1
|
|
281
|
-
);
|
|
282
|
-
return this._nextDisabled(e);
|
|
283
|
-
}
|
|
284
|
-
_previousYearRangeDisabled() {
|
|
285
|
-
const e = this._dateAdapter.createDate(this._years[0][0] - 1, 12, 31);
|
|
286
|
-
return this._prevDisabled(e);
|
|
287
|
-
}
|
|
288
|
-
_nextYearRangeDisabled() {
|
|
289
|
-
const e = A("medium") && this.wide ? this._nextMonthYears : this._years, t = e[e.length - 1], a = t[t.length - 1], r = this._dateAdapter.createDate(a + 1, 1, 1);
|
|
290
|
-
return this._nextDisabled(r);
|
|
291
|
-
}
|
|
292
|
-
_handleTableBlur(e) {
|
|
293
|
-
(e == null ? void 0 : e.localName) !== "button" && this._setTabIndex();
|
|
294
|
-
}
|
|
295
|
-
_setTabIndex() {
|
|
296
|
-
Array.from(
|
|
297
|
-
this.shadowRoot.querySelectorAll('.sbb-calendar__cell[tabindex="0"]') ?? []
|
|
298
|
-
).forEach((t) => t.tabIndex = -1);
|
|
299
|
-
const e = this._getFirstFocusable();
|
|
300
|
-
e && (e.tabIndex = 0);
|
|
301
|
-
}
|
|
302
|
-
_getFirstFocusable() {
|
|
303
|
-
const e = this._selected ? this._dateAdapter.deserialize(this._selected) : this.now;
|
|
304
|
-
let t = this.shadowRoot.querySelector(".sbb-calendar__selected") ?? this.shadowRoot.querySelector(
|
|
305
|
-
`[data-day="${this._dateAdapter.getDate(e)} ${this._dateAdapter.getMonth(
|
|
306
|
-
e
|
|
307
|
-
)} ${this._dateAdapter.getYear(e)}"]`
|
|
308
|
-
) ?? this.shadowRoot.querySelector(`[data-month="${this._dateAdapter.getMonth(e)}"]`) ?? this.shadowRoot.querySelector(`[data-year="${this._dateAdapter.getYear(e)}"]`);
|
|
309
|
-
return (!t || t != null && t.disabled) && (t = this.shadowRoot.querySelector(".sbb-calendar__cell:not([disabled])")), t || null;
|
|
310
|
-
}
|
|
311
|
-
_handleKeyboardEvent(e, t) {
|
|
312
|
-
F(e) && e.preventDefault();
|
|
313
|
-
const a = this._cells, r = a.findIndex((n) => n === e.target), s = this._navigateByKeyboard(e, r, a, t), i = this.shadowRoot.activeElement;
|
|
314
|
-
s !== i && (s.tabIndex = 0, s == null || s.focus(), i.tabIndex = -1);
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Gets the index of the element to move to, based on a list of elements (which can be potentially disabled),
|
|
318
|
-
* the keyboard input and the position of the current element in the list.
|
|
319
|
-
* In the day view, the `day?: Day` parameter is mandatory for calculation,
|
|
320
|
-
* while in month and year view it's not due to the fixed amount of rendered cells.
|
|
321
|
-
*/
|
|
322
|
-
_navigateByKeyboard(e, t, a, r) {
|
|
323
|
-
const {
|
|
324
|
-
elementIndexForWideMode: s,
|
|
325
|
-
offsetForWideMode: i,
|
|
326
|
-
lastElementIndexForWideMode: n,
|
|
327
|
-
verticalOffset: c
|
|
328
|
-
} = this._calculateParametersForKeyboardNavigation(
|
|
329
|
-
a,
|
|
330
|
-
t,
|
|
331
|
-
r
|
|
332
|
-
);
|
|
333
|
-
switch (e.key) {
|
|
334
|
-
case "ArrowUp":
|
|
335
|
-
return this._findNext(a, t, -c);
|
|
336
|
-
case "ArrowDown":
|
|
337
|
-
return this._findNext(a, t, c);
|
|
338
|
-
case "ArrowLeft":
|
|
339
|
-
return this._findNext(a, t, -1);
|
|
340
|
-
case "ArrowRight":
|
|
341
|
-
return this._findNext(a, t, 1);
|
|
342
|
-
case "Home":
|
|
343
|
-
return this._findFirst(a, i);
|
|
344
|
-
case "PageUp":
|
|
345
|
-
return this._findFirstOnColumn(
|
|
346
|
-
a,
|
|
347
|
-
s,
|
|
348
|
-
i,
|
|
349
|
-
c
|
|
350
|
-
);
|
|
351
|
-
case "PageDown":
|
|
352
|
-
return this._findLastOnColumn(a, t, n, c);
|
|
353
|
-
case "End":
|
|
354
|
-
return this._findLast(a, n - 1);
|
|
355
|
-
default:
|
|
356
|
-
return a[t];
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* Calculates the parameter needed in keyboard navigation.
|
|
361
|
-
* Since three views are now available, the function creates and returns the correct parameters for each of them
|
|
362
|
-
* by considering the number of cells per each row and the correction for the wide mode.
|
|
363
|
-
* @param cells The array of rendered table cells; they are buttons that can represent days, months or years.
|
|
364
|
-
* @param index The starting element's index in the cell array.
|
|
365
|
-
* @param day (optional) Only in the day view, the day represented by the starting cell.
|
|
366
|
-
*/
|
|
367
|
-
_calculateParametersForKeyboardNavigation(e, t, a) {
|
|
368
|
-
switch (this._calendarView) {
|
|
369
|
-
case "day": {
|
|
370
|
-
const r = +a.dayValue - 1;
|
|
371
|
-
return {
|
|
372
|
-
verticalOffset: y,
|
|
373
|
-
elementIndexForWideMode: r,
|
|
374
|
-
offsetForWideMode: t - r,
|
|
375
|
-
lastElementIndexForWideMode: t === r ? this._dateAdapter.getNumDaysInMonth(
|
|
376
|
-
this._dateAdapter.addCalendarMonths(
|
|
377
|
-
this._dateAdapter.deserialize(a.value),
|
|
378
|
-
-1
|
|
379
|
-
)
|
|
380
|
-
) : e.length
|
|
381
|
-
};
|
|
259
|
+
const t = this._dateAdapter.createDate(e, 1, 1);
|
|
260
|
+
for (let a = t; this._dateAdapter.getYear(a) == e; a = this._dateAdapter.addCalendarDays(a, 1))
|
|
261
|
+
if (this.dateFilter(a))
|
|
262
|
+
return !0;
|
|
263
|
+
return !1;
|
|
264
|
+
}
|
|
265
|
+
/** Emits the selected date and sets it internally. */
|
|
266
|
+
_selectDate(e) {
|
|
267
|
+
this._chosenMonth = void 0, this._setChosenYear(), this._selected !== e && (this._selected = e, this._dateSelected.emit(this._dateAdapter.deserialize(e)));
|
|
268
|
+
}
|
|
269
|
+
_setChosenYear() {
|
|
270
|
+
this.view === "month" ? this._chosenYear = this._dateAdapter.getYear(this._dateAdapter.deserialize(this._selected) ?? this.selected ?? this.now) : this._chosenYear = void 0;
|
|
271
|
+
}
|
|
272
|
+
_assignActiveDate(e) {
|
|
273
|
+
if (this._min && this._dateAdapter.compareDate(this._min, e) > 0) {
|
|
274
|
+
this._activeDate = this._min;
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
if (this._max && this._dateAdapter.compareDate(this._max, e) < 0) {
|
|
278
|
+
this._activeDate = this._max;
|
|
279
|
+
return;
|
|
382
280
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
281
|
+
this._activeDate = e;
|
|
282
|
+
}
|
|
283
|
+
/** Goes to the month identified by the shift. */
|
|
284
|
+
_goToDifferentMonth(e) {
|
|
285
|
+
this._init(this._dateAdapter.addCalendarMonths(this._activeDate, e));
|
|
286
|
+
}
|
|
287
|
+
_goToDifferentYear(e) {
|
|
288
|
+
this._chosenYear += e, this._activeDate = this._dateAdapter.createDate(this._chosenYear, this._dateAdapter.getMonth(this._activeDate), this._dateAdapter.getDate(this._activeDate)), this._init();
|
|
289
|
+
}
|
|
290
|
+
_goToDifferentYearRange(e) {
|
|
291
|
+
this._init(this._dateAdapter.addCalendarYears(this._activeDate, e));
|
|
292
|
+
}
|
|
293
|
+
_prevDisabled(e) {
|
|
294
|
+
return this._min ? this._dateAdapter.compareDate(e, this._min) < 0 : !1;
|
|
295
|
+
}
|
|
296
|
+
_nextDisabled(e) {
|
|
297
|
+
return this._max ? this._dateAdapter.compareDate(e, this._max) > 0 : !1;
|
|
298
|
+
}
|
|
299
|
+
/** Checks if the "previous month" button should be disabled. */
|
|
300
|
+
_previousMonthDisabled() {
|
|
301
|
+
const e = this._dateAdapter.addCalendarDays(this._activeDate, this._dateAdapter.getDate(this._activeDate) * -1);
|
|
302
|
+
return this._prevDisabled(e);
|
|
303
|
+
}
|
|
304
|
+
/** Checks if the "next month" button should be disabled. */
|
|
305
|
+
_nextMonthDisabled() {
|
|
306
|
+
let e = this._dateAdapter.addCalendarMonths(this._activeDate, this._wide ? 2 : 1);
|
|
307
|
+
return e = this._dateAdapter.createDate(this._dateAdapter.getYear(e), this._dateAdapter.getMonth(e), 1), this._nextDisabled(e);
|
|
308
|
+
}
|
|
309
|
+
_previousYearDisabled() {
|
|
310
|
+
const e = this._dateAdapter.createDate(this._dateAdapter.getYear(this._activeDate) - 1, 12, 31);
|
|
311
|
+
return this._prevDisabled(e);
|
|
312
|
+
}
|
|
313
|
+
_nextYearDisabled() {
|
|
314
|
+
const e = this._dateAdapter.createDate(this._dateAdapter.getYear(this._activeDate) + 1, 1, 1);
|
|
315
|
+
return this._nextDisabled(e);
|
|
316
|
+
}
|
|
317
|
+
_previousYearRangeDisabled() {
|
|
318
|
+
const e = this._dateAdapter.createDate(this._years[0][0] - 1, 12, 31);
|
|
319
|
+
return this._prevDisabled(e);
|
|
320
|
+
}
|
|
321
|
+
_nextYearRangeDisabled() {
|
|
322
|
+
const e = E("medium") && this.wide ? this._nextMonthYears : this._years, t = e[e.length - 1], a = t[t.length - 1], i = this._dateAdapter.createDate(a + 1, 1, 1);
|
|
323
|
+
return this._nextDisabled(i);
|
|
324
|
+
}
|
|
325
|
+
_handleTableBlur(e) {
|
|
326
|
+
(e == null ? void 0 : e.localName) !== "button" && this._setTabIndex();
|
|
327
|
+
}
|
|
328
|
+
_setTabIndex() {
|
|
329
|
+
Array.from(this.shadowRoot.querySelectorAll('.sbb-calendar__cell[tabindex="0"]') ?? []).forEach((t) => t.tabIndex = -1);
|
|
330
|
+
const e = this._getFirstFocusable();
|
|
331
|
+
e && (e.tabIndex = 0);
|
|
332
|
+
}
|
|
333
|
+
_getFirstFocusable() {
|
|
334
|
+
const e = this._selected ? this._dateAdapter.deserialize(this._selected) : this.now;
|
|
335
|
+
let t = this.shadowRoot.querySelector(".sbb-calendar__selected") ?? this.shadowRoot.querySelector(`[data-day="${this._dateAdapter.getDate(e)} ${this._dateAdapter.getMonth(e)} ${this._dateAdapter.getYear(e)}"]`) ?? this.shadowRoot.querySelector(`[data-month="${this._dateAdapter.getMonth(e)}"]`) ?? this.shadowRoot.querySelector(`[data-year="${this._dateAdapter.getYear(e)}"]`);
|
|
336
|
+
return (!t || t != null && t.disabled) && (t = this.shadowRoot.querySelector(".sbb-calendar__cell:not([disabled])")), t || null;
|
|
337
|
+
}
|
|
338
|
+
_handleKeyboardEvent(e, t) {
|
|
339
|
+
Ae(e) && e.preventDefault();
|
|
340
|
+
const a = this._cells, i = a.findIndex((d) => d === e.target), s = this._navigateByKeyboard(e, i, a, t), r = this.shadowRoot.activeElement;
|
|
341
|
+
s !== r && (s.tabIndex = 0, s == null || s.focus(), r.tabIndex = -1);
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Gets the index of the element to move to, based on a list of elements (which can be potentially disabled),
|
|
345
|
+
* the keyboard input and the position of the current element in the list.
|
|
346
|
+
* In the day view, the `day?: Day` parameter is mandatory for calculation,
|
|
347
|
+
* while in month and year view it's not due to the fixed amount of rendered cells.
|
|
348
|
+
*/
|
|
349
|
+
_navigateByKeyboard(e, t, a, i) {
|
|
350
|
+
const { elementIndexForWideMode: s, offsetForWideMode: r, lastElementIndexForWideMode: d, verticalOffset: _ } = this._calculateParametersForKeyboardNavigation(a, t, i);
|
|
351
|
+
switch (e.key) {
|
|
352
|
+
case "ArrowUp":
|
|
353
|
+
return this._findNext(a, t, -_);
|
|
354
|
+
case "ArrowDown":
|
|
355
|
+
return this._findNext(a, t, _);
|
|
356
|
+
case "ArrowLeft":
|
|
357
|
+
return this._findNext(a, t, -1);
|
|
358
|
+
case "ArrowRight":
|
|
359
|
+
return this._findNext(a, t, 1);
|
|
360
|
+
case "Home":
|
|
361
|
+
return this._findFirst(a, r);
|
|
362
|
+
case "PageUp":
|
|
363
|
+
return this._findFirstOnColumn(a, s, r, _);
|
|
364
|
+
case "PageDown":
|
|
365
|
+
return this._findLastOnColumn(a, t, d, _);
|
|
366
|
+
case "End":
|
|
367
|
+
return this._findLast(a, d - 1);
|
|
368
|
+
default:
|
|
369
|
+
return a[t];
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Calculates the parameter needed in keyboard navigation.
|
|
374
|
+
* Since three views are now available, the function creates and returns the correct parameters for each of them
|
|
375
|
+
* by considering the number of cells per each row and the correction for the wide mode.
|
|
376
|
+
* @param cells The array of rendered table cells; they are buttons that can represent days, months or years.
|
|
377
|
+
* @param index The starting element's index in the cell array.
|
|
378
|
+
* @param day (optional) Only in the day view, the day represented by the starting cell.
|
|
379
|
+
*/
|
|
380
|
+
_calculateParametersForKeyboardNavigation(e, t, a) {
|
|
381
|
+
switch (this._calendarView) {
|
|
382
|
+
case "day": {
|
|
383
|
+
const i = +a.dayValue - 1;
|
|
384
|
+
return {
|
|
385
|
+
verticalOffset: O,
|
|
386
|
+
elementIndexForWideMode: i,
|
|
387
|
+
offsetForWideMode: t - i,
|
|
388
|
+
lastElementIndexForWideMode: t === i ? this._dateAdapter.getNumDaysInMonth(this._dateAdapter.addCalendarMonths(this._dateAdapter.deserialize(a.value), -1)) : e.length
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
case "month":
|
|
392
|
+
return {
|
|
393
|
+
verticalOffset: I,
|
|
394
|
+
elementIndexForWideMode: t,
|
|
395
|
+
offsetForWideMode: 0,
|
|
396
|
+
lastElementIndexForWideMode: 12
|
|
397
|
+
};
|
|
398
|
+
case "year": {
|
|
399
|
+
const i = Math.trunc(t / b) * b, s = i === 0 ? t : t - b;
|
|
400
|
+
return {
|
|
401
|
+
verticalOffset: S,
|
|
402
|
+
elementIndexForWideMode: s,
|
|
403
|
+
offsetForWideMode: t - s,
|
|
404
|
+
lastElementIndexForWideMode: i === 0 ? b : b * 2
|
|
405
|
+
};
|
|
406
|
+
}
|
|
398
407
|
}
|
|
399
408
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
return o`
|
|
409
|
+
/**
|
|
410
|
+
* Gets the next element of the provided array starting from `index` by adding `delta`.
|
|
411
|
+
* If the found element is disabled, it continues adding `delta` until it finds an enabled one in the array bounds.
|
|
412
|
+
*/
|
|
413
|
+
_findNext(e, t, a) {
|
|
414
|
+
var s;
|
|
415
|
+
let i = t + a;
|
|
416
|
+
for (; i < e.length && ((s = e[i]) != null && s.disabled); )
|
|
417
|
+
i += a;
|
|
418
|
+
return e[i] ?? e[t];
|
|
419
|
+
}
|
|
420
|
+
/** Find the first enabled element in the provided array. */
|
|
421
|
+
_findFirst(e, t) {
|
|
422
|
+
return e[t].disabled ? this._findNext(e, t, 1) : e[t];
|
|
423
|
+
}
|
|
424
|
+
/** Find the last enabled element in the provided array. */
|
|
425
|
+
_findLast(e, t) {
|
|
426
|
+
return e[t].disabled ? this._findNext(e, t, -1) : e[t];
|
|
427
|
+
}
|
|
428
|
+
/** Find the first enabled element in the same column of the provided array. */
|
|
429
|
+
_findFirstOnColumn(e, t, a, i) {
|
|
430
|
+
const s = t % i + a;
|
|
431
|
+
return e[s].disabled ? this._findNext(e, s, i) : e[s];
|
|
432
|
+
}
|
|
433
|
+
/** Find the last enabled element in the same column of the provided array. */
|
|
434
|
+
_findLastOnColumn(e, t, a, i) {
|
|
435
|
+
const s = t + Math.trunc((a - t - 1) / i) * i;
|
|
436
|
+
return e[s].disabled ? this._findNext(e, s, -i) : e[s];
|
|
437
|
+
}
|
|
438
|
+
_resetCalendarView(e = !1) {
|
|
439
|
+
this._resetFocus = !0, this._activeDate = this.selected ?? this.now, this._setChosenYear(), this._chosenMonth = void 0, this._nextCalendarView = this._calendarView = this.view, e && this._startTableTransition();
|
|
440
|
+
}
|
|
441
|
+
/** Render the view for the day selection. */
|
|
442
|
+
_renderDayView() {
|
|
443
|
+
const e = this._wide ? this._dateAdapter.addCalendarMonths(this._activeDate, 1) : void 0;
|
|
444
|
+
return n`
|
|
437
445
|
<div class="sbb-calendar__controls">
|
|
438
|
-
${this._getArrow(
|
|
439
|
-
"left",
|
|
440
|
-
() => this._goToDifferentMonth(-1),
|
|
441
|
-
I[this._language.current],
|
|
442
|
-
this._previousMonthDisabled()
|
|
443
|
-
)}
|
|
446
|
+
${this._getArrow("left", () => this._goToDifferentMonth(-1), Ve[this._language.current], this._previousMonthDisabled())}
|
|
444
447
|
<div class="sbb-calendar__controls-month">
|
|
445
448
|
${this._createLabelForDayView(this._activeDate)}
|
|
446
|
-
${this._wide ? this._createLabelForDayView(e) :
|
|
449
|
+
${this._wide ? this._createLabelForDayView(e) : g}
|
|
447
450
|
<sbb-screen-reader-only role="status">
|
|
448
451
|
${this._createAriaLabelForDayView(this._activeDate, e)}
|
|
449
452
|
</sbb-screen-reader-only>
|
|
450
453
|
</div>
|
|
451
|
-
${this._getArrow(
|
|
452
|
-
"right",
|
|
453
|
-
() => this._goToDifferentMonth(1),
|
|
454
|
-
O[this._language.current],
|
|
455
|
-
this._nextMonthDisabled()
|
|
456
|
-
)}
|
|
454
|
+
${this._getArrow("right", () => this._goToDifferentMonth(1), ze[this._language.current], this._nextMonthDisabled())}
|
|
457
455
|
</div>
|
|
458
456
|
<div class="sbb-calendar__table-container sbb-calendar__table-day-view">
|
|
459
457
|
${this._createDayTable(this._weeks)}
|
|
460
|
-
${this._wide ? this._createDayTable(this._nextMonthWeeks) :
|
|
458
|
+
${this._wide ? this._createDayTable(this._nextMonthWeeks) : g}
|
|
461
459
|
</div>
|
|
462
460
|
`;
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
461
|
+
}
|
|
462
|
+
/** Creates the label with the month for the daily view. */
|
|
463
|
+
_createLabelForDayView(e) {
|
|
464
|
+
const t = `${this._monthNames[this._dateAdapter.getMonth(e) - 1]} ${this._dateAdapter.getYear(e)}`;
|
|
465
|
+
return n`
|
|
468
466
|
<button
|
|
469
467
|
type="button"
|
|
470
468
|
id="sbb-calendar__date-selection"
|
|
471
469
|
class="sbb-calendar__controls-change-date"
|
|
472
|
-
aria-label="${
|
|
470
|
+
aria-label="${Fe[this._language.current]} ${t}"
|
|
473
471
|
@click=${() => {
|
|
474
|
-
|
|
475
|
-
|
|
472
|
+
this._resetFocus = !0, this._nextCalendarView = "year", this._startTableTransition();
|
|
473
|
+
}}
|
|
476
474
|
>
|
|
477
475
|
${t}
|
|
478
476
|
<sbb-icon name="chevron-small-down-small"></sbb-icon>
|
|
479
477
|
</button>
|
|
480
478
|
`;
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
479
|
+
}
|
|
480
|
+
/** Creates the aria-label for the daily view. */
|
|
481
|
+
_createAriaLabelForDayView(...e) {
|
|
482
|
+
let t = "";
|
|
483
|
+
for (const a of e)
|
|
484
|
+
a && (t += `${this._monthNames[this._dateAdapter.getMonth(a) - 1]} ${this._dateAdapter.getYear(a)} `);
|
|
485
|
+
return t;
|
|
486
|
+
}
|
|
487
|
+
/** Creates the calendar table for the daily view. */
|
|
488
|
+
_createDayTable(e) {
|
|
489
|
+
return n`
|
|
492
490
|
<table
|
|
493
491
|
class="sbb-calendar__table"
|
|
494
492
|
@focusout=${(t) => this._handleTableBlur(t.relatedTarget)}
|
|
@@ -504,343 +502,291 @@ let l = class extends B(M) {
|
|
|
504
502
|
</tbody>
|
|
505
503
|
</table>
|
|
506
504
|
`;
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
(e) => o`
|
|
505
|
+
}
|
|
506
|
+
/** Creates the table header with the month header cells. */
|
|
507
|
+
_createDayTableHeader() {
|
|
508
|
+
return this._weekdays.map((e) => n`
|
|
512
509
|
<th class="sbb-calendar__table-header">
|
|
513
510
|
<sbb-screen-reader-only>${e.long}</sbb-screen-reader-only>
|
|
514
511
|
<span aria-hidden="true">${e.narrow}</span>
|
|
515
512
|
</th>
|
|
516
|
-
`
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
return r === 0 && s ? o`
|
|
513
|
+
`);
|
|
514
|
+
}
|
|
515
|
+
/** Creates the table body with the day cells. For the first row, it also considers the possible day's offset. */
|
|
516
|
+
_createDayTableBody(e) {
|
|
517
|
+
const t = this._dateAdapter.toIso8601(this.now);
|
|
518
|
+
return e.map((a, i) => {
|
|
519
|
+
const s = O - a.length;
|
|
520
|
+
return i === 0 && s ? n`
|
|
525
521
|
<tr>
|
|
526
|
-
${[...Array(s).keys()].map(
|
|
527
|
-
() => o`<td
|
|
522
|
+
${[...Array(s).keys()].map(() => n`<td
|
|
528
523
|
class="sbb-calendar__table-data"
|
|
529
524
|
data-day=${`0 ${a[0].monthValue} ${a[0].yearValue}`}
|
|
530
|
-
></td>`
|
|
531
|
-
)}
|
|
525
|
+
></td>`)}
|
|
532
526
|
${this._createDayCells(a, t)}
|
|
533
527
|
</tr>
|
|
534
|
-
` :
|
|
528
|
+
` : n`<tr>
|
|
535
529
|
${this._createDayCells(a, t)}
|
|
536
530
|
</tr>`;
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
/** Creates the cells for the daily view. */
|
|
534
|
+
_createDayCells(e, t) {
|
|
535
|
+
return e.map((a) => {
|
|
536
|
+
const i = !this._isDayInRange(a.value), s = !this._dateFilter(this._dateAdapter.deserialize(a.value)), r = !!this._selected && a.value === this._selected, d = `${a.dayValue} ${a.monthValue} ${a.yearValue}`, _ = a.value === t;
|
|
537
|
+
return n`
|
|
544
538
|
<td
|
|
545
|
-
class=${
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
539
|
+
class=${R({
|
|
540
|
+
"sbb-calendar__table-data": !0,
|
|
541
|
+
"sbb-calendar__table-data-selected": r
|
|
542
|
+
})}
|
|
549
543
|
>
|
|
550
544
|
<button
|
|
551
|
-
class=${
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
545
|
+
class=${R({
|
|
546
|
+
"sbb-calendar__cell": !0,
|
|
547
|
+
"sbb-calendar__day": !0,
|
|
548
|
+
"sbb-calendar__cell-current": _,
|
|
549
|
+
"sbb-calendar__selected": r,
|
|
550
|
+
"sbb-calendar__crossed-out": !i && s
|
|
551
|
+
})}
|
|
558
552
|
@click=${() => this._selectDate(a.value)}
|
|
559
|
-
?disabled=${
|
|
553
|
+
?disabled=${i || s}
|
|
560
554
|
aria-label=${this._dateAdapter.getAccessibilityFormatDate(a.value)}
|
|
561
|
-
aria-pressed=${
|
|
562
|
-
aria-disabled=${
|
|
563
|
-
aria-current=${
|
|
564
|
-
data-day=${
|
|
555
|
+
aria-pressed=${r}
|
|
556
|
+
aria-disabled=${i || s}
|
|
557
|
+
aria-current=${_ ? "date" : g}
|
|
558
|
+
data-day=${d || g}
|
|
565
559
|
tabindex="-1"
|
|
566
|
-
@keydown=${(
|
|
560
|
+
@keydown=${(z) => this._handleKeyboardEvent(z, a)}
|
|
567
561
|
sbb-popover-close
|
|
568
562
|
>
|
|
569
563
|
${a.dayValue}
|
|
570
564
|
</button>
|
|
571
565
|
</td>
|
|
572
566
|
`;
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
/** Render the view for the month selection. */
|
|
570
|
+
_renderMonthView() {
|
|
571
|
+
return n`
|
|
578
572
|
<div class="sbb-calendar__controls">
|
|
579
|
-
${this._getArrow(
|
|
580
|
-
"left",
|
|
581
|
-
() => this._goToDifferentYear(-1),
|
|
582
|
-
W[this._language.current],
|
|
583
|
-
this._previousYearDisabled()
|
|
584
|
-
)}
|
|
573
|
+
${this._getArrow("left", () => this._goToDifferentYear(-1), Re[this._language.current], this._previousYearDisabled())}
|
|
585
574
|
<div class="sbb-calendar__controls-month">${this._createLabelForMonthView()}</div>
|
|
586
|
-
${this._getArrow(
|
|
587
|
-
"right",
|
|
588
|
-
() => this._goToDifferentYear(1),
|
|
589
|
-
E[this._language.current],
|
|
590
|
-
this._nextYearDisabled()
|
|
591
|
-
)}
|
|
575
|
+
${this._getArrow("right", () => this._goToDifferentYear(1), Ie[this._language.current], this._nextYearDisabled())}
|
|
592
576
|
</div>
|
|
593
577
|
<div class="sbb-calendar__table-container sbb-calendar__table-month-view">
|
|
594
578
|
${this._createMonthTable(this._months, this._chosenYear)}
|
|
595
|
-
${this._wide ? this._createMonthTable(this._months, this._chosenYear + 1, !0) :
|
|
579
|
+
${this._wide ? this._createMonthTable(this._months, this._chosenYear + 1, !0) : g}
|
|
596
580
|
</div>
|
|
597
581
|
`;
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
582
|
+
}
|
|
583
|
+
/** Creates the label with the year for the monthly view. */
|
|
584
|
+
_createLabelForMonthView() {
|
|
585
|
+
return n` <button
|
|
602
586
|
type="button"
|
|
603
587
|
id="sbb-calendar__month-selection"
|
|
604
588
|
class="sbb-calendar__controls-change-date"
|
|
605
|
-
aria-label=${`${
|
|
589
|
+
aria-label=${`${fe[this._language.current]} ${this._chosenYear}`}
|
|
606
590
|
@click=${() => this._resetCalendarView(!0)}
|
|
607
591
|
>
|
|
608
|
-
${this._chosenYear} ${this._wide ? ` - ${this._chosenYear + 1}` :
|
|
592
|
+
${this._chosenYear} ${this._wide ? ` - ${this._chosenYear + 1}` : g}
|
|
609
593
|
<sbb-icon name="chevron-small-up-small"></sbb-icon>
|
|
610
594
|
</button>
|
|
611
595
|
<sbb-screen-reader-only role="status"> ${this._chosenYear} </sbb-screen-reader-only>`;
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
596
|
+
}
|
|
597
|
+
/** Creates the table for the month selection view. */
|
|
598
|
+
_createMonthTable(e, t, a = !1) {
|
|
599
|
+
return n`
|
|
616
600
|
<table
|
|
617
601
|
class="sbb-calendar__table"
|
|
618
|
-
@animationend=${(
|
|
602
|
+
@animationend=${(i) => this._tableAnimationEnd(i)}
|
|
619
603
|
>
|
|
620
|
-
${this._wide ?
|
|
604
|
+
${this._wide ? n`<thead class="sbb-calendar__table-header" aria-hidden="true">
|
|
621
605
|
<tr class="sbb-calendar__table-header-row">
|
|
622
|
-
<th class="sbb-calendar__table-header" colspan=${
|
|
606
|
+
<th class="sbb-calendar__table-header" colspan=${I}>${t}</th>
|
|
623
607
|
</tr>
|
|
624
|
-
</thead>` :
|
|
608
|
+
</thead>` : g}
|
|
625
609
|
<tbody class="sbb-calendar__table-body">
|
|
626
|
-
${e.map(
|
|
627
|
-
(r) => o`
|
|
610
|
+
${e.map((i) => n`
|
|
628
611
|
<tr>
|
|
629
|
-
${
|
|
630
|
-
const
|
|
631
|
-
return
|
|
632
|
-
class=${
|
|
612
|
+
${i.map((s) => {
|
|
613
|
+
const r = !this._isMonthInRange(s.monthValue), d = !this._isMonthFilteredOut(s.monthValue), _ = this._selected ? this._dateAdapter.getMonth(this._dateAdapter.deserialize(this._selected)) : void 0, z = this._selected ? this._dateAdapter.getYear(this._dateAdapter.deserialize(this._selected)) : void 0, C = !!this._selected && t === z && s.monthValue === _, N = t === this._dateAdapter.getYear(this.now) && this._dateAdapter.getMonth(this.now) === s.monthValue;
|
|
614
|
+
return n` <td
|
|
615
|
+
class=${R({
|
|
633
616
|
"sbb-calendar__table-data": !0,
|
|
634
617
|
"sbb-calendar__table-month": !0
|
|
635
618
|
})}
|
|
636
619
|
>
|
|
637
620
|
<button
|
|
638
|
-
class=${
|
|
621
|
+
class=${R({
|
|
639
622
|
"sbb-calendar__cell": !0,
|
|
640
623
|
"sbb-calendar__pill": !0,
|
|
641
|
-
"sbb-calendar__cell-current":
|
|
642
|
-
"sbb-calendar__crossed-out": !
|
|
643
|
-
"sbb-calendar__selected":
|
|
624
|
+
"sbb-calendar__cell-current": N,
|
|
625
|
+
"sbb-calendar__crossed-out": !r && d,
|
|
626
|
+
"sbb-calendar__selected": C
|
|
644
627
|
})}
|
|
645
628
|
@click=${() => this._onMonthSelection(s.monthValue, t, a)}
|
|
646
|
-
?disabled=${
|
|
629
|
+
?disabled=${r || d}
|
|
647
630
|
aria-label=${`${s.longValue} ${this._chosenYear}`}
|
|
648
|
-
aria-pressed=${
|
|
649
|
-
aria-disabled=${String(
|
|
631
|
+
aria-pressed=${C}
|
|
632
|
+
aria-disabled=${String(r || d)}
|
|
650
633
|
tabindex="-1"
|
|
651
|
-
data-month=${s.monthValue ||
|
|
652
|
-
@keydown=${(
|
|
634
|
+
data-month=${s.monthValue || g}
|
|
635
|
+
@keydown=${(ge) => this._handleKeyboardEvent(ge)}
|
|
653
636
|
>
|
|
654
637
|
${s.value}
|
|
655
638
|
</button>
|
|
656
639
|
</td>`;
|
|
657
640
|
})}
|
|
658
641
|
</tr>
|
|
659
|
-
`
|
|
660
|
-
)}
|
|
642
|
+
`)}
|
|
661
643
|
</tbody>
|
|
662
644
|
</table>
|
|
663
645
|
`;
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
)
|
|
673
|
-
), this._startTableTransition();
|
|
674
|
-
}
|
|
675
|
-
/** Render the view for the year selection. */
|
|
676
|
-
_renderYearView() {
|
|
677
|
-
return o`
|
|
646
|
+
}
|
|
647
|
+
/** Select the month and change the view to day selection. */
|
|
648
|
+
_onMonthSelection(e, t, a) {
|
|
649
|
+
this._chosenMonth = a ? e + 1 : e, this._nextCalendarView = "day", this._init(this._dateAdapter.createDate(t, this._chosenMonth, this._dateAdapter.getDate(this._activeDate))), this._startTableTransition();
|
|
650
|
+
}
|
|
651
|
+
/** Render the view for the year selection. */
|
|
652
|
+
_renderYearView() {
|
|
653
|
+
return n`
|
|
678
654
|
<div class="sbb-calendar__controls">
|
|
679
|
-
${this._getArrow(
|
|
680
|
-
"left",
|
|
681
|
-
() => this._goToDifferentYearRange(-d),
|
|
682
|
-
L(d)[this._language.current],
|
|
683
|
-
this._previousYearRangeDisabled()
|
|
684
|
-
)}
|
|
655
|
+
${this._getArrow("left", () => this._goToDifferentYearRange(-b), Ce(b)[this._language.current], this._previousYearRangeDisabled())}
|
|
685
656
|
<div class="sbb-calendar__controls-month">${this._createLabelForYearView()}</div>
|
|
686
|
-
${this._getArrow(
|
|
687
|
-
"right",
|
|
688
|
-
() => this._goToDifferentYearRange(d),
|
|
689
|
-
P(d)[this._language.current],
|
|
690
|
-
this._nextYearRangeDisabled()
|
|
691
|
-
)}
|
|
657
|
+
${this._getArrow("right", () => this._goToDifferentYearRange(b), Se(b)[this._language.current], this._nextYearRangeDisabled())}
|
|
692
658
|
</div>
|
|
693
659
|
<div class="sbb-calendar__table-container sbb-calendar__table-year-view">
|
|
694
660
|
${this._createYearTable(this._years)}
|
|
695
|
-
${this._wide ? this._createYearTable(this._nextMonthYears, !0) :
|
|
661
|
+
${this._wide ? this._createYearTable(this._nextMonthYears, !0) : g}
|
|
696
662
|
</div>
|
|
697
663
|
`;
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
664
|
+
}
|
|
665
|
+
/** Creates the button arrow for all the views. */
|
|
666
|
+
_getArrow(e, t, a, i) {
|
|
667
|
+
return n`<sbb-secondary-button
|
|
702
668
|
size="m"
|
|
703
669
|
icon-name="chevron-small-${e}-small"
|
|
704
670
|
aria-label=${a}
|
|
705
671
|
@click=${t}
|
|
706
|
-
?disabled=${
|
|
672
|
+
?disabled=${i}
|
|
707
673
|
id="sbb-calendar__controls-${e === "left" ? "previous" : "next"}"
|
|
708
674
|
></sbb-secondary-button>`;
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
675
|
+
}
|
|
676
|
+
/** Creates the label with the year range for the yearly view. */
|
|
677
|
+
_createLabelForYearView() {
|
|
678
|
+
const e = this._years.flat()[0], t = (E("medium") && this.wide ? this._nextMonthYears : this._years).flat(), a = t[t.length - 1], i = `${e} - ${a}`;
|
|
679
|
+
return n`
|
|
714
680
|
<button
|
|
715
681
|
type="button"
|
|
716
682
|
id="sbb-calendar__year-selection"
|
|
717
683
|
class="sbb-calendar__controls-change-date"
|
|
718
|
-
aria-label="${
|
|
684
|
+
aria-label="${fe[this._language.current]} ${i}"
|
|
719
685
|
@click=${() => this._resetCalendarView(!0)}
|
|
720
686
|
>
|
|
721
|
-
${
|
|
687
|
+
${i}
|
|
722
688
|
<sbb-icon name="chevron-small-up-small"></sbb-icon>
|
|
723
689
|
</button>
|
|
724
|
-
<sbb-screen-reader-only role="status"> ${
|
|
690
|
+
<sbb-screen-reader-only role="status"> ${i} </sbb-screen-reader-only>
|
|
725
691
|
`;
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
692
|
+
}
|
|
693
|
+
/** Creates the table for the year selection view. */
|
|
694
|
+
_createYearTable(e, t = !1) {
|
|
695
|
+
const a = this.now;
|
|
696
|
+
return n` <table
|
|
731
697
|
class="sbb-calendar__table"
|
|
732
|
-
@animationend=${(
|
|
698
|
+
@animationend=${(i) => this._tableAnimationEnd(i)}
|
|
733
699
|
>
|
|
734
700
|
<tbody class="sbb-calendar__table-body">
|
|
735
|
-
${e.map(
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
return o` <td class="sbb-calendar__table-data sbb-calendar__table-year">
|
|
701
|
+
${e.map((i) => n` <tr>
|
|
702
|
+
${i.map((s) => {
|
|
703
|
+
const r = !this._isYearInRange(s), d = !this._isYearFilteredOut(s), _ = this._selected ? this._dateAdapter.getYear(this._dateAdapter.deserialize(this._selected)) : void 0, z = !!this._selected && s === _, C = this._dateAdapter.getYear(a) === s;
|
|
704
|
+
return n` <td class="sbb-calendar__table-data sbb-calendar__table-year">
|
|
740
705
|
<button
|
|
741
|
-
class=${
|
|
706
|
+
class=${R({
|
|
742
707
|
"sbb-calendar__cell": !0,
|
|
743
708
|
"sbb-calendar__pill": !0,
|
|
744
|
-
"sbb-calendar__cell-current":
|
|
745
|
-
"sbb-calendar__crossed-out": !
|
|
746
|
-
"sbb-calendar__selected":
|
|
709
|
+
"sbb-calendar__cell-current": C,
|
|
710
|
+
"sbb-calendar__crossed-out": !r && d,
|
|
711
|
+
"sbb-calendar__selected": z
|
|
747
712
|
})}
|
|
748
713
|
@click=${() => this._onYearSelection(s, t)}
|
|
749
|
-
?disabled=${
|
|
714
|
+
?disabled=${r || d}
|
|
750
715
|
aria-label=${s}
|
|
751
|
-
aria-pressed=${
|
|
752
|
-
aria-disabled=${String(
|
|
716
|
+
aria-pressed=${z}
|
|
717
|
+
aria-disabled=${String(r || d)}
|
|
753
718
|
tabindex="-1"
|
|
754
|
-
data-year=${s ||
|
|
755
|
-
@keydown=${(
|
|
719
|
+
data-year=${s || g}
|
|
720
|
+
@keydown=${(N) => this._handleKeyboardEvent(N)}
|
|
756
721
|
>
|
|
757
722
|
${s}
|
|
758
723
|
</button>
|
|
759
724
|
</td>`;
|
|
760
725
|
})}
|
|
761
|
-
</tr>`
|
|
762
|
-
)}
|
|
726
|
+
</tr>`)}
|
|
763
727
|
</tbody>
|
|
764
728
|
</table>`;
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
)
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
l
|
|
803
|
-
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
b([
|
|
827
|
-
f()
|
|
828
|
-
], l.prototype, "_activeDate", 2);
|
|
829
|
-
b([
|
|
830
|
-
f()
|
|
831
|
-
], l.prototype, "_selected", 2);
|
|
832
|
-
b([
|
|
833
|
-
f()
|
|
834
|
-
], l.prototype, "_wide", 1);
|
|
835
|
-
b([
|
|
836
|
-
f()
|
|
837
|
-
], l.prototype, "_calendarView", 2);
|
|
838
|
-
b([
|
|
839
|
-
f()
|
|
840
|
-
], l.prototype, "_initialized", 2);
|
|
841
|
-
l = b([
|
|
842
|
-
V("sbb-calendar")
|
|
843
|
-
], l);
|
|
729
|
+
}
|
|
730
|
+
/** Select the year and change the view to month selection. */
|
|
731
|
+
_onYearSelection(e, t) {
|
|
732
|
+
this._chosenYear = t ? e - 1 : e, this._nextCalendarView = "month", this._assignActiveDate(this._dateAdapter.createDate(this._chosenYear, this._dateAdapter.getMonth(this._activeDate), this._dateAdapter.getDate(this._activeDate))), this._startTableTransition();
|
|
733
|
+
}
|
|
734
|
+
_getView() {
|
|
735
|
+
if (me || this.hydrationRequired)
|
|
736
|
+
return n`${g}`;
|
|
737
|
+
switch (this._calendarView) {
|
|
738
|
+
case "year":
|
|
739
|
+
return this._renderYearView();
|
|
740
|
+
case "month":
|
|
741
|
+
return this._renderMonthView();
|
|
742
|
+
case "day":
|
|
743
|
+
default:
|
|
744
|
+
return this._renderDayView();
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
_tableAnimationEnd(e) {
|
|
748
|
+
const t = e.target;
|
|
749
|
+
e.animationName === "hide" ? (t.classList.remove("sbb-calendar__table-hide"), this._resetFocus = !0, this._calendarView = this._nextCalendarView) : e.animationName === "show" && this.removeAttribute("data-transition");
|
|
750
|
+
}
|
|
751
|
+
_startTableTransition() {
|
|
752
|
+
var e, t;
|
|
753
|
+
this.toggleAttribute("data-transition", !0), (t = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("table")) == null || t.forEach((a) => a.classList.toggle("sbb-calendar__table-hide"));
|
|
754
|
+
}
|
|
755
|
+
render() {
|
|
756
|
+
return n`<div class="sbb-calendar__wrapper">${this._getView()}</div>`;
|
|
757
|
+
}
|
|
758
|
+
}, x = new WeakMap(), D = new WeakMap(), Y = new WeakMap(), $ = new WeakMap(), M = new WeakMap(), k = new WeakMap(), V = new WeakMap(), p = l, (() => {
|
|
759
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(W[Symbol.metadata] ?? null) : void 0;
|
|
760
|
+
L = [Me(), y({ type: Boolean })], q = [y()], U = [y()], j = [y()], G = [y()], J = [y()], Q = [y({ attribute: "date-filter" })], ee = [F()], se = [F()], ne = [F()], le = [F()], ce = [F()], f(l, null, L, { kind: "accessor", name: "wide", static: !1, private: !1, access: { has: (t) => "wide" in t, get: (t) => t.wide, set: (t, a) => {
|
|
761
|
+
t.wide = a;
|
|
762
|
+
} }, metadata: e }, P, B), f(l, null, q, { kind: "accessor", name: "view", static: !1, private: !1, access: { has: (t) => "view" in t, get: (t) => t.view, set: (t, a) => {
|
|
763
|
+
t.view = a;
|
|
764
|
+
} }, metadata: e }, K, H), f(l, null, U, { kind: "setter", name: "min", static: !1, private: !1, access: { has: (t) => "min" in t, set: (t, a) => {
|
|
765
|
+
t.min = a;
|
|
766
|
+
} }, metadata: e }, null, A), f(l, null, j, { kind: "setter", name: "max", static: !1, private: !1, access: { has: (t) => "max" in t, set: (t, a) => {
|
|
767
|
+
t.max = a;
|
|
768
|
+
} }, metadata: e }, null, A), f(l, null, G, { kind: "setter", name: "now", static: !1, private: !1, access: { has: (t) => "now" in t, set: (t, a) => {
|
|
769
|
+
t.now = a;
|
|
770
|
+
} }, metadata: e }, null, A), f(l, null, J, { kind: "setter", name: "selected", static: !1, private: !1, access: { has: (t) => "selected" in t, set: (t, a) => {
|
|
771
|
+
t.selected = a;
|
|
772
|
+
} }, metadata: e }, null, A), f(l, null, Q, { kind: "accessor", name: "dateFilter", static: !1, private: !1, access: { has: (t) => "dateFilter" in t, get: (t) => t.dateFilter, set: (t, a) => {
|
|
773
|
+
t.dateFilter = a;
|
|
774
|
+
} }, metadata: e }, X, Z), f(l, null, ee, { kind: "accessor", name: "_activeDate", static: !1, private: !1, access: { has: (t) => "_activeDate" in t, get: (t) => t._activeDate, set: (t, a) => {
|
|
775
|
+
t._activeDate = a;
|
|
776
|
+
} }, metadata: e }, te, ae), f(l, null, se, { kind: "accessor", name: "_selected", static: !1, private: !1, access: { has: (t) => "_selected" in t, get: (t) => t._selected, set: (t, a) => {
|
|
777
|
+
t._selected = a;
|
|
778
|
+
} }, metadata: e }, ie, re), f(l, null, ne, { kind: "setter", name: "_wide", static: !1, private: !1, access: { has: (t) => "_wide" in t, set: (t, a) => {
|
|
779
|
+
t._wide = a;
|
|
780
|
+
} }, metadata: e }, null, A), f(l, null, le, { kind: "accessor", name: "_calendarView", static: !1, private: !1, access: { has: (t) => "_calendarView" in t, get: (t) => t._calendarView, set: (t, a) => {
|
|
781
|
+
t._calendarView = a;
|
|
782
|
+
} }, metadata: e }, de, oe), f(l, null, ce, { kind: "accessor", name: "_initialized", static: !1, private: !1, access: { has: (t) => "_initialized" in t, get: (t) => t._initialized, set: (t, a) => {
|
|
783
|
+
t._initialized = a;
|
|
784
|
+
} }, metadata: e }, be, he), f(null, h = { value: p }, o, { kind: "class", name: p.name, metadata: e }, null, m), T = p = h.value, e && Object.defineProperty(p, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
785
|
+
})(), l.styles = Ne, l.events = {
|
|
786
|
+
dateSelected: "dateSelected"
|
|
787
|
+
}, c(p, m), l);
|
|
788
|
+
return T = p;
|
|
789
|
+
})();
|
|
844
790
|
export {
|
|
845
|
-
|
|
791
|
+
at as SbbCalendarElement
|
|
846
792
|
};
|