@lion/ui 0.8.8 → 0.9.1
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/combobox/src/LionCombobox.js +6 -2
- package/components/combobox/test/lion-combobox.test.js +56 -3
- package/components/core/src/DisabledMixin.js +6 -0
- package/components/core/test/DisabledMixin.test.js +22 -1
- package/components/core/test/SlotMixin.test.js +3 -3
- package/components/form-core/test/FocusMixin.test.js +6 -4
- package/components/form-core/test-suites/NativeTextFieldMixin.suite.js +4 -8
- package/components/form-integrations/test/form-integrations.test.js +2 -2
- package/components/input-datepicker/translations/es.js +1 -1
- package/components/input-stepper/src/LionInputStepper.js +110 -35
- package/components/input-stepper/test/lion-input-stepper.test.js +96 -1
- package/components/input-tel-dropdown/src/LionInputTelDropdown.js +7 -6
- package/components/input-tel-dropdown/test/LionInputTelDropdown.test.js +62 -10
- package/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.js +16 -12
- package/components/overlays/src/OverlayController.js +9 -0
- package/components/overlays/test/OverlayController.test.js +27 -3
- package/components/select-rich/test/lion-select-rich.test.js +9 -8
- package/components/switch/test/lion-switch.test.js +1 -1
- package/components/tabs/test/lion-tabs.test.js +12 -5
- package/custom-elements.json +506 -69
- package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
- package/dist-types/components/core/src/DisabledMixin.d.ts.map +1 -1
- package/dist-types/components/form-core/test-suites/NativeTextFieldMixin.suite.d.ts.map +1 -1
- package/dist-types/components/input-stepper/src/LionInputStepper.d.ts +33 -24
- package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
- package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts.map +1 -1
- package/dist-types/components/input-tel-dropdown/test/LionInputTelDropdown.test.d.ts +2 -2
- package/dist-types/components/input-tel-dropdown/test/LionInputTelDropdown.test.d.ts.map +1 -1
- package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.d.ts +2 -2
- package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.d.ts.map +1 -1
- package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
- package/dist-types/components/tabs/test/lion-tabs.test.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/button/api-table.md +3 -0
- package/docs/components/checkbox-group/api-table.md +3 -0
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/api-table.md +1 -0
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/api-table.md +1 -0
- 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 +1 -0
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/api-table.md +1 -0
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/api-table.md +1 -0
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/api-table.md +1 -0
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/api-table.md +1 -0
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/api-table.md +1 -0
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/api-table.md +1 -0
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/api-table.md +1 -0
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/api-table.md +7 -3
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-stepper/use-cases.md +30 -0
- package/docs/components/input-tel/api-table.md +1 -0
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/api-table.md +1 -0
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/listbox/api-table.md +2 -0
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/api-table.md +2 -0
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/api-table.md +1 -0
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/api-table.md +2 -0
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/switch/api-table.md +2 -0
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/textarea/api-table.md +1 -0
- 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 +1 -0
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/validate.md +2 -2
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- 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/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/package.json +1 -1
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
| `_onLabelClick` | protected | | | | LionField |
|
|
114
114
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
115
115
|
| `retractRequestToBeDisabled` | public | | | | LionField |
|
|
116
|
+
| `click` | public | | | | LionField |
|
|
116
117
|
| `__rerenderSlot` | protected | | `slotName: string` | | LionField |
|
|
117
118
|
| `__appendNodes` | protected | | `{ nodes, renderParent = this, slotName }, options: @param {Node[]} options.nodes * @param {Element} [options.renderParent] It's recommended to create a render target in light dom (like <div slot=myslot>), * which can be used as a render target for most * @param {string} options.slotName For the first render, it's best to use slotName
|
|
118
119
|
` | | LionField |
|
|
@@ -16,9 +16,9 @@ export const main = () => {
|
|
|
16
16
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
19
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input/overview.md)
|
|
20
20
|
- Default label in different languages
|
|
21
|
-
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Makes use of IBAN specific [validate](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/fundamentals/systems/form/validate.md) with corresponding error messages in different languages
|
|
22
22
|
- IsIBAN (default)
|
|
23
23
|
- IsCountryIBAN
|
|
24
24
|
- Parses IBANs automatically
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
| `_onLabelClick` | protected | | | | LionField |
|
|
120
120
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
121
121
|
| `retractRequestToBeDisabled` | public | | | | LionField |
|
|
122
|
+
| `click` | public | | | | LionField |
|
|
122
123
|
| `__rerenderSlot` | protected | | `slotName: string` | | LionField |
|
|
123
124
|
| `__appendNodes` | protected | | `{ nodes, renderParent = this, slotName }, options: @param {Node[]} options.nodes * @param {Element} [options.renderParent] It's recommended to create a render target in light dom (like <div slot=myslot>), * which can be used as a render target for most * @param {string} options.slotName For the first render, it's best to use slotName
|
|
124
125
|
` | | LionField |
|
|
@@ -13,11 +13,11 @@ import '@lion/ui/define/lion-input-range.js';
|
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
16
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
16
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input/overview.md).
|
|
17
17
|
- Shows `modelValue` and `unit` above the range input.
|
|
18
18
|
- Shows `min` and `max` value after the range input.
|
|
19
19
|
- Can hide the `min` and `max` value via `no-min-max-labels`.
|
|
20
|
-
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/
|
|
20
|
+
- Makes use of [formatNumber](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/fundamentals/systems/localize/numbers.md) for formatting and parsing.
|
|
21
21
|
|
|
22
22
|
## Installation
|
|
23
23
|
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
| `formatter` | public | | `formatNumber` | Converts modelValue to formattedValue (formattedValue will be synced with
\`.\_inputNode.value\`)
For instance, a Date object to a localized date. | LionField |
|
|
14
14
|
| `min` | public | `number` | `Infinity` | | |
|
|
15
15
|
| `max` | public | `number` | `Infinity` | | |
|
|
16
|
+
| `valueTextMapping` | public | `{[key: number]: string}` | `{}` | The aria-valuetext attribute defines the human-readable text alternative of aria-valuenow. | |
|
|
16
17
|
| `step` | public | `number` | `1` | | |
|
|
17
18
|
| `values` | public | `object` | `{ max: this.max, min: this.min, step: this.step, }` | | |
|
|
18
|
-
| `__boundOnLeaveButton` | protected | | | | |
|
|
19
19
|
| `selectionStart` | public | `number` | | | NativeTextFieldMixin |
|
|
20
20
|
| `selectionEnd` | public | `number` | | | NativeTextFieldMixin |
|
|
21
21
|
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
@@ -74,12 +74,15 @@
|
|
|
74
74
|
|
|
75
75
|
| Name | Privacy | Description | Parameters | Return | Inherited From |
|
|
76
76
|
| ---------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | -------------------- |
|
|
77
|
+
| `_updateAriaAttributes` | protected | | | | |
|
|
77
78
|
| `_onChange` | protected | Toggle +/- buttons on change | `ev: Event=` | | LionField |
|
|
78
79
|
| `_decrementorSignTemplate` | protected | Get the decrementor button sign template | | `String\|TemplateResult` | |
|
|
79
80
|
| `_incrementorSignTemplate` | protected | Get the incrementor button sign template | | `String\|TemplateResult` | |
|
|
80
81
|
| `_decrementorTemplate` | protected | Get the increment button template | | `TemplateResult` | |
|
|
81
82
|
| `_incrementorTemplate` | protected | Get the decrement button template | | `TemplateResult` | |
|
|
82
|
-
| `
|
|
83
|
+
| `_inputGroupTemplate` | protected | | | `TemplateResult` | LionField |
|
|
84
|
+
| `_onEnterButton` | protected | | `ev: Event` | | |
|
|
85
|
+
| `_onLeaveButton` | protected | Redispatch leave event on host when catching leave event
on the incrementor and decrementor button.

This redispatched leave event will be caught by
InteractionStateMixin to set "touched" state to true.

Interacting with the buttons is "user interactions"
the same way as focusing + blurring the field (native input) | `ev: Event` | | |
|
|
83
86
|
| `_setValueAndPreserveCaret` | protected | Restores the cursor to its original position after updating the value. | `newValue: string` | | NativeTextFieldMixin |
|
|
84
87
|
| `_reflectBackFormattedValueToUser` | protected | Note: Overrides the implementation from FormatMixin | | | LionField |
|
|
85
88
|
| `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 preprocessro 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 |
|
|
@@ -104,7 +107,6 @@
|
|
|
104
107
|
| `_groupTwoTemplate` | protected | | | `TemplateResult` | LionField |
|
|
105
108
|
| `_labelTemplate` | protected | | | `TemplateResult` | LionField |
|
|
106
109
|
| `_helpTextTemplate` | protected | | | `TemplateResult` | LionField |
|
|
107
|
-
| `_inputGroupTemplate` | protected | | | `TemplateResult` | LionField |
|
|
108
110
|
| `_inputGroupBeforeTemplate` | protected | | | `TemplateResult` | LionField |
|
|
109
111
|
| `_inputGroupPrefixTemplate` | protected | | | `TemplateResult \| nothing` | LionField |
|
|
110
112
|
| `_inputGroupInputTemplate` | protected | | | `TemplateResult` | LionField |
|
|
@@ -125,6 +127,7 @@
|
|
|
125
127
|
| `_onLabelClick` | protected | | | | LionField |
|
|
126
128
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
127
129
|
| `retractRequestToBeDisabled` | public | | | | LionField |
|
|
130
|
+
| `click` | public | | | | LionField |
|
|
128
131
|
| `__rerenderSlot` | protected | | `slotName: string` | | LionField |
|
|
129
132
|
| `__appendNodes` | protected | | `{ nodes, renderParent = this, slotName }, options: @param {Node[]} options.nodes * @param {Element} [options.renderParent] It's recommended to create a render target in light dom (like <div slot=myslot>), * which can be used as a render target for most * @param {string} options.slotName For the first render, it's best to use slotName
|
|
130
133
|
` | | LionField |
|
|
@@ -178,6 +181,7 @@
|
|
|
178
181
|
| ------------------------------- | -------------------------- | -------------------- |
|
|
179
182
|
| `min` | min | |
|
|
180
183
|
| `max` | max | |
|
|
184
|
+
| `valueTextMapping` | valueTextMapping | |
|
|
181
185
|
| `step` | step | |
|
|
182
186
|
| `autocomplete` | autocomplete | NativeTextFieldMixin |
|
|
183
187
|
| `focused` | focused | LionField |
|
|
@@ -18,7 +18,7 @@ loadDefaultFeedbackMessages();
|
|
|
18
18
|
|
|
19
19
|
## Features
|
|
20
20
|
|
|
21
|
-
- Based on our [input](https://github.com/ing-bank/lion/blob/
|
|
21
|
+
- Based on our [input](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input/overview.md).
|
|
22
22
|
- Set `min` and `max` value to define the range.
|
|
23
23
|
- Set `step` value in integer or decimal to increase and decrease the value.
|
|
24
24
|
- Use `ArrowUp` or `ArrowDown` to update the value.
|
|
@@ -49,6 +49,36 @@ Use `min` and `max` attribute to specify a range.
|
|
|
49
49
|
></lion-input-stepper>
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
+
### Value text
|
|
53
|
+
|
|
54
|
+
Use the `.valueTextMapping` property to override the value with a text.
|
|
55
|
+
|
|
56
|
+
```js preview-story
|
|
57
|
+
export const valueTextMapping = () => {
|
|
58
|
+
const values = {
|
|
59
|
+
1: 'first',
|
|
60
|
+
2: 'second',
|
|
61
|
+
3: 'third',
|
|
62
|
+
4: 'fourth',
|
|
63
|
+
5: 'fifth',
|
|
64
|
+
6: 'sixth',
|
|
65
|
+
7: 'seventh',
|
|
66
|
+
8: 'eighth',
|
|
67
|
+
9: 'ninth',
|
|
68
|
+
10: 'tenth',
|
|
69
|
+
};
|
|
70
|
+
return html`
|
|
71
|
+
<lion-input-stepper
|
|
72
|
+
label="Order"
|
|
73
|
+
min="1"
|
|
74
|
+
max="10"
|
|
75
|
+
name="value"
|
|
76
|
+
.valueTextMapping="${values}"
|
|
77
|
+
></lion-input-stepper>
|
|
78
|
+
`;
|
|
79
|
+
};
|
|
80
|
+
```
|
|
81
|
+
|
|
52
82
|
### Formatting
|
|
53
83
|
|
|
54
84
|
Just like with the `input-amount` you can add the `formatOptions` to format the numbers to your preferences, to a different locale or adjust the amount of fractions.
|
|
@@ -123,6 +123,7 @@
|
|
|
123
123
|
| `_onLabelClick` | protected | | | | LionField |
|
|
124
124
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
125
125
|
| `retractRequestToBeDisabled` | public | | | | LionField |
|
|
126
|
+
| `click` | public | | | | LionField |
|
|
126
127
|
| `__rerenderSlot` | protected | | `slotName: string` | | LionField |
|
|
127
128
|
| `__appendNodes` | protected | | `{ nodes, renderParent = this, slotName }, options: @param {Node[]} options.nodes * @param {Element} [options.renderParent] It's recommended to create a render target in light dom (like <div slot=myslot>), * which can be used as a render target for most * @param {string} options.slotName For the first render, it's best to use slotName
|
|
128
129
|
` | | LionField |
|
|
@@ -39,7 +39,7 @@ export const main = () => {
|
|
|
39
39
|
|
|
40
40
|
## Features
|
|
41
41
|
|
|
42
|
-
- Extends our [input](https://github.com/ing-bank/lion/blob/
|
|
42
|
+
- Extends our [input](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input/overview.md)
|
|
43
43
|
- Shows a mobile telephone keypad on mobile (by having a native `<input inputmode="tel">` inside)
|
|
44
44
|
- Can be configured with a list of allowed region codes
|
|
45
45
|
- Will be preconfigured with region derived from locale
|
|
@@ -22,7 +22,7 @@ Say we have the following telephone number from Madrid, Spain: `+34919930432`.
|
|
|
22
22
|
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).
|
|
23
23
|
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).
|
|
24
24
|
|
|
25
|
-
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
25
|
+
The table below lists all possible regions worldwide. When [allowed regions](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input-tel/#allowed-regions) are not configured,
|
|
26
26
|
all of them will be supported as values of Input Tel.
|
|
27
27
|
|
|
28
28
|
```js story
|
|
@@ -37,11 +37,11 @@ export const regionCodesTable = () => {
|
|
|
37
37
|
The active region (accessible via readonly accessor `.activeRegion`) determines how validation and formatting
|
|
38
38
|
should be applied. It is dependent on the following factors:
|
|
39
39
|
|
|
40
|
-
- [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
41
|
-
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/
|
|
40
|
+
- [allowed regions](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input-tel/#allowed-regions): a list that determines what is allowed to become .activeRegion. If
|
|
41
|
+
[.allowedRegions has only one entry](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input-tel/#restrict-to-one-region), .activeRegion will always be this value.
|
|
42
42
|
- the modelValue or viewValue: once it contains sufficient info to derive its region code (and
|
|
43
|
-
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
44
|
-
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/
|
|
43
|
+
the derived code is inside [allowed regions](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input-tel/#allowed-regions) if configured)
|
|
44
|
+
- active locale (and the derived locale is inside [allowed regions](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input-tel/#allowed-regions) if configured)
|
|
45
45
|
|
|
46
46
|
What follows from the list above is that .activeRegion can change dynamically, after a value
|
|
47
47
|
change in the text box by the user (or when locales or allowed regions would be changed by the
|
|
@@ -130,7 +130,7 @@ export const heuristic = () => {
|
|
|
130
130
|
Once it is configured, validation and formatting will be restricted to those
|
|
131
131
|
values that are present in this list.
|
|
132
132
|
|
|
133
|
-
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/
|
|
133
|
+
> Note that for [InputTelDropdown](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input-tel-dropdown/index.md), only allowed regions will
|
|
134
134
|
> be shown in the dropdown list.
|
|
135
135
|
|
|
136
136
|
```js preview-story
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
| `_onLabelClick` | protected | | | | LionField |
|
|
131
131
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
132
132
|
| `retractRequestToBeDisabled` | public | | | | LionField |
|
|
133
|
+
| `click` | public | | | | LionField |
|
|
133
134
|
| `__rerenderSlot` | protected | | `slotName: string` | | LionField |
|
|
134
135
|
| `__appendNodes` | protected | | `{ nodes, renderParent = this, slotName }, options: @param {Node[]} options.nodes * @param {Element} [options.renderParent] It's recommended to create a render target in light dom (like <div slot=myslot>), * which can be used as a render target for most * @param {string} options.slotName For the first render, it's best to use slotName
|
|
135
136
|
` | | LionField |
|
|
@@ -19,7 +19,7 @@ export const main = () => {
|
|
|
19
19
|
|
|
20
20
|
## Features
|
|
21
21
|
|
|
22
|
-
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/
|
|
22
|
+
- Extends our [input-tel](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/input-tel/overview.md)
|
|
23
23
|
- Shows dropdown list with all possible regions
|
|
24
24
|
- Shows only allowed regions in dropdown list when .allowedRegions is configured
|
|
25
25
|
- Highlights regions on top of dropdown list when .preferredRegions is configured
|
|
@@ -148,6 +148,7 @@
|
|
|
148
148
|
| `_prioritizeAndFilterFeedback` | protected | Orders all active validators in this.\_\_validationResult.
Can also filter out occurrences (based on interaction states) | `{ validationResult }, opts: { validationResult: Validator[] }` | `Validator[]` | ValidateMixin |
|
|
149
149
|
| `makeRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
150
150
|
| `retractRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
151
|
+
| `click` | public | | | | DisabledMixin |
|
|
151
152
|
|
|
152
153
|
### Events
|
|
153
154
|
|
|
@@ -223,6 +224,7 @@
|
|
|
223
224
|
| ---------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------- | ---------------- |
|
|
224
225
|
| `makeRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
225
226
|
| `retractRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
227
|
+
| `click` | public | | | | DisabledMixin |
|
|
226
228
|
| `_choiceGraphicTemplate` | protected | | | | ChoiceInputMixin |
|
|
227
229
|
| `_afterTemplate` | protected | | | | ChoiceInputMixin |
|
|
228
230
|
| `_preventDuplicateLabelClick` | protected | The native platform fires an event for both the click on the label, and also
the redispatched click on the native input element.
This results in two click events arriving at the host, but we only want one.
This method prevents the duplicate click and ensures the correct isTrusted event
with the correct event.target arrives at the host. | `ev: Event` | | ChoiceInputMixin |
|
|
@@ -139,4 +139,4 @@ Navigation will skip over disabled options. Let's disable Artichoke and Brussel
|
|
|
139
139
|
|
|
140
140
|
## Validation
|
|
141
141
|
|
|
142
|
-
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/
|
|
142
|
+
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/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/fundamentals/systems/form/validate.md).
|
|
@@ -121,6 +121,7 @@
|
|
|
121
121
|
| `_onLabelClick` | protected | | | | LionField |
|
|
122
122
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
123
123
|
| `retractRequestToBeDisabled` | public | | | | LionField |
|
|
124
|
+
| `click` | public | | | | LionField |
|
|
124
125
|
| `__rerenderSlot` | protected | | `slotName: string` | | LionField |
|
|
125
126
|
| `__appendNodes` | protected | | `{ nodes, renderParent = this, slotName }, options: @param {Node[]} options.nodes * @param {Element} [options.renderParent] It's recommended to create a render target in light dom (like <div slot=myslot>), * which can be used as a render target for most * @param {string} options.slotName For the first render, it's best to use slotName
|
|
126
127
|
` | | LionField |
|
|
@@ -335,6 +336,7 @@
|
|
|
335
336
|
| `_onLabelClick` | protected | | | | FormControlMixin |
|
|
336
337
|
| `makeRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
337
338
|
| `retractRequestToBeDisabled` | public | | | | DisabledMixin |
|
|
339
|
+
| `click` | public | | | | DisabledMixin |
|
|
338
340
|
|
|
339
341
|
### Events
|
|
340
342
|
|
|
@@ -20,12 +20,12 @@ export const main = () => html`
|
|
|
20
20
|
`;
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/
|
|
24
|
-
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/
|
|
23
|
+
- Make sure that to use a name attribute as it is necessary for our [form](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/form/overview.md)'s serialization result.
|
|
24
|
+
- If you have many options for a user to pick from, consider using our [select](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/select/overview.md) instead.
|
|
25
25
|
|
|
26
26
|
## Features
|
|
27
27
|
|
|
28
|
-
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/
|
|
28
|
+
Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/components/fieldset/overview.md), it has all the features a fieldset has.
|
|
29
29
|
|
|
30
30
|
- Get or set the checked value of the group:
|
|
31
31
|
- modelValue (default) - `checkedValue()`
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
| `_onLabelClick` | protected | | | | LionField |
|
|
96
96
|
| `makeRequestToBeDisabled` | public | | | | LionField |
|
|
97
97
|
| `retractRequestToBeDisabled` | public | | | | LionField |
|
|
98
|
+
| `click` | public | | | | LionField |
|
|
98
99
|
| `__rerenderSlot` | protected | | `slotName: string` | | LionField |
|
|
99
100
|
| `__appendNodes` | protected | | `{ nodes, renderParent = this, slotName }, options: @param {Node[]} options.nodes * @param {Element} [options.renderParent] It's recommended to create a render target in light dom (like <div slot=myslot>), * which can be used as a render target for most * @param {string} options.slotName For the first render, it's best to use slotName
|
|
100
101
|
` | | LionField |
|
|
@@ -53,7 +53,7 @@ Or by setting the `disabled` attribute on the entire `lion-select` field.
|
|
|
53
53
|
|
|
54
54
|
## Validation
|
|
55
55
|
|
|
56
|
-
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/
|
|
56
|
+
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/9825cbf65639370f2e4e7bb994e3bc1ba60b0f9a/docs/fundamentals/systems/form/validate.md).
|
|
57
57
|
|
|
58
58
|
## Rendering and updating select options
|
|
59
59
|
|