@sbb-esta/lyne-elements 2.11.0 → 2.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.component.js +19 -22
- package/action-group/action-group.component.js +3 -5
- package/alert/alert/alert.component.js +1 -2
- package/alert/alert-group/alert-group.component.js +2 -3
- package/autocomplete/autocomplete-base-element.js +71 -82
- package/autocomplete/autocomplete.component.js +31 -36
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +44 -52
- package/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +3 -4
- package/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +17 -20
- package/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +23 -26
- package/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +9 -9
- package/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +29 -33
- package/button/mini-button/mini-button.component.js +1 -1
- package/button/mini-button-group/mini-button-group.component.js +1 -2
- package/calendar/calendar.component.js +8 -13
- package/card/card/card.component.js +12 -12
- package/card/card-badge/card-badge.component.js +16 -16
- package/card/common/card-action-common.js +23 -25
- package/checkbox/checkbox/checkbox.component.js +17 -20
- package/checkbox/checkbox-group/checkbox-group.component.js +39 -52
- package/checkbox/checkbox-panel/checkbox-panel.component.js +22 -25
- package/checkbox/common/checkbox-common.js +13 -15
- package/chip/chip-group/chip-group.component.js +59 -70
- package/clock/clock.component.js +50 -60
- package/container/container/container.component.js +28 -29
- package/container/sticky-bar/sticky-bar.component.js +26 -27
- package/core/a11y/focus-trap-controller.js +11 -14
- package/core/a11y/focus.js +27 -29
- package/core/a11y/input-modality-detector.js +18 -19
- package/core/a11y/interactivity-checker.js +10 -10
- package/core/base-elements/button-base-element.js +13 -18
- package/core/base-elements/link-base-element.js +3 -6
- package/core/base-elements/open-close-base-element.js +1 -1
- package/core/controllers/connected-abort-controller.js +2 -4
- package/core/controllers/escapable-overlay-controller.js +10 -12
- package/core/controllers/id-reference-controller.js +13 -14
- package/core/controllers/inert-controller.js +8 -10
- package/core/controllers/slot-state-controller.js +16 -26
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/date-adapter.js +21 -21
- package/core/datetime/native-date-adapter.js +11 -11
- package/core/decorators/date-converter.js +10 -12
- package/core/decorators/date-only-type.js +5 -6
- package/core/decorators/force-type.js +4 -5
- package/core/dom/breakpoint.js +8 -8
- package/core/dom/input-element.js +4 -9
- package/core/eventing/event-emitter.js +4 -5
- package/core/mixins/form-associated-checkbox-mixin.js +32 -37
- package/core/mixins/form-associated-input-mixin.js +58 -64
- package/core/mixins/form-associated-mixin.js +42 -44
- package/core/mixins/form-associated-radio-button-mixin.js +3 -5
- package/core/mixins/hydration-mixin.js +12 -13
- package/core/mixins/named-slot-list-mixin.js +32 -37
- package/core/mixins/panel-mixin.js +26 -27
- package/core/mixins.js +1 -1
- package/core/overlay/position.js +23 -23
- package/core/styles/core/mediaqueries.scss +1 -1
- package/core/styles/core.scss +27 -28
- package/core/styles/mixins/table.scss +1 -24
- package/core/styles/mixins/typo.scss +0 -1
- package/core/testing/event-spy.js +2 -4
- package/core/testing/wait-for-image-ready.js +8 -9
- package/core/testing/wait-for-render.js +8 -9
- package/custom-elements.json +2 -2
- package/date-input/date-input.component.js +2 -4
- package/datepicker/common/datepicker-association-controllers.js +21 -24
- package/datepicker/common/datepicker-button.js +53 -57
- package/datepicker/datepicker/datepicker.component.js +82 -95
- package/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
- package/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.component.js +74 -81
- package/development/accordion/accordion.component.js +4 -7
- package/development/action-group/action-group.component.js +3 -5
- package/development/alert/alert/alert.component.js +2 -3
- package/development/alert/alert-group/alert-group.component.js +2 -3
- package/development/autocomplete/autocomplete-base-element.js +19 -30
- package/development/autocomplete/autocomplete.component.js +7 -12
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.component.js +10 -18
- package/development/autocomplete-grid/autocomplete-grid-button/autocomplete-grid-button.component.js +3 -4
- package/development/autocomplete-grid/autocomplete-grid-cell/autocomplete-grid-cell.component.js +1 -1
- package/development/autocomplete-grid/autocomplete-grid-optgroup/autocomplete-grid-optgroup.component.js +4 -7
- package/development/autocomplete-grid/autocomplete-grid-option/autocomplete-grid-option.component.js +4 -7
- package/development/autocomplete-grid/autocomplete-grid-row/autocomplete-grid-row.component.js +2 -2
- package/development/breadcrumb/breadcrumb/breadcrumb.component.js +1 -1
- package/development/breadcrumb/breadcrumb-group/breadcrumb-group.component.js +5 -9
- package/development/button/accent-button/accent-button.component.js +1 -1
- package/development/button/accent-button-link/accent-button-link.component.js +1 -1
- package/development/button/accent-button-static/accent-button-static.component.js +1 -1
- package/development/button/button/button.component.js +1 -1
- package/development/button/button-link/button-link.component.js +1 -1
- package/development/button/button-static/button-static.component.js +1 -1
- package/development/button/common/button-common.js +1 -1
- package/development/button/mini-button/mini-button.component.js +1 -1
- package/development/button/mini-button-group/mini-button-group.component.js +2 -3
- package/development/button/secondary-button/secondary-button.component.js +1 -1
- package/development/button/secondary-button-link/secondary-button-link.component.js +1 -1
- package/development/button/secondary-button-static/secondary-button-static.component.js +1 -1
- package/development/button/transparent-button/transparent-button.component.js +1 -1
- package/development/button/transparent-button-link/transparent-button-link.component.js +1 -1
- package/development/button/transparent-button-static/transparent-button-static.component.js +1 -1
- package/development/calendar/calendar.component.js +9 -14
- package/development/card/card/card.component.js +1 -1
- package/development/card/card-badge/card-badge.component.js +1 -1
- package/development/card/card-button/card-button.component.js +1 -1
- package/development/card/card-link/card-link.component.js +1 -1
- package/development/card/common/card-action-common.js +3 -5
- package/development/checkbox/checkbox/checkbox.component.js +2 -5
- package/development/checkbox/checkbox-group/checkbox-group.component.js +8 -21
- package/development/checkbox/checkbox-panel/checkbox-panel.component.js +2 -5
- package/development/checkbox/common/checkbox-common.js +3 -5
- package/development/chip/chip/chip.component.js +1 -1
- package/development/chip/chip-group/chip-group.component.js +15 -26
- package/development/chip-label/chip-label.component.js +1 -1
- package/development/clock/clock.component.js +23 -33
- package/development/container/container/container.component.js +2 -3
- package/development/container/sticky-bar/sticky-bar.component.js +2 -3
- package/development/core/a11y/arrow-navigation.js +1 -1
- package/development/core/a11y/fake-event-detection.js +1 -1
- package/development/core/a11y/focus-trap-controller.js +6 -9
- package/development/core/a11y/focus-visible-within-controller.js +1 -1
- package/development/core/a11y/focus.js +8 -10
- package/development/core/a11y/input-modality-detector.js +2 -3
- package/development/core/a11y/interactivity-checker.js +2 -2
- package/development/core/base-elements/action-base-element.js +2 -3
- package/development/core/base-elements/button-base-element.js +6 -11
- package/development/core/base-elements/link-base-element.js +4 -7
- package/development/core/base-elements/open-close-base-element.js +2 -2
- package/development/core/config/config.js +1 -1
- package/development/core/controllers/connected-abort-controller.js +3 -5
- package/development/core/controllers/escapable-overlay-controller.js +3 -5
- package/development/core/controllers/id-reference-controller.js +2 -3
- package/development/core/controllers/inert-controller.js +4 -6
- package/development/core/controllers/language-controller.js +1 -1
- package/development/core/controllers/media-matchers-controller.js +1 -1
- package/development/core/controllers/slot-state-controller.js +8 -18
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/date-adapter.js +5 -5
- package/development/core/datetime/native-date-adapter.js +2 -2
- package/development/core/decorators/date-converter.js +3 -5
- package/development/core/decorators/date-only-type.js +2 -3
- package/development/core/decorators/force-type.js +3 -4
- package/development/core/decorators/get-override.js +1 -1
- package/development/core/decorators/handle-distinct-change.js +1 -1
- package/development/core/decorators/host-attributes.js +1 -1
- package/development/core/decorators/slot-state.js +1 -1
- package/development/core/dom/animation.js +1 -1
- package/development/core/dom/breakpoint.js +2 -2
- package/development/core/dom/find-referenced-element.js +1 -1
- package/development/core/dom/host-context.js +1 -1
- package/development/core/dom/input-element.js +3 -4
- package/development/core/dom/platform.js +1 -1
- package/development/core/dom/scroll.js +1 -1
- package/development/core/dom/set-or-remove-attribute.js +1 -1
- package/development/core/eventing/composed-path-has-attribute.js +1 -1
- package/development/core/eventing/event-emitter.js +2 -3
- package/development/core/eventing/form-element-handlers.js +1 -1
- package/development/core/eventing/forward-event.js +1 -1
- package/development/core/eventing/throttle.js +1 -1
- package/development/core/i18n/i18n.js +1 -1
- package/development/core/mixins/animation-complete-mixin.js +1 -1
- package/development/core/mixins/disabled-mixin.js +1 -1
- package/development/core/mixins/form-associated-checkbox-mixin.js +6 -9
- package/development/core/mixins/form-associated-input-mixin.js +14 -20
- package/development/core/mixins/form-associated-mixin.js +5 -7
- package/development/core/mixins/form-associated-radio-button-mixin.js +7 -9
- package/development/core/mixins/hydration-mixin.js +3 -4
- package/development/core/mixins/named-slot-list-mixin.js +4 -7
- package/development/core/mixins/negative-mixin.js +1 -1
- package/development/core/mixins/panel-mixin.js +2 -3
- package/development/core/mixins/required-mixin.js +1 -1
- package/development/core/mixins/update-scheduler-mixin.js +1 -1
- package/development/core/overlay/overlay-option-panel.js +1 -1
- package/development/core/overlay/overlay-trigger-attributes.js +1 -1
- package/development/core/overlay/overlay.js +1 -1
- package/development/core/overlay/position.js +5 -5
- package/development/core/testing/event-spy.js +3 -5
- package/development/core/testing/mocha-extensions.js +1 -1
- package/development/core/testing/wait-for-condition.js +1 -1
- package/development/core/testing/wait-for-image-ready.js +2 -3
- package/development/core/testing/wait-for-render.js +2 -3
- package/development/date-input/date-input.component.js +4 -6
- package/development/datepicker/common/datepicker-association-controllers.js +6 -9
- package/development/datepicker/common/datepicker-button.js +7 -11
- package/development/datepicker/datepicker/datepicker.component.js +22 -35
- package/development/datepicker/datepicker-next-day/datepicker-next-day.component.js +1 -1
- package/development/datepicker/datepicker-previous-day/datepicker-previous-day.component.js +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.component.js +13 -20
- package/development/dialog/dialog/dialog.component.js +16 -27
- package/development/dialog/dialog-actions/dialog-actions.component.js +1 -1
- package/development/dialog/dialog-content/dialog-content.component.js +1 -1
- package/development/dialog/dialog-title/dialog-title.component.js +1 -1
- package/development/divider/divider.component.js +1 -1
- package/development/expansion-panel/expansion-panel/expansion-panel.component.js +9 -13
- package/development/expansion-panel/expansion-panel-content/expansion-panel-content.component.js +1 -1
- package/development/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +4 -5
- package/development/file-selector/common/file-selector-common.js +2 -3
- package/development/file-selector/file-selector/file-selector.component.js +1 -1
- package/development/file-selector/file-selector-dropzone/file-selector-dropzone.component.js +1 -1
- package/development/flip-card/flip-card/flip-card.component.js +7 -13
- package/development/flip-card/flip-card-details/flip-card-details.component.js +2 -3
- package/development/flip-card/flip-card-summary/flip-card-summary.component.js +2 -3
- package/development/footer/footer.component.js +1 -1
- package/development/form-error/form-error.component.js +3 -4
- package/development/form-field/form-field/form-field.component.js +19 -30
- package/development/form-field/form-field-clear/form-field-clear.component.js +4 -6
- package/development/header/common/header-action-common.js +1 -1
- package/development/header/header/header.component.js +5 -8
- package/development/header/header-button/header-button.component.js +1 -1
- package/development/header/header-link/header-link.component.js +1 -1
- package/development/icon/icon-base.js +1 -1
- package/development/icon/icon-name-mixin.js +1 -1
- package/development/icon/icon-request.js +2 -3
- package/development/icon/icon-validate.js +1 -1
- package/development/icon/icon.component.js +1 -1
- package/development/image/image.component.js +7 -9
- package/development/journey-header/journey-header.component.js +1 -1
- package/development/lead-container/lead-container.component.js +1 -1
- package/development/link/block-link/block-link.component.js +1 -1
- package/development/link/block-link-button/block-link-button.component.js +1 -1
- package/development/link/block-link-static/block-link-static.component.js +1 -1
- package/development/link/common/block-link-common.js +1 -1
- package/development/link/common/inline-link-common.js +1 -1
- package/development/link/link/link.component.js +1 -1
- package/development/link/link-button/link-button.component.js +1 -1
- package/development/link/link-static/link-static.component.js +1 -1
- package/development/link-common-CJEWffDZ.js +1 -1
- package/development/link-list/common/link-list-base.js +1 -1
- package/development/link-list/link-list/link-list.component.js +1 -1
- package/development/link-list/link-list-anchor/link-list-anchor.component.js +1 -1
- package/development/loading-indicator/loading-indicator.component.js +1 -1
- package/development/loading-indicator-circle/loading-indicator-circle.component.js +1 -1
- package/development/logo/logo.component.js +1 -1
- package/development/map-container/map-container.component.js +2 -3
- package/development/menu/common/menu-action-common.js +1 -1
- package/development/menu/menu/menu.component.js +17 -25
- package/development/menu/menu-button/menu-button.component.js +1 -1
- package/development/menu/menu-link/menu-link.component.js +1 -1
- package/development/message/message.component.js +1 -1
- package/development/navigation/common/navigation-action-common.js +3 -5
- package/development/navigation/navigation/navigation.component.js +19 -35
- package/development/navigation/navigation-button/navigation-button.component.js +1 -1
- package/development/navigation/navigation-link/navigation-link.component.js +1 -1
- package/development/navigation/navigation-list/navigation-list.component.js +1 -1
- package/development/navigation/navigation-marker/navigation-marker.component.js +4 -6
- package/development/navigation/navigation-section/navigation-section.component.js +22 -32
- package/development/notification/notification.component.js +22 -24
- package/development/option/optgroup/optgroup-base-element.js +4 -6
- package/development/option/optgroup/optgroup.component.js +6 -10
- package/development/option/option/option-base-element.js +3 -4
- package/development/option/option/option.component.js +7 -10
- package/development/overlay/overlay-base-element.js +4 -6
- package/development/overlay/overlay.component.js +7 -9
- package/development/paginator/common/paginator-common.js +1 -1
- package/development/paginator/compact-paginator/compact-paginator.component.js +1 -1
- package/development/paginator/paginator/paginator.component.js +2 -3
- package/development/popover/popover/popover.component.d.ts.map +1 -1
- package/development/popover/popover/popover.component.js +17 -19
- package/development/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/development/radio-button/common/radio-button-common.js +6 -10
- package/development/radio-button/radio-button/radio-button.component.js +2 -5
- package/development/radio-button/radio-button-group/radio-button-group.component.js +8 -24
- package/development/radio-button/radio-button-panel/radio-button-panel.component.js +3 -7
- package/development/screen-reader-only/screen-reader-only.component.js +1 -1
- package/development/select/select.component.js +26 -48
- package/development/selection-expansion-panel/selection-expansion-panel.component.js +7 -11
- package/development/sidebar/icon-sidebar/icon-sidebar.component.js +1 -1
- package/development/sidebar/icon-sidebar-button/icon-sidebar-button.component.js +1 -1
- package/development/sidebar/icon-sidebar-container/icon-sidebar-container.component.js +4 -7
- package/development/sidebar/icon-sidebar-content/icon-sidebar-content.component.js +1 -1
- package/development/sidebar/icon-sidebar-link/icon-sidebar-link.component.js +1 -1
- package/development/sidebar/sidebar/sidebar.component.js +8 -15
- package/development/sidebar/sidebar-close-button/sidebar-close-button.component.js +1 -1
- package/development/sidebar/sidebar-container/sidebar-container.component.js +9 -13
- package/development/sidebar/sidebar-content/sidebar-content.component.js +1 -1
- package/development/sidebar/sidebar-title/sidebar-title.component.js +2 -2
- package/development/signet/signet.component.js +1 -1
- package/development/skiplink-list/skiplink-list.component.js +1 -1
- package/development/slider/slider.component.js +3 -4
- package/development/status/status.component.js +3 -2
- package/development/stepper/step/step.component.js +5 -7
- package/development/stepper/step-label/step-label.component.js +3 -4
- package/development/stepper/stepper/stepper.component.js +16 -29
- package/development/table/table-wrapper/table-wrapper.component.js +2 -7
- package/development/tabs/tab/tab.component.js +1 -1
- package/development/tabs/tab-group/tab-group.component.js +23 -38
- package/development/tabs/tab-label/tab-label.component.js +1 -1
- package/development/tag/tag/tag.component.js +6 -12
- package/development/tag/tag-group/tag-group.component.js +5 -13
- package/development/teaser/teaser.component.js +1 -1
- package/development/teaser-hero/teaser-hero.component.js +1 -1
- package/development/teaser-product/common/teaser-product-common.js +1 -1
- package/development/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/development/teaser-product/teaser-product-static/teaser-product-static.component.js +1 -1
- package/development/time-input/time-input.component.js +8 -12
- package/development/timetable-occupancy/timetable-occupancy.component.js +1 -1
- package/development/timetable-occupancy-icon/timetable-occupancy-icon.component.js +2 -3
- package/development/title/title-base.js +1 -2
- package/development/title/title.component.js +1 -1
- package/development/toast/toast.component.js +4 -7
- package/development/toggle/toggle/toggle.component.js +8 -12
- package/development/toggle/toggle-option/toggle-option.component.js +9 -16
- package/development/toggle-check/toggle-check.component.js +1 -1
- package/development/train/train/train.component.js +1 -1
- package/development/train/train-blocked-passage/train-blocked-passage.component.js +1 -1
- package/development/train/train-formation/train-formation.component.js +5 -7
- package/development/train/train-wagon/train-wagon.component.js +1 -1
- package/development/visual-checkbox/visual-checkbox.component.js +1 -1
- package/dialog/dialog/dialog.component.js +59 -70
- package/expansion-panel/expansion-panel/expansion-panel.component.js +5 -9
- package/expansion-panel/expansion-panel-header/expansion-panel-header.component.js +31 -32
- package/file-selector/common/file-selector-common.js +1 -2
- package/flip-card/flip-card/flip-card.component.js +48 -54
- package/flip-card/flip-card-details/flip-card-details.component.js +16 -17
- package/flip-card/flip-card-summary/flip-card-summary.component.js +18 -19
- package/form-error/form-error.component.js +13 -14
- package/form-field/form-field/form-field.component.js +128 -139
- package/form-field/form-field-clear/form-field-clear.component.js +20 -22
- package/header/header/header.component.js +25 -28
- package/icon/icon-request.js +10 -11
- package/icon-sidebar-button-common-CM-ueEhH.js +7 -0
- package/image/image.component.js +4 -6
- package/map-container/map-container.component.js +1 -2
- package/menu/menu/menu.component.js +48 -56
- package/navigation/common/navigation-action-common.js +19 -21
- package/navigation/navigation/navigation.component.js +74 -93
- package/navigation/navigation-marker/navigation-marker.component.js +26 -28
- package/navigation/navigation-section/navigation-section.component.js +79 -89
- package/notification/notification.component.js +18 -20
- package/option/optgroup/optgroup-base-element.js +40 -42
- package/option/optgroup/optgroup.component.js +16 -20
- package/option/option/option-base-element.js +3 -4
- package/option/option/option.component.js +28 -31
- package/overlay/overlay-base-element.js +25 -27
- package/overlay/overlay.component.js +38 -40
- package/package.json +1 -1
- package/paginator/paginator/paginator.component.js +3 -4
- package/popover/popover/popover.component.d.ts.map +1 -1
- package/popover/popover/popover.component.js +65 -72
- package/popover/popover-trigger/popover-trigger.component.js +1 -1
- package/radio-button/common/radio-button-common.js +11 -15
- package/radio-button/radio-button/radio-button.component.js +20 -23
- package/radio-button/radio-button-group/radio-button-group.component.js +27 -43
- package/radio-button/radio-button-panel/radio-button-panel.component.js +31 -35
- package/select/select.component.js +89 -111
- package/selection-expansion-panel/selection-expansion-panel.component.js +35 -39
- package/sidebar/common.js +1 -1
- package/sidebar/icon-sidebar-container/icon-sidebar-container.component.js +10 -13
- package/sidebar/sidebar/sidebar.component.js +61 -68
- package/sidebar/sidebar-container/sidebar-container.component.js +29 -33
- package/sidebar/sidebar-title/sidebar-title.component.js +1 -1
- package/sidebar.js +1 -1
- package/slider/slider.component.js +3 -4
- package/standard-theme.css +0 -25
- package/status/status.component.js +17 -17
- package/stepper/step/step.component.js +22 -24
- package/stepper/step-label/step-label.component.js +2 -3
- package/stepper/stepper/stepper.component.js +72 -86
- package/table/table-wrapper/table-wrapper.component.js +13 -14
- package/table.css +0 -25
- package/tabs/tab-group/tab-group.component.js +77 -92
- package/tabs/tab-label/tab-label.component.js +10 -10
- package/tag/tag/tag.component.js +55 -61
- package/tag/tag-group/tag-group.component.js +21 -29
- package/teaser/teaser.component.js +1 -1
- package/teaser-product/common.js +1 -1
- package/teaser-product/teaser-product/teaser-product.component.js +1 -1
- package/teaser-product-common-C8oSkIxy.js +5 -0
- package/teaser-product.js +1 -1
- package/time-input/time-input.component.js +62 -66
- package/timetable-occupancy-icon/timetable-occupancy-icon.component.js +9 -10
- package/title/title-base.js +1 -1
- package/toast/toast.component.js +4 -7
- package/toggle/toggle/toggle.component.js +38 -42
- package/toggle/toggle-option/toggle-option.component.js +47 -54
- package/train/train-formation/train-formation.component.js +41 -43
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +0 -530
- package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +0 -1123
- package/icon-sidebar-button-common-DG8bnrBu.js +0 -7
- package/teaser-product-common-CpMAlYEp.js +0 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esDecorate as r, __runInitializers as c } from "tslib";
|
|
2
2
|
import { property as h } from "lit/decorators.js";
|
|
3
3
|
import { SbbFormAssociatedRadioButtonMixin as u } from "../../core/mixins.js";
|
|
4
|
-
const b = (
|
|
4
|
+
const b = (o) => (() => {
|
|
5
5
|
var t;
|
|
6
|
-
let
|
|
7
|
-
return t = class extends
|
|
6
|
+
let l = u(o), a = [], s;
|
|
7
|
+
return t = class extends l {
|
|
8
8
|
/**
|
|
9
9
|
* Whether the radio can be deselected.
|
|
10
10
|
*/
|
|
@@ -12,8 +12,7 @@ const b = (n) => (() => {
|
|
|
12
12
|
this._allowEmptySelection = !!e;
|
|
13
13
|
}
|
|
14
14
|
get allowEmptySelection() {
|
|
15
|
-
|
|
16
|
-
return this._allowEmptySelection || (((e = this.group) == null ? void 0 : e.allowEmptySelection) ?? !1);
|
|
15
|
+
return this._allowEmptySelection || (this.group?.allowEmptySelection ?? !1);
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
18
|
* Reference to the connected radio button group.
|
|
@@ -22,8 +21,7 @@ const b = (n) => (() => {
|
|
|
22
21
|
return this._group;
|
|
23
22
|
}
|
|
24
23
|
constructor() {
|
|
25
|
-
|
|
26
|
-
super(), this._allowEmptySelection = (c(this, s), !1), this._group = null, (e = this.addEventListener) == null || e.call(this, "click", (l) => this._handleClick(l)), (i = this.addEventListener) == null || i.call(this, "keydown", (l) => this._handleKeyDown(l));
|
|
24
|
+
super(), this._allowEmptySelection = (c(this, a), !1), this._group = null, this.addEventListener?.("click", (e) => this._handleClick(e)), this.addEventListener?.("keydown", (e) => this._handleKeyDown(e));
|
|
27
25
|
}
|
|
28
26
|
connectedCallback() {
|
|
29
27
|
super.connectedCallback(), this._group = this.closest("sbb-radio-button-group"), ["disabled", "required", "size"].forEach((e) => this.requestUpdate(e));
|
|
@@ -36,12 +34,10 @@ const b = (n) => (() => {
|
|
|
36
34
|
this.disabled || this.formDisabled || (this.allowEmptySelection ? (this.checked = !this.checked, this.emitChangeEvents()) : this.checked || (this.checked = !0, this.emitChangeEvents()));
|
|
37
35
|
}
|
|
38
36
|
isDisabledExternally() {
|
|
39
|
-
|
|
40
|
-
return ((e = this.group) == null ? void 0 : e.disabled) ?? !1;
|
|
37
|
+
return this.group?.disabled ?? !1;
|
|
41
38
|
}
|
|
42
39
|
isRequiredExternally() {
|
|
43
|
-
|
|
44
|
-
return ((e = this.group) == null ? void 0 : e.required) ?? !1;
|
|
40
|
+
return this.group?.required ?? !1;
|
|
45
41
|
}
|
|
46
42
|
async _handleClick(e) {
|
|
47
43
|
e.preventDefault(), this.select(), await this.updateComplete, this.focus();
|
|
@@ -50,10 +46,10 @@ const b = (n) => (() => {
|
|
|
50
46
|
e.code === "Space" && (e.preventDefault(), this.select());
|
|
51
47
|
}
|
|
52
48
|
}, (() => {
|
|
53
|
-
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(
|
|
54
|
-
|
|
55
|
-
i.allowEmptySelection =
|
|
56
|
-
} }, metadata: e }, null,
|
|
49
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(l[Symbol.metadata] ?? null) : void 0;
|
|
50
|
+
s = [h({ attribute: "allow-empty-selection", type: Boolean })], r(t, null, s, { kind: "setter", name: "allowEmptySelection", static: !1, private: !1, access: { has: (i) => "allowEmptySelection" in i, set: (i, n) => {
|
|
51
|
+
i.allowEmptySelection = n;
|
|
52
|
+
} }, metadata: e }, null, a), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
57
53
|
})(), t.events = {
|
|
58
54
|
change: "change",
|
|
59
55
|
input: "input"
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
1
|
+
var f = (t) => {
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as
|
|
7
|
-
import { css as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { slotState as
|
|
10
|
-
import { isLean as
|
|
11
|
-
import { SbbRadioButtonCommonElementMixin as
|
|
12
|
-
const
|
|
13
|
-
let
|
|
4
|
+
var p = (t, e, s) => e.has(t) || f("Cannot " + s);
|
|
5
|
+
var _ = (t, e, s) => (p(t, e, "read from private field"), s ? s.call(t) : e.get(t)), h = (t, e, s) => e.has(t) ? f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), z = (t, e, s, a) => (p(t, e, "write to private field"), a ? a.call(t, s) : e.set(t, s), s);
|
|
6
|
+
import { __esDecorate as v, __runInitializers as b } from "tslib";
|
|
7
|
+
import { css as y, LitElement as g, html as S } from "lit";
|
|
8
|
+
import { customElement as x, property as E } from "lit/decorators.js";
|
|
9
|
+
import { slotState as k, getOverride as B } from "../../core/decorators.js";
|
|
10
|
+
import { isLean as C } from "../../core/dom.js";
|
|
11
|
+
import { SbbRadioButtonCommonElementMixin as D, radioButtonCommonStyle as I } from "../common.js";
|
|
12
|
+
const O = y`*,:before,:after{box-sizing:border-box}:host{display:block;outline:none!important}.sbb-radio-button{display:block}:host(:focus-visible) .sbb-radio-button{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);border-radius:calc(var(--sbb-border-radius-4x) - var(--sbb-focus-outline-offset))}`;
|
|
13
|
+
let A = (() => {
|
|
14
14
|
var l, o;
|
|
15
|
-
let t = [
|
|
15
|
+
let t = [x("sbb-radio-button"), k()], e, s = [], a, u = D(g), c, m = [], d = [];
|
|
16
16
|
return o = class extends u {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
|
|
19
|
+
h(this, l, b(this, m, C() ? "xs" : "m"));
|
|
20
20
|
b(this, d);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -24,13 +24,13 @@ let F = (() => {
|
|
|
24
24
|
* @default 'm' / 'xs' (lean)
|
|
25
25
|
*/
|
|
26
26
|
get size() {
|
|
27
|
-
return
|
|
27
|
+
return _(this, l);
|
|
28
28
|
}
|
|
29
29
|
set size(r) {
|
|
30
|
-
|
|
30
|
+
z(this, l, r);
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return
|
|
33
|
+
return S`
|
|
34
34
|
<label class="sbb-radio-button">
|
|
35
35
|
<span class="sbb-radio-button__label-slot">
|
|
36
36
|
<slot></slot>
|
|
@@ -40,18 +40,15 @@ let F = (() => {
|
|
|
40
40
|
}
|
|
41
41
|
}, l = new WeakMap(), a = o, (() => {
|
|
42
42
|
const r = typeof Symbol == "function" && Symbol.metadata ? Object.create(u[Symbol.metadata] ?? null) : void 0;
|
|
43
|
-
c = [
|
|
44
|
-
var f;
|
|
45
|
-
return ((f = i.group) == null ? void 0 : f.size) ?? n;
|
|
46
|
-
})], y(o, null, c, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (i) => "size" in i, get: (i) => i.size, set: (i, n) => {
|
|
43
|
+
c = [E({ reflect: !0 }), B((i, n) => i.group?.size ?? n)], v(o, null, c, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (i) => "size" in i, get: (i) => i.size, set: (i, n) => {
|
|
47
44
|
i.size = n;
|
|
48
|
-
} }, metadata: r }, m, d),
|
|
49
|
-
})(), o.styles = [
|
|
45
|
+
} }, metadata: r }, m, d), v(null, e = { value: a }, t, { kind: "class", name: a.name, metadata: r }, null, s), a = e.value, r && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: r });
|
|
46
|
+
})(), o.styles = [I, O], o.events = {
|
|
50
47
|
stateChange: "stateChange",
|
|
51
48
|
change: "change",
|
|
52
49
|
input: "input"
|
|
53
50
|
}, b(a, s), a;
|
|
54
51
|
})();
|
|
55
52
|
export {
|
|
56
|
-
|
|
53
|
+
A as SbbRadioButtonElement
|
|
57
54
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var $ = (
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var $ = (a) => {
|
|
2
|
+
throw TypeError(a);
|
|
3
3
|
};
|
|
4
|
-
var M = (
|
|
5
|
-
var u = (
|
|
4
|
+
var M = (a, i, n) => i.has(a) || $("Cannot " + n);
|
|
5
|
+
var u = (a, i, n) => (M(a, i, "read from private field"), n ? n.call(a) : i.get(a)), b = (a, i, n) => i.has(a) ? $("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(a) : i.set(a, n), l = (a, i, n, d) => (M(a, i, "write to private field"), d ? d.call(a, n) : i.set(a, n), n);
|
|
6
6
|
import { __esDecorate as h, __runInitializers as s } from "tslib";
|
|
7
7
|
import { css as H, LitElement as J, html as K } from "lit";
|
|
8
8
|
import { customElement as Q, property as c } from "lit/decorators.js";
|
|
@@ -13,12 +13,11 @@ import { SbbDisabledMixin as P } from "../../core/mixins.js";
|
|
|
13
13
|
const tt = H`*,:before,:after{box-sizing:border-box}:host{--sbb-radio-button-group-orientation: row;--sbb-radio-button-group-width: max-content;--sbb-radio-button-group-gap: var(--sbb-spacing-fixed-3x) var(--sbb-spacing-fixed-6x);display:block}:host ::slotted(sbb-radio-button-panel){flex:auto}:host([orientation=vertical]){--sbb-radio-button-group-orientation: column;--sbb-radio-button-group-width: 100%}:host([orientation=vertical]) ::slotted(sbb-radio-button-panel){width:100%}:host([data-has-panel]){--sbb-radio-button-group-width: 100%}:host([data-has-panel][orientation=vertical]){--sbb-radio-button-group-gap: var(--sbb-spacing-fixed-2x) var(--sbb-spacing-fixed-4x)}@media (min-width: 0rem){:host([orientation=vertical][horizontal-from=zero]){--sbb-radio-button-group-orientation: row}:host([orientation=vertical][horizontal-from=zero]) ::slotted(sbb-radio-button-panel){width:unset}:host([orientation=vertical][horizontal-from=zero]:not([data-has-panel])){--sbb-radio-button-group-width: max-content}}@media (min-width: 22.5rem){:host([orientation=vertical][horizontal-from=micro]){--sbb-radio-button-group-orientation: row}:host([orientation=vertical][horizontal-from=micro]) ::slotted(sbb-radio-button-panel){width:unset}:host([orientation=vertical][horizontal-from=micro]:not([data-has-panel])){--sbb-radio-button-group-width: max-content}}@media (min-width: 37.5rem){:host([orientation=vertical][horizontal-from=small]){--sbb-radio-button-group-orientation: row}:host([orientation=vertical][horizontal-from=small]) ::slotted(sbb-radio-button-panel){width:unset}:host([orientation=vertical][horizontal-from=small]:not([data-has-panel])){--sbb-radio-button-group-width: max-content}}@media (min-width: 52.5rem){:host([orientation=vertical][horizontal-from=medium]){--sbb-radio-button-group-orientation: row}:host([orientation=vertical][horizontal-from=medium]) ::slotted(sbb-radio-button-panel){width:unset}:host([orientation=vertical][horizontal-from=medium]:not([data-has-panel])){--sbb-radio-button-group-width: max-content}}@media (min-width: 64rem){:host([orientation=vertical][horizontal-from=large]){--sbb-radio-button-group-orientation: row}:host([orientation=vertical][horizontal-from=large]) ::slotted(sbb-radio-button-panel){width:unset}:host([orientation=vertical][horizontal-from=large]:not([data-has-panel])){--sbb-radio-button-group-width: max-content}}@media (min-width: 80rem){:host([orientation=vertical][horizontal-from=wide]){--sbb-radio-button-group-orientation: row}:host([orientation=vertical][horizontal-from=wide]) ::slotted(sbb-radio-button-panel){width:unset}:host([orientation=vertical][horizontal-from=wide]:not([data-has-panel])){--sbb-radio-button-group-width: max-content}}@media (min-width: 90rem){:host([orientation=vertical][horizontal-from=ultra]){--sbb-radio-button-group-orientation: row}:host([orientation=vertical][horizontal-from=ultra]) ::slotted(sbb-radio-button-panel){width:unset}:host([orientation=vertical][horizontal-from=ultra]:not([data-has-panel])){--sbb-radio-button-group-width: max-content}}.sbb-radio-group{display:flex;flex-direction:var(--sbb-radio-button-group-orientation);gap:var(--sbb-radio-button-group-gap);align-items:flex-start;width:var(--sbb-radio-button-group-width)}.sbb-radio-group__error{display:inline-block;margin-block-start:var(--sbb-spacing-fixed-1x)}:host(:not([data-slot-names~=error])) .sbb-radio-group__error{display:none}`;
|
|
14
14
|
let et = 0, ut = (() => {
|
|
15
15
|
var m, p, f, _, g, z, r;
|
|
16
|
-
let
|
|
16
|
+
let a = [Q("sbb-radio-button-group"), W({
|
|
17
17
|
role: "radiogroup"
|
|
18
18
|
}), X()], i, n = [], d, x = P(J), y = [], E, S = [], k = [], q, B = [], C = [], F, I, R = [], U = [], N, V = [], A = [], D, L = [], j = [], G, O = [], T = [];
|
|
19
19
|
var v = (r = class extends x {
|
|
20
20
|
constructor() {
|
|
21
|
-
var e;
|
|
22
21
|
super();
|
|
23
22
|
b(this, m);
|
|
24
23
|
b(this, p);
|
|
@@ -26,7 +25,7 @@ let et = 0, ut = (() => {
|
|
|
26
25
|
b(this, _);
|
|
27
26
|
b(this, g);
|
|
28
27
|
b(this, z);
|
|
29
|
-
l(this, m, (s(this, y), s(this, S, !1))), l(this, p, (s(this, k), s(this, B, !1))), this._fallbackValue = (s(this, C), null), l(this, f, s(this, R, Y() ? "xs" : "m")), l(this, _, (s(this, U), s(this, V, null))), l(this, g, (s(this, A), s(this, L, "horizontal"))), l(this, z, (s(this, j), s(this, O, `sbb-radio-button-group-${++et}`))), this._didChange = (s(this, T), new Z(this, v.events.didChange)),
|
|
28
|
+
l(this, m, (s(this, y), s(this, S, !1))), l(this, p, (s(this, k), s(this, B, !1))), this._fallbackValue = (s(this, C), null), l(this, f, s(this, R, Y() ? "xs" : "m")), l(this, _, (s(this, U), s(this, V, null))), l(this, g, (s(this, A), s(this, L, "horizontal"))), l(this, z, (s(this, j), s(this, O, `sbb-radio-button-group-${++et}`))), this._didChange = (s(this, T), new Z(this, v.events.didChange)), this.addEventListener?.("change", (e) => this._onRadioChange(e));
|
|
30
29
|
}
|
|
31
30
|
/**
|
|
32
31
|
* Whether the radios can be deselected.
|
|
@@ -53,15 +52,14 @@ let et = 0, ut = (() => {
|
|
|
53
52
|
if (this._fallbackValue = e, !this.hasUpdated)
|
|
54
53
|
return;
|
|
55
54
|
if (e == null) {
|
|
56
|
-
this.radioButtons.forEach((
|
|
55
|
+
this.radioButtons.forEach((o) => o.checked = !1);
|
|
57
56
|
return;
|
|
58
57
|
}
|
|
59
|
-
const t = this.radioButtons.find((
|
|
58
|
+
const t = this.radioButtons.find((o) => o.value === e);
|
|
60
59
|
t && (t.checked = !0);
|
|
61
60
|
}
|
|
62
61
|
get value() {
|
|
63
|
-
|
|
64
|
-
return ((e = this.radioButtons.find((t) => t.checked && !t.disabled)) == null ? void 0 : e.value) ?? this._fallbackValue;
|
|
62
|
+
return this.radioButtons.find((e) => e.checked && !e.disabled)?.value ?? this._fallbackValue;
|
|
65
63
|
}
|
|
66
64
|
/**
|
|
67
65
|
* Size variant, either xs, s or m.
|
|
@@ -101,27 +99,13 @@ let et = 0, ut = (() => {
|
|
|
101
99
|
* List of contained radio buttons.
|
|
102
100
|
*/
|
|
103
101
|
get radioButtons() {
|
|
104
|
-
|
|
105
|
-
return Array.from(((e = this.querySelectorAll) == null ? void 0 : e.call(this, "sbb-radio-button, sbb-radio-button-panel")) ?? []).filter((t) => {
|
|
106
|
-
var a;
|
|
107
|
-
return ((a = t.closest) == null ? void 0 : a.call(t, "sbb-radio-button-group")) === this;
|
|
108
|
-
});
|
|
102
|
+
return Array.from(this.querySelectorAll?.("sbb-radio-button, sbb-radio-button-panel") ?? []).filter((e) => e.closest?.("sbb-radio-button-group") === this);
|
|
109
103
|
}
|
|
110
104
|
connectedCallback() {
|
|
111
|
-
|
|
112
|
-
super.connectedCallback(), this.toggleAttribute("data-has-panel", !!((e = this.querySelector) != null && e.call(this, "sbb-radio-button-panel")));
|
|
105
|
+
super.connectedCallback(), this.toggleAttribute("data-has-panel", !!this.querySelector?.("sbb-radio-button-panel"));
|
|
113
106
|
}
|
|
114
107
|
willUpdate(e) {
|
|
115
|
-
super.willUpdate(e), e.has("disabled") && this.radioButtons.forEach((t) =>
|
|
116
|
-
var a;
|
|
117
|
-
return (a = t.requestUpdate) == null ? void 0 : a.call(t, "disabled");
|
|
118
|
-
}), e.has("required") && this.radioButtons.forEach((t) => {
|
|
119
|
-
var a;
|
|
120
|
-
return (a = t.requestUpdate) == null ? void 0 : a.call(t, "required");
|
|
121
|
-
}), e.has("size") && this.radioButtons.forEach((t) => {
|
|
122
|
-
var a;
|
|
123
|
-
return (a = t.requestUpdate) == null ? void 0 : a.call(t, "size");
|
|
124
|
-
}), e.has("name") && this._updateRadiosName();
|
|
108
|
+
super.willUpdate(e), e.has("disabled") && this.radioButtons.forEach((t) => t.requestUpdate?.("disabled")), e.has("required") && this.radioButtons.forEach((t) => t.requestUpdate?.("required")), e.has("size") && this.radioButtons.forEach((t) => t.requestUpdate?.("size")), e.has("name") && this._updateRadiosName();
|
|
125
109
|
}
|
|
126
110
|
async firstUpdated(e) {
|
|
127
111
|
super.firstUpdated(e), await this.updateComplete, this._updateRadioState();
|
|
@@ -159,21 +143,21 @@ let et = 0, ut = (() => {
|
|
|
159
143
|
}
|
|
160
144
|
}, m = new WeakMap(), p = new WeakMap(), f = new WeakMap(), _ = new WeakMap(), g = new WeakMap(), z = new WeakMap(), d = r, (() => {
|
|
161
145
|
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(x[Symbol.metadata] ?? null) : void 0;
|
|
162
|
-
E = [w(), c({ attribute: "allow-empty-selection", type: Boolean })], q = [w(), c({ type: Boolean })], F = [c()], I = [c()], N = [c({ attribute: "horizontal-from", reflect: !0 })], D = [c({ reflect: !0 })], G = [w(), c()], h(r, null, E, { kind: "accessor", name: "allowEmptySelection", static: !1, private: !1, access: { has: (t) => "allowEmptySelection" in t, get: (t) => t.allowEmptySelection, set: (t,
|
|
163
|
-
t.allowEmptySelection =
|
|
164
|
-
} }, metadata: e }, S, k), h(r, null, q, { kind: "accessor", name: "required", static: !1, private: !1, access: { has: (t) => "required" in t, get: (t) => t.required, set: (t,
|
|
165
|
-
t.required =
|
|
166
|
-
} }, metadata: e }, B, C), h(r, null, F, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, set: (t,
|
|
167
|
-
t.value =
|
|
168
|
-
} }, metadata: e }, null, y), h(r, null, I, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t,
|
|
169
|
-
t.size =
|
|
170
|
-
} }, metadata: e }, R, U), h(r, null, N, { kind: "accessor", name: "horizontalFrom", static: !1, private: !1, access: { has: (t) => "horizontalFrom" in t, get: (t) => t.horizontalFrom, set: (t,
|
|
171
|
-
t.horizontalFrom =
|
|
172
|
-
} }, metadata: e }, V, A), h(r, null, D, { kind: "accessor", name: "orientation", static: !1, private: !1, access: { has: (t) => "orientation" in t, get: (t) => t.orientation, set: (t,
|
|
173
|
-
t.orientation =
|
|
174
|
-
} }, metadata: e }, L, j), h(r, null, G, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (t) => "name" in t, get: (t) => t.name, set: (t,
|
|
175
|
-
t.name =
|
|
176
|
-
} }, metadata: e }, O, T), h(null, i = { value: d },
|
|
146
|
+
E = [w(), c({ attribute: "allow-empty-selection", type: Boolean })], q = [w(), c({ type: Boolean })], F = [c()], I = [c()], N = [c({ attribute: "horizontal-from", reflect: !0 })], D = [c({ reflect: !0 })], G = [w(), c()], h(r, null, E, { kind: "accessor", name: "allowEmptySelection", static: !1, private: !1, access: { has: (t) => "allowEmptySelection" in t, get: (t) => t.allowEmptySelection, set: (t, o) => {
|
|
147
|
+
t.allowEmptySelection = o;
|
|
148
|
+
} }, metadata: e }, S, k), h(r, null, q, { kind: "accessor", name: "required", static: !1, private: !1, access: { has: (t) => "required" in t, get: (t) => t.required, set: (t, o) => {
|
|
149
|
+
t.required = o;
|
|
150
|
+
} }, metadata: e }, B, C), h(r, null, F, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, set: (t, o) => {
|
|
151
|
+
t.value = o;
|
|
152
|
+
} }, metadata: e }, null, y), h(r, null, I, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, o) => {
|
|
153
|
+
t.size = o;
|
|
154
|
+
} }, metadata: e }, R, U), h(r, null, N, { kind: "accessor", name: "horizontalFrom", static: !1, private: !1, access: { has: (t) => "horizontalFrom" in t, get: (t) => t.horizontalFrom, set: (t, o) => {
|
|
155
|
+
t.horizontalFrom = o;
|
|
156
|
+
} }, metadata: e }, V, A), h(r, null, D, { kind: "accessor", name: "orientation", static: !1, private: !1, access: { has: (t) => "orientation" in t, get: (t) => t.orientation, set: (t, o) => {
|
|
157
|
+
t.orientation = o;
|
|
158
|
+
} }, metadata: e }, L, j), h(r, null, G, { kind: "accessor", name: "name", static: !1, private: !1, access: { has: (t) => "name" in t, get: (t) => t.name, set: (t, o) => {
|
|
159
|
+
t.name = o;
|
|
160
|
+
} }, metadata: e }, O, T), h(null, i = { value: d }, a, { kind: "class", name: d.name, metadata: e }, null, n), v = d = i.value, e && Object.defineProperty(d, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
177
161
|
})(), r.styles = tt, r.events = {
|
|
178
162
|
didChange: "didChange",
|
|
179
163
|
change: "change",
|
|
@@ -1,42 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var _ = (e) => {
|
|
2
|
+
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __runInitializers as b, __esDecorate as
|
|
7
|
-
import { LitElement as
|
|
8
|
-
import { customElement as
|
|
9
|
-
import { slotState as
|
|
10
|
-
import { isLean as
|
|
11
|
-
import { EventEmitter as
|
|
12
|
-
import { SbbPanelMixin as
|
|
13
|
-
import { SbbRadioButtonCommonElementMixin as
|
|
4
|
+
var f = (e, s, i) => s.has(e) || _("Cannot " + i);
|
|
5
|
+
var g = (e, s, i) => (f(e, s, "read from private field"), i ? i.call(e) : s.get(e)), y = (e, s, i) => s.has(e) ? _("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, i), d = (e, s, i, n) => (f(e, s, "write to private field"), n ? n.call(e, i) : s.set(e, i), i);
|
|
6
|
+
import { __runInitializers as b, __esDecorate as S } from "tslib";
|
|
7
|
+
import { LitElement as z, nothing as E, html as x } from "lit";
|
|
8
|
+
import { customElement as v, property as C } from "lit/decorators.js";
|
|
9
|
+
import { slotState as k, getOverride as B } from "../../core/decorators.js";
|
|
10
|
+
import { isLean as R } from "../../core/dom.js";
|
|
11
|
+
import { EventEmitter as w } from "../../core/eventing.js";
|
|
12
|
+
import { SbbPanelMixin as I, SbbUpdateSchedulerMixin as P, panelCommonStyle as D } from "../../core/mixins.js";
|
|
13
|
+
import { SbbRadioButtonCommonElementMixin as M, radioButtonCommonStyle as O } from "../common.js";
|
|
14
14
|
import "../../screen-reader-only.js";
|
|
15
|
-
let
|
|
15
|
+
let J = (() => {
|
|
16
16
|
var o, l;
|
|
17
|
-
let
|
|
17
|
+
let e = [v("sbb-radio-button-panel"), k()], s, i = [], n, m = I(M(P(z))), u, h = [], p = [];
|
|
18
18
|
var r = (l = class extends m {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
|
-
|
|
22
|
-
d(this, o, b(this, h,
|
|
21
|
+
y(this, o);
|
|
22
|
+
d(this, o, b(this, h, R() ? "s" : "m")), this._hasSelectionExpansionPanelElement = (b(this, p), !1), this._stateChange = new w(this, r.events.stateChange, { bubbles: !0 });
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Size variant, either s or m.
|
|
26
26
|
* @default 'm' / 's' (lean)
|
|
27
27
|
*/
|
|
28
28
|
get size() {
|
|
29
|
-
return
|
|
29
|
+
return g(this, o);
|
|
30
30
|
}
|
|
31
|
-
set size(
|
|
32
|
-
d(this, o,
|
|
31
|
+
set size(t) {
|
|
32
|
+
d(this, o, t);
|
|
33
33
|
}
|
|
34
34
|
connectedCallback() {
|
|
35
|
-
|
|
36
|
-
super.connectedCallback(), this._hasSelectionExpansionPanelElement = !!((e = this.closest) != null && e.call(this, "sbb-selection-expansion-panel"));
|
|
35
|
+
super.connectedCallback(), this._hasSelectionExpansionPanelElement = !!this.closest?.("sbb-selection-expansion-panel");
|
|
37
36
|
}
|
|
38
|
-
willUpdate(
|
|
39
|
-
super.willUpdate(
|
|
37
|
+
willUpdate(t) {
|
|
38
|
+
super.willUpdate(t), t.has("checked") && (this.toggleAttribute("data-checked", this.checked), this.checked !== t.get("checked") && this._stateChange.emit({ type: "checked", checked: this.checked })), t.has("disabled") && this.disabled !== t.get("disabled") && this._stateChange.emit({ type: "disabled", disabled: this.disabled });
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
42
41
|
* As an exception, panels with an expansion-panel attached are always focusable
|
|
@@ -47,11 +46,11 @@ let N = (() => {
|
|
|
47
46
|
/**
|
|
48
47
|
* As an exception, radio-panels with an expansion-panel attached are not checked automatically when navigating by keyboard
|
|
49
48
|
*/
|
|
50
|
-
async navigateByKeyboard(
|
|
51
|
-
this._hasSelectionExpansionPanelElement ?
|
|
49
|
+
async navigateByKeyboard(t) {
|
|
50
|
+
this._hasSelectionExpansionPanelElement ? t.focus() : await super.navigateByKeyboard(t);
|
|
52
51
|
}
|
|
53
52
|
render() {
|
|
54
|
-
return
|
|
53
|
+
return x`
|
|
55
54
|
<label class="sbb-selection-panel">
|
|
56
55
|
<div class="sbb-selection-panel__badge">
|
|
57
56
|
<slot name="badge"></slot>
|
|
@@ -62,20 +61,17 @@ let N = (() => {
|
|
|
62
61
|
<slot name="suffix"></slot>
|
|
63
62
|
</span>
|
|
64
63
|
<slot name="subtext"></slot>
|
|
65
|
-
${this.expansionState ?
|
|
64
|
+
${this.expansionState ? x`<sbb-screen-reader-only>${this.expansionState}</sbb-screen-reader-only>` : E}
|
|
66
65
|
</span>
|
|
67
66
|
</label>
|
|
68
67
|
`;
|
|
69
68
|
}
|
|
70
69
|
}, o = new WeakMap(), n = l, (() => {
|
|
71
|
-
const
|
|
72
|
-
u = [
|
|
73
|
-
var _;
|
|
74
|
-
return (_ = a.group) != null && _.size ? a.group.size === "xs" ? "s" : a.group.size : c;
|
|
75
|
-
})], x(l, null, u, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (a) => "size" in a, get: (a) => a.size, set: (a, c) => {
|
|
70
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(m[Symbol.metadata] ?? null) : void 0;
|
|
71
|
+
u = [C({ reflect: !0 }), B((a, c) => a.group?.size ? a.group.size === "xs" ? "s" : a.group.size : c)], S(l, null, u, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (a) => "size" in a, get: (a) => a.size, set: (a, c) => {
|
|
76
72
|
a.size = c;
|
|
77
|
-
} }, metadata:
|
|
78
|
-
})(), l.styles = [
|
|
73
|
+
} }, metadata: t }, h, p), S(null, s = { value: n }, e, { kind: "class", name: n.name, metadata: t }, null, i), r = n = s.value, t && Object.defineProperty(n, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
74
|
+
})(), l.styles = [O, D], l.events = {
|
|
79
75
|
change: "change",
|
|
80
76
|
input: "input",
|
|
81
77
|
panelConnected: "panelConnected",
|
|
@@ -84,5 +80,5 @@ let N = (() => {
|
|
|
84
80
|
return r = n;
|
|
85
81
|
})();
|
|
86
82
|
export {
|
|
87
|
-
|
|
83
|
+
J as SbbRadioButtonPanelElement
|
|
88
84
|
};
|