@sbb-esta/lyne-elements 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.d.ts +5 -5
- package/accordion/accordion.d.ts.map +1 -1
- package/accordion.js +17 -17
- package/action-group/action-group.d.ts +1 -1
- package/action-group/action-group.d.ts.map +1 -1
- package/action-group.js +3 -3
- package/alert/alert/alert.d.ts +1 -1
- package/alert/alert/alert.d.ts.map +1 -1
- package/alert/alert.js +3 -3
- package/autocomplete/autocomplete-base-element.d.ts +1 -1
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +1 -4
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +32 -28
- package/autocomplete-grid/autocomplete-grid-option.js +1 -1
- package/autocomplete-grid/autocomplete-grid.js +24 -25
- package/autocomplete.js +28 -29
- package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts +0 -1
- package/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/breadcrumb/breadcrumb-group.js +25 -24
- package/button/button/button.d.ts +1 -1
- package/button/button-link/button-link.d.ts +1 -1
- package/button/button-link.js +14 -14
- package/button/common.js +5 -5
- package/button/mini-button/mini-button.d.ts +1 -1
- package/button/secondary-button/secondary-button.d.ts +1 -1
- package/button/secondary-button-link/secondary-button-link.d.ts +1 -1
- package/button/secondary-button-link.js +15 -15
- package/button/tertiary-button/tertiary-button.d.ts +1 -1
- package/button/tertiary-button-link/tertiary-button-link.d.ts +1 -1
- package/button/tertiary-button-link.js +12 -12
- package/button/transparent-button/transparent-button.d.ts +1 -1
- package/button/transparent-button-link/transparent-button-link.d.ts +1 -1
- package/button/transparent-button-link.js +15 -15
- package/calendar/calendar.d.ts +2 -2
- package/calendar/calendar.d.ts.map +1 -1
- package/calendar.js +5 -4
- package/card/card-badge/card-badge.d.ts.map +1 -1
- package/card/card-badge.js +7 -9
- package/card/common/card-action-common.d.ts.map +1 -1
- package/card/common.js +24 -25
- package/clock/clock.d.ts +2 -2
- package/clock/clock.d.ts.map +1 -1
- package/container/sticky-bar/sticky-bar.d.ts +0 -1
- package/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/container/sticky-bar.js +20 -20
- package/core/a11y/arrow-navigation.d.ts.map +1 -1
- package/core/a11y/focus-visible-within-controller.d.ts +1 -1
- package/core/a11y/focus-visible-within-controller.d.ts.map +1 -1
- package/core/a11y/input-modality-detector.d.ts +2 -2
- package/core/a11y/input-modality-detector.d.ts.map +1 -1
- package/core/a11y.js +49 -50
- package/core/base-elements/action-base-element.d.ts +2 -0
- package/core/base-elements/action-base-element.d.ts.map +1 -1
- package/core/base-elements/button-base-element.d.ts +1 -1
- package/core/base-elements/button-base-element.d.ts.map +1 -1
- package/core/base-elements.js +47 -42
- package/core/controllers/language-controller.d.ts.map +1 -1
- package/core/controllers/slot-state-controller.d.ts +1 -1
- package/core/controllers/slot-state-controller.d.ts.map +1 -1
- package/core/controllers.js +22 -23
- package/core/dom/get-document-writing-mode.d.ts +3 -0
- package/core/dom/get-document-writing-mode.d.ts.map +1 -1
- package/core/mixins/disabled-mixin.d.ts +14 -1
- package/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/core/mixins.js +132 -114
- package/core/observers/intersection-observer.d.ts +6 -0
- package/core/observers/intersection-observer.d.ts.map +1 -1
- package/core/observers/mutation-observer.d.ts +6 -0
- package/core/observers/mutation-observer.d.ts.map +1 -1
- package/core/observers/resize-observer.d.ts +6 -0
- package/core/observers/resize-observer.d.ts.map +1 -1
- package/core/styles/core.scss +23 -0
- package/core/styles/mixins/overlay.scss +2 -2
- package/core/styles/mixins/panel.scss +0 -2
- package/core/styles/mixins/table.scss +11 -0
- package/core/styles/mixins/typo.scss +0 -30
- 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/styles/table.scss +6 -1
- package/core.css +25 -14
- package/custom-elements.json +1566 -385
- package/datepicker/datepicker/datepicker.d.ts +1 -1
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +13 -12
- package/datepicker/datepicker.js +35 -35
- package/development/accordion/accordion.d.ts +5 -5
- package/development/accordion/accordion.d.ts.map +1 -1
- package/development/accordion.js +25 -38
- package/development/action-group/action-group.d.ts +1 -1
- package/development/action-group/action-group.d.ts.map +1 -1
- package/development/action-group.js +8 -21
- package/development/alert/alert/alert.d.ts +1 -1
- package/development/alert/alert/alert.d.ts.map +1 -1
- package/development/alert/alert-group.js +2 -15
- package/development/alert/alert.js +6 -19
- package/development/autocomplete/autocomplete-base-element.d.ts +1 -1
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts +1 -4
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid-button.js +18 -29
- package/development/autocomplete-grid/autocomplete-grid-cell.js +2 -15
- package/development/autocomplete-grid/autocomplete-grid-option.js +4 -17
- package/development/autocomplete-grid/autocomplete-grid-row.js +2 -15
- package/development/autocomplete-grid/autocomplete-grid.js +7 -8
- package/development/autocomplete.js +10 -24
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts +0 -1
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.d.ts.map +1 -1
- package/development/breadcrumb/breadcrumb-group.js +10 -22
- package/development/breadcrumb/breadcrumb.js +2 -15
- package/development/button/button/button.d.ts +1 -1
- package/development/button/button-link/button-link.d.ts +1 -1
- package/development/button/button-link.js +3 -3
- package/development/button/common.js +2 -17
- package/development/button/mini-button/mini-button.d.ts +1 -1
- package/development/button/mini-button-group.js +2 -15
- package/development/button/mini-button.js +2 -15
- package/development/button/secondary-button/secondary-button.d.ts +1 -1
- package/development/button/secondary-button-link/secondary-button-link.d.ts +1 -1
- package/development/button/secondary-button-link.js +3 -3
- package/development/button/tertiary-button/tertiary-button.d.ts +1 -1
- package/development/button/tertiary-button-link/tertiary-button-link.d.ts +1 -1
- package/development/button/tertiary-button-link.js +3 -3
- package/development/button/transparent-button/transparent-button.d.ts +1 -1
- package/development/button/transparent-button-link/transparent-button-link.d.ts +1 -1
- package/development/button/transparent-button-link.js +3 -3
- package/development/calendar/calendar.d.ts +2 -2
- package/development/calendar/calendar.d.ts.map +1 -1
- package/development/calendar.js +7 -19
- package/development/card/card-badge/card-badge.d.ts.map +1 -1
- package/development/card/card-badge.js +4 -19
- package/development/card/card.js +2 -15
- package/development/card/common/card-action-common.d.ts.map +1 -1
- package/development/card/common.js +9 -24
- package/development/checkbox/checkbox-group.js +2 -15
- package/development/checkbox/checkbox.js +2 -15
- package/development/checkbox/common.js +1 -14
- package/development/chip.js +2 -15
- package/development/clock/clock.d.ts +2 -2
- package/development/clock/clock.d.ts.map +1 -1
- package/development/clock.js +2 -15
- package/development/container/container.js +1 -14
- package/development/container/sticky-bar/sticky-bar.d.ts +0 -1
- package/development/container/sticky-bar/sticky-bar.d.ts.map +1 -1
- package/development/container/sticky-bar.js +9 -23
- package/development/core/a11y/arrow-navigation.d.ts.map +1 -1
- package/development/core/a11y/focus-visible-within-controller.d.ts +1 -1
- package/development/core/a11y/focus-visible-within-controller.d.ts.map +1 -1
- package/development/core/a11y/input-modality-detector.d.ts +2 -2
- package/development/core/a11y/input-modality-detector.d.ts.map +1 -1
- package/development/core/a11y.js +7 -8
- package/development/core/base-elements/action-base-element.d.ts +2 -0
- package/development/core/base-elements/action-base-element.d.ts.map +1 -1
- package/development/core/base-elements/button-base-element.d.ts +1 -1
- package/development/core/base-elements/button-base-element.d.ts.map +1 -1
- package/development/core/base-elements.js +17 -5
- package/development/core/controllers/language-controller.d.ts.map +1 -1
- package/development/core/controllers/slot-state-controller.d.ts +1 -1
- package/development/core/controllers/slot-state-controller.d.ts.map +1 -1
- package/development/core/controllers.js +9 -4
- package/development/core/dom/get-document-writing-mode.d.ts +3 -0
- package/development/core/dom/get-document-writing-mode.d.ts.map +1 -1
- package/development/core/dom.js +1 -1
- package/development/core/mixins/disabled-mixin.d.ts +14 -1
- package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/development/core/mixins.js +48 -23
- package/development/core/observers/intersection-observer.d.ts +6 -0
- package/development/core/observers/intersection-observer.d.ts.map +1 -1
- package/development/core/observers/mutation-observer.d.ts +6 -0
- package/development/core/observers/mutation-observer.d.ts.map +1 -1
- package/development/core/observers/resize-observer.d.ts +6 -0
- package/development/core/observers/resize-observer.d.ts.map +1 -1
- package/development/core/observers.js +1 -1
- package/development/datepicker/datepicker/datepicker.d.ts +1 -1
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-next-day.js +2 -15
- package/development/datepicker/datepicker-previous-day.js +2 -15
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +9 -21
- package/development/datepicker/datepicker.js +8 -21
- package/development/dialog/dialog/dialog.d.ts +0 -1
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog-actions.js +2 -15
- package/development/dialog/dialog-content.js +2 -15
- package/development/dialog/dialog-title.js +2 -15
- package/development/dialog/dialog.js +12 -25
- package/development/divider.js +2 -15
- package/development/expansion-panel/expansion-panel-content.js +2 -15
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +1 -1
- package/development/expansion-panel/expansion-panel-header.js +3 -15
- package/development/expansion-panel/expansion-panel.js +2 -15
- package/development/file-selector/file-selector.d.ts +4 -4
- package/development/file-selector/file-selector.d.ts.map +1 -1
- package/development/file-selector.js +2 -17
- package/development/flip-card/flip-card-details/flip-card-details.d.ts +2 -5
- package/development/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
- package/development/flip-card/flip-card-details.js +11 -36
- package/development/flip-card/flip-card-summary.js +2 -15
- package/development/flip-card/flip-card.js +2 -15
- package/development/footer.js +2 -15
- package/development/form-error.js +2 -15
- package/development/form-field/form-field/form-field.d.ts.map +1 -1
- package/development/form-field/form-field-clear.js +2 -15
- package/development/form-field/form-field.js +11 -25
- package/development/header/common.js +43 -35
- package/development/header/header/header.d.ts +2 -0
- package/development/header/header/header.d.ts.map +1 -1
- package/development/header/header.js +13 -15
- package/development/icon/icon.d.ts +6 -0
- package/development/icon/icon.d.ts.map +1 -1
- package/development/icon.js +10 -15
- package/development/image.js +4 -17
- package/development/journey-header/journey-header.d.ts.map +1 -1
- package/development/journey-header.js +4 -18
- package/development/lead-container.js +2 -15
- package/development/link/block-link-button/block-link-button.d.ts +1 -1
- package/development/link/common.js +4 -43
- package/development/link/link-button/link-button.d.ts +1 -1
- package/development/link-list/common.js +2 -15
- package/development/link-list/link-list-anchor.js +2 -15
- package/development/link-list/link-list.js +2 -15
- package/development/loading-indicator.js +2 -15
- package/development/logo.js +3 -18
- package/development/map-container/map-container.d.ts +8 -5
- package/development/map-container/map-container.d.ts.map +1 -1
- package/development/map-container.js +32 -48
- package/development/menu/common/menu-action-common.d.ts +1 -2
- package/development/menu/common/menu-action-common.d.ts.map +1 -1
- package/development/menu/common.js +2 -15
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu-button/menu-button.d.ts +1 -1
- package/development/menu/menu-link/menu-link.d.ts +1 -1
- package/development/menu/menu-link/menu-link.d.ts.map +1 -1
- package/development/menu/menu-link.js +5 -2
- package/development/menu/menu.js +3 -16
- package/development/message.js +2 -15
- package/development/navigation/common.js +2 -17
- package/development/navigation/navigation/navigation.d.ts +1 -1
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation-list.js +2 -15
- package/development/navigation/navigation-marker/navigation-marker.d.ts +1 -2
- package/development/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/development/navigation/navigation-marker.js +9 -31
- package/development/navigation/navigation-section.js +2 -19
- package/development/navigation/navigation.js +14 -24
- package/development/notification/notification.d.ts +0 -1
- package/development/notification/notification.d.ts.map +1 -1
- package/development/notification.js +12 -27
- package/development/option/optgroup/optgroup-base-element.d.ts +2 -4
- package/development/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/development/option/optgroup.js +10 -28
- package/development/option/option/option-base-element.d.ts +14 -7
- package/development/option/option/option-base-element.d.ts.map +1 -1
- package/development/option/option.js +19 -29
- package/development/overlay/overlay-base-element.d.ts +1 -1
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay.js +2 -15
- package/development/popover/popover-trigger/popover-trigger.d.ts +1 -1
- package/development/popover/popover-trigger.js +2 -15
- package/development/popover/popover.js +2 -15
- package/development/radio-button/common.js +2 -15
- package/development/radio-button/radio-button-group/radio-button-group.d.ts +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +9 -22
- package/development/radio-button/radio-button.js +2 -15
- package/development/screen-reader-only.js +2 -15
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +33 -47
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts +12 -3
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +40 -19
- package/development/signet/signet.d.ts +4 -1
- package/development/signet/signet.d.ts.map +1 -1
- package/development/signet.js +38 -22
- package/development/skiplink-list.js +2 -15
- package/development/slider/slider.d.ts.map +1 -1
- package/development/slider.js +12 -16
- package/development/status.js +2 -15
- package/development/stepper/step/step.d.ts +1 -2
- package/development/stepper/step/step.d.ts.map +1 -1
- package/development/stepper/step-label/step-label.d.ts +6 -6
- package/development/stepper/step-label/step-label.d.ts.map +1 -1
- package/development/stepper/step-label.js +31 -44
- package/development/stepper/step.js +10 -28
- package/development/stepper/stepper/stepper.d.ts +3 -3
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +2 -15
- package/development/table/table-wrapper/table-wrapper.d.ts +0 -1
- package/development/table/table-wrapper/table-wrapper.d.ts.map +1 -1
- package/development/table/table-wrapper.js +8 -21
- package/development/tabs/tab-group/tab-group.d.ts +4 -5
- package/development/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/development/tabs/tab-group.js +39 -51
- package/development/tabs/tab-label.js +2 -19
- package/development/tabs/tab.js +1 -14
- package/development/tag/tag/tag.d.ts +1 -1
- package/development/tag/tag-group.js +2 -15
- package/development/tag/tag.js +2 -15
- package/development/teaser-hero.js +3 -23
- package/development/teaser-product/common.js +2 -15
- package/development/teaser-product/teaser-product.js +3 -16
- package/development/teaser.js +2 -15
- package/development/time-input.js +2 -15
- package/development/timetable-occupancy-icon.js +2 -15
- package/development/timetable-occupancy.js +2 -15
- package/development/title.js +3 -41
- package/development/toast.js +2 -17
- package/development/toggle/toggle/toggle.d.ts +2 -3
- package/development/toggle/toggle/toggle.d.ts.map +1 -1
- package/development/toggle/toggle-option.js +2 -15
- package/development/toggle/toggle.js +29 -42
- package/development/toggle-check.js +1 -14
- package/development/train/train-blocked-passage.js +2 -15
- package/development/train/train-formation/train-formation.d.ts +1 -2
- package/development/train/train-formation/train-formation.d.ts.map +1 -1
- package/development/train/train-formation.js +11 -22
- package/development/train/train-wagon.js +2 -17
- package/development/train/train.js +2 -15
- package/development/visual-checkbox.js +2 -15
- package/dialog/dialog/dialog.d.ts +0 -1
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog.js +17 -18
- package/expansion-panel/expansion-panel-header/expansion-panel-header.d.ts +1 -1
- package/expansion-panel/expansion-panel-header.js +5 -5
- package/file-selector/file-selector.d.ts +4 -4
- package/file-selector/file-selector.d.ts.map +1 -1
- package/file-selector.js +1 -1
- package/flip-card/flip-card-details/flip-card-details.d.ts +2 -5
- package/flip-card/flip-card-details/flip-card-details.d.ts.map +1 -1
- package/flip-card/flip-card-details.js +20 -28
- package/form-field/form-field/form-field.d.ts.map +1 -1
- package/form-field/form-field.js +26 -27
- package/header/common.js +3 -3
- package/header/header/header.d.ts +2 -0
- package/header/header/header.d.ts.map +1 -1
- package/header/header.js +21 -18
- package/icon/icon.d.ts +6 -0
- package/icon/icon.d.ts.map +1 -1
- package/icon.js +27 -19
- package/image.js +2 -2
- package/journey-header/journey-header.d.ts.map +1 -1
- package/journey-header.js +14 -15
- package/link/block-link-button/block-link-button.d.ts +1 -1
- package/link/link-button/link-button.d.ts +1 -1
- package/lists.css +0 -13
- package/logo.js +1 -1
- package/map-container/map-container.d.ts +8 -5
- package/map-container/map-container.d.ts.map +1 -1
- package/map-container.js +35 -37
- package/menu/common/menu-action-common.d.ts +1 -2
- package/menu/common/menu-action-common.d.ts.map +1 -1
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu-button/menu-button.d.ts +1 -1
- package/menu/menu-link/menu-link.d.ts +1 -1
- package/menu/menu-link/menu-link.d.ts.map +1 -1
- package/menu/menu-link.js +15 -12
- package/menu/menu.js +1 -1
- package/navigation/common.js +1 -1
- package/navigation/navigation/navigation.d.ts +1 -1
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-marker/navigation-marker.d.ts +1 -2
- package/navigation/navigation-marker/navigation-marker.d.ts.map +1 -1
- package/navigation/navigation-marker.js +17 -22
- package/navigation/navigation-section.js +1 -1
- package/navigation/navigation.js +40 -34
- package/notification/notification.d.ts +0 -1
- package/notification/notification.d.ts.map +1 -1
- package/notification.js +17 -18
- package/option/optgroup/optgroup-base-element.d.ts +2 -4
- package/option/optgroup/optgroup-base-element.d.ts.map +1 -1
- package/option/optgroup.js +31 -33
- package/option/option/option-base-element.d.ts +14 -7
- package/option/option/option-base-element.d.ts.map +1 -1
- package/option/option.js +45 -40
- package/overlay/overlay-base-element.d.ts +1 -1
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/package.json +2 -1
- package/popover/popover-trigger/popover-trigger.d.ts +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +5 -5
- package/select/select.d.ts.map +1 -1
- package/select.js +37 -38
- package/selection-expansion-panel/selection-expansion-panel.d.ts +12 -3
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +71 -49
- package/signet/signet.d.ts +4 -1
- package/signet/signet.d.ts.map +1 -1
- package/signet.js +34 -23
- package/slider/slider.d.ts.map +1 -1
- package/slider.js +5 -5
- package/standard-theme.css +58 -23
- package/stepper/step/step.d.ts +1 -2
- package/stepper/step/step.d.ts.map +1 -1
- package/stepper/step-label/step-label.d.ts +6 -6
- package/stepper/step-label/step-label.d.ts.map +1 -1
- package/stepper/step-label.js +20 -20
- package/stepper/step.js +19 -24
- package/stepper/stepper/stepper.d.ts +3 -3
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/table/table-wrapper/table-wrapper.d.ts +0 -1
- package/table/table-wrapper/table-wrapper.d.ts.map +1 -1
- package/table/table-wrapper.js +19 -18
- package/tabs/tab-group/tab-group.d.ts +4 -5
- package/tabs/tab-group/tab-group.d.ts.map +1 -1
- package/tabs/tab-group.js +51 -47
- package/tabs/tab-label.js +12 -12
- package/tag/tag/tag.d.ts +1 -1
- package/teaser-hero.js +13 -13
- package/teaser-product/teaser-product.js +5 -5
- package/teaser.js +15 -15
- package/title.js +23 -23
- package/toast.js +4 -4
- package/toggle/toggle/toggle.d.ts +2 -3
- package/toggle/toggle/toggle.d.ts.map +1 -1
- package/toggle/toggle.js +40 -39
- package/train/train-formation/train-formation.d.ts +1 -2
- package/train/train-formation/train-formation.d.ts.map +1 -1
- package/train/train-formation.js +23 -22
- package/train/train-wagon.js +7 -7
- package/typography.css +0 -13
package/teaser.js
CHANGED
|
@@ -5,13 +5,13 @@ import { slotState as h } from "./core/decorators.js";
|
|
|
5
5
|
import { css as p } from "lit";
|
|
6
6
|
import "./chip.js";
|
|
7
7
|
import "./title.js";
|
|
8
|
-
const f = p`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;--sbb-teaser-scale-hover: 1.02;--sbb-teaser-description-color: var(--sbb-color-granite);--sbb-teaser-flex-direction: row;--sbb-teaser-align-items: center;--sbb-teaser-gap: var(--sbb-spacing-fixed-4x);--sbb-teaser-width: fit-content;--sbb-teaser-border-radius: var(--sbb-border-radius-4x);--sbb-teaser-brightness-hover:
|
|
9
|
-
var m = Object.defineProperty, u = Object.getOwnPropertyDescriptor,
|
|
8
|
+
const f = p`@charset "UTF-8";*,:before,:after{box-sizing:border-box}:host{display:inline-block;outline:none!important;--sbb-teaser-scale-hover: 1.02;--sbb-teaser-description-color: var(--sbb-color-granite);--sbb-teaser-flex-direction: row;--sbb-teaser-align-items: center;--sbb-teaser-gap: var(--sbb-spacing-fixed-4x);--sbb-teaser-width: fit-content;--sbb-teaser-border-radius: var(--sbb-border-radius-4x);--sbb-teaser-brightness-hover: var(--sbb-hover-image-brightness);--sbb-teaser-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-4x) )}:host([alignment=after]){--sbb-teaser-align-items: start}:host([alignment=below]){--sbb-teaser-flex-direction: column;--sbb-teaser-align-items: baseline;--sbb-teaser-gap: var(--sbb-spacing-fixed-3x);--sbb-teaser-width: 100%}.sbb-teaser{display:flex;text-decoration:none}.sbb-teaser:before{content:"";-webkit-user-select:none;user-select:none;width:0;height:0}:host(:not([data-focus-origin=mouse],[data-focus-origin=touch])) .sbb-teaser:focus-visible{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width);border-radius:var(--sbb-teaser-border-radius)}@media (forced-colors: active){.sbb-teaser{outline-offset:var(--sbb-focus-outline-offset);outline:CanvasText solid var(--sbb-focus-outline-width);border-radius:var(--sbb-teaser-border-radius)}.sbb-teaser:hover{outline-color:Highlight}}.sbb-teaser__container{display:flex;flex-flow:var(--sbb-teaser-flex-direction) nowrap;align-items:var(--sbb-teaser-align-items);gap:var(--sbb-teaser-gap);max-width:100%}.sbb-teaser__text{overflow:hidden;max-width:100%}::slotted([slot=image]){will-change:transform;display:block;object-fit:cover;width:18.75rem;filter:brightness(var(--sbb-teaser-brightness, 1));transition:var(--sbb-teaser-animation-duration) var(--sbb-animation-easing);aspect-ratio:4/3}@media (any-hover: hover){.sbb-teaser:hover ::slotted([slot=image]){transform:scale(var(--sbb-teaser-scale-hover));--sbb-teaser-brightness: var(--sbb-teaser-brightness-hover)}}.sbb-teaser__image-wrapper{flex-shrink:0;overflow:hidden;border-radius:var(--sbb-teaser-border-radius);transition:var(--sbb-teaser-animation-duration) var(--sbb-animation-easing)}@media (any-hover: hover){.sbb-teaser:hover .sbb-teaser__image-wrapper{box-shadow:var(--sbb-shadow-elevation-level-9-shadow-2-offset-x) var(--sbb-shadow-elevation-level-9-shadow-2-offset-y) var(--sbb-shadow-elevation-level-9-shadow-2-blur) var(--sbb-shadow-elevation-level-9-shadow-2-spread) var(--sbb-shadow-elevation-level-9-hard-2-color),var(--sbb-shadow-elevation-level-9-shadow-1-offset-x) var(--sbb-shadow-elevation-level-9-shadow-1-offset-y) var(--sbb-shadow-elevation-level-9-shadow-1-blur) var(--sbb-shadow-elevation-level-9-shadow-1-spread) var(--sbb-shadow-elevation-level-9-hard-1-color)}}.sbb-teaser__chip{display:block;max-width:fit-content;margin-block-end:var(--sbb-spacing-fixed-1x)}:host(:not([data-slot-names~=chip],[chip-content])) .sbb-teaser__chip{display:none}.sbb-teaser__lead{margin:0}.sbb-teaser__description{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:inline-block;color:var(--sbb-teaser-description-color)}`;
|
|
9
|
+
var m = Object.defineProperty, u = Object.getOwnPropertyDescriptor, t = (l, a, b, r) => {
|
|
10
10
|
for (var e = r > 1 ? void 0 : r ? u(a, b) : a, i = l.length - 1, n; i >= 0; i--)
|
|
11
11
|
(n = l[i]) && (e = (r ? n(a, b, e) : n(e)) || e);
|
|
12
12
|
return r && e && m(a, b, e), e;
|
|
13
13
|
};
|
|
14
|
-
let
|
|
14
|
+
let s = class extends c {
|
|
15
15
|
constructor() {
|
|
16
16
|
super(...arguments), this.alignment = "after-centered", this.titleLevel = "5";
|
|
17
17
|
}
|
|
@@ -36,23 +36,23 @@ let t = class extends c {
|
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
s.styles = f;
|
|
40
|
+
t([
|
|
41
41
|
o({ reflect: !0 })
|
|
42
|
-
],
|
|
43
|
-
|
|
42
|
+
], s.prototype, "alignment", 2);
|
|
43
|
+
t([
|
|
44
44
|
o({ attribute: "title-level" })
|
|
45
|
-
],
|
|
46
|
-
|
|
45
|
+
], s.prototype, "titleLevel", 2);
|
|
46
|
+
t([
|
|
47
47
|
o({ attribute: "title-content" })
|
|
48
|
-
],
|
|
49
|
-
|
|
48
|
+
], s.prototype, "titleContent", 2);
|
|
49
|
+
t([
|
|
50
50
|
o({ attribute: "chip-content", reflect: !0 })
|
|
51
|
-
],
|
|
52
|
-
|
|
51
|
+
], s.prototype, "chipContent", 2);
|
|
52
|
+
s = t([
|
|
53
53
|
d("sbb-teaser"),
|
|
54
54
|
h()
|
|
55
|
-
],
|
|
55
|
+
], s);
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
s as SbbTeaserElement
|
|
58
58
|
};
|
package/title.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { property as v, customElement as
|
|
2
|
-
import { css as g, LitElement as
|
|
3
|
-
import { html as
|
|
4
|
-
import { hostAttributes as
|
|
1
|
+
import { property as v, customElement as c } from "lit/decorators.js";
|
|
2
|
+
import { css as g, LitElement as m } from "lit";
|
|
3
|
+
import { html as p, unsafeStatic as h } from "lit/static-html.js";
|
|
4
|
+
import { hostAttributes as f } from "./core/decorators.js";
|
|
5
5
|
import { SbbNegativeMixin as d } from "./core/mixins.js";
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
for (var t =
|
|
9
|
-
(a = e[
|
|
10
|
-
return
|
|
6
|
+
const u = g`*,:before,:after{box-sizing:border-box}:host{--sbb-title-text-color-normal: var( --sbb-title-text-color-normal-override, var(--sbb-color-charcoal) );display:block}:host([negative]){--sbb-title-text-color-normal: var(--sbb-color-milk)}:host([id]){scroll-margin-block-start:var(--sbb-spacing-fixed-10x)}.sbb-title{color:var(--sbb-title-text-color-normal)}:host([visually-hidden]) .sbb-title{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}:host(:is([level="1"]:not([visual-level]),[visual-level="1"])) .sbb-title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-1)}:host(:is([level="2"]:not([visual-level]),[visual-level="2"])) .sbb-title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-2)}:host(:is([level="3"]:not([visual-level]),[visual-level="3"])) .sbb-title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-3)}:host(:is([level="4"]:not([visual-level]),[visual-level="4"])) .sbb-title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-4)}:host(:is([level="5"]:not([visual-level]),[visual-level="5"])) .sbb-title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-5);--sbb-title-line-height: var(--sbb-typo-line-height-body-text)}:host(:is([level="6"]:not([visual-level]),[visual-level="6"])) .sbb-title{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text)}`;
|
|
7
|
+
var y = Object.defineProperty, k = Object.getOwnPropertyDescriptor, n = (e, l, b, i) => {
|
|
8
|
+
for (var t = i > 1 ? void 0 : i ? k(l, b) : l, r = e.length - 1, a; r >= 0; r--)
|
|
9
|
+
(a = e[r]) && (t = (i ? a(l, b, t) : a(t)) || t);
|
|
10
|
+
return i && t && y(l, b, t), t;
|
|
11
11
|
};
|
|
12
|
-
let s = class extends d(
|
|
12
|
+
let s = class extends d(m) {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(...arguments), this.level = "1";
|
|
15
15
|
}
|
|
@@ -18,14 +18,14 @@ let s = class extends d(c) {
|
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
20
|
const e = `h${this.level}`;
|
|
21
|
-
return
|
|
21
|
+
return p`
|
|
22
22
|
<${h(e)} class="sbb-title" role="presentation">
|
|
23
23
|
<slot></slot>
|
|
24
24
|
</${h(e)}>
|
|
25
25
|
`;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
s.styles =
|
|
28
|
+
s.styles = u;
|
|
29
29
|
n([
|
|
30
30
|
v({ reflect: !0 })
|
|
31
31
|
], s.prototype, "level", 2);
|
|
@@ -36,23 +36,23 @@ n([
|
|
|
36
36
|
v({ attribute: "visually-hidden", reflect: !0, type: Boolean })
|
|
37
37
|
], s.prototype, "visuallyHidden", 2);
|
|
38
38
|
s = n([
|
|
39
|
-
|
|
39
|
+
f({
|
|
40
40
|
role: "heading"
|
|
41
41
|
})
|
|
42
42
|
], s);
|
|
43
43
|
const w = g`:host{--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end)}:host(:where(:not([visually-hidden]))){--sbb-title-margin-block-start: var(--sbb-spacing-responsive-m);--sbb-title-margin-block-end: var(--sbb-spacing-responsive-s)}:host(:where([level="1"]:not([visual-level]),[visual-level="1"]):where(:not([visually-hidden]))){--sbb-title-margin-block-start: var(--sbb-spacing-responsive-l)}:host(:where([level="2"]:not([visual-level]),[visual-level="2"]):where(:not([visually-hidden]))),:host(:where([level="3"]:not([visual-level]),[visual-level="3"]):where(:not([visually-hidden]))){--sbb-title-margin-block-end: var(--sbb-spacing-responsive-xxxs)}:host(:where([level="4"]:not([visual-level]),[visual-level="4"]):where(:not([visually-hidden]))){--sbb-title-margin-block-end: var(--sbb-spacing-fixed-3x)}:host(:where([level="5"]:not([visual-level]),[visual-level="5"]):where(:not([visually-hidden]))){--sbb-title-margin-block-end: var(--sbb-spacing-fixed-2x)}:host(:where([level="6"]:not([visual-level]),[visual-level="6"]):where(:not([visually-hidden]))){--sbb-title-margin-block-end: var(--sbb-spacing-fixed-1x)}`;
|
|
44
|
-
var x = Object.defineProperty, z = Object.getOwnPropertyDescriptor, _ = (e,
|
|
45
|
-
for (var t =
|
|
46
|
-
(a = e[
|
|
47
|
-
return
|
|
44
|
+
var x = Object.defineProperty, z = Object.getOwnPropertyDescriptor, _ = (e, l, b, i) => {
|
|
45
|
+
for (var t = i > 1 ? void 0 : i ? z(l, b) : l, r = e.length - 1, a; r >= 0; r--)
|
|
46
|
+
(a = e[r]) && (t = (i ? a(l, b, t) : a(t)) || t);
|
|
47
|
+
return i && t && x(l, b, t), t;
|
|
48
48
|
};
|
|
49
|
-
let
|
|
49
|
+
let o = class extends s {
|
|
50
50
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
],
|
|
51
|
+
o.styles = [s.styles, w];
|
|
52
|
+
o = _([
|
|
53
|
+
c("sbb-title")
|
|
54
|
+
], o);
|
|
55
55
|
export {
|
|
56
56
|
s as SbbTitleBase,
|
|
57
|
-
|
|
57
|
+
o as SbbTitleElement
|
|
58
58
|
};
|
package/toast.js
CHANGED
|
@@ -7,16 +7,16 @@ import { isFirefox as _ } from "./core/dom.js";
|
|
|
7
7
|
import { composedPathHasAttribute as x } from "./core/eventing.js";
|
|
8
8
|
import { i18nCloseAlert as y } from "./core/i18n.js";
|
|
9
9
|
import { SbbHydrationMixin as T } from "./core/mixins.js";
|
|
10
|
-
import { SbbIconNameMixin as
|
|
10
|
+
import { SbbIconNameMixin as N } from "./icon.js";
|
|
11
11
|
import "./button/transparent-button.js";
|
|
12
|
-
const
|
|
12
|
+
const k = m`*,:before,:after{box-sizing:border-box}:host{--sbb-toast-max-width: 25rem;--sbb-toast-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-6x) );--sbb-toast-animation-timing-function: ease;--sbb-toast-color: var(--sbb-color-white);--sbb-toast-text-color: var(--sbb-color-milk);--sbb-toast-background-color: var(--sbb-color-midnight);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);--sbb-toast-margin: var(--sbb-spacing-responsive-s);--sbb-toast-padding-block: var(--sbb-spacing-responsive-xxxs);--sbb-toast-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-toast-border-radius: var(--sbb-border-radius-4x);--sbb-toast-container-display: flex;--sbb-toast-container-position: fixed;--sbb-toast-horizontal-position: initial;--sbb-toast-vertical-position: initial;display:block}:host(:not([data-state])),:host([data-state=closed]){--sbb-toast-container-display: none}:host([position=bottom-left]),:host([position=bottom-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-end}:host([position=bottom-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-end}:host([position=bottom-right]),:host([position=bottom-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-end}:host([position=top-left]),:host([position=top-start]){--sbb-toast-horizontal-position: flex-start;--sbb-toast-vertical-position: flex-start}:host([position=top-center]){--sbb-toast-horizontal-position: center;--sbb-toast-vertical-position: flex-start}:host([position=top-right]),:host([position=top-end]){--sbb-toast-horizontal-position: flex-end;--sbb-toast-vertical-position: flex-start}.sbb-toast__overlay-container{position:var(--sbb-toast-container-position);pointer-events:none;top:0;right:0;bottom:0;left:0;display:var(--sbb-toast-container-display);justify-content:var(--sbb-toast-horizontal-position);align-items:var(--sbb-toast-vertical-position)}.sbb-toast{z-index:var(--sbb-toast-z-index, var(--sbb-overlay-default-z-index));pointer-events:auto;margin:var(--sbb-toast-margin);padding-block:var(--sbb-toast-padding-block);padding-inline:var(--sbb-toast-padding-inline);border-radius:var(--sbb-toast-border-radius);max-width:var(--sbb-toast-max-width);display:flex;color:var(--sbb-toast-color);background-color:var(--sbb-toast-background-color)}:host([data-state=opening]) .sbb-toast{animation-name:open;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}:host([data-state=closing]) .sbb-toast{animation-name:close;animation-duration:var(--sbb-toast-animation-duration);animation-timing-function:var(--sbb-toast-animation-timing-function)}.sbb-toast__icon{margin-inline-end:var(--sbb-spacing-fixed-2x);line-height:initial}:host(:not([data-slot-names~=icon],[icon-name])) .sbb-toast__icon{display:none}.sbb-toast__content{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text);color:var(--sbb-toast-text-color);flex:1 1 0}.sbb-toast__action{position:relative;min-width:2.5rem}:host(:not([data-slot-names~=action],[dismissible])) .sbb-toast__action{display:none}::slotted([data-sbb-button]),.sbb-toast__action-button{margin-inline:var(--sbb-spacing-fixed-2x);position:absolute;top:-.625rem}::slotted(:is(sbb-link,sbb-link-button,sbb-link-static)){margin-inline-start:var(--sbb-spacing-fixed-4x)}@keyframes open{0%{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}to{visibility:visible;opacity:1;transform:translateY(0)}}@keyframes close{0%{visibility:visible;opacity:1;transform:translateY(0)}to{visibility:hidden;opacity:0;transform:translateY(var(--sbb-spacing-fixed-2x))}}`;
|
|
13
13
|
var C = Object.defineProperty, S = Object.getOwnPropertyDescriptor, n = (o, s, i, a) => {
|
|
14
14
|
for (var t = a > 1 ? void 0 : a ? S(s, i) : s, r = o.length - 1, l; r >= 0; r--)
|
|
15
15
|
(l = o[r]) && (t = (a ? l(s, i, t) : l(t)) || t);
|
|
16
16
|
return a && t && C(s, i, t), t;
|
|
17
17
|
};
|
|
18
18
|
const c = /* @__PURE__ */ new Set();
|
|
19
|
-
let e = class extends
|
|
19
|
+
let e = class extends N(T(f)) {
|
|
20
20
|
constructor() {
|
|
21
21
|
super(...arguments), this.timeout = 6e3, this.position = "bottom-center", this.dismissible = !1, this.politeness = "polite", this._abort = new v(this), this._language = new g(this);
|
|
22
22
|
}
|
|
@@ -128,7 +128,7 @@ let e = class extends k(T(f)) {
|
|
|
128
128
|
`;
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
|
-
e.styles =
|
|
131
|
+
e.styles = k;
|
|
132
132
|
n([
|
|
133
133
|
b({ type: Number })
|
|
134
134
|
], e.prototype, "timeout", 2);
|
|
@@ -35,8 +35,6 @@ export declare class SbbToggleElement extends LitElement {
|
|
|
35
35
|
get options(): SbbToggleOptionElement[];
|
|
36
36
|
private _loaded;
|
|
37
37
|
private _toggleResizeObserver;
|
|
38
|
-
private _valueChanged;
|
|
39
|
-
private _updateDisabled;
|
|
40
38
|
/**
|
|
41
39
|
* @deprecated only used for React. Will probably be removed once React 19 is available.
|
|
42
40
|
* Emits whenever the toggle value changes.
|
|
@@ -49,8 +47,9 @@ export declare class SbbToggleElement extends LitElement {
|
|
|
49
47
|
updatePillPosition(resizing: boolean): void;
|
|
50
48
|
connectedCallback(): void;
|
|
51
49
|
protected firstUpdated(changedProperties: PropertyValues<this>): Promise<void>;
|
|
52
|
-
disconnectedCallback(): void;
|
|
53
50
|
private _updateToggle;
|
|
51
|
+
private _valueChanged;
|
|
52
|
+
private _updateDisabled;
|
|
54
53
|
private _handleInput;
|
|
55
54
|
private _handleKeyDown;
|
|
56
55
|
protected render(): TemplateResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../src/elements/toggle/toggle/toggle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../src/elements/toggle/toggle/toggle.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAGnB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAOb,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIlE;;;;;;GAMG;AACH,qBAIa,gBAAiB,SAAQ,UAAU;IAC9C,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM;;;MAGlB;IAEX,sCAAsC;IACtC,IACW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAGjC;IACD,IAAW,QAAQ,IAAI,OAAO,CAE7B;IACD,OAAO,CAAC,SAAS,CAAkB;IAEnC;;;OAGG;IACgD,IAAI,EAAE,OAAO,CAAS;IAEzE,mCAAmC;IACC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAO;IAE3D;;;OAGG;IACH,IACW,KAAK,CAAC,KAAK,EAAE,MAAM,EAM7B;IACD,IAAW,KAAK,IAAI,MAAM,CAIzB;IACD,OAAO,CAAC,MAAM,CAAuB;IAErC,4DAA4D;IAC5D,IAAW,OAAO,IAAI,sBAAsB,EAAE,CAE7C;IAED,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,qBAAqB,CAI1B;IAEH;;;OAGG;IACH,OAAO,CAAC,UAAU,CAGf;IAEH,+CAA+C;IAC/C,OAAO,CAAC,OAAO,CAGZ;IAEH,OAAO,CAAC,MAAM,CAAyC;IAEvD,gBAAgB;IACT,kBAAkB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IA6BlC,iBAAiB,IAAI,IAAI;cAShB,YAAY,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ7F,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,cAAc;cA6BH,MAAM,IAAI,cAAc;CAO5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,YAAY,EAAE,gBAAgB,CAAC;KAChC;CACF"}
|
package/toggle/toggle.js
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ResizeController as u } from "@lit-labs/observers/resize-controller.js";
|
|
2
|
+
import { css as v, LitElement as m, isServer as c, html as f } from "lit";
|
|
3
|
+
import { property as b, customElement as y } from "lit/decorators.js";
|
|
4
|
+
import { interactivityChecker as w, isArrowKeyPressed as _, getNextElementIndex as x } from "../core/a11y.js";
|
|
5
|
+
import { SbbConnectedAbortController as k } from "../core/controllers.js";
|
|
6
|
+
import { hostAttributes as C } from "../core/decorators.js";
|
|
6
7
|
import { EventEmitter as p } from "../core/eventing.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return i && o && P(t, s, o), o;
|
|
8
|
+
const z = v`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-toggle-width: fit-content;--sbb-toggle-min-width: calc( var(--sbb-toggle-padding-inline) * 2 + var(--sbb-size-icon-ui-small) );--sbb-toggle-selected-option-border-color: var(--sbb-color-smoke);--sbb-toggle-padding-inline: var(--sbb-spacing-responsive-xxxs);--sbb-toggle-animation-duration: var( --sbb-disable-animation-zero-time, var(--sbb-animation-duration-6x) );--sbb-toggle-height: 1.75rem;--sbb-toggle-border-width: var(--sbb-border-width-1x);--sbb-toggle-border-style: solid;--sbb-toggle-border-radius: var(--sbb-border-radius-infinity)}@media (min-width: 52.5rem){:host{--sbb-toggle-height: 2rem}}@media (forced-colors: active){:host{--sbb-toggle-selected-option-border-color: Highlight;--sbb-toggle-border-width: var(--sbb-border-width-2x)}}:host([even]){--sbb-toggle-width: 100%}:host([even]) ::slotted(sbb-toggle-option){width:50%}:host([disabled]){--sbb-toggle-selected-option-border-color: var(--sbb-color-graphite);--sbb-toggle-border-style: dashed}@media (forced-colors: active){:host([disabled]){--sbb-toggle-border-style: solid;--sbb-toggle-selected-option-border-color: GrayText}}:host([size=m]){--sbb-toggle-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-toggle-height: 2.75rem}@media (min-width: 52.5rem){:host([size=m]){--sbb-toggle-height: 3.25rem}}:host([data-disable-animation-on-resizing]){--sbb-disable-animation-time: .1ms;--sbb-disable-animation-zero-time: 0s}.sbb-toggle{--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);position:relative;display:flex;align-items:center;width:var(--sbb-toggle-width);max-width:100%;min-width:calc(var(--sbb-toggle-min-width) * 2);height:var(--sbb-toggle-height);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:var(--sbb-color-cloud);border-radius:var(--sbb-toggle-border-radius)}.sbb-toggle:after{content:"";padding-inline:var(--sbb-toggle-padding-inline);display:inline-block;opacity:1;background-color:var(--sbb-color-white);border:var(--sbb-toggle-border-width) var(--sbb-toggle-border-style) var(--sbb-toggle-selected-option-border-color);border-radius:var(--sbb-toggle-border-radius);position:absolute;max-width:100%;min-width:var(--sbb-toggle-min-width);inset-block:calc(-2 * var(--sbb-toggle-border-width));inset-inline:calc(var(--sbb-toggle-option-left) - .125rem) calc(var(--sbb-toggle-option-right) - .125rem);transition-duration:var(--sbb-toggle-animation-duration);transition-timing-function:ease;transition-property:opacity,inset-inline-end,inset-inline-start}@media (forced-colors: active){.sbb-toggle{outline:var(--sbb-toggle-border-width) solid CanvasText}}`;
|
|
9
|
+
var P = Object.defineProperty, E = Object.getOwnPropertyDescriptor, a = (e, t, o, i) => {
|
|
10
|
+
for (var s = i > 1 ? void 0 : i ? E(t, o) : t, n = e.length - 1, l; n >= 0; n--)
|
|
11
|
+
(l = e[n]) && (s = (i ? l(t, o, s) : l(s)) || s);
|
|
12
|
+
return i && s && P(t, o, s), s;
|
|
13
13
|
};
|
|
14
|
-
let r = class extends
|
|
14
|
+
let r = class extends m {
|
|
15
15
|
constructor() {
|
|
16
|
-
super(...arguments), this._disabled = !1, this.even = !1, this.size = "m", this._value = null, this._loaded = !1, this._toggleResizeObserver = new
|
|
16
|
+
super(...arguments), this._disabled = !1, this.even = !1, this.size = "m", this._value = null, this._loaded = !1, this._toggleResizeObserver = new u(this, {
|
|
17
|
+
target: null,
|
|
18
|
+
skipInitial: !0,
|
|
19
|
+
callback: () => this.updatePillPosition(!0)
|
|
20
|
+
}), this._didChange = new p(this, r.events.didChange, {
|
|
17
21
|
bubbles: !0,
|
|
18
22
|
composed: !0
|
|
19
23
|
}), this._change = new p(this, r.events.change, {
|
|
20
24
|
bubbles: !0,
|
|
21
25
|
composed: !0
|
|
22
|
-
}), this._abort = new
|
|
26
|
+
}), this._abort = new k(this);
|
|
23
27
|
}
|
|
24
28
|
set disabled(e) {
|
|
25
29
|
this._disabled = e, this._updateDisabled();
|
|
@@ -32,33 +36,23 @@ let r = class extends v {
|
|
|
32
36
|
}
|
|
33
37
|
get value() {
|
|
34
38
|
var e, t;
|
|
35
|
-
return c ? this._value ?? "" : ((e = this.options.find((
|
|
39
|
+
return c ? this._value ?? "" : ((e = this.options.find((o) => o.checked)) == null ? void 0 : e.value) ?? ((t = this.options[0]) == null ? void 0 : t.value) ?? "";
|
|
36
40
|
}
|
|
37
41
|
/** The child instances of sbb-toggle-option as an array. */
|
|
38
42
|
get options() {
|
|
39
43
|
var e;
|
|
40
44
|
return Array.from(((e = this.querySelectorAll) == null ? void 0 : e.call(this, "sbb-toggle-option")) ?? []);
|
|
41
45
|
}
|
|
42
|
-
_valueChanged(e) {
|
|
43
|
-
const t = this.options, s = t.find(
|
|
44
|
-
(i) => e === ("value" in i ? i.value : i.getAttribute("value"))
|
|
45
|
-
) ?? t.find((i) => i.checked) ?? t[0];
|
|
46
|
-
s && (s.checked || (s.checked = !0), this.updatePillPosition(!1));
|
|
47
|
-
}
|
|
48
|
-
_updateDisabled() {
|
|
49
|
-
for (const e of this.options)
|
|
50
|
-
e.disabled = this.disabled;
|
|
51
|
-
}
|
|
52
46
|
/** @internal */
|
|
53
47
|
updatePillPosition(e) {
|
|
54
48
|
var g, h;
|
|
55
49
|
if (!this._loaded)
|
|
56
50
|
return;
|
|
57
|
-
const t = this.options,
|
|
58
|
-
if (t.every((d) => !d.checked) || t.every((d) => !d.clientWidth) || !
|
|
51
|
+
const t = this.options, o = this.shadowRoot.querySelector(".sbb-toggle");
|
|
52
|
+
if (t.every((d) => !d.checked) || t.every((d) => !d.clientWidth) || !o)
|
|
59
53
|
return;
|
|
60
54
|
this.toggleAttribute("data-disable-animation-on-resizing", e);
|
|
61
|
-
const i = t[0],
|
|
55
|
+
const i = t[0], s = i.checked, n = i.checked ? "0px" : `${i.clientWidth}px`, l = s ? `${o.clientWidth - i.clientWidth}px` : "0px";
|
|
62
56
|
(g = this.style) == null || g.setProperty("--sbb-toggle-option-left", n), (h = this.style) == null || h.setProperty("--sbb-toggle-option-right", l);
|
|
63
57
|
}
|
|
64
58
|
connectedCallback() {
|
|
@@ -69,31 +63,38 @@ let r = class extends v {
|
|
|
69
63
|
async firstUpdated(e) {
|
|
70
64
|
super.firstUpdated(e), await this.updateComplete, this._loaded = !0, this.updatePillPosition(!1);
|
|
71
65
|
}
|
|
72
|
-
disconnectedCallback() {
|
|
73
|
-
super.disconnectedCallback(), this._toggleResizeObserver.disconnect();
|
|
74
|
-
}
|
|
75
66
|
_updateToggle() {
|
|
76
67
|
this._valueChanged(this.value), this._updateDisabled();
|
|
77
68
|
}
|
|
69
|
+
_valueChanged(e) {
|
|
70
|
+
const t = this.options, o = t.find(
|
|
71
|
+
(i) => e === ("value" in i ? i.value : i.getAttribute("value"))
|
|
72
|
+
) ?? t.find((i) => i.checked) ?? t[0];
|
|
73
|
+
o && (o.checked || (o.checked = !0), this.updatePillPosition(!1));
|
|
74
|
+
}
|
|
75
|
+
_updateDisabled() {
|
|
76
|
+
for (const e of this.options)
|
|
77
|
+
e.disabled = this.disabled;
|
|
78
|
+
}
|
|
78
79
|
_handleInput() {
|
|
79
80
|
this.updatePillPosition(!1), this._change.emit(), this._didChange.emit();
|
|
80
81
|
}
|
|
81
82
|
_handleKeyDown(e) {
|
|
82
83
|
const t = this.options.filter(
|
|
83
|
-
(
|
|
84
|
+
(o) => !o.disabled && w.isVisible(o)
|
|
84
85
|
);
|
|
85
86
|
if (!(!t || // don't trap nested handling
|
|
86
|
-
e.target !== this && e.target.parentElement !== this) &&
|
|
87
|
-
const
|
|
88
|
-
(
|
|
89
|
-
), i =
|
|
87
|
+
e.target !== this && e.target.parentElement !== this) && _(e)) {
|
|
88
|
+
const o = t.findIndex(
|
|
89
|
+
(s) => s.checked
|
|
90
|
+
), i = x(e, o, t.length);
|
|
90
91
|
t[i].checked || (t[i].checked = !0, t[i].focus(), t[i].dispatchEvent(
|
|
91
92
|
new InputEvent("input", { bubbles: !0, composed: !0 })
|
|
92
93
|
)), e.preventDefault();
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
render() {
|
|
96
|
-
return
|
|
97
|
+
return f`
|
|
97
98
|
<div class="sbb-toggle">
|
|
98
99
|
<slot @slotchange=${this._updateToggle}></slot>
|
|
99
100
|
</div>
|
|
@@ -118,8 +119,8 @@ a([
|
|
|
118
119
|
b()
|
|
119
120
|
], r.prototype, "value", 1);
|
|
120
121
|
r = a([
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
y("sbb-toggle"),
|
|
123
|
+
C({
|
|
123
124
|
role: "radiogroup"
|
|
124
125
|
})
|
|
125
126
|
], r);
|
|
@@ -14,12 +14,11 @@ export declare class SbbTrainFormationElement extends SbbTrainFormationElement_b
|
|
|
14
14
|
hideWagonLabel: boolean;
|
|
15
15
|
private _sectors;
|
|
16
16
|
/** Element that defines the visible content width. */
|
|
17
|
-
private _formationDiv
|
|
17
|
+
private _formationDiv?;
|
|
18
18
|
private _contentResizeObserver;
|
|
19
19
|
private _abort;
|
|
20
20
|
private _language;
|
|
21
21
|
connectedCallback(): void;
|
|
22
|
-
disconnectedCallback(): void;
|
|
23
22
|
/**
|
|
24
23
|
* Apply width of the scrollable space of the formation as a css variable. This will be used from
|
|
25
24
|
* every slotted sbb-train for the direction-label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"train-formation.d.ts","sourceRoot":"","sources":["../../../../src/elements/train/train-formation/train-formation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"train-formation.d.ts","sourceRoot":"","sources":["../../../../src/elements/train/train-formation/train-formation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EAEnB,UAAU,EAEV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAMb,OAAO,EAAyB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAGpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;;AAUnD;;;;GAIG;AACH,qBACa,wBAAyB,SAAQ,6BAGjC;IACX,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,mBAA4B,mBAAmB,WAAiB;IAEhE,uCAAuC;IAC2C,cAAc,UACxF;IAEC,OAAO,CAAC,QAAQ,CAA0B;IAEnD,sDAAsD;IACtD,OAAO,CAAC,aAAa,CAAC,CAAiB;IACvC,OAAO,CAAC,sBAAsB,CAI3B;IACH,OAAO,CAAC,MAAM,CAAyC;IACvD,OAAO,CAAC,SAAS,CAAmC;IAEpC,iBAAiB,IAAI,IAAI;IAOzC;;;OAGG;IACH,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;YA0CN,mBAAmB;cAgBd,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI;cAQ3E,MAAM,IAAI,cAAc;CAkC5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,qBAAqB,EAAE,wBAAwB,CAAC;KACjD;CACF"}
|
package/train/train-formation.js
CHANGED
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
const C =
|
|
9
|
-
var z = Object.defineProperty,
|
|
10
|
-
for (var o = a > 1 ? void 0 : a ?
|
|
1
|
+
import { ResizeController as c } from "@lit-labs/observers/resize-controller.js";
|
|
2
|
+
import { css as d, LitElement as f, html as e, nothing as h } from "lit";
|
|
3
|
+
import { property as m, state as p, customElement as u } from "lit/decorators.js";
|
|
4
|
+
import { ref as g } from "lit/directives/ref.js";
|
|
5
|
+
import { SbbConnectedAbortController as v, SbbLanguageController as _ } from "../core/controllers.js";
|
|
6
|
+
import { i18nSectorShort as w, i18nSector as k, i18nTrains as y } from "../core/i18n.js";
|
|
7
|
+
import { SbbNamedSlotListMixin as x } from "../core/mixins.js";
|
|
8
|
+
const C = d`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-train-formation-inline-padding: var(--sbb-spacing-fixed-4x);--sbb-train-formation-background-color: var(--sbb-color-white);--sbb-train-formation-sector-label-color: var(--sbb-color-metal);--sbb-train-formation-sector-line-color: var(--sbb-color-smoke);--sbb-train-formation-blocked-passage-width: 1rem}@media (forced-colors: active){:host{--sbb-train-formation-sector-line-color: CanvasText}}:host([hide-wagon-label]){--sbb-train-formation-wagon-label-display: none}.sbb-train-formation{--sbb-scrollbar-thumb-width: .125rem;--sbb-scrollbar-thumb-width-hover: .25rem;--sbb-scrollbar-width-firefox: thin;--sbb-scrollbar-color: var(--sbb-color-black-alpha-30);--sbb-scrollbar-color-hover: var(--sbb-color-black-alpha-60);--sbb-scrollbar-track-color: transparent;--sbb-scrollbar-width: var(--sbb-spacing-fixed-3x)}.sbb-train-formation::-webkit-scrollbar{width:var(--sbb-scrollbar-width);height:var(--sbb-scrollbar-width);background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-train-formation::-webkit-scrollbar-corner{background-color:var(--sbb-scrollbar-track-color, transparent)}.sbb-train-formation::-webkit-scrollbar-thumb{background-color:var(--sbb-scrollbar-color, currentcolor);border:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width))) solid transparent;border-radius:var(--sbb-border-radius-4x);background-clip:padding-box}.sbb-train-formation::-webkit-scrollbar-thumb:hover{background-color:var(--sbb-scrollbar-color-hover, currentcolor);border-width:calc(.5 * (var(--sbb-scrollbar-width) - var(--sbb-scrollbar-thumb-width-hover)))}.sbb-train-formation::-webkit-scrollbar-button,.sbb-train-formation::-webkit-scrollbar-corner{display:none}@supports not selector(::-webkit-scrollbar){.sbb-train-formation{scrollbar-width:var(--sbb-scrollbar-width-firefox);scrollbar-color:var(--sbb-scrollbar-color, currentcolor) var(--sbb-scrollbar-track-color, transparent)}}.sbb-train-formation{display:grid;grid-template:"start sectors end" auto "start trains end" auto/auto 1fr auto;position:relative;overflow-x:auto;background-color:var(--sbb-train-formation-background-color)}.sbb-train-formation:before,.sbb-train-formation:after{content:"";display:block;width:var(--sbb-train-formation-inline-padding);background-color:var(--sbb-train-formation-background-color)}.sbb-train-formation:before{grid-area:start}.sbb-train-formation:after{grid-area:end}.sbb-train-formation__sectors{display:flex;grid-area:sectors;gap:var(--sbb-train-formation-wagon-gap)}.sbb-train-formation__sector{--_wagon-sum: var(--sbb-train-formation-wagon-count) * var(--sbb-train-formation-wagon-width);--_blocked-passage-sum: var(--sbb-train-formation-wagon-blocked-passage-count) * var(--sbb-train-formation-blocked-passage-width);--_total-count: calc( var(--sbb-train-formation-wagon-count) + var(--sbb-train-formation-wagon-blocked-passage-count) );--_gap-sum: calc((var(--_total-count) - 1) * var(--sbb-train-formation-wagon-gap));--_sector-width: calc(var(--_wagon-sum) + var(--_blocked-passage-sum) + var(--_gap-sum));--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);flex:0 0 var(--_sector-width);color:var(--sbb-train-formation-sector-label-color);text-align:center;position:relative;display:inline-block;margin-block-end:var(--sbb-spacing-fixed-4x);max-width:var(--_sector-width)}.sbb-train-formation__sector:before{content:"";position:absolute;top:50%;right:0;bottom:50%;left:0;height:1px;background-color:var(--sbb-train-formation-sector-line-color)}.sbb-train-formation__sector-sticky-wrapper{background-color:var(--sbb-train-formation-background-color);position:sticky;inset:auto 0;padding:0 var(--sbb-spacing-fixed-1x);margin:0 var(--sbb-spacing-fixed-2x);overflow:hidden;white-space:nowrap}.sbb-train-formation__trains{grid-area:trains}.sbb-train-formation__train-list{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;gap:var(--sbb-train-formation-wagon-gap)}.sbb-train-formation__train-list>:is(li,span){display:inline-flex}`;
|
|
9
|
+
var z = Object.defineProperty, D = Object.getOwnPropertyDescriptor, l = (r, t, i, a) => {
|
|
10
|
+
for (var o = a > 1 ? void 0 : a ? D(t, i) : t, s = r.length - 1, b; s >= 0; s--)
|
|
11
11
|
(b = r[s]) && (o = (a ? b(t, i, o) : b(o)) || o);
|
|
12
12
|
return a && o && z(t, i, o), o;
|
|
13
13
|
};
|
|
14
|
-
let n = class extends
|
|
14
|
+
let n = class extends x(f) {
|
|
15
15
|
constructor() {
|
|
16
|
-
super(...arguments), this.listChildLocalNames = ["sbb-train"], this.hideWagonLabel = !1, this._sectors = [], this._contentResizeObserver = new
|
|
16
|
+
super(...arguments), this.listChildLocalNames = ["sbb-train"], this.hideWagonLabel = !1, this._sectors = [], this._contentResizeObserver = new c(this, {
|
|
17
|
+
target: null,
|
|
18
|
+
skipInitial: !0,
|
|
19
|
+
callback: () => this._applyCssWidth()
|
|
20
|
+
}), this._abort = new v(this), this._language = new _(this);
|
|
17
21
|
}
|
|
18
22
|
connectedCallback() {
|
|
19
23
|
super.connectedCallback();
|
|
20
24
|
const r = this._abort.signal;
|
|
21
25
|
this.addEventListener("trainSlotChange", (t) => this._readSectors(t), { signal: r }), this.addEventListener("sectorChange", (t) => this._readSectors(t), { signal: r });
|
|
22
26
|
}
|
|
23
|
-
disconnectedCallback() {
|
|
24
|
-
super.disconnectedCallback(), this._contentResizeObserver.disconnect();
|
|
25
|
-
}
|
|
26
27
|
/**
|
|
27
28
|
* Apply width of the scrollable space of the formation as a css variable. This will be used from
|
|
28
29
|
* every slotted sbb-train for the direction-label
|
|
@@ -55,14 +56,14 @@ let n = class extends y(d) {
|
|
|
55
56
|
);
|
|
56
57
|
}
|
|
57
58
|
async _updateFormationDiv(r) {
|
|
58
|
-
r && (this._contentResizeObserver.
|
|
59
|
+
r && (this._formationDiv && this._contentResizeObserver.unobserve(this._formationDiv), this._formationDiv = r, this._contentResizeObserver.observe(this._formationDiv), await this.updateComplete, this._applyCssWidth());
|
|
59
60
|
}
|
|
60
61
|
willUpdate(r) {
|
|
61
62
|
super.willUpdate(r), r.has("listChildren") && this._readSectors();
|
|
62
63
|
}
|
|
63
64
|
render() {
|
|
64
65
|
return e`
|
|
65
|
-
<div class="sbb-train-formation" ${
|
|
66
|
+
<div class="sbb-train-formation" ${g(this._updateFormationDiv)}>
|
|
66
67
|
${this._sectors.length && this._sectors[0].label !== void 0 ? e`<div class="sbb-train-formation__sectors" aria-hidden="true">
|
|
67
68
|
${this._sectors.map(
|
|
68
69
|
(r) => e`<span
|
|
@@ -72,16 +73,16 @@ let n = class extends y(d) {
|
|
|
72
73
|
--sbb-train-formation-wagon-blocked-passage-count: ${r.blockedPassageCount}"
|
|
73
74
|
>
|
|
74
75
|
<span class="sbb-train-formation__sector-sticky-wrapper">
|
|
75
|
-
${`${r.wagonCount === 1 && r.label ?
|
|
76
|
+
${`${r.wagonCount === 1 && r.label ? w[this._language.current] : k[this._language.current]} ${r.label ? r.label : ""}`}
|
|
76
77
|
</span>
|
|
77
78
|
</span>`
|
|
78
79
|
)}
|
|
79
|
-
</div>` :
|
|
80
|
+
</div>` : h}
|
|
80
81
|
|
|
81
82
|
<div class="sbb-train-formation__trains">
|
|
82
83
|
${this.renderList({
|
|
83
84
|
class: "sbb-train-formation__train-list",
|
|
84
|
-
ariaLabel:
|
|
85
|
+
ariaLabel: y[this._language.current]
|
|
85
86
|
})}
|
|
86
87
|
</div>
|
|
87
88
|
</div>
|
|
@@ -90,13 +91,13 @@ let n = class extends y(d) {
|
|
|
90
91
|
};
|
|
91
92
|
n.styles = C;
|
|
92
93
|
l([
|
|
93
|
-
|
|
94
|
+
m({ attribute: "hide-wagon-label", reflect: !0, type: Boolean })
|
|
94
95
|
], n.prototype, "hideWagonLabel", 2);
|
|
95
96
|
l([
|
|
96
97
|
p()
|
|
97
98
|
], n.prototype, "_sectors", 2);
|
|
98
99
|
n = l([
|
|
99
|
-
|
|
100
|
+
u("sbb-train-formation")
|
|
100
101
|
], n);
|
|
101
102
|
export {
|
|
102
103
|
n as SbbTrainFormationElement
|
package/train/train-wagon.js
CHANGED
|
@@ -3,17 +3,17 @@ import { property as b, customElement as m } from "lit/decorators.js";
|
|
|
3
3
|
import { html as s, unsafeStatic as p } from "lit/static-html.js";
|
|
4
4
|
import { SbbLanguageController as y } from "../core/controllers.js";
|
|
5
5
|
import { EventEmitter as u } from "../core/eventing.js";
|
|
6
|
-
import { i18nSector as _, i18nWagonLabel as
|
|
7
|
-
import { SbbNamedSlotListMixin as
|
|
6
|
+
import { i18nSector as _, i18nWagonLabel as v, i18nClass as h, i18nBlockedPassage as f, i18nClosedCompartmentLabel as x, i18nLocomotiveLabel as $, i18nAdditionalWagonInformationHeading as C, i18nWagonLabelNumber as L } from "../core/i18n.js";
|
|
7
|
+
import { SbbNamedSlotListMixin as k } from "../core/mixins.js";
|
|
8
8
|
import "../icon.js";
|
|
9
9
|
import "../timetable-occupancy-icon.js";
|
|
10
|
-
const z = d`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-train-wagon-width: var(--sbb-train-formation-wagon-width);--sbb-train-wagon-height: var(--sbb-train-formation-wagon-height);--sbb-train-wagon-inner-padding: var(--sbb-spacing-fixed-3x);--sbb-train-wagon-shape-border-radius: var(--sbb-train-formation-wagon-border-radius);--sbb-train-wagon-shape-color: var(--sbb-color-charcoal);--sbb-train-wagon-shape-color-closed: var(--sbb-color-metal);--sbb-train-wagon-shape-width: var(--sbb-border-width-1x);--sbb-train-wagon-gap: var(--sbb-spacing-fixed-2x);--sbb-train-wagon-icons-gap: var(--sbb-spacing-fixed-1x);--sbb-train-wagon-icons-height: .875rem}@media (forced-colors: active){:host{--sbb-train-wagon-shape-color-closed: CanvasText}}.sbb-train-wagon{display:flex;flex-direction:column;align-items:center;width:var(--sbb-train-wagon-width);gap:var(--sbb-train-wagon-gap)}.sbb-train-wagon__compartment{list-style:none;margin:0;padding:0;font-size:inherit;display:grid;grid-template:"label label" auto "occupancy class" 1fr/1fr 1fr;position:relative;width:100%}:host([type=closed]) .sbb-train-wagon__compartment:before,:host(:not([data-has-visible-wagon-content])) .sbb-train-wagon__compartment:before{content:"";grid-area:occupancy/span 2;height:var(--sbb-train-wagon-height)}.sbb-train-wagon__compartment:after{content:"";display:block;position:absolute;inset-inline:0;inset-block:auto 0;width:var(--sbb-train-wagon-width);height:var(--sbb-train-wagon-height);border-radius:var(--sbb-train-wagon-shape-border-radius)}:host([type=wagon]) .sbb-train-wagon__compartment:after{border:var(--sbb-train-wagon-shape-width) solid var(--sbb-train-wagon-shape-color)}:host([type=closed]) .sbb-train-wagon__compartment:after{border:var(--sbb-train-wagon-shape-width) solid var(--sbb-train-wagon-shape-color-closed)}.sbb-train-wagon__occupancy,.sbb-train-wagon__class{height:var(--sbb-train-wagon-height);display:flex;align-items:center}.sbb-train-wagon__label{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);grid-area:label;text-align:center;display:var(--sbb-train-formation-wagon-label-display, inline-block);min-height:calc(1em * var(--sbb-typo-line-height-body-text))}.sbb-train-wagon__occupancy{grid-area:occupancy;padding-inline-start:var(--sbb-train-wagon-inner-padding)}.sbb-train-wagon__class{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0
|
|
10
|
+
const z = d`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-train-wagon-width: var(--sbb-train-formation-wagon-width);--sbb-train-wagon-height: var(--sbb-train-formation-wagon-height);--sbb-train-wagon-inner-padding: var(--sbb-spacing-fixed-3x);--sbb-train-wagon-shape-border-radius: var(--sbb-train-formation-wagon-border-radius);--sbb-train-wagon-shape-color: var(--sbb-color-charcoal);--sbb-train-wagon-shape-color-closed: var(--sbb-color-metal);--sbb-train-wagon-shape-width: var(--sbb-border-width-1x);--sbb-train-wagon-gap: var(--sbb-spacing-fixed-2x);--sbb-train-wagon-icons-gap: var(--sbb-spacing-fixed-1x);--sbb-train-wagon-icons-height: .875rem}@media (forced-colors: active){:host{--sbb-train-wagon-shape-color-closed: CanvasText}}.sbb-train-wagon{display:flex;flex-direction:column;align-items:center;width:var(--sbb-train-wagon-width);gap:var(--sbb-train-wagon-gap)}.sbb-train-wagon__compartment{list-style:none;margin:0;padding:0;font-size:inherit;display:grid;grid-template:"label label" auto "occupancy class" 1fr/1fr 1fr;position:relative;width:100%}:host([type=closed]) .sbb-train-wagon__compartment:before,:host(:not([data-has-visible-wagon-content])) .sbb-train-wagon__compartment:before{content:"";grid-area:occupancy/span 2;height:var(--sbb-train-wagon-height)}.sbb-train-wagon__compartment:after{content:"";display:block;position:absolute;inset-inline:0;inset-block:auto 0;width:var(--sbb-train-wagon-width);height:var(--sbb-train-wagon-height);border-radius:var(--sbb-train-wagon-shape-border-radius)}:host([type=wagon]) .sbb-train-wagon__compartment:after{border:var(--sbb-train-wagon-shape-width) solid var(--sbb-train-wagon-shape-color)}:host([type=closed]) .sbb-train-wagon__compartment:after{border:var(--sbb-train-wagon-shape-width) solid var(--sbb-train-wagon-shape-color-closed)}.sbb-train-wagon__occupancy,.sbb-train-wagon__class{height:var(--sbb-train-wagon-height);display:flex;align-items:center}.sbb-train-wagon__label{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);grid-area:label;text-align:center;display:var(--sbb-train-formation-wagon-label-display, inline-block);min-height:calc(1em * var(--sbb-typo-line-height-body-text))}.sbb-train-wagon__occupancy{grid-area:occupancy;padding-inline-start:var(--sbb-train-wagon-inner-padding)}.sbb-train-wagon__class{--sbb-title-line-height: var(--sbb-typo-line-height-titles);--sbb-title-margin-block-start: 0;--sbb-title-margin-block-end: 0;margin:0;margin-block:var(--sbb-title-margin-block-start) var(--sbb-title-margin-block-end);font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height);letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-font-size: var(--sbb-font-size-title-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text);grid-area:class;padding-inline-end:var(--sbb-train-wagon-inner-padding);margin-inline-start:auto}.sbb-train-wagon__locomotive{grid-area:occupancy/span 2}.sbb-train-wagon__icons{--sbb-icon-svg-height: var(--sbb-train-wagon-icons-height);display:flex}.sbb-train-wagon__icons[hidden]{position:absolute}.sbb-train-wagon__icons-list{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;flex-wrap:wrap;gap:var(--sbb-train-wagon-icons-gap);justify-content:center}.sbb-train-wagon__icons-list>:is(li,span){display:inline-flex}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`;
|
|
11
11
|
var S = Object.defineProperty, A = Object.getOwnPropertyDescriptor, i = (a, e, l, o) => {
|
|
12
12
|
for (var r = o > 1 ? void 0 : o ? A(e, l) : e, c = a.length - 1, g; c >= 0; c--)
|
|
13
13
|
(g = a[c]) && (r = (o ? g(e, l, r) : g(r)) || r);
|
|
14
14
|
return o && r && S(e, l, r), r;
|
|
15
15
|
};
|
|
16
|
-
let n = class extends
|
|
16
|
+
let n = class extends k(
|
|
17
17
|
w
|
|
18
18
|
) {
|
|
19
19
|
constructor() {
|
|
@@ -47,7 +47,7 @@ let n = class extends L(
|
|
|
47
47
|
return s`
|
|
48
48
|
<${p(o)} class="sbb-train-wagon__label" aria-hidden=${(!this.label).toString()}>
|
|
49
49
|
${this.label ? s` <span class="sbb-screen-reader-only">
|
|
50
|
-
${`${
|
|
50
|
+
${`${L[this._language.current]},`}
|
|
51
51
|
</span>
|
|
52
52
|
${this.label}` : t}
|
|
53
53
|
</${p(o)}>
|
|
@@ -56,7 +56,7 @@ let n = class extends L(
|
|
|
56
56
|
return s`
|
|
57
57
|
<div class="sbb-train-wagon">
|
|
58
58
|
${this.type === "wagon" ? s`<ul
|
|
59
|
-
aria-label=${
|
|
59
|
+
aria-label=${v[this._language.current]}
|
|
60
60
|
class="sbb-train-wagon__compartment"
|
|
61
61
|
>
|
|
62
62
|
${this.sector ? s`<li class="sbb-screen-reader-only">${e}</li>` : t}
|
|
@@ -73,7 +73,7 @@ let n = class extends L(
|
|
|
73
73
|
.occupancy=${this.occupancy}
|
|
74
74
|
></sbb-timetable-occupancy-icon>` : t}
|
|
75
75
|
${this.blockedPassage && this.blockedPassage !== "none" ? s`<li class="sbb-screen-reader-only">
|
|
76
|
-
${
|
|
76
|
+
${f[this.blockedPassage][this._language.current]}
|
|
77
77
|
</li>` : t}
|
|
78
78
|
</ul>` : t}
|
|
79
79
|
${this.type === "closed" ? s`<span class="sbb-train-wagon__compartment">
|
package/typography.css
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Better font rendering (on OS X)
|
|
3
|
-
* http://maximilianhoffmann.com/posts/better-font-rendering-on-osx
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
*
|
|
7
|
-
* .var_dark_on_light {
|
|
8
|
-
* @include font-smoothing;
|
|
9
|
-
* }
|
|
10
|
-
* .var_light_on_dark {
|
|
11
|
-
* @include font-smoothing-reset;
|
|
12
|
-
* }
|
|
13
|
-
*/
|
|
14
1
|
sub, sup {
|
|
15
2
|
font-size: 60%;
|
|
16
3
|
line-height: 0;
|