@lion/ui 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -20
- package/components/accordion/src/LionAccordion.js +31 -42
- package/components/accordion/test/lion-accordion.test.js +108 -134
- package/components/button/src/LionButton.js +9 -12
- package/components/button/src/LionButtonReset.js +0 -5
- package/components/button/src/LionButtonSubmit.js +7 -12
- package/components/button/test/demos.screenshots-test.js +50 -11
- package/components/button/test/lion-button.test.js +0 -1
- package/components/button/test-suites/LionButton.suite.js +135 -145
- package/components/button/test-suites/LionButtonReset.suite.js +54 -72
- package/components/button/test-suites/LionButtonSubmit.suite.js +49 -68
- package/components/calendar/src/LionCalendar.js +151 -104
- package/components/calendar/src/calendarStyle.js +0 -1
- package/components/calendar/src/utils/createMonth.js +3 -4
- package/components/calendar/src/utils/createMultipleMonth.js +15 -7
- package/components/calendar/src/utils/createWeek.js +0 -2
- package/components/calendar/src/utils/dataTemplate.js +8 -4
- package/components/calendar/src/utils/dayTemplate.js +0 -6
- package/components/calendar/src/utils/getDayMonthYear.js +6 -2
- package/components/calendar/test/demos.screenshots-test.js +40 -9
- package/components/calendar/test/lion-calendar.test.js +171 -282
- package/components/calendar/test/utils/createMonth.test.js +61 -22
- package/components/calendar/test/utils/createMultipleMonth.test.js +14 -7
- package/components/calendar/test/utils/createWeek.test.js +51 -17
- package/components/calendar/test/utils/dataTemplate.test.js +3 -4
- package/components/calendar/test/utils/dayTemplate.test.js +106 -34
- package/components/calendar/test/utils/getFirstDayNextMonth.test.js +0 -1
- package/components/calendar/test/utils/getLastDayPreviousMonth.test.js +0 -1
- package/components/calendar/test/utils/isSameDate.test.js +0 -1
- package/components/calendar/test/utils/snapshots/monthTemplate_en-GB_Sunday_2018-12.js +1 -2
- package/components/calendar/test-helpers/CalendarObject.js +31 -62
- package/components/calendar/test-helpers/DayObject.js +7 -15
- package/components/calendar/test-suites/LionCalendar.suite.js +7 -9
- package/components/checkbox-group/src/LionCheckboxIndeterminate.js +17 -30
- package/components/checkbox-group/test/lion-checkbox-group-integrations.test.js +0 -1
- package/components/checkbox-group/test/lion-checkbox-group.test.js +21 -16
- package/components/checkbox-group/test/lion-checkbox-indeterminate-integrations.test.js +3 -3
- package/components/checkbox-group/test/lion-checkbox-integrations.test.js +3 -2
- package/components/checkbox-group/test/lion-checkbox.test.js +30 -16
- package/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.js +147 -191
- package/components/collapsible/src/LionCollapsible.js +10 -15
- package/components/collapsible/test/lion-collapsible.test.js +4 -18
- package/components/combobox/src/LionCombobox.js +35 -53
- package/components/combobox/src/utils/makeMatchingTextBold.js +2 -5
- package/components/combobox/src/validators.js +0 -1
- package/components/combobox/test/lion-combobox-integrations.test.js +6 -6
- package/components/combobox/test/lion-combobox.test.js +576 -869
- package/components/combobox/test/validators.test.js +6 -13
- package/components/combobox/test-helpers/combobox-helpers.js +24 -11
- package/components/core/src/DisabledMixin.js +61 -66
- package/components/core/src/DisabledWithTabIndexMixin.js +76 -83
- package/components/core/src/EventTargetShim.js +1 -4
- package/components/core/src/ScopedElementsMixin.js +4 -15
- package/components/core/src/ScopedStylesController.js +1 -5
- package/components/core/src/SlotMixin.js +236 -239
- package/components/core/src/browserDetection.js +5 -12
- package/components/core/test/DisabledMixin.test.js +24 -39
- package/components/core/test/DisabledWithTabIndexMixin.test.js +21 -34
- package/components/core/test/EventTargetShim.test.js +0 -8
- package/components/core/test/ScopedElementsMixin.test.js +22 -38
- package/components/core/test/ScopedStylesController.test.js +11 -20
- package/components/core/test/SlotMixin.test.js +102 -154
- package/components/core/test-helpers/getCachedFixture.js +5 -11
- package/components/core/types/SlotMixinTypes.ts +8 -3
- package/components/dialog/src/LionDialog.js +4 -3
- package/components/dialog/test/lion-dialog.integration.test.js +10 -20
- package/components/dialog/test/lion-dialog.test.js +48 -62
- package/components/dialog/test-helpers/test-router.js +4 -6
- package/components/drawer/src/LionDrawer.js +18 -34
- package/components/drawer/src/drawerStyle.js +0 -1
- package/components/drawer/test/lion-drawer.test.js +1 -17
- package/components/fieldset/test/lion-fieldset.test.js +6 -4
- package/components/form/src/LionForm.js +18 -13
- package/components/form/test/lion-form.test.js +22 -52
- package/components/form-core/src/FocusMixin.js +172 -174
- package/components/form-core/src/FormControlMixin.js +811 -813
- package/components/form-core/src/FormatMixin.js +537 -537
- package/components/form-core/src/InteractionStateMixin.js +196 -183
- package/components/form-core/src/LionField.js +9 -5
- package/components/form-core/src/NativeTextFieldMixin.js +114 -116
- package/components/form-core/src/choice-group/ChoiceGroupMixin.js +322 -364
- package/components/form-core/src/choice-group/ChoiceInputMixin.js +306 -296
- package/components/form-core/src/choice-group/CustomChoiceGroupMixin.js +114 -139
- package/components/form-core/src/form-group/FormElementsHaveNoError.js +0 -2
- package/components/form-core/src/form-group/FormGroupMixin.js +551 -557
- package/components/form-core/src/registration/FormRegisteringMixin.js +72 -71
- package/components/form-core/src/registration/FormRegistrarMixin.js +201 -217
- package/components/form-core/src/registration/FormRegistrarPortalMixin.js +31 -37
- package/components/form-core/src/utils/SyncUpdatableMixin.js +106 -117
- package/components/form-core/src/utils/getAriaElementsInRightDomOrder.js +1 -2
- package/components/form-core/src/validate/LionValidationFeedback.js +12 -8
- package/components/form-core/src/validate/Unparseable.js +4 -2
- package/components/form-core/src/validate/ValidateMixin.js +829 -883
- package/components/form-core/src/validate/Validator.js +3 -6
- package/components/form-core/src/validate/resultValidators/DefaultSuccess.js +1 -2
- package/components/form-core/src/validate/validators/DateValidators.js +0 -5
- package/components/form-core/src/validate/validators/NumberValidators.js +1 -5
- package/components/form-core/src/validate/validators/Required.js +1 -1
- package/components/form-core/src/validate/validators/StringValidators.js +1 -8
- package/components/form-core/test/FocusMixin.test.js +96 -82
- package/components/form-core/test/FormControlMixin.test.js +120 -176
- package/components/form-core/test/FormRegistrationMixins.test.js +0 -2
- package/components/form-core/test/FormatMixin.test.js +0 -1
- package/components/form-core/test/InteractionStateMixin.test.js +0 -1
- package/components/form-core/test/NativeTextFieldMixin.test.js +0 -1
- package/components/form-core/test/choice-group/ChoiceGroupMixin.test.js +0 -1
- package/components/form-core/test/choice-group/ChoiceInputMixin.test.js +0 -1
- package/components/form-core/test/choice-group/CustomChoiceGroupMixin.integrations.test.js +6 -8
- package/components/form-core/test/choice-group/CustomChoiceGroupMixin.test.js +0 -3
- package/components/form-core/test/form-group/FormGroupMixin.test.js +0 -1
- package/components/form-core/test/lion-field.test.js +88 -98
- package/components/form-core/test/utils/SyncUpdatableMixin.test.js +51 -65
- package/components/form-core/test/utils/getAriaElementsInRightDomOrder.test.js +3 -3
- package/components/form-core/test/validate/DateValidators.test.js +5 -27
- package/components/form-core/test/validate/NumberValidators.test.js +4 -16
- package/components/form-core/test/validate/Required.test.js +8 -21
- package/components/form-core/test/validate/ResultValidator.test.js +1 -2
- package/components/form-core/test/validate/StringValidators.test.js +4 -35
- package/components/form-core/test/validate/ValidateMixin.test.js +0 -1
- package/components/form-core/test/validate/ValidateMixinFeedbackPart.test.js +0 -1
- package/components/form-core/test/validate/Validator.test.js +39 -34
- package/components/form-core/test/validate/lion-validation-feedback.test.js +81 -43
- package/components/form-core/test-helpers/ExampleValidators.js +0 -5
- package/components/form-core/test-helpers/getFormControlMembers.js +2 -2
- package/components/form-core/test-helpers/mimicUserInput.js +5 -1
- package/components/form-core/test-suites/FormRegistrationMixins.suite.js +65 -122
- package/components/form-core/test-suites/FormatMixin.suite.js +202 -227
- package/components/form-core/test-suites/InteractionStateMixin.suite.js +47 -60
- package/components/form-core/test-suites/NativeTextFieldMixin.suite.js +8 -11
- package/components/form-core/test-suites/ValidateMixin.suite.js +280 -359
- package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +112 -163
- package/components/form-core/test-suites/choice-group/ChoiceGroupMixin.suite.js +185 -218
- package/components/form-core/test-suites/choice-group/ChoiceInputMixin.suite.js +116 -109
- package/components/form-core/test-suites/choice-group/CustomChoiceGroupMixin.suite.js +36 -70
- package/components/form-core/test-suites/form-group/FormGroupMixin-input.suite.js +57 -65
- package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +664 -523
- package/components/form-core/translations/bg-BG.js +0 -1
- package/components/form-core/translations/cs-CZ.js +0 -1
- package/components/form-core/translations/de-DE.js +0 -1
- package/components/form-core/translations/en-AU.js +0 -1
- package/components/form-core/translations/en-GB.js +0 -1
- package/components/form-core/translations/en-US.js +0 -1
- package/components/form-core/translations/es-ES.js +0 -1
- package/components/form-core/translations/fr-BE.js +0 -1
- package/components/form-core/translations/fr-FR.js +0 -1
- package/components/form-core/translations/hu-HU.js +0 -1
- package/components/form-core/translations/it-IT.js +0 -1
- package/components/form-core/translations/nl-BE.js +0 -1
- package/components/form-core/translations/nl-NL.js +0 -1
- package/components/form-core/translations/pl-PL.js +0 -1
- package/components/form-core/translations/ro-RO.js +0 -1
- package/components/form-core/translations/ru-RU.js +0 -1
- package/components/form-core/translations/sk-SK.js +0 -1
- package/components/form-core/translations/tr-TR.js +0 -1
- package/components/form-core/translations/uk-UA.js +0 -1
- package/components/form-integrations/test/dialog-integrations.test.js +1 -4
- package/components/form-integrations/test/form-group-methods.test.js +28 -31
- package/components/form-integrations/test/form-integrations.test.js +27 -28
- package/components/form-integrations/test/form-validation-integrations.test.js +21 -29
- package/components/form-integrations/test/helpers/umbrella-form.js +3 -5
- package/components/form-integrations/test/model-value-consistency.test.js +75 -77
- package/components/form-integrations/test/model-value-event.test.js +10 -20
- package/components/helpers/src/SbActionLogger.js +13 -17
- package/components/helpers/src/SbLocaleSwitcher.js +5 -5
- package/components/helpers/src/sortEachDepth.js +0 -2
- package/components/helpers/test/renderLitAsNode.test.js +0 -4
- package/components/helpers/test/sb-action-logger.test.js +24 -55
- package/components/icon/src/IconManager.js +0 -2
- package/components/icon/src/LionIcon.js +2 -7
- package/components/icon/src/icons.js +0 -2
- package/components/icon/test/IconManager.test.js +0 -15
- package/components/icon/test/hammer.svg.js +3 -4
- package/components/icon/test/heart.svg.js +3 -4
- package/components/icon/test/lion-icon.test.js +14 -43
- package/components/input/src/LionInput.js +2 -8
- package/components/input/test/input-integrations.test.js +0 -5
- package/components/input/test/lion-input-integrations.test.js +0 -4
- package/components/input/test/lion-input.test.js +28 -58
- package/components/input/test-helpers/getInputMembers.js +2 -2
- package/components/input-amount/src/LionInputAmount.js +20 -20
- package/components/input-amount/src/formatters.js +0 -3
- package/components/input-amount/src/parsers.js +0 -3
- package/components/input-amount/test/formatters.test.js +24 -16
- package/components/input-amount/test/lion-input-amount-integrations.test.js +0 -4
- package/components/input-amount/test/lion-input-amount.test.js +123 -147
- package/components/input-amount/test/parsers.test.js +33 -17
- package/components/input-amount/test/preprocessors.test.js +0 -3
- package/components/input-amount-dropdown/src/LionInputAmountDropdown.js +49 -59
- package/components/input-amount-dropdown/src/currencyUtil.js +8 -7
- package/components/input-amount-dropdown/src/parsers.js +0 -1
- package/components/input-amount-dropdown/src/validators.js +0 -1
- package/components/input-amount-dropdown/test/LionInputAmountDropdown.test.js +34 -36
- package/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.js +18 -13
- package/components/input-amount-dropdown/test-helpers/mimicUserChangingDropdown.js +5 -1
- package/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.js +132 -107
- package/components/input-date/src/LionInputDate.js +4 -3
- package/components/input-date/test/lion-input-date-integrations.test.js +0 -3
- package/components/input-date/test/lion-input-date.test.js +19 -32
- package/components/input-datepicker/src/LionInputDatepicker.js +17 -29
- package/components/input-datepicker/src/localizeNamespaceLoader.js +1 -2
- package/components/input-datepicker/test/lion-input-datepicker-integrations.test.js +0 -3
- package/components/input-datepicker/test/lion-input-datepicker.test.js +88 -153
- package/components/input-datepicker/test-helpers/DatepickerInputObject.js +9 -12
- package/components/input-datepicker/test-suites/LionInputDatepicker.suite.js +6 -4
- package/components/input-datepicker/translations/bg-BG.js +0 -1
- package/components/input-datepicker/translations/cs-CZ.js +0 -1
- package/components/input-datepicker/translations/de-DE.js +0 -1
- package/components/input-datepicker/translations/en-AU.js +0 -1
- package/components/input-datepicker/translations/en-GB.js +0 -1
- package/components/input-datepicker/translations/en-US.js +0 -1
- package/components/input-datepicker/translations/es-ES.js +0 -1
- package/components/input-datepicker/translations/fr-BE.js +0 -1
- package/components/input-datepicker/translations/fr-FR.js +0 -1
- package/components/input-datepicker/translations/hu-HU.js +0 -1
- package/components/input-datepicker/translations/it-IT.js +0 -1
- package/components/input-datepicker/translations/nl-BE.js +0 -1
- package/components/input-datepicker/translations/nl-NL.js +0 -1
- package/components/input-datepicker/translations/pl-PL.js +0 -1
- package/components/input-datepicker/translations/ro-RO.js +0 -1
- package/components/input-datepicker/translations/ru-RU.js +0 -1
- package/components/input-datepicker/translations/sk-SK.js +0 -1
- package/components/input-datepicker/translations/tr-TR.js +0 -1
- package/components/input-datepicker/translations/uk-UA.js +0 -1
- package/components/input-email/test/lion-input-email-integrations.test.js +0 -2
- package/components/input-email/test/lion-input-email.test.js +1 -7
- package/components/input-file/src/FileHandle.js +0 -3
- package/components/input-file/src/LionInputFile.js +85 -83
- package/components/input-file/src/LionSelectedFileList.js +12 -12
- package/components/input-file/src/validators.js +10 -9
- package/components/input-file/test/FileValidators.test.js +170 -80
- package/components/input-file/test/lion-input-file.test.js +160 -244
- package/components/input-file/test/lion-selected-file-list.test.js +13 -22
- package/components/input-file/translations/bg-BG.js +0 -1
- package/components/input-file/translations/cs-CZ.js +0 -1
- package/components/input-file/translations/de-DE.js +0 -1
- package/components/input-file/translations/en-AU.js +0 -1
- package/components/input-file/translations/en-GB.js +0 -1
- package/components/input-file/translations/en-PH.js +0 -1
- package/components/input-file/translations/en-US.js +0 -1
- package/components/input-file/translations/en.js +2 -1
- package/components/input-file/translations/es-ES.js +0 -1
- package/components/input-file/translations/fr-BE.js +0 -1
- package/components/input-file/translations/fr-FR.js +0 -1
- package/components/input-file/translations/hu-HU.js +0 -1
- package/components/input-file/translations/id-ID.js +0 -1
- package/components/input-file/translations/id.js +2 -1
- package/components/input-file/translations/it-IT.js +0 -1
- package/components/input-file/translations/nl-BE.js +0 -1
- package/components/input-file/translations/nl-NL.js +0 -1
- package/components/input-file/translations/pl-PL.js +0 -1
- package/components/input-file/translations/ro-RO.js +0 -1
- package/components/input-file/translations/ru-RU.js +0 -1
- package/components/input-file/translations/sk-SK.js +0 -1
- package/components/input-file/translations/uk-UA.js +0 -1
- package/components/input-file/translations/zh-CN.js +0 -1
- package/components/input-iban/src/validators.js +6 -11
- package/components/input-iban/test/formatters.test.js +0 -3
- package/components/input-iban/test/lion-input-iban-integrations.test.js +0 -2
- package/components/input-iban/test/lion-input-iban.test.js +1 -9
- package/components/input-iban/test/parsers.test.js +0 -2
- package/components/input-iban/test/validators.test.js +0 -12
- package/components/input-iban/translations/bg-BG.js +0 -1
- package/components/input-iban/translations/cs-CZ.js +0 -1
- package/components/input-iban/translations/de-DE.js +0 -1
- package/components/input-iban/translations/en-AU.js +0 -1
- package/components/input-iban/translations/en-GB.js +0 -1
- package/components/input-iban/translations/en-US.js +0 -1
- package/components/input-iban/translations/es-ES.js +0 -1
- package/components/input-iban/translations/fr-BE.js +0 -1
- package/components/input-iban/translations/fr-FR.js +0 -1
- package/components/input-iban/translations/hu-HU.js +0 -1
- package/components/input-iban/translations/it-IT.js +0 -1
- package/components/input-iban/translations/nl-BE.js +0 -1
- package/components/input-iban/translations/nl-NL.js +0 -1
- package/components/input-iban/translations/pl-PL.js +0 -1
- package/components/input-iban/translations/ro-RO.js +0 -1
- package/components/input-iban/translations/ru-RU.js +0 -1
- package/components/input-iban/translations/sk-SK.js +0 -1
- package/components/input-iban/translations/uk-UA.js +0 -1
- package/components/input-range/src/LionInputRange.js +18 -19
- package/components/input-range/test/lion-input-range.test.js +23 -48
- package/components/input-range/translations/bg-BG.js +0 -1
- package/components/input-range/translations/cs-CZ.js +0 -1
- package/components/input-range/translations/de-DE.js +0 -1
- package/components/input-range/translations/en-AU.js +0 -1
- package/components/input-range/translations/en-GB.js +0 -1
- package/components/input-range/translations/en-PH.js +0 -1
- package/components/input-range/translations/en-US.js +0 -1
- package/components/input-range/translations/es-ES.js +0 -1
- package/components/input-range/translations/fr-BE.js +0 -1
- package/components/input-range/translations/fr-FR.js +0 -1
- package/components/input-range/translations/hu-HU.js +0 -1
- package/components/input-range/translations/it-IT.js +0 -1
- package/components/input-range/translations/nl-BE.js +0 -1
- package/components/input-range/translations/nl-NL.js +0 -1
- package/components/input-range/translations/pl-PL.js +0 -1
- package/components/input-range/translations/ro-RO.js +0 -1
- package/components/input-range/translations/ru-RU.js +0 -1
- package/components/input-range/translations/sk-SK.js +0 -1
- package/components/input-range/translations/uk-UA.js +0 -1
- package/components/input-range/translations/zh-CN.js +0 -1
- package/components/input-stepper/src/LionInputStepper.js +19 -38
- package/components/input-stepper/test/lion-input-stepper-integrations.test.js +0 -1
- package/components/input-stepper/test/lion-input-stepper.test.js +0 -1
- package/components/input-stepper/test-suites/lion-input-stepper.integration.suite.js +0 -2
- package/components/input-stepper/test-suites/lion-input-stepper.suite.js +56 -105
- package/components/input-stepper/translations/bg-BG.js +0 -1
- package/components/input-stepper/translations/cs-CZ.js +0 -1
- package/components/input-stepper/translations/de-DE.js +0 -1
- package/components/input-stepper/translations/en-AU.js +0 -1
- package/components/input-stepper/translations/en-GB.js +0 -1
- package/components/input-stepper/translations/en-US.js +0 -1
- package/components/input-stepper/translations/es-ES.js +0 -1
- package/components/input-stepper/translations/fr-BE.js +0 -1
- package/components/input-stepper/translations/fr-FR.js +0 -1
- package/components/input-stepper/translations/hu-HU.js +0 -1
- package/components/input-stepper/translations/it-IT.js +0 -1
- package/components/input-stepper/translations/nl-BE.js +0 -1
- package/components/input-stepper/translations/nl-NL.js +0 -1
- package/components/input-stepper/translations/pl-PL.js +0 -1
- package/components/input-stepper/translations/ro-RO.js +0 -1
- package/components/input-stepper/translations/ru-RU.js +0 -1
- package/components/input-stepper/translations/sk-SK.js +0 -1
- package/components/input-stepper/translations/uk-UA.js +0 -1
- package/components/input-tel/src/LionInputTel.js +53 -37
- package/components/input-tel/src/PhoneUtilManager.js +6 -4
- package/components/input-tel/src/formatters.js +12 -10
- package/components/input-tel/src/parsers.js +3 -3
- package/components/input-tel/src/preprocessors.js +15 -7
- package/components/input-tel/src/validators.js +4 -6
- package/components/input-tel/test/LionInputTel.test.js +4 -2
- package/components/input-tel/test/formatters.test.js +22 -10
- package/components/input-tel/test/parsers.test.js +40 -11
- package/components/input-tel/test/preprocessors.test.js +24 -13
- package/components/input-tel/test/validators.test.js +7 -14
- package/components/input-tel/test-helpers/mockPhoneUtilManager.js +7 -6
- package/components/input-tel/test-suites/LionInputTel.suite.js +33 -73
- package/components/input-tel/translations/bg-BG.js +0 -1
- package/components/input-tel/translations/cs-CZ.js +0 -1
- package/components/input-tel/translations/de-DE.js +0 -1
- package/components/input-tel/translations/en-AU.js +0 -1
- package/components/input-tel/translations/en-GB.js +0 -1
- package/components/input-tel/translations/en-US.js +0 -1
- package/components/input-tel/translations/es-ES.js +0 -1
- package/components/input-tel/translations/fr-BE.js +0 -1
- package/components/input-tel/translations/fr-FR.js +0 -1
- package/components/input-tel/translations/hu-HU.js +0 -1
- package/components/input-tel/translations/it-IT.js +0 -1
- package/components/input-tel/translations/nl-BE.js +0 -1
- package/components/input-tel/translations/nl-NL.js +0 -1
- package/components/input-tel/translations/pl-PL.js +0 -1
- package/components/input-tel/translations/ro-RO.js +0 -1
- package/components/input-tel/translations/ru-RU.js +0 -1
- package/components/input-tel/translations/sk-SK.js +0 -1
- package/components/input-tel/translations/uk-UA.js +0 -1
- package/components/input-tel-dropdown/src/LionInputTelDropdown.js +10 -28
- package/components/input-tel-dropdown/src/regionCodeToLocale.js +3 -1
- package/components/input-tel-dropdown/test/LionInputTelDropdown.test.js +31 -38
- package/components/input-tel-dropdown/test/regionCodeToLocale.test.js +0 -1
- package/components/input-tel-dropdown/test-helpers/mimicUserChangingDropdown.js +5 -1
- package/components/input-tel-dropdown/test-suites/LionInputTelDropdown--parentheses.suite.js +16 -11
- package/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.js +54 -79
- package/components/listbox/src/LionListbox.js +4 -1
- package/components/listbox/src/LionOption.js +8 -7
- package/components/listbox/src/LionOptions.js +0 -3
- package/components/listbox/src/ListboxMixin.js +786 -820
- package/components/listbox/test/lion-listbox.test.js +0 -1
- package/components/listbox/test/lion-option.test.js +53 -64
- package/components/listbox/test/lion-options.test.js +3 -4
- package/components/listbox/test-helpers/getListboxMembers.js +6 -3
- package/components/listbox/test-suites/ListboxMixin.suite.js +101 -261
- package/components/localize/src/LocalizeManager.js +40 -40
- package/components/localize/src/LocalizeMixin.js +130 -157
- package/components/localize/src/date/formatDate.js +1 -5
- package/components/localize/src/date/getDateFormatBasedOnLocale.js +5 -3
- package/components/localize/src/date/getMonthNames.js +3 -5
- package/components/localize/src/date/getWeekdayNames.js +1 -5
- package/components/localize/src/date/parseDate.js +5 -20
- package/components/localize/src/date/utils/normalizeIntlDate.js +0 -7
- package/components/localize/src/getLocalizeManager.js +0 -3
- package/components/localize/src/number/formatNumber.js +3 -7
- package/components/localize/src/number/formatNumberToParts.js +52 -18
- package/components/localize/src/number/getCurrencyName.js +5 -5
- package/components/localize/src/number/getFractionDigits.js +4 -4
- package/components/localize/src/number/getSeparatorsFromNumber.js +1 -3
- package/components/localize/src/number/parseNumber.js +0 -3
- package/components/localize/src/number/utils/normalize-format-number-to-parts/forceAddGroupSeparators.js +0 -1
- package/components/localize/src/number/utils/normalize-format-number-to-parts/forceSpaceBetweenCurrencyCodeAndNumber.js +4 -1
- package/components/localize/test/LocalizeManager.test.js +385 -278
- package/components/localize/test/LocalizeMixin.test.js +28 -112
- package/components/localize/test/date/formatDate.test.js +18 -48
- package/components/localize/test/date/getDateFormatBasedOnLocale.test.js +0 -3
- package/components/localize/test/date/getMonthNames.test.js +27 -12
- package/components/localize/test/date/getWeekdayNames.test.js +93 -49
- package/components/localize/test/date/normalizeDateTime.test.js +0 -2
- package/components/localize/test/date/parseDate.test.js +12 -16
- package/components/localize/test/getLocalizeManager.test.js +0 -3
- package/components/localize/test/isLocalizeESModule.test.js +32 -13
- package/components/localize/test/localize.test.js +0 -4
- package/components/localize/test/number/formatNumber.test.js +215 -106
- package/components/localize/test/number/formatNumberToParts.test.js +31 -38
- package/components/localize/test/number/getCurrencyName.test.js +20 -6
- package/components/localize/test/number/getDecimalSeparator.test.js +5 -4
- package/components/localize/test/number/getFractionDigits.test.js +0 -2
- package/components/localize/test/number/getGroupSeparator.test.js +0 -2
- package/components/localize/test/number/getSeparatorsFromNumber.test.js +5 -3
- package/components/localize/test/number/parseNumber.test.js +123 -56
- package/components/localize/test/side-effect-free-entrypoint.test.js +0 -6
- package/components/localize/test-helpers/fake-imports.js +11 -6
- package/components/localize/test-helpers/localizeTearDown.js +0 -1
- package/components/menu/src/InteractiveListMixin.js +637 -638
- package/components/menu/src/LionMenu.js +46 -59
- package/components/menu/src/MoreButtonMenuMixin.js +215 -238
- package/components/menu/src/MultiLevelListMixin.js +240 -246
- package/components/menu/src/utils/isInView.js +0 -1
- package/components/menu/src/utils/listItemInteractions.js +4 -4
- package/components/menu/test/InteractiveListMixin.test.js +0 -1
- package/components/menu/test/MoreButtonMenuMixin.test.js +3 -2
- package/components/menu/test/MultiLevelListMixin.test.js +0 -1
- package/components/menu/test/lion-menu-interactions.test.js +0 -1
- package/components/menu/test/lion-menu.test.js +6 -2
- package/components/menu/test-helpers/mimicKeyPress.js +12 -2
- package/components/menu/test-suites/InteractiveListMixin.suite.js +4 -43
- package/components/menu/test-suites/LionMenu.suite.js +1 -8
- package/components/menu/test-suites/LionMenuInteractions.suite.js +22 -44
- package/components/menu/test-suites/MoreButtonMenuMixin.suite.js +34 -41
- package/components/menu/test-suites/MultiLevelListMixin.suite.js +5 -23
- package/components/overlays/src/ArrowMixin.js +111 -127
- package/components/overlays/src/OverlayController.js +166 -151
- package/components/overlays/src/OverlayMixin.js +61 -63
- package/components/overlays/src/OverlaysManager.js +30 -32
- package/components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.js +0 -1
- package/components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js +11 -11
- package/components/overlays/src/configurations/withBottomSheetConfig.js +12 -13
- package/components/overlays/src/configurations/withDropdownConfig.js +4 -2
- package/components/overlays/src/configurations/withModalDialogConfig.js +12 -13
- package/components/overlays/src/configurations/withPopoverConfig.js +27 -25
- package/components/overlays/src/configurations/withTooltipConfig.js +15 -13
- package/components/overlays/src/overlayDocumentStyle.js +1 -1
- package/components/overlays/src/overlayShadowDomStyle.js +0 -1
- package/components/overlays/src/singleton.js +0 -2
- package/components/overlays/src/utils/adopt-styles.js +18 -18
- package/components/overlays/src/utils/deep-contains.js +7 -6
- package/components/overlays/src/utils/get-focusable-elements.js +7 -10
- package/components/overlays/src/utils/inert-siblings.js +2 -4
- package/components/overlays/src/utils/is-equal-config.js +2 -3
- package/components/overlays/src/utils/is-visible.js +0 -1
- package/components/overlays/src/utils/simulate-tab.js +1 -4
- package/components/overlays/src/utils/sort-by-tabindex.js +2 -4
- package/components/overlays/test/ArrowMixin.test.js +18 -30
- package/components/overlays/test/OverlayController.test.js +375 -555
- package/components/overlays/test/OverlayMixin.test.js +0 -2
- package/components/overlays/test/OverlaysManager.test.js +30 -35
- package/components/overlays/test/global-positioning.test.js +6 -10
- package/components/overlays/test/local-positioning.test.js +101 -103
- package/components/overlays/test/utils-tests/active-element.test.js +12 -27
- package/components/overlays/test/utils-tests/adopt-styles.test.js +25 -56
- package/components/overlays/test/utils-tests/deep-contains.test.js +73 -74
- package/components/overlays/test/utils-tests/get-focusable-elements.test.js +6 -23
- package/components/overlays/test/utils-tests/is-equal-config.test.js +32 -13
- package/components/overlays/test/utils-tests/visibility.test.js +44 -79
- package/components/overlays/test-helpers/createShadowHost.js +5 -3
- package/components/overlays/test-helpers/normalizeTransformStyle.js +2 -4
- package/components/overlays/test-suites/OverlayMixin.suite.js +152 -181
- package/components/overlays/test-suites/WithHoverInteraction.suite.js +96 -79
- package/components/overlays/translations/bg-BG.js +0 -1
- package/components/overlays/translations/cs-CZ.js +0 -1
- package/components/overlays/translations/de-DE.js +0 -1
- package/components/overlays/translations/en-AU.js +0 -1
- package/components/overlays/translations/en-GB.js +0 -1
- package/components/overlays/translations/en-US.js +0 -1
- package/components/overlays/translations/es-ES.js +0 -1
- package/components/overlays/translations/fr-BE.js +0 -1
- package/components/overlays/translations/fr-FR.js +0 -1
- package/components/overlays/translations/hu-HU.js +0 -1
- package/components/overlays/translations/it-IT.js +0 -1
- package/components/overlays/translations/nl-BE.js +0 -1
- package/components/overlays/translations/nl-NL.js +0 -1
- package/components/overlays/translations/pl-PL.js +0 -1
- package/components/overlays/translations/ro-RO.js +0 -1
- package/components/overlays/translations/ru-RU.js +0 -1
- package/components/overlays/translations/sk-SK.js +0 -1
- package/components/overlays/translations/tr-TR.js +0 -1
- package/components/overlays/translations/uk-UA.js +0 -1
- package/components/pagination/src/LionPagination.js +9 -12
- package/components/pagination/test/lion-pagination.test.js +18 -50
- package/components/progress-indicator/src/LionProgressIndicator.js +10 -12
- package/components/progress-indicator/test/lion-progress-indicator.test.js +1 -22
- package/components/radio-group/src/LionRadioGroup.js +1 -2
- package/components/radio-group/test/lion-radio-group-integrations.test.js +0 -1
- package/components/radio-group/test/lion-radio-group.test.js +27 -27
- package/components/radio-group/test/lion-radio-integrations.test.js +3 -2
- package/components/radio-group/test/lion-radio.test.js +30 -16
- package/components/select/src/LionSelect.js +12 -13
- package/components/select/test/lion-select.test.js +7 -12
- package/components/select-rich/src/LionSelectInvoker.js +18 -11
- package/components/select-rich/src/LionSelectRich.js +20 -43
- package/components/select-rich/test/demos.screenshots-test.js +40 -9
- package/components/select-rich/test/lion-select-invoker.test.js +26 -43
- package/components/select-rich/test/lion-select-listbox-suite-integration.test.js +3 -3
- package/components/select-rich/test/lion-select-rich-dialog-integration.test.js +4 -9
- package/components/select-rich/test/lion-select-rich-interaction.test.js +116 -116
- package/components/select-rich/test/lion-select-rich-upgrade.test.js +3 -7
- package/components/select-rich/test/lion-select-rich.test.js +153 -195
- package/components/select-rich/test-helpers/getSelectRichMembers.js +4 -1
- package/components/steps/src/LionStep.js +21 -12
- package/components/steps/src/LionSteps.js +25 -25
- package/components/steps/test/lion-step.test.js +18 -25
- package/components/steps/test/lion-steps.test.js +45 -78
- package/components/switch/src/LionSwitch.js +2 -7
- package/components/switch/src/LionSwitchButton.js +5 -6
- package/components/switch/test/lion-switch-button.test.js +16 -28
- package/components/switch/test/lion-switch.test.js +17 -31
- package/components/tabs/src/LionTabs.js +25 -28
- package/components/tabs/test/lion-tabs.test.js +156 -154
- package/components/textarea/src/LionTextarea.js +4 -23
- package/components/textarea/test/lion-textarea-integrations.test.js +0 -5
- package/components/textarea/test/lion-textarea.test.js +2 -28
- package/components/tooltip/src/LionTooltip.js +6 -6
- package/components/tooltip/test/lion-tooltip.test.js +75 -102
- package/components/validate-messages/src/getLocalizedMessage.js +8 -7
- package/components/validate-messages/src/loadDefaultFeedbackMessages.js +3 -1
- package/components/validate-messages/src/loadDefaultFeedbackMessagesNoSideEffects.js +9 -5
- package/components/validate-messages/src/per-entrypoint/loadComboboxMessagesNoSideEffects.js +5 -2
- package/components/validate-messages/src/per-entrypoint/loadFormCoreMessagesNoSideEffects.js +99 -35
- package/components/validate-messages/src/per-entrypoint/loadInputTelMessagesNoSideEffects.js +4 -3
- package/components/validate-messages/test/loadDefaultFeedbackMessages.test.js +5 -3
- package/components/validate-messages/test/loadDefaultFeedbackMessagesNoSideEffects.test.js +80 -45
- package/components/validate-messages/translations/bg-BG.js +0 -1
- package/components/validate-messages/translations/cs-CZ.js +0 -1
- package/components/validate-messages/translations/de-DE.js +0 -1
- package/components/validate-messages/translations/en-AU.js +0 -1
- package/components/validate-messages/translations/en-GB.js +0 -1
- package/components/validate-messages/translations/en-PH.js +0 -1
- package/components/validate-messages/translations/en-US.js +0 -1
- package/components/validate-messages/translations/es-ES.js +0 -1
- package/components/validate-messages/translations/fr-BE.js +0 -1
- package/components/validate-messages/translations/fr-FR.js +0 -1
- package/components/validate-messages/translations/hu-HU.js +0 -1
- package/components/validate-messages/translations/it-IT.js +0 -1
- package/components/validate-messages/translations/nl-BE.js +0 -1
- package/components/validate-messages/translations/nl-NL.js +0 -1
- package/components/validate-messages/translations/pl-PL.js +0 -1
- package/components/validate-messages/translations/ro-RO.js +0 -1
- package/components/validate-messages/translations/ru-RU.js +0 -1
- package/components/validate-messages/translations/sk-SK.js +0 -1
- package/components/validate-messages/translations/tr-TR.js +0 -1
- package/components/validate-messages/translations/uk-UA.js +0 -1
- package/custom-elements.json +191 -56
- package/dist-types/components/core/src/SlotMixin.d.ts +6 -1
- package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
- package/dist-types/components/core/types/SlotMixinTypes.d.ts +5 -1
- package/dist-types/components/core/types/SlotMixinTypes.d.ts.map +1 -1
- package/dist-types/components/form-core/src/LionField.d.ts +3 -1
- package/dist-types/components/form-core/src/LionField.d.ts.map +1 -1
- package/dist-types/components/input-tel/src/LionInputTel.d.ts +6 -6
- package/dist-types/components/input-tel/src/LionInputTel.d.ts.map +1 -1
- package/dist-types/components/input-tel/src/PhoneUtilManager.d.ts +2 -2
- package/dist-types/components/input-tel/src/PhoneUtilManager.d.ts.map +1 -1
- package/dist-types/components/input-tel/src/formatters.d.ts +2 -2
- package/dist-types/components/input-tel/src/formatters.d.ts.map +1 -1
- package/dist-types/components/input-tel/src/preprocessors.d.ts +2 -2
- package/dist-types/components/input-tel/src/preprocessors.d.ts.map +1 -1
- package/dist-types/components/input-tel/test/validators.test.d.ts +1 -1
- package/dist-types/components/input-tel/test/validators.test.d.ts.map +1 -1
- package/dist-types/components/listbox/src/LionOption.d.ts +5 -2
- package/dist-types/components/listbox/src/LionOption.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlaysManager.d.ts.map +1 -1
- package/dist-types/components/overlays/src/overlayDocumentStyle.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts +3 -1
- package/dist-types/components/select-rich/src/LionSelectInvoker.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/accordion/overview.md +2 -2
- package/docs/components/accordion/reference.md +2 -2
- package/docs/components/accordion/use-cases.md +2 -2
- package/docs/components/button/examples.md +2 -2
- package/docs/components/button/extensions.md +2 -2
- package/docs/components/button/overview.md +2 -2
- package/docs/components/button/use-cases.md +2 -2
- package/docs/components/calendar/overview.md +2 -2
- package/docs/components/calendar/use-cases.md +2 -2
- package/docs/components/checkbox-group/overview.md +4 -4
- package/docs/components/checkbox-group/use-cases.md +2 -2
- package/docs/components/collapsible/examples.md +2 -2
- package/docs/components/collapsible/overview.md +3 -3
- package/docs/components/collapsible/use-cases.md +2 -2
- package/docs/components/combobox/extensions.md +2 -2
- package/docs/components/combobox/overview.md +3 -3
- package/docs/components/combobox/use-cases.md +3 -3
- package/docs/components/dialog/overview.md +3 -3
- package/docs/components/dialog/use-cases.md +2 -2
- package/docs/components/drawer/overview.md +2 -2
- package/docs/components/drawer/use-cases.md +2 -2
- package/docs/components/fieldset/overview.md +7 -7
- package/docs/components/fieldset/use-cases.md +2 -2
- package/docs/components/form/overview.md +5 -5
- package/docs/components/form/use-cases.md +4 -4
- package/docs/components/icon/overview.md +2 -2
- package/docs/components/icon/use-cases.md +3 -3
- package/docs/components/input/overview.md +3 -3
- package/docs/components/input/use-cases.md +2 -2
- package/docs/components/input-amount/overview.md +5 -5
- package/docs/components/input-amount/use-cases.md +2 -2
- package/docs/components/input-amount-dropdown/use-cases.md +2 -2
- package/docs/components/input-date/overview.md +5 -5
- package/docs/components/input-date/use-cases.md +2 -2
- package/docs/components/input-datepicker/overview.md +7 -7
- package/docs/components/input-datepicker/use-cases.md +2 -2
- package/docs/components/input-email/overview.md +4 -4
- package/docs/components/input-email/use-cases.md +2 -2
- package/docs/components/input-file/overview.md +3 -3
- package/docs/components/input-file/use-cases.md +2 -2
- package/docs/components/input-iban/overview.md +4 -4
- package/docs/components/input-iban/use-cases.md +2 -2
- package/docs/components/input-range/overview.md +4 -4
- package/docs/components/input-range/use-cases.md +2 -2
- package/docs/components/input-stepper/overview.md +3 -3
- package/docs/components/input-stepper/use-cases.md +2 -2
- package/docs/components/input-tel/overview.md +3 -3
- package/docs/components/input-tel/use-cases.md +8 -8
- package/docs/components/input-tel-dropdown/extensions.md +2 -2
- package/docs/components/input-tel-dropdown/overview.md +3 -3
- package/docs/components/input-tel-dropdown/use-cases.md +2 -2
- package/docs/components/listbox/overview.md +2 -2
- package/docs/components/listbox/use-cases.md +3 -3
- package/docs/components/menu/extensions.md +2 -2
- package/docs/components/menu/migration.md +2 -2
- package/docs/components/menu/overview.md +2 -2
- package/docs/components/menu/use-cases.md +1 -1
- package/docs/components/pagination/overview.md +2 -2
- package/docs/components/pagination/use-cases.md +2 -2
- package/docs/components/progress-indicator/examples.md +2 -2
- package/docs/components/progress-indicator/overview.md +2 -2
- package/docs/components/radio-group/overview.md +5 -5
- package/docs/components/radio-group/use-cases.md +2 -2
- package/docs/components/select/overview.md +2 -2
- package/docs/components/select/use-cases.md +3 -3
- package/docs/components/select-rich/examples.md +2 -2
- package/docs/components/select-rich/overview.md +2 -2
- package/docs/components/select-rich/use-cases.md +4 -4
- package/docs/components/steps/overview.md +2 -2
- package/docs/components/steps/use-cases.md +2 -2
- package/docs/components/switch/overview.md +2 -2
- package/docs/components/switch/reference.md +2 -2
- package/docs/components/switch/use-cases.md +2 -2
- package/docs/components/tabs/examples.md +3 -3
- package/docs/components/tabs/overview.md +2 -2
- package/docs/components/tabs/use-cases.md +2 -2
- package/docs/components/textarea/overview.md +2 -2
- package/docs/components/textarea/use-cases.md +2 -2
- package/docs/components/tooltip/examples.md +2 -2
- package/docs/components/tooltip/overview.md +2 -2
- package/docs/components/tooltip/use-cases.md +2 -2
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/babel-plugin-extend-docs/index.md +2 -2
- package/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md +2 -2
- package/docs/fundamentals/node-tools/providence-analytics/index.md +2 -2
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +2 -2
- package/docs/fundamentals/node-tools/publish-docs/index.md +2 -2
- package/docs/fundamentals/node-tools/publish-docs/overview.md +5 -5
- package/docs/fundamentals/node-tools/remark-extend/index.md +2 -2
- package/docs/fundamentals/node-tools/remark-extend/overview.md +2 -2
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/index.md +2 -2
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +4 -4
- package/docs/fundamentals/rationales/TypeScript.md +62 -2
- package/docs/fundamentals/rationales/accessibility.md +5 -5
- package/docs/fundamentals/rationales/side-effects.md +2 -2
- package/docs/fundamentals/rationales/versioning.md +2 -2
- package/docs/fundamentals/systems/core/SlotMixin.md +3 -3
- package/docs/fundamentals/systems/core/index.md +2 -2
- package/docs/fundamentals/systems/core/overview.md +3 -3
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +6 -6
- package/docs/fundamentals/systems/form/index.md +2 -2
- package/docs/fundamentals/systems/form/interaction-states.md +2 -2
- package/docs/fundamentals/systems/form/model-value.md +3 -3
- package/docs/fundamentals/systems/form/overview.md +30 -30
- package/docs/fundamentals/systems/form/styling.md +2 -2
- package/docs/fundamentals/systems/form/use-cases.md +2 -2
- package/docs/fundamentals/systems/form/validate.md +4 -4
- package/docs/fundamentals/systems/icon/index.md +2 -2
- package/docs/fundamentals/systems/icon/overview.md +2 -2
- package/docs/fundamentals/systems/localize/dates.md +2 -2
- package/docs/fundamentals/systems/localize/index.md +2 -2
- package/docs/fundamentals/systems/localize/numbers.md +2 -2
- package/docs/fundamentals/systems/localize/overview.md +6 -6
- package/docs/fundamentals/systems/localize/rationale.md +2 -2
- package/docs/fundamentals/systems/localize/text.md +2 -2
- package/docs/fundamentals/systems/localize/use-cases.md +2 -2
- package/docs/fundamentals/systems/overlays/_edge-cases.md +2 -2
- package/docs/fundamentals/systems/overlays/configuration.md +4 -4
- package/docs/fundamentals/systems/overlays/index.md +2 -2
- package/docs/fundamentals/systems/overlays/overview.md +7 -7
- package/docs/fundamentals/systems/overlays/rationale.md +2 -2
- package/docs/fundamentals/systems/overlays/use-cases.md +4 -4
- package/docs/fundamentals/tools/ajax/index.md +2 -2
- package/docs/fundamentals/tools/ajax/overview.md +2 -2
- package/docs/fundamentals/tools/ajax/use-cases.md +2 -2
- package/docs/fundamentals/tools/helpers/action-logger.md +2 -2
- package/docs/fundamentals/tools/helpers/index.md +2 -2
- package/docs/fundamentals/tools/helpers/overview.md +3 -3
- package/docs/fundamentals/tools/singleton-manager/example-complex/index.md +2 -2
- package/docs/fundamentals/tools/singleton-manager/example-fail/index.md +2 -2
- package/docs/fundamentals/tools/singleton-manager/example-success/index.md +2 -2
- package/docs/fundamentals/tools/singleton-manager/index.md +2 -2
- package/docs/fundamentals/tools/singleton-manager/overview.md +6 -6
- package/docs/guides/how-to/create-a-custom-field.md +7 -7
- package/docs/guides/how-to/create-a-form.md +6 -6
- package/docs/guides/how-to/extend-a-native-input.md +4 -4
- package/docs/guides/how-to/get-started.md +2 -2
- package/docs/guides/how-to/index.md +1 -1
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/definitions-and-terms.md +2 -2
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/scoped-elements.md +2 -2
- package/docs/guides/principles/styling.md +3 -3
- package/docs/guides/principles/subclasser-apis.md +2 -2
- package/exports/define/lion-accordion.js +0 -1
- package/exports/define/lion-button-reset.js +0 -1
- package/exports/define/lion-button-submit.js +0 -1
- package/exports/define/lion-button.js +0 -1
- package/exports/define/lion-calendar.js +0 -1
- package/exports/define/lion-checkbox-group.js +0 -1
- package/exports/define/lion-checkbox-indeterminate.js +0 -1
- package/exports/define/lion-checkbox.js +0 -1
- package/exports/define/lion-collapsible.js +0 -1
- package/exports/define/lion-combobox.js +0 -1
- package/exports/define/lion-dialog.js +0 -1
- package/exports/define/lion-drawer.js +0 -1
- package/exports/define/lion-field.js +0 -1
- package/exports/define/lion-fieldset.js +0 -1
- package/exports/define/lion-form.js +0 -1
- package/exports/define/lion-icon.js +0 -1
- package/exports/define/lion-input-amount-dropdown.js +0 -1
- package/exports/define/lion-input-amount.js +0 -1
- package/exports/define/lion-input-date.js +0 -1
- package/exports/define/lion-input-datepicker.js +0 -1
- package/exports/define/lion-input-email.js +0 -1
- package/exports/define/lion-input-file.js +0 -1
- package/exports/define/lion-input-iban.js +0 -1
- package/exports/define/lion-input-range.js +0 -1
- package/exports/define/lion-input-stepper.js +0 -1
- package/exports/define/lion-input-tel-dropdown.js +0 -1
- package/exports/define/lion-input-tel.js +0 -1
- package/exports/define/lion-input.js +0 -1
- package/exports/define/lion-item.js +0 -1
- package/exports/define/lion-listbox.js +0 -1
- package/exports/define/lion-menu.js +0 -1
- package/exports/define/lion-menuitem.js +0 -1
- package/exports/define/lion-option.js +0 -1
- package/exports/define/lion-options.js +0 -1
- package/exports/define/lion-pagination.js +0 -1
- package/exports/define/lion-progress-indicator.js +0 -1
- package/exports/define/lion-radio-group.js +0 -1
- package/exports/define/lion-radio.js +0 -1
- package/exports/define/lion-select-invoker.js +0 -1
- package/exports/define/lion-select-rich.js +0 -1
- package/exports/define/lion-select.js +0 -1
- package/exports/define/lion-selected-file-list.js +0 -1
- package/exports/define/lion-step.js +0 -1
- package/exports/define/lion-steps.js +0 -1
- package/exports/define/lion-switch-button.js +0 -1
- package/exports/define/lion-switch.js +0 -1
- package/exports/define/lion-tabs.js +0 -1
- package/exports/define/lion-textarea.js +0 -1
- package/exports/define/lion-tooltip.js +0 -1
- package/exports/define/lion-validation-feedback.js +0 -1
- package/exports/define-helpers/sb-action-logger.js +0 -1
- package/exports/define-helpers/sb-locale-switcher.js +0 -1
- package/exports/form-core.js +0 -8
- package/exports/localize-no-side-effects.js +0 -1
- package/exports/localize.js +0 -2
- package/exports/overlays.js +0 -4
- package/generated/awesome-phonenumber/LICENSE +22 -0
- package/generated/awesome-phonenumber/LICENSE.closure-library +176 -0
- package/generated/awesome-phonenumber/LICENSE.libphonenumber +176 -0
- package/generated/awesome-phonenumber/checksums.json +6 -0
- package/generated/awesome-phonenumber/index-esm.mjs +817 -0
- package/generated/awesome-phonenumber/index.d.ts +227 -0
- package/generated/awesome-phonenumber/index.js +45 -0
- package/generated/awesome-phonenumber/lib/index.js +710 -0
- package/generated/awesome-phonenumber/package.json +9 -0
- package/generated/awesome-phonenumber/provenance.json +13 -0
- package/package.json +32 -10
- package/web-types.json +1 -1
- package/vendor/README.md +0 -61
- package/vendor/awesome-phonenumber-7.9.0-tlouisse.libphonenumber-9.0.41.tgz +0 -0
|
@@ -28,16 +28,17 @@ export function _addOverlayMixinPostProcessor(postProcessor) {
|
|
|
28
28
|
* @param {import('@open-wc/dedupe-mixin').Constructor<import('lit').LitElement>} superclass
|
|
29
29
|
*/
|
|
30
30
|
// @ts-ignore https://github.com/microsoft/TypeScript/issues/36821#issuecomment-588375051
|
|
31
|
-
export const OverlayMixinImplementation = superclass => {
|
|
31
|
+
export const OverlayMixinImplementation = (superclass) => {
|
|
32
32
|
class OverlayMixin extends superclass {
|
|
33
33
|
static get properties() {
|
|
34
34
|
return {
|
|
35
|
-
opened: {
|
|
35
|
+
opened: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
reflect: true,
|
|
38
|
+
},
|
|
36
39
|
};
|
|
37
40
|
}
|
|
38
|
-
|
|
39
41
|
#hasSetup = false;
|
|
40
|
-
|
|
41
42
|
constructor() {
|
|
42
43
|
super();
|
|
43
44
|
/**
|
|
@@ -59,9 +60,8 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
59
60
|
/** @type {EventListener} */
|
|
60
61
|
this.close = this.close.bind(this);
|
|
61
62
|
}
|
|
62
|
-
|
|
63
63
|
get config() {
|
|
64
|
-
return /** @type {OverlayConfig} */
|
|
64
|
+
return /** @type {OverlayConfig} */ this.__config;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/** @param {OverlayConfig} value */
|
|
@@ -88,7 +88,9 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
88
88
|
if (name === 'opened' && this.opened !== oldValue) {
|
|
89
89
|
this.dispatchEvent(
|
|
90
90
|
new CustomEvent('opened-changed', {
|
|
91
|
-
detail: {
|
|
91
|
+
detail: {
|
|
92
|
+
opened: this.opened,
|
|
93
|
+
},
|
|
92
94
|
}),
|
|
93
95
|
);
|
|
94
96
|
}
|
|
@@ -111,8 +113,10 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
111
113
|
referenceNode,
|
|
112
114
|
backdropNode,
|
|
113
115
|
contentWrapperNode,
|
|
114
|
-
...overlayConfig,
|
|
115
|
-
|
|
116
|
+
...overlayConfig,
|
|
117
|
+
// wc provided in the class as defaults
|
|
118
|
+
...this.config,
|
|
119
|
+
// user provided (e.g. in template)
|
|
116
120
|
popperConfig: {
|
|
117
121
|
...(overlayConfig.popperConfig || {}),
|
|
118
122
|
...(this.config?.popperConfig || {}),
|
|
@@ -143,7 +147,6 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
143
147
|
*/
|
|
144
148
|
updated(changedProperties) {
|
|
145
149
|
super.updated(changedProperties);
|
|
146
|
-
|
|
147
150
|
if (changedProperties.has('opened') && this._overlayCtrl && !this.__blockSyncToOverlayCtrl) {
|
|
148
151
|
this.__syncToOverlayController();
|
|
149
152
|
}
|
|
@@ -162,9 +165,10 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
162
165
|
/**
|
|
163
166
|
* @param {{ stopPropagation: () => void; }} ev
|
|
164
167
|
*/
|
|
165
|
-
this.__closeEventInContentNodeHandler = ev => {
|
|
168
|
+
this.__closeEventInContentNodeHandler = (ev) => {
|
|
166
169
|
ev.stopPropagation();
|
|
167
|
-
/** @type {OverlayController} */
|
|
170
|
+
/** @type {OverlayController} */
|
|
171
|
+
this._overlayCtrl.hide();
|
|
168
172
|
};
|
|
169
173
|
if (this._overlayContentNode) {
|
|
170
174
|
this._overlayContentNode.addEventListener(
|
|
@@ -184,14 +188,12 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
184
188
|
if (this._overlayContentNode) {
|
|
185
189
|
this._overlayContentNode.removeEventListener(
|
|
186
190
|
'close-overlay',
|
|
187
|
-
/** @type {EventListener} */
|
|
191
|
+
/** @type {EventListener} */ this.__closeEventInContentNodeHandler,
|
|
188
192
|
);
|
|
189
193
|
}
|
|
190
194
|
}
|
|
191
|
-
|
|
192
195
|
connectedCallback() {
|
|
193
196
|
super.connectedCallback();
|
|
194
|
-
|
|
195
197
|
this.updateComplete.then(() => {
|
|
196
198
|
if (!this.isConnected) return;
|
|
197
199
|
if (this.#hasSetup) return;
|
|
@@ -199,10 +201,8 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
199
201
|
this.#hasSetup = true;
|
|
200
202
|
});
|
|
201
203
|
}
|
|
202
|
-
|
|
203
204
|
async disconnectedCallback() {
|
|
204
205
|
super.disconnectedCallback();
|
|
205
|
-
|
|
206
206
|
if (await this._isPermanentlyDisconnected()) {
|
|
207
207
|
this._teardownOverlayCtrl();
|
|
208
208
|
this.#hasSetup = false;
|
|
@@ -214,7 +214,7 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
214
214
|
* @configure ReactiveElement
|
|
215
215
|
*/
|
|
216
216
|
// @ts-expect-error
|
|
217
|
-
static enabledWarnings = super.enabledWarnings?.filter(w => w !== 'change-in-update') || [];
|
|
217
|
+
static enabledWarnings = super.enabledWarnings?.filter((w) => w !== 'change-in-update') || [];
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* @overridable
|
|
@@ -223,28 +223,25 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
223
223
|
get _overlayReferenceNode() {
|
|
224
224
|
return undefined;
|
|
225
225
|
}
|
|
226
|
-
|
|
227
226
|
get _overlayBackdropNode() {
|
|
228
227
|
if (!this.__cachedOverlayBackdropNode) {
|
|
229
|
-
this.__cachedOverlayBackdropNode =
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
this.__cachedOverlayBackdropNode =
|
|
229
|
+
/** @type {HTMLElement | undefined} */
|
|
230
|
+
Array.from(this.children).find((child) => child.slot === 'backdrop');
|
|
232
231
|
}
|
|
233
232
|
return this.__cachedOverlayBackdropNode;
|
|
234
233
|
}
|
|
235
|
-
|
|
236
234
|
get _overlayContentNode() {
|
|
237
235
|
if (!this._cachedOverlayContentNode) {
|
|
238
236
|
this._cachedOverlayContentNode =
|
|
239
|
-
Array.from(this.children).find(child => child.slot === 'content') ||
|
|
237
|
+
Array.from(this.children).find((child) => child.slot === 'content') ||
|
|
240
238
|
this.config.contentNode;
|
|
241
239
|
}
|
|
242
|
-
return /** @type {HTMLElement} */
|
|
240
|
+
return /** @type {HTMLElement} */ this._cachedOverlayContentNode;
|
|
243
241
|
}
|
|
244
|
-
|
|
245
242
|
get _overlayContentWrapperNode() {
|
|
246
|
-
return /** @type {HTMLElement | undefined} */ (
|
|
247
|
-
|
|
243
|
+
return /** @type {HTMLElement | undefined} */ this.shadowRoot?.querySelector(
|
|
244
|
+
'#overlay-content-node-wrapper',
|
|
248
245
|
);
|
|
249
246
|
}
|
|
250
247
|
|
|
@@ -290,16 +287,14 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
290
287
|
* @returns {Element|null}
|
|
291
288
|
*/
|
|
292
289
|
_getInvokerNode() {
|
|
293
|
-
const ctor = /** @type {typeof OverlayMixin} */
|
|
294
|
-
|
|
295
|
-
const slottedNode = Array.from(this.children).find(child => child.slot === 'invoker');
|
|
290
|
+
const ctor = /** @type {typeof OverlayMixin} */ this.constructor;
|
|
291
|
+
const slottedNode = Array.from(this.children).find((child) => child.slot === 'invoker');
|
|
296
292
|
if (slottedNode) {
|
|
297
293
|
return ctor._getFocusableInvokerEl(slottedNode);
|
|
298
294
|
}
|
|
299
|
-
|
|
300
295
|
if (this.id) {
|
|
301
296
|
// Reference the invoker declaratively: `<button data-invoker for="my-menu">`
|
|
302
|
-
const root = /** @type {Document|ShadowRoot} */
|
|
297
|
+
const root = /** @type {Document|ShadowRoot} */ this.getRootNode();
|
|
303
298
|
const explicitInvoker = root.querySelector?.(`[data-invoker][for="${this.id}"]`);
|
|
304
299
|
if (explicitInvoker) {
|
|
305
300
|
return ctor._getFocusableInvokerEl(explicitInvoker);
|
|
@@ -316,9 +311,7 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
316
311
|
/** @protected */
|
|
317
312
|
_setupOverlayCtrl() {
|
|
318
313
|
if (this.#hasSetup) return;
|
|
319
|
-
|
|
320
314
|
const invokerNode = this._overlayInvokerNode;
|
|
321
|
-
|
|
322
315
|
const config = {
|
|
323
316
|
contentNode: this._overlayContentNode,
|
|
324
317
|
contentWrapperNode: this._overlayContentWrapperNode,
|
|
@@ -335,7 +328,6 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
335
328
|
/** @type {OverlayController} */
|
|
336
329
|
this._overlayCtrl = this._defineOverlay(config);
|
|
337
330
|
}
|
|
338
|
-
|
|
339
331
|
this.__syncToOverlayController();
|
|
340
332
|
this.__setupSyncFromOverlayController();
|
|
341
333
|
this._setupOpenCloseListeners();
|
|
@@ -346,11 +338,11 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
346
338
|
// Make sure that dynamic behavior (e.g. responsive) is possible by allowing multiple setups and teardowns of the overlay controller.
|
|
347
339
|
this.#hasSetup = false;
|
|
348
340
|
if (!this._overlayCtrl) return;
|
|
349
|
-
|
|
350
341
|
this._teardownOpenCloseListeners();
|
|
351
342
|
this.__teardownSyncFromOverlayController();
|
|
352
343
|
|
|
353
|
-
/** @type {OverlayController} */
|
|
344
|
+
/** @type {OverlayController} */
|
|
345
|
+
this._overlayCtrl.teardown();
|
|
354
346
|
}
|
|
355
347
|
|
|
356
348
|
/**
|
|
@@ -373,7 +365,6 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
373
365
|
this.__onOverlayCtrlShow = () => {
|
|
374
366
|
this.opened = true;
|
|
375
367
|
};
|
|
376
|
-
|
|
377
368
|
this.__onOverlayCtrlHide = () => {
|
|
378
369
|
this.opened = false;
|
|
379
370
|
};
|
|
@@ -381,13 +372,15 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
381
372
|
/**
|
|
382
373
|
* @param {{ preventDefault: () => void; }} beforeShowEvent
|
|
383
374
|
*/
|
|
384
|
-
this.__onBeforeShow = beforeShowEvent => {
|
|
385
|
-
const event = new CustomEvent('before-opened', {
|
|
375
|
+
this.__onBeforeShow = (beforeShowEvent) => {
|
|
376
|
+
const event = new CustomEvent('before-opened', {
|
|
377
|
+
cancelable: true,
|
|
378
|
+
});
|
|
386
379
|
this.dispatchEvent(event);
|
|
387
380
|
if (event.defaultPrevented) {
|
|
388
381
|
// Check whether our current `.opened` state is not out of sync with overlayCtrl
|
|
389
382
|
this._setOpenedWithoutPropertyEffects(
|
|
390
|
-
/** @type {OverlayController} */
|
|
383
|
+
/** @type {OverlayController} */ this._overlayCtrl.isShown,
|
|
391
384
|
);
|
|
392
385
|
beforeShowEvent.preventDefault();
|
|
393
386
|
}
|
|
@@ -396,47 +389,52 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
396
389
|
/**
|
|
397
390
|
* @param {{ preventDefault: () => void; }} beforeHideEvent
|
|
398
391
|
*/
|
|
399
|
-
this.__onBeforeHide = beforeHideEvent => {
|
|
400
|
-
const event = new CustomEvent('before-closed', {
|
|
392
|
+
this.__onBeforeHide = (beforeHideEvent) => {
|
|
393
|
+
const event = new CustomEvent('before-closed', {
|
|
394
|
+
cancelable: true,
|
|
395
|
+
});
|
|
401
396
|
this.dispatchEvent(event);
|
|
402
397
|
if (event.defaultPrevented) {
|
|
403
398
|
// Check whether our current `.opened` state is not out of sync with overlayCtrl
|
|
404
399
|
this._setOpenedWithoutPropertyEffects(
|
|
405
400
|
/** @type {OverlayController} */
|
|
406
|
-
|
|
401
|
+
this._overlayCtrl.isShown,
|
|
407
402
|
);
|
|
408
403
|
beforeHideEvent.preventDefault();
|
|
409
404
|
}
|
|
410
405
|
};
|
|
411
406
|
|
|
412
407
|
/** @type {OverlayController} */
|
|
413
|
-
|
|
408
|
+
this._overlayCtrl.addEventListener('show', this.__onOverlayCtrlShow);
|
|
414
409
|
/** @type {OverlayController} */
|
|
415
|
-
|
|
410
|
+
this._overlayCtrl.addEventListener('hide', this.__onOverlayCtrlHide);
|
|
416
411
|
/** @type {OverlayController} */
|
|
417
|
-
|
|
412
|
+
this._overlayCtrl.addEventListener('before-show', this.__onBeforeShow);
|
|
418
413
|
/** @type {OverlayController} */
|
|
419
|
-
|
|
414
|
+
this._overlayCtrl.addEventListener('before-hide', this.__onBeforeHide);
|
|
420
415
|
}
|
|
421
416
|
|
|
422
417
|
/** @private */
|
|
423
418
|
__teardownSyncFromOverlayController() {
|
|
424
419
|
/** @type {OverlayController} */
|
|
425
|
-
|
|
420
|
+
this._overlayCtrl.removeEventListener(
|
|
426
421
|
'show',
|
|
427
|
-
/** @type {EventListener} */
|
|
422
|
+
/** @type {EventListener} */ this.__onOverlayCtrlShow,
|
|
428
423
|
);
|
|
429
|
-
/** @type {OverlayController} */
|
|
424
|
+
/** @type {OverlayController} */
|
|
425
|
+
this._overlayCtrl.removeEventListener(
|
|
430
426
|
'hide',
|
|
431
|
-
/** @type {EventListener} */
|
|
427
|
+
/** @type {EventListener} */ this.__onOverlayCtrlHide,
|
|
432
428
|
);
|
|
433
|
-
/** @type {OverlayController} */
|
|
429
|
+
/** @type {OverlayController} */
|
|
430
|
+
this._overlayCtrl.removeEventListener(
|
|
434
431
|
'before-show',
|
|
435
|
-
/** @type {EventListener} */
|
|
432
|
+
/** @type {EventListener} */ this.__onBeforeShow,
|
|
436
433
|
);
|
|
437
|
-
/** @type {OverlayController} */
|
|
434
|
+
/** @type {OverlayController} */
|
|
435
|
+
this._overlayCtrl.removeEventListener(
|
|
438
436
|
'before-hide',
|
|
439
|
-
/** @type {EventListener} */
|
|
437
|
+
/** @type {EventListener} */ this.__onBeforeHide,
|
|
440
438
|
);
|
|
441
439
|
}
|
|
442
440
|
|
|
@@ -444,10 +442,10 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
444
442
|
__syncToOverlayController() {
|
|
445
443
|
if (this.opened) {
|
|
446
444
|
/** @type {OverlayController} */
|
|
447
|
-
|
|
445
|
+
this._overlayCtrl.show();
|
|
448
446
|
} else {
|
|
449
447
|
/** @type {OverlayController} */
|
|
450
|
-
|
|
448
|
+
this._overlayCtrl.hide();
|
|
451
449
|
}
|
|
452
450
|
}
|
|
453
451
|
|
|
@@ -455,21 +453,21 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
455
453
|
* Toggles the overlay
|
|
456
454
|
*/
|
|
457
455
|
async toggle() {
|
|
458
|
-
await /** @type {OverlayController} */
|
|
456
|
+
await /** @type {OverlayController} */ this._overlayCtrl.toggle();
|
|
459
457
|
}
|
|
460
458
|
|
|
461
459
|
/**
|
|
462
460
|
* Shows the overlay
|
|
463
461
|
*/
|
|
464
462
|
async open() {
|
|
465
|
-
await /** @type {OverlayController} */
|
|
463
|
+
await /** @type {OverlayController} */ this._overlayCtrl.show();
|
|
466
464
|
}
|
|
467
465
|
|
|
468
466
|
/**
|
|
469
467
|
* Hides the overlay
|
|
470
468
|
*/
|
|
471
469
|
async close() {
|
|
472
|
-
await /** @type {OverlayController} */
|
|
470
|
+
await /** @type {OverlayController} */ this._overlayCtrl.hide();
|
|
473
471
|
}
|
|
474
472
|
|
|
475
473
|
/**
|
|
@@ -478,7 +476,7 @@ export const OverlayMixinImplementation = superclass => {
|
|
|
478
476
|
* increases vertically)
|
|
479
477
|
*/
|
|
480
478
|
repositionOverlay() {
|
|
481
|
-
const ctrl = /** @type {OverlayController} */
|
|
479
|
+
const ctrl = /** @type {OverlayController} */ this._overlayCtrl;
|
|
482
480
|
if (ctrl.placementMode === 'local' && ctrl._popper) {
|
|
483
481
|
ctrl._popper.update();
|
|
484
482
|
}
|
|
@@ -14,11 +14,10 @@ import { overlayDocumentStyle } from './overlayDocumentStyle.js';
|
|
|
14
14
|
export class OverlaysManager {
|
|
15
15
|
/** @type {HTMLStyleElement | undefined} */
|
|
16
16
|
static __globalStyleNode = undefined;
|
|
17
|
-
|
|
18
17
|
static __createGlobalStyleNode() {
|
|
19
18
|
const styleTag = document.createElement('style');
|
|
20
19
|
styleTag.setAttribute('data-overlays', '');
|
|
21
|
-
styleTag.textContent = /** @type {CSSResult} */
|
|
20
|
+
styleTag.textContent = /** @type {CSSResult} */ overlayDocumentStyle.cssText;
|
|
22
21
|
document.head.appendChild(styleTag);
|
|
23
22
|
return styleTag;
|
|
24
23
|
}
|
|
@@ -73,7 +72,6 @@ export class OverlaysManager {
|
|
|
73
72
|
* }}
|
|
74
73
|
*/
|
|
75
74
|
__bodySizeVars;
|
|
76
|
-
|
|
77
75
|
constructor() {
|
|
78
76
|
this.__list = [];
|
|
79
77
|
this.__shownList = [];
|
|
@@ -88,11 +86,9 @@ export class OverlaysManager {
|
|
|
88
86
|
marginRight: undefined,
|
|
89
87
|
marginBottom: undefined,
|
|
90
88
|
};
|
|
91
|
-
|
|
92
89
|
this.__forTesting = {
|
|
93
90
|
bodySizeVars: this.__bodySizeVars,
|
|
94
91
|
};
|
|
95
|
-
|
|
96
92
|
if (!OverlaysManager.__globalStyleNode) {
|
|
97
93
|
OverlaysManager.__globalStyleNode = OverlaysManager.__createGlobalStyleNode();
|
|
98
94
|
}
|
|
@@ -104,7 +100,7 @@ export class OverlaysManager {
|
|
|
104
100
|
* @returns {OverlayController} same controller after adding to the manager
|
|
105
101
|
*/
|
|
106
102
|
add(ctrlToAdd) {
|
|
107
|
-
if (this.list.find(ctrl => ctrlToAdd === ctrl)) {
|
|
103
|
+
if (this.list.find((ctrl) => ctrlToAdd === ctrl)) {
|
|
108
104
|
throw new Error('controller instance is already added');
|
|
109
105
|
}
|
|
110
106
|
this.list.push(ctrlToAdd);
|
|
@@ -115,18 +111,18 @@ export class OverlaysManager {
|
|
|
115
111
|
* @param {OverlayController} ctrlToRemove
|
|
116
112
|
*/
|
|
117
113
|
remove(ctrlToRemove) {
|
|
118
|
-
if (!this.list.find(ctrl => ctrlToRemove === ctrl)) {
|
|
114
|
+
if (!this.list.find((ctrl) => ctrlToRemove === ctrl)) {
|
|
119
115
|
throw new Error('could not find controller to remove');
|
|
120
116
|
}
|
|
121
|
-
this.__list = this.list.filter(ctrl => ctrl !== ctrlToRemove);
|
|
122
|
-
this.__shownList = this.shownList.filter(ctrl => ctrl !== ctrlToRemove);
|
|
117
|
+
this.__list = this.list.filter((ctrl) => ctrl !== ctrlToRemove);
|
|
118
|
+
this.__shownList = this.shownList.filter((ctrl) => ctrl !== ctrlToRemove);
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
/**
|
|
126
122
|
* @param {OverlayController} ctrlToShow
|
|
127
123
|
*/
|
|
128
124
|
show(ctrlToShow) {
|
|
129
|
-
if (this.list.find(ctrl => ctrlToShow === ctrl)) {
|
|
125
|
+
if (this.list.find((ctrl) => ctrlToShow === ctrl)) {
|
|
130
126
|
this.hide(ctrlToShow);
|
|
131
127
|
}
|
|
132
128
|
this.__shownList.unshift(ctrlToShow);
|
|
@@ -144,17 +140,15 @@ export class OverlaysManager {
|
|
|
144
140
|
* @param {any} ctrlToHide
|
|
145
141
|
*/
|
|
146
142
|
hide(ctrlToHide) {
|
|
147
|
-
if (!this.list.find(ctrl => ctrlToHide === ctrl)) {
|
|
143
|
+
if (!this.list.find((ctrl) => ctrlToHide === ctrl)) {
|
|
148
144
|
throw new Error('could not find controller to hide');
|
|
149
145
|
}
|
|
150
|
-
this.__shownList = this.shownList.filter(ctrl => ctrl !== ctrlToHide);
|
|
146
|
+
this.__shownList = this.shownList.filter((ctrl) => ctrl !== ctrlToHide);
|
|
151
147
|
}
|
|
152
|
-
|
|
153
148
|
teardown() {
|
|
154
|
-
this.list.forEach(ctrl => {
|
|
149
|
+
this.list.forEach((ctrl) => {
|
|
155
150
|
ctrl.teardown();
|
|
156
151
|
});
|
|
157
|
-
|
|
158
152
|
this.__list = [];
|
|
159
153
|
this.__shownList = [];
|
|
160
154
|
this._siblingsInert = false;
|
|
@@ -165,11 +159,8 @@ export class OverlaysManager {
|
|
|
165
159
|
this.__bodySizeVars.marginBottomInline = undefined;
|
|
166
160
|
this.__bodySizeVars.marginRight = undefined;
|
|
167
161
|
this.__bodySizeVars.marginBottom = undefined;
|
|
168
|
-
|
|
169
162
|
if (OverlaysManager.__globalStyleNode) {
|
|
170
|
-
document.head.removeChild(
|
|
171
|
-
/** @type {HTMLStyleElement} */ (OverlaysManager.__globalStyleNode),
|
|
172
|
-
);
|
|
163
|
+
document.head.removeChild(/** @type {HTMLStyleElement} */ OverlaysManager.__globalStyleNode);
|
|
173
164
|
OverlaysManager.__globalStyleNode = undefined;
|
|
174
165
|
}
|
|
175
166
|
}
|
|
@@ -215,9 +206,9 @@ export class OverlaysManager {
|
|
|
215
206
|
this.__bodySizeVars.marginBottom = 0;
|
|
216
207
|
}
|
|
217
208
|
const scrollbarWidth =
|
|
218
|
-
document.body.clientWidth - /** @type {number} */
|
|
209
|
+
document.body.clientWidth - /** @type {number} */ this.__bodySizeVars.clientWidth;
|
|
219
210
|
const scrollbarHeight =
|
|
220
|
-
document.body.clientHeight - /** @type {number} */
|
|
211
|
+
document.body.clientHeight - /** @type {number} */ this.__bodySizeVars.clientHeight;
|
|
221
212
|
const newMarginRight = this.__bodySizeVars.marginRight + scrollbarWidth;
|
|
222
213
|
const newMarginBottom = this.__bodySizeVars.marginBottom + scrollbarHeight;
|
|
223
214
|
// @ts-expect-error [external]: CSS not yet typed
|
|
@@ -254,7 +245,10 @@ export class OverlaysManager {
|
|
|
254
245
|
document.body.classList.add('overlays-scroll-lock');
|
|
255
246
|
if (isIOS || isMacSafari) {
|
|
256
247
|
// iOS and safar for mac have issues with overlays with input fields. This is fixed by applying
|
|
257
|
-
// position: fixed to the body. As a side effect, this will scroll the body to the top
|
|
248
|
+
// position: fixed to the body. As a side effect, this will scroll the body to the top,
|
|
249
|
+
// so we compensate by applying negative top value via a CSS variable, and scroll back to
|
|
250
|
+
// the original position when enabling scroll again.
|
|
251
|
+
document.body.style.setProperty('--scroll-y-compensation', `-${window.scrollY}px`);
|
|
258
252
|
document.body.classList.add('overlays-scroll-lock-ios-fix');
|
|
259
253
|
}
|
|
260
254
|
if (isIOS) {
|
|
@@ -267,20 +261,24 @@ export class OverlaysManager {
|
|
|
267
261
|
*/
|
|
268
262
|
requestToEnableScroll(currentController) {
|
|
269
263
|
const openedSiblings = currentController
|
|
270
|
-
? this.shownList.filter(ctrl => ctrl !== currentController)
|
|
264
|
+
? this.shownList.filter((ctrl) => ctrl !== currentController)
|
|
271
265
|
: this.shownList;
|
|
272
|
-
|
|
273
266
|
const hasOpenSiblingThatPreventsScroll = openedSiblings.some(
|
|
274
|
-
ctrl => ctrl.preventsScroll === true,
|
|
267
|
+
(ctrl) => ctrl.preventsScroll === true,
|
|
275
268
|
);
|
|
276
269
|
if (hasOpenSiblingThatPreventsScroll) {
|
|
277
270
|
return;
|
|
278
271
|
}
|
|
279
|
-
|
|
280
272
|
const { isIOS, isMacSafari } = browserDetection;
|
|
281
273
|
document.body.classList.remove('overlays-scroll-lock');
|
|
282
274
|
if (isIOS || isMacSafari) {
|
|
283
275
|
document.body.classList.remove('overlays-scroll-lock-ios-fix');
|
|
276
|
+
window.scrollTo({
|
|
277
|
+
top:
|
|
278
|
+
parseInt(document.body.style.getPropertyValue('--scroll-y-compensation') || '0', 10) * -1,
|
|
279
|
+
behavior: 'instant',
|
|
280
|
+
});
|
|
281
|
+
document.body.style.removeProperty('--scroll-y-compensation');
|
|
284
282
|
}
|
|
285
283
|
if (isIOS) {
|
|
286
284
|
document.documentElement.classList.remove('overlays-scroll-lock-ios-fix');
|
|
@@ -292,8 +290,8 @@ export class OverlaysManager {
|
|
|
292
290
|
* @param {OverlayController} blockingCtrl
|
|
293
291
|
*/
|
|
294
292
|
requestToShowOnly(blockingCtrl) {
|
|
295
|
-
const controllersToHide = this.shownList.filter(ctrl => ctrl !== blockingCtrl);
|
|
296
|
-
controllersToHide.forEach(ctrl => ctrl.hide());
|
|
293
|
+
const controllersToHide = this.shownList.filter((ctrl) => ctrl !== blockingCtrl);
|
|
294
|
+
controllersToHide.forEach((ctrl) => ctrl.hide());
|
|
297
295
|
this.__blockingMap.set(blockingCtrl, controllersToHide);
|
|
298
296
|
}
|
|
299
297
|
|
|
@@ -302,10 +300,10 @@ export class OverlaysManager {
|
|
|
302
300
|
*/
|
|
303
301
|
retractRequestToShowOnly(blockingCtrl) {
|
|
304
302
|
if (this.__blockingMap.has(blockingCtrl)) {
|
|
305
|
-
const controllersWhichGotHidden =
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
controllersWhichGotHidden.forEach(ctrl => ctrl.show());
|
|
303
|
+
const controllersWhichGotHidden =
|
|
304
|
+
/** @type {OverlayController[]} */
|
|
305
|
+
this.__blockingMap.get(blockingCtrl);
|
|
306
|
+
controllersWhichGotHidden.forEach((ctrl) => ctrl.show());
|
|
309
307
|
}
|
|
310
308
|
}
|
|
311
309
|
}
|
package/components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js
CHANGED
|
@@ -49,7 +49,6 @@ export function withHoverInteraction({
|
|
|
49
49
|
// completion to intercept it, as capture runs before bubble so we stop it regardless of registration order.
|
|
50
50
|
/** @type {((e: Event) => void) | null} */
|
|
51
51
|
let pendingClickSuppressor = null;
|
|
52
|
-
|
|
53
52
|
function resetActive() {
|
|
54
53
|
isFocused = false;
|
|
55
54
|
isHovered = false;
|
|
@@ -89,7 +88,11 @@ export function withHoverInteraction({
|
|
|
89
88
|
if (!controller.invokerNode?.matches(':focus-visible')) return;
|
|
90
89
|
}
|
|
91
90
|
const shouldOpen = isFocused || isHovered;
|
|
92
|
-
openClose({
|
|
91
|
+
openClose({
|
|
92
|
+
shouldOpen,
|
|
93
|
+
openTimeout: delayIn,
|
|
94
|
+
closeTimeout: delayOut,
|
|
95
|
+
});
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
/** @param {Event} e */
|
|
@@ -102,7 +105,6 @@ export function withHoverInteraction({
|
|
|
102
105
|
clearTimeout(pendingLongpressTimeout);
|
|
103
106
|
if (event.pointerType !== 'touch') return;
|
|
104
107
|
const { type } = event;
|
|
105
|
-
|
|
106
108
|
if (type === 'pointerdown') {
|
|
107
109
|
longpressCompleted = false;
|
|
108
110
|
isLastPointerTouch = true;
|
|
@@ -110,12 +112,15 @@ export function withHoverInteraction({
|
|
|
110
112
|
longpressCompleted = true;
|
|
111
113
|
// Intercept the compatibility click the browser generates at the end of the touch sequence.
|
|
112
114
|
// Capture phase ensures we run before any bubble-phase handler (e.g. a dialog opener).
|
|
113
|
-
pendingClickSuppressor = e => e.stopImmediatePropagation();
|
|
115
|
+
pendingClickSuppressor = (e) => e.stopImmediatePropagation();
|
|
114
116
|
controller.invokerNode?.addEventListener('click', pendingClickSuppressor, {
|
|
115
|
-
once: true,
|
|
117
|
+
once: true,
|
|
118
|
+
// auto-removes after first click
|
|
116
119
|
capture: true,
|
|
117
120
|
});
|
|
118
|
-
openClose({
|
|
121
|
+
openClose({
|
|
122
|
+
shouldOpen: true,
|
|
123
|
+
});
|
|
119
124
|
}, longpressDuration);
|
|
120
125
|
} else {
|
|
121
126
|
openClose({
|
|
@@ -124,14 +129,11 @@ export function withHoverInteraction({
|
|
|
124
129
|
});
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
|
-
|
|
128
132
|
return {
|
|
129
133
|
init: () => {
|
|
130
134
|
controller.addEventListener('hide', resetActive);
|
|
131
|
-
|
|
132
135
|
controller.invokerNode?.addEventListener('focusin', handleHoverAndFocus);
|
|
133
136
|
controller.invokerNode?.addEventListener('focusout', handleHoverAndFocus);
|
|
134
|
-
|
|
135
137
|
if (isHoverSupported) {
|
|
136
138
|
controller.contentNode?.addEventListener('mouseenter', handleHoverAndFocus);
|
|
137
139
|
controller.contentNode?.addEventListener('mouseleave', handleHoverAndFocus);
|
|
@@ -149,10 +151,8 @@ export function withHoverInteraction({
|
|
|
149
151
|
},
|
|
150
152
|
teardown: () => {
|
|
151
153
|
controller.removeEventListener('hide', resetActive);
|
|
152
|
-
|
|
153
154
|
controller.invokerNode?.removeEventListener('focusin', handleHoverAndFocus);
|
|
154
155
|
controller.invokerNode?.removeEventListener('focusout', handleHoverAndFocus);
|
|
155
|
-
|
|
156
156
|
if (isHoverSupported) {
|
|
157
157
|
controller.contentNode?.removeEventListener('mouseenter', handleHoverAndFocus);
|
|
158
158
|
controller.contentNode?.removeEventListener('mouseleave', handleHoverAndFocus);
|
|
@@ -4,16 +4,15 @@ import { withClickInteraction } from './visibility-trigger-partials/withClickInt
|
|
|
4
4
|
* @typedef {import('../../types/OverlayConfig.js').OverlayConfig} OverlayConfig
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const withBottomSheetConfig = () =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
7
|
+
export const withBottomSheetConfig = () => /** @type {OverlayConfig} */ ({
|
|
8
|
+
hasBackdrop: true,
|
|
9
|
+
preventsScroll: true,
|
|
10
|
+
trapsKeyboardFocus: true,
|
|
11
|
+
hidesOnEsc: true,
|
|
12
|
+
placementMode: 'global',
|
|
13
|
+
viewportConfig: {
|
|
14
|
+
placement: 'bottom',
|
|
15
|
+
},
|
|
16
|
+
handlesAccessibility: true,
|
|
17
|
+
...withClickInteraction(),
|
|
18
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { withPopoverConfig } from './withPopoverConfig.js';
|
|
2
|
-
|
|
3
2
|
export const withDropdownConfig = () =>
|
|
4
|
-
withPopoverConfig({
|
|
3
|
+
withPopoverConfig({
|
|
4
|
+
horizontalFallback: false,
|
|
5
|
+
placement: 'bottom-start',
|
|
6
|
+
});
|
|
@@ -4,16 +4,15 @@ import { withClickInteraction } from './visibility-trigger-partials/withClickInt
|
|
|
4
4
|
* @typedef {import('../../types/OverlayConfig.js').OverlayConfig} OverlayConfig
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
export const withModalDialogConfig = () =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
7
|
+
export const withModalDialogConfig = () => /** @type {OverlayConfig} */ ({
|
|
8
|
+
placementMode: 'global',
|
|
9
|
+
viewportConfig: {
|
|
10
|
+
placement: 'center',
|
|
11
|
+
},
|
|
12
|
+
hasBackdrop: true,
|
|
13
|
+
preventsScroll: true,
|
|
14
|
+
trapsKeyboardFocus: true,
|
|
15
|
+
hidesOnEsc: true,
|
|
16
|
+
handlesAccessibility: true,
|
|
17
|
+
...withClickInteraction(),
|
|
18
|
+
});
|