@sbb-esta/lyne-elements 1.2.1 → 1.4.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/autocomplete/autocomplete-base-element.d.ts +93 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -0
- package/autocomplete/autocomplete.d.ts +13 -86
- package/autocomplete/autocomplete.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts +45 -0
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +33 -0
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-button.d.ts +2 -0
- package/autocomplete-grid/autocomplete-grid-button.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-button.js +66 -0
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.d.ts +17 -0
- package/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-cell.d.ts +2 -0
- package/autocomplete-grid/autocomplete-grid-cell.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-cell.js +28 -0
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts +21 -0
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-optgroup/index.d.ts +2 -0
- package/autocomplete-grid/autocomplete-grid-optgroup/index.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-optgroup.d.ts +2 -0
- package/autocomplete-grid/autocomplete-grid-optgroup.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-optgroup.js +37 -0
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +40 -0
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-option.d.ts +2 -0
- package/autocomplete-grid/autocomplete-grid-option.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-option.js +67 -0
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.d.ts +18 -0
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-row.d.ts +2 -0
- package/autocomplete-grid/autocomplete-grid-row.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid-row.js +31 -0
- package/autocomplete-grid/autocomplete-grid.d.ts +2 -0
- package/autocomplete-grid/autocomplete-grid.d.ts.map +1 -0
- package/autocomplete-grid/autocomplete-grid.js +139 -0
- package/autocomplete-grid.d.ts +7 -0
- package/autocomplete-grid.d.ts.map +1 -0
- package/autocomplete-grid.js +6 -0
- package/autocomplete.d.ts +1 -0
- package/autocomplete.d.ts.map +1 -1
- package/autocomplete.js +162 -145
- package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/button/common/button-common.d.ts.map +1 -1
- package/button/common.js +20 -20
- package/button/mini-button/mini-button-base-element.d.ts +9 -0
- package/button/mini-button/mini-button-base-element.d.ts.map +1 -0
- package/button/mini-button/mini-button.d.ts +3 -5
- package/button/mini-button/mini-button.d.ts.map +1 -1
- package/button/mini-button.d.ts +1 -0
- package/button/mini-button.d.ts.map +1 -1
- package/button/mini-button.js +27 -19
- package/calendar/calendar.d.ts.map +1 -1
- package/calendar.js +22 -20
- package/checkbox/checkbox/checkbox.d.ts +0 -1
- package/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts +0 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/checkbox/checkbox-group.js +5 -3
- package/checkbox/checkbox-panel/checkbox-panel.d.ts +0 -1
- package/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/checkbox/checkbox-panel.js +12 -11
- package/checkbox/checkbox.js +20 -19
- package/checkbox/common.js +13 -13
- package/container/container.js +3 -3
- package/core/datetime/date-adapter.d.ts +23 -13
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.d.ts +0 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime.js +23 -23
- package/core/decorators/host-attributes.d.ts +1 -1
- package/core/decorators/slot-state.d.ts +18 -0
- package/core/decorators/slot-state.d.ts.map +1 -0
- package/core/decorators.d.ts +1 -0
- package/core/decorators.d.ts.map +1 -1
- package/core/decorators.js +15 -9
- package/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/core/mixins.js +3 -1
- package/core/overlay/overlay-trigger-attributes.d.ts +1 -1
- package/core/overlay/overlay-trigger-attributes.d.ts.map +1 -1
- package/core/overlay.js +2 -2
- package/core/styles/core.scss +1 -0
- package/core/styles/mixins/buttons.scss +28 -56
- package/core/styles/mixins/helpers.scss +1 -0
- package/core/styles/mixins/pearl-chain-bullet.scss +1 -1
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +1 -0
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +2 -1
- package/core.css +3 -1
- package/custom-elements.json +13640 -8731
- package/datepicker/common/datepicker-button.d.ts +5 -5
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.js +21 -20
- package/datepicker/datepicker/datepicker.d.ts +55 -38
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.d.ts +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.d.ts.map +1 -1
- package/datepicker/datepicker-next-day.js +18 -18
- package/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts.map +1 -1
- package/datepicker/datepicker-previous-day.js +14 -14
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +25 -23
- package/datepicker/datepicker.js +147 -181
- package/development/autocomplete/autocomplete-base-element.d.ts +93 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -0
- package/development/autocomplete/autocomplete.d.ts +13 -86
- package/development/autocomplete/autocomplete.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts +45 -0
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +33 -0
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-button.d.ts +2 -0
- package/development/autocomplete-grid/autocomplete-grid-button.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-button.js +224 -0
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.d.ts +17 -0
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-cell.d.ts +2 -0
- package/development/autocomplete-grid/autocomplete-grid-cell.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-cell.js +67 -0
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts +21 -0
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-optgroup/index.d.ts +2 -0
- package/development/autocomplete-grid/autocomplete-grid-optgroup/index.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts +2 -0
- package/development/autocomplete-grid/autocomplete-grid-optgroup.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-optgroup.js +45 -0
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts +40 -0
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-option.d.ts +2 -0
- package/development/autocomplete-grid/autocomplete-grid-option.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-option.js +174 -0
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.d.ts +18 -0
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-row.d.ts +2 -0
- package/development/autocomplete-grid/autocomplete-grid-row.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid-row.js +143 -0
- package/development/autocomplete-grid/autocomplete-grid.d.ts +2 -0
- package/development/autocomplete-grid/autocomplete-grid.d.ts.map +1 -0
- package/development/autocomplete-grid/autocomplete-grid.js +185 -0
- package/development/autocomplete-grid.d.ts +7 -0
- package/development/autocomplete-grid.d.ts.map +1 -0
- package/development/autocomplete-grid.js +7 -0
- package/development/autocomplete.d.ts +1 -0
- package/development/autocomplete.d.ts.map +1 -1
- package/development/autocomplete.js +168 -143
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/development/breadcrumb/breadcrumb-group.js +1 -1
- package/development/button/common/button-common.d.ts.map +1 -1
- package/development/button/common.js +30 -25
- package/development/button/mini-button/mini-button-base-element.d.ts +9 -0
- package/development/button/mini-button/mini-button-base-element.d.ts.map +1 -0
- package/development/button/mini-button/mini-button.d.ts +3 -5
- package/development/button/mini-button/mini-button.d.ts.map +1 -1
- package/development/button/mini-button.d.ts +1 -0
- package/development/button/mini-button.d.ts.map +1 -1
- package/development/button/mini-button.js +45 -67
- package/development/calendar/calendar.d.ts.map +1 -1
- package/development/calendar.js +4 -2
- package/development/checkbox/checkbox/checkbox.d.ts +0 -1
- package/development/checkbox/checkbox/checkbox.d.ts.map +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts +0 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/development/checkbox/checkbox-group.js +6 -5
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts +0 -1
- package/development/checkbox/checkbox-panel/checkbox-panel.d.ts.map +1 -1
- package/development/checkbox/checkbox-panel.js +5 -5
- package/development/checkbox/checkbox.js +11 -5
- package/development/checkbox/common.js +1 -3
- package/development/container/container.js +2 -1
- package/development/core/datetime/date-adapter.d.ts +23 -13
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.d.ts +0 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime.js +28 -26
- package/development/core/decorators/host-attributes.d.ts +1 -1
- package/development/core/decorators/slot-state.d.ts +18 -0
- package/development/core/decorators/slot-state.d.ts.map +1 -0
- package/development/core/decorators.d.ts +1 -0
- package/development/core/decorators.d.ts.map +1 -1
- package/development/core/decorators.js +11 -2
- package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +4 -2
- package/development/core/overlay/overlay-trigger-attributes.d.ts +1 -1
- package/development/core/overlay/overlay-trigger-attributes.d.ts.map +1 -1
- package/development/core/overlay.js +3 -3
- package/development/datepicker/common/datepicker-button.d.ts +5 -5
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.js +10 -9
- package/development/datepicker/datepicker/datepicker.d.ts +55 -38
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day/datepicker-next-day.d.ts +1 -1
- package/development/datepicker/datepicker-next-day/datepicker-next-day.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day.js +21 -60
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts +1 -1
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.d.ts.map +1 -1
- package/development/datepicker/datepicker-previous-day.js +21 -60
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +16 -10
- package/development/datepicker/datepicker.js +134 -159
- package/development/dialog/dialog.js +1 -1
- package/development/file-selector/file-selector.d.ts +0 -1
- package/development/file-selector/file-selector.d.ts.map +1 -1
- package/development/file-selector.js +6 -5
- package/development/form-field/form-field/form-field.d.ts +1 -2
- 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 +22 -57
- package/development/form-field/form-field.js +10 -9
- package/development/icon/icon-base.d.ts.map +1 -1
- package/development/icon/icon.d.ts.map +1 -1
- package/development/icon.js +1 -1
- package/development/image/image.d.ts +1 -0
- package/development/image/image.d.ts.map +1 -1
- package/development/image.js +10 -4
- package/development/link/common/link-common.d.ts.map +1 -1
- package/development/link/common.js +6 -7
- package/development/link-list/link-list.d.ts +0 -1
- package/development/link-list/link-list.d.ts.map +1 -1
- package/development/link-list.js +5 -5
- package/development/map-container.js +15 -14
- package/development/navigation/navigation-list/navigation-list.d.ts +0 -1
- package/development/navigation/navigation-list/navigation-list.d.ts.map +1 -1
- package/development/navigation/navigation-list.js +5 -5
- package/development/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/development/navigation/navigation-marker.js +1 -1
- package/development/navigation/navigation-section/navigation-section.d.ts +0 -1
- package/development/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/development/navigation/navigation-section.js +6 -6
- package/development/notification/notification.d.ts +5 -16
- package/development/notification/notification.d.ts.map +1 -1
- package/development/notification.js +8 -9
- package/development/option/optgroup/optgroup-base-element.d.ts +28 -0
- package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -0
- package/development/option/optgroup/optgroup.d.ts +7 -20
- package/development/option/optgroup/optgroup.d.ts.map +1 -1
- package/development/option/optgroup.d.ts +1 -0
- package/development/option/optgroup.d.ts.map +1 -1
- package/development/option/optgroup.js +74 -49
- package/development/option/option/option-base-element.d.ts +69 -0
- package/development/option/option/option-base-element.d.ts.map +1 -0
- package/development/option/option/option.d.ts +14 -57
- package/development/option/option/option.d.ts.map +1 -1
- package/development/option/option.d.ts +1 -0
- package/development/option/option.d.ts.map +1 -1
- package/development/option/option.js +267 -220
- package/development/popover/popover/popover.d.ts +3 -1
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover-trigger.js +14 -49
- package/development/popover/popover.js +11 -4
- 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 +13 -12
- package/development/radio-button/radio-button/radio-button.d.ts +7 -1
- package/development/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts +1 -2
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +6 -6
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts +7 -1
- package/development/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/development/radio-button/radio-button-panel.js +17 -6
- package/development/radio-button/radio-button.js +17 -6
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts +0 -1
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +6 -5
- package/development/skiplink-list/skiplink-list.d.ts +1 -1
- package/development/skiplink-list/skiplink-list.d.ts.map +1 -1
- package/development/skiplink-list.js +5 -5
- package/development/status/status.d.ts +0 -1
- package/development/status/status.d.ts.map +1 -1
- package/development/status.js +5 -5
- package/development/stepper/stepper/stepper.d.ts +3 -1
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +3 -2
- package/development/tabs/tab-group/tab-group.d.ts +3 -1
- package/development/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/development/tabs/tab-group.js +4 -10
- package/development/tabs/tab-label/tab-label.d.ts +0 -1
- package/development/tabs/tab-label/tab-label.d.ts.map +1 -1
- package/development/tabs/tab-label.js +5 -5
- package/development/tabs/tab.js +10 -2
- package/development/tag/tag/tag.d.ts +0 -1
- package/development/tag/tag/tag.d.ts.map +1 -1
- package/development/tag/tag-group.js +1 -1
- package/development/tag/tag.js +6 -5
- package/development/teaser/teaser.d.ts +0 -1
- package/development/teaser/teaser.d.ts.map +1 -1
- package/development/teaser.js +5 -5
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.d.ts.map +1 -1
- package/development/timetable-occupancy-icon.js +3 -6
- package/development/toast/toast.d.ts +1 -2
- package/development/toast/toast.d.ts.map +1 -1
- package/development/toast.js +10 -8
- package/development/toggle/toggle-option/toggle-option.d.ts +0 -1
- package/development/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/development/toggle/toggle-option.js +6 -6
- package/development/toggle/toggle.js +1 -1
- package/development/toggle-check/toggle-check.d.ts +0 -1
- package/development/toggle-check/toggle-check.d.ts.map +1 -1
- package/development/toggle-check.js +5 -5
- package/dialog/dialog.js +1 -1
- package/file-selector/file-selector.d.ts +0 -1
- package/file-selector/file-selector.d.ts.map +1 -1
- package/file-selector.js +17 -15
- package/form-field/form-field/form-field.d.ts +1 -2
- 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 +17 -18
- package/form-field/form-field.js +18 -16
- package/icon/icon-base.d.ts.map +1 -1
- package/icon/icon.d.ts.map +1 -1
- package/image/image.d.ts +1 -0
- package/image/image.d.ts.map +1 -1
- package/image.js +24 -24
- package/index.d.ts +12 -0
- package/index.js +12 -0
- package/link/common/link-common.d.ts.map +1 -1
- package/link/common.js +9 -9
- package/link-list/link-list.d.ts +0 -1
- package/link-list/link-list.d.ts.map +1 -1
- package/link-list.js +8 -7
- package/map-container.js +8 -8
- package/navigation/navigation-list/navigation-list.d.ts +0 -1
- package/navigation/navigation-list/navigation-list.d.ts.map +1 -1
- package/navigation/navigation-list.js +9 -8
- package/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/navigation/navigation-section/navigation-section.d.ts +0 -1
- package/navigation/navigation-section/navigation-section.d.ts.map +1 -1
- package/navigation/navigation-section.js +10 -9
- package/notification/notification.d.ts +5 -16
- package/notification/notification.d.ts.map +1 -1
- package/notification.js +9 -9
- package/option/optgroup/optgroup-base-element.d.ts +28 -0
- package/option/optgroup/optgroup-base-element.d.ts.map +1 -0
- package/option/optgroup/optgroup.d.ts +7 -20
- package/option/optgroup/optgroup.d.ts.map +1 -1
- package/option/optgroup.d.ts +1 -0
- package/option/optgroup.d.ts.map +1 -1
- package/option/optgroup.js +80 -60
- package/option/option/option-base-element.d.ts +69 -0
- package/option/option/option-base-element.d.ts.map +1 -0
- package/option/option/option.d.ts +14 -57
- package/option/option/option.d.ts.map +1 -1
- package/option/option.d.ts +1 -0
- package/option/option.d.ts.map +1 -1
- package/option/option.js +184 -142
- package/package.json +36 -1
- package/popover/popover/popover.d.ts +3 -1
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover-trigger.js +13 -13
- package/popover/popover.js +55 -48
- 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 +6 -15
- package/radio-button/radio-button/radio-button.d.ts +7 -1
- package/radio-button/radio-button/radio-button.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts +1 -2
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +7 -6
- package/radio-button/radio-button-panel/radio-button-panel.d.ts +7 -1
- package/radio-button/radio-button-panel/radio-button-panel.d.ts.map +1 -1
- package/radio-button/radio-button-panel.js +33 -22
- package/radio-button/radio-button.js +30 -19
- package/selection-expansion-panel/selection-expansion-panel.d.ts +0 -1
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +15 -13
- package/skiplink-list/skiplink-list.d.ts +1 -1
- package/skiplink-list/skiplink-list.d.ts.map +1 -1
- package/skiplink-list.js +4 -3
- package/standard-theme.css +3 -1
- package/status/status.d.ts +0 -1
- package/status/status.d.ts.map +1 -1
- package/status.js +9 -8
- package/stepper/stepper/stepper.d.ts +3 -1
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +7 -6
- package/tabs/tab-group/tab-group.d.ts +3 -1
- package/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/tabs/tab-group.js +25 -24
- package/tabs/tab-label/tab-label.d.ts +0 -1
- package/tabs/tab-label/tab-label.d.ts.map +1 -1
- package/tabs/tab-label.js +4 -3
- package/tabs/tab.js +10 -10
- package/tag/tag/tag.d.ts +0 -1
- package/tag/tag/tag.d.ts.map +1 -1
- package/tag/tag.js +6 -4
- package/teaser/teaser.d.ts +0 -1
- package/teaser/teaser.d.ts.map +1 -1
- package/teaser.js +4 -3
- package/timetable-occupancy-icon/timetable-occupancy-icon.d.ts.map +1 -1
- package/timetable-occupancy-icon.js +22 -24
- package/toast/toast.d.ts +1 -2
- package/toast/toast.d.ts.map +1 -1
- package/toast.js +15 -12
- package/toggle/toggle-option/toggle-option.d.ts +0 -1
- package/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/toggle/toggle-option.js +12 -11
- package/toggle-check/toggle-check.d.ts +0 -1
- package/toggle-check/toggle-check.d.ts.map +1 -1
- package/toggle-check.js +4 -3
package/datepicker/datepicker.js
CHANGED
|
@@ -1,78 +1,75 @@
|
|
|
1
|
-
import { css as
|
|
2
|
-
import { property as u, state as
|
|
3
|
-
import { readConfig as
|
|
4
|
-
import { SbbConnectedAbortController as
|
|
5
|
-
import { defaultDateAdapter as
|
|
6
|
-
import { findReferencedElement as
|
|
1
|
+
import { css as v, LitElement as b, html as f } from "lit";
|
|
2
|
+
import { property as u, state as g, customElement as A } from "lit/decorators.js";
|
|
3
|
+
import { readConfig as c } from "../core/config.js";
|
|
4
|
+
import { SbbConnectedAbortController as D, SbbLanguageController as E } from "../core/controllers.js";
|
|
5
|
+
import { defaultDateAdapter as _ } from "../core/datetime.js";
|
|
6
|
+
import { findReferencedElement as w, findInput as C } from "../core/dom.js";
|
|
7
7
|
import { EventEmitter as d } from "../core/eventing.js";
|
|
8
|
-
import { i18nDatePickerPlaceholder as
|
|
9
|
-
import { AgnosticMutationObserver as
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
for (var
|
|
13
|
-
(o = t[
|
|
14
|
-
return a &&
|
|
8
|
+
import { i18nDatePickerPlaceholder as h, i18nDateChangedTo as y } from "../core/i18n.js";
|
|
9
|
+
import { AgnosticMutationObserver as I } from "../core/observers.js";
|
|
10
|
+
const P = v`:host{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
11
|
+
var U = Object.defineProperty, k = Object.getOwnPropertyDescriptor, l = (t, e, i, a) => {
|
|
12
|
+
for (var s = a > 1 ? void 0 : a ? k(e, i) : e, r = t.length - 1, o; r >= 0; r--)
|
|
13
|
+
(o = t[r]) && (s = (a ? o(e, i, s) : o(s)) || s);
|
|
14
|
+
return a && s && U(e, i, s), s;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (!e) {
|
|
20
|
-
const a = (n = t.closest) == null ? void 0 : n.call(t, "sbb-form-field");
|
|
21
|
-
return a == null ? void 0 : a.querySelector("sbb-datepicker");
|
|
22
|
-
}
|
|
23
|
-
return D(e);
|
|
16
|
+
function R(t, e) {
|
|
17
|
+
var i, a;
|
|
18
|
+
return e ? w(e) : (a = (i = t.closest) == null ? void 0 : i.call(t, "sbb-form-field")) == null ? void 0 : a.querySelector("sbb-datepicker");
|
|
24
19
|
}
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
if (
|
|
28
|
-
for (; !
|
|
29
|
-
|
|
30
|
-
return
|
|
20
|
+
function m(t, e, i, a) {
|
|
21
|
+
let s = a.addCalendarDays(t, e);
|
|
22
|
+
if (i)
|
|
23
|
+
for (; !i(s); )
|
|
24
|
+
s = a.addCalendarDays(s, e);
|
|
25
|
+
return s;
|
|
31
26
|
}
|
|
32
|
-
function
|
|
33
|
-
const
|
|
34
|
-
return !
|
|
27
|
+
function j(t, e, i, a) {
|
|
28
|
+
const s = m(t, -1, e, i), r = i.deserialize(a);
|
|
29
|
+
return !r || i.isValid(r) && i.compareDate(s, r) >= 0 ? s : t;
|
|
35
30
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
return !
|
|
31
|
+
function q(t, e, i, a) {
|
|
32
|
+
const s = m(t, 1, e, i), r = i.deserialize(a);
|
|
33
|
+
return !r || i.isValid(r) && i.compareDate(s, r) <= 0 ? s : t;
|
|
39
34
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
function x(t, e, i, a) {
|
|
36
|
+
var p;
|
|
37
|
+
const s = ((p = c().datetime) == null ? void 0 : p.dateAdapter) ?? _, r = s.deserialize(i), o = s.deserialize(a);
|
|
38
|
+
return s.isValid(r) && s.compareDate(t, r) < 0 || s.isValid(o) && s.compareDate(t, o) > 0 ? !1 : e ? e(t) : !0;
|
|
43
39
|
}
|
|
44
|
-
const
|
|
40
|
+
const $ = () => new CustomEvent("datepickerControlRegistered", {
|
|
45
41
|
bubbles: !1,
|
|
46
42
|
composed: !0
|
|
47
43
|
});
|
|
48
|
-
let
|
|
44
|
+
let n = class extends b {
|
|
49
45
|
constructor() {
|
|
50
46
|
var t;
|
|
51
|
-
super(...arguments), this.wide = !1, this.dateFilter = () => !0, this.
|
|
47
|
+
super(...arguments), this.wide = !1, this.dateFilter = () => !0, this._didChange = new d(this, n.events.didChange, {
|
|
52
48
|
bubbles: !0,
|
|
53
49
|
cancelable: !0
|
|
54
|
-
}), this._change = new d(this,
|
|
50
|
+
}), this._change = new d(this, n.events.change, {
|
|
55
51
|
bubbles: !0
|
|
56
52
|
}), this._inputUpdated = new d(
|
|
57
53
|
this,
|
|
58
|
-
|
|
54
|
+
n.events.inputUpdated,
|
|
59
55
|
{ bubbles: !0, cancelable: !0 }
|
|
60
56
|
), this._datePickerUpdated = new d(
|
|
61
57
|
this,
|
|
62
|
-
|
|
58
|
+
n.events.datePickerUpdated,
|
|
63
59
|
{
|
|
64
60
|
bubbles: !0,
|
|
65
61
|
cancelable: !0
|
|
66
62
|
}
|
|
67
63
|
), this._validationChange = new d(
|
|
68
64
|
this,
|
|
69
|
-
|
|
70
|
-
), this.
|
|
71
|
-
if (this._inputElement) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
e && (this._inputElement.value = this._format(e));
|
|
65
|
+
n.events.validationChange
|
|
66
|
+
), this._inputElement = null, this._inputElementPlaceholderMutable = !1, this._inputObserver = new I((e) => {
|
|
67
|
+
if (this._emitInputUpdated(), this._inputElement && (e != null && e.some((i) => i.attributeName === "value"))) {
|
|
68
|
+
const i = this._inputElement.getAttribute("value");
|
|
69
|
+
this.valueAsDate = this._dateAdapter.parse(i, this.now) ?? i;
|
|
75
70
|
}
|
|
71
|
+
}), this._dateAdapter = ((t = c().datetime) == null ? void 0 : t.dateAdapter) ?? _, this._abort = new D(this), this._language = new E(this).withHandler(() => {
|
|
72
|
+
this._inputElement && (this._inputElementPlaceholderMutable && (this._inputElement.placeholder = h[this._language.current]), this.valueAsDate && (this._inputElement.value = this._format(this.valueAsDate)));
|
|
76
73
|
});
|
|
77
74
|
}
|
|
78
75
|
set now(t) {
|
|
@@ -81,145 +78,111 @@ let r = class extends b {
|
|
|
81
78
|
get now() {
|
|
82
79
|
return this._now ?? this._dateAdapter.today();
|
|
83
80
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
set _inputElement(t) {
|
|
88
|
-
const e = this._inputElementState;
|
|
89
|
-
this._inputElementState = t, this._registerInputElement(this._inputElementState, e);
|
|
90
|
-
}
|
|
91
|
-
_findInput(t, e) {
|
|
92
|
-
t !== e && (this._inputElement = h(this, this.input));
|
|
93
|
-
}
|
|
94
|
-
_registerInputElement(t, e) {
|
|
95
|
-
var n, a;
|
|
96
|
-
if (t !== e) {
|
|
97
|
-
if ((n = this._datePickerController) == null || n.abort(), this._datePickerController = new AbortController(), !this._inputElement)
|
|
98
|
-
return;
|
|
99
|
-
(a = this._inputObserver) == null || a.disconnect(), this._inputObserver.observe(this._inputElement, {
|
|
100
|
-
attributeFilter: ["disabled", "readonly", "min", "max", "value"]
|
|
101
|
-
}), this._inputElement.type = "text", this._inputElement.placeholder || (this._inputElement.placeholder = p[this._language.current]), this._inputElement.addEventListener(
|
|
102
|
-
"change",
|
|
103
|
-
(i) => {
|
|
104
|
-
i instanceof CustomEvent || this._valueChanged(i);
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
signal: this._datePickerController.signal
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/** Gets the input value with the correct date format. */
|
|
113
|
-
getValueAsDate() {
|
|
114
|
-
if (this._inputElement && this._inputElement.value)
|
|
115
|
-
return this._parse(this._inputElement.value);
|
|
116
|
-
}
|
|
117
|
-
/** Set the input value to the correctly formatted value. */
|
|
118
|
-
setValueAsDate(t) {
|
|
119
|
-
const e = t instanceof Date ? t : new Date(t);
|
|
120
|
-
this._inputElement && (this._formatAndUpdateValue(this._inputElement.value, e), this._inputElement.dispatchEvent(new Event("blur", { composed: !0 })));
|
|
81
|
+
set valueAsDate(t) {
|
|
82
|
+
this._valueAsDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(t)), this._tryApplyFormatToInput() && this._inputElement.dispatchEvent(new Event("blur", { composed: !0 }));
|
|
121
83
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
* Whether a custom now is configured.
|
|
125
|
-
*/
|
|
126
|
-
hasCustomNow() {
|
|
127
|
-
return !!this._now;
|
|
128
|
-
}
|
|
129
|
-
_onInputPropertiesChange(t) {
|
|
130
|
-
var e, n, a, i;
|
|
131
|
-
this._inputUpdated.emit({
|
|
132
|
-
disabled: (e = this._inputElement) == null ? void 0 : e.disabled,
|
|
133
|
-
readonly: (n = this._inputElement) == null ? void 0 : n.readOnly,
|
|
134
|
-
min: (a = this._inputElement) == null ? void 0 : a.min,
|
|
135
|
-
max: (i = this._inputElement) == null ? void 0 : i.max
|
|
136
|
-
}), this._inputElement && t && Array.from(t).some((s) => s.attributeName === "value") && (this._inputElement.value = this._getValidValue(this._inputElement.getAttribute("value")));
|
|
84
|
+
get valueAsDate() {
|
|
85
|
+
return this._valueAsDate ?? null;
|
|
137
86
|
}
|
|
138
87
|
connectedCallback() {
|
|
139
|
-
super.connectedCallback()
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
signal: t
|
|
143
|
-
}), this._inputElement = h(this, this.input), this._inputElement && (this._inputElement.value = this._getValidValue(this._inputElement.value), this._inputUpdated.emit({
|
|
144
|
-
disabled: this._inputElement.disabled,
|
|
145
|
-
readonly: this._inputElement.readOnly,
|
|
146
|
-
min: this._inputElement.min,
|
|
147
|
-
max: this._inputElement.max
|
|
148
|
-
}));
|
|
88
|
+
super.connectedCallback(), this.addEventListener("datepickerControlRegistered", () => this._emitInputUpdated(), {
|
|
89
|
+
signal: this._abort.signal
|
|
90
|
+
}), this._attachInput(), this._inputElement && this._emitInputUpdated();
|
|
149
91
|
}
|
|
150
92
|
willUpdate(t) {
|
|
151
|
-
super.willUpdate(t), t.has("input") && this.
|
|
93
|
+
super.willUpdate(t), t.has("input") && this._attachInput(), (t.has("wide") || t.has("dateFilter") || t.has("now")) && this._datePickerUpdated.emit(), t.has("valueAsDate") && this._setAriaLiveMessage();
|
|
152
94
|
}
|
|
153
95
|
disconnectedCallback() {
|
|
154
96
|
var t, e;
|
|
155
97
|
super.disconnectedCallback(), (t = this._inputObserver) == null || t.disconnect(), (e = this._datePickerController) == null || e.abort();
|
|
156
98
|
}
|
|
157
99
|
firstUpdated(t) {
|
|
158
|
-
super.firstUpdated(t), this._setAriaLiveMessage(
|
|
100
|
+
super.firstUpdated(t), this._setAriaLiveMessage();
|
|
159
101
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Gets the input value with the correct date format.
|
|
104
|
+
* @deprecated Use property valueAsDate instead.
|
|
105
|
+
*/
|
|
106
|
+
getValueAsDate() {
|
|
107
|
+
return this.valueAsDate ?? void 0;
|
|
163
108
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Set the input value to the correctly formatted value.
|
|
111
|
+
* @deprecated Use property valueAsDate instead.
|
|
112
|
+
*/
|
|
113
|
+
setValueAsDate(t) {
|
|
114
|
+
this.valueAsDate = t;
|
|
167
115
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* Whether a custom now is configured.
|
|
119
|
+
*/
|
|
120
|
+
hasCustomNow() {
|
|
121
|
+
return !!this._now;
|
|
171
122
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if (this._inputElement) {
|
|
176
|
-
this.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
(a = this._inputElement) == null ? void 0 : a.max
|
|
182
|
-
), s = !this._inputElement.hasAttribute("data-sbb-invalid");
|
|
183
|
-
this._inputElement.toggleAttribute("data-sbb-invalid", !i), s !== i && this._validationChange.emit({ valid: i }), this._emitChange(e);
|
|
123
|
+
_attachInput() {
|
|
124
|
+
var e, i;
|
|
125
|
+
const t = C(this, this.input);
|
|
126
|
+
if (this._inputElement !== t && (this._inputElement && ((e = this._datePickerController) == null || e.abort(), (i = this._inputObserver) == null || i.disconnect()), this._inputElement = t, t)) {
|
|
127
|
+
this._datePickerController = new AbortController(), this._inputObserver.observe(t, {
|
|
128
|
+
attributeFilter: ["disabled", "readonly", "min", "max", "value"]
|
|
129
|
+
}), this._inputElementPlaceholderMutable = !t.placeholder, t.type = "text", this._inputElementPlaceholderMutable && (t.placeholder = h[this._language.current]);
|
|
130
|
+
const a = { signal: this._datePickerController.signal };
|
|
131
|
+
t.addEventListener("input", () => this._parseInput(), a), t.addEventListener("change", () => this._handleInputChange(), a), this._parseInput(!0), this._tryApplyFormatToInput(), this._validateDate();
|
|
184
132
|
}
|
|
185
133
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this.
|
|
189
|
-
|
|
134
|
+
_emitInputUpdated() {
|
|
135
|
+
const { disabled: t, readOnly: e, min: i, max: a } = this._inputElement ?? {};
|
|
136
|
+
this._inputUpdated.emit({ disabled: t, readonly: e, min: i, max: a });
|
|
137
|
+
}
|
|
138
|
+
_handleInputChange() {
|
|
139
|
+
this._tryApplyFormatToInput() || (this._validateDate(), this._setAriaLiveMessage(), this._change.emit(), this._didChange.emit());
|
|
140
|
+
}
|
|
141
|
+
_tryApplyFormatToInput() {
|
|
142
|
+
if (!this._inputElement)
|
|
143
|
+
return !1;
|
|
144
|
+
const t = this.valueAsDate ? this._format(this.valueAsDate) : "";
|
|
145
|
+
return t && this._inputElement.value !== t ? (this._inputElement.value = t, this._inputElement.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 })), this._inputElement.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })), !0) : !1;
|
|
146
|
+
}
|
|
147
|
+
_validateDate() {
|
|
148
|
+
var i, a;
|
|
149
|
+
if (!this._inputElement)
|
|
150
|
+
return;
|
|
151
|
+
const t = !this._inputElement.value || !!this.valueAsDate && x(
|
|
152
|
+
this.valueAsDate,
|
|
153
|
+
this.dateFilter,
|
|
154
|
+
(i = this._inputElement) == null ? void 0 : i.min,
|
|
155
|
+
(a = this._inputElement) == null ? void 0 : a.max
|
|
156
|
+
), e = !this._inputElement.hasAttribute("data-sbb-invalid");
|
|
157
|
+
this._inputElement.toggleAttribute("data-sbb-invalid", !t), e !== t && this._validationChange.emit({ valid: t });
|
|
158
|
+
}
|
|
159
|
+
_parseInput(t = !1) {
|
|
160
|
+
const e = this._inputElement.value, i = this.dateParser ?? ((a) => this._dateAdapter.parse(a, this.now));
|
|
161
|
+
this._valueAsDate = this._dateAdapter.getValidDateOrNull(i(e)), t && !this._valueAsDate && (this._valueAsDate = this._dateAdapter.getValidDateOrNull(
|
|
162
|
+
this._dateAdapter.deserialize(e)
|
|
190
163
|
));
|
|
191
164
|
}
|
|
192
|
-
_getValidValue(t) {
|
|
193
|
-
if (!t)
|
|
194
|
-
return "";
|
|
195
|
-
const e = t.match(U);
|
|
196
|
-
return (e == null ? void 0 : e.index) === 0 ? this._parseAndFormatValue(t) : Number.isInteger(+t) ? this._createAndComposeDate(+t) : this._dateAdapter.isValid(new Date(t)) ? this._createAndComposeDate(t) : t;
|
|
197
|
-
}
|
|
198
|
-
_parse(t) {
|
|
199
|
-
return this.dateParser ? this.dateParser(t) : this._dateAdapter.parse(t, this.now);
|
|
200
|
-
}
|
|
201
165
|
_format(t) {
|
|
202
166
|
return this.format ? this.format(t) : this._dateAdapter.format(t);
|
|
203
167
|
}
|
|
204
|
-
_setAriaLiveMessage(
|
|
205
|
-
var
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
)}, ${n.format(t)}` : "");
|
|
168
|
+
_setAriaLiveMessage() {
|
|
169
|
+
var e, i;
|
|
170
|
+
const t = (i = (e = this.shadowRoot) == null ? void 0 : e.querySelector) == null ? void 0 : i.call(e, "#status-container");
|
|
171
|
+
if (t)
|
|
172
|
+
if (!this.valueAsDate)
|
|
173
|
+
t.innerText = "";
|
|
174
|
+
else {
|
|
175
|
+
const a = this._dateAdapter.format(this.valueAsDate, { weekdayStyle: "long" });
|
|
176
|
+
t.innerText = `${y[this._language.current]} ${a}`;
|
|
177
|
+
}
|
|
178
|
+
else return;
|
|
216
179
|
}
|
|
217
180
|
render() {
|
|
218
181
|
return f`<p id="status-container" role="status"></p>`;
|
|
219
182
|
}
|
|
220
183
|
};
|
|
221
|
-
|
|
222
|
-
|
|
184
|
+
n.styles = P;
|
|
185
|
+
n.events = {
|
|
223
186
|
didChange: "didChange",
|
|
224
187
|
change: "change",
|
|
225
188
|
inputUpdated: "inputUpdated",
|
|
@@ -228,34 +191,37 @@ r.events = {
|
|
|
228
191
|
};
|
|
229
192
|
l([
|
|
230
193
|
u({ type: Boolean })
|
|
231
|
-
],
|
|
194
|
+
], n.prototype, "wide", 2);
|
|
232
195
|
l([
|
|
233
|
-
u({ attribute:
|
|
234
|
-
],
|
|
196
|
+
u({ attribute: !1 })
|
|
197
|
+
], n.prototype, "dateFilter", 2);
|
|
235
198
|
l([
|
|
236
|
-
u({ attribute:
|
|
237
|
-
],
|
|
199
|
+
u({ attribute: !1 })
|
|
200
|
+
], n.prototype, "dateParser", 2);
|
|
238
201
|
l([
|
|
239
|
-
u()
|
|
240
|
-
],
|
|
202
|
+
u({ attribute: !1 })
|
|
203
|
+
], n.prototype, "format", 2);
|
|
241
204
|
l([
|
|
242
205
|
u()
|
|
243
|
-
],
|
|
206
|
+
], n.prototype, "input", 2);
|
|
244
207
|
l([
|
|
245
208
|
u()
|
|
246
|
-
],
|
|
209
|
+
], n.prototype, "now", 1);
|
|
210
|
+
l([
|
|
211
|
+
u({ attribute: !1 })
|
|
212
|
+
], n.prototype, "valueAsDate", 1);
|
|
247
213
|
l([
|
|
248
|
-
|
|
249
|
-
],
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
],
|
|
214
|
+
g()
|
|
215
|
+
], n.prototype, "_inputElement", 2);
|
|
216
|
+
n = l([
|
|
217
|
+
A("sbb-datepicker")
|
|
218
|
+
], n);
|
|
253
219
|
export {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
220
|
+
n as SbbDatepickerElement,
|
|
221
|
+
$ as datepickerControlRegisteredEventFactory,
|
|
222
|
+
q as findNextAvailableDate,
|
|
223
|
+
j as findPreviousAvailableDate,
|
|
224
|
+
m as getAvailableDate,
|
|
225
|
+
R as getDatePicker,
|
|
226
|
+
x as isDateAvailable
|
|
261
227
|
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
|
|
2
|
+
import { SbbOpenCloseBaseElement } from '../core/base-elements.js';
|
|
3
|
+
import { SbbConnectedAbortController } from '../core/controllers.js';
|
|
4
|
+
import { SbbOptionBaseElement } from '../option.js';
|
|
5
|
+
|
|
6
|
+
declare const SbbAutocompleteBaseElement_base: import('../core/mixins.js').AbstractConstructor<import('../core/mixins.js').SbbNegativeMixinType> & import('../core/mixins.js').AbstractConstructor<import('../core/mixins.js').SbbHydrationMixinType> & typeof SbbOpenCloseBaseElement;
|
|
7
|
+
export declare abstract class SbbAutocompleteBaseElement extends SbbAutocompleteBaseElement_base {
|
|
8
|
+
static styles: CSSResultGroup;
|
|
9
|
+
/**
|
|
10
|
+
* The element where the autocomplete will attach; accepts both an element's id or an HTMLElement.
|
|
11
|
+
* If not set, it will search for the first 'sbb-form-field' ancestor.
|
|
12
|
+
*/
|
|
13
|
+
origin?: string | HTMLElement;
|
|
14
|
+
/**
|
|
15
|
+
* The input element that will trigger the autocomplete opening; accepts both an element's id or an HTMLElement.
|
|
16
|
+
* By default, the autocomplete will open on focus, click, input or `ArrowDown` keypress of the 'trigger' element.
|
|
17
|
+
* If not set, will search for the first 'input' child of a 'sbb-form-field' ancestor.
|
|
18
|
+
*/
|
|
19
|
+
trigger?: string | HTMLInputElement;
|
|
20
|
+
/** Whether the icon space is preserved when no icon is set. */
|
|
21
|
+
preserveIconSpace?: boolean;
|
|
22
|
+
/** Returns the element where autocomplete overlay is attached to. */
|
|
23
|
+
get originElement(): HTMLElement;
|
|
24
|
+
private _originElement?;
|
|
25
|
+
/** Returns the trigger element. */
|
|
26
|
+
get triggerElement(): HTMLInputElement | undefined;
|
|
27
|
+
private _triggerElement;
|
|
28
|
+
protected abstract overlayId: string;
|
|
29
|
+
protected abstract panelRole: string;
|
|
30
|
+
protected abort: SbbConnectedAbortController;
|
|
31
|
+
private _overlay;
|
|
32
|
+
private _optionContainer;
|
|
33
|
+
private _triggerEventsController;
|
|
34
|
+
private _openPanelEventsController;
|
|
35
|
+
private _didLoad;
|
|
36
|
+
private _isPointerDownEventOnMenu;
|
|
37
|
+
protected abstract get options(): SbbOptionBaseElement[];
|
|
38
|
+
protected abstract syncNegative(): void;
|
|
39
|
+
protected abstract setTriggerAttributes(element: HTMLInputElement): void;
|
|
40
|
+
protected abstract openedPanelKeyboardInteraction(event: KeyboardEvent): void;
|
|
41
|
+
protected abstract selectByKeyboard(event: KeyboardEvent): void;
|
|
42
|
+
protected abstract setNextActiveOption(event: KeyboardEvent): void;
|
|
43
|
+
protected abstract resetActiveElement(): void;
|
|
44
|
+
protected abstract onOptionClick(event: MouseEvent): void;
|
|
45
|
+
/** Opens the autocomplete. */
|
|
46
|
+
open(): void;
|
|
47
|
+
/** Closes the autocomplete. */
|
|
48
|
+
close(): void;
|
|
49
|
+
connectedCallback(): void;
|
|
50
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
51
|
+
protected firstUpdated(changedProperties: PropertyValues<this>): void;
|
|
52
|
+
disconnectedCallback(): void;
|
|
53
|
+
/** When an option is selected, update the input value and close the autocomplete. */
|
|
54
|
+
protected onOptionSelected(event: CustomEvent): void;
|
|
55
|
+
private _handleSlotchange;
|
|
56
|
+
/** The autocomplete should inherit 'readonly' state from the trigger. */
|
|
57
|
+
private get _readonly();
|
|
58
|
+
/** Removes trigger click listener on trigger change. */
|
|
59
|
+
private _resetOriginClickListener;
|
|
60
|
+
/** Removes trigger click listener on trigger change. */
|
|
61
|
+
private _resetTriggerClickListener;
|
|
62
|
+
private _componentSetup;
|
|
63
|
+
/**
|
|
64
|
+
* Retrieve the element where the autocomplete will be attached.
|
|
65
|
+
* @returns 'origin' or the first 'sbb-form-field' ancestor.
|
|
66
|
+
*/
|
|
67
|
+
private _findOriginElement;
|
|
68
|
+
/**
|
|
69
|
+
* Retrieve the element that will trigger the autocomplete opening.
|
|
70
|
+
* @returns 'trigger' or the first 'input' inside the origin element.
|
|
71
|
+
*/
|
|
72
|
+
private _getTriggerElement;
|
|
73
|
+
private _bindTo;
|
|
74
|
+
private _setupTriggerEvents;
|
|
75
|
+
private _setOverlayPosition;
|
|
76
|
+
/** On open/close animation end.
|
|
77
|
+
* In rare cases it can be that the animationEnd event is triggered twice.
|
|
78
|
+
* To avoid entering a corrupt state, exit when state is not expected.
|
|
79
|
+
*/
|
|
80
|
+
private _onAnimationEnd;
|
|
81
|
+
private _onOpenAnimationEnd;
|
|
82
|
+
private _onCloseAnimationEnd;
|
|
83
|
+
private _attachOpenPanelEvents;
|
|
84
|
+
private _pointerDownListener;
|
|
85
|
+
private _closeOnBackdropClick;
|
|
86
|
+
private _closedPanelKeyboardInteraction;
|
|
87
|
+
/** Highlight the searched text on the options. */
|
|
88
|
+
private _highlightOptions;
|
|
89
|
+
private _removeTriggerAttributes;
|
|
90
|
+
protected render(): TemplateResult;
|
|
91
|
+
}
|
|
92
|
+
export {};
|
|
93
|
+
//# sourceMappingURL=autocomplete-base-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete-base-element.d.ts","sourceRoot":"","sources":["../../../../src/elements/autocomplete/autocomplete-base-element.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAInB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AASrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;;AAUzD,8BAAsB,0BAA2B,SAAQ,+BAExD;IACC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;OAGG;IACgB,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IAEjD;;;;OAIG;IACgB,OAAO,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;IAEvD,+DAA+D;IAExD,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAEnC,qEAAqE;IACrE,IAAW,aAAa,IAAI,WAAW,CAKtC;IACD,OAAO,CAAC,cAAc,CAAC,CAAc;IAErC,mCAAmC;IACnC,IAAW,cAAc,IAAI,gBAAgB,GAAG,SAAS,CAExD;IACD,OAAO,CAAC,eAAe,CAA+B;IAEtD,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IACrC,SAAS,CAAC,KAAK,8BAAyC;IACxD,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,gBAAgB,CAAe;IACvC,OAAO,CAAC,wBAAwB,CAAmB;IACnD,OAAO,CAAC,0BAA0B,CAAmB;IACrD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,yBAAyB,CAAkB;IAEnD,SAAS,CAAC,QAAQ,KAAK,OAAO,IAAI,oBAAoB,EAAE,CAAC;IACzD,SAAS,CAAC,QAAQ,CAAC,YAAY,IAAI,IAAI;IACvC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IACxE,SAAS,CAAC,QAAQ,CAAC,8BAA8B,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAC7E,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAC/D,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAClE,SAAS,CAAC,QAAQ,CAAC,kBAAkB,IAAI,IAAI;IAC7C,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAEzD,8BAA8B;IACvB,IAAI,IAAI,IAAI;IAYnB,+BAA+B;IACxB,KAAK,IAAI,IAAI;IAYJ,iBAAiB,IAAI,IAAI;cAoBtB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAczD,YAAY,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAO9D,oBAAoB,IAAI,IAAI;IAM5C,qFAAqF;IACrF,SAAS,CAAC,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAuBpD,OAAO,CAAC,iBAAiB;IAIzB,yEAAyE;IACzE,OAAO,KAAK,SAAS,GAEpB;IAED,wDAAwD;IACxD,OAAO,CAAC,yBAAyB;IASjC,wDAAwD;IACxD,OAAO,CAAC,0BAA0B;IASlC,OAAO,CAAC,eAAe;IAgBvB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAkB1B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,OAAO;IAcf,OAAO,CAAC,mBAAmB;IA0B3B,OAAO,CAAC,mBAAmB;IAU3B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,sBAAsB;IAgC9B,OAAO,CAAC,oBAAoB,CAE1B;IAGF,OAAO,CAAC,qBAAqB,CAQ3B;IAEF,OAAO,CAAC,+BAA+B;IAcvC,kDAAkD;IAClD,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,wBAAwB;cAIb,MAAM,IAAI,cAAc;CAyB5C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SbbOptionElement } from '../option.js';
|
|
2
|
+
import { SbbAutocompleteBaseElement } from './autocomplete-base-element.js';
|
|
3
3
|
|
|
4
|
-
declare const SbbAutocompleteElement_base: import('../core/mixins.js').AbstractConstructor<import('../core/mixins.js').SbbNegativeMixinType> & import('../core/mixins.js').AbstractConstructor<import('../core/mixins.js').SbbHydrationMixinType> & typeof SbbOpenCloseBaseElement;
|
|
5
4
|
/**
|
|
6
5
|
* Combined with a native input, it displays a panel with a list of available options.
|
|
7
6
|
*
|
|
@@ -14,95 +13,23 @@ declare const SbbAutocompleteElement_base: import('../core/mixins.js').AbstractC
|
|
|
14
13
|
* the `z-index` can be overridden by defining this CSS variable. The default `z-index` of the
|
|
15
14
|
* component is set to `var(--sbb-overlay-default-z-index)` with a value of `1000`.
|
|
16
15
|
*/
|
|
17
|
-
export declare class SbbAutocompleteElement extends
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* The element where the autocomplete will attach; accepts both an element's id or an HTMLElement.
|
|
21
|
-
* If not set, will search for the first 'sbb-form-field' ancestor.
|
|
22
|
-
*/
|
|
23
|
-
origin?: string | HTMLElement;
|
|
24
|
-
/**
|
|
25
|
-
* The input element that will trigger the autocomplete opening; accepts both an element's id or an HTMLElement.
|
|
26
|
-
* By default, the autocomplete will open on focus, click, input or `ArrowDown` keypress of the 'trigger' element.
|
|
27
|
-
* If not set, will search for the first 'input' child of a 'sbb-form-field' ancestor.
|
|
28
|
-
*/
|
|
29
|
-
trigger?: string | HTMLInputElement;
|
|
30
|
-
/** Whether the icon space is preserved when no icon is set. */
|
|
31
|
-
preserveIconSpace?: boolean;
|
|
32
|
-
private _overlay;
|
|
33
|
-
private _optionContainer;
|
|
34
|
-
/** Returns the element where autocomplete overlay is attached to. */
|
|
35
|
-
get originElement(): HTMLElement;
|
|
36
|
-
private _originElement?;
|
|
37
|
-
/** Returns the trigger element. */
|
|
38
|
-
get triggerElement(): HTMLInputElement | undefined;
|
|
39
|
-
private _triggerElement;
|
|
40
|
-
private _triggerEventsController;
|
|
41
|
-
private _openPanelEventsController;
|
|
42
|
-
private _overlayId;
|
|
16
|
+
export declare class SbbAutocompleteElement extends SbbAutocompleteBaseElement {
|
|
17
|
+
protected overlayId: string;
|
|
18
|
+
protected panelRole: string;
|
|
43
19
|
private _activeItemIndex;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
private _abort;
|
|
47
|
-
/** The autocomplete should inherit 'readonly' state from the trigger. */
|
|
48
|
-
private get _readonly();
|
|
49
|
-
private get _options();
|
|
50
|
-
/** Opens the autocomplete. */
|
|
51
|
-
open(): void;
|
|
52
|
-
/** Closes the autocomplete. */
|
|
53
|
-
close(): void;
|
|
54
|
-
/** Removes trigger click listener on trigger change. */
|
|
55
|
-
private _resetOriginClickListener;
|
|
56
|
-
/** Removes trigger click listener on trigger change. */
|
|
57
|
-
private _resetTriggerClickListener;
|
|
58
|
-
/** When an option is selected, update the input value and close the autocomplete. */
|
|
59
|
-
private _onOptionSelected;
|
|
60
|
-
private _onOptionClick;
|
|
20
|
+
protected get options(): SbbOptionElement[];
|
|
21
|
+
protected onOptionClick(event: MouseEvent): void;
|
|
61
22
|
connectedCallback(): void;
|
|
62
|
-
protected
|
|
63
|
-
protected
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
* Retrieve the element where the autocomplete will be attached.
|
|
69
|
-
* @returns 'origin' or the first 'sbb-form-field' ancestor.
|
|
70
|
-
*/
|
|
71
|
-
private _findOriginElement;
|
|
72
|
-
/**
|
|
73
|
-
* Retrieve the element that will trigger the autocomplete opening.
|
|
74
|
-
* @returns 'trigger' or the first 'input' inside the origin element.
|
|
75
|
-
*/
|
|
76
|
-
private _getTriggerElement;
|
|
77
|
-
private _bindTo;
|
|
78
|
-
private _setupTriggerEvents;
|
|
79
|
-
private _setOverlayPosition;
|
|
80
|
-
/** On open/close animation end.
|
|
81
|
-
* In rare cases it can be that the animationEnd event is triggered twice.
|
|
82
|
-
* To avoid entering a corrupt state, exit when state is not expected.
|
|
83
|
-
*/
|
|
84
|
-
private _onAnimationEnd;
|
|
85
|
-
private _onOpenAnimationEnd;
|
|
86
|
-
private _onCloseAnimationEnd;
|
|
87
|
-
private _attachOpenPanelEvents;
|
|
88
|
-
private _pointerDownListener;
|
|
89
|
-
private _closeOnBackdropClick;
|
|
90
|
-
private _closedPanelKeyboardInteraction;
|
|
91
|
-
private _openedPanelKeyboardInteraction;
|
|
92
|
-
private _selectByKeyboard;
|
|
93
|
-
private _setNextActiveOption;
|
|
94
|
-
private _resetActiveElement;
|
|
95
|
-
/** Highlight the searched text on the options. */
|
|
96
|
-
private _highlightOptions;
|
|
97
|
-
private _setTriggerAttributes;
|
|
98
|
-
private _removeTriggerAttributes;
|
|
99
|
-
private _handleSlotchange;
|
|
100
|
-
protected render(): TemplateResult;
|
|
23
|
+
protected syncNegative(): void;
|
|
24
|
+
protected openedPanelKeyboardInteraction(event: KeyboardEvent): void;
|
|
25
|
+
protected selectByKeyboard(): void;
|
|
26
|
+
protected setNextActiveOption(event: KeyboardEvent): void;
|
|
27
|
+
protected resetActiveElement(): void;
|
|
28
|
+
protected setTriggerAttributes(element: HTMLInputElement): void;
|
|
101
29
|
}
|
|
102
30
|
declare global {
|
|
103
31
|
interface HTMLElementTagNameMap {
|
|
104
32
|
'sbb-autocomplete': SbbAutocompleteElement;
|
|
105
33
|
}
|
|
106
34
|
}
|
|
107
|
-
export {};
|
|
108
35
|
//# sourceMappingURL=autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/elements/autocomplete/autocomplete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/elements/autocomplete/autocomplete.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAU5E;;;;;;;;;;;GAWG;AACH,qBAKa,sBAAuB,SAAQ,0BAA0B;IACpE,SAAS,CAAC,SAAS,SAAkC;IACrD,SAAS,CAAC,SAAS,SAAa;IAChC,OAAO,CAAC,gBAAgB,CAAM;IAE9B,SAAS,KAAK,OAAO,IAAI,gBAAgB,EAAE,CAE1C;IAED,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAUhC,iBAAiB,IAAI,IAAI;IAUzC,SAAS,CAAC,YAAY,IAAI,IAAI;IAQ9B,SAAS,CAAC,8BAA8B,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAsBpE,SAAS,CAAC,gBAAgB,IAAI,IAAI;IAQlC,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAqBzD,SAAS,CAAC,kBAAkB,IAAI,IAAI;IAUpC,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;CAGhE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,kBAAkB,EAAE,sBAAsB,CAAC;KAC5C;CACF"}
|