@lion/ui 0.7.5 → 0.7.7

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 (142) hide show
  1. package/README.md +1 -2
  2. package/components/button/test-suites/LionButton.suite.js +3 -1
  3. package/components/combobox/src/LionCombobox.js +33 -9
  4. package/components/combobox/test/lion-combobox.test.js +134 -7
  5. package/components/dialog/test/lion-dialog.test.js +59 -1
  6. package/components/input-datepicker/test/lion-input-datepicker.test.js +3 -3
  7. package/components/input-file/src/FileHandle.js +1 -1
  8. package/components/input-file/src/LionInputFile.js +1 -3
  9. package/components/input-file/test/lion-input-file.test.js +11 -14
  10. package/components/input-stepper/src/LionInputStepper.js +6 -5
  11. package/components/input-stepper/test/lion-input-stepper-integrations.test.js +20 -0
  12. package/components/input-stepper/test/lion-input-stepper.test.js +48 -3
  13. package/components/overlays/src/OverlayController.js +29 -7
  14. package/components/overlays/src/OverlayMixin.js +5 -1
  15. package/components/overlays/src/utils/deep-contains.js +134 -3
  16. package/components/overlays/test/OverlayController.test.js +57 -0
  17. package/components/overlays/test/utils-tests/deep-contains.test.js +98 -0
  18. package/components/select-rich/src/LionSelectRich.js +12 -0
  19. package/components/select-rich/test/lion-select-rich.test.js +26 -0
  20. package/custom-elements.json +140 -115
  21. package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
  22. package/dist-types/components/combobox/src/LionCombobox.d.ts +9 -0
  23. package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
  24. package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
  25. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts +4 -1
  26. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
  27. package/dist-types/components/input-stepper/test/lion-input-stepper-integrations.test.d.ts +2 -0
  28. package/dist-types/components/input-stepper/test/lion-input-stepper-integrations.test.d.ts.map +1 -0
  29. package/dist-types/components/input-stepper/test/lion-input-stepper.test.d.ts.map +1 -1
  30. package/dist-types/components/overlays/src/OverlayController.d.ts +7 -0
  31. package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
  32. package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
  33. package/dist-types/components/overlays/src/utils/deep-contains.d.ts +15 -1
  34. package/dist-types/components/overlays/src/utils/deep-contains.d.ts.map +1 -1
  35. package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
  36. package/dist-types/tsconfig.tsbuildinfo +1 -1
  37. package/docs/components/button/use-cases.md +2 -2
  38. package/docs/components/calendar/use-cases.md +4 -4
  39. package/docs/components/checkbox-group/api-table.md +49 -55
  40. package/docs/components/checkbox-group/overview.md +5 -5
  41. package/docs/components/checkbox-group/use-cases.md +33 -33
  42. package/docs/components/collapsible/overview.md +1 -1
  43. package/docs/components/collapsible/use-cases.md +3 -3
  44. package/docs/components/combobox/api-table.md +84 -89
  45. package/docs/components/combobox/extensions.md +20 -20
  46. package/docs/components/combobox/overview.md +1 -1
  47. package/docs/components/combobox/use-cases.md +6 -6
  48. package/docs/components/dialog/api-table.md +3 -3
  49. package/docs/components/dialog/overview.md +2 -2
  50. package/docs/components/dialog/src/external-dialog.js +32 -0
  51. package/docs/components/dialog/src/slots-dialog-content.js +1 -1
  52. package/docs/components/dialog/src/styled-dialog-content.js +1 -1
  53. package/docs/components/dialog/use-cases.md +49 -3
  54. package/docs/components/drawer/use-cases.md +3 -3
  55. package/docs/components/fieldset/api-table.md +45 -51
  56. package/docs/components/fieldset/overview.md +7 -7
  57. package/docs/components/fieldset/use-cases.md +15 -15
  58. package/docs/components/form/overview.md +7 -7
  59. package/docs/components/form/use-cases.md +4 -4
  60. package/docs/components/icon/use-cases.md +1 -1
  61. package/docs/components/input/overview.md +1 -1
  62. package/docs/components/input/use-cases.md +3 -3
  63. package/docs/components/input-amount/overview.md +3 -3
  64. package/docs/components/input-amount/use-cases.md +8 -8
  65. package/docs/components/input-date/overview.md +3 -3
  66. package/docs/components/input-date/use-cases.md +8 -8
  67. package/docs/components/input-datepicker/api-table.md +1 -1
  68. package/docs/components/input-datepicker/overview.md +5 -5
  69. package/docs/components/input-datepicker/use-cases.md +5 -5
  70. package/docs/components/input-email/overview.md +2 -2
  71. package/docs/components/input-email/use-cases.md +3 -3
  72. package/docs/components/input-file/overview.md +1 -1
  73. package/docs/components/input-iban/overview.md +2 -2
  74. package/docs/components/input-iban/use-cases.md +8 -8
  75. package/docs/components/input-range/overview.md +2 -2
  76. package/docs/components/input-stepper/api-table.md +65 -69
  77. package/docs/components/input-stepper/overview.md +1 -1
  78. package/docs/components/input-stepper/use-cases.md +21 -0
  79. package/docs/components/input-tel/overview.md +1 -1
  80. package/docs/components/input-tel/use-cases.md +9 -9
  81. package/docs/components/input-tel-dropdown/api-table.md +70 -73
  82. package/docs/components/input-tel-dropdown/extensions.md +1 -1
  83. package/docs/components/input-tel-dropdown/overview.md +1 -1
  84. package/docs/components/input-tel-dropdown/use-cases.md +5 -5
  85. package/docs/components/listbox/api-table.md +64 -70
  86. package/docs/components/listbox/overview.md +5 -5
  87. package/docs/components/listbox/use-cases.md +61 -61
  88. package/docs/components/pagination/use-cases.md +5 -5
  89. package/docs/components/radio-group/api-table.md +49 -55
  90. package/docs/components/radio-group/overview.md +6 -6
  91. package/docs/components/radio-group/use-cases.md +18 -18
  92. package/docs/components/select/use-cases.md +2 -2
  93. package/docs/components/select-rich/api-table.md +79 -85
  94. package/docs/components/select-rich/overview.md +3 -3
  95. package/docs/components/select-rich/use-cases.md +33 -33
  96. package/docs/components/steps/overview.md +4 -4
  97. package/docs/components/steps/use-cases.md +7 -7
  98. package/docs/components/tabs/examples.md +1 -1
  99. package/docs/components/tabs/use-cases.md +1 -1
  100. package/docs/components/textarea/use-cases.md +3 -3
  101. package/docs/components/tooltip/api-table.md +3 -3
  102. package/docs/components/tooltip/use-cases.md +6 -6
  103. package/docs/fundamentals/index.md +4 -4
  104. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
  105. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
  106. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
  107. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
  108. package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
  109. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  110. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  111. package/docs/fundamentals/rationales/accessibility.md +1 -1
  112. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  113. package/docs/fundamentals/systems/core/overview.md +1 -1
  114. package/docs/fundamentals/systems/form/formatting-and-parsing.md +8 -8
  115. package/docs/fundamentals/systems/form/model-value.md +1 -1
  116. package/docs/fundamentals/systems/form/overview.md +28 -28
  117. package/docs/fundamentals/systems/form/use-cases.md +19 -19
  118. package/docs/fundamentals/systems/form/validate.md +50 -50
  119. package/docs/fundamentals/systems/localize/api-table.md +10 -17
  120. package/docs/fundamentals/systems/localize/overview.md +4 -4
  121. package/docs/fundamentals/systems/localize/use-cases.md +4 -4
  122. package/docs/fundamentals/systems/overlays/_configuration-positioning.md +4 -4
  123. package/docs/fundamentals/systems/overlays/api-table.md +34 -90
  124. package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +9 -9
  125. package/docs/fundamentals/systems/overlays/configuration.md +55 -29
  126. package/docs/fundamentals/systems/overlays/overview.md +6 -6
  127. package/docs/fundamentals/systems/overlays/use-cases.md +30 -30
  128. package/docs/fundamentals/tools/ajax/use-cases.md +20 -20
  129. package/docs/fundamentals/tools/helpers/action-logger.md +3 -3
  130. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  131. package/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js +2 -2
  132. package/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js +2 -2
  133. package/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js +2 -2
  134. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  135. package/docs/guides/how-to/create-a-custom-field.md +7 -7
  136. package/docs/guides/how-to/create-a-form.md +4 -4
  137. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  138. package/docs/guides/index.md +8 -8
  139. package/docs/guides/principles/index.md +5 -5
  140. package/docs/guides/principles/scoped-elements.md +1 -1
  141. package/docs/guides/principles/styling.md +1 -1
  142. package/package.json +1 -1
@@ -62,10 +62,10 @@ export const withinForm = () => html`
62
62
  <input id="firstNameId" name="firstName" />
63
63
  <label for="lastNameId">Last name</label>
64
64
  <input id="lastNameId" name="lastName" />
65
- <lion-button-submit @click=${ev => console.log('click submit handler', ev.target)}
65
+ <lion-button-submit @click="${ev => console.log('click submit handler', ev.target)}"
66
66
  >Submit</lion-button-submit
67
67
  >
68
- <lion-button-reset @click=${ev => console.log('click reset handler', ev.target)}
68
+ <lion-button-reset @click="${ev => console.log('click reset handler', ev.target)}"
69
69
  >Reset</lion-button-reset
70
70
  >
71
71
  </form>
@@ -21,7 +21,7 @@ export const selectedDate = () => html`
21
21
  max-width: 500px;
22
22
  }
23
23
  </style>
24
- <lion-calendar class="demo-calendar" .selectedDate=${new Date(1988, 2, 5)}></lion-calendar>
24
+ <lion-calendar class="demo-calendar" .selectedDate="${new Date(1988, 2, 5)}"></lion-calendar>
25
25
  `;
26
26
  ```
27
27
 
@@ -160,7 +160,7 @@ export const disabledDates = () => html`
160
160
  </style>
161
161
  <lion-calendar
162
162
  class="demo-calendar"
163
- .disableDates=${day => day.getDay() === 6 || day.getDay() === 0}
163
+ .disableDates="${day => day.getDay() === 6 || day.getDay() === 0}"
164
164
  ></lion-calendar>
165
165
  `;
166
166
  ```
@@ -183,7 +183,7 @@ export const combinedDisabledDates = () => {
183
183
  </style>
184
184
  <lion-calendar
185
185
  class="demo-calendar"
186
- .disableDates=${day => day.getDay() === 6 || day.getDay() === 0}
186
+ .disableDates="${day => day.getDay() === 6 || day.getDay() === 0}"
187
187
  .minDate="${new Date()}"
188
188
  .maxDate="${maxDate}"
189
189
  ></lion-calendar>
@@ -215,7 +215,7 @@ export const findingEnabledDates = () => {
215
215
  </style>
216
216
  <lion-calendar
217
217
  class="demo-calendar js-calendar"
218
- .disableDates=${day => day.getDay() === 6 || day.getDay() === 0}
218
+ .disableDates="${day => day.getDay() === 6 || day.getDay() === 0}"
219
219
  ></lion-calendar>
220
220
  <button @click="${ev => getCalendar(ev).focusDate(getCalendar(ev).findNextEnabledDate())}">
221
221
  focus findNextEnabledDate
@@ -189,61 +189,55 @@
189
189
 
190
190
  ### Fields
191
191
 
192
- | Name | Privacy | Type | Default | Description | Inherited From |
193
- | ------------------------------------ | --------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
194
- | `multipleChoice` | public | `boolean` | `true` | When false (default), modelValue and serializedValue will reflect the&#xA;currently selected choice (usually a string). When true, modelValue will and&#xA;serializedValue will be an array of strings. | ChoiceGroupMixin |
195
- | `modelValue` | public | | | Object keyed by formElements names, containing formElements' modelValues | FormControlMixin |
196
- | `serializedValue` | public | | | Object keyed by formElements names, containing formElements' serializedValues | FormGroupMixin |
197
- | `formattedValue` | public | | | Object keyed by formElements names, containing formElements' formattedValues | FormGroupMixin |
198
- | `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | ValidateMixin |
199
- | `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'choice-group'` | Based on the role, details of handling model-value-changed repropagation differ. | FormControlMixin |
200
- | `formElements` | public | `FormControlsCollection` | `new FormControlsCollection()` | Closely mimics the natively supported HTMLFormControlsCollection. It can be accessed&#xA;both like an array and an object (based on control/element names). | FormRegistrarMixin |
201
- | `_isFormOrFieldset` | protected | `boolean` | `false` | Flag that determines how ".formElements" should behave.&#xA;For a regular fieldset (see LionFieldset) we expect ".formElements"&#xA;to be accessible as an object.&#xA;In case of a radio-group, a checkbox-group or a select/listbox,&#xA;it should act like an array (see ChoiceGroupMixin).&#xA;Usually, when false, we deal with a choice-group (radio-group, checkbox-group,&#xA;(multi)select) | FormRegistrarMixin |
202
- | `initComplete` | public | `Promise<any>` | `new Promise((resolve, reject) => {
203
- this.__resolveInitComplete = resolve;
204
- this.__rejectInitComplete = reject;
205
- })` | initComplete resolves after all pending initialization logic&#xA;(for instance \`\<form-group .serializedValue=${{ child1: 'a', child2: 'b' }}>\`)&#xA;is executed | FormRegistrarMixin |
206
- | `registrationComplete` | public | `Promise<any> & {done?:boolean}` | `new Promise((resolve, reject) => {
207
- this.__resolveRegistrationComplete = resolve;
208
- this.__rejectRegistrationComplete = reject;
209
- })` | registrationComplete waits for all children formElements to have registered | FormRegistrarMixin |
210
- | `done` | public | `boolean` | `false` | | FormRegistrarMixin |
211
- | `_allValidators` | protected | `Validator[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
212
- | `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | ValidateMixin |
213
- | `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. | ValidateMixin |
214
- | `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"]\` | ValidateMixin |
215
- | `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
216
- | `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.&#xA;Creates attribute \[is-pending] as a styling hook | ValidateMixin |
217
- | `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
218
- | `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. | ValidateMixin |
219
- | `_visibleMessagesAmount` | protected | `number` | `1` | The amount of feedback messages that will visible in LionValidationFeedback | ValidateMixin |
220
- | `touched` | public | `boolean` | `false` | True when user has focused and left(blurred) the field. | FormGroupMixin |
221
- | `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | FormGroupMixin |
222
- | `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. | FormGroupMixin |
223
- | `filled` | public | `boolean` | `false` | True when the modelValue is non-empty (see \_isEmpty in FormControlMixin) | InteractionStateMixin |
224
- | `_leaveEvent` | protected | `string` | `'blur'` | The event that triggers the touched state | InteractionStateMixin |
225
- | `_valueChangedEvent` | protected | `string` | `'model-value-changed'` | The event that triggers the dirty state | InteractionStateMixin |
226
- | `submitted` | public | `boolean` | `false` | True when parent form is submitted | FormGroupMixin |
227
- | `_inputNode` | protected | | | The host element with role group (or radio-group or form) containing necessary aria attributes | FormControlMixin |
228
- | `_initialModelValue` | protected | | | Gathers initial model values of all children. Used when resetGroup() is called. | FormGroupMixin |
229
- | `value` | public | `string` | `''` | | FormGroupMixin |
230
- | `disabled` | public | `boolean` | `false` | Disables all formElements in group | DisabledMixin |
231
- | `focused` | public | `boolean` | `false` | True when any of the children is focused. | FormGroupMixin |
232
- | `__descriptionElementsInParentChain` | protected | | `new Set()` | | FormGroupMixin |
233
- | `__pendingValues` | protected | `{modelValue?:{[key:string]: any}, serializedValue?:{[key:string]: any}}` | `{ modelValue: {}, serializedValue: {} }` | | FormGroupMixin |
234
- | `label` | public | `string` | `''` | The label text for the input node.&#xA;When no value is defined, textContent of \[slot=label] will be used | FormControlMixin |
235
- | `helpText` | public | `string` | `''` | The helpt text for the input node.&#xA;When no value is defined, textContent of \[slot=help-text] will be used | FormControlMixin |
236
- | `fieldName` | public | `string` | | Will be used in validation messages to refer to the current field | FormControlMixin |
237
- | `_labelNode` | protected | | | Element where label will be rendered to | FormControlMixin |
238
- | `_helpTextNode` | protected | | | Element where help text will be rendered to | FormControlMixin |
239
- | `_feedbackNode` | protected | | | Element where validation feedback will be rendered to | FormControlMixin |
240
- | `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) | FormControlMixin |
241
- | `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
242
- | `_inputId` | protected | `string` | | Unique id that can be used in all light dom | FormControlMixin |
243
- | `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
244
- | `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
245
- | `_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. | FormControlMixin |
246
- | `_requestedToBeDisabled` | protected | `boolean` | `false` | | DisabledMixin |
192
+ | Name | Privacy | Type | Default | Description | Inherited From |
193
+ | ------------------------------------ | --------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
194
+ | `multipleChoice` | public | `boolean` | `true` | When false (default), modelValue and serializedValue will reflect the&#xA;currently selected choice (usually a string). When true, modelValue will and&#xA;serializedValue will be an array of strings. | ChoiceGroupMixin |
195
+ | `modelValue` | public | | | Object keyed by formElements names, containing formElements' modelValues | FormControlMixin |
196
+ | `serializedValue` | public | | | Object keyed by formElements names, containing formElements' serializedValues | FormGroupMixin |
197
+ | `formattedValue` | public | | | Object keyed by formElements names, containing formElements' formattedValues | FormGroupMixin |
198
+ | `operationMode` | public | `OperationMode` | | Types of input interaction of the FormControl (for instance 'enter'\|'select'\|'upload') | ValidateMixin |
199
+ | `_repropagationRole` | public | `'child'\|'choice-group'\|'fieldset'` | `'choice-group'` | Based on the role, details of handling model-value-changed repropagation differ. | FormControlMixin |
200
+ | `formElements` | public | `FormControlsCollection` | `new FormControlsCollection()` | Closely mimics the natively supported HTMLFormControlsCollection. It can be accessed&#xA;both like an array and an object (based on control/element names). | FormRegistrarMixin |
201
+ | `_isFormOrFieldset` | protected | `boolean` | `false` | Flag that determines how ".formElements" should behave.&#xA;For a regular fieldset (see LionFieldset) we expect ".formElements"&#xA;to be accessible as an object.&#xA;In case of a radio-group, a checkbox-group or a select/listbox,&#xA;it should act like an array (see ChoiceGroupMixin).&#xA;Usually, when false, we deal with a choice-group (radio-group, checkbox-group,&#xA;(multi)select) | FormRegistrarMixin |
202
+ | `initComplete` | public | `Promise<any>` | `new Promise((resolve, reject) => { this.__resolveInitComplete = resolve; this.__rejectInitComplete = reject; })` | initComplete resolves after all pending initialization logic&#xA;(for instance \`\<form-group .serializedValue=${{ child1: 'a', child2: 'b' }}>\`)&#xA;is executed | FormRegistrarMixin |
203
+ | `registrationComplete` | public | `Promise<any> & {done?:boolean}` | `new Promise((resolve, reject) => { this.__resolveRegistrationComplete = resolve; this.__rejectRegistrationComplete = reject; })` | registrationComplete waits for all children formElements to have registered | FormRegistrarMixin |
204
+ | `done` | public | `boolean` | `false` | | FormRegistrarMixin |
205
+ | `_allValidators` | protected | `Validator[]` | | Combination of validators provided by Application Developer and the default validators | ValidateMixin |
206
+ | `_feedbackConditionMeta` | protected | | | Allows Subclassers to add meta info for feedbackCondition | ValidateMixin |
207
+ | `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. | ValidateMixin |
208
+ | `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"]\` | ValidateMixin |
209
+ | `validationStates` | public | `ValidationStates` | `{}` | The outcome of a validation 'round'. Keyed by ValidationType and Validator name | ValidateMixin |
210
+ | `isPending` | public | `boolean` | `false` | Flag indicating whether async validation is pending.&#xA;Creates attribute \[is-pending] as a styling hook | ValidateMixin |
211
+ | `validators` | public | `Validator[]` | `[]` | Used by Application Developers to add Validators to a FormControl. | ValidateMixin |
212
+ | `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. | ValidateMixin |
213
+ | `_visibleMessagesAmount` | protected | `number` | `1` | The amount of feedback messages that will visible in LionValidationFeedback | ValidateMixin |
214
+ | `touched` | public | `boolean` | `false` | True when user has focused and left(blurred) the field. | FormGroupMixin |
215
+ | `dirty` | public | `boolean` | `false` | True when user has changed the value of the field. | FormGroupMixin |
216
+ | `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. | FormGroupMixin |
217
+ | `filled` | public | `boolean` | `false` | True when the modelValue is non-empty (see \_isEmpty in FormControlMixin) | InteractionStateMixin |
218
+ | `_leaveEvent` | protected | `string` | `'blur'` | The event that triggers the touched state | InteractionStateMixin |
219
+ | `_valueChangedEvent` | protected | `string` | `'model-value-changed'` | The event that triggers the dirty state | InteractionStateMixin |
220
+ | `submitted` | public | `boolean` | `false` | True when parent form is submitted | FormGroupMixin |
221
+ | `_inputNode` | protected | | | The host element with role group (or radio-group or form) containing necessary aria attributes | FormControlMixin |
222
+ | `_initialModelValue` | protected | | | Gathers initial model values of all children. Used when resetGroup() is called. | FormGroupMixin |
223
+ | `value` | public | `string` | `''` | | FormGroupMixin |
224
+ | `disabled` | public | `boolean` | `false` | Disables all formElements in group | DisabledMixin |
225
+ | `focused` | public | `boolean` | `false` | True when any of the children is focused. | FormGroupMixin |
226
+ | `__descriptionElementsInParentChain` | protected | | `new Set()` | | FormGroupMixin |
227
+ | `__pendingValues` | protected | `{modelValue?:{[key:string]: any}, serializedValue?:{[key:string]: any}}` | `{ modelValue: {}, serializedValue: {} }` | | FormGroupMixin |
228
+ | `label` | public | `string` | `''` | The label text for the input node.&#xA;When no value is defined, textContent of \[slot=label] will be used | FormControlMixin |
229
+ | `helpText` | public | `string` | `''` | The helpt text for the input node.&#xA;When no value is defined, textContent of \[slot=help-text] will be used | FormControlMixin |
230
+ | `fieldName` | public | `string` | | Will be used in validation messages to refer to the current field | FormControlMixin |
231
+ | `_labelNode` | protected | | | Element where label will be rendered to | FormControlMixin |
232
+ | `_helpTextNode` | protected | | | Element where help text will be rendered to | FormControlMixin |
233
+ | `_feedbackNode` | protected | | | Element where validation feedback will be rendered to | FormControlMixin |
234
+ | `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) | FormControlMixin |
235
+ | `labelSrOnly` | public | `boolean` | `false` | The label will only be visible for srceen readers when true | FormControlMixin |
236
+ | `_inputId` | protected | `string` | | Unique id that can be used in all light dom | FormControlMixin |
237
+ | `_ariaLabelledNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-labelledby of \`.\_inputNode\` | FormControlMixin |
238
+ | `_ariaDescribedNodes` | public | `HTMLElement[]` | `[]` | Contains all elements that should end up in aria-describedby of \`.\_inputNode\` | FormControlMixin |
239
+ | `_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. | FormControlMixin |
240
+ | `_requestedToBeDisabled` | protected | `boolean` | `false` | | DisabledMixin |
247
241
 
248
242
  ### Methods
249
243
 
@@ -13,17 +13,17 @@ import '@lion/ui/define/lion-checkbox.js';
13
13
 
14
14
  ```html preview-story
15
15
  <lion-checkbox-group name="scientists[]" label="Favorite scientists">
16
- <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
17
- <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
18
- <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
16
+ <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
17
+ <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
18
+ <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
19
19
  </lion-checkbox-group>
20
20
  ```
21
21
 
22
- > Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/b15d2aae1a8d40d3551822279e1a650633dba428/docs/components/form/overview.md)'s serialization result.
22
+ > Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/components/form/overview.md)'s serialization result.
23
23
 
24
24
  ## Features
25
25
 
26
- Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/b15d2aae1a8d40d3551822279e1a650633dba428/docs/components/fieldset/overview.md),
26
+ Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/components/fieldset/overview.md),
27
27
  it has all the features a fieldset has.
28
28
 
29
29
  ## Installation
@@ -35,9 +35,9 @@ Our recommendation would be to set the `name` attribute only on the `lion-checkb
35
35
  name="scientists[]"
36
36
  label="Favorite scientists"
37
37
  >
38
- <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
39
- <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
40
- <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
38
+ <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
39
+ <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
40
+ <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
41
41
  </lion-checkbox-group>
42
42
  ```
43
43
 
@@ -47,9 +47,9 @@ You can pre-select options by targeting the `modelValue` object of the option an
47
47
 
48
48
  ```html preview-story
49
49
  <lion-checkbox-group name="scientists" label="Favorite scientists">
50
- <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
51
- <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'} checked></lion-checkbox>
52
- <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
50
+ <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
51
+ <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}" checked></lion-checkbox>
52
+ <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
53
53
  </lion-checkbox-group>
54
54
  ```
55
55
 
@@ -59,9 +59,9 @@ You can disable the entire group by setting the `disabled` attribute on the `<li
59
59
 
60
60
  ```html preview-story
61
61
  <lion-checkbox-group name="scientists[]" label="Favorite scientists" disabled>
62
- <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
63
- <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
64
- <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
62
+ <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
63
+ <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
64
+ <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
65
65
  </lion-checkbox-group>
66
66
  ```
67
67
 
@@ -71,17 +71,17 @@ You can use `slot="label"` instead of the `label` attribute for defining more co
71
71
 
72
72
  ```html preview-story
73
73
  <lion-checkbox-group name="scientists[]" label="Favorite scientists">
74
- <lion-checkbox .choiceValue=${'Archimedes'}>
74
+ <lion-checkbox .choiceValue="${'Archimedes'}">
75
75
  <label slot="label"
76
76
  ><a href="https://wikipedia.org/wiki/Archimedes" target="_blank">Archimedes</a></label
77
77
  >
78
78
  </lion-checkbox>
79
- <lion-checkbox .choiceValue=${'Francis Bacon'}>
79
+ <lion-checkbox .choiceValue="${'Francis Bacon'}">
80
80
  <label slot="label"
81
81
  ><a href="https://wikipedia.org/wiki/Francis_Bacon" target="_blank">Francis Bacon</a></label
82
82
  >
83
83
  </lion-checkbox>
84
- <lion-checkbox .choiceValue=${'Marie Curie'}>
84
+ <lion-checkbox .choiceValue="${'Marie Curie'}">
85
85
  <label slot="label"
86
86
  ><a href="https://wikipedia.org/wiki/Marie_Curie" target="_blank">Marie Curie</a></label
87
87
  >
@@ -97,17 +97,17 @@ You can add help text on each checkbox with `help-text` attribute on the `<lion-
97
97
  <lion-checkbox-group name="scientists[]" label="Favorite scientists">
98
98
  <lion-checkbox
99
99
  label="Archimedes"
100
- .choiceValue=${'Archimedes'}
100
+ .choiceValue="${'Archimedes'}"
101
101
  help-text="Archimedes of Syracuse was a Greek mathematician, physicist, engineer, inventor, and astronomer"
102
102
  ></lion-checkbox>
103
103
  <lion-checkbox
104
104
  label="Francis Bacon"
105
- .choiceValue=${'Francis Bacon'}
105
+ .choiceValue="${'Francis Bacon'}"
106
106
  help-text="Francis Bacon, 1st Viscount St Alban also known as Lord Verulam, was an English philosopher and statesman who served as Attorney General and as Lord Chancellor of England"
107
107
  ></lion-checkbox>
108
108
  <lion-checkbox
109
109
  label="Marie Curie"
110
- .choiceValue=${'Marie Curie'}
110
+ .choiceValue="${'Marie Curie'}"
111
111
  help-text="Marie Skłodowska Curie born Maria Salomea Skłodowska, was a Polish and naturalized-French physicist and chemist who conducted pioneering research on radioactivity"
112
112
  ></lion-checkbox>
113
113
  </lion-checkbox-group>
@@ -129,9 +129,9 @@ export const event = ({ shadowRoot }) => html`
129
129
  4,
130
130
  ))}
131
131
  >
132
- <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
133
- <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
134
- <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
132
+ <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
133
+ <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
134
+ <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
135
135
  </lion-checkbox-group>
136
136
  <br />
137
137
  <span>Selected scientists: <strong id="selectedDinosaur">N/A</strong></span>
@@ -147,22 +147,22 @@ A `checkbox-indeterminate`'s value is neither true nor false, but is instead ind
147
147
  <lion-checkbox-indeterminate label="Old Greek scientists">
148
148
  <lion-checkbox
149
149
  label="Archimedes"
150
- .choiceValue=${'Archimedes'}
150
+ .choiceValue="${'Archimedes'}"
151
151
  ></lion-checkbox>
152
- <lion-checkbox label="Plato" .choiceValue=${'Plato'}></lion-checkbox>
152
+ <lion-checkbox label="Plato" .choiceValue="${'Plato'}"></lion-checkbox>
153
153
  <lion-checkbox
154
154
  label="Pythagoras"
155
- .choiceValue=${'Pythagoras'}
155
+ .choiceValue="${'Pythagoras'}"
156
156
  ></lion-checkbox>
157
157
  </lion-checkbox-indeterminate>
158
158
  <lion-checkbox-indeterminate label="17th Century scientists">
159
159
  <lion-checkbox
160
160
  label="Isaac Newton"
161
- .choiceValue=${'Isaac Newton'}
161
+ .choiceValue="${'Isaac Newton'}"
162
162
  ></lion-checkbox>
163
163
  <lion-checkbox
164
164
  label="Galileo Galilei"
165
- .choiceValue=${'Galileo Galilei'}
165
+ .choiceValue="${'Galileo Galilei'}"
166
166
  ></lion-checkbox>
167
167
  </lion-checkbox-indeterminate>
168
168
  </lion-checkbox-group>
@@ -175,21 +175,21 @@ The `checkbox-indeterminate` can have another `checkbox-indeterminate` as a chil
175
175
  <lion-checkbox-indeterminate label="Scientists">
176
176
  <lion-checkbox
177
177
  label="Isaac Newton"
178
- .choiceValue=${'Isaac Newton'}
178
+ .choiceValue="${'Isaac Newton'}"
179
179
  ></lion-checkbox>
180
180
  <lion-checkbox
181
181
  label="Galileo Galilei"
182
- .choiceValue=${'Galileo Galilei'}
182
+ .choiceValue="${'Galileo Galilei'}"
183
183
  ></lion-checkbox>
184
184
  <lion-checkbox-indeterminate label="Old Greek scientists">
185
185
  <lion-checkbox
186
186
  label="Archimedes"
187
- .choiceValue=${'Archimedes'}
187
+ .choiceValue="${'Archimedes'}"
188
188
  ></lion-checkbox>
189
- <lion-checkbox label="Plato" .choiceValue=${'Plato'}></lion-checkbox>
189
+ <lion-checkbox label="Plato" .choiceValue="${'Plato'}"></lion-checkbox>
190
190
  <lion-checkbox
191
191
  label="Pythagoras"
192
- .choiceValue=${'Pythagoras'}
192
+ .choiceValue="${'Pythagoras'}"
193
193
  ></lion-checkbox>
194
194
  </lion-checkbox-indeterminate>
195
195
  </lion-checkbox-indeterminate>
@@ -203,21 +203,21 @@ You can also use `mixed-state` attribute so your indeterminate checkbox toggles
203
203
  <lion-checkbox-indeterminate mixed-state label="Scientists">
204
204
  <lion-checkbox
205
205
  label="Isaac Newton"
206
- .choiceValue=${'Isaac Newton'}
206
+ .choiceValue="${'Isaac Newton'}"
207
207
  ></lion-checkbox>
208
208
  <lion-checkbox
209
209
  label="Galileo Galilei"
210
- .choiceValue=${'Galileo Galilei'}
210
+ .choiceValue="${'Galileo Galilei'}"
211
211
  ></lion-checkbox>
212
212
  <lion-checkbox-indeterminate mixed-state label="Old Greek scientists">
213
213
  <lion-checkbox
214
214
  label="Archimedes"
215
- .choiceValue=${'Archimedes'}
215
+ .choiceValue="${'Archimedes'}"
216
216
  ></lion-checkbox>
217
- <lion-checkbox label="Plato" .choiceValue=${'Plato'}></lion-checkbox>
217
+ <lion-checkbox label="Plato" .choiceValue="${'Plato'}"></lion-checkbox>
218
218
  <lion-checkbox
219
219
  label="Pythagoras"
220
- .choiceValue=${'Pythagoras'}
220
+ .choiceValue="${'Pythagoras'}"
221
221
  ></lion-checkbox>
222
222
  </lion-checkbox-indeterminate>
223
223
  </lion-checkbox-indeterminate>
@@ -22,7 +22,7 @@ export const main = () => html`
22
22
  ## Features
23
23
 
24
24
  - Use `opened` attribute or `toggle()` method to render default open.
25
- - `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/b15d2aae1a8d40d3551822279e1a650633dba428/docs/components/button/overview.md) or native `button` with custom styling.
25
+ - `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/a59d362cc1228fc855b426440f4bed3bd21d594b/docs/components/button/overview.md) or native `button` with custom styling.
26
26
  - Observe the state with the help of `@opened-changed` event.
27
27
  - `show()` and `hide()` are helper methods to hide or show the content from outside.
28
28
 
@@ -39,13 +39,13 @@ export const methods = ({ shadowRoot }) => html`
39
39
  </div>
40
40
  </lion-collapsible>
41
41
  <section style="margin-top:16px">
42
- <button @click=${() => shadowRoot.querySelector('#car-collapsible').toggle()}>
42
+ <button @click="${() => shadowRoot.querySelector('#car-collapsible').toggle()}">
43
43
  Toggle content
44
44
  </button>
45
- <button @click=${() => shadowRoot.querySelector('#car-collapsible').show()}>
45
+ <button @click="${() => shadowRoot.querySelector('#car-collapsible').show()}">
46
46
  Show content
47
47
  </button>
48
- <button @click=${() => shadowRoot.querySelector('#car-collapsible').hide()}>
48
+ <button @click="${() => shadowRoot.querySelector('#car-collapsible').hide()}">
49
49
  Hide content
50
50
  </button>
51
51
  </section>