@lion/ui 0.25.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (771) hide show
  1. package/README.md +25 -7
  2. package/accordion-test-suites.js +2 -0
  3. package/collapsible-test-suites.js +1 -0
  4. package/combobox-test-suites.js +2 -0
  5. package/components/accordion/test/lion-accordion.test.js +2 -565
  6. package/components/accordion/test-suites/lion-accordion.suite.js +596 -0
  7. package/components/button/test-suites/LionButton.suite.js +13 -11
  8. package/components/button/test-suites/LionButtonReset.suite.js +11 -3
  9. package/components/button/test-suites/LionButtonSubmit.suite.js +11 -3
  10. package/components/calendar/test/lion-calendar.test.js +1 -1570
  11. package/components/calendar/test-suites/LionCalendar.suite.js +1617 -5
  12. package/components/checkbox-group/test/lion-checkbox-group-integrations.test.js +5 -2
  13. package/components/checkbox-group/test/lion-checkbox-indeterminate-integrations.test.js +13 -4
  14. package/components/checkbox-group/test/lion-checkbox-integrations.test.js +4 -1
  15. package/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.js +54 -54
  16. package/components/collapsible/test/lion-collapsible.test.js +2 -126
  17. package/components/collapsible/test-suites/LionCollapsible.suite.js +147 -0
  18. package/components/combobox/test/lion-combobox-integrations.test.js +11 -4
  19. package/components/combobox/test/lion-combobox.test.js +2 -3622
  20. package/components/combobox/test-suites/lion-combobox.suite.js +3665 -0
  21. package/components/core/src/ScopedElementsMixin.js +16 -1
  22. package/components/core/test-helpers/isElementVisible.js +21 -0
  23. package/components/core/test-helpers/resolveSuiteTag.js +97 -0
  24. package/components/core/types/TestSuiteTypes.ts +43 -0
  25. package/components/dialog/test/lion-dialog.integration.test.js +9 -10
  26. package/components/dialog/test/lion-dialog.test.js +2 -399
  27. package/components/dialog/test-suites/lion-dialog.suite.js +412 -0
  28. package/components/drawer/test/lion-drawer.test.js +2 -84
  29. package/components/drawer/test-suites/LionDrawer.suite.js +108 -0
  30. package/components/fieldset/test/lion-fieldset.test.js +7 -2
  31. package/components/form/test/lion-form.test.js +2 -348
  32. package/components/form/test-suites/lion-form.suite.js +398 -0
  33. package/components/form-core/test/FormatMixin.test.js +4 -1
  34. package/components/form-core/test/choice-group/CustomChoiceGroupMixin.integrations.test.js +13 -0
  35. package/components/form-core/test-suites/FormRegistrationMixins.suite.js +21 -26
  36. package/components/form-core/test-suites/FormatMixin.suite.js +45 -43
  37. package/components/form-core/test-suites/InteractionStateMixin.suite.js +19 -15
  38. package/components/form-core/test-suites/NativeTextFieldMixin.suite.js +8 -9
  39. package/components/form-core/test-suites/ValidateMixin.suite.js +14 -10
  40. package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +15 -2
  41. package/components/form-core/test-suites/choice-group/ChoiceGroupMixin.suite.js +55 -33
  42. package/components/form-core/test-suites/choice-group/ChoiceInputMixin.suite.js +7 -6
  43. package/components/form-core/test-suites/choice-group/CustomChoiceGroupMixin.suite.js +19 -22
  44. package/components/form-core/test-suites/form-group/FormGroupMixin-input.suite.js +14 -5
  45. package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +13 -4
  46. package/components/icon/test/lion-icon.test.js +2 -188
  47. package/components/icon/test-suites/lion-icon.suite.js +206 -0
  48. package/components/input/test/input-integrations.test.js +18 -15
  49. package/components/input/test/lion-input-integrations.test.js +7 -3
  50. package/components/input/test/lion-input.test.js +2 -198
  51. package/components/input/test-suites/lion-input.suite.js +214 -0
  52. package/components/input-amount/src/parsers.js +5 -1
  53. package/components/input-amount/test/lion-input-amount-integrations.test.js +7 -3
  54. package/components/input-amount/test/lion-input-amount.test.js +2 -421
  55. package/components/input-amount/test/parsers.test.js +12 -0
  56. package/components/input-amount/test-suites/lion-input-amount.suite.js +418 -0
  57. package/components/input-amount-dropdown/test/LionInputAmountDropdown.test.js +3 -2
  58. package/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.js +4 -2
  59. package/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.js +6 -4
  60. package/components/input-date/test/lion-input-date-integrations.test.js +7 -3
  61. package/components/input-date/test/lion-input-date.test.js +2 -177
  62. package/components/input-date/test-suites/lion-input-date.suite.js +195 -0
  63. package/components/input-datepicker/test/lion-input-datepicker-integrations.test.js +7 -3
  64. package/components/input-datepicker/test/lion-input-datepicker.test.js +1 -844
  65. package/components/input-datepicker/test-helpers/DatepickerInputObject.js +26 -0
  66. package/components/input-datepicker/test-suites/LionInputDatepicker.suite.js +899 -14
  67. package/components/input-email/test/lion-input-email-integrations.test.js +4 -2
  68. package/components/input-email/test/lion-input-email.test.js +2 -46
  69. package/components/input-email/test-suites/lion-input-email.suite.js +63 -0
  70. package/components/input-file/test/lion-input-file.test.js +2 -1274
  71. package/components/input-file/test-suites/lion-input-file.suite.js +1505 -0
  72. package/components/input-iban/test/lion-input-iban-integrations.test.js +4 -2
  73. package/components/input-iban/test/lion-input-iban.test.js +2 -73
  74. package/components/input-iban/test-suites/lion-input-iban.suite.js +88 -0
  75. package/components/input-range/test/lion-input-range.test.js +2 -176
  76. package/components/input-range/test-suites/lion-input-range.suite.js +195 -0
  77. package/components/input-stepper/test-suites/lion-input-stepper.integration.suite.js +14 -3
  78. package/components/input-stepper/test-suites/lion-input-stepper.suite.js +14 -10
  79. package/components/input-tel/test/LionInputTel.test.js +3 -1
  80. package/components/input-tel/test-suites/LionInputTel.suite.js +9 -4
  81. package/components/input-tel-dropdown/test/LionInputTelDropdown.test.js +6 -4
  82. package/components/input-tel-dropdown/test-suites/LionInputTelDropdown--parentheses.suite.js +10 -13
  83. package/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.js +6 -5
  84. package/components/listbox/test-suites/ListboxMixin.suite.js +19 -19
  85. package/components/menu/test-suites/InteractiveListMixin.suite.js +6 -9
  86. package/components/menu/test-suites/LionMenu.suite.js +6 -10
  87. package/components/menu/test-suites/LionMenuInteractions.suite.js +13 -4
  88. package/components/menu/test-suites/MoreButtonMenuMixin.suite.js +6 -9
  89. package/components/menu/test-suites/MultiLevelListMixin.suite.js +15 -11
  90. package/components/overlays/test/OverlayController.test.js +6 -1
  91. package/components/overlays/test-suites/OverlayMixin.suite.js +3 -5
  92. package/components/pagination/test/lion-pagination.test.js +2 -176
  93. package/components/pagination/test-suites/LionPagination.suite.js +201 -0
  94. package/components/progress-indicator/test/lion-progress-indicator.test.js +2 -203
  95. package/components/progress-indicator/test-suites/lion-progress-indicator.suite.js +214 -0
  96. package/components/radio-group/test/lion-radio-group.test.js +2 -162
  97. package/components/radio-group/test/lion-radio.test.js +2 -54
  98. package/components/radio-group/test-suites/lion-radio-group.suite.js +173 -0
  99. package/components/radio-group/test-suites/lion-radio.suite.js +70 -0
  100. package/components/select/test/lion-select.test.js +2 -79
  101. package/components/select/test-suites/LionSelect.suite.js +94 -0
  102. package/components/select-rich/test/lion-select-invoker.test.js +2 -86
  103. package/components/select-rich/test/lion-select-rich-interaction.test.js +2 -430
  104. package/components/select-rich/test/lion-select-rich.test.js +2 -1193
  105. package/components/select-rich/test-suites/lion-select-invoker.suite.js +98 -0
  106. package/components/select-rich/test-suites/lion-select-rich-interaction.suite.js +452 -0
  107. package/components/select-rich/test-suites/lion-select-rich.suite.js +1236 -0
  108. package/components/steps/test/lion-step.test.js +2 -97
  109. package/components/steps/test/lion-steps.test.js +2 -433
  110. package/components/steps/test-suites/lion-step.suite.js +113 -0
  111. package/components/steps/test-suites/lion-steps.suite.js +445 -0
  112. package/components/switch/test/lion-switch.test.js +2 -232
  113. package/components/switch/test-suites/lion-switch.suite.js +450 -0
  114. package/components/tabs/test/lion-tabs.test.js +2 -596
  115. package/components/tabs/test-suites/lion-tabs.suite.js +617 -0
  116. package/components/textarea/src/LionTextarea.js +5 -2
  117. package/components/textarea/test/lion-textarea.test.js +2 -159
  118. package/components/textarea/test-suites/lion-textarea.suite.js +192 -0
  119. package/components/tooltip/test/lion-tooltip.test.js +2 -393
  120. package/components/tooltip/test-suites/lion-tooltip.suite.js +409 -0
  121. package/custom-elements.json +14855 -10161
  122. package/dialog-test-suites.js +2 -0
  123. package/dist-types/components/accordion/test/lion-accordion.test.d.ts +1 -2
  124. package/dist-types/components/accordion/test/lion-accordion.test.d.ts.map +1 -1
  125. package/dist-types/components/accordion/test-suites/lion-accordion.suite.d.ts +18 -0
  126. package/dist-types/components/accordion/test-suites/lion-accordion.suite.d.ts.map +1 -0
  127. package/dist-types/components/button/test-suites/LionButton.suite.d.ts +10 -4
  128. package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
  129. package/dist-types/components/button/test-suites/LionButtonReset.suite.d.ts +10 -4
  130. package/dist-types/components/button/test-suites/LionButtonReset.suite.d.ts.map +1 -1
  131. package/dist-types/components/button/test-suites/LionButtonSubmit.suite.d.ts +10 -4
  132. package/dist-types/components/button/test-suites/LionButtonSubmit.suite.d.ts.map +1 -1
  133. package/dist-types/components/calendar/test/lion-calendar.test.d.ts +1 -3
  134. package/dist-types/components/calendar/test/lion-calendar.test.d.ts.map +1 -1
  135. package/dist-types/components/calendar/test-suites/LionCalendar.suite.d.ts +13 -4
  136. package/dist-types/components/calendar/test-suites/LionCalendar.suite.d.ts.map +1 -1
  137. package/dist-types/components/checkbox-group/test/lion-checkbox-group-integrations.test.d.ts.map +1 -1
  138. package/dist-types/components/checkbox-group/test/lion-checkbox-integrations.test.d.ts.map +1 -1
  139. package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts +12 -9
  140. package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts.map +1 -1
  141. package/dist-types/components/collapsible/test/lion-collapsible.test.d.ts +1 -3
  142. package/dist-types/components/collapsible/test/lion-collapsible.test.d.ts.map +1 -1
  143. package/dist-types/components/collapsible/test-suites/LionCollapsible.suite.d.ts +18 -0
  144. package/dist-types/components/collapsible/test-suites/LionCollapsible.suite.d.ts.map +1 -0
  145. package/dist-types/components/combobox/test/lion-combobox.test.d.ts +1 -5
  146. package/dist-types/components/combobox/test/lion-combobox.test.d.ts.map +1 -1
  147. package/dist-types/components/combobox/test-suites/lion-combobox.suite.d.ts +17 -0
  148. package/dist-types/components/combobox/test-suites/lion-combobox.suite.d.ts.map +1 -0
  149. package/dist-types/components/core/src/ScopedElementsMixin.d.ts.map +1 -1
  150. package/dist-types/components/core/test-helpers/isElementVisible.d.ts +12 -0
  151. package/dist-types/components/core/test-helpers/isElementVisible.d.ts.map +1 -0
  152. package/dist-types/components/core/test-helpers/resolveSuiteTag.d.ts +29 -0
  153. package/dist-types/components/core/test-helpers/resolveSuiteTag.d.ts.map +1 -0
  154. package/dist-types/components/core/types/TestSuiteTypes.d.ts +40 -0
  155. package/dist-types/components/core/types/TestSuiteTypes.d.ts.map +1 -0
  156. package/dist-types/components/dialog/test/lion-dialog.integration.test.d.ts.map +1 -1
  157. package/dist-types/components/dialog/test/lion-dialog.test.d.ts +1 -5
  158. package/dist-types/components/dialog/test/lion-dialog.test.d.ts.map +1 -1
  159. package/dist-types/components/dialog/test-suites/lion-dialog.suite.d.ts +19 -0
  160. package/dist-types/components/dialog/test-suites/lion-dialog.suite.d.ts.map +1 -0
  161. package/dist-types/components/drawer/test/lion-drawer.test.d.ts +1 -3
  162. package/dist-types/components/drawer/test/lion-drawer.test.d.ts.map +1 -1
  163. package/dist-types/components/drawer/test-suites/LionDrawer.suite.d.ts +20 -0
  164. package/dist-types/components/drawer/test-suites/LionDrawer.suite.d.ts.map +1 -0
  165. package/dist-types/components/fieldset/test/lion-fieldset.test.d.ts.map +1 -1
  166. package/dist-types/components/form/test/lion-form.test.d.ts +1 -12
  167. package/dist-types/components/form/test/lion-form.test.d.ts.map +1 -1
  168. package/dist-types/components/form/test-suites/lion-form.suite.d.ts +39 -0
  169. package/dist-types/components/form/test-suites/lion-form.suite.d.ts.map +1 -0
  170. package/dist-types/components/form-core/test-suites/FormRegistrationMixins.suite.d.ts +14 -17
  171. package/dist-types/components/form-core/test-suites/FormRegistrationMixins.suite.d.ts.map +1 -1
  172. package/dist-types/components/form-core/test-suites/FormatMixin.suite.d.ts +22 -38
  173. package/dist-types/components/form-core/test-suites/FormatMixin.suite.d.ts.map +1 -1
  174. package/dist-types/components/form-core/test-suites/InteractionStateMixin.suite.d.ts +11 -5
  175. package/dist-types/components/form-core/test-suites/InteractionStateMixin.suite.d.ts.map +1 -1
  176. package/dist-types/components/form-core/test-suites/NativeTextFieldMixin.suite.d.ts +9 -4
  177. package/dist-types/components/form-core/test-suites/NativeTextFieldMixin.suite.d.ts.map +1 -1
  178. package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts +9 -4
  179. package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts.map +1 -1
  180. package/dist-types/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.d.ts +10 -1
  181. package/dist-types/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.d.ts.map +1 -1
  182. package/dist-types/components/form-core/test-suites/choice-group/ChoiceGroupMixin.suite.d.ts +17 -6
  183. package/dist-types/components/form-core/test-suites/choice-group/ChoiceGroupMixin.suite.d.ts.map +1 -1
  184. package/dist-types/components/form-core/test-suites/choice-group/ChoiceInputMixin.suite.d.ts +5 -2
  185. package/dist-types/components/form-core/test-suites/choice-group/ChoiceInputMixin.suite.d.ts.map +1 -1
  186. package/dist-types/components/form-core/test-suites/choice-group/CustomChoiceGroupMixin.suite.d.ts +10 -5
  187. package/dist-types/components/form-core/test-suites/choice-group/CustomChoiceGroupMixin.suite.d.ts.map +1 -1
  188. package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin-input.suite.d.ts +10 -5
  189. package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin-input.suite.d.ts.map +1 -1
  190. package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin.suite.d.ts +10 -5
  191. package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin.suite.d.ts.map +1 -1
  192. package/dist-types/components/icon/test/lion-icon.test.d.ts +1 -4
  193. package/dist-types/components/icon/test/lion-icon.test.d.ts.map +1 -1
  194. package/dist-types/components/icon/test-suites/lion-icon.suite.d.ts +16 -0
  195. package/dist-types/components/icon/test-suites/lion-icon.suite.d.ts.map +1 -0
  196. package/dist-types/components/input/test/lion-input-integrations.test.d.ts.map +1 -1
  197. package/dist-types/components/input/test/lion-input.test.d.ts +1 -2
  198. package/dist-types/components/input/test/lion-input.test.d.ts.map +1 -1
  199. package/dist-types/components/input/test-suites/lion-input.suite.d.ts +17 -0
  200. package/dist-types/components/input/test-suites/lion-input.suite.d.ts.map +1 -0
  201. package/dist-types/components/input-amount/src/parsers.d.ts.map +1 -1
  202. package/dist-types/components/input-amount/test/lion-input-amount-integrations.test.d.ts.map +1 -1
  203. package/dist-types/components/input-amount/test/lion-input-amount.test.d.ts +1 -2
  204. package/dist-types/components/input-amount/test/lion-input-amount.test.d.ts.map +1 -1
  205. package/dist-types/components/input-amount/test-suites/lion-input-amount.suite.d.ts +19 -0
  206. package/dist-types/components/input-amount/test-suites/lion-input-amount.suite.d.ts.map +1 -0
  207. package/dist-types/components/input-amount-dropdown/test/lion-input-amount-dropdown-integrations.test.d.ts.map +1 -1
  208. package/dist-types/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.d.ts +7 -3
  209. package/dist-types/components/input-amount-dropdown/test-suites/LionInputAmountDropdown.suite.d.ts.map +1 -1
  210. package/dist-types/components/input-date/test/lion-input-date-integrations.test.d.ts.map +1 -1
  211. package/dist-types/components/input-date/test/lion-input-date.test.d.ts +1 -3
  212. package/dist-types/components/input-date/test/lion-input-date.test.d.ts.map +1 -1
  213. package/dist-types/components/input-date/test-suites/lion-input-date.suite.d.ts +15 -0
  214. package/dist-types/components/input-date/test-suites/lion-input-date.suite.d.ts.map +1 -0
  215. package/dist-types/components/input-datepicker/test/lion-input-datepicker-integrations.test.d.ts.map +1 -1
  216. package/dist-types/components/input-datepicker/test/lion-input-datepicker.test.d.ts +1 -2
  217. package/dist-types/components/input-datepicker/test/lion-input-datepicker.test.d.ts.map +1 -1
  218. package/dist-types/components/input-datepicker/test-helpers/DatepickerInputObject.d.ts +8 -0
  219. package/dist-types/components/input-datepicker/test-helpers/DatepickerInputObject.d.ts.map +1 -1
  220. package/dist-types/components/input-datepicker/test-suites/LionInputDatepicker.suite.d.ts +15 -5
  221. package/dist-types/components/input-datepicker/test-suites/LionInputDatepicker.suite.d.ts.map +1 -1
  222. package/dist-types/components/input-email/test/lion-input-email-integrations.test.d.ts.map +1 -1
  223. package/dist-types/components/input-email/test/lion-input-email.test.d.ts +1 -3
  224. package/dist-types/components/input-email/test/lion-input-email.test.d.ts.map +1 -1
  225. package/dist-types/components/input-email/test-suites/lion-input-email.suite.d.ts +15 -0
  226. package/dist-types/components/input-email/test-suites/lion-input-email.suite.d.ts.map +1 -0
  227. package/dist-types/components/input-file/test/lion-input-file.test.d.ts +1 -5
  228. package/dist-types/components/input-file/test/lion-input-file.test.d.ts.map +1 -1
  229. package/dist-types/components/input-file/test-suites/lion-input-file.suite.d.ts +19 -0
  230. package/dist-types/components/input-file/test-suites/lion-input-file.suite.d.ts.map +1 -0
  231. package/dist-types/components/input-iban/test/lion-input-iban-integrations.test.d.ts.map +1 -1
  232. package/dist-types/components/input-iban/test/lion-input-iban.test.d.ts +1 -3
  233. package/dist-types/components/input-iban/test/lion-input-iban.test.d.ts.map +1 -1
  234. package/dist-types/components/input-iban/test-suites/lion-input-iban.suite.d.ts +15 -0
  235. package/dist-types/components/input-iban/test-suites/lion-input-iban.suite.d.ts.map +1 -0
  236. package/dist-types/components/input-range/test/lion-input-range.test.d.ts +1 -3
  237. package/dist-types/components/input-range/test/lion-input-range.test.d.ts.map +1 -1
  238. package/dist-types/components/input-range/test-suites/lion-input-range.suite.d.ts +15 -0
  239. package/dist-types/components/input-range/test-suites/lion-input-range.suite.d.ts.map +1 -0
  240. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.integration.suite.d.ts +10 -2
  241. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.integration.suite.d.ts.map +1 -1
  242. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.suite.d.ts +10 -2
  243. package/dist-types/components/input-stepper/test-suites/lion-input-stepper.suite.d.ts.map +1 -1
  244. package/dist-types/components/input-tel/test-suites/LionInputTel.suite.d.ts +6 -4
  245. package/dist-types/components/input-tel/test-suites/LionInputTel.suite.d.ts.map +1 -1
  246. package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown--parentheses.suite.d.ts +7 -3
  247. package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown--parentheses.suite.d.ts.map +1 -1
  248. package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.d.ts +7 -3
  249. package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.d.ts.map +1 -1
  250. package/dist-types/components/listbox/test-suites/ListboxMixin.suite.d.ts +3 -4
  251. package/dist-types/components/listbox/test-suites/ListboxMixin.suite.d.ts.map +1 -1
  252. package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +6 -5
  253. package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +1 -1
  254. package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts +6 -5
  255. package/dist-types/components/menu/test-suites/LionMenu.suite.d.ts.map +1 -1
  256. package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts +10 -4
  257. package/dist-types/components/menu/test-suites/LionMenuInteractions.suite.d.ts.map +1 -1
  258. package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts +6 -5
  259. package/dist-types/components/menu/test-suites/MoreButtonMenuMixin.suite.d.ts.map +1 -1
  260. package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts +7 -6
  261. package/dist-types/components/menu/test-suites/MultiLevelListMixin.suite.d.ts.map +1 -1
  262. package/dist-types/components/overlays/test-suites/OverlayMixin.suite.d.ts.map +1 -1
  263. package/dist-types/components/pagination/test/lion-pagination.test.d.ts +1 -3
  264. package/dist-types/components/pagination/test/lion-pagination.test.d.ts.map +1 -1
  265. package/dist-types/components/pagination/test-suites/LionPagination.suite.d.ts +18 -0
  266. package/dist-types/components/pagination/test-suites/LionPagination.suite.d.ts.map +1 -0
  267. package/dist-types/components/progress-indicator/test/lion-progress-indicator.test.d.ts +1 -3
  268. package/dist-types/components/progress-indicator/test/lion-progress-indicator.test.d.ts.map +1 -1
  269. package/dist-types/components/progress-indicator/test-suites/lion-progress-indicator.suite.d.ts +15 -0
  270. package/dist-types/components/progress-indicator/test-suites/lion-progress-indicator.suite.d.ts.map +1 -0
  271. package/dist-types/components/radio-group/test/lion-radio-group.test.d.ts +1 -5
  272. package/dist-types/components/radio-group/test/lion-radio-group.test.d.ts.map +1 -1
  273. package/dist-types/components/radio-group/test/lion-radio.test.d.ts +1 -2
  274. package/dist-types/components/radio-group/test/lion-radio.test.d.ts.map +1 -1
  275. package/dist-types/components/radio-group/test-suites/lion-radio-group.suite.d.ts +19 -0
  276. package/dist-types/components/radio-group/test-suites/lion-radio-group.suite.d.ts.map +1 -0
  277. package/dist-types/components/radio-group/test-suites/lion-radio.suite.d.ts +17 -0
  278. package/dist-types/components/radio-group/test-suites/lion-radio.suite.d.ts.map +1 -0
  279. package/dist-types/components/select/test/lion-select.test.d.ts +1 -2
  280. package/dist-types/components/select/test/lion-select.test.d.ts.map +1 -1
  281. package/dist-types/components/select/test-suites/LionSelect.suite.d.ts +16 -0
  282. package/dist-types/components/select/test-suites/LionSelect.suite.d.ts.map +1 -0
  283. package/dist-types/components/select-rich/test/lion-select-invoker.test.d.ts +1 -2
  284. package/dist-types/components/select-rich/test/lion-select-invoker.test.d.ts.map +1 -1
  285. package/dist-types/components/select-rich/test/lion-select-rich-interaction.test.d.ts +1 -5
  286. package/dist-types/components/select-rich/test/lion-select-rich-interaction.test.d.ts.map +1 -1
  287. package/dist-types/components/select-rich/test/lion-select-rich.test.d.ts +1 -8
  288. package/dist-types/components/select-rich/test/lion-select-rich.test.d.ts.map +1 -1
  289. package/dist-types/components/select-rich/test-suites/lion-select-invoker.suite.d.ts +19 -0
  290. package/dist-types/components/select-rich/test-suites/lion-select-invoker.suite.d.ts.map +1 -0
  291. package/dist-types/components/select-rich/test-suites/lion-select-rich-interaction.suite.d.ts +19 -0
  292. package/dist-types/components/select-rich/test-suites/lion-select-rich-interaction.suite.d.ts.map +1 -0
  293. package/dist-types/components/select-rich/test-suites/lion-select-rich.suite.d.ts +21 -0
  294. package/dist-types/components/select-rich/test-suites/lion-select-rich.suite.d.ts.map +1 -0
  295. package/dist-types/components/steps/test/lion-step.test.d.ts +1 -2
  296. package/dist-types/components/steps/test/lion-step.test.d.ts.map +1 -1
  297. package/dist-types/components/steps/test/lion-steps.test.d.ts +1 -8
  298. package/dist-types/components/steps/test/lion-steps.test.d.ts.map +1 -1
  299. package/dist-types/components/steps/test-suites/lion-step.suite.d.ts +17 -0
  300. package/dist-types/components/steps/test-suites/lion-step.suite.d.ts.map +1 -0
  301. package/dist-types/components/steps/test-suites/lion-steps.suite.d.ts +22 -0
  302. package/dist-types/components/steps/test-suites/lion-steps.suite.d.ts.map +1 -0
  303. package/dist-types/components/switch/test/lion-switch.test.d.ts +1 -4
  304. package/dist-types/components/switch/test/lion-switch.test.d.ts.map +1 -1
  305. package/dist-types/components/switch/test-suites/lion-switch.suite.d.ts +17 -0
  306. package/dist-types/components/switch/test-suites/lion-switch.suite.d.ts.map +1 -0
  307. package/dist-types/components/tabs/test/lion-tabs.test.d.ts +1 -5
  308. package/dist-types/components/tabs/test/lion-tabs.test.d.ts.map +1 -1
  309. package/dist-types/components/tabs/test-suites/lion-tabs.suite.d.ts +17 -0
  310. package/dist-types/components/tabs/test-suites/lion-tabs.suite.d.ts.map +1 -0
  311. package/dist-types/components/textarea/src/LionTextarea.d.ts.map +1 -1
  312. package/dist-types/components/textarea/test/lion-textarea.test.d.ts +1 -3
  313. package/dist-types/components/textarea/test/lion-textarea.test.d.ts.map +1 -1
  314. package/dist-types/components/textarea/test-suites/lion-textarea.suite.d.ts +15 -0
  315. package/dist-types/components/textarea/test-suites/lion-textarea.suite.d.ts.map +1 -0
  316. package/dist-types/components/tooltip/test/lion-tooltip.test.d.ts +1 -3
  317. package/dist-types/components/tooltip/test/lion-tooltip.test.d.ts.map +1 -1
  318. package/dist-types/components/tooltip/test-suites/lion-tooltip.suite.d.ts +19 -0
  319. package/dist-types/components/tooltip/test-suites/lion-tooltip.suite.d.ts.map +1 -0
  320. package/dist-types/exports/accordion-test-suites.d.ts +2 -0
  321. package/dist-types/exports/accordion-test-suites.d.ts.map +1 -0
  322. package/dist-types/exports/collapsible-test-suites.d.ts +2 -0
  323. package/dist-types/exports/collapsible-test-suites.d.ts.map +1 -0
  324. package/dist-types/exports/combobox-test-suites.d.ts +2 -0
  325. package/dist-types/exports/combobox-test-suites.d.ts.map +1 -0
  326. package/dist-types/exports/dialog-test-suites.d.ts +2 -0
  327. package/dist-types/exports/dialog-test-suites.d.ts.map +1 -0
  328. package/dist-types/exports/drawer-test-suites.d.ts +2 -0
  329. package/dist-types/exports/drawer-test-suites.d.ts.map +1 -0
  330. package/dist-types/exports/form-test-suites.d.ts +2 -0
  331. package/dist-types/exports/form-test-suites.d.ts.map +1 -0
  332. package/dist-types/exports/icon-test-suites.d.ts +2 -0
  333. package/dist-types/exports/icon-test-suites.d.ts.map +1 -0
  334. package/dist-types/exports/input-amount-test-suites.d.ts +2 -0
  335. package/dist-types/exports/input-amount-test-suites.d.ts.map +1 -0
  336. package/dist-types/exports/input-date-test-suites.d.ts +2 -0
  337. package/dist-types/exports/input-date-test-suites.d.ts.map +1 -0
  338. package/dist-types/exports/input-email-test-suites.d.ts +2 -0
  339. package/dist-types/exports/input-email-test-suites.d.ts.map +1 -0
  340. package/dist-types/exports/input-file-test-suites.d.ts +2 -0
  341. package/dist-types/exports/input-file-test-suites.d.ts.map +1 -0
  342. package/dist-types/exports/input-iban-test-suites.d.ts +2 -0
  343. package/dist-types/exports/input-iban-test-suites.d.ts.map +1 -0
  344. package/dist-types/exports/input-range-test-suites.d.ts +2 -0
  345. package/dist-types/exports/input-range-test-suites.d.ts.map +1 -0
  346. package/dist-types/exports/input-stepper-suites.d.ts +7 -2
  347. package/dist-types/exports/input-stepper-suites.d.ts.map +1 -1
  348. package/dist-types/exports/input-test-suites.d.ts +2 -0
  349. package/dist-types/exports/input-test-suites.d.ts.map +1 -0
  350. package/dist-types/exports/menu-test-suites.d.ts.map +1 -1
  351. package/dist-types/exports/pagination-test-suites.d.ts +2 -0
  352. package/dist-types/exports/pagination-test-suites.d.ts.map +1 -0
  353. package/dist-types/exports/progress-indicator-test-suites.d.ts +2 -0
  354. package/dist-types/exports/progress-indicator-test-suites.d.ts.map +1 -0
  355. package/dist-types/exports/radio-group-test-suites.d.ts +3 -0
  356. package/dist-types/exports/radio-group-test-suites.d.ts.map +1 -0
  357. package/dist-types/exports/select-rich-test-suites.d.ts +4 -0
  358. package/dist-types/exports/select-rich-test-suites.d.ts.map +1 -0
  359. package/dist-types/exports/select-test-suites.d.ts +2 -0
  360. package/dist-types/exports/select-test-suites.d.ts.map +1 -0
  361. package/dist-types/exports/steps-test-suites.d.ts +3 -0
  362. package/dist-types/exports/steps-test-suites.d.ts.map +1 -0
  363. package/dist-types/exports/switch-test-suites.d.ts +2 -0
  364. package/dist-types/exports/switch-test-suites.d.ts.map +1 -0
  365. package/dist-types/exports/tabs-test-suites.d.ts +2 -0
  366. package/dist-types/exports/tabs-test-suites.d.ts.map +1 -0
  367. package/dist-types/exports/textarea-test-suites.d.ts +2 -0
  368. package/dist-types/exports/textarea-test-suites.d.ts.map +1 -0
  369. package/dist-types/exports/tooltip-test-suites.d.ts +2 -0
  370. package/dist-types/exports/tooltip-test-suites.d.ts.map +1 -0
  371. package/dist-types/exports/types/test-suites.d.ts +4 -0
  372. package/dist-types/exports/types/test-suites.d.ts.map +1 -0
  373. package/dist-types/tsconfig.tsbuildinfo +1 -1
  374. package/drawer-test-suites.js +1 -0
  375. package/exports/accordion-test-suites.js +2 -0
  376. package/exports/collapsible-test-suites.js +1 -0
  377. package/exports/combobox-test-suites.js +2 -0
  378. package/exports/dialog-test-suites.js +2 -0
  379. package/exports/drawer-test-suites.js +1 -0
  380. package/exports/form-test-suites.js +2 -0
  381. package/exports/icon-test-suites.js +2 -0
  382. package/exports/input-amount-test-suites.js +2 -0
  383. package/exports/input-date-test-suites.js +2 -0
  384. package/exports/input-email-test-suites.js +2 -0
  385. package/exports/input-file-test-suites.js +2 -0
  386. package/exports/input-iban-test-suites.js +2 -0
  387. package/exports/input-range-test-suites.js +2 -0
  388. package/exports/input-stepper-suites.js +18 -4
  389. package/exports/input-test-suites.js +2 -0
  390. package/exports/menu-test-suites.js +3 -0
  391. package/exports/pagination-test-suites.js +1 -0
  392. package/exports/progress-indicator-test-suites.js +2 -0
  393. package/exports/radio-group-test-suites.js +3 -0
  394. package/exports/select-rich-test-suites.js +4 -0
  395. package/exports/select-test-suites.js +1 -0
  396. package/exports/steps-test-suites.js +3 -0
  397. package/exports/switch-test-suites.js +2 -0
  398. package/exports/tabs-test-suites.js +2 -0
  399. package/exports/textarea-test-suites.js +2 -0
  400. package/exports/tooltip-test-suites.js +2 -0
  401. package/exports/types/test-suites.ts +3 -0
  402. package/form-test-suites.js +2 -0
  403. package/generated/awesome-phonenumber/provenance.json +1 -1
  404. package/icon-test-suites.js +2 -0
  405. package/input-amount-test-suites.js +2 -0
  406. package/input-date-test-suites.js +2 -0
  407. package/input-email-test-suites.js +2 -0
  408. package/input-file-test-suites.js +2 -0
  409. package/input-iban-test-suites.js +2 -0
  410. package/input-range-test-suites.js +2 -0
  411. package/input-stepper-suites.js +18 -4
  412. package/input-test-suites.js +2 -0
  413. package/menu-test-suites.js +3 -0
  414. package/package.json +4 -1
  415. package/pagination-test-suites.js +1 -0
  416. package/progress-indicator-test-suites.js +2 -0
  417. package/radio-group-test-suites.js +3 -0
  418. package/select-rich-test-suites.js +4 -0
  419. package/select-test-suites.js +1 -0
  420. package/steps-test-suites.js +3 -0
  421. package/switch-test-suites.js +2 -0
  422. package/tabs-test-suites.js +2 -0
  423. package/textarea-test-suites.js +2 -0
  424. package/tooltip-test-suites.js +2 -0
  425. package/vscode.html-custom-data.json +55 -0
  426. package/web-types.json +219 -1
  427. package/components/button/test/demos.screenshots-test.js +0 -100
  428. package/components/calendar/test/demos.screenshots-test.js +0 -118
  429. package/components/input-file/test/lion-selected-file-list.test.js +0 -199
  430. package/components/select-rich/test/demos.screenshots-test.js +0 -168
  431. package/components/switch/test/lion-switch-button.test.js +0 -204
  432. package/dist-types/components/button/test/demos.screenshots-test.d.ts +0 -2
  433. package/dist-types/components/button/test/demos.screenshots-test.d.ts.map +0 -1
  434. package/dist-types/components/calendar/test/demos.screenshots-test.d.ts +0 -2
  435. package/dist-types/components/calendar/test/demos.screenshots-test.d.ts.map +0 -1
  436. package/dist-types/components/input-file/test/lion-selected-file-list.test.d.ts +0 -5
  437. package/dist-types/components/input-file/test/lion-selected-file-list.test.d.ts.map +0 -1
  438. package/dist-types/components/select-rich/test/demos.screenshots-test.d.ts +0 -2
  439. package/dist-types/components/select-rich/test/demos.screenshots-test.d.ts.map +0 -1
  440. package/dist-types/components/switch/test/lion-switch-button.test.d.ts +0 -4
  441. package/dist-types/components/switch/test/lion-switch-button.test.d.ts.map +0 -1
  442. package/docs/components/accordion/api-table.md +0 -53
  443. package/docs/components/accordion/index.md +0 -13
  444. package/docs/components/accordion/overview.md +0 -141
  445. package/docs/components/accordion/reference.md +0 -59
  446. package/docs/components/accordion/use-cases.md +0 -303
  447. package/docs/components/button/api-table.md +0 -84
  448. package/docs/components/button/assets/bootstrap-button.js +0 -245
  449. package/docs/components/button/examples.md +0 -42
  450. package/docs/components/button/extensions.md +0 -42
  451. package/docs/components/button/index.md +0 -13
  452. package/docs/components/button/overview.md +0 -42
  453. package/docs/components/button/src/icon.svg.js +0 -5
  454. package/docs/components/button/use-cases.md +0 -121
  455. package/docs/components/calendar/api-table.md +0 -56
  456. package/docs/components/calendar/index.md +0 -13
  457. package/docs/components/calendar/overview.md +0 -61
  458. package/docs/components/calendar/use-cases.md +0 -243
  459. package/docs/components/checkbox-group/api-table.md +0 -117
  460. package/docs/components/checkbox-group/index.md +0 -13
  461. package/docs/components/checkbox-group/overview.md +0 -51
  462. package/docs/components/checkbox-group/use-cases.md +0 -192
  463. package/docs/components/collapsible/api-table.md +0 -55
  464. package/docs/components/collapsible/assets/CustomCollapsible.js +0 -117
  465. package/docs/components/collapsible/assets/applyDemoCollapsibleStyles.js +0 -41
  466. package/docs/components/collapsible/examples.md +0 -95
  467. package/docs/components/collapsible/index.md +0 -13
  468. package/docs/components/collapsible/overview.md +0 -51
  469. package/docs/components/collapsible/use-cases.md +0 -91
  470. package/docs/components/combobox/api-table.md +0 -122
  471. package/docs/components/combobox/extensions.md +0 -174
  472. package/docs/components/combobox/index.md +0 -13
  473. package/docs/components/combobox/overview.md +0 -74
  474. package/docs/components/combobox/src/LinkMixin.js +0 -60
  475. package/docs/components/combobox/src/demo-selection-display.js +0 -164
  476. package/docs/components/combobox/src/gh-combobox/gh-button.js +0 -71
  477. package/docs/components/combobox/src/gh-combobox/gh-combobox.js +0 -515
  478. package/docs/components/combobox/src/google-combobox/assets/google-clear-icon.js +0 -9
  479. package/docs/components/combobox/src/google-combobox/assets/google-search-icon.js +0 -9
  480. package/docs/components/combobox/src/google-combobox/assets/google-voice-search-icon.js +0 -19
  481. package/docs/components/combobox/src/google-combobox/google-combobox.js +0 -461
  482. package/docs/components/combobox/src/lazyRender.js +0 -29
  483. package/docs/components/combobox/src/levenshtein.js +0 -95
  484. package/docs/components/combobox/src/md-combobox/MdFieldMixin.js +0 -345
  485. package/docs/components/combobox/src/md-combobox/md-combobox.js +0 -91
  486. package/docs/components/combobox/src/md-combobox/md-input.js +0 -5
  487. package/docs/components/combobox/src/md-combobox/style/load-roboto.js +0 -6
  488. package/docs/components/combobox/src/md-combobox/style/md-ripple.js +0 -82
  489. package/docs/components/combobox/src/wa-combobox/wa-combobox.js +0 -375
  490. package/docs/components/combobox/use-cases.md +0 -561
  491. package/docs/components/dialog/api-table.md +0 -61
  492. package/docs/components/dialog/index.md +0 -13
  493. package/docs/components/dialog/overview.md +0 -71
  494. package/docs/components/dialog/src/demoStyle.js +0 -57
  495. package/docs/components/dialog/src/external-dialog.js +0 -32
  496. package/docs/components/dialog/src/slots-dialog-content.js +0 -32
  497. package/docs/components/dialog/src/styled-dialog-content.js +0 -38
  498. package/docs/components/dialog/use-cases.md +0 -199
  499. package/docs/components/drawer/api-table.md +0 -64
  500. package/docs/components/drawer/index.md +0 -13
  501. package/docs/components/drawer/overview.md +0 -80
  502. package/docs/components/drawer/src/demoStyle.js +0 -71
  503. package/docs/components/drawer/use-cases.md +0 -206
  504. package/docs/components/fieldset/api-table.md +0 -24
  505. package/docs/components/fieldset/index.md +0 -13
  506. package/docs/components/fieldset/overview.md +0 -61
  507. package/docs/components/fieldset/use-cases.md +0 -203
  508. package/docs/components/form/api-table.md +0 -12
  509. package/docs/components/form/index.md +0 -13
  510. package/docs/components/form/overview.md +0 -66
  511. package/docs/components/form/use-cases.md +0 -230
  512. package/docs/components/icon/api-table.md +0 -41
  513. package/docs/components/icon/assets/bugs/bug01.svg.js +0 -2
  514. package/docs/components/icon/assets/bugs/bug02.svg.js +0 -2
  515. package/docs/components/icon/assets/bugs/bug05.svg.js +0 -2
  516. package/docs/components/icon/assets/bugs/bug06.svg.js +0 -2
  517. package/docs/components/icon/assets/bugs/bug08.svg.js +0 -2
  518. package/docs/components/icon/assets/bugs/bug12.svg.js +0 -2
  519. package/docs/components/icon/assets/bugs/bug19.svg.js +0 -2
  520. package/docs/components/icon/assets/bugs/bug23.svg.js +0 -2
  521. package/docs/components/icon/assets/bugs/bug24.svg.js +0 -2
  522. package/docs/components/icon/assets/iconset-bugs.js +0 -11
  523. package/docs/components/icon/assets/iconset-misc.js +0 -3
  524. package/docs/components/icon/assets/iconset-space.js +0 -31
  525. package/docs/components/icon/assets/misc/arrowLeft.svg.js +0 -6
  526. package/docs/components/icon/assets/space/aliens-spaceship.svg.js +0 -2
  527. package/docs/components/icon/assets/space/meteor.svg.js +0 -2
  528. package/docs/components/icon/assets/space/moon-flag.svg.js +0 -2
  529. package/docs/components/icon/assets/space/moon.svg.js +0 -2
  530. package/docs/components/icon/assets/space/night.svg.js +0 -2
  531. package/docs/components/icon/assets/space/orbit.svg.js +0 -2
  532. package/docs/components/icon/assets/space/planet.svg.js +0 -2
  533. package/docs/components/icon/assets/space/robot.svg.js +0 -2
  534. package/docs/components/icon/assets/space/rocket.svg.js +0 -2
  535. package/docs/components/icon/assets/space/satellite.svg.js +0 -2
  536. package/docs/components/icon/assets/space/signal.svg.js +0 -2
  537. package/docs/components/icon/assets/space/space-helmet.svg.js +0 -2
  538. package/docs/components/icon/assets/space/sun.svg.js +0 -2
  539. package/docs/components/icon/assets/space/telescope.svg.js +0 -2
  540. package/docs/components/icon/index.md +0 -13
  541. package/docs/components/icon/overview.md +0 -52
  542. package/docs/components/icon/use-cases.md +0 -92
  543. package/docs/components/index.md +0 -17
  544. package/docs/components/input/api-table.md +0 -52
  545. package/docs/components/input/index.md +0 -13
  546. package/docs/components/input/overview.md +0 -48
  547. package/docs/components/input/use-cases.md +0 -90
  548. package/docs/components/input-amount/api-table.md +0 -66
  549. package/docs/components/input-amount/index.md +0 -13
  550. package/docs/components/input-amount/overview.md +0 -61
  551. package/docs/components/input-amount/use-cases.md +0 -147
  552. package/docs/components/input-amount-dropdown/api-table.md +0 -87
  553. package/docs/components/input-amount-dropdown/index.md +0 -13
  554. package/docs/components/input-amount-dropdown/use-cases.md +0 -103
  555. package/docs/components/input-date/api-table.md +0 -58
  556. package/docs/components/input-date/index.md +0 -13
  557. package/docs/components/input-date/overview.md +0 -51
  558. package/docs/components/input-date/use-cases.md +0 -96
  559. package/docs/components/input-datepicker/api-table.md +0 -99
  560. package/docs/components/input-datepicker/index.md +0 -13
  561. package/docs/components/input-datepicker/overview.md +0 -54
  562. package/docs/components/input-datepicker/use-cases.md +0 -117
  563. package/docs/components/input-email/api-table.md +0 -53
  564. package/docs/components/input-email/index.md +0 -13
  565. package/docs/components/input-email/overview.md +0 -44
  566. package/docs/components/input-email/use-cases.md +0 -60
  567. package/docs/components/input-file/api-table.md +0 -157
  568. package/docs/components/input-file/index.md +0 -13
  569. package/docs/components/input-file/overview.md +0 -44
  570. package/docs/components/input-file/use-cases.md +0 -454
  571. package/docs/components/input-iban/api-table.md +0 -54
  572. package/docs/components/input-iban/index.md +0 -13
  573. package/docs/components/input-iban/overview.md +0 -49
  574. package/docs/components/input-iban/use-cases.md +0 -114
  575. package/docs/components/input-range/api-table.md +0 -71
  576. package/docs/components/input-range/index.md +0 -13
  577. package/docs/components/input-range/overview.md +0 -44
  578. package/docs/components/input-range/use-cases.md +0 -126
  579. package/docs/components/input-stepper/api-table.md +0 -74
  580. package/docs/components/input-stepper/index.md +0 -13
  581. package/docs/components/input-stepper/overview.md +0 -48
  582. package/docs/components/input-stepper/use-cases.md +0 -155
  583. package/docs/components/input-tel/api-table.md +0 -77
  584. package/docs/components/input-tel/index.md +0 -13
  585. package/docs/components/input-tel/overview.md +0 -74
  586. package/docs/components/input-tel/src/h-region-code-table.js +0 -109
  587. package/docs/components/input-tel/use-cases.md +0 -319
  588. package/docs/components/input-tel-dropdown/api-table.md +0 -85
  589. package/docs/components/input-tel-dropdown/extensions.md +0 -44
  590. package/docs/components/input-tel-dropdown/index.md +0 -13
  591. package/docs/components/input-tel-dropdown/overview.md +0 -50
  592. package/docs/components/input-tel-dropdown/src/intl-input-tel-dropdown.js +0 -138
  593. package/docs/components/input-tel-dropdown/use-cases.md +0 -171
  594. package/docs/components/listbox/api-table.md +0 -65
  595. package/docs/components/listbox/index.md +0 -13
  596. package/docs/components/listbox/overview.md +0 -54
  597. package/docs/components/listbox/src/listboxData.js +0 -131
  598. package/docs/components/listbox/use-cases.md +0 -154
  599. package/docs/components/menu/api-table.md +0 -44
  600. package/docs/components/menu/applyMenuDemoStyles.js +0 -173
  601. package/docs/components/menu/extensions.md +0 -262
  602. package/docs/components/menu/index.md +0 -13
  603. package/docs/components/menu/migration.md +0 -129
  604. package/docs/components/menu/overview.md +0 -448
  605. package/docs/components/menu/src/DemoNavigationBar.js +0 -441
  606. package/docs/components/menu/src/DemoSpinButton.js +0 -215
  607. package/docs/components/menu/src/DemoToolbar.js +0 -101
  608. package/docs/components/menu/src/DemoTree.js +0 -55
  609. package/docs/components/menu/src/navigation-bar-types.js +0 -41
  610. package/docs/components/menu/use-cases.md +0 -74
  611. package/docs/components/pagination/api-table.md +0 -45
  612. package/docs/components/pagination/index.md +0 -13
  613. package/docs/components/pagination/overview.md +0 -41
  614. package/docs/components/pagination/use-cases.md +0 -113
  615. package/docs/components/progress-indicator/api-table.md +0 -48
  616. package/docs/components/progress-indicator/assets/my-determinate-progress-bar.js +0 -30
  617. package/docs/components/progress-indicator/assets/my-indeterminate-progress-spinner.js +0 -55
  618. package/docs/components/progress-indicator/examples.md +0 -137
  619. package/docs/components/progress-indicator/index.md +0 -13
  620. package/docs/components/progress-indicator/overview.md +0 -48
  621. package/docs/components/radio-group/api-table.md +0 -63
  622. package/docs/components/radio-group/index.md +0 -13
  623. package/docs/components/radio-group/overview.md +0 -58
  624. package/docs/components/radio-group/use-cases.md +0 -146
  625. package/docs/components/select/api-table.md +0 -51
  626. package/docs/components/select/index.md +0 -13
  627. package/docs/components/select/overview.md +0 -56
  628. package/docs/components/select/use-cases.md +0 -128
  629. package/docs/components/select-rich/api-table.md +0 -123
  630. package/docs/components/select-rich/examples.md +0 -43
  631. package/docs/components/select-rich/index.md +0 -13
  632. package/docs/components/select-rich/overview.md +0 -55
  633. package/docs/components/select-rich/src/flagStyles.js +0 -1250
  634. package/docs/components/select-rich/src/intl-select-rich.js +0 -194
  635. package/docs/components/select-rich/src/regionMetaList.js +0 -1717
  636. package/docs/components/select-rich/use-cases.md +0 -387
  637. package/docs/components/steps/api-table.md +0 -92
  638. package/docs/components/steps/index.md +0 -13
  639. package/docs/components/steps/overview.md +0 -77
  640. package/docs/components/steps/use-cases.md +0 -181
  641. package/docs/components/switch/api-table.md +0 -82
  642. package/docs/components/switch/index.md +0 -13
  643. package/docs/components/switch/overview.md +0 -87
  644. package/docs/components/switch/reference.md +0 -51
  645. package/docs/components/switch/use-cases.md +0 -88
  646. package/docs/components/tabs/api-table.md +0 -51
  647. package/docs/components/tabs/examples.md +0 -35
  648. package/docs/components/tabs/index.md +0 -13
  649. package/docs/components/tabs/overview.md +0 -60
  650. package/docs/components/tabs/src/lea-tab-panel.js +0 -26
  651. package/docs/components/tabs/src/lea-tab.js +0 -50
  652. package/docs/components/tabs/src/lea-tabs.js +0 -28
  653. package/docs/components/tabs/use-cases.md +0 -231
  654. package/docs/components/textarea/api-table.md +0 -57
  655. package/docs/components/textarea/index.md +0 -13
  656. package/docs/components/textarea/overview.md +0 -47
  657. package/docs/components/textarea/use-cases.md +0 -107
  658. package/docs/components/tooltip/api-table.md +0 -62
  659. package/docs/components/tooltip/examples.md +0 -51
  660. package/docs/components/tooltip/index.md +0 -13
  661. package/docs/components/tooltip/overview.md +0 -56
  662. package/docs/components/tooltip/use-cases.md +0 -275
  663. package/docs/fundamentals/index.md +0 -19
  664. package/docs/fundamentals/node-tools/babel-plugin-extend-docs/index.md +0 -13
  665. package/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md +0 -246
  666. package/docs/fundamentals/node-tools/index.md +0 -11
  667. package/docs/fundamentals/node-tools/providence-analytics/index.md +0 -13
  668. package/docs/fundamentals/node-tools/providence-analytics/overview.md +0 -108
  669. package/docs/fundamentals/node-tools/publish-docs/index.md +0 -13
  670. package/docs/fundamentals/node-tools/publish-docs/overview.md +0 -149
  671. package/docs/fundamentals/node-tools/remark-extend/index.md +0 -13
  672. package/docs/fundamentals/node-tools/remark-extend/overview.md +0 -287
  673. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/index.md +0 -13
  674. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +0 -298
  675. package/docs/fundamentals/rationales/TypeScript.md +0 -123
  676. package/docs/fundamentals/rationales/accessibility.md +0 -40
  677. package/docs/fundamentals/rationales/index.md +0 -11
  678. package/docs/fundamentals/rationales/side-effects.md +0 -215
  679. package/docs/fundamentals/rationales/versioning.md +0 -47
  680. package/docs/fundamentals/systems/core/SlotMixin.md +0 -168
  681. package/docs/fundamentals/systems/core/api-table.md +0 -43
  682. package/docs/fundamentals/systems/core/index.md +0 -15
  683. package/docs/fundamentals/systems/core/overview.md +0 -98
  684. package/docs/fundamentals/systems/form/api-table.md +0 -40
  685. package/docs/fundamentals/systems/form/assets/h-output.js +0 -156
  686. package/docs/fundamentals/systems/form/formatting-and-parsing.md +0 -258
  687. package/docs/fundamentals/systems/form/index.md +0 -15
  688. package/docs/fundamentals/systems/form/interaction-states.md +0 -195
  689. package/docs/fundamentals/systems/form/model-value.md +0 -57
  690. package/docs/fundamentals/systems/form/overview.md +0 -95
  691. package/docs/fundamentals/systems/form/styling.md +0 -92
  692. package/docs/fundamentals/systems/form/use-cases.md +0 -187
  693. package/docs/fundamentals/systems/form/validate.md +0 -985
  694. package/docs/fundamentals/systems/icon/index.md +0 -15
  695. package/docs/fundamentals/systems/icon/overview.md +0 -137
  696. package/docs/fundamentals/systems/index.md +0 -11
  697. package/docs/fundamentals/systems/localize/api-table.md +0 -72
  698. package/docs/fundamentals/systems/localize/assets/all-locales.js +0 -437
  699. package/docs/fundamentals/systems/localize/assets/en-AU.js +0 -6
  700. package/docs/fundamentals/systems/localize/assets/en-GB.js +0 -6
  701. package/docs/fundamentals/systems/localize/assets/en-US.js +0 -6
  702. package/docs/fundamentals/systems/localize/assets/en.js +0 -4
  703. package/docs/fundamentals/systems/localize/assets/nl-BE.js +0 -6
  704. package/docs/fundamentals/systems/localize/assets/nl-NL.js +0 -6
  705. package/docs/fundamentals/systems/localize/assets/nl.js +0 -4
  706. package/docs/fundamentals/systems/localize/dates.md +0 -208
  707. package/docs/fundamentals/systems/localize/index.md +0 -15
  708. package/docs/fundamentals/systems/localize/numbers.md +0 -230
  709. package/docs/fundamentals/systems/localize/overview.md +0 -61
  710. package/docs/fundamentals/systems/localize/rationale.md +0 -75
  711. package/docs/fundamentals/systems/localize/text.md +0 -139
  712. package/docs/fundamentals/systems/localize/use-cases.md +0 -334
  713. package/docs/fundamentals/systems/overlays/_configuration-positioning.md +0 -118
  714. package/docs/fundamentals/systems/overlays/_edge-cases.md +0 -149
  715. package/docs/fundamentals/systems/overlays/api-table.md +0 -174
  716. package/docs/fundamentals/systems/overlays/assets/applyDemoOverlayStyles.js +0 -23
  717. package/docs/fundamentals/systems/overlays/assets/demo-el-using-overlaymixin.js +0 -104
  718. package/docs/fundamentals/systems/overlays/assets/demo-overlay-backdrop.js +0 -47
  719. package/docs/fundamentals/systems/overlays/assets/demo-overlay-positioning.mjs +0 -537
  720. package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +0 -140
  721. package/docs/fundamentals/systems/overlays/configuration.md +0 -516
  722. package/docs/fundamentals/systems/overlays/index.md +0 -15
  723. package/docs/fundamentals/systems/overlays/overview.md +0 -126
  724. package/docs/fundamentals/systems/overlays/rationale.md +0 -242
  725. package/docs/fundamentals/systems/overlays/use-cases.md +0 -717
  726. package/docs/fundamentals/tools/ajax/index.md +0 -15
  727. package/docs/fundamentals/tools/ajax/overview.md +0 -269
  728. package/docs/fundamentals/tools/ajax/use-cases.md +0 -469
  729. package/docs/fundamentals/tools/helpers/action-logger.md +0 -175
  730. package/docs/fundamentals/tools/helpers/index.md +0 -15
  731. package/docs/fundamentals/tools/helpers/overview.md +0 -43
  732. package/docs/fundamentals/tools/index.md +0 -11
  733. package/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js +0 -95
  734. package/docs/fundamentals/tools/singleton-manager/example-complex/index.md +0 -34
  735. package/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/overlays/index.js +0 -30
  736. package/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/overlays/instance.js +0 -4
  737. package/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-a/page-a.js +0 -35
  738. package/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/index.js +0 -30
  739. package/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/instance.js +0 -4
  740. package/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/page-b.js +0 -49
  741. package/docs/fundamentals/tools/singleton-manager/example-complex/overlayCompatibility.js +0 -69
  742. package/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js +0 -93
  743. package/docs/fundamentals/tools/singleton-manager/example-fail/index.md +0 -32
  744. package/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/overlays/index.js +0 -30
  745. package/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/overlays/instance.js +0 -3
  746. package/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-c/page-c.js +0 -34
  747. package/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-d/node_modules/overlays/index.js +0 -30
  748. package/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-d/node_modules/overlays/instance.js +0 -3
  749. package/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-d/page-d.js +0 -34
  750. package/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js +0 -95
  751. package/docs/fundamentals/tools/singleton-manager/example-success/index.md +0 -31
  752. package/docs/fundamentals/tools/singleton-manager/example-success/node_modules/overlays/index.js +0 -30
  753. package/docs/fundamentals/tools/singleton-manager/example-success/node_modules/overlays/instance.js +0 -4
  754. package/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-e/page-e.js +0 -33
  755. package/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-f/node_modules/overlays/index.js +0 -30
  756. package/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-f/node_modules/overlays/instance.js +0 -4
  757. package/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-f/page-f.js +0 -34
  758. package/docs/fundamentals/tools/singleton-manager/example-success/overlayCompatibility.js +0 -23
  759. package/docs/fundamentals/tools/singleton-manager/index.md +0 -15
  760. package/docs/fundamentals/tools/singleton-manager/overview.md +0 -317
  761. package/docs/guides/how-to/create-a-custom-field.md +0 -212
  762. package/docs/guides/how-to/create-a-form.md +0 -101
  763. package/docs/guides/how-to/extend-a-native-input.md +0 -78
  764. package/docs/guides/how-to/get-started.md +0 -116
  765. package/docs/guides/how-to/index.md +0 -25
  766. package/docs/guides/index.md +0 -44
  767. package/docs/guides/principles/definitions-and-terms.md +0 -53
  768. package/docs/guides/principles/index.md +0 -36
  769. package/docs/guides/principles/scoped-elements.md +0 -119
  770. package/docs/guides/principles/styling.md +0 -43
  771. package/docs/guides/principles/subclasser-apis.md +0 -40
@@ -1,985 +0,0 @@
1
- ---
2
- parts:
3
- - Validate
4
- - Form
5
- - Systems
6
- title: 'Validate'
7
- eleventyNavigation:
8
- key: Systems >> Form >> Validate
9
- title: Validate
10
- order: 30
11
- parent: Systems >> Form
12
- ---
13
-
14
- # Validate
15
-
16
- ```js script
17
- import { html } from '@mdjs/mdjs-preview';
18
- import { LionInput } from '@lion/ui/input.js';
19
- import '@lion/ui/define/lion-checkbox-group.js';
20
- import '@lion/ui/define/lion-checkbox.js';
21
- import '@lion/ui/define/lion-combobox.js';
22
- import '@lion/ui/define/lion-fieldset.js';
23
- import '@lion/ui/define/lion-form.js';
24
- import '@lion/ui/define/lion-input-amount.js';
25
- import '@lion/ui/define/lion-input-date.js';
26
- import '@lion/ui/define/lion-input-datepicker.js';
27
- import '@lion/ui/define/lion-input-email.js';
28
- import '@lion/ui/define/lion-input-iban.js';
29
- import '@lion/ui/define/lion-input-range.js';
30
- import '@lion/ui/define/lion-input-stepper.js';
31
- import '@lion/ui/define/lion-input.js';
32
- import '@lion/ui/define/lion-listbox.js';
33
- import '@lion/ui/define/lion-listbox.js';
34
- import '@lion/ui/define/lion-option.js';
35
- import '@lion/ui/define/lion-options.js';
36
- import '@lion/ui/define/lion-radio-group.js';
37
- import '@lion/ui/define/lion-radio.js';
38
- import '@lion/ui/define/lion-select.js';
39
- import '@lion/ui/define/lion-select-rich.js';
40
- import '@lion/ui/define/lion-textarea.js';
41
- import {
42
- DefaultSuccess,
43
- EqualsLength,
44
- IsDate,
45
- IsEmail,
46
- IsNumber,
47
- IsString,
48
- MaxDate,
49
- MaxLength,
50
- MaxNumber,
51
- MinDate,
52
- MinLength,
53
- MinMaxDate,
54
- MinMaxLength,
55
- MinMaxNumber,
56
- MinNumber,
57
- Required,
58
- Validator,
59
- Pattern,
60
- Unparseable,
61
- } from '@lion/ui/form-core.js';
62
- import { localize } from '@lion/ui/localize.js';
63
- import { loadDefaultFeedbackMessages } from '@lion/ui/validate-messages.js';
64
- import { renderLitAsNode } from '@lion/ui/helpers.js';
65
- ```
66
-
67
- ## When validation happens
68
-
69
- Validation happens on every change of `modelValue`. A change in modelValue can be originated from either user interaction or an imperative action from an Application Developer. We could therefore say validation happens 'realtime'. This is aligned with the platform.
70
-
71
- ## When validation feedback will be shown
72
-
73
- Although validation happens realtime under the hood, displaying validity feedback in realtime may not always lead to the desired User Experience. Together with [interaction states](https://github.com/ing-bank/lion/blob/9575386e5fb419f7dbd3b893be4c4ce7925bcb2e/docs/fundamentals/systems/form/interaction-states.md),
74
- validity states can determine whether a validation message should be shown along the input field.
75
-
76
- ## Assessing field validation state programmatically
77
-
78
- When a field has validation feedback it can be accessed using the `hasFeedbackFor` and `showsFeedbackFor` properties. This can be used if the validity of the field is needed in code.
79
-
80
- - `hasFeedbackFor` is the state of the field regardless of whether the feedback is shown or not.
81
- - `showsFeedbackFor` represents whether or not validation feedback is being shown. This takes into account interaction state such as a field being `touched` and `dirty`, `prefilled` or `submitted`
82
-
83
- ```js
84
- // Field is invalid and has not interacted with
85
- const field = document.querySelector('#my-field');
86
- field.hasFeedbackFor.includes('error'); // returns true
87
- field.showsFeedbackFor.includes('error'); // returns false
88
-
89
- // Field invalid, dirty and touched
90
- field.hasFeedbackFor.includes('error'); // returns true
91
- field.showsFeedbackFor.includes('error'); // returns true
92
- ```
93
-
94
- ## Features
95
-
96
- - Allow for advanced UX scenarios by updating validation state on every value change
97
- - Provide a powerful way of writing validation via pure functions
98
- - Default validators
99
- - Custom validators
100
- - Multiple validation types(error, warning, info, success)
101
-
102
- Our validation system is designed to:
103
-
104
- - Allow for advanced UX scenarios by updating validation state on every value change
105
- - Provide a powerful way of writing validations via classes.
106
-
107
- ## Validators
108
-
109
- All validators are extensions of the `Validator` class. They should be applied to the element implementing `ValidateMixin` as follows:
110
-
111
- ```html
112
- <validatable-el
113
- .validators="${[new MyValidator({ myParam: 'foo' }), { extra: 'options' } ]]}"
114
- ></validatable-el>
115
- ```
116
-
117
- As you can see the 'validators' property expects a map (an array of arrays). So, every Validator is a class consisting of:
118
-
119
- - validator function
120
- - validator parameters (optional)
121
- - validator config (optional)
122
-
123
- ### Validator classes
124
-
125
- All validators extend from the default `Validator` class. Below is an example of what a validator could look like:
126
-
127
- ```js
128
- class EqualsText extends Validator {
129
- static validatorName = 'EqualsText';
130
-
131
- /**
132
- * Returns true when 'activated' (c.q. in error/warning/info state)
133
- * @param {string} modelValue
134
- */
135
- execute(modelValue, param) {
136
- return modelValue !== param;
137
- }
138
-
139
- static getMessage({ fieldName, modelValue, formControl }) {
140
- return `Please make sure values are equal`;
141
- }
142
- }
143
- ```
144
-
145
- The `execute()` method returns a boolean by default, but it can also be customized to return enums instead. In this example below, we customize the method to return one among some possible enums as strings.
146
-
147
- ```js
148
- class EnumOutComeValidator extends Validator {
149
- static validatorName = 'EnumOutCome';
150
-
151
- /**
152
- * @param {string} modelValue
153
- * @param {number} maxLength
154
- * @returns {false|'overload'|'error'}
155
- */
156
- execute(modelValue, maxLength) {
157
- if (modelValue.length > maxLength) {
158
- return 'overload';
159
- } else if (modelValue.length < 0) {
160
- return 'error';
161
- }
162
- return false;
163
- }
164
-
165
- /**
166
- * @param {{outcome: 'overload'|'error'|false}} opts
167
- */
168
- static async getMessage({ outcome }) {
169
- const results = {
170
- overload: 'Too many characters!',
171
- error: 'Something went wrong..',
172
- false: 'All good!',
173
- };
174
- return results[outcome];
175
- }
176
- }
177
- ```
178
-
179
- ```html
180
- <validatable-el .validators="${[new EqualsText('foo')]}"></validatable-el>
181
- ```
182
-
183
- ## Installation
184
-
185
- ```bash
186
- npm i --save @lion/ui
187
- ```
188
-
189
- ```js
190
- import '@lion/ui/define/lion-input.js';
191
- import { %ValidatorName% } from '@lion/ui/form-core.js';
192
- ```
193
-
194
- ## Default Validators
195
-
196
- By default, the validate system ships with the following validators:
197
-
198
- - **Required**
199
- - **String Validators**, IsString, EqualsLength, MinLength, MaxLength, MinMaxLength, Pattern
200
- - **Number Validators**, IsNumber, MinNumber, MaxNumber, MinMaxNumber
201
- - **Date Validators**, IsDate, MinDate, MaxDate, MinMaxDate, IsDateDisabled
202
- - **Email Validator**, IsEmail
203
-
204
- All validators return `false` if the required validity state is met.
205
-
206
- All validators are considered self explanatory due to their explicit namings.
207
-
208
- ```bash
209
- npm i --save @lion/ui
210
- ```
211
-
212
- ```js
213
- import { loadDefaultFeedbackMessages } from '@lion/ui/validate-messages.js';
214
- ```
215
-
216
- ```js preview-story
217
- export const defaultValidationMessages = () => {
218
- loadDefaultFeedbackMessages();
219
- return html`
220
- <lion-input
221
- name="value"
222
- label="Default validation"
223
- .fieldName="${'value'}"
224
- .validators="${[new Required(), new MinLength(4)]}"
225
- .modelValue="${'foo'}"
226
- ></lion-input>
227
- <button @click="${() => (localize.locale = 'de-DE')}">DE</button>
228
- <button @click="${() => (localize.locale = 'en-GB')}">EN</button>
229
- <button @click="${() => (localize.locale = 'fr-FR')}">FR</button>
230
- <button @click="${() => (localize.locale = 'nl-NL')}">NL</button>
231
- <button @click="${() => (localize.locale = 'zh-CN')}">CN</button>
232
- `;
233
- };
234
- ```
235
-
236
- Once the method `loadDefaultFeedbackMessages` is called, it will make sure that all validators provided in `@lion/form-core` will have a default error message. It uses the `@lion/localize` system to provide these translations and has support for more than 15 locales.
237
-
238
- ### Required
239
-
240
- The required validator can be put onto every form field element and will make sure that element is not empty. For an input that may mean that it is not an empty string, while for a `checkbox-group` it means at least one `checkbox` needs to be checked.
241
-
242
- ```js preview-story
243
- export const requiredValidator = () => html`
244
- <lion-input .validators="${[new Required()]}" label="Required" .fieldName="value"></lion-input>
245
- `;
246
- ```
247
-
248
- The default `Required` validation message is "Please, enter a(n) {fieldName}". In which the "fieldName" can be provided separately via the `fieldName` attribute, with a fallback to the label. See [override fieldname](https://github.com/ing-bank/lion/blob/9575386e5fb419f7dbd3b893be4c4ce7925bcb2e/docs/fundamentals/systems/form/#override-fieldname) for more information.
249
-
250
- Specific required messages for a select and file-upload are created.
251
-
252
- ### String Validators
253
-
254
- Useful on input elements it allows to define how many characters can be entered.
255
-
256
- ```js preview-story
257
- export const stringValidators = () => html`
258
- <lion-input
259
- .validators="${[new EqualsLength(7)]}"
260
- .modelValue="${'not exactly'}"
261
- label="EqualsLength"
262
- ></lion-input>
263
- <lion-input
264
- .validators="${[new MinLength(10)]}"
265
- .modelValue="${'too short'}"
266
- label="MinLength"
267
- ></lion-input>
268
- <lion-input
269
- .validators="${[new MaxLength(7)]}"
270
- .modelValue="${'too long'}"
271
- label="MaxLength"
272
- ></lion-input>
273
- <lion-input
274
- .validators="${[new MinMaxLength({ min: 10, max: 20 })]}"
275
- .modelValue="${'that should be enough'}"
276
- label="MinMaxLength"
277
- ></lion-input>
278
- <lion-input
279
- .validators="${[new Pattern(/#LionRocks/)]}"
280
- .modelValue="${'regex checks if "#Lion<NO SPACE>Rocks" is in this input #LionRocks'}"
281
- label="Pattern"
282
- ></lion-input>
283
- `;
284
- ```
285
-
286
- ### Number Validators
287
-
288
- Number validations assume that it's modelValue is actually a number.
289
- Therefore it may only be used on input that have an appropriate parser/formatter like the `input-amount`.
290
-
291
- ```js preview-story
292
- export const numberValidators = () => html`
293
- <lion-input-amount
294
- .validators="${[new IsNumber()]}"
295
- .modelValue="${'foo'}"
296
- label="IsNumber"
297
- ></lion-input-amount>
298
- <lion-input-amount
299
- .validators="${[new MinNumber(7)]}"
300
- .modelValue="${5}"
301
- label="MinNumber"
302
- ></lion-input-amount>
303
- <lion-input-amount
304
- .validators="${[new MaxNumber(7)]}"
305
- .modelValue="${9}"
306
- label="MaxNumber"
307
- ></lion-input-amount>
308
- <lion-input-amount
309
- .validators="${[new MinMaxNumber({ min: 10, max: 20 })]}"
310
- .modelValue="${5}"
311
- label="MinMaxNumber"
312
- ></lion-input-amount>
313
- `;
314
- ```
315
-
316
- ### Date Validators
317
-
318
- Date validators work with real javascript dates. Use them on `input-date` or `input-datepicker`.
319
-
320
- ```js preview-story
321
- export const dateValidators = () => {
322
- const today = new Date();
323
- const year = today.getFullYear();
324
- const month = today.getMonth();
325
- const day = today.getDate();
326
- const yesterday = new Date(year, month, day - 1);
327
- const tomorrow = new Date(year, month, day + 1);
328
- return html`
329
- <lion-input-date
330
- .validators="${[new IsDate()]}"
331
- .modelValue="${'foo'}"
332
- label="IsDate"
333
- ></lion-input-date>
334
- <lion-input-date
335
- .validators="${[new MinDate(today)]}"
336
- .modelValue="${new Date(yesterday)}"
337
- label="MinDate"
338
- ></lion-input-date>
339
- <lion-input-date
340
- .validators="${[new MaxDate(today)]}"
341
- .modelValue="${new Date(tomorrow)}"
342
- label="MaxDate"
343
- ></lion-input-date>
344
- <lion-input-date
345
- .validators="${[new MinMaxDate({ min: new Date(yesterday), max: new Date(tomorrow) })]}"
346
- .modelValue="${new Date(today)}"
347
- label="MinMaxDate"
348
- ></lion-input-date>
349
- `;
350
- };
351
- ```
352
-
353
- ### Email Validator
354
-
355
- ```js preview-story
356
- export const emailValidator = () => html`
357
- <lion-input-email
358
- .validators="${[new IsEmail()]}"
359
- .modelValue="${'foo'}"
360
- label="IsEmail"
361
- ></lion-input-email>
362
- `;
363
- ```
364
-
365
- ### Override default messages with custom text
366
-
367
- To get default validation messages you need to import and call the `loadDefaultFeedbackMessages` function once in your application.
368
-
369
- Sometimes the default messages don't make sense for your input field. In that case you want to override it by adding a `getMessage` function to your validator.
370
-
371
- ```js preview-story
372
- export const defaultMessages = () => html`
373
- <lion-input
374
- .validators="${[new EqualsLength(4, { getMessage: () => '4 chars please...' })]}"
375
- .modelValue="${'123'}"
376
- label="Custom message for validator instance"
377
- ></lion-input>
378
- <lion-input
379
- .validators="${[
380
- new EqualsLength(4, {
381
- getMessage: ({ modelValue, params: param }) => {
382
- const diff = modelValue.length - param;
383
- return `${Math.abs(diff)} too ${diff > 0 ? 'much' : 'few'}...`;
384
- },
385
- }),
386
- ]}"
387
- .modelValue="${'way too much'}"
388
- label="Dynamic message for validator instance"
389
- ></lion-input>
390
- `;
391
- ```
392
-
393
- ### Override default messages with custom HTML
394
-
395
- Similarly to overriding the default messages with a custom text it is possible to override the messages with a custom HTML.
396
-
397
- ```js preview-story
398
- export const defaultMessagesWithCustomHtml = () => html`
399
- <lion-input
400
- .validators="${[
401
- new EqualsLength(4, { getMessage: () => html`<div><b>Note</b> 4 chars please...</div>` }),
402
- ]}"
403
- .modelValue="${'123'}"
404
- label="Custom message for validator instance"
405
- ></lion-input>
406
- `;
407
- ```
408
-
409
- ### Override fieldName
410
-
411
- In the scenario that the default messages are correct, but you only want to change the `fieldName`, this can both be done for a single specific validator or for all at once.
412
-
413
- ```js preview-story
414
- export const overrideFieldName = () => html`
415
- <lion-input
416
- .validators="${[new EqualsLength(4, { fieldName: 'custom fieldName' })]}"
417
- .modelValue="${'123'}"
418
- label="Custom fieldName for 1 validator"
419
- ></lion-input>
420
- <lion-input
421
- .validators="${[new Required(), new EqualsLength(4)]}"
422
- .fieldName="${'custom fieldName'}"
423
- .modelValue="${'123'}"
424
- label="Custom fieldName for all validators"
425
- ></lion-input>
426
- `;
427
- ```
428
-
429
- ## Custom Validators
430
-
431
- Here is an example how you can make your own validator and providing the error messages directly within. You can even hard code localization in there if needed or you can use a localization system.
432
-
433
- > Note that we import an `lion-input` here as an example of a form control implementing `ValidateMixin`.
434
- > We could equally well use `lion-textarea`, `lion-select`, `lion-fieldset` etc. to illustrate our example.
435
-
436
- ```js preview-story
437
- export const customValidators = () => {
438
- const isInitialsRegex = /^([A-Z]\.)+$/;
439
- class IsInitialsExample extends Validator {
440
- static get validatorName() {
441
- return 'IsExampleInitials';
442
- }
443
-
444
- execute(value) {
445
- let hasFeedback = false;
446
- const isStringValidator = new IsString();
447
- if (isStringValidator.execute(value) || !isInitialsRegex.test(value)) {
448
- hasFeedback = true;
449
- }
450
- return hasFeedback;
451
- }
452
-
453
- static getMessage({ fieldName }) {
454
- return `Please enter a valid ${fieldName} in the format "L.I.".`;
455
- }
456
- }
457
- return html`
458
- <lion-input
459
- label="Initials"
460
- name="initials"
461
- .validators="${[new IsInitialsExample('mine')]}"
462
- ></lion-input>
463
- `;
464
- };
465
- ```
466
-
467
- The custom `IsInitialsExample` checks if the value is fitting our regex, but does not prevent the user from submitting other values.
468
-
469
- Retrieving validity states is as easy as checking for:
470
-
471
- ```js
472
- myInitialsInput.hasFeedbackFor.include('error');
473
- ```
474
-
475
- ## Validation Examples
476
-
477
- ### Checkbox Validator
478
-
479
- You can apply validation to the `<lion-checkbox-group>`, similar to how you would do so in any fieldset. The interaction states of the `<lion-checkbox-group>` are evaluated in order to hide or show feedback messages.
480
-
481
- ```js preview-story
482
- export const checkboxValidation = () => {
483
- const validate = e => {
484
- const checkboxGroup = e.target.parentElement.querySelector('#scientists');
485
- checkboxGroup.submitted = !checkboxGroup.submitted;
486
- };
487
- return html`
488
- <lion-checkbox-group
489
- id="scientists"
490
- name="scientists[]"
491
- label="Favorite scientists"
492
- .validators="${[new Required()]}"
493
- >
494
- <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
495
- <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
496
- <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
497
- </lion-checkbox-group>
498
- <button @click="${e => validate(e)}">Validate</button>
499
- `;
500
- };
501
- ```
502
-
503
- Below is a more advanced validator on the group that evaluates the children checkboxes' checked states.
504
-
505
- ```js preview-story
506
- export const checkboxValidationAdvanced = () => {
507
- class HasMinTwoChecked extends Validator {
508
- execute(value) {
509
- return value.length < 2;
510
- }
511
- static get validatorName() {
512
- return 'HasMinTwoChecked';
513
- }
514
- static async getMessage() {
515
- return 'You need to select at least 2 values.';
516
- }
517
- }
518
- const validate = e => {
519
- const checkboxGroup = e.target.parentElement.querySelector('#scientists2');
520
- checkboxGroup.submitted = !checkboxGroup.submitted;
521
- };
522
- return html`
523
- <lion-checkbox-group
524
- id="scientists2"
525
- name="scientists2[]"
526
- label="Favorite scientists"
527
- help-text="You should have at least 2 of those"
528
- .validators="${[new Required(), new HasMinTwoChecked()]}"
529
- >
530
- <lion-checkbox label="Archimedes" .choiceValue="${'Archimedes'}"></lion-checkbox>
531
- <lion-checkbox label="Francis Bacon" .choiceValue="${'Francis Bacon'}"></lion-checkbox>
532
- <lion-checkbox label="Marie Curie" .choiceValue="${'Marie Curie'}"></lion-checkbox>
533
- </lion-checkbox-group>
534
- <button @click="${e => validate(e)}">Validate</button>
535
- `;
536
- };
537
- ```
538
-
539
- ### Radio Validator
540
-
541
- ```js preview-story
542
- export const radioValidation = () => {
543
- const validate = e => {
544
- const radioGroup = e.target.parentElement.querySelector('#dinos1');
545
- radioGroup.submitted = !radioGroup.submitted;
546
- };
547
- return html`
548
- <lion-radio-group
549
- id="dinos1"
550
- name="dinos1"
551
- label="Favourite dinosaur"
552
- .validators="${[new Required()]}"
553
- >
554
- <lion-radio label="allosaurus" .choiceValue="${'allosaurus'}"></lion-radio>
555
- <lion-radio label="brontosaurus" .choiceValue="${'brontosaurus'}"></lion-radio>
556
- <lion-radio label="diplodocus" .choiceValue="${'diplodocus'}"></lion-radio>
557
- </lion-radio-group>
558
- <button @click="${e => validate(e)}">Validate</button>
559
- `;
560
- };
561
- ```
562
-
563
- You can also create a validator that validates whether a certain option is checked.
564
-
565
- ```js preview-story
566
- export const radioValidationAdvanced = () => {
567
- class IsBrontosaurus extends Validator {
568
- static get validatorName() {
569
- return 'IsBrontosaurus';
570
- }
571
- execute(value) {
572
- let showFeedback = false;
573
- if (value !== 'brontosaurus') {
574
- showFeedback = true;
575
- }
576
- return showFeedback;
577
- }
578
- static async getMessage() {
579
- return 'You need to select "brontosaurus"';
580
- }
581
- }
582
- const validate = e => {
583
- const radioGroup = e.target.parentElement.querySelector('#dinos2');
584
- radioGroup.submitted = !radioGroup.submitted;
585
- };
586
- return html`
587
- <lion-radio-group
588
- id="dinos2"
589
- name="dinos2"
590
- label="Favourite dinosaur"
591
- .validators="${[new Required(), new IsBrontosaurus()]}"
592
- >
593
- <lion-radio label="allosaurus" .choiceValue="${'allosaurus'}"></lion-radio>
594
- <lion-radio label="brontosaurus" .choiceValue="${'brontosaurus'}"></lion-radio>
595
- <lion-radio label="diplodocus" .choiceValue="${'diplodocus'}"></lion-radio>
596
- </lion-radio-group>
597
- <button @click="${e => validate(e)}">Validate</button>
598
- `;
599
- };
600
- ```
601
-
602
- ### Combobox
603
-
604
- Validation can be used as normal, below is an example of a combobox with a `Required` validator.
605
-
606
- ```js preview-story
607
- export const validationCombobox = () => html`
608
- <lion-combobox .validators="${[new Required()]}" name="favoriteMovie" label="Favorite movie">
609
- <lion-option checked .choiceValue="${'Rocky'}">Rocky</lion-option>
610
- <lion-option .choiceValue="${'Rocky II'}">Rocky II</lion-option>
611
- <lion-option .choiceValue="${'Rocky III'}">Rocky III</lion-option>
612
- <lion-option .choiceValue="${'Rocky IV'}">Rocky IV</lion-option>
613
- <lion-option .choiceValue="${'Rocky V'}">Rocky V</lion-option>
614
- <lion-option .choiceValue="${'Rocky Balboa'}">Rocky Balboa</lion-option>
615
- </lion-combobox>
616
- `;
617
- ```
618
-
619
- ## Validation Types
620
-
621
- The most common use case for validation is the assessment of whether the input is in error state. An error state would be considered blocking: it prevents a form from being submitted to the server.
622
-
623
- However, the validation system also supports three non blocking validation feedback types. Summed up, we have the following four types:
624
-
625
- - **error**: blocking the field from being submitted to the server. For example:
626
- "Please enter an amount higher than 1000,00 euro."
627
- - **warning**: something looks wrong, but it is not blocking. For example an optional email input:
628
- "Please enter a valid e-mail address in the format `name@example.com`."
629
- - **info**: shows extra information. For example a message of a scheduled payment planner:
630
- "Ends on 15/05/2020 after 5 payments."
631
- - **success**: will only be triggered if there was a Message from one of the above validation types and is now correct. For example: "Ok, correct."
632
-
633
- The api for warning validators and info validators are as follows:
634
-
635
- ```js preview-story
636
- export const validationTypes = () => {
637
- try {
638
- class MyTypesInput extends LionInput {
639
- static get validationTypes() {
640
- return ['error', 'warning', 'info', 'success'];
641
- }
642
- }
643
- customElements.define('my-types-input', MyTypesInput);
644
- } catch (err) {
645
- // expected as it is a demo
646
- }
647
- return html`
648
- <style>
649
- .demo-types-input {
650
- padding: 0.5rem;
651
- }
652
- .demo-types-input[shows-feedback-for~='success'] {
653
- background-color: #e4ffe4;
654
- border: 1px solid green;
655
- }
656
- .demo-types-input[shows-feedback-for~='error'] {
657
- background-color: #ffd4d4;
658
- border: 1px solid red;
659
- }
660
- .demo-types-input[shows-feedback-for~='warning'] {
661
- background-color: #ffe4d4;
662
- border: 1px solid orange;
663
- }
664
- .demo-types-input[shows-feedback-for~='info'] {
665
- background-color: #d4e4ff;
666
- border: 1px solid blue;
667
- }
668
- </style>
669
- <my-types-input
670
- .validators="${[
671
- new Required(),
672
- new MinLength(7, { type: 'warning' }),
673
- new MaxLength(10, {
674
- type: 'info',
675
- getMessage: () => `Please, keep the length below the 10 characters.`,
676
- }),
677
- new DefaultSuccess(),
678
- ]}"
679
- .modelValue="${'exactly'}"
680
- label="Validation Types"
681
- class="demo-types-input"
682
- ></my-types-input>
683
- `;
684
- };
685
- ```
686
-
687
- ### Success
688
-
689
- Success validators work a bit differently. Their success state is defined by the lack of a previously existing erroneous state (which can be an error or warning state).
690
-
691
- So, an error validator going from invalid (true) state to invalid(false) state, will trigger the success validator.
692
-
693
- By default the success message will disappear, both the duration and the removal can be configured by passing `displayOptions` to the validator configuration:
694
-
695
- The `duration` property overwrites the default 3000ms timer.
696
-
697
- ```js
698
- new DefaultSuccess({}, { visibilityDuration: 4000 });
699
- ```
700
-
701
- `Infinity` can be added to the `duration` property to allow the success message to stay on screen, like the behaviour of the other validation types' messages.
702
-
703
- ```js
704
- new DefaultSuccess({}, visibilityDuration: Infinity });
705
- ```
706
-
707
- ## Asynchronous validation
708
-
709
- By default, all validations are run synchronously. However, for instance when validation can only take place on server level, asynchronous validation will be needed.
710
-
711
- You can make your async validators as follows:
712
-
713
- ```js preview-story
714
- export const asynchronousValidation = () => {
715
- function pause(ms = 0) {
716
- return new Promise(resolve => {
717
- setTimeout(() => {
718
- resolve();
719
- }, ms);
720
- });
721
- }
722
- class AsyncValidator extends Validator {
723
- constructor(...args) {
724
- super(...args);
725
- }
726
- static get validatorName() {
727
- return 'asyncValidator';
728
- }
729
- static get async() {
730
- return true;
731
- }
732
- async execute() {
733
- console.log('async pending...');
734
- await pause(2000);
735
- console.log('async done...');
736
- return true;
737
- }
738
- static getMessage({ modelValue }) {
739
- return `validated for modelValue: ${modelValue}...`;
740
- }
741
- }
742
- return html`
743
- <style>
744
- lion-input[is-pending] {
745
- opacity: 0.5;
746
- }
747
- </style>
748
- <lion-input
749
- label="Async validation"
750
- .validators="${[new AsyncValidator()]}"
751
- .modelValue="${'123'}"
752
- ></lion-input>
753
- `;
754
- };
755
- ```
756
-
757
- ## Dynamic parameter change
758
-
759
- ```js preview-story
760
- export const dynamicParameterChange = () => {
761
- const beginDate = new Date('09/09/1990');
762
- const minDateValidatorRef = new MinDate(beginDate, {
763
- message: 'Fill in a date after your birth date',
764
- });
765
- return html`
766
- <lion-input-date
767
- label="Birth date"
768
- help-text="Adjust this date to retrigger validation of the input below..."
769
- .modelValue="${beginDate}"
770
- @model-value-changed="${({ target: { modelValue, errorState } }) => {
771
- if (!errorState) {
772
- // Since graduation date is usually not before birth date
773
- minDateValidatorRef.param = modelValue;
774
- }
775
- }}"
776
- ></lion-input-date>
777
- <lion-input-date
778
- label="Graduation date"
779
- .modelValue="${new Date('09/09/1989')}"
780
- .validators="${[minDateValidatorRef]}"
781
- ></lion-input-date>
782
- `;
783
- };
784
- ```
785
-
786
- ## Disabled inputs validation
787
-
788
- According to the W3C specs, Disabled fields should not be validated. Therefore if the attribute disabled is present on a `lion-input` it will not be validated.
789
-
790
- ```js preview-story
791
- export const disabledInputsValidation = () => html`
792
- <lion-input
793
- disabled
794
- .validators="${[new EqualsLength(7)]}"
795
- .modelValue="${'not exactly'}"
796
- label="EqualsLength"
797
- ></lion-input>
798
- `;
799
- ```
800
-
801
- ## Backend validation
802
-
803
- Backend validation is needed in some cases. For example, you have a sign up form, the username could be already taken. You can add an `AsyncValidator` to check the availability when the `username` field is changed but you may have a conflict when you submit the form (another user take the username in parallel).
804
-
805
- ```js preview-story
806
- export const backendValidation = () => {
807
- // Mock
808
- function fakeFetch(ms = 0, withError = false) {
809
- return new Promise(resolve => {
810
- setTimeout(() => {
811
- resolve(
812
- new Response(
813
- JSON.stringify({
814
- message: withError ? 'Username is already taken' : '',
815
- }),
816
- { status: withError ? 400 : 200 },
817
- ),
818
- );
819
- }, ms);
820
- });
821
- }
822
-
823
- let backendValidationResolver;
824
- let backendErrorMessage = 'Unknown Error';
825
- let isBackendCallPending = false;
826
-
827
- const submitHandler = ev => {
828
- const lionForm = ev.target;
829
- if (lionForm.hasFeedbackFor.includes('error')) {
830
- const firstFormElWithError = lionForm.formElements.find(el =>
831
- el.hasFeedbackFor.includes('error'),
832
- );
833
- firstFormElWithError.focus();
834
- return;
835
- }
836
- isBackendCallPending = true;
837
- lionForm.formElements.username.validate(); // => backendValidationResolver will be assigned
838
- const formData = lionForm.serializedValue;
839
- fakeFetch(2000, formData.simulateError.length).then(async response => {
840
- if (response.status !== 200) {
841
- backendErrorMessage = (await response.json())?.message;
842
- backendValidationResolver(true);
843
- }
844
- backendValidationResolver(false);
845
- isBackendCallPending = false;
846
- });
847
- };
848
-
849
- class BackendValidator extends Validator {
850
- static get validatorName() {
851
- return 'backendValidator';
852
- }
853
- static get async() {
854
- return true;
855
- }
856
- async execute() {
857
- if (isBackendCallPending) {
858
- return await new Promise(resolve => (backendValidationResolver = resolve));
859
- }
860
- return false;
861
- }
862
- static getMessage({ fieldName, modelValue, params: param }) {
863
- return backendErrorMessage;
864
- }
865
- }
866
- return html`
867
- <style>
868
- lion-input[is-pending] {
869
- opacity: 0.5;
870
- }
871
- </style>
872
- <lion-form @submit="${submitHandler}">
873
- <form>
874
- <lion-input
875
- label="username"
876
- name="username"
877
- .validators="${[new BackendValidator(''), new Required()]}"
878
- .modelValue="${''}"
879
- ></lion-input>
880
- <lion-checkbox-group name="simulateError">
881
- <lion-checkbox label="Check to simulate a backend error"></lion-checkbox>
882
- </lion-checkbox-group>
883
- <lion-button-submit>Submit</lion-button-submit>
884
- </form>
885
- </lion-form>
886
- `;
887
- };
888
- ```
889
-
890
- ## Multiple field validation
891
-
892
- When validation is dependent on multiple fields, two approaches can be considered:
893
-
894
- - Fieldset validation
895
- - Validators with knowledge about context
896
-
897
- ### Fieldset validation
898
-
899
- Assume we have a field `startDate` and `endDate` field, with condition `startDate` < `endDate`.
900
- The easiest way to achieve this, is by adding a Validator to a fieldset wrapping those fields.
901
-
902
- ```js preview-story
903
- const isInterpretable = mv => mv && !(mv instanceof Unparseable);
904
-
905
- class Interval extends Validator {
906
- static get validatorName() {
907
- return 'Interval';
908
- }
909
-
910
- execute({ startDate, endDate }) {
911
- if (isInterpretable(startDate) && isInterpretable(endDate)) {
912
- return !(startDate < endDate);
913
- }
914
- return false;
915
- }
916
-
917
- static async getMessage() {
918
- return `The start date should be before the end date`;
919
- }
920
- }
921
- export const fieldsetValidation = () => html`
922
- <lion-fieldset .validators="${[new Interval()]}">
923
- <lion-input-date name="startDate" label="Start date"></lion-input-date>
924
- <lion-input-date name="endDate" label="End date"></lion-input-date>
925
- </lion-fieldset>
926
- `;
927
- ```
928
-
929
- ### Validators with knowledge about context
930
-
931
- Assume we want to create password validation with a confirmation field.
932
- We don't want to show feedback on group level, but right beneath the fields.
933
-
934
- ```js preview-story
935
- import { LitElement } from 'lit';
936
- import { ScopedElementsMixin } from '@open-wc/scoped-elements/lit-element.js';
937
- const isInterpretableValue = mv => mv && !(mv instanceof Unparseable);
938
-
939
- class PasswordMatch extends Validator {
940
- static get validatorName() {
941
- return 'PasswordsMatch';
942
- }
943
-
944
- execute(modelValue, { first, second }) {
945
- if (isInterpretableValue(first.modelValue) && isInterpretableValue(second.modelValue)) {
946
- return first.modelValue !== second.modelValue;
947
- }
948
- return false;
949
- }
950
- }
951
-
952
- class FieldWithContextValidation extends ScopedElementsMixin(LitElement) {
953
- static get scopedElements() {
954
- return {
955
- 'lion-input': LionInput,
956
- };
957
- }
958
-
959
- firstUpdated() {
960
- const first = this.renderRoot.querySelector('[name="initialPassword"]');
961
- const second = this.renderRoot.querySelector('[name="confirmPassword"]');
962
-
963
- first.validators = [
964
- new PasswordMatch(
965
- { first, second },
966
- { getMessage: () => 'Please match with confirmation field' },
967
- ),
968
- ];
969
- second.validators = [
970
- new PasswordMatch({ first, second }, { getMessage: () => 'Please match with initial field' }),
971
- ];
972
- }
973
-
974
- render() {
975
- return html`
976
- <lion-input type="password" name="initialPassword" label="New password"></lion-input>
977
- <lion-input type="password" name="confirmPassword" label="Confirm password"></lion-input>
978
- `;
979
- }
980
- }
981
-
982
- customElements.define('field-with-context-validation', FieldWithContextValidation);
983
- export const multipleFieldValidation = () =>
984
- html`<field-with-context-validation></field-with-context-validation>`;
985
- ```