@lion/ui 0.22.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 +65 -0
- 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 +45 -55
- 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 +598 -860
- 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 -357
- 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-core/types/choice-group/ChoiceGroupMixinTypes.ts +5 -0
- 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 +37 -26
- package/components/input-amount/src/formatters.js +4 -5
- package/components/input-amount/src/parsers.js +0 -3
- package/components/input-amount/test/formatters.test.js +102 -80
- package/components/input-amount/test/lion-input-amount-integrations.test.js +0 -4
- package/components/input-amount/test/lion-input-amount.test.js +155 -164
- 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 +15 -13
- 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 +801 -819
- 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/listbox/types/ListboxMixinTypes.ts +7 -1
- 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/README.md +360 -0
- package/components/menu/src/InteractiveListMixin.js +866 -0
- package/components/menu/src/LionMenu.js +423 -0
- package/components/menu/src/MoreButtonMenuMixin.js +272 -0
- package/components/menu/src/MultiLevelListMixin.js +306 -0
- package/components/menu/src/utils/isInView.js +25 -0
- package/components/menu/src/utils/listItemInteractions.js +124 -0
- package/components/menu/test/InteractiveListMixin.test.js +2 -0
- package/components/menu/test/MoreButtonMenuMixin.test.js +5 -0
- package/components/menu/test/MultiLevelListMixin.test.js +2 -0
- package/components/menu/test/lion-menu-interactions.test.js +2 -0
- package/components/menu/test/lion-menu.test.js +18 -0
- package/components/menu/test-helpers/mimicKeyPress.js +19 -0
- package/components/menu/test-suites/InteractiveListMixin.suite.js +498 -0
- package/components/menu/test-suites/LionMenu.suite.js +107 -0
- package/components/menu/test-suites/LionMenuInteractions.suite.js +561 -0
- package/components/menu/test-suites/MoreButtonMenuMixin.suite.js +365 -0
- package/components/menu/test-suites/MultiLevelListMixin.suite.js +291 -0
- package/components/menu/types/InteractiveListMixinTypes.ts +126 -0
- package/components/menu/types/MoreButtonMenuMixinTypes.ts +51 -0
- package/components/menu/types/MultiLevelListMixinTypes.ts +28 -0
- package/components/menu/types/OverlayWithListInvokerMixinTypes.ts +61 -0
- package/components/overlays/NEXT.md +49 -0
- package/components/overlays/src/ArrowMixin.js +111 -127
- package/components/overlays/src/OverlayController.js +440 -246
- package/components/overlays/src/OverlayMixin.js +130 -68
- 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 +19 -19
- 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 +14 -6
- 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 +551 -533
- 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 +159 -188
- 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/overlays/types/ArrowMixinTypes.ts +1 -3
- package/components/overlays/types/OverlayConfig.ts +20 -5
- package/components/overlays/types/OverlayMixinTypes.ts +2 -0
- 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 +32 -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 +154 -101
- package/components/select-rich/test/lion-select-rich-upgrade.test.js +26 -0
- 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 +3312 -206
- package/dist-types/components/combobox/src/LionCombobox.d.ts +1 -1
- package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
- 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/dialog/src/LionDialog.d.ts +6 -2
- package/dist-types/components/dialog/src/LionDialog.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/form-core/src/choice-group/ChoiceGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/types/choice-group/ChoiceGroupMixinTypes.d.ts +5 -0
- package/dist-types/components/form-core/types/choice-group/ChoiceGroupMixinTypes.d.ts.map +1 -1
- package/dist-types/components/input-amount/src/LionInputAmount.d.ts +3 -1
- package/dist-types/components/input-amount/src/LionInputAmount.d.ts.map +1 -1
- package/dist-types/components/input-amount/src/formatters.d.ts +6 -4
- package/dist-types/components/input-amount/src/formatters.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +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/listbox/src/ListboxMixin.d.ts.map +1 -1
- package/dist-types/components/listbox/types/ListboxMixinTypes.d.ts +7 -1
- package/dist-types/components/listbox/types/ListboxMixinTypes.d.ts.map +1 -1
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts +35 -0
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenu.d.ts +129 -0
- package/dist-types/components/menu/src/LionMenu.d.ts.map +1 -0
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts +8 -0
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts +7 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts +9 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts +48 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts.map +1 -0
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts +2 -0
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts +2 -0
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts +2 -0
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/lion-menu-interactions.test.d.ts +2 -0
- package/dist-types/components/menu/test/lion-menu-interactions.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts +2 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts.map +1 -0
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts +7 -0
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +11 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts +9 -0
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts +5 -0
- package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts +11 -0
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts +11 -0
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts.map +1 -0
- package/dist-types/components/menu/types/InteractiveListMixinTypes.d.ts +72 -0
- package/dist-types/components/menu/types/InteractiveListMixinTypes.d.ts.map +1 -0
- package/dist-types/components/menu/types/MoreButtonMenuMixinTypes.d.ts +30 -0
- package/dist-types/components/menu/types/MoreButtonMenuMixinTypes.d.ts.map +1 -0
- package/dist-types/components/menu/types/MultiLevelListMixinTypes.d.ts +16 -0
- package/dist-types/components/menu/types/MultiLevelListMixinTypes.d.ts.map +1 -0
- package/dist-types/components/menu/types/OverlayWithListInvokerMixinTypes.d.ts +35 -0
- package/dist-types/components/menu/types/OverlayWithListInvokerMixinTypes.d.ts.map +1 -0
- package/dist-types/components/overlays/src/OverlayController.d.ts +22 -5
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.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/overlays/src/utils/is-equal-config.d.ts.map +1 -1
- package/dist-types/components/overlays/types/ArrowMixinTypes.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayConfig.d.ts +12 -2
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts +1 -0
- package/dist-types/components/overlays/types/OverlayMixinTypes.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 +13 -2
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/components/select-rich/test/lion-select-rich-interaction.test.d.ts.map +1 -1
- package/dist-types/components/select-rich/test/lion-select-rich-upgrade.test.d.ts +2 -0
- package/dist-types/components/select-rich/test/lion-select-rich-upgrade.test.d.ts.map +1 -0
- package/dist-types/components/tooltip/src/LionTooltip.d.ts +1 -1
- package/dist-types/exports/define/lion-item.d.ts +2 -0
- package/dist-types/exports/define/lion-item.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menu.d.ts +2 -0
- package/dist-types/exports/define/lion-menu.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menuitem.d.ts +2 -0
- package/dist-types/exports/define/lion-menuitem.d.ts.map +1 -0
- package/dist-types/exports/menu-test-suites.d.ts +4 -0
- package/dist-types/exports/menu-test-suites.d.ts.map +1 -0
- package/dist-types/exports/menu.d.ts +3 -0
- package/dist-types/exports/menu.d.ts.map +1 -0
- package/dist-types/exports/overlays.d.ts +6 -0
- package/dist-types/exports/overlays.d.ts.map +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/api-table.md +53 -39
- 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/api-table.md +32 -6
- 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/api-table.md +9 -7
- package/docs/components/input-amount/overview.md +5 -5
- package/docs/components/input-amount/use-cases.md +17 -6
- package/docs/components/input-amount-dropdown/api-table.md +2 -0
- 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/api-table.md +63 -45
- 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/api-table.md +44 -0
- package/docs/components/menu/applyMenuDemoStyles.js +173 -0
- package/docs/components/menu/extensions.md +262 -0
- package/docs/components/menu/index.md +13 -0
- package/docs/components/menu/migration.md +129 -0
- package/docs/components/menu/overview.md +448 -0
- package/docs/components/menu/src/DemoNavigationBar.js +441 -0
- package/docs/components/menu/src/DemoSpinButton.js +215 -0
- package/docs/components/menu/src/DemoToolbar.js +101 -0
- package/docs/components/menu/src/DemoTree.js +55 -0
- package/docs/components/menu/src/navigation-bar-types.js +41 -0
- package/docs/components/menu/use-cases.md +74 -0
- 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/api-table.md +51 -33
- 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/api-table.md +33 -7
- 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 +3 -3
- 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/api-table.md +46 -43
- 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 +2 -0
- package/exports/define/lion-listbox.js +0 -1
- package/exports/define/lion-menu.js +2 -0
- package/exports/define/lion-menuitem.js +2 -0
- 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/menu-test-suites.js +4 -0
- package/exports/menu.js +3 -0
- package/exports/overlays.js +6 -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/menu-test-suites.js +4 -0
- package/menu.js +3 -0
- package/overlays.js +6 -0
- package/package.json +35 -6
- package/vscode.html-custom-data.json +76 -8
- package/web-types.json +202 -17
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { expect, fixture } from '@open-wc/testing';
|
|
2
2
|
import { html } from 'lit/static-html.js';
|
|
3
3
|
import sinon from 'sinon';
|
|
4
|
-
|
|
5
4
|
import { isActiveElement } from '../../core/test-helpers/isActiveElement.js';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* @typedef {import('../src/LionTabs.js').LionTabs} LionTabs
|
|
9
8
|
*/
|
|
10
9
|
import '@lion/ui/define/lion-tabs.js';
|
|
11
|
-
|
|
12
10
|
const basicTabs = html`
|
|
13
11
|
<lion-tabs>
|
|
14
12
|
<button slot="tab">tab 1</button>
|
|
@@ -21,16 +19,15 @@ const basicTabs = html`
|
|
|
21
19
|
<div slot="panel">panel 4</div>
|
|
22
20
|
</lion-tabs>
|
|
23
21
|
`;
|
|
24
|
-
|
|
25
22
|
describe('<lion-tabs>', () => {
|
|
26
23
|
describe('Tabs', () => {
|
|
27
24
|
it('sets selectedIndex to 0 by default', async () => {
|
|
28
|
-
const el = /** @type {LionTabs} */
|
|
25
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
29
26
|
expect(el.selectedIndex).to.equal(0);
|
|
30
27
|
});
|
|
31
|
-
|
|
32
28
|
it('can programmatically set selectedIndex', async () => {
|
|
33
|
-
const el =
|
|
29
|
+
const el =
|
|
30
|
+
/** @type {LionTabs} */
|
|
34
31
|
await fixture(html`
|
|
35
32
|
<lion-tabs .selectedIndex=${1}>
|
|
36
33
|
<div slot="tab">tab 1</div>
|
|
@@ -38,53 +35,46 @@ describe('<lion-tabs>', () => {
|
|
|
38
35
|
<div slot="tab">tab 2</div>
|
|
39
36
|
<div slot="panel">panel 2</div>
|
|
40
37
|
</lion-tabs>
|
|
41
|
-
`)
|
|
42
|
-
);
|
|
38
|
+
`);
|
|
43
39
|
expect(el.selectedIndex).to.equal(1);
|
|
44
|
-
let selectedTab =
|
|
40
|
+
let selectedTab =
|
|
41
|
+
/** @type {Element} */
|
|
45
42
|
Array.from(el.children).find(
|
|
46
|
-
child => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
47
|
-
)
|
|
48
|
-
);
|
|
43
|
+
(child) => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
44
|
+
);
|
|
49
45
|
expect(selectedTab.textContent).to.equal('tab 2');
|
|
50
|
-
|
|
51
46
|
el.selectedIndex = 0;
|
|
52
|
-
selectedTab =
|
|
47
|
+
selectedTab =
|
|
48
|
+
/** @type {Element} */
|
|
53
49
|
Array.from(el.children).find(
|
|
54
|
-
child => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
55
|
-
)
|
|
56
|
-
);
|
|
50
|
+
(child) => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
51
|
+
);
|
|
57
52
|
expect(selectedTab.textContent).to.equal('tab 1');
|
|
58
53
|
});
|
|
59
|
-
|
|
60
54
|
it('has [selected] on current selected tab which serves as styling hook', async () => {
|
|
61
|
-
const el = /** @type {LionTabs} */
|
|
55
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
62
56
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
63
57
|
el.selectedIndex = 0;
|
|
64
58
|
expect(tabs[0]).to.have.attribute('selected');
|
|
65
59
|
expect(tabs[1]).to.not.have.attribute('selected');
|
|
66
|
-
|
|
67
60
|
el.selectedIndex = 1;
|
|
68
61
|
expect(tabs[0]).to.not.have.attribute('selected');
|
|
69
62
|
expect(tabs[1]).to.have.attribute('selected');
|
|
70
63
|
});
|
|
71
|
-
|
|
72
64
|
it('sends event "selected-changed" for every selected state change', async () => {
|
|
73
|
-
const el = /** @type {LionTabs} */
|
|
65
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
74
66
|
const spy = sinon.spy();
|
|
75
67
|
el.addEventListener('selected-changed', spy);
|
|
76
68
|
el.selectedIndex = 1;
|
|
77
69
|
expect(spy).to.have.been.calledOnce;
|
|
78
70
|
});
|
|
79
|
-
|
|
80
71
|
it('does not send event "selected-changed" after selecting currently selected tab', async () => {
|
|
81
|
-
const el = /** @type {LionTabs} */
|
|
72
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
82
73
|
const spy = sinon.spy();
|
|
83
74
|
el.addEventListener('selected-changed', spy);
|
|
84
75
|
el.selectedIndex = 0;
|
|
85
76
|
expect(spy).not.to.have.been.called;
|
|
86
77
|
});
|
|
87
|
-
|
|
88
78
|
it('logs warning if unequal amount of tabs and panels', async () => {
|
|
89
79
|
const stub = sinon.stub(console, 'warn');
|
|
90
80
|
await fixture(html`
|
|
@@ -99,9 +89,9 @@ describe('<lion-tabs>', () => {
|
|
|
99
89
|
);
|
|
100
90
|
stub.restore();
|
|
101
91
|
});
|
|
102
|
-
|
|
103
92
|
it('only takes direct children into account', async () => {
|
|
104
|
-
const el =
|
|
93
|
+
const el =
|
|
94
|
+
/** @type {LionTabs} */
|
|
105
95
|
await fixture(html`
|
|
106
96
|
<lion-tabs>
|
|
107
97
|
<button slot="tab">tab 1</button>
|
|
@@ -112,34 +102,31 @@ describe('<lion-tabs>', () => {
|
|
|
112
102
|
<button slot="tab">tab 2</button>
|
|
113
103
|
<div slot="panel">panel 2</div>
|
|
114
104
|
</lion-tabs>
|
|
115
|
-
`)
|
|
116
|
-
);
|
|
105
|
+
`);
|
|
117
106
|
el.selectedIndex = 1;
|
|
118
|
-
const selectedTab =
|
|
107
|
+
const selectedTab =
|
|
108
|
+
/** @type {Element} */
|
|
119
109
|
Array.from(el.children).find(
|
|
120
|
-
child => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
121
|
-
)
|
|
122
|
-
);
|
|
110
|
+
(child) => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
111
|
+
);
|
|
123
112
|
expect(selectedTab.textContent).to.equal('tab 2');
|
|
124
113
|
});
|
|
125
|
-
|
|
126
114
|
it('can initially be instantiated without children', async () => {
|
|
127
|
-
const el = /** @type {LionTabs} */
|
|
115
|
+
const el = /** @type {LionTabs} */ await fixture(html` <lion-tabs> </lion-tabs> `);
|
|
128
116
|
expect(el.tabs).to.eql([]);
|
|
129
117
|
});
|
|
130
118
|
});
|
|
131
|
-
|
|
132
119
|
describe('Tabs ([slot=tab])', () => {
|
|
133
120
|
it('adds role=tab', async () => {
|
|
134
|
-
const el =
|
|
121
|
+
const el =
|
|
122
|
+
/** @type {LionTabs} */
|
|
135
123
|
await fixture(html`
|
|
136
124
|
<lion-tabs>
|
|
137
125
|
<button slot="tab">tab</button>
|
|
138
126
|
<div slot="panel">panel</div>
|
|
139
127
|
</lion-tabs>
|
|
140
|
-
`)
|
|
141
|
-
)
|
|
142
|
-
expect(Array.from(el.children).find(child => child.slot === 'tab')).to.have.attribute(
|
|
128
|
+
`);
|
|
129
|
+
expect(Array.from(el.children).find((child) => child.slot === 'tab')).to.have.attribute(
|
|
143
130
|
'role',
|
|
144
131
|
'tab',
|
|
145
132
|
);
|
|
@@ -150,20 +137,17 @@ describe('<lion-tabs>', () => {
|
|
|
150
137
|
* - has flexible html that allows animations like the material design underline
|
|
151
138
|
*/
|
|
152
139
|
});
|
|
153
|
-
|
|
154
140
|
describe('Tab Panels (slot=panel)', () => {
|
|
155
141
|
it('are visible when corresponding tab is selected ', async () => {
|
|
156
|
-
const el = /** @type {LionTabs} */
|
|
142
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
157
143
|
const panels = el.querySelectorAll('[slot=panel]');
|
|
158
144
|
el.selectedIndex = 0;
|
|
159
145
|
expect(panels[0]).to.be.visible;
|
|
160
146
|
expect(panels[1]).to.be.not.visible;
|
|
161
|
-
|
|
162
147
|
el.selectedIndex = 1;
|
|
163
148
|
expect(panels[0]).to.be.not.visible;
|
|
164
149
|
expect(panels[1]).to.be.visible;
|
|
165
150
|
});
|
|
166
|
-
|
|
167
151
|
it.skip('have a DOM structure that allows them to be animated ', async () => {});
|
|
168
152
|
});
|
|
169
153
|
|
|
@@ -177,23 +161,30 @@ describe('<lion-tabs>', () => {
|
|
|
177
161
|
*/
|
|
178
162
|
describe('User interaction', () => {
|
|
179
163
|
it('selects a tab on click', async () => {
|
|
180
|
-
const el = /** @type {LionTabs} */
|
|
164
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
181
165
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
182
166
|
tabs[1].dispatchEvent(new Event('click'));
|
|
183
167
|
expect(el.selectedIndex).to.equal(1);
|
|
184
168
|
});
|
|
185
|
-
|
|
186
169
|
it('selects next tab on [arrow-right] and [arrow-down]', async () => {
|
|
187
|
-
const el = /** @type {LionTabs} */
|
|
170
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
188
171
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
189
|
-
tabs[0].dispatchEvent(
|
|
172
|
+
tabs[0].dispatchEvent(
|
|
173
|
+
new KeyboardEvent('keyup', {
|
|
174
|
+
key: 'ArrowRight',
|
|
175
|
+
}),
|
|
176
|
+
);
|
|
190
177
|
expect(el.selectedIndex).to.equal(1);
|
|
191
|
-
tabs[1].dispatchEvent(
|
|
178
|
+
tabs[1].dispatchEvent(
|
|
179
|
+
new KeyboardEvent('keyup', {
|
|
180
|
+
key: 'ArrowDown',
|
|
181
|
+
}),
|
|
182
|
+
);
|
|
192
183
|
expect(el.selectedIndex).to.equal(2);
|
|
193
184
|
});
|
|
194
|
-
|
|
195
185
|
it('selects previous tab on [arrow-left] and [arrow-up]', async () => {
|
|
196
|
-
const el =
|
|
186
|
+
const el =
|
|
187
|
+
/** @type {LionTabs} */
|
|
197
188
|
await fixture(html`
|
|
198
189
|
<lion-tabs .selectedIndex=${1}>
|
|
199
190
|
<button slot="tab">tab 1</button>
|
|
@@ -203,18 +194,25 @@ describe('<lion-tabs>', () => {
|
|
|
203
194
|
<button slot="tab">tab 3</button>
|
|
204
195
|
<div slot="panel">panel 3</div>
|
|
205
196
|
</lion-tabs>
|
|
206
|
-
`)
|
|
207
|
-
);
|
|
197
|
+
`);
|
|
208
198
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
209
199
|
el.selectedIndex = 2;
|
|
210
|
-
tabs[2].dispatchEvent(
|
|
200
|
+
tabs[2].dispatchEvent(
|
|
201
|
+
new KeyboardEvent('keyup', {
|
|
202
|
+
key: 'ArrowLeft',
|
|
203
|
+
}),
|
|
204
|
+
);
|
|
211
205
|
expect(el.selectedIndex).to.equal(1);
|
|
212
|
-
tabs[1].dispatchEvent(
|
|
206
|
+
tabs[1].dispatchEvent(
|
|
207
|
+
new KeyboardEvent('keyup', {
|
|
208
|
+
key: 'ArrowUp',
|
|
209
|
+
}),
|
|
210
|
+
);
|
|
213
211
|
expect(el.selectedIndex).to.equal(0);
|
|
214
212
|
});
|
|
215
|
-
|
|
216
213
|
it('selects first tab on [home]', async () => {
|
|
217
|
-
const el =
|
|
214
|
+
const el =
|
|
215
|
+
/** @type {LionTabs} */
|
|
218
216
|
await fixture(html`
|
|
219
217
|
<lion-tabs .selectedIndex=${1}>
|
|
220
218
|
<button slot="tab">tab 1</button>
|
|
@@ -222,22 +220,28 @@ describe('<lion-tabs>', () => {
|
|
|
222
220
|
<button slot="tab">tab 2</button>
|
|
223
221
|
<div slot="panel">panel 2</div>
|
|
224
222
|
</lion-tabs>
|
|
225
|
-
`)
|
|
226
|
-
);
|
|
223
|
+
`);
|
|
227
224
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
228
|
-
tabs[1].dispatchEvent(
|
|
225
|
+
tabs[1].dispatchEvent(
|
|
226
|
+
new KeyboardEvent('keyup', {
|
|
227
|
+
key: 'Home',
|
|
228
|
+
}),
|
|
229
|
+
);
|
|
229
230
|
expect(el.selectedIndex).to.equal(0);
|
|
230
231
|
});
|
|
231
|
-
|
|
232
232
|
it('selects last tab on [end]', async () => {
|
|
233
|
-
const el = /** @type {LionTabs} */
|
|
233
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
234
234
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
235
|
-
tabs[0].dispatchEvent(
|
|
235
|
+
tabs[0].dispatchEvent(
|
|
236
|
+
new KeyboardEvent('keyup', {
|
|
237
|
+
key: 'End',
|
|
238
|
+
}),
|
|
239
|
+
);
|
|
236
240
|
expect(el.selectedIndex).to.equal(3);
|
|
237
241
|
});
|
|
238
|
-
|
|
239
242
|
it('selects first tab on [arrow-right] if on last tab', async () => {
|
|
240
|
-
const el =
|
|
243
|
+
const el =
|
|
244
|
+
/** @type {LionTabs} */
|
|
241
245
|
await fixture(html`
|
|
242
246
|
<lion-tabs .selectedIndex=${2}>
|
|
243
247
|
<button slot="tab">tab 1</button>
|
|
@@ -247,15 +251,18 @@ describe('<lion-tabs>', () => {
|
|
|
247
251
|
<button slot="tab">tab 3</button>
|
|
248
252
|
<div slot="panel">panel 3</div>
|
|
249
253
|
</lion-tabs>
|
|
250
|
-
`)
|
|
251
|
-
);
|
|
254
|
+
`);
|
|
252
255
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
253
|
-
tabs[2].dispatchEvent(
|
|
256
|
+
tabs[2].dispatchEvent(
|
|
257
|
+
new KeyboardEvent('keyup', {
|
|
258
|
+
key: 'ArrowRight',
|
|
259
|
+
}),
|
|
260
|
+
);
|
|
254
261
|
expect(el.selectedIndex).to.equal(0);
|
|
255
262
|
});
|
|
256
|
-
|
|
257
263
|
it('selects last tab on [arrow-left] if on first tab', async () => {
|
|
258
|
-
const el =
|
|
264
|
+
const el =
|
|
265
|
+
/** @type {LionTabs} */
|
|
259
266
|
await fixture(html`
|
|
260
267
|
<lion-tabs>
|
|
261
268
|
<button slot="tab">tab 1</button>
|
|
@@ -265,15 +272,18 @@ describe('<lion-tabs>', () => {
|
|
|
265
272
|
<button slot="tab">tab 3</button>
|
|
266
273
|
<div slot="panel">panel 3</div>
|
|
267
274
|
</lion-tabs>
|
|
268
|
-
`)
|
|
269
|
-
);
|
|
275
|
+
`);
|
|
270
276
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
271
|
-
tabs[0].dispatchEvent(
|
|
277
|
+
tabs[0].dispatchEvent(
|
|
278
|
+
new KeyboardEvent('keyup', {
|
|
279
|
+
key: 'ArrowLeft',
|
|
280
|
+
}),
|
|
281
|
+
);
|
|
272
282
|
expect(el.selectedIndex).to.equal(2);
|
|
273
283
|
});
|
|
274
|
-
|
|
275
284
|
it('selects next available not disabled tab if first tab is disabled', async () => {
|
|
276
|
-
const el =
|
|
285
|
+
const el =
|
|
286
|
+
/** @type {LionTabs} */
|
|
277
287
|
await fixture(html`
|
|
278
288
|
<lion-tabs>
|
|
279
289
|
<button slot="tab" disabled>tab 1</button>
|
|
@@ -283,13 +293,12 @@ describe('<lion-tabs>', () => {
|
|
|
283
293
|
<button slot="tab">tab 3</button>
|
|
284
294
|
<div slot="panel">panel 3</div>
|
|
285
295
|
</lion-tabs>
|
|
286
|
-
`)
|
|
287
|
-
);
|
|
296
|
+
`);
|
|
288
297
|
expect(el.selectedIndex).to.equal(1);
|
|
289
298
|
});
|
|
290
|
-
|
|
291
299
|
it('selects next available not disabled tab on [arrow-right] and [arrow-down]', async () => {
|
|
292
|
-
const el =
|
|
300
|
+
const el =
|
|
301
|
+
/** @type {LionTabs} */
|
|
293
302
|
await fixture(html`
|
|
294
303
|
<lion-tabs>
|
|
295
304
|
<button slot="tab">tab 1</button>
|
|
@@ -301,15 +310,18 @@ describe('<lion-tabs>', () => {
|
|
|
301
310
|
<button slot="tab" disabled>tab 3</button>
|
|
302
311
|
<div slot="panel">panel 3</div>
|
|
303
312
|
</lion-tabs>
|
|
304
|
-
`)
|
|
305
|
-
);
|
|
313
|
+
`);
|
|
306
314
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
307
|
-
tabs[0].dispatchEvent(
|
|
315
|
+
tabs[0].dispatchEvent(
|
|
316
|
+
new KeyboardEvent('keyup', {
|
|
317
|
+
key: 'ArrowRight',
|
|
318
|
+
}),
|
|
319
|
+
);
|
|
308
320
|
expect(el.selectedIndex).to.equal(2);
|
|
309
321
|
});
|
|
310
|
-
|
|
311
322
|
it('selects next available not disabled tab on [arrow-left] and [arrow-up]', async () => {
|
|
312
|
-
const el =
|
|
323
|
+
const el =
|
|
324
|
+
/** @type {LionTabs} */
|
|
313
325
|
await fixture(html`
|
|
314
326
|
<lion-tabs>
|
|
315
327
|
<button slot="tab">tab 1</button>
|
|
@@ -321,16 +333,19 @@ describe('<lion-tabs>', () => {
|
|
|
321
333
|
<button slot="tab" disabled>tab 3</button>
|
|
322
334
|
<div slot="panel">panel 3</div>
|
|
323
335
|
</lion-tabs>
|
|
324
|
-
`)
|
|
325
|
-
);
|
|
336
|
+
`);
|
|
326
337
|
el.selectedIndex = 2;
|
|
327
338
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
328
|
-
tabs[2].dispatchEvent(
|
|
339
|
+
tabs[2].dispatchEvent(
|
|
340
|
+
new KeyboardEvent('keyup', {
|
|
341
|
+
key: 'ArrowLeft',
|
|
342
|
+
}),
|
|
343
|
+
);
|
|
329
344
|
expect(el.selectedIndex).to.equal(0);
|
|
330
345
|
});
|
|
331
|
-
|
|
332
346
|
it('cycles through tabs even if the last or first tabs are disabled', async () => {
|
|
333
|
-
const el =
|
|
347
|
+
const el =
|
|
348
|
+
/** @type {LionTabs} */
|
|
334
349
|
await fixture(html`
|
|
335
350
|
<lion-tabs>
|
|
336
351
|
<button slot="tab" disabled>tab 0</button>
|
|
@@ -342,24 +357,30 @@ describe('<lion-tabs>', () => {
|
|
|
342
357
|
<button slot="tab" disabled>tab 3</button>
|
|
343
358
|
<div slot="panel">panel 3</div>
|
|
344
359
|
</lion-tabs>
|
|
345
|
-
`)
|
|
346
|
-
);
|
|
360
|
+
`);
|
|
347
361
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
348
362
|
el.selectedIndex = 1;
|
|
349
363
|
|
|
350
364
|
// 0 is disabled, same for 3, so should go to 2
|
|
351
|
-
tabs[1].dispatchEvent(
|
|
365
|
+
tabs[1].dispatchEvent(
|
|
366
|
+
new KeyboardEvent('keyup', {
|
|
367
|
+
key: 'ArrowLeft',
|
|
368
|
+
}),
|
|
369
|
+
);
|
|
352
370
|
expect(el.selectedIndex).to.equal(2);
|
|
353
371
|
|
|
354
372
|
// 3 is disabled, same for 0, so should go to 1
|
|
355
|
-
tabs[2].dispatchEvent(
|
|
373
|
+
tabs[2].dispatchEvent(
|
|
374
|
+
new KeyboardEvent('keyup', {
|
|
375
|
+
key: 'ArrowRight',
|
|
376
|
+
}),
|
|
377
|
+
);
|
|
356
378
|
expect(el.selectedIndex).to.equal(1);
|
|
357
379
|
});
|
|
358
380
|
});
|
|
359
|
-
|
|
360
381
|
describe('Content distribution', () => {
|
|
361
382
|
it('should work with append children', async () => {
|
|
362
|
-
const el = /** @type {LionTabs} */
|
|
383
|
+
const el = /** @type {LionTabs} */ await fixture(basicTabs);
|
|
363
384
|
const c = 2;
|
|
364
385
|
const n = el.children.length / 2;
|
|
365
386
|
for (let i = n + 1; i < n + c + 1; i += 1) {
|
|
@@ -375,20 +396,19 @@ describe('<lion-tabs>', () => {
|
|
|
375
396
|
el.selectedIndex = el.children.length / 2 - 1;
|
|
376
397
|
await el.updateComplete;
|
|
377
398
|
const selectedTab = Array.from(el.children).find(
|
|
378
|
-
child => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
399
|
+
(child) => child.slot === 'tab' && child.hasAttribute('selected'),
|
|
379
400
|
);
|
|
380
401
|
expect(selectedTab && selectedTab.textContent).to.equal('tab 6');
|
|
381
|
-
|
|
382
402
|
const selectedPanel = Array.from(el.children).find(
|
|
383
|
-
child => child.slot === 'panel' && child.hasAttribute('selected'),
|
|
403
|
+
(child) => child.slot === 'panel' && child.hasAttribute('selected'),
|
|
384
404
|
);
|
|
385
405
|
expect(selectedPanel && selectedPanel.textContent).to.equal('panel 6');
|
|
386
406
|
});
|
|
387
407
|
});
|
|
388
|
-
|
|
389
408
|
describe('Initializing without Focus', () => {
|
|
390
409
|
it('does not focus a tab when setting selectedIndex property', async () => {
|
|
391
|
-
const el =
|
|
410
|
+
const el =
|
|
411
|
+
/** @type {LionTabs} */
|
|
392
412
|
await fixture(html`
|
|
393
413
|
<lion-tabs>
|
|
394
414
|
<button slot="tab">tab 1</button>
|
|
@@ -396,18 +416,14 @@ describe('<lion-tabs>', () => {
|
|
|
396
416
|
<button slot="tab">tab 2</button>
|
|
397
417
|
<div slot="panel">panel 2</div>
|
|
398
418
|
</lion-tabs>
|
|
399
|
-
`)
|
|
400
|
-
);
|
|
401
|
-
|
|
402
|
-
const secondTab = /** @type {HTMLElement} */ (
|
|
403
|
-
el.querySelector('[slot="tab"]:nth-of-type(2)')
|
|
404
|
-
);
|
|
419
|
+
`);
|
|
420
|
+
const secondTab = /** @type {HTMLElement} */ el.querySelector('[slot="tab"]:nth-of-type(2)');
|
|
405
421
|
el.selectedIndex = 1;
|
|
406
422
|
expect(isActiveElement(secondTab)).to.be.false;
|
|
407
423
|
});
|
|
408
|
-
|
|
409
424
|
it('does not focus a tab on firstUpdate', async () => {
|
|
410
|
-
const el =
|
|
425
|
+
const el =
|
|
426
|
+
/** @type {LionTabs} */
|
|
411
427
|
await fixture(html`
|
|
412
428
|
<lion-tabs>
|
|
413
429
|
<button slot="tab">tab 1</button>
|
|
@@ -415,14 +431,13 @@ describe('<lion-tabs>', () => {
|
|
|
415
431
|
<button slot="tab">tab 2</button>
|
|
416
432
|
<div slot="panel">panel 2</div>
|
|
417
433
|
</lion-tabs>
|
|
418
|
-
`)
|
|
419
|
-
);
|
|
420
|
-
|
|
421
|
-
expect(tabs.some(tab => isActiveElement(tab))).to.be.false;
|
|
434
|
+
`);
|
|
435
|
+
const tabs = Array.from(el.children).filter((child) => child.slot === 'tab');
|
|
436
|
+
expect(tabs.some((tab) => isActiveElement(tab))).to.be.false;
|
|
422
437
|
});
|
|
423
|
-
|
|
424
438
|
it('focuses on a tab when setting with _setSelectedIndexWithFocus method', async () => {
|
|
425
|
-
const el =
|
|
439
|
+
const el =
|
|
440
|
+
/** @type {LionTabs} */
|
|
426
441
|
await fixture(html`
|
|
427
442
|
<lion-tabs>
|
|
428
443
|
<button slot="tab">tab 1</button>
|
|
@@ -430,20 +445,16 @@ describe('<lion-tabs>', () => {
|
|
|
430
445
|
<button slot="tab">tab 2</button>
|
|
431
446
|
<div slot="panel">panel 2</div>
|
|
432
447
|
</lion-tabs>
|
|
433
|
-
`)
|
|
434
|
-
);
|
|
435
|
-
|
|
436
|
-
const secondTab = /** @type {HTMLElement} */ (
|
|
437
|
-
el.querySelector('[slot="tab"]:nth-of-type(2)')
|
|
438
|
-
);
|
|
448
|
+
`);
|
|
449
|
+
const secondTab = /** @type {HTMLElement} */ el.querySelector('[slot="tab"]:nth-of-type(2)');
|
|
439
450
|
// @ts-ignore : this el is LionTabs
|
|
440
451
|
el._setSelectedIndexWithFocus(1);
|
|
441
452
|
expect(isActiveElement(secondTab)).to.be.true;
|
|
442
453
|
});
|
|
443
454
|
});
|
|
444
|
-
|
|
445
455
|
it('focuses on a tab when the selected tab is changed by user interaction', async () => {
|
|
446
|
-
const el =
|
|
456
|
+
const el =
|
|
457
|
+
/** @type {LionTabs} */
|
|
447
458
|
await fixture(html`
|
|
448
459
|
<lion-tabs>
|
|
449
460
|
<button slot="tab">tab 1</button>
|
|
@@ -451,17 +462,16 @@ describe('<lion-tabs>', () => {
|
|
|
451
462
|
<button slot="tab">tab 2</button>
|
|
452
463
|
<div slot="panel">panel 2</div>
|
|
453
464
|
</lion-tabs>
|
|
454
|
-
`)
|
|
455
|
-
);
|
|
456
|
-
const secondTab = /** @type {Element} */ (el.querySelector('[slot="tab"]:nth-of-type(2)'));
|
|
465
|
+
`);
|
|
466
|
+
const secondTab = /** @type {Element} */ el.querySelector('[slot="tab"]:nth-of-type(2)');
|
|
457
467
|
secondTab.dispatchEvent(new MouseEvent('click'));
|
|
458
468
|
expect(isActiveElement(secondTab)).to.be.true;
|
|
459
469
|
});
|
|
460
|
-
|
|
461
470
|
describe('Accessibility', () => {
|
|
462
471
|
describe('Tabs', () => {
|
|
463
472
|
it('makes selected tab focusable (other tabs are unfocusable)', async () => {
|
|
464
|
-
const el =
|
|
473
|
+
const el =
|
|
474
|
+
/** @type {LionTabs} */
|
|
465
475
|
await fixture(html`
|
|
466
476
|
<lion-tabs>
|
|
467
477
|
<button slot="tab">tab 1</button>
|
|
@@ -471,16 +481,15 @@ describe('<lion-tabs>', () => {
|
|
|
471
481
|
<button slot="tab">tab 3</button>
|
|
472
482
|
<div slot="panel">panel 3</div>
|
|
473
483
|
</lion-tabs>
|
|
474
|
-
`)
|
|
475
|
-
);
|
|
484
|
+
`);
|
|
476
485
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
477
486
|
expect(tabs[0]).to.have.attribute('tabindex', '0');
|
|
478
487
|
expect(tabs[1]).to.have.attribute('tabindex', '-1');
|
|
479
488
|
expect(tabs[2]).to.have.attribute('tabindex', '-1');
|
|
480
489
|
});
|
|
481
|
-
|
|
482
490
|
it('links ids of content items to tab via [aria-controls]', async () => {
|
|
483
|
-
const el =
|
|
491
|
+
const el =
|
|
492
|
+
/** @type {LionTabs} */
|
|
484
493
|
await fixture(html`
|
|
485
494
|
<lion-tabs>
|
|
486
495
|
<button id="t1" slot="tab">tab 1</button>
|
|
@@ -488,16 +497,15 @@ describe('<lion-tabs>', () => {
|
|
|
488
497
|
<button id="t2" slot="tab">tab 2</button>
|
|
489
498
|
<div id="p2" slot="panel">panel 2</div>
|
|
490
499
|
</lion-tabs>
|
|
491
|
-
`)
|
|
492
|
-
);
|
|
500
|
+
`);
|
|
493
501
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
494
502
|
const panels = el.querySelectorAll('[slot=panel]');
|
|
495
503
|
expect(tabs[0].getAttribute('aria-controls')).to.equal(panels[0].id);
|
|
496
504
|
expect(tabs[1].getAttribute('aria-controls')).to.equal(panels[1].id);
|
|
497
505
|
});
|
|
498
|
-
|
|
499
506
|
it('adds aria-selected=“true” to selected tab', async () => {
|
|
500
|
-
const el =
|
|
507
|
+
const el =
|
|
508
|
+
/** @type {LionTabs} */
|
|
501
509
|
await fixture(html`
|
|
502
510
|
<lion-tabs>
|
|
503
511
|
<button id="t1" slot="tab">tab 1</button>
|
|
@@ -507,19 +515,17 @@ describe('<lion-tabs>', () => {
|
|
|
507
515
|
<button id="t3" slot="tab">tab 3</button>
|
|
508
516
|
<div id="p3" slot="panel">panel 3</div>
|
|
509
517
|
</lion-tabs>
|
|
510
|
-
`)
|
|
511
|
-
);
|
|
512
|
-
|
|
518
|
+
`);
|
|
513
519
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
514
520
|
expect(tabs[0].getAttribute('aria-selected')).to.equal('true');
|
|
515
521
|
expect(tabs[1].getAttribute('aria-selected')).to.equal('false');
|
|
516
522
|
expect(tabs[2].getAttribute('aria-selected')).to.equal('false');
|
|
517
523
|
});
|
|
518
524
|
});
|
|
519
|
-
|
|
520
525
|
describe('panels', () => {
|
|
521
526
|
it('adds role="tabpanel" to panels', async () => {
|
|
522
|
-
const el =
|
|
527
|
+
const el =
|
|
528
|
+
/** @type {LionTabs} */
|
|
523
529
|
await fixture(html`
|
|
524
530
|
<lion-tabs>
|
|
525
531
|
<button slot="tab">tab 1</button>
|
|
@@ -527,15 +533,14 @@ describe('<lion-tabs>', () => {
|
|
|
527
533
|
<button slot="tab">tab 2</button>
|
|
528
534
|
<div slot="panel">panel 2</div>
|
|
529
535
|
</lion-tabs>
|
|
530
|
-
`)
|
|
531
|
-
);
|
|
536
|
+
`);
|
|
532
537
|
const panels = el.querySelectorAll('[slot=panel]');
|
|
533
538
|
expect(panels[0]).to.have.attribute('role', 'tabpanel');
|
|
534
539
|
expect(panels[1]).to.have.attribute('role', 'tabpanel');
|
|
535
540
|
});
|
|
536
|
-
|
|
537
541
|
it('adds aria-labelledby referring to tab ids', async () => {
|
|
538
|
-
const el =
|
|
542
|
+
const el =
|
|
543
|
+
/** @type {LionTabs} */
|
|
539
544
|
await fixture(html`
|
|
540
545
|
<lion-tabs>
|
|
541
546
|
<button slot="tab">tab 1</button>
|
|
@@ -543,16 +548,15 @@ describe('<lion-tabs>', () => {
|
|
|
543
548
|
<button slot="tab">tab 2</button>
|
|
544
549
|
<div slot="panel">panel 2</div>
|
|
545
550
|
</lion-tabs>
|
|
546
|
-
`)
|
|
547
|
-
);
|
|
551
|
+
`);
|
|
548
552
|
const panels = el.querySelectorAll('[slot=panel]');
|
|
549
553
|
const tabs = el.querySelectorAll('[slot=tab]');
|
|
550
554
|
expect(panels[0]).to.have.attribute('aria-labelledby', tabs[0].id);
|
|
551
555
|
expect(panels[1]).to.have.attribute('aria-labelledby', tabs[1].id);
|
|
552
556
|
});
|
|
553
|
-
|
|
554
557
|
it('makes panel focusable', async () => {
|
|
555
|
-
const el =
|
|
558
|
+
const el =
|
|
559
|
+
/** @type {LionTabs} */
|
|
556
560
|
await fixture(html`
|
|
557
561
|
<lion-tabs>
|
|
558
562
|
<button slot="tab">tab 1</button>
|
|
@@ -560,14 +564,13 @@ describe('<lion-tabs>', () => {
|
|
|
560
564
|
<button slot="tab">tab 2</button>
|
|
561
565
|
<div slot="panel">panel 2</div>
|
|
562
566
|
</lion-tabs>
|
|
563
|
-
`)
|
|
564
|
-
);
|
|
567
|
+
`);
|
|
565
568
|
const panels = el.querySelectorAll('[slot=panel]');
|
|
566
569
|
expect(panels[0]).to.have.attribute('tabindex', '0');
|
|
567
570
|
});
|
|
568
|
-
|
|
569
571
|
it('does not override the tabindex already set on the panel', async () => {
|
|
570
|
-
const el =
|
|
572
|
+
const el =
|
|
573
|
+
/** @type {LionTabs} */
|
|
571
574
|
await fixture(html`
|
|
572
575
|
<lion-tabs>
|
|
573
576
|
<button slot="tab">tab 1</button>
|
|
@@ -575,8 +578,7 @@ describe('<lion-tabs>', () => {
|
|
|
575
578
|
<button slot="tab">tab 2</button>
|
|
576
579
|
<div slot="panel">panel 2</div>
|
|
577
580
|
</lion-tabs>
|
|
578
|
-
`)
|
|
579
|
-
);
|
|
581
|
+
`);
|
|
580
582
|
const panels = el.querySelectorAll('[slot=panel]');
|
|
581
583
|
expect(panels[0]).to.have.attribute('tabindex', '-1');
|
|
582
584
|
});
|