@sbb-esta/lyne-elements 2.2.0 → 2.4.1
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.js +6 -6
- package/alert/alert-group.js +4 -4
- package/alert/alert.js +9 -9
- package/autocomplete/autocomplete-base-element.d.ts +1 -0
- package/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/autocomplete/autocomplete.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/autocomplete-grid/autocomplete-grid-button.js +4 -4
- package/autocomplete-grid/autocomplete-grid-optgroup.js +4 -4
- package/autocomplete-grid/autocomplete-grid-row.js +4 -4
- package/autocomplete-grid/autocomplete-grid.js +0 -1
- package/autocomplete.js +29 -29
- package/badge.css +31 -0
- package/breadcrumb/breadcrumb-group.js +4 -4
- package/breadcrumb/breadcrumb.js +19 -19
- package/button/accent-button-link.js +9 -9
- package/button/accent-button-static.js +6 -6
- package/button/accent-button.js +6 -6
- package/button/button-link.js +7 -7
- package/button/button-static.js +7 -7
- package/button/button.js +8 -8
- package/button/common/button-common.d.ts.map +1 -1
- package/button/common.js +1 -1
- package/button/mini-button-group.js +8 -8
- package/button/secondary-button-link.js +7 -7
- package/button/secondary-button-static.js +7 -7
- package/button/secondary-button.js +3 -3
- package/button/transparent-button-link.js +6 -6
- package/button/transparent-button-static.js +5 -5
- package/button/transparent-button.js +6 -6
- package/calendar/calendar.d.ts +55 -11
- package/calendar/calendar.d.ts.map +1 -1
- package/calendar.js +374 -224
- package/card/card-badge.js +9 -9
- package/card/card-button.js +5 -5
- package/card/card-link.js +7 -7
- package/card/card.js +1 -1
- package/card/common/card-action-common.d.ts.map +1 -1
- package/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/checkbox/checkbox-group.js +1 -1
- package/checkbox/checkbox-panel.js +16 -16
- package/checkbox/checkbox.js +15 -15
- package/checkbox/common/checkbox-common.d.ts.map +1 -1
- package/checkbox/common.js +3 -3
- package/clock.js +8 -8
- package/container/container.js +4 -4
- package/core/base-elements.js +10 -10
- package/core/controllers/escapable-overlay-controller.d.ts +11 -0
- package/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
- package/core/controllers.d.ts +1 -0
- package/core/controllers.d.ts.map +1 -1
- package/core/controllers.js +73 -47
- package/core/datetime/date-adapter.d.ts +4 -2
- package/core/datetime/date-adapter.d.ts.map +1 -1
- package/core/datetime/native-date-adapter.d.ts +1 -1
- package/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/core/datetime.js +51 -43
- package/core/decorators/date-converter.d.ts +8 -0
- package/core/decorators/date-converter.d.ts.map +1 -0
- package/core/decorators/date-only-type.d.ts +8 -0
- package/core/decorators/date-only-type.d.ts.map +1 -0
- package/core/decorators/get-override.d.ts.map +1 -1
- package/core/decorators/handle-distinct-change.d.ts.map +1 -1
- package/core/decorators/host-attributes.d.ts.map +1 -1
- package/core/decorators/slot-state.d.ts.map +1 -1
- package/core/decorators.d.ts +2 -0
- package/core/decorators.d.ts.map +1 -1
- package/core/decorators.js +52 -31
- package/core/dom/input-element.d.ts +1 -1
- package/core/dom/input-element.d.ts.map +1 -1
- package/core/dom.js +5 -5
- package/core/eventing/throttle.d.ts.map +1 -1
- package/core/eventing.js +4 -4
- package/core/i18n/i18n.d.ts +6 -0
- package/core/i18n/i18n.d.ts.map +1 -1
- package/core/i18n.js +106 -70
- package/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-input-mixin.d.ts +25 -0
- package/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
- package/core/mixins/form-associated-mixin.d.ts +16 -0
- package/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/core/mixins/hydration-mixin.d.ts.map +1 -1
- package/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/core/mixins/negative-mixin.d.ts.map +1 -1
- package/core/mixins/panel-mixin.d.ts.map +1 -1
- package/core/mixins/required-mixin.d.ts.map +1 -1
- package/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
- package/core/mixins.d.ts +1 -0
- package/core/mixins.d.ts.map +1 -1
- package/core/mixins.js +574 -295
- package/core/styles/badge.scss +3 -0
- package/core/styles/core.scss +3 -1
- package/core/styles/mixins/badge.scss +26 -1
- package/core/styles/mixins/font-face.scss +12 -12
- package/core/styles/mixins/link.scss +32 -8
- package/core/styles/standard-theme.scss +1 -0
- package/core/testing/mocha-extensions.d.ts.map +1 -1
- package/core/testing/wait-for-render.d.ts.map +1 -1
- package/core/testing.js +14 -14
- package/core.css +5 -5
- package/custom-elements.json +28284 -17221
- package/date-input/date-input.d.ts +67 -0
- package/date-input/date-input.d.ts.map +1 -0
- package/date-input.d.ts +2 -0
- package/date-input.d.ts.map +1 -0
- package/date-input.js +149 -0
- package/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/datepicker/common.js +49 -45
- package/datepicker/datepicker/datepicker.d.ts +16 -6
- package/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/datepicker/datepicker-toggle.js +43 -40
- package/datepicker/datepicker.js +94 -76
- package/development/alert/alert-group.js +1 -1
- package/development/alert/alert.js +1 -1
- package/development/autocomplete/autocomplete-base-element.d.ts +1 -0
- package/development/autocomplete/autocomplete-base-element.d.ts.map +1 -1
- package/development/autocomplete/autocomplete.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid/autocomplete-grid.d.ts.map +1 -1
- package/development/autocomplete-grid/autocomplete-grid.js +1 -2
- package/development/autocomplete.js +10 -5
- package/development/breadcrumb/breadcrumb.js +5 -2
- package/development/button/common/button-common.d.ts.map +1 -1
- package/development/button/common.js +18 -14
- package/development/calendar/calendar.d.ts +55 -11
- package/development/calendar/calendar.d.ts.map +1 -1
- package/development/calendar.js +302 -88
- package/development/card/card.js +1 -1
- package/development/card/common/card-action-common.d.ts.map +1 -1
- package/development/checkbox/checkbox-group/checkbox-group.d.ts.map +1 -1
- package/development/checkbox/checkbox-group.js +2 -2
- package/development/checkbox/checkbox-panel.js +1 -1
- package/development/checkbox/common/checkbox-common.d.ts.map +1 -1
- package/development/core/controllers/escapable-overlay-controller.d.ts +11 -0
- package/development/core/controllers/escapable-overlay-controller.d.ts.map +1 -0
- package/development/core/controllers.d.ts +1 -0
- package/development/core/controllers.d.ts.map +1 -1
- package/development/core/controllers.js +36 -1
- package/development/core/datetime/date-adapter.d.ts +4 -2
- package/development/core/datetime/date-adapter.d.ts.map +1 -1
- package/development/core/datetime/native-date-adapter.d.ts +1 -1
- package/development/core/datetime/native-date-adapter.d.ts.map +1 -1
- package/development/core/datetime.js +14 -2
- package/development/core/decorators/date-converter.d.ts +8 -0
- package/development/core/decorators/date-converter.d.ts.map +1 -0
- package/development/core/decorators/date-only-type.d.ts +8 -0
- package/development/core/decorators/date-only-type.d.ts.map +1 -0
- package/development/core/decorators/get-override.d.ts.map +1 -1
- package/development/core/decorators/handle-distinct-change.d.ts.map +1 -1
- package/development/core/decorators/host-attributes.d.ts.map +1 -1
- package/development/core/decorators/slot-state.d.ts.map +1 -1
- package/development/core/decorators.d.ts +2 -0
- package/development/core/decorators.d.ts.map +1 -1
- package/development/core/decorators.js +23 -2
- package/development/core/dom/input-element.d.ts +1 -1
- package/development/core/dom/input-element.d.ts.map +1 -1
- package/development/core/dom.js +3 -3
- package/development/core/eventing/throttle.d.ts.map +1 -1
- package/development/core/i18n/i18n.d.ts +6 -0
- package/development/core/i18n/i18n.d.ts.map +1 -1
- package/development/core/i18n.js +43 -1
- package/development/core/mixins/disabled-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-checkbox-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-input-mixin.d.ts +25 -0
- package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -0
- package/development/core/mixins/form-associated-mixin.d.ts +16 -0
- package/development/core/mixins/form-associated-mixin.d.ts.map +1 -1
- package/development/core/mixins/form-associated-radio-button-mixin.d.ts.map +1 -1
- package/development/core/mixins/hydration-mixin.d.ts.map +1 -1
- package/development/core/mixins/named-slot-list-mixin.d.ts.map +1 -1
- package/development/core/mixins/negative-mixin.d.ts.map +1 -1
- package/development/core/mixins/panel-mixin.d.ts.map +1 -1
- package/development/core/mixins/required-mixin.d.ts.map +1 -1
- package/development/core/mixins/update-scheduler-mixin.d.ts.map +1 -1
- package/development/core/mixins.d.ts +1 -0
- package/development/core/mixins.d.ts.map +1 -1
- package/development/core/mixins.js +460 -32
- package/development/core/testing/mocha-extensions.d.ts.map +1 -1
- package/development/core/testing/wait-for-render.d.ts.map +1 -1
- package/development/date-input/date-input.d.ts +67 -0
- package/development/date-input/date-input.d.ts.map +1 -0
- package/development/date-input.d.ts +2 -0
- package/development/date-input.d.ts.map +1 -0
- package/development/date-input.js +259 -0
- package/development/datepicker/common/datepicker-button.d.ts.map +1 -1
- package/development/datepicker/common.js +11 -2
- package/development/datepicker/datepicker/datepicker.d.ts +16 -6
- package/development/datepicker/datepicker/datepicker.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle/datepicker-toggle.d.ts.map +1 -1
- package/development/datepicker/datepicker-toggle.js +13 -4
- package/development/datepicker/datepicker.js +65 -39
- package/development/dialog/dialog/dialog.d.ts.map +1 -1
- package/development/dialog/dialog-title.js +1 -1
- package/development/dialog/dialog.js +3 -1
- package/development/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/development/expansion-panel/expansion-panel-header.js +1 -1
- package/development/expansion-panel/expansion-panel.js +3 -3
- package/development/file-selector/common/file-selector-common.d.ts.map +1 -1
- package/development/file-selector/common.js +1 -1
- package/development/footer.js +1 -1
- package/development/form-field/form-field/form-field.d.ts +1 -1
- package/development/form-field/form-field/form-field.d.ts.map +1 -1
- package/development/form-field/form-field.js +23 -14
- package/development/header/common/header-action-common.d.ts.map +1 -1
- package/development/icon/icon-name-mixin.d.ts.map +1 -1
- package/development/icon/icon-request.d.ts.map +1 -1
- package/development/icon/icon-validate.d.ts.map +1 -1
- package/development/image.js +1 -1
- package/development/journey-header.js +1 -1
- package/development/link/common/block-link-common.d.ts.map +1 -1
- package/development/link/common/inline-link-common.d.ts.map +1 -1
- package/development/link/common/link-common.d.ts.map +1 -1
- package/development/link/common.js +19 -7
- package/development/link-list/common.js +1 -1
- package/development/map-container.js +1 -1
- package/development/menu/common/menu-action-common.d.ts +3 -0
- package/development/menu/common/menu-action-common.d.ts.map +1 -1
- package/development/menu/common.js +35 -12
- package/development/menu/menu/menu.d.ts +1 -1
- package/development/menu/menu/menu.d.ts.map +1 -1
- package/development/menu/menu.js +5 -15
- package/development/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/development/navigation/navigation/navigation.d.ts +1 -3
- package/development/navigation/navigation/navigation.d.ts.map +1 -1
- package/development/navigation/navigation-section.js +1 -1
- package/development/navigation/navigation.js +8 -21
- package/development/notification.js +1 -1
- package/development/overlay/overlay-base-element.d.ts +2 -2
- package/development/overlay/overlay-base-element.d.ts.map +1 -1
- package/development/overlay/overlay.d.ts.map +1 -1
- package/development/overlay.js +7 -14
- package/development/paginator/common/paginator-common.d.ts.map +1 -1
- package/development/popover/popover/popover.d.ts +1 -1
- package/development/popover/popover/popover.d.ts.map +1 -1
- package/development/popover/popover.js +5 -15
- package/development/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/development/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/development/radio-button/radio-button-group.js +2 -2
- package/development/radio-button/radio-button-panel.js +1 -1
- package/development/select/select.d.ts +6 -1
- package/development/select/select.d.ts.map +1 -1
- package/development/select.js +28 -6
- package/development/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/development/selection-expansion-panel.js +2 -2
- package/development/skiplink-list.js +1 -1
- package/development/slider.js +1 -1
- package/development/stepper/step/step.d.ts +0 -2
- package/development/stepper/step/step.d.ts.map +1 -1
- package/development/stepper/step.js +1 -16
- package/development/stepper/stepper/stepper.d.ts +11 -0
- package/development/stepper/stepper/stepper.d.ts.map +1 -1
- package/development/stepper/stepper.js +30 -3
- package/development/tabs/tab-label.js +1 -1
- package/development/tag/tag/tag.d.ts +11 -0
- package/development/tag/tag/tag.d.ts.map +1 -1
- package/development/tag/tag-group/tag-group.d.ts +1 -1
- package/development/tag/tag-group/tag-group.d.ts.map +1 -1
- package/development/tag/tag-group.js +9 -3
- package/development/tag/tag.js +37 -10
- package/development/teaser-product/common/teaser-product-common.d.ts.map +1 -1
- package/development/timetable-occupancy.js +1 -1
- package/development/toast.js +1 -1
- package/development/toggle/toggle/toggle.d.ts +25 -6
- package/development/toggle/toggle/toggle.d.ts.map +1 -1
- package/development/toggle/toggle-option/toggle-option.d.ts +2 -6
- package/development/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/development/toggle/toggle-option.js +21 -39
- package/development/toggle/toggle.js +57 -39
- package/development/train/train-formation.js +1 -1
- package/development/train/train.js +1 -1
- package/development/visual-checkbox.js +1 -1
- package/dialog/dialog/dialog.d.ts.map +1 -1
- package/dialog/dialog-content.js +3 -3
- package/dialog/dialog-title.js +8 -8
- package/dialog/dialog.js +2 -2
- package/divider.js +12 -12
- package/expansion-panel/expansion-panel/expansion-panel.d.ts.map +1 -1
- package/expansion-panel/expansion-panel-header.js +1 -1
- package/expansion-panel/expansion-panel.js +2 -2
- package/file-selector/common/file-selector-common.d.ts.map +1 -1
- package/file-selector/common.js +9 -9
- package/file-selector/file-selector-dropzone.js +5 -5
- package/file-selector/file-selector.js +6 -6
- package/flip-card/flip-card-details.js +4 -4
- package/flip-card/flip-card-summary.js +9 -9
- package/font-characters-extension.css +3 -3
- package/footer.js +4 -4
- package/form-field/form-field/form-field.d.ts +1 -1
- package/form-field/form-field/form-field.d.ts.map +1 -1
- package/form-field/form-field.js +32 -24
- package/header/common/header-action-common.d.ts.map +1 -1
- package/header/header-button.js +5 -5
- package/header/header-link.js +5 -5
- package/icon/icon-name-mixin.d.ts.map +1 -1
- package/icon/icon-request.d.ts.map +1 -1
- package/icon/icon-validate.d.ts.map +1 -1
- package/icon.js +36 -36
- package/image.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/journey-header.js +5 -5
- package/link/block-link-button.js +4 -4
- package/link/block-link-static.js +9 -9
- package/link/block-link.js +4 -4
- package/link/common/block-link-common.d.ts.map +1 -1
- package/link/common/inline-link-common.d.ts.map +1 -1
- package/link/common/link-common.d.ts.map +1 -1
- package/link/common.js +28 -28
- package/link/link-button.js +7 -7
- package/link/link-static.js +7 -7
- package/link/link.js +4 -4
- package/link-list/common.js +15 -15
- package/loading-indicator-circle.js +11 -11
- package/map-container.js +5 -5
- package/menu/common/menu-action-common.d.ts +3 -0
- package/menu/common/menu-action-common.d.ts.map +1 -1
- package/menu/common.js +34 -30
- package/menu/menu/menu.d.ts +1 -1
- package/menu/menu/menu.d.ts.map +1 -1
- package/menu/menu-button.js +8 -8
- package/menu/menu-link.js +6 -6
- package/menu/menu.js +29 -38
- package/navigation/common/navigation-action-common.d.ts.map +1 -1
- package/navigation/navigation/navigation.d.ts +1 -3
- package/navigation/navigation/navigation.d.ts.map +1 -1
- package/navigation/navigation-button.js +4 -4
- package/navigation/navigation-link.js +7 -7
- package/navigation/navigation-list.js +4 -4
- package/navigation/navigation-marker.js +3 -3
- package/navigation/navigation-section.js +1 -1
- package/navigation/navigation.js +45 -54
- package/notification.js +18 -18
- package/option/optgroup.js +11 -11
- package/overlay/overlay-base-element.d.ts +2 -2
- package/overlay/overlay-base-element.d.ts.map +1 -1
- package/overlay/overlay.d.ts.map +1 -1
- package/overlay.js +57 -63
- package/package.json +11 -2
- package/paginator/common/paginator-common.d.ts.map +1 -1
- package/paginator/common.js +6 -6
- package/popover/popover/popover.d.ts +1 -1
- package/popover/popover/popover.d.ts.map +1 -1
- package/popover/popover.js +105 -114
- package/radio-button/common/radio-button-common.d.ts.map +1 -1
- package/radio-button/radio-button-group/radio-button-group.d.ts.map +1 -1
- package/radio-button/radio-button-group.js +1 -1
- package/radio-button/radio-button-panel.js +6 -6
- package/screen-reader-only.js +5 -5
- package/select/select.d.ts +6 -1
- package/select/select.d.ts.map +1 -1
- package/select.js +52 -43
- package/selection-expansion-panel/selection-expansion-panel.d.ts.map +1 -1
- package/selection-expansion-panel.js +1 -1
- package/skiplink-list.js +3 -3
- package/slider.js +13 -13
- package/standard-theme.css +37 -5
- package/status.js +3 -3
- package/stepper/step/step.d.ts +0 -2
- package/stepper/step/step.d.ts.map +1 -1
- package/stepper/step-label.js +4 -4
- package/stepper/step.js +24 -36
- package/stepper/stepper/stepper.d.ts +11 -0
- package/stepper/stepper/stepper.d.ts.map +1 -1
- package/stepper/stepper.js +59 -41
- package/table/table-wrapper.js +4 -4
- package/tabs/tab-group.js +24 -24
- package/tabs/tab-label.js +1 -1
- package/tabs/tab.js +4 -4
- package/tag/tag/tag.d.ts +11 -0
- package/tag/tag/tag.d.ts.map +1 -1
- package/tag/tag-group/tag-group.d.ts +1 -1
- package/tag/tag-group/tag-group.d.ts.map +1 -1
- package/tag/tag-group.js +34 -31
- package/tag/tag.js +60 -41
- package/teaser-product/common/teaser-product-common.d.ts.map +1 -1
- package/teaser-product/common.js +5 -5
- package/teaser-product/teaser-product-static.js +2 -2
- package/timetable-occupancy-icon.js +3 -3
- package/timetable-occupancy.js +6 -6
- package/toast.js +5 -5
- package/toggle/toggle/toggle.d.ts +25 -6
- package/toggle/toggle/toggle.d.ts.map +1 -1
- package/toggle/toggle-option/toggle-option.d.ts +2 -6
- package/toggle/toggle-option/toggle-option.d.ts.map +1 -1
- package/toggle/toggle-option.js +44 -52
- package/toggle/toggle.js +103 -83
- package/toggle-check.js +5 -5
- package/train/train-formation.js +1 -1
- package/train/train.js +29 -29
- package/visual-checkbox.js +1 -1
package/core/mixins.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var F = (d) => {
|
|
2
|
+
throw TypeError(d);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
import { __esDecorate as y, __runInitializers as
|
|
7
|
-
import { property as
|
|
8
|
-
import { forceType as
|
|
9
|
-
import { defaultConverter as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
4
|
+
var L = (d, v, c) => v.has(d) || F("Cannot " + c);
|
|
5
|
+
var C = (d, v, c) => (L(d, v, "read from private field"), c ? c.call(d) : v.get(d)), E = (d, v, c) => v.has(d) ? F("Cannot add the same private member more than once") : v instanceof WeakSet ? v.add(d) : v.set(d, c), S = (d, v, c, o) => (L(d, v, "write to private field"), o ? o.call(d, c) : v.set(d, c), c);
|
|
6
|
+
import { __esDecorate as y, __runInitializers as _ } from "tslib";
|
|
7
|
+
import { property as k, state as N, eventOptions as G } from "lit/decorators.js";
|
|
8
|
+
import { forceType as I, getOverride as H, hostAttributes as K } from "./decorators.js";
|
|
9
|
+
import { defaultConverter as z, isServer as M, html as R, nothing as O, css as W } from "lit";
|
|
10
|
+
import { SbbLanguageController as B, SbbConnectedAbortController as X } from "./controllers.js";
|
|
11
|
+
import { preventScrollOnSpacebarPress as J, EventEmitter as Q } from "./eventing.js";
|
|
12
|
+
import { i18nCheckboxRequired as Y, i18nInputRequired as Z, i18nSelectionRequired as ee } from "./i18n.js";
|
|
13
|
+
import { isWebkit as P, isFirefox as te } from "./dom.js";
|
|
14
|
+
import { sbbInputModalityDetector as se, interactivityChecker as ae, isArrowKeyPressed as ie, getNextElementIndex as re } from "./a11y.js";
|
|
13
15
|
import "../screen-reader-only.js";
|
|
14
|
-
const
|
|
15
|
-
var
|
|
16
|
-
let
|
|
17
|
-
return
|
|
16
|
+
const A = (d) => (() => {
|
|
17
|
+
var b, t;
|
|
18
|
+
let c = d, o, m = [], l = [];
|
|
19
|
+
return t = class extends c {
|
|
18
20
|
constructor() {
|
|
19
21
|
super(...arguments);
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
E(this, b, _(this, m, !1));
|
|
23
|
+
_(this, l);
|
|
22
24
|
}
|
|
23
25
|
/** Whether the component is disabled. */
|
|
24
26
|
get disabled() {
|
|
25
|
-
return
|
|
27
|
+
return C(this, b);
|
|
26
28
|
}
|
|
27
|
-
set disabled(
|
|
28
|
-
|
|
29
|
+
set disabled(e) {
|
|
30
|
+
S(this, b, e);
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* Will be used as 'or' check to the current disabled state.
|
|
@@ -34,52 +36,80 @@ const I = (l) => (() => {
|
|
|
34
36
|
isDisabledExternally() {
|
|
35
37
|
return !1;
|
|
36
38
|
}
|
|
37
|
-
},
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
s.disabled =
|
|
41
|
-
} }, metadata:
|
|
42
|
-
})(),
|
|
43
|
-
})(),
|
|
44
|
-
var
|
|
45
|
-
let
|
|
46
|
-
return
|
|
39
|
+
}, b = new WeakMap(), (() => {
|
|
40
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
41
|
+
o = [I(), k({ reflect: !0, type: Boolean }), H((s, a) => a || s.isDisabledExternally())], y(t, null, o, { kind: "accessor", name: "disabled", static: !1, private: !1, access: { has: (s) => "disabled" in s, get: (s) => s.disabled, set: (s, a) => {
|
|
42
|
+
s.disabled = a;
|
|
43
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
44
|
+
})(), t;
|
|
45
|
+
})(), ne = (d) => (() => {
|
|
46
|
+
var b, t;
|
|
47
|
+
let c = d, o, m = [], l = [];
|
|
48
|
+
return t = class extends c {
|
|
47
49
|
constructor() {
|
|
48
50
|
super(...arguments);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
E(this, b, _(this, m, !1));
|
|
52
|
+
_(this, l);
|
|
51
53
|
}
|
|
52
54
|
/** Whether the button should be aria-disabled but stay interactive. */
|
|
53
55
|
get disabledInteractive() {
|
|
54
|
-
return
|
|
55
|
-
}
|
|
56
|
-
set disabledInteractive(
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
s.disabledInteractive =
|
|
63
|
-
} }, metadata:
|
|
64
|
-
})(),
|
|
65
|
-
})(),
|
|
66
|
-
class
|
|
67
|
-
willUpdate(
|
|
68
|
-
super.willUpdate(
|
|
56
|
+
return C(this, b);
|
|
57
|
+
}
|
|
58
|
+
set disabledInteractive(e) {
|
|
59
|
+
S(this, b, e);
|
|
60
|
+
}
|
|
61
|
+
}, b = new WeakMap(), (() => {
|
|
62
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
63
|
+
o = [I(), k({ attribute: "disabled-interactive", type: Boolean, reflect: !0 })], y(t, null, o, { kind: "accessor", name: "disabledInteractive", static: !1, private: !1, access: { has: (s) => "disabledInteractive" in s, get: (s) => s.disabledInteractive, set: (s, a) => {
|
|
64
|
+
s.disabledInteractive = a;
|
|
65
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
66
|
+
})(), t;
|
|
67
|
+
})(), _e = (d) => {
|
|
68
|
+
class v extends ne(A(d)) {
|
|
69
|
+
willUpdate(o) {
|
|
70
|
+
super.willUpdate(o), o.has("disabledInteractive") && (this.internals.ariaDisabled = this.disabledInteractive ? "true" : null), o.has("disabled") && (this.disabled ? this.removeAttribute("tabindex") : this.setAttribute("tabindex", "0"));
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
return
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
return v;
|
|
74
|
+
}, $ = {
|
|
75
|
+
badInput: !1,
|
|
76
|
+
customError: !1,
|
|
77
|
+
patternMismatch: !1,
|
|
78
|
+
rangeOverflow: !1,
|
|
79
|
+
rangeUnderflow: !1,
|
|
80
|
+
stepMismatch: !1,
|
|
81
|
+
tooLong: !1,
|
|
82
|
+
tooShort: !1,
|
|
83
|
+
typeMismatch: !1,
|
|
84
|
+
valueMissing: !1
|
|
85
|
+
};
|
|
86
|
+
if (typeof ValidityState > "u") {
|
|
87
|
+
const d = class {
|
|
88
|
+
get valid() {
|
|
89
|
+
return !0;
|
|
90
|
+
}
|
|
76
91
|
constructor() {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
throw new TypeError("Illegal constructor");
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
Object.entries($).forEach(([v, c]) => Object.assign(d.prototype, {
|
|
96
|
+
get [v]() {
|
|
97
|
+
return c;
|
|
98
|
+
}
|
|
99
|
+
})), globalThis.ValidityState = d;
|
|
100
|
+
}
|
|
101
|
+
const V = (d) => (() => {
|
|
102
|
+
var u, e;
|
|
103
|
+
let c = d, o = [], m, l, b, t = [], r = [];
|
|
104
|
+
return e = class extends c {
|
|
105
|
+
constructor(...i) {
|
|
106
|
+
var n;
|
|
107
|
+
super(...i);
|
|
108
|
+
E(this, u);
|
|
109
|
+
this._value = (_(this, o), null), this.internals = this.attachInternals(), this._validityStates = /* @__PURE__ */ new Map(), S(this, u, _(this, t, !1)), _(this, r), (n = this.addEventListener) == null || n.call(this, "invalid", (p) => p.preventDefault());
|
|
80
110
|
}
|
|
81
111
|
/**
|
|
82
|
-
* Returns the form owner of
|
|
112
|
+
* Returns the form owner of this element.
|
|
83
113
|
*/
|
|
84
114
|
get form() {
|
|
85
115
|
return this.internals.form;
|
|
@@ -90,8 +120,8 @@ const I = (l) => (() => {
|
|
|
90
120
|
* @description Developer note: In this case updating the attribute must be synchronous.
|
|
91
121
|
* Due to this it is implemented as a getter/setter and the attributeChangedCallback() handles the diff check.
|
|
92
122
|
*/
|
|
93
|
-
set name(
|
|
94
|
-
this.setAttribute("name", `${
|
|
123
|
+
set name(i) {
|
|
124
|
+
this.setAttribute("name", `${i}`), this.updateFormValue();
|
|
95
125
|
}
|
|
96
126
|
get name() {
|
|
97
127
|
return this.getAttribute("name") ?? "";
|
|
@@ -101,104 +131,169 @@ const I = (l) => (() => {
|
|
|
101
131
|
return this.localName;
|
|
102
132
|
}
|
|
103
133
|
/** Value of the form element. */
|
|
104
|
-
set value(
|
|
105
|
-
this._value =
|
|
134
|
+
set value(i) {
|
|
135
|
+
this._value = i, this.updateFormValue();
|
|
106
136
|
}
|
|
107
137
|
get value() {
|
|
108
138
|
return this._value;
|
|
109
139
|
}
|
|
110
140
|
/**
|
|
111
|
-
* Returns the ValidityState object for
|
|
112
|
-
*
|
|
113
|
-
* @internal
|
|
141
|
+
* Returns the ValidityState object for this element.
|
|
114
142
|
*/
|
|
115
143
|
get validity() {
|
|
116
144
|
return this.internals.validity;
|
|
117
145
|
}
|
|
118
146
|
/**
|
|
119
|
-
* Returns the error message
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
147
|
+
* Returns the current error message, if available, which corresponds
|
|
148
|
+
* to the current validation state.
|
|
149
|
+
* Please note that only one message is returned at a time (e.g. if
|
|
150
|
+
* multiple validity states are invalid, only the chronologically first one
|
|
151
|
+
* is returned until it is fixed, at which point the next message might be
|
|
152
|
+
* returned, if it is still applicable). Also a custom validity message
|
|
153
|
+
* (see below) has precedence over native validation messages.
|
|
123
154
|
*/
|
|
124
155
|
get validationMessage() {
|
|
125
156
|
return this.internals.validationMessage;
|
|
126
157
|
}
|
|
127
158
|
/**
|
|
128
|
-
* Returns true if
|
|
159
|
+
* Returns true if this element will be validated
|
|
129
160
|
* when the form is submitted; false otherwise.
|
|
130
|
-
*
|
|
131
|
-
* @internal
|
|
132
161
|
*/
|
|
133
162
|
get willValidate() {
|
|
134
163
|
return this.internals.willValidate;
|
|
135
164
|
}
|
|
136
165
|
/** Whenever a surrounding form or fieldset is changing its disabled state. */
|
|
137
166
|
get formDisabled() {
|
|
138
|
-
return
|
|
167
|
+
return C(this, u);
|
|
139
168
|
}
|
|
140
|
-
set formDisabled(
|
|
141
|
-
|
|
169
|
+
set formDisabled(i) {
|
|
170
|
+
S(this, u, i);
|
|
142
171
|
}
|
|
143
|
-
attributeChangedCallback(
|
|
144
|
-
(
|
|
172
|
+
attributeChangedCallback(i, n, p) {
|
|
173
|
+
(i !== "name" || n !== p) && super.attributeChangedCallback(i, n, p);
|
|
145
174
|
}
|
|
146
175
|
/**
|
|
147
|
-
* Returns true if
|
|
176
|
+
* Returns true if this element has no validity problems; false otherwise.
|
|
148
177
|
* Fires an invalid event at the element in the latter case.
|
|
149
|
-
*
|
|
150
|
-
* @internal
|
|
151
178
|
*/
|
|
152
179
|
checkValidity() {
|
|
153
180
|
return this.internals.checkValidity();
|
|
154
181
|
}
|
|
155
182
|
/**
|
|
156
|
-
* Returns true if
|
|
183
|
+
* Returns true if this element has no validity problems; otherwise,
|
|
157
184
|
* returns false, fires an invalid event at the element,
|
|
158
185
|
* and (if the event isn't canceled) reports the problem to the user.
|
|
159
|
-
*
|
|
160
|
-
* @internal
|
|
161
186
|
*/
|
|
162
187
|
reportValidity() {
|
|
163
188
|
return this.internals.reportValidity();
|
|
164
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* Sets the custom validity message for this element. Use the empty string
|
|
192
|
+
* to indicate that the element does not have a custom validity error.
|
|
193
|
+
*/
|
|
194
|
+
setCustomValidity(i) {
|
|
195
|
+
i ? this.setValidityFlag("customError", i) : this.removeValidityFlag("customError");
|
|
196
|
+
}
|
|
165
197
|
/**
|
|
166
198
|
* Is called whenever a surrounding form / fieldset changes disabled state.
|
|
167
199
|
* @param disabled
|
|
168
200
|
*
|
|
169
201
|
* @internal
|
|
170
202
|
*/
|
|
171
|
-
formDisabledCallback(
|
|
203
|
+
formDisabledCallback(i) {
|
|
172
204
|
Promise.resolve().then(() => {
|
|
173
|
-
this.formDisabled =
|
|
205
|
+
this.formDisabled = i;
|
|
174
206
|
});
|
|
175
207
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
208
|
+
requestUpdate(i, n, p) {
|
|
209
|
+
super.requestUpdate(i, n, p), this.hasUpdated && this.shouldValidate(i) && this.validate();
|
|
210
|
+
}
|
|
211
|
+
firstUpdated(i) {
|
|
212
|
+
super.firstUpdated(i), this.validate();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Marks this element as suffering from the constraint indicated by the
|
|
216
|
+
* flag argument and associates the given message to it.
|
|
217
|
+
* Note that only one message is displayed at a time and custom messages by
|
|
218
|
+
* consumers are always displayed before internal messages and internal
|
|
219
|
+
* messages are displayed in the order they were added.
|
|
220
|
+
* To set/define custom validity state flags, you need to extend the
|
|
221
|
+
* ValidityState prototype (and the CustomValidityState interface).
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
*
|
|
225
|
+
* // The type of the custom validity state does not need to be boolean.
|
|
226
|
+
* Object.assign(ValidityState.prototype, {
|
|
227
|
+
* get myError(): boolean {
|
|
228
|
+
* return false;
|
|
229
|
+
* },
|
|
230
|
+
* });
|
|
231
|
+
*
|
|
232
|
+
* declare global {
|
|
233
|
+
* interface CustomValidityState {
|
|
234
|
+
* myError: boolean;
|
|
235
|
+
* }
|
|
236
|
+
* }
|
|
237
|
+
*/
|
|
238
|
+
setValidityFlag(i, n, p) {
|
|
239
|
+
p ?? (p = !0);
|
|
240
|
+
const x = this._validityStates.get(i);
|
|
241
|
+
(!x || x.message !== n || x.flagValue !== p) && (this._validityStates.set(i, { flagValue: p, message: n }), this._setInternalValidity());
|
|
242
|
+
}
|
|
243
|
+
/** Removes the validity state flag entry and updates validity state. */
|
|
244
|
+
removeValidityFlag(i) {
|
|
245
|
+
this._validityStates.has(i) && (this._validityStates.delete(i), this._setInternalValidity());
|
|
246
|
+
}
|
|
247
|
+
/** To be called whenever the current element needs to be validated. */
|
|
248
|
+
validate() {
|
|
249
|
+
}
|
|
250
|
+
/** Whether validation should be run on a property change with the given name. */
|
|
251
|
+
shouldValidate(i) {
|
|
252
|
+
return !i;
|
|
253
|
+
}
|
|
254
|
+
_setInternalValidity() {
|
|
255
|
+
var x;
|
|
256
|
+
let i = (x = this._validityStates.get("customError")) == null ? void 0 : x.message;
|
|
257
|
+
const n = {};
|
|
258
|
+
this._validityStates.forEach(({ flagValue: f, message: g }, h) => {
|
|
259
|
+
n[h] = f, i || (i = g);
|
|
260
|
+
});
|
|
261
|
+
const p = Object.keys(ValidityState.prototype).filter((f) => !(f in $) && f !== "valid");
|
|
262
|
+
for (const f of p) {
|
|
263
|
+
const g = f in n ? n[f] : !1;
|
|
264
|
+
Object.defineProperty(this.internals.validity, f, { value: g, configurable: !0 }), g && (n.customError = !0);
|
|
265
|
+
}
|
|
266
|
+
this.internals.setValidity(n, i), P && Object.defineProperty(this.internals.validity, "customError", {
|
|
267
|
+
value: this._validityStates.has("customError") || !!n.customError,
|
|
268
|
+
configurable: !0
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
}, u = new WeakMap(), (() => {
|
|
272
|
+
const i = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
273
|
+
m = [k()], l = [k()], b = [N()], y(e, null, m, { kind: "setter", name: "name", static: !1, private: !1, access: { has: (n) => "name" in n, set: (n, p) => {
|
|
274
|
+
n.name = p;
|
|
275
|
+
} }, metadata: i }, null, o), y(e, null, l, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (n) => "value" in n, set: (n, p) => {
|
|
276
|
+
n.value = p;
|
|
277
|
+
} }, metadata: i }, null, o), y(e, null, b, { kind: "accessor", name: "formDisabled", static: !1, private: !1, access: { has: (n) => "formDisabled" in n, get: (n) => n.formDisabled, set: (n, p) => {
|
|
278
|
+
n.formDisabled = p;
|
|
279
|
+
} }, metadata: i }, t, r), i && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: i });
|
|
280
|
+
})(), e.formAssociated = !0, e;
|
|
281
|
+
})(), D = (d) => (() => {
|
|
282
|
+
var l;
|
|
283
|
+
let c = d, o = [], m;
|
|
284
|
+
return l = class extends c {
|
|
190
285
|
constructor() {
|
|
191
|
-
super(...arguments), this._required = (
|
|
286
|
+
super(...arguments), this._required = (_(this, o), !1);
|
|
192
287
|
}
|
|
193
288
|
/** Whether the component is required. */
|
|
194
|
-
set required(
|
|
195
|
-
this._required = !!
|
|
289
|
+
set required(t) {
|
|
290
|
+
this._required = !!t;
|
|
196
291
|
}
|
|
197
292
|
get required() {
|
|
198
293
|
return this._required || this.isRequiredExternally();
|
|
199
294
|
}
|
|
200
|
-
willUpdate(
|
|
201
|
-
super.willUpdate(
|
|
295
|
+
willUpdate(t) {
|
|
296
|
+
super.willUpdate(t), t.has("required") && (this.internals.ariaRequired = `${this.required}`);
|
|
202
297
|
}
|
|
203
298
|
/**
|
|
204
299
|
* Will be used as 'or' check to the current required state.
|
|
@@ -208,21 +303,21 @@ const I = (l) => (() => {
|
|
|
208
303
|
return !1;
|
|
209
304
|
}
|
|
210
305
|
}, (() => {
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
} }, metadata:
|
|
215
|
-
})(),
|
|
216
|
-
})(),
|
|
217
|
-
var
|
|
218
|
-
let
|
|
306
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
307
|
+
m = [k({ reflect: !0, type: Boolean })], y(l, null, m, { kind: "setter", name: "required", static: !1, private: !1, access: { has: (r) => "required" in r, set: (r, u) => {
|
|
308
|
+
r.required = u;
|
|
309
|
+
} }, metadata: t }, null, o), t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
310
|
+
})(), l;
|
|
311
|
+
})(), Se = (d) => (() => {
|
|
312
|
+
var u;
|
|
313
|
+
let c = [K({
|
|
219
314
|
tabindex: "0"
|
|
220
|
-
})],
|
|
221
|
-
return
|
|
315
|
+
})], o, m = [], l, b = A(D(V(d))), t = [], r;
|
|
316
|
+
return u = class extends b {
|
|
222
317
|
/** Whether the checkbox is checked. */
|
|
223
318
|
set checked(s) {
|
|
224
|
-
const
|
|
225
|
-
|
|
319
|
+
const a = typeof s == "object" ? s.attribute : !1;
|
|
320
|
+
a && (s = s.value), this.hasUpdated && !a && (this._attributeMutationBlocked = !0), this._checked = !!s, this.updateFormValue();
|
|
226
321
|
}
|
|
227
322
|
get checked() {
|
|
228
323
|
return this._checked;
|
|
@@ -235,16 +330,16 @@ const I = (l) => (() => {
|
|
|
235
330
|
return "checkbox";
|
|
236
331
|
}
|
|
237
332
|
constructor() {
|
|
238
|
-
var s,
|
|
239
|
-
super(), this._attributeMutationBlocked = (
|
|
240
|
-
|
|
333
|
+
var s, a, i;
|
|
334
|
+
super(), this._attributeMutationBlocked = (_(this, t), !1), this._languageController = new B(this), this._checked = !1, this._handleKeyboardInteraction = (n) => {
|
|
335
|
+
n.key === " " && this._handleUserInteraction();
|
|
241
336
|
}, this._handleUserInteraction = () => {
|
|
242
|
-
var
|
|
243
|
-
this.disabled || ((
|
|
244
|
-
}, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (
|
|
337
|
+
var n;
|
|
338
|
+
this.disabled || ((n = this.withUserInteraction) == null || n.call(this), this.checked = !this.checked, this._attributeMutationBlocked = !0, this.dispatchEvent(new InputEvent("input", { composed: !0, bubbles: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
339
|
+
}, this.internals.role = "checkbox", (s = this.addEventListener) == null || s.call(this, "click", this._handleUserInteraction), (a = this.addEventListener) == null || a.call(this, "keydown", J), (i = this.addEventListener) == null || i.call(this, "keyup", this._handleKeyboardInteraction);
|
|
245
340
|
}
|
|
246
|
-
attributeChangedCallback(s,
|
|
247
|
-
(s !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(s,
|
|
341
|
+
attributeChangedCallback(s, a, i) {
|
|
342
|
+
(s !== "checked" || !this._attributeMutationBlocked) && super.attributeChangedCallback(s, a, i);
|
|
248
343
|
}
|
|
249
344
|
/**
|
|
250
345
|
* Is called whenever the form is being reset.
|
|
@@ -256,50 +351,217 @@ const I = (l) => (() => {
|
|
|
256
351
|
}
|
|
257
352
|
/**
|
|
258
353
|
* Called when the browser is trying to restore element’s state to state in which case
|
|
259
|
-
* reason is
|
|
260
|
-
* user in which case reason is
|
|
261
|
-
* In the case of
|
|
354
|
+
* reason is "restore", or when the browser is trying to fulfill autofill on behalf of
|
|
355
|
+
* user in which case reason is "autocomplete".
|
|
356
|
+
* In the case of "restore", state is a string, File, or FormData object
|
|
262
357
|
* previously set as the second argument to setFormValue.
|
|
263
358
|
*
|
|
264
359
|
* @internal
|
|
265
360
|
*/
|
|
266
|
-
formStateRestoreCallback(s,
|
|
361
|
+
formStateRestoreCallback(s, a) {
|
|
267
362
|
s && (this.checked = s === "true");
|
|
268
363
|
}
|
|
269
364
|
updateFormValue() {
|
|
270
365
|
this.checked ? this.internals.setFormValue(this.value, `${this.checked}`) : this.internals.setFormValue(null);
|
|
271
366
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
367
|
+
shouldValidate(s) {
|
|
368
|
+
return super.shouldValidate(s) || s === "checked" || s === "required";
|
|
369
|
+
}
|
|
370
|
+
validate() {
|
|
371
|
+
super.validate(), this.required && !this.checked ? this.setValidityFlag("valueMissing", Y[this._languageController.current]) : this.removeValidityFlag("valueMissing");
|
|
372
|
+
}
|
|
373
|
+
}, l = u, (() => {
|
|
374
|
+
const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(b[Symbol.metadata] ?? null) : void 0;
|
|
375
|
+
r = [k({
|
|
275
376
|
type: Boolean,
|
|
276
377
|
converter: {
|
|
277
|
-
...
|
|
378
|
+
...z,
|
|
278
379
|
// We need to pass information to the setter so that we know it was called by attribute change.
|
|
279
|
-
fromAttribute: (
|
|
280
|
-
var
|
|
281
|
-
return { value: (
|
|
380
|
+
fromAttribute: (a, i) => {
|
|
381
|
+
var p, x;
|
|
382
|
+
return { value: (x = (p = z).fromAttribute) == null ? void 0 : x.call(p, a, i), attribute: !0 };
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
})], y(u, null, r, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (a) => "checked" in a, set: (a, i) => {
|
|
386
|
+
a.checked = i;
|
|
387
|
+
} }, metadata: s }, null, t), y(null, o = { value: l }, c, { kind: "class", name: l.name, metadata: s }, null, m), l = o.value, s && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s }), _(l, m);
|
|
388
|
+
})(), l;
|
|
389
|
+
})(), ke = (d) => (() => {
|
|
390
|
+
var r;
|
|
391
|
+
let c = D(V(d)), o = [], m, l, b, t;
|
|
392
|
+
return r = class extends c {
|
|
393
|
+
/**
|
|
394
|
+
* Form type of element.
|
|
395
|
+
* @default 'text'
|
|
396
|
+
*/
|
|
397
|
+
get type() {
|
|
398
|
+
return "text";
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* The text value of the input element.
|
|
402
|
+
*/
|
|
403
|
+
set value(e) {
|
|
404
|
+
super.value = this._cleanText(e), this.hasUpdated && (this.innerHTML = super.value);
|
|
405
|
+
}
|
|
406
|
+
get value() {
|
|
407
|
+
return super.value ?? "";
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Whether the component is readonly.
|
|
411
|
+
* @attr readonly
|
|
412
|
+
* @default false
|
|
413
|
+
*/
|
|
414
|
+
set readOnly(e) {
|
|
415
|
+
this.toggleAttribute("readonly", !!e), this.internals.ariaReadOnly = e ? "true" : null, this._updateContenteditable();
|
|
416
|
+
}
|
|
417
|
+
get readOnly() {
|
|
418
|
+
return this.hasAttribute("readonly");
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Whether the component is disabled.
|
|
422
|
+
* @attr disabled
|
|
423
|
+
* @default false
|
|
424
|
+
*/
|
|
425
|
+
set disabled(e) {
|
|
426
|
+
this.toggleAttribute("disabled", !!e), this.internals.ariaDisabled = e ? "true" : null, this._updateContenteditable();
|
|
427
|
+
}
|
|
428
|
+
get disabled() {
|
|
429
|
+
return this.hasAttribute("disabled");
|
|
430
|
+
}
|
|
431
|
+
set placeholder(e) {
|
|
432
|
+
e ? this.setAttribute("placeholder", e) : this.removeAttribute("placeholder"), this.internals.ariaPlaceholder = e || null;
|
|
433
|
+
}
|
|
434
|
+
get placeholder() {
|
|
435
|
+
return this.getAttribute("placeholder") ?? "";
|
|
436
|
+
}
|
|
437
|
+
constructor() {
|
|
438
|
+
var e, s, a, i, n, p, x;
|
|
439
|
+
super(), this._interacted = (_(this, o), !1), this._shouldEmitChange = !1, this._shouldTriggerSubmit = !1, this.language = new B(this), this.internals.role = "textbox", (e = this.addEventListener) == null || e.call(this, "input", () => {
|
|
440
|
+
super.value = this._cleanText(this.textContent ?? ""), this._interacted = !0, this._shouldEmitChange = !0;
|
|
441
|
+
}, { capture: !0 }), (s = this.addEventListener) == null || s.call(this, "change", () => this._shouldEmitChange = !1, { capture: !0 }), (a = this.addEventListener) == null || a.call(this, "keydown", (f) => {
|
|
442
|
+
var g;
|
|
443
|
+
if ((f.key === "Enter" || f.key === `
|
|
444
|
+
`) && f.isTrusted)
|
|
445
|
+
f.preventDefault(), f.stopImmediatePropagation(), this._shouldTriggerSubmit = this.dispatchEvent(new KeyboardEvent("keydown", f));
|
|
446
|
+
else if (P && this.value && (f.key === "Backspace" || f.key === "Delete") && f.isTrusted) {
|
|
447
|
+
if (f.preventDefault(), f.stopImmediatePropagation(), !this.dispatchEvent(new KeyboardEvent("keydown", f)))
|
|
448
|
+
return;
|
|
449
|
+
const h = (g = window.getSelection()) == null ? void 0 : g.getRangeAt(0);
|
|
450
|
+
if (!h)
|
|
451
|
+
return;
|
|
452
|
+
h.startOffset !== h.endOffset ? (h.deleteContents(), this._dispatchInputEvent()) : f.key === "Backspace" && h.startOffset > 0 ? (h.setStart(h.startContainer, h.startOffset - 1), h.deleteContents(), this._dispatchInputEvent()) : f.key === "Delete" && h.endOffset < this.value.length && (h.setEnd(h.endContainer, h.endOffset + 1), h.deleteContents(), this._dispatchInputEvent());
|
|
282
453
|
}
|
|
454
|
+
}, { capture: !0 }), (i = this.addEventListener) == null || i.call(this, "keyup", (f) => {
|
|
455
|
+
var g;
|
|
456
|
+
(f.key === "Enter" || f.key === `
|
|
457
|
+
`) && (this._emitChangeIfNecessary(), this._shouldTriggerSubmit && (this._shouldTriggerSubmit = !1, (g = this.form) == null || g.requestSubmit()));
|
|
458
|
+
}, { capture: !0 }), (n = this.addEventListener) == null || n.call(this, "paste", (f) => {
|
|
459
|
+
var w, q;
|
|
460
|
+
f.preventDefault();
|
|
461
|
+
const g = this._cleanText(((w = f.clipboardData) == null ? void 0 : w.getData("text/plain")) ?? ""), h = (q = window.getSelection()) == null ? void 0 : q.getRangeAt(0);
|
|
462
|
+
!h || !g || (h.deleteContents(), h.insertNode(document.createTextNode(g)), h.setStart(h.endContainer, h.endOffset), this._dispatchInputEvent());
|
|
463
|
+
}), (p = this.addEventListener) == null || p.call(this, "focus", () => {
|
|
464
|
+
var f;
|
|
465
|
+
se.mostRecentModality === "keyboard" && ((f = window.getSelection()) == null || f.selectAllChildren(this));
|
|
466
|
+
}), (x = this.addEventListener) == null || x.call(this, "blur", () => {
|
|
467
|
+
var f;
|
|
468
|
+
(f = window.getSelection()) == null || f.removeAllRanges(), this._emitChangeIfNecessary(), this.scrollLeft = 0;
|
|
469
|
+
}, { capture: !0 });
|
|
470
|
+
}
|
|
471
|
+
connectedCallback() {
|
|
472
|
+
super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this.innerHTML = this.value;
|
|
473
|
+
}
|
|
474
|
+
focus(e) {
|
|
475
|
+
if (super.focus(e), !M && !this.disabled && !this.readOnly && this.value) {
|
|
476
|
+
const s = window.getSelection();
|
|
477
|
+
if (!s)
|
|
478
|
+
return;
|
|
479
|
+
let a = s.rangeCount > 0 ? s.getRangeAt(0) : null;
|
|
480
|
+
if (a && a.startOffset !== 0)
|
|
481
|
+
return;
|
|
482
|
+
a = document.createRange(), a.setStart(this.firstChild, this.textContent.length), a.collapse(!0), s.removeAllRanges(), s.addRange(a);
|
|
283
483
|
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
484
|
+
}
|
|
485
|
+
attributeChangedCallback(e, s, a) {
|
|
486
|
+
(e !== "value" || !this._interacted) && super.attributeChangedCallback(e, s, a);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Is called whenever the form is being reset.
|
|
490
|
+
*
|
|
491
|
+
* @internal
|
|
492
|
+
*/
|
|
493
|
+
formResetCallback() {
|
|
494
|
+
this._interacted = !1, this.value = this.getAttribute("value") ?? "";
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Called when the browser is trying to restore element’s state to state in which case
|
|
498
|
+
* reason is "restore", or when the browser is trying to fulfill autofill on behalf of
|
|
499
|
+
* user in which case reason is "autocomplete".
|
|
500
|
+
* In the case of "restore", state is a string, File, or FormData object
|
|
501
|
+
* previously set as the second argument to setFormValue.
|
|
502
|
+
*
|
|
503
|
+
* @internal
|
|
504
|
+
*/
|
|
505
|
+
formStateRestoreCallback(e, s) {
|
|
506
|
+
e && typeof e == "string" && (this.value = e);
|
|
507
|
+
}
|
|
508
|
+
updateFormValue() {
|
|
509
|
+
this.internals.setFormValue(this.value, this.value);
|
|
510
|
+
}
|
|
511
|
+
shouldValidate(e) {
|
|
512
|
+
return super.shouldValidate(e) || e === "value" || e === "required";
|
|
513
|
+
}
|
|
514
|
+
validate() {
|
|
515
|
+
super.validate(), this.required && !this.value ? this.setValidityFlag("valueMissing", Z[this.language.current]) : this.removeValidityFlag("valueMissing");
|
|
516
|
+
}
|
|
517
|
+
_cleanText(e) {
|
|
518
|
+
return `${e}`.replace(/[\n\r]+/g, "");
|
|
519
|
+
}
|
|
520
|
+
_dispatchInputEvent() {
|
|
521
|
+
this.dispatchEvent(new InputEvent("input", { bubbles: !0, composed: !0 }));
|
|
522
|
+
}
|
|
523
|
+
_cleanChildren() {
|
|
524
|
+
if (this.childElementCount)
|
|
525
|
+
for (const e of this.children)
|
|
526
|
+
e.remove();
|
|
527
|
+
}
|
|
528
|
+
_updateContenteditable() {
|
|
529
|
+
if (!M && this.isConnected) {
|
|
530
|
+
const e = this.disabled || this.readOnly ? "false" : te ? "true" : "plaintext-only";
|
|
531
|
+
this.setAttribute("contenteditable", e), this.readOnly ? this.setAttribute("tabindex", "0") : this.removeAttribute("tabindex");
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
_emitChangeIfNecessary() {
|
|
535
|
+
this._shouldEmitChange && (this._shouldEmitChange = !1, this.dispatchEvent(new Event("change", { bubbles: !0 })));
|
|
536
|
+
}
|
|
537
|
+
render() {
|
|
538
|
+
return R`<slot @slotchange=${this._cleanChildren}></slot>`;
|
|
539
|
+
}
|
|
540
|
+
}, (() => {
|
|
541
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
542
|
+
m = [k({ type: Boolean })], l = [k({ type: Boolean })], b = [k({ attribute: !1 })], t = [G({ passive: !0 })], y(r, null, m, { kind: "setter", name: "readOnly", static: !1, private: !1, access: { has: (s) => "readOnly" in s, set: (s, a) => {
|
|
543
|
+
s.readOnly = a;
|
|
544
|
+
} }, metadata: e }, null, o), y(r, null, l, { kind: "setter", name: "disabled", static: !1, private: !1, access: { has: (s) => "disabled" in s, set: (s, a) => {
|
|
545
|
+
s.disabled = a;
|
|
546
|
+
} }, metadata: e }, null, o), y(r, null, b, { kind: "setter", name: "placeholder", static: !1, private: !1, access: { has: (s) => "placeholder" in s, set: (s, a) => {
|
|
547
|
+
s.placeholder = a;
|
|
548
|
+
} }, metadata: e }, null, o), y(r, null, t, { kind: "method", name: "_cleanChildren", static: !1, private: !1, access: { has: (s) => "_cleanChildren" in s, get: (s) => s._cleanChildren }, metadata: e }, null, o), e && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
549
|
+
})(), r;
|
|
550
|
+
})(), T = /* @__PURE__ */ new WeakMap(), xe = (d) => (() => {
|
|
551
|
+
var l;
|
|
552
|
+
let c = A(D(V(d))), o = [], m;
|
|
553
|
+
return l = class extends c {
|
|
292
554
|
/**
|
|
293
555
|
* Whether the radio button is checked.
|
|
294
556
|
*/
|
|
295
|
-
set checked(
|
|
296
|
-
this._checked = !!
|
|
557
|
+
set checked(t) {
|
|
558
|
+
this._checked = !!t, this.toggleAttribute("data-checked", this.checked), this.internals.ariaChecked = this.checked.toString(), this.updateFormValue(), this._synchronizeGroupState();
|
|
297
559
|
}
|
|
298
560
|
get checked() {
|
|
299
561
|
return this._checked;
|
|
300
562
|
}
|
|
301
|
-
set name(
|
|
302
|
-
super.name =
|
|
563
|
+
set name(t) {
|
|
564
|
+
super.name = t, this._disconnectFromRegistry(), this._connectToRegistry(), this._synchronizeGroupState();
|
|
303
565
|
}
|
|
304
566
|
get name() {
|
|
305
567
|
return super.name;
|
|
@@ -312,8 +574,8 @@ const I = (l) => (() => {
|
|
|
312
574
|
return "radio";
|
|
313
575
|
}
|
|
314
576
|
constructor() {
|
|
315
|
-
var
|
|
316
|
-
super(), this._checked = (
|
|
577
|
+
var t;
|
|
578
|
+
super(), this._checked = (_(this, o), !1), this.abort = new X(this), this._didLoad = !1, this._languageController = new B(this), this.internals.role = "radio", (t = this.addEventListener) == null || t.call(this, "keydown", (r) => this._handleArrowKeyDown(r));
|
|
317
579
|
}
|
|
318
580
|
connectedCallback() {
|
|
319
581
|
super.connectedCallback(), this._connectToRegistry(), this._synchronizeGroupState();
|
|
@@ -330,18 +592,18 @@ const I = (l) => (() => {
|
|
|
330
592
|
}
|
|
331
593
|
/**
|
|
332
594
|
* Called when the browser is trying to restore element’s state to state in which case
|
|
333
|
-
* reason is
|
|
334
|
-
* user in which case reason is
|
|
595
|
+
* reason is "restore", or when the browser is trying to fulfill autofill on behalf of
|
|
596
|
+
* user in which case reason is "autocomplete".
|
|
335
597
|
* @internal
|
|
336
598
|
*/
|
|
337
|
-
formStateRestoreCallback(
|
|
338
|
-
|
|
599
|
+
formStateRestoreCallback(t, r) {
|
|
600
|
+
t && (this.checked = t === this.value);
|
|
339
601
|
}
|
|
340
|
-
willUpdate(
|
|
341
|
-
super.willUpdate(
|
|
602
|
+
willUpdate(t) {
|
|
603
|
+
super.willUpdate(t), t.has("disabled") && this.updateFocusableRadios();
|
|
342
604
|
}
|
|
343
|
-
firstUpdated(
|
|
344
|
-
super.firstUpdated(
|
|
605
|
+
firstUpdated(t) {
|
|
606
|
+
super.firstUpdated(t), this._didLoad = !0, this.updateFocusableRadios();
|
|
345
607
|
}
|
|
346
608
|
/**
|
|
347
609
|
* Called on `value` change
|
|
@@ -350,6 +612,21 @@ const I = (l) => (() => {
|
|
|
350
612
|
updateFormValue() {
|
|
351
613
|
this.checked ? this.internals.setFormValue(this.value, this.value) : this.internals.setFormValue(null);
|
|
352
614
|
}
|
|
615
|
+
shouldValidate(t) {
|
|
616
|
+
return super.shouldValidate(t) || t === "checked" || t === "required";
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Sets the validity of all associated radio buttons.
|
|
620
|
+
* If any radio button is required, all associated are required as well.
|
|
621
|
+
*/
|
|
622
|
+
validate() {
|
|
623
|
+
if (super.validate(), !this.associatedRadioButtons)
|
|
624
|
+
return;
|
|
625
|
+
let t = !1, r = !1;
|
|
626
|
+
for (const u of this.associatedRadioButtons)
|
|
627
|
+
t || (t = u.required), r || (r = u.checked);
|
|
628
|
+
t && !r ? this.associatedRadioButtons.forEach((u) => u.setValidityFlag("valueMissing", ee[this._languageController.current])) : this.associatedRadioButtons.forEach((u) => u.removeValidityFlag("valueMissing"));
|
|
629
|
+
}
|
|
353
630
|
/**
|
|
354
631
|
* Only a single radio should be focusable in the group. Defined as:
|
|
355
632
|
* - the checked radio;
|
|
@@ -358,11 +635,11 @@ const I = (l) => (() => {
|
|
|
358
635
|
updateFocusableRadios() {
|
|
359
636
|
if (!this._didLoad)
|
|
360
637
|
return;
|
|
361
|
-
const
|
|
362
|
-
|
|
638
|
+
const t = this._interactableGroupedRadios(), r = t.findIndex((e) => e.checked && !e.disabled && !e.formDisabled), u = r !== -1 ? r : t.findIndex((e) => !e.disabled && !e.formDisabled);
|
|
639
|
+
u !== -1 && (t[u].tabIndex = 0, t.splice(u, 1)), t.forEach((e) => e.removeAttribute("tabindex"));
|
|
363
640
|
}
|
|
364
|
-
async navigateByKeyboard(
|
|
365
|
-
|
|
641
|
+
async navigateByKeyboard(t) {
|
|
642
|
+
t.checked = !0, this.emitChangeEvents(), await t.updateComplete, t.focus();
|
|
366
643
|
}
|
|
367
644
|
emitChangeEvents() {
|
|
368
645
|
this.dispatchEvent(new InputEvent("input", { bubbles: !0, cancelable: !0, composed: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
@@ -374,49 +651,49 @@ const I = (l) => (() => {
|
|
|
374
651
|
* Add `this` to the radioButton registry
|
|
375
652
|
*/
|
|
376
653
|
_connectToRegistry() {
|
|
377
|
-
if (!this.name ||
|
|
654
|
+
if (!this.name || M)
|
|
378
655
|
return;
|
|
379
|
-
const
|
|
380
|
-
this._radioButtonGroupsMap =
|
|
381
|
-
const
|
|
656
|
+
const t = this.form ?? this.getRootNode();
|
|
657
|
+
this._radioButtonGroupsMap = T.get(t), this._radioButtonGroupsMap || (this._radioButtonGroupsMap = /* @__PURE__ */ new Map(), T.set(t, this._radioButtonGroupsMap)), this.associatedRadioButtons = this._radioButtonGroupsMap.get(this.name), this.associatedRadioButtons || (this.associatedRadioButtons = /* @__PURE__ */ new Set(), this._radioButtonGroupsMap.set(this.name, this.associatedRadioButtons));
|
|
658
|
+
const r = Array.from(this.associatedRadioButtons);
|
|
382
659
|
this.associatedRadioButtons.clear();
|
|
383
|
-
const
|
|
384
|
-
|
|
660
|
+
const u = r.findIndex((e) => this.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
661
|
+
u !== -1 ? r.splice(u, 0, this) : r.push(this), r.forEach((e) => this.associatedRadioButtons.add(e)), this.validate();
|
|
385
662
|
}
|
|
386
663
|
/**
|
|
387
664
|
* Remove `this` from the radioButton registry and, if the group is empty, delete the entry from the groups Map
|
|
388
665
|
*/
|
|
389
666
|
_disconnectFromRegistry() {
|
|
390
|
-
var
|
|
391
|
-
(
|
|
667
|
+
var t, r, u;
|
|
668
|
+
(t = this.associatedRadioButtons) == null || t.delete(this), ((r = this.associatedRadioButtons) == null ? void 0 : r.size) === 0 ? (u = this._radioButtonGroupsMap) == null || u.delete(this.name) : this.validate(), this.associatedRadioButtons = void 0, this._radioButtonGroupsMap = void 0;
|
|
392
669
|
}
|
|
393
670
|
/**
|
|
394
671
|
* Return a list of 'interactable' grouped radios, ordered in DOM order
|
|
395
672
|
*/
|
|
396
673
|
_interactableGroupedRadios() {
|
|
397
|
-
return Array.from(this.associatedRadioButtons ?? []).filter((
|
|
674
|
+
return Array.from(this.associatedRadioButtons ?? []).filter((t) => ae.isVisible(t));
|
|
398
675
|
}
|
|
399
676
|
/**
|
|
400
677
|
* Deselect other radio of the same group
|
|
401
678
|
*/
|
|
402
679
|
_deselectGroupedRadios() {
|
|
403
|
-
Array.from(this.associatedRadioButtons ?? []).filter((
|
|
680
|
+
Array.from(this.associatedRadioButtons ?? []).filter((t) => t !== this).forEach((t) => t.checked = !1);
|
|
404
681
|
}
|
|
405
|
-
async _handleArrowKeyDown(
|
|
406
|
-
if (!
|
|
682
|
+
async _handleArrowKeyDown(t) {
|
|
683
|
+
if (!ie(t))
|
|
407
684
|
return;
|
|
408
|
-
|
|
409
|
-
const
|
|
410
|
-
await this.navigateByKeyboard(
|
|
685
|
+
t.preventDefault();
|
|
686
|
+
const r = this._interactableGroupedRadios().filter((s) => !s.disabled && !s.formDisabled), u = r.indexOf(this), e = re(t, u, r.length);
|
|
687
|
+
await this.navigateByKeyboard(r[e]);
|
|
411
688
|
}
|
|
412
689
|
}, (() => {
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
} }, metadata:
|
|
417
|
-
})(),
|
|
418
|
-
})(),
|
|
419
|
-
class
|
|
690
|
+
const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
691
|
+
m = [k({ type: Boolean })], y(l, null, m, { kind: "setter", name: "checked", static: !1, private: !1, access: { has: (r) => "checked" in r, set: (r, u) => {
|
|
692
|
+
r.checked = u;
|
|
693
|
+
} }, metadata: t }, null, o), t && Object.defineProperty(l, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
|
|
694
|
+
})(), l;
|
|
695
|
+
})(), le = (d) => {
|
|
696
|
+
class v extends d {
|
|
420
697
|
/**
|
|
421
698
|
* Returns a Promise that resolves when the element has completed hydration.
|
|
422
699
|
* The Promise value is a boolean that is `true` if the element required hydration
|
|
@@ -432,34 +709,34 @@ const I = (l) => (() => {
|
|
|
432
709
|
get hydrationRequired() {
|
|
433
710
|
return this._hydrationRequired;
|
|
434
711
|
}
|
|
435
|
-
constructor(...
|
|
436
|
-
var
|
|
437
|
-
if (super(...
|
|
712
|
+
constructor(...o) {
|
|
713
|
+
var m;
|
|
714
|
+
if (super(...o), this._hydrationComplete = new Promise((l) => this._resolveHydration = l), this._hydrationRequired = !!this.shadowRoot, !this._hydrationRequired)
|
|
438
715
|
this._resolveHydration(!1);
|
|
439
716
|
else {
|
|
440
|
-
const
|
|
441
|
-
this._hydrationRequired &&
|
|
442
|
-
},
|
|
443
|
-
|
|
444
|
-
|
|
717
|
+
const l = (r) => {
|
|
718
|
+
this._hydrationRequired && r.stopImmediatePropagation();
|
|
719
|
+
}, b = { capture: !0 }, t = (m = this.shadowRoot) == null ? void 0 : m.querySelectorAll("slot");
|
|
720
|
+
t != null && t.length && (t.forEach((r) => r.addEventListener("slotchange", l, b)), this.hydrationComplete.then(() => t.forEach((r) => {
|
|
721
|
+
r.removeEventListener("slotchange", l, b), r.assignedNodes().length && r.dispatchEvent(new Event("slotchange", { bubbles: !0 }));
|
|
445
722
|
})));
|
|
446
723
|
}
|
|
447
724
|
}
|
|
448
|
-
update(
|
|
449
|
-
super.update(
|
|
725
|
+
update(o) {
|
|
726
|
+
super.update(o), this._hydrationRequired && (this._hydrationRequired = !1, this._resolveHydration(!0));
|
|
450
727
|
}
|
|
451
728
|
}
|
|
452
|
-
return
|
|
453
|
-
},
|
|
454
|
-
var
|
|
455
|
-
let
|
|
456
|
-
return
|
|
729
|
+
return v;
|
|
730
|
+
}, U = "data-ssr-child-count", j = "li", Ce = (d) => (() => {
|
|
731
|
+
var b, t;
|
|
732
|
+
let c = le(d), o, m = [], l = [];
|
|
733
|
+
return t = class extends c {
|
|
457
734
|
constructor() {
|
|
458
735
|
super(...arguments);
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
const
|
|
462
|
-
|
|
736
|
+
E(this, b);
|
|
737
|
+
S(this, b, _(this, m, [])), this._handleSlotchange = (_(this, l), () => {
|
|
738
|
+
const e = Array.from(this.children ?? []).filter((s) => this.listChildLocalNames.includes(s.localName));
|
|
739
|
+
e.length === this.listChildren.length && this.listChildren.every((s, a) => e[a] === s) || (this.listChildren.filter((s) => !e.includes(s)).forEach((s) => s.removeAttribute("slot")), this.listChildren = e, this.listChildren.forEach((s, a) => s.setAttribute("slot", `${j}-${a}`)), this.removeAttribute(U));
|
|
463
740
|
});
|
|
464
741
|
}
|
|
465
742
|
/**
|
|
@@ -468,18 +745,18 @@ const I = (l) => (() => {
|
|
|
468
745
|
* to the child elements.
|
|
469
746
|
*/
|
|
470
747
|
get listChildren() {
|
|
471
|
-
return
|
|
748
|
+
return C(this, b);
|
|
472
749
|
}
|
|
473
|
-
set listChildren(
|
|
474
|
-
|
|
750
|
+
set listChildren(e) {
|
|
751
|
+
S(this, b, e);
|
|
475
752
|
}
|
|
476
753
|
connectedCallback() {
|
|
477
|
-
var
|
|
478
|
-
super.connectedCallback(), (
|
|
754
|
+
var e;
|
|
755
|
+
super.connectedCallback(), (e = this.shadowRoot) == null || e.addEventListener("slotchange", this._handleSlotchange, { passive: !0 });
|
|
479
756
|
}
|
|
480
757
|
disconnectedCallback() {
|
|
481
|
-
var
|
|
482
|
-
super.disconnectedCallback(), (
|
|
758
|
+
var e;
|
|
759
|
+
super.disconnectedCallback(), (e = this.shadowRoot) == null || e.removeEventListener("slotchange", this._handleSlotchange);
|
|
483
760
|
}
|
|
484
761
|
/**
|
|
485
762
|
* Renders list and list slots for slotted children or a number of list slots
|
|
@@ -490,24 +767,24 @@ const I = (l) => (() => {
|
|
|
490
767
|
* framework wrapper (like e.g. React). This allows to provide the number of
|
|
491
768
|
* children to be passed via the `data-ssr-child-count` attribute value.
|
|
492
769
|
*/
|
|
493
|
-
renderList(
|
|
494
|
-
const
|
|
495
|
-
return
|
|
770
|
+
renderList(e = {}, s = {}) {
|
|
771
|
+
const a = this.listSlotEntries(s);
|
|
772
|
+
return a.length >= 2 ? R`
|
|
496
773
|
<ul
|
|
497
|
-
class=${
|
|
498
|
-
aria-label=${
|
|
499
|
-
aria-labelledby=${
|
|
774
|
+
class=${e.class || this.localName}
|
|
775
|
+
aria-label=${e.ariaLabel || O}
|
|
776
|
+
aria-labelledby=${e.ariaLabelledby || O}
|
|
500
777
|
>
|
|
501
|
-
${
|
|
502
|
-
<li aria-hidden=${
|
|
503
|
-
<slot name=${
|
|
778
|
+
${a.map((i) => R`
|
|
779
|
+
<li aria-hidden=${i.ariaHidden || O}>
|
|
780
|
+
<slot name=${i.name}></slot>
|
|
504
781
|
</li>
|
|
505
782
|
`)}
|
|
506
783
|
</ul>
|
|
507
784
|
${this.renderHiddenSlot()}
|
|
508
|
-
` :
|
|
509
|
-
<span class=${
|
|
510
|
-
<span><slot name=${
|
|
785
|
+
` : a.length === 1 ? R`<sbb-screen-reader-only>${e.ariaLabel}</sbb-screen-reader-only>
|
|
786
|
+
<span class=${e.class || this.localName}>
|
|
787
|
+
<span><slot name=${a[0].name}></slot></span>
|
|
511
788
|
</span>
|
|
512
789
|
${this.renderHiddenSlot()} ` : this.renderHiddenSlot();
|
|
513
790
|
}
|
|
@@ -520,12 +797,12 @@ const I = (l) => (() => {
|
|
|
520
797
|
* framework wrapper (like e.g. React). This allows to provide the number of
|
|
521
798
|
* children to be passed via the `data-ssr-child-count` attribute value.
|
|
522
799
|
*/
|
|
523
|
-
listSlotEntries(
|
|
524
|
-
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(
|
|
525
|
-
var
|
|
800
|
+
listSlotEntries(e) {
|
|
801
|
+
return (this.listChildren.length ? this.listChildren : Array.from({ length: +(this.getAttribute(U) ?? 0) })).map((a, i) => {
|
|
802
|
+
var n;
|
|
526
803
|
return {
|
|
527
|
-
name: `${
|
|
528
|
-
ariaHidden: ((
|
|
804
|
+
name: `${j}-${i}`,
|
|
805
|
+
ariaHidden: ((n = e == null ? void 0 : e.localNameVisualOnly) == null ? void 0 : n.includes(a.localName)) ?? !1
|
|
529
806
|
};
|
|
530
807
|
});
|
|
531
808
|
}
|
|
@@ -537,113 +814,115 @@ const I = (l) => (() => {
|
|
|
537
814
|
renderHiddenSlot() {
|
|
538
815
|
return R`<span hidden><slot></slot></span>`;
|
|
539
816
|
}
|
|
540
|
-
},
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
s.listChildren =
|
|
544
|
-
} }, metadata:
|
|
545
|
-
})(),
|
|
546
|
-
})(),
|
|
547
|
-
var
|
|
548
|
-
let
|
|
549
|
-
return
|
|
817
|
+
}, b = new WeakMap(), (() => {
|
|
818
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
819
|
+
o = [N()], y(t, null, o, { kind: "accessor", name: "listChildren", static: !1, private: !1, access: { has: (s) => "listChildren" in s, get: (s) => s.listChildren, set: (s, a) => {
|
|
820
|
+
s.listChildren = a;
|
|
821
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
822
|
+
})(), t;
|
|
823
|
+
})(), Ee = (d) => (() => {
|
|
824
|
+
var b, t;
|
|
825
|
+
let c = d, o, m = [], l = [];
|
|
826
|
+
return t = class extends c {
|
|
550
827
|
constructor() {
|
|
551
828
|
super(...arguments);
|
|
552
|
-
|
|
553
|
-
|
|
829
|
+
E(this, b, _(this, m, !1));
|
|
830
|
+
_(this, l);
|
|
554
831
|
}
|
|
555
832
|
/** Negative coloring variant flag. */
|
|
556
833
|
get negative() {
|
|
557
|
-
return
|
|
558
|
-
}
|
|
559
|
-
set negative(
|
|
560
|
-
|
|
561
|
-
}
|
|
562
|
-
},
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
s.negative =
|
|
566
|
-
} }, metadata:
|
|
567
|
-
})(),
|
|
568
|
-
})(),
|
|
569
|
-
var
|
|
570
|
-
let
|
|
571
|
-
return
|
|
834
|
+
return C(this, b);
|
|
835
|
+
}
|
|
836
|
+
set negative(e) {
|
|
837
|
+
S(this, b, e);
|
|
838
|
+
}
|
|
839
|
+
}, b = new WeakMap(), (() => {
|
|
840
|
+
const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
841
|
+
o = [I(), k({ reflect: !0, type: Boolean })], y(t, null, o, { kind: "accessor", name: "negative", static: !1, private: !1, access: { has: (s) => "negative" in s, get: (s) => s.negative, set: (s, a) => {
|
|
842
|
+
s.negative = a;
|
|
843
|
+
} }, metadata: e }, m, l), e && Object.defineProperty(t, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
|
|
844
|
+
})(), t;
|
|
845
|
+
})(), we = (d) => (() => {
|
|
846
|
+
var a, i, n, p;
|
|
847
|
+
let c = d, o, m = [], l = [], b, t = [], r = [], u, e = [], s = [];
|
|
848
|
+
return p = class extends c {
|
|
572
849
|
constructor() {
|
|
573
850
|
super(...arguments);
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
851
|
+
E(this, a);
|
|
852
|
+
E(this, i);
|
|
853
|
+
E(this, n);
|
|
854
|
+
S(this, a, _(this, m, "white")), S(this, i, (_(this, l), _(this, t, !1))), S(this, n, (_(this, r), _(this, e, ""))), this._panelConnected = (_(this, s), new Q(this, p.events.panelConnected, { bubbles: !0 }));
|
|
578
855
|
}
|
|
579
856
|
/** The background color of the panel. */
|
|
580
857
|
get color() {
|
|
581
|
-
return
|
|
858
|
+
return C(this, a);
|
|
582
859
|
}
|
|
583
860
|
set color(g) {
|
|
584
|
-
|
|
861
|
+
S(this, a, g);
|
|
585
862
|
}
|
|
586
863
|
/** Whether the unselected panel has a border. */
|
|
587
864
|
get borderless() {
|
|
588
|
-
return
|
|
865
|
+
return C(this, i);
|
|
589
866
|
}
|
|
590
867
|
set borderless(g) {
|
|
591
|
-
|
|
868
|
+
S(this, i, g);
|
|
592
869
|
}
|
|
593
870
|
/** @internal used for accessibility label when in expansion panel */
|
|
594
871
|
get expansionState() {
|
|
595
|
-
return
|
|
872
|
+
return C(this, n);
|
|
596
873
|
}
|
|
597
874
|
set expansionState(g) {
|
|
598
|
-
|
|
875
|
+
S(this, n, g);
|
|
599
876
|
}
|
|
600
877
|
connectedCallback() {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
878
|
+
var g, h;
|
|
879
|
+
super.connectedCallback(), this._panelConnected.emit(), (h = (g = this.closest) == null ? void 0 : g.call(this, "sbb-radio-button-group, sbb-checkbox-group")) == null || h.toggleAttribute("data-has-panel", !0);
|
|
880
|
+
}
|
|
881
|
+
}, a = new WeakMap(), i = new WeakMap(), n = new WeakMap(), (() => {
|
|
882
|
+
const g = typeof Symbol == "function" && Symbol.metadata ? Object.create(c[Symbol.metadata] ?? null) : void 0;
|
|
883
|
+
o = [k({ reflect: !0 })], b = [I(), k({ reflect: !0, type: Boolean })], u = [I(), k()], y(p, null, o, { kind: "accessor", name: "color", static: !1, private: !1, access: { has: (h) => "color" in h, get: (h) => h.color, set: (h, w) => {
|
|
884
|
+
h.color = w;
|
|
885
|
+
} }, metadata: g }, m, l), y(p, null, b, { kind: "accessor", name: "borderless", static: !1, private: !1, access: { has: (h) => "borderless" in h, get: (h) => h.borderless, set: (h, w) => {
|
|
886
|
+
h.borderless = w;
|
|
887
|
+
} }, metadata: g }, t, r), y(p, null, u, { kind: "accessor", name: "expansionState", static: !1, private: !1, access: { has: (h) => "expansionState" in h, get: (h) => h.expansionState, set: (h, w) => {
|
|
888
|
+
h.expansionState = w;
|
|
889
|
+
} }, metadata: g }, e, s), g && Object.defineProperty(p, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: g });
|
|
890
|
+
})(), p.events = {
|
|
613
891
|
panelConnected: "panelConnected"
|
|
614
|
-
},
|
|
615
|
-
})(),
|
|
616
|
-
class
|
|
892
|
+
}, p;
|
|
893
|
+
})(), Re = (d) => {
|
|
894
|
+
class v extends d {
|
|
617
895
|
constructor() {
|
|
618
896
|
super(...arguments), this._updatePromise = Promise.resolve(), this._updateResolve = () => {
|
|
619
897
|
};
|
|
620
898
|
}
|
|
621
899
|
startUpdate() {
|
|
622
|
-
this._updatePromise = new Promise((
|
|
900
|
+
this._updatePromise = new Promise((o) => this._updateResolve = o);
|
|
623
901
|
}
|
|
624
902
|
completeUpdate() {
|
|
625
903
|
this._updateResolve();
|
|
626
904
|
}
|
|
627
905
|
async getUpdateComplete() {
|
|
628
|
-
const
|
|
629
|
-
return await this._updatePromise,
|
|
906
|
+
const o = await super.getUpdateComplete();
|
|
907
|
+
return await this._updatePromise, o;
|
|
630
908
|
}
|
|
631
909
|
}
|
|
632
|
-
return
|
|
633
|
-
},
|
|
910
|
+
return v;
|
|
911
|
+
}, Ie = W`:host{--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-white) );--sbb-selection-panel-border-color: var(--sbb-color-cloud);--sbb-selection-panel-border-radius: var( --sbb-selection-expansion-panel-border-radius, var(--sbb-border-radius-4x) );--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-1x) );--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xs) var(--sbb-spacing-responsive-xxs);--sbb-selection-panel-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-4x) );--sbb-selection-panel-cursor: pointer;--sbb-selection-panel-suffix-color: var(--sbb-color-charcoal);--sbb-selection-panel-subtext-color: var(--sbb-color-granite);display:block;outline:none!important}:host([size=s]){--sbb-selection-panel-input-padding: var(--sbb-spacing-responsive-xxs) var(--sbb-spacing-responsive-xxxs)}:host([color=milk]){--sbb-selection-panel-background: var( --sbb-selection-expansion-panel-inner-background, var(--sbb-color-milk) )}:host([borderless]:not([data-checked])){--sbb-selection-panel-border-color: transparent}:host(:is([data-checked]):not(:disabled,[disabled])){--sbb-selection-panel-border-color: var(--sbb-color-charcoal);--sbb-selection-panel-border-width: var( --sbb-selection-expansion-panel-inner-border-width, var(--sbb-border-width-2x) )}:host(:is(:disabled,[disabled])){--sbb-selection-panel-cursor: default}.sbb-selection-panel{display:block;cursor:var(--sbb-selection-panel-cursor);position:relative;border-radius:var(--sbb-selection-panel-border-radius);box-shadow:inset 0 0 0 var(--sbb-selection-panel-border-width) var(--sbb-selection-panel-border-color);padding:var(--sbb-selection-panel-input-padding);background-color:var(--sbb-selection-panel-background);transition-duration:var(--sbb-selection-panel-animation-duration);transition-timing-function:var(--sbb-animation-easing);transition-property:box-shadow}@media (forced-colors: active){.sbb-selection-panel:after{content:"";display:block;position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;border:var(--sbb-selection-panel-border-width) solid var(--sbb-selection-panel-border-color);border-radius:var(--sbb-selection-panel-border-radius)}}:host(:focus-visible) .sbb-selection-panel{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) solid var(--sbb-focus-outline-width)}.sbb-selection-panel__badge{-webkit-user-select:none;user-select:none;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:var(--sbb-selection-panel-border-radius);overflow:hidden}slot[name=suffix]{color:var(--sbb-selection-panel-suffix-color)}slot[name=subtext]{display:block;color:var(--sbb-selection-panel-subtext-color);padding-inline-start:var(--sbb-spacing-fixed-8x)}:host(:not([data-slot-names~=subtext])) slot[name=subtext]{display:none}`;
|
|
634
912
|
export {
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
913
|
+
ne as SbbDisabledInteractiveMixin,
|
|
914
|
+
A as SbbDisabledMixin,
|
|
915
|
+
_e as SbbDisabledTabIndexActionMixin,
|
|
916
|
+
Se as SbbFormAssociatedCheckboxMixin,
|
|
917
|
+
ke as SbbFormAssociatedInputMixin,
|
|
918
|
+
V as SbbFormAssociatedMixin,
|
|
919
|
+
xe as SbbFormAssociatedRadioButtonMixin,
|
|
920
|
+
le as SbbHydrationMixin,
|
|
921
|
+
Ce as SbbNamedSlotListMixin,
|
|
922
|
+
Ee as SbbNegativeMixin,
|
|
923
|
+
we as SbbPanelMixin,
|
|
924
|
+
D as SbbRequiredMixin,
|
|
925
|
+
Re as SbbUpdateSchedulerMixin,
|
|
926
|
+
Ie as panelCommonStyle,
|
|
927
|
+
T as radioButtonRegistry
|
|
649
928
|
};
|