@sbb-esta/lyne-elements 3.0.0-next.0 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.component.js +19 -22
- package/action-group/action-group.component.js +3 -5
- package/alert/alert/alert.component.d.ts +5 -7
- package/alert/alert/alert.component.d.ts.map +1 -1
- package/alert/alert/alert.component.js +69 -84
- package/alert/alert-group/alert-group.component.js +2 -3
- package/autocomplete/autocomplete-base-element.js +83 -95
- package/autocomplete/autocomplete.component.js +28 -33
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +42 -50
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +1 -1
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +4 -5
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +17 -20
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +21 -24
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +5 -5
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +27 -31
- package/button/mini-button/mini-button.component.js +1 -1
- package/button/mini-button-group/mini-button-group.component.js +1 -2
- package/calendar/calendar.component.d.ts +0 -5
- package/calendar/calendar.component.d.ts.map +1 -1
- package/calendar/calendar.component.js +129 -147
- package/card/card/card.component.js +12 -12
- package/card/card-badge/card-badge.component.js +17 -17
- package/card/common/card-action-common.js +20 -22
- package/checkbox/checkbox/checkbox.component.js +17 -20
- package/checkbox/checkbox-group/checkbox-group.component.js +39 -52
- package/checkbox/checkbox-panel/checkbox-panel.component.js +18 -21
- package/checkbox/common/checkbox-common.js +13 -15
- package/chip/chip-group/chip-group.component.js +66 -80
- package/clock/clock.component.js +50 -60
- package/container/container/container.component.js +28 -29
- package/container/sticky-bar/sticky-bar.component.js +25 -26
- package/core/a11y/focus-trap-controller.js +11 -14
- package/core/a11y/input-modality-detector.js +15 -16
- package/core/a11y/interactivity-checker.js +10 -10
- package/core/a11y/live-announcer.js +12 -14
- package/core/base-elements/button-base-element.js +58 -63
- package/core/base-elements/link-base-element.js +3 -6
- package/core/base-elements/open-close-base-element.js +1 -1
- package/core/config/config.d.ts.map +1 -1
- package/core/controllers/escapable-overlay-controller.js +10 -12
- package/core/controllers/id-reference-controller.js +13 -14
- package/core/controllers/inert-controller.js +8 -10
- package/core/controllers/slot-state-controller.js +16 -26
- package/core/datetime/date-adapter.d.ts +1 -1
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/date-adapter.js +21 -21
- package/core/datetime/native-date-adapter.d.ts +1 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.js +28 -28
- package/core/decorators/force-type.js +4 -5
- package/core/decorators/id-reference.js +34 -37
- package/core/decorators/plain-date.js +16 -19
- package/core/dom/breakpoint.js +8 -8
- package/core/eventing/event-emitter.js +4 -5
- package/core/i18n/i18n.js +41 -41
- package/core/mixins/element-internals-mixin.d.ts +21 -0
- package/core/mixins/element-internals-mixin.d.ts.map +1 -1
- package/core/mixins/element-internals-mixin.js +109 -23
- package/core/mixins/form-associated-checkbox-mixin.js +32 -37
- package/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-input-mixin.js +69 -93
- package/core/mixins/form-associated-mixin.js +32 -35
- package/core/mixins/form-associated-radio-button-mixin.js +3 -5
- package/core/mixins/hydration-mixin.js +12 -13
- package/core/mixins/named-slot-list-mixin.js +32 -37
- package/core/mixins/panel-mixin.js +26 -27
- package/core/mixins/readonly-mixin.d.ts.map +1 -1
- package/core/mixins/readonly-mixin.js +10 -11
- package/core/mixins.js +27 -25
- package/core/overlay/position.js +23 -23
- package/core/styles/core/mediaqueries.scss +1 -1
- package/core/styles/core.scss +70 -37
- package/core/styles/mixins/table.scss +1 -24
- package/core/styles/mixins/typo.scss +0 -1
- package/core/testing/event-spy.js +2 -4
- package/core/testing/wait-for-image-ready.js +8 -9
- package/core/testing/wait-for-render.js +8 -9
- package/core.css +29 -1
- package/custom-elements.json +5804 -3207
- package/date-input/date-input.component.d.ts +16 -1
- package/date-input/date-input.component.d.ts.map +1 -1
- package/date-input/date-input.component.js +71 -58
- package/datepicker/common/datepicker-button.d.ts +31 -20
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common/datepicker-button.js +79 -74
- package/datepicker/common.d.ts +0 -1
- package/datepicker/common.d.ts.map +1 -1
- package/datepicker/common.js +3 -5
- package/datepicker/datepicker/datepicker.component.d.ts +23 -102
- package/datepicker/datepicker/datepicker.component.d.ts.map +1 -1
- package/datepicker/datepicker/datepicker.component.js +91 -233
- package/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts +2 -2
- package/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts.map +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +27 -18
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts +2 -2
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts.map +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +27 -18
- package/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts +6 -26
- package/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +36 -145
- package/datepicker.js +9 -11
- package/development/accordion/accordion.component.js +4 -7
- package/development/action-group/action-group.component.js +3 -5
- package/development/alert/alert/alert.component.d.ts +5 -7
- package/development/alert/alert/alert.component.d.ts.map +1 -1
- package/development/alert/alert/alert.component.js +34 -52
- package/development/alert/alert-group/alert-group.component.js +2 -3
- package/development/autocomplete/autocomplete-base-element.js +20 -32
- package/development/autocomplete/autocomplete.component.js +7 -12
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +10 -18
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +4 -9
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +4 -7
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +4 -7
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -2
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +1 -1
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +5 -9
- package/development/button/accent-button/accent-button.component.js +1 -1
- package/development/button/accent-button-link/accent-button-link.component.js +1 -1
- package/development/button/accent-button-static/accent-button-static.component.js +1 -1
- package/development/button/button/button.component.js +1 -1
- package/development/button/button-link/button-link.component.js +1 -1
- package/development/button/button-static/button-static.component.js +1 -1
- package/development/button/common/button-common.js +1 -1
- package/development/button/mini-button/mini-button.component.js +1 -1
- package/development/button/mini-button-group/mini-button-group.component.js +2 -3
- package/development/button/secondary-button/secondary-button.component.js +1 -1
- package/development/button/secondary-button-link/secondary-button-link.component.js +1 -1
- package/development/button/secondary-button-static/secondary-button-static.component.js +1 -1
- package/development/button/transparent-button/transparent-button.component.js +1 -1
- package/development/button/transparent-button-link/transparent-button-link.component.js +1 -1
- package/development/button/transparent-button-static/transparent-button-static.component.js +1 -1
- package/development/calendar/calendar.component.d.ts +0 -5
- package/development/calendar/calendar.component.d.ts.map +1 -1
- package/development/calendar/calendar.component.js +20 -44
- package/development/card/card/card.component.js +1 -1
- package/development/card/card-badge/card-badge.component.js +2 -2
- package/development/card/card-button/card-button.component.js +1 -1
- package/development/card/card-link/card-link.component.js +1 -1
- package/development/card/common/card-action-common.js +4 -6
- package/development/checkbox/checkbox/checkbox.component.js +2 -5
- package/development/checkbox/checkbox-group/checkbox-group.component.js +8 -21
- package/development/checkbox/checkbox-panel/checkbox-panel.component.js +2 -5
- package/development/checkbox/common/checkbox-common.js +3 -5
- package/development/chip/chip/chip.component.js +1 -1
- package/development/chip/chip-group/chip-group.component.js +18 -32
- package/development/chip-label/chip-label.component.js +1 -1
- package/development/clock/clock.component.js +23 -33
- package/development/container/container/container.component.js +2 -3
- package/development/container/sticky-bar/sticky-bar.component.js +3 -4
- package/development/core/a11y/arrow-navigation.js +1 -1
- package/development/core/a11y/fake-event-detection.js +1 -1
- package/development/core/a11y/focus-trap-controller.js +6 -9
- package/development/core/a11y/focus-visible-within-controller.js +1 -1
- package/development/core/a11y/input-modality-detector.js +2 -3
- package/development/core/a11y/interactivity-checker.js +2 -2
- package/development/core/a11y/live-announcer.js +6 -8
- package/development/core/base-elements/action-base-element.js +2 -3
- package/development/core/base-elements/button-base-element.js +6 -11
- package/development/core/base-elements/link-base-element.js +4 -7
- package/development/core/base-elements/open-close-base-element.js +2 -2
- package/development/core/config/config.d.ts.map +1 -1
- package/development/core/config/config.js +1 -1
- package/development/core/controllers/escapable-overlay-controller.js +3 -5
- package/development/core/controllers/id-reference-controller.js +2 -3
- package/development/core/controllers/inert-controller.js +4 -6
- package/development/core/controllers/language-controller.js +1 -1
- package/development/core/controllers/media-matchers-controller.js +1 -1
- package/development/core/controllers/slot-state-controller.js +8 -18
- package/development/core/datetime/date-adapter.d.ts +1 -1
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/date-adapter.js +5 -5
- package/development/core/datetime/native-date-adapter.d.ts +1 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.js +4 -4
- package/development/core/decorators/force-type.js +3 -4
- package/development/core/decorators/get-override.js +1 -1
- package/development/core/decorators/handle-distinct-change.js +1 -1
- package/development/core/decorators/host-attributes.js +1 -1
- package/development/core/decorators/id-reference.js +4 -7
- package/development/core/decorators/plain-date.js +5 -8
- package/development/core/decorators/slot-state.js +1 -1
- package/development/core/dom/animation.js +1 -1
- package/development/core/dom/breakpoint.js +2 -2
- package/development/core/dom/host-context.js +1 -1
- package/development/core/dom/platform.js +1 -1
- package/development/core/dom/scroll.js +1 -1
- package/development/core/dom/set-or-remove-attribute.js +1 -1
- package/development/core/eventing/composed-path-has-attribute.js +1 -1
- package/development/core/eventing/event-emitter.js +2 -3
- package/development/core/eventing/form-element-handlers.js +1 -1
- package/development/core/eventing/forward-event.js +1 -1
- package/development/core/eventing/throttle.js +1 -1
- package/development/core/i18n/i18n.js +18 -18
- package/development/core/mixins/animation-complete-mixin.js +1 -1
- package/development/core/mixins/disabled-mixin.js +1 -1
- package/development/core/mixins/element-internals-mixin.d.ts +21 -0
- package/development/core/mixins/element-internals-mixin.d.ts.map +1 -1
- package/development/core/mixins/element-internals-mixin.js +123 -2
- package/development/core/mixins/form-associated-checkbox-mixin.js +6 -9
- package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-input-mixin.js +29 -59
- package/development/core/mixins/form-associated-mixin.js +6 -9
- package/development/core/mixins/form-associated-radio-button-mixin.js +7 -9
- package/development/core/mixins/hydration-mixin.js +3 -4
- package/development/core/mixins/named-slot-list-mixin.js +4 -7
- package/development/core/mixins/negative-mixin.js +1 -1
- package/development/core/mixins/panel-mixin.js +2 -3
- package/development/core/mixins/readonly-mixin.d.ts.map +1 -1
- package/development/core/mixins/readonly-mixin.js +4 -6
- package/development/core/mixins/required-mixin.js +1 -1
- package/development/core/mixins/update-scheduler-mixin.js +1 -1
- package/development/core/mixins.js +4 -2
- package/development/core/overlay/overlay-option-panel.js +1 -1
- package/development/core/overlay/overlay-trigger-attributes.js +1 -1
- package/development/core/overlay/overlay.js +1 -1
- package/development/core/overlay/position.js +5 -5
- package/development/core/testing/event-spy.js +3 -5
- package/development/core/testing/mocha-extensions.js +1 -1
- package/development/core/testing/wait-for-condition.js +1 -1
- package/development/core/testing/wait-for-image-ready.js +2 -3
- package/development/core/testing/wait-for-render.js +2 -3
- package/development/date-input/date-input.component.d.ts +16 -1
- package/development/date-input/date-input.component.d.ts.map +1 -1
- package/development/date-input/date-input.component.js +28 -11
- package/development/datepicker/common/datepicker-button.d.ts +31 -20
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common/datepicker-button.js +103 -90
- package/development/datepicker/common.d.ts +0 -1
- package/development/datepicker/common.d.ts.map +1 -1
- package/development/datepicker/common.js +4 -6
- package/development/datepicker/datepicker/datepicker.component.d.ts +23 -102
- package/development/datepicker/datepicker/datepicker.component.d.ts.map +1 -1
- package/development/datepicker/datepicker/datepicker.component.js +94 -337
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts +2 -2
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.js +18 -6
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts +2 -2
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.d.ts.map +1 -1
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +18 -6
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts +6 -26
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.js +137 -224
- package/development/datepicker.js +3 -5
- package/development/dialog/dialog/dialog.component.d.ts +7 -16
- package/development/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/development/dialog/dialog/dialog.component.js +78 -149
- package/development/dialog/dialog-actions/dialog-actions.component.d.ts +2 -2
- package/development/dialog/dialog-actions/dialog-actions.component.d.ts.map +1 -1
- package/development/dialog/dialog-actions/dialog-actions.component.js +20 -17
- package/development/dialog/dialog-content/dialog-content.component.d.ts.map +1 -1
- package/development/dialog/dialog-content/dialog-content.component.js +5 -46
- package/development/dialog/dialog-title/dialog-title.component.d.ts +2 -26
- package/development/dialog/dialog-title/dialog-title.component.d.ts.map +1 -1
- package/development/dialog/dialog-title/dialog-title.component.js +12 -179
- package/development/divider/divider.component.js +2 -2
- package/development/expansion-panel/expansion-panel/expansion-panel.component.js +9 -13
- package/development/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +2 -2
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +5 -6
- package/development/file-selector/common/file-selector-common.js +2 -3
- package/development/file-selector/file-selector/file-selector.component.js +1 -1
- package/development/file-selector/file-selector-dropzone/file-selector-dropzone.component.js +1 -1
- package/development/flip-card/flip-card/flip-card.component.js +7 -13
- package/development/flip-card/flip-card-details/flip-card-details.component.js +3 -4
- package/development/flip-card/flip-card-summary/flip-card-summary.component.js +3 -4
- package/development/footer/footer.component.js +1 -1
- package/development/form-error/form-error.component.js +3 -4
- package/development/form-field/form-field/form-field.component.d.ts +1 -1
- package/development/form-field/form-field/form-field.component.d.ts.map +1 -1
- package/development/form-field/form-field/form-field.component.js +39 -67
- package/development/form-field/form-field-clear/form-field-clear.component.d.ts.map +1 -1
- package/development/form-field/form-field-clear/form-field-clear.component.js +6 -8
- package/development/header/common/header-action-common.js +1 -1
- package/development/header/header/header.component.js +5 -8
- package/development/header/header-button/header-button.component.js +1 -1
- package/development/header/header-link/header-link.component.js +1 -1
- package/development/icon/icon-base.d.ts +5 -3
- package/development/icon/icon-base.d.ts.map +1 -1
- package/development/icon/icon-base.js +4 -7
- package/development/icon/icon-name-mixin.js +1 -1
- package/development/icon/icon-request.js +2 -3
- package/development/icon/icon-validate.js +1 -1
- package/development/icon/icon.component.d.ts +1 -2
- package/development/icon/icon.component.d.ts.map +1 -1
- package/development/icon/icon.component.js +8 -19
- package/development/image/image.component.js +7 -9
- package/development/journey-header/journey-header.component.d.ts +5 -5
- package/development/journey-header/journey-header.component.d.ts.map +1 -1
- package/development/journey-header/journey-header.component.js +26 -40
- package/development/lead-container/lead-container.component.js +1 -1
- package/development/link/block-link/block-link.component.js +1 -1
- package/development/link/block-link-button/block-link-button.component.js +1 -1
- package/development/link/block-link-static/block-link-static.component.js +1 -1
- package/development/link/common/block-link-common.js +1 -1
- package/development/link/common/inline-link-common.js +1 -1
- package/development/link/link/link.component.js +1 -1
- package/development/link/link-button/link-button.component.js +1 -1
- package/development/link/link-static/link-static.component.js +1 -1
- package/development/link-common-DPLJx5Uo.js +1 -1
- package/development/link-list/common/link-list-base.js +1 -1
- package/development/link-list/link-list/link-list.component.js +1 -1
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +1 -1
- package/development/loading-indicator/loading-indicator.component.js +1 -1
- package/development/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
- package/development/logo/logo.component.js +1 -1
- package/development/map-container/map-container.component.js +2 -3
- package/development/menu/common/menu-action-common.js +1 -1
- package/development/menu/menu/menu.component.js +17 -25
- package/development/menu/menu-button/menu-button.component.js +1 -1
- package/development/menu/menu-link/menu-link.component.js +1 -1
- package/development/message/message.component.d.ts +4 -8
- package/development/message/message.component.d.ts.map +1 -1
- package/development/message/message.component.js +12 -54
- package/development/navigation/common/navigation-action-common.js +3 -5
- package/development/navigation/navigation/navigation.component.js +19 -35
- package/development/navigation/navigation-button/navigation-button.component.js +1 -1
- package/development/navigation/navigation-link/navigation-link.component.js +1 -1
- package/development/navigation/navigation-list/navigation-list.component.js +1 -1
- package/development/navigation/navigation-marker/navigation-marker.component.js +4 -6
- package/development/navigation/navigation-section/navigation-section.component.d.ts +1 -1
- package/development/navigation/navigation-section/navigation-section.component.d.ts.map +1 -1
- package/development/navigation/navigation-section/navigation-section.component.js +27 -37
- package/development/notification/notification.component.d.ts +7 -9
- package/development/notification/notification.component.d.ts.map +1 -1
- package/development/notification/notification.component.js +47 -77
- package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/development/option/optgroup/optgroup-base-element.js +8 -14
- package/development/option/optgroup/optgroup.component.js +6 -10
- package/development/option/option/option-base-element.js +3 -4
- package/development/option/option/option.component.js +7 -10
- package/development/overlay/overlay-base-element.d.ts +24 -6
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay-base-element.js +114 -15
- package/development/overlay/overlay.component.d.ts +2 -12
- package/development/overlay/overlay.component.d.ts.map +1 -1
- package/development/overlay/overlay.component.js +33 -98
- package/development/paginator/common/paginator-common.js +1 -1
- package/development/paginator/compact-paginator/compact-paginator.component.js +1 -1
- package/development/paginator/paginator/paginator.component.js +2 -3
- package/development/popover/popover/popover.component.d.ts +45 -34
- package/development/popover/popover/popover.component.d.ts.map +1 -1
- package/development/popover/popover/popover.component.js +215 -172
- package/development/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/development/popover/popover.js +2 -1
- package/development/popover.js +2 -1
- package/development/radio-button/common/radio-button-common.js +6 -10
- package/development/radio-button/radio-button/radio-button.component.js +2 -5
- package/development/radio-button/radio-button-group/radio-button-group.component.d.ts +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.component.d.ts.map +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.component.js +8 -24
- package/development/radio-button/radio-button-panel/radio-button-panel.component.js +3 -7
- package/development/screen-reader-only/screen-reader-only.component.js +1 -1
- package/development/select/select.component.js +26 -49
- package/development/selection-expansion-panel/selection-expansion-panel.component.js +7 -11
- package/development/sidebar/icon-sidebar/icon-sidebar.component.js +1 -1
- package/development/sidebar/icon-sidebar-button/icon-sidebar-button.component.js +1 -1
- package/development/sidebar/icon-sidebar-container/icon-sidebar-container.component.js +4 -7
- package/development/sidebar/icon-sidebar-content/icon-sidebar-content.component.js +1 -1
- package/development/sidebar/icon-sidebar-link/icon-sidebar-link.component.js +1 -1
- package/development/sidebar/sidebar/sidebar.component.js +9 -16
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts +0 -1
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts.map +1 -1
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.js +3 -8
- package/development/sidebar/sidebar-container/sidebar-container.component.js +9 -13
- package/development/sidebar/sidebar-content/sidebar-content.component.js +1 -1
- package/development/sidebar/sidebar-title/sidebar-title.component.d.ts +2 -0
- package/development/sidebar/sidebar-title/sidebar-title.component.d.ts.map +1 -1
- package/development/sidebar/sidebar-title/sidebar-title.component.js +3 -9
- package/development/signet/signet.component.js +1 -1
- package/development/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/development/skiplink-list/skiplink-list.component.js +19 -10
- package/development/slider/slider.component.js +4 -6
- package/development/status/status.component.d.ts +4 -7
- package/development/status/status.component.d.ts.map +1 -1
- package/development/status/status.component.js +23 -56
- package/development/stepper/step/step.component.d.ts +2 -1
- package/development/stepper/step/step.component.d.ts.map +1 -1
- package/development/stepper/step/step.component.js +16 -15
- package/development/stepper/step-label/step-label.component.d.ts +3 -3
- package/development/stepper/step-label/step-label.component.d.ts.map +1 -1
- package/development/stepper/step-label/step-label.component.js +16 -17
- package/development/stepper/stepper/stepper.component.js +16 -29
- package/development/table/table-wrapper/table-wrapper.component.js +2 -7
- package/development/tabs/tab/tab.component.js +1 -1
- package/development/tabs/tab-group/tab-group.component.js +23 -38
- package/development/tabs/tab-label/tab-label.component.js +1 -1
- package/development/tag/tag/tag.component.js +7 -13
- package/development/tag/tag-group/tag-group.component.js +5 -13
- package/development/teaser/teaser.component.d.ts +6 -10
- package/development/teaser/teaser.component.d.ts.map +1 -1
- package/development/teaser/teaser.component.js +48 -76
- package/development/teaser-hero/teaser-hero.component.js +1 -1
- package/development/teaser-product/common/teaser-product-common.js +1 -1
- package/development/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/development/teaser-product/teaser-product-static/teaser-product-static.component.js +1 -1
- package/development/time-input/time-input.component.js +10 -14
- package/development/timetable-occupancy/timetable-occupancy.component.js +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.js +2 -5
- package/development/title/title-base.d.ts +0 -8
- package/development/title/title-base.d.ts.map +1 -1
- package/development/title/title-base.js +17 -50
- package/development/title/title.component.d.ts +2 -0
- package/development/title/title.component.d.ts.map +1 -1
- package/development/title/title.component.js +9 -14
- package/development/toast/toast.component.d.ts.map +1 -1
- package/development/toast/toast.component.js +7 -16
- package/development/toggle/toggle/toggle.component.js +28 -30
- package/development/toggle/toggle-option/toggle-option.component.d.ts +1 -1
- package/development/toggle/toggle-option/toggle-option.component.d.ts.map +1 -1
- package/development/toggle/toggle-option/toggle-option.component.js +12 -19
- package/development/toggle-check/toggle-check.component.js +1 -1
- package/development/train/train/train.component.js +1 -1
- package/development/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/development/train/train-formation/train-formation.component.js +5 -7
- package/development/train/train-wagon/train-wagon.component.js +1 -1
- package/development/visual-checkbox/visual-checkbox.component.js +1 -1
- package/dialog/dialog/dialog.component.d.ts +7 -16
- package/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/dialog/dialog/dialog.component.js +57 -87
- package/dialog/dialog-actions/dialog-actions.component.d.ts +2 -2
- package/dialog/dialog-actions/dialog-actions.component.d.ts.map +1 -1
- package/dialog/dialog-actions/dialog-actions.component.js +16 -16
- package/dialog/dialog-content/dialog-content.component.d.ts.map +1 -1
- package/dialog/dialog-content/dialog-content.component.js +14 -19
- package/dialog/dialog-title/dialog-title.component.d.ts +2 -26
- package/dialog/dialog-title/dialog-title.component.d.ts.map +1 -1
- package/dialog/dialog-title/dialog-title.component.js +16 -111
- package/divider/divider.component.js +3 -3
- package/expansion-panel/expansion-panel/expansion-panel.component.js +5 -9
- package/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +30 -31
- package/file-selector/common/file-selector-common.js +1 -2
- package/flip-card/flip-card/flip-card.component.js +48 -54
- package/flip-card/flip-card-details/flip-card-details.component.js +15 -16
- package/flip-card/flip-card-summary/flip-card-summary.component.js +19 -20
- package/form-error/form-error.component.js +13 -14
- package/form-field/form-field/form-field.component.d.ts +1 -1
- package/form-field/form-field/form-field.component.d.ts.map +1 -1
- package/form-field/form-field/form-field.component.js +149 -168
- package/form-field/form-field-clear/form-field-clear.component.d.ts.map +1 -1
- package/form-field/form-field-clear/form-field-clear.component.js +19 -21
- package/header/header/header.component.js +26 -29
- package/icon/icon-base.d.ts +5 -3
- package/icon/icon-base.d.ts.map +1 -1
- package/icon/icon-base.js +32 -34
- package/icon/icon-request.js +10 -11
- package/icon/icon.component.d.ts +1 -2
- package/icon/icon.component.d.ts.map +1 -1
- package/icon/icon.component.js +37 -37
- package/icon-sidebar-button-common-CM-ueEhH.js +7 -0
- package/image/image.component.js +4 -6
- package/journey-header/journey-header.component.d.ts +5 -5
- package/journey-header/journey-header.component.d.ts.map +1 -1
- package/journey-header/journey-header.component.js +50 -63
- package/map-container/map-container.component.js +1 -2
- package/menu/menu/menu.component.js +47 -55
- package/message/message.component.d.ts +4 -8
- package/message/message.component.d.ts.map +1 -1
- package/message/message.component.js +18 -47
- package/navigation/common/navigation-action-common.js +19 -21
- package/navigation/navigation/navigation.component.js +73 -92
- package/navigation/navigation-marker/navigation-marker.component.js +26 -28
- package/navigation/navigation-section/navigation-section.component.d.ts +1 -1
- package/navigation/navigation-section/navigation-section.component.d.ts.map +1 -1
- package/navigation/navigation-section/navigation-section.component.js +72 -82
- package/notification/notification.component.d.ts +7 -9
- package/notification/notification.component.d.ts.map +1 -1
- package/notification/notification.component.js +77 -95
- package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/option/optgroup/optgroup-base-element.js +36 -38
- package/option/optgroup/optgroup.component.js +16 -20
- package/option/option/option-base-element.js +3 -4
- package/option/option/option.component.js +26 -29
- package/overlay/overlay-base-element.d.ts +24 -6
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay-base-element.js +98 -51
- package/overlay/overlay.component.d.ts +2 -12
- package/overlay/overlay.component.d.ts.map +1 -1
- package/overlay/overlay.component.js +57 -95
- package/package.json +1 -1
- package/paginator/paginator/paginator.component.js +3 -4
- package/popover/popover/popover.component.d.ts +45 -34
- package/popover/popover/popover.component.d.ts.map +1 -1
- package/popover/popover/popover.component.js +194 -168
- package/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/popover/popover.js +2 -1
- package/popover.js +5 -4
- package/radio-button/common/radio-button-common.js +11 -15
- package/radio-button/radio-button/radio-button.component.js +16 -19
- package/radio-button/radio-button-group/radio-button-group.component.d.ts +1 -1
- package/radio-button/radio-button-group/radio-button-group.component.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.component.js +27 -43
- package/radio-button/radio-button-panel/radio-button-panel.component.js +33 -37
- package/select/select.component.js +94 -117
- package/selection-expansion-panel/selection-expansion-panel.component.js +35 -39
- package/sidebar/common.js +1 -1
- package/sidebar/icon-sidebar-container/icon-sidebar-container.component.js +10 -13
- package/sidebar/sidebar/sidebar.component.js +62 -69
- package/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts +0 -1
- package/sidebar/sidebar-close-button/sidebar-close-button.component.d.ts.map +1 -1
- package/sidebar/sidebar-close-button/sidebar-close-button.component.js +18 -18
- package/sidebar/sidebar-container/sidebar-container.component.js +29 -33
- package/sidebar/sidebar-title/sidebar-title.component.d.ts +2 -0
- package/sidebar/sidebar-title/sidebar-title.component.d.ts.map +1 -1
- package/sidebar/sidebar-title/sidebar-title.component.js +16 -16
- package/sidebar.js +1 -1
- package/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/skiplink-list/skiplink-list.component.js +36 -39
- package/slider/slider.component.js +11 -13
- package/standard-theme.css +29 -26
- package/status/status.component.d.ts +4 -7
- package/status/status.component.d.ts.map +1 -1
- package/status/status.component.js +34 -50
- package/stepper/step/step.component.d.ts +2 -1
- package/stepper/step/step.component.d.ts.map +1 -1
- package/stepper/step/step.component.js +26 -24
- package/stepper/step-label/step-label.component.d.ts +3 -3
- package/stepper/step-label/step-label.component.d.ts.map +1 -1
- package/stepper/step-label/step-label.component.js +15 -15
- package/stepper/stepper/stepper.component.js +72 -86
- package/table/table-wrapper/table-wrapper.component.js +17 -18
- package/table.css +0 -25
- package/tabs/tab-group/tab-group.component.js +77 -92
- package/tabs/tab-label/tab-label.component.js +12 -12
- package/tag/tag/tag.component.js +49 -55
- package/tag/tag-group/tag-group.component.js +37 -45
- package/teaser/teaser.component.d.ts +6 -10
- package/teaser/teaser.component.d.ts.map +1 -1
- package/teaser/teaser.component.js +45 -68
- package/teaser-product/common.js +1 -1
- package/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/teaser-product-common-C8oSkIxy.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +29 -33
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +22 -25
- package/title/title-base.d.ts +0 -8
- package/title/title-base.d.ts.map +1 -1
- package/title/title-base.js +34 -53
- package/title/title.component.d.ts +2 -0
- package/title/title.component.d.ts.map +1 -1
- package/title/title.component.js +9 -9
- package/toast/toast.component.d.ts.map +1 -1
- package/toast/toast.component.js +6 -9
- package/toggle/toggle/toggle.component.js +36 -40
- package/toggle/toggle-option/toggle-option.component.d.ts +1 -1
- package/toggle/toggle-option/toggle-option.component.d.ts.map +1 -1
- package/toggle/toggle-option/toggle-option.component.js +44 -51
- package/train/train-formation/train-formation.component.js +41 -43
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +0 -530
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +0 -1123
- package/datepicker/common/datepicker-association-controllers.d.ts +0 -21
- package/datepicker/common/datepicker-association-controllers.d.ts.map +0 -1
- package/datepicker/common/datepicker-association-controllers.js +0 -58
- package/development/datepicker/common/datepicker-association-controllers.d.ts +0 -21
- package/development/datepicker/common/datepicker-association-controllers.d.ts.map +0 -1
- package/development/datepicker/common/datepicker-association-controllers.js +0 -82
- package/icon-sidebar-button-common-DG8bnrBu.js +0 -7
- package/teaser-product-common-CpMAlYEp.js +0 -5
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var O = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { css as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { isArrowKeyPressed as
|
|
10
|
-
import { SbbLanguageController as
|
|
11
|
-
import { isLean as
|
|
12
|
-
import { EventEmitter as
|
|
13
|
-
import { i18nSelectionRequired as
|
|
14
|
-
import { SbbRequiredMixin as
|
|
15
|
-
import { SbbChipElement as
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
var
|
|
19
|
-
let
|
|
20
|
-
var
|
|
4
|
+
var z = (s, a, r) => a.has(s) || O("Cannot " + r);
|
|
5
|
+
var _ = (s, a, r) => (z(s, a, "read from private field"), r ? r.call(s) : a.get(s)), f = (s, a, r) => a.has(s) ? O("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(s) : a.set(s, r), m = (s, a, r, h) => (z(s, a, "write to private field"), h ? h.call(s, r) : a.set(s, r), r);
|
|
6
|
+
import { __esDecorate as b, __runInitializers as c } from "tslib";
|
|
7
|
+
import { css as F, LitElement as T, isServer as v, html as W } from "lit";
|
|
8
|
+
import { customElement as q, property as y } from "lit/decorators.js";
|
|
9
|
+
import { isArrowKeyPressed as L, getNextElementIndex as M } from "../../core/a11y.js";
|
|
10
|
+
import { SbbLanguageController as V } from "../../core/controllers.js";
|
|
11
|
+
import { isLean as R } from "../../core/dom.js";
|
|
12
|
+
import { EventEmitter as g } from "../../core/eventing.js";
|
|
13
|
+
import { i18nSelectionRequired as B, i18nChipGroupInputDescription as N } from "../../core/i18n.js";
|
|
14
|
+
import { SbbRequiredMixin as G, SbbDisabledMixin as $, SbbNegativeMixin as j, SbbFormAssociatedMixin as U, SbbElementInternalsMixin as J } from "../../core/mixins.js";
|
|
15
|
+
import { SbbChipElement as H } from "../chip.js";
|
|
16
|
+
const P = F`*,:before,:after{box-sizing:border-box}:host{--sbb-chip-group-input-min-width: 9.375rem;max-width:100%}:host([data-size=s]:not([data-empty])){--sbb-chip-group-margin-block: .375rem .3125rem}@media (min-width: 52.5rem){:host([data-size=s]:not([data-empty])){--sbb-chip-group-margin-block: .3125rem .1875rem}}::slotted(input){flex:1 1 var(--sbb-chip-group-input-min-width)}::slotted(sbb-chip){max-width:100%}.sbb-chip-group{width:100%;display:flex;flex-wrap:wrap;gap:var(--sbb-spacing-fixed-1x);align-items:center;margin-block:var(--sbb-chip-group-margin-block)}`;
|
|
17
|
+
let ot = (() => {
|
|
18
|
+
var p, u, l;
|
|
19
|
+
let s = [q("sbb-chip-group")], a, r = [], h, E = G($(j(U(J(T))))), C = [], x, w, S = [], k = [], A, I = [], D = [];
|
|
20
|
+
var d = (l = class extends E {
|
|
21
21
|
constructor() {
|
|
22
|
-
var t, e;
|
|
23
22
|
super();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
f(this, p);
|
|
24
|
+
f(this, u);
|
|
25
|
+
m(this, p, (c(this, C), c(this, S, null))), m(this, u, (c(this, k), c(this, I, ["Enter"]))), this._change = (c(this, D), new g(this, d.events.change)), this._input = new g(this, d.events.input), this._chipInputTokenEnd = new g(this, d.events.chipInputTokenEnd), this._inputAttributeObserver = v ? null : new MutationObserver(() => this._reactToInputChanges()), this._formFieldAttributeObserver = v ? null : new MutationObserver(() => this._inheritSize()), this._language = new V(this), this.addEventListener?.(H.events.requestDelete, (t) => this._deleteChip(t.target)), this.addEventListener?.("keydown", (t) => this._onChipKeyDown(t));
|
|
27
26
|
}
|
|
28
27
|
/** Value of the form element. */
|
|
29
28
|
set value(t) {
|
|
@@ -31,31 +30,28 @@ let ut = (() => {
|
|
|
31
30
|
const e = this.value, i = [...e];
|
|
32
31
|
for (const n of t)
|
|
33
32
|
i.includes(n) && i.splice(i.indexOf(n), 1);
|
|
34
|
-
i.forEach((n) =>
|
|
35
|
-
|
|
36
|
-
return (p = this._chipElements().find((_) => _.value === n)) == null ? void 0 : p.remove();
|
|
37
|
-
});
|
|
38
|
-
const s = [...t];
|
|
33
|
+
i.forEach((n) => this._chipElements().find((K) => K.value === n)?.remove());
|
|
34
|
+
const o = [...t];
|
|
39
35
|
for (const n of e)
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
o.includes(n) && o.splice(o.indexOf(n), 1);
|
|
37
|
+
o.forEach((n) => this._createChipElement(n));
|
|
42
38
|
}
|
|
43
39
|
get value() {
|
|
44
40
|
return this._chipElements().map((t) => t.value);
|
|
45
41
|
}
|
|
46
42
|
/** Function that maps a chip's value to its display value. */
|
|
47
43
|
get displayWith() {
|
|
48
|
-
return
|
|
44
|
+
return _(this, p);
|
|
49
45
|
}
|
|
50
46
|
set displayWith(t) {
|
|
51
|
-
|
|
47
|
+
m(this, p, t);
|
|
52
48
|
}
|
|
53
49
|
/** The array of keys that will trigger a `chipInputTokenEnd` event. Default `['Enter']` */
|
|
54
50
|
get separatorKeys() {
|
|
55
|
-
return
|
|
51
|
+
return _(this, u);
|
|
56
52
|
}
|
|
57
53
|
set separatorKeys(t) {
|
|
58
|
-
|
|
54
|
+
m(this, u, t);
|
|
59
55
|
}
|
|
60
56
|
connectedCallback() {
|
|
61
57
|
super.connectedCallback(), this._setupComponent();
|
|
@@ -82,37 +78,33 @@ let ut = (() => {
|
|
|
82
78
|
return super.shouldValidate(t) || t === "required" || t === "value";
|
|
83
79
|
}
|
|
84
80
|
validate() {
|
|
85
|
-
super.validate(), this.required && this.value.length === 0 ? this.setValidityFlag("valueMissing",
|
|
81
|
+
super.validate(), this.required && this.value.length === 0 ? this.setValidityFlag("valueMissing", B[this._language.current]) : this.removeValidityFlag("valueMissing");
|
|
86
82
|
}
|
|
87
83
|
/** Return the list of chip elements **/
|
|
88
84
|
_chipElements() {
|
|
89
|
-
|
|
90
|
-
return Array.from(((t = this.querySelectorAll) == null ? void 0 : t.call(this, "sbb-chip")) ?? []);
|
|
85
|
+
return Array.from(this.querySelectorAll?.("sbb-chip") ?? []);
|
|
91
86
|
}
|
|
92
87
|
/** Return the list of enabled chip elements **/
|
|
93
88
|
_enabledChipElements() {
|
|
94
|
-
|
|
95
|
-
return Array.from(((t = this.querySelectorAll) == null ? void 0 : t.call(this, "sbb-chip:not([disabled])")) ?? []);
|
|
89
|
+
return Array.from(this.querySelectorAll?.("sbb-chip:not([disabled])") ?? []);
|
|
96
90
|
}
|
|
97
91
|
_setupComponent() {
|
|
98
|
-
var i, s, n, p, _;
|
|
99
92
|
const t = this.querySelector("input");
|
|
100
|
-
t && t !== this._inputElement && (
|
|
93
|
+
t && t !== this._inputElement && (this._inputAbortController?.abort(), this._inputAttributeObserver?.disconnect(), this._inputElement = t, this._inputAbortController = new AbortController(), this._inputElement.addEventListener("keydown", (i) => this._onInputKeyDown(i), {
|
|
101
94
|
signal: this._inputAbortController.signal
|
|
102
|
-
}), this._inputElement.addEventListener("inputAutocomplete", (
|
|
103
|
-
|
|
104
|
-
this._createChipFromInput("autocomplete", (F = v.detail) == null ? void 0 : F.option.value);
|
|
95
|
+
}), this._inputElement.addEventListener("inputAutocomplete", (i) => {
|
|
96
|
+
this._createChipFromInput("autocomplete", i.detail?.option.value);
|
|
105
97
|
}, {
|
|
106
98
|
signal: this._inputAbortController.signal
|
|
107
|
-
}),
|
|
99
|
+
}), this._inputAttributeObserver?.observe(this._inputElement, {
|
|
108
100
|
attributes: !0,
|
|
109
101
|
attributeFilter: ["readonly", "disabled"]
|
|
110
|
-
})), this._inheritSize(),
|
|
102
|
+
})), this._inheritSize(), this._formFieldAttributeObserver?.disconnect();
|
|
111
103
|
const e = this.closest("sbb-form-field");
|
|
112
|
-
e &&
|
|
104
|
+
e && this._formFieldAttributeObserver?.observe(e, {
|
|
113
105
|
attributes: !0,
|
|
114
106
|
attributeFilter: ["size"]
|
|
115
|
-
})
|
|
107
|
+
}), this.toggleAttribute("data-empty", this.value.length === 0), this._reactToInputChanges(), this._updateInputDescription(), this.updateFormValue();
|
|
116
108
|
}
|
|
117
109
|
/**
|
|
118
110
|
* Listen for keyboard events on the chip elements
|
|
@@ -120,9 +112,9 @@ let ut = (() => {
|
|
|
120
112
|
_onChipKeyDown(t) {
|
|
121
113
|
const e = t.target;
|
|
122
114
|
if (e.localName === "sbb-chip") {
|
|
123
|
-
if (
|
|
124
|
-
const i = this._enabledChipElements(),
|
|
125
|
-
i[
|
|
115
|
+
if (L(t)) {
|
|
116
|
+
const i = this._enabledChipElements(), o = M(t, i.indexOf(e), i.length);
|
|
117
|
+
i[o].focus();
|
|
126
118
|
return;
|
|
127
119
|
}
|
|
128
120
|
switch (t.key) {
|
|
@@ -152,18 +144,17 @@ let ut = (() => {
|
|
|
152
144
|
* If the input is not empty, create a chip with its value
|
|
153
145
|
*/
|
|
154
146
|
_createChipFromInput(t = "input", e) {
|
|
155
|
-
var n;
|
|
156
147
|
const i = e ?? this._inputElement.value.trim();
|
|
157
148
|
if (!i)
|
|
158
149
|
return;
|
|
159
|
-
const
|
|
150
|
+
const o = {
|
|
160
151
|
origin: t,
|
|
161
152
|
value: i,
|
|
162
|
-
label: (e ?
|
|
163
|
-
setValue: (
|
|
164
|
-
setLabel: (
|
|
153
|
+
label: (e ? this.displayWith?.(e) : null) ?? void 0,
|
|
154
|
+
setValue: (n) => o.value = n,
|
|
155
|
+
setLabel: (n) => o.label = n
|
|
165
156
|
};
|
|
166
|
-
this._chipInputTokenEnd.emit(
|
|
157
|
+
this._chipInputTokenEnd.emit(o) && (this._createChipElement(o.value, o.label), this._inputElement.value = "", this._emitInputEvents());
|
|
167
158
|
}
|
|
168
159
|
_deleteChip(t) {
|
|
169
160
|
const e = this._enabledChipElements();
|
|
@@ -174,7 +165,6 @@ let ut = (() => {
|
|
|
174
165
|
* @param index The index of the enabled chip. If null, focus the last one.
|
|
175
166
|
*/
|
|
176
167
|
_focusChip(t) {
|
|
177
|
-
var i;
|
|
178
168
|
const e = this._enabledChipElements();
|
|
179
169
|
if (t !== void 0 && e[t]) {
|
|
180
170
|
e[t].focus();
|
|
@@ -184,58 +174,54 @@ let ut = (() => {
|
|
|
184
174
|
e[e.length - 1].focus();
|
|
185
175
|
return;
|
|
186
176
|
}
|
|
187
|
-
|
|
177
|
+
this._inputElement?.focus();
|
|
188
178
|
}
|
|
189
179
|
_emitInputEvents() {
|
|
190
180
|
this._input.emit(), this._change.emit();
|
|
191
181
|
}
|
|
192
182
|
_createChipElement(t, e) {
|
|
193
|
-
|
|
194
|
-
if (E)
|
|
183
|
+
if (v)
|
|
195
184
|
return;
|
|
196
185
|
const i = document.createElement("sbb-chip");
|
|
197
|
-
i.value = t, i.innerText = e ?? (t ?
|
|
186
|
+
i.value = t, i.innerText = e ?? (t ? this.displayWith?.(t) : null) ?? "", this.insertBefore(i, this._inputElement ?? this.querySelector("input"));
|
|
198
187
|
}
|
|
199
188
|
_reactToInputChanges() {
|
|
200
|
-
|
|
201
|
-
this.disabled = ((t = this._inputElement) == null ? void 0 : t.disabled) ?? !1, this._proxyStateToChips();
|
|
189
|
+
this.disabled = this._inputElement?.disabled ?? !1, this._proxyStateToChips();
|
|
202
190
|
}
|
|
203
191
|
_proxyStateToChips() {
|
|
204
192
|
this._chipElements().forEach((t) => {
|
|
205
|
-
|
|
206
|
-
t.disabled = this.disabled || this.formDisabled, t.readOnly = ((e = this._inputElement) == null ? void 0 : e.hasAttribute("readonly")) ?? !1, t.negative = this.negative;
|
|
193
|
+
t.disabled = this.disabled || this.formDisabled, t.readOnly = this._inputElement?.hasAttribute("readonly") ?? !1, t.negative = this.negative;
|
|
207
194
|
});
|
|
208
195
|
}
|
|
209
196
|
_inheritSize() {
|
|
210
|
-
|
|
211
|
-
this.setAttribute("data-size", ((t = this.closest("sbb-form-field")) == null ? void 0 : t.size) ?? (G() ? "s" : "m"));
|
|
197
|
+
this.setAttribute("data-size", this.closest("sbb-form-field")?.size ?? (R() ? "s" : "m"));
|
|
212
198
|
}
|
|
213
199
|
_updateInputDescription() {
|
|
214
|
-
this._inputElement && this._inputElement.setAttribute("aria-description", `${
|
|
200
|
+
this._inputElement && this._inputElement.setAttribute("aria-description", `${N[this._language.current]} ${this.value.length}`);
|
|
215
201
|
}
|
|
216
202
|
render() {
|
|
217
|
-
return
|
|
203
|
+
return W`
|
|
218
204
|
<div class="sbb-chip-group">
|
|
219
205
|
<slot @slotchange=${this._setupComponent}></slot>
|
|
220
206
|
</div>
|
|
221
207
|
`;
|
|
222
208
|
}
|
|
223
|
-
},
|
|
224
|
-
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
225
|
-
|
|
209
|
+
}, p = new WeakMap(), u = new WeakMap(), h = l, (() => {
|
|
210
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(E[Symbol.metadata] ?? null) : void 0;
|
|
211
|
+
x = [y({ type: Array })], w = [y({ attribute: !1 })], A = [y({ attribute: "separator-keys", type: Array })], b(l, null, x, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (e) => "value" in e, set: (e, i) => {
|
|
226
212
|
e.value = i;
|
|
227
|
-
} }, metadata: t }, null,
|
|
213
|
+
} }, metadata: t }, null, C), b(l, null, w, { kind: "accessor", name: "displayWith", static: !1, private: !1, access: { has: (e) => "displayWith" in e, get: (e) => e.displayWith, set: (e, i) => {
|
|
228
214
|
e.displayWith = i;
|
|
229
|
-
} }, metadata: t },
|
|
215
|
+
} }, metadata: t }, S, k), b(l, null, A, { kind: "accessor", name: "separatorKeys", static: !1, private: !1, access: { has: (e) => "separatorKeys" in e, get: (e) => e.separatorKeys, set: (e, i) => {
|
|
230
216
|
e.separatorKeys = i;
|
|
231
|
-
} }, metadata: t },
|
|
232
|
-
})(),
|
|
217
|
+
} }, metadata: t }, I, D), b(null, a = { value: h }, s, { kind: "class", name: h.name, metadata: t }, null, r), d = h = a.value, t && Object.defineProperty(h, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
218
|
+
})(), l.role = "listbox", l.styles = P, l.events = {
|
|
233
219
|
input: "input",
|
|
234
220
|
change: "change",
|
|
235
221
|
chipInputTokenEnd: "chipInputTokenEnd"
|
|
236
|
-
},
|
|
237
|
-
return
|
|
222
|
+
}, c(h, r), l);
|
|
223
|
+
return d = h;
|
|
238
224
|
})();
|
|
239
225
|
export {
|
|
240
|
-
|
|
226
|
+
ot as SbbChipGroupElement
|
|
241
227
|
};
|
package/clock/clock.component.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var M = (s) => {
|
|
2
|
+
throw TypeError(s);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __runInitializers as m, __esDecorate as
|
|
7
|
-
import { css as
|
|
8
|
-
import { customElement as
|
|
4
|
+
var p = (s, n, e) => n.has(s) || M("Cannot " + e);
|
|
5
|
+
var g = (s, n, e) => (p(s, n, "read from private field"), e ? e.call(s) : n.get(s)), H = (s, n, e) => n.has(s) ? M("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(s) : n.set(s, e), h = (s, n, e, i) => (p(s, n, "write to private field"), i ? i.call(s, e) : n.set(s, e), e);
|
|
6
|
+
import { __runInitializers as m, __esDecorate as y } from "tslib";
|
|
7
|
+
import { css as E, LitElement as A, isServer as z, html as O } from "lit";
|
|
8
|
+
import { customElement as T, property as I } from "lit/decorators.js";
|
|
9
9
|
import { ref as _ } from "lit/directives/ref.js";
|
|
10
|
-
const
|
|
11
|
-
`,
|
|
12
|
-
`,
|
|
13
|
-
`,
|
|
14
|
-
`,
|
|
10
|
+
const N = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><g class="face"><circle fill="#FFF" cx="52.5" cy="52.5" r="52.5"/><path d="M50.75 4h3.5v12h-3.5zM50.75 89h3.5v12h-3.5zM75.233 9.623l3.03 1.75-6 10.392-3.03-1.75zM32.734 83.233l3.03 1.75-6 10.392-3.03-1.75zM93.628 26.732l1.75 3.031-10.392 6-1.75-3.03zM20.017 69.234l1.75 3.031-10.392 6-1.75-3.03zM101 50.75v3.5H89v-3.5zM16 50.75v3.5H4v-3.5zM95.379 75.232l-1.75 3.031-10.392-6 1.75-3.03zM21.766 32.734l-1.75 3.031-10.392-6 1.75-3.03zM78.267 93.63l-3.03 1.75-6-10.393 3.03-1.75zM35.766 20.015l-3.03 1.75-6-10.392 3.03-1.75z"/><g><path d="M56.873 4.19l1.392.147-.366 3.48-1.392-.145zM47.101 97.177l1.393.146-.366 3.481-1.392-.146zM61.896 4.914l1.37.29-.728 3.424-1.37-.29zM42.458 96.366l1.37.29-.728 3.424-1.37-.291zM66.825 6.157l1.332.432-1.082 3.33-1.331-.434zM37.931 95.085l1.332.432-1.082 3.33-1.331-.433zM71.584 7.906l1.28.569-1.424 3.197-1.28-.57zM33.56 93.32l1.278.569-1.423 3.197-1.28-.57zM80.44 12.852l1.133.823-2.058 2.831-1.132-.823zM25.481 88.494l1.133.822-2.057 2.832-1.133-.823zM84.43 15.986l1.04.937-2.342 2.6-1.04-.936zM21.87 85.469l1.04.936-2.341 2.601-1.04-.937zM88.072 19.522l.937 1.04-2.6 2.343-.937-1.04zM18.593 82.088l.937 1.04-2.601 2.342-.937-1.04zM91.328 23.425l.823 1.133-2.832 2.057-.823-1.132zM15.684 78.385l.823 1.132-2.832 2.058-.822-1.133zM96.52 32.128l.57 1.279-3.198 1.423-.57-1.278zM11.109 70.161l.569 1.279-3.197 1.423-.57-1.279zM98.407 36.85l.433 1.332-3.33 1.081-.432-1.331zM9.483 65.74l.432 1.33-3.329 1.082-.432-1.331zM99.795 41.726l.291 1.37-3.423.727-.29-1.37zM8.34 61.17l.292 1.37-3.424.728-.29-1.37zM100.66 46.73l.146 1.393-3.48.366-.147-1.392zM7.674 56.506l.146 1.392-3.48.366-.147-1.392zM100.811 56.873l-.146 1.392-3.48-.365.145-1.393zM7.821 47.101l-.146 1.392-3.48-.365.145-1.393zM100.09 61.895l-.291 1.369-3.424-.728.291-1.369zM8.631 42.46l-.291 1.37-3.423-.728.29-1.37zM98.84 66.827l-.432 1.331-3.329-1.081.433-1.332zM9.918 37.93l-.433 1.331-3.329-1.082.433-1.331zM97.098 71.585l-.569 1.28-3.197-1.424.57-1.28zM11.677 33.558l-.57 1.28-3.197-1.424.57-1.279zM92.149 80.439l-.823 1.133-2.832-2.058.823-1.132zM16.506 25.482l-.823 1.133-2.831-2.057.823-1.133zM89.017 84.431l-.937 1.04-2.6-2.341.936-1.04zM19.528 21.869l-.936 1.04-2.601-2.342.936-1.04zM85.48 88.076l-1.041.936-2.342-2.6 1.04-.937zM22.91 18.59l-1.04.937-2.341-2.601 1.04-.937zM81.574 91.328l-1.133.823-2.057-2.831 1.132-.823zM26.617 15.684l-1.133.823-2.057-2.832 1.132-.823zM72.873 96.524l-1.279.57-1.423-3.198 1.278-.57zM34.838 11.105l-1.279.57-1.423-3.198 1.279-.57zM68.151 98.405l-1.331.432-1.082-3.329 1.332-.432zM39.259 9.485l-1.332.433-1.081-3.33 1.331-.432zM63.272 99.799l-1.369.29-.728-3.422 1.37-.291zM43.83 8.337l-1.369.291-.727-3.423 1.37-.291zM58.27 100.662l-1.393.146-.366-3.48 1.393-.147zM48.494 7.672l-1.392.147-.366-3.481 1.392-.147z"/></g></g></svg>
|
|
11
|
+
`, P = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path id="mod_clock_svg_hours" d="M55.7 64.5h-6.4l.6-44h5.2z"/></svg>
|
|
12
|
+
`, F = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M55.1,64.5h-5.2l0.8-58h3.6L55.1,64.5z"/></svg>
|
|
13
|
+
`, x = `<svg focusable="false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 105 105"><path d="M57.8,21.3c0-2.9-2.4-5.2-5.2-5.2s-5.3,2.3-5.3,5.2c0,2.7,2,4.8,4.5,5.2V69h1.5V26.5C55.8,26.2,57.8,24,57.8,21.3z"/></svg>
|
|
14
|
+
`, U = E`*,:before,:after{box-sizing:border-box}:host{--sbb-clock-hours-animation-start-angle: 0deg;--sbb-clock-seconds-animation-start-angle: 0deg;--sbb-clock-hours-animation-duration: 0s;--sbb-clock-seconds-animation-duration: 0s;--sbb-clock-animation-play-state: paused;--sbb-clock-seconds-hand-color: var(--sbb-color-red);display:block}.sbb-clock{position:relative;width:100%;height:100%;aspect-ratio:1/1;overflow:hidden;contain:content}.sbb-clock__face,.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds{position:absolute;inset:0;transform-origin:center center;transform:rotate(0);transform-style:preserve-3d;backface-visibility:hidden}.sbb-clock__hand-minutes{transition:transform var(--sbb-disable-animation-duration, .2s) cubic-bezier(.4,2.08,.55,.44)}@supports not (aspect-ratio: 1/1){.sbb-clock__hand-minutes{transform-origin:50% 49.625%}}.sbb-clock__hand-hours{animation-name:rotate;animation-duration:43200s;animation-iteration-count:infinite;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state)}.sbb-clock__hand-hours--initial-hour{animation-name:hand-hours-animation-initial-hour;animation-duration:var(--sbb-clock-hours-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}.sbb-clock__hand-minutes--no-transition{transition:none}.sbb-clock__hand-seconds{animation-name:hand-seconds-animation;animation-duration:60s;animation-timing-function:linear;animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:infinite;fill:var(--sbb-clock-seconds-hand-color)}.sbb-clock__hand-seconds--initial-minute{animation-name:hand-seconds-animation-initial-minute;animation-duration:var(--sbb-clock-seconds-animation-duration);animation-play-state:var(--sbb-clock-animation-play-state);animation-iteration-count:1}:host(:not([data-initialized])) :is(.sbb-clock__hand-hours,.sbb-clock__hand-minutes,.sbb-clock__hand-seconds){display:none}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes hand-hours-animation-initial-hour{0%{transform:rotate(var(--sbb-clock-hours-animation-start-angle))}to{transform:rotate(360deg)}}@keyframes hand-seconds-animation{0%{transform:rotate(0)}97.5%,to{transform:rotate(360deg)}}@keyframes hand-seconds-animation-initial-minute{0%{transform:rotate(var(--sbb-clock-seconds-animation-start-angle))}97.5%,to{transform:rotate(360deg)}}`, $ = 12, D = 60, f = 60, V = 50, S = 360, w = 30, G = 6, R = 360 / 58.5, B = 60, L = 3600, K = L / 2, C = {
|
|
15
15
|
once: !0,
|
|
16
16
|
passive: !0
|
|
17
17
|
};
|
|
18
|
-
let
|
|
19
|
-
var
|
|
20
|
-
let
|
|
21
|
-
return
|
|
18
|
+
let X = (() => {
|
|
19
|
+
var c, o;
|
|
20
|
+
let s = [T("sbb-clock")], n, e = [], i, u = A, b, k = [], v = [];
|
|
21
|
+
return o = class extends u {
|
|
22
22
|
constructor() {
|
|
23
23
|
super(...arguments);
|
|
24
|
-
|
|
25
|
-
h(this,
|
|
24
|
+
H(this, c);
|
|
25
|
+
h(this, c, m(this, k, null)), this._state = (m(this, v), "paused"), this._moveHoursHandFn = () => this._moveHoursHand(), this._moveMinutesHandFn = () => this._moveMinutesHand(), this._handlePageVisibilityChange = async () => {
|
|
26
26
|
this.now || (document.visibilityState === "hidden" ? await this._stopClock() : await this._startClock());
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -31,19 +31,19 @@ let it = (() => {
|
|
|
31
31
|
* @param value HH:MM:ss
|
|
32
32
|
*/
|
|
33
33
|
get now() {
|
|
34
|
-
return
|
|
34
|
+
return g(this, c);
|
|
35
35
|
}
|
|
36
36
|
set now(t) {
|
|
37
|
-
h(this,
|
|
37
|
+
h(this, c, t);
|
|
38
38
|
}
|
|
39
39
|
connectedCallback() {
|
|
40
|
-
super.connectedCallback(), this._resetIntervalId = setInterval(() => this._resetClock(),
|
|
40
|
+
super.connectedCallback(), this._resetIntervalId = setInterval(() => this._resetClock(), K * 1e3);
|
|
41
41
|
}
|
|
42
42
|
willUpdate(t) {
|
|
43
|
-
super.willUpdate(t), !
|
|
43
|
+
super.willUpdate(t), !z && t.has("now") && this._startOrConfigureClock();
|
|
44
44
|
}
|
|
45
45
|
firstUpdated(t) {
|
|
46
|
-
super.firstUpdated(t),
|
|
46
|
+
super.firstUpdated(t), z || (document.addEventListener("visibilitychange", this._handlePageVisibilityChange, !1), this._startOrConfigureClock());
|
|
47
47
|
}
|
|
48
48
|
disconnectedCallback() {
|
|
49
49
|
super.disconnectedCallback(), this._removeEventListeners(), clearInterval(this._resetIntervalId);
|
|
@@ -53,16 +53,13 @@ let it = (() => {
|
|
|
53
53
|
}
|
|
54
54
|
/** Starts the clock by defining the hands starting position then starting the animations. */
|
|
55
55
|
async _startClock() {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this._setHandsStartingPosition(), (a = this.style) == null || a.setProperty("--sbb-clock-animation-play-state", "running"), this._state = "running", o();
|
|
60
|
-
}, Z));
|
|
56
|
+
this._clockHandHours?.addEventListener("animationend", this._moveHoursHandFn, C), this._clockHandSeconds?.addEventListener("animationend", this._moveMinutesHandFn, C), await new Promise((t) => setTimeout(() => {
|
|
57
|
+
this._setHandsStartingPosition(), this.style?.setProperty("--sbb-clock-animation-play-state", "running"), this._state = "running", t();
|
|
58
|
+
}, V));
|
|
61
59
|
}
|
|
62
60
|
/** Stops the clock by removing all the animations. */
|
|
63
61
|
async _stopClock() {
|
|
64
|
-
|
|
65
|
-
clearInterval(this._handMovement), this._removeSecondsAnimationStyles(), this._removeHoursAnimationStyles(), (t = this._clockHandHours) == null || t.removeEventListener("animationend", this._moveHoursHandFn), (s = this._clockHandSeconds) == null || s.removeEventListener("animationend", this._moveMinutesHandFn), (o = this._clockHandMinutes) == null || o.classList.add("sbb-clock__hand-minutes--no-transition"), (a = this.style) == null || a.setProperty("--sbb-clock-animation-play-state", "paused"), this._state = "paused";
|
|
62
|
+
clearInterval(this._handMovement), this._removeSecondsAnimationStyles(), this._removeHoursAnimationStyles(), this._clockHandHours?.removeEventListener("animationend", this._moveHoursHandFn), this._clockHandSeconds?.removeEventListener("animationend", this._moveMinutesHandFn), this._clockHandMinutes?.classList.add("sbb-clock__hand-minutes--no-transition"), this.style?.setProperty("--sbb-clock-animation-play-state", "paused"), this._state = "paused";
|
|
66
63
|
}
|
|
67
64
|
/**
|
|
68
65
|
* As a fallback measure to prevent de-sync, reset the clock to the system time.
|
|
@@ -72,33 +69,29 @@ let it = (() => {
|
|
|
72
69
|
}
|
|
73
70
|
/** Set the starting position for the three hands on the clock face. */
|
|
74
71
|
_setHandsStartingPosition() {
|
|
75
|
-
var M, p, g, H, y, f;
|
|
76
72
|
this._assignCurrentTime();
|
|
77
|
-
const t =
|
|
78
|
-
let
|
|
79
|
-
t > 0 && (
|
|
73
|
+
const t = f - this._seconds, a = D - this._minutes, l = $ - this._hours;
|
|
74
|
+
let r = 0, d = 0;
|
|
75
|
+
t > 0 && (r += t, d = 1), a > 0 && (r += (a - d) * B, d = 1), l > 0 && (r += (l - d) * L), this.style?.setProperty("--sbb-clock-hours-animation-start-angle", `${Math.ceil(this._hours * w + this._minutes / 2)}deg`), this.style?.setProperty("--sbb-clock-hours-animation-duration", `${r}s`), this.style?.setProperty("--sbb-clock-seconds-animation-start-angle", `${Math.ceil(this._seconds * R)}deg`), this.style?.setProperty("--sbb-clock-seconds-animation-duration", `${t}s`), this._setMinutesHand(), this._clockHandSeconds?.classList.add("sbb-clock__hand-seconds--initial-minute"), this._clockHandHours?.classList.add("sbb-clock__hand-hours--initial-hour"), this.toggleAttribute("data-initialized", !0);
|
|
80
76
|
}
|
|
81
77
|
/** Given the current date, calculates the hh/mm/ss values and the hh/mm/ss left to the next midnight. */
|
|
82
78
|
_assignCurrentTime() {
|
|
83
|
-
const t = this.now ? null : /* @__PURE__ */ new Date(), [
|
|
84
|
-
this._hours =
|
|
79
|
+
const t = this.now ? null : /* @__PURE__ */ new Date(), [a, l, r] = t ? [t.getHours(), t.getMinutes(), t.getSeconds()] : this.now.split(":").map((d) => +d);
|
|
80
|
+
this._hours = a % 12, this._minutes = l, this._seconds = r;
|
|
85
81
|
}
|
|
86
82
|
/** Set the starting position for the minutes hand. */
|
|
87
83
|
_setMinutesHand() {
|
|
88
|
-
|
|
89
|
-
(t = this._clockHandMinutes) == null || t.style.setProperty("transform", `rotateZ(${Math.ceil(this._minutes * q)}deg)`);
|
|
84
|
+
this._clockHandMinutes?.style.setProperty("transform", `rotateZ(${Math.ceil(this._minutes * G)}deg)`);
|
|
90
85
|
}
|
|
91
86
|
/** Move the hours hand to the next value. */
|
|
92
87
|
_moveHoursHand() {
|
|
93
|
-
var s;
|
|
94
88
|
this._removeHoursAnimationStyles();
|
|
95
|
-
let t = Math.ceil(this._hours *
|
|
96
|
-
t >=
|
|
89
|
+
let t = Math.ceil(this._hours * w + this._minutes / 2);
|
|
90
|
+
t >= S && (t -= S), this._clockHandHours?.style.setProperty("transform", `rotateZ(${t}deg)`);
|
|
97
91
|
}
|
|
98
92
|
/** Move the minutes hand to the next value. */
|
|
99
93
|
_moveMinutesHand() {
|
|
100
|
-
|
|
101
|
-
(t = this._clockHandSeconds) == null || t.removeEventListener("animationend", this._moveMinutesHandFn), this._removeSecondsAnimationStyles(), this._addMinutesAndSetHands(), this._handMovement = setInterval(() => this._addMinutesAndSetHands(), A * 1e3);
|
|
94
|
+
this._clockHandSeconds?.removeEventListener("animationend", this._moveMinutesHandFn), this._removeSecondsAnimationStyles(), this._addMinutesAndSetHands(), this._handMovement = setInterval(() => this._addMinutesAndSetHands(), f * 1e3);
|
|
102
95
|
}
|
|
103
96
|
_addMinutesAndSetHands() {
|
|
104
97
|
this._minutes++, this._setMinutesHand();
|
|
@@ -112,38 +105,35 @@ let it = (() => {
|
|
|
112
105
|
this._clockHandSeconds && (this._clockHandSeconds.style.animation = "", this._clockHandSeconds.offsetHeight, this._clockHandSeconds.style.removeProperty("animation"));
|
|
113
106
|
}
|
|
114
107
|
_removeEventListeners() {
|
|
115
|
-
|
|
116
|
-
document == null || document.removeEventListener("visibilitychange", this._handlePageVisibilityChange), (t = this._clockHandHours) == null || t.removeEventListener("animationend", this._moveHoursHandFn), (s = this._clockHandSeconds) == null || s.removeEventListener("animationend", this._moveMinutesHandFn), clearInterval(this._handMovement);
|
|
108
|
+
document?.removeEventListener("visibilitychange", this._handlePageVisibilityChange), this._clockHandHours?.removeEventListener("animationend", this._moveHoursHandFn), this._clockHandSeconds?.removeEventListener("animationend", this._moveMinutesHandFn), clearInterval(this._handMovement);
|
|
117
109
|
}
|
|
118
110
|
_removeHoursAnimationStyles() {
|
|
119
|
-
|
|
120
|
-
(t = this._clockHandHours) == null || t.classList.remove("sbb-clock__hand-hours--initial-hour"), this.style.removeProperty("--sbb-clock-hours-animation-start-angle"), this.style.removeProperty("--sbb-clock-hours-animation-duration");
|
|
111
|
+
this._clockHandHours?.classList.remove("sbb-clock__hand-hours--initial-hour"), this.style.removeProperty("--sbb-clock-hours-animation-start-angle"), this.style.removeProperty("--sbb-clock-hours-animation-duration");
|
|
121
112
|
}
|
|
122
113
|
_removeSecondsAnimationStyles() {
|
|
123
|
-
|
|
124
|
-
(t = this._clockHandSeconds) == null || t.classList.remove("sbb-clock__hand-seconds--initial-minute"), (s = this._clockHandMinutes) == null || s.classList.remove("sbb-clock__hand-minutes--no-transition"), this.style.removeProperty("--sbb-clock-seconds-animation-start-angle"), this.style.removeProperty("--sbb-clock-seconds-animation-duration");
|
|
114
|
+
this._clockHandSeconds?.classList.remove("sbb-clock__hand-seconds--initial-minute"), this._clockHandMinutes?.classList.remove("sbb-clock__hand-minutes--no-transition"), this.style.removeProperty("--sbb-clock-seconds-animation-start-angle"), this.style.removeProperty("--sbb-clock-seconds-animation-duration");
|
|
125
115
|
}
|
|
126
116
|
render() {
|
|
127
|
-
return
|
|
117
|
+
return O`
|
|
128
118
|
<div class="sbb-clock">
|
|
129
|
-
<span class="sbb-clock__face" .innerHTML=${
|
|
119
|
+
<span class="sbb-clock__face" .innerHTML=${N}></span>
|
|
130
120
|
<span
|
|
131
121
|
class="sbb-clock__hand-hours"
|
|
132
|
-
.innerHTML=${
|
|
122
|
+
.innerHTML=${P}
|
|
133
123
|
${_((t) => {
|
|
134
124
|
this._clockHandHours = t;
|
|
135
125
|
})}
|
|
136
126
|
></span>
|
|
137
127
|
<span
|
|
138
128
|
class="sbb-clock__hand-minutes sbb-clock__hand-minutes--no-transition"
|
|
139
|
-
.innerHTML=${
|
|
129
|
+
.innerHTML=${F}
|
|
140
130
|
${_((t) => {
|
|
141
131
|
this._clockHandMinutes = t;
|
|
142
132
|
})}
|
|
143
133
|
></span>
|
|
144
134
|
<span
|
|
145
135
|
class="sbb-clock__hand-seconds"
|
|
146
|
-
.innerHTML=${
|
|
136
|
+
.innerHTML=${x}
|
|
147
137
|
${_((t) => {
|
|
148
138
|
this._clockHandSeconds = t;
|
|
149
139
|
})}
|
|
@@ -151,13 +141,13 @@ let it = (() => {
|
|
|
151
141
|
</div>
|
|
152
142
|
`;
|
|
153
143
|
}
|
|
154
|
-
},
|
|
144
|
+
}, c = new WeakMap(), i = o, (() => {
|
|
155
145
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
156
|
-
b = [
|
|
157
|
-
|
|
158
|
-
} }, metadata: t }, k, v),
|
|
159
|
-
})(),
|
|
146
|
+
b = [I()], y(o, null, b, { kind: "accessor", name: "now", static: !1, private: !1, access: { has: (a) => "now" in a, get: (a) => a.now, set: (a, l) => {
|
|
147
|
+
a.now = l;
|
|
148
|
+
} }, metadata: t }, k, v), y(null, n = { value: i }, s, { kind: "class", name: i.name, metadata: t }, null, e), i = n.value, t && Object.defineProperty(i, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
149
|
+
})(), o.styles = U, m(i, e), i;
|
|
160
150
|
})();
|
|
161
151
|
export {
|
|
162
|
-
|
|
152
|
+
X as SbbClockElement
|
|
163
153
|
};
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
var I = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var I = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var D = (
|
|
5
|
-
var p = (
|
|
6
|
-
import { __esDecorate as g, __runInitializers as
|
|
4
|
+
var D = (e, t, r) => t.has(e) || I("Cannot " + r);
|
|
5
|
+
var p = (e, t, r) => (D(e, t, "read from private field"), r ? r.call(e) : t.get(e)), u = (e, t, r) => t.has(e) ? I("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), h = (e, t, r, s) => (D(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
|
|
6
|
+
import { __esDecorate as g, __runInitializers as i } from "tslib";
|
|
7
7
|
import { css as U, LitElement as j, html as B } from "lit";
|
|
8
8
|
import { customElement as O, property as m } from "lit/decorators.js";
|
|
9
9
|
import { slotState as q, forceType as T } from "../../core/decorators.js";
|
|
10
|
-
const A = U`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{--sbb-container-background-border-radius: 0;--sbb-container-color: inherit;display:block}:host([color=white]){--sbb-container-background-color: var(--sbb-color-white)}:host([color=milk]){--sbb-container-background-color: var(--sbb-color-milk)}:host([color=midnight]),:host([color=charcoal]){--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-container-color: var(--sbb-color-white)}:host([color=midnight]){--sbb-container-background-color: var(--sbb-color-midnight)}:host([color=charcoal]){--sbb-container-background-color: var(--sbb-color-charcoal)}:host([data-slot-names~=image]){--sbb-container-background-color: transparent;--sbb-container-padding: var(--sbb-spacing-responsive-xxl)}:host([background-expanded]:not([expanded])){background-color:var(--sbb-container-background-color)}:host([data-slot-names~=image][background-expanded]){position:relative}@media (min-width: 90rem){:host(:not([expanded],[background-expanded])){--sbb-container-background-border-radius: var(--sbb-border-radius-4x)}}.sbb-container{color:var(--sbb-container-color);background-color:var(--sbb-container-background-color);padding:var(--sbb-container-padding)}.sbb-container:after,.sbb-container:before{content:" ";display:block;visibility:hidden;height:0;overflow:hidden}:host([color=transparent]) .sbb-container{background-color:transparent}:host(:not([expanded])) .sbb-container{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([expanded])) .sbb-container{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([expanded]) .sbb-container{padding-inline:var(--sbb-spacing-responsive-xxs)}:host([data-slot-names~=image]:not([background-expanded])) .sbb-container{position:relative}:host([data-slot-names~=image]) .sbb-container__content{position:relative}::slotted([slot=image]){position:absolute;
|
|
10
|
+
const A = U`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{--sbb-container-background-border-radius: 0;--sbb-container-color: inherit;display:block}:host([color=white]){--sbb-container-background-color: var(--sbb-color-white)}:host([color=milk]){--sbb-container-background-color: var(--sbb-color-milk)}:host([color=midnight]),:host([color=charcoal]){--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-container-color: var(--sbb-color-white)}:host([color=midnight]){--sbb-container-background-color: var(--sbb-color-midnight)}:host([color=charcoal]){--sbb-container-background-color: var(--sbb-color-charcoal)}:host([data-slot-names~=image]){--sbb-container-background-color: transparent;--sbb-container-padding: var(--sbb-spacing-responsive-xxl)}:host([background-expanded]:not([expanded])){background-color:var(--sbb-container-background-color)}:host([data-slot-names~=image][background-expanded]){position:relative}@media (min-width: 90rem){:host(:not([expanded],[background-expanded])){--sbb-container-background-border-radius: var(--sbb-border-radius-4x)}}.sbb-container{color:var(--sbb-container-color);background-color:var(--sbb-container-background-color);padding:var(--sbb-container-padding)}.sbb-container:after,.sbb-container:before{content:" ";display:block;visibility:hidden;height:0;overflow:hidden}:host([color=transparent]) .sbb-container{background-color:transparent}:host(:not([expanded])) .sbb-container{padding-inline:var(--sbb-layout-base-offset-responsive);margin-inline:auto;width:100%}@media (min-width: 90rem){:host(:not([expanded])) .sbb-container{max-width:calc(var(--sbb-layout-base-page-max-width) + 2 * var(--sbb-layout-base-offset-responsive))}}:host([expanded]) .sbb-container{padding-inline:var(--sbb-spacing-responsive-xxs)}:host([data-slot-names~=image]:not([background-expanded])) .sbb-container{position:relative}:host([data-slot-names~=image]) .sbb-container__content{position:relative}::slotted([slot=image]){position:absolute;inset:0;height:100%;width:100%}`;
|
|
11
11
|
let K = (() => {
|
|
12
|
-
var d, l,
|
|
13
|
-
let
|
|
12
|
+
var c, d, l, n;
|
|
13
|
+
let e = [O("sbb-container"), q()], t, r = [], s, x = j, k, _ = [], v = [], f, y = [], w = [], E, z = [], S = [];
|
|
14
14
|
return n = class extends x {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments);
|
|
17
|
-
u(this,
|
|
18
|
-
u(this,
|
|
19
|
-
u(this,
|
|
20
|
-
|
|
17
|
+
u(this, c, i(this, _, !1));
|
|
18
|
+
u(this, d, (i(this, v), i(this, y, !1)));
|
|
19
|
+
u(this, l, (i(this, w), i(this, z, "white")));
|
|
20
|
+
i(this, S);
|
|
21
21
|
}
|
|
22
22
|
/** Whether the container is expanded. */
|
|
23
23
|
get expanded() {
|
|
24
|
-
return p(this,
|
|
24
|
+
return p(this, c);
|
|
25
25
|
}
|
|
26
26
|
set expanded(o) {
|
|
27
|
-
h(this,
|
|
27
|
+
h(this, c, o);
|
|
28
28
|
}
|
|
29
29
|
/** Whether the background color is shown on full container width on large screens. */
|
|
30
30
|
get backgroundExpanded() {
|
|
31
|
-
return p(this,
|
|
31
|
+
return p(this, d);
|
|
32
32
|
}
|
|
33
33
|
set backgroundExpanded(o) {
|
|
34
|
-
h(this,
|
|
34
|
+
h(this, d, o);
|
|
35
35
|
}
|
|
36
36
|
/** Color of the container, like transparent, white etc. */
|
|
37
37
|
get color() {
|
|
38
|
-
return p(this,
|
|
38
|
+
return p(this, l);
|
|
39
39
|
}
|
|
40
40
|
set color(o) {
|
|
41
|
-
h(this,
|
|
41
|
+
h(this, l, o);
|
|
42
42
|
}
|
|
43
43
|
willUpdate(o) {
|
|
44
|
-
|
|
45
|
-
super.willUpdate(o), o.has("expanded") && ((i = (e = this.querySelector) == null ? void 0 : e.call(this, "sbb-sticky-bar")) == null || i.toggleAttribute("data-expanded", this.expanded));
|
|
44
|
+
super.willUpdate(o), o.has("expanded") && this.querySelector?.("sbb-sticky-bar")?.toggleAttribute("data-expanded", this.expanded);
|
|
46
45
|
}
|
|
47
46
|
render() {
|
|
48
47
|
return B`
|
|
@@ -55,16 +54,16 @@ let K = (() => {
|
|
|
55
54
|
<slot name="sticky-bar"></slot>
|
|
56
55
|
`;
|
|
57
56
|
}
|
|
58
|
-
},
|
|
57
|
+
}, c = new WeakMap(), d = new WeakMap(), l = new WeakMap(), s = n, (() => {
|
|
59
58
|
const o = typeof Symbol == "function" && Symbol.metadata ? Object.create(x[Symbol.metadata] ?? null) : void 0;
|
|
60
|
-
k = [T(), m({ type: Boolean, reflect: !0 })], f = [T(), m({ type: Boolean, reflect: !0, attribute: "background-expanded" })], E = [m({ reflect: !0 })], g(n, null, k, { kind: "accessor", name: "expanded", static: !1, private: !1, access: { has: (
|
|
61
|
-
|
|
62
|
-
} }, metadata: o }, _, v), g(n, null, f, { kind: "accessor", name: "backgroundExpanded", static: !1, private: !1, access: { has: (
|
|
63
|
-
|
|
64
|
-
} }, metadata: o }, y, w), g(n, null, E, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (
|
|
65
|
-
|
|
66
|
-
} }, metadata: o }, z, S), g(null,
|
|
67
|
-
})(), n.styles = A,
|
|
59
|
+
k = [T(), m({ type: Boolean, reflect: !0 })], f = [T(), m({ type: Boolean, reflect: !0, attribute: "background-expanded" })], E = [m({ reflect: !0 })], g(n, null, k, { kind: "accessor", name: "expanded", static: !1, private: !1, access: { has: (a) => "expanded" in a, get: (a) => a.expanded, set: (a, b) => {
|
|
60
|
+
a.expanded = b;
|
|
61
|
+
} }, metadata: o }, _, v), g(n, null, f, { kind: "accessor", name: "backgroundExpanded", static: !1, private: !1, access: { has: (a) => "backgroundExpanded" in a, get: (a) => a.backgroundExpanded, set: (a, b) => {
|
|
62
|
+
a.backgroundExpanded = b;
|
|
63
|
+
} }, metadata: o }, y, w), g(n, null, E, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (a) => "color" in a, get: (a) => a.color, set: (a, b) => {
|
|
64
|
+
a.color = b;
|
|
65
|
+
} }, metadata: o }, z, S), g(null, t = { value: s }, e, { kind: "class", name: s.name, metadata: o }, null, r), s = t.value, o && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: o });
|
|
66
|
+
})(), n.styles = A, i(s, r), s;
|
|
68
67
|
})();
|
|
69
68
|
export {
|
|
70
69
|
K as SbbContainerElement
|