@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
package/core/a11y/focus.js
CHANGED
|
@@ -8,33 +8,32 @@ const h = [
|
|
|
8
8
|
"details",
|
|
9
9
|
"summary",
|
|
10
10
|
"[tabindex]"
|
|
11
|
-
].map((
|
|
12
|
-
function u(
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
l(Array.from(t.assignedElements()), a);
|
|
11
|
+
].map((l) => `${l}:not([disabled],:disabled,[tabindex="-1"],[inert])`).join(",");
|
|
12
|
+
function u(l, n) {
|
|
13
|
+
const t = /* @__PURE__ */ new Set();
|
|
14
|
+
function o(i, r) {
|
|
15
|
+
for (const e of i)
|
|
16
|
+
if (!(r && !r(e))) {
|
|
17
|
+
if (e.nodeName === "SLOT") {
|
|
18
|
+
o(Array.from(e.assignedElements()), r);
|
|
20
19
|
continue;
|
|
21
20
|
}
|
|
22
|
-
if (
|
|
21
|
+
if (e.matches(h) && (n?.includeInvisibleElements ?? f.isVisible(e)) && t.add(e), n?.findFirstFocusable && t.size > 0)
|
|
23
22
|
break;
|
|
24
|
-
if (
|
|
25
|
-
const
|
|
26
|
-
|
|
23
|
+
if (e.children.length || e.shadowRoot?.children.length) {
|
|
24
|
+
const s = Array.from(e.children).length ? Array.from(e.children) : Array.from(e.shadowRoot.children);
|
|
25
|
+
o(s, r);
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
return l
|
|
29
|
+
return o(l, n?.filter), [...t];
|
|
31
30
|
}
|
|
32
|
-
function m(
|
|
33
|
-
const
|
|
34
|
-
filter:
|
|
31
|
+
function m(l, n) {
|
|
32
|
+
const t = u(l, {
|
|
33
|
+
filter: n,
|
|
35
34
|
findFirstFocusable: !0
|
|
36
35
|
});
|
|
37
|
-
return
|
|
36
|
+
return t.length ? t[0] : null;
|
|
38
37
|
}
|
|
39
38
|
class g {
|
|
40
39
|
constructor() {
|
|
@@ -46,25 +45,24 @@ class g {
|
|
|
46
45
|
* @param options.filter filter function which is applied during searching for focusable element. If an element is filtered, also child elements are filtered.
|
|
47
46
|
* @param options.postFilter filter function which is applied after collecting focusable elements.
|
|
48
47
|
*/
|
|
49
|
-
trap(
|
|
50
|
-
this._controller = new AbortController(),
|
|
51
|
-
if (
|
|
48
|
+
trap(n, t) {
|
|
49
|
+
this._controller = new AbortController(), n.addEventListener("keydown", (o) => {
|
|
50
|
+
if (o.key !== "Tab")
|
|
52
51
|
return;
|
|
53
|
-
const
|
|
54
|
-
filter:
|
|
55
|
-
}).filter(
|
|
56
|
-
if (!
|
|
52
|
+
const i = Array.from(n.shadowRoot.children || []), e = u(i, {
|
|
53
|
+
filter: t?.filter
|
|
54
|
+
}).filter(t?.postFilter ?? (() => !0));
|
|
55
|
+
if (!e.length)
|
|
57
56
|
return;
|
|
58
|
-
const
|
|
59
|
-
(
|
|
57
|
+
const s = e[0], c = e[e.length - 1], [a, d] = o.shiftKey ? [s, c] : [c, s];
|
|
58
|
+
(s.getRootNode().activeElement === a || c.getRootNode().activeElement === a) && (d.focus(), o.preventDefault());
|
|
60
59
|
}, { signal: this._controller.signal });
|
|
61
60
|
}
|
|
62
61
|
isTrapped() {
|
|
63
62
|
return !!this._controller;
|
|
64
63
|
}
|
|
65
64
|
disconnect() {
|
|
66
|
-
|
|
67
|
-
(e = this._controller) == null || e.abort(), this._controller = null;
|
|
65
|
+
this._controller?.abort(), this._controller = null;
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
import { getEventTarget as
|
|
3
|
-
import { isFakeMousedownFromScreenReader as
|
|
4
|
-
const
|
|
5
|
-
ignoreKeys: [
|
|
6
|
-
},
|
|
1
|
+
import { isServer as n } from "lit";
|
|
2
|
+
import { getEventTarget as i } from "../eventing.js";
|
|
3
|
+
import { isFakeMousedownFromScreenReader as r, isFakeTouchstartFromScreenReader as a } from "./fake-event-detection.js";
|
|
4
|
+
const d = 16, u = 17, c = 18, h = 91, m = 224, l = {
|
|
5
|
+
ignoreKeys: [c, u, m, h, d]
|
|
6
|
+
}, _ = 650, s = {
|
|
7
7
|
passive: !0,
|
|
8
8
|
capture: !0
|
|
9
9
|
};
|
|
10
|
-
class
|
|
10
|
+
class y {
|
|
11
11
|
/** The most recently detected input modality. */
|
|
12
12
|
get mostRecentModality() {
|
|
13
13
|
return this._mostRecentModality;
|
|
@@ -21,32 +21,31 @@ class p {
|
|
|
21
21
|
}
|
|
22
22
|
constructor() {
|
|
23
23
|
this._mostRecentModality = "mouse", this._mostRecentTarget = null, this._options = {
|
|
24
|
-
...
|
|
24
|
+
...l
|
|
25
25
|
}, this._lastTouchMs = 0, this._onKeydown = (t) => {
|
|
26
|
-
|
|
27
|
-
(n = (o = this._options) == null ? void 0 : o.ignoreKeys) != null && n.some((i) => i === t.keyCode) || this._updateState("keyboard", t);
|
|
26
|
+
this._options?.ignoreKeys?.some((o) => o === t.keyCode) || this._updateState("keyboard", t);
|
|
28
27
|
}, this._onMousedown = (t) => {
|
|
29
|
-
Date.now() - this._lastTouchMs <
|
|
28
|
+
Date.now() - this._lastTouchMs < _ || this._updateState(r(t) ? "keyboard" : "mouse", t);
|
|
30
29
|
}, this._onTouchstart = (t) => {
|
|
31
|
-
if (
|
|
30
|
+
if (a(t)) {
|
|
32
31
|
this._updateState("keyboard", t);
|
|
33
32
|
return;
|
|
34
33
|
}
|
|
35
34
|
this._lastTouchMs = Date.now(), this._updateState("touch", t);
|
|
36
|
-
},
|
|
35
|
+
}, n || (document.addEventListener("keydown", this._onKeydown, s), document.addEventListener("mousedown", this._onMousedown, s), document.addEventListener("touchstart", this._onTouchstart, s));
|
|
37
36
|
}
|
|
38
37
|
reset() {
|
|
39
38
|
this._updateState("mouse", null), this._lastTouchMs = 0;
|
|
40
39
|
}
|
|
41
40
|
_updateState(t, o) {
|
|
42
|
-
this._mostRecentModality && document.documentElement.classList.remove(`sbb-focus-modality-${this._mostRecentModality}`), this._mostRecentModality = t, this._mostRecentTarget = o ?
|
|
41
|
+
this._mostRecentModality && document.documentElement.classList.remove(`sbb-focus-modality-${this._mostRecentModality}`), this._mostRecentModality = t, this._mostRecentTarget = o ? i(o) : null, document.documentElement.classList.add(`sbb-focus-modality-${this._mostRecentModality}`);
|
|
43
42
|
}
|
|
44
43
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
44
|
+
const M = new y();
|
|
45
|
+
function b(e) {
|
|
47
46
|
if (!e)
|
|
48
47
|
return;
|
|
49
|
-
const t =
|
|
48
|
+
const t = M.mostRecentModality;
|
|
50
49
|
e && t !== null && e.addEventListener("focus", () => {
|
|
51
50
|
e.setAttribute("data-focus-origin", t), e.addEventListener("blur", () => e.removeAttribute("data-focus-origin"), {
|
|
52
51
|
once: !0
|
|
@@ -54,6 +53,6 @@ function T(e) {
|
|
|
54
53
|
}, { once: !0 });
|
|
55
54
|
}
|
|
56
55
|
export {
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
M as sbbInputModalityDetector,
|
|
57
|
+
b as setModalityOnNextFocus
|
|
59
58
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isServer as
|
|
1
|
+
import { isServer as s } from "lit";
|
|
2
2
|
import { isWebkit as a, isIOS as o, isFirefox as u } from "../dom/platform.js";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
@@ -7,7 +7,7 @@ import { isWebkit as a, isIOS as o, isFirefox as u } from "../dom/platform.js";
|
|
|
7
7
|
* Use of this source code is governed by an MIT-style license that can be
|
|
8
8
|
* found in the LICENSE file at https://angular.io/license
|
|
9
9
|
*/
|
|
10
|
-
class
|
|
10
|
+
class A {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.ignoreVisibility = !1;
|
|
13
13
|
}
|
|
@@ -41,7 +41,7 @@ class b {
|
|
|
41
41
|
* @returns Whether the element is tabbable.
|
|
42
42
|
*/
|
|
43
43
|
isTabbable(i) {
|
|
44
|
-
if (
|
|
44
|
+
if (s)
|
|
45
45
|
return !1;
|
|
46
46
|
const r = i.nodeName.toLowerCase(), e = x(i);
|
|
47
47
|
return i.hasAttribute("contenteditable") ? e !== -1 : r === "iframe" || r === "object" || a && o && !I(i) ? !1 : r === "audio" ? i.hasAttribute("controls") ? e !== -1 : !1 : r === "video" ? e === -1 ? !1 : e !== null ? !0 : u || i.hasAttribute("controls") : i.tabIndex >= 0;
|
|
@@ -54,10 +54,10 @@ class b {
|
|
|
54
54
|
* @returns Whether the element is focusable.
|
|
55
55
|
*/
|
|
56
56
|
isFocusable(i, r) {
|
|
57
|
-
return y(i) && !i.inert && !this.isDisabled(i) && (
|
|
57
|
+
return y(i) && !i.inert && !this.isDisabled(i) && (r?.ignoreVisibility || this.isVisible(i));
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const C = new b();
|
|
61
61
|
function f(t) {
|
|
62
62
|
return !!(t.offsetWidth || t.offsetHeight || typeof t.getClientRects == "function" && t.getClientRects().length);
|
|
63
63
|
}
|
|
@@ -77,14 +77,14 @@ function h(t) {
|
|
|
77
77
|
function p(t) {
|
|
78
78
|
return t.nodeName.toLowerCase() == "a";
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function n(t) {
|
|
81
81
|
if (!t.hasAttribute("tabindex") || t.tabIndex === void 0)
|
|
82
82
|
return !1;
|
|
83
83
|
const i = t.getAttribute("tabindex");
|
|
84
84
|
return !!(i && !isNaN(parseInt(i, 10)));
|
|
85
85
|
}
|
|
86
86
|
function x(t) {
|
|
87
|
-
if (!
|
|
87
|
+
if (!n(t))
|
|
88
88
|
return null;
|
|
89
89
|
const i = parseInt(t.getAttribute("tabindex") || "", 10);
|
|
90
90
|
return isNaN(i) ? -1 : i;
|
|
@@ -94,11 +94,11 @@ function I(t) {
|
|
|
94
94
|
return r === "text" || r === "password" || i === "select" || i === "textarea";
|
|
95
95
|
}
|
|
96
96
|
function y(t) {
|
|
97
|
-
return d(t) ? !1 : c(t) || l(t) || t.hasAttribute("contenteditable") ||
|
|
97
|
+
return d(t) ? !1 : c(t) || l(t) || t.hasAttribute("contenteditable") || n(t);
|
|
98
98
|
}
|
|
99
99
|
export {
|
|
100
100
|
b as InteractivityChecker,
|
|
101
|
-
|
|
101
|
+
A as IsFocusableConfig,
|
|
102
102
|
f as hasGeometry,
|
|
103
|
-
|
|
103
|
+
C as interactivityChecker
|
|
104
104
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { __esDecorate as n, __runInitializers as
|
|
1
|
+
import { __esDecorate as n, __runInitializers as d } from "tslib";
|
|
2
2
|
import { isServer as y } from "lit";
|
|
3
|
-
import { property as
|
|
3
|
+
import { property as h } from "lit/decorators.js";
|
|
4
4
|
import { hostAttributes as _ } from "../decorators.js";
|
|
5
5
|
import { isEventPrevented as k } from "../eventing.js";
|
|
6
6
|
import { SbbFormAssociatedMixin as v } from "../mixins.js";
|
|
7
7
|
import { SbbActionBaseElement as E } from "./action-base-element.js";
|
|
8
8
|
let I = (() => {
|
|
9
9
|
var i;
|
|
10
|
-
let
|
|
10
|
+
let p = [_({
|
|
11
11
|
tabindex: "0",
|
|
12
12
|
"data-button": ""
|
|
13
13
|
})], o, l = [], r, c = v(E), a = [], u, m;
|
|
@@ -24,15 +24,13 @@ let I = (() => {
|
|
|
24
24
|
}
|
|
25
25
|
/** The `<form>` element to associate the button with. */
|
|
26
26
|
set form(t) {
|
|
27
|
-
|
|
28
|
-
this._formId = t, (e = this.form) == null || e.addEventListener("keydown", this._formKeyDown, { capture: !0 });
|
|
27
|
+
this._formId = t, this.form?.addEventListener("keydown", this._formKeyDown, { capture: !0 });
|
|
29
28
|
}
|
|
30
29
|
get form() {
|
|
31
|
-
|
|
32
|
-
return this._formId ? ((s = (e = (t = this.getRootNode) == null ? void 0 : t.call(this)) == null ? void 0 : e.getElementById) == null ? void 0 : s.call(e, this._formId)) ?? null : this.internals.form;
|
|
30
|
+
return this._formId ? this.getRootNode?.()?.getElementById?.(this._formId) ?? null : this.internals.form;
|
|
33
31
|
}
|
|
34
32
|
constructor() {
|
|
35
|
-
if (super(), this._elementsOnWhichEnterPressTriggersSubmit = (
|
|
33
|
+
if (super(), this._elementsOnWhichEnterPressTriggersSubmit = (d(this, a), ["input", "sbb-date-input"]), this._formId = "", this._handleButtonClick = async (t) => {
|
|
36
34
|
if (this.type === "button" || await k(t))
|
|
37
35
|
return;
|
|
38
36
|
const e = this.form;
|
|
@@ -46,12 +44,11 @@ let I = (() => {
|
|
|
46
44
|
}, this._dispatchClickEventOnSpaceKeyup = (t) => {
|
|
47
45
|
t.key === " " && (this._removeActiveMarker(t), this._dispatchClickEvent(t));
|
|
48
46
|
}, this._formKeyDown = (t) => {
|
|
49
|
-
var s;
|
|
50
47
|
const e = this.form;
|
|
51
48
|
this.type === "submit" && e && (t.key === "Enter" || t.key === `
|
|
52
|
-
`) && this._elementsOnWhichEnterPressTriggersSubmit.includes(
|
|
49
|
+
`) && this._elementsOnWhichEnterPressTriggersSubmit.includes(t.target?.localName) && t.isTrusted && (t.stopImmediatePropagation(), t.preventDefault(), t.composedPath()[0].dispatchEvent(new KeyboardEvent(t.type, t)) && !this.matches(":disabled") && this._requestSubmit(e));
|
|
53
50
|
}, this._dispatchClickEvent = (t) => {
|
|
54
|
-
const { altKey: e, ctrlKey: s, metaKey:
|
|
51
|
+
const { altKey: e, ctrlKey: s, metaKey: b, shiftKey: f } = t;
|
|
55
52
|
t.target.dispatchEvent(new PointerEvent("click", {
|
|
56
53
|
bubbles: !0,
|
|
57
54
|
cancelable: !0,
|
|
@@ -60,7 +57,7 @@ let I = (() => {
|
|
|
60
57
|
pointerType: "",
|
|
61
58
|
altKey: e,
|
|
62
59
|
ctrlKey: s,
|
|
63
|
-
metaKey:
|
|
60
|
+
metaKey: b,
|
|
64
61
|
shiftKey: f
|
|
65
62
|
}));
|
|
66
63
|
}, this.internals.role = "button", !y) {
|
|
@@ -73,12 +70,10 @@ let I = (() => {
|
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
72
|
connectedCallback() {
|
|
76
|
-
|
|
77
|
-
super.connectedCallback(), (t = this.form) == null || t.addEventListener("keydown", this._formKeyDown, { capture: !0 });
|
|
73
|
+
super.connectedCallback(), this.form?.addEventListener("keydown", this._formKeyDown, { capture: !0 });
|
|
78
74
|
}
|
|
79
75
|
disconnectedCallback() {
|
|
80
|
-
|
|
81
|
-
super.disconnectedCallback(), (t = this.form) == null || t.removeEventListener("keydown", this._formKeyDown, { capture: !0 });
|
|
76
|
+
super.disconnectedCallback(), this.form?.removeEventListener("keydown", this._formKeyDown, { capture: !0 });
|
|
82
77
|
}
|
|
83
78
|
_requestSubmit(t) {
|
|
84
79
|
const e = document.createElement("button");
|
|
@@ -108,11 +103,11 @@ let I = (() => {
|
|
|
108
103
|
}
|
|
109
104
|
}, r = i, (() => {
|
|
110
105
|
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
111
|
-
u = [
|
|
106
|
+
u = [h()], m = [h()], n(i, null, u, { kind: "setter", name: "type", static: !1, private: !1, access: { has: (e) => "type" in e, set: (e, s) => {
|
|
112
107
|
e.type = s;
|
|
113
108
|
} }, metadata: t }, null, a), n(i, null, m, { kind: "setter", name: "form", static: !1, private: !1, access: { has: (e) => "form" in e, set: (e, s) => {
|
|
114
109
|
e.form = s;
|
|
115
|
-
} }, metadata: t }, null, a), n(null, o = { value: r },
|
|
110
|
+
} }, metadata: t }, null, a), n(null, o = { value: r }, p, { kind: "class", name: r.name, metadata: t }, null, l), r = o.value, t && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t }), d(r, l);
|
|
116
111
|
})(), r;
|
|
117
112
|
})();
|
|
118
113
|
export {
|
|
@@ -71,18 +71,15 @@ let le = (() => {
|
|
|
71
71
|
}
|
|
72
72
|
/** @internal */
|
|
73
73
|
focus(t) {
|
|
74
|
-
|
|
75
|
-
(e = this.shadowRoot.querySelector("a")) == null || e.focus(t);
|
|
74
|
+
this.shadowRoot.querySelector("a")?.focus(t);
|
|
76
75
|
}
|
|
77
76
|
/** @internal */
|
|
78
77
|
blur() {
|
|
79
|
-
|
|
80
|
-
(t = this.shadowRoot.querySelector("a")) == null || t.blur();
|
|
78
|
+
this.shadowRoot.querySelector("a")?.blur();
|
|
81
79
|
}
|
|
82
80
|
/** @internal */
|
|
83
81
|
click() {
|
|
84
|
-
|
|
85
|
-
(t = this.shadowRoot.querySelector("a")) == null || t.click();
|
|
82
|
+
this.shadowRoot.querySelector("a")?.click();
|
|
86
83
|
}
|
|
87
84
|
/** Default render method for link-like components. Can be overridden if the LinkRenderVariables are not needed. */
|
|
88
85
|
render() {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
class r {
|
|
2
2
|
get signal() {
|
|
3
|
-
|
|
4
|
-
return (o = this._abortController) == null ? void 0 : o.signal;
|
|
3
|
+
return this._abortController?.signal;
|
|
5
4
|
}
|
|
6
5
|
constructor(o) {
|
|
7
6
|
this._host = o, this._abortController = new AbortController(), this._host.addController(this);
|
|
@@ -10,8 +9,7 @@ class r {
|
|
|
10
9
|
this._abortController || (this._abortController = new AbortController());
|
|
11
10
|
}
|
|
12
11
|
hostDisconnected() {
|
|
13
|
-
|
|
14
|
-
(o = this._abortController) == null || o.abort(), this._abortController = void 0;
|
|
12
|
+
this._abortController?.abort(), this._abortController = void 0;
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
export {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), (t = c.at(-1)) == null || t.close());
|
|
1
|
+
import { isServer as i } from "lit";
|
|
2
|
+
const o = new Array();
|
|
3
|
+
i || window.addEventListener("keydown", (t) => {
|
|
4
|
+
t.key === "Escape" && !t.defaultPrevented && (t.preventDefault(), o.at(-1)?.close());
|
|
6
5
|
});
|
|
7
|
-
class
|
|
8
|
-
constructor(
|
|
9
|
-
|
|
10
|
-
this._host = t, this._overlayStack = s, (i = (o = this._host).addController) == null || i.call(o, this);
|
|
6
|
+
class n {
|
|
7
|
+
constructor(e, s = o) {
|
|
8
|
+
this._host = e, this._overlayStack = s, this._host.addController?.(this);
|
|
11
9
|
}
|
|
12
10
|
hostDisconnected() {
|
|
13
11
|
this.disconnect();
|
|
@@ -19,11 +17,11 @@ class r {
|
|
|
19
17
|
// This must be called when the overlay is closed
|
|
20
18
|
disconnect() {
|
|
21
19
|
if (this._overlayStack.length) {
|
|
22
|
-
const
|
|
23
|
-
|
|
20
|
+
const e = this._overlayStack.findIndex((s) => s === this._host);
|
|
21
|
+
e !== -1 && this._overlayStack.splice(e, 1);
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
25
|
export {
|
|
28
|
-
|
|
26
|
+
n as SbbEscapableOverlayController
|
|
29
27
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isServer as d } from "lit";
|
|
2
2
|
const h = /* @__PURE__ */ new WeakMap();
|
|
3
3
|
class _ {
|
|
4
|
-
constructor(t,
|
|
5
|
-
this._host = t, this._idRef =
|
|
4
|
+
constructor(t, r, i = h) {
|
|
5
|
+
this._host = t, this._idRef = r, this._observers = i, this._rootNode = null, this._host.addController(this);
|
|
6
6
|
}
|
|
7
7
|
hostConnected() {
|
|
8
8
|
if (d)
|
|
@@ -12,17 +12,17 @@ class _ {
|
|
|
12
12
|
if (t)
|
|
13
13
|
t.controllers.add(this);
|
|
14
14
|
else {
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const r = /* @__PURE__ */ new Set([this]), i = new MutationObserver((n) => {
|
|
16
|
+
const s = /* @__PURE__ */ new Set();
|
|
17
17
|
for (const e of n)
|
|
18
18
|
if (e.type === "attributes")
|
|
19
|
-
|
|
19
|
+
s.add(e.oldValue), s.add(e.target.id);
|
|
20
20
|
else if (e.type === "childList")
|
|
21
|
-
for (const
|
|
22
|
-
|
|
23
|
-
for (const e of
|
|
24
|
-
const
|
|
25
|
-
|
|
21
|
+
for (const o of [...e.addedNodes, ...e.removedNodes])
|
|
22
|
+
o instanceof HTMLElement && (s.add(o.id), o.querySelectorAll("[id]").forEach((l) => s.add(l.id)));
|
|
23
|
+
for (const e of r) {
|
|
24
|
+
const o = e._host[e._idRef];
|
|
25
|
+
o && typeof o == "string" && s.has(o) && e._host.requestUpdate();
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
i.observe(this._rootNode, {
|
|
@@ -30,7 +30,7 @@ class _ {
|
|
|
30
30
|
childList: !0,
|
|
31
31
|
subtree: !0,
|
|
32
32
|
attributeOldValue: !0
|
|
33
|
-
}), this._observers.set(this._rootNode, { observer: i, controllers:
|
|
33
|
+
}), this._observers.set(this._rootNode, { observer: i, controllers: r });
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
hostDisconnected() {
|
|
@@ -47,12 +47,11 @@ class _ {
|
|
|
47
47
|
* Find the element by id in the current document fragment
|
|
48
48
|
*/
|
|
49
49
|
find() {
|
|
50
|
-
var t;
|
|
51
50
|
if (d || !this._rootNode)
|
|
52
51
|
return null;
|
|
53
52
|
{
|
|
54
|
-
const
|
|
55
|
-
return typeof
|
|
53
|
+
const t = this._host[this._idRef];
|
|
54
|
+
return typeof t == "string" ? this._rootNode?.getElementById(t) : null;
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
class
|
|
3
|
-
constructor(t,
|
|
4
|
-
|
|
5
|
-
this._host = t, this._inertElements = r, this._inertOverlays = e, (s = (i = this._host).addController) == null || s.call(i, this);
|
|
1
|
+
const r = ["script", "head", "template", "style"], s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
2
|
+
class h {
|
|
3
|
+
constructor(t, e = s, i = a) {
|
|
4
|
+
this._host = t, this._inertElements = e, this._inertOverlays = i, this._host.addController?.(this);
|
|
6
5
|
}
|
|
7
6
|
hostConnected() {
|
|
8
7
|
this._host.isOpen && this.activate();
|
|
@@ -35,14 +34,13 @@ class d {
|
|
|
35
34
|
}), this._inertElements.clear();
|
|
36
35
|
}
|
|
37
36
|
_addInertAttributes() {
|
|
38
|
-
var r, e;
|
|
39
37
|
let t = this._currentOverlay();
|
|
40
38
|
for (; t !== document.documentElement && t !== null; )
|
|
41
|
-
Array.from((
|
|
42
|
-
this._inertElements.add(
|
|
43
|
-
}), t =
|
|
39
|
+
Array.from((t?.parentElement ?? t?.getRootNode())?.childNodes ?? []).filter((e) => e !== t && e instanceof window.HTMLElement && !r.includes(e.localName)).forEach((e) => {
|
|
40
|
+
this._inertElements.add(e), e.inert || (e.inert = !0, e.toggleAttribute("data-sbb-inert", !0)), e.hasAttribute("aria-hidden") || (e.setAttribute("aria-hidden", "true"), e.toggleAttribute("data-sbb-aria-hidden", !0));
|
|
41
|
+
}), t = t?.parentElement ?? t?.getRootNode()?.host ?? null;
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
export {
|
|
47
|
-
|
|
45
|
+
h as SbbInertController
|
|
48
46
|
};
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
class
|
|
3
|
-
constructor(
|
|
4
|
-
this._host =
|
|
5
|
-
Array.from(this._host.childNodes).filter((
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}) ? this.slots.add("unnamed") : Array.from(this._host.children).every((o) => o.slot) && this.slots.delete("unnamed"), this._updateSlotNameAttribute();
|
|
9
|
-
}), this._slotchangeHandler = (t) => {
|
|
10
|
-
this._syncSlots(t.target);
|
|
1
|
+
import { isServer as n } from "lit";
|
|
2
|
+
class h {
|
|
3
|
+
constructor(s, t = null) {
|
|
4
|
+
this._host = s, this._onChangeCallback = t, this.slots = /* @__PURE__ */ new Set(), this._textObserver = !n && new MutationObserver(() => {
|
|
5
|
+
Array.from(this._host.childNodes).filter((e) => e.nodeType === e.TEXT_NODE).some((e) => e.textContent?.trim()) ? this.slots.add("unnamed") : Array.from(this._host.children).every((e) => e.slot) && this.slots.delete("unnamed"), this._updateSlotNameAttribute();
|
|
6
|
+
}), this._slotchangeHandler = (o) => {
|
|
7
|
+
this._syncSlots(o.target);
|
|
11
8
|
}, this._host.addController(this);
|
|
12
9
|
}
|
|
13
10
|
hostConnected() {
|
|
14
|
-
|
|
15
|
-
this._syncSlots(...((s = (e = this._host.shadowRoot) == null ? void 0 : e.querySelectorAll) == null ? void 0 : s.call(e, "slot")) ?? []), (t = this._host.shadowRoot) == null || t.addEventListener("slotchange", this._slotchangeHandler);
|
|
11
|
+
this._syncSlots(...this._host.shadowRoot?.querySelectorAll?.("slot") ?? []), this._host.shadowRoot?.addEventListener("slotchange", this._slotchangeHandler);
|
|
16
12
|
}
|
|
17
13
|
hostDisconnected() {
|
|
18
|
-
|
|
19
|
-
(e = this._host.shadowRoot) == null || e.removeEventListener("slotchange", this._slotchangeHandler), this._textObserver.disconnect();
|
|
14
|
+
this._host.shadowRoot?.removeEventListener("slotchange", this._slotchangeHandler), this._textObserver.disconnect();
|
|
20
15
|
}
|
|
21
|
-
_syncSlots(...
|
|
22
|
-
var s;
|
|
16
|
+
_syncSlots(...s) {
|
|
23
17
|
this._textObserver.disconnect();
|
|
24
|
-
for (const t of
|
|
18
|
+
for (const t of s) {
|
|
25
19
|
const o = t.name || "unnamed";
|
|
26
|
-
t.assignedNodes().some((
|
|
27
|
-
var a;
|
|
28
|
-
return "tagName" in n || ((a = n.textContent) == null ? void 0 : a.trim());
|
|
29
|
-
}) ? this.slots.add(o) : this.slots.delete(o), this._updateSlotNameAttribute();
|
|
20
|
+
t.assignedNodes().some((e) => "tagName" in e || e.textContent?.trim()) ? this.slots.add(o) : this.slots.delete(o), this._updateSlotNameAttribute();
|
|
30
21
|
}
|
|
31
|
-
|
|
22
|
+
s.find((t) => !t.name)?.assignedNodes().filter((t) => t.nodeType === t.TEXT_NODE).forEach((t) => this._textObserver.observe(t, { characterData: !0 }));
|
|
32
23
|
}
|
|
33
24
|
_updateSlotNameAttribute() {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
s ? this._host.getAttribute("data-slot-names") !== s && this._host.setAttribute("data-slot-names", s) : this._host.removeAttribute("data-slot-names"), s !== e && ((t = this._onChangeCallback) == null || t.call(this));
|
|
25
|
+
const s = this._host.getAttribute("data-slot-names"), t = [...this.slots].sort().join(" ");
|
|
26
|
+
t ? this._host.getAttribute("data-slot-names") !== t && this._host.setAttribute("data-slot-names", t) : this._host.removeAttribute("data-slot-names"), t !== s && this._onChangeCallback?.();
|
|
37
27
|
}
|
|
38
28
|
}
|
|
39
29
|
export {
|
|
40
|
-
|
|
30
|
+
h as SbbSlotStateController
|
|
41
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/date-adapter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAU,CAAC;AACtC,eAAO,MAAM,cAAc,EAAE,MAAU,CAAC;AACxC,eAAO,MAAM,aAAa,EAAE,MAAU,CAAC;AACvC,eAAO,MAAM,eAAe,EAAE,MAAW,CAAC;AAC1C,eAAO,MAAM,cAAc,EAAE,MAAW,CAAC;AACzC,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"date-adapter.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/datetime/date-adapter.ts"],"names":[],"mappings":"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"}
|