@eunomia/elements 1.0.0-beta.6 → 1.0.0-beta.8

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 (327) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/components/chunks/{chunk-KDN4O5W2.js → chunk-32L2QYWQ.js} +5 -5
  3. package/dist/cdn/components/chunks/{chunk-JYIIWN2P.js → chunk-36KLGY6U.js} +8 -8
  4. package/dist/cdn/components/chunks/chunk-3BMACIDO.js +1 -0
  5. package/dist/cdn/components/chunks/{chunk-2Y2EU2CI.js → chunk-3UUZM7X2.js} +1 -1
  6. package/dist/cdn/components/chunks/chunk-55PUDL7D.js +109 -0
  7. package/dist/cdn/components/chunks/chunk-5LA5DQMP.js +1 -0
  8. package/dist/cdn/components/chunks/chunk-5LXGJVJR.js +1 -0
  9. package/dist/cdn/components/chunks/{chunk-ZKZV2YG5.js → chunk-5XPOGBPL.js} +1 -1
  10. package/dist/cdn/components/chunks/{chunk-LMVW522V.js → chunk-62RLISRD.js} +1 -1
  11. package/dist/cdn/components/chunks/{chunk-PMPSJG5V.js → chunk-6FYW5TQU.js} +3 -3
  12. package/dist/cdn/components/chunks/chunk-6TIEBY34.js +1 -0
  13. package/dist/cdn/components/chunks/{chunk-MOMYII3P.js → chunk-AH2SKZ7T.js} +14 -1
  14. package/dist/cdn/components/chunks/chunk-AK2DIJX7.js +1 -0
  15. package/dist/cdn/components/chunks/chunk-B5XMGWM7.js +10 -0
  16. package/dist/cdn/components/chunks/chunk-GVS6IUKC.js +1 -0
  17. package/dist/cdn/components/chunks/chunk-GWLD2I3P.js +8 -0
  18. package/dist/cdn/components/chunks/{chunk-UDVB4LAE.js → chunk-I4ERDXSM.js} +5 -3
  19. package/dist/cdn/components/chunks/{chunk-QZ5SHR3I.js → chunk-J3SZBXM6.js} +2 -2
  20. package/dist/cdn/components/chunks/chunk-JAGZL7JH.js +1 -0
  21. package/dist/cdn/components/chunks/{chunk-VYFR364B.js → chunk-LD35BFNK.js} +18 -17
  22. package/dist/cdn/components/chunks/{chunk-XDPRWUKN.js → chunk-MQQJ6DID.js} +1 -1
  23. package/dist/cdn/components/chunks/chunk-P6LGU3FT.js +1 -0
  24. package/dist/cdn/components/chunks/chunk-QL5GSW2A.js +1 -0
  25. package/dist/cdn/components/chunks/{chunk-UYZR4JXZ.js → chunk-QSZO4GIH.js} +45 -9
  26. package/dist/cdn/components/chunks/{chunk-7KKWYPHY.js → chunk-QXQ25SQS.js} +21 -19
  27. package/dist/cdn/components/chunks/{chunk-SZYEBMG6.js → chunk-QYB6Z6FG.js} +5 -5
  28. package/dist/cdn/components/chunks/{chunk-RIFF2D2F.js → chunk-RGC3I6MK.js} +1 -1
  29. package/dist/cdn/components/chunks/{chunk-L2ADCEN7.js → chunk-SVGWCKWT.js} +1 -1
  30. package/dist/cdn/components/chunks/{chunk-N6ZW5CDN.js → chunk-TCSB2MLU.js} +1 -1
  31. package/dist/cdn/components/chunks/{chunk-MQQ4BGVJ.js → chunk-TFTRCIIK.js} +7 -6
  32. package/dist/cdn/components/chunks/chunk-TLBXTBMM.js +46 -0
  33. package/dist/cdn/components/chunks/chunk-UVHVQRPT.js +1 -0
  34. package/dist/cdn/components/chunks/chunk-WIUERJII.js +1 -0
  35. package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +1 -0
  36. package/dist/cdn/components/eun-alert.js +13 -6
  37. package/dist/cdn/components/eun-animate.js +6 -6
  38. package/dist/cdn/components/eun-badge.js +1 -1
  39. package/dist/cdn/components/eun-button.js +1 -1
  40. package/dist/cdn/components/eun-calendar.js +2 -2
  41. package/dist/cdn/components/eun-card.js +4 -4
  42. package/dist/cdn/components/eun-carousel.js +26 -22
  43. package/dist/cdn/components/eun-check-card.js +1 -1
  44. package/dist/cdn/components/eun-checkbox-list.js +11 -8
  45. package/dist/cdn/components/eun-checkbox.js +1 -1
  46. package/dist/cdn/components/eun-chip.js +17 -11
  47. package/dist/cdn/components/eun-collapse.js +1 -1
  48. package/dist/cdn/components/eun-color-picker.js +74 -69
  49. package/dist/cdn/components/eun-counter.js +16 -14
  50. package/dist/cdn/components/eun-date-picker.js +67 -63
  51. package/dist/cdn/components/eun-description-list.js +2 -2
  52. package/dist/cdn/components/eun-divider.js +3 -3
  53. package/dist/cdn/components/eun-drawer.js +21 -22
  54. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  55. package/dist/cdn/components/eun-dropdown-item.js +3 -3
  56. package/dist/cdn/components/eun-fab.js +2 -2
  57. package/dist/cdn/components/eun-icon.js +1 -1
  58. package/dist/cdn/components/eun-image-card.js +1 -1
  59. package/dist/cdn/components/eun-image-carousel.js +10 -10
  60. package/dist/cdn/components/eun-infinite-list.js +1 -1
  61. package/dist/cdn/components/eun-input-file.js +21 -21
  62. package/dist/cdn/components/eun-input-phone.js +16 -12
  63. package/dist/cdn/components/eun-input.js +1 -1
  64. package/dist/cdn/components/eun-link.js +59 -13
  65. package/dist/cdn/components/eun-loader.js +1 -1
  66. package/dist/cdn/components/eun-modal.js +33 -23
  67. package/dist/cdn/components/eun-pagination.js +16 -16
  68. package/dist/cdn/components/eun-password-strength.js +14 -10
  69. package/dist/cdn/components/eun-radio-card.js +1 -1
  70. package/dist/cdn/components/eun-radio-list.js +11 -8
  71. package/dist/cdn/components/eun-radio.js +1 -1
  72. package/dist/cdn/components/eun-rating.js +276 -0
  73. package/dist/cdn/components/eun-scheduler-event-editor.js +11 -11
  74. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  75. package/dist/cdn/components/eun-scheduler.js +28 -28
  76. package/dist/cdn/components/eun-search.js +36 -32
  77. package/dist/cdn/components/eun-select.js +27 -27
  78. package/dist/cdn/components/eun-sidebar.js +73 -26
  79. package/dist/cdn/components/eun-skeleton.js +1 -1
  80. package/dist/cdn/components/eun-slider.js +3 -3
  81. package/dist/cdn/components/eun-sliding-card.js +1 -1
  82. package/dist/cdn/components/eun-step.js +5 -4
  83. package/dist/cdn/components/eun-stepper.js +30 -30
  84. package/dist/cdn/components/eun-switch.js +1 -1
  85. package/dist/cdn/components/eun-tab-group.js +4 -4
  86. package/dist/cdn/components/eun-tab-panel.js +1 -1
  87. package/dist/cdn/components/eun-tab.js +1 -1
  88. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  89. package/dist/cdn/components/eun-table.js +2 -2
  90. package/dist/cdn/components/eun-tag.js +3 -3
  91. package/dist/cdn/components/eun-textarea.js +36 -28
  92. package/dist/cdn/components/eun-time-picker.js +31 -28
  93. package/dist/cdn/components/eun-toast.js +24 -15
  94. package/dist/cdn/components/eun-toggle-group.js +75 -37
  95. package/dist/cdn/components/eun-toggle-item.js +9 -9
  96. package/dist/cdn/components/eun-toggle.js +2 -2
  97. package/dist/cdn/components/eun-toolbar.js +22 -22
  98. package/dist/cdn/components/eun-tooltip.js +6 -6
  99. package/dist/cdn/styles/eunomia-themes.css +1 -1
  100. package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
  101. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
  102. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
  103. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
  104. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
  105. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
  106. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
  107. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
  108. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
  109. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
  110. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
  111. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
  112. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
  113. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
  114. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
  115. package/dist/components/action/button/button.d.ts +4 -3
  116. package/dist/components/action/button/button.js +6 -9
  117. package/dist/components/action/button/button.styles.js +13 -8
  118. package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -6
  119. package/dist/components/action/dropdown-button/dropdown-button.js +16 -13
  120. package/dist/components/action/dropdown-button/dropdown-item.d.ts +10 -2
  121. package/dist/components/action/dropdown-button/dropdown-item.js +24 -9
  122. package/dist/components/action/link/link.d.ts +10 -1
  123. package/dist/components/action/link/link.js +13 -1
  124. package/dist/components/action/link/link.styles.js +50 -3
  125. package/dist/components/action/toggle/toggle-group.d.ts +12 -2
  126. package/dist/components/action/toggle/toggle-group.js +18 -3
  127. package/dist/components/action/toggle/toggle-group.styles.js +58 -20
  128. package/dist/components/action/toggle/toggle-item.js +1 -3
  129. package/dist/components/action/toggle/toggle-item.styles.js +7 -7
  130. package/dist/components/action/toggle/toggle.js +1 -1
  131. package/dist/components/alert/alert/alert.d.ts +9 -7
  132. package/dist/components/alert/alert/alert.js +11 -14
  133. package/dist/components/alert/alert/alert.styles.js +9 -2
  134. package/dist/components/alert/drawer/drawer.d.ts +30 -5
  135. package/dist/components/alert/drawer/drawer.js +48 -13
  136. package/dist/components/alert/drawer/drawer.styles.js +7 -7
  137. package/dist/components/alert/modal/modal.d.ts +35 -10
  138. package/dist/components/alert/modal/modal.js +55 -28
  139. package/dist/components/alert/modal/modal.styles.js +17 -6
  140. package/dist/components/alert/toast/toast.d.ts +7 -5
  141. package/dist/components/alert/toast/toast.js +12 -15
  142. package/dist/components/alert/toast/toast.styles.js +18 -9
  143. package/dist/components/content/badge/badge.js +2 -2
  144. package/dist/components/content/card/card.js +1 -1
  145. package/dist/components/content/card/card.styles.js +2 -2
  146. package/dist/components/content/chip/chip.d.ts +4 -4
  147. package/dist/components/content/chip/chip.js +11 -10
  148. package/dist/components/content/chip/chip.styles.js +9 -3
  149. package/dist/components/content/description-list/description-list.js +3 -3
  150. package/dist/components/content/icon/icon.d.ts +3 -0
  151. package/dist/components/content/icon/icon.js +3 -0
  152. package/dist/components/content/icon/icon.style.d.ts +2 -0
  153. package/dist/components/content/icon/icon.style.js +4 -0
  154. package/dist/components/content/image-carousel/image-carousel.d.ts +12 -12
  155. package/dist/components/content/image-carousel/image-carousel.js +29 -28
  156. package/dist/components/content/password-strength/password-strength.d.ts +21 -6
  157. package/dist/components/content/password-strength/password-strength.js +37 -16
  158. package/dist/components/content/password-strength/password-strength.styles.js +4 -0
  159. package/dist/components/content/tag/tag.js +2 -2
  160. package/dist/components/content/tooltip/tooltip.d.ts +16 -9
  161. package/dist/components/content/tooltip/tooltip.js +31 -15
  162. package/dist/components/content/tooltip/tooltip.styles.js +1 -1
  163. package/dist/components/form/checkbox/check-card.d.ts +1 -0
  164. package/dist/components/form/checkbox/check-card.js +1 -0
  165. package/dist/components/form/checkbox/checkbox-list.d.ts +17 -0
  166. package/dist/components/form/checkbox/checkbox-list.js +39 -10
  167. package/dist/components/form/checkbox/checkbox.d.ts +1 -0
  168. package/dist/components/form/checkbox/checkbox.js +3 -1
  169. package/dist/components/form/checkbox/checkbox.styles.js +3 -2
  170. package/dist/components/form/color-picker/color-picker.d.ts +47 -28
  171. package/dist/components/form/color-picker/color-picker.js +73 -51
  172. package/dist/components/form/color-picker/color-picker.styles.js +14 -1
  173. package/dist/components/form/counter/counter.d.ts +24 -18
  174. package/dist/components/form/counter/counter.js +61 -61
  175. package/dist/components/form/counter/counter.styles.js +6 -4
  176. package/dist/components/form/date-picker/date-picker.d.ts +33 -7
  177. package/dist/components/form/date-picker/date-picker.js +82 -56
  178. package/dist/components/form/date-picker/date-picker.styles.js +9 -6
  179. package/dist/components/form/input/input.d.ts +43 -39
  180. package/dist/components/form/input/input.js +91 -110
  181. package/dist/components/form/input-file/input-file.d.ts +26 -13
  182. package/dist/components/form/input-file/input-file.js +35 -35
  183. package/dist/components/form/input-file/input-file.styles.js +4 -4
  184. package/dist/components/form/input-phone/input-phone.d.ts +28 -5
  185. package/dist/components/form/input-phone/input-phone.js +47 -13
  186. package/dist/components/form/input-phone/input-phone.styles.js +6 -3
  187. package/dist/components/form/radio/radio-card.d.ts +1 -0
  188. package/dist/components/form/radio/radio-card.js +1 -0
  189. package/dist/components/form/radio/radio-list.d.ts +23 -7
  190. package/dist/components/form/radio/radio-list.js +47 -22
  191. package/dist/components/form/radio/radio.d.ts +1 -0
  192. package/dist/components/form/radio/radio.js +1 -0
  193. package/dist/components/form/rating/rating.d.ts +349 -0
  194. package/dist/components/form/rating/rating.js +665 -0
  195. package/dist/components/form/rating/rating.styles.d.ts +1 -0
  196. package/dist/components/form/rating/rating.styles.js +213 -0
  197. package/dist/components/form/search/search.d.ts +72 -18
  198. package/dist/components/form/search/search.js +135 -72
  199. package/dist/components/form/search/search.styles.js +2 -0
  200. package/dist/components/form/select/select.d.ts +29 -10
  201. package/dist/components/form/select/select.js +65 -41
  202. package/dist/components/form/shared-styles/field.styles.js +45 -8
  203. package/dist/components/form/shared-styles/listbox.styles.js +15 -1
  204. package/dist/components/form/slider/slider.d.ts +7 -8
  205. package/dist/components/form/slider/slider.js +9 -12
  206. package/dist/components/form/switch/switch.d.ts +1 -0
  207. package/dist/components/form/switch/switch.js +1 -0
  208. package/dist/components/form/textarea/textarea.d.ts +90 -23
  209. package/dist/components/form/textarea/textarea.js +194 -44
  210. package/dist/components/form/textarea/textarea.styles.js +3 -0
  211. package/dist/components/form/time-picker/time-picker-columns.d.ts +2 -2
  212. package/dist/components/form/time-picker/time-picker-columns.js +8 -8
  213. package/dist/components/form/time-picker/time-picker.d.ts +30 -9
  214. package/dist/components/form/time-picker/time-picker.js +66 -40
  215. package/dist/components/form/time-picker/time-picker.styles.js +7 -5
  216. package/dist/components/layout/animate/animate.js +3 -2
  217. package/dist/components/layout/animate/animate.styles.js +2 -2
  218. package/dist/components/layout/divider/divider.js +1 -1
  219. package/dist/components/layout/divider/divider.styles.js +1 -1
  220. package/dist/components/loader/loader/loader.js +2 -2
  221. package/dist/components/loader/loader/loader.styles.js +14 -12
  222. package/dist/components/loader/skeleton/skeleton.js +1 -1
  223. package/dist/components/navigation/carousel/carousel.d.ts +32 -9
  224. package/dist/components/navigation/carousel/carousel.js +88 -41
  225. package/dist/components/navigation/carousel/carousel.styles.js +10 -6
  226. package/dist/components/navigation/pagination/pagination.d.ts +23 -21
  227. package/dist/components/navigation/pagination/pagination.js +30 -53
  228. package/dist/components/navigation/sidebar/sidebar.d.ts +113 -65
  229. package/dist/components/navigation/sidebar/sidebar.js +161 -118
  230. package/dist/components/navigation/sidebar/sidebar.styles.d.ts +1 -1
  231. package/dist/components/navigation/sidebar/sidebar.styles.js +74 -24
  232. package/dist/components/navigation/stepper/step.js +9 -8
  233. package/dist/components/navigation/stepper/stepper.d.ts +1 -3
  234. package/dist/components/navigation/stepper/stepper.js +15 -26
  235. package/dist/components/navigation/tabs/tab-group/tab-group.js +2 -2
  236. package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +2 -2
  237. package/dist/components/navigation/toolbar/toolbar.d.ts +23 -13
  238. package/dist/components/navigation/toolbar/toolbar.js +28 -35
  239. package/dist/components/navigation/toolbar/toolbar.styles.js +18 -17
  240. package/dist/events/select.event.d.ts +3 -2
  241. package/dist/events/select.event.js +2 -1
  242. package/dist/features/scheduler/calendar/calendar.js +1 -1
  243. package/dist/features/scheduler/scheduler/scheduler.d.ts +7 -7
  244. package/dist/features/scheduler/scheduler/scheduler.js +15 -24
  245. package/dist/features/scheduler/scheduler-event/scheduler-event.js +3 -3
  246. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +1 -1
  247. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +6 -4
  248. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +7 -8
  249. package/dist/features/table/table/table.js +1 -1
  250. package/dist/features/table/table-action-bar/table-action-bar.js +2 -2
  251. package/dist/i18n/en.d.ts +68 -0
  252. package/dist/i18n/en.js +68 -0
  253. package/dist/i18n/fr.js +68 -2
  254. package/dist/index.d.ts +3 -0
  255. package/dist/index.js +1 -0
  256. package/dist/mixins/button.mixin.d.ts +1 -1
  257. package/dist/mixins/button.mixin.js +9 -6
  258. package/dist/mixins/check.mixin.js +11 -10
  259. package/dist/mixins/dialog-surface.mixin.d.ts +8 -0
  260. package/dist/mixins/disabled.mixin.d.ts +5 -0
  261. package/dist/mixins/disabled.mixin.js +21 -1
  262. package/dist/mixins/editable.mixin.js +28 -5
  263. package/dist/mixins/field-appearance.mixin.js +3 -2
  264. package/dist/mixins/field-size.mixin.d.ts +19 -0
  265. package/dist/mixins/field-size.mixin.js +33 -0
  266. package/dist/mixins/form.mixin.d.ts +4 -0
  267. package/dist/mixins/form.mixin.js +87 -13
  268. package/dist/mixins/localizable.mixin.d.ts +1 -1
  269. package/dist/mixins/localizable.mixin.js +1 -1
  270. package/dist/mixins/radio.mixin.js +11 -10
  271. package/dist/mixins/readonly.mixin.d.ts +2 -1
  272. package/dist/mixins/readonly.mixin.js +10 -3
  273. package/dist/mixins/rounded.mixin.d.ts +18 -0
  274. package/dist/mixins/rounded.mixin.js +32 -0
  275. package/dist/ssr/alert-ssr.css +187 -0
  276. package/dist/ssr/badge-ssr.css +67 -0
  277. package/dist/ssr/breadcrumb-ssr.css +41 -0
  278. package/dist/ssr/button-ssr.css +5 -5
  279. package/dist/ssr/card-ssr.css +27 -15
  280. package/dist/ssr/carousel-ssr.css +247 -0
  281. package/dist/ssr/checkbox-ssr.css +67 -0
  282. package/dist/ssr/chip-ssr.css +250 -0
  283. package/dist/ssr/collapse-ssr.css +180 -0
  284. package/dist/ssr/field-ssr.css +202 -0
  285. package/dist/ssr/icon-ssr.css +266 -0
  286. package/dist/ssr/image-carousel-ssr.css +34 -0
  287. package/dist/ssr/links-ssr.css +44 -1
  288. package/dist/ssr/pagination-ssr.css +4 -0
  289. package/dist/ssr/rating-ssr.css +254 -0
  290. package/dist/ssr/sidebar-ssr.css +102 -3
  291. package/dist/ssr/skeleton-ssr.css +63 -0
  292. package/dist/ssr/tabs-ssr.css +129 -0
  293. package/dist/ssr/toggle-group-ssr.css +233 -0
  294. package/dist/ssr/toolbar-ssr.css +81 -2
  295. package/dist/types/variant.type.d.ts +4 -1
  296. package/dist/utils/boolean.utils.d.ts +14 -0
  297. package/dist/utils/boolean.utils.js +20 -0
  298. package/dist/utils/dropdown-menu.utils.d.ts +1 -1
  299. package/dist/utils/focusable-elements.utils.d.ts +12 -0
  300. package/dist/utils/focusable-elements.utils.js +26 -0
  301. package/dist/utils/implicit-submission.utils.d.ts +18 -0
  302. package/dist/utils/implicit-submission.utils.js +79 -0
  303. package/dist/utils/input-modality.utils.d.ts +13 -0
  304. package/dist/utils/input-modality.utils.js +34 -0
  305. package/dist/utils/listbox-options.utils.d.ts +11 -0
  306. package/dist/utils/listbox-options.utils.js +41 -3
  307. package/dist/utils/theme-generator.utils.d.ts +8 -2
  308. package/dist/utils/theme-generator.utils.js +30 -9
  309. package/package.json +26 -7
  310. package/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
  311. package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
  312. package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
  313. package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
  314. package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
  315. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
  316. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
  317. package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
  318. package/dist/cdn/components/chunks/chunk-4PI6RDUS.js +0 -1
  319. package/dist/cdn/components/chunks/chunk-6VK6SHCG.js +0 -1
  320. package/dist/cdn/components/chunks/chunk-A3X4KD2X.js +0 -1
  321. package/dist/cdn/components/chunks/chunk-BQFJR2UP.js +0 -110
  322. package/dist/cdn/components/chunks/chunk-G5SBDQQ3.js +0 -1
  323. package/dist/cdn/components/chunks/chunk-KSZRQRN4.js +0 -1
  324. package/dist/cdn/components/chunks/chunk-PE4DAXHQ.js +0 -3
  325. package/dist/cdn/components/chunks/chunk-RS7TWEMQ.js +0 -1
  326. package/dist/cdn/components/chunks/chunk-UDOZRIJZ.js +0 -1
  327. package/dist/cdn/components/chunks/chunk-VOTRXBDS.js +0 -38
@@ -16,6 +16,8 @@ import { FormMixin } from "../../../mixins/form.mixin.js";
16
16
  import { FormLabelMixin, } from "../../../mixins/form-label.mixin.js";
17
17
  import { EditableMixin, } from "../../../mixins/editable.mixin.js";
18
18
  import { FieldAppearanceMixin, } from "../../../mixins/field-appearance.mixin.js";
19
+ import { RoundedMixin, } from "../../../mixins/rounded.mixin.js";
20
+ import { FieldSizeMixin, } from "../../../mixins/field-size.mixin.js";
19
21
  import { AnchorPositionMixin, } from "../../../mixins/anchor-position.mixin.js";
20
22
  import { ChangeEvent } from "../../../events/change.event.js";
21
23
  import { formLabelsStyles } from "../shared-styles/form-labels.styles.js";
@@ -24,6 +26,7 @@ import { isWebKit } from "../../../utils/browser.utils.js";
24
26
  import { normalizeHexColor } from "../../../utils/color.utils.js";
25
27
  import { parseListboxOptions, } from "../../../utils/listbox-options.utils.js";
26
28
  import { resolveDurationMs, resolveEasing, } from "../../../utils/motion.utils.js";
29
+ import { LocalizableMixin, } from "../../../mixins/localizable.mixin.js";
27
30
  /**
28
31
  * Tag name of the color picker component.
29
32
  */
@@ -33,7 +36,7 @@ export const EunomiaColorPickerTagName = "eun-color-picker";
33
36
  * @internal
34
37
  */
35
38
  const Base = DisabledMixin(ValidatorsMixin(LitElement));
36
- const EunomiaColorPickerMixinBase = AnchorPositionMixin(FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(EditableMixin(FormMixin(Base))))));
39
+ const EunomiaColorPickerMixinBase = LocalizableMixin(AnchorPositionMixin(RoundedMixin(FieldSizeMixin(FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(EditableMixin(FormMixin(Base)))))))));
37
40
  /**
38
41
  * A field for picking a color, as a `#rrggbb` hex string. Declare preset
39
42
  * swatches as light DOM `option` children, exactly like `eun-select` does
@@ -70,6 +73,8 @@ const EunomiaColorPickerMixinBase = AnchorPositionMixin(FieldAppearanceMixin(For
70
73
  * @prop {string} defaultValue - The default value applied when the field connects, and restored on form reset
71
74
  * @attr {string} [default-value] - The default value
72
75
  * @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
76
+ * @prop {boolean} [rounded=false] - Whether the field is fully rounded, as a pill. A custom border radius still wins over it
77
+ * @prop {'xs' | 's' | 'm' | 'l' | 'xl'} [size='m'] - The field size. A field and a button of the same size share the same height
73
78
  * @prop {string} label - The title label of the field, rendered through the label component
74
79
  * @prop {string} instructions - Instructions displayed below the label
75
80
  * @prop {string} name - The field name
@@ -77,12 +82,13 @@ const EunomiaColorPickerMixinBase = AnchorPositionMixin(FieldAppearanceMixin(For
77
82
  * @prop {boolean} [readonly=false] - Whether the field is read only
78
83
  * @prop {boolean} [required=false] - Whether a color is required
79
84
  * @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
85
+ * @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
80
86
  * @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
81
87
  * @prop {Array<Validators<string>>} validators - The list of validation rules applied to the field value
82
88
  * @prop {boolean} [readonlyAvailable=false] - Whether the field can switch between a static display and an editable one
83
89
  * @attr {boolean} [readonly-available=false] - Whether the field can switch between a static display and an editable one
84
- * @prop {string} [emptyValueLabel='No color selected'] - Text displayed in place of the value when empty
85
- * @attr {string} [empty-value-label='No color selected'] - Text displayed in place of the value when empty
90
+ * @prop {string} [emptyValueLabel] - Text displayed in place of the value when empty. Defaults to the localized string for the current locale (English: "No color selected")
91
+ * @attr {string} [empty-value-label] - Text displayed in place of the value when empty. Defaults to the localized string for the current locale (English: "No color selected")
86
92
  * @prop {string} [swatchesLabel='Presets'] - Heading shown above the preset swatches, while any are declared
87
93
  * @attr {string} [swatches-label='Presets'] - Heading shown above the preset swatches
88
94
  * @prop {string} [customLabel='Custom'] - Heading shown above the custom color row
@@ -91,10 +97,10 @@ const EunomiaColorPickerMixinBase = AnchorPositionMixin(FieldAppearanceMixin(For
91
97
  * @attr {string} [native-input-label='Pick a custom color'] - Accessible label for the native OS color picker
92
98
  * @prop {string} [hexInputLabel='Hex color'] - Accessible label for the hex text input
93
99
  * @attr {string} [hex-input-label='Hex color'] - Accessible label for the hex text input
94
- * @prop {string} [confirmLabel='Confirm'] - The label of the confirm button in edit mode
95
- * @attr {string} [confirm-label='Confirm'] - The label of the confirm button in edit mode
96
- * @prop {string} [cancelLabel='Cancel'] - The label of the cancel button in edit mode
97
- * @attr {string} [cancel-label='Cancel'] - The label of the cancel button in edit mode
100
+ * @prop {string} [confirmLabel] - The label of the confirm button in edit mode. Defaults to the localized string for the current locale (English: "Confirm")
101
+ * @attr {string} [confirm-label] - The label of the confirm button in edit mode. Defaults to the localized string for the current locale (English: "Confirm")
102
+ * @prop {string} [cancelLabel] - The label of the cancel button in edit mode. Defaults to the localized string for the current locale (English: "Cancel")
103
+ * @attr {string} [cancel-label] - The label of the cancel button in edit mode. Defaults to the localized string for the current locale (English: "Cancel")
98
104
  * @prop {boolean} [noAnimation=false] - Disables the dropdown panel's open and close height transition, on top of the automatic reduced motion handling
99
105
  * @attr {boolean} [no-animation=false] - Disables the dropdown panel's open and close height transition
100
106
  * @prop {boolean} [swatchOnly=false] - Renders as a native input type="color" styled as a plain swatch, with no panel, no presets, and no hex input at all — only the browser/OS's own color picker. Presets declared as option children are ignored while this is set
@@ -122,11 +128,13 @@ const EunomiaColorPickerMixinBase = AnchorPositionMixin(FieldAppearanceMixin(For
122
128
  * @cssprop [--field-edit-confirm-color] - Sets the color of the confirm button in readonly-available edit mode
123
129
  * @cssprop [--field-edit-cancel-color] - Sets the color of the cancel button in readonly-available edit mode
124
130
  * @cssprop [--field-listbox-max-height=260px] - Sets the maximum height of the dropdown panel, past which it scrolls
131
+ * @cssprop [--field-listbox-border-radius] - Sets the corner radius of the dropdown panel, independent of the field's own radius
125
132
  * @cssprop [--field-listbox-transition-duration=200ms] - Sets the duration of the dropdown panel's open and close animation
126
133
  * @cssprop [--color-picker-swatch-size=20px] - Sets the diameter of every swatch
127
134
  * @cssprop [--eun-viewport-inset-top] - Reserves space, such as a page's sticky header height, that the dropdown panel keeps clear of at the top of the viewport
128
135
  * @cssprop [--eun-viewport-inset-bottom] - The same as eun-viewport-inset-top, reserved at the bottom of the viewport
129
136
  * @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
137
+ * @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
130
138
  * @cssprop [--field-label-font-size] - Sets the font size of the label
131
139
  * @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
132
140
  * @element eun-color-picker
@@ -134,11 +142,6 @@ const EunomiaColorPickerMixinBase = AnchorPositionMixin(FieldAppearanceMixin(For
134
142
  let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
135
143
  constructor() {
136
144
  super(...arguments);
137
- /**
138
- * Text displayed in place of the value when empty.
139
- * @default No color selected
140
- */
141
- this.emptyValueLabel = "No color selected";
142
145
  /**
143
146
  * Heading shown above the preset swatches, while any are declared.
144
147
  * @default Presets
@@ -159,16 +162,6 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
159
162
  * @default Hex color
160
163
  */
161
164
  this.hexInputLabel = "Hex color";
162
- /**
163
- * Label of the confirm button in edit mode.
164
- * @default Confirm
165
- */
166
- this.confirmLabel = "Confirm";
167
- /**
168
- * Label of the cancel button in edit mode.
169
- * @default Cancel
170
- */
171
- this.cancelLabel = "Cancel";
172
165
  /**
173
166
  * Disables the dropdown panel's open/close height transition, both set
174
167
  * explicitly and whenever the browser reports `prefers-reduced-motion:
@@ -197,7 +190,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
197
190
  * opposite trade-off from `swatchOnly`. The leading native color swatch
198
191
  * that normally sits before the trigger button is gone entirely (the
199
192
  * button itself shows a plain decorative swatch instead), and the panel
200
- * drops its hex input, leaving only the preset radiogroup : nothing
193
+ * drops its hex input, leaving only the preset listbox : nothing
201
194
  * outside the curated palette is reachable at all, not even by typing a
202
195
  * hex value. Has no effect without at least one `option` declared —
203
196
  * with none, {@link renderInlineCustomField} already offers nothing but
@@ -209,7 +202,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
209
202
  this.presetsOnly = false;
210
203
  /**
211
204
  * Renders the declared `option` presets directly as the field itself,
212
- * the exact swatch radiogroup {@link renderPresets} already renders
205
+ * the exact swatch listbox {@link renderPresets} already renders
213
206
  * inside the panel, just in place of a trigger button and a panel to
214
207
  * open. No native color swatch, no hex input, no button, no popover of
215
208
  * any kind, since there is nothing left for one to open. Takes priority
@@ -234,6 +227,13 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
234
227
  * @internal
235
228
  */
236
229
  this.hexDraft = "";
230
+ /**
231
+ * The preset swatch last moved to with the keyboard, which holds the
232
+ * swatches' single tab stop ; `-1` until then, leaving it on the selected
233
+ * swatch (or the first one).
234
+ * @internal
235
+ */
236
+ this.presetFocusIndex = -1;
237
237
  /**
238
238
  * Reacts to the dropdown panel's native `toggle` event : the single
239
239
  * source of truth for open/close state. The panel is `popover="auto"`,
@@ -382,7 +382,10 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
382
382
  if (this.ariaLabel) {
383
383
  return this.ariaLabel;
384
384
  }
385
- return this.swatchOnly ? this.value || this.emptyValueLabel : undefined;
385
+ return this.swatchOnly
386
+ ? this.value ||
387
+ (this.emptyValueLabel ?? this.dictionary.colorPicker.noColor)
388
+ : undefined;
386
389
  }
387
390
  /**
388
391
  * Lifecycle hook called when the element is connected to the DOM.
@@ -413,6 +416,14 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
413
416
  this.hexDraft = this.value ?? "";
414
417
  }
415
418
  }
419
+ /**
420
+ * The host is never a tab stop of its own : sequential navigation goes
421
+ * straight to the controls inside, in both directions, and
422
+ * {@link focus} covers a direct call on the host.
423
+ */
424
+ get hostTabStop() {
425
+ return false;
426
+ }
416
427
  /**
417
428
  * Returns the field element to focus/anchor on validation errors.
418
429
  */
@@ -549,6 +560,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
549
560
  * @private
550
561
  */
551
562
  handleSelect(value) {
563
+ this.presetFocusIndex = -1;
552
564
  this.value = value;
553
565
  this.hexDraft = value;
554
566
  this.dispatchEvent(new ChangeEvent(this.value));
@@ -557,13 +569,11 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
557
569
  /**
558
570
  * Moves focus among preset swatches on Arrow/Home/End, without picking
559
571
  * anything : browsing the palette with the keyboard is deliberately
560
- * non-destructive, since arrow keys are also how a screen reader user
561
- * reviews the options before deciding on one. Picking only ever happens
562
- * through an explicit activation instead, a click or an Enter/Space
563
- * press, both already wired through the button's own native `click`
564
- * handling. Every swatch is its own real Tab stop (see
565
- * {@link renderSwatchRadiogroup}), so this is an alternative to Tab/
566
- * Shift+Tab for moving between them, not the only way to reach one.
572
+ * non-destructive, as a listbox whose selection doesn't follow focus.
573
+ * Picking only ever happens through an explicit activation instead, a
574
+ * click or an Enter/Space press, both already wired through the button's
575
+ * own native `click` handling. The swatches share a single Tab stop,
576
+ * which follows the focus (see {@link renderSwatchListbox}).
567
577
  * @param event the native keyboard event.
568
578
  * @param index the index of the swatch that received the key press.
569
579
  * @private
@@ -590,6 +600,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
590
600
  return;
591
601
  }
592
602
  event.preventDefault();
603
+ this.presetFocusIndex = nextIndex;
593
604
  this.presetButtonEls[nextIndex]?.focus();
594
605
  }
595
606
  /**
@@ -646,11 +657,11 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
646
657
  class="confirm"
647
658
  size="s"
648
659
  color="primary"
649
- appearance="default"
660
+ appearance="soft"
650
661
  rounded
651
662
  type="button"
652
663
  @click=${this.handleConfirmClick}
653
- >${this.confirmLabel}</eun-button
664
+ >${this.confirmLabel ?? this.dictionary.common.confirm}</eun-button
654
665
  >
655
666
  <eun-button
656
667
  class="cancel"
@@ -659,7 +670,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
659
670
  rounded
660
671
  type="button"
661
672
  @click=${this.handleCancelClick}
662
- >${this.cancelLabel}</eun-button
673
+ >${this.cancelLabel ?? this.dictionary.common.cancel}</eun-button
663
674
  >
664
675
  </div>
665
676
  `;
@@ -687,14 +698,16 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
687
698
  ? nothing
688
699
  : html `
689
700
  <span class=${classMap({ empty: !this.value })}
690
- >${this.value || this.emptyValueLabel}</span
701
+ >${this.value ||
702
+ (this.emptyValueLabel ??
703
+ this.dictionary.colorPicker.noColor)}</span
691
704
  >
692
705
  `}
693
706
  </div>
694
707
  `;
695
708
  }
696
709
  /**
697
- * Renders the preset swatch radiogroup, while any presets are declared.
710
+ * Renders the preset swatch listbox, while any presets are declared.
698
711
  * @param presets the parsed preset options.
699
712
  * @returns the rendered template.
700
713
  * @private
@@ -703,43 +716,47 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
703
716
  return html `
704
717
  <div>
705
718
  <span id="swatches-label">${this.swatchesLabel}</span>
706
- ${this.renderSwatchRadiogroup(presets, this.swatchesLabel, false)}
719
+ ${this.renderSwatchListbox(presets, this.swatchesLabel, false)}
707
720
  </div>
708
721
  `;
709
722
  }
710
723
  /**
711
- * Renders the preset swatch radiogroup itself, shared between
724
+ * Renders the preset swatch listbox itself, shared between
712
725
  * {@link renderPresets} (inside the panel, under its own "Presets"
713
726
  * heading) and {@link renderInlinePresetsField} (as the whole field,
714
727
  * with no heading of its own since the field's own label already names
715
728
  * it).
716
729
  * @param presets the preset options to render.
717
- * @param ariaLabel the radiogroup's accessible name.
730
+ * @param ariaLabel the listbox's accessible name.
718
731
  * @param hasDescription whether a hint/error `#description` is being
719
732
  * rendered alongside the field, so it can be wired to `aria-describedby`
720
- * directly on the radiogroup ; only relevant when it stands in for the
733
+ * directly on the listbox ; only relevant when it stands in for the
721
734
  * whole field on its own, see {@link renderInlinePresetsField}.
722
735
  * @returns the rendered template.
723
736
  * @private
724
737
  */
725
- renderSwatchRadiogroup(presets, ariaLabel, hasDescription) {
738
+ renderSwatchListbox(presets, ariaLabel, hasDescription) {
739
+ const selectedIndex = presets.findIndex((preset) => preset.value === this.value);
740
+ const tabStop = this.presetFocusIndex >= 0 && this.presetFocusIndex < presets.length
741
+ ? this.presetFocusIndex
742
+ : Math.max(selectedIndex, 0);
726
743
  return html `
727
744
  <div
728
745
  id="swatches"
729
- role="radiogroup"
746
+ role="listbox"
730
747
  aria-label=${ifDefined(ariaLabel)}
731
748
  aria-describedby=${hasDescription ? "description" : nothing}
732
749
  >
733
750
  ${presets.map((preset, index) => {
734
- const checked = this.value === preset.value;
751
+ const selected = index === selectedIndex;
735
752
  return html `
736
753
  <button
737
754
  type="button"
738
755
  class="swatch-button"
739
- role="radio"
740
- aria-checked=${checked ? "true" : "false"}
756
+ role="option"
757
+ aria-selected=${selected ? "true" : "false"}
741
758
  aria-label=${preset.label}
742
- tabindex="0"
759
+ tabindex=${index === tabStop ? "0" : "-1"}
743
760
  style="--_optionColor: ${preset.value}"
744
761
  @click=${() => this.handleSelect(preset.value)}
745
762
  @keydown=${(event) => this.handlePresetKeydown(event, index)}
@@ -792,7 +809,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
792
809
  }
793
810
  /**
794
811
  * Renders the declared `option` presets directly as the field itself,
795
- * the same swatch radiogroup {@link renderPresets} renders inside the
812
+ * the same swatch listbox {@link renderPresets} renders inside the
796
813
  * panel, just in place of a trigger button and a panel to open at all.
797
814
  * Used whenever {@link presetsInline} is set and at least one preset is
798
815
  * declared (see {@link render}).
@@ -804,7 +821,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
804
821
  renderInlinePresetsField(hasDescription) {
805
822
  return html `
806
823
  <div id="field-wrapper">
807
- ${this.renderSwatchRadiogroup(this.presets, this.triggerAccessibleLabel, hasDescription)}
824
+ ${this.renderSwatchListbox(this.presets, this.triggerAccessibleLabel, hasDescription)}
808
825
  </div>
809
826
  ${this.readonlyAvailable ? this.renderEditActions() : nothing}
810
827
  `;
@@ -907,7 +924,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
907
924
  <button
908
925
  type="button"
909
926
  id="field"
910
- aria-haspopup="true"
927
+ aria-haspopup="dialog"
911
928
  aria-expanded=${this.isOpen}
912
929
  aria-label=${ifDefined(this.triggerAccessibleLabel)}
913
930
  aria-describedby=${hasDescription ? "description" : nothing}
@@ -927,7 +944,8 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
927
944
  `
928
945
  : nothing}
929
946
  <span id="value-text" class=${classMap({ empty: !this.value })}>
930
- ${this.value || this.emptyValueLabel}
947
+ ${this.value ||
948
+ (this.emptyValueLabel ?? this.dictionary.colorPicker.noColor)}
931
949
  </span>
932
950
  <span
933
951
  id="field-arrow"
@@ -940,6 +958,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
940
958
  ${this.readonlyAvailable ? this.renderEditActions() : nothing}
941
959
  <div
942
960
  id="listbox"
961
+ role="dialog"
943
962
  popover="auto"
944
963
  aria-label=${ifDefined(this.label)}
945
964
  @toggle=${this.handlePopoverToggle}
@@ -1083,6 +1102,9 @@ __decorate([
1083
1102
  __decorate([
1084
1103
  state()
1085
1104
  ], EunomiaColorPicker.prototype, "hexDraft", void 0);
1105
+ __decorate([
1106
+ state()
1107
+ ], EunomiaColorPicker.prototype, "presetFocusIndex", void 0);
1086
1108
  __decorate([
1087
1109
  query("#field")
1088
1110
  ], EunomiaColorPicker.prototype, "fieldEl", void 0);
@@ -105,7 +105,7 @@ const colorPicker = css `
105
105
  outline var(--eun-duration-m, 200ms) var(--eun-easing-out, ease-out),
106
106
  border var(--eun-duration-m, 200ms) var(--eun-easing-out, ease-out);
107
107
  }
108
- .swatch-button[aria-checked="true"] .swatch {
108
+ .swatch-button[aria-selected="true"] .swatch {
109
109
  border-color: var(--eun-color-primary-500, #3d6fff);
110
110
  border-width: calc(var(--eun-border-width-m, 1.5px) * 2);
111
111
  }
@@ -126,6 +126,19 @@ const colorPicker = css `
126
126
  #native-swatch .swatch {
127
127
  pointer-events: none;
128
128
  }
129
+
130
+ button#field #trigger-swatch,
131
+ #field-wrapper > #custom-row .swatch {
132
+ --_fieldSwatchSize: min(
133
+ var(--color-picker-swatch-size, 20px),
134
+ calc(var(--_lineHeight) + 2 * var(--_paddingBlock))
135
+ );
136
+ width: var(--_fieldSwatchSize);
137
+ height: var(--_fieldSwatchSize);
138
+ }
139
+ #field-wrapper > #custom-row #native-swatch {
140
+ display: flex;
141
+ }
129
142
  #native-input {
130
143
  position: absolute;
131
144
  inset: 0;
@@ -5,7 +5,9 @@ import { ValidatorsMixinInterface, Validity } from "../../../mixins/validators.m
5
5
  import { FormMixinInterface } from "../../../mixins/form.mixin.js";
6
6
  import { FormLabelMixinInterface } from "../../../mixins/form-label.mixin.js";
7
7
  import { FieldAppearanceMixinInterface } from "../../../mixins/field-appearance.mixin.js";
8
+ import { RoundedMixinInterface } from "../../../mixins/rounded.mixin.js";
8
9
  import { Constructor } from "../../../utils/constructor.type.js";
10
+ import { LocalizableMixinInterface } from "../../../mixins/localizable.mixin.js";
9
11
  /**
10
12
  * Tag name of the counter component.
11
13
  */
@@ -14,13 +16,14 @@ export declare const EunomiaCounterTagName = "eun-counter";
14
16
  * Type of the counter base used to declare every necessary Mixin interface elements.
15
17
  * @internal
16
18
  */
17
- type EunomiaCounterBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<number> & FormMixinInterface<number> & FormLabelMixinInterface & FieldAppearanceMixinInterface;
19
+ type EunomiaCounterBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<number> & FormMixinInterface<number> & FormLabelMixinInterface & FieldAppearanceMixinInterface & RoundedMixinInterface & LocalizableMixinInterface;
18
20
  declare const EunomiaCounterMixinBase: Constructor<EunomiaCounterBase>;
19
21
  /**
20
22
  * A numeric field with increment and decrement buttons, built on a native
21
23
  * number input.
22
24
  *
23
25
  * @prop {'outline' | 'flat' | 'underline'} [appearance='outline'] - How the field's surface is drawn: a bordered box, a muted background with no border, or a bottom border only
26
+ * @prop {boolean} [rounded=false] - Whether the field is fully rounded, as a pill. A custom border radius still wins over it
24
27
  * @prop {string} label - The title label of the field, rendered through the label component
25
28
  * @prop {string} instructions - Instructions displayed below the label
26
29
  * @prop {string} name - The field name
@@ -34,13 +37,14 @@ declare const EunomiaCounterMixinBase: Constructor<EunomiaCounterBase>;
34
37
  * @prop {boolean} [readonly=false] - Whether the field is read only
35
38
  * @prop {boolean} [required=false] - Whether the field is required
36
39
  * @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
40
+ * @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
37
41
  * @prop {string} [error] - An error computed outside the field, by the form or by the server. While set, the field is invalid and shows this message right away
38
42
  * @attr {boolean} [hide-error=false] - Whether the errors are hidden
39
43
  * @prop {Array<import('../../../types/form-validators.type.js').Validators<number>>} validators - The list of validation rules applied to the field value
40
- * @prop {string} [ariaLabelIncrement='Increase value'] - The accessible label of the increment button
41
- * @attr {string} [aria-label-increment='Increase value'] - The accessible label of the increment button
42
- * @prop {string} [ariaLabelDecrement='Decrease value'] - The accessible label of the decrement button
43
- * @attr {string} [aria-label-decrement='Decrease value'] - The accessible label of the decrement button
44
+ * @prop {string} [incrementLabel] - The accessible label of the increment button. Defaults to the localized string for the current locale (English: "Increase value")
45
+ * @attr {string} [increment-label] - The accessible label of the increment button. Defaults to the localized string for the current locale (English: "Increase value")
46
+ * @prop {string} [decrementLabel] - The accessible label of the decrement button. Defaults to the localized string for the current locale (English: "Decrease value")
47
+ * @attr {string} [decrement-label] - The accessible label of the decrement button. Defaults to the localized string for the current locale (English: "Decrease value")
44
48
  * @fires {ChangeEvent} eunchange - Fired on every value change
45
49
  * @cssprop [--counter-background] - Sets the background color of the field
46
50
  * @cssprop [--counter-border-color] - Sets the border color of the field
@@ -81,14 +85,14 @@ export declare class EunomiaCounter extends EunomiaCounterMixinBase {
81
85
  step: number;
82
86
  /**
83
87
  * Accessible label of the increment button.
84
- * @default Increase value
88
+ * Falls back to the localized string for the current locale when unset.
85
89
  */
86
- ariaLabelIncrement: string;
90
+ incrementLabel?: string;
87
91
  /**
88
92
  * Accessible label of the decrement button.
89
- * @default Decrease value
93
+ * Falls back to the localized string for the current locale when unset.
90
94
  */
91
- ariaLabelDecrement: string;
95
+ decrementLabel?: string;
92
96
  /**
93
97
  * The current numeric value, `undefined` while empty (e.g. after the
94
98
  * field is cleared by the user). Overrides the `value` accessor
@@ -121,17 +125,13 @@ export declare class EunomiaCounter extends EunomiaCounterMixinBase {
121
125
  * @readonly
122
126
  */
123
127
  private readonly fieldEl?;
124
- connectedCallback(): void;
125
- disconnectedCallback(): void;
126
- /**
127
- * Redirects focus to the native field whenever the host itself receives
128
- * it. See `eun-input`'s identical pattern : the host stays in the tab
129
- * order (`DisabledMixin`) rather than being excluded via `tabindex="-1"`,
130
- * which broke Tab from reaching the field entirely for this
131
- * form-associated component, instead of just skipping the host.
128
+ constructor();
129
+ /**
130
+ * Submits the owning form on Enter in the field, as a native number
131
+ * input does, since the browser never does it from a shadow root.
132
132
  * @private
133
133
  */
134
- private handleHostFocus;
134
+ private readonly handleImplicitSubmission;
135
135
  /**
136
136
  * Reads native HTML constraint validation from the underlying field
137
137
  * element (`required`, `min`, `max`, `step`, `badInput`).
@@ -139,6 +139,12 @@ export declare class EunomiaCounter extends EunomiaCounterMixinBase {
139
139
  * @returns validity state and optional message.
140
140
  */
141
141
  checkLocalValidators: () => Validity;
142
+ /**
143
+ * The host is never a tab stop of its own : sequential navigation goes
144
+ * straight to the controls inside, in both directions, and
145
+ * {@link focus} covers a direct call on the host.
146
+ */
147
+ protected get hostTabStop(): boolean;
142
148
  /**
143
149
  * Returns the field element to focus/anchor on validation errors.
144
150
  *