@lion/ui 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/components/combobox/src/LionCombobox.js +10 -2
- package/components/combobox/test/lion-combobox.test.js +31 -0
- package/components/form-core/src/choice-group/ChoiceGroupMixin.js +7 -0
- package/components/form-core/types/choice-group/ChoiceGroupMixinTypes.ts +5 -0
- package/components/input-amount/src/LionInputAmount.js +17 -6
- package/components/input-amount/src/formatters.js +5 -3
- package/components/input-amount/test/formatters.test.js +88 -74
- package/components/input-amount/test/lion-input-amount.test.js +51 -36
- package/components/input-tel/test/validators.test.js +9 -0
- package/components/listbox/src/ListboxMixin.js +19 -3
- package/components/listbox/types/ListboxMixinTypes.ts +7 -1
- package/components/menu/README.md +360 -0
- package/components/menu/src/InteractiveListMixin.js +867 -0
- package/components/menu/src/LionMenu.js +436 -0
- package/components/menu/src/MoreButtonMenuMixin.js +295 -0
- package/components/menu/src/MultiLevelListMixin.js +312 -0
- package/components/menu/src/utils/isInView.js +26 -0
- package/components/menu/src/utils/listItemInteractions.js +124 -0
- package/components/menu/test/InteractiveListMixin.test.js +3 -0
- package/components/menu/test/MoreButtonMenuMixin.test.js +4 -0
- package/components/menu/test/MultiLevelListMixin.test.js +3 -0
- package/components/menu/test/lion-menu-interactions.test.js +3 -0
- package/components/menu/test/lion-menu.test.js +14 -0
- package/components/menu/test-helpers/mimicKeyPress.js +9 -0
- package/components/menu/test-suites/InteractiveListMixin.suite.js +537 -0
- package/components/menu/test-suites/LionMenu.suite.js +114 -0
- package/components/menu/test-suites/LionMenuInteractions.suite.js +583 -0
- package/components/menu/test-suites/MoreButtonMenuMixin.suite.js +372 -0
- package/components/menu/test-suites/MultiLevelListMixin.suite.js +309 -0
- package/components/menu/types/InteractiveListMixinTypes.ts +126 -0
- package/components/menu/types/MoreButtonMenuMixinTypes.ts +51 -0
- package/components/menu/types/MultiLevelListMixinTypes.ts +28 -0
- package/components/menu/types/OverlayWithListInvokerMixinTypes.ts +61 -0
- package/components/overlays/NEXT.md +49 -0
- package/components/overlays/src/OverlayController.js +304 -125
- package/components/overlays/src/OverlayMixin.js +81 -17
- package/components/overlays/src/utils/adopt-styles.js +1 -1
- package/components/overlays/src/utils/is-equal-config.js +15 -6
- package/components/overlays/test/OverlayController.test.js +223 -25
- package/components/overlays/test-suites/OverlayMixin.suite.js +8 -8
- package/components/overlays/types/ArrowMixinTypes.ts +1 -3
- package/components/overlays/types/OverlayConfig.ts +20 -5
- package/components/overlays/types/OverlayMixinTypes.ts +2 -0
- package/components/select-rich/src/LionSelectRich.js +12 -0
- package/components/select-rich/test/lion-select-rich-interaction.test.js +53 -0
- package/components/select-rich/test/lion-select-rich-upgrade.test.js +30 -0
- package/custom-elements.json +3120 -149
- package/dist-types/components/combobox/src/LionCombobox.d.ts +1 -1
- package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
- package/dist-types/components/dialog/src/LionDialog.d.ts +6 -2
- package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
- package/dist-types/components/form-core/src/choice-group/ChoiceGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/types/choice-group/ChoiceGroupMixinTypes.d.ts +5 -0
- package/dist-types/components/form-core/types/choice-group/ChoiceGroupMixinTypes.d.ts.map +1 -1
- package/dist-types/components/input-amount/src/LionInputAmount.d.ts +3 -1
- package/dist-types/components/input-amount/src/LionInputAmount.d.ts.map +1 -1
- package/dist-types/components/input-amount/src/formatters.d.ts +6 -4
- package/dist-types/components/input-amount/src/formatters.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +1 -1
- package/dist-types/components/listbox/src/ListboxMixin.d.ts.map +1 -1
- package/dist-types/components/listbox/types/ListboxMixinTypes.d.ts +7 -1
- package/dist-types/components/listbox/types/ListboxMixinTypes.d.ts.map +1 -1
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts +35 -0
- package/dist-types/components/menu/src/InteractiveListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/LionMenu.d.ts +129 -0
- package/dist-types/components/menu/src/LionMenu.d.ts.map +1 -0
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts +8 -0
- package/dist-types/components/menu/src/MoreButtonMenuMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts +7 -0
- package/dist-types/components/menu/src/MultiLevelListMixin.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts +9 -0
- package/dist-types/components/menu/src/utils/isInView.d.ts.map +1 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts +48 -0
- package/dist-types/components/menu/src/utils/listItemInteractions.d.ts.map +1 -0
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts +2 -0
- package/dist-types/components/menu/test/InteractiveListMixin.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts +2 -0
- package/dist-types/components/menu/test/MoreButtonMenuMixin.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts +2 -0
- package/dist-types/components/menu/test/MultiLevelListMixin.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/lion-menu-interactions.test.d.ts +2 -0
- package/dist-types/components/menu/test/lion-menu-interactions.test.d.ts.map +1 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts +2 -0
- package/dist-types/components/menu/test/lion-menu.test.d.ts.map +1 -0
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts +7 -0
- package/dist-types/components/menu/test-helpers/mimicKeyPress.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +11 -0
- package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts +9 -0
- package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts +5 -0
- package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts +11 -0
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts.map +1 -0
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts +11 -0
- package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts.map +1 -0
- package/dist-types/components/menu/types/InteractiveListMixinTypes.d.ts +72 -0
- package/dist-types/components/menu/types/InteractiveListMixinTypes.d.ts.map +1 -0
- package/dist-types/components/menu/types/MoreButtonMenuMixinTypes.d.ts +30 -0
- package/dist-types/components/menu/types/MoreButtonMenuMixinTypes.d.ts.map +1 -0
- package/dist-types/components/menu/types/MultiLevelListMixinTypes.d.ts +16 -0
- package/dist-types/components/menu/types/MultiLevelListMixinTypes.d.ts.map +1 -0
- package/dist-types/components/menu/types/OverlayWithListInvokerMixinTypes.d.ts +35 -0
- package/dist-types/components/menu/types/OverlayWithListInvokerMixinTypes.d.ts.map +1 -0
- package/dist-types/components/overlays/src/OverlayController.d.ts +22 -5
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
- package/dist-types/components/overlays/src/utils/is-equal-config.d.ts.map +1 -1
- package/dist-types/components/overlays/types/ArrowMixinTypes.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayConfig.d.ts +12 -2
- package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts +1 -0
- package/dist-types/components/overlays/types/OverlayMixinTypes.d.ts.map +1 -1
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts +13 -2
- package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/components/select-rich/test/lion-select-rich-interaction.test.d.ts.map +1 -1
- package/dist-types/components/select-rich/test/lion-select-rich-upgrade.test.d.ts +2 -0
- package/dist-types/components/select-rich/test/lion-select-rich-upgrade.test.d.ts.map +1 -0
- package/dist-types/components/tooltip/src/LionTooltip.d.ts +1 -1
- package/dist-types/exports/define/lion-item.d.ts +2 -0
- package/dist-types/exports/define/lion-item.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menu.d.ts +2 -0
- package/dist-types/exports/define/lion-menu.d.ts.map +1 -0
- package/dist-types/exports/define/lion-menuitem.d.ts +2 -0
- package/dist-types/exports/define/lion-menuitem.d.ts.map +1 -0
- package/dist-types/exports/menu-test-suites.d.ts +4 -0
- package/dist-types/exports/menu-test-suites.d.ts.map +1 -0
- package/dist-types/exports/menu.d.ts +3 -0
- package/dist-types/exports/menu.d.ts.map +1 -0
- package/dist-types/exports/overlays.d.ts +6 -0
- package/dist-types/exports/overlays.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/api-table.md +53 -39
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/api-table.md +32 -6
- 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/overview.md +1 -1
- package/docs/components/input-amount/api-table.md +9 -7
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-amount/use-cases.md +15 -4
- package/docs/components/input-amount-dropdown/api-table.md +2 -0
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/api-table.md +63 -45
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- 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/overview.md +1 -1
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/menu/api-table.md +44 -0
- package/docs/components/menu/applyMenuDemoStyles.js +173 -0
- package/docs/components/menu/extensions.md +262 -0
- package/docs/components/menu/index.md +13 -0
- package/docs/components/menu/migration.md +129 -0
- package/docs/components/menu/overview.md +448 -0
- package/docs/components/menu/src/DemoNavigationBar.js +441 -0
- package/docs/components/menu/src/DemoSpinButton.js +215 -0
- package/docs/components/menu/src/DemoToolbar.js +101 -0
- package/docs/components/menu/src/DemoTree.js +55 -0
- package/docs/components/menu/src/navigation-bar-types.js +41 -0
- package/docs/components/menu/use-cases.md +74 -0
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +51 -33
- package/docs/components/select-rich/use-cases.md +2 -2
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/tooltip/api-table.md +33 -7
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +1 -1
- 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/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 +46 -43
- 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/define/lion-item.js +3 -0
- package/exports/define/lion-menu.js +3 -0
- package/exports/define/lion-menuitem.js +3 -0
- package/exports/menu-test-suites.js +4 -0
- package/exports/menu.js +3 -0
- package/exports/overlays.js +6 -0
- package/menu-test-suites.js +4 -0
- package/menu.js +3 -0
- package/overlays.js +6 -0
- package/package.json +11 -4
- package/vendor/README.md +61 -0
- package/vendor/awesome-phonenumber-7.9.0-tlouisse.libphonenumber-9.0.41.tgz +0 -0
- package/vscode.html-custom-data.json +76 -8
- package/web-types.json +202 -17
|
@@ -20,6 +20,7 @@ eleventyNavigation:
|
|
|
20
20
|
| --------------------------- | --------- | ------------------------------------ | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
|
|
21
21
|
| `allowedCurrencies` | public | `CurrencyCode[]` | `[]` | Regions that are allowed to be selected in the dropdown. | |
|
|
22
22
|
| `currency` | public | `string \| undefined` | `undefined` | | LionInputAmount |
|
|
23
|
+
| `currencyLabel` | public | `string` | `''` | | LionInputAmount |
|
|
23
24
|
| `defaultValidators` | public | `array` | `[new CurrencyAndAmount()]` | | |
|
|
24
25
|
| `deserializer` | public | | `deserializer` | | |
|
|
25
26
|
| `formatter` | public | | `formatAmount` | | LionInputAmount |
|
|
@@ -77,6 +78,7 @@ eleventyNavigation:
|
|
|
77
78
|
| `allowedCurrencies` | allowedCurrencies | |
|
|
78
79
|
| `__dropdownSlot` | \_\_dropdownSlot | |
|
|
79
80
|
| `currency` | currency | LionInputAmount |
|
|
81
|
+
| `currency-label` | currencyLabel | LionInputAmount |
|
|
80
82
|
| `modelValue` | modelValue | LionInputAmount |
|
|
81
83
|
| `readonly` | readOnly | LionInput |
|
|
82
84
|
| `type` | type | LionInput |
|
|
@@ -28,11 +28,11 @@ import '@lion/ui/define/lion-input-date.js';
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
32
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
31
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/components/input/overview.md)
|
|
32
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
33
33
|
- Option to override locale to change the formatting and parsing
|
|
34
34
|
- Default label in different languages
|
|
35
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
35
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
36
36
|
- IsDate (default)
|
|
37
37
|
- MinDate
|
|
38
38
|
- MaxDate
|
|
@@ -16,63 +16,81 @@ eleventyNavigation:
|
|
|
16
16
|
|
|
17
17
|
### Fields
|
|
18
18
|
|
|
19
|
-
| Name | Privacy | Type
|
|
20
|
-
| --------------------------------- | --------- |
|
|
21
|
-
| `calendarHeading` | public | `string`
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
19
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
20
|
+
| --------------------------------- | --------- | ------------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
21
|
+
| `calendarHeading` | public | `string` | | The heading to be added on top of the calendar overlay.
Naming chosen from an Application Developer perspective.
For a Subclasser 'calendarOverlayHeading' would be more appropriate. | |
|
|
22
|
+
| `config` | public | `Partial<OverlayConfig>` | `{}` | Configure the many options of the \`OverlayController\` | OverlayMixin |
|
|
23
|
+
| `formatter` | public | | `formatDate` | | LionInputDate |
|
|
24
|
+
| `modelValue` | public | | | | LionInputDate |
|
|
25
|
+
| `opened` | public | `boolean` | `false` | If you add the opened attribute a dialog will be opened on page load. The invoker can be left out
in case the user does not need to be able to reopen the dialog. | OverlayMixin |
|
|
26
|
+
| `parser` | public | | | | LionInputDate |
|
|
27
|
+
| `placeholder` | public | `string` | `''` | | LionInput |
|
|
28
|
+
| `readOnly` | public | `boolean` | `false` | A Boolean attribute which, if present, indicates that the user should not be able to edit
the value of the input. The difference between disabled and readonly is that read-only
controls can still function, whereas disabled controls generally do not function as
controls until they are enabled.

(From: https\://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) | LionInput |
|
|
29
|
+
| `slots` | public | | | | LionInput |
|
|
30
|
+
| `type` | public | `string` | `'text'` | | LionInput |
|
|
31
|
+
| `_calendarInvokerSlot` | protected | `string` | `'suffix'` | The slot to put the invoker button in. Can be 'prefix', 'suffix', 'before' and 'after'.
Default will be 'suffix'. | |
|
|
32
|
+
| `_calendarNode` | protected | `LionCalendar` | | | |
|
|
33
|
+
| `_feedbackConditionMeta` | protected | | | | LionField |
|
|
34
|
+
| `_focusableNode` | protected | | | | LionField |
|
|
35
|
+
| `_focusCentralDateOnCalendarOpen` | protected | `boolean` | `true` | | |
|
|
36
|
+
| `_hideOnUserSelect` | protected | `boolean` | `true` | | |
|
|
37
|
+
| `_inputNode` | protected | `HTMLInputElement` | | | LionInput |
|
|
38
|
+
| `_invokerNode` | protected | | | | |
|
|
39
|
+
| `_isEditingTextField` | protected | | | | |
|
|
40
|
+
| `_isHandlingCalendarUserInput` | protected | `boolean` | `false` | | |
|
|
41
|
+
| `_overlayBackdropNode` | protected | | | | OverlayMixin |
|
|
42
|
+
| `_overlayContentNode` | protected | | | | OverlayMixin |
|
|
43
|
+
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
|
|
44
|
+
| `_overlayInvokerNode` | protected | | | The node that opens/closes this overlay.

Resolved in a stable, declarative way (independent of the exact DOM order)
by looking, in order, for:
1\. a child with \`\[slot="invoker"]\`
2\. any element in the same root that opts in via \`\[data-invoker]\` and
 references this host by id (\`for="\<id>"\`)
3\. a preceding sibling that opts in via \`\[data-invoker]\` | OverlayMixin |
|
|
45
|
+
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
46
|
+
| `_syncOnUserSelect` | protected | `boolean` | `true` | | |
|
|
42
47
|
|
|
43
48
|
### Methods
|
|
44
49
|
|
|
45
|
-
| Name
|
|
46
|
-
|
|
|
47
|
-
| `clear`
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
50
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
51
|
+
| ---------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------- | -------------- |
|
|
52
|
+
| `clear` | public | Clears modelValue.
Interaction states are not cleared (use resetInteractionState for this) | | | LionField |
|
|
53
|
+
| `close` | public | Hides the overlay | | | OverlayMixin |
|
|
54
|
+
| `deserializer` | public | | `serializedValue: string` | | LionInputDate |
|
|
55
|
+
| `open` | public | Shows the overlay | | | OverlayMixin |
|
|
56
|
+
| `repositionOverlay` | public | Sometimes it's needed to recompute Popper position of an overlay, for instance when we have
an opened combobox and the surrounding context changes (the space consumed by the textbox
increases vertically) | | | OverlayMixin |
|
|
57
|
+
| `reset` | public | Resets modelValue to initial value.
Interaction states are cleared | | | LionField |
|
|
58
|
+
| `resetInteractionState` | public | | | | LionField |
|
|
59
|
+
| `serializer` | public | | `modelValue: Date` | | LionInputDate |
|
|
60
|
+
| `toggle` | public | Toggles the overlay | | | OverlayMixin |
|
|
61
|
+
| `_calendarTemplate` | protected | Subclassers can replace this with their custom extension of
LionCalendar, like \`\<my-calendar id="calendar">\</my-calendar>\` | | | |
|
|
62
|
+
| `_defineOverlay` | protected | | `{ contentNode, invokerNode, referenceNode, backdropNode, contentWrapperNode }, config: DefineOverlayConfig` | `OverlayController` | OverlayMixin |
|
|
63
|
+
| `_defineOverlayConfig` | protected | | | `Object` | OverlayMixin |
|
|
64
|
+
| `_getInvokerNode` | protected | | | `Element\|null` | OverlayMixin |
|
|
65
|
+
| `_invokerIconTemplate` | protected | Subclassers can replace this with their custom extension invoker icon | | | |
|
|
66
|
+
| `_invokerTemplate` | protected | Subclassers can replace this with their custom extension invoker,
like \`\<my-button>\<calendar-icon>\</calendar-icon>\</my-button>\` | | | |
|
|
67
|
+
| `_isPermanentlyDisconnected` | protected | When we're moving around in dom, disconnectedCallback gets called.
Before we decide to teardown, let's wait to see if we were not just moving nodes around. | | `Promise<boolean>` | OverlayMixin |
|
|
68
|
+
| `_onCalendarOverlayOpened` | protected | Lifecycle callback for subclassers | | | |
|
|
69
|
+
| `_onCalendarUserSelectedChanged` | protected | Triggered when a user selects a date from the calendar overlay | `{ target: { selectedDate } }, opts: { target: { selectedDate: Date }}` | | |
|
|
70
|
+
| `_onChange` | protected | Dispatches custom bubble event | `ev: Event=` | | LionField |
|
|
71
|
+
| `_onValidatorUpdated` | protected | Responsible for listening param change event and
sync the calendar dates with the updated validator params | `e: Event\|CustomEvent, metaData: {validator: Validator}` | | |
|
|
72
|
+
| `_overlayFrameTemplate` | protected | | | | |
|
|
73
|
+
| `_overlayTemplate` | protected | Defining this overlay as a templates from OverlayMixin
this is our source to give as .contentNode to OverlayController.
Important: do not change the name of this method. | | | |
|
|
74
|
+
| `_reflectBackOn` | protected | | | | |
|
|
75
|
+
| `_setOpenedWithoutPropertyEffects` | protected | When the opened state is changed by an Application Developer,cthe OverlayController is
requested to show/hide. It might happen that this request is not honoured
(intercepted in before-hide for instance), so that we need to sync the controller state
to this webcomponent again, preventing eternal loops. | `newOpened: boolean` | | OverlayMixin |
|
|
76
|
+
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
77
|
+
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
78
|
+
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
79
|
+
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
64
80
|
|
|
65
81
|
### Events
|
|
66
82
|
|
|
67
|
-
| Name | Type
|
|
68
|
-
| -------------------- |
|
|
69
|
-
| `
|
|
83
|
+
| Name | Type | Description | Inherited From |
|
|
84
|
+
| -------------------- | ------------- | ----------- | -------------- |
|
|
85
|
+
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
86
|
+
| `user-input-changed` | `Event` | | LionField |
|
|
70
87
|
|
|
71
88
|
### Attributes
|
|
72
89
|
|
|
73
90
|
| Name | Field | Inherited From |
|
|
74
91
|
| ------------------ | --------------- | -------------- |
|
|
75
92
|
| `calendar-heading` | calendarHeading | |
|
|
93
|
+
| `opened` | opened | OverlayMixin |
|
|
76
94
|
| `modelValue` | modelValue | LionInputDate |
|
|
77
95
|
| `readonly` | readOnly | LionInput |
|
|
78
96
|
| `type` | type | LionInput |
|
|
@@ -14,7 +14,7 @@ eleventyNavigation:
|
|
|
14
14
|
|
|
15
15
|
A web component based on the date text input field. Its purpose is to provide a way for users to fill in a date with a datepicker.
|
|
16
16
|
For an input field with a big range, such as `birthday-input`, a datepicker is not the best choice due to the high variance between possible inputs.
|
|
17
|
-
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/
|
|
17
|
+
We encourage using our standard [input-date](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/components/input-date/overview.md) for this.
|
|
18
18
|
|
|
19
19
|
```js script
|
|
20
20
|
import { html } from '@mdjs/mdjs-preview';
|
|
@@ -30,11 +30,11 @@ export const main = () => {
|
|
|
30
30
|
## Features
|
|
31
31
|
|
|
32
32
|
- Input field with a datepicker to help to choose a date
|
|
33
|
-
- Based on our [input-date](https://github.com/ing-bank/lion/blob/
|
|
34
|
-
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/
|
|
35
|
-
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/
|
|
33
|
+
- Based on our [input-date](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/components/input-date/overview.md)
|
|
34
|
+
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/components/calendar/overview.md) inside the datepicker
|
|
35
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/fundamentals/systems/localize/dates.md) for formatting and parsing.
|
|
36
36
|
- Option to overwrite locale to change the formatting and parsing
|
|
37
|
-
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/
|
|
37
|
+
- Can make use of date specific [validators](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
38
38
|
- IsDate (default)
|
|
39
39
|
- MinDate
|
|
40
40
|
- MaxDate
|
|
@@ -27,8 +27,8 @@ export const main = () => {
|
|
|
27
27
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
31
|
-
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/
|
|
30
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/components/input/overview.md)
|
|
31
|
+
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
32
32
|
- IsEmail (default)
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
@@ -27,7 +27,7 @@ export const main = () => {
|
|
|
27
27
|
|
|
28
28
|
## Features
|
|
29
29
|
|
|
30
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
30
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/4649554021224763994601dd8d202c511d35013e/docs/components/input/overview.md)
|
|
31
31
|
- Default labels and validation messages in different languages
|
|
32
32
|
- Options for multi file upload and drop-zone.
|
|
33
33
|
|
|
@@ -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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/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
|
|
@@ -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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
@@ -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/4649554021224763994601dd8d202c511d35013e/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.
|
|
@@ -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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/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/4649554021224763994601dd8d202c511d35013e/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
|
|
@@ -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/4649554021224763994601dd8d202c511d35013e/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
|
|
@@ -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/4649554021224763994601dd8d202c511d35013e/docs/fundamentals/systems/form/validate.md).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
parts:
|
|
3
|
+
- API Table
|
|
4
|
+
- Menu
|
|
5
|
+
title: 'Menu: API Table'
|
|
6
|
+
eleventyNavigation:
|
|
7
|
+
key: API Table >> Menu
|
|
8
|
+
title: API Table
|
|
9
|
+
order: 90
|
|
10
|
+
parent: Menu
|
|
11
|
+
---
|
|
12
|
+
# Menu: API Table
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## class: `LionMenu`, `lion-menu`
|
|
16
|
+
|
|
17
|
+
### Fields
|
|
18
|
+
|
|
19
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
20
|
+
| ----------------------- | --------- | ------------------------- | -------------- | ---------------------------------------------------------------------------- | -------------- |
|
|
21
|
+
| `bar` | public | `boolean` | `false` | Enable bar to use \[role="menubar"] and horizontal navigation | LionMenuCore |
|
|
22
|
+
| `behaveAsAccordion` | public | `boolean` | `true` | | LionMenuCore |
|
|
23
|
+
| `invokerInteraction` | public | `string` | `'click'` | | LionMenuCore |
|
|
24
|
+
| `openableMode` | public | `'disclosure'\|'overlay'` | `'disclosure'` | Terminology aligned with https\://open-ui.org/components/openable.explainer/ | |
|
|
25
|
+
| `_activateOnTypedChars` | protected | `boolean` | `true` | | LionMenuCore |
|
|
26
|
+
| `_listRole` | protected | `string` | `'menu'` | | LionMenuCore |
|
|
27
|
+
| `_shouldSetupOverlay` | protected | `boolean` | `false` | | |
|
|
28
|
+
|
|
29
|
+
### Methods
|
|
30
|
+
|
|
31
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
32
|
+
| ---------------------- | --------- | --------------------------------------------------------------------------------------------------------------- | --------------- | --------------- | -------------- |
|
|
33
|
+
| `setCheckedIndex` | public | Allows groups within one level. In case we deal with menuitemcheckbox,
we treat it as multiple choice group | `index: number` | | LionMenuCore |
|
|
34
|
+
| `_defineOverlayConfig` | protected | | | `OverlayConfig` | |
|
|
35
|
+
| `_onListKeyUp` | protected | | `ev: *` | | |
|
|
36
|
+
|
|
37
|
+
### Attributes
|
|
38
|
+
|
|
39
|
+
| Name | Field | Inherited From |
|
|
40
|
+
| --------------- | ------------ | -------------- |
|
|
41
|
+
| `openable-mode` | openableMode | |
|
|
42
|
+
| `bar` | bar | LionMenuCore |
|
|
43
|
+
|
|
44
|
+
<hr/>
|