@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
@@ -7,6 +7,7 @@ import { FormLabelMixinInterface } from "../../../mixins/form-label.mixin.js";
7
7
  import { EditableMixinInterface } from "../../../mixins/editable.mixin.js";
8
8
  import { FieldAppearanceMixinInterface } from "../../../mixins/field-appearance.mixin.js";
9
9
  import { Constructor } from "../../../utils/constructor.type.js";
10
+ import { LocalizableMixinInterface } from "../../../mixins/localizable.mixin.js";
10
11
  /**
11
12
  * Tag name of the textarea component.
12
13
  */
@@ -15,7 +16,7 @@ export declare const EunomiaTextareaTagName = "eun-textarea";
15
16
  * Type of the textarea base used to declare every necessary Mixin interface elements.
16
17
  * @internal
17
18
  */
18
- type EunomiaTextareaBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<string> & FormMixinInterface<string> & EditableMixinInterface & FormLabelMixinInterface & FieldAppearanceMixinInterface;
19
+ type EunomiaTextareaBase = LitElement & DisabledMixinInterface & ReadonlyMixinInterface & ValidatorsMixinInterface<string> & FormMixinInterface<string> & EditableMixinInterface & FormLabelMixinInterface & FieldAppearanceMixinInterface & LocalizableMixinInterface;
19
20
  declare const EunomiaTextareaMixinBase: Constructor<EunomiaTextareaBase>;
20
21
  /**
21
22
  * A multi-line text field, sharing its label, hint, and error chrome and
@@ -45,13 +46,14 @@ declare const EunomiaTextareaMixinBase: Constructor<EunomiaTextareaBase>;
45
46
  * @prop {boolean} [readonly=false] - Whether the field is read only
46
47
  * @prop {boolean} [required=false] - Whether the field is required
47
48
  * @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
49
+ * @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
48
50
  * @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
49
51
  * @prop {Array<import('../../../types/form-validators.type.js').Validators<string>>} validators - The list of validation rules applied to the field value
50
52
  * @prop {number} rows - The fixed number of visible rows. When omitted, the field automatically grows and shrinks its height to fit its content
51
53
  * @prop {boolean} [readonlyAvailable=false] - Whether the field can switch between a static display and an editable one
52
54
  * @attr {boolean} [readonly-available=false] - Whether the field can switch between a static display and an editable one
53
55
  * @prop {boolean} [formatting=false] - Switches the field to a rich text surface with a formatting toolbar above it, and, combined with readonlyAvailable, renders the static display as formatted rich text instead of raw source
54
- * @prop {string} [formatToolbarLabel='Text formatting'] - The accessible label of the bold, italic, and underline toggle group
56
+ * @prop {string} [formatToolbarLabel='Text formatting'] - The accessible label of the formatting toolbar
55
57
  * @prop {string} [formatBoldLabel='Bold'] - The accessible label of the bold toggle
56
58
  * @prop {string} [formatItalicLabel='Italic'] - The accessible label of the italic toggle
57
59
  * @prop {string} [formatUnderlineLabel='Underline'] - The accessible label of the underline toggle
@@ -66,9 +68,9 @@ declare const EunomiaTextareaMixinBase: Constructor<EunomiaTextareaBase>;
66
68
  * @prop {string} [autocomplete='off'] - The native autocomplete attribute forwarded to the field
67
69
  * @prop {number} minlength - The native minimum length constraint forwarded to the field
68
70
  * @prop {number} maxlength - The field's maximum length. Forwarded natively when not formatting, and enforced manually otherwise. Either way, a live character counter is shown under the field
69
- * @prop {string} [emptyValueLabel='No value set'] - Text displayed in place of the value when readonly and empty
70
- * @prop {string} [confirmLabel='Save'] - The label of the confirm button in edit mode
71
- * @prop {string} [cancelLabel='Cancel'] - The label of the cancel button in edit mode
71
+ * @prop {string} [emptyValueLabel] - Text displayed in place of the value when readonly and empty. Defaults to the localized string for the current locale (English: "No value set")
72
+ * @prop {string} [confirmLabel] - The label of the confirm button in edit mode. Defaults to the localized string for the current locale (English: "Save")
73
+ * @prop {string} [cancelLabel] - The label of the cancel button in edit mode. Defaults to the localized string for the current locale (English: "Cancel")
72
74
  * @fires {ChangeEvent} eunchange - Fired on every value change, including one applied through the formatting toolbar
73
75
  * @fires {CommitEvent} euncommit - Fired when an edit is confirmed in readonlyAvailable mode
74
76
  * @cssprop [--field-background] - Sets the background color of the field
@@ -88,6 +90,7 @@ declare const EunomiaTextareaMixinBase: Constructor<EunomiaTextareaBase>;
88
90
  * @cssprop [--field-edit-cancel-color] - Sets the color of the cancel button in readonly-available edit mode
89
91
  * @cssprop [--field-shadow] - Sets a box shadow on the field, none by default
90
92
  * @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
93
+ * @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
91
94
  * @cssprop [--field-label-font-size] - Sets the font size of the label
92
95
  * @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
93
96
  * @element eun-textarea
@@ -130,7 +133,7 @@ export declare class EunomiaTextarea extends EunomiaTextareaMixinBase {
130
133
  */
131
134
  formatting: boolean;
132
135
  /**
133
- * Accessible label of the Bold/Italic/Underline toggle group.
136
+ * Accessible label of the formatting toolbar.
134
137
  * @default Text formatting
135
138
  */
136
139
  formatToolbarLabel: string;
@@ -213,19 +216,19 @@ export declare class EunomiaTextarea extends EunomiaTextareaMixinBase {
213
216
  maxlength?: number;
214
217
  /**
215
218
  * Text displayed in place of the value when readonly and empty.
216
- * @default No value set
219
+ * Falls back to the localized string for the current locale when unset.
217
220
  */
218
- emptyValueLabel: string;
221
+ emptyValueLabel?: string;
219
222
  /**
220
223
  * Label of the confirm button in edit mode.
221
- * @default Save
224
+ * Falls back to the localized string for the current locale when unset.
222
225
  */
223
- confirmLabel: string;
226
+ confirmLabel?: string;
224
227
  /**
225
228
  * Label of the cancel button in edit mode.
226
- * @default Cancel
229
+ * Falls back to the localized string for the current locale when unset.
227
230
  */
228
- cancelLabel: string;
231
+ cancelLabel?: string;
229
232
  /**
230
233
  * Which color picker (text-color or highlight) is currently open, if any.
231
234
  * @private
@@ -296,19 +299,18 @@ export declare class EunomiaTextarea extends EunomiaTextareaMixinBase {
296
299
  * @readonly
297
300
  */
298
301
  private readonly toolbarEl?;
299
- connectedCallback(): void;
300
- disconnectedCallback(): void;
301
302
  /**
302
- * Redirects focus to the native field whenever the host itself receives
303
- * it. The host stays in the tab order (`DisabledMixin`) rather than
304
- * being excluded via `tabindex="-1"` — for this form-associated
305
- * component, that turned out to break Tab from reaching the field
306
- * entirely, instead of just skipping the host. Redirecting keeps a
307
- * single, real tab stop from the user's perspective without touching
308
- * that tab order.
309
- * @private
303
+ * Index, among {@link toolbarControls}, of the control holding the
304
+ * toolbar's single Tab stop.
305
+ * @internal
310
306
  */
311
- private handleHostFocus;
307
+ private toolbarFocusIndex;
308
+ /**
309
+ * Pending {@link applyToolbarRoving} call.
310
+ * @internal
311
+ */
312
+ private toolbarRovingTimer?;
313
+ disconnectedCallback(): void;
312
314
  /**
313
315
  * Lifecycle hook called after the first render : populates the
314
316
  * contenteditable surface (when `formatting`) and fits the field height
@@ -343,6 +345,12 @@ export declare class EunomiaTextarea extends EunomiaTextareaMixinBase {
343
345
  * @private
344
346
  */
345
347
  private checkEditableValidators;
348
+ /**
349
+ * The host is never a tab stop of its own : sequential navigation goes
350
+ * straight to the controls inside, in both directions, and
351
+ * {@link focus} covers a direct call on the host.
352
+ */
353
+ protected get hostTabStop(): boolean;
346
354
  /**
347
355
  * Returns the field element to focus/anchor on validation errors.
348
356
  *
@@ -509,6 +517,23 @@ export declare class EunomiaTextarea extends EunomiaTextareaMixinBase {
509
517
  * @private
510
518
  */
511
519
  private toggleColorPicker;
520
+ /**
521
+ * The swatches of the open color picker, in display order.
522
+ *
523
+ * @returns the swatch buttons, empty while no picker is open.
524
+ * @private
525
+ */
526
+ private colorSwatches;
527
+ /**
528
+ * Keyboard support of the open color picker, following the menu pattern
529
+ * : arrows move between swatches (wrapping), Home/End jump to the first
530
+ * and last, Escape closes it, and Tab closes it before leaving it. Both
531
+ * return the focus to the picker's trigger.
532
+ *
533
+ * @param event the keyboard event.
534
+ * @private
535
+ */
536
+ private handleColorPickerKeydown;
512
537
  /**
513
538
  * Closes whichever color picker is open, if any.
514
539
  * @private
@@ -532,6 +557,48 @@ export declare class EunomiaTextarea extends EunomiaTextareaMixinBase {
532
557
  * @private
533
558
  */
534
559
  private selectColor;
560
+ /**
561
+ * The toolbar's controls, in visual order : every format and alignment
562
+ * toggle, then both color picker triggers.
563
+ *
564
+ * @returns the controls, empty while the toolbar isn't rendered.
565
+ * @private
566
+ */
567
+ private toolbarControls;
568
+ /**
569
+ * Applies the toolbar's roving `tabindex` once the toggle groups have
570
+ * applied their own (which they do after their items' updates), so the
571
+ * whole toolbar stays a single Tab stop.
572
+ * @private
573
+ */
574
+ private scheduleToolbarRoving;
575
+ /**
576
+ * Makes the control at {@link toolbarFocusIndex} the toolbar's only Tab
577
+ * stop. Left alone while the toolbar is disabled, every control then
578
+ * being out of the Tab order already.
579
+ * @private
580
+ */
581
+ private applyToolbarRoving;
582
+ /**
583
+ * Remembers the toolbar control receiving the focus, so Tab comes back
584
+ * to it.
585
+ *
586
+ * @param event the focus event.
587
+ * @private
588
+ */
589
+ private handleToolbarFocusIn;
590
+ /**
591
+ * Keyboard support of the toolbar, following the toolbar pattern :
592
+ * Left/Right move between its controls (wrapping), Home/End jump to the
593
+ * first and last, and Enter/Space pick an alignment. Listened to in the
594
+ * capture phase, ahead of the alignment group's own arrow handling.
595
+ * Up/Down are left to the alignment group, which selects the next
596
+ * alignment.
597
+ *
598
+ * @param event the keyboard event.
599
+ * @private
600
+ */
601
+ private readonly handleToolbarKeydown;
535
602
  /**
536
603
  * Renders the formatting toolbar, shown above the field itself (never
537
604
  * above the readonly display) when `formatting` is set.
@@ -21,6 +21,7 @@ import { findRichTextColor, formatRichText, getPlainTextLength, populateEditable
21
21
  import { formLabelsStyles } from "../shared-styles/form-labels.styles.js";
22
22
  import { textareaStyles } from "./textarea.styles.js";
23
23
  import { pickValidity } from "../../../utils/validity.utils.js";
24
+ import { LocalizableMixin, } from "../../../mixins/localizable.mixin.js";
24
25
  /**
25
26
  * Tag name of the textarea component.
26
27
  */
@@ -467,7 +468,7 @@ function getActiveColorName(root, kind) {
467
468
  * @internal
468
469
  */
469
470
  const Base = DisabledMixin(ValidatorsMixin(LitElement));
470
- const EunomiaTextareaMixinBase = FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(EditableMixin(FormMixin(Base)))));
471
+ const EunomiaTextareaMixinBase = LocalizableMixin(FieldAppearanceMixin(FormLabelMixin(ReadonlyMixin(EditableMixin(FormMixin(Base))))));
471
472
  /**
472
473
  * A multi-line text field, sharing its label, hint, and error chrome and
473
474
  * theming with the input component. It grows and shrinks to fit its
@@ -496,13 +497,14 @@ const EunomiaTextareaMixinBase = FieldAppearanceMixin(FormLabelMixin(ReadonlyMix
496
497
  * @prop {boolean} [readonly=false] - Whether the field is read only
497
498
  * @prop {boolean} [required=false] - Whether the field is required
498
499
  * @prop {boolean} [hideError=false] - Whether the errors are hidden. The hint stays visible
500
+ * @prop {boolean} [invalid=false] - Shows the field as invalid without any message, for an error displayed elsewhere
499
501
  * @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
500
502
  * @prop {Array<import('../../../types/form-validators.type.js').Validators<string>>} validators - The list of validation rules applied to the field value
501
503
  * @prop {number} rows - The fixed number of visible rows. When omitted, the field automatically grows and shrinks its height to fit its content
502
504
  * @prop {boolean} [readonlyAvailable=false] - Whether the field can switch between a static display and an editable one
503
505
  * @attr {boolean} [readonly-available=false] - Whether the field can switch between a static display and an editable one
504
506
  * @prop {boolean} [formatting=false] - Switches the field to a rich text surface with a formatting toolbar above it, and, combined with readonlyAvailable, renders the static display as formatted rich text instead of raw source
505
- * @prop {string} [formatToolbarLabel='Text formatting'] - The accessible label of the bold, italic, and underline toggle group
507
+ * @prop {string} [formatToolbarLabel='Text formatting'] - The accessible label of the formatting toolbar
506
508
  * @prop {string} [formatBoldLabel='Bold'] - The accessible label of the bold toggle
507
509
  * @prop {string} [formatItalicLabel='Italic'] - The accessible label of the italic toggle
508
510
  * @prop {string} [formatUnderlineLabel='Underline'] - The accessible label of the underline toggle
@@ -517,9 +519,9 @@ const EunomiaTextareaMixinBase = FieldAppearanceMixin(FormLabelMixin(ReadonlyMix
517
519
  * @prop {string} [autocomplete='off'] - The native autocomplete attribute forwarded to the field
518
520
  * @prop {number} minlength - The native minimum length constraint forwarded to the field
519
521
  * @prop {number} maxlength - The field's maximum length. Forwarded natively when not formatting, and enforced manually otherwise. Either way, a live character counter is shown under the field
520
- * @prop {string} [emptyValueLabel='No value set'] - Text displayed in place of the value when readonly and empty
521
- * @prop {string} [confirmLabel='Save'] - The label of the confirm button in edit mode
522
- * @prop {string} [cancelLabel='Cancel'] - The label of the cancel button in edit mode
522
+ * @prop {string} [emptyValueLabel] - Text displayed in place of the value when readonly and empty. Defaults to the localized string for the current locale (English: "No value set")
523
+ * @prop {string} [confirmLabel] - The label of the confirm button in edit mode. Defaults to the localized string for the current locale (English: "Save")
524
+ * @prop {string} [cancelLabel] - The label of the cancel button in edit mode. Defaults to the localized string for the current locale (English: "Cancel")
523
525
  * @fires {ChangeEvent} eunchange - Fired on every value change, including one applied through the formatting toolbar
524
526
  * @fires {CommitEvent} euncommit - Fired when an edit is confirmed in readonlyAvailable mode
525
527
  * @cssprop [--field-background] - Sets the background color of the field
@@ -539,6 +541,7 @@ const EunomiaTextareaMixinBase = FieldAppearanceMixin(FormLabelMixin(ReadonlyMix
539
541
  * @cssprop [--field-edit-cancel-color] - Sets the color of the cancel button in readonly-available edit mode
540
542
  * @cssprop [--field-shadow] - Sets a box shadow on the field, none by default
541
543
  * @cssprop [--field-font-size] - Sets the font size of the field's value and placeholder
544
+ * @cssprop [--field-line-height] - Sets the line height of the field's value and placeholder
542
545
  * @cssprop [--field-label-font-size] - Sets the font size of the label
543
546
  * @cssprop [--field-message-font-size] - Sets the font size of the hint, error messages and instructions
544
547
  * @element eun-textarea
@@ -555,7 +558,7 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
555
558
  */
556
559
  this.formatting = false;
557
560
  /**
558
- * Accessible label of the Bold/Italic/Underline toggle group.
561
+ * Accessible label of the formatting toolbar.
559
562
  * @default Text formatting
560
563
  */
561
564
  this.formatToolbarLabel = "Text formatting";
@@ -625,21 +628,6 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
625
628
  * @default off
626
629
  */
627
630
  this.autocomplete = "off";
628
- /**
629
- * Text displayed in place of the value when readonly and empty.
630
- * @default No value set
631
- */
632
- this.emptyValueLabel = "No value set";
633
- /**
634
- * Label of the confirm button in edit mode.
635
- * @default Save
636
- */
637
- this.confirmLabel = "Save";
638
- /**
639
- * Label of the cancel button in edit mode.
640
- * @default Cancel
641
- */
642
- this.cancelLabel = "Cancel";
643
631
  /**
644
632
  * Which color picker (text-color or highlight) is currently open, if any.
645
633
  * @private
@@ -692,18 +680,11 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
692
680
  */
693
681
  this.pendingCaretNode = null;
694
682
  /**
695
- * Redirects focus to the native field whenever the host itself receives
696
- * it. The host stays in the tab order (`DisabledMixin`) rather than
697
- * being excluded via `tabindex="-1"` — for this form-associated
698
- * component, that turned out to break Tab from reaching the field
699
- * entirely, instead of just skipping the host. Redirecting keeps a
700
- * single, real tab stop from the user's perspective without touching
701
- * that tab order.
702
- * @private
683
+ * Index, among {@link toolbarControls}, of the control holding the
684
+ * toolbar's single Tab stop.
685
+ * @internal
703
686
  */
704
- this.handleHostFocus = () => {
705
- this.fieldEl?.focus();
706
- };
687
+ this.toolbarFocusIndex = 0;
707
688
  /**
708
689
  * Reads native HTML constraint validation from the underlying field
709
690
  * element (`required`, `minlength`, `maxlength`) when not `formatting` ;
@@ -914,6 +895,55 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
914
895
  this.closeColorPicker();
915
896
  }
916
897
  };
898
+ /**
899
+ * Keyboard support of the toolbar, following the toolbar pattern :
900
+ * Left/Right move between its controls (wrapping), Home/End jump to the
901
+ * first and last, and Enter/Space pick an alignment. Listened to in the
902
+ * capture phase, ahead of the alignment group's own arrow handling.
903
+ * Up/Down are left to the alignment group, which selects the next
904
+ * alignment.
905
+ *
906
+ * @param event the keyboard event.
907
+ * @private
908
+ */
909
+ this.handleToolbarKeydown = {
910
+ handleEvent: (event) => {
911
+ const controls = this.toolbarControls().filter((control) => !control.hasAttribute("disabled"));
912
+ const current = controls.indexOf(event.target);
913
+ if (current === -1) {
914
+ return;
915
+ }
916
+ const control = controls[current];
917
+ if ((event.key === "Enter" || event.key === " ") &&
918
+ control.closest("#align-toolbar")) {
919
+ event.preventDefault();
920
+ event.stopPropagation();
921
+ control.click();
922
+ return;
923
+ }
924
+ let next;
925
+ switch (event.key) {
926
+ case "ArrowRight":
927
+ next = (current + 1) % controls.length;
928
+ break;
929
+ case "ArrowLeft":
930
+ next = (current - 1 + controls.length) % controls.length;
931
+ break;
932
+ case "Home":
933
+ next = 0;
934
+ break;
935
+ case "End":
936
+ next = controls.length - 1;
937
+ break;
938
+ default:
939
+ return;
940
+ }
941
+ event.preventDefault();
942
+ event.stopPropagation();
943
+ controls[next].focus();
944
+ },
945
+ capture: true,
946
+ };
917
947
  }
918
948
  /**
919
949
  * The default value applied on connection and form reset. Overrides the
@@ -932,15 +962,11 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
932
962
  // @ts-expect-error — see comment above ; FormMixin's real setter exists.
933
963
  super.defaultValue = value;
934
964
  }
935
- connectedCallback() {
936
- super.connectedCallback?.();
937
- this.addEventListener("focus", this.handleHostFocus);
938
- }
939
965
  disconnectedCallback() {
940
- this.removeEventListener("focus", this.handleHostFocus);
941
966
  document.removeEventListener("click", this.handleOutsideClick, {
942
967
  capture: true,
943
968
  });
969
+ clearTimeout(this.toolbarRovingTimer);
944
970
  super.disconnectedCallback?.();
945
971
  }
946
972
  /**
@@ -980,6 +1006,7 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
980
1006
  }
981
1007
  return;
982
1008
  }
1009
+ this.scheduleToolbarRoving();
983
1010
  const shouldSync = ((changedProperties.has("editing") && this.editing) ||
984
1011
  (changedProperties.has("formatting") && this.formatting) ||
985
1012
  (changedProperties.has("value") &&
@@ -1013,6 +1040,14 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1013
1040
  }
1014
1041
  return { validity: {} };
1015
1042
  }
1043
+ /**
1044
+ * The host is never a tab stop of its own : sequential navigation goes
1045
+ * straight to the controls inside, in both directions, and
1046
+ * {@link focus} covers a direct call on the host.
1047
+ */
1048
+ get hostTabStop() {
1049
+ return false;
1050
+ }
1016
1051
  /**
1017
1052
  * Returns the field element to focus/anchor on validation errors.
1018
1053
  *
@@ -1284,6 +1319,63 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1284
1319
  document.addEventListener("click", this.handleOutsideClick, {
1285
1320
  capture: true,
1286
1321
  });
1322
+ void this.updateComplete.then(() => {
1323
+ const swatches = this.colorSwatches();
1324
+ (swatches.find((swatch) => swatch.ariaChecked === "true") ?? swatches[0])?.focus();
1325
+ });
1326
+ }
1327
+ /**
1328
+ * The swatches of the open color picker, in display order.
1329
+ *
1330
+ * @returns the swatch buttons, empty while no picker is open.
1331
+ * @private
1332
+ */
1333
+ colorSwatches() {
1334
+ return Array.from(this.shadowRoot?.querySelectorAll(".color-picker-panel .color-swatch") ?? []);
1335
+ }
1336
+ /**
1337
+ * Keyboard support of the open color picker, following the menu pattern
1338
+ * : arrows move between swatches (wrapping), Home/End jump to the first
1339
+ * and last, Escape closes it, and Tab closes it before leaving it. Both
1340
+ * return the focus to the picker's trigger.
1341
+ *
1342
+ * @param event the keyboard event.
1343
+ * @private
1344
+ */
1345
+ handleColorPickerKeydown(event) {
1346
+ const panel = event.currentTarget;
1347
+ const trigger = panel.previousElementSibling;
1348
+ if (event.key === "Escape" || event.key === "Tab") {
1349
+ if (event.key === "Escape") {
1350
+ event.preventDefault();
1351
+ }
1352
+ this.closeColorPicker();
1353
+ trigger?.focus();
1354
+ return;
1355
+ }
1356
+ const swatches = this.colorSwatches();
1357
+ const current = swatches.indexOf(this.shadowRoot?.activeElement);
1358
+ let next;
1359
+ switch (event.key) {
1360
+ case "ArrowRight":
1361
+ case "ArrowDown":
1362
+ next = (current + 1) % swatches.length;
1363
+ break;
1364
+ case "ArrowLeft":
1365
+ case "ArrowUp":
1366
+ next = (current - 1 + swatches.length) % swatches.length;
1367
+ break;
1368
+ case "Home":
1369
+ next = 0;
1370
+ break;
1371
+ case "End":
1372
+ next = swatches.length - 1;
1373
+ break;
1374
+ default:
1375
+ return;
1376
+ }
1377
+ event.preventDefault();
1378
+ swatches[next]?.focus();
1287
1379
  }
1288
1380
  /**
1289
1381
  * Closes whichever color picker is open, if any.
@@ -1329,6 +1421,56 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1329
1421
  this.closeColorPicker();
1330
1422
  void this.updateComplete.then(() => this.fieldEl?.focus());
1331
1423
  }
1424
+ /**
1425
+ * The toolbar's controls, in visual order : every format and alignment
1426
+ * toggle, then both color picker triggers.
1427
+ *
1428
+ * @returns the controls, empty while the toolbar isn't rendered.
1429
+ * @private
1430
+ */
1431
+ toolbarControls() {
1432
+ return Array.from(this.shadowRoot?.querySelectorAll("#toolbar-groups eun-toggle-item, #toolbar-groups .color-picker-trigger") ?? []);
1433
+ }
1434
+ /**
1435
+ * Applies the toolbar's roving `tabindex` once the toggle groups have
1436
+ * applied their own (which they do after their items' updates), so the
1437
+ * whole toolbar stays a single Tab stop.
1438
+ * @private
1439
+ */
1440
+ scheduleToolbarRoving() {
1441
+ clearTimeout(this.toolbarRovingTimer);
1442
+ this.toolbarRovingTimer = setTimeout(() => this.applyToolbarRoving());
1443
+ }
1444
+ /**
1445
+ * Makes the control at {@link toolbarFocusIndex} the toolbar's only Tab
1446
+ * stop. Left alone while the toolbar is disabled, every control then
1447
+ * being out of the Tab order already.
1448
+ * @private
1449
+ */
1450
+ applyToolbarRoving() {
1451
+ if (this.disabled || this.readonly) {
1452
+ return;
1453
+ }
1454
+ const controls = this.toolbarControls();
1455
+ const active = Math.min(this.toolbarFocusIndex, controls.length - 1);
1456
+ controls.forEach((control, index) => {
1457
+ control.setAttribute("tabindex", index === active ? "0" : "-1");
1458
+ });
1459
+ }
1460
+ /**
1461
+ * Remembers the toolbar control receiving the focus, so Tab comes back
1462
+ * to it.
1463
+ *
1464
+ * @param event the focus event.
1465
+ * @private
1466
+ */
1467
+ handleToolbarFocusIn(event) {
1468
+ const index = this.toolbarControls().indexOf(event.target);
1469
+ if (index !== -1 && index !== this.toolbarFocusIndex) {
1470
+ this.toolbarFocusIndex = index;
1471
+ this.applyToolbarRoving();
1472
+ }
1473
+ }
1332
1474
  /**
1333
1475
  * Renders the formatting toolbar, shown above the field itself (never
1334
1476
  * above the readonly display) when `formatting` is set.
@@ -1342,11 +1484,14 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1342
1484
  return html `
1343
1485
  <div
1344
1486
  id="toolbar-groups"
1487
+ role="toolbar"
1488
+ aria-label=${this.formatToolbarLabel}
1345
1489
  @mousedown=${(event) => event.preventDefault()}
1490
+ @focusin=${this.handleToolbarFocusIn}
1491
+ @keydown=${this.handleToolbarKeydown}
1346
1492
  >
1347
1493
  <eun-toggle-group
1348
1494
  id="toolbar"
1349
- aria-label=${this.formatToolbarLabel}
1350
1495
  ?disabled=${toolbarDisabled}
1351
1496
  @eunchange=${this.handleToolbarChange}
1352
1497
  >
@@ -1422,7 +1567,7 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1422
1567
  <button
1423
1568
  type="button"
1424
1569
  class="color-picker-trigger"
1425
- aria-haspopup="true"
1570
+ aria-haspopup="menu"
1426
1571
  aria-expanded=${isOpen ? "true" : "false"}
1427
1572
  aria-label=${label}
1428
1573
  ?disabled=${toolbarDisabled}
@@ -1439,12 +1584,13 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1439
1584
  class="color-picker-panel"
1440
1585
  role="menu"
1441
1586
  aria-label=${label}
1442
- @keydown=${(event) => event.key === "Escape" && this.closeColorPicker()}
1587
+ @keydown=${this.handleColorPickerKeydown}
1443
1588
  >
1444
1589
  <button
1445
1590
  type="button"
1446
1591
  class="color-swatch clear"
1447
1592
  role="menuitemradio"
1593
+ tabindex="-1"
1448
1594
  aria-checked=${activeName === null ? "true" : "false"}
1449
1595
  aria-label=${this.formatColorClearLabel}
1450
1596
  @click=${() => this.selectColor(kind, null)}
@@ -1454,6 +1600,7 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1454
1600
  type="button"
1455
1601
  class="color-swatch"
1456
1602
  role="menuitemradio"
1603
+ tabindex="-1"
1457
1604
  aria-checked=${activeName === color.name
1458
1605
  ? "true"
1459
1606
  : "false"}
@@ -1520,7 +1667,10 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1520
1667
  ? formatRichText(this.value)
1521
1668
  : html `<span
1522
1669
  class=${classMap({ "plain-value": true, empty: !hasValue })}
1523
- >${hasValue ? this.value : this.emptyValueLabel}</span
1670
+ >${hasValue
1671
+ ? this.value
1672
+ : (this.emptyValueLabel ??
1673
+ this.dictionary.common.noValue)}</span
1524
1674
  >`}
1525
1675
  </div>
1526
1676
  `;
@@ -1622,11 +1772,11 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1622
1772
  <eun-button
1623
1773
  class="confirm"
1624
1774
  size="s"
1625
- appearance="default"
1775
+ appearance="soft"
1626
1776
  rounded
1627
1777
  type="button"
1628
1778
  @click=${this.confirmEdit}
1629
- >${this.confirmLabel}</eun-button
1779
+ >${this.confirmLabel ?? this.dictionary.common.save}</eun-button
1630
1780
  >
1631
1781
  <eun-button
1632
1782
  class="cancel"
@@ -1636,7 +1786,7 @@ let EunomiaTextarea = class EunomiaTextarea extends EunomiaTextareaMixinBase {
1636
1786
  rounded
1637
1787
  type="button"
1638
1788
  @click=${this.cancelEdit}
1639
- >${this.cancelLabel}</eun-button
1789
+ >${this.cancelLabel ?? this.dictionary.common.cancel}</eun-button
1640
1790
  >
1641
1791
  </div>
1642
1792
  `)}
@@ -1,6 +1,9 @@
1
1
  import { css } from "lit";
2
2
  import { fieldStyles } from "../shared-styles/field.styles.js";
3
3
  const textarea = css `
4
+ :host {
5
+ --_defaultLineHeight: normal;
6
+ }
4
7
  #field {
5
8
  resize: vertical;
6
9
  min-height: 6rem;
@@ -35,8 +35,8 @@ export interface TimePickerColumnsProps {
35
35
  ariaLabelHour?: string;
36
36
  ariaLabelMinute?: string;
37
37
  ariaLabelPeriod?: string;
38
- ariaLabelIncrement?: string;
39
- ariaLabelDecrement?: string;
38
+ incrementLabel?: string;
39
+ decrementLabel?: string;
40
40
  onHourChange: (hour24: number) => void;
41
41
  onMinuteChange: (minute: number) => void;
42
42
  onPeriodChange: (period: Period) => void;