@lion/ui 0.6.0-alpha.2 → 0.6.0-alpha.4

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 (311) hide show
  1. package/components/checkbox-group/src/LionCheckboxIndeterminate.js +17 -2
  2. package/components/checkbox-group/test/lion-checkbox-indeterminate-integrations.test.js +3 -0
  3. package/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.js +435 -396
  4. package/components/core/src/ScopedElementsMixin.js +2 -0
  5. package/components/core/src/types.ts +19 -0
  6. package/components/form/src/LionForm.js +24 -0
  7. package/components/form/test/lion-form.test.js +66 -2
  8. package/components/form-core/src/FormControlMixin.js +17 -1
  9. package/components/form-core/src/form-group/FormGroupMixin.js +5 -6
  10. package/components/form-core/test/FormControlMixin.test.js +39 -20
  11. package/components/form-core/test-suites/form-group/FormGroupMixin-input.suite.js +0 -47
  12. package/components/form-core/test-suites/form-group/FormGroupMixin.suite.js +21 -3
  13. package/components/input-range/src/LionInputRange.js +36 -4
  14. package/components/input-range/src/localizeNamespaceLoader.js +75 -0
  15. package/components/input-range/test/lion-input-range.test.js +6 -6
  16. package/components/input-range/translations/bg-BG.js +5 -0
  17. package/components/input-range/translations/bg.js +4 -0
  18. package/components/input-range/translations/cs-CZ.js +5 -0
  19. package/components/input-range/translations/cs.js +4 -0
  20. package/components/input-range/translations/de-DE.js +5 -0
  21. package/components/input-range/translations/de.js +4 -0
  22. package/components/input-range/translations/en-AU.js +5 -0
  23. package/components/input-range/translations/en-GB.js +5 -0
  24. package/components/input-range/translations/en-PH.js +5 -0
  25. package/components/input-range/translations/en-US.js +5 -0
  26. package/components/input-range/translations/en.js +4 -0
  27. package/components/input-range/translations/es-ES.js +5 -0
  28. package/components/input-range/translations/es.js +4 -0
  29. package/components/input-range/translations/fr-BE.js +5 -0
  30. package/components/input-range/translations/fr-FR.js +5 -0
  31. package/components/input-range/translations/fr.js +4 -0
  32. package/components/input-range/translations/hu-HU.js +5 -0
  33. package/components/input-range/translations/hu.js +4 -0
  34. package/components/input-range/translations/it-IT.js +5 -0
  35. package/components/input-range/translations/it.js +4 -0
  36. package/components/input-range/translations/nl-BE.js +5 -0
  37. package/components/input-range/translations/nl-NL.js +5 -0
  38. package/components/input-range/translations/nl.js +4 -0
  39. package/components/input-range/translations/pl-PL.js +5 -0
  40. package/components/input-range/translations/pl.js +4 -0
  41. package/components/input-range/translations/ro-RO.js +5 -0
  42. package/components/input-range/translations/ro.js +4 -0
  43. package/components/input-range/translations/ru-RU.js +5 -0
  44. package/components/input-range/translations/ru.js +4 -0
  45. package/components/input-range/translations/sk-SK.js +5 -0
  46. package/components/input-range/translations/sk.js +4 -0
  47. package/components/input-range/translations/uk-UA.js +5 -0
  48. package/components/input-range/translations/uk.js +4 -0
  49. package/components/input-range/translations/zh-CN.js +5 -0
  50. package/components/input-range/translations/zh.js +4 -0
  51. package/components/input-stepper/src/LionInputStepper.js +56 -33
  52. package/components/input-stepper/src/localizeNamespaceLoader.js +75 -0
  53. package/components/input-stepper/test/lion-input-stepper.test.js +61 -8
  54. package/components/input-stepper/translations/bg-BG.js +5 -0
  55. package/components/input-stepper/translations/bg.js +4 -0
  56. package/components/input-stepper/translations/cs-CZ.js +5 -0
  57. package/components/input-stepper/translations/cs.js +4 -0
  58. package/components/input-stepper/translations/de-DE.js +5 -0
  59. package/components/input-stepper/translations/de.js +4 -0
  60. package/components/input-stepper/translations/en-AU.js +5 -0
  61. package/components/input-stepper/translations/en-GB.js +5 -0
  62. package/components/input-stepper/translations/en-US.js +5 -0
  63. package/components/input-stepper/translations/en.js +4 -0
  64. package/components/input-stepper/translations/es-ES.js +5 -0
  65. package/components/input-stepper/translations/es.js +4 -0
  66. package/components/input-stepper/translations/fr-BE.js +5 -0
  67. package/components/input-stepper/translations/fr-FR.js +5 -0
  68. package/components/input-stepper/translations/fr.js +4 -0
  69. package/components/input-stepper/translations/hu-HU.js +5 -0
  70. package/components/input-stepper/translations/hu.js +4 -0
  71. package/components/input-stepper/translations/it-IT.js +5 -0
  72. package/components/input-stepper/translations/it.js +4 -0
  73. package/components/input-stepper/translations/nl-BE.js +5 -0
  74. package/components/input-stepper/translations/nl-NL.js +5 -0
  75. package/components/input-stepper/translations/nl.js +4 -0
  76. package/components/input-stepper/translations/pl-PL.js +5 -0
  77. package/components/input-stepper/translations/pl.js +4 -0
  78. package/components/input-stepper/translations/ro-RO.js +5 -0
  79. package/components/input-stepper/translations/ro.js +4 -0
  80. package/components/input-stepper/translations/ru-RU.js +5 -0
  81. package/components/input-stepper/translations/ru.js +4 -0
  82. package/components/input-stepper/translations/sk-SK.js +5 -0
  83. package/components/input-stepper/translations/sk.js +4 -0
  84. package/components/input-stepper/translations/uk-UA.js +5 -0
  85. package/components/input-stepper/translations/uk.js +4 -0
  86. package/components/input-stepper/translations/zh.js +4 -0
  87. package/custom-elements.json +1538 -12
  88. package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts +7 -1
  89. package/dist-types/components/checkbox-group/src/LionCheckboxIndeterminate.d.ts.map +1 -1
  90. package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts.map +1 -1
  91. package/dist-types/components/core/src/ScopedElementsMixin.d.ts +3 -352
  92. package/dist-types/components/core/src/ScopedElementsMixin.d.ts.map +1 -1
  93. package/dist-types/components/core/src/types.d.ts +15 -0
  94. package/dist-types/components/core/src/types.d.ts.map +1 -0
  95. package/dist-types/components/form/src/LionForm.d.ts +6 -0
  96. package/dist-types/components/form/src/LionForm.d.ts.map +1 -1
  97. package/dist-types/components/form-core/src/FormControlMixin.d.ts.map +1 -1
  98. package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts.map +1 -1
  99. package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin-input.suite.d.ts.map +1 -1
  100. package/dist-types/components/form-core/test-suites/form-group/FormGroupMixin.suite.d.ts.map +1 -1
  101. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +1 -356
  102. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
  103. package/dist-types/components/input-file/src/LionInputFile.d.ts +1 -349
  104. package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -1
  105. package/dist-types/components/input-file/src/LionSelectedFileList.d.ts +1 -345
  106. package/dist-types/components/input-file/src/LionSelectedFileList.d.ts.map +1 -1
  107. package/dist-types/components/input-range/src/LionInputRange.d.ts +7 -1
  108. package/dist-types/components/input-range/src/LionInputRange.d.ts.map +1 -1
  109. package/dist-types/components/input-range/src/localizeNamespaceLoader.d.ts +2 -0
  110. package/dist-types/components/input-range/src/localizeNamespaceLoader.d.ts.map +1 -0
  111. package/dist-types/components/input-range/translations/bg-BG.d.ts +6 -0
  112. package/dist-types/components/input-range/translations/bg-BG.d.ts.map +1 -0
  113. package/dist-types/components/input-range/translations/bg.d.ts +6 -0
  114. package/dist-types/components/input-range/translations/bg.d.ts.map +1 -0
  115. package/dist-types/components/input-range/translations/cs-CZ.d.ts +6 -0
  116. package/dist-types/components/input-range/translations/cs-CZ.d.ts.map +1 -0
  117. package/dist-types/components/input-range/translations/cs.d.ts +6 -0
  118. package/dist-types/components/input-range/translations/cs.d.ts.map +1 -0
  119. package/dist-types/components/input-range/translations/de-DE.d.ts +6 -0
  120. package/dist-types/components/input-range/translations/de-DE.d.ts.map +1 -0
  121. package/dist-types/components/input-range/translations/de.d.ts +6 -0
  122. package/dist-types/components/input-range/translations/de.d.ts.map +1 -0
  123. package/dist-types/components/input-range/translations/en-AU.d.ts +6 -0
  124. package/dist-types/components/input-range/translations/en-AU.d.ts.map +1 -0
  125. package/dist-types/components/input-range/translations/en-GB.d.ts +6 -0
  126. package/dist-types/components/input-range/translations/en-GB.d.ts.map +1 -0
  127. package/dist-types/components/input-range/translations/en-PH.d.ts +6 -0
  128. package/dist-types/components/input-range/translations/en-PH.d.ts.map +1 -0
  129. package/dist-types/components/input-range/translations/en-US.d.ts +6 -0
  130. package/dist-types/components/input-range/translations/en-US.d.ts.map +1 -0
  131. package/dist-types/components/input-range/translations/en.d.ts +6 -0
  132. package/dist-types/components/input-range/translations/en.d.ts.map +1 -0
  133. package/dist-types/components/input-range/translations/es-ES.d.ts +6 -0
  134. package/dist-types/components/input-range/translations/es-ES.d.ts.map +1 -0
  135. package/dist-types/components/input-range/translations/es.d.ts +6 -0
  136. package/dist-types/components/input-range/translations/es.d.ts.map +1 -0
  137. package/dist-types/components/input-range/translations/fr-BE.d.ts +6 -0
  138. package/dist-types/components/input-range/translations/fr-BE.d.ts.map +1 -0
  139. package/dist-types/components/input-range/translations/fr-FR.d.ts +6 -0
  140. package/dist-types/components/input-range/translations/fr-FR.d.ts.map +1 -0
  141. package/dist-types/components/input-range/translations/fr.d.ts +6 -0
  142. package/dist-types/components/input-range/translations/fr.d.ts.map +1 -0
  143. package/dist-types/components/input-range/translations/hu-HU.d.ts +6 -0
  144. package/dist-types/components/input-range/translations/hu-HU.d.ts.map +1 -0
  145. package/dist-types/components/input-range/translations/hu.d.ts +6 -0
  146. package/dist-types/components/input-range/translations/hu.d.ts.map +1 -0
  147. package/dist-types/components/input-range/translations/it-IT.d.ts +6 -0
  148. package/dist-types/components/input-range/translations/it-IT.d.ts.map +1 -0
  149. package/dist-types/components/input-range/translations/it.d.ts +6 -0
  150. package/dist-types/components/input-range/translations/it.d.ts.map +1 -0
  151. package/dist-types/components/input-range/translations/nl-BE.d.ts +6 -0
  152. package/dist-types/components/input-range/translations/nl-BE.d.ts.map +1 -0
  153. package/dist-types/components/input-range/translations/nl-NL.d.ts +6 -0
  154. package/dist-types/components/input-range/translations/nl-NL.d.ts.map +1 -0
  155. package/dist-types/components/input-range/translations/nl.d.ts +6 -0
  156. package/dist-types/components/input-range/translations/nl.d.ts.map +1 -0
  157. package/dist-types/components/input-range/translations/pl-PL.d.ts +6 -0
  158. package/dist-types/components/input-range/translations/pl-PL.d.ts.map +1 -0
  159. package/dist-types/components/input-range/translations/pl.d.ts +6 -0
  160. package/dist-types/components/input-range/translations/pl.d.ts.map +1 -0
  161. package/dist-types/components/input-range/translations/ro-RO.d.ts +6 -0
  162. package/dist-types/components/input-range/translations/ro-RO.d.ts.map +1 -0
  163. package/dist-types/components/input-range/translations/ro.d.ts +6 -0
  164. package/dist-types/components/input-range/translations/ro.d.ts.map +1 -0
  165. package/dist-types/components/input-range/translations/ru-RU.d.ts +6 -0
  166. package/dist-types/components/input-range/translations/ru-RU.d.ts.map +1 -0
  167. package/dist-types/components/input-range/translations/ru.d.ts +6 -0
  168. package/dist-types/components/input-range/translations/ru.d.ts.map +1 -0
  169. package/dist-types/components/input-range/translations/sk-SK.d.ts +6 -0
  170. package/dist-types/components/input-range/translations/sk-SK.d.ts.map +1 -0
  171. package/dist-types/components/input-range/translations/sk.d.ts +6 -0
  172. package/dist-types/components/input-range/translations/sk.d.ts.map +1 -0
  173. package/dist-types/components/input-range/translations/uk-UA.d.ts +6 -0
  174. package/dist-types/components/input-range/translations/uk-UA.d.ts.map +1 -0
  175. package/dist-types/components/input-range/translations/uk.d.ts +6 -0
  176. package/dist-types/components/input-range/translations/uk.d.ts.map +1 -0
  177. package/dist-types/components/input-range/translations/zh-CN.d.ts +6 -0
  178. package/dist-types/components/input-range/translations/zh-CN.d.ts.map +1 -0
  179. package/dist-types/components/input-range/translations/zh.d.ts +6 -0
  180. package/dist-types/components/input-range/translations/zh.d.ts.map +1 -0
  181. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts +22 -3
  182. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
  183. package/dist-types/components/input-stepper/src/localizeNamespaceLoader.d.ts +2 -0
  184. package/dist-types/components/input-stepper/src/localizeNamespaceLoader.d.ts.map +1 -0
  185. package/dist-types/components/input-stepper/translations/bg-BG.d.ts +6 -0
  186. package/dist-types/components/input-stepper/translations/bg-BG.d.ts.map +1 -0
  187. package/dist-types/components/input-stepper/translations/bg.d.ts +6 -0
  188. package/dist-types/components/input-stepper/translations/bg.d.ts.map +1 -0
  189. package/dist-types/components/input-stepper/translations/cs-CZ.d.ts +6 -0
  190. package/dist-types/components/input-stepper/translations/cs-CZ.d.ts.map +1 -0
  191. package/dist-types/components/input-stepper/translations/cs.d.ts +6 -0
  192. package/dist-types/components/input-stepper/translations/cs.d.ts.map +1 -0
  193. package/dist-types/components/input-stepper/translations/de-DE.d.ts +6 -0
  194. package/dist-types/components/input-stepper/translations/de-DE.d.ts.map +1 -0
  195. package/dist-types/components/input-stepper/translations/de.d.ts +6 -0
  196. package/dist-types/components/input-stepper/translations/de.d.ts.map +1 -0
  197. package/dist-types/components/input-stepper/translations/en-AU.d.ts +6 -0
  198. package/dist-types/components/input-stepper/translations/en-AU.d.ts.map +1 -0
  199. package/dist-types/components/input-stepper/translations/en-GB.d.ts +6 -0
  200. package/dist-types/components/input-stepper/translations/en-GB.d.ts.map +1 -0
  201. package/dist-types/components/input-stepper/translations/en-US.d.ts +6 -0
  202. package/dist-types/components/input-stepper/translations/en-US.d.ts.map +1 -0
  203. package/dist-types/components/input-stepper/translations/en.d.ts +6 -0
  204. package/dist-types/components/input-stepper/translations/en.d.ts.map +1 -0
  205. package/dist-types/components/input-stepper/translations/es-ES.d.ts +6 -0
  206. package/dist-types/components/input-stepper/translations/es-ES.d.ts.map +1 -0
  207. package/dist-types/components/input-stepper/translations/es.d.ts +6 -0
  208. package/dist-types/components/input-stepper/translations/es.d.ts.map +1 -0
  209. package/dist-types/components/input-stepper/translations/fr-BE.d.ts +6 -0
  210. package/dist-types/components/input-stepper/translations/fr-BE.d.ts.map +1 -0
  211. package/dist-types/components/input-stepper/translations/fr-FR.d.ts +6 -0
  212. package/dist-types/components/input-stepper/translations/fr-FR.d.ts.map +1 -0
  213. package/dist-types/components/input-stepper/translations/fr.d.ts +6 -0
  214. package/dist-types/components/input-stepper/translations/fr.d.ts.map +1 -0
  215. package/dist-types/components/input-stepper/translations/hu-HU.d.ts +6 -0
  216. package/dist-types/components/input-stepper/translations/hu-HU.d.ts.map +1 -0
  217. package/dist-types/components/input-stepper/translations/hu.d.ts +6 -0
  218. package/dist-types/components/input-stepper/translations/hu.d.ts.map +1 -0
  219. package/dist-types/components/input-stepper/translations/it-IT.d.ts +6 -0
  220. package/dist-types/components/input-stepper/translations/it-IT.d.ts.map +1 -0
  221. package/dist-types/components/input-stepper/translations/it.d.ts +6 -0
  222. package/dist-types/components/input-stepper/translations/it.d.ts.map +1 -0
  223. package/dist-types/components/input-stepper/translations/nl-BE.d.ts +6 -0
  224. package/dist-types/components/input-stepper/translations/nl-BE.d.ts.map +1 -0
  225. package/dist-types/components/input-stepper/translations/nl-NL.d.ts +6 -0
  226. package/dist-types/components/input-stepper/translations/nl-NL.d.ts.map +1 -0
  227. package/dist-types/components/input-stepper/translations/nl.d.ts +6 -0
  228. package/dist-types/components/input-stepper/translations/nl.d.ts.map +1 -0
  229. package/dist-types/components/input-stepper/translations/pl-PL.d.ts +6 -0
  230. package/dist-types/components/input-stepper/translations/pl-PL.d.ts.map +1 -0
  231. package/dist-types/components/input-stepper/translations/pl.d.ts +6 -0
  232. package/dist-types/components/input-stepper/translations/pl.d.ts.map +1 -0
  233. package/dist-types/components/input-stepper/translations/ro-RO.d.ts +6 -0
  234. package/dist-types/components/input-stepper/translations/ro-RO.d.ts.map +1 -0
  235. package/dist-types/components/input-stepper/translations/ro.d.ts +6 -0
  236. package/dist-types/components/input-stepper/translations/ro.d.ts.map +1 -0
  237. package/dist-types/components/input-stepper/translations/ru-RU.d.ts +6 -0
  238. package/dist-types/components/input-stepper/translations/ru-RU.d.ts.map +1 -0
  239. package/dist-types/components/input-stepper/translations/ru.d.ts +6 -0
  240. package/dist-types/components/input-stepper/translations/ru.d.ts.map +1 -0
  241. package/dist-types/components/input-stepper/translations/sk-SK.d.ts +6 -0
  242. package/dist-types/components/input-stepper/translations/sk-SK.d.ts.map +1 -0
  243. package/dist-types/components/input-stepper/translations/sk.d.ts +6 -0
  244. package/dist-types/components/input-stepper/translations/sk.d.ts.map +1 -0
  245. package/dist-types/components/input-stepper/translations/uk-UA.d.ts +6 -0
  246. package/dist-types/components/input-stepper/translations/uk-UA.d.ts.map +1 -0
  247. package/dist-types/components/input-stepper/translations/uk.d.ts +6 -0
  248. package/dist-types/components/input-stepper/translations/uk.d.ts.map +1 -0
  249. package/dist-types/components/input-stepper/translations/zh.d.ts +6 -0
  250. package/dist-types/components/input-stepper/translations/zh.d.ts.map +1 -0
  251. package/dist-types/components/select-rich/src/LionSelectRich.d.ts +1 -345
  252. package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
  253. package/dist-types/components/switch/src/LionSwitch.d.ts +2 -348
  254. package/dist-types/components/switch/src/LionSwitch.d.ts.map +1 -1
  255. package/dist-types/tsconfig.tsbuildinfo +1 -1
  256. package/docs/components/checkbox-group/overview.md +2 -2
  257. package/docs/components/collapsible/overview.md +1 -1
  258. package/docs/components/combobox/overview.md +1 -1
  259. package/docs/components/combobox/use-cases.md +1 -1
  260. package/docs/components/dialog/overview.md +1 -1
  261. package/docs/components/fieldset/overview.md +5 -5
  262. package/docs/components/fieldset/use-cases.md +0 -1
  263. package/docs/components/form/overview.md +22 -11
  264. package/docs/components/form/use-cases.md +10 -14
  265. package/docs/components/icon/use-cases.md +1 -1
  266. package/docs/components/input/overview.md +1 -1
  267. package/docs/components/input-amount/overview.md +3 -3
  268. package/docs/components/input-date/overview.md +3 -3
  269. package/docs/components/input-datepicker/overview.md +5 -5
  270. package/docs/components/input-email/overview.md +2 -2
  271. package/docs/components/input-file/overview.md +1 -1
  272. package/docs/components/input-iban/overview.md +2 -2
  273. package/docs/components/input-range/overview.md +4 -6
  274. package/docs/components/input-range/use-cases.md +40 -48
  275. package/docs/components/input-stepper/overview.md +8 -8
  276. package/docs/components/input-stepper/use-cases.md +30 -21
  277. package/docs/components/input-tel/overview.md +1 -1
  278. package/docs/components/input-tel/use-cases.md +6 -6
  279. package/docs/components/input-tel-dropdown/overview.md +1 -1
  280. package/docs/components/radio-group/overview.md +3 -3
  281. package/docs/components/select-rich/use-cases.md +1 -1
  282. package/docs/components/tabs/examples.md +1 -1
  283. package/docs/fundamentals/index.md +4 -4
  284. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
  285. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
  286. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
  287. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
  288. package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
  289. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  290. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  291. package/docs/fundamentals/rationales/accessibility.md +1 -1
  292. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  293. package/docs/fundamentals/systems/core/overview.md +1 -1
  294. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  295. package/docs/fundamentals/systems/form/model-value.md +1 -1
  296. package/docs/fundamentals/systems/form/overview.md +28 -28
  297. package/docs/fundamentals/systems/form/use-cases.md +16 -5
  298. package/docs/fundamentals/systems/form/validate.md +1 -1
  299. package/docs/fundamentals/systems/localize/overview.md +4 -4
  300. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  301. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  302. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  303. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  304. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  305. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  306. package/docs/guides/how-to/create-a-form.md +4 -4
  307. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  308. package/docs/guides/index.md +8 -8
  309. package/docs/guides/principles/index.md +5 -5
  310. package/docs/guides/principles/styling.md +1 -1
  311. package/package.json +3 -1
@@ -0,0 +1,5 @@
1
+ import de from './de.js';
2
+
3
+ export default {
4
+ ...de,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimum',
3
+ maximum: 'Maximum',
4
+ };
@@ -0,0 +1,5 @@
1
+ import en from './en.js';
2
+
3
+ export default {
4
+ ...en,
5
+ };
@@ -0,0 +1,5 @@
1
+ import en from './en.js';
2
+
3
+ export default {
4
+ ...en,
5
+ };
@@ -0,0 +1,5 @@
1
+ import en from './en.js';
2
+
3
+ export default {
4
+ ...en,
5
+ };
@@ -0,0 +1,5 @@
1
+ import en from './en.js';
2
+
3
+ export default {
4
+ ...en,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimum',
3
+ maximum: 'Maximum',
4
+ };
@@ -0,0 +1,5 @@
1
+ import es from './es.js';
2
+
3
+ export default {
4
+ ...es,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Mínimo',
3
+ maximum: 'Máximo',
4
+ };
@@ -0,0 +1,5 @@
1
+ import fr from './fr.js';
2
+
3
+ export default {
4
+ ...fr,
5
+ };
@@ -0,0 +1,5 @@
1
+ import fr from './fr.js';
2
+
3
+ export default {
4
+ ...fr,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimum',
3
+ maximum: 'Maximum',
4
+ };
@@ -0,0 +1,5 @@
1
+ import hu from './hu.js';
2
+
3
+ export default {
4
+ ...hu,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimum',
3
+ maximum: 'Maximum',
4
+ };
@@ -0,0 +1,5 @@
1
+ import it from './it.js';
2
+
3
+ export default {
4
+ ...it,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimo',
3
+ maximum: 'Massimo',
4
+ };
@@ -0,0 +1,5 @@
1
+ import nl from './nl.js';
2
+
3
+ export default {
4
+ ...nl,
5
+ };
@@ -0,0 +1,5 @@
1
+ import nl from './nl.js';
2
+
3
+ export default {
4
+ ...nl,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimum',
3
+ maximum: 'Maximum',
4
+ };
@@ -0,0 +1,5 @@
1
+ import pl from './pl.js';
2
+
3
+ export default {
4
+ ...pl,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimum',
3
+ maximum: 'Maksymalnie',
4
+ };
@@ -0,0 +1,5 @@
1
+ import ro from './ro.js';
2
+
3
+ export default {
4
+ ...ro,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minim',
3
+ maximum: 'Maxim',
4
+ };
@@ -0,0 +1,5 @@
1
+ import ru from './ru.js';
2
+
3
+ export default {
4
+ ...ru,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Минимум',
3
+ maximum: 'Максимум',
4
+ };
@@ -0,0 +1,5 @@
1
+ import sk from './sk.js';
2
+
3
+ export default {
4
+ ...sk,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Minimálne',
3
+ maximum: 'Maximálne',
4
+ };
@@ -0,0 +1,5 @@
1
+ import uk from './uk.js';
2
+
3
+ export default {
4
+ ...uk,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: 'Мінімум',
3
+ maximum: 'Максимум',
4
+ };
@@ -0,0 +1,5 @@
1
+ import zh from './zh.js';
2
+
3
+ export default {
4
+ ...zh,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ minimum: '最少',
3
+ maximum: '最多',
4
+ };
@@ -1,6 +1,8 @@
1
1
  import { html, css, render } from 'lit';
2
+ import { LocalizeMixin } from '@lion/ui/localize-no-side-effects.js';
2
3
  import { LionInput } from '@lion/ui/input.js';
3
4
  import { IsNumber, MinNumber, MaxNumber } from '@lion/ui/form-core.js';
5
+ import { localizeNamespaceLoader } from './localizeNamespaceLoader.js';
4
6
 
5
7
  /**
6
8
  * @typedef {import('lit').RenderOptions} RenderOptions
@@ -11,7 +13,7 @@ import { IsNumber, MinNumber, MaxNumber } from '@lion/ui/form-core.js';
11
13
  *
12
14
  * @customElement lion-input-stepper
13
15
  */
14
- export class LionInputStepper extends LionInput {
16
+ export class LionInputStepper extends LocalizeMixin(LionInput) {
15
17
  static get styles() {
16
18
  return [
17
19
  ...super.styles,
@@ -41,6 +43,11 @@ export class LionInputStepper extends LionInput {
41
43
  };
42
44
  }
43
45
 
46
+ static localizeNamespaces = [
47
+ { 'lion-input-stepper': localizeNamespaceLoader },
48
+ ...super.localizeNamespaces,
49
+ ];
50
+
44
51
  /**
45
52
  * @returns {number}
46
53
  */
@@ -82,9 +89,7 @@ export class LionInputStepper extends LionInput {
82
89
  this.addEventListener('keydown', this.__keyDownHandler);
83
90
  this._inputNode.setAttribute('inputmode', 'decimal');
84
91
  this._inputNode.setAttribute('autocomplete', 'off');
85
- this.setAttribute('aria-label', this.label);
86
- this.step = this.hasAttribute('step') ? this.step : 1;
87
- this.__setAriaLabelsAndValidator();
92
+ this.__setDefaultValidators();
88
93
  this.__toggleSpinnerButtonsState();
89
94
  }
90
95
 
@@ -117,6 +122,14 @@ export class LionInputStepper extends LionInput {
117
122
  this._inputNode.step = `${this.step}`;
118
123
  this.values.step = this.step;
119
124
  }
125
+
126
+ if (changedProperties.has('_ariaLabelledNodes')) {
127
+ this.__reflectAriaAttrToSpinButton('aria-labelledby', this._ariaLabelledNodes);
128
+ }
129
+
130
+ if (changedProperties.has('_ariaDescribedNodes')) {
131
+ this.__reflectAriaAttrToSpinButton('aria-describedby', this._ariaDescribedNodes);
132
+ }
120
133
  }
121
134
 
122
135
  get slots() {
@@ -128,41 +141,47 @@ export class LionInputStepper extends LionInput {
128
141
  }
129
142
 
130
143
  /**
131
- * Set aria labels and apply validators
144
+ * Based on FormControlMixin __reflectAriaAttr()
145
+ *
146
+ * Will handle help text, validation feedback and character counter,
147
+ * prefix/suffix/before/after (if they contain data-description flag attr).
148
+ * Also, contents of id references that will be put in the <lion-field>._ariaDescribedby property
149
+ * from an external context, will be read by a screen reader.
150
+ * @param {string} attrName
151
+ * @param {Element[]} nodes
132
152
  * @private
133
153
  */
134
- __setAriaLabelsAndValidator() {
135
- const ariaAttributes = {
136
- 'aria-valuemax': this.values.max,
137
- 'aria-valuemin': this.values.min,
138
- };
154
+ __reflectAriaAttrToSpinButton(attrName, nodes) {
155
+ const string = nodes.map(n => n.id).join(' ');
156
+ this.setAttribute(attrName, string);
157
+ }
139
158
 
140
- const minMaxValidators = /** @type {(MaxNumber | MinNumber)[]} */ (
141
- Object.entries(ariaAttributes)
142
- .map(([key, val]) => {
143
- if (val !== Infinity) {
144
- this.setAttribute(key, `${val}`);
145
- return key === 'aria-valuemax' ? new MaxNumber(val) : new MinNumber(val);
146
- }
147
- return null;
148
- })
149
- .filter(validator => validator !== null)
159
+ /**
160
+ * Set aria labels and apply validators
161
+ * @private
162
+ */
163
+ __setDefaultValidators() {
164
+ const validators = /** @type {(IsNumber| MaxNumber | MinNumber)[]} */ (
165
+ [
166
+ new IsNumber(),
167
+ this.min !== Infinity ? new MinNumber(this.min) : null,
168
+ this.max !== Infinity ? new MaxNumber(this.max) : null,
169
+ ].filter(validator => validator !== null)
150
170
  );
151
- const validators = [new IsNumber(), ...minMaxValidators];
152
171
  this.defaultValidators.push(...validators);
153
172
  }
154
173
 
155
174
  /**
156
175
  * Update values on keyboard arrow up and down event
157
- * @param {KeyboardEvent} e - keyboard event
176
+ * @param {KeyboardEvent} ev - keyboard event
158
177
  * @private
159
178
  */
160
- __keyDownHandler(e) {
161
- if (e.key === 'ArrowUp') {
179
+ __keyDownHandler(ev) {
180
+ if (ev.key === 'ArrowUp') {
162
181
  this.__increment();
163
182
  }
164
183
 
165
- if (e.key === 'ArrowDown') {
184
+ if (ev.key === 'ArrowDown') {
166
185
  this.__decrement();
167
186
  }
168
187
  }
@@ -177,6 +196,12 @@ export class LionInputStepper extends LionInput {
177
196
  const incrementButton = this.__getSlot('suffix');
178
197
  const disableIncrementor = this.currentValue >= max && max !== Infinity;
179
198
  const disableDecrementor = this.currentValue <= min && min !== Infinity;
199
+ if (
200
+ (disableDecrementor && decrementButton === document.activeElement) ||
201
+ (disableIncrementor && incrementButton === document.activeElement)
202
+ ) {
203
+ this._inputNode.focus();
204
+ }
180
205
  decrementButton[disableDecrementor ? 'setAttribute' : 'removeAttribute']('disabled', 'true');
181
206
  incrementButton[disableIncrementor ? 'setAttribute' : 'removeAttribute']('disabled', 'true');
182
207
  this.setAttribute('aria-valuenow', `${this.currentValue}`);
@@ -201,10 +226,10 @@ export class LionInputStepper extends LionInput {
201
226
  * @private
202
227
  */
203
228
  __increment() {
204
- const { step, max } = this.values;
229
+ const { step, min, max } = this.values;
205
230
  const newValue = this.currentValue + step;
206
231
  if (newValue <= max || max === Infinity) {
207
- this.value = `${newValue}`;
232
+ this.value = newValue < min && min !== Infinity ? `${min}` : `${newValue}`;
208
233
  this.__toggleSpinnerButtonsState();
209
234
  this._proxyInputEvent();
210
235
  }
@@ -215,10 +240,10 @@ export class LionInputStepper extends LionInput {
215
240
  * @private
216
241
  */
217
242
  __decrement() {
218
- const { step, min } = this.values;
243
+ const { step, min, max } = this.values;
219
244
  const newValue = this.currentValue - step;
220
245
  if (newValue >= min || min === Infinity) {
221
- this.value = `${newValue}`;
246
+ this.value = newValue > max && max !== Infinity ? `${max}` : `${newValue}`;
222
247
  this.__toggleSpinnerButtonsState();
223
248
  this._proxyInputEvent();
224
249
  }
@@ -301,9 +326,8 @@ export class LionInputStepper extends LionInput {
301
326
  ?disabled=${this.disabled || this.readOnly}
302
327
  @click=${this.__decrement}
303
328
  @blur=${this.__boundOnLeaveButton}
304
- tabindex="-1"
305
329
  type="button"
306
- aria-label="decrement"
330
+ aria-label="${this.msgLit('lion-input-stepper:decrease')}"
307
331
  >
308
332
  ${this._decrementorSignTemplate()}
309
333
  </button>
@@ -321,9 +345,8 @@ export class LionInputStepper extends LionInput {
321
345
  ?disabled=${this.disabled || this.readOnly}
322
346
  @click=${this.__increment}
323
347
  @blur=${this.__boundOnLeaveButton}
324
- tabindex="-1"
325
348
  type="button"
326
- aria-label="increment"
349
+ aria-label="${this.msgLit('lion-input-stepper:increase')}"
327
350
  >
328
351
  ${this._incrementorSignTemplate()}
329
352
  </button>
@@ -0,0 +1,75 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
2
+ export const localizeNamespaceLoader = /** @param {string} locale */ locale => {
3
+ switch (locale) {
4
+ case 'bg-BG':
5
+ return import('@lion/ui/input-stepper-translations/bg-BG.js');
6
+ case 'bg':
7
+ return import('@lion/ui/input-stepper-translations/bg.js');
8
+ case 'cs-CZ':
9
+ return import('@lion/ui/input-stepper-translations/cs-CZ.js');
10
+ case 'cs':
11
+ return import('@lion/ui/input-stepper-translations/cs.js');
12
+ case 'de-DE':
13
+ return import('@lion/ui/input-stepper-translations/de-DE.js');
14
+ case 'de':
15
+ return import('@lion/ui/input-stepper-translations/de.js');
16
+ case 'en-AU':
17
+ return import('@lion/ui/input-stepper-translations/en-AU.js');
18
+ case 'en-GB':
19
+ return import('@lion/ui/input-stepper-translations/en-GB.js');
20
+ case 'en-US':
21
+ return import('@lion/ui/input-stepper-translations/en-US.js');
22
+ case 'en-PH':
23
+ case 'en':
24
+ return import('@lion/ui/input-stepper-translations/en.js');
25
+ case 'es-ES':
26
+ return import('@lion/ui/input-stepper-translations/es-ES.js');
27
+ case 'es':
28
+ return import('@lion/ui/input-stepper-translations/es.js');
29
+ case 'fr-FR':
30
+ return import('@lion/ui/input-stepper-translations/fr-FR.js');
31
+ case 'fr-BE':
32
+ return import('@lion/ui/input-stepper-translations/fr-BE.js');
33
+ case 'fr':
34
+ return import('@lion/ui/input-stepper-translations/fr.js');
35
+ case 'hu-HU':
36
+ return import('@lion/ui/input-stepper-translations/hu-HU.js');
37
+ case 'hu':
38
+ return import('@lion/ui/input-stepper-translations/hu.js');
39
+ case 'it-IT':
40
+ return import('@lion/ui/input-stepper-translations/it-IT.js');
41
+ case 'it':
42
+ return import('@lion/ui/input-stepper-translations/it.js');
43
+ case 'nl-BE':
44
+ return import('@lion/ui/input-stepper-translations/nl-BE.js');
45
+ case 'nl-NL':
46
+ return import('@lion/ui/input-stepper-translations/nl-NL.js');
47
+ case 'nl':
48
+ return import('@lion/ui/input-stepper-translations/nl.js');
49
+ case 'pl-PL':
50
+ return import('@lion/ui/input-stepper-translations/pl-PL.js');
51
+ case 'pl':
52
+ return import('@lion/ui/input-stepper-translations/pl.js');
53
+ case 'ro-RO':
54
+ return import('@lion/ui/input-stepper-translations/ro-RO.js');
55
+ case 'ro':
56
+ return import('@lion/ui/input-stepper-translations/ro.js');
57
+ case 'ru-RU':
58
+ return import('@lion/ui/input-stepper-translations/ru-RU.js');
59
+ case 'ru':
60
+ return import('@lion/ui/input-stepper-translations/ru.js');
61
+ case 'sk-SK':
62
+ return import('@lion/ui/input-stepper-translations/sk-SK.js');
63
+ case 'sk':
64
+ return import('@lion/ui/input-stepper-translations/sk.js');
65
+ case 'uk-UA':
66
+ return import('@lion/ui/input-stepper-translations/uk-UA.js');
67
+ case 'uk':
68
+ return import('@lion/ui/input-stepper-translations/uk.js');
69
+ case 'zh-CN':
70
+ case 'zh':
71
+ return import('@lion/ui/input-stepper-translations/zh.js');
72
+ default:
73
+ return import('@lion/ui/input-stepper-translations/en.js');
74
+ }
75
+ };
@@ -12,7 +12,11 @@ const fixture = /** @type {(arg: TemplateResult|string) => Promise<LionInputStep
12
12
  const defaultInputStepper = html`
13
13
  <lion-input-stepper name="year" label="Years"></lion-input-stepper>
14
14
  `;
15
- const inputStepperWithAttrs = html`<lion-input-stepper min="100" max="200"></lion-input-stepper>`;
15
+ const inputStepperWithAttrs = html`<lion-input-stepper
16
+ step="10"
17
+ min="100"
18
+ max="200"
19
+ ></lion-input-stepper>`;
16
20
 
17
21
  describe('<lion-input-stepper>', () => {
18
22
  describe('Stepper', () => {
@@ -20,9 +24,64 @@ describe('<lion-input-stepper>', () => {
20
24
  const el = await fixture(defaultInputStepper);
21
25
  expect(el._inputNode.type).to.equal('text');
22
26
  });
27
+
28
+ it('has a default min and max of Infinity', async () => {
29
+ const el = await fixture(defaultInputStepper);
30
+ expect(el.getAttribute('min')).to.equal('Infinity');
31
+ expect(el.getAttribute('max')).to.equal('Infinity');
32
+ });
33
+
34
+ it('has a default step of 1', async () => {
35
+ const el = await fixture(defaultInputStepper);
36
+ expect(el.getAttribute('step')).to.equal('1');
37
+ });
38
+
39
+ it('can set a step with which the value increases', async () => {
40
+ const el = await fixture(defaultInputStepper);
41
+ el.step = 10;
42
+ await el.updateComplete;
43
+ expect(el.value).to.equal('');
44
+ expect(el.getAttribute('step')).to.equal('10');
45
+
46
+ const incrementButton = el.querySelector('[slot=suffix]');
47
+ incrementButton?.dispatchEvent(new Event('click'));
48
+ expect(el.value).to.equal('10');
49
+ });
23
50
  });
24
51
 
25
52
  describe('User interaction', () => {
53
+ it('should increment the value to 1 on [ArrowUp]', async () => {
54
+ const el = await fixture(defaultInputStepper);
55
+ expect(el.value).to.equal('');
56
+ el.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowUp' }));
57
+ await el.updateComplete;
58
+ expect(el.value).to.equal('1');
59
+ });
60
+
61
+ it('should increment the value to minValue on [ArrowUp] if value is below min', async () => {
62
+ const el = await fixture(inputStepperWithAttrs);
63
+ expect(el.value).to.equal('');
64
+ el.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowUp' }));
65
+ await el.updateComplete;
66
+ expect(el.value).to.equal('100');
67
+ });
68
+
69
+ it('should decrement the value to -1 on [ArrowDown]', async () => {
70
+ const el = await fixture(defaultInputStepper);
71
+ expect(el.value).to.equal('');
72
+ el.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown' }));
73
+ await el.updateComplete;
74
+ expect(el.value).to.equal('-1');
75
+ });
76
+
77
+ it('should increment the value to minValue on [ArrowDown] if value is below min', async () => {
78
+ const el = await fixture(inputStepperWithAttrs);
79
+ el.modelValue = 600;
80
+ el.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowDown' }));
81
+ await el.updateComplete;
82
+ expect(el.value).to.equal('200');
83
+ });
84
+
26
85
  it('should increment the value to 1 on + button click', async () => {
27
86
  const el = await fixture(defaultInputStepper);
28
87
  expect(el.value).to.equal('');
@@ -174,14 +233,8 @@ describe('<lion-input-stepper>', () => {
174
233
  await expect(el).to.be.accessible();
175
234
  });
176
235
 
177
- it('adds aria-valuemax and aria-valuemin when min and max are provided', async () => {
178
- const el = await fixture(inputStepperWithAttrs);
179
- expect(el).to.have.attribute('aria-valuemax', '200');
180
- expect(el).to.have.attribute('aria-valuemin', '100');
181
- });
182
-
183
236
  it('updates aria-valuenow when stepper is changed', async () => {
184
- const el = await fixture(inputStepperWithAttrs);
237
+ const el = await fixture(defaultInputStepper);
185
238
  const incrementButton = el.querySelector('[slot=suffix]');
186
239
  incrementButton?.dispatchEvent(new Event('click'));
187
240
  expect(el).to.have.attribute('aria-valuenow', '1');
@@ -0,0 +1,5 @@
1
+ import bg from './bg.js';
2
+
3
+ export default {
4
+ ...bg,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ decrease: 'Намаляване',
3
+ increase: 'Увеличаване',
4
+ };
@@ -0,0 +1,5 @@
1
+ import cs from './cs.js';
2
+
3
+ export default {
4
+ ...cs,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ decrease: 'Snížit',
3
+ increase: 'Zvýšit',
4
+ };
@@ -0,0 +1,5 @@
1
+ import de from './de.js';
2
+
3
+ export default {
4
+ ...de,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ decrease: 'Verringern',
3
+ increase: 'Erhöhen',
4
+ };
@@ -0,0 +1,5 @@
1
+ import en from './en.js';
2
+
3
+ export default {
4
+ ...en,
5
+ };
@@ -0,0 +1,5 @@
1
+ import en from './en.js';
2
+
3
+ export default {
4
+ ...en,
5
+ };
@@ -0,0 +1,5 @@
1
+ import en from './en.js';
2
+
3
+ export default {
4
+ ...en,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ decrease: 'Decrease',
3
+ increase: 'Increase',
4
+ };
@@ -0,0 +1,5 @@
1
+ import es from './es.js';
2
+
3
+ export default {
4
+ ...es,
5
+ };
@@ -0,0 +1,4 @@
1
+ export default {
2
+ decrease: 'Disminuir',
3
+ increase: 'Aumentar',
4
+ };
@@ -0,0 +1,5 @@
1
+ import fr from './fr.js';
2
+
3
+ export default {
4
+ ...fr,
5
+ };
@@ -0,0 +1,5 @@
1
+ import fr from './fr.js';
2
+
3
+ export default {
4
+ ...fr,
5
+ };