@eunomia/elements 1.0.0-beta.5 → 1.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (516) hide show
  1. package/README.md +2 -2
  2. package/dist/breakpoints.d.ts +37 -10
  3. package/dist/breakpoints.js +38 -10
  4. package/dist/cdn/components/chunks/{chunk-MMLIPCOY.js → chunk-22D3SRFR.js} +1 -1
  5. package/dist/cdn/components/chunks/chunk-36KLGY6U.js +209 -0
  6. package/dist/cdn/components/chunks/chunk-3BMACIDO.js +1 -0
  7. package/dist/cdn/components/chunks/{chunk-IDKZKLJR.js → chunk-3PNGQEG4.js} +24 -11
  8. package/dist/cdn/components/chunks/{chunk-NBIENHLV.js → chunk-5XPOGBPL.js} +18 -18
  9. package/dist/cdn/components/chunks/chunk-624VJYNA.js +1 -0
  10. package/dist/cdn/components/chunks/chunk-62RLISRD.js +1 -0
  11. package/dist/cdn/components/chunks/{chunk-6ETDXUH2.js → chunk-6FYW5TQU.js} +7 -7
  12. package/dist/cdn/components/chunks/chunk-AK2DIJX7.js +1 -0
  13. package/dist/cdn/components/chunks/chunk-B5XMGWM7.js +10 -0
  14. package/dist/cdn/components/chunks/chunk-BKZGTCMF.js +1 -0
  15. package/dist/cdn/components/chunks/{chunk-GW3VP2L7.js → chunk-BO3JOEWM.js} +1 -1
  16. package/dist/cdn/components/chunks/chunk-BVASCT2V.js +109 -0
  17. package/dist/cdn/components/chunks/{chunk-DKOPI7QA.js → chunk-DGI7TKCU.js} +83 -68
  18. package/dist/cdn/components/chunks/chunk-EUWUDCBZ.js +1 -0
  19. package/dist/cdn/components/chunks/{chunk-P32B7BFD.js → chunk-FF3I7C3C.js} +15 -15
  20. package/dist/cdn/components/chunks/{chunk-74AOAB4X.js → chunk-FOILAXLL.js} +6 -5
  21. package/dist/cdn/components/chunks/{chunk-LGLQ36QB.js → chunk-GDBPWZN6.js} +1 -1
  22. package/dist/cdn/components/chunks/chunk-GVS6IUKC.js +1 -0
  23. package/dist/cdn/components/chunks/chunk-GWLD2I3P.js +8 -0
  24. package/dist/cdn/components/chunks/{chunk-JRGM3W7I.js → chunk-I4ERDXSM.js} +9 -4
  25. package/dist/cdn/components/chunks/{chunk-AIS3UICU.js → chunk-J3SZBXM6.js} +11 -7
  26. package/dist/cdn/components/chunks/{chunk-5XJGYXW7.js → chunk-LVKMAHMU.js} +11 -1
  27. package/dist/cdn/components/chunks/{chunk-SD2WHGPF.js → chunk-MQQJ6DID.js} +1 -1
  28. package/dist/cdn/components/chunks/{chunk-A4EQSU36.js → chunk-O7PHBLH2.js} +1 -1
  29. package/dist/cdn/components/chunks/chunk-PD62MBOJ.js +1 -0
  30. package/dist/cdn/components/chunks/{chunk-5EVP7YNE.js → chunk-PPCHQG7P.js} +1 -1
  31. package/dist/cdn/components/chunks/{chunk-MPQP4R54.js → chunk-PXF554MD.js} +10 -9
  32. package/dist/cdn/components/chunks/chunk-QL5GSW2A.js +1 -0
  33. package/dist/cdn/components/chunks/{chunk-5XJLIHAU.js → chunk-QXQ25SQS.js} +24 -20
  34. package/dist/cdn/components/chunks/chunk-SMTIDNGW.js +1 -0
  35. package/dist/cdn/components/chunks/{chunk-PED5ATYN.js → chunk-SVGWCKWT.js} +2 -2
  36. package/dist/cdn/components/chunks/{chunk-2XASWWKR.js → chunk-TFTRCIIK.js} +9 -8
  37. package/dist/cdn/components/chunks/chunk-TLBXTBMM.js +46 -0
  38. package/dist/cdn/components/chunks/chunk-UVHVQRPT.js +1 -0
  39. package/dist/cdn/components/chunks/{chunk-L65WUTXM.js → chunk-UYZR4JXZ.js} +12 -7
  40. package/dist/cdn/components/chunks/chunk-VG6NAAIV.js +1 -0
  41. package/dist/cdn/components/chunks/chunk-VJCNHMQZ.js +10 -0
  42. package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +1 -0
  43. package/dist/cdn/components/chunks/{chunk-XH6NREVZ.js → chunk-YITWLCD3.js} +1 -1
  44. package/dist/cdn/components/chunks/{chunk-OW7XKDCH.js → chunk-Z3OFIE7S.js} +16 -16
  45. package/dist/cdn/components/chunks/{chunk-BQHYZB2W.js → chunk-ZBN4HTWP.js} +1 -1
  46. package/dist/cdn/components/eun-alert.js +33 -18
  47. package/dist/cdn/components/eun-animate.js +14 -10
  48. package/dist/cdn/components/eun-badge.js +2 -2
  49. package/dist/cdn/components/eun-breadcrumb.js +25 -41
  50. package/dist/cdn/components/eun-button.js +1 -1
  51. package/dist/cdn/components/eun-calendar.js +67 -65
  52. package/dist/cdn/components/eun-card.js +34 -19
  53. package/dist/cdn/components/eun-carousel.js +76 -42
  54. package/dist/cdn/components/eun-check-card.js +13 -6
  55. package/dist/cdn/components/eun-checkbox-list.js +11 -8
  56. package/dist/cdn/components/eun-checkbox.js +1 -1
  57. package/dist/cdn/components/eun-chip.js +3 -3
  58. package/dist/cdn/components/eun-collapse.js +56 -27
  59. package/dist/cdn/components/eun-color-picker.js +79 -86
  60. package/dist/cdn/components/eun-counter.js +16 -15
  61. package/dist/cdn/components/eun-date-picker.js +71 -67
  62. package/dist/cdn/components/eun-description-list.js +152 -0
  63. package/dist/cdn/components/eun-divider.js +3 -3
  64. package/dist/cdn/components/eun-drawer.js +34 -20
  65. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  66. package/dist/cdn/components/eun-dropdown-item.js +6 -5
  67. package/dist/cdn/components/eun-fab.js +17 -16
  68. package/dist/cdn/components/eun-icon.js +1 -1
  69. package/dist/cdn/components/eun-image-card.js +79 -22
  70. package/dist/cdn/components/eun-image-carousel.js +92 -47
  71. package/dist/cdn/components/eun-infinite-list.js +23 -11
  72. package/dist/cdn/components/eun-input-file.js +20 -19
  73. package/dist/cdn/components/eun-input-phone.js +17 -16
  74. package/dist/cdn/components/eun-input.js +1 -1
  75. package/dist/cdn/components/eun-label.js +4 -4
  76. package/dist/cdn/components/eun-link.js +78 -29
  77. package/dist/cdn/components/eun-loader.js +1 -1
  78. package/dist/cdn/components/eun-modal.js +27 -20
  79. package/dist/cdn/components/eun-pagination.js +24 -19
  80. package/dist/cdn/components/eun-password-strength.js +19 -11
  81. package/dist/cdn/components/eun-progress-bar.js +13 -5
  82. package/dist/cdn/components/eun-radio-card.js +16 -9
  83. package/dist/cdn/components/eun-radio-list.js +12 -9
  84. package/dist/cdn/components/eun-radio.js +1 -1
  85. package/dist/cdn/components/eun-rating.js +276 -0
  86. package/dist/cdn/components/eun-scheduler-event-editor.js +10 -10
  87. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  88. package/dist/cdn/components/eun-scheduler.js +27 -27
  89. package/dist/cdn/components/eun-search.js +24 -25
  90. package/dist/cdn/components/eun-select.js +32 -31
  91. package/dist/cdn/components/eun-sidebar.js +40 -24
  92. package/dist/cdn/components/eun-skeleton.js +1 -1
  93. package/dist/cdn/components/eun-slider.js +15 -14
  94. package/dist/cdn/components/eun-sliding-card.js +8 -4
  95. package/dist/cdn/components/eun-step.js +22 -10
  96. package/dist/cdn/components/eun-stepper.js +41 -30
  97. package/dist/cdn/components/eun-switch.js +10 -8
  98. package/dist/cdn/components/eun-tab-group.js +24 -19
  99. package/dist/cdn/components/eun-tab-panel.js +11 -3
  100. package/dist/cdn/components/eun-tab.js +1 -1
  101. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  102. package/dist/cdn/components/eun-table.js +572 -31
  103. package/dist/cdn/components/eun-tag.js +13 -7
  104. package/dist/cdn/components/eun-textarea.js +34 -29
  105. package/dist/cdn/components/eun-time-picker.js +24 -21
  106. package/dist/cdn/components/eun-toast.js +51 -22
  107. package/dist/cdn/components/eun-toggle-group.js +57 -36
  108. package/dist/cdn/components/eun-toggle-item.js +16 -15
  109. package/dist/cdn/components/eun-toggle.js +12 -10
  110. package/dist/cdn/components/eun-toolbar.js +64 -54
  111. package/dist/cdn/components/eun-tooltip.js +30 -14
  112. package/dist/cdn/styles/breakpoints.scss +8 -0
  113. package/dist/cdn/styles/eunomia-grid.scss +6 -0
  114. package/dist/cdn/styles/eunomia-themes.css +1 -1
  115. package/dist/cdn/styles/themes/eunomia-theme.css +1 -1
  116. package/dist/cdn/styles/themes/eunomia-theme.scss +4 -3
  117. package/dist/cdn/styles/themes/mixins/eunomia-a11y-color.mixin.scss +34 -1
  118. package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +4 -0
  119. package/dist/cdn/styles/themes/mixins/eunomia-states.mixin.scss +36 -12
  120. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +10 -10
  121. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +10 -10
  122. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
  123. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +3 -2
  124. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +10 -10
  125. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +10 -10
  126. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
  127. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.scss +3 -2
  128. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +10 -10
  129. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +10 -10
  130. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
  131. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.scss +3 -2
  132. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +10 -10
  133. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +10 -10
  134. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
  135. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.scss +3 -2
  136. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +10 -10
  137. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +10 -10
  138. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
  139. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.scss +3 -2
  140. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +10 -10
  141. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +10 -10
  142. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
  143. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.scss +3 -2
  144. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +10 -10
  145. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +10 -10
  146. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
  147. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.scss +3 -2
  148. package/dist/cdn/styles/tools/indexes/eunomia-media-queries.index.scss +1 -3
  149. package/dist/cdn/styles/tools/indexes/eunomia-tools.index.scss +1 -0
  150. package/dist/cdn/styles/tools/mixins/layout/eunomia-grid.mixin.scss +117 -53
  151. package/dist/cdn/styles/tools/mixins/media-queries/eunomia-media-queries.mixin.scss +69 -0
  152. package/dist/cdn/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +28 -4
  153. package/dist/cdn/styles/tools/mixins/settings/eunomia-motion.mixin.scss +9 -0
  154. package/dist/cdn/styles/tools/variables/eunomia.breakpoints.scss +4 -0
  155. package/dist/components/action/button/button.d.ts +9 -3
  156. package/dist/components/action/button/button.js +10 -4
  157. package/dist/components/action/button/button.styles.js +61 -41
  158. package/dist/components/action/dropdown-button/dropdown-button.d.ts +2 -2
  159. package/dist/components/action/dropdown-button/dropdown-button.js +21 -15
  160. package/dist/components/action/dropdown-button/dropdown-button.styles.js +3 -2
  161. package/dist/components/action/dropdown-button/dropdown-item.js +5 -6
  162. package/dist/components/action/dropdown-button/dropdown-item.styles.js +3 -2
  163. package/dist/components/action/fab/fab.styles.js +14 -13
  164. package/dist/components/action/link/link.d.ts +7 -3
  165. package/dist/components/action/link/link.js +11 -7
  166. package/dist/components/action/link/link.styles.js +66 -15
  167. package/dist/components/action/shared-styles/button-palette.styles.js +15 -15
  168. package/dist/components/action/toggle/toggle-group.d.ts +2 -0
  169. package/dist/components/action/toggle/toggle-group.js +6 -4
  170. package/dist/components/action/toggle/toggle-group.styles.d.ts +2 -0
  171. package/dist/components/action/toggle/toggle-group.styles.js +46 -23
  172. package/dist/components/action/toggle/toggle-item.styles.js +13 -12
  173. package/dist/components/action/toggle/toggle.d.ts +2 -0
  174. package/dist/components/action/toggle/toggle.js +3 -1
  175. package/dist/components/action/toggle/toggle.styles.d.ts +2 -0
  176. package/dist/components/action/toggle/toggle.styles.js +12 -8
  177. package/dist/components/alert/alert/alert.d.ts +11 -7
  178. package/dist/components/alert/alert/alert.js +13 -14
  179. package/dist/components/alert/alert/alert.styles.js +32 -15
  180. package/dist/components/alert/drawer/drawer.d.ts +8 -6
  181. package/dist/components/alert/drawer/drawer.js +12 -14
  182. package/dist/components/alert/drawer/drawer.styles.js +26 -10
  183. package/dist/components/alert/modal/modal.d.ts +13 -11
  184. package/dist/components/alert/modal/modal.js +17 -27
  185. package/dist/components/alert/modal/modal.styles.js +16 -7
  186. package/dist/components/alert/toast/toast.d.ts +9 -5
  187. package/dist/components/alert/toast/toast.js +11 -13
  188. package/dist/components/alert/toast/toast.styles.js +49 -18
  189. package/dist/components/content/badge/badge.js +2 -2
  190. package/dist/components/content/card/card.d.ts +7 -3
  191. package/dist/components/content/card/card.js +8 -4
  192. package/dist/components/content/card/card.styles.js +28 -13
  193. package/dist/components/content/card/image-card.d.ts +60 -6
  194. package/dist/components/content/card/image-card.js +120 -11
  195. package/dist/components/content/card/image-card.styles.js +66 -15
  196. package/dist/components/content/card/sliding-card.d.ts +2 -0
  197. package/dist/components/content/card/sliding-card.js +2 -0
  198. package/dist/components/content/card/sliding-card.styles.js +5 -1
  199. package/dist/components/content/chip/chip.d.ts +4 -4
  200. package/dist/components/content/chip/chip.js +8 -8
  201. package/dist/components/content/collapse/collapse.d.ts +10 -1
  202. package/dist/components/content/collapse/collapse.js +12 -2
  203. package/dist/components/content/collapse/collapse.styles.d.ts +10 -1
  204. package/dist/components/content/collapse/collapse.styles.js +56 -18
  205. package/dist/components/content/description-list/description-list.d.ts +87 -0
  206. package/dist/components/content/description-list/description-list.js +107 -0
  207. package/dist/components/content/description-list/description-list.styles.d.ts +1 -0
  208. package/dist/components/content/description-list/description-list.styles.js +185 -0
  209. package/dist/components/content/icon/icon.d.ts +5 -0
  210. package/dist/components/content/icon/icon.js +5 -0
  211. package/dist/components/content/icon/icon.style.d.ts +2 -0
  212. package/dist/components/content/icon/icon.style.js +8 -1
  213. package/dist/components/content/image-carousel/image-carousel.d.ts +30 -19
  214. package/dist/components/content/image-carousel/image-carousel.js +58 -55
  215. package/dist/components/content/image-carousel/image-carousel.styles.js +69 -30
  216. package/dist/components/content/password-strength/password-strength.d.ts +21 -6
  217. package/dist/components/content/password-strength/password-strength.js +37 -16
  218. package/dist/components/content/password-strength/password-strength.styles.js +9 -1
  219. package/dist/components/content/progress-bar/progress-bar.styles.js +12 -4
  220. package/dist/components/content/shared-styles/card-link.styles.js +4 -3
  221. package/dist/components/content/shared-styles/tone-surface.styles.d.ts +5 -0
  222. package/dist/components/content/shared-styles/tone-surface.styles.js +19 -14
  223. package/dist/components/content/tag/tag.d.ts +4 -0
  224. package/dist/components/content/tag/tag.js +6 -2
  225. package/dist/components/content/tag/tag.styles.js +14 -4
  226. package/dist/components/content/tooltip/tooltip.d.ts +3 -2
  227. package/dist/components/content/tooltip/tooltip.js +12 -19
  228. package/dist/components/content/tooltip/tooltip.styles.js +25 -7
  229. package/dist/components/form/checkbox/check-card.d.ts +5 -1
  230. package/dist/components/form/checkbox/check-card.js +5 -1
  231. package/dist/components/form/checkbox/check-card.styles.js +13 -4
  232. package/dist/components/form/checkbox/checkbox-list.d.ts +21 -1
  233. package/dist/components/form/checkbox/checkbox-list.js +50 -17
  234. package/dist/components/form/checkbox/checkbox.d.ts +5 -1
  235. package/dist/components/form/checkbox/checkbox.js +7 -2
  236. package/dist/components/form/checkbox/checkbox.styles.js +5 -4
  237. package/dist/components/form/color-picker/color-picker.d.ts +48 -29
  238. package/dist/components/form/color-picker/color-picker.js +85 -71
  239. package/dist/components/form/color-picker/color-picker.styles.js +7 -6
  240. package/dist/components/form/counter/counter.d.ts +26 -19
  241. package/dist/components/form/counter/counter.js +64 -63
  242. package/dist/components/form/counter/counter.styles.js +5 -4
  243. package/dist/components/form/date-picker/date-picker.d.ts +64 -39
  244. package/dist/components/form/date-picker/date-picker.js +107 -96
  245. package/dist/components/form/date-picker/date-picker.styles.js +8 -5
  246. package/dist/components/form/input/input.d.ts +45 -40
  247. package/dist/components/form/input/input.js +93 -111
  248. package/dist/components/form/input-file/input-file.d.ts +30 -14
  249. package/dist/components/form/input-file/input-file.js +43 -40
  250. package/dist/components/form/input-file/input-file.styles.js +7 -6
  251. package/dist/components/form/input-phone/input-phone.d.ts +30 -7
  252. package/dist/components/form/input-phone/input-phone.js +54 -30
  253. package/dist/components/form/input-phone/input-phone.styles.js +4 -4
  254. package/dist/components/form/label/label.styles.js +3 -3
  255. package/dist/components/form/radio/radio-card.d.ts +6 -2
  256. package/dist/components/form/radio/radio-card.js +6 -2
  257. package/dist/components/form/radio/radio-card.styles.js +14 -5
  258. package/dist/components/form/radio/radio-list.d.ts +28 -9
  259. package/dist/components/form/radio/radio-list.js +61 -32
  260. package/dist/components/form/radio/radio.d.ts +6 -2
  261. package/dist/components/form/radio/radio.js +6 -2
  262. package/dist/components/form/radio/radio.styles.js +4 -4
  263. package/dist/components/form/rating/rating.d.ts +349 -0
  264. package/dist/components/form/rating/rating.js +665 -0
  265. package/dist/components/form/rating/rating.styles.d.ts +1 -0
  266. package/dist/components/form/rating/rating.styles.js +213 -0
  267. package/dist/components/form/search/search.d.ts +10 -9
  268. package/dist/components/form/search/search.js +29 -56
  269. package/dist/components/form/search/search.styles.js +5 -4
  270. package/dist/components/form/select/select.d.ts +32 -12
  271. package/dist/components/form/select/select.js +74 -59
  272. package/dist/components/form/select/select.styles.js +3 -2
  273. package/dist/components/form/shared-styles/card.styles.js +5 -4
  274. package/dist/components/form/shared-styles/field.styles.js +16 -6
  275. package/dist/components/form/shared-styles/form-labels.styles.js +1 -1
  276. package/dist/components/form/shared-styles/listbox.styles.js +10 -0
  277. package/dist/components/form/slider/slider.d.ts +11 -9
  278. package/dist/components/form/slider/slider.js +14 -14
  279. package/dist/components/form/slider/slider.styles.js +8 -7
  280. package/dist/components/form/switch/switch.d.ts +5 -1
  281. package/dist/components/form/switch/switch.js +5 -1
  282. package/dist/components/form/switch/switch.styles.js +7 -5
  283. package/dist/components/form/textarea/textarea.d.ts +96 -24
  284. package/dist/components/form/textarea/textarea.js +206 -51
  285. package/dist/components/form/time-picker/time-picker-columns.d.ts +2 -2
  286. package/dist/components/form/time-picker/time-picker-columns.js +8 -8
  287. package/dist/components/form/time-picker/time-picker-columns.styles.js +4 -2
  288. package/dist/components/form/time-picker/time-picker-list.styles.js +2 -1
  289. package/dist/components/form/time-picker/time-picker.d.ts +30 -10
  290. package/dist/components/form/time-picker/time-picker.js +81 -64
  291. package/dist/components/form/time-picker/time-picker.styles.js +4 -3
  292. package/dist/components/layout/animate/animate.d.ts +37 -15
  293. package/dist/components/layout/animate/animate.js +36 -16
  294. package/dist/components/layout/animate/animate.styles.js +11 -18
  295. package/dist/components/layout/divider/divider.js +1 -1
  296. package/dist/components/layout/divider/divider.styles.js +1 -1
  297. package/dist/components/layout/infinite-list/infinite-list.d.ts +33 -10
  298. package/dist/components/layout/infinite-list/infinite-list.js +115 -18
  299. package/dist/components/layout/infinite-list/infinite-list.styles.d.ts +3 -0
  300. package/dist/components/layout/infinite-list/infinite-list.styles.js +17 -5
  301. package/dist/components/loader/loader/loader.js +2 -2
  302. package/dist/components/loader/loader/loader.styles.js +17 -13
  303. package/dist/components/loader/skeleton/skeleton.js +1 -1
  304. package/dist/components/navigation/breadcrumb/breadcrumb.d.ts +31 -45
  305. package/dist/components/navigation/breadcrumb/breadcrumb.js +111 -77
  306. package/dist/components/navigation/breadcrumb/breadcrumb.styles.d.ts +3 -0
  307. package/dist/components/navigation/breadcrumb/breadcrumb.styles.js +22 -26
  308. package/dist/components/navigation/carousel/carousel.d.ts +55 -11
  309. package/dist/components/navigation/carousel/carousel.js +101 -43
  310. package/dist/components/navigation/carousel/carousel.styles.js +65 -22
  311. package/dist/components/navigation/pagination/pagination.d.ts +23 -21
  312. package/dist/components/navigation/pagination/pagination.js +30 -53
  313. package/dist/components/navigation/pagination/pagination.styles.js +8 -3
  314. package/dist/components/navigation/sidebar/sidebar.d.ts +17 -13
  315. package/dist/components/navigation/sidebar/sidebar.js +23 -33
  316. package/dist/components/navigation/sidebar/sidebar.styles.js +32 -14
  317. package/dist/components/navigation/stepper/step.js +9 -8
  318. package/dist/components/navigation/stepper/step.styles.js +16 -5
  319. package/dist/components/navigation/stepper/stepper.js +12 -5
  320. package/dist/components/navigation/stepper/stepper.styles.js +16 -5
  321. package/dist/components/navigation/tabs/tab/tab.d.ts +11 -0
  322. package/dist/components/navigation/tabs/tab/tab.js +11 -0
  323. package/dist/components/navigation/tabs/tab/tab.styles.js +22 -16
  324. package/dist/components/navigation/tabs/tab-group/tab-group.js +9 -10
  325. package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +21 -16
  326. package/dist/components/navigation/tabs/tab-panel/tab-panel.d.ts +4 -0
  327. package/dist/components/navigation/tabs/tab-panel/tab-panel.js +4 -0
  328. package/dist/components/navigation/tabs/tab-panel/tab-panel.styles.js +18 -1
  329. package/dist/components/navigation/toolbar/toolbar.d.ts +30 -62
  330. package/dist/components/navigation/toolbar/toolbar.js +43 -105
  331. package/dist/components/navigation/toolbar/toolbar.styles.js +59 -36
  332. package/dist/events/table-row-click.event.d.ts +5 -4
  333. package/dist/events/table-row-click.event.js +10 -5
  334. package/dist/features/scheduler/calendar/calendar.d.ts +6 -6
  335. package/dist/features/scheduler/calendar/calendar.js +7 -6
  336. package/dist/features/scheduler/calendar/calendar.styles.js +8 -6
  337. package/dist/features/scheduler/scheduler/scheduler.d.ts +8 -8
  338. package/dist/features/scheduler/scheduler/scheduler.js +24 -47
  339. package/dist/features/scheduler/scheduler/scheduler.styles.js +6 -4
  340. package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +2 -0
  341. package/dist/features/scheduler/scheduler-event/scheduler-event.js +5 -3
  342. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +11 -5
  343. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +6 -4
  344. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +6 -7
  345. package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +3 -3
  346. package/dist/features/scheduler/shared/scheduler-month-view.styles.js +2 -2
  347. package/dist/features/scheduler/shared/scheduler-year-view.styles.js +2 -2
  348. package/dist/features/table/table/table-native.styles.d.ts +28 -0
  349. package/dist/features/table/table/table-native.styles.js +502 -0
  350. package/dist/features/table/table/table.d.ts +342 -294
  351. package/dist/features/table/table/table.js +820 -546
  352. package/dist/features/table/table/table.styles.js +31 -17
  353. package/dist/features/table/table/table.types.d.ts +11 -20
  354. package/dist/features/table/table/table.utils.d.ts +6 -36
  355. package/dist/features/table/table/table.utils.js +16 -65
  356. package/dist/features/table/table-action-bar/table-action-bar.d.ts +33 -16
  357. package/dist/features/table/table-action-bar/table-action-bar.js +15 -22
  358. package/dist/features/table/table-action-bar/table-action-bar.styles.js +15 -3
  359. package/dist/i18n/en.d.ts +99 -0
  360. package/dist/i18n/en.js +99 -0
  361. package/dist/i18n/fr.js +103 -2
  362. package/dist/index.d.ts +6 -10
  363. package/dist/index.js +7 -10
  364. package/dist/mixins/button.mixin.js +3 -2
  365. package/dist/mixins/check.mixin.js +15 -15
  366. package/dist/mixins/disabled.mixin.d.ts +5 -0
  367. package/dist/mixins/disabled.mixin.js +21 -1
  368. package/dist/mixins/editable.mixin.js +28 -5
  369. package/dist/mixins/field-appearance.mixin.js +3 -2
  370. package/dist/mixins/form.mixin.d.ts +21 -1
  371. package/dist/mixins/form.mixin.js +156 -27
  372. package/dist/mixins/localizable.mixin.d.ts +1 -1
  373. package/dist/mixins/localizable.mixin.js +1 -1
  374. package/dist/mixins/radio.mixin.js +15 -15
  375. package/dist/mixins/readonly.mixin.d.ts +2 -1
  376. package/dist/mixins/readonly.mixin.js +10 -3
  377. package/dist/mixins/validators.mixin.d.ts +7 -1
  378. package/dist/mixins/validators.mixin.js +36 -17
  379. package/dist/ssr/alert-ssr.css +187 -0
  380. package/dist/ssr/animate-ssr.css +3 -2
  381. package/dist/ssr/badge-ssr.css +67 -0
  382. package/dist/ssr/breadcrumb-ssr.css +41 -0
  383. package/dist/ssr/button-ssr.css +319 -0
  384. package/dist/ssr/card-ssr.css +196 -0
  385. package/dist/ssr/carousel-ssr.css +238 -0
  386. package/dist/ssr/checkbox-ssr.css +67 -0
  387. package/dist/ssr/chip-ssr.css +242 -0
  388. package/dist/ssr/collapse-ssr.css +151 -0
  389. package/dist/ssr/description-list-ssr.css +150 -0
  390. package/dist/ssr/field-ssr.css +163 -0
  391. package/dist/ssr/icon-ssr.css +266 -0
  392. package/dist/ssr/image-carousel-ssr.css +24 -0
  393. package/dist/ssr/links-ssr.css +8 -2
  394. package/dist/ssr/pagination-ssr.css +4 -0
  395. package/dist/ssr/rating-ssr.css +254 -0
  396. package/dist/ssr/sidebar-ssr.css +9 -1
  397. package/dist/ssr/skeleton-ssr.css +63 -0
  398. package/dist/ssr/table-ssr.css +472 -0
  399. package/dist/ssr/tabs-ssr.css +129 -0
  400. package/dist/ssr/tag-ssr.css +197 -0
  401. package/dist/ssr/toggle-group-ssr.css +182 -0
  402. package/dist/ssr/toolbar-ssr.css +34 -1
  403. package/dist/utils/drag-drop.utils.js +18 -2
  404. package/dist/utils/dropdown-menu.utils.d.ts +2 -2
  405. package/dist/utils/dropdown-menu.utils.js +4 -14
  406. package/dist/utils/implicit-submission.utils.d.ts +18 -0
  407. package/dist/utils/implicit-submission.utils.js +79 -0
  408. package/dist/utils/light-dom-styles.utils.d.ts +14 -0
  409. package/dist/utils/light-dom-styles.utils.js +37 -0
  410. package/dist/utils/listbox-options.utils.d.ts +11 -0
  411. package/dist/utils/listbox-options.utils.js +41 -3
  412. package/dist/utils/media.styles.d.ts +19 -0
  413. package/dist/utils/media.styles.js +23 -0
  414. package/dist/utils/motion.utils.d.ts +40 -0
  415. package/dist/utils/motion.utils.js +51 -0
  416. package/dist/utils/theme-generator.utils.d.ts +6 -1
  417. package/dist/utils/theme-generator.utils.js +59 -20
  418. package/package.json +39 -31
  419. package/styles/breakpoints.scss +8 -0
  420. package/styles/eunomia-grid.scss +6 -0
  421. package/styles/themes/eunomia-theme.scss +4 -3
  422. package/styles/themes/mixins/eunomia-a11y-color.mixin.scss +34 -1
  423. package/styles/themes/mixins/eunomia-neutrals.mixin.scss +4 -0
  424. package/styles/themes/mixins/eunomia-states.mixin.scss +36 -12
  425. package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +10 -10
  426. package/styles/themes/prebuilt-themes/eunomia/eunomia.mixin.scss +10 -10
  427. package/styles/themes/prebuilt-themes/eunomia/eunomia.theme.scss +3 -2
  428. package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +10 -10
  429. package/styles/themes/prebuilt-themes/fire/eunomia-fire.mixin.scss +10 -10
  430. package/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.scss +3 -2
  431. package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +10 -10
  432. package/styles/themes/prebuilt-themes/forest/eunomia-forest.mixin.scss +10 -10
  433. package/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.scss +3 -2
  434. package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +10 -10
  435. package/styles/themes/prebuilt-themes/gold/eunomia-gold.mixin.scss +10 -10
  436. package/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.scss +3 -2
  437. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +10 -10
  438. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.mixin.scss +10 -10
  439. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.scss +3 -2
  440. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +10 -10
  441. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.mixin.scss +10 -10
  442. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.scss +3 -2
  443. package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +10 -10
  444. package/styles/themes/prebuilt-themes/violet/eunomia-violet.mixin.scss +10 -10
  445. package/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.scss +3 -2
  446. package/styles/tools/indexes/eunomia-media-queries.index.scss +1 -3
  447. package/styles/tools/indexes/eunomia-tools.index.scss +1 -0
  448. package/styles/tools/mixins/layout/eunomia-grid.mixin.scss +117 -53
  449. package/styles/tools/mixins/media-queries/eunomia-media-queries.mixin.scss +69 -0
  450. package/styles/tools/mixins/settings/eunomia-alpha.mixin.scss +28 -4
  451. package/styles/tools/mixins/settings/eunomia-motion.mixin.scss +9 -0
  452. package/styles/tools/variables/eunomia.breakpoints.scss +4 -0
  453. package/dist/cdn/components/chunks/chunk-32DTNR52.js +0 -1
  454. package/dist/cdn/components/chunks/chunk-A6KGFALA.js +0 -132
  455. package/dist/cdn/components/chunks/chunk-CEDHJUUH.js +0 -1
  456. package/dist/cdn/components/chunks/chunk-D2M4BV5Y.js +0 -328
  457. package/dist/cdn/components/chunks/chunk-E4IS25H7.js +0 -1
  458. package/dist/cdn/components/chunks/chunk-E74CM7UG.js +0 -66
  459. package/dist/cdn/components/chunks/chunk-EAKYD33D.js +0 -110
  460. package/dist/cdn/components/chunks/chunk-EST3M4AO.js +0 -1
  461. package/dist/cdn/components/chunks/chunk-GU6BVMFJ.js +0 -1
  462. package/dist/cdn/components/chunks/chunk-KBH5PCUO.js +0 -3
  463. package/dist/cdn/components/chunks/chunk-KVYUNKUO.js +0 -27
  464. package/dist/cdn/components/chunks/chunk-LFCXUVDO.js +0 -1
  465. package/dist/cdn/components/chunks/chunk-OAULRKHQ.js +0 -38
  466. package/dist/cdn/components/chunks/chunk-PCM7D3YF.js +0 -84
  467. package/dist/cdn/components/chunks/chunk-S2UCEWNG.js +0 -207
  468. package/dist/cdn/components/chunks/chunk-SJWRE6PW.js +0 -1
  469. package/dist/cdn/components/chunks/chunk-T4PTHUYF.js +0 -10
  470. package/dist/cdn/components/chunks/chunk-VRGRCYIO.js +0 -1
  471. package/dist/cdn/components/chunks/chunk-X2AUBZD2.js +0 -30
  472. package/dist/cdn/components/eun-breadcrumb-item.js +0 -93
  473. package/dist/cdn/components/eun-table-cell.js +0 -1
  474. package/dist/cdn/components/eun-table-column.js +0 -1
  475. package/dist/cdn/components/eun-table-header.js +0 -1
  476. package/dist/cdn/components/eun-table-item.js +0 -1
  477. package/dist/cdn/components/eun-table-skeleton-row.js +0 -1
  478. package/dist/cdn/styles/tools/mixins/media-queries/eunomia-device.mixin.scss +0 -14
  479. package/dist/cdn/styles/tools/mixins/media-queries/eunomia-gte.mixin.scss +0 -26
  480. package/dist/cdn/styles/tools/mixins/media-queries/eunomia-lte.mixin.scss +0 -26
  481. package/dist/components/navigation/breadcrumb/breadcrumb-item.d.ts +0 -77
  482. package/dist/components/navigation/breadcrumb/breadcrumb-item.js +0 -130
  483. package/dist/components/navigation/breadcrumb/breadcrumb-item.styles.d.ts +0 -6
  484. package/dist/components/navigation/breadcrumb/breadcrumb-item.styles.js +0 -78
  485. package/dist/features/table/native-table.css +0 -276
  486. package/dist/features/table/shared-styles/table-row.styles.d.ts +0 -7
  487. package/dist/features/table/shared-styles/table-row.styles.js +0 -47
  488. package/dist/features/table/shared-styles/table-shared.styles.d.ts +0 -23
  489. package/dist/features/table/shared-styles/table-shared.styles.js +0 -33
  490. package/dist/features/table/table-cell/table-cell.d.ts +0 -59
  491. package/dist/features/table/table-cell/table-cell.js +0 -73
  492. package/dist/features/table/table-cell/table-cell.styles.d.ts +0 -1
  493. package/dist/features/table/table-cell/table-cell.styles.js +0 -46
  494. package/dist/features/table/table-column/table-column.d.ts +0 -73
  495. package/dist/features/table/table-column/table-column.js +0 -89
  496. package/dist/features/table/table-column/table-column.styles.d.ts +0 -1
  497. package/dist/features/table/table-column/table-column.styles.js +0 -51
  498. package/dist/features/table/table-header/table-header.d.ts +0 -102
  499. package/dist/features/table/table-header/table-header.js +0 -165
  500. package/dist/features/table/table-header/table-header.styles.d.ts +0 -1
  501. package/dist/features/table/table-header/table-header.styles.js +0 -147
  502. package/dist/features/table/table-item/table-item.d.ts +0 -179
  503. package/dist/features/table/table-item/table-item.js +0 -291
  504. package/dist/features/table/table-item/table-item.styles.d.ts +0 -1
  505. package/dist/features/table/table-item/table-item.styles.js +0 -404
  506. package/dist/features/table/table-managed/table-managed.d.ts +0 -19
  507. package/dist/features/table/table-managed/table-managed.js +0 -128
  508. package/dist/features/table/table-skeleton-row/table-skeleton-row.d.ts +0 -46
  509. package/dist/features/table/table-skeleton-row/table-skeleton-row.js +0 -110
  510. package/dist/features/table/table-skeleton-row/table-skeleton-row.styles.d.ts +0 -12
  511. package/dist/features/table/table-skeleton-row/table-skeleton-row.styles.js +0 -65
  512. package/dist/mixins/table-row.mixin.d.ts +0 -37
  513. package/dist/mixins/table-row.mixin.js +0 -103
  514. package/styles/tools/mixins/media-queries/eunomia-device.mixin.scss +0 -14
  515. package/styles/tools/mixins/media-queries/eunomia-gte.mixin.scss +0 -26
  516. package/styles/tools/mixins/media-queries/eunomia-lte.mixin.scss +0 -26
@@ -1,4 +1,4 @@
1
- import { LitElement, nothing, TemplateResult } from "lit";
1
+ import { LitElement, nothing, PropertyValues, TemplateResult } from "lit";
2
2
  import { DisabledMixinInterface } from "./disabled.mixin.js";
3
3
  import { ValidatorsMixinInterface } from "./validators.mixin.js";
4
4
  import { Constructor } from "../utils/constructor.type.js";
@@ -17,16 +17,36 @@ export declare class FormMixinInterface<T> {
17
17
  description?: string | string[] | undefined;
18
18
  valueState?: T;
19
19
  hideError?: boolean;
20
+ invalid: boolean;
20
21
  form: HTMLFormElement | null;
21
22
  dirty: boolean;
22
23
  touched: boolean;
24
+ validationRequested: boolean;
23
25
  controlled: boolean;
26
+ descriptionOnHost: boolean;
27
+ errorOnChange: boolean;
28
+ get showError(): boolean;
29
+ get showErrorMessages(): boolean;
24
30
  get pristine(): boolean;
25
31
  get untouched(): boolean;
26
32
  get value(): T;
27
33
  set value(value: T);
28
34
  get defaultValue(): T | undefined;
29
35
  }
36
+ /**
37
+ * Every property {@link FormMixinInterface.showError} depends on, for
38
+ * components mirroring it outside their template (e.g. onto the host's
39
+ * `aria-invalid`).
40
+ */
41
+ export declare const ERROR_DISPLAY_PROPERTIES: string[];
42
+ /**
43
+ * Whether any property {@link FormMixinInterface.showError} depends on
44
+ * changed in this update.
45
+ *
46
+ * @param changed - The changed properties of the update.
47
+ * @returns true when the error display may have changed.
48
+ */
49
+ export declare const hasErrorDisplayChange: (changed: PropertyValues) => boolean;
30
50
  /**
31
51
  * Mixin that adds form-related behavior and value management.
32
52
  *
@@ -13,17 +13,47 @@ import { html, nothing } from "lit";
13
13
  import { property, state } from "lit/decorators.js";
14
14
  import { when } from "lit/directives/when.js";
15
15
  import { ChangeEvent } from "../events/change.event.js";
16
+ /**
17
+ * Every property {@link FormMixinInterface.showError} depends on, for
18
+ * components mirroring it outside their template (e.g. onto the host's
19
+ * `aria-invalid`).
20
+ */
21
+ export const ERROR_DISPLAY_PROPERTIES = [
22
+ "valid",
23
+ "hideError",
24
+ "invalid",
25
+ "disabled",
26
+ "touched",
27
+ "dirty",
28
+ "validationRequested",
29
+ "error",
30
+ ];
31
+ /**
32
+ * Whether any property {@link FormMixinInterface.showError} depends on
33
+ * changed in this update.
34
+ *
35
+ * @param changed - The changed properties of the update.
36
+ * @returns true when the error display may have changed.
37
+ */
38
+ export const hasErrorDisplayChange = (changed) => ERROR_DISPLAY_PROPERTIES.some((name) => changed.has(name));
16
39
  export const FormMixin = (superClass) => {
17
- var _FormMixinClass_markDirty, _FormMixinClass_markTouched;
40
+ var _FormMixinClass_markDirty, _FormMixinClass_markTouched, _FormMixinClass_markValidationRequested;
18
41
  class FormMixinClass extends superClass {
19
42
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
43
  constructor(...args) {
21
44
  super(...args);
22
45
  /**
23
- * When true, validation error messages are hidden.
46
+ * When true, validation error messages are hidden. The hint stays visible.
24
47
  * @default false
25
48
  */
26
49
  this.hideError = false;
50
+ /**
51
+ * When true, the field is shown as invalid (error styling and
52
+ * `aria-invalid`) without any message, for an error whose message is
53
+ * displayed elsewhere. Does not change the field's validity.
54
+ * @default false
55
+ */
56
+ this.invalid = false;
27
57
  /**
28
58
  * Whether this field behaves like a checkbox/radio (checkable).
29
59
  * @default false
@@ -53,6 +83,13 @@ export const FormMixin = (superClass) => {
53
83
  * @default false
54
84
  */
55
85
  this.touched = false;
86
+ /**
87
+ * Whether the form asked for this field's validity, on a submit attempt
88
+ * or a `reportValidity()` call, since it connected (or since the last
89
+ * reset). Reveals errors on a field the user never reached.
90
+ * @default false
91
+ */
92
+ this.validationRequested = false;
56
93
  /**
57
94
  * Opts this field out of the native reset algorithm's value wipe: when
58
95
  * `true`, `formResetCallback` leaves `value`/`checked` untouched.
@@ -70,6 +107,25 @@ export const FormMixin = (superClass) => {
70
107
  * @default false
71
108
  */
72
109
  this.controlled = false;
110
+ /**
111
+ * Whether the hint or error is exposed through the host's own
112
+ * `aria-description`, for a component whose host is the control itself
113
+ * (a checkbox, a radio, a switch). The rendered message is then hidden
114
+ * from assistive technology, so it isn't read again as part of the
115
+ * control's name, which is computed from the host's content.
116
+ * @default false
117
+ * @internal
118
+ */
119
+ this.descriptionOnHost = false;
120
+ /**
121
+ * Whether a change alone reveals the error, without waiting for focus
122
+ * to leave the field, for a field whose every change is a complete
123
+ * choice (a checkbox, a radio, a select) rather than an entry still
124
+ * being typed.
125
+ * @default false
126
+ * @internal
127
+ */
128
+ this.errorOnChange = false;
73
129
  /**
74
130
  * Marks the field dirty on its own `eunchange` — dispatched only from a
75
131
  * genuine user-interaction handler, never from the `value`/`checked`
@@ -89,10 +145,42 @@ export const FormMixin = (superClass) => {
89
145
  this.touched = true;
90
146
  }
91
147
  });
148
+ /**
149
+ * Marks validation as requested when the form checks this field, which
150
+ * fires `invalid` on it.
151
+ */
152
+ _FormMixinClass_markValidationRequested.set(this, () => {
153
+ this.validationRequested = true;
154
+ });
92
155
  if (!this.internals) {
93
156
  this.internals = this.attachInternals();
94
157
  }
95
158
  }
159
+ /**
160
+ * Whether the field currently shows its error state (styling and
161
+ * `aria-invalid`): not disabled, and either forced by {@link invalid} or
162
+ * showing its error messages.
163
+ */
164
+ get showError() {
165
+ return (this.invalid && !this.disabled) || this.showErrorMessages;
166
+ }
167
+ /**
168
+ * Whether the field currently shows its error messages : invalid, not
169
+ * disabled, not `hideError`, and either left once (`touched`), changed
170
+ * while {@link errorOnChange} is set (`dirty`), checked by its form, or
171
+ * given an external `error`. Typing alone never reveals an error, so an
172
+ * unfinished entry isn't reported as invalid; once shown, the error
173
+ * follows the value live.
174
+ */
175
+ get showErrorMessages() {
176
+ return (!this.valid &&
177
+ !this.hideError &&
178
+ !this.disabled &&
179
+ (this.touched ||
180
+ (this.dirty && this.errorOnChange) ||
181
+ this.validationRequested ||
182
+ !!this.error));
183
+ }
96
184
  /**
97
185
  * Whether the value hasn't changed since the field connected (or since
98
186
  * the last reset). The inverse of {@link dirty}.
@@ -150,14 +238,14 @@ export const FormMixin = (superClass) => {
150
238
  this.setFormValue(value);
151
239
  }
152
240
  /**
153
- * Gets the current description or validation errors.
154
- * Returns undefined if errors are hidden.
241
+ * Gets the validation errors while {@link showErrorMessages} is true, the
242
+ * hint otherwise.
155
243
  *
156
- * @returns Error message string, array of messages, or undefined.
244
+ * @returns Error message string, array of messages, or the hint.
157
245
  */
158
246
  get description() {
159
- if (this.hideError) {
160
- return undefined;
247
+ if (!this.showErrorMessages) {
248
+ return this.hint;
161
249
  }
162
250
  if (this.errorMessages.length) {
163
251
  return this.errorMessages;
@@ -179,6 +267,15 @@ export const FormMixin = (superClass) => {
179
267
  get type() {
180
268
  return this.localName;
181
269
  }
270
+ /**
271
+ * Validates `checked` rather than `value` for a checkable field.
272
+ *
273
+ * @returns the value {@link checkValidity} validates by default.
274
+ */
275
+ getValueToValidate() {
276
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
277
+ return (this.checkable ? this.checked : this.value);
278
+ }
182
279
  /**
183
280
  * Lifecycle callback called when element is connected to the DOM.
184
281
  * Initializes the form value depending on state.
@@ -196,6 +293,7 @@ export const FormMixin = (superClass) => {
196
293
  this.checkValidity(this.value);
197
294
  this.addEventListener(ChangeEvent.eventName, __classPrivateFieldGet(this, _FormMixinClass_markDirty, "f"));
198
295
  this.addEventListener("focusout", __classPrivateFieldGet(this, _FormMixinClass_markTouched, "f"));
296
+ this.addEventListener("invalid", __classPrivateFieldGet(this, _FormMixinClass_markValidationRequested, "f"));
199
297
  }
200
298
  /**
201
299
  * Lifecycle callback called when element is disconnected from the DOM.
@@ -204,6 +302,7 @@ export const FormMixin = (superClass) => {
204
302
  disconnectedCallback() {
205
303
  this.removeEventListener(ChangeEvent.eventName, __classPrivateFieldGet(this, _FormMixinClass_markDirty, "f"));
206
304
  this.removeEventListener("focusout", __classPrivateFieldGet(this, _FormMixinClass_markTouched, "f"));
305
+ this.removeEventListener("invalid", __classPrivateFieldGet(this, _FormMixinClass_markValidationRequested, "f"));
207
306
  super.disconnectedCallback?.();
208
307
  }
209
308
  /**
@@ -217,13 +316,35 @@ export const FormMixin = (superClass) => {
217
316
  changedProperties.has("valueState") ||
218
317
  changedProperties.has("checked") ||
219
318
  changedProperties.has("validators") ||
220
- changedProperties.has("required")) {
221
- const valToCheck = this.checkable ? this.checked : this.value;
222
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
223
- this.checkValidity(valToCheck);
319
+ changedProperties.has("required") ||
320
+ changedProperties.has("error")) {
321
+ this.checkValidity();
224
322
  }
225
323
  super.willUpdate(changedProperties);
226
324
  }
325
+ /**
326
+ * LitElement lifecycle method called after update. Mirrors the hint or
327
+ * error onto the host's `aria-description` while
328
+ * {@link descriptionOnHost} is set.
329
+ *
330
+ * @param changedProperties - Map of changed properties and their old values.
331
+ */
332
+ updated(changedProperties) {
333
+ super.updated(changedProperties);
334
+ if (!this.descriptionOnHost) {
335
+ return;
336
+ }
337
+ const { description } = this;
338
+ const text = Array.isArray(description)
339
+ ? description.join(" ")
340
+ : description;
341
+ if (text) {
342
+ this.setAttribute("aria-description", text);
343
+ }
344
+ else {
345
+ this.removeAttribute("aria-description");
346
+ }
347
+ }
227
348
  /**
228
349
  * Syncs the field value with the form submission internals.
229
350
  * If disabled or unchecked (for checkable), sets empty form data.
@@ -282,6 +403,7 @@ export const FormMixin = (superClass) => {
282
403
  }
283
404
  this.dirty = false;
284
405
  this.touched = false;
406
+ this.validationRequested = false;
285
407
  }
286
408
  /**
287
409
  * Renders the description or error messages.
@@ -292,38 +414,39 @@ export const FormMixin = (superClass) => {
292
414
  return this.renderError();
293
415
  }
294
416
  /**
295
- * Renders the error messages if the field is invalid and errors are visible.
296
- * If no error messages are retrived but an hint has been set, the hint will be returned.
417
+ * Renders the error messages while {@link showErrorMessages} is true, the
418
+ * hint otherwise.
297
419
  *
298
420
  * @returns Template result with error messages, hint or nothing.
299
421
  */
300
422
  renderError() {
301
423
  const { description } = this;
302
- const isHint = description &&
303
- description.length &&
304
- !(this.errorMessages && this.errorMessages.length) &&
305
- !(this.validationMessage || this.validationMessage.length);
306
- if (isHint) {
424
+ if (!description?.length) {
425
+ return nothing;
426
+ }
427
+ if (!this.showErrorMessages) {
307
428
  return html `
308
- <p id="description" class="hint-messages">
429
+ <p
430
+ id="description"
431
+ class="hint-messages"
432
+ aria-hidden=${this.descriptionOnHost ? "true" : nothing}
433
+ >
309
434
  <span>${description}</span>
310
435
  </p>
311
436
  `;
312
437
  }
313
- if (this.valid ||
314
- this.hideError ||
315
- this.disabled ||
316
- !description?.length) {
317
- return nothing;
318
- }
319
438
  return html `
320
- <p id="description" class="error-messages">
439
+ <p
440
+ id="description"
441
+ class="error-messages"
442
+ aria-hidden=${this.descriptionOnHost ? "true" : nothing}
443
+ >
321
444
  ${when(Array.isArray(description), () => description.map((msg) => html `<span>${msg}</span>`), () => html `<span>${description}</span>`)}
322
445
  </p>
323
446
  `;
324
447
  }
325
448
  }
326
- _FormMixinClass_markDirty = new WeakMap(), _FormMixinClass_markTouched = new WeakMap();
449
+ _FormMixinClass_markDirty = new WeakMap(), _FormMixinClass_markTouched = new WeakMap(), _FormMixinClass_markValidationRequested = new WeakMap();
327
450
  FormMixinClass.formAssociated = true;
328
451
  __decorate([
329
452
  property({ reflect: true })
@@ -334,6 +457,9 @@ export const FormMixin = (superClass) => {
334
457
  __decorate([
335
458
  property({ type: Boolean, attribute: "hide-error" })
336
459
  ], FormMixinClass.prototype, "hideError", void 0);
460
+ __decorate([
461
+ property({ type: Boolean })
462
+ ], FormMixinClass.prototype, "invalid", void 0);
337
463
  __decorate([
338
464
  state()
339
465
  ], FormMixinClass.prototype, "valueState", void 0);
@@ -343,6 +469,9 @@ export const FormMixin = (superClass) => {
343
469
  __decorate([
344
470
  state()
345
471
  ], FormMixinClass.prototype, "touched", void 0);
472
+ __decorate([
473
+ state()
474
+ ], FormMixinClass.prototype, "validationRequested", void 0);
346
475
  __decorate([
347
476
  property({ type: Boolean })
348
477
  ], FormMixinClass.prototype, "controlled", void 0);
@@ -14,7 +14,7 @@ export declare class LocalizableMixinInterface {
14
14
  * it: user-facing strings with no dedicated override property at all
15
15
  * (navigation button labels, ARIA group names, and the like), and
16
16
  * strings that *do* have their own override property (e.g. `eun-chip`'s
17
- * `ariaLabelRemove`) but fall back to `this.dictionary` — instead of a
17
+ * `removeLabel`) but fall back to `this.dictionary` — instead of a
18
18
  * hardcoded English literal — when that property is left unset, so the
19
19
  * default follows `locale` while an explicit override still wins.
20
20
  *
@@ -12,7 +12,7 @@ import { dictionaries, getDefaultLocale } from "../i18n/index.js";
12
12
  * it: user-facing strings with no dedicated override property at all
13
13
  * (navigation button labels, ARIA group names, and the like), and
14
14
  * strings that *do* have their own override property (e.g. `eun-chip`'s
15
- * `ariaLabelRemove`) but fall back to `this.dictionary` — instead of a
15
+ * `removeLabel`) but fall back to `this.dictionary` — instead of a
16
16
  * hardcoded English literal — when that property is left unset, so the
17
17
  * default follows `locale` while an explicit override still wins.
18
18
  *
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { property } from "lit/decorators.js";
8
+ import { hasErrorDisplayChange } from "./form.mixin.js";
8
9
  import { ChangeEvent } from "../events/change.event.js";
9
10
  /**
10
11
  * Mixin adding "radio selectable" behavior to a component.
@@ -36,6 +37,17 @@ export const RadioMixin = (superClass) => {
36
37
  * @default true
37
38
  */
38
39
  this.checkable = true;
40
+ /**
41
+ * The host is the control, so its hint or error goes on its own
42
+ * `aria-description`.
43
+ * @internal
44
+ */
45
+ this.descriptionOnHost = true;
46
+ /**
47
+ * Every change is a complete choice, so its error shows right away.
48
+ * @internal
49
+ */
50
+ this.errorOnChange = true;
39
51
  /**
40
52
  * Overrides `ValidatorsMixin`'s own `required` check, which validates
41
53
  * emptiness of `this.value` — meaningless here, since a radio's `value`
@@ -54,7 +66,7 @@ export const RadioMixin = (superClass) => {
54
66
  if (this.required && !this.checked) {
55
67
  return {
56
68
  validity: { valueMissing: true },
57
- message: "Field value is missing",
69
+ message: this.validationDictionary.validation.valueMissing,
58
70
  };
59
71
  }
60
72
  return { validity: {} };
@@ -105,10 +117,8 @@ export const RadioMixin = (superClass) => {
105
117
  this.setAttribute("aria-checked", String(this.checked));
106
118
  this.updateInternals();
107
119
  }
108
- if (_changedProperties.has("valid") ||
109
- _changedProperties.has("hideError") ||
110
- _changedProperties.has("disabled")) {
111
- this.setAttribute("aria-invalid", String(!this.hideError && !this.disabled && !this.valid));
120
+ if (hasErrorDisplayChange(_changedProperties)) {
121
+ this.setAttribute("aria-invalid", String(this.showError));
112
122
  }
113
123
  }
114
124
  /**
@@ -125,7 +135,6 @@ export const RadioMixin = (superClass) => {
125
135
  * - Prevents propagation.
126
136
  * - Ignores action if `disabled` or `readonly`.
127
137
  * - Sets `checked` to `true` ; never unchecks (see the class doc).
128
- * - Updates ARIA attributes (`aria-description`).
129
138
  * - Dispatches a custom `ChangeEvent`.
130
139
  *
131
140
  * @param event The triggered mouse or keyboard event
@@ -142,15 +151,6 @@ export const RadioMixin = (superClass) => {
142
151
  this.checked = true;
143
152
  this.updateInternals();
144
153
  this.checkValidity(this.checked);
145
- if (this.description) {
146
- const attribute = this.description instanceof Array
147
- ? this.description.join(",")
148
- : this.description;
149
- this.setAttribute("aria-description", attribute);
150
- }
151
- else {
152
- this.removeAttribute("aria-description");
153
- }
154
154
  this.dispatchEvent(new ChangeEvent(this.checked));
155
155
  }
156
156
  /**
@@ -10,7 +10,8 @@ export declare class ReadonlyMixinInterface {
10
10
  * A mixin that adds a `readonly` property to a LitElement component.
11
11
  *
12
12
  * When the `readonly` state changes, it automatically updates the `aria-readonly` attribute
13
- * for accessibility compliance.
13
+ * for accessibility compliance. The attribute is only present while readonly, so an SSR
14
+ * framework hydrating a non-readonly field doesn't see an attribute it never rendered.
14
15
  *
15
16
  * @param superClass - The base LitElement class to extend.
16
17
  * @returns A class extending the base class with `readonly` functionality.
@@ -9,7 +9,8 @@ import { property } from "lit/decorators.js";
9
9
  * A mixin that adds a `readonly` property to a LitElement component.
10
10
  *
11
11
  * When the `readonly` state changes, it automatically updates the `aria-readonly` attribute
12
- * for accessibility compliance.
12
+ * for accessibility compliance. The attribute is only present while readonly, so an SSR
13
+ * framework hydrating a non-readonly field doesn't see an attribute it never rendered.
13
14
  *
14
15
  * @param superClass - The base LitElement class to extend.
15
16
  * @returns A class extending the base class with `readonly` functionality.
@@ -28,12 +29,18 @@ export const ReadonlyMixin = (superClass) => {
28
29
  * LitElement lifecycle method.
29
30
  * Called when reactive properties are updated.
30
31
  *
31
- * Updates `aria-readonly` whenever `readonly` changes.
32
+ * Updates `aria-readonly` whenever `readonly` changes. Removed rather
33
+ * than set to "false", which means the same.
32
34
  */
33
35
  updated(_changedProperties) {
34
36
  super.updated(_changedProperties);
35
37
  if (_changedProperties.has("readonly")) {
36
- this.setAttribute("aria-readonly", String(this.readonly));
38
+ if (this.readonly) {
39
+ this.setAttribute("aria-readonly", "true");
40
+ }
41
+ else {
42
+ this.removeAttribute("aria-readonly");
43
+ }
37
44
  }
38
45
  }
39
46
  }
@@ -1,6 +1,7 @@
1
1
  import { LitElement } from "lit";
2
2
  import { Mutable, Validators } from "../types/form-validators.type.js";
3
3
  import { Constructor } from "../utils/constructor.type.js";
4
+ import { Dictionary } from "../i18n/index.js";
4
5
  /**
5
6
  * Defines a Validity object.
6
7
  */
@@ -20,10 +21,15 @@ export interface Validity {
20
21
  export declare class ValidatorsMixinInterface<U = unknown> {
21
22
  checkLocalValidators: () => Validity;
22
23
  buildCommonValidators: () => Validity;
23
- checkValidity: (dataToCheck: any) => boolean;
24
+ checkValidity: (dataToCheck?: any) => boolean;
25
+ reportValidity: (valToCheck?: any) => boolean;
26
+ get validity(): ValidityState;
27
+ get willValidate(): boolean;
24
28
  internals: globalThis.ElementInternals;
25
29
  valid: boolean;
26
30
  required: boolean;
31
+ error?: string;
32
+ get validationDictionary(): Dictionary;
27
33
  errorMessages: string[];
28
34
  validationMessage: string | string[];
29
35
  validators?: Validators<U>[];
@@ -5,6 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { property, state } from "lit/decorators.js";
8
+ import { dictionaries, getDefaultLocale } from "../i18n/index.js";
8
9
  /**
9
10
  * Mixin that adds validation capabilities to a LitElement.
10
11
  *
@@ -13,6 +14,15 @@ import { property, state } from "lit/decorators.js";
13
14
  */
14
15
  export const ValidatorsMixin = (superClass) => {
15
16
  class ValidatorsMixinClass extends superClass {
17
+ /**
18
+ * The dictionary built-in validation messages are read from: the field's
19
+ * own `locale` when it has one, the shared default locale otherwise.
20
+ */
21
+ get validationDictionary() {
22
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
+ const locale = this.locale;
24
+ return dictionaries[locale ?? getDefaultLocale()] ?? dictionaries.en;
25
+ }
16
26
  /**
17
27
  * Current validity state of the element.
18
28
  */
@@ -79,18 +89,18 @@ export const ValidatorsMixin = (superClass) => {
79
89
  (value instanceof Array && !value.length);
80
90
  if (this.required && isEmpty) {
81
91
  validity.valueMissing = true;
82
- message = "Field value is missing";
92
+ message = this.validationDictionary.validation.valueMissing;
83
93
  }
84
94
  return { validity, message };
85
95
  }
86
96
  /**
87
97
  * Runs all validation rules and updates internal validity.
88
98
  *
89
- * @param dataToCheck The value to validate.
99
+ * @param dataToCheck The value to validate, the field's own one when omitted.
90
100
  * @returns true if valid, false otherwise.
91
101
  * @throws Error if any async validator is passed (only sync supported).
92
102
  */
93
- checkValidity(dataToCheck) {
103
+ checkValidity(dataToCheck = this.getValueToValidate()) {
94
104
  const localResult = this.checkLocalValidators();
95
105
  const commonResult = this.buildCommonValidators();
96
106
  const combinedValidity = {
@@ -98,16 +108,12 @@ export const ValidatorsMixin = (superClass) => {
98
108
  ...commonResult.validity,
99
109
  };
100
110
  let message = commonResult.message || localResult.message;
101
- if (this.validators && this.validators?.length) {
102
- const errorMessages = this.validators.reduce((messages, validator) => this.collectErrors(messages, validator, dataToCheck), []);
103
- this.errorMessages = errorMessages;
104
- if (errorMessages.length > 0) {
105
- combinedValidity.customError = true;
106
- message = errorMessages.join(" ; ");
107
- }
108
- }
109
- else {
110
- this.errorMessages = [];
111
+ const errorMessages = this.error ? [this.error] : [];
112
+ this.validators?.forEach((validator) => this.collectErrors(errorMessages, validator, dataToCheck));
113
+ this.errorMessages = errorMessages;
114
+ if (errorMessages.length > 0) {
115
+ combinedValidity.customError = true;
116
+ message = errorMessages.join(" ; ");
111
117
  }
112
118
  this.valid = !Object.values(combinedValidity).some(Boolean);
113
119
  const anchor = this.getFocusAnchor?.();
@@ -115,17 +121,17 @@ export const ValidatorsMixin = (superClass) => {
115
121
  this.setValidity(combinedValidity, message, anchor);
116
122
  }
117
123
  else {
118
- this.updateComplete.then(() => this.setValidity(combinedValidity, message, anchor));
124
+ void this.updateComplete.then(() => this.setValidity(combinedValidity, message, anchor));
119
125
  }
120
- return this.internals.checkValidity();
126
+ return this.valid;
121
127
  }
122
128
  /**
123
129
  * Reports validity and shows native validation UI.
124
130
  *
125
- * @param valToCheck Value to validate and report.
131
+ * @param valToCheck Value to validate and report, the field's own one when omitted.
126
132
  * @returns true if valid, false otherwise.
127
133
  */
128
- reportValidity(valToCheck) {
134
+ reportValidity(valToCheck = this.getValueToValidate()) {
129
135
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
130
136
  this.checkValidity(valToCheck);
131
137
  return this.internals.reportValidity();
@@ -180,6 +186,16 @@ export const ValidatorsMixin = (superClass) => {
180
186
  this.requestUpdate("valid");
181
187
  }
182
188
  }
189
+ /**
190
+ * The value {@link checkValidity} validates when called without one.
191
+ * `FormMixin` overrides it to return `checked` for a checkable field.
192
+ *
193
+ * @returns the field's current value.
194
+ */
195
+ getValueToValidate() {
196
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
197
+ return this.value;
198
+ }
183
199
  /**
184
200
  * Provides extra data to validators if needed.
185
201
  * Override in subclass.
@@ -194,6 +210,9 @@ export const ValidatorsMixin = (superClass) => {
194
210
  __decorate([
195
211
  property({ type: Boolean })
196
212
  ], ValidatorsMixinClass.prototype, "required", void 0);
213
+ __decorate([
214
+ property()
215
+ ], ValidatorsMixinClass.prototype, "error", void 0);
197
216
  __decorate([
198
217
  state()
199
218
  ], ValidatorsMixinClass.prototype, "valid", void 0);