@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
|
@@ -2,7 +2,6 @@ import { LionButton } from '@lion/ui/button.js';
|
|
|
2
2
|
import { defineCE, expect, fixture } from '@open-wc/testing';
|
|
3
3
|
import { html } from 'lit/static-html.js';
|
|
4
4
|
import { LionSelectInvoker } from '@lion/ui/select-rich.js';
|
|
5
|
-
|
|
6
5
|
import '@lion/ui/define/lion-select-invoker.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -14,16 +13,14 @@ describe('lion-select-invoker', () => {
|
|
|
14
13
|
const el = await fixture(html`<lion-select-invoker></lion-select-invoker>`);
|
|
15
14
|
expect(el instanceof LionButton).to.be.true;
|
|
16
15
|
});
|
|
17
|
-
|
|
18
16
|
it('renders invoker info based on selectedElement child elements', async () => {
|
|
19
|
-
const el =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
el.selectedElement =
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const el =
|
|
18
|
+
/** @type {LionSelectInvoker} */
|
|
19
|
+
await fixture(html`<lion-select-invoker></lion-select-invoker>`);
|
|
20
|
+
el.selectedElement =
|
|
21
|
+
/** @type {LionOption} */
|
|
22
|
+
await fixture(`<div class="option">Textnode<h2>I am</h2><p>2 lines</p></div>`);
|
|
25
23
|
await el.updateComplete;
|
|
26
|
-
|
|
27
24
|
expect(el._contentWrapperNode).lightDom.to.equal(
|
|
28
25
|
`
|
|
29
26
|
Textnode
|
|
@@ -35,44 +32,36 @@ describe('lion-select-invoker', () => {
|
|
|
35
32
|
},
|
|
36
33
|
);
|
|
37
34
|
});
|
|
38
|
-
|
|
39
35
|
it('renders invoker info based on selectedElement textContent', async () => {
|
|
40
|
-
const el =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
el.selectedElement =
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
const el =
|
|
37
|
+
/** @type {LionSelectInvoker} */
|
|
38
|
+
await fixture(html`<lion-select-invoker></lion-select-invoker>`);
|
|
39
|
+
el.selectedElement =
|
|
40
|
+
/** @type {LionOption} */
|
|
41
|
+
await fixture(`<div class="option">just textContent</div>`);
|
|
46
42
|
await el.updateComplete;
|
|
47
|
-
|
|
48
43
|
expect(el._contentWrapperNode).lightDom.to.equal('just textContent');
|
|
49
44
|
});
|
|
50
|
-
|
|
51
45
|
it('has tabindex="0"', async () => {
|
|
52
|
-
const el =
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
const el =
|
|
47
|
+
/** @type {LionSelectInvoker} */
|
|
48
|
+
await fixture(html`<lion-select-invoker></lion-select-invoker>`);
|
|
55
49
|
expect(el.tabIndex).to.equal(0);
|
|
56
50
|
expect(el.getAttribute('tabindex')).to.equal('0');
|
|
57
51
|
});
|
|
58
|
-
|
|
59
52
|
it('should not render after slot when singleOption is true', async () => {
|
|
60
|
-
const el =
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
expect(/** @type {ShadowRoot} */ (el.shadowRoot).querySelector('slot[name="after"]')).to.not
|
|
53
|
+
const el =
|
|
54
|
+
/** @type {LionSelectInvoker} */
|
|
55
|
+
await fixture(html` <lion-select-invoker .singleOption="${true}"></lion-select-invoker> `);
|
|
56
|
+
expect(/** @type {ShadowRoot} */ el.shadowRoot.querySelector('slot[name="after"]')).to.not
|
|
65
57
|
.exist;
|
|
66
58
|
});
|
|
67
|
-
|
|
68
59
|
it('should render after slot when singleOption is not true', async () => {
|
|
69
|
-
const el =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
expect(/** @type {ShadowRoot} */ (el.shadowRoot).querySelector('slot[name="after"]')).to.exist;
|
|
60
|
+
const el =
|
|
61
|
+
/** @type {LionSelectInvoker} */
|
|
62
|
+
await fixture(html`<lion-select-invoker></lion-select-invoker>`);
|
|
63
|
+
expect(/** @type {ShadowRoot} */ el.shadowRoot.querySelector('slot[name="after"]')).to.exist;
|
|
74
64
|
});
|
|
75
|
-
|
|
76
65
|
describe('Subclassers', () => {
|
|
77
66
|
it('supports a custom _contentTemplate', async () => {
|
|
78
67
|
const myTag = defineCE(
|
|
@@ -85,17 +74,11 @@ describe('lion-select-invoker', () => {
|
|
|
85
74
|
}
|
|
86
75
|
},
|
|
87
76
|
);
|
|
88
|
-
const el = /** @type {LionSelectInvoker} */
|
|
89
|
-
|
|
90
|
-
el.selectedElement = /** @type {LionOption} */ (
|
|
91
|
-
await fixture(`<div class="option">cat</div>`)
|
|
92
|
-
);
|
|
77
|
+
const el = /** @type {LionSelectInvoker} */ await fixture(`<${myTag}></${myTag}>`);
|
|
78
|
+
el.selectedElement = /** @type {LionOption} */ await fixture(`<div class="option">cat</div>`);
|
|
93
79
|
await el.updateComplete;
|
|
94
80
|
expect(el._contentWrapperNode).lightDom.to.equal('cat selected');
|
|
95
|
-
|
|
96
|
-
el.selectedElement = /** @type {LionOption} */ (
|
|
97
|
-
await fixture(`<div class="option">dog</div>`)
|
|
98
|
-
);
|
|
81
|
+
el.selectedElement = /** @type {LionOption} */ await fixture(`<div class="option">dog</div>`);
|
|
99
82
|
await el.updateComplete;
|
|
100
83
|
expect(el._contentWrapperNode).lightDom.to.equal('no valid selection');
|
|
101
84
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { runListboxMixinSuite } from '@lion/ui/listbox-test-suites.js';
|
|
2
|
-
|
|
3
2
|
import '@lion/ui/define/lion-select-rich.js';
|
|
4
|
-
|
|
5
3
|
describe('<lion-select-rich> integration with ListboxMixin', () => {
|
|
6
|
-
runListboxMixinSuite({
|
|
4
|
+
runListboxMixinSuite({
|
|
5
|
+
tagString: 'lion-select-rich',
|
|
6
|
+
});
|
|
7
7
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
import { OverlayMixin } from '@lion/ui/overlays.js';
|
|
3
3
|
import { defineCE, expect, fixture, html, unsafeStatic } from '@open-wc/testing';
|
|
4
|
-
|
|
5
4
|
import '@lion/ui/define/lion-listbox.js';
|
|
6
5
|
import '@lion/ui/define/lion-select-rich.js';
|
|
7
6
|
|
|
@@ -22,13 +21,12 @@ const tagString = defineCE(
|
|
|
22
21
|
},
|
|
23
22
|
);
|
|
24
23
|
const tag = unsafeStatic(tagString);
|
|
25
|
-
|
|
26
24
|
describe('Select Rich Integration tests', () => {
|
|
27
25
|
it('works inside a dialog', async () => {
|
|
28
26
|
let properlyInstantiated = false;
|
|
29
|
-
|
|
30
27
|
try {
|
|
31
|
-
const nestedEl =
|
|
28
|
+
const nestedEl =
|
|
29
|
+
/** @type {LionSelectRich} */
|
|
32
30
|
await fixture(html`
|
|
33
31
|
<lion-select-rich>
|
|
34
32
|
<lion-options slot="input">
|
|
@@ -36,10 +34,8 @@ describe('Select Rich Integration tests', () => {
|
|
|
36
34
|
<lion-option .choiceValue=${20}>Item 2</lion-option>
|
|
37
35
|
</lion-options>
|
|
38
36
|
</lion-select-rich>
|
|
39
|
-
`)
|
|
40
|
-
);
|
|
37
|
+
`);
|
|
41
38
|
await nestedEl.registrationComplete;
|
|
42
|
-
|
|
43
39
|
await fixture(html`
|
|
44
40
|
<${tag} id="main">
|
|
45
41
|
<div slot="content" id="mainContent">
|
|
@@ -51,9 +47,8 @@ describe('Select Rich Integration tests', () => {
|
|
|
51
47
|
`);
|
|
52
48
|
properlyInstantiated = true;
|
|
53
49
|
} catch (e) {
|
|
54
|
-
throw new Error(/** @type {Error} */
|
|
50
|
+
throw new Error(/** @type {Error} */ e.message);
|
|
55
51
|
}
|
|
56
|
-
|
|
57
52
|
expect(properlyInstantiated).to.be.true;
|
|
58
53
|
});
|
|
59
54
|
});
|
|
@@ -3,9 +3,7 @@ import { Required } from '@lion/ui/form-core.js';
|
|
|
3
3
|
import { html } from 'lit/static-html.js';
|
|
4
4
|
import { browserDetection } from '@lion/ui/core.js';
|
|
5
5
|
import sinon from 'sinon';
|
|
6
|
-
|
|
7
6
|
import '@lion/ui/define/lion-option.js';
|
|
8
|
-
|
|
9
7
|
import '@lion/ui/define/lion-listbox.js';
|
|
10
8
|
import '@lion/ui/define/lion-select-rich.js';
|
|
11
9
|
import { getSelectRichMembers } from '@lion/ui/select-rich-test-helpers.js';
|
|
@@ -21,8 +19,18 @@ import { getSelectRichMembers } from '@lion/ui/select-rich-test-helpers.js';
|
|
|
21
19
|
* @param {string} code
|
|
22
20
|
*/
|
|
23
21
|
function mimicKeyPress(el, key, code = '') {
|
|
24
|
-
el.dispatchEvent(
|
|
25
|
-
|
|
22
|
+
el.dispatchEvent(
|
|
23
|
+
new KeyboardEvent('keydown', {
|
|
24
|
+
key,
|
|
25
|
+
code,
|
|
26
|
+
}),
|
|
27
|
+
);
|
|
28
|
+
el.dispatchEvent(
|
|
29
|
+
new KeyboardEvent('keyup', {
|
|
30
|
+
key,
|
|
31
|
+
code,
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
/**
|
|
@@ -42,124 +50,110 @@ function expectOnlyGivenOneOptionToBeChecked(options, selectedIndex) {
|
|
|
42
50
|
}
|
|
43
51
|
});
|
|
44
52
|
}
|
|
45
|
-
|
|
46
53
|
describe('lion-select-rich interactions', () => {
|
|
47
54
|
describe('Scrolling active options', () => {
|
|
48
55
|
afterEach(() => {
|
|
49
56
|
sinon.restore();
|
|
50
57
|
});
|
|
51
|
-
|
|
52
58
|
it('does not scroll while typing a selection from the closed invoker', async () => {
|
|
53
|
-
const el =
|
|
59
|
+
const el =
|
|
60
|
+
/** @type {LionSelectRich} */
|
|
54
61
|
await fixture(html`
|
|
55
62
|
<lion-select-rich interaction-mode="windows/linux">
|
|
56
63
|
<lion-option .choiceValue=${'red'}>Red</lion-option>
|
|
57
64
|
<lion-option .choiceValue=${'teal'}>Teal</lion-option>
|
|
58
65
|
</lion-select-rich>
|
|
59
|
-
`)
|
|
60
|
-
);
|
|
66
|
+
`);
|
|
61
67
|
const scrollSpy = sinon.spy(Element.prototype, 'scrollIntoView');
|
|
62
|
-
|
|
63
68
|
mimicKeyPress(el, 't', 'KeyT');
|
|
64
69
|
await el.updateComplete;
|
|
65
|
-
|
|
66
70
|
expect(el.opened).to.be.false;
|
|
67
71
|
expect(el.checkedIndex).to.equal(1);
|
|
68
72
|
expect(scrollSpy.callCount).to.equal(0);
|
|
69
73
|
});
|
|
70
|
-
|
|
71
74
|
it('scrolls the selected option on opening and the active option on keyboard navigation', async () => {
|
|
72
|
-
const el =
|
|
75
|
+
const el =
|
|
76
|
+
/** @type {LionSelectRich} */
|
|
73
77
|
await fixture(html`
|
|
74
78
|
<lion-select-rich interaction-mode="mac">
|
|
75
79
|
<lion-option .choiceValue=${10}>Item 1</lion-option>
|
|
76
80
|
<lion-option .choiceValue=${20} checked>Item 2</lion-option>
|
|
77
81
|
<lion-option .choiceValue=${30}>Item 3</lion-option>
|
|
78
82
|
</lion-select-rich>
|
|
79
|
-
`)
|
|
80
|
-
);
|
|
83
|
+
`);
|
|
81
84
|
const { _overlayCtrl, _listboxNode } = getSelectRichMembers(el);
|
|
82
85
|
const scrollSpy = sinon.spy(Element.prototype, 'scrollIntoView');
|
|
83
|
-
|
|
84
86
|
await _overlayCtrl.show();
|
|
85
87
|
await el.updateComplete;
|
|
86
|
-
|
|
87
88
|
expect(el.opened).to.be.true;
|
|
88
89
|
expect(scrollSpy.calledOn(el.formElements[1])).to.be.true;
|
|
89
90
|
scrollSpy.resetHistory();
|
|
90
|
-
|
|
91
91
|
mimicKeyPress(_listboxNode, 'ArrowDown');
|
|
92
92
|
await el.updateComplete;
|
|
93
|
-
|
|
94
93
|
expect(el.activeIndex).to.equal(2);
|
|
95
94
|
expect(scrollSpy.calledOn(el.formElements[2])).to.be.true;
|
|
96
95
|
});
|
|
97
96
|
});
|
|
98
|
-
|
|
99
97
|
describe('Interaction mode', () => {
|
|
100
98
|
it('autodetects interactionMode if not defined', async () => {
|
|
101
99
|
const originalIsMac = browserDetection.isMac;
|
|
102
|
-
|
|
103
100
|
browserDetection.isMac = true;
|
|
104
|
-
const el =
|
|
101
|
+
const el =
|
|
102
|
+
/** @type {LionSelectRich} */
|
|
105
103
|
await fixture(html`
|
|
106
104
|
<lion-select-rich><lion-option .choiceValue=${10}>Item 1</lion-option></lion-select-rich>
|
|
107
|
-
`)
|
|
108
|
-
);
|
|
105
|
+
`);
|
|
109
106
|
expect(el.interactionMode).to.equal('mac');
|
|
110
|
-
const el2 =
|
|
107
|
+
const el2 =
|
|
108
|
+
/** @type {LionSelectRich} */
|
|
111
109
|
await fixture(html`
|
|
112
110
|
<lion-select-rich interaction-mode="windows/linux"
|
|
113
111
|
><lion-option .choiceValue=${10}>Item 1</lion-option></lion-select-rich
|
|
114
112
|
>
|
|
115
|
-
`)
|
|
116
|
-
);
|
|
113
|
+
`);
|
|
117
114
|
expect(el2.interactionMode).to.equal('windows/linux');
|
|
118
|
-
|
|
119
115
|
browserDetection.isMac = false;
|
|
120
|
-
const el3 =
|
|
116
|
+
const el3 =
|
|
117
|
+
/** @type {LionSelectRich} */
|
|
121
118
|
await fixture(html`
|
|
122
119
|
<lion-select-rich><lion-option .choiceValue=${10}>Item 1</lion-option></lion-select-rich>
|
|
123
|
-
`)
|
|
124
|
-
);
|
|
120
|
+
`);
|
|
125
121
|
expect(el3.interactionMode).to.equal('windows/linux');
|
|
126
|
-
const el4 =
|
|
122
|
+
const el4 =
|
|
123
|
+
/** @type {LionSelectRich} */
|
|
127
124
|
await fixture(html`
|
|
128
125
|
<lion-select-rich interaction-mode="mac"
|
|
129
126
|
><lion-option .choiceValue=${10}>Item 1</lion-option></lion-select-rich
|
|
130
127
|
>
|
|
131
|
-
`)
|
|
132
|
-
);
|
|
128
|
+
`);
|
|
133
129
|
expect(el4.interactionMode).to.equal('mac');
|
|
134
130
|
browserDetection.isMac = originalIsMac;
|
|
135
131
|
});
|
|
136
|
-
|
|
137
132
|
it('derives selectionFollowsFocus and navigateWithinInvoker from interactionMode', async () => {
|
|
138
|
-
const el =
|
|
133
|
+
const el =
|
|
134
|
+
/** @type {LionSelectRich} */
|
|
139
135
|
await fixture(html`
|
|
140
136
|
<lion-select-rich interaction-mode="windows/linux"
|
|
141
137
|
><lion-option .choiceValue=${10}>Item 1</lion-option></lion-select-rich
|
|
142
138
|
>
|
|
143
|
-
`)
|
|
144
|
-
);
|
|
139
|
+
`);
|
|
145
140
|
expect(el.selectionFollowsFocus).to.be.true;
|
|
146
141
|
expect(el.navigateWithinInvoker).to.be.true;
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
const el2 =
|
|
143
|
+
/** @type {LionSelectRich} */
|
|
149
144
|
await fixture(html`
|
|
150
145
|
<lion-select-rich interaction-mode="mac"
|
|
151
146
|
><lion-option .choiceValue=${10}>Item 1</lion-option></lion-select-rich
|
|
152
147
|
>
|
|
153
|
-
`)
|
|
154
|
-
);
|
|
148
|
+
`);
|
|
155
149
|
expect(el2.selectionFollowsFocus).to.be.false;
|
|
156
150
|
expect(el2.navigateWithinInvoker).to.be.false;
|
|
157
151
|
});
|
|
158
152
|
});
|
|
159
|
-
|
|
160
153
|
describe('Invoker Keyboard navigation Mac', () => {
|
|
161
154
|
it('opens dropdown with [ArrowDown] [ArrowUp] keys or navigates through the listbox options', async () => {
|
|
162
|
-
const el =
|
|
155
|
+
const el =
|
|
156
|
+
/** @type {LionSelectRich} */
|
|
163
157
|
await fixture(html`
|
|
164
158
|
<lion-select-rich interaction-mode="mac">
|
|
165
159
|
<lion-options slot="input">
|
|
@@ -168,29 +162,31 @@ describe('lion-select-rich interactions', () => {
|
|
|
168
162
|
<lion-option .choiceValue=${30}>Item 3</lion-option>
|
|
169
163
|
</lion-options>
|
|
170
164
|
</lion-select-rich>
|
|
171
|
-
`)
|
|
172
|
-
);
|
|
173
|
-
|
|
165
|
+
`);
|
|
174
166
|
const options = el.formElements;
|
|
175
167
|
expect(el.checkedIndex).to.equal(0);
|
|
176
168
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
169
|
+
el.dispatchEvent(
|
|
170
|
+
new KeyboardEvent('keyup', {
|
|
171
|
+
key: 'ArrowDown',
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
180
174
|
expect(el.opened).to.be.true;
|
|
181
175
|
expect(el.checkedIndex).to.equal(0);
|
|
182
176
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
183
|
-
|
|
184
177
|
el.opened = false;
|
|
185
|
-
|
|
186
|
-
|
|
178
|
+
el.dispatchEvent(
|
|
179
|
+
new KeyboardEvent('keyup', {
|
|
180
|
+
key: 'ArrowUp',
|
|
181
|
+
}),
|
|
182
|
+
);
|
|
187
183
|
expect(el.opened).to.be.true;
|
|
188
184
|
expect(el.checkedIndex).to.equal(0);
|
|
189
185
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
190
186
|
});
|
|
191
|
-
|
|
192
187
|
it('does not open dropdown with [ArrowLeft] [ArrowRight] keys or navigates through the listbox options', async () => {
|
|
193
|
-
const el =
|
|
188
|
+
const el =
|
|
189
|
+
/** @type {LionSelectRich} */
|
|
194
190
|
await fixture(html`
|
|
195
191
|
<lion-select-rich interaction-mode="mac">
|
|
196
192
|
<lion-options slot="input">
|
|
@@ -199,27 +195,30 @@ describe('lion-select-rich interactions', () => {
|
|
|
199
195
|
<lion-option .choiceValue=${30}>Item 3</lion-option>
|
|
200
196
|
</lion-options>
|
|
201
197
|
</lion-select-rich>
|
|
202
|
-
`)
|
|
203
|
-
);
|
|
204
|
-
|
|
198
|
+
`);
|
|
205
199
|
const options = el.formElements;
|
|
206
200
|
expect(el.checkedIndex).to.equal(0);
|
|
207
201
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
202
|
+
el.dispatchEvent(
|
|
203
|
+
new KeyboardEvent('keyup', {
|
|
204
|
+
key: 'ArrowLeft',
|
|
205
|
+
}),
|
|
206
|
+
);
|
|
211
207
|
expect(el.opened).to.be.false;
|
|
212
208
|
expect(el.checkedIndex).to.equal(0);
|
|
213
209
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
214
|
-
|
|
215
|
-
|
|
210
|
+
el.dispatchEvent(
|
|
211
|
+
new KeyboardEvent('keyup', {
|
|
212
|
+
key: 'ArrowRight',
|
|
213
|
+
}),
|
|
214
|
+
);
|
|
216
215
|
expect(el.opened).to.be.false;
|
|
217
216
|
expect(el.checkedIndex).to.equal(0);
|
|
218
217
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
219
218
|
});
|
|
220
|
-
|
|
221
219
|
it('checks a value with [character] keys while listbox unopened', async () => {
|
|
222
|
-
const el =
|
|
220
|
+
const el =
|
|
221
|
+
/** @type {LionSelectRich} */
|
|
223
222
|
await fixture(html`
|
|
224
223
|
<lion-select-rich interaction-mode="mac">
|
|
225
224
|
<lion-options slot="input">
|
|
@@ -228,22 +227,20 @@ describe('lion-select-rich interactions', () => {
|
|
|
228
227
|
<lion-option .choiceValue=${'turquoise'}>Turquoise</lion-option>
|
|
229
228
|
</lion-options>
|
|
230
229
|
</lion-select-rich>
|
|
231
|
-
`)
|
|
232
|
-
);
|
|
230
|
+
`);
|
|
233
231
|
|
|
234
232
|
// @ts-ignore [allow-private] in test
|
|
235
233
|
mimicKeyPress(el, 't', 'KeyT');
|
|
236
234
|
expect(el.checkedIndex).to.equal(1);
|
|
237
|
-
|
|
238
235
|
mimicKeyPress(el, 'u', 'KeyU');
|
|
239
236
|
expect(el.checkedIndex).to.equal(2);
|
|
240
237
|
});
|
|
241
238
|
});
|
|
242
|
-
|
|
243
239
|
describe('Invoker Keyboard navigation Windows/Linux', () => {
|
|
244
240
|
it('navigation through list with [ArrowDown] [ArrowUp] keys checks the option while listbox unopened', async () => {
|
|
245
241
|
let isTriggeredByUser;
|
|
246
|
-
const el =
|
|
242
|
+
const el =
|
|
243
|
+
/** @type {LionSelectRich} */
|
|
247
244
|
await fixture(html`
|
|
248
245
|
<lion-select-rich
|
|
249
246
|
interaction-mode="windows/linux"
|
|
@@ -257,29 +254,32 @@ describe('lion-select-rich interactions', () => {
|
|
|
257
254
|
<lion-option .choiceValue=${30}>Item 3</lion-option>
|
|
258
255
|
</lion-options>
|
|
259
256
|
</lion-select-rich>
|
|
260
|
-
`)
|
|
261
|
-
);
|
|
262
|
-
|
|
257
|
+
`);
|
|
263
258
|
const options = el.formElements;
|
|
264
259
|
expect(el.checkedIndex).to.equal(0);
|
|
265
260
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
266
|
-
|
|
267
|
-
|
|
261
|
+
el.dispatchEvent(
|
|
262
|
+
new KeyboardEvent('keyup', {
|
|
263
|
+
key: 'ArrowDown',
|
|
264
|
+
}),
|
|
265
|
+
);
|
|
268
266
|
expect(el.checkedIndex).to.equal(1);
|
|
269
267
|
expectOnlyGivenOneOptionToBeChecked(options, 1);
|
|
270
268
|
expect(isTriggeredByUser).to.be.true;
|
|
271
|
-
|
|
272
269
|
isTriggeredByUser = false;
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
el.dispatchEvent(
|
|
271
|
+
new KeyboardEvent('keyup', {
|
|
272
|
+
key: 'ArrowUp',
|
|
273
|
+
}),
|
|
274
|
+
);
|
|
275
275
|
expect(el.checkedIndex).to.equal(0);
|
|
276
276
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
277
277
|
expect(isTriggeredByUser).to.be.true;
|
|
278
278
|
});
|
|
279
|
-
|
|
280
279
|
it('navigation through list with [ArrowLeft] [ArrowRight] keys checks the option while listbox unopened', async () => {
|
|
281
280
|
let isTriggeredByUser;
|
|
282
|
-
const el =
|
|
281
|
+
const el =
|
|
282
|
+
/** @type {LionSelectRich} */
|
|
283
283
|
await fixture(html`
|
|
284
284
|
<lion-select-rich
|
|
285
285
|
interaction-mode="windows/linux"
|
|
@@ -293,28 +293,31 @@ describe('lion-select-rich interactions', () => {
|
|
|
293
293
|
<lion-option .choiceValue=${30}>Item 3</lion-option>
|
|
294
294
|
</lion-options>
|
|
295
295
|
</lion-select-rich>
|
|
296
|
-
`)
|
|
297
|
-
);
|
|
298
|
-
|
|
296
|
+
`);
|
|
299
297
|
const options = el.formElements;
|
|
300
298
|
expect(el.checkedIndex).to.equal(0);
|
|
301
299
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
el.dispatchEvent(
|
|
301
|
+
new KeyboardEvent('keyup', {
|
|
302
|
+
key: 'ArrowRight',
|
|
303
|
+
}),
|
|
304
|
+
);
|
|
304
305
|
expect(el.checkedIndex).to.equal(1);
|
|
305
306
|
expectOnlyGivenOneOptionToBeChecked(options, 1);
|
|
306
307
|
expect(isTriggeredByUser).to.be.true;
|
|
307
|
-
|
|
308
308
|
isTriggeredByUser = false;
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
el.dispatchEvent(
|
|
310
|
+
new KeyboardEvent('keyup', {
|
|
311
|
+
key: 'ArrowLeft',
|
|
312
|
+
}),
|
|
313
|
+
);
|
|
311
314
|
expect(el.checkedIndex).to.equal(0);
|
|
312
315
|
expectOnlyGivenOneOptionToBeChecked(options, 0);
|
|
313
316
|
expect(isTriggeredByUser).to.be.true;
|
|
314
317
|
});
|
|
315
|
-
|
|
316
318
|
it('checks a value with [character] keys while listbox unopened', async () => {
|
|
317
|
-
const el =
|
|
319
|
+
const el =
|
|
320
|
+
/** @type {LionSelectRich} */
|
|
318
321
|
await fixture(html`
|
|
319
322
|
<lion-select-rich interaction-mode="windows/linux">
|
|
320
323
|
<lion-options slot="input">
|
|
@@ -323,53 +326,48 @@ describe('lion-select-rich interactions', () => {
|
|
|
323
326
|
<lion-option .choiceValue=${'turquoise'}>Turquoise</lion-option>
|
|
324
327
|
</lion-options>
|
|
325
328
|
</lion-select-rich>
|
|
326
|
-
`)
|
|
327
|
-
);
|
|
329
|
+
`);
|
|
328
330
|
|
|
329
331
|
// @ts-ignore [allow-private] in test
|
|
330
332
|
mimicKeyPress(el, 't', 'KeyT');
|
|
331
333
|
expect(el.checkedIndex).to.equal(1);
|
|
332
|
-
|
|
333
334
|
mimicKeyPress(el, 'u', 'KeyU');
|
|
334
335
|
expect(el.checkedIndex).to.equal(2);
|
|
335
336
|
});
|
|
336
337
|
});
|
|
337
|
-
|
|
338
338
|
describe('Disabled', () => {
|
|
339
339
|
it('invoker cannot be focused if disabled', async () => {
|
|
340
|
-
const el =
|
|
340
|
+
const el =
|
|
341
|
+
/** @type {LionSelectRich} */
|
|
341
342
|
await fixture(html`
|
|
342
343
|
<lion-select-rich disabled>
|
|
343
344
|
<lion-options slot="input"></lion-options>
|
|
344
345
|
</lion-select-rich>
|
|
345
|
-
`)
|
|
346
|
-
);
|
|
346
|
+
`);
|
|
347
347
|
const { _invokerNode } = getSelectRichMembers(el);
|
|
348
348
|
expect(_invokerNode.tabIndex).to.equal(-1);
|
|
349
349
|
});
|
|
350
|
-
|
|
351
350
|
it('cannot be opened via click if disabled', async () => {
|
|
352
|
-
const el =
|
|
351
|
+
const el =
|
|
352
|
+
/** @type {LionSelectRich} */
|
|
353
353
|
await fixture(html`
|
|
354
354
|
<lion-select-rich disabled>
|
|
355
355
|
<lion-options slot="input"></lion-options>
|
|
356
356
|
</lion-select-rich>
|
|
357
|
-
`)
|
|
358
|
-
);
|
|
357
|
+
`);
|
|
359
358
|
const { _invokerNode, _overlayCtrl } = getSelectRichMembers(el);
|
|
360
359
|
_invokerNode.click();
|
|
361
360
|
await _overlayCtrl._showComplete;
|
|
362
361
|
expect(el.opened).to.be.false;
|
|
363
362
|
});
|
|
364
|
-
|
|
365
363
|
it('reflects disabled attribute to invoker', async () => {
|
|
366
|
-
const el =
|
|
364
|
+
const el =
|
|
365
|
+
/** @type {LionSelectRich} */
|
|
367
366
|
await fixture(html`
|
|
368
367
|
<lion-select-rich disabled>
|
|
369
368
|
<lion-options slot="input"></lion-options>
|
|
370
369
|
</lion-select-rich>
|
|
371
|
-
`)
|
|
372
|
-
);
|
|
370
|
+
`);
|
|
373
371
|
const { _invokerNode } = getSelectRichMembers(el);
|
|
374
372
|
expect(_invokerNode.hasAttribute('disabled')).to.be.true;
|
|
375
373
|
el.removeAttribute('disabled');
|
|
@@ -377,10 +375,10 @@ describe('lion-select-rich interactions', () => {
|
|
|
377
375
|
expect(_invokerNode.hasAttribute('disabled')).to.be.false;
|
|
378
376
|
});
|
|
379
377
|
});
|
|
380
|
-
|
|
381
378
|
describe('Interaction states', () => {
|
|
382
379
|
it('becomes touched if blurred once', async () => {
|
|
383
|
-
const el =
|
|
380
|
+
const el =
|
|
381
|
+
/** @type {LionSelectRich} */
|
|
384
382
|
await fixture(html`
|
|
385
383
|
<lion-select-rich>
|
|
386
384
|
<lion-options slot="input">
|
|
@@ -388,8 +386,7 @@ describe('lion-select-rich interactions', () => {
|
|
|
388
386
|
<lion-option .choiceValue=${20}>Item 2</lion-option>
|
|
389
387
|
</lion-options>
|
|
390
388
|
</lion-select-rich>
|
|
391
|
-
`)
|
|
392
|
-
);
|
|
389
|
+
`);
|
|
393
390
|
const { _invokerNode } = getSelectRichMembers(el);
|
|
394
391
|
expect(el.touched).to.be.false;
|
|
395
392
|
await triggerFocusFor(_invokerNode);
|
|
@@ -397,30 +394,33 @@ describe('lion-select-rich interactions', () => {
|
|
|
397
394
|
expect(el.touched).to.be.true;
|
|
398
395
|
});
|
|
399
396
|
});
|
|
400
|
-
|
|
401
397
|
describe('Accessibility', () => {
|
|
402
398
|
it('sets [aria-invalid="true"] to "._invokerNode" when there is an error', async () => {
|
|
403
|
-
const el =
|
|
399
|
+
const el =
|
|
400
|
+
/** @type {LionSelectRich} */
|
|
404
401
|
await fixture(html`
|
|
405
402
|
<lion-select-rich .validators=${[new Required()]}>
|
|
406
403
|
<lion-options slot="input">
|
|
407
404
|
<lion-option .choiceValue=${null}>Please select a value</lion-option>
|
|
408
|
-
<lion-option
|
|
405
|
+
<lion-option
|
|
406
|
+
.modelValue=${{
|
|
407
|
+
value: 10,
|
|
408
|
+
checked: true,
|
|
409
|
+
}}
|
|
410
|
+
>Item 1</lion-option
|
|
411
|
+
>
|
|
409
412
|
</lion-options>
|
|
410
413
|
</lion-select-rich>
|
|
411
|
-
`)
|
|
412
|
-
);
|
|
414
|
+
`);
|
|
413
415
|
const { _invokerNode } = getSelectRichMembers(el);
|
|
414
416
|
const options = el.formElements;
|
|
415
417
|
await el.feedbackComplete;
|
|
416
418
|
await el.updateComplete;
|
|
417
419
|
expect(_invokerNode.getAttribute('aria-invalid')).to.equal('false');
|
|
418
|
-
|
|
419
420
|
options[0].checked = true;
|
|
420
421
|
await el.feedbackComplete;
|
|
421
422
|
await el.updateComplete;
|
|
422
423
|
expect(_invokerNode.getAttribute('aria-invalid')).to.equal('true');
|
|
423
|
-
|
|
424
424
|
options[1].checked = true;
|
|
425
425
|
await el.feedbackComplete;
|
|
426
426
|
await el.updateComplete;
|