@lion/ui 0.11.0 → 0.11.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.
Files changed (100) hide show
  1. package/README.md +2 -2
  2. package/components/checkbox-group/src/LionCheckboxIndeterminate.js +39 -16
  3. package/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.js +189 -1
  4. package/components/form-core/src/FocusMixin.js +4 -4
  5. package/components/form-core/src/LionField.js +1 -1
  6. package/components/localize/types/LocalizeMixinTypes.ts +0 -5
  7. package/components/select-rich/src/LionSelectRich.js +1 -1
  8. package/components/select-rich/test/lion-select-rich.test.js +13 -1
  9. package/custom-elements.json +47661 -47626
  10. package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts +10 -0
  11. package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts.map +1 -1
  12. package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts.map +1 -1
  13. package/dist-types/components/localize/types/LocalizeMixinTypes.d.ts +0 -4
  14. package/dist-types/components/localize/types/LocalizeMixinTypes.d.ts.map +1 -1
  15. package/dist-types/tsconfig.tsbuildinfo +1 -1
  16. package/docs/components/accordion/api-table.md +6 -6
  17. package/docs/components/button/api-table.md +27 -30
  18. package/docs/components/calendar/api-table.md +13 -13
  19. package/docs/components/checkbox-group/api-table.md +305 -329
  20. package/docs/components/checkbox-group/overview.md +2 -2
  21. package/docs/components/collapsible/api-table.md +5 -5
  22. package/docs/components/collapsible/overview.md +1 -1
  23. package/docs/components/combobox/api-table.md +150 -154
  24. package/docs/components/combobox/overview.md +1 -1
  25. package/docs/components/combobox/use-cases.md +1 -1
  26. package/docs/components/dialog/api-table.md +12 -12
  27. package/docs/components/dialog/overview.md +1 -1
  28. package/docs/components/drawer/api-table.md +9 -10
  29. package/docs/components/fieldset/api-table.md +104 -118
  30. package/docs/components/fieldset/overview.md +5 -5
  31. package/docs/components/form/overview.md +3 -3
  32. package/docs/components/form/use-cases.md +2 -2
  33. package/docs/components/icon/api-table.md +3 -3
  34. package/docs/components/icon/use-cases.md +1 -1
  35. package/docs/components/input/api-table.md +110 -120
  36. package/docs/components/input/overview.md +1 -1
  37. package/docs/components/input-amount/api-table.md +129 -142
  38. package/docs/components/input-amount/overview.md +3 -3
  39. package/docs/components/input-date/api-table.md +110 -120
  40. package/docs/components/input-date/overview.md +3 -3
  41. package/docs/components/input-datepicker/api-table.md +148 -160
  42. package/docs/components/input-datepicker/overview.md +5 -5
  43. package/docs/components/input-email/api-table.md +110 -120
  44. package/docs/components/input-email/overview.md +2 -2
  45. package/docs/components/input-file/api-table.md +132 -143
  46. package/docs/components/input-file/overview.md +1 -1
  47. package/docs/components/input-iban/api-table.md +110 -120
  48. package/docs/components/input-iban/overview.md +2 -2
  49. package/docs/components/input-range/api-table.md +116 -126
  50. package/docs/components/input-range/overview.md +2 -2
  51. package/docs/components/input-stepper/api-table.md +123 -133
  52. package/docs/components/input-stepper/overview.md +1 -1
  53. package/docs/components/input-tel/api-table.md +118 -128
  54. package/docs/components/input-tel/overview.md +1 -1
  55. package/docs/components/input-tel/use-cases.md +6 -6
  56. package/docs/components/input-tel-dropdown/api-table.md +125 -135
  57. package/docs/components/input-tel-dropdown/overview.md +1 -1
  58. package/docs/components/listbox/api-table.md +126 -131
  59. package/docs/components/listbox/use-cases.md +1 -1
  60. package/docs/components/pagination/api-table.md +5 -5
  61. package/docs/components/progress-indicator/api-table.md +9 -10
  62. package/docs/components/radio-group/api-table.md +234 -258
  63. package/docs/components/radio-group/overview.md +3 -3
  64. package/docs/components/select/api-table.md +106 -116
  65. package/docs/components/select/use-cases.md +1 -1
  66. package/docs/components/select-rich/api-table.md +169 -178
  67. package/docs/components/select-rich/use-cases.md +1 -1
  68. package/docs/components/steps/api-table.md +6 -6
  69. package/docs/components/switch/api-table.md +117 -128
  70. package/docs/components/tabs/api-table.md +1 -1
  71. package/docs/components/tabs/examples.md +1 -1
  72. package/docs/components/textarea/api-table.md +114 -124
  73. package/docs/components/tooltip/api-table.md +13 -13
  74. package/docs/fundamentals/index.md +4 -4
  75. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  76. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  77. package/docs/fundamentals/rationales/accessibility.md +1 -1
  78. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  79. package/docs/fundamentals/systems/core/api-table.md +8 -11
  80. package/docs/fundamentals/systems/core/overview.md +1 -1
  81. package/docs/fundamentals/systems/form/api-table.md +77 -82
  82. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  83. package/docs/fundamentals/systems/form/model-value.md +1 -1
  84. package/docs/fundamentals/systems/form/overview.md +28 -28
  85. package/docs/fundamentals/systems/form/validate.md +2 -2
  86. package/docs/fundamentals/systems/localize/api-table.md +19 -19
  87. package/docs/fundamentals/systems/localize/overview.md +4 -4
  88. package/docs/fundamentals/systems/overlays/api-table.md +45 -46
  89. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  90. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  91. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  92. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  93. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  94. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  95. package/docs/guides/how-to/create-a-form.md +4 -4
  96. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  97. package/docs/guides/index.md +8 -8
  98. package/docs/guides/principles/index.md +5 -5
  99. package/docs/guides/principles/styling.md +1 -1
  100. package/package.json +1 -1
@@ -6,159 +6,149 @@
6
6
 
7
7
  | Name | Privacy | Type | Default | Description | Inherited From |
8
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
9
  | `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&#xA;accessible and linguistically correct | LionField |
20
- | `formatStrategy` | public | `PhoneNumberFormat` | `'international'` | Determines what the formatter output should look like.&#xA;Formatting strategies as provided by google-libphonenumber&#xA;See: https\://www\.npmjs.com/package/google-libphonenumber | LionInputTel |
21
- | `formatCountryCodeStyle` | public | `string` | `'default'` | Extra styling of the format strategy&#xA;default \| parentheses | LionInputTel |
10
+ | `activeRegion` | public | `string` | | Currently active region based on:&#xA;1\. allowed regions: get the region from configured allowed regions (if one entry)&#xA;2\. user input: try to derive active region from user input&#xA;3\. locale: try to get the region from locale (\`html\[lang]\` attribute) | LionInputTel |
11
+ | `allowCrossRootRegistration` | public | `boolean` | `false` | To encourage accessibility best practices, \`form-element-register\` events&#xA;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.&#xA;Use this option if you know what you're doing. It will then be possible to nest FormControls&#xA;inside shadow dom. See https\://lion.js.org/fundamentals/rationales/accessibility/#shadow-roots-and-accessibility | LionField |
22
12
  | `allowedRegions` | public | `RegionCode[]` | `[]` | The regions that should be considered when international phone numbers are detected.&#xA;(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&#xA;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\`&#xA;&#xA;Note: Overrides the implementation from FormatMixin | LionField |
28
- | `_focusableNode` | protected | `HTMLElement` | | The focusable element:&#xA;could be an input, textarea, select, button or any other element with tabindex > -1 | LionField |
29
13
  | `autocomplete` | public | `string \| undefined` | `undefined` | Delegates this property to input/textarea/select. | NativeTextFieldMixin |
14
+ | `autofocus` | public | `boolean` | `false` | | LionField |
15
+ | `defaultValidators` | public | `Validator[]` | `[]` | Used by Subclassers to add default Validators to a particular FormControl.&#xA;A date input for instance, always needs the isDate validator. | LionField |
16
+ | `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | LionField |
17
+ | `disabled` | public | `boolean` | `false` | | LionField |
18
+ | `fieldName` | public | `string` | | Set a default name for this field, so that validation feedback will be always&#xA;accessible and linguistically correct | LionField |
19
+ | `filled` | public | `boolean` | `false` | True when the modelValue is non-empty (see \_isEmpty in FormControlMixin) | LionField |
20
+ | `focused` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) is focused.&#xA;Reflects to attribute '\[focused]' as a styling hook | LionField |
21
+ | `focusedVisible` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) matches ':focus-visible'&#xA;Reflects to attribute '\[focused-visible]' as a styling hook&#xA;See: https\://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible | LionField |
22
+ | `formatCountryCodeStyle` | public | `string` | `'default'` | Extra styling of the format strategy&#xA;default \| parentheses | LionInputTel |
30
23
  | `formatOn` | protected | `string` | `'change'` | Event that will trigger formatting (more precise, visual update of the view, so the&#xA;user sees the formatted value)&#xA;Default: 'change' | LionField |
31
24
  | `formatOptions` | public | | `({ mode: 'auto' })` | Configuration object that will be available inside the formatter function | LionField |
25
+ | `formatStrategy` | public | `PhoneNumberFormat` | `'international'` | Determines what the formatter output should look like.&#xA;Formatting strategies as provided by google-libphonenumber&#xA;See: https\://www\.npmjs.com/package/google-libphonenumber | LionInputTel |
32
26
  | `formattedValue` | public | `string\|undefined` | `undefined` | The view value is the result of the formatter function (when available).&#xA;The result will be stored in the native \_inputNode (usually an input\[type=text]).&#xA;&#xA;Examples:&#xA;- For a date input, this would be '20/01/1999' (dependent on locale).&#xA;- For a number input, this could be '1,234.56' (a String representation of modelValue&#xA;1234.56) | LionField |
33
- | `serializedValue` | public | `string\|undefined` | `undefined` | The serialized version of the model value.&#xA;This value exists for maximal compatibility with the platform API.&#xA;The serialized value can be an interface in context where data binding is not&#xA;supported and a serialized string needs to be set.&#xA;&#xA;Examples:&#xA;- For a date input, this would be the iso format of a date, e.g. '1999-01-20'.&#xA;- For a number input this would be the String representation of a float ('1234.56'&#xA; instead of 1234.56)&#xA;&#xA;When no parser is available, the value is usually the same as the formattedValue&#xA;(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'&#xA;event). Will be added as meta info to the \`model-value-changed\` event. Depending on&#xA;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.&#xA;Reflects to attribute '\[focused]' as a styling hook | LionField |
37
- | `focusedVisible` | public | `boolean` | `false` | Whether the focusable element within (\`.\_focusableNode\`) matches ':focus-visible'&#xA;Reflects to attribute '\[focused-visible]' as a styling hook&#xA;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.&#xA;When no value is defined, textContent of \[slot=label] will be used | LionField |
27
+ | `hasFeedbackFor` | public | `ValidationType[]` | `[]` | As soon as validation happens (after modelValue/validators/validator param change), this&#xA;array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).&#xA;Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on&#xA;\`.feedbackCondition()\`.&#xA;&#xA;For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can&#xA;be useful for subtle visual feedback on keyup, like a red/green border around an input. | LionField |
40
28
  | `helpText` | public | `string` | `''` | The helpt text for the input node.&#xA;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&#xA;the value of the input. The difference between disabled and readonly is that read-only&#xA;controls can still function, whereas disabled controls generally do not function as&#xA;controls until they are enabled.&#xA;(From: https\://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) | LionField |
29
+ | `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.&#xA;Creates attribute \[is-pending] as a styling hook | LionField |
30
+ | `label` | public | `string` | `''` | The label text for the input node.&#xA;When no value is defined, textContent of \[slot=label] will be used | LionField |
45
31
  | `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&#xA;'endpoint'. This means it will be considered as an individual field: for&#xA;a select, individual options will not be part of the formPath. They&#xA;will.&#xA;Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'&#xA;(from Application Developer perspective) need to be more like fields&#xA;(think of an amount-input with a currency select box next to it), can set this&#xA;to true to hide private internals in the formPath. | LionField |
51
32
  | `modelValue` | public | | | | LionField |
52
- | `type` | public | `string` | `'text'` | | LionInput |
53
- | `placeholder` | public | `string` | `''` | | LionInput |
54
33
  | `name` | public | `string` | `''` | The name the element will be registered with to the .formElements collection&#xA;of the parent. Also, it serves as the key of key/value pairs in&#xA; modelValue/serializedValue objects | LionField |
55
- | `_parentFormGroup` | protected | `FormRegistrarHost \| undefined` | `undefined` | The registrar this FormControl registers to, Usually a descendant of FormGroup or&#xA;ChoiceGroup | LionField |
56
- | `allowCrossRootRegistration` | public | `boolean` | `false` | To encourage accessibility best practices, \`form-element-register\` events&#xA;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.&#xA;Use this option if you know what you're doing. It will then be possible to nest FormControls&#xA;inside shadow dom. See https\://lion.js.org/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.&#xA;The name must be seen from the point of view of the input field:&#xA;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
34
  | `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&#xA;array is updated with the active ValidationTypes ('error'\|'warning'\|'success'\|'info' etc.).&#xA;Notice the difference with \`.showsFeedbackFor\`, which filters \`.hasFeedbackFor\` based on&#xA;\`.feedbackCondition()\`.&#xA;&#xA;For styling purposes, will be reflected to \[has-feedback-for="error warning"]. This can&#xA;be useful for subtle visual feedback on keyup, like a red/green border around an input. | LionField |
35
+ | `placeholder` | public | `string` | `''` | | LionInput |
36
+ | `preferredRegions` | public | `string[]` | `[]` | Regions that will be shown on top of the dropdown | |
37
+ | `prefilled` | public | `boolean` | `false` | True when user has left non-empty field or input is prefilled.&#xA;The name must be seen from the point of view of the input field:&#xA;once the user enters the input field, the value is non-empty. | LionField |
38
+ | `readOnly` | public | `boolean` | `false` | A Boolean attribute which, if present, indicates that the user should not be able to edit&#xA;the value of the input. The difference between disabled and readonly is that read-only&#xA;controls can still function, whereas disabled controls generally do not function as&#xA;controls until they are enabled.&#xA;(From: https\://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly) | LionField |
39
+ | `refs` | public | `object` | `{ /** @type {DropdownRef} */ dropdown: /** @type {DropdownRef} */ (createRef()), }` | | |
40
+ | `selectionEnd` | public | `number` | | | NativeTextFieldMixin |
41
+ | `selectionStart` | public | `number` | | | NativeTextFieldMixin |
42
+ | `serializedValue` | public | `string\|undefined` | `undefined` | The serialized version of the model value.&#xA;This value exists for maximal compatibility with the platform API.&#xA;The serialized value can be an interface in context where data binding is not&#xA;supported and a serialized string needs to be set.&#xA;&#xA;Examples:&#xA;- For a date input, this would be the iso format of a date, e.g. '1999-01-20'.&#xA;- For a number input this would be the String representation of a float ('1234.56'&#xA; instead of 1234.56)&#xA;&#xA;When no parser is available, the value is usually the same as the formattedValue&#xA;(being \_inputNode.value) | LionField |
70
43
  | `showsFeedbackFor` | public | `ValidationType[]` | `[]` | Based on outcome of feedbackCondition, this array decides what ValidationTypes should be&#xA;shown in validationFeedback, based on meta data like interaction states.&#xA;&#xA;For styling purposes, it reflects it \`\[shows-feedback-for="error warning"]\` | LionField |
44
+ | `slots` | public | | | Adds ".\_feedbackNode" as described below | LionField |
45
+ | `submitted` | public | | | | LionField |
46
+ | `touched` | public | `boolean` | `false` | True when user has focused and left(blurred) the field. | LionField |
47
+ | `type` | public | `string` | `'text'` | | LionInput |
71
48
  | `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.&#xA;Creates attribute \[is-pending] as a styling hook | LionField |
73
49
  | `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.&#xA;A date input for instance, always needs the isDate validator. | LionField |
50
+ | `value` | public | | | The view value. Will be delegated to \`.\_inputNode.value\`&#xA;&#xA;Note: Overrides the implementation from FormatMixin | LionField |
51
+ | `_allCountriesLabel` | protected | `string` | `''` | Group label for all countries, when preferredCountries are shown | |
52
+ | `_allowedOrAllRegions` | protected | `RegionCode[]` | | Used for rendering the region/country list | LionInputTel |
53
+ | `_allValidators` | protected | `Validator[]` | | Combination of validators provided by Application Developer and the default validators | LionField |
54
+ | `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | LionField |
55
+ | `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | LionField |
56
+ | `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | LionField |
57
+ | `_feedbackNode` | protected | | | Element where validation feedback will be rendered to | LionField |
58
+ | `_focusableNode` | protected | `HTMLElement` | | The focusable element:&#xA;could be an input, textarea, select, button or any other element with tabindex > -1 | LionField |
59
+ | `_helpTextNode` | protected | | | Element where help text will be rendered to | LionField |
60
+ | `_inputId` | protected | `string` | | Unique id that can be used in all light dom | LionField |
61
+ | `_inputNode` | protected | `HTMLInputElement \| HTMLTextAreaElement` | | The interactive (form) element. Can be a native element like input/textarea/select or&#xA;an element with tabindex > -1 | LionField |
62
+ | `_isHandlingUserInput` | protected | `boolean` | `false` | Flag that will be set when user interaction takes place (for instance after an 'input'&#xA;event). Will be added as meta info to the \`model-value-changed\` event. Depending on&#xA;whether a user is interacting, formatting logic will be handled differently. | LionField |
63
+ | `_isPasting` | protected | `boolean` | `false` | Whether the user is pasting content. Allows Subclassers to do this in their subclass: | LionField |
64
+ | `_isRepropagationEndpoint` | public | `boolean` | `false` | By default, a field with \_repropagationRole 'choice-group' will act as an&#xA;'endpoint'. This means it will be considered as an individual field: for&#xA;a select, individual options will not be part of the formPath. They&#xA;will.&#xA;Similarly, components that (a11y wise) need to be fieldsets, but 'interaction wise'&#xA;(from Application Developer perspective) need to be more like fields&#xA;(think of an amount-input with a currency select box next to it), can set this&#xA;to true to hide private internals in the formPath. | LionField |
65
+ | `_labelNode` | protected | | | Element where label will be rendered to | LionField |
66
+ | `_leaveEvent` | protected | `string` | `'blur'` | The event that triggers the touched state | LionField |
67
+ | `_parentFormGroup` | protected | `FormRegistrarHost \| undefined` | `undefined` | The registrar this FormControl registers to, Usually a descendant of FormGroup or&#xA;ChoiceGroup | LionField |
68
+ | `_phoneUtil` | protected | `AwesomePhoneNumber\|null` | | | LionInputTel |
69
+ | `_phoneUtilLoadComplete` | protected | `Promise<PhoneNumber>` | | | LionInputTel |
70
+ | `_preferredCountriesLabel` | protected | `string` | `''` | Group label for preferred countries, when preferredCountries are shown | |
71
+ | `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'child'` | Based on the role, details of handling model-value-changed repropagation differ. | LionField |
72
+ | `_requestedToBeDisabled` | protected | `boolean` | `false` | | LionField |
73
+ | `_templateDataDropdown` | protected | `TemplateDataForDropdownInputTel` | | This method provides a TemplateData object to be fed to pure template functions, a.k.a.&#xA;Pure Templates™. The goal is to totally decouple presentation from logic here, so that&#xA;Subclassers can override all content without having to loose private info contained&#xA;within the template function that was overridden.&#xA;&#xA;Subclassers would need to make sure all the contents of the TemplateData object are implemented&#xA;by making sure they are coupled to the right 'ref' (\[data-ref=dropdown] in this example),&#xA;with the help of lit's spread operator directive.&#xA;To enhance this process, the TemplateData object is completely typed. Ideally, this would be&#xA;enhanced by providing linters that make sure all of their required members are implemented by&#xA;a Subclasser.&#xA;When a Subclasser wants to add more data, this can be done via: | |
74
+ | `_valueChangedEvent` | protected | `string` | `'model-value-changed'` | The event that triggers the dirty state | LionField |
75
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 |
77
76
 
78
77
  ### Methods
79
78
 
80
- | Name | Privacy | Description | Parameters | Return | Inherited From |
81
- | ---------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | -------------------- |
82
- | `_onPhoneNumberUtilReady` | protected | | | | LionInputTel |
83
- | `_initModelValueBasedOnDropdown` | protected | | | | |
84
- | `_isEmpty` | protected | Used for Required validation and computation of interaction states.&#xA;We need to override this, because we prefill the input with the region code (like +31), but for proper UX,&#xA;we don't consider this as having interaction state \`prefilled\` | `modelValue: string` | `boolean` | LionField |
85
- | `_onDropdownValueChange` | protected | | `event: OnDropdownChangeEvent` | | |
86
- | `_repropagationCondition` | protected | Usually, we don't use composition in regular LionFields (non choice-groups). Here we use a LionSelect(Rich) inside.&#xA;We don't want to repropagate any children, since an Application Developer is not concerned with these internals (see repropate logic in FormControlMixin)&#xA;Also, we don't want to give (wrong) info to InteractionStateMixin, that will set the wrong interaction states based on child info.&#xA;TODO: Make "this.\_repropagationRole !== 'child'" the default for FormControlMixin&#xA;(so that FormControls used within are never repropagated for LionFields) | `target: FormControlHost` | | LionField |
87
- | `_setActiveRegion` | protected | Protected setter for activeRegion, only meant for subclassers | `newValue: RegionCode\|undefined` | | LionInputTel |
88
- | `formatter` | public | Converts modelValue to formattedValue (formattedValue will be synced with&#xA;\`.\_inputNode.value\`)&#xA;For instance, a Date object to a localized date. | `modelValue: string` | `string` | LionField |
89
- | `parser` | public | Converts viewValue to modelValue&#xA;For instance, a localized date to a Date Object | `viewValue: string` | `string` | LionField |
90
- | `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user&#xA;on keyup instead of after blurring the field. The biggest difference between preprocessors&#xA;and formatters is their moment of execution: preprocessors are run before modelValue is&#xA;computed (and work based on view value), whereas formatters are run after the parser (and&#xA;are based on modelValue)&#xA;Automatically formats code while typing. It depends on a preprocessro that smartly&#xA;updates the viewValue and caret position for best UX. | `viewValue: string, { currentCaretIndex, prevViewValue }, options: @param {string} options.prevViewValue * @param {number} options.currentCaretIndex * ` | `{ viewValue: string; caretIndex: number; } \| undefined` | LionField |
91
- | `_reflectBackOn` | protected | Do not reflect back .formattedValue during typing (this normally wouldn't happen when&#xA;FormatMixin calls \_calculateValues based on user input, but for LionInputTel we need to&#xA;call it on .activeRegion change) | | `boolean` | LionField |
92
- | `_setValueAndPreserveCaret` | protected | Restores the cursor to its original position after updating the value. | `newValue: string` | | NativeTextFieldMixin |
93
- | `_reflectBackFormattedValueToUser` | protected | Note: Overrides the implementation from FormatMixin | | | LionField |
94
- | `serializer` | public | Converts \`.modelValue\` to \`.serializedValue\`&#xA;For instance, a Date object to an iso formatted date string | `v: ?` | `string` | LionField |
95
- | `deserializer` | public | Converts \`.serializedValue\` to \`.modelValue\`&#xA;For instance, an iso formatted date string to a Date object | `v: ?` | `?` | LionField |
96
- | `_calculateValues` | protected | Responsible for storing all representations(modelValue, serializedValue, formattedValue&#xA;and value) of the input value. Prevents infinite loops, so all value observers can be&#xA;treated like they will only be called once, without indirectly calling other observers.&#xA;(in fact, some are called twice, but the \_\_preventRecursiveTrigger lock prevents the&#xA;second call from having effect). | `{ source }, config: {source:'model'\|'serialized'\|'formatted'\|null}` | | LionField |
97
- | `_onModelValueChanged` | protected | Responds to modelValue changes in the synchronous cycle (most subclassers should listen to&#xA;the asynchronous cycle ('modelValue' in the .updated lifecycle)) | `args: { modelValue: unknown; }[]` | | LionField |
98
- | `_dispatchModelValueChangedEvent` | protected | This is wrapped in a distinct method, so that parents can control when the changed event&#xA;is fired. For objects, a deep comparison might be needed. | `args: { modelValue: unknown; }[]` | | LionField |
99
- | `_syncValueUpwards` | protected | Synchronization from \`.\_inputNode.value\` to \`LionField\` (flow \[2])&#xA;Downwards syncing should only happen for \`LionField\`.value changes from 'above'.&#xA;This triggers \_onModelValueChanged and connects user input&#xA;to the parsing/formatting/serializing loop. | | | LionField |
100
- | `_proxyInputEvent` | protected | This can be called whenever the view value should be updated. Dependent on component type&#xA;("input" for \<input> or "change" for \<select>(mainly for IE)) a different event should be&#xA;used as source for the "user-input-changed" event (which can be seen as an abstraction&#xA;layer on top of other events (input, change, whatever)) | | | LionField |
101
- | `_onUserInputChanged` | protected | | | | LionField |
102
- | `__onCompositionEvent` | protected | | `{ type }, event: Event` | | LionField |
103
- | `focus` | public | Calls \`focus()\` on focusable element within | | | LionField |
104
- | `blur` | public | Calls \`blur()\` on focusable element within | | | LionField |
105
- | `_triggerInitialModelValueChangedEvent` | protected | | | | LionField |
106
- | `_enhanceLightDomClasses` | protected | | | | LionField |
107
- | `_enhanceLightDomA11y` | protected | | | | LionField |
108
- | `_enhanceLightDomA11yForAdditionalSlots` | protected | Enhances additional slots(prefix, suffix, before, after) defined by developer.&#xA;&#xA;When boolean attribute data-label or data-description is found,&#xA;the slot element will be connected to the input via aria-labelledby or aria-describedby | `additionalSlots: string[]` | | LionField |
109
- | `__reflectAriaAttr` | protected | Will handle help text, validation feedback and character counter,&#xA;prefix/suffix/before/after (if they contain data-description flag attr).&#xA;Also, contents of id references that will be put in the \<lion-field>.\_ariaDescribedby property&#xA;from an external context, will be read by a screen reader. | `attrName: string, nodes: Element[], reorder: boolean\|undefined` | | LionField |
110
- | `_groupOneTemplate` | protected | | | `TemplateResult` | LionField |
111
- | `_groupTwoTemplate` | protected | | | `TemplateResult` | LionField |
112
- | `_labelTemplate` | protected | | | `TemplateResult` | LionField |
113
- | `_helpTextTemplate` | protected | | | `TemplateResult` | LionField |
114
- | `_inputGroupTemplate` | protected | | | `TemplateResult` | LionField |
115
- | `_inputGroupBeforeTemplate` | protected | | | `TemplateResult` | LionField |
116
- | `_inputGroupPrefixTemplate` | protected | | | `TemplateResult \| nothing` | LionField |
117
- | `_inputGroupInputTemplate` | protected | | | `TemplateResult` | LionField |
118
- | `_inputGroupSuffixTemplate` | protected | | | `TemplateResult \| nothing` | LionField |
119
- | `_inputGroupAfterTemplate` | protected | | | `TemplateResult` | LionField |
120
- | `_feedbackTemplate` | protected | | | `TemplateResult` | LionField |
121
- | `_getAriaDescriptionElements` | protected | This function exposes descripion elements that a FormGroup should expose to its&#xA;children. See FormGroupMixin.\_\_getAllDescriptionElementsInParentChain() | | `Array.<HTMLElement>` | LionField |
122
- | `addToAriaLabelledBy` | public | Allows to add extra element references to aria-labelledby attribute. | `element: HTMLElement, { idPrefix = '', reorder = true }, customConfig: {idPrefix?:string; reorder?: boolean}` | | LionField |
123
- | `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionField |
124
- | `addToAriaDescribedBy` | public | Allows to add element references to aria-describedby attribute. | `element: HTMLElement, { idPrefix = '', reorder = true }, customConfig: {idPrefix?:string; reorder?: boolean}` | | LionField |
125
- | `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionField |
126
- | `__getDirectSlotChild` | protected | | `slotName: string` | `HTMLElement \| undefined` | LionField |
127
- | `_dispatchInitialModelValueChangedEvent` | protected | | | | LionField |
128
- | `_onBeforeRepropagateChildrenValues` | protected | Hook for Subclassers to add logic before repropagation | `ev: CustomEvent` | | LionField |
129
- | `__repropagateChildrenValues` | protected | | `ev: CustomEvent` | | LionField |
130
- | `_onLabelClick` | protected | | | | LionField |
131
- | `makeRequestToBeDisabled` | public | | | | LionField |
132
- | `retractRequestToBeDisabled` | public | | | | LionField |
133
- | `click` | public | | | | LionField |
134
- | `__rerenderSlot` | protected | | `slotName: string` | | LionField |
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
136
- ` | | LionField |
137
- | `__initSlots` | protected | Here we look what's inside our \`get slots\`.&#xA;Rerenderable slots get scheduled and "one time slots" get rendered once on connected | `slotNames: string[]` | | LionField |
138
- | `_connectSlotMixin` | protected | | | | LionField |
139
- | `_isPrivateSlot` | protected | | `slotName: string` | `boolean` | LionField |
140
- | `initInteractionState` | public | Evaluations performed on connectedCallback.&#xA;This method is public, so it can be called at a later moment (when we need to wait for&#xA;registering children for instance) as well.&#xA;Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | LionField |
141
- | `_iStateOnLeave` | protected | Sets touched value to true and reevaluates prefilled state.&#xA;When false, on next interaction, user will start with a clean state. | | | LionField |
142
- | `_iStateOnValueChange` | protected | Sets dirty value and validates when already touched or invalid | | | LionField |
143
- | `resetInteractionState` | public | Resets touched and dirty, and recomputes prefilled | | | LionField |
144
- | `_onTouchedChanged` | protected | Dispatches event on touched state change | | | LionField |
145
- | `_onDirtyChanged` | protected | Dispatches event on touched state change | | | LionField |
146
- | `_showFeedbackConditionFor` | protected | Default feedbackCondition condition, used by Subclassers, that will be used when&#xA;\`feedbackCondition()\` is not overridden by Application Developer.&#xA;Show the validity feedback when returning true, don't show when false | `type: string, meta: InteractionStates` | | LionField |
147
- | `updateSync` | public | An abstraction that has the exact same api as \`requestUpdate\`, but taking&#xA;into account:&#xA;- \[member order independence]\(https\://github.com/webcomponents/gold-standard/wiki/Member-Order-Independence)&#xA;- property effects start when all (light) dom has initialized (on firstUpdated)&#xA;- property effects don't interrupt the first meaningful paint&#xA;- compatible with propertyAccessor.\`hasChanged\`: no manual checks needed or accidentally&#xA;run property effects / events when no change happened&#xA;effects when values didn't change&#xA;All code previously present in requestUpdate can be placed in this method. | `name: string, oldValue: ?` | | LionField |
148
- | `validate` | public | Triggered by:&#xA; \- modelValue change&#xA; \- change in the 'validators' array&#xA; \- change in the config of an individual Validator&#xA;&#xA;Three situations are handled:&#xA;- a1) the FormControl is empty: further execution is halted. When the Required Validator&#xA;(being mutually exclusive to the other Validators) is applied, it will end up in the&#xA;validation result (as the only Validator, since further execution was halted).&#xA;- a2) there are synchronous Validators: this is the most common flow. When modelValue hasn't&#xA;changed since last async results were generated, 'sync results' are merged with the&#xA;'async results'.&#xA;- a3) there are asynchronous Validators: for instance when server side evaluation is needed.&#xA;Executions are scheduled and awaited and the 'async results' are merged with the&#xA;'sync results'.&#xA;&#xA;- b) there are MetaValidators. After steps a1, a2, or a3 are finished, the holistic&#xA;MetaValidators (evaluating the total result of the 'regular' (a1, a2 and a3) validators)&#xA;will be run...&#xA;&#xA;Situations a2 and a3 are not mutually exclusive and can be triggered within one \`validate()\`&#xA;call. Situation b will occur after every call. | `{ clearCurrentResult = false }, opts: { clearCurrentResult?: boolean }` | | LionField |
149
- | `__executeValidators` | protected | | | | LionField |
150
- | `_onValidatorUpdated` | protected | | `e: Event\|CustomEvent` | | LionField |
151
- | `_updateFeedbackComponent` | protected | Responsible for retrieving messages from Validators and&#xA;(delegation of) rendering them.&#xA;&#xA;For \`.\_feedbackNode\` (extension of LionValidationFeedback):&#xA;- retrieve messages from highest prio Validators&#xA;- provide the result to custom feedback node and let the&#xA;custom node decide on their renderings&#xA;&#xA;In both cases:&#xA;- we compute the 'show' flag (like 'hasErrorVisible') for all types&#xA;- we set the customValidity message of the highest prio Validator&#xA;- we set aria-invalid="true" in case hasErrorVisible is true | | | LionField |
152
- | `feedbackCondition` | public | Allows the Application Developer to specify when a feedback message should be shown | `type: string, meta: object, currentCondition: ((type: string, meta: object) => boolean)` | `boolean` | LionField |
153
- | `_hasFeedbackVisibleFor` | protected | Used to translate \`.hasFeedbackFor\` and \`.shouldShowFeedbackFor\` to \`.showsFeedbackFor\` | `type: string` | | LionField |
154
- | `_updateShouldShowFeedbackFor` | protected | | | | LionField |
155
- | `_prioritizeAndFilterFeedback` | protected | Orders all active validators in this.\_\_validationResult.&#xA;Can also filter out occurrences (based on interaction states) | `{ validationResult }, opts: { validationResult: Validator[] }` | `Validator[]` | LionField |
156
- | `createScopedElement` | public | | `tagName` | | LionField |
157
- | `defineScopedElement` | public | Defines a scoped element. | `tagName: string, classToBeRegistered: typeof HTMLElement` | | LionField |
158
- | `attachShadow` | public | | `options: ShadowRootInit` | `ShadowRoot` | LionField |
159
- | `reset` | public | Resets modelValue to initial value.&#xA;Interaction states are cleared | | | LionField |
160
- | `clear` | public | Clears modelValue.&#xA;Interaction states are not cleared (use resetInteractionState for this) | | | LionField |
161
- | `_onChange` | protected | Dispatches custom bubble event | `ev: Event=` | | LionField |
79
+ | Name | Privacy | Description | Parameters | Return | Inherited From |
80
+ | ---------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | -------------------- |
81
+ | `addToAriaDescribedBy` | public | Allows to add element references to aria-describedby attribute. | `element: HTMLElement, { idPrefix = '', reorder = true }, customConfig: {idPrefix?:string; reorder?: boolean}` | | LionField |
82
+ | `addToAriaLabelledBy` | public | Allows to add extra element references to aria-labelledby attribute. | `element: HTMLElement, { idPrefix = '', reorder = true }, customConfig: {idPrefix?:string; reorder?: boolean}` | | LionField |
83
+ | `attachShadow` | public | | `options: ShadowRootInit` | `ShadowRoot` | LionField |
84
+ | `blur` | public | Calls \`blur()\` on focusable element within | | | LionField |
85
+ | `clear` | public | Clears modelValue.&#xA;Interaction states are not cleared (use resetInteractionState for this) | | | LionField |
86
+ | `click` | public | | | | LionField |
87
+ | `createScopedElement` | public | | `tagName` | | LionField |
88
+ | `defineScopedElement` | public | Defines a scoped element. | `tagName: string, classToBeRegistered: typeof HTMLElement` | | LionField |
89
+ | `deserializer` | public | Converts \`.serializedValue\` to \`.modelValue\`&#xA;For instance, an iso formatted date string to a Date object | `v: ?` | `?` | LionField |
90
+ | `feedbackCondition` | public | Allows the Application Developer to specify when a feedback message should be shown | `type: string, meta: object, currentCondition: ((type: string, meta: object) => boolean)` | `boolean` | LionField |
91
+ | `focus` | public | Calls \`focus()\` on focusable element within | | | LionField |
92
+ | `formatter` | public | Converts modelValue to formattedValue (formattedValue will be synced with&#xA;\`.\_inputNode.value\`)&#xA;For instance, a Date object to a localized date. | `modelValue: string` | `string` | LionField |
93
+ | `initInteractionState` | public | Evaluations performed on connectedCallback.&#xA;This method is public, so it can be called at a later moment (when we need to wait for&#xA;registering children for instance) as well.&#xA;Since this method will be called twice in last mentioned scenario, it must stay idempotent. | | | LionField |
94
+ | `makeRequestToBeDisabled` | public | | | | LionField |
95
+ | `parser` | public | Converts viewValue to modelValue&#xA;For instance, a localized date to a Date Object | `viewValue: string` | `string` | LionField |
96
+ | `preprocessor` | public | Preprocessors could be considered 'live formatters'. Their result is shown to the user&#xA;on keyup instead of after blurring the field. The biggest difference between preprocessors&#xA;and formatters is their moment of execution: preprocessors are run before modelValue is&#xA;computed (and work based on view value), whereas formatters are run after the parser (and&#xA;are based on modelValue)&#xA;Automatically formats code while typing. It depends on a preprocessro that smartly&#xA;updates the viewValue and caret position for best UX. | `viewValue: string, { currentCaretIndex, prevViewValue }, options: @param {string} options.prevViewValue * @param {number} options.currentCaretIndex * ` | `{ viewValue: string; caretIndex: number; } \| undefined` | LionField |
97
+ | `removeFromAriaDescribedBy` | public | Allows to remove element references from aria-describedby attribute. | `element: HTMLElement` | | LionField |
98
+ | `removeFromAriaLabelledBy` | public | Allows to remove element references from aria-labelledby attribute. | `element: HTMLElement` | | LionField |
99
+ | `reset` | public | Resets modelValue to initial value.&#xA;Interaction states are cleared | | | LionField |
100
+ | `resetInteractionState` | public | Resets touched and dirty, and recomputes prefilled | | | LionField |
101
+ | `retractRequestToBeDisabled` | public | | | | LionField |
102
+ | `serializer` | public | Converts \`.modelValue\` to \`.serializedValue\`&#xA;For instance, a Date object to an iso formatted date string | `v: ?` | `string` | LionField |
103
+ | `updateSync` | public | An abstraction that has the exact same api as \`requestUpdate\`, but taking&#xA;into account:&#xA;- \[member order independence]\(https\://github.com/webcomponents/gold-standard/wiki/Member-Order-Independence)&#xA;- property effects start when all (light) dom has initialized (on firstUpdated)&#xA;- property effects don't interrupt the first meaningful paint&#xA;- compatible with propertyAccessor.\`hasChanged\`: no manual checks needed or accidentally&#xA;run property effects / events when no change happened&#xA;effects when values didn't change&#xA;All code previously present in requestUpdate can be placed in this method. | `name: string, oldValue: ?` | | LionField |
104
+ | `validate` | public | Triggered by:&#xA; \- modelValue change&#xA; \- change in the 'validators' array&#xA; \- change in the config of an individual Validator&#xA;&#xA;Three situations are handled:&#xA;- a1) the FormControl is empty: further execution is halted. When the Required Validator&#xA;(being mutually exclusive to the other Validators) is applied, it will end up in the&#xA;validation result (as the only Validator, since further execution was halted).&#xA;- a2) there are synchronous Validators: this is the most common flow. When modelValue hasn't&#xA;changed since last async results were generated, 'sync results' are merged with the&#xA;'async results'.&#xA;- a3) there are asynchronous Validators: for instance when server side evaluation is needed.&#xA;Executions are scheduled and awaited and the 'async results' are merged with the&#xA;'sync results'.&#xA;&#xA;- b) there are MetaValidators. After steps a1, a2, or a3 are finished, the holistic&#xA;MetaValidators (evaluating the total result of the 'regular' (a1, a2 and a3) validators)&#xA;will be run...&#xA;&#xA;Situations a2 and a3 are not mutually exclusive and can be triggered within one \`validate()\`&#xA;call. Situation b will occur after every call. | `{ clearCurrentResult = false }, opts: { clearCurrentResult?: boolean }` | | LionField |
105
+ | `_calculateValues` | protected | Responsible for storing all representations(modelValue, serializedValue, formattedValue&#xA;and value) of the input value. Prevents infinite loops, so all value observers can be&#xA;treated like they will only be called once, without indirectly calling other observers.&#xA;(in fact, some are called twice, but the \_\_preventRecursiveTrigger lock prevents the&#xA;second call from having effect). | `{ source }, config: {source:'model'\|'serialized'\|'formatted'\|null}` | | LionField |
106
+ | `_connectSlotMixin` | protected | | | | LionField |
107
+ | `_dispatchInitialModelValueChangedEvent` | protected | | | | LionField |
108
+ | `_dispatchModelValueChangedEvent` | protected | This is wrapped in a distinct method, so that parents can control when the changed event&#xA;is fired. For objects, a deep comparison might be needed. | `args: { modelValue: unknown; }[]` | | LionField |
109
+ | `_enhanceLightDomA11y` | protected | | | | LionField |
110
+ | `_enhanceLightDomA11yForAdditionalSlots` | protected | Enhances additional slots(prefix, suffix, before, after) defined by developer.&#xA;&#xA;When boolean attribute data-label or data-description is found,&#xA;the slot element will be connected to the input via aria-labelledby or aria-describedby | `additionalSlots: string[]` | | LionField |
111
+ | `_enhanceLightDomClasses` | protected | | | | LionField |
112
+ | `_feedbackTemplate` | protected | | | `TemplateResult` | LionField |
113
+ | `_getAriaDescriptionElements` | protected | This function exposes descripion elements that a FormGroup should expose to its&#xA;children. See FormGroupMixin.\_\_getAllDescriptionElementsInParentChain() | | `Array.<HTMLElement>` | LionField |
114
+ | `_groupOneTemplate` | protected | | | `TemplateResult` | LionField |
115
+ | `_groupTwoTemplate` | protected | | | `TemplateResult` | LionField |
116
+ | `_hasFeedbackVisibleFor` | protected | Used to translate \`.hasFeedbackFor\` and \`.shouldShowFeedbackFor\` to \`.showsFeedbackFor\` | `type: string` | | LionField |
117
+ | `_helpTextTemplate` | protected | | | `TemplateResult` | LionField |
118
+ | `_initModelValueBasedOnDropdown` | protected | | | | |
119
+ | `_inputGroupAfterTemplate` | protected | | | `TemplateResult` | LionField |
120
+ | `_inputGroupBeforeTemplate` | protected | | | `TemplateResult` | LionField |
121
+ | `_inputGroupInputTemplate` | protected | | | `TemplateResult` | LionField |
122
+ | `_inputGroupPrefixTemplate` | protected | | | `TemplateResult \| nothing` | LionField |
123
+ | `_inputGroupSuffixTemplate` | protected | | | `TemplateResult \| nothing` | LionField |
124
+ | `_inputGroupTemplate` | protected | | | `TemplateResult` | LionField |
125
+ | `_isEmpty` | protected | Used for Required validation and computation of interaction states.&#xA;We need to override this, because we prefill the input with the region code (like +31), but for proper UX,&#xA;we don't consider this as having interaction state \`prefilled\` | `modelValue: string` | `boolean` | LionField |
126
+ | `_isPrivateSlot` | protected | | `slotName: string` | `boolean` | LionField |
127
+ | `_iStateOnLeave` | protected | Sets touched value to true and reevaluates prefilled state.&#xA;When false, on next interaction, user will start with a clean state. | | | LionField |
128
+ | `_iStateOnValueChange` | protected | Sets dirty value and validates when already touched or invalid | | | LionField |
129
+ | `_labelTemplate` | protected | | | `TemplateResult` | LionField |
130
+ | `_onBeforeRepropagateChildrenValues` | protected | Hook for Subclassers to add logic before repropagation | `ev: CustomEvent` | | LionField |
131
+ | `_onChange` | protected | Dispatches custom bubble event | `ev: Event=` | | LionField |
132
+ | `_onDirtyChanged` | protected | Dispatches event on touched state change | | | LionField |
133
+ | `_onDropdownValueChange` | protected | | `event: OnDropdownChangeEvent` | | |
134
+ | `_onLabelClick` | protected | | | | LionField |
135
+ | `_onModelValueChanged` | protected | Responds to modelValue changes in the synchronous cycle (most subclassers should listen to&#xA;the asynchronous cycle ('modelValue' in the .updated lifecycle)) | `args: { modelValue: unknown; }[]` | | LionField |
136
+ | `_onPhoneNumberUtilReady` | protected | | | | LionInputTel |
137
+ | `_onTouchedChanged` | protected | Dispatches event on touched state change | | | LionField |
138
+ | `_onUserInputChanged` | protected | | | | LionField |
139
+ | `_onValidatorUpdated` | protected | | `e: Event\|CustomEvent` | | LionField |
140
+ | `_prioritizeAndFilterFeedback` | protected | Orders all active validators in this.\_\_validationResult.&#xA;Can also filter out occurrences (based on interaction states) | `{ validationResult }, opts: { validationResult: Validator[] }` | `Validator[]` | LionField |
141
+ | `_proxyInputEvent` | protected | This can be called whenever the view value should be updated. Dependent on component type&#xA;("input" for \<input> or "change" for \<select>(mainly for IE)) a different event should be&#xA;used as source for the "user-input-changed" event (which can be seen as an abstraction&#xA;layer on top of other events (input, change, whatever)) | | | LionField |
142
+ | `_reflectBackFormattedValueToUser` | protected | Note: Overrides the implementation from FormatMixin | | | LionField |
143
+ | `_reflectBackOn` | protected | Do not reflect back .formattedValue during typing (this normally wouldn't happen when&#xA;FormatMixin calls \_calculateValues based on user input, but for LionInputTel we need to&#xA;call it on .activeRegion change) | | `boolean` | LionField |
144
+ | `_repropagationCondition` | protected | Usually, we don't use composition in regular LionFields (non choice-groups). Here we use a LionSelect(Rich) inside.&#xA;We don't want to repropagate any children, since an Application Developer is not concerned with these internals (see repropate logic in FormControlMixin)&#xA;Also, we don't want to give (wrong) info to InteractionStateMixin, that will set the wrong interaction states based on child info.&#xA;TODO: Make "this.\_repropagationRole !== 'child'" the default for FormControlMixin&#xA;(so that FormControls used within are never repropagated for LionFields) | `target: FormControlHost` | | LionField |
145
+ | `_setActiveRegion` | protected | Protected setter for activeRegion, only meant for subclassers | `newValue: RegionCode\|undefined` | | LionInputTel |
146
+ | `_setValueAndPreserveCaret` | protected | Restores the cursor to its original position after updating the value. | `newValue: string` | | NativeTextFieldMixin |
147
+ | `_showFeedbackConditionFor` | protected | Default feedbackCondition condition, used by Subclassers, that will be used when&#xA;\`feedbackCondition()\` is not overridden by Application Developer.&#xA;Show the validity feedback when returning true, don't show when false | `type: string, meta: InteractionStates` | | LionField |
148
+ | `_syncValueUpwards` | protected | Synchronization from \`.\_inputNode.value\` to \`LionField\` (flow \[2])&#xA;Downwards syncing should only happen for \`LionField\`.value changes from 'above'.&#xA;This triggers \_onModelValueChanged and connects user input&#xA;to the parsing/formatting/serializing loop. | | | LionField |
149
+ | `_triggerInitialModelValueChangedEvent` | protected | | | | LionField |
150
+ | `_updateFeedbackComponent` | protected | Responsible for retrieving messages from Validators and&#xA;(delegation of) rendering them.&#xA;&#xA;For \`.\_feedbackNode\` (extension of LionValidationFeedback):&#xA;- retrieve messages from highest prio Validators&#xA;- provide the result to custom feedback node and let the&#xA;custom node decide on their renderings&#xA;&#xA;In both cases:&#xA;- we compute the 'show' flag (like 'hasErrorVisible') for all types&#xA;- we set the customValidity message of the highest prio Validator&#xA;- we set aria-invalid="true" in case hasErrorVisible is true | | | LionField |
151
+ | `_updateShouldShowFeedbackFor` | protected | | | | LionField |
162
152
 
163
153
  ### Events
164
154