@lion/ui 0.7.2 → 0.7.4
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/components/button/test-suites/LionButtonReset.suite.js +7 -9
- package/components/calendar/test/lion-calendar.test.js +26 -30
- package/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.js +3 -0
- package/components/combobox/src/LionCombobox.js +35 -22
- package/components/combobox/test/lion-combobox.test.js +141 -98
- package/components/core/src/SlotMixin.js +7 -1
- package/components/form/test/lion-form.test.js +4 -4
- package/components/form-core/src/FormControlMixin.js +0 -9
- package/components/form-core/src/localizeNamespaceLoader.js +75 -0
- package/components/form-core/src/registration/FormRegisteringMixin.js +28 -0
- package/components/form-core/src/validate/LionValidationFeedback.js +36 -2
- package/components/form-core/test/validate/lion-validation-feedback.test.js +30 -2
- package/components/form-core/test-suites/FormRegistrationMixins.suite.js +17 -0
- package/components/form-core/test-suites/ValidateMixin.suite.js +2 -1
- package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +18 -18
- package/components/form-core/translations/bg-BG.js +5 -0
- package/components/form-core/translations/bg.js +6 -0
- package/components/form-core/translations/cs-CZ.js +5 -0
- package/components/form-core/translations/cs.js +6 -0
- package/components/form-core/translations/de-DE.js +5 -0
- package/components/form-core/translations/de.js +6 -0
- package/components/form-core/translations/en-AU.js +5 -0
- package/components/form-core/translations/en-GB.js +5 -0
- package/components/form-core/translations/en-US.js +5 -0
- package/components/form-core/translations/en.js +6 -0
- package/components/form-core/translations/es-ES.js +5 -0
- package/components/form-core/translations/es.js +6 -0
- package/components/form-core/translations/fr-BE.js +5 -0
- package/components/form-core/translations/fr-FR.js +5 -0
- package/components/form-core/translations/fr.js +6 -0
- package/components/form-core/translations/hu-HU.js +5 -0
- package/components/form-core/translations/hu.js +6 -0
- package/components/form-core/translations/it-IT.js +5 -0
- package/components/form-core/translations/it.js +6 -0
- package/components/form-core/translations/nl-BE.js +5 -0
- package/components/form-core/translations/nl-NL.js +5 -0
- package/components/form-core/translations/nl.js +6 -0
- package/components/form-core/translations/pl-PL.js +5 -0
- package/components/form-core/translations/pl.js +6 -0
- package/components/form-core/translations/ro-RO.js +5 -0
- package/components/form-core/translations/ro.js +6 -0
- package/components/form-core/translations/ru-RU.js +5 -0
- package/components/form-core/translations/ru.js +6 -0
- package/components/form-core/translations/sk-SK.js +5 -0
- package/components/form-core/translations/sk.js +6 -0
- package/components/form-core/translations/uk-UA.js +5 -0
- package/components/form-core/translations/uk.js +6 -0
- package/components/form-core/translations/zh.js +6 -0
- package/components/form-core/types/FormControlMixinTypes.ts +0 -4
- package/components/form-core/types/registration/FormRegisteringMixinTypes.ts +17 -4
- package/components/form-integrations/test/dialog-integrations.test.js +6 -4
- package/components/helpers/src/SbActionLogger.js +11 -2
- package/components/icon/test/lion-icon.test.js +12 -14
- package/components/input-amount/test/lion-input-amount.test.js +13 -14
- package/components/input-datepicker/test/lion-input-datepicker.test.js +4 -4
- package/components/input-file/src/LionInputFile.js +88 -30
- package/components/input-file/test/lion-input-file.test.js +105 -9
- package/components/input-file/test/lion-selected-file-list.test.js +2 -1
- package/components/input-file/translations/bg.js +3 -0
- package/components/input-file/translations/cs.js +3 -0
- package/components/input-file/translations/de.js +3 -0
- package/components/input-file/translations/en.js +3 -0
- package/components/input-file/translations/es.js +3 -0
- package/components/input-file/translations/fr.js +3 -0
- package/components/input-file/translations/hu.js +3 -0
- package/components/input-file/translations/it.js +3 -0
- package/components/input-file/translations/nl.js +3 -0
- package/components/input-file/translations/pl.js +3 -0
- package/components/input-file/translations/ro.js +3 -0
- package/components/input-file/translations/ru.js +3 -0
- package/components/input-file/translations/sk.js +3 -0
- package/components/input-file/translations/uk.js +3 -0
- package/components/input-file/translations/zh.js +3 -0
- package/components/input-tel-dropdown/test/LionInputTelDropdown.test.js +23 -23
- package/components/listbox/test-suites/ListboxMixin.suite.js +10 -3
- package/components/localize/src/date/utils/normalizeIntlDate.js +13 -2
- package/components/overlays/src/OverlayMixin.js +8 -1
- package/components/progress-indicator/test/lion-progress-indicator.test.js +42 -46
- package/components/select-rich/test/lion-select-rich.test.js +6 -8
- package/components/steps/test/lion-step.test.js +5 -7
- package/components/switch/src/LionSwitch.js +10 -0
- package/components/switch/test/lion-switch.test.js +5 -7
- package/components/tabs/src/LionTabs.js +10 -0
- package/components/tabs/test/lion-tabs.test.js +49 -38
- package/custom-elements.json +83073 -76992
- package/dist-types/components/button/test-suites/LionButtonReset.suite.d.ts.map +1 -1
- package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts.map +1 -1
- package/dist-types/components/combobox/src/LionCombobox.d.ts +12 -8
- package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
- package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/FormControlMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/LionField.d.ts +1 -1
- package/dist-types/components/form-core/src/localizeNamespaceLoader.d.ts +2 -0
- package/dist-types/components/form-core/src/localizeNamespaceLoader.d.ts.map +1 -0
- package/dist-types/components/form-core/src/registration/FormRegisteringMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts +5 -6
- package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/FormRegistrationMixins.suite.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts.map +1 -1
- package/dist-types/components/form-core/translations/bg-BG.d.ts +8 -0
- package/dist-types/components/form-core/translations/bg-BG.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/bg.d.ts +8 -0
- package/dist-types/components/form-core/translations/bg.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/cs-CZ.d.ts +8 -0
- package/dist-types/components/form-core/translations/cs-CZ.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/cs.d.ts +8 -0
- package/dist-types/components/form-core/translations/cs.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/de-DE.d.ts +8 -0
- package/dist-types/components/form-core/translations/de-DE.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/de.d.ts +8 -0
- package/dist-types/components/form-core/translations/de.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/en-AU.d.ts +8 -0
- package/dist-types/components/form-core/translations/en-AU.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/en-GB.d.ts +8 -0
- package/dist-types/components/form-core/translations/en-GB.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/en-US.d.ts +8 -0
- package/dist-types/components/form-core/translations/en-US.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/en.d.ts +8 -0
- package/dist-types/components/form-core/translations/en.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/es-ES.d.ts +8 -0
- package/dist-types/components/form-core/translations/es-ES.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/es.d.ts +8 -0
- package/dist-types/components/form-core/translations/es.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/fr-BE.d.ts +8 -0
- package/dist-types/components/form-core/translations/fr-BE.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/fr-FR.d.ts +8 -0
- package/dist-types/components/form-core/translations/fr-FR.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/fr.d.ts +8 -0
- package/dist-types/components/form-core/translations/fr.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/hu-HU.d.ts +8 -0
- package/dist-types/components/form-core/translations/hu-HU.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/hu.d.ts +8 -0
- package/dist-types/components/form-core/translations/hu.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/it-IT.d.ts +8 -0
- package/dist-types/components/form-core/translations/it-IT.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/it.d.ts +8 -0
- package/dist-types/components/form-core/translations/it.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/nl-BE.d.ts +8 -0
- package/dist-types/components/form-core/translations/nl-BE.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/nl-NL.d.ts +8 -0
- package/dist-types/components/form-core/translations/nl-NL.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/nl.d.ts +8 -0
- package/dist-types/components/form-core/translations/nl.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/pl-PL.d.ts +8 -0
- package/dist-types/components/form-core/translations/pl-PL.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/pl.d.ts +8 -0
- package/dist-types/components/form-core/translations/pl.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/ro-RO.d.ts +8 -0
- package/dist-types/components/form-core/translations/ro-RO.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/ro.d.ts +8 -0
- package/dist-types/components/form-core/translations/ro.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/ru-RU.d.ts +8 -0
- package/dist-types/components/form-core/translations/ru-RU.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/ru.d.ts +8 -0
- package/dist-types/components/form-core/translations/ru.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/sk-SK.d.ts +8 -0
- package/dist-types/components/form-core/translations/sk-SK.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/sk.d.ts +8 -0
- package/dist-types/components/form-core/translations/sk.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/uk-UA.d.ts +8 -0
- package/dist-types/components/form-core/translations/uk-UA.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/uk.d.ts +8 -0
- package/dist-types/components/form-core/translations/uk.d.ts.map +1 -0
- package/dist-types/components/form-core/translations/zh.d.ts +8 -0
- package/dist-types/components/form-core/translations/zh.d.ts.map +1 -0
- package/dist-types/components/form-core/types/FormControlMixinTypes.d.ts +0 -4
- package/dist-types/components/form-core/types/FormControlMixinTypes.d.ts.map +1 -1
- package/dist-types/components/form-core/types/registration/FormRegisteringMixinTypes.d.ts +14 -4
- package/dist-types/components/form-core/types/registration/FormRegisteringMixinTypes.d.ts.map +1 -1
- package/dist-types/components/helpers/src/SbActionLogger.d.ts.map +1 -1
- package/dist-types/components/input-file/src/LionInputFile.d.ts +12 -6
- package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
- package/dist-types/components/input-file/translations/bg-BG.d.ts +3 -0
- package/dist-types/components/input-file/translations/bg.d.ts +3 -0
- package/dist-types/components/input-file/translations/cs-CZ.d.ts +3 -0
- package/dist-types/components/input-file/translations/cs.d.ts +3 -0
- package/dist-types/components/input-file/translations/de-DE.d.ts +3 -0
- package/dist-types/components/input-file/translations/de.d.ts +3 -0
- package/dist-types/components/input-file/translations/en-AU.d.ts +3 -0
- package/dist-types/components/input-file/translations/en-GB.d.ts +3 -0
- package/dist-types/components/input-file/translations/en-PH.d.ts +3 -0
- package/dist-types/components/input-file/translations/en-US.d.ts +3 -0
- package/dist-types/components/input-file/translations/en.d.ts +3 -0
- package/dist-types/components/input-file/translations/es-ES.d.ts +3 -0
- package/dist-types/components/input-file/translations/es.d.ts +3 -0
- package/dist-types/components/input-file/translations/fr-BE.d.ts +3 -0
- package/dist-types/components/input-file/translations/fr-FR.d.ts +3 -0
- package/dist-types/components/input-file/translations/fr.d.ts +3 -0
- package/dist-types/components/input-file/translations/hu-HU.d.ts +3 -0
- package/dist-types/components/input-file/translations/hu.d.ts +3 -0
- package/dist-types/components/input-file/translations/it-IT.d.ts +3 -0
- package/dist-types/components/input-file/translations/it.d.ts +3 -0
- package/dist-types/components/input-file/translations/nl-BE.d.ts +3 -0
- package/dist-types/components/input-file/translations/nl-NL.d.ts +3 -0
- package/dist-types/components/input-file/translations/nl.d.ts +3 -0
- package/dist-types/components/input-file/translations/pl-PL.d.ts +3 -0
- package/dist-types/components/input-file/translations/pl.d.ts +3 -0
- package/dist-types/components/input-file/translations/ro-RO.d.ts +3 -0
- package/dist-types/components/input-file/translations/ro.d.ts +3 -0
- package/dist-types/components/input-file/translations/ru-RU.d.ts +3 -0
- package/dist-types/components/input-file/translations/ru.d.ts +3 -0
- package/dist-types/components/input-file/translations/sk-SK.d.ts +3 -0
- package/dist-types/components/input-file/translations/sk.d.ts +3 -0
- package/dist-types/components/input-file/translations/uk-UA.d.ts +3 -0
- package/dist-types/components/input-file/translations/uk.d.ts +3 -0
- package/dist-types/components/input-file/translations/zh-CN.d.ts +3 -0
- package/dist-types/components/input-file/translations/zh.d.ts +3 -0
- package/dist-types/components/input-tel-dropdown/test/LionInputTelDropdown.test.d.ts.map +1 -1
- package/dist-types/components/listbox/src/LionOption.d.ts +1 -1
- package/dist-types/components/listbox/test-suites/ListboxMixin.suite.d.ts.map +1 -1
- package/dist-types/components/localize/src/date/utils/normalizeIntlDate.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/components/switch/src/LionSwitch.d.ts.map +1 -1
- package/dist-types/components/tabs/src/LionTabs.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/accordion/api-table.md +31 -0
- package/docs/components/button/api-table.md +104 -0
- package/docs/components/button/use-cases.md +11 -10
- package/docs/components/calendar/api-table.md +44 -0
- package/docs/components/checkbox-group/api-table.md +564 -0
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/api-table.md +36 -0
- package/docs/components/collapsible/assets/applyDemoCollapsibleStyles.js +6 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/api-table.md +256 -0
- package/docs/components/combobox/overview.md +4 -3
- package/docs/components/combobox/src/gh-combobox/gh-button.js +3 -1
- package/docs/components/combobox/src/gh-combobox/gh-combobox.js +9 -2
- package/docs/components/combobox/src/google-combobox/google-combobox.js +6 -8
- package/docs/components/combobox/src/md-combobox/MdFieldMixin.js +7 -3
- package/docs/components/combobox/src/md-combobox/style/md-ripple.js +1 -0
- package/docs/components/combobox/src/wa-combobox/wa-combobox.js +15 -3
- package/docs/components/combobox/use-cases.md +19 -17
- package/docs/components/dialog/api-table.md +45 -0
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/drawer/api-table.md +45 -0
- package/docs/components/fieldset/api-table.md +163 -0
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/api-table.md +1 -0
- package/docs/components/form/overview.md +3 -3
- package/docs/components/icon/api-table.md +29 -0
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/api-table.md +187 -0
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input/use-cases.md +3 -2
- package/docs/components/input-amount/api-table.md +196 -0
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/api-table.md +188 -0
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/api-table.md +234 -0
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/api-table.md +187 -0
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/api-table.md +272 -0
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/api-table.md +187 -0
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/api-table.md +198 -0
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/api-table.md +205 -0
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/api-table.md +202 -0
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/api-table.md +213 -0
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/input-tel-dropdown/src/intl-input-tel-dropdown.js +15 -5
- package/docs/components/listbox/api-table.md +293 -0
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/pagination/api-table.md +33 -0
- package/docs/components/progress-indicator/api-table.md +36 -0
- package/docs/components/progress-indicator/examples.md +11 -11
- package/docs/components/radio-group/api-table.md +378 -0
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/api-table.md +181 -0
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +288 -0
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/steps/api-table.md +80 -0
- package/docs/components/switch/api-table.md +229 -0
- package/docs/components/tabs/api-table.md +32 -0
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/tabs/src/lea-tab-panel.js +3 -1
- package/docs/components/tabs/src/lea-tab.js +7 -2
- package/docs/components/textarea/api-table.md +192 -0
- package/docs/components/tooltip/api-table.md +53 -0
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/assets/_mermaid.svg.js +32 -8
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/rationales/accessibility.md +1 -1
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/api-table.md +34 -0
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/api-table.md +166 -0
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/validate.md +3 -3
- package/docs/fundamentals/systems/localize/api-table.md +65 -0
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/_configuration-positioning.md +0 -9
- package/docs/fundamentals/systems/overlays/_edge-cases.md +74 -80
- package/docs/fundamentals/systems/overlays/api-table.md +168 -0
- package/docs/fundamentals/systems/overlays/configuration.md +2 -2
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +5 -8
- package/docs/fundamentals/tools/helpers/action-logger.md +3 -6
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js +3 -1
- package/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js +3 -1
- package/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js +3 -1
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +5 -5
- package/docs/guides/how-to/create-a-form.md +4 -4
- package/docs/guides/how-to/extend-a-native-input.md +2 -2
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/package.json +6 -5
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
'Upload een {allowedTypesArray} of {allowedTypesLastItem}-bestand van maximaal {maxSize}.',
|
|
6
6
|
dragAndDropText: 'Sleep uw bestanden hierheen of',
|
|
7
7
|
fileNameDescriptionLabel: 'Bestandsnaam: {fileName}',
|
|
8
|
+
generalValidatorMessage: '"{validatorMessage}", voor {listOfErroneousFiles}.',
|
|
9
|
+
noFilesSelected: 'Geen bestanden geselecteerd.',
|
|
10
|
+
numberOfFiles: '{numberOfFiles} bestanden.',
|
|
8
11
|
removeButtonLabel: 'Verwijder het bestand {fileName}',
|
|
9
12
|
selectTextDuplicateFileName: 'Er bestaat al een bestand met dezelfde bestandsnaam.',
|
|
10
13
|
selectTextMultipleFile: 'Selecteer bestanden',
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
'Prześlij plik {allowedTypesArray} lub {allowedTypesLastItem} o maks. rozmiarze {maxSize}.',
|
|
6
6
|
dragAndDropText: 'Przeciągnij i upuść pliki tutaj lub',
|
|
7
7
|
fileNameDescriptionLabel: 'Nazwa pliku: {fileName}',
|
|
8
|
+
generalValidatorMessage: '"{validatorMessage}", dla {listOfErroneousFiles}.',
|
|
9
|
+
noFilesSelected: 'Nie wybrano żadnych plików.',
|
|
10
|
+
numberOfFiles: 'Liczba plików: {numberOfFiles}.',
|
|
8
11
|
removeButtonLabel: 'Usuń plik {fileName}',
|
|
9
12
|
selectTextDuplicateFileName: 'Plik o tej samej nazwie już istnieje.',
|
|
10
13
|
selectTextMultipleFile: 'Wybierz pliki',
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
'Încărcaţi un fişier {allowedTypesArray} sau {allowedTypesLastItem} de max. {maxSize}.',
|
|
6
6
|
dragAndDropText: 'Glisaţi şi fixaţi fişierele aici sau',
|
|
7
7
|
fileNameDescriptionLabel: 'Nume fişier: {fileName}',
|
|
8
|
+
generalValidatorMessage: '"{validatorMessage}", pentru {listOfErroneousFiles}.',
|
|
9
|
+
noFilesSelected: 'Niciun fișier selectat.',
|
|
10
|
+
numberOfFiles: '{numberOfFiles} fișiere.',
|
|
8
11
|
removeButtonLabel: 'Eliminaţi fişierul {filename}',
|
|
9
12
|
selectTextDuplicateFileName: 'Există deja un fişier cu acelaşi nume de fişier.',
|
|
10
13
|
selectTextMultipleFile: 'Selectare fișiere',
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
'Загрузите файл {allowedTypesArray} или {allowedTypesLastItem} размером не более {maxSize}.',
|
|
6
6
|
dragAndDropText: 'Перетащите файлы сюда или',
|
|
7
7
|
fileNameDescriptionLabel: 'Название файла: {fileName}',
|
|
8
|
+
generalValidatorMessage: '"{validatorMessage}", для {listOfErroneousFiles}.',
|
|
9
|
+
noFilesSelected: 'Файлы не выбраны.',
|
|
10
|
+
numberOfFiles: 'Файлов: {numberOfFiles}.',
|
|
8
11
|
removeButtonLabel: 'Удалить файл {fileName}',
|
|
9
12
|
selectTextDuplicateFileName: 'Файл с таким названием уже существует.',
|
|
10
13
|
selectTextMultipleFile: 'Выберите файлы',
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
'Nahrajte súbor {allowedTypesArray} alebo {allowedTypesLastItem} s maximálnou veľkosťou {maxSize}.',
|
|
6
6
|
dragAndDropText: 'Súbory presuňte sem alebo',
|
|
7
7
|
fileNameDescriptionLabel: 'Názov súboru: {fileName}',
|
|
8
|
+
generalValidatorMessage: '"{validatorMessage}", pre {listOfErroneousFiles}.',
|
|
9
|
+
noFilesSelected: 'Neboli vybrané žiadne súbory.',
|
|
10
|
+
numberOfFiles: 'Počet súborov: {numberOfFiles}.',
|
|
8
11
|
removeButtonLabel: 'Odstrániť súbor {fileName}',
|
|
9
12
|
selectTextDuplicateFileName: 'Súbor s rovnakým názvom súboru už existoval.',
|
|
10
13
|
selectTextMultipleFile: 'Vybrať súbory',
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
'Завантажте файл {allowedTypesArray} або {allowedTypesLastItem} розміром до {maxSize}.',
|
|
6
6
|
dragAndDropText: 'Перетягніть файли сюди або',
|
|
7
7
|
fileNameDescriptionLabel: 'Ім’я файлу: {fileName}',
|
|
8
|
+
generalValidatorMessage: '"{validatorMessage}", для {listOfErroneousFiles}.',
|
|
9
|
+
noFilesSelected: 'Не вибрано жодного файлу.',
|
|
10
|
+
numberOfFiles: '{numberOfFiles} файли(-ів).',
|
|
8
11
|
removeButtonLabel: 'Видалення файлу {fileName}',
|
|
9
12
|
selectTextDuplicateFileName: 'Файл із такою назвою вже існував.',
|
|
10
13
|
selectTextMultipleFile: 'Виберіть файли',
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
'请上传最大 {maxSize} 的 {allowedTypesArray} 或 {allowedTypesLastItem} 文件。',
|
|
6
6
|
dragAndDropText: '将您的文件拖放到此处,或',
|
|
7
7
|
fileNameDescriptionLabel: '文件名: {fileName}',
|
|
8
|
+
generalValidatorMessage: '"{validatorMessage}", 例如 {listOfErroneousFiles}。',
|
|
9
|
+
noFilesSelected: '未选择任何文件。',
|
|
10
|
+
numberOfFiles: '{numberOfFiles} 个文件。',
|
|
8
11
|
removeButtonLabel: '删除 {fileName} 文件',
|
|
9
12
|
selectTextDuplicateFileName: '已存在具有相同文件名的文件。',
|
|
10
13
|
selectTextMultipleFile: '选择多个文件',
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { runInputTelSuite } from '@lion/ui/input-tel-test-suites.js';
|
|
2
2
|
import { repeat } from 'lit/directives/repeat.js';
|
|
3
3
|
import { ref } from 'lit/directives/ref.js';
|
|
4
|
-
import {
|
|
4
|
+
import { html } from 'lit';
|
|
5
|
+
import { aTimeout, expect, fixture } from '@open-wc/testing';
|
|
5
6
|
import { LionInputTelDropdown } from '@lion/ui/input-tel-dropdown.js';
|
|
6
7
|
import { LionOption } from '@lion/ui/listbox.js';
|
|
7
8
|
import { LionSelectRich } from '@lion/ui/select-rich.js';
|
|
@@ -45,8 +46,9 @@ class WithFormControlInputTelDropdown extends ScopedElementsMixin(LionInputTelDr
|
|
|
45
46
|
${repeat(
|
|
46
47
|
data.regionMetaList,
|
|
47
48
|
regionMeta => regionMeta.regionCode,
|
|
48
|
-
regionMeta =>
|
|
49
|
-
|
|
49
|
+
regionMeta => html`
|
|
50
|
+
<lion-option .choiceValue="${regionMeta.regionCode}"> </lion-option>
|
|
51
|
+
`,
|
|
50
52
|
)}
|
|
51
53
|
</lion-select-rich>
|
|
52
54
|
`;
|
|
@@ -85,8 +87,9 @@ describe('WithFormControlInputTelDropdown', () => {
|
|
|
85
87
|
${repeat(
|
|
86
88
|
data.regionMetaList,
|
|
87
89
|
regionMeta => regionMeta.regionCode,
|
|
88
|
-
regionMeta =>
|
|
89
|
-
|
|
90
|
+
regionMeta => html`
|
|
91
|
+
<lion-option .choiceValue="${regionMeta.regionCode}"> </lion-option>
|
|
92
|
+
`,
|
|
90
93
|
)}
|
|
91
94
|
</lion-select-rich>
|
|
92
95
|
`;
|
|
@@ -95,14 +98,12 @@ describe('WithFormControlInputTelDropdown', () => {
|
|
|
95
98
|
}
|
|
96
99
|
customElements.define('input-tel-dropdown-mac', InputTelDropdownMac);
|
|
97
100
|
const el = /** @type {LionInputTelDropdown} */ (
|
|
98
|
-
await fixture(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
`,
|
|
105
|
-
)
|
|
101
|
+
await fixture(html`
|
|
102
|
+
<input-tel-dropdown-mac
|
|
103
|
+
.allowedRegions="${['NL', 'BE']}"
|
|
104
|
+
.modelValue="${'+31612345678'}"
|
|
105
|
+
></input-tel-dropdown-mac>
|
|
106
|
+
`)
|
|
106
107
|
);
|
|
107
108
|
const dropdownElement = el.refs.dropdown.value;
|
|
108
109
|
// @ts-expect-error [allow-protected-in-tests]
|
|
@@ -139,8 +140,9 @@ describe('WithFormControlInputTelDropdown', () => {
|
|
|
139
140
|
${repeat(
|
|
140
141
|
data.regionMetaList,
|
|
141
142
|
regionMeta => regionMeta.regionCode,
|
|
142
|
-
regionMeta =>
|
|
143
|
-
|
|
143
|
+
regionMeta => html`
|
|
144
|
+
<lion-option .choiceValue="${regionMeta.regionCode}"> </lion-option>
|
|
145
|
+
`,
|
|
144
146
|
)}
|
|
145
147
|
</lion-select-rich>
|
|
146
148
|
`;
|
|
@@ -149,14 +151,12 @@ describe('WithFormControlInputTelDropdown', () => {
|
|
|
149
151
|
}
|
|
150
152
|
customElements.define('input-tel-dropdown-windows', InputTelDropdownWindows);
|
|
151
153
|
const el = /** @type {LionInputTelDropdown} */ (
|
|
152
|
-
await fixture(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
`,
|
|
159
|
-
)
|
|
154
|
+
await fixture(html`
|
|
155
|
+
<input-tel-dropdown-windows
|
|
156
|
+
.allowedRegions="${['NL', 'BE']}"
|
|
157
|
+
.modelValue="${'+31612345678'}"
|
|
158
|
+
></input-tel-dropdown-windows>
|
|
159
|
+
`)
|
|
160
160
|
);
|
|
161
161
|
const dropdownElement = el.refs.dropdown.value;
|
|
162
162
|
// @ts-expect-error [allow-protected-in-tests]
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import { sendKeys } from '@web/test-runner-commands';
|
|
17
17
|
import sinon from 'sinon';
|
|
18
18
|
import { getListboxMembers } from '../../../exports/listbox-test-helpers.js';
|
|
19
|
+
import { browserDetection } from '../../core/src/browserDetection.js';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* @typedef {import('../src/LionListbox.js').LionListbox} LionListbox
|
|
@@ -380,7 +381,12 @@ export function runListboxMixinSuite(customConfig = {}) {
|
|
|
380
381
|
await aTimeout(1000);
|
|
381
382
|
|
|
382
383
|
// top should be offset 2x40px (sticky header elems) instead of 0px
|
|
383
|
-
|
|
384
|
+
if (browserDetection.isChrome || browserDetection.isChromium) {
|
|
385
|
+
// TODO: find out why this is different in recent Chromium
|
|
386
|
+
expect(el.scrollTop).to.equal(160);
|
|
387
|
+
} else {
|
|
388
|
+
expect(el.scrollTop).to.equal(116);
|
|
389
|
+
}
|
|
384
390
|
});
|
|
385
391
|
});
|
|
386
392
|
|
|
@@ -1633,8 +1639,9 @@ export function runListboxMixinSuite(customConfig = {}) {
|
|
|
1633
1639
|
${repeat(
|
|
1634
1640
|
this.options,
|
|
1635
1641
|
(/** @type {string} */ option) => option,
|
|
1636
|
-
(/** @type {string} */ option) =>
|
|
1637
|
-
|
|
1642
|
+
(/** @type {string} */ option) => html`
|
|
1643
|
+
<lion-option .choiceValue="${option}">${option}</lion-option>
|
|
1644
|
+
`,
|
|
1638
1645
|
)}
|
|
1639
1646
|
</${tag}>
|
|
1640
1647
|
`;
|
|
@@ -21,7 +21,6 @@ export function normalizeIntlDate(str, locale = '', { weekday, year, month, day
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const result = dateString.join('');
|
|
24
|
-
|
|
25
24
|
// Normalize webkit date formatting without year
|
|
26
25
|
if (!year && weekday === 'long' && month === 'long' && day === '2-digit') {
|
|
27
26
|
const CHINESE_LOCALES = [
|
|
@@ -43,7 +42,7 @@ export function normalizeIntlDate(str, locale = '', { weekday, year, month, day
|
|
|
43
42
|
return result.replace(' ', '');
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
if (result.indexOf(',') === -1 && locale === 'en-GB') {
|
|
45
|
+
if ((result.indexOf(',') === -1 && locale === 'en-GB') || locale === 'en-AU') {
|
|
47
46
|
// Saturday 12 October -> Saturday, 12 October
|
|
48
47
|
const match = result.match(/^(\w*) (\d*) (\w*)$/);
|
|
49
48
|
if (match !== null) {
|
|
@@ -63,6 +62,18 @@ export function normalizeIntlDate(str, locale = '', { weekday, year, month, day
|
|
|
63
62
|
return `${match[1]}, ${match[3]} ${match[2]}`;
|
|
64
63
|
}
|
|
65
64
|
}
|
|
65
|
+
|
|
66
|
+
if (locale === 'uk-UA') {
|
|
67
|
+
// суботу => субота
|
|
68
|
+
return result.replace('суботу', 'субота');
|
|
69
|
+
}
|
|
70
|
+
} else if (weekday === 'long' && month === 'long' && day === '2-digit') {
|
|
71
|
+
if (result.indexOf(',') === -1 && locale.startsWith('en-')) {
|
|
72
|
+
// Saturday 12 October 2023 -> Saturday, 12 October 2023
|
|
73
|
+
const [, _weekDayName, _monthDayNumber, _monthName, _year] =
|
|
74
|
+
result.match(/^(\w*) (\d*) (\w*) (\d*)$/) || [];
|
|
75
|
+
return `${_weekDayName}, ${_monthDayNumber} ${_monthName} ${_year}`;
|
|
76
|
+
}
|
|
66
77
|
}
|
|
67
78
|
|
|
68
79
|
return result;
|
|
@@ -26,9 +26,16 @@ export const OverlayMixinImplementation = superclass =>
|
|
|
26
26
|
|
|
27
27
|
constructor() {
|
|
28
28
|
super();
|
|
29
|
+
/**
|
|
30
|
+
* If you add the opened attribute a dialog will be opened on page load. The invoker can be left out
|
|
31
|
+
* in case the user does not need to be able to reopen the dialog.
|
|
32
|
+
*/
|
|
29
33
|
this.opened = false;
|
|
30
34
|
|
|
31
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Configure the many options of the `OverlayController`
|
|
37
|
+
* @type {Partial<OverlayConfig>}
|
|
38
|
+
*/
|
|
32
39
|
this.config = {};
|
|
33
40
|
|
|
34
41
|
/** @type {EventListener} */
|
|
@@ -24,9 +24,9 @@ describe('lion-progress-indicator', () => {
|
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
it('can override a label with "aria-label"', async () => {
|
|
27
|
-
const el = await fixture(
|
|
28
|
-
|
|
29
|
-
);
|
|
27
|
+
const el = await fixture(html`
|
|
28
|
+
<lion-progress-indicator aria-label="foo"></lion-progress-indicator>
|
|
29
|
+
`);
|
|
30
30
|
await el.localizeNamespacesLoaded;
|
|
31
31
|
expect(el.getAttribute('aria-label')).to.equal('foo');
|
|
32
32
|
el.setAttribute('aria-label', 'bar');
|
|
@@ -37,9 +37,9 @@ describe('lion-progress-indicator', () => {
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
it('can override a label with "aria-labelledby"', async () => {
|
|
40
|
-
const el = await fixture(
|
|
41
|
-
|
|
42
|
-
);
|
|
40
|
+
const el = await fixture(html`
|
|
41
|
+
<lion-progress-indicator aria-labelledby="foo-id"></lion-progress-indicator>
|
|
42
|
+
`);
|
|
43
43
|
await el.localizeNamespacesLoaded;
|
|
44
44
|
expect(el.getAttribute('aria-labelledby')).to.equal('foo-id');
|
|
45
45
|
expect(el.hasAttribute('aria-label')).to.be.false;
|
|
@@ -62,9 +62,9 @@ describe('lion-progress-indicator', () => {
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
it('keeps own aria-label when switch to determinate state', async () => {
|
|
65
|
-
const el = await fixture(
|
|
66
|
-
|
|
67
|
-
);
|
|
65
|
+
const el = await fixture(html`
|
|
66
|
+
<lion-progress-indicator aria-label="foo"></lion-progress-indicator>
|
|
67
|
+
`);
|
|
68
68
|
expect(el.getAttribute('aria-label')).to.equal('foo');
|
|
69
69
|
el.setAttribute('value', '30');
|
|
70
70
|
await el.updateComplete;
|
|
@@ -74,16 +74,16 @@ describe('lion-progress-indicator', () => {
|
|
|
74
74
|
|
|
75
75
|
describe('determinate', async () => {
|
|
76
76
|
it('is determinate when it has a value', async () => {
|
|
77
|
-
const el = await fixture(
|
|
78
|
-
|
|
79
|
-
);
|
|
77
|
+
const el = await fixture(html`
|
|
78
|
+
<lion-progress-indicator value="25" aria-label="foo"></lion-progress-indicator>
|
|
79
|
+
`);
|
|
80
80
|
expect(el.indeterminate).to.be.false;
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
it('can update value', async () => {
|
|
84
|
-
const el = await fixture(
|
|
85
|
-
|
|
86
|
-
);
|
|
84
|
+
const el = await fixture(html`
|
|
85
|
+
<lion-progress-indicator value="25" aria-label="foo"></lion-progress-indicator>
|
|
86
|
+
`);
|
|
87
87
|
expect(el.getAttribute('aria-valuenow')).to.equal('25');
|
|
88
88
|
el.value = 30;
|
|
89
89
|
await el.updateComplete;
|
|
@@ -91,9 +91,9 @@ describe('lion-progress-indicator', () => {
|
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
it('can update min', async () => {
|
|
94
|
-
const el = await fixture(
|
|
95
|
-
|
|
96
|
-
);
|
|
94
|
+
const el = await fixture(html`
|
|
95
|
+
<lion-progress-indicator value="50" aria-label="foo"></lion-progress-indicator>
|
|
96
|
+
`);
|
|
97
97
|
expect(el.getAttribute('aria-valuemin')).to.equal('0');
|
|
98
98
|
el.min = 30;
|
|
99
99
|
await el.updateComplete;
|
|
@@ -101,9 +101,9 @@ describe('lion-progress-indicator', () => {
|
|
|
101
101
|
});
|
|
102
102
|
|
|
103
103
|
it('can update max', async () => {
|
|
104
|
-
const el = await fixture(
|
|
105
|
-
|
|
106
|
-
);
|
|
104
|
+
const el = await fixture(html`
|
|
105
|
+
<lion-progress-indicator value="50" aria-label="foo"></lion-progress-indicator>
|
|
106
|
+
`);
|
|
107
107
|
expect(el.getAttribute('aria-valuemax')).to.equal('100');
|
|
108
108
|
el.max = 70;
|
|
109
109
|
await el.updateComplete;
|
|
@@ -111,9 +111,9 @@ describe('lion-progress-indicator', () => {
|
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
it('min & max limits value', async () => {
|
|
114
|
-
const el = await fixture(
|
|
115
|
-
|
|
116
|
-
);
|
|
114
|
+
const el = await fixture(html`
|
|
115
|
+
<lion-progress-indicator value="150" aria-label="foo"></lion-progress-indicator>
|
|
116
|
+
`);
|
|
117
117
|
// sets to default max: 100
|
|
118
118
|
expect(el.getAttribute('aria-valuenow')).to.equal('100');
|
|
119
119
|
el.value = -20;
|
|
@@ -124,14 +124,12 @@ describe('lion-progress-indicator', () => {
|
|
|
124
124
|
|
|
125
125
|
// TODO make this feature available
|
|
126
126
|
it.skip('supports valuetext', async () => {
|
|
127
|
-
const el = await fixture(
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
`,
|
|
134
|
-
);
|
|
127
|
+
const el = await fixture(html`
|
|
128
|
+
<lion-progress-indicator
|
|
129
|
+
value="8"
|
|
130
|
+
value-text="{value}% (34 minutes) remaining"
|
|
131
|
+
></lion-progress-indicator>
|
|
132
|
+
`);
|
|
135
133
|
expect(el.getAttribute('aria-valuetext')).to.equal('8% (34 minutes) remaining');
|
|
136
134
|
});
|
|
137
135
|
|
|
@@ -179,11 +177,9 @@ describe('lion-progress-indicator', () => {
|
|
|
179
177
|
|
|
180
178
|
describe('Subclasers', () => {
|
|
181
179
|
it('can use _progressPercentage getter to get the progress percentage', async () => {
|
|
182
|
-
const el = await fixture(
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
`,
|
|
186
|
-
);
|
|
180
|
+
const el = await fixture(html`
|
|
181
|
+
<lion-progress-indicator max="50" value="10" aria-label="foo"></lion-progress-indicator>
|
|
182
|
+
`);
|
|
187
183
|
expect(el._progressPercentage).to.equal(20);
|
|
188
184
|
});
|
|
189
185
|
});
|
|
@@ -203,23 +199,23 @@ describe('lion-progress-indicator', () => {
|
|
|
203
199
|
|
|
204
200
|
describe('determinate', () => {
|
|
205
201
|
it('passes a11y test', async () => {
|
|
206
|
-
const el = await fixture(
|
|
207
|
-
|
|
208
|
-
);
|
|
202
|
+
const el = await fixture(html`
|
|
203
|
+
<lion-progress-indicator value="25" aria-label="foo"></lion-progress-indicator>
|
|
204
|
+
`);
|
|
209
205
|
await expect(el).to.be.accessible();
|
|
210
206
|
});
|
|
211
207
|
|
|
212
208
|
it('once value is set', async () => {
|
|
213
|
-
const el = await fixture(
|
|
214
|
-
|
|
215
|
-
);
|
|
209
|
+
const el = await fixture(html`
|
|
210
|
+
<lion-progress-indicator value="25" aria-label="foo"></lion-progress-indicator>
|
|
211
|
+
`);
|
|
216
212
|
expect(el.getAttribute('aria-valuenow')).to.equal('25');
|
|
217
213
|
});
|
|
218
214
|
|
|
219
215
|
it('allows to set min & max values', async () => {
|
|
220
|
-
const el = await fixture(
|
|
221
|
-
|
|
222
|
-
);
|
|
216
|
+
const el = await fixture(html`
|
|
217
|
+
<lion-progress-indicator value="25" aria-label="foo"></lion-progress-indicator>
|
|
218
|
+
`);
|
|
223
219
|
expect(el.getAttribute('aria-valuemin')).to.equal('0');
|
|
224
220
|
expect(el.getAttribute('aria-valuemax')).to.equal('100');
|
|
225
221
|
});
|
|
@@ -444,9 +444,9 @@ describe('lion-select-rich', () => {
|
|
|
444
444
|
});
|
|
445
445
|
|
|
446
446
|
it('adds focus to element with [role=listbox] when trapsKeyboardFocus is true', async () => {
|
|
447
|
-
const el = await fixture(
|
|
448
|
-
|
|
449
|
-
);
|
|
447
|
+
const el = await fixture(html`
|
|
448
|
+
<lion-select-rich .config=${{ trapsKeyboardFocus: true }}></lion-select-rich>
|
|
449
|
+
`);
|
|
450
450
|
const { _listboxNode } = getSelectRichMembers(el);
|
|
451
451
|
expect(document.activeElement).to.not.equal(_listboxNode);
|
|
452
452
|
|
|
@@ -503,11 +503,9 @@ describe('lion-select-rich', () => {
|
|
|
503
503
|
});
|
|
504
504
|
|
|
505
505
|
it('does not close the listbox with [Tab] key once opened when trapsKeyboardFocus is true', async () => {
|
|
506
|
-
const el = await fixture(
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
`,
|
|
510
|
-
);
|
|
506
|
+
const el = await fixture(html`
|
|
507
|
+
<lion-select-rich opened .config=${{ trapsKeyboardFocus: true }}> </lion-select-rich>
|
|
508
|
+
`);
|
|
511
509
|
// tab can only be caught via keydown
|
|
512
510
|
const { _listboxNode } = getSelectRichMembers(el);
|
|
513
511
|
_listboxNode.dispatchEvent(new KeyboardEvent('keydown', { key: 'Tab' }));
|
|
@@ -50,13 +50,11 @@ describe('lion-step', () => {
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
it('is hidden when attribute hidden is true', async () => {
|
|
53
|
-
const el = await fixture(
|
|
54
|
-
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
`,
|
|
59
|
-
);
|
|
53
|
+
const el = await fixture(html`
|
|
54
|
+
<fake-lion-steps>
|
|
55
|
+
<lion-step hidden>Step 1</lion-step>
|
|
56
|
+
</fake-lion-steps>
|
|
57
|
+
`);
|
|
60
58
|
expect(el.children[0]).not.to.be.displayed;
|
|
61
59
|
});
|
|
62
60
|
|
|
@@ -105,6 +105,16 @@ export class LionSwitch extends ScopedElementsMixin(ChoiceInputMixin(LionField))
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Override this function from ChoiceInputMixin.
|
|
110
|
+
* @param {Event} ev
|
|
111
|
+
* @protected
|
|
112
|
+
*/
|
|
113
|
+
_toggleChecked(ev) {
|
|
114
|
+
ev.preventDefault();
|
|
115
|
+
super._toggleChecked(ev);
|
|
116
|
+
}
|
|
117
|
+
|
|
108
118
|
/**
|
|
109
119
|
* Override this function from ChoiceInputMixin.
|
|
110
120
|
* @protected
|
|
@@ -160,13 +160,11 @@ describe('lion-switch', () => {
|
|
|
160
160
|
it('should not propagate the "checked-changed" event further up when caught by switch', async () => {
|
|
161
161
|
const handlerSpy = sinon.spy();
|
|
162
162
|
const parentHandlerSpy = sinon.spy();
|
|
163
|
-
const el = await fixture(
|
|
164
|
-
|
|
165
|
-
<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
`,
|
|
169
|
-
);
|
|
163
|
+
const el = await fixture(html`
|
|
164
|
+
<div @checked-changed=${parentHandlerSpy}>
|
|
165
|
+
<lion-switch @checked-changed=${handlerSpy} .choiceValue=${'foo'}></lion-switch>
|
|
166
|
+
</div>
|
|
167
|
+
`);
|
|
170
168
|
const switchEl = /** @type {LionSwitch} */ (el.firstElementChild);
|
|
171
169
|
switchEl.checked = true;
|
|
172
170
|
await switchEl.updateComplete;
|
|
@@ -19,6 +19,16 @@ function setupPanel({ el, uid }) {
|
|
|
19
19
|
el.setAttribute('id', `panel-${uid}`);
|
|
20
20
|
el.setAttribute('role', 'tabpanel');
|
|
21
21
|
el.setAttribute('aria-labelledby', `button-${uid}`);
|
|
22
|
+
/**
|
|
23
|
+
* Facilitates navigation to panel content for assistive technology users.
|
|
24
|
+
*
|
|
25
|
+
* Focusable tab panel elements are recommended if any panels in a set contain
|
|
26
|
+
* content where the first element in the panel is not focusable.
|
|
27
|
+
* https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/
|
|
28
|
+
*/
|
|
29
|
+
if (!el.hasAttribute('tabindex')) {
|
|
30
|
+
el.setAttribute('tabindex', '0');
|
|
31
|
+
}
|
|
22
32
|
}
|
|
23
33
|
|
|
24
34
|
/**
|
|
@@ -452,45 +452,26 @@ describe('<lion-tabs>', () => {
|
|
|
452
452
|
});
|
|
453
453
|
|
|
454
454
|
describe('Accessibility', () => {
|
|
455
|
-
it('does not make panels focusable', async () => {
|
|
456
|
-
const el = /** @type {LionTabs} */ (
|
|
457
|
-
await fixture(html`
|
|
458
|
-
<lion-tabs>
|
|
459
|
-
<button slot="tab">tab 1</button>
|
|
460
|
-
<div slot="panel">panel 1</div>
|
|
461
|
-
<button slot="tab">tab 2</button>
|
|
462
|
-
<div slot="panel">panel 2</div>
|
|
463
|
-
</lion-tabs>
|
|
464
|
-
`)
|
|
465
|
-
);
|
|
466
|
-
expect(Array.from(el.children).find(child => child.slot === 'panel')).to.not.have.attribute(
|
|
467
|
-
'tabindex',
|
|
468
|
-
);
|
|
469
|
-
expect(Array.from(el.children).find(child => child.slot === 'panel')).to.not.have.attribute(
|
|
470
|
-
'tabindex',
|
|
471
|
-
);
|
|
472
|
-
});
|
|
473
|
-
|
|
474
|
-
it('makes selected tab focusable (other tabs are unfocusable)', async () => {
|
|
475
|
-
const el = /** @type {LionTabs} */ (
|
|
476
|
-
await fixture(html`
|
|
477
|
-
<lion-tabs>
|
|
478
|
-
<button slot="tab">tab 1</button>
|
|
479
|
-
<div slot="panel">panel 1</div>
|
|
480
|
-
<button slot="tab">tab 2</button>
|
|
481
|
-
<div slot="panel">panel 2</div>
|
|
482
|
-
<button slot="tab">tab 3</button>
|
|
483
|
-
<div slot="panel">panel 3</div>
|
|
484
|
-
</lion-tabs>
|
|
485
|
-
`)
|
|
486
|
-
);
|
|
487
|
-
const tabs = el.querySelectorAll('[slot=tab]');
|
|
488
|
-
expect(tabs[0]).to.have.attribute('tabindex', '0');
|
|
489
|
-
expect(tabs[1]).to.have.attribute('tabindex', '-1');
|
|
490
|
-
expect(tabs[2]).to.have.attribute('tabindex', '-1');
|
|
491
|
-
});
|
|
492
|
-
|
|
493
455
|
describe('Tabs', () => {
|
|
456
|
+
it('makes selected tab focusable (other tabs are unfocusable)', async () => {
|
|
457
|
+
const el = /** @type {LionTabs} */ (
|
|
458
|
+
await fixture(html`
|
|
459
|
+
<lion-tabs>
|
|
460
|
+
<button slot="tab">tab 1</button>
|
|
461
|
+
<div slot="panel">panel 1</div>
|
|
462
|
+
<button slot="tab">tab 2</button>
|
|
463
|
+
<div slot="panel">panel 2</div>
|
|
464
|
+
<button slot="tab">tab 3</button>
|
|
465
|
+
<div slot="panel">panel 3</div>
|
|
466
|
+
</lion-tabs>
|
|
467
|
+
`)
|
|
468
|
+
);
|
|
469
|
+
const tabs = el.querySelectorAll('[slot=tab]');
|
|
470
|
+
expect(tabs[0]).to.have.attribute('tabindex', '0');
|
|
471
|
+
expect(tabs[1]).to.have.attribute('tabindex', '-1');
|
|
472
|
+
expect(tabs[2]).to.have.attribute('tabindex', '-1');
|
|
473
|
+
});
|
|
474
|
+
|
|
494
475
|
it('links ids of content items to tab via [aria-controls]', async () => {
|
|
495
476
|
const el = /** @type {LionTabs} */ (
|
|
496
477
|
await fixture(html`
|
|
@@ -562,6 +543,36 @@ describe('<lion-tabs>', () => {
|
|
|
562
543
|
expect(panels[0]).to.have.attribute('aria-labelledby', tabs[0].id);
|
|
563
544
|
expect(panels[1]).to.have.attribute('aria-labelledby', tabs[1].id);
|
|
564
545
|
});
|
|
546
|
+
|
|
547
|
+
it('makes panel focusable', async () => {
|
|
548
|
+
const el = /** @type {LionTabs} */ (
|
|
549
|
+
await fixture(html`
|
|
550
|
+
<lion-tabs>
|
|
551
|
+
<button slot="tab">tab 1</button>
|
|
552
|
+
<div slot="panel">panel 1</div>
|
|
553
|
+
<button slot="tab">tab 2</button>
|
|
554
|
+
<div slot="panel">panel 2</div>
|
|
555
|
+
</lion-tabs>
|
|
556
|
+
`)
|
|
557
|
+
);
|
|
558
|
+
const panels = el.querySelectorAll('[slot=panel]');
|
|
559
|
+
expect(panels[0]).to.have.attribute('tabindex', '0');
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
it('does not override the tabindex already set on the panel', async () => {
|
|
563
|
+
const el = /** @type {LionTabs} */ (
|
|
564
|
+
await fixture(html`
|
|
565
|
+
<lion-tabs>
|
|
566
|
+
<button slot="tab">tab 1</button>
|
|
567
|
+
<div slot="panel" tabindex="-1">panel 1</div>
|
|
568
|
+
<button slot="tab">tab 2</button>
|
|
569
|
+
<div slot="panel">panel 2</div>
|
|
570
|
+
</lion-tabs>
|
|
571
|
+
`)
|
|
572
|
+
);
|
|
573
|
+
const panels = el.querySelectorAll('[slot=panel]');
|
|
574
|
+
expect(panels[0]).to.have.attribute('tabindex', '-1');
|
|
575
|
+
});
|
|
565
576
|
});
|
|
566
577
|
});
|
|
567
578
|
|