@lion/ui 0.20.0-menu-system.0 → 0.21.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/calendar-suites.js +1 -0
- package/collapsible.js +0 -1
- package/components/button/src/LionButton.js +0 -4
- package/components/button/test-suites/LionButton.suite.js +0 -1
- package/components/calendar/src/LionCalendar.js +1 -3
- package/components/calendar/test/lion-calendar.test.js +67 -47
- package/components/calendar/test-suites/LionCalendar.suite.js +79 -0
- package/components/combobox/test/lion-combobox.test.js +0 -1
- package/components/form-core/src/FormatMixin.js +17 -7
- package/components/form-core/src/form-group/FormGroupMixin.js +0 -7
- package/components/form-core/src/registration/FormRegistrarMixin.js +0 -11
- package/components/form-core/test/FormControlMixin.test.js +0 -1
- package/components/form-core/test/FormatMixin.test.js +4 -1
- package/components/form-core/test/validate/Validator.test.js +0 -2
- package/components/form-core/test-helpers/mimicUserInput.js +1 -0
- package/components/form-core/test-suites/FormatMixin.suite.js +273 -79
- package/components/form-core/test-suites/ValidateMixin.suite.js +0 -2
- package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +0 -1
- package/components/input/test/input-integrations.test.js +3 -2
- package/components/input/test/lion-input-integrations.test.js +2 -1
- package/components/input-amount/test/lion-input-amount-integrations.test.js +1 -1
- package/components/input-amount-dropdown/src/LionInputAmountDropdown.js +72 -11
- package/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.js +27 -0
- package/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.js +60 -3
- package/components/input-date/test/lion-input-date-integrations.test.js +1 -1
- package/components/input-datepicker/src/LionInputDatepicker.js +4 -0
- package/components/input-datepicker/src/localizeNamespaceLoader.js +0 -1
- package/components/input-datepicker/test/lion-input-datepicker-integrations.test.js +1 -1
- package/components/input-datepicker/test/lion-input-datepicker.test.js +74 -9
- package/components/input-datepicker/test-suites/LionInputDatepicker.suite.js +35 -0
- package/components/input-email/src/LionInputEmail.js +2 -0
- package/components/input-email/test/lion-input-email-integrations.test.js +1 -1
- package/components/input-email/test/lion-input-email.test.js +6 -0
- package/components/input-file/src/validators.js +31 -1
- package/components/input-file/test/FileValidators.test.js +31 -0
- package/components/input-file/translations/bg.js +1 -0
- package/components/input-file/translations/cs.js +1 -0
- package/components/input-file/translations/de.js +2 -0
- package/components/input-file/translations/en.js +1 -0
- package/components/input-file/translations/es.js +1 -0
- package/components/input-file/translations/fr.js +1 -0
- package/components/input-file/translations/hu.js +1 -0
- package/components/input-file/translations/id.js +1 -0
- package/components/input-file/translations/it.js +1 -0
- package/components/input-file/translations/nl.js +1 -0
- package/components/input-file/translations/pl.js +1 -0
- package/components/input-file/translations/ro.js +1 -0
- package/components/input-file/translations/ru.js +1 -0
- package/components/input-file/translations/sk.js +1 -0
- package/components/input-file/translations/uk.js +1 -0
- package/components/input-file/translations/zh.js +1 -0
- package/components/input-iban/test/lion-input-iban-integrations.test.js +1 -1
- package/components/input-range/src/LionInputRange.js +51 -8
- package/components/input-range/test/lion-input-range.test.js +114 -0
- package/components/input-stepper/test-suites/lion-input-stepper.integration.suite.js +2 -2
- package/components/input-tel/src/LionInputTel.js +1 -1
- package/components/input-tel/test-suites/LionInputTel.suite.js +7 -0
- package/components/localize/test/date/formatDate.test.js +0 -1
- package/components/overlays/src/OverlayController.js +110 -278
- package/components/overlays/src/OverlayMixin.js +11 -58
- package/components/overlays/src/OverlaysManager.js +2 -2
- package/components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js +41 -9
- package/components/overlays/src/utils/adopt-styles.js +2 -3
- package/components/overlays/src/utils/get-focusable-elements.js +0 -4
- package/components/overlays/src/utils/is-equal-config.js +6 -10
- package/components/overlays/test/OverlayController.test.js +14 -127
- package/components/overlays/test/utils-tests/is-equal-config.test.js +1 -1
- package/components/overlays/test-suites/OverlayMixin.suite.js +8 -8
- package/components/overlays/test-suites/WithHoverInteraction.suite.js +212 -0
- package/components/overlays/types/ArrowMixinTypes.ts +1 -3
- package/components/overlays/types/OverlayConfig.ts +5 -20
- package/components/overlays/types/OverlayMixinTypes.ts +0 -2
- package/components/select-rich/test/lion-select-rich.test.js +0 -3
- package/components/textarea/test/lion-textarea-integrations.test.js +2 -1
- package/components/tooltip/test/lion-tooltip.test.js +9 -1
- package/custom-elements.json +20629 -32907
- package/dist-types/components/button/src/LionButton.d.ts +0 -1
- package/dist-types/components/button/src/LionButton.d.ts.map +1 -1
- package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
- package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
- package/dist-types/components/calendar/test/lion-calendar.test.d.ts.map +1 -1
- package/dist-types/components/calendar/test-suites/LionCalendar.suite.d.ts +5 -0
- package/dist-types/components/calendar/test-suites/LionCalendar.suite.d.ts.map +1 -0
- package/dist-types/components/combobox/src/LionCombobox.d.ts +1 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts +2 -6
- package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
- package/dist-types/components/form-core/src/FormatMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/src/registration/FormRegistrarMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-helpers/mimicUserInput.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/FormatMixin.suite.d.ts +58 -5
- package/dist-types/components/form-core/test-suites/FormatMixin.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/test-suites/ValidateMixinFeedbackPart.suite.d.ts.map +1 -1
- package/dist-types/components/icon/src/LionIcon.d.ts +2 -2
- package/dist-types/components/input-amount-dropdown/src/LionInputAmountDropdown.d.ts +24 -6
- package/dist-types/components/input-amount-dropdown/src/LionInputAmountDropdown.d.ts.map +1 -1
- package/dist-types/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.d.ts +2 -0
- package/dist-types/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.d.ts.map +1 -0
- package/dist-types/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +2 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/test/lion-input-datepicker.test.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/test-suites/LionInputDatepicker.suite.d.ts +7 -0
- package/dist-types/components/input-datepicker/test-suites/LionInputDatepicker.suite.d.ts.map +1 -0
- package/dist-types/components/input-email/src/LionInputEmail.d.ts.map +1 -1
- package/dist-types/components/input-file/src/validators.d.ts +11 -0
- package/dist-types/components/input-file/src/validators.d.ts.map +1 -1
- package/dist-types/components/input-file/translations/bg-BG.d.ts +1 -0
- package/dist-types/components/input-file/translations/bg.d.ts +1 -0
- package/dist-types/components/input-file/translations/cs-CZ.d.ts +1 -0
- package/dist-types/components/input-file/translations/cs.d.ts +1 -0
- package/dist-types/components/input-file/translations/de-DE.d.ts +1 -0
- package/dist-types/components/input-file/translations/de.d.ts +1 -0
- package/dist-types/components/input-file/translations/en-AU.d.ts +1 -0
- package/dist-types/components/input-file/translations/en-GB.d.ts +1 -0
- package/dist-types/components/input-file/translations/en-PH.d.ts +1 -0
- package/dist-types/components/input-file/translations/en-US.d.ts +1 -0
- package/dist-types/components/input-file/translations/en.d.ts +1 -0
- package/dist-types/components/input-file/translations/es-ES.d.ts +1 -0
- package/dist-types/components/input-file/translations/es.d.ts +1 -0
- package/dist-types/components/input-file/translations/fr-BE.d.ts +1 -0
- package/dist-types/components/input-file/translations/fr-FR.d.ts +1 -0
- package/dist-types/components/input-file/translations/fr.d.ts +1 -0
- package/dist-types/components/input-file/translations/hu-HU.d.ts +1 -0
- package/dist-types/components/input-file/translations/hu.d.ts +1 -0
- package/dist-types/components/input-file/translations/id-ID.d.ts +1 -0
- package/dist-types/components/input-file/translations/id.d.ts +1 -0
- package/dist-types/components/input-file/translations/it-IT.d.ts +1 -0
- package/dist-types/components/input-file/translations/it.d.ts +1 -0
- package/dist-types/components/input-file/translations/nl-BE.d.ts +1 -0
- package/dist-types/components/input-file/translations/nl-NL.d.ts +1 -0
- package/dist-types/components/input-file/translations/nl.d.ts +1 -0
- package/dist-types/components/input-file/translations/pl-PL.d.ts +1 -0
- package/dist-types/components/input-file/translations/pl.d.ts +1 -0
- package/dist-types/components/input-file/translations/ro-RO.d.ts +1 -0
- package/dist-types/components/input-file/translations/ro.d.ts +1 -0
- package/dist-types/components/input-file/translations/ru-RU.d.ts +1 -0
- package/dist-types/components/input-file/translations/ru.d.ts +1 -0
- package/dist-types/components/input-file/translations/sk-SK.d.ts +1 -0
- package/dist-types/components/input-file/translations/sk.d.ts +1 -0
- package/dist-types/components/input-file/translations/uk-UA.d.ts +1 -0
- package/dist-types/components/input-file/translations/uk.d.ts +1 -0
- package/dist-types/components/input-file/translations/zh-CN.d.ts +1 -0
- package/dist-types/components/input-file/translations/zh.d.ts +1 -0
- package/dist-types/components/input-range/src/LionInputRange.d.ts +11 -0
- package/dist-types/components/input-range/src/LionInputRange.d.ts.map +1 -1
- package/dist-types/components/input-tel/src/LionInputTel.d.ts.map +1 -1
- package/dist-types/components/input-tel/test-suites/LionInputTel.suite.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayController.d.ts +12 -24
- 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/configurations/visibility-trigger-partials/withHoverInteraction.d.ts.map +1 -1
- package/dist-types/components/overlays/src/utils/get-focusable-elements.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/test-suites/WithHoverInteraction.suite.d.ts +17 -0
- package/dist-types/components/overlays/test-suites/WithHoverInteraction.suite.d.ts.map +1 -0
- package/dist-types/components/overlays/types/ArrowMixinTypes.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayConfig.d.ts +2 -12
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts +0 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +3 -11
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/components/tooltip/src/LionTooltip.d.ts +1 -1
- package/dist-types/components/tooltip/test/lion-tooltip.test.d.ts.map +1 -1
- package/dist-types/exports/calendar-suites.d.ts +2 -0
- package/dist-types/exports/calendar-suites.d.ts.map +1 -0
- package/dist-types/exports/input-datepicker-suites.d.ts +2 -0
- package/dist-types/exports/input-datepicker-suites.d.ts.map +1 -0
- package/dist-types/exports/input-file.d.ts +1 -1
- package/dist-types/exports/overlays-test-suites.d.ts +1 -0
- package/dist-types/exports/overlays.d.ts +0 -3
- package/dist-types/exports/overlays.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/api-table.md +4 -2
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/api-table.md +8 -21
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/api-table.md +6 -31
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/form/use-cases.md +2 -2
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/api-table.md +2 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/api-table.md +2 -1
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-amount-dropdown/api-table.md +3 -2
- package/docs/components/input-date/api-table.md +2 -1
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/api-table.md +6 -22
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/api-table.md +3 -2
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/api-table.md +2 -1
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-file/use-cases.md +18 -0
- package/docs/components/input-iban/api-table.md +2 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/api-table.md +7 -1
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-range/use-cases.md +14 -0
- package/docs/components/input-stepper/api-table.md +2 -1
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/api-table.md +3 -2
- 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 +3 -2
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/listbox/api-table.md +2 -1
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/api-table.md +2 -1
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/api-table.md +2 -1
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +5 -21
- package/docs/components/select-rich/use-cases.md +2 -2
- package/docs/components/switch/api-table.md +2 -1
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/textarea/api-table.md +2 -1
- package/docs/components/tooltip/api-table.md +11 -36
- package/docs/components/tooltip/use-cases.md +34 -1
- package/docs/fundamentals/index.md +4 -4
- 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/overview.md +1 -1
- package/docs/fundamentals/systems/form/api-table.md +2 -1
- 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 +2 -2
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/api-table.md +34 -36
- 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 +2 -2
- package/docs/fundamentals/tools/helpers/overview.md +1 -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/how-to/index.md +1 -1
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/exports/calendar-suites.js +1 -0
- package/exports/collapsible.js +0 -1
- package/exports/input-datepicker-suites.js +1 -0
- package/exports/input-file.js +5 -1
- package/exports/overlays-test-suites.js +1 -0
- package/exports/overlays.js +0 -6
- package/input-datepicker-suites.js +1 -0
- package/input-file.js +5 -1
- package/overlays-test-suites.js +1 -0
- package/overlays.js +0 -6
- package/package.json +2 -2
- package/components/collapsible/src/DisclosureMixin.js +0 -313
- package/components/collapsible/test-suites/DisclosureMixin.suite.js +0 -30
- package/components/collapsible/types/DisclosureMixinTypes.ts +0 -48
- package/components/menu/CHANGELOG.md +0 -37
- package/components/menu/README.md +0 -335
- package/components/menu/index.js +0 -2
- package/components/menu/lion-menu-overlay.js +0 -3
- package/components/menu/lion-menu.js +0 -3
- package/components/menu/lion-spinbutton.js +0 -3
- package/components/menu/lion-toolbar.js +0 -3
- package/components/menu/lion-tree.js +0 -3
- package/components/menu/package.json +0 -46
- package/components/menu/requirements.temp.md +0 -12
- package/components/menu/src/InteractiveListMixin.js +0 -840
- package/components/menu/src/LionMenu.js +0 -250
- package/components/menu/src/LionMenuHybrid.js +0 -46
- package/components/menu/src/LionMenuOverlay.js +0 -155
- package/components/menu/src/LionSpinbutton.js +0 -213
- package/components/menu/src/LionToolbar.js +0 -94
- package/components/menu/src/LionTree.js +0 -52
- package/components/menu/src/MoreButtonMenuMixin.js +0 -278
- package/components/menu/src/MultiLevelListMixin.js +0 -311
- package/components/menu/src/utils/isInView.js +0 -26
- package/components/menu/src/utils/listItemInteractions.js +0 -124
- package/components/menu/test/InteractiveListMixin.test.js +0 -3
- package/components/menu/test/MoreButtonMenuMixin.test.js +0 -4
- package/components/menu/test/MultiLevelListMixin.test.js +0 -3
- package/components/menu/test/lion-menu-hybrid.test.js +0 -3
- package/components/menu/test/lion-menu.test.js +0 -11
- package/components/menu/test/lion-toolbar.test.js +0 -8
- package/components/menu/test/lion-tree.test.js +0 -7
- package/components/menu/test-helpers/mimicKeyPress.js +0 -9
- package/components/menu/test-suites/InteractiveListMixin.suite.js +0 -454
- package/components/menu/test-suites/LionMenu.suite.js +0 -113
- package/components/menu/test-suites/LionMenuHybrid.suite.js +0 -583
- package/components/menu/test-suites/MoreButtonMenuMixin.suite.js +0 -372
- package/components/menu/test-suites/MultiLevelListMixin.suite.js +0 -303
- package/components/menu/types/InteractiveListMixinTypes.d.ts +0 -84
- package/components/navigation-bar/README.md +0 -1
- package/components/navigation-bar/src/LionNavigationBar.js +0 -439
- package/components/navigation-bar/src/types.js +0 -41
- package/components/overlays/NEXT.md +0 -49
- package/components/overlays/test/withHoverInteraction.test.js +0 -90
- package/dist-types/components/collapsible/src/DisclosureMixin.d.ts +0 -3
- package/dist-types/components/collapsible/src/DisclosureMixin.d.ts.map +0 -1
- package/dist-types/components/collapsible/test-suites/DisclosureMixin.suite.d.ts +0 -2
- package/dist-types/components/collapsible/test-suites/DisclosureMixin.suite.d.ts.map +0 -1
- package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts +0 -24
- package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts.map +0 -1
- package/dist-types/components/menu/index.d.ts +0 -3
- package/dist-types/components/menu/index.d.ts.map +0 -1
- package/dist-types/components/menu/lion-menu-overlay.d.ts +0 -2
- package/dist-types/components/menu/lion-menu-overlay.d.ts.map +0 -1
- package/dist-types/components/menu/lion-menu.d.ts +0 -2
- package/dist-types/components/menu/lion-menu.d.ts.map +0 -1
- package/dist-types/components/menu/lion-spinbutton.d.ts +0 -2
- package/dist-types/components/menu/lion-spinbutton.d.ts.map +0 -1
- package/dist-types/components/menu/lion-toolbar.d.ts +0 -2
- package/dist-types/components/menu/lion-toolbar.d.ts.map +0 -1
- package/dist-types/components/menu/lion-tree.d.ts +0 -2
- package/dist-types/components/menu/lion-tree.d.ts.map +0 -1
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts +0 -617
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts.map +0 -1
- package/dist-types/components/menu/src/LionMenu.d.ts +0 -635
- package/dist-types/components/menu/src/LionMenu.d.ts.map +0 -1
- package/dist-types/components/menu/src/LionMenuHybrid.d.ts +0 -19
- package/dist-types/components/menu/src/LionMenuHybrid.d.ts.map +0 -1
- package/dist-types/components/menu/src/LionMenuOverlay.d.ts +0 -1015
- package/dist-types/components/menu/src/LionMenuOverlay.d.ts.map +0 -1
- package/dist-types/components/menu/src/LionSpinbutton.d.ts +0 -58
- package/dist-types/components/menu/src/LionSpinbutton.d.ts.map +0 -1
- package/dist-types/components/menu/src/LionToolbar.d.ts +0 -8
- package/dist-types/components/menu/src/LionToolbar.d.ts.map +0 -1
- package/dist-types/components/menu/src/LionTree.d.ts +0 -447
- package/dist-types/components/menu/src/LionTree.d.ts.map +0 -1
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts +0 -39
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts.map +0 -1
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts +0 -503
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts.map +0 -1
- package/dist-types/components/menu/src/utils/isInView.d.ts +0 -9
- package/dist-types/components/menu/src/utils/isInView.d.ts.map +0 -1
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts +0 -48
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts.map +0 -1
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts +0 -2
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts +0 -2
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts +0 -2
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/lion-menu-hybrid.test.d.ts +0 -2
- package/dist-types/components/menu/test/lion-menu-hybrid.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/lion-menu.test.d.ts +0 -2
- package/dist-types/components/menu/test/lion-menu.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/lion-toolbar.test.d.ts +0 -2
- package/dist-types/components/menu/test/lion-toolbar.test.d.ts.map +0 -1
- package/dist-types/components/menu/test/lion-tree.test.d.ts +0 -2
- package/dist-types/components/menu/test/lion-tree.test.d.ts.map +0 -1
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts +0 -7
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +0 -14
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts +0 -9
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/LionMenuHybrid.suite.d.ts +0 -5
- package/dist-types/components/menu/test-suites/LionMenuHybrid.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts +0 -14
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts +0 -11
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts.map +0 -1
- package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts +0 -238
- package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts.map +0 -1
- package/dist-types/components/navigation-bar/src/types.d.ts +0 -85
- package/dist-types/components/navigation-bar/src/types.d.ts.map +0 -1
- package/dist-types/components/overlays/test/withHoverInteraction.test.d.ts +0 -2
- package/dist-types/components/overlays/test/withHoverInteraction.test.d.ts.map +0 -1
- package/dist-types/exports/define/lion-item.d.ts +0 -2
- package/dist-types/exports/define/lion-item.d.ts.map +0 -1
- package/dist-types/exports/define/lion-menu-overlay.d.ts +0 -2
- package/dist-types/exports/define/lion-menu-overlay.d.ts.map +0 -1
- package/dist-types/exports/define/lion-menu.d.ts +0 -2
- package/dist-types/exports/define/lion-menu.d.ts.map +0 -1
- package/dist-types/exports/define/lion-navigation-bar.d.ts +0 -2
- package/dist-types/exports/define/lion-navigation-bar.d.ts.map +0 -1
- package/dist-types/exports/define/lion-toolbar.d.ts +0 -2
- package/dist-types/exports/define/lion-toolbar.d.ts.map +0 -1
- package/dist-types/exports/define/lion-tree.d.ts +0 -2
- package/dist-types/exports/define/lion-tree.d.ts.map +0 -1
- package/dist-types/exports/menu-test-suites.d.ts +0 -4
- package/dist-types/exports/menu-test-suites.d.ts.map +0 -1
- package/dist-types/exports/menu.d.ts +0 -7
- package/dist-types/exports/menu.d.ts.map +0 -1
- package/dist-types/exports/navigation-bar.d.ts +0 -2
- package/dist-types/exports/navigation-bar.d.ts.map +0 -1
- package/docs/components/menu/api-table.md +0 -460
- package/docs/components/menu/applyMenuDemoStyles.js +0 -173
- package/docs/components/menu/extensions.md +0 -262
- package/docs/components/menu/index.md +0 -13
- package/docs/components/menu/overview.md +0 -422
- package/docs/components/menu/use-cases.md +0 -77
- package/exports/define/lion-item.js +0 -3
- package/exports/define/lion-menu-overlay.js +0 -3
- package/exports/define/lion-menu.js +0 -3
- package/exports/define/lion-navigation-bar.js +0 -3
- package/exports/define/lion-toolbar.js +0 -3
- package/exports/define/lion-tree.js +0 -3
- package/exports/menu-test-suites.js +0 -4
- package/exports/menu.js +0 -7
- package/exports/navigation-bar.js +0 -1
- package/menu-test-suites.js +0 -4
- package/menu.js +0 -7
- package/navigation-bar.js +0 -1
|
@@ -28,9 +28,9 @@ export const main = () => {
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input/overview.md)
|
|
32
32
|
- Default label in different languages
|
|
33
|
-
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
34
34
|
- IsIBAN (default)
|
|
35
35
|
- IsCountryIBAN
|
|
36
36
|
- Parses IBANs automatically
|
|
@@ -37,7 +37,9 @@ eleventyNavigation:
|
|
|
37
37
|
| `label` | public | `string` | | The label text for the input node.
When no light dom defined via \[slot=label], this value will be used. | LionField |
|
|
38
38
|
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | LionField |
|
|
39
39
|
| `max` | public | `number` | `Infinity` | | |
|
|
40
|
+
| `maxLabel` | public | `string` | `''` | | |
|
|
40
41
|
| `min` | public | `number` | `Infinity` | | |
|
|
42
|
+
| `minLabel` | public | `string` | `''` | | |
|
|
41
43
|
| `modelValue` | public | | | | LionField |
|
|
42
44
|
| `name` | public | `string` | `''` | The name the element will be registered with to the .formElements collection
of the parent. Also, it serves as the key of key/value pairs in
 modelValue/serializedValue objects | LionField |
|
|
43
45
|
| `noMinMaxLabels` | public | `boolean` | `false` | | |
|
|
@@ -69,6 +71,7 @@ eleventyNavigation:
|
|
|
69
71
|
| `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
|
|
70
72
|
| `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
|
|
71
73
|
| `_inputNode` | protected | `HTMLInputElement \| HTMLTextAreaElement` | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | LionField |
|
|
74
|
+
| `_isEditingTextField` | protected | | | | LionField |
|
|
72
75
|
| `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'
event). Will be added as meta info to the \`model-value-changed\` event. Depending on
whether a user is interacting, formatting logic will be handled differently. | LionField |
|
|
73
76
|
| `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | LionField |
|
|
74
77
|
| `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an
'endpoint'. This means it will be considered as an individual field: for
a select, individual options will not be part of the formPath. They
will.
Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'
(from Application Developer perspective) need to be more like fields
(think of an amount-input with a currency select box next to it), can set this
to true to hide private internals in the formPath. | LionField |
|
|
@@ -78,6 +81,7 @@ eleventyNavigation:
|
|
|
78
81
|
| `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'child'` | Based on the role, details of handling model-value-changed repropagation differ. | LionField |
|
|
79
82
|
| `_requestedToBeDisabled` | protected | `boolean` | `false` | | LionField |
|
|
80
83
|
| `_valueChangedEvent` | protected | `string` | `'model-value-changed'` | The event that triggers the dirty state | LionField |
|
|
84
|
+
| `_valueDisplay` | protected | | | Get the display info for the current value | |
|
|
81
85
|
| `_visibleMessagesAmount` | protected | `number` | `1` | The amount of feedback messages that will visible in LionValidationFeedback | LionField |
|
|
82
86
|
|
|
83
87
|
### Methods
|
|
@@ -98,7 +102,7 @@ eleventyNavigation:
|
|
|
98
102
|
| `formatter` | public | Converts modelValue to formattedValue (formattedValue will be synced with
\`.\_inputNode.value\`)
For instance, a Date object to a localized date. | `v: *, opts: FormatOptions` | `string` | LionField |
|
|
99
103
|
| `initInteractionState` | public | Evaluations performed on connectedCallback.
This method is public, so it can be called at a later moment (when we need to wait for
registering children for instance) as well.
Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | LionField |
|
|
100
104
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
101
|
-
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a
|
|
105
|
+
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a preprocessor that smartly
updates the viewValue and caret position for best UX. | `v: string, opts: FormatOptions & { prevViewValue: string; currentCaretIndex: number }` | `{ viewValue:string; caretIndex:number; }\|string\|undefined` | LionField |
|
|
102
106
|
| `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionField |
|
|
103
107
|
| `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionField |
|
|
104
108
|
| `reset` | public | Resets modelValue to initial value.
Interaction states are cleared | | | LionField |
|
|
@@ -179,6 +183,8 @@ eleventyNavigation:
|
|
|
179
183
|
| `unit` | unit | |
|
|
180
184
|
| `step` | step | |
|
|
181
185
|
| `no-min-max-labels` | noMinMaxLabels | |
|
|
186
|
+
| `min-label` | minLabel | |
|
|
187
|
+
| `max-label` | maxLabel | |
|
|
182
188
|
| `autocomplete` | autocomplete | NativeTextFieldMixin |
|
|
183
189
|
| `focused` | focused | LionField |
|
|
184
190
|
| `focused-visible` | focusedVisible | LionField |
|
|
@@ -25,11 +25,11 @@ import '@lion/ui/define/lion-input-range.js';
|
|
|
25
25
|
|
|
26
26
|
## Features
|
|
27
27
|
|
|
28
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
28
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input/overview.md).
|
|
29
29
|
- Shows `modelValue` and `unit` above the range input.
|
|
30
30
|
- Shows `min` and `max` value after the range input.
|
|
31
31
|
- Can hide the `min` and `max` value via `no-min-max-labels`.
|
|
32
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
32
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
@@ -60,6 +60,20 @@ import '@lion/ui/define/lion-input-range.js';
|
|
|
60
60
|
></lion-input-range>
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
## Custom Min Max Labels
|
|
64
|
+
|
|
65
|
+
```html preview-story
|
|
66
|
+
<lion-input-range
|
|
67
|
+
min="0"
|
|
68
|
+
max="11"
|
|
69
|
+
min-label="less than 1 item"
|
|
70
|
+
max-label="more than 10 items"
|
|
71
|
+
.modelValue="${4}"
|
|
72
|
+
unit="Items"
|
|
73
|
+
label="Items"
|
|
74
|
+
></lion-input-range>
|
|
75
|
+
```
|
|
76
|
+
|
|
63
77
|
## Disabled
|
|
64
78
|
|
|
65
79
|
```html preview-story
|
|
@@ -70,6 +70,7 @@ eleventyNavigation:
|
|
|
70
70
|
| `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
|
|
71
71
|
| `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
|
|
72
72
|
| `_inputNode` | protected | `HTMLInputElement \| HTMLTextAreaElement` | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | LionField |
|
|
73
|
+
| `_isEditingTextField` | protected | | | | LionField |
|
|
73
74
|
| `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'
event). Will be added as meta info to the \`model-value-changed\` event. Depending on
whether a user is interacting, formatting logic will be handled differently. | LionField |
|
|
74
75
|
| `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | LionField |
|
|
75
76
|
| `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an
'endpoint'. This means it will be considered as an individual field: for
a select, individual options will not be part of the formPath. They
will.
Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'
(from Application Developer perspective) need to be more like fields
(think of an amount-input with a currency select box next to it), can set this
to true to hide private internals in the formPath. | LionField |
|
|
@@ -98,7 +99,7 @@ eleventyNavigation:
|
|
|
98
99
|
| `focus` | public | Calls \`focus()\` on focusable element within | | | LionField |
|
|
99
100
|
| `initInteractionState` | public | Evaluations performed on connectedCallback.
This method is public, so it can be called at a later moment (when we need to wait for
registering children for instance) as well.
Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | LionField |
|
|
100
101
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
101
|
-
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a
|
|
102
|
+
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a preprocessor that smartly
updates the viewValue and caret position for best UX. | `v: string, opts: FormatOptions & { prevViewValue: string; currentCaretIndex: number }` | `{ viewValue:string; caretIndex:number; }\|string\|undefined` | LionField |
|
|
102
103
|
| `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionField |
|
|
103
104
|
| `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionField |
|
|
104
105
|
| `reset` | public | Resets modelValue to initial value.
Interaction states are cleared | | | LionField |
|
|
@@ -30,7 +30,7 @@ loadDefaultFeedbackMessages();
|
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
33
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input/overview.md).
|
|
34
34
|
- Set `min` and `max` value to define the range.
|
|
35
35
|
- Set `step` value in integer or decimal to increase and decrease the value.
|
|
36
36
|
- Use `ArrowUp` or `ArrowDown` to update the value.
|
|
@@ -22,7 +22,7 @@ eleventyNavigation:
|
|
|
22
22
|
| `activeRegion` | public | `string` | | Currently active region based on:
1\. allowed regions: get the region from configured allowed regions (if one entry)
2\. user input: try to derive active region from user input
3\. locale: try to get the region from locale (\`html\[lang]\` attribute) | |
|
|
23
23
|
| `allowCrossRootRegistration` | public | `boolean` | `false` | To encourage accessibility best practices, \`form-element-register\` events
do not pierce through shadow roots. This forces the developer to create form groups and fieldsets that automatically allow the creation of accessible relationships in the same dom tree.
Use this option if you know what you're doing. It will then be possible to nest FormControls
inside shadow dom. See https\://lion.js.org/fundamentals/rationales/accessibility/#shadow-roots-and-accessibility | LionField |
|
|
24
24
|
| `allowedRegions` | public | `RegionCode[]` | `[]` | The regions that should be considered when international phone numbers are detected.
(when not configured, all regions worldwide will be considered) | |
|
|
25
|
-
| `autocomplete` | public | `string \| undefined` | `
|
|
25
|
+
| `autocomplete` | public | `string \| undefined` | `'tel'` | Delegates this property to input/textarea/select. | NativeTextFieldMixin |
|
|
26
26
|
| `autofocus` | public | `boolean` | `false` | | LionField |
|
|
27
27
|
| `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.
A date input for instance, always needs the isDate validator. | LionField |
|
|
28
28
|
| `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | LionField |
|
|
@@ -69,6 +69,7 @@ eleventyNavigation:
|
|
|
69
69
|
| `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
|
|
70
70
|
| `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
|
|
71
71
|
| `_inputNode` | protected | `HTMLInputElement \| HTMLTextAreaElement` | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | LionField |
|
|
72
|
+
| `_isEditingTextField` | protected | | | | LionField |
|
|
72
73
|
| `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'
event). Will be added as meta info to the \`model-value-changed\` event. Depending on
whether a user is interacting, formatting logic will be handled differently. | LionField |
|
|
73
74
|
| `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | LionField |
|
|
74
75
|
| `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an
'endpoint'. This means it will be considered as an individual field: for
a select, individual options will not be part of the formPath. They
will.
Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'
(from Application Developer perspective) need to be more like fields
(think of an amount-input with a currency select box next to it), can set this
to true to hide private internals in the formPath. | LionField |
|
|
@@ -101,7 +102,7 @@ eleventyNavigation:
|
|
|
101
102
|
| `initInteractionState` | public | Evaluations performed on connectedCallback.
This method is public, so it can be called at a later moment (when we need to wait for
registering children for instance) as well.
Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | LionField |
|
|
102
103
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
103
104
|
| `parser` | public | Converts viewValue to modelValue
For instance, a localized date to a Date Object | `viewValue: string` | `string` | LionField |
|
|
104
|
-
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a
|
|
105
|
+
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a preprocessor that smartly
updates the viewValue and caret position for best UX. | `viewValue: string, { currentCaretIndex, prevViewValue }, options: @param {string} options.prevViewValue * @param {number} options.currentCaretIndex * ` | `{ viewValue: string; caretIndex: number; } \| undefined` | LionField |
|
|
105
106
|
| `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionField |
|
|
106
107
|
| `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionField |
|
|
107
108
|
| `reset` | public | Resets modelValue to initial value.
Interaction states are cleared | | | LionField |
|
|
@@ -51,7 +51,7 @@ export const main = () => {
|
|
|
51
51
|
|
|
52
52
|
## Features
|
|
53
53
|
|
|
54
|
-
- Extends our [input](https://github.com/ing-bank/lion/blob/
|
|
54
|
+
- Extends our [input](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input/overview.md)
|
|
55
55
|
- Shows a mobile telephone keypad on mobile (by having a native `<input inputmode="tel">` inside)
|
|
56
56
|
- Can be configured with a list of allowed region codes
|
|
57
57
|
- Will be preconfigured with region derived from locale
|
|
@@ -34,7 +34,7 @@ Say we have the following telephone number from Madrid, Spain: `+34919930432`.
|
|
|
34
34
|
It contains a [country code](https://en.wikipedia.org/wiki/Country_code) (34), an [area code](https://en.wikipedia.org/wiki/Telephone_numbering_plan#Area_code) (91) and a [dial code](https://en.wikipedia.org/wiki/Mobile_dial_code) (+34 91).
|
|
35
35
|
Input Tel interprets phone numbers based on their [region code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2): a two character long region representation('ES' in the telephone number above).
|
|
36
36
|
|
|
37
|
-
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input-tel/#allowed-regions) are not configured,
|
|
38
38
|
all of them will be supported as values of Input Tel.
|
|
39
39
|
|
|
40
40
|
```js story
|
|
@@ -49,11 +49,11 @@ export const regionCodesTable = () => {
|
|
|
49
49
|
The active region (accessible via readonly accessor `.activeRegion`) determines how validation and formatting
|
|
50
50
|
should be applied. It is dependent on the following factors:
|
|
51
51
|
|
|
52
|
-
- [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
53
|
-
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/
|
|
52
|
+
- [allowed regions](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input-tel/#allowed-regions): a list that determines what is allowed to become .activeRegion. If
|
|
53
|
+
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input-tel/#restrict-to-one-region), .activeRegion will always be this value.
|
|
54
54
|
- the modelValue or viewValue: once it contains sufficient info to derive its region code (and
|
|
55
|
-
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
56
|
-
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
55
|
+
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input-tel/#allowed-regions) if configured)
|
|
56
|
+
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input-tel/#allowed-regions) if configured)
|
|
57
57
|
|
|
58
58
|
What follows from the list above is that .activeRegion can change dynamically, after a value
|
|
59
59
|
change in the text box by the user (or when locales or allowed regions would be changed by the
|
|
@@ -142,7 +142,7 @@ export const heuristic = () => {
|
|
|
142
142
|
Once it is configured, validation and formatting will be restricted to those
|
|
143
143
|
values that are present in this list.
|
|
144
144
|
|
|
145
|
-
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/
|
|
145
|
+
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input-tel-dropdown/index.md), only allowed regions will
|
|
146
146
|
> be shown in the dropdown list.
|
|
147
147
|
|
|
148
148
|
```js preview-story
|
|
@@ -22,7 +22,7 @@ eleventyNavigation:
|
|
|
22
22
|
| `activeRegion` | public | `string` | | Currently active region based on:
1\. allowed regions: get the region from configured allowed regions (if one entry)
2\. user input: try to derive active region from user input
3\. locale: try to get the region from locale (\`html\[lang]\` attribute) | LionInputTel |
|
|
23
23
|
| `allowCrossRootRegistration` | public | `boolean` | `false` | To encourage accessibility best practices, \`form-element-register\` events
do not pierce through shadow roots. This forces the developer to create form groups and fieldsets that automatically allow the creation of accessible relationships in the same dom tree.
Use this option if you know what you're doing. It will then be possible to nest FormControls
inside shadow dom. See https\://lion.js.org/fundamentals/rationales/accessibility/#shadow-roots-and-accessibility | LionField |
|
|
24
24
|
| `allowedRegions` | public | `RegionCode[]` | `[]` | The regions that should be considered when international phone numbers are detected.
(when not configured, all regions worldwide will be considered) | LionInputTel |
|
|
25
|
-
| `autocomplete` | public | `string \| undefined` | `
|
|
25
|
+
| `autocomplete` | public | `string \| undefined` | `'tel'` | Delegates this property to input/textarea/select. | NativeTextFieldMixin |
|
|
26
26
|
| `autofocus` | public | `boolean` | `false` | | LionField |
|
|
27
27
|
| `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.
A date input for instance, always needs the isDate validator. | LionField |
|
|
28
28
|
| `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | LionField |
|
|
@@ -71,6 +71,7 @@ eleventyNavigation:
|
|
|
71
71
|
| `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
|
|
72
72
|
| `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
|
|
73
73
|
| `_inputNode` | protected | `HTMLInputElement \| HTMLTextAreaElement` | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | LionField |
|
|
74
|
+
| `_isEditingTextField` | protected | | | | LionField |
|
|
74
75
|
| `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'
event). Will be added as meta info to the \`model-value-changed\` event. Depending on
whether a user is interacting, formatting logic will be handled differently. | LionField |
|
|
75
76
|
| `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | LionField |
|
|
76
77
|
| `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an
'endpoint'. This means it will be considered as an individual field: for
a select, individual options will not be part of the formPath. They
will.
Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'
(from Application Developer perspective) need to be more like fields
(think of an amount-input with a currency select box next to it), can set this
to true to hide private internals in the formPath. | LionField |
|
|
@@ -105,7 +106,7 @@ eleventyNavigation:
|
|
|
105
106
|
| `initInteractionState` | public | Evaluations performed on connectedCallback.
This method is public, so it can be called at a later moment (when we need to wait for
registering children for instance) as well.
Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | LionField |
|
|
106
107
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
107
108
|
| `parser` | public | Converts viewValue to modelValue
For instance, a localized date to a Date Object | `viewValue: string` | `string` | LionField |
|
|
108
|
-
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a
|
|
109
|
+
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a preprocessor that smartly
updates the viewValue and caret position for best UX. | `viewValue: string, { currentCaretIndex, prevViewValue }, options: @param {string} options.prevViewValue * @param {number} options.currentCaretIndex * ` | `{ viewValue: string; caretIndex: number; } \| undefined` | LionField |
|
|
109
110
|
| `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionField |
|
|
110
111
|
| `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionField |
|
|
111
112
|
| `reset` | public | Resets modelValue to initial value.
Interaction states are cleared | | | LionField |
|
|
@@ -31,7 +31,7 @@ export const main = () => {
|
|
|
31
31
|
|
|
32
32
|
## Features
|
|
33
33
|
|
|
34
|
-
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/
|
|
34
|
+
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/input-tel/overview.md)
|
|
35
35
|
- Shows dropdown list with all possible regions
|
|
36
36
|
- Shows only allowed regions in dropdown list when .allowedRegions is configured
|
|
37
37
|
- Highlights regions on top of dropdown list when .preferredRegions is configured
|
|
@@ -221,6 +221,7 @@ eleventyNavigation:
|
|
|
221
221
|
| `name` | public | `string` | `''` | The name the element will be registered with to the .formElements collection
of the parent. Also, it serves as the key of key/value pairs in
 modelValue/serializedValue objects | FormRegisteringMixin |
|
|
222
222
|
| `serializedValue` | public | `string\|undefined` | `undefined` | The serialized version of the model value.
This value exists for maximal compatibility with the platform API.
The serialized value can be an interface in context where data binding is not
supported and a serialized string needs to be set.

Examples:
- For a date input, this would be the iso format of a date, e.g. '1999-01-20'.
- For a number input this would be the String representation of a float ('1234.56'
 instead of 1234.56)

When no parser is available, the value is usually the same as the formattedValue
(being \_inputNode.value) | FormatMixin |
|
|
223
223
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\` | FormatMixin |
|
|
224
|
+
| `_isEditingTextField` | protected | | | | FormatMixin |
|
|
224
225
|
| `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'
event). Will be added as meta info to the \`model-value-changed\` event. Depending on
whether a user is interacting, formatting logic will be handled differently. | FormatMixin |
|
|
225
226
|
| `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | FormatMixin |
|
|
226
227
|
| `_parentFormGroup` | protected | `FormRegistrarHost \| undefined` | `undefined` | The registrar this FormControl registers to, Usually a descendant of FormGroup or
ChoiceGroup | FormRegisteringMixin |
|
|
@@ -236,7 +237,7 @@ eleventyNavigation:
|
|
|
236
237
|
| `formatter` | public | Converts modelValue to formattedValue (formattedValue will be synced with
\`.\_inputNode.value\`)
For instance, a Date object to a localized date. | `modelValue: ChoiceInputModelValue` | `string` | FormatMixin |
|
|
237
238
|
| `makeRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
238
239
|
| `parser` | public | Converts viewValue to modelValue
For instance, a localized date to a Date Object | `v: string, opts: FormatOptions` | `*` | FormatMixin |
|
|
239
|
-
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a
|
|
240
|
+
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a preprocessor that smartly
updates the viewValue and caret position for best UX. | `v: string, opts: FormatOptions & { prevViewValue: string; currentCaretIndex: number }` | `{ viewValue:string; caretIndex:number; }\|string\|undefined` | FormatMixin |
|
|
240
241
|
| `retractRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
241
242
|
| `serializer` | public | Converts \`.modelValue\` to \`.serializedValue\`
For instance, a Date object to an iso formatted date string | `v: ?` | `string` | FormatMixin |
|
|
242
243
|
| `_afterTemplate` | protected | | | | ChoiceInputMixin |
|
|
@@ -151,4 +151,4 @@ Navigation will skip over disabled options. Let's disable Artichoke and Brussel
|
|
|
151
151
|
|
|
152
152
|
## Validation
|
|
153
153
|
|
|
154
|
-
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/
|
|
154
|
+
A validator can be used to make it e.g. `required`. If you want to know how to do that, please take a look at our [validation examples](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/fundamentals/systems/form/validate.md).
|
|
@@ -64,6 +64,7 @@ eleventyNavigation:
|
|
|
64
64
|
| `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
|
|
65
65
|
| `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
|
|
66
66
|
| `_inputNode` | protected | `HTMLInputElement \| HTMLTextAreaElement` | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | LionField |
|
|
67
|
+
| `_isEditingTextField` | protected | | | | LionField |
|
|
67
68
|
| `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'
event). Will be added as meta info to the \`model-value-changed\` event. Depending on
whether a user is interacting, formatting logic will be handled differently. | LionField |
|
|
68
69
|
| `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | LionField |
|
|
69
70
|
| `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an
'endpoint'. This means it will be considered as an individual field: for
a select, individual options will not be part of the formPath. They
will.
Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'
(from Application Developer perspective) need to be more like fields
(think of an amount-input with a currency select box next to it), can set this
to true to hide private internals in the formPath. | LionField |
|
|
@@ -94,7 +95,7 @@ eleventyNavigation:
|
|
|
94
95
|
| `initInteractionState` | public | Evaluations performed on connectedCallback.
This method is public, so it can be called at a later moment (when we need to wait for
registering children for instance) as well.
Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | LionField |
|
|
95
96
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
96
97
|
| `parser` | public | Converts viewValue to modelValue
For instance, a localized date to a Date Object | `v: string, opts: FormatOptions` | `*` | LionField |
|
|
97
|
-
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a
|
|
98
|
+
| `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user
on keyup instead of after blurring the field. The biggest difference between preprocessors
and formatters is their moment of execution: preprocessors are run before modelValue is
computed (and work based on view value), whereas formatters are run after the parser (and
are based on modelValue)
Automatically formats code while typing. It depends on a preprocessor that smartly
updates the viewValue and caret position for best UX. | `v: string, opts: FormatOptions & { prevViewValue: string; currentCaretIndex: number }` | `{ viewValue:string; caretIndex:number; }\|string\|undefined` | LionField |
|
|
98
99
|
| `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionField |
|
|
99
100
|
| `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionField |
|
|
100
101
|
| `reset` | public | Resets modelValue to initial value.
Interaction states are cleared | | | LionField |
|
|
@@ -32,12 +32,12 @@ export const main = () => html`
|
|
|
32
32
|
`;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
36
|
-
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/form/overview.md)'s serialization result.
|
|
36
|
+
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/select/overview.md) instead.
|
|
37
37
|
|
|
38
38
|
## Features
|
|
39
39
|
|
|
40
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/5c228561a361a8ed95aabcacf735f87fb2746a5f/docs/components/fieldset/overview.md), it has all the features a fieldset has.
|
|
41
41
|
|
|
42
42
|
- Get or set the checked value of the group:
|
|
43
43
|
- modelValue (default) - `checkedValue()`
|