@lion/ui 0.21.1-menu-system.0 → 0.22.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/components/button/src/LionButton.js +0 -4
- package/components/form/test/lion-form.test.js +4 -3
- package/components/form-core/src/form-group/FormGroupMixin.js +37 -0
- package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +25 -0
- package/components/input-amount-dropdown/src/LionInputAmountDropdown.js +2 -2
- package/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.js +12 -3
- package/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.js +10 -3
- package/components/overlays/src/OverlayController.js +111 -296
- package/components/overlays/src/OverlayMixin.js +17 -76
- package/components/overlays/src/utils/adopt-styles.js +1 -1
- package/components/overlays/src/utils/is-equal-config.js +6 -15
- package/components/overlays/test/OverlayController.test.js +24 -144
- package/components/overlays/test-suites/OverlayMixin.suite.js +8 -8
- package/components/overlays/types/ArrowMixinTypes.ts +3 -1
- package/components/overlays/types/OverlayConfig.ts +5 -20
- package/components/overlays/types/OverlayMixinTypes.ts +0 -2
- package/custom-elements.json +6260 -13587
- 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/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/form-group/FormGroupMixin.d.ts +1 -0
- package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin.suite.d.ts.map +1 -1
- 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 +1 -1
- package/dist-types/components/overlays/src/OverlayController.d.ts +5 -22
- 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 +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 +2 -6
- 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/exports/overlays.d.ts +0 -6
- 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 +39 -53
- 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 -32
- 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/overview.md +3 -3
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/api-table.md +45 -63
- 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/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +33 -50
- 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 +7 -33
- 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/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 +43 -46
- 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/overlays.js +0 -6
- package/overlays.js +0 -6
- package/package.json +6 -2
- package/vscode.css-custom-data.json +5 -0
- package/vscode.html-custom-data.json +789 -0
- package/web-types.json +2016 -0
- package/components/menu/CHANGELOG.md +0 -37
- package/components/menu/README.md +0 -334
- package/components/menu/index.js +0 -2
- package/components/menu/lion-menu.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 -421
- package/components/menu/src/MoreButtonMenuMixin.js +0 -278
- package/components/menu/src/MultiLevelListMixin.js +0 -305
- 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-interactions.test.js +0 -3
- package/components/menu/test/lion-menu.test.js +0 -14
- 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 -114
- package/components/menu/test-suites/LionMenuInteractions.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/overlays/NEXT.md +0 -49
- 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.d.ts +0 -2
- package/dist-types/components/menu/lion-menu.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/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-interactions.test.d.ts +0 -2
- package/dist-types/components/menu/test/lion-menu-interactions.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-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 -11
- 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/LionMenuInteractions.suite.d.ts +0 -5
- package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts.map +0 -1
- package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts +0 -11
- 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/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.d.ts +0 -2
- package/dist-types/exports/define/lion-menu.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 -3
- package/dist-types/exports/menu.d.ts.map +0 -1
- package/docs/components/menu/api-table.md +0 -121
- 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/src/DemoNavigationBar.js +0 -441
- package/docs/components/menu/src/DemoSpinButton.js +0 -215
- package/docs/components/menu/src/DemoToolbar.js +0 -101
- package/docs/components/menu/src/DemoTree.js +0 -55
- package/docs/components/menu/src/navigation-bar-types.js +0 -41
- package/docs/components/menu/use-cases.md +0 -74
- package/exports/define/lion-item.js +0 -3
- package/exports/define/lion-menu.js +0 -3
- package/exports/menu-test-suites.js +0 -4
- package/exports/menu.js +0 -3
- package/menu-test-suites.js +0 -4
- package/menu.js +0 -3
|
@@ -16,81 +16,63 @@ 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
|
-
| `
|
|
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` | | |
|
|
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
|
+
| `formatter` | public | | `formatDate` | | LionInputDate |
|
|
23
|
+
| `modelValue` | public | | | | LionInputDate |
|
|
24
|
+
| `parser` | public | | | | LionInputDate |
|
|
25
|
+
| `placeholder` | public | `string` | `''` | | LionInput |
|
|
26
|
+
| `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 |
|
|
27
|
+
| `slots` | public | | | | LionInput |
|
|
28
|
+
| `type` | public | `string` | `'text'` | | LionInput |
|
|
29
|
+
| `_calendarInvokerSlot` | protected | `string` | `'suffix'` | The slot to put the invoker button in. Can be 'prefix', 'suffix', 'before' and 'after'.
Default will be 'suffix'. | |
|
|
30
|
+
| `_calendarNode` | protected | `LionCalendar` | | | |
|
|
31
|
+
| `_feedbackConditionMeta` | protected | | | | LionField |
|
|
32
|
+
| `_focusableNode` | protected | | | | LionField |
|
|
33
|
+
| `_focusCentralDateOnCalendarOpen` | protected | `boolean` | `true` | | |
|
|
34
|
+
| `_hideOnUserSelect` | protected | `boolean` | `true` | | |
|
|
35
|
+
| `_inputNode` | protected | `HTMLInputElement` | | | LionInput |
|
|
36
|
+
| `_invokerNode` | protected | | | | |
|
|
37
|
+
| `_isEditingTextField` | protected | | | | |
|
|
38
|
+
| `_isHandlingCalendarUserInput` | protected | `boolean` | `false` | | |
|
|
39
|
+
| `_overlayContentNode` | protected | | | | |
|
|
40
|
+
| `_overlayInvokerNode` | protected | | | | |
|
|
41
|
+
| `_syncOnUserSelect` | protected | `boolean` | `true` | | |
|
|
47
42
|
|
|
48
43
|
### Methods
|
|
49
44
|
|
|
50
|
-
| Name
|
|
51
|
-
|
|
|
52
|
-
| `clear`
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
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 |
|
|
45
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
46
|
+
| -------------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | -------- | -------------- |
|
|
47
|
+
| `clear` | public | Clears modelValue.
Interaction states are not cleared (use resetInteractionState for this) | | | LionField |
|
|
48
|
+
| `deserializer` | public | | `serializedValue: string` | | LionInputDate |
|
|
49
|
+
| `reset` | public | Resets modelValue to initial value.
Interaction states are cleared | | | LionField |
|
|
50
|
+
| `resetInteractionState` | public | | | | LionField |
|
|
51
|
+
| `serializer` | public | | `modelValue: Date` | | LionInputDate |
|
|
52
|
+
| `_calendarTemplate` | protected | Subclassers can replace this with their custom extension of
LionCalendar, like \`\<my-calendar id="calendar">\</my-calendar>\` | | | |
|
|
53
|
+
| `_defineOverlayConfig` | protected | | | `Object` | |
|
|
54
|
+
| `_invokerIconTemplate` | protected | Subclassers can replace this with their custom extension invoker icon | | | |
|
|
55
|
+
| `_invokerTemplate` | protected | Subclassers can replace this with their custom extension invoker,
like \`\<my-button>\<calendar-icon>\</calendar-icon>\</my-button>\` | | | |
|
|
56
|
+
| `_onCalendarOverlayOpened` | protected | Lifecycle callback for subclassers | | | |
|
|
57
|
+
| `_onCalendarUserSelectedChanged` | protected | Triggered when a user selects a date from the calendar overlay | `{ target: { selectedDate } }, opts: { target: { selectedDate: Date }}` | | |
|
|
58
|
+
| `_onChange` | protected | Dispatches custom bubble event | `ev: Event=` | | LionField |
|
|
59
|
+
| `_onValidatorUpdated` | protected | Responsible for listening param change event and
sync the calendar dates with the updated validator params | `e: Event\|CustomEvent, metaData: {validator: Validator}` | | |
|
|
60
|
+
| `_overlayFrameTemplate` | protected | | | | |
|
|
61
|
+
| `_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. | | | |
|
|
62
|
+
| `_reflectBackOn` | protected | | | | |
|
|
63
|
+
| `_setupOverlayCtrl` | protected | | | | |
|
|
80
64
|
|
|
81
65
|
### Events
|
|
82
66
|
|
|
83
|
-
| Name | Type
|
|
84
|
-
| -------------------- |
|
|
85
|
-
| `
|
|
86
|
-
| `user-input-changed` | `Event` | | LionField |
|
|
67
|
+
| Name | Type | Description | Inherited From |
|
|
68
|
+
| -------------------- | ------- | ----------- | -------------- |
|
|
69
|
+
| `user-input-changed` | `Event` | | LionField |
|
|
87
70
|
|
|
88
71
|
### Attributes
|
|
89
72
|
|
|
90
73
|
| Name | Field | Inherited From |
|
|
91
74
|
| ------------------ | --------------- | -------------- |
|
|
92
75
|
| `calendar-heading` | calendarHeading | |
|
|
93
|
-
| `opened` | opened | OverlayMixin |
|
|
94
76
|
| `modelValue` | modelValue | LionInputDate |
|
|
95
77
|
| `readonly` | readOnly | LionInput |
|
|
96
78
|
| `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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input-date/overview.md)
|
|
34
|
+
- Makes use of our [calendar](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/calendar/overview.md) inside the datepicker
|
|
35
|
+
- Makes use of [formatDate](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/components/input/overview.md)
|
|
31
|
+
- Makes use of email [validators](https://github.com/ing-bank/lion/blob/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md).
|
|
@@ -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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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/1e44a873eb492168e7e3d2f5c120371d950b9e03/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()`
|
|
@@ -65,7 +65,7 @@ Or by setting the `disabled` attribute on the entire `lion-select` field.
|
|
|
65
65
|
|
|
66
66
|
## Validation
|
|
67
67
|
|
|
68
|
-
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/
|
|
68
|
+
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/1e44a873eb492168e7e3d2f5c120371d950b9e03/docs/fundamentals/systems/form/validate.md).
|
|
69
69
|
|
|
70
70
|
## Rendering and updating select options
|
|
71
71
|
|
|
@@ -54,61 +54,45 @@ eleventyNavigation:
|
|
|
54
54
|
|
|
55
55
|
### Fields
|
|
56
56
|
|
|
57
|
-
| Name
|
|
58
|
-
|
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `_overlayContentNode` | protected | | | | OverlayMixin |
|
|
71
|
-
| `_overlayContentWrapperNode` | protected | | | | OverlayMixin |
|
|
72
|
-
| `_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 |
|
|
73
|
-
| `_overlayReferenceNode` | protected | | | | OverlayMixin |
|
|
74
|
-
| `_scrollTargetNode` | protected | | | | |
|
|
57
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
58
|
+
| ------------------------ | --------- | -------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
59
|
+
| `interactionMode` | public | `'windows/linux'\|'mac'\|'auto'` | `'auto'` | Aligns behavior for 'selectionFollowFocus' and 'navigateWithinInvoker' with
platform. When 'auto' (default), platform is automatically detected | |
|
|
60
|
+
| `navigateWithinInvoker` | public | `Boolean` | `false` | When invoker has focus, up and down arrow keys changes active state of listbox,
without opening overlay. | |
|
|
61
|
+
| `singleOption` | public | `boolean` | `false` | | |
|
|
62
|
+
| `slots` | public | `SlotsMap` | | | |
|
|
63
|
+
| `_arrowWidth` | protected | `number` | `28` | | |
|
|
64
|
+
| `_feedbackConditionMeta` | protected | | | | LionListbox |
|
|
65
|
+
| `_focusableNode` | protected | | | | LionListbox |
|
|
66
|
+
| `_invokerNode` | protected | `LionSelectInvoker` | | | |
|
|
67
|
+
| `_overlayContentNode` | protected | | | | |
|
|
68
|
+
| `_overlayInvokerNode` | protected | | | | |
|
|
69
|
+
| `_scrollTargetNode` | protected | | | | |
|
|
75
70
|
|
|
76
71
|
### Methods
|
|
77
72
|
|
|
78
|
-
| Name
|
|
79
|
-
|
|
|
80
|
-
| `addFormElement`
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `_noDefaultSelectedInheritsWidth` | protected | With no selected element, we should override the inheritsReferenceWidth in most cases.
By default, we will set it to 'min', and then set it back to what it was initially when
something is selected.
As a subclasser you can override this behavior. | | | |
|
|
96
|
-
| `_onFormElementsChanged` | protected | | | | |
|
|
97
|
-
| `_onLabelClick` | protected | | | | |
|
|
98
|
-
| `_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 |
|
|
99
|
-
| `_setupListboxNode` | protected | | | | |
|
|
100
|
-
| `_setupOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
101
|
-
| `_setupOverlayCtrl` | protected | | | | OverlayMixin |
|
|
102
|
-
| `_teardownListboxNode` | protected | | | | |
|
|
103
|
-
| `_teardownOpenCloseListeners` | protected | | | | OverlayMixin |
|
|
104
|
-
| `_teardownOverlayCtrl` | protected | | | | OverlayMixin |
|
|
73
|
+
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
74
|
+
| --------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | ------ | -------------- |
|
|
75
|
+
| `addFormElement` | public | | `child: LionOption & FormControlHost, indexToInsertAt: Number` | | |
|
|
76
|
+
| `removeFormElement` | public | | `child: FormRegisteringHost` | | |
|
|
77
|
+
| `_alignInvokerWidth` | protected | Align invoker width with content width
Make sure display is not set to "none" while calculating the content width | | | |
|
|
78
|
+
| `_defineOverlayConfig` | protected | | | | |
|
|
79
|
+
| `_getCheckedElements` | protected | In the select disabled options are still going to a possible value for example
when prefilling or programmatically setting it. | | | |
|
|
80
|
+
| `_inputGroupInputTemplate` | protected | | | | |
|
|
81
|
+
| `_listboxOnClick` | protected | | | | |
|
|
82
|
+
| `_listboxOnKeyDown` | protected | | `ev: KeyboardEvent` | | |
|
|
83
|
+
| `_noDefaultSelectedInheritsWidth` | protected | With no selected element, we should override the inheritsReferenceWidth in most cases.
By default, we will set it to 'min', and then set it back to what it was initially when
something is selected.
As a subclasser you can override this behavior. | | | |
|
|
84
|
+
| `_onFormElementsChanged` | protected | | | | |
|
|
85
|
+
| `_onLabelClick` | protected | | | | |
|
|
86
|
+
| `_setupListboxNode` | protected | | | | |
|
|
87
|
+
| `_setupOverlayCtrl` | protected | | | | |
|
|
88
|
+
| `_teardownListboxNode` | protected | | | | |
|
|
89
|
+
| `_teardownOverlayCtrl` | protected | | | | |
|
|
105
90
|
|
|
106
91
|
### Events
|
|
107
92
|
|
|
108
|
-
| Name
|
|
109
|
-
|
|
|
110
|
-
| `blur`
|
|
111
|
-
| `opened-changed` | `CustomEvent` | | OverlayMixin |
|
|
93
|
+
| Name | Type | Description | Inherited From |
|
|
94
|
+
| ------ | ------- | ----------- | -------------- |
|
|
95
|
+
| `blur` | `Event` | | |
|
|
112
96
|
|
|
113
97
|
### Attributes
|
|
114
98
|
|
|
@@ -117,6 +101,5 @@ eleventyNavigation:
|
|
|
117
101
|
| `navigate-within-invoker` | navigateWithinInvoker | |
|
|
118
102
|
| `interaction-mode` | interactionMode | |
|
|
119
103
|
| `single-option` | singleOption | |
|
|
120
|
-
| `opened` | opened | OverlayMixin |
|
|
121
104
|
|
|
122
105
|
<hr/>
|