@sbb-esta/lyne-elements 3.7.0 → 3.8.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/alert/alert/alert.component.d.ts +2 -0
- package/alert/alert/alert.component.d.ts.map +1 -1
- package/alert/alert/alert.component.js +44 -39
- package/autocomplete/autocomplete-base-element.js +20 -20
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +14 -14
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +1 -1
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +9 -9
- package/badge.css +2 -2
- package/breadcrumb/breadcrumb/breadcrumb.component.js +12 -12
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +15 -15
- package/button/common.js +1 -1
- package/button/mini-button/mini-button.component.js +7 -7
- package/button/mini-button-group/mini-button-group.component.js +21 -21
- package/button.js +1 -1
- package/calendar/calendar.component.js +36 -36
- package/card/card/card.component.js +10 -10
- package/card/card-badge/card-badge.component.js +15 -15
- package/carousel/carousel/carousel.component.d.ts +1 -0
- package/carousel/carousel/carousel.component.d.ts.map +1 -1
- package/carousel/carousel/carousel.component.js +37 -33
- package/carousel/carousel-list/carousel-list.component.d.ts +2 -2
- package/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/carousel/carousel-list/carousel-list.component.js +32 -29
- package/checkbox/common.js +1 -1
- package/checkbox-common-gjHkSAmN.js +5 -0
- package/checkbox.js +1 -1
- package/chip/chip/chip.component.js +23 -23
- package/chip-label/chip-label.component.js +22 -22
- package/clock/clock.component.js +29 -29
- package/container/container/container.component.js +21 -21
- package/container/sticky-bar/sticky-bar.component.js +13 -13
- package/core/config/config.d.ts +6 -0
- package/core/config/config.d.ts.map +1 -1
- package/core/controllers/media-matchers-controller.d.ts +29 -0
- package/core/controllers/media-matchers-controller.d.ts.map +1 -1
- package/core/controllers/media-matchers-controller.js +73 -23
- package/core/controllers.js +16 -14
- package/core/dom/contains-pierce-shadow-dom.d.ts +3 -0
- package/core/dom/contains-pierce-shadow-dom.d.ts.map +1 -0
- package/core/dom/contains-pierce-shadow-dom.js +12 -0
- package/core/dom/queue-dom-content-loaded.d.ts +5 -0
- package/core/dom/queue-dom-content-loaded.d.ts.map +1 -0
- package/core/dom/queue-dom-content-loaded.js +7 -0
- package/core/dom/set-or-remove-attribute.d.ts +14 -0
- package/core/dom/set-or-remove-attribute.d.ts.map +1 -1
- package/core/dom/set-or-remove-attribute.js +11 -3
- package/core/dom.d.ts +2 -0
- package/core/dom.d.ts.map +1 -1
- package/core/dom.js +28 -22
- package/core/images.d.ts +4 -0
- package/core/images.d.ts.map +1 -1
- package/core/images.js +12 -12
- package/core/mixins.js +10 -10
- package/core/overlay/overlay-outside-pointer-event-listener.d.ts +26 -0
- package/core/overlay/overlay-outside-pointer-event-listener.d.ts.map +1 -0
- package/core/overlay/overlay-outside-pointer-event-listener.js +37 -0
- package/core/overlay.d.ts +1 -0
- package/core/overlay.d.ts.map +1 -1
- package/core/overlay.js +14 -11
- package/core/styles/core.scss +39 -12
- package/core/styles/mixins/badge.scss +2 -2
- package/core/styles/mixins/buttons.scss +14 -14
- package/core/styles/mixins/card.scss +9 -6
- package/core/styles/mixins/chip.scss +8 -8
- package/core/styles/mixins/image.scss +3 -0
- package/core/styles/mixins/link.scss +12 -7
- package/core/styles/mixins/lists.scss +6 -4
- package/core/styles/mixins/overlay.scss +6 -3
- package/core/styles/mixins/panel.scss +3 -3
- package/core/styles/mixins/pearl-chain-bullet.scss +9 -5
- package/core/styles/mixins/scrollbar.scss +12 -6
- package/core/styles/mixins/shadows.scss +32 -64
- package/core/styles/mixins/table.scss +13 -10
- package/core/styles/mixins/timetable-form.scss +3 -3
- package/core/styles/mixins/typo.scss +4 -4
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +49 -1
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +203 -5
- package/core/styles/off-brand-theme.scss +3 -0
- package/core/styles/safety-theme.scss +3 -0
- package/core/styles/standard-theme.scss +3 -14
- package/core/styles/theme.scss +18 -0
- package/core.css +253 -21
- package/custom-elements.json +1392 -115
- package/date-input/date-input.component.js +1 -1
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +4 -4
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +6 -6
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +7 -7
- package/development/alert/alert/alert.component.d.ts +2 -0
- package/development/alert/alert/alert.component.d.ts.map +1 -1
- package/development/alert/alert/alert.component.js +22 -8
- package/development/autocomplete/autocomplete-base-element.js +23 -11
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +15 -14
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +5 -4
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +19 -11
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +4 -1
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +16 -8
- package/development/button/common.js +1 -1
- package/development/button/mini-button/mini-button.component.js +15 -14
- package/development/button/mini-button-group/mini-button-group.component.js +4 -4
- package/development/button.js +1 -1
- package/development/calendar/calendar.component.js +21 -11
- package/development/card/card/card.component.js +11 -6
- package/development/card/card-badge/card-badge.component.js +10 -9
- package/development/carousel/carousel/carousel.component.d.ts +1 -0
- package/development/carousel/carousel/carousel.component.d.ts.map +1 -1
- package/development/carousel/carousel/carousel.component.js +14 -4
- package/development/carousel/carousel-list/carousel-list.component.d.ts +2 -2
- package/development/carousel/carousel-list/carousel-list.component.d.ts.map +1 -1
- package/development/carousel/carousel-list/carousel-list.component.js +29 -21
- package/development/checkbox/common.js +1 -1
- package/development/{checkbox-common-aMPOsPVA.js → checkbox-common-Dy_ofVhp.js} +4 -3
- package/development/checkbox.js +1 -1
- package/development/chip/chip/chip.component.js +15 -14
- package/development/chip-label/chip-label.component.js +12 -15
- package/development/clock/clock.component.js +11 -3
- package/development/container/container/container.component.js +6 -6
- package/development/container/sticky-bar/sticky-bar.component.js +6 -6
- package/development/core/config/config.d.ts +6 -0
- package/development/core/config/config.d.ts.map +1 -1
- package/development/core/config/config.js +1 -1
- package/development/core/controllers/media-matchers-controller.d.ts +29 -0
- package/development/core/controllers/media-matchers-controller.d.ts.map +1 -1
- package/development/core/controllers/media-matchers-controller.js +74 -1
- package/development/core/controllers.js +3 -1
- package/development/core/dom/contains-pierce-shadow-dom.d.ts +3 -0
- package/development/core/dom/contains-pierce-shadow-dom.d.ts.map +1 -0
- package/development/core/dom/contains-pierce-shadow-dom.js +14 -0
- package/development/core/dom/queue-dom-content-loaded.d.ts +5 -0
- package/development/core/dom/queue-dom-content-loaded.d.ts.map +1 -0
- package/development/core/dom/queue-dom-content-loaded.js +12 -0
- package/development/core/dom/set-or-remove-attribute.d.ts +14 -0
- package/development/core/dom/set-or-remove-attribute.d.ts.map +1 -1
- package/development/core/dom/set-or-remove-attribute.js +9 -1
- package/development/core/dom.d.ts +2 -0
- package/development/core/dom.d.ts.map +1 -1
- package/development/core/dom.js +8 -2
- package/development/core/images.d.ts +4 -0
- package/development/core/images.d.ts.map +1 -1
- package/development/core/images.js +11 -11
- package/development/core/mixins.js +7 -6
- package/development/core/overlay/overlay-outside-pointer-event-listener.d.ts +26 -0
- package/development/core/overlay/overlay-outside-pointer-event-listener.d.ts.map +1 -0
- package/development/core/overlay/overlay-outside-pointer-event-listener.js +61 -0
- package/development/core/overlay.d.ts +1 -0
- package/development/core/overlay.d.ts.map +1 -1
- package/development/core/overlay.js +4 -1
- package/development/date-input/date-input.component.js +2 -2
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.js +15 -14
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +15 -14
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.js +15 -14
- package/development/dialog/dialog/dialog.component.d.ts +1 -0
- package/development/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/development/dialog/dialog/dialog.component.js +28 -14
- package/development/dialog/dialog-actions/dialog-actions.component.js +1 -1
- package/development/dialog/dialog-title/dialog-title.component.js +1 -1
- package/development/divider/divider.component.js +2 -2
- package/development/expansion-panel/expansion-panel/expansion-panel.component.js +6 -6
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +6 -2
- package/development/file-selector/common.js +1 -1
- package/development/{file-selector-common-CRnQigIZ.js → file-selector-common-CRNAWFM_.js} +8 -5
- package/development/file-selector.js +1 -1
- package/development/flip-card/flip-card/flip-card.component.js +8 -3
- package/development/footer/footer.component.js +5 -4
- package/development/form-error/form-error.component.js +2 -2
- package/development/form-field/form-field/form-field.component.js +36 -22
- package/development/form-field/form-field-clear/form-field-clear.component.js +15 -14
- package/development/header/common/header-action-common.js +4 -4
- package/development/header/header/header.component.js +2 -2
- package/development/header/header-environment/header-environment.component.js +1 -1
- package/development/{icon-sidebar-button-common-CA_8TnFu.js → icon-sidebar-button-common-BGrKtvyM.js} +3 -2
- package/development/journey-header/journey-header.component.js +1 -1
- package/development/lead-container/lead-container.component.js +4 -2
- package/development/link/common/block-link-common.js +17 -5
- package/development/link/common/inline-link-common.js +9 -3
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +11 -9
- package/development/loading-indicator/loading-indicator.component.js +1 -1
- package/development/loading-indicator-circle/loading-indicator-circle.component.js +2 -2
- package/development/logo/logo.component.js +3 -2
- package/development/map-container/map-container.component.js +14 -6
- package/development/menu/common/menu-action-common.js +4 -3
- package/development/menu/menu/menu.component.d.ts +2 -0
- package/development/menu/menu/menu.component.d.ts.map +1 -1
- package/development/menu/menu/menu.component.js +36 -13
- package/development/message/message.component.js +3 -1
- package/development/navigation/common/navigation-action-common.js +4 -4
- package/development/navigation/navigation/navigation.component.js +21 -19
- package/development/navigation/navigation-list/navigation-list.component.js +1 -1
- package/development/navigation/navigation-marker/navigation-marker.component.js +1 -1
- package/development/navigation/navigation-section/navigation-section.component.js +3 -3
- package/development/notification/notification.component.js +38 -18
- package/development/option/optgroup/optgroup-base-element.js +3 -2
- package/development/option/option/option.component.js +13 -11
- package/development/option/option-hint/option-hint.component.js +3 -2
- package/development/overlay/overlay.component.d.ts.map +1 -1
- package/development/overlay/overlay.component.js +28 -22
- package/development/paginator/compact-paginator/compact-paginator.component.js +3 -2
- package/development/paginator/paginator/paginator.component.js +18 -17
- package/development/popover/popover/popover.component.js +8 -6
- package/development/popover/popover-trigger/popover-trigger.component.js +20 -17
- package/development/radio-button/common.js +1 -1
- package/development/radio-button/radio-button/radio-button.component.js +3 -3
- package/development/radio-button/radio-button-panel/radio-button-panel.component.js +3 -3
- package/development/{radio-button-common-454JtP9b.js → radio-button-common-CgM3kQSW.js} +9 -8
- package/development/radio-button.js +1 -1
- package/development/sbb-tokens-CVLcOi-S.js +1 -1
- package/development/select/select.component.js +31 -13
- package/development/selection-action-panel/selection-action-panel.component.js +9 -5
- package/development/selection-expansion-panel/selection-expansion-panel.component.js +10 -6
- package/development/sidebar/common.js +1 -1
- package/development/sidebar/icon-sidebar/icon-sidebar.component.js +2 -2
- package/development/sidebar/sidebar/sidebar.component.js +14 -6
- package/development/sidebar.js +1 -1
- package/development/signet/signet.component.js +2 -2
- package/development/skiplink-list/skiplink-list.component.d.ts +3 -1
- package/development/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/development/skiplink-list/skiplink-list.component.js +26 -9
- package/development/slider/slider.component.js +15 -9
- package/development/status/status.component.js +7 -7
- package/development/stepper/step/step.component.js +1 -3
- package/development/stepper/step-label/step-label.component.js +7 -6
- package/development/stepper/stepper/stepper.component.js +5 -5
- package/development/tabs/tab-label/tab-label.component.js +7 -14
- package/development/tag/tag/tag.component.js +15 -9
- package/development/teaser/teaser.component.js +3 -2
- package/development/teaser-hero/teaser-hero.component.js +3 -3
- package/development/teaser-product/common.js +1 -1
- package/development/{teaser-product-common-D6fa6x3w.js → teaser-product-common-DvlBRkE_.js} +14 -6
- package/development/teaser-product.js +1 -1
- package/development/time-input/time-input.component.js +2 -2
- package/development/timetable-form/timetable-form/timetable-form.component.js +1 -1
- package/development/timetable-form/timetable-form-details/timetable-form-details.component.js +1 -1
- package/development/timetable-form/timetable-form-field/timetable-form-field.component.js +3 -3
- package/development/timetable-occupancy/timetable-occupancy.component.js +2 -2
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts +1 -0
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.js +4 -3
- package/development/title/title-base.js +2 -5
- package/development/title/title.component.js +1 -1
- package/development/toast/toast.component.d.ts +3 -1
- package/development/toast/toast.component.d.ts.map +1 -1
- package/development/toast/toast.component.js +31 -15
- package/development/toggle/toggle/toggle.component.js +8 -4
- package/development/toggle/toggle-option/toggle-option.component.js +5 -3
- package/development/toggle-check/toggle-check.component.js +13 -14
- package/development/tooltip/tooltip.component.d.ts +89 -0
- package/development/tooltip/tooltip.component.d.ts.map +1 -0
- package/development/tooltip/tooltip.component.js +466 -0
- package/development/tooltip.d.ts +5 -0
- package/development/tooltip.d.ts.map +1 -0
- package/development/tooltip.js +5 -0
- package/development/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/development/train/train-formation/train-formation.component.js +16 -4
- package/development/train/train-wagon/train-wagon.component.js +3 -12
- package/development/{transparent-button-COe-YB_U.js → transparent-button-DdSaBp_-.js} +141 -86
- package/development/visual-checkbox/visual-checkbox.component.js +12 -12
- package/dialog/dialog/dialog.component.d.ts +1 -0
- package/dialog/dialog/dialog.component.d.ts.map +1 -1
- package/dialog/dialog/dialog.component.js +37 -36
- package/dialog/dialog-actions/dialog-actions.component.js +6 -6
- package/dialog/dialog-title/dialog-title.component.js +4 -4
- package/divider/divider.component.js +16 -16
- package/expansion-panel/expansion-panel/expansion-panel.component.js +1 -1
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +3 -3
- package/file-selector/common.js +1 -1
- package/file-selector-common-D88J9PEh.js +5 -0
- package/file-selector.js +1 -1
- package/flip-card/flip-card/flip-card.component.js +14 -14
- package/footer/footer.component.js +18 -18
- package/form-error/form-error.component.js +4 -4
- package/form-field/form-field/form-field.component.js +1 -1
- package/form-field/form-field-clear/form-field-clear.component.js +9 -9
- package/header/common/header-action-common.js +1 -1
- package/header/header/header.component.js +19 -19
- package/header/header-environment/header-environment.component.js +1 -1
- package/icon-sidebar-button-common-BeRXvifI.js +7 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/journey-header/journey-header.component.js +1 -1
- package/lead-container/lead-container.component.js +5 -5
- package/link/common/block-link-common.js +23 -23
- package/link/common/inline-link-common.js +7 -7
- package/link-list/link-list-anchor/link-list-anchor.component.js +11 -11
- package/lists.css +5 -3
- package/loading-indicator/loading-indicator.component.js +1 -1
- package/loading-indicator-circle/loading-indicator-circle.component.js +13 -13
- package/logo/logo.component.js +9 -9
- package/map-container/map-container.component.js +15 -15
- package/menu/common/menu-action-common.js +5 -5
- package/menu/menu/menu.component.d.ts +2 -0
- package/menu/menu/menu.component.d.ts.map +1 -1
- package/menu/menu/menu.component.js +45 -38
- package/message/message.component.js +9 -9
- package/navigation/common/navigation-action-common.js +6 -6
- package/navigation/navigation/navigation.component.js +19 -19
- package/navigation/navigation-list/navigation-list.component.js +1 -1
- package/navigation/navigation-marker/navigation-marker.component.js +1 -1
- package/navigation/navigation-section/navigation-section.component.js +1 -1
- package/notification/notification.component.js +8 -8
- package/off-brand-theme.css +3017 -0
- package/option/optgroup/optgroup-base-element.js +1 -1
- package/option/option/option.component.js +3 -3
- package/option/option-hint/option-hint.component.js +8 -8
- package/overlay/overlay.component.d.ts.map +1 -1
- package/overlay/overlay.component.js +47 -48
- package/package.json +14 -1
- package/paginator/compact-paginator/compact-paginator.component.js +4 -4
- package/paginator/paginator/paginator.component.js +10 -10
- package/popover/popover/popover.component.js +9 -9
- package/popover/popover-trigger/popover-trigger.component.js +5 -5
- package/radio-button/common.js +1 -1
- package/radio-button/radio-button/radio-button.component.js +13 -13
- package/radio-button/radio-button-panel/radio-button-panel.component.js +2 -2
- package/radio-button-common-Nm9ULjVb.js +5 -0
- package/radio-button.js +1 -1
- package/safety-theme.css +3017 -0
- package/scrollbar.css +52 -20
- package/select/select.component.js +45 -45
- package/selection-action-panel/selection-action-panel.component.js +6 -6
- package/selection-expansion-panel/selection-expansion-panel.component.js +11 -11
- package/sidebar/common.js +1 -1
- package/sidebar/icon-sidebar/icon-sidebar.component.js +12 -12
- package/sidebar/sidebar/sidebar.component.js +29 -29
- package/sidebar.js +1 -1
- package/signet/signet.component.js +1 -1
- package/skiplink-list/skiplink-list.component.d.ts +3 -1
- package/skiplink-list/skiplink-list.component.d.ts.map +1 -1
- package/skiplink-list/skiplink-list.component.js +37 -30
- package/slider/slider.component.js +16 -16
- package/standard-theme.css +334 -58
- package/status/status.component.js +13 -13
- package/stepper/step/step.component.js +5 -5
- package/stepper/step-label/step-label.component.js +1 -1
- package/stepper/stepper/stepper.component.js +7 -7
- package/table.css +15 -9
- package/tabs/tab-label/tab-label.component.js +19 -19
- package/tag/tag/tag.component.js +14 -14
- package/teaser/teaser.component.js +1 -1
- package/teaser-hero/teaser-hero.component.js +12 -12
- package/teaser-product/common.js +1 -1
- package/teaser-product-common-DIra6aVg.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +1 -1
- package/timetable-form/timetable-form/timetable-form.component.js +6 -6
- package/timetable-form/timetable-form-details/timetable-form-details.component.js +4 -4
- package/timetable-form/timetable-form-field/timetable-form-field.component.js +5 -5
- package/timetable-form.css +3 -3
- package/timetable-occupancy/timetable-occupancy.component.js +7 -7
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts +1 -0
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.d.ts.map +1 -1
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +23 -23
- package/title/title-base.js +1 -1
- package/title/title.component.js +1 -1
- package/toast/toast.component.d.ts +3 -1
- package/toast/toast.component.d.ts.map +1 -1
- package/toast/toast.component.js +67 -59
- package/toggle/toggle/toggle.component.js +1 -1
- package/toggle/toggle-option/toggle-option.component.js +5 -5
- package/toggle-check/toggle-check.component.js +16 -16
- package/tooltip/tooltip.component.d.ts +89 -0
- package/tooltip/tooltip.component.d.ts.map +1 -0
- package/tooltip/tooltip.component.js +215 -0
- package/tooltip.d.ts +5 -0
- package/tooltip.d.ts.map +1 -0
- package/tooltip.js +4 -0
- package/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/train/train-formation/train-formation.component.js +16 -16
- package/train/train-wagon/train-wagon.component.js +1 -1
- package/transparent-button-Bg9fU_iZ.js +9 -0
- package/typography.css +1 -0
- package/visual-checkbox/visual-checkbox.component.js +14 -14
- package/checkbox-common-CDzcyq8p.js +0 -5
- package/file-selector-common-OHK9hu3a.js +0 -5
- package/icon-sidebar-button-common-CM-ueEhH.js +0 -7
- package/radio-button-common-CUppr5FI.js +0 -5
- package/teaser-product-common-C8oSkIxy.js +0 -5
- package/transparent-button-xudJxob_.js +0 -9
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __esDecorate as b, __runInitializers as o } from "tslib";
|
|
2
2
|
import { css as d, LitElement as n, html as m } from "lit";
|
|
3
3
|
import { customElement as c } from "lit/decorators.js";
|
|
4
|
-
const f = d`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-form-details-padding-block: var(--sbb-spacing-fixed-1x);--sbb-timetable-form-details-padding-inline: var(--sbb-spacing-responsive-xxs);--sbb-timetable-form-details-horizontal-divider-height: 1.5rem;display:flex;flex-wrap:wrap;gap:var(--sbb-spacing-fixed-1x);border-block-start:var(--sbb-border-width-1x) solid var(--sbb-color-
|
|
4
|
+
const f = d`*,:before,:after{box-sizing:border-box}:host{--sbb-timetable-form-details-padding-block: var(--sbb-spacing-fixed-1x);--sbb-timetable-form-details-padding-inline: var(--sbb-spacing-responsive-xxs);--sbb-timetable-form-details-horizontal-divider-height: 1.5rem;display:flex;flex-wrap:wrap;gap:var(--sbb-spacing-fixed-1x);border-block-start:var(--sbb-border-width-1x) solid var(--sbb-border-color-4-inverted);padding-block:var(--sbb-timetable-form-details-padding-block);padding-inline-start:calc(var(--sbb-size-icon-ui-small) + var(--sbb-spacing-responsive-xxxs));align-items:center}::slotted(sbb-form-field){--sbb-form-field-border-radius: var(--sbb-border-radius-6x);--sbb-form-field-outline-offset: -.3125rem}::slotted(sbb-divider[orientation=vertical]){height:var(--sbb-timetable-form-details-horizontal-divider-height)}::slotted(:last-child){margin-inline-end:var(--sbb-timetable-form-details-padding-inline)}`;
|
|
5
5
|
let g = (() => {
|
|
6
6
|
var t;
|
|
7
|
-
let l = [c("sbb-timetable-form-details")],
|
|
7
|
+
let l = [c("sbb-timetable-form-details")], a, s = [], e, r = n;
|
|
8
8
|
return t = class extends r {
|
|
9
9
|
render() {
|
|
10
10
|
return m`<slot></slot>`;
|
|
11
11
|
}
|
|
12
12
|
}, e = t, (() => {
|
|
13
|
-
const
|
|
14
|
-
b(null,
|
|
13
|
+
const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(r[Symbol.metadata] ?? null) : void 0;
|
|
14
|
+
b(null, a = { value: e }, l, { kind: "class", name: e.name, metadata: i }, null, s), e = a.value, i && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
|
|
15
15
|
})(), t.styles = f, o(e, s), e;
|
|
16
16
|
})();
|
|
17
17
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { __esDecorate as n, __runInitializers as c } from "tslib";
|
|
2
|
-
import { css as f, isServer as
|
|
3
|
-
import { customElement as
|
|
2
|
+
import { css as f, isServer as d, html as i } from "lit";
|
|
3
|
+
import { customElement as m } from "lit/decorators.js";
|
|
4
4
|
import { SbbFormFieldElement as l } from "../../form-field/form-field.js";
|
|
5
|
-
const u = f`*,:before,:after{box-sizing:border-box}:host{display:flex;--sbb-form-field-border-radius: var(--sbb-border-radius-6x);--sbb-form-field-outline-offset: -.3125rem;--sbb-timetable-form-field-route-icon-color: var(--sbb-color-
|
|
5
|
+
const u = f`*,:before,:after{box-sizing:border-box}:host{display:flex;--sbb-form-field-border-radius: var(--sbb-border-radius-6x);--sbb-form-field-outline-offset: -.3125rem;--sbb-timetable-form-field-route-icon-color: var(--sbb-color-2);--sbb-timetable-form-field-route-icon-background-color: var(--sbb-background-color-1)}:host(:first-of-type){--sbb-timetable-form-field-route-icon-rotate: 90deg}:host(:last-of-type){--sbb-timetable-form-field-route-icon-rotate: -90deg;--sbb-timetable-form-field-route-icon-translate: -.0625rem 0}:host(:where(:not(:last-of-type))) .sbb-form-field__wrapper:after{content:"";position:absolute;border-block-end:var(--sbb-border-width-1x) var(--sbb-form-field-border-style) var(--sbb-border-color-4-inverted);inset-inline:var(--sbb-form-field-padding-inline);inset-block-end:0}.sbb-timetable-form-field__start-route-icon{align-self:center;margin-inline-start:var(--sbb-form-field-padding-inline);rotate:var(--sbb-timetable-form-field-route-icon-rotate);translate:var(--sbb-timetable-form-field-route-icon-translate)}.sbb-timetable-form-field__start-route-icon:after{--connecting-line-offset: .1875rem;--connecting-line-width: calc( (var(--sbb-form-field-min-height) - var(--sbb-icon-svg-height)) / 2 + var(--connecting-line-offset) );content:"";position:absolute;inset-block-start:50%;border-block-start:var(--sbb-border-width-1x) solid var(--sbb-timetable-form-field-route-icon-color);width:var(--connecting-line-width);margin-left:calc(var(--connecting-line-offset) * -1)}.sbb-timetable-form-field__via-route-icon{align-self:stretch;position:relative;width:var(--sbb-size-icon-ui-small);margin-inline-start:var(--sbb-form-field-padding-inline)}.sbb-timetable-form-field__via-route-icon:before{content:"";position:absolute;inset-inline-start:50%;height:100%;margin-inline-start:-.0625rem;border-inline-start:var(--sbb-border-width-1x) solid var(--sbb-timetable-form-field-route-icon-color)}.sbb-timetable-form-field__via-route-icon:after{content:"";position:absolute;inset-block-start:50%;inset-inline-start:50%;translate:-50% -50%;width:.4375rem;height:.4375rem;border:var(--sbb-border-width-1x) solid var(--sbb-timetable-form-field-route-icon-color);border-radius:var(--sbb-border-radius-infinity);background-color:var(--sbb-timetable-form-field-route-icon-background-color);margin-inline-start:-.03125rem}.sbb-form-field__space-wrapper{flex-grow:1}`;
|
|
6
6
|
let g = (() => {
|
|
7
7
|
var t;
|
|
8
|
-
let b = [
|
|
8
|
+
let b = [m("sbb-timetable-form-field")], o, a = [], e, s = l;
|
|
9
9
|
return t = class extends s {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(), this._routeIcon = !1, this.borderless = !0, this.floatingLabel = !0, this.width = "collapse", this.size = "l";
|
|
12
12
|
}
|
|
13
13
|
connectedCallback() {
|
|
14
|
-
super.connectedCallback(), !
|
|
14
|
+
super.connectedCallback(), !d && this.hydrationComplete.then(() => this._routeIcon = this.matches(":first-of-type, :last-of-type"));
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
17
|
return i`
|
package/timetable-form.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
border-radius: var(--sbb-border-radius-4x);
|
|
8
8
|
padding-block: var(--sbb-spacing-fixed-10x) var(--sbb-spacing-responsive-l);
|
|
9
9
|
padding-inline: var(--sbb-spacing-fixed-5x);
|
|
10
|
-
background: linear-gradient(to bottom, var(--sbb-color-
|
|
10
|
+
background: linear-gradient(to bottom, var(--sbb-color-primary) 0 11.125rem, var(--sbb-background-color-3) 11.125rem 100%);
|
|
11
11
|
}
|
|
12
12
|
@media (max-width: calc(63.9375rem)) {
|
|
13
13
|
.sbb-timetable-form:has(sbb-signet) {
|
|
@@ -44,7 +44,7 @@ sbb-timetable-form .sbb-timetable-form-block {
|
|
|
44
44
|
sbb-timetable-form .sbb-timetable-form-block::after {
|
|
45
45
|
content: "";
|
|
46
46
|
position: absolute;
|
|
47
|
-
border-block-end: var(--sbb-border-width-1x) solid var(--sbb-color-
|
|
47
|
+
border-block-end: var(--sbb-border-width-1x) solid var(--sbb-border-color-4-inverted);
|
|
48
48
|
inset-inline: var(--sbb-form-field-padding-inline);
|
|
49
49
|
inset-block-end: 0;
|
|
50
50
|
}
|
|
@@ -60,7 +60,7 @@ sbb-timetable-form .sbb-timetable-form-block sbb-datepicker-toggle {
|
|
|
60
60
|
sbb-timetable-form .sbb-timetable-form-mobile-block::after {
|
|
61
61
|
content: "";
|
|
62
62
|
position: absolute;
|
|
63
|
-
border-block-end: var(--sbb-border-width-1x) solid var(--sbb-color-
|
|
63
|
+
border-block-end: var(--sbb-border-width-1x) solid var(--sbb-border-color-4-inverted);
|
|
64
64
|
inset-inline: var(--sbb-form-field-padding-inline);
|
|
65
65
|
inset-block-end: 0;
|
|
66
66
|
}
|
|
@@ -4,18 +4,18 @@ var x = (s) => {
|
|
|
4
4
|
var z = (s, t, a) => t.has(s) || x("Cannot " + a);
|
|
5
5
|
var u = (s, t, a) => (z(s, t, "read from private field"), a ? a.call(s) : t.get(s)), m = (s, t, a) => t.has(s) ? x("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, a), o = (s, t, a, i) => (z(s, t, "write to private field"), i ? i.call(s, a) : t.set(s, a), a);
|
|
6
6
|
import { __runInitializers as b, __esDecorate as y } from "tslib";
|
|
7
|
-
import { css as S, LitElement as $, nothing as k, html as
|
|
7
|
+
import { css as S, LitElement as $, nothing as k, html as f } from "lit";
|
|
8
8
|
import { customElement as E, property as w } from "lit/decorators.js";
|
|
9
9
|
import { SbbLanguageController as I } from "../core/controllers.js";
|
|
10
10
|
import { i18nClass as D } from "../core/i18n.js";
|
|
11
11
|
import { SbbNegativeMixin as j } from "../core/mixins.js";
|
|
12
12
|
import "../screen-reader-only.js";
|
|
13
13
|
import "../timetable-occupancy-icon.js";
|
|
14
|
-
const L = S`*,:before,:after{box-sizing:border-box}:host{display:inline-block;--sbb-timetable-occupancy-color: var(--sbb-color-
|
|
14
|
+
const L = S`*,:before,:after{box-sizing:border-box}:host{display:inline-block;--sbb-timetable-occupancy-color: var(--sbb-color-2);--sbb-icon-svg-width: .890625rem;--sbb-icon-svg-height: v0.75rem}@media (min-width: 52.5rem){:host{--sbb-icon-svg-width: 1.1875rem;--sbb-icon-svg-height: v1rem}}:host([negative]){--sbb-timetable-occupancy-color: var(--sbb-color-2-negative)}.sbb-timetable-occupancy__list{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;align-items:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-2x)}.sbb-timetable-occupancy__list-item{display:flex;align-items:center;flex-wrap:nowrap;gap:var(--sbb-spacing-fixed-1x)}.sbb-timetable-occupancy__list-item-class{--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);line-height:1;color:var(--sbb-timetable-occupancy-color)}.sbb-timetable-occupancy__list-item-icon{display:flex}`;
|
|
15
15
|
let J = (() => {
|
|
16
16
|
var l, r, n;
|
|
17
|
-
let s = [E("sbb-timetable-occupancy")], t, a = [], i,
|
|
18
|
-
return n = class extends
|
|
17
|
+
let s = [E("sbb-timetable-occupancy")], t, a = [], i, h = j($), d, _ = [], g = [], O, C = [], v = [];
|
|
18
|
+
return n = class extends h {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
21
|
m(this, l);
|
|
@@ -37,12 +37,12 @@ let J = (() => {
|
|
|
37
37
|
o(this, r, c);
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
return
|
|
40
|
+
return f` ${(this.firstClassOccupancy || this.secondClassOccupancy) && f`
|
|
41
41
|
<ul
|
|
42
42
|
class="sbb-timetable-occupancy__list"
|
|
43
43
|
role=${!this.firstClassOccupancy || !this.secondClassOccupancy ? "presentation" : k}
|
|
44
44
|
>
|
|
45
|
-
${[this.firstClassOccupancy, this.secondClassOccupancy].map((c, e) => c &&
|
|
45
|
+
${[this.firstClassOccupancy, this.secondClassOccupancy].map((c, e) => c && f`
|
|
46
46
|
<li class="sbb-timetable-occupancy__list-item">
|
|
47
47
|
<span class="sbb-timetable-occupancy__list-item-class" aria-hidden="true">
|
|
48
48
|
${this.firstClassOccupancy && e === 0 ? "1" : "2"}.
|
|
@@ -62,7 +62,7 @@ let J = (() => {
|
|
|
62
62
|
`}`;
|
|
63
63
|
}
|
|
64
64
|
}, l = new WeakMap(), r = new WeakMap(), i = n, (() => {
|
|
65
|
-
const c = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
65
|
+
const c = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
|
|
66
66
|
d = [w({ attribute: "first-class-occupancy" })], O = [w({ attribute: "second-class-occupancy" })], y(n, null, d, { kind: "accessor", name: "firstClassOccupancy", static: !1, private: !1, access: { has: (e) => "firstClassOccupancy" in e, get: (e) => e.firstClassOccupancy, set: (e, p) => {
|
|
67
67
|
e.firstClassOccupancy = p;
|
|
68
68
|
} }, metadata: c }, _, g), y(n, null, O, { kind: "accessor", name: "secondClassOccupancy", static: !1, private: !1, access: { has: (e) => "secondClassOccupancy" in e, get: (e) => e.secondClassOccupancy, set: (e, p) => {
|
|
@@ -11,6 +11,7 @@ export declare class SbbTimetableOccupancyIconElement extends SbbTimetableOccupa
|
|
|
11
11
|
accessor occupancy: SbbOccupancy;
|
|
12
12
|
private _language;
|
|
13
13
|
private _mediaMatcher;
|
|
14
|
+
private _darkModeController;
|
|
14
15
|
private _forcedColors;
|
|
15
16
|
private _setNameAndAriaLabel;
|
|
16
17
|
protected fetchSvgIcon(namespace: string, name: string): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timetable-occupancy-icon.component.d.ts","sourceRoot":"","sources":["../../../src/elements/timetable-occupancy-icon/timetable-occupancy-icon.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"timetable-occupancy-icon.component.d.ts","sourceRoot":"","sources":["../../../src/elements/timetable-occupancy-icon/timetable-occupancy-icon.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAU1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;;AAIzC;;GAEG;AACH,qBAEM,gCAAiC,SAAQ,qCAA6B;IAC1E,OAAuB,MAAM,EAAE,cAAc,CAA+B;IAE5E,uBAAuB;IACvB,SAA4B,SAAS,EAAE,YAAY,CAAU;IAE7D,OAAO,CAAC,SAAS,CAA2E;IAC5F,OAAO,CAAC,aAAa,CAKlB;IACH,OAAO,CAAC,mBAAmB,CAAsE;IAEjG,OAAO,CAAC,aAAa,CAA2E;YAElF,oBAAoB;cAeT,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKvF,OAAO,CAAC,aAAa;IAML,iBAAiB,IAAI,IAAI;cAKtB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;CAO7E;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,8BAA8B,EAAE,gCAAgC,CAAC;KAClE;CACF"}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
var
|
|
1
|
+
var d = (t) => {
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __runInitializers as
|
|
7
|
-
import { customElement as A, property as
|
|
8
|
-
import { SbbLanguageController as
|
|
9
|
-
import { i18nOccupancy as
|
|
10
|
-
import { SbbNegativeMixin as
|
|
4
|
+
var p = (t, a, s) => a.has(t) || d("Cannot " + s);
|
|
5
|
+
var _ = (t, a, s) => (p(t, a, "read from private field"), s ? s.call(t) : a.get(t)), y = (t, a, s) => a.has(t) ? d("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s), l = (t, a, s, c) => (p(t, a, "write to private field"), c ? c.call(t, s) : a.set(t, s), s);
|
|
6
|
+
import { __runInitializers as n, __esDecorate as f } from "tslib";
|
|
7
|
+
import { customElement as A, property as C } from "lit/decorators.js";
|
|
8
|
+
import { SbbLanguageController as L, SbbMediaMatcherController as M, SbbMediaQueryForcedColors as g, SbbDarkModeController as w } from "../core/controllers.js";
|
|
9
|
+
import { i18nOccupancy as I } from "../core/i18n.js";
|
|
10
|
+
import { SbbNegativeMixin as k } from "../core/mixins.js";
|
|
11
11
|
import { SbbIconBase as v } from "../icon.js";
|
|
12
|
-
import { css as
|
|
13
|
-
const
|
|
14
|
-
let
|
|
12
|
+
import { css as N } from "lit";
|
|
13
|
+
const x = N`@media (forced-colors: active) and (prefers-color-scheme: light){:host svg{filter:invert(1)}}`;
|
|
14
|
+
let H = (() => {
|
|
15
15
|
var o, i;
|
|
16
|
-
let t = [A("sbb-timetable-occupancy-icon")], a,
|
|
16
|
+
let t = [A("sbb-timetable-occupancy-icon")], a, s = [], c, u = k(v), h, m = [], b = [];
|
|
17
17
|
return i = class extends u {
|
|
18
18
|
constructor() {
|
|
19
19
|
super(...arguments);
|
|
20
20
|
y(this, o);
|
|
21
|
-
|
|
21
|
+
l(this, o, n(this, m, "none")), this._language = (n(this, b), new L(this).withHandler(() => this._setAriaLabel())), this._mediaMatcher = new M(this, {
|
|
22
22
|
[g]: (e) => {
|
|
23
23
|
this._forcedColors = e, this._setNameAndAriaLabel();
|
|
24
24
|
}
|
|
25
|
-
}), this._forcedColors = this._mediaMatcher.matches(g) ?? !1;
|
|
25
|
+
}), this._darkModeController = new w(this, () => this._setNameAndAriaLabel()), this._forcedColors = this._mediaMatcher.matches(g) ?? !1;
|
|
26
26
|
}
|
|
27
27
|
/** Wagon occupancy. */
|
|
28
28
|
get occupancy() {
|
|
29
|
-
return
|
|
29
|
+
return _(this, o);
|
|
30
30
|
}
|
|
31
31
|
set occupancy(e) {
|
|
32
|
-
|
|
32
|
+
l(this, o, e);
|
|
33
33
|
}
|
|
34
34
|
async _setNameAndAriaLabel() {
|
|
35
35
|
if (!this.occupancy)
|
|
36
36
|
return;
|
|
37
37
|
let e = `utilization-${this.occupancy}`;
|
|
38
|
-
this._forcedColors ? e += "-high-contrast" : this.negative && (e += "-negative"), await this.loadSvgIcon(e);
|
|
38
|
+
this._forcedColors ? e += "-high-contrast" : (this.negative || this._darkModeController.matches()) && (e += "-negative"), await this.loadSvgIcon(e);
|
|
39
39
|
}
|
|
40
40
|
async fetchSvgIcon(e, r) {
|
|
41
41
|
return this._setAriaLabel(), super.fetchSvgIcon(e, r);
|
|
42
42
|
}
|
|
43
43
|
_setAriaLabel() {
|
|
44
|
-
this.internals.ariaLabel =
|
|
44
|
+
this.internals.ariaLabel = I[this.occupancy]?.[this._language.current];
|
|
45
45
|
}
|
|
46
46
|
connectedCallback() {
|
|
47
47
|
super.connectedCallback(), this._setNameAndAriaLabel();
|
|
@@ -49,13 +49,13 @@ let F = (() => {
|
|
|
49
49
|
willUpdate(e) {
|
|
50
50
|
super.willUpdate(e), (e.has("occupancy") || e.has("negative")) && this._setNameAndAriaLabel();
|
|
51
51
|
}
|
|
52
|
-
}, o = new WeakMap(),
|
|
52
|
+
}, o = new WeakMap(), c = i, (() => {
|
|
53
53
|
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
54
|
-
|
|
54
|
+
h = [C()], f(i, null, h, { kind: "accessor", name: "occupancy", static: !1, private: !1, access: { has: (r) => "occupancy" in r, get: (r) => r.occupancy, set: (r, S) => {
|
|
55
55
|
r.occupancy = S;
|
|
56
|
-
} }, metadata: e },
|
|
57
|
-
})(), i.styles = [v.styles,
|
|
56
|
+
} }, metadata: e }, m, b), f(null, a = { value: c }, t, { kind: "class", name: c.name, metadata: e }, null, s), c = a.value, e && Object.defineProperty(c, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
57
|
+
})(), i.styles = [v.styles, x], n(c, s), c;
|
|
58
58
|
})();
|
|
59
59
|
export {
|
|
60
|
-
|
|
60
|
+
H as SbbTimetableOccupancyIconElement
|
|
61
61
|
};
|
package/title/title-base.js
CHANGED
|
@@ -8,7 +8,7 @@ import { css as _, LitElement as x } from "lit";
|
|
|
8
8
|
import { property as y } from "lit/decorators.js";
|
|
9
9
|
import { html as L } from "lit/static-html.js";
|
|
10
10
|
import { SbbElementInternalsMixin as w } from "../core/mixins.js";
|
|
11
|
-
const k = _`*,:before,:after{box-sizing:border-box}:host{margin-block:var(--sbb-title-margin-block-start, 0) var(--sbb-title-margin-block-end, 0);margin-inline:0;font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height, var(--sbb-typo-line-height-titles));letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-text-color-normal: var(
|
|
11
|
+
const k = _`*,:before,:after{box-sizing:border-box}:host{margin-block:var(--sbb-title-margin-block-start, 0) var(--sbb-title-margin-block-end, 0);margin-inline:0;font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height, var(--sbb-typo-line-height-titles));letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);--sbb-title-text-color-normal: var(--sbb-title-text-color-normal-override, var(--sbb-color-3));display:block;color:var(--sbb-title-text-color-normal)}:host([id]){scroll-margin-block-start:var(--sbb-spacing-fixed-10x)}:host(:where([level="1"]:not([visual-level]),[visual-level="1"])){--sbb-title-font-size: var(--sbb-title-font-size-level-1)}:host(:where([level="2"]:not([visual-level]),[visual-level="2"])){--sbb-title-font-size: var(--sbb-title-font-size-level-2)}:host(:where([level="3"]:not([visual-level]),[visual-level="3"])){--sbb-title-font-size: var(--sbb-title-font-size-level-3)}:host(:where([level="4"]:not([visual-level]),[visual-level="4"])){--sbb-title-font-size: var(--sbb-title-font-size-level-4)}:host(:where([level="5"]:not([visual-level]),[visual-level="5"])){--sbb-title-font-size: var(--sbb-title-font-size-level-5)}:host(:where([level="6"]:not([visual-level]),[visual-level="6"])){--sbb-title-font-size: var(--sbb-title-font-size-level-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text)}`;
|
|
12
12
|
let M = (() => {
|
|
13
13
|
var o, v, a;
|
|
14
14
|
let e = w(x), t, l = [], r = [], f, m = [], p = [];
|
package/title/title.component.js
CHANGED
|
@@ -8,7 +8,7 @@ import { customElement as y, property as L } from "lit/decorators.js";
|
|
|
8
8
|
import { SbbNegativeMixin as S } from "../core/mixins.js";
|
|
9
9
|
import { SbbTitleBase as _ } from "./title-base.js";
|
|
10
10
|
import { css as w } from "lit";
|
|
11
|
-
const x = w`:host([negative]){--sbb-title-text-color-normal: var(--sbb-color-
|
|
11
|
+
const x = w`:host([negative]){--sbb-title-text-color-normal: var(--sbb-color-3-negative)}:host(:where([level="1"]:not([visual-level]),[visual-level="1"])){--sbb-title-margin-block-start: var(--sbb-title-margin-block-start-level-1);--sbb-title-margin-block-end: var(--sbb-title-margin-block-end-level-1)}:host(:where([level="2"]:not([visual-level]),[visual-level="2"])){--sbb-title-margin-block-start: var(--sbb-title-default-margin-block-start);--sbb-title-margin-block-end: var(--sbb-title-margin-block-end-level-2)}:host(:where([level="3"]:not([visual-level]),[visual-level="3"])){--sbb-title-margin-block-start: var(--sbb-title-default-margin-block-start);--sbb-title-margin-block-end: var(--sbb-title-margin-block-end-level-3)}:host(:where([level="4"]:not([visual-level]),[visual-level="4"])){--sbb-title-margin-block-start: var(--sbb-title-default-margin-block-start);--sbb-title-margin-block-end: var(--sbb-title-margin-block-end-level-4)}:host(:where([level="5"]:not([visual-level]),[visual-level="5"])){--sbb-title-margin-block-start: var(--sbb-title-default-margin-block-start);--sbb-title-margin-block-end: var(--sbb-title-margin-block-end-level-5)}:host(:where([level="6"]:not([visual-level]),[visual-level="6"])){--sbb-title-margin-block-start: var(--sbb-title-default-margin-block-start);--sbb-title-margin-block-end: var(--sbb-title-margin-block-end-level-6)}`;
|
|
12
12
|
let B = (() => {
|
|
13
13
|
var r, s;
|
|
14
14
|
let e = [y("sbb-title")], l, t = [], a, o = S(_), n, c = [], m = [];
|
|
@@ -31,6 +31,7 @@ export declare class SbbToastElement extends SbbToastElement_base {
|
|
|
31
31
|
accessor politeness: 'polite' | 'assertive' | 'off';
|
|
32
32
|
private _closeTimeout?;
|
|
33
33
|
private _language;
|
|
34
|
+
private _darkModeController;
|
|
34
35
|
constructor();
|
|
35
36
|
connectedCallback(): void;
|
|
36
37
|
disconnectedCallback(): void;
|
|
@@ -54,12 +55,13 @@ export declare class SbbToastElement extends SbbToastElement_base {
|
|
|
54
55
|
* we wrap the whole content in a <span> tag
|
|
55
56
|
*/
|
|
56
57
|
private _onContentSlotChange;
|
|
57
|
-
private
|
|
58
|
+
private _syncSlottedElements;
|
|
58
59
|
private _onToastAnimationEnd;
|
|
59
60
|
/**
|
|
60
61
|
* Since we do not stack toasts, we force the closing on other existing opened ones
|
|
61
62
|
*/
|
|
62
63
|
private _closeOtherToasts;
|
|
64
|
+
private _isLightMode;
|
|
63
65
|
protected render(): TemplateResult;
|
|
64
66
|
}
|
|
65
67
|
declare global {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.component.d.ts","sourceRoot":"","sources":["../../../src/elements/toast/toast.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAYnE,OAAO,iCAAiC,CAAC;AACzC,OAAO,eAAe,CAAC;AAEvB,KAAK,wBAAwB,GAAG,KAAK,GAAG,QAAQ,CAAC;AACjD,KAAK,0BAA0B,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,GAAG,wBAAwB,IAAI,0BAA0B,EAAE,CAAC;;AAK3F;;;;;;;;;GASG;AACH,qBAEM,eAAgB,SAAQ,oBAE7B;IACC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;OAIG;IACH,SAEgB,OAAO,EAAE,MAAM,CAAK;IAEpC,6CAA6C;IAC7C,SAA6C,QAAQ,EAAE,gBAAgB,CAAmB;IAE1F;;;OAGG;IACH,SAA4B,UAAU,EAAE,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAY;IAElF,OAAO,CAAC,aAAa,CAAC,CAAgC;IACtD,OAAO,CAAC,SAAS,CAAmC;;
|
|
1
|
+
{"version":3,"file":"toast.component.d.ts","sourceRoot":"","sources":["../../../src/elements/toast/toast.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAYnE,OAAO,iCAAiC,CAAC;AACzC,OAAO,eAAe,CAAC;AAEvB,KAAK,wBAAwB,GAAG,KAAK,GAAG,QAAQ,CAAC;AACjD,KAAK,0BAA0B,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,GAAG,wBAAwB,IAAI,0BAA0B,EAAE,CAAC;;AAK3F;;;;;;;;;GASG;AACH,qBAEM,eAAgB,SAAQ,oBAE7B;IACC,OAAuB,MAAM,EAAE,cAAc,CAAS;IAEtD;;;;OAIG;IACH,SAEgB,OAAO,EAAE,MAAM,CAAK;IAEpC,6CAA6C;IAC7C,SAA6C,QAAQ,EAAE,gBAAgB,CAAmB;IAE1F;;;OAGG;IACH,SAA4B,UAAU,EAAE,QAAQ,GAAG,WAAW,GAAG,KAAK,CAAY;IAElF,OAAO,CAAC,aAAa,CAAC,CAAgC;IACtD,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,mBAAmB,CAGxB;;IAOa,iBAAiB,IAAI,IAAI;IAQzB,oBAAoB,IAAI,IAAI;cAQzB,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAQ5E;;;OAGG;IACI,IAAI,IAAI,IAAI;IAgBnB;;OAEG;IACI,KAAK,IAAI,IAAI;IAepB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,cAAc;IAoBtB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,wBAAwB;IAIhC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,oBAAoB;IAmB5B,OAAO,CAAC,oBAAoB;IAS5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,YAAY;cAID,MAAM,IAAI,cAAc;CAgC5C;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,WAAW,EAAE,eAAe,CAAC;KAC9B;CACF"}
|
package/toast/toast.component.js
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
var
|
|
1
|
+
var w = (i) => {
|
|
2
2
|
throw TypeError(i);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var h = (i, o, e) => (
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { css as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { SbbOpenCloseBaseElement as
|
|
10
|
-
import { SbbLanguageController as
|
|
11
|
-
import { forceType as
|
|
12
|
-
import { isZeroAnimationDuration as
|
|
13
|
-
import { composedPathHasAttribute as
|
|
14
|
-
import { i18nCloseAlert as
|
|
15
|
-
import { SbbHydrationMixin as
|
|
16
|
-
import { SbbIconNameMixin as
|
|
4
|
+
var A = (i, o, e) => o.has(i) || w("Cannot " + e);
|
|
5
|
+
var h = (i, o, e) => (A(i, o, "read from private field"), e ? e.call(i) : o.get(i)), m = (i, o, e) => o.has(i) ? w("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, e), l = (i, o, e, a) => (A(i, o, "write to private field"), a ? a.call(i, e) : o.set(i, e), e);
|
|
6
|
+
import { __esDecorate as u, __runInitializers as b } from "tslib";
|
|
7
|
+
import { css as M, nothing as D, html as O } from "lit";
|
|
8
|
+
import { customElement as L, property as v } from "lit/decorators.js";
|
|
9
|
+
import { SbbOpenCloseBaseElement as N } from "../core/base-elements.js";
|
|
10
|
+
import { SbbLanguageController as $, SbbDarkModeController as I } from "../core/controllers.js";
|
|
11
|
+
import { forceType as Z } from "../core/decorators.js";
|
|
12
|
+
import { isZeroAnimationDuration as j, isLean as q } from "../core/dom.js";
|
|
13
|
+
import { composedPathHasAttribute as B } from "../core/eventing.js";
|
|
14
|
+
import { i18nCloseAlert as P } from "../core/i18n.js";
|
|
15
|
+
import { SbbHydrationMixin as U, SbbReadonlyMixin as H } from "../core/mixins.js";
|
|
16
|
+
import { SbbIconNameMixin as R } from "../icon.js";
|
|
17
17
|
import "../button/transparent-button.js";
|
|
18
18
|
import "../divider.js";
|
|
19
|
-
const X =
|
|
20
|
-
let
|
|
21
|
-
var d, p,
|
|
22
|
-
let i = [
|
|
23
|
-
return
|
|
19
|
+
const X = M`*,:before,:after{box-sizing:border-box}:host{--sbb-toast-max-width: 25rem;--sbb-toast-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) );--sbb-toast-animation-timing-function: ease;--sbb-toast-text-color: var(--sbb-color-3-inverted);--sbb-toast-background-color: var(--sbb-background-color-1-inverted);--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: none;--sbb-toast-container-position: fixed;--sbb-toast-horizontal-position: initial;--sbb-toast-vertical-position: initial;--sbb-toast-gap: var(--sbb-spacing-fixed-2x);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark);display:none}:host([data-state]:not([data-state=closed])){--sbb-toast-container-display: flex;display:block}: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}:host(:is(:state(dark),[state--dark])){--sbb-focus-outline-color: var(--sbb-focus-outline-color-default)}.sbb-toast__overlay-container{position:var(--sbb-toast-container-position);pointer-events:none;inset: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);border-radius:var(--sbb-toast-border-radius);max-width:var(--sbb-toast-max-width);display:flex;color:var(--sbb-toast-text-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-wrapper{display:flex;align-items:center;gap:var(--sbb-toast-gap);padding-block:var(--sbb-toast-padding-block);padding-inline:var(--sbb-toast-padding-inline)}slot:not([name=icon]),.sbb-toast__close{color-scheme:only light}.sbb-toast__content{--sbb-title-font-size: var(--sbb-title-font-size-level-6);--sbb-title-line-height: var(--sbb-typo-line-height-body-text);margin-block:var(--sbb-title-margin-block-start, 0) var(--sbb-title-margin-block-end, 0);margin-inline:0;font-family:var(--sbb-typo-font-family);font-weight:700;line-height:var(--sbb-title-line-height, var(--sbb-typo-line-height-titles));letter-spacing:var(--sbb-typo-letter-spacing-titles);font-size:var(--sbb-title-font-size);flex:1 1 0}.sbb-toast__close{display:flex;align-items:center}.sbb-toast__close-divider{padding-block:var(--sbb-toast-padding-block)}.sbb-toast__close-button{margin-inline:var(--sbb-spacing-responsive-xxxs)}@keyframes open{0%{visibility:hidden;opacity:0;translate:0 var(--sbb-spacing-fixed-2x)}to{visibility:visible;opacity:1;translate:0}}@keyframes close{0%{visibility:visible;opacity:1;translate:0}to{visibility:hidden;opacity:0;translate:0 var(--sbb-spacing-fixed-2x)}}`, g = /* @__PURE__ */ new Set();
|
|
20
|
+
let rt = (() => {
|
|
21
|
+
var c, d, p, n;
|
|
22
|
+
let i = [L("sbb-toast")], o, e = [], a, _ = R(U(H(N))), f, y = [], x = [], k, z = [], E = [], S, C = [], T = [];
|
|
23
|
+
return n = class extends _ {
|
|
24
24
|
constructor() {
|
|
25
25
|
super();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
m(this, c);
|
|
27
|
+
m(this, d);
|
|
28
|
+
m(this, p);
|
|
29
|
+
l(this, c, b(this, y, 0)), l(this, d, (b(this, x), b(this, z, "bottom-center"))), l(this, p, (b(this, E), b(this, C, "polite"))), this._closeTimeout = b(this, T), this._language = new $(this), this._darkModeController = new I(this, () => {
|
|
30
|
+
this._syncSlottedElements(), this.requestUpdate();
|
|
31
|
+
}), this.addEventListener?.("click", (t) => this._onClick(t));
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* The length of time in milliseconds to wait before automatically dismissing the toast.
|
|
@@ -34,33 +36,33 @@ let lt = (() => {
|
|
|
34
36
|
* From accessibility perspective, it is recommended to set a timeout of at least 20 seconds.
|
|
35
37
|
*/
|
|
36
38
|
get timeout() {
|
|
37
|
-
return h(this,
|
|
39
|
+
return h(this, c);
|
|
38
40
|
}
|
|
39
41
|
set timeout(t) {
|
|
40
|
-
|
|
42
|
+
l(this, c, t);
|
|
41
43
|
}
|
|
42
44
|
/** The position where to place the toast. */
|
|
43
45
|
get position() {
|
|
44
|
-
return h(this,
|
|
46
|
+
return h(this, d);
|
|
45
47
|
}
|
|
46
48
|
set position(t) {
|
|
47
|
-
|
|
49
|
+
l(this, d, t);
|
|
48
50
|
}
|
|
49
51
|
/**
|
|
50
52
|
* The ARIA politeness level.
|
|
51
53
|
* Check https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#live_regions for further info
|
|
52
54
|
*/
|
|
53
55
|
get politeness() {
|
|
54
|
-
return h(this,
|
|
56
|
+
return h(this, p);
|
|
55
57
|
}
|
|
56
58
|
set politeness(t) {
|
|
57
|
-
|
|
59
|
+
l(this, p, t);
|
|
58
60
|
}
|
|
59
61
|
connectedCallback() {
|
|
60
|
-
this.popover = "manual", super.connectedCallback(),
|
|
62
|
+
this.popover = "manual", super.connectedCallback(), g.add(this);
|
|
61
63
|
}
|
|
62
64
|
disconnectedCallback() {
|
|
63
|
-
super.disconnectedCallback(), clearTimeout(this._closeTimeout),
|
|
65
|
+
super.disconnectedCallback(), clearTimeout(this._closeTimeout), g.delete(this);
|
|
64
66
|
}
|
|
65
67
|
willUpdate(t) {
|
|
66
68
|
super.willUpdate(t), t.has("politeness") && (this.internals.ariaLive = this.politeness);
|
|
@@ -82,15 +84,18 @@ let lt = (() => {
|
|
|
82
84
|
this.state = "closed", this.hidePopover?.(), this.dispatchCloseEvent();
|
|
83
85
|
}
|
|
84
86
|
_handleOpening() {
|
|
85
|
-
this.state = "opened", this.dispatchOpenEvent(), this.timeout
|
|
87
|
+
if (this.state = "opened", this.dispatchOpenEvent(), this.timeout) {
|
|
88
|
+
const t = globalThis, s = t[t.Zone?.__symbol__?.("setTimeout")] ?? t.setTimeout;
|
|
89
|
+
this._closeTimeout = s(() => this.close(), this.timeout);
|
|
90
|
+
}
|
|
86
91
|
}
|
|
87
92
|
// Close the toast on click of any element that has the 'sbb-toast-close' attribute.
|
|
88
93
|
_onClick(t) {
|
|
89
|
-
const s =
|
|
94
|
+
const s = B(t, "sbb-toast-close", this);
|
|
90
95
|
s && !s.hasAttribute("disabled") && this.close();
|
|
91
96
|
}
|
|
92
97
|
_isZeroAnimationDuration() {
|
|
93
|
-
return
|
|
98
|
+
return j(this, "--sbb-toast-animation-duration");
|
|
94
99
|
}
|
|
95
100
|
/**
|
|
96
101
|
* Slotted text nodes are not read correctly by screen readers on Chrome.
|
|
@@ -99,17 +104,17 @@ let lt = (() => {
|
|
|
99
104
|
*/
|
|
100
105
|
_onContentSlotChange(t) {
|
|
101
106
|
const s = t.target.assignedNodes();
|
|
102
|
-
if (s.some((
|
|
103
|
-
const
|
|
104
|
-
this.prepend(
|
|
107
|
+
if (s.some((r) => r.nodeType === Node.TEXT_NODE)) {
|
|
108
|
+
const r = document.createElement("span");
|
|
109
|
+
this.prepend(r), r.append(...s);
|
|
105
110
|
}
|
|
111
|
+
this._syncSlottedElements();
|
|
106
112
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
l.negative = !0;
|
|
113
|
+
_syncSlottedElements() {
|
|
114
|
+
this.querySelectorAll("sbb-transparent-button, sbb-transparent-button-link").forEach((t) => {
|
|
115
|
+
t.negative = this._isLightMode(), t.size = q() ? "s" : "m";
|
|
116
|
+
}), this.querySelectorAll("sbb-link, sbb-link-button, sbb-link-static").forEach((t) => {
|
|
117
|
+
t.negative = this._isLightMode();
|
|
113
118
|
});
|
|
114
119
|
}
|
|
115
120
|
// In rare cases it can be that the animationEnd event is triggered twice.
|
|
@@ -121,10 +126,13 @@ let lt = (() => {
|
|
|
121
126
|
* Since we do not stack toasts, we force the closing on other existing opened ones
|
|
122
127
|
*/
|
|
123
128
|
_closeOtherToasts() {
|
|
124
|
-
|
|
129
|
+
g.forEach((t) => {
|
|
125
130
|
t.getAttribute("data-state") === "opened" && t.close();
|
|
126
131
|
});
|
|
127
132
|
}
|
|
133
|
+
_isLightMode() {
|
|
134
|
+
return !this._darkModeController.matches();
|
|
135
|
+
}
|
|
128
136
|
render() {
|
|
129
137
|
return O`
|
|
130
138
|
<div class="sbb-toast__overlay-container">
|
|
@@ -134,20 +142,20 @@ let lt = (() => {
|
|
|
134
142
|
<div class="sbb-toast__content">
|
|
135
143
|
<slot @slotchange=${this._onContentSlotChange}></slot>
|
|
136
144
|
</div>
|
|
137
|
-
<slot name="action" @slotchange=${this.
|
|
145
|
+
<slot name="action" @slotchange=${this._syncSlottedElements}></slot>
|
|
138
146
|
</div>
|
|
139
147
|
<div class="sbb-toast__close">
|
|
140
148
|
<sbb-divider
|
|
141
149
|
class="sbb-toast__close-divider"
|
|
142
150
|
orientation="vertical"
|
|
143
|
-
negative
|
|
151
|
+
?negative=${this._isLightMode()}
|
|
144
152
|
></sbb-divider>
|
|
145
|
-
${this.readOnly ?
|
|
153
|
+
${this.readOnly ? D : O`<sbb-transparent-button
|
|
146
154
|
class="sbb-toast__close-button"
|
|
147
155
|
icon-name="cross-small"
|
|
148
|
-
negative
|
|
156
|
+
?negative=${this._isLightMode()}
|
|
149
157
|
size="m"
|
|
150
|
-
aria-label=${
|
|
158
|
+
aria-label=${P[this._language.current]}
|
|
151
159
|
sbb-toast-close
|
|
152
160
|
></sbb-transparent-button>`}
|
|
153
161
|
</div>
|
|
@@ -155,17 +163,17 @@ let lt = (() => {
|
|
|
155
163
|
</div>
|
|
156
164
|
`;
|
|
157
165
|
}
|
|
158
|
-
},
|
|
166
|
+
}, c = new WeakMap(), d = new WeakMap(), p = new WeakMap(), a = n, (() => {
|
|
159
167
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(_[Symbol.metadata] ?? null) : void 0;
|
|
160
|
-
|
|
161
|
-
s.timeout =
|
|
162
|
-
} }, metadata: t }, y,
|
|
163
|
-
s.position =
|
|
164
|
-
} }, metadata: t }, z,
|
|
165
|
-
s.politeness =
|
|
166
|
-
} }, metadata: t }, C,
|
|
167
|
-
})(),
|
|
168
|
+
f = [Z(), v({ type: Number })], k = [v({ reflect: !0 })], S = [v()], u(n, null, f, { kind: "accessor", name: "timeout", static: !1, private: !1, access: { has: (s) => "timeout" in s, get: (s) => s.timeout, set: (s, r) => {
|
|
169
|
+
s.timeout = r;
|
|
170
|
+
} }, metadata: t }, y, x), u(n, null, k, { kind: "accessor", name: "position", static: !1, private: !1, access: { has: (s) => "position" in s, get: (s) => s.position, set: (s, r) => {
|
|
171
|
+
s.position = r;
|
|
172
|
+
} }, metadata: t }, z, E), u(n, null, S, { kind: "accessor", name: "politeness", static: !1, private: !1, access: { has: (s) => "politeness" in s, get: (s) => s.politeness, set: (s, r) => {
|
|
173
|
+
s.politeness = r;
|
|
174
|
+
} }, metadata: t }, C, T), u(null, o = { value: a }, i, { kind: "class", name: a.name, metadata: t }, null, e), a = o.value, t && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
175
|
+
})(), n.styles = X, b(a, e), a;
|
|
168
176
|
})();
|
|
169
177
|
export {
|
|
170
|
-
|
|
178
|
+
rt as SbbToastElement
|
|
171
179
|
};
|
|
@@ -11,7 +11,7 @@ import { forceType as K } from "../../core/decorators.js";
|
|
|
11
11
|
import { isLean as M } from "../../core/dom.js";
|
|
12
12
|
import { SbbDisabledMixin as $, SbbFormAssociatedMixin as j, SbbElementInternalsMixin as q } from "../../core/mixins.js";
|
|
13
13
|
import "../toggle-option.js";
|
|
14
|
-
const B = F`*,:before,:after{box-sizing:border-box}:host{display:block;width:fit-content;border-radius:var(--sbb-toggle-border-radius);--sbb-toggle-width: fit-content;--sbb-toggle-min-width: calc( var(--sbb-toggle-padding-inline) * 4 + var(--sbb-size-icon-ui-small) );--sbb-toggle-selected-option-border-width: var(--sbb-border-width-1x);--sbb-toggle-selected-option-border-style: solid;--sbb-toggle-selected-option-border-color: var(--sbb-color-
|
|
14
|
+
const B = F`*,:before,:after{box-sizing:border-box}:host{display:block;width:fit-content;border-radius:var(--sbb-toggle-border-radius);--sbb-toggle-width: fit-content;--sbb-toggle-min-width: calc( var(--sbb-toggle-padding-inline) * 4 + var(--sbb-size-icon-ui-small) );--sbb-toggle-selected-option-border-width: var(--sbb-border-width-1x);--sbb-toggle-selected-option-border-style: solid;--sbb-toggle-selected-option-border-color: var(--sbb-border-color-5);--sbb-toggle-selected-option-background-color: var(--sbb-background-color-1);--sbb-toggle-background-inset: .125rem;--sbb-toggle-padding-inline: var(--sbb-spacing-responsive-xs);--sbb-toggle-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-6x) );--sbb-toggle-height: var(--sbb-size-element-m);--sbb-toggle-border-radius: var(--sbb-border-radius-infinity);--sbb-toggle-grid-template-columns: auto auto}@media (forced-colors: active){:host{--sbb-toggle-selected-option-border-color: Highlight;--sbb-toggle-selected-option-border-width: var(--sbb-border-width-2x)}}:host([even]){width:100%;--sbb-toggle-width: 100%;--sbb-toggle-grid-template-columns: 50% 50%}:host(:disabled){--sbb-toggle-selected-option-border-color: var(--sbb-color-graphite);--sbb-toggle-selected-option-border-color: light-dark( var(--sbb-color-graphite), var(--sbb-color-smoke) );--sbb-toggle-selected-option-border-style: dashed}@media (forced-colors: active){:host(:disabled){--sbb-toggle-selected-option-border-style: solid;--sbb-toggle-selected-option-border-color: GrayText}}:host([size=s]){--sbb-toggle-padding-inline: var(--sbb-spacing-responsive-xxxs);--sbb-toggle-height: var(--sbb-size-element-xxs)}:host(:is(:not([data-initialized]),[data-disable-animation-on-resizing])){--sbb-disable-animation-duration: 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);display:grid;grid-template-columns:var(--sbb-toggle-grid-template-columns);grid-template-areas:"start end";align-items:center;min-width:var(--sbb-toggle-min-width);width:var(--sbb-toggle-width);height:var(--sbb-toggle-height);max-width:100%;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;border-radius:var(--sbb-toggle-border-radius)}.sbb-toggle:before{content:"";display:block;grid-area:start/start/end/end;margin-inline:var(--sbb-toggle-option-left, 0) var(--sbb-toggle-option-right, 0);background-color:var(--sbb-toggle-selected-option-background-color);border-radius:var(--sbb-toggle-border-radius);max-width:100%;height:100%;border:var(--sbb-toggle-selected-option-border-width) var(--sbb-toggle-selected-option-border-style) var(--sbb-toggle-selected-option-border-color);transition-duration:var(--sbb-toggle-animation-duration);transition-timing-function:ease;transition-property:margin-inline-start,margin-inline-end}.sbb-toggle:after{content:"";grid-area:start/start/end/end;order:-1;background:var(--sbb-background-color-4);margin-inline:var(--sbb-toggle-background-inset);height:calc(100% - 2 * var(--sbb-toggle-background-inset));border-radius:var(--sbb-toggle-border-radius)}@media (forced-colors: active){.sbb-toggle:after{border:var(--sbb-border-width-1x) solid CanvasText}}::slotted(sbb-toggle-option:first-of-type){grid-area:start}::slotted(sbb-toggle-option:last-of-type){grid-area:end}`;
|
|
15
15
|
let se = (() => {
|
|
16
16
|
var b, d, r;
|
|
17
17
|
let i = [L("sbb-toggle")], o, a = [], n, _ = $(j(q(P))), y = [], x, k = [], w = [], z, D = [], E = [], S;
|
|
@@ -11,16 +11,16 @@ import { slotState as T, forceType as D } from "../../core/decorators.js";
|
|
|
11
11
|
import { setOrRemoveAttribute as P } from "../../core/dom.js";
|
|
12
12
|
import { SbbDisabledMixin as U, SbbElementInternalsMixin as j } from "../../core/mixins.js";
|
|
13
13
|
import { SbbIconNameMixin as L } from "../../icon.js";
|
|
14
|
-
const M = S`*,:before,:after{box-sizing:border-box}:host{--sbb-toggle-option-cursor: pointer;--sbb-toggle-option-color: var(--sbb-color-anthracite);--sbb-toggle-option-icon-min-size: var(--sbb-size-icon-ui-small);display:inline-block;overflow:hidden;outline:none!important}:host([checked]){--sbb-toggle-option-color: var(--sbb-color-
|
|
14
|
+
const M = S`*,:before,:after{box-sizing:border-box}:host{--sbb-toggle-option-cursor: pointer;--sbb-toggle-option-color: var(--sbb-color-anthracite);--sbb-toggle-option-color: light-dark(var(--sbb-color-anthracite), var(--sbb-color-cloud));--sbb-toggle-option-icon-min-size: var(--sbb-size-icon-ui-small);display:inline-block;overflow:hidden;outline:none!important}:host([checked]){--sbb-toggle-option-color: var(--sbb-color-2)}:host([disabled]){--sbb-toggle-option-cursor: unset;--sbb-toggle-option-color: var(--sbb-color-anthracite);--sbb-toggle-option-color: light-dark(var(--sbb-color-anthracite), var(--sbb-color-cloud))}.sbb-toggle-option{--sbb-text-font-size: var(--sbb-font-size-text-xs);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);font-weight:700;display:flex;justify-content:center;align-items:center;gap:var(--sbb-spacing-fixed-1x);height:var(--sbb-toggle-height);padding-inline:var(--sbb-toggle-padding-inline);color:var(--sbb-toggle-option-color);cursor:var(--sbb-toggle-option-cursor)}.sbb-toggle-option__label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}sbb-icon,::slotted(sbb-icon){min-width:var(--sbb-toggle-option-icon-min-size);min-height:var(--sbb-toggle-option-icon-min-size)}`;
|
|
15
15
|
let K = (() => {
|
|
16
16
|
var n, r, a;
|
|
17
|
-
let t = [O("sbb-toggle-option"), T()], i, s = [], l, u = U(L(j(C))), f, m = [],
|
|
17
|
+
let t = [O("sbb-toggle-option"), T()], i, s = [], l, u = U(L(j(C))), f, m = [], v = [], _, k = [], x = [];
|
|
18
18
|
return a = class extends u {
|
|
19
19
|
constructor() {
|
|
20
20
|
super();
|
|
21
21
|
g(this, n);
|
|
22
22
|
g(this, r);
|
|
23
|
-
c(this, n, b(this, m, !1)), c(this, r, (b(this,
|
|
23
|
+
c(this, n, b(this, m, !1)), c(this, r, (b(this, v), b(this, k, null))), this._toggle = (b(this, x), null), this.addEventListener?.("input", () => this._handleInput()), this.addEventListener?.("click", () => {
|
|
24
24
|
!this.disabled && !this.checked && this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 }));
|
|
25
25
|
}), this.addController(new I(this, {
|
|
26
26
|
skipInitial: !0,
|
|
@@ -77,9 +77,9 @@ let K = (() => {
|
|
|
77
77
|
}
|
|
78
78
|
}, n = new WeakMap(), r = new WeakMap(), l = a, (() => {
|
|
79
79
|
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
80
|
-
f = [D(), w({ reflect: !0, type: Boolean })],
|
|
80
|
+
f = [D(), w({ reflect: !0, type: Boolean })], _ = [w()], p(a, null, f, { kind: "accessor", name: "checked", static: !1, private: !1, access: { has: (o) => "checked" in o, get: (o) => o.checked, set: (o, h) => {
|
|
81
81
|
o.checked = h;
|
|
82
|
-
} }, metadata: e }, m,
|
|
82
|
+
} }, metadata: e }, m, v), p(a, null, _, { kind: "accessor", name: "value", static: !1, private: !1, access: { has: (o) => "value" in o, get: (o) => o.value, set: (o, h) => {
|
|
83
83
|
o.value = h;
|
|
84
84
|
} }, metadata: e }, k, x), p(null, i = { value: l }, t, { kind: "class", name: l.name, metadata: e }, null, s), l = i.value, e && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
85
85
|
})(), a.role = "radio", a.styles = M, b(l, s), l;
|