@lion/ui 0.7.6 → 0.7.8
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 +1 -2
- package/components/button/test-suites/LionButton.suite.js +3 -1
- package/components/calendar/src/LionCalendar.js +9 -5
- package/components/calendar/test/lion-calendar.test.js +33 -6
- package/components/combobox/src/LionCombobox.js +33 -9
- package/components/combobox/test/lion-combobox.test.js +134 -7
- package/components/dialog/test/lion-dialog.test.js +59 -1
- package/components/input-datepicker/src/LionInputDatepicker.js +1 -21
- package/components/input-datepicker/test/lion-input-datepicker.test.js +30 -3
- package/components/input-file/src/FileHandle.js +1 -1
- package/components/input-file/src/LionInputFile.js +1 -3
- package/components/input-file/test/lion-input-file.test.js +11 -14
- package/components/overlays/src/OverlayController.js +13 -7
- package/components/overlays/src/OverlayMixin.js +5 -1
- package/components/overlays/test/OverlayController.test.js +46 -0
- package/components/select-rich/src/LionSelectRich.js +12 -0
- package/components/select-rich/test/lion-select-rich.test.js +26 -0
- package/custom-elements.json +60 -73
- package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
- package/dist-types/components/calendar/src/LionCalendar.d.ts +1 -0
- package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
- package/dist-types/components/combobox/src/LionCombobox.d.ts +9 -0
- package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +0 -5
- package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
- package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
- 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/select-rich/src/LionSelectRich.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/button/use-cases.md +2 -2
- package/docs/components/calendar/use-cases.md +4 -4
- package/docs/components/checkbox-group/api-table.md +49 -55
- package/docs/components/checkbox-group/overview.md +5 -5
- package/docs/components/checkbox-group/use-cases.md +33 -33
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/collapsible/use-cases.md +3 -3
- package/docs/components/combobox/api-table.md +84 -89
- package/docs/components/combobox/extensions.md +20 -20
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +6 -6
- package/docs/components/dialog/api-table.md +3 -3
- package/docs/components/dialog/overview.md +2 -2
- package/docs/components/dialog/src/external-dialog.js +32 -0
- package/docs/components/dialog/src/slots-dialog-content.js +1 -1
- package/docs/components/dialog/src/styled-dialog-content.js +1 -1
- package/docs/components/dialog/use-cases.md +49 -3
- package/docs/components/drawer/use-cases.md +3 -3
- package/docs/components/fieldset/api-table.md +45 -51
- package/docs/components/fieldset/overview.md +7 -7
- package/docs/components/fieldset/use-cases.md +15 -15
- package/docs/components/form/overview.md +7 -7
- package/docs/components/form/use-cases.md +4 -4
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input/use-cases.md +3 -3
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-amount/use-cases.md +8 -8
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-date/use-cases.md +8 -8
- package/docs/components/input-datepicker/api-table.md +1 -3
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-datepicker/use-cases.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-email/use-cases.md +3 -3
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-iban/use-cases.md +8 -8
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/api-table.md +65 -69
- 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 +9 -9
- package/docs/components/input-tel-dropdown/api-table.md +70 -73
- package/docs/components/input-tel-dropdown/extensions.md +1 -1
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/input-tel-dropdown/use-cases.md +5 -5
- package/docs/components/listbox/api-table.md +64 -70
- package/docs/components/listbox/overview.md +5 -5
- package/docs/components/listbox/use-cases.md +61 -61
- package/docs/components/pagination/use-cases.md +5 -5
- package/docs/components/radio-group/api-table.md +49 -55
- package/docs/components/radio-group/overview.md +6 -6
- package/docs/components/radio-group/use-cases.md +18 -18
- package/docs/components/select/use-cases.md +2 -2
- package/docs/components/select-rich/api-table.md +79 -85
- package/docs/components/select-rich/overview.md +3 -3
- package/docs/components/select-rich/use-cases.md +33 -33
- package/docs/components/steps/overview.md +4 -4
- package/docs/components/steps/use-cases.md +7 -7
- package/docs/components/tabs/examples.md +1 -1
- package/docs/components/tabs/use-cases.md +1 -1
- package/docs/components/textarea/use-cases.md +3 -3
- package/docs/components/tooltip/api-table.md +3 -3
- package/docs/components/tooltip/use-cases.md +6 -6
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
- package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/rationales/accessibility.md +1 -1
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +8 -8
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/use-cases.md +19 -19
- package/docs/fundamentals/systems/form/validate.md +50 -50
- package/docs/fundamentals/systems/localize/api-table.md +10 -17
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/localize/use-cases.md +4 -4
- package/docs/fundamentals/systems/overlays/_configuration-positioning.md +4 -4
- package/docs/fundamentals/systems/overlays/api-table.md +34 -90
- package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +9 -9
- package/docs/fundamentals/systems/overlays/configuration.md +30 -30
- package/docs/fundamentals/systems/overlays/overview.md +6 -6
- package/docs/fundamentals/systems/overlays/use-cases.md +30 -30
- package/docs/fundamentals/tools/ajax/use-cases.md +20 -20
- package/docs/fundamentals/tools/helpers/action-logger.md +3 -3
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js +2 -2
- package/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js +2 -2
- package/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js +2 -2
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +7 -7
- 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/scoped-elements.md +1 -1
- package/docs/guides/principles/styling.md +1 -1
- package/package.json +1 -1
|
@@ -4,79 +4,76 @@
|
|
|
4
4
|
|
|
5
5
|
### Fields
|
|
6
6
|
|
|
7
|
-
| Name | Privacy | Type | Default
|
|
8
|
-
| ---------------------------- | --------- | ----------------------------------------- |
|
|
9
|
-
| `refs` | public | `object` | `{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| `
|
|
14
|
-
| `
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.
A date input for instance, always needs the isDate validator. | LionField |
|
|
78
|
-
| `_visibleMessagesAmount` | protected | `number` | `1` | The amount of feedback messages that will visible in LionValidationFeedback | LionField |
|
|
79
|
-
| `__SyncUpdatableNamespace` | protected | `SyncUpdatableNamespace` | `{}` | Namespace for this mixin that guarantees naming clashes will not occur... | LionField |
|
|
7
|
+
| Name | Privacy | Type | Default | Description | Inherited From |
|
|
8
|
+
| ---------------------------- | --------- | ----------------------------------------- | ------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
|
|
9
|
+
| `refs` | public | `object` | `{ /** @type {DropdownRef} */ dropdown: /** @type {DropdownRef} */ (createRef()), }` | | |
|
|
10
|
+
| `_templateDataDropdown` | protected | `TemplateDataForDropdownInputTel` | | This method provides a TemplateData object to be fed to pure template functions, a.k.a.
Pure Templates™. The goal is to totally decouple presentation from logic here, so that
Subclassers can override all content without having to loose private info contained
within the template function that was overridden.

Subclassers would need to make sure all the contents of the TemplateData object are implemented
by making sure they are coupled to the right 'ref' (\[data-ref=dropdown] in this example),
with the help of lit's spread operator directive.
To enhance this process, the TemplateData object is completely typed. Ideally, this would be
enhanced by providing linters that make sure all of their required members are implemented by
a Subclasser.
When a Subclasser wants to add more data, this can be done via: | |
|
|
11
|
+
| `slots` | public | | | Adds ".\_feedbackNode" as described below | LionField |
|
|
12
|
+
| `preferredRegions` | public | `string[]` | `[]` | Regions that will be shown on top of the dropdown | |
|
|
13
|
+
| `_allCountriesLabel` | protected | `string` | `''` | Group label for all countries, when preferredCountries are shown | |
|
|
14
|
+
| `_preferredCountriesLabel` | protected | `string` | `''` | Group label for preferred countries, when preferredCountries are shown | |
|
|
15
|
+
| `activeRegion` | public | `string` | | Currently active region based on:
1\. allowed regions: get the region from configured allowed regions (if one entry)
2\. user input: try to derive active region from user input
3\. locale: try to get the region from locale (\`html\[lang]\` attribute) | LionInputTel |
|
|
16
|
+
| `activePhoneNumberType` | public | | | Type of phone number, derived from textbox value. Enum with values:
-'fixed-line'
-'fixed-line-or-mobile'
-'mobile'
-'pager'
-'personal-number'
-'premium-rate'
-'shared-cost'
-'toll-free'
-'uan'
-'voip'
-'unknown'
See https\://www\.npmjs.com/package/awesome-phonenumber | LionInputTel |
|
|
17
|
+
| `_allowedOrAllRegions` | protected | `RegionCode[]` | | Used for rendering the region/country list | LionInputTel |
|
|
18
|
+
| `_phoneUtilLoadComplete` | protected | `Promise<PhoneNumber>` | | | LionInputTel |
|
|
19
|
+
| `fieldName` | public | `string` | | Set a default name for this field, so that validation feedback will be always
accessible and linguistically correct | LionField |
|
|
20
|
+
| `formatStrategy` | public | `PhoneNumberFormat` | `'international'` | Determines what the formatter output should look like.
Formatting strategies as provided by google-libphonenumber
See: https\://www\.npmjs.com/package/google-libphonenumber | LionInputTel |
|
|
21
|
+
| `formatCountryCodeStyle` | public | `string` | `'default'` | Extra styling of the format strategy
default \| parentheses | LionInputTel |
|
|
22
|
+
| `allowedRegions` | public | `RegionCode[]` | `[]` | The regions that should be considered when international phone numbers are detected.
(when not configured, all regions worldwide will be considered) | LionInputTel |
|
|
23
|
+
| `_phoneUtil` | protected | `AwesomePhoneNumber\|null` | | | LionInputTel |
|
|
24
|
+
| `_inputNode` | protected | `HTMLInputElement \| HTMLTextAreaElement` | | The interactive (form) element. Can be a native element like input/textarea/select or
an element with tabindex > -1 | LionField |
|
|
25
|
+
| `selectionStart` | public | `number` | | | NativeTextFieldMixin |
|
|
26
|
+
| `selectionEnd` | public | `number` | | | NativeTextFieldMixin |
|
|
27
|
+
| `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`

Note: Overrides the implementation from FormatMixin | LionField |
|
|
28
|
+
| `_focusableNode` | protected | `HTMLElement` | | The focusable element:
could be an input, textarea, select, button or any other element with tabindex > -1 | LionField |
|
|
29
|
+
| `autocomplete` | public | `string \| undefined` | `undefined` | Delegates this property to input/textarea/select. | NativeTextFieldMixin |
|
|
30
|
+
| `formatOn` | protected | `string` | `'change'` | Event that will trigger formatting (more precise, visual update of the view, so the
user sees the formatted value)
Default: 'change' | LionField |
|
|
31
|
+
| `formatOptions` | public | | `({})` | Configuration object that will be available inside the formatter function | LionField |
|
|
32
|
+
| `formattedValue` | public | `string\|undefined` | `undefined` | The view value is the result of the formatter function (when available).
The result will be stored in the native \_inputNode (usually an input\[type=text]).

Examples:
- For a date input, this would be '20/01/1999' (dependent on locale).
- For a number input, this could be '1,234.56' (a String representation of modelValue
1234.56) | LionField |
|
|
33
|
+
| `serializedValue` | public | `string\|undefined` | `undefined` | The serialized version of the model value.
This value exists for maximal compatibility with the platform API.
The serialized value can be an interface in context where data binding is not
supported and a serialized string needs to be set.

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

When no parser is available, the value is usually the same as the formattedValue
(being \_inputNode.value) | LionField |
|
|
34
|
+
| `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | LionField |
|
|
35
|
+
| `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'
event). Will be added as meta info to the \`model-value-changed\` event. Depending on
whether a user is interacting, formatting logic will be handled differently. | LionField |
|
|
36
|
+
| `focused` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) is focused.
Reflects to attribute '\[focused]' as a styling hook | LionField |
|
|
37
|
+
| `focusedVisible` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) matches ':focus-visible'
Reflects to attribute '\[focused-visible]' as a styling hook
See: https\://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible | LionField |
|
|
38
|
+
| `autofocus` | public | `boolean` | `false` | | LionField |
|
|
39
|
+
| `label` | public | `string` | `''` | The label text for the input node.
When no value is defined, textContent of \[slot=label] will be used | LionField |
|
|
40
|
+
| `helpText` | public | `string` | `''` | The helpt text for the input node.
When no value is defined, textContent of \[slot=help-text] will be used | LionField |
|
|
41
|
+
| `_labelNode` | protected | | | Element where label will be rendered to | LionField |
|
|
42
|
+
| `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
|
|
43
|
+
| `_feedbackNode` | protected | | | Element where validation feedback will be rendered to | LionField |
|
|
44
|
+
| `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) | LionField |
|
|
45
|
+
| `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | LionField |
|
|
46
|
+
| `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
|
|
47
|
+
| `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
|
|
48
|
+
| `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
|
|
49
|
+
| `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'child'` | Based on the role, details of handling model-value-changed repropagation differ. | LionField |
|
|
50
|
+
| `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an
'endpoint'. This means it will be considered as an individual field: for
a select, individual options will not be part of the formPath. They
will.
Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'
(from Application Developer perspective) need to be more like fields
(think of an amount-input with a currency select box next to it), can set this
to true to hide private internals in the formPath. | LionField |
|
|
51
|
+
| `modelValue` | public | | | | LionField |
|
|
52
|
+
| `type` | public | `string` | `'text'` | | LionInput |
|
|
53
|
+
| `placeholder` | public | `string` | `''` | | LionInput |
|
|
54
|
+
| `name` | public | `string` | `''` | The name the element will be registered with to the .formElements collection
of the parent. Also, it serves as the key of key/value pairs in
 modelValue/serializedValue objects | LionField |
|
|
55
|
+
| `_parentFormGroup` | protected | `FormRegistrarHost \| undefined` | `undefined` | The registrar this FormControl registers to, Usually a descendant of FormGroup or
ChoiceGroup | LionField |
|
|
56
|
+
| `allowCrossRootRegistration` | public | `boolean` | `false` | To encourage accessibility best practices, \`form-element-register\` events
do not pierce through shadow roots. This forces the developer to create form groups and fieldsets that automatically allow the creation of accessible relationships in the same dom tree.
Use this option if you know what you're doing. It will then be possible to nest FormControls
inside shadow dom. See https\://lion-web.netlify.app/fundamentals/rationales/accessibility/#shadow-roots-and-accessibility | LionField |
|
|
57
|
+
| `_requestedToBeDisabled` | protected | `boolean` | `false` | | LionField |
|
|
58
|
+
| `disabled` | public | `boolean` | `false` | | LionField |
|
|
59
|
+
| `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | LionField |
|
|
60
|
+
| `touched` | public | `boolean` | `false` | True when user has focused and left(blurred) the field. | LionField |
|
|
61
|
+
| `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | LionField |
|
|
62
|
+
| `prefilled` | public | `boolean` | `false` | True when user has left non-empty field or input is prefilled.
The name must be seen from the point of view of the input field:
once the user enters the input field, the value is non-empty. | LionField |
|
|
63
|
+
| `filled` | public | `boolean` | `false` | True when the modelValue is non-empty (see \_isEmpty in FormControlMixin) | LionField |
|
|
64
|
+
| `_leaveEvent` | protected | `string` | `'blur'` | The event that triggers the touched state | LionField |
|
|
65
|
+
| `_valueChangedEvent` | protected | `string` | `'model-value-changed'` | The event that triggers the dirty state | LionField |
|
|
66
|
+
| `submitted` | public | | | | LionField |
|
|
67
|
+
| `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | LionField |
|
|
68
|
+
| `_allValidators` | protected | `Validator[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
|
|
69
|
+
| `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this
array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).
Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on
\`.feedbackCondition()\`.

For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can
be useful for subtle visual feedback on keyup, like a red/green border around an input. | LionField |
|
|
70
|
+
| `showsFeedbackFor` | public | `ValidationType[]` | `[]` | Based on outcome of feedbackCondition, this array decides what ValidationTypes should be
shown in validationFeedback, based on meta data like interaction states.

For styling purposes, it reflects it \`\[shows-feedback-for="error warning"]\` | LionField |
|
|
71
|
+
| `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | LionField |
|
|
72
|
+
| `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.
Creates attribute \[is-pending] as a styling hook | LionField |
|
|
73
|
+
| `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | LionField |
|
|
74
|
+
| `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.
A date input for instance, always needs the isDate validator. | LionField |
|
|
75
|
+
| `_visibleMessagesAmount` | protected | `number` | `1` | The amount of feedback messages that will visible in LionValidationFeedback | LionField |
|
|
76
|
+
| `__SyncUpdatableNamespace` | protected | `SyncUpdatableNamespace` | `{}` | Namespace for this mixin that guarantees naming clashes will not occur... | LionField |
|
|
80
77
|
|
|
81
78
|
### Methods
|
|
82
79
|
|
|
@@ -22,7 +22,7 @@ export const IntlInputTelDropdown = () => {
|
|
|
22
22
|
return html`
|
|
23
23
|
<intl-input-tel-dropdown
|
|
24
24
|
.preferredRegions="${['NL', 'PH']}"
|
|
25
|
-
.modelValue
|
|
25
|
+
.modelValue="${'+639608920056'}"
|
|
26
26
|
label="Telephone number"
|
|
27
27
|
help-text="Advanced dropdown and styling"
|
|
28
28
|
name="phoneNumber"
|
|
@@ -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/b25478e4cc0cb51c4fda1eccadf5e630b679f53c/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
|
|
@@ -46,9 +46,9 @@ export const allowedRegions = () => {
|
|
|
46
46
|
<lion-input-tel-dropdown
|
|
47
47
|
label="Select region via dropdown"
|
|
48
48
|
help-text="With region code 'NL'"
|
|
49
|
-
.modelValue
|
|
49
|
+
.modelValue="${'+31612345678'}"
|
|
50
50
|
name="phoneNumber"
|
|
51
|
-
.allowedRegions
|
|
51
|
+
.allowedRegions="${['NL', 'DE', 'GB']}"
|
|
52
52
|
></lion-input-tel-dropdown>
|
|
53
53
|
<h-output
|
|
54
54
|
.show="${['modelValue', 'activeRegion']}"
|
|
@@ -69,10 +69,10 @@ export const preferredRegionCodes = () => {
|
|
|
69
69
|
<lion-input-tel-dropdown
|
|
70
70
|
label="Select region via dropdown"
|
|
71
71
|
help-text="Preferred regions show on top"
|
|
72
|
-
.modelValue
|
|
72
|
+
.modelValue="${'+31612345678'}"
|
|
73
73
|
name="phoneNumber"
|
|
74
|
-
.allowedRegions
|
|
75
|
-
.preferredRegions
|
|
74
|
+
.allowedRegions="${['BE', 'CA', 'DE', 'GB', 'NL', 'US']}"
|
|
75
|
+
.preferredRegions="${['DE', 'NL']}"
|
|
76
76
|
></lion-input-tel-dropdown>
|
|
77
77
|
<h-output
|
|
78
78
|
.show="${['modelValue', 'activeRegion']}"
|