@eunomia/elements 1.0.0-beta.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/README.md +28 -6
  2. package/dist/angular/forms.d.ts +80 -0
  3. package/dist/angular/forms.js +267 -0
  4. package/dist/cdn/components/chunks/chunk-2XPIGFBD.js +1 -0
  5. package/dist/cdn/components/chunks/chunk-5IUNSTM3.js +1 -0
  6. package/dist/cdn/components/chunks/chunk-7HXPLZ7C.js +1 -0
  7. package/dist/cdn/components/chunks/{chunk-J3SZBXM6.js → chunk-A2NO4RSF.js} +7 -7
  8. package/dist/cdn/components/chunks/{chunk-Q34EQ5HZ.js → chunk-A623JJXJ.js} +1 -1
  9. package/dist/cdn/components/chunks/{chunk-Y3HOIL64.js → chunk-AW7PU43S.js} +2 -2
  10. package/dist/cdn/components/chunks/{chunk-FF3I7C3C.js → chunk-DWTNRFWW.js} +1 -3
  11. package/dist/cdn/components/chunks/chunk-FPNWPMHA.js +1 -0
  12. package/dist/cdn/components/chunks/chunk-GMWUHGNI.js +319 -0
  13. package/dist/cdn/components/chunks/{chunk-FQUWHNQT.js → chunk-GXOEPXDW.js} +1 -1
  14. package/dist/cdn/components/chunks/chunk-HXESKTK2.js +1 -0
  15. package/dist/cdn/components/chunks/chunk-JDUWKPHW.js +46 -0
  16. package/dist/cdn/components/chunks/{chunk-D3JJBHXN.js → chunk-JLKCBPD2.js} +2 -2
  17. package/dist/cdn/components/chunks/chunk-M6ZJHL4Q.js +1 -0
  18. package/dist/cdn/components/chunks/{chunk-TN3HGHQO.js → chunk-MDSUMP3O.js} +4 -4
  19. package/dist/cdn/components/chunks/chunk-MSQWOKBB.js +1 -0
  20. package/dist/cdn/components/chunks/{chunk-3UUZM7X2.js → chunk-NPXRQHUN.js} +3 -3
  21. package/dist/cdn/components/chunks/chunk-OB7DEGNX.js +1 -0
  22. package/dist/cdn/components/chunks/{chunk-JANNHW4Q.js → chunk-PADHCLBG.js} +4 -4
  23. package/dist/cdn/components/chunks/chunk-QMXE3KLT.js +1 -0
  24. package/dist/cdn/components/chunks/chunk-QNWKRPOW.js +1 -0
  25. package/dist/cdn/components/chunks/{chunk-KQUUMZ7U.js → chunk-RZF7QQDX.js} +7 -7
  26. package/dist/cdn/components/chunks/chunk-SCAP7J35.js +1 -0
  27. package/dist/cdn/components/chunks/chunk-TISMX7UL.js +1 -0
  28. package/dist/cdn/components/chunks/chunk-TWLI2ZOT.js +1 -0
  29. package/dist/cdn/components/chunks/chunk-W4VCWRY7.js +210 -0
  30. package/dist/cdn/components/chunks/{chunk-SZZRMJ65.js → chunk-WEG3KO6T.js} +3 -3
  31. package/dist/cdn/components/chunks/chunk-WP6ZYBAC.js +1 -0
  32. package/dist/cdn/components/chunks/{chunk-HGX6GPHM.js → chunk-XCBQ4CKH.js} +1 -1
  33. package/dist/cdn/components/chunks/{chunk-3UW2LJ7T.js → chunk-XZ3LFOQP.js} +2 -2
  34. package/dist/cdn/components/eun-alert.js +1 -1
  35. package/dist/cdn/components/eun-animate.js +92 -180
  36. package/dist/cdn/components/eun-breadcrumb.js +4 -4
  37. package/dist/cdn/components/eun-button.js +1 -1
  38. package/dist/cdn/components/eun-calendar.js +188 -115
  39. package/dist/cdn/components/eun-card.js +1 -1
  40. package/dist/cdn/components/eun-carousel.js +36 -28
  41. package/dist/cdn/components/eun-check-card.js +3 -3
  42. package/dist/cdn/components/eun-checkbox-list.js +2 -2
  43. package/dist/cdn/components/eun-checkbox.js +1 -1
  44. package/dist/cdn/components/eun-chip.js +11 -15
  45. package/dist/cdn/components/eun-collapse.js +21 -10
  46. package/dist/cdn/components/eun-color-picker.js +32 -32
  47. package/dist/cdn/components/eun-counter.js +8 -8
  48. package/dist/cdn/components/eun-date-picker.js +83 -79
  49. package/dist/cdn/components/eun-description-list.js +1 -1
  50. package/dist/cdn/components/eun-divider.js +9 -8
  51. package/dist/cdn/components/eun-drawer.js +8 -6
  52. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  53. package/dist/cdn/components/eun-dropdown-item.js +4 -4
  54. package/dist/cdn/components/eun-fab.js +1 -1
  55. package/dist/cdn/components/eun-image-card.js +2 -2
  56. package/dist/cdn/components/eun-image-carousel.js +55 -29
  57. package/dist/cdn/components/eun-infinite-list.js +2 -2
  58. package/dist/cdn/components/eun-input-file.js +3 -3
  59. package/dist/cdn/components/eun-input-phone.js +6 -6
  60. package/dist/cdn/components/eun-input.js +1 -1
  61. package/dist/cdn/components/eun-label.js +1 -1
  62. package/dist/cdn/components/eun-link.js +18 -329
  63. package/dist/cdn/components/eun-loader.js +1 -1
  64. package/dist/cdn/components/eun-modal.js +9 -7
  65. package/dist/cdn/components/eun-nav-menu.js +363 -0
  66. package/dist/cdn/components/eun-pagination.js +4 -4
  67. package/dist/cdn/components/eun-password-strength.js +2 -2
  68. package/dist/cdn/components/eun-progress-bar.js +1 -1
  69. package/dist/cdn/components/eun-radio-card.js +4 -4
  70. package/dist/cdn/components/eun-radio-list.js +1 -1
  71. package/dist/cdn/components/eun-radio.js +1 -1
  72. package/dist/cdn/components/eun-rating.js +9 -9
  73. package/dist/cdn/components/eun-scheduler-event-editor.js +113 -77
  74. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  75. package/dist/cdn/components/eun-scheduler.js +137 -79
  76. package/dist/cdn/components/eun-search.js +6 -6
  77. package/dist/cdn/components/eun-select.js +1 -1
  78. package/dist/cdn/components/eun-sidebar.js +23 -14
  79. package/dist/cdn/components/eun-slider.js +2 -2
  80. package/dist/cdn/components/eun-sliding-card.js +1 -1
  81. package/dist/cdn/components/eun-step.js +2 -2
  82. package/dist/cdn/components/eun-stepper.js +11 -12
  83. package/dist/cdn/components/eun-switch.js +2 -2
  84. package/dist/cdn/components/eun-tab-group.js +1 -1
  85. package/dist/cdn/components/eun-tab-panel.js +1 -1
  86. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  87. package/dist/cdn/components/eun-table.js +13 -10
  88. package/dist/cdn/components/eun-tag.js +1 -1
  89. package/dist/cdn/components/eun-textarea.js +4 -4
  90. package/dist/cdn/components/eun-time-picker.js +28 -25
  91. package/dist/cdn/components/eun-toast.js +8 -8
  92. package/dist/cdn/components/eun-toggle-group.js +8 -2
  93. package/dist/cdn/components/eun-toggle-item.js +8 -2
  94. package/dist/cdn/components/eun-toggle.js +4 -1
  95. package/dist/cdn/components/eun-toolbar.js +114 -36
  96. package/dist/cdn/components/eun-tooltip.js +1 -1
  97. package/dist/cdn/styles/eunomia-themes.css +1 -1
  98. package/dist/cdn/styles/themes/eunomia-theme.css +1 -1
  99. package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +2 -2
  100. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
  101. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
  102. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
  103. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
  104. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
  105. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
  106. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
  107. package/dist/cdn/styles/tools/mixins/layout/eunomia-grid.mixin.scss +116 -8
  108. package/dist/components/action/button/button.styles.js +2 -2
  109. package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -0
  110. package/dist/components/action/dropdown-button/dropdown-button.js +1 -0
  111. package/dist/components/action/dropdown-button/dropdown-button.styles.js +5 -4
  112. package/dist/components/action/dropdown-button/dropdown-item.d.ts +1 -0
  113. package/dist/components/action/dropdown-button/dropdown-item.js +1 -0
  114. package/dist/components/action/dropdown-button/dropdown-item.styles.js +4 -4
  115. package/dist/components/action/link/link.d.ts +2 -1
  116. package/dist/components/action/link/link.js +2 -1
  117. package/dist/components/action/link/link.styles.d.ts +40 -1
  118. package/dist/components/action/link/link.styles.js +83 -60
  119. package/dist/components/action/shared-styles/button-palette.styles.js +1 -1
  120. package/dist/components/action/toggle/toggle-group.d.ts +1 -0
  121. package/dist/components/action/toggle/toggle-group.js +1 -0
  122. package/dist/components/action/toggle/toggle-group.styles.d.ts +1 -0
  123. package/dist/components/action/toggle/toggle-group.styles.js +9 -2
  124. package/dist/components/action/toggle/toggle-item.styles.js +8 -2
  125. package/dist/components/action/toggle/toggle.d.ts +1 -0
  126. package/dist/components/action/toggle/toggle.js +1 -0
  127. package/dist/components/action/toggle/toggle.styles.d.ts +1 -0
  128. package/dist/components/action/toggle/toggle.styles.js +5 -1
  129. package/dist/components/alert/drawer/drawer.d.ts +14 -13
  130. package/dist/components/alert/drawer/drawer.js +20 -28
  131. package/dist/components/alert/modal/modal.d.ts +14 -13
  132. package/dist/components/alert/modal/modal.js +20 -28
  133. package/dist/components/alert/modal/modal.styles.js +1 -1
  134. package/dist/components/alert/toast/toast.d.ts +5 -5
  135. package/dist/components/alert/toast/toast.js +9 -10
  136. package/dist/components/alert/toast/toast.styles.js +3 -3
  137. package/dist/components/content/card/image-card.styles.js +1 -1
  138. package/dist/components/content/chip/chip.d.ts +7 -9
  139. package/dist/components/content/chip/chip.js +11 -14
  140. package/dist/components/content/chip/chip.styles.js +1 -5
  141. package/dist/components/content/collapse/collapse.d.ts +5 -0
  142. package/dist/components/content/collapse/collapse.js +7 -0
  143. package/dist/components/content/collapse/collapse.styles.d.ts +3 -0
  144. package/dist/components/content/collapse/collapse.styles.js +13 -1
  145. package/dist/components/content/description-list/description-list.styles.js +1 -1
  146. package/dist/components/content/image-carousel/image-carousel.d.ts +60 -13
  147. package/dist/components/content/image-carousel/image-carousel.js +100 -22
  148. package/dist/components/content/image-carousel/image-carousel.styles.js +32 -6
  149. package/dist/components/content/password-strength/password-strength.styles.js +1 -1
  150. package/dist/components/content/progress-bar/progress-bar.styles.js +1 -1
  151. package/dist/components/content/shared-styles/card-link.styles.js +1 -1
  152. package/dist/components/content/shared-styles/tone-surface.styles.js +1 -3
  153. package/dist/components/form/checkbox/check-card.styles.js +2 -2
  154. package/dist/components/form/checkbox/checkbox-list.d.ts +3 -1
  155. package/dist/components/form/checkbox/checkbox-list.js +3 -1
  156. package/dist/components/form/checkbox/checkbox.styles.js +1 -1
  157. package/dist/components/form/color-picker/color-picker.d.ts +28 -3
  158. package/dist/components/form/color-picker/color-picker.js +53 -7
  159. package/dist/components/form/counter/counter.js +1 -1
  160. package/dist/components/form/counter/counter.styles.js +2 -2
  161. package/dist/components/form/date-picker/date-picker-day-grid.styles.js +1 -1
  162. package/dist/components/form/date-picker/date-picker-month-grid.js +1 -1
  163. package/dist/components/form/date-picker/date-picker.d.ts +50 -13
  164. package/dist/components/form/date-picker/date-picker.js +178 -43
  165. package/dist/components/form/input/input.js +1 -4
  166. package/dist/components/form/input-file/input-file.styles.js +2 -2
  167. package/dist/components/form/input-phone/input-phone.js +4 -3
  168. package/dist/components/form/label/label.styles.js +1 -1
  169. package/dist/components/form/radio/radio-card.styles.js +2 -2
  170. package/dist/components/form/radio/radio.styles.js +1 -1
  171. package/dist/components/form/rating/rating.js +3 -5
  172. package/dist/components/form/rating/rating.styles.js +2 -2
  173. package/dist/components/form/search/search.d.ts +1 -7
  174. package/dist/components/form/search/search.js +2 -12
  175. package/dist/components/form/shared-styles/field.styles.js +2 -2
  176. package/dist/components/form/slider/slider.styles.js +1 -1
  177. package/dist/components/form/switch/switch.styles.js +1 -1
  178. package/dist/components/form/textarea/textarea.js +1 -5
  179. package/dist/components/form/textarea/textarea.styles.js +2 -2
  180. package/dist/components/form/time-picker/time-picker-columns.d.ts +4 -1
  181. package/dist/components/form/time-picker/time-picker-columns.js +64 -15
  182. package/dist/components/form/time-picker/time-picker-columns.styles.js +5 -1
  183. package/dist/components/form/time-picker/time-picker-list.d.ts +4 -1
  184. package/dist/components/form/time-picker/time-picker-list.js +15 -8
  185. package/dist/components/form/time-picker/time-picker.d.ts +11 -2
  186. package/dist/components/form/time-picker/time-picker.js +22 -8
  187. package/dist/components/layout/animate/animate.d.ts +35 -17
  188. package/dist/components/layout/animate/animate.js +27 -14
  189. package/dist/components/layout/animate/animate.styles.d.ts +2 -1
  190. package/dist/components/layout/animate/animate.styles.js +107 -179
  191. package/dist/components/layout/divider/divider.d.ts +1 -0
  192. package/dist/components/layout/divider/divider.js +2 -1
  193. package/dist/components/layout/divider/divider.styles.js +7 -6
  194. package/dist/components/layout/infinite-list/infinite-list.styles.js +1 -1
  195. package/dist/components/navigation/breadcrumb/breadcrumb.styles.js +3 -3
  196. package/dist/components/navigation/carousel/carousel.d.ts +23 -14
  197. package/dist/components/navigation/carousel/carousel.js +39 -27
  198. package/dist/components/navigation/carousel/carousel.styles.js +16 -8
  199. package/dist/components/navigation/nav-menu/nav-menu.d.ts +201 -0
  200. package/dist/components/navigation/nav-menu/nav-menu.js +673 -0
  201. package/dist/components/navigation/nav-menu/nav-menu.styles.d.ts +1 -0
  202. package/dist/components/navigation/nav-menu/nav-menu.styles.js +352 -0
  203. package/dist/components/navigation/pagination/pagination.d.ts +3 -0
  204. package/dist/components/navigation/pagination/pagination.styles.js +2 -2
  205. package/dist/components/navigation/sidebar/sidebar.d.ts +8 -10
  206. package/dist/components/navigation/sidebar/sidebar.js +12 -15
  207. package/dist/components/navigation/sidebar/sidebar.styles.js +13 -4
  208. package/dist/components/navigation/stepper/step.styles.js +2 -2
  209. package/dist/components/navigation/stepper/stepper.d.ts +24 -13
  210. package/dist/components/navigation/stepper/stepper.js +36 -23
  211. package/dist/components/navigation/stepper/stepper.styles.js +2 -2
  212. package/dist/components/navigation/tabs/tab-group/tab-group.js +1 -1
  213. package/dist/components/navigation/tabs/tab-panel/tab-panel.styles.js +1 -1
  214. package/dist/components/navigation/toolbar/toolbar.d.ts +121 -20
  215. package/dist/components/navigation/toolbar/toolbar.js +176 -45
  216. package/dist/components/navigation/toolbar/toolbar.styles.js +113 -28
  217. package/dist/events/editor-state-change.event.d.ts +28 -0
  218. package/dist/events/editor-state-change.event.js +22 -0
  219. package/dist/events/event-cancel.event.d.ts +20 -0
  220. package/dist/events/event-cancel.event.js +17 -0
  221. package/dist/events/period-change.event.d.ts +14 -6
  222. package/dist/events/period-change.event.js +9 -6
  223. package/dist/features/scheduler/calendar/calendar.d.ts +52 -20
  224. package/dist/features/scheduler/calendar/calendar.js +84 -36
  225. package/dist/features/scheduler/calendar/calendar.styles.js +5 -2
  226. package/dist/features/scheduler/scheduler/scheduler.d.ts +69 -4
  227. package/dist/features/scheduler/scheduler/scheduler.js +172 -47
  228. package/dist/features/scheduler/scheduler/scheduler.styles.js +6 -0
  229. package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +18 -20
  230. package/dist/features/scheduler/scheduler-event/scheduler-event.js +29 -38
  231. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +2 -2
  232. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +102 -18
  233. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +249 -112
  234. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.styles.js +11 -1
  235. package/dist/features/scheduler/shared/scheduler-event-popover.d.ts +9 -1
  236. package/dist/features/scheduler/shared/scheduler-event-popover.js +77 -42
  237. package/dist/features/scheduler/shared/scheduler-event-popover.styles.js +14 -3
  238. package/dist/features/scheduler/shared/scheduler-hour-grid.d.ts +3 -2
  239. package/dist/features/scheduler/shared/scheduler-hour-grid.js +53 -46
  240. package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +13 -7
  241. package/dist/features/scheduler/shared/scheduler-month-view.js +1 -1
  242. package/dist/features/scheduler/shared/scheduler-month-view.styles.js +13 -7
  243. package/dist/features/scheduler/shared/scheduler-year-view.d.ts +6 -5
  244. package/dist/features/scheduler/shared/scheduler-year-view.js +11 -7
  245. package/dist/features/scheduler/shared/scheduler-year-view.styles.js +57 -3
  246. package/dist/features/scheduler/shared/scheduler.types.d.ts +5 -9
  247. package/dist/features/scheduler/shared/scheduler.utils.d.ts +61 -0
  248. package/dist/features/scheduler/shared/scheduler.utils.js +78 -4
  249. package/dist/features/table/table/table-native.styles.js +8 -4
  250. package/dist/features/table/table/table.d.ts +2 -1
  251. package/dist/features/table/table/table.js +2 -1
  252. package/dist/features/table/table/table.styles.js +6 -4
  253. package/dist/i18n/en.d.ts +17 -0
  254. package/dist/i18n/en.js +17 -0
  255. package/dist/i18n/fr.js +17 -0
  256. package/dist/index.d.ts +6 -0
  257. package/dist/index.js +4 -0
  258. package/dist/jsx.d.ts +48 -6
  259. package/dist/mixins/anchor-position.mixin.d.ts +17 -0
  260. package/dist/mixins/anchor-position.mixin.js +45 -7
  261. package/dist/mixins/button.mixin.js +2 -1
  262. package/dist/mixins/check.mixin.js +14 -5
  263. package/dist/mixins/dialog-surface.mixin.d.ts +1 -1
  264. package/dist/mixins/dialog-surface.mixin.js +5 -5
  265. package/dist/mixins/form.mixin.js +33 -13
  266. package/dist/mixins/localizable.mixin.d.ts +1 -0
  267. package/dist/mixins/localizable.mixin.js +9 -2
  268. package/dist/mixins/radio.mixin.js +14 -5
  269. package/dist/mixins/validators.mixin.js +4 -3
  270. package/dist/react.d.ts +59 -0
  271. package/dist/react.js +42 -0
  272. package/dist/ssr/animate-ssr.css +35 -0
  273. package/dist/ssr/breadcrumb-ssr.css +3 -3
  274. package/dist/ssr/button-ssr.css +8 -2
  275. package/dist/ssr/card-ssr.css +1 -1
  276. package/dist/ssr/carousel-ssr.css +15 -4
  277. package/dist/ssr/chip-ssr.css +3 -3
  278. package/dist/ssr/collapse-ssr.css +2 -2
  279. package/dist/ssr/description-list-ssr.css +1 -1
  280. package/dist/ssr/divider-ssr.css +23 -0
  281. package/dist/ssr/field-ssr.css +245 -42
  282. package/dist/ssr/image-carousel-ssr.css +2 -4
  283. package/dist/ssr/links-ssr.css +17 -3
  284. package/dist/ssr/nav-menu-ssr.css +82 -0
  285. package/dist/ssr/overlay-ssr.css +4 -0
  286. package/dist/ssr/scheduler-ssr.css +182 -0
  287. package/dist/ssr/stepper-ssr.css +136 -0
  288. package/dist/ssr/table-ssr.css +7 -4
  289. package/dist/ssr/tag-ssr.css +1 -1
  290. package/dist/ssr/toolbar-ssr.css +7 -5
  291. package/dist/utils/css-length.utils.d.ts +14 -0
  292. package/dist/utils/css-length.utils.js +32 -0
  293. package/dist/utils/form-validation.utils.d.ts +36 -0
  294. package/dist/utils/form-validation.utils.js +113 -0
  295. package/dist/utils/implicit-submission.utils.js +2 -14
  296. package/dist/utils/interactive-content.utils.d.ts +10 -0
  297. package/dist/utils/interactive-content.utils.js +43 -0
  298. package/dist/utils/popover.utils.js +3 -2
  299. package/dist/utils/scroll-lock.utils.d.ts +9 -1
  300. package/dist/utils/scroll-lock.utils.js +21 -2
  301. package/dist/utils/theme-generator.utils.d.ts +1 -0
  302. package/dist/utils/theme-generator.utils.js +23 -10
  303. package/dist/utils/validity.utils.d.ts +18 -4
  304. package/dist/utils/validity.utils.js +74 -4
  305. package/package.json +34 -3
  306. package/styles/themes/mixins/eunomia-neutrals.mixin.scss +2 -2
  307. package/styles/tools/mixins/layout/eunomia-grid.mixin.scss +116 -8
  308. package/dist/cdn/components/chunks/chunk-4DRU3IYJ.js +0 -1
  309. package/dist/cdn/components/chunks/chunk-647ISUF4.js +0 -1
  310. package/dist/cdn/components/chunks/chunk-6TIEBY34.js +0 -1
  311. package/dist/cdn/components/chunks/chunk-E6UOI36Q.js +0 -1
  312. package/dist/cdn/components/chunks/chunk-GNAUNTS5.js +0 -1
  313. package/dist/cdn/components/chunks/chunk-IJJ67C66.js +0 -1
  314. package/dist/cdn/components/chunks/chunk-J7ETIRSK.js +0 -1
  315. package/dist/cdn/components/chunks/chunk-JGV7LHEI.js +0 -1
  316. package/dist/cdn/components/chunks/chunk-L74LXUGL.js +0 -1
  317. package/dist/cdn/components/chunks/chunk-MY6ORZJR.js +0 -46
  318. package/dist/cdn/components/chunks/chunk-QWTFP56P.js +0 -1
  319. package/dist/cdn/components/chunks/chunk-SFX2LQ4K.js +0 -205
  320. package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +0 -1
  321. package/dist/utils/boolean.utils.d.ts +0 -14
  322. package/dist/utils/boolean.utils.js +0 -20
@@ -8,13 +8,13 @@ var EunomiaImageCarousel_1;
8
8
  import { customElement, property, query, state } from "lit/decorators.js";
9
9
  import { html, LitElement, nothing } from "lit";
10
10
  import { classMap } from "lit/directives/class-map.js";
11
+ import { readCssLength } from "../../../utils/css-length.utils.js";
11
12
  import { debounce } from "../../../utils/time.utils.js";
12
13
  import { createSwipeGesture, } from "../../../utils/swipe-gesture.utils.js";
13
14
  import { ImageChangeEvent } from "../../../events/imagechange.event.js";
14
15
  import { imageCarouselStyles } from "./image-carousel.styles.js";
15
16
  import { LocalizableMixin } from "../../../mixins/localizable.mixin.js";
16
17
  import { cssTimeToMs } from "../../../utils/motion.utils.js";
17
- import { defaultTrueConverter } from "../../../utils/boolean.utils.js";
18
18
  /**
19
19
  * Tag name of the image carousel component.
20
20
  */
@@ -46,13 +46,13 @@ export const EunomiaImageCarouselTagName = "eun-image-carousel";
46
46
  * @prop {boolean} [magnifier=false] - Enables a hover-to-zoom effect on the main image, for mouse and pen pointers only. Has no effect on touch, which relies on the lightbox instead
47
47
  * @prop {number} [magnifierZoom=2.5] - How much the main image scales up under the cursor while hovering, with magnifier on
48
48
  * @attr {number} [magnifier-zoom=2.5] - How much the main image scales up under the cursor while hovering, with magnifier on
49
- * @prop {boolean} [showThumbnails=true] - Shows the thumbnail strip below the main stage, for jumping directly to an image
50
- * @attr {boolean} [show-thumbnails=true] - Shows the thumbnail strip below the main stage, for jumping directly to an image
51
- * @prop {boolean} [showDots=true] - Shows pagination dots below the main stage as a position indicator when the thumbnail strip is off. Has no effect while thumbnails are shown, since they already convey the same information
52
- * @attr {boolean} [show-dots=true] - Shows pagination dots below the main stage as a position indicator when the thumbnail strip is off. Has no effect while thumbnails are shown, since they already convey the same information
53
- * @prop {boolean} [lightbox=true] - Whether clicking the main image, or its expand control, opens the full-size lightbox
54
- * @prop {boolean} [lightboxGrid=true] - Shows a scrollable grid of every image alongside the lightbox's own main image, for jumping directly to one without closing it
55
- * @attr {boolean} [lightbox-grid=true] - Shows a scrollable grid of every image alongside the lightbox's own main image, for jumping directly to one without closing it
49
+ * @prop {boolean} [showThumbnails=false] - Shows the thumbnail strip below the main stage, for jumping directly to an image
50
+ * @attr {boolean} [show-thumbnails=false] - Shows the thumbnail strip below the main stage, for jumping directly to an image
51
+ * @prop {boolean} [showDots=false] - Shows pagination dots below the main stage as a position indicator when the thumbnail strip is off. Has no effect while thumbnails are shown, since they already convey the same information
52
+ * @attr {boolean} [show-dots=false] - Shows pagination dots below the main stage as a position indicator when the thumbnail strip is off. Has no effect while thumbnails are shown, since they already convey the same information
53
+ * @prop {boolean} [lightbox=false] - Whether clicking the main image, or its expand control, opens the full-size lightbox
54
+ * @prop {boolean} [lightboxGrid=false] - Shows a scrollable grid of every image alongside the lightbox's own main image, for jumping directly to one without closing it
55
+ * @attr {boolean} [lightbox-grid=false] - Shows a scrollable grid of every image alongside the lightbox's own main image, for jumping directly to one without closing it
56
56
  * @prop {boolean} [loop=false] - Wraps the previous and next controls around at the bounds instead of stopping there, on both the main stage and the lightbox
57
57
  * @prop {EunomiaImageCarouselTransition} [transition='slide'] - How the main stage and the lightbox animate between images
58
58
  * @prop {boolean} [autoplay=false] - Automatically advances to the next image on a set interval. Pauses on hover or focus and while the lightbox is open, but renders no pause or play control of its own, so pair this with a visible control calling the public pause and resume methods, since a moving gallery nobody can stop fails accessibility guidelines
@@ -76,6 +76,7 @@ export const EunomiaImageCarouselTagName = "eun-image-carousel";
76
76
  * @cssprop [--image-carousel-border-color] - Sets the border color of the main stage, which has no border by default
77
77
  * @cssprop [--image-carousel-thumbnail-size] - Sets the size of each thumbnail
78
78
  * @cssprop [--image-carousel-thumbnail-gap] - Sets the gap between thumbnails, and between the strip and the main stage
79
+ * @cssprop [--image-carousel-thumbnail-fade-size] - Sets the width of the fade on the thumbnail strip's edges that still hide thumbnails
79
80
  * @cssprop [--image-carousel-thumbnail-border-color] - Sets the border color of the thumbnails and of the lightbox's grid items at rest, transparent by default
80
81
  * @cssprop [--image-carousel-thumbnail-active-border-color] - Sets the border color of the active thumbnail and of the lightbox's active grid item
81
82
  * @cssprop [--image-carousel-nav-color] - Sets the icon color of the main stage's previous and next controls
@@ -92,6 +93,8 @@ export const EunomiaImageCarouselTagName = "eun-image-carousel";
92
93
  * @cssprop [--image-carousel-dot-gap] - Sets the gap between pagination dots
93
94
  * @cssprop [--image-carousel-dot-color] - Sets the color of the pagination dots
94
95
  * @cssprop [--image-carousel-dot-active-color] - Sets the color of the active pagination dot
96
+ * @cssprop [--image-carousel-focus-outline-color] - Sets the keyboard focus outline color of the stage, controls, thumbnails, dots and lightbox grid items
97
+ * @cssprop [--image-carousel-lightbox-focus-outline-color] - Sets the keyboard focus outline color of the lightbox's previous and next controls
95
98
  * @element eun-image-carousel
96
99
  */
97
100
  let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel extends LocalizableMixin(LitElement) {
@@ -127,31 +130,30 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
127
130
  /**
128
131
  * Shows the thumbnail strip below the main stage, for jumping directly
129
132
  * to an image.
130
- * @default true
133
+ * @default false
131
134
  */
132
- this.showThumbnails = true;
135
+ this.showThumbnails = false;
133
136
  /**
134
137
  * Shows pagination dots below the main stage as a position indicator
135
138
  * (which image, how many total) when `showThumbnails` is off — without
136
139
  * either, there'd be no visible way to tell. No effect while thumbnails
137
- * are shown, which already convey the same information ; set to `false`
138
- * for neither.
139
- * @default true
140
+ * are shown, which already convey the same information.
141
+ * @default false
140
142
  */
141
- this.showDots = true;
143
+ this.showDots = false;
142
144
  /**
143
145
  * Whether clicking the main image (or its expand control) opens the
144
146
  * full-size lightbox.
145
- * @default true
147
+ * @default false
146
148
  */
147
- this.lightbox = true;
149
+ this.lightbox = false;
148
150
  /**
149
151
  * Shows a scrollable grid of every image alongside the lightbox's own
150
152
  * main image — clicking a tile swaps the lightbox's image without
151
153
  * closing it, the same way a classifieds site's photo viewer does.
152
- * @default true
154
+ * @default false
153
155
  */
154
- this.lightboxGrid = true;
156
+ this.lightboxGrid = false;
155
157
  /**
156
158
  * Wraps prev/next around at the bounds instead of stopping there, on
157
159
  * both the main stage and the lightbox.
@@ -230,6 +232,20 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
230
232
  this.scheduleAnnounce = debounce(() => {
231
233
  this.announcement = this.buildAnnouncement();
232
234
  }, 150);
235
+ /**
236
+ * Fades out whichever edge of the thumbnail strip still has thumbnails
237
+ * hidden past it, hinting that the strip scrolls that way.
238
+ * @private
239
+ */
240
+ this.updateThumbnailsFade = () => {
241
+ const strip = this.thumbnailsEl;
242
+ if (!strip) {
243
+ return;
244
+ }
245
+ const maxScroll = strip.scrollWidth - strip.clientWidth;
246
+ strip.toggleAttribute("data-fade-start", strip.scrollLeft > 1);
247
+ strip.toggleAttribute("data-fade-end", strip.scrollLeft < maxScroll - 1);
248
+ };
233
249
  /**
234
250
  * Pauses autoplay on hover/focus, without touching {@link manuallyPaused}
235
251
  * — it resumes on {@link handleTransientResume}, unless {@link pauseAutoplay}
@@ -490,6 +506,60 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
490
506
  onDragCancel: this.handleStageDragCancel,
491
507
  });
492
508
  }
509
+ this.syncThumbnailsStrip(changed);
510
+ }
511
+ /**
512
+ * Keeps the thumbnail strip's observer on the current strip, refreshes
513
+ * its edge fades, and scrolls the active thumbnail into view whenever
514
+ * the active image changes.
515
+ *
516
+ * @param changed the properties changed in this update.
517
+ * @private
518
+ */
519
+ syncThumbnailsStrip(changed) {
520
+ const strip = this.thumbnailsEl;
521
+ if (strip !== this.observedThumbnailsEl) {
522
+ this.thumbnailsObserver?.disconnect();
523
+ this.observedThumbnailsEl = strip;
524
+ if (strip && typeof ResizeObserver !== "undefined") {
525
+ this.thumbnailsObserver ??= new ResizeObserver(this.updateThumbnailsFade);
526
+ this.thumbnailsObserver.observe(strip);
527
+ }
528
+ }
529
+ if (!strip) {
530
+ return;
531
+ }
532
+ if (changed.has("activeIndex")) {
533
+ this.scrollActiveThumbnailIntoView(strip);
534
+ }
535
+ this.updateThumbnailsFade();
536
+ }
537
+ /**
538
+ * Scrolls the strip, and only the strip (unlike `scrollIntoView`, which
539
+ * would also scroll the page), just enough to fully show the active
540
+ * thumbnail clear of the edge fades.
541
+ *
542
+ * @param strip the thumbnail strip.
543
+ * @private
544
+ */
545
+ scrollActiveThumbnailIntoView(strip) {
546
+ const thumb = strip.children[this.activeIndex];
547
+ if (!thumb) {
548
+ return;
549
+ }
550
+ const start = thumb.offsetLeft - strip.offsetLeft;
551
+ const end = start + thumb.offsetWidth;
552
+ const fade = readCssLength(strip, "--_thumbnailsFade") || 0;
553
+ let target;
554
+ if (start - fade < strip.scrollLeft) {
555
+ target = start - fade;
556
+ }
557
+ else if (end + fade > strip.scrollLeft + strip.clientWidth) {
558
+ target = end + fade - strip.clientWidth;
559
+ }
560
+ if (target !== undefined) {
561
+ strip.scrollTo({ left: Math.max(0, target), behavior: "smooth" });
562
+ }
493
563
  }
494
564
  /**
495
565
  * Whether `el` is one of the prev/next controls (main stage or
@@ -538,6 +608,8 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
538
608
  }
539
609
  this.swipeGesture?.destroy();
540
610
  this.dragPreviewEl?.remove();
611
+ this.thumbnailsObserver?.disconnect();
612
+ this.observedThumbnailsEl = undefined;
541
613
  super.disconnectedCallback?.();
542
614
  }
543
615
  /**
@@ -1022,6 +1094,7 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
1022
1094
  id="thumbnails"
1023
1095
  role="group"
1024
1096
  aria-label=${this.dictionary.imageCarousel.selectImage}
1097
+ @scroll=${this.updateThumbnailsFade}
1025
1098
  >
1026
1099
  ${this.images.map((image, index) => html `
1027
1100
  <button
@@ -1098,6 +1171,8 @@ let EunomiaImageCarousel = EunomiaImageCarousel_1 = class EunomiaImageCarousel e
1098
1171
  <eun-modal
1099
1172
  id="modal"
1100
1173
  hide-actions
1174
+ closeable
1175
+ close-on-backdrop
1101
1176
  aria-label=${this.lightboxLabel ??
1102
1177
  this.dictionary.imageCarousel.lightbox}
1103
1178
  @euncancel=${() => this.handleTransientResume()}
@@ -1261,16 +1336,16 @@ __decorate([
1261
1336
  property({ type: Number, attribute: "magnifier-zoom" })
1262
1337
  ], EunomiaImageCarousel.prototype, "magnifierZoom", void 0);
1263
1338
  __decorate([
1264
- property({ converter: defaultTrueConverter, attribute: "show-thumbnails" })
1339
+ property({ type: Boolean, attribute: "show-thumbnails" })
1265
1340
  ], EunomiaImageCarousel.prototype, "showThumbnails", void 0);
1266
1341
  __decorate([
1267
- property({ converter: defaultTrueConverter, attribute: "show-dots" })
1342
+ property({ type: Boolean, attribute: "show-dots" })
1268
1343
  ], EunomiaImageCarousel.prototype, "showDots", void 0);
1269
1344
  __decorate([
1270
- property({ converter: defaultTrueConverter })
1345
+ property({ type: Boolean })
1271
1346
  ], EunomiaImageCarousel.prototype, "lightbox", void 0);
1272
1347
  __decorate([
1273
- property({ converter: defaultTrueConverter, attribute: "lightbox-grid" })
1348
+ property({ type: Boolean, attribute: "lightbox-grid" })
1274
1349
  ], EunomiaImageCarousel.prototype, "lightboxGrid", void 0);
1275
1350
  __decorate([
1276
1351
  property({ type: Boolean })
@@ -1317,6 +1392,9 @@ __decorate([
1317
1392
  __decorate([
1318
1393
  query("#stage-images")
1319
1394
  ], EunomiaImageCarousel.prototype, "stageImagesEl", void 0);
1395
+ __decorate([
1396
+ query("#thumbnails")
1397
+ ], EunomiaImageCarousel.prototype, "thumbnailsEl", void 0);
1320
1398
  EunomiaImageCarousel = EunomiaImageCarousel_1 = __decorate([
1321
1399
  customElement(EunomiaImageCarouselTagName)
1322
1400
  ], EunomiaImageCarousel);
@@ -12,6 +12,7 @@ import { cssBelow } from "../../../utils/media.styles.js";
12
12
  * [--image-carousel-border-color] - Set a custom border color for the main stage (no border by default)
13
13
  * [--image-carousel-thumbnail-size] - Set a custom size for each thumbnail
14
14
  * [--image-carousel-thumbnail-gap] - Set a custom gap between thumbnails, and between the strip and the main stage
15
+ * [--image-carousel-thumbnail-fade-size] - Set a custom width for the fade on the thumbnail strip's edges that still hide thumbnails
15
16
  * [--image-carousel-thumbnail-border-color] - Set a custom border color for the thumbnails and the lightbox's grid items at rest (transparent by default)
16
17
  * [--image-carousel-thumbnail-active-border-color] - Set a custom border color for the active thumbnail and the lightbox's active grid item
17
18
  * [--image-carousel-nav-color] - Set a custom icon color for the main stage's prev/next controls
@@ -28,11 +29,18 @@ import { cssBelow } from "../../../utils/media.styles.js";
28
29
  * [--image-carousel-dot-gap] - Set a custom gap between pagination dots
29
30
  * [--image-carousel-dot-color] - Set a custom color for the pagination dots
30
31
  * [--image-carousel-dot-active-color] - Set a custom color for the active pagination dot
32
+ * [--image-carousel-focus-outline-color] - Set a custom keyboard focus outline color for the stage, controls, thumbnails, dots and grid items
33
+ * [--image-carousel-lightbox-focus-outline-color] - Set a custom keyboard focus outline color for the lightbox's previous and next controls
31
34
  */
32
35
  const base = css `
33
36
  :host {
34
37
  display: block;
38
+ min-width: 0;
35
39
  --_magnifierZoom: 2.5;
40
+ --_focusOutline: var(
41
+ --image-carousel-focus-outline-color,
42
+ var(--eun-color-primary-500, #3d6fff)
43
+ );
36
44
  --_transitionDuration: var(--image-carousel-transition-duration, 380ms);
37
45
  --_swipe-duration: var(
38
46
  --image-carousel-swipe-duration,
@@ -85,7 +93,7 @@ const base = css `
85
93
  }
86
94
 
87
95
  #stage:has(#expand-trigger:focus-visible) {
88
- outline-color: var(--eun-color-primary-500, #3d6fff);
96
+ outline-color: var(--_focusOutline);
89
97
  outline-offset: 2px;
90
98
  }
91
99
 
@@ -256,7 +264,7 @@ const base = css `
256
264
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.28);
257
265
  }
258
266
  .stage-nav:focus-visible {
259
- outline-color: var(--eun-color-primary-500, #3d6fff);
267
+ outline-color: var(--_focusOutline);
260
268
  outline-offset: 2px;
261
269
  }
262
270
  .stage-nav:disabled {
@@ -288,6 +296,23 @@ const base = css `
288
296
  gap: var(--image-carousel-thumbnail-gap, var(--eun-space-s, 8px));
289
297
  margin-top: var(--image-carousel-thumbnail-gap, var(--eun-space-s, 8px));
290
298
  overflow-x: auto;
299
+ contain: inline-size;
300
+ --_thumbnailsFade: var(--image-carousel-thumbnail-fade-size, 32px);
301
+ --_fadeStart: 0px;
302
+ --_fadeEnd: 0px;
303
+ mask-image: linear-gradient(
304
+ to right,
305
+ transparent,
306
+ #000 var(--_fadeStart),
307
+ #000 calc(100% - var(--_fadeEnd)),
308
+ transparent
309
+ );
310
+ }
311
+ #thumbnails[data-fade-start] {
312
+ --_fadeStart: var(--_thumbnailsFade);
313
+ }
314
+ #thumbnails[data-fade-end] {
315
+ --_fadeEnd: var(--_thumbnailsFade);
291
316
  }
292
317
  .thumbnail {
293
318
  all: unset;
@@ -325,11 +350,12 @@ const base = css `
325
350
  );
326
351
  }
327
352
  .thumbnail:focus-visible {
328
- outline-color: var(--eun-color-primary-500, #3d6fff);
353
+ outline-color: var(--_focusOutline);
329
354
  }
330
355
 
331
356
  #dots {
332
357
  display: flex;
358
+ flex-wrap: wrap;
333
359
  align-items: center;
334
360
  justify-content: center;
335
361
  gap: var(--image-carousel-dot-gap, var(--eun-space-xs, 4px));
@@ -355,7 +381,7 @@ const base = css `
355
381
  var(--eun-easing-default, ease);
356
382
  }
357
383
  .dot:focus-visible {
358
- outline-color: var(--eun-color-primary-500, #3d6fff);
384
+ outline-color: var(--_focusOutline);
359
385
  }
360
386
  .dot[aria-current="true"] {
361
387
  width: calc(var(--image-carousel-dot-size, 8px) * 3.5);
@@ -431,7 +457,7 @@ const base = css `
431
457
  background: rgba(0, 0, 0, 0.7);
432
458
  }
433
459
  .lightbox-nav:focus-visible {
434
- outline-color: #fff;
460
+ outline-color: var(--image-carousel-lightbox-focus-outline-color, #fff);
435
461
  }
436
462
  .lightbox-nav:disabled {
437
463
  cursor: not-allowed;
@@ -494,7 +520,7 @@ const base = css `
494
520
  );
495
521
  }
496
522
  .grid-item:focus-visible {
497
- outline: 2px solid var(--eun-color-primary-500, #3d6fff);
523
+ outline: 2px solid var(--_focusOutline);
498
524
  outline-offset: 2px;
499
525
  }
500
526
 
@@ -114,7 +114,7 @@ const base = css `
114
114
  #caption {
115
115
  color: var(
116
116
  --password-strength-caption-color,
117
- var(--eun-text-secondary, #484e61)
117
+ var(--eun-text-secondary, #666e8a)
118
118
  );
119
119
  }
120
120
 
@@ -103,7 +103,7 @@ const base = css `
103
103
  align-items: center;
104
104
  justify-content: space-between;
105
105
  gap: var(--eun-space-s, 8px);
106
- color: var(--progress-bar-corner-color, var(--eun-text-secondary, #484e61));
106
+ color: var(--progress-bar-corner-color, var(--eun-text-secondary, #666e8a));
107
107
  font-size: var(
108
108
  --progress-bar-corner-font-size,
109
109
  var(--eun-font-size-xs, 12px)
@@ -37,7 +37,7 @@ const base = css `
37
37
  --card-link-badge-background,
38
38
  var(--eun-content-hover, #edeff0)
39
39
  );
40
- color: var(--card-link-badge-color, var(--eun-text-secondary, #484e61));
40
+ color: var(--card-link-badge-color, var(--eun-text-secondary, #666e8a));
41
41
  transform: rotate(-45deg);
42
42
  pointer-events: none;
43
43
  }
@@ -36,7 +36,6 @@ import { css } from "lit";
36
36
  */
37
37
  export const toneSurfaceStyles = css `
38
38
  :host {
39
- /* How each appearance reads the palette slots. */
40
39
  --_bg-default: var(--_tint);
41
40
  --_fg-default: var(--_accent);
42
41
  --_bg-fill: var(--_solid);
@@ -45,10 +44,9 @@ export const toneSurfaceStyles = css `
45
44
  --_fg-outline: var(--_accent);
46
45
  --_bd-outline: var(--_solid);
47
46
  --_bg-flat: var(--eun-content-hover, #edeff0);
48
- --_fg-flat: var(--eun-text-secondary, #484e61);
47
+ --_fg-flat: var(--eun-text-secondary, #666e8a);
49
48
  }
50
49
 
51
- /* Step 1 : palettes. "medium" is also the fallback before "color" reflects. */
52
50
  :host(:not([color]):not([severity])),
53
51
  :host([color="medium"]:not([severity])) {
54
52
  --_solid: var(--eun-color-grey-700, #484e61);
@@ -40,12 +40,12 @@ const base = css `
40
40
  );
41
41
  --_hintColor: var(
42
42
  --check-card-hint-color,
43
- var(--eun-text-secondary, #484e61)
43
+ var(--eun-text-secondary, #666e8a)
44
44
  );
45
45
  --_color: var(--eun-text-color, #071621);
46
46
  --_iconColor: var(
47
47
  --check-card-icon-color,
48
- var(--eun-text-secondary, #484e61)
48
+ var(--eun-text-secondary, #666e8a)
49
49
  );
50
50
  --_focusIndicator: var(
51
51
  --check-card-focus-outline-color,
@@ -89,8 +89,10 @@ export declare class EunomiaCheckboxList extends EunomiaCheckboxList_base {
89
89
  get value(): string[];
90
90
  /**
91
91
  * Setter allowing to check every child whose value is in the given list.
92
+ * `null` or `undefined` (a reset with no default value, or an empty form
93
+ * model) unchecks every child.
92
94
  */
93
- set value(values: string[]);
95
+ set value(values: string[] | null | undefined);
94
96
  /**
95
97
  * Lifecycle hook called after the first render.
96
98
  * Used to attach event listeners to the options list.
@@ -136,11 +136,13 @@ let EunomiaCheckboxList = class EunomiaCheckboxList extends FormLabelMixin(Reado
136
136
  }
137
137
  /**
138
138
  * Setter allowing to check every child whose value is in the given list.
139
+ * `null` or `undefined` (a reset with no default value, or an empty form
140
+ * model) unchecks every child.
139
141
  */
140
142
  set value(values) {
141
143
  void this.updateComplete.then(() => {
142
144
  this.fields.forEach((field) => {
143
- field.checked = values.includes(field.value);
145
+ field.checked = values?.includes(field.value) ?? false;
144
146
  });
145
147
  });
146
148
  }
@@ -33,7 +33,7 @@ const base = css `
33
33
  );
34
34
  --_hintColor: var(
35
35
  --checkbox-hint-color,
36
- var(--eun-text-secondary, #484e61)
36
+ var(--eun-text-secondary, #666e8a)
37
37
  );
38
38
  --_color: var(--eun-text-color, #071621);
39
39
  --_focusIndicator: var(
@@ -1,7 +1,7 @@
1
1
  import { LitElement, PropertyValues, TemplateResult } from "lit";
2
2
  import { DisabledMixinInterface } from "../../../mixins/disabled.mixin.js";
3
3
  import { ReadonlyMixinInterface } from "../../../mixins/readonly.mixin.js";
4
- import { ValidatorsMixinInterface } from "../../../mixins/validators.mixin.js";
4
+ import { Validity, ValidatorsMixinInterface } from "../../../mixins/validators.mixin.js";
5
5
  import { FormMixinInterface } from "../../../mixins/form.mixin.js";
6
6
  import { FormLabelMixinInterface } from "../../../mixins/form-label.mixin.js";
7
7
  import { EditableMixinInterface } from "../../../mixins/editable.mixin.js";
@@ -298,6 +298,30 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
298
298
  * @internal
299
299
  */
300
300
  private get hexDraftInvalid();
301
+ /**
302
+ * The value handed to the native `<input type="color">`, which only
303
+ * accepts a `#rrggbb` hex and logs a warning for anything else.
304
+ * @internal
305
+ */
306
+ private get nativeValue();
307
+ /**
308
+ * Whether the field is the inline hex text input (no presets), where an
309
+ * invalid draft stays visible after it's confirmed.
310
+ * @internal
311
+ */
312
+ private get isInlineHexField();
313
+ /**
314
+ * Reads local validation state : an invalid hex typed in the inline
315
+ * field, or an assigned `value` that isn't a color, reports `badInput`.
316
+ *
317
+ * @returns validity state and optional message.
318
+ */
319
+ checkLocalValidators: () => Validity;
320
+ /**
321
+ * `FormMixin`'s own `formResetCallback` restores `value` ; this also
322
+ * drops an invalid hex draft left in the field.
323
+ */
324
+ formResetCallback(): void;
301
325
  /**
302
326
  * The trigger button's accessible name : `label` when set, exactly like
303
327
  * every other field. Falls back next to a plain `aria-label` attribute
@@ -471,8 +495,9 @@ export declare class EunomiaColorPicker extends EunomiaColorPickerMixinBase {
471
495
  private handleHexInput;
472
496
  /**
473
497
  * Commits the hex draft to `value` once it normalizes to a real color ;
474
- * otherwise reverts the draft back to the last committed `value`, so an
475
- * abandoned invalid edit doesn't linger in the input.
498
+ * otherwise keeps it in the input, marked invalid, so the person sees
499
+ * why nothing was applied. An empty draft reverts to the last committed
500
+ * `value`.
476
501
  * @private
477
502
  */
478
503
  private handleHexCommit;
@@ -216,6 +216,22 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
216
216
  * @internal
217
217
  */
218
218
  this.presetFocusIndex = -1;
219
+ /**
220
+ * Reads local validation state : an invalid hex typed in the inline
221
+ * field, or an assigned `value` that isn't a color, reports `badInput`.
222
+ *
223
+ * @returns validity state and optional message.
224
+ */
225
+ this.checkLocalValidators = () => {
226
+ const isValueInvalid = !!this.value && normalizeHexColor(this.value) === null;
227
+ if (isValueInvalid || (this.isInlineHexField && this.hexDraftInvalid)) {
228
+ return {
229
+ validity: { badInput: true },
230
+ message: this.dictionary.validation.invalidColor,
231
+ };
232
+ }
233
+ return { validity: {} };
234
+ };
219
235
  /**
220
236
  * Reacts to the dropdown panel's native `toggle` event : the single
221
237
  * source of truth for open/close state. The panel is `popover="auto"`,
@@ -341,6 +357,32 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
341
357
  get hexDraftInvalid() {
342
358
  return this.hexDraft !== "" && normalizeHexColor(this.hexDraft) === null;
343
359
  }
360
+ /**
361
+ * The value handed to the native `<input type="color">`, which only
362
+ * accepts a `#rrggbb` hex and logs a warning for anything else.
363
+ * @internal
364
+ */
365
+ get nativeValue() {
366
+ return normalizeHexColor(this.value ?? "") ?? "#000000";
367
+ }
368
+ /**
369
+ * Whether the field is the inline hex text input (no presets), where an
370
+ * invalid draft stays visible after it's confirmed.
371
+ * @internal
372
+ */
373
+ get isInlineHexField() {
374
+ return (!(this.readonlyAvailable && !this.editing) &&
375
+ !this.swatchOnly &&
376
+ this.presets.length === 0);
377
+ }
378
+ /**
379
+ * `FormMixin`'s own `formResetCallback` restores `value` ; this also
380
+ * drops an invalid hex draft left in the field.
381
+ */
382
+ formResetCallback() {
383
+ super.formResetCallback();
384
+ this.hexDraft = this.value ?? "";
385
+ }
344
386
  /**
345
387
  * The trigger button's accessible name : `label` when set, exactly like
346
388
  * every other field. Falls back next to a plain `aria-label` attribute
@@ -393,10 +435,13 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
393
435
  * `eun-select` uses for its own search text vs. `value`.
394
436
  */
395
437
  willUpdate(_changedProperties) {
396
- super.willUpdate(_changedProperties);
397
438
  if (_changedProperties.has("value") && !this.isOpen) {
398
439
  this.hexDraft = this.value ?? "";
399
440
  }
441
+ if (_changedProperties.has("hexDraft")) {
442
+ this.checkValidity(this.value);
443
+ }
444
+ super.willUpdate(_changedProperties);
400
445
  }
401
446
  /**
402
447
  * The host is never a tab stop of its own : sequential navigation goes
@@ -604,8 +649,9 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
604
649
  }
605
650
  /**
606
651
  * Commits the hex draft to `value` once it normalizes to a real color ;
607
- * otherwise reverts the draft back to the last committed `value`, so an
608
- * abandoned invalid edit doesn't linger in the input.
652
+ * otherwise keeps it in the input, marked invalid, so the person sees
653
+ * why nothing was applied. An empty draft reverts to the last committed
654
+ * `value`.
609
655
  * @private
610
656
  */
611
657
  handleHexCommit() {
@@ -613,7 +659,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
613
659
  if (normalized) {
614
660
  this.handleSelect(normalized);
615
661
  }
616
- else {
662
+ else if (this.hexDraft.trim() === "") {
617
663
  this.hexDraft = this.value ?? "";
618
664
  }
619
665
  }
@@ -843,7 +889,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
843
889
  aria-label=${this.nativeInputLabel ??
844
890
  this.dictionary.colorPicker.nativeInput}
845
891
  ?disabled=${this.disabled || this.readonly}
846
- .value=${live(this.value || "#000000")}
892
+ .value=${live(this.nativeValue)}
847
893
  @input=${this.handleNativeInput}
848
894
  />
849
895
  </label>
@@ -906,7 +952,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
906
952
  aria-label=${this.nativeInputLabel ??
907
953
  this.dictionary.colorPicker.nativeInput}
908
954
  ?disabled=${this.disabled || this.readonly}
909
- .value=${live(this.value || "#000000")}
955
+ .value=${live(this.nativeValue)}
910
956
  @input=${this.handleNativeInput}
911
957
  />
912
958
  </label>
@@ -996,7 +1042,7 @@ let EunomiaColorPicker = class EunomiaColorPicker extends EunomiaColorPickerMixi
996
1042
  aria-describedby=${hasDescription ? "description" : nothing}
997
1043
  ?disabled=${this.disabled || this.readonly}
998
1044
  aria-invalid=${this.showError}
999
- .value=${live(this.value || "#000000")}
1045
+ .value=${live(this.nativeValue)}
1000
1046
  @input=${this.handleNativeInput}
1001
1047
  />
1002
1048
  </label>
@@ -148,7 +148,7 @@ let EunomiaCounter = class EunomiaCounter extends EunomiaCounterMixinBase {
148
148
  "rangeOverflow",
149
149
  "stepMismatch",
150
150
  "badInput",
151
- ]);
151
+ ], this.validationDictionary.validation);
152
152
  };
153
153
  this.addEventListener("keydown", this.handleImplicitSubmission);
154
154
  }
@@ -26,13 +26,13 @@ const base = css `
26
26
  --_textColor: var(--counter-text-color, var(--eun-text-color, #071621));
27
27
  --_buttonColor: var(
28
28
  --counter-button-color,
29
- var(--eun-text-secondary, #484e61)
29
+ var(--eun-text-secondary, #666e8a)
30
30
  );
31
31
  --_errorColor: var(
32
32
  --counter-error-color,
33
33
  var(--eun-color-critical-100, #aa0014)
34
34
  );
35
- --_hintColor: var(--counter-hint-color, var(--eun-text-secondary, #484e61));
35
+ --_hintColor: var(--counter-hint-color, var(--eun-text-secondary, #666e8a));
36
36
  --_focusIndicator: var(
37
37
  --counter-focus-outline-color,
38
38
  var(--eun-color-primary-500, #3d6fff)
@@ -12,7 +12,7 @@ export const datePickerDayGridStyles = css `
12
12
  display: grid;
13
13
  }
14
14
  #calendar-weekdays span {
15
- color: var(--date-picker-weekday-color, var(--eun-text-secondary, #484e61));
15
+ color: var(--date-picker-weekday-color, var(--eun-text-secondary, #666e8a));
16
16
  font-size: var(--eun-font-size-xxs, 10px);
17
17
  text-align: center;
18
18
  text-transform: uppercase;
@@ -15,7 +15,7 @@ import { endOfMonth, isSameMonth, isWithinRange, startOfMonth, } from "../../../
15
15
  * @returns the rendered template.
16
16
  */
17
17
  export function renderDatePickerMonthGrid(props) {
18
- const { displayedYear, locale, previousYearLabel, chooseYearLabel, nextYearLabel } = props;
18
+ const { displayedYear, locale, previousYearLabel, chooseYearLabel, nextYearLabel, } = props;
19
19
  const months = Array.from({ length: 12 }, (_, month) => new Date(displayedYear, month, 1));
20
20
  return html `
21
21
  <div id="calendar">