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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/components/chunks/{chunk-JYIIWN2P.js → chunk-36KLGY6U.js} +8 -8
  3. package/dist/cdn/components/chunks/chunk-3BMACIDO.js +1 -0
  4. package/dist/cdn/components/chunks/{chunk-KDN4O5W2.js → chunk-3PNGQEG4.js} +3 -3
  5. package/dist/cdn/components/chunks/{chunk-ZKZV2YG5.js → chunk-5XPOGBPL.js} +1 -1
  6. package/dist/cdn/components/chunks/{chunk-LMVW522V.js → chunk-62RLISRD.js} +1 -1
  7. package/dist/cdn/components/chunks/{chunk-PMPSJG5V.js → chunk-6FYW5TQU.js} +3 -3
  8. package/dist/cdn/components/chunks/chunk-AK2DIJX7.js +1 -0
  9. package/dist/cdn/components/chunks/chunk-B5XMGWM7.js +10 -0
  10. package/dist/cdn/components/chunks/chunk-BVASCT2V.js +109 -0
  11. package/dist/cdn/components/chunks/{chunk-VYFR364B.js → chunk-DGI7TKCU.js} +14 -9
  12. package/dist/cdn/components/chunks/chunk-GVS6IUKC.js +1 -0
  13. package/dist/cdn/components/chunks/chunk-GWLD2I3P.js +8 -0
  14. package/dist/cdn/components/chunks/{chunk-UDVB4LAE.js → chunk-I4ERDXSM.js} +5 -3
  15. package/dist/cdn/components/chunks/{chunk-QZ5SHR3I.js → chunk-J3SZBXM6.js} +2 -2
  16. package/dist/cdn/components/chunks/{chunk-MOMYII3P.js → chunk-LVKMAHMU.js} +10 -0
  17. package/dist/cdn/components/chunks/{chunk-XDPRWUKN.js → chunk-MQQJ6DID.js} +1 -1
  18. package/dist/cdn/components/chunks/{chunk-SZYEBMG6.js → chunk-PXF554MD.js} +1 -1
  19. package/dist/cdn/components/chunks/chunk-QL5GSW2A.js +1 -0
  20. package/dist/cdn/components/chunks/{chunk-7KKWYPHY.js → chunk-QXQ25SQS.js} +21 -19
  21. package/dist/cdn/components/chunks/{chunk-L2ADCEN7.js → chunk-SVGWCKWT.js} +1 -1
  22. package/dist/cdn/components/chunks/{chunk-MQQ4BGVJ.js → chunk-TFTRCIIK.js} +7 -6
  23. package/dist/cdn/components/chunks/chunk-TLBXTBMM.js +46 -0
  24. package/dist/cdn/components/chunks/chunk-UVHVQRPT.js +1 -0
  25. package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +1 -0
  26. package/dist/cdn/components/chunks/{chunk-2Y2EU2CI.js → chunk-Z3OFIE7S.js} +1 -1
  27. package/dist/cdn/components/eun-alert.js +13 -6
  28. package/dist/cdn/components/eun-animate.js +3 -3
  29. package/dist/cdn/components/eun-badge.js +1 -1
  30. package/dist/cdn/components/eun-button.js +1 -1
  31. package/dist/cdn/components/eun-calendar.js +2 -2
  32. package/dist/cdn/components/eun-card.js +4 -4
  33. package/dist/cdn/components/eun-carousel.js +21 -18
  34. package/dist/cdn/components/eun-check-card.js +1 -1
  35. package/dist/cdn/components/eun-checkbox-list.js +11 -8
  36. package/dist/cdn/components/eun-checkbox.js +1 -1
  37. package/dist/cdn/components/eun-chip.js +3 -3
  38. package/dist/cdn/components/eun-color-picker.js +60 -68
  39. package/dist/cdn/components/eun-counter.js +10 -10
  40. package/dist/cdn/components/eun-date-picker.js +47 -46
  41. package/dist/cdn/components/eun-description-list.js +2 -2
  42. package/dist/cdn/components/eun-divider.js +3 -3
  43. package/dist/cdn/components/eun-drawer.js +5 -5
  44. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  45. package/dist/cdn/components/eun-fab.js +2 -2
  46. package/dist/cdn/components/eun-icon.js +1 -1
  47. package/dist/cdn/components/eun-image-card.js +1 -1
  48. package/dist/cdn/components/eun-image-carousel.js +10 -10
  49. package/dist/cdn/components/eun-infinite-list.js +1 -1
  50. package/dist/cdn/components/eun-input-file.js +21 -21
  51. package/dist/cdn/components/eun-input-phone.js +10 -9
  52. package/dist/cdn/components/eun-input.js +1 -1
  53. package/dist/cdn/components/eun-link.js +2 -2
  54. package/dist/cdn/components/eun-loader.js +1 -1
  55. package/dist/cdn/components/eun-modal.js +13 -13
  56. package/dist/cdn/components/eun-pagination.js +16 -16
  57. package/dist/cdn/components/eun-password-strength.js +14 -10
  58. package/dist/cdn/components/eun-radio-card.js +1 -1
  59. package/dist/cdn/components/eun-radio-list.js +11 -8
  60. package/dist/cdn/components/eun-radio.js +1 -1
  61. package/dist/cdn/components/eun-rating.js +276 -0
  62. package/dist/cdn/components/eun-scheduler-event-editor.js +10 -10
  63. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  64. package/dist/cdn/components/eun-scheduler.js +28 -28
  65. package/dist/cdn/components/eun-search.js +19 -21
  66. package/dist/cdn/components/eun-select.js +27 -27
  67. package/dist/cdn/components/eun-sidebar.js +10 -8
  68. package/dist/cdn/components/eun-skeleton.js +1 -1
  69. package/dist/cdn/components/eun-slider.js +3 -3
  70. package/dist/cdn/components/eun-sliding-card.js +1 -1
  71. package/dist/cdn/components/eun-step.js +5 -4
  72. package/dist/cdn/components/eun-stepper.js +25 -25
  73. package/dist/cdn/components/eun-switch.js +1 -1
  74. package/dist/cdn/components/eun-tab-group.js +4 -4
  75. package/dist/cdn/components/eun-tab.js +1 -1
  76. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  77. package/dist/cdn/components/eun-table.js +1 -1
  78. package/dist/cdn/components/eun-tag.js +3 -3
  79. package/dist/cdn/components/eun-textarea.js +39 -34
  80. package/dist/cdn/components/eun-time-picker.js +15 -14
  81. package/dist/cdn/components/eun-toast.js +19 -10
  82. package/dist/cdn/components/eun-toggle-group.js +6 -4
  83. package/dist/cdn/components/eun-toggle-item.js +1 -1
  84. package/dist/cdn/components/eun-toggle.js +2 -2
  85. package/dist/cdn/components/eun-toolbar.js +5 -5
  86. package/dist/cdn/components/eun-tooltip.js +3 -3
  87. package/dist/components/action/button/button.d.ts +2 -1
  88. package/dist/components/action/button/button.js +3 -2
  89. package/dist/components/action/button/button.styles.js +10 -5
  90. package/dist/components/action/dropdown-button/dropdown-button.js +10 -5
  91. package/dist/components/action/toggle/toggle-group.js +1 -1
  92. package/dist/components/action/toggle/toggle-group.styles.js +4 -2
  93. package/dist/components/action/toggle/toggle.js +1 -1
  94. package/dist/components/alert/alert/alert.d.ts +9 -7
  95. package/dist/components/alert/alert/alert.js +11 -14
  96. package/dist/components/alert/alert/alert.styles.js +9 -2
  97. package/dist/components/alert/drawer/drawer.d.ts +5 -5
  98. package/dist/components/alert/drawer/drawer.js +8 -12
  99. package/dist/components/alert/drawer/drawer.styles.js +1 -1
  100. package/dist/components/alert/modal/modal.d.ts +10 -10
  101. package/dist/components/alert/modal/modal.js +13 -25
  102. package/dist/components/alert/toast/toast.d.ts +7 -5
  103. package/dist/components/alert/toast/toast.js +9 -13
  104. package/dist/components/alert/toast/toast.styles.js +15 -6
  105. package/dist/components/content/badge/badge.js +2 -2
  106. package/dist/components/content/card/card.js +1 -1
  107. package/dist/components/content/card/card.styles.js +2 -2
  108. package/dist/components/content/chip/chip.d.ts +4 -4
  109. package/dist/components/content/chip/chip.js +8 -8
  110. package/dist/components/content/description-list/description-list.js +3 -3
  111. package/dist/components/content/icon/icon.d.ts +3 -0
  112. package/dist/components/content/icon/icon.js +3 -0
  113. package/dist/components/content/icon/icon.style.d.ts +2 -0
  114. package/dist/components/content/icon/icon.style.js +4 -0
  115. package/dist/components/content/image-carousel/image-carousel.d.ts +12 -12
  116. package/dist/components/content/image-carousel/image-carousel.js +24 -24
  117. package/dist/components/content/password-strength/password-strength.d.ts +21 -6
  118. package/dist/components/content/password-strength/password-strength.js +37 -16
  119. package/dist/components/content/password-strength/password-strength.styles.js +4 -0
  120. package/dist/components/content/tag/tag.js +2 -2
  121. package/dist/components/content/tooltip/tooltip.js +3 -3
  122. package/dist/components/form/checkbox/check-card.d.ts +1 -0
  123. package/dist/components/form/checkbox/check-card.js +1 -0
  124. package/dist/components/form/checkbox/checkbox-list.d.ts +17 -0
  125. package/dist/components/form/checkbox/checkbox-list.js +39 -10
  126. package/dist/components/form/checkbox/checkbox.d.ts +1 -0
  127. package/dist/components/form/checkbox/checkbox.js +3 -1
  128. package/dist/components/form/checkbox/checkbox.styles.js +3 -2
  129. package/dist/components/form/color-picker/color-picker.d.ts +41 -28
  130. package/dist/components/form/color-picker/color-picker.js +66 -50
  131. package/dist/components/form/color-picker/color-picker.styles.js +1 -1
  132. package/dist/components/form/counter/counter.d.ts +22 -18
  133. package/dist/components/form/counter/counter.js +59 -61
  134. package/dist/components/form/date-picker/date-picker.d.ts +27 -6
  135. package/dist/components/form/date-picker/date-picker.js +75 -54
  136. package/dist/components/form/input/input.d.ts +38 -39
  137. package/dist/components/form/input/input.js +85 -109
  138. package/dist/components/form/input-file/input-file.d.ts +26 -13
  139. package/dist/components/form/input-file/input-file.js +35 -35
  140. package/dist/components/form/input-file/input-file.styles.js +4 -4
  141. package/dist/components/form/input-phone/input-phone.d.ts +22 -5
  142. package/dist/components/form/input-phone/input-phone.js +41 -13
  143. package/dist/components/form/radio/radio-card.d.ts +1 -0
  144. package/dist/components/form/radio/radio-card.js +1 -0
  145. package/dist/components/form/radio/radio-list.d.ts +23 -7
  146. package/dist/components/form/radio/radio-list.js +47 -22
  147. package/dist/components/form/radio/radio.d.ts +1 -0
  148. package/dist/components/form/radio/radio.js +1 -0
  149. package/dist/components/form/rating/rating.d.ts +349 -0
  150. package/dist/components/form/rating/rating.js +665 -0
  151. package/dist/components/form/rating/rating.styles.d.ts +1 -0
  152. package/dist/components/form/rating/rating.styles.js +213 -0
  153. package/dist/components/form/search/search.d.ts +8 -8
  154. package/dist/components/form/search/search.js +23 -41
  155. package/dist/components/form/select/select.d.ts +23 -10
  156. package/dist/components/form/select/select.js +59 -41
  157. package/dist/components/form/shared-styles/listbox.styles.js +10 -0
  158. package/dist/components/form/slider/slider.d.ts +7 -8
  159. package/dist/components/form/slider/slider.js +9 -12
  160. package/dist/components/form/switch/switch.d.ts +1 -0
  161. package/dist/components/form/switch/switch.js +1 -0
  162. package/dist/components/form/textarea/textarea.d.ts +89 -23
  163. package/dist/components/form/textarea/textarea.js +192 -43
  164. package/dist/components/form/time-picker/time-picker-columns.d.ts +2 -2
  165. package/dist/components/form/time-picker/time-picker-columns.js +8 -8
  166. package/dist/components/form/time-picker/time-picker.d.ts +24 -8
  167. package/dist/components/form/time-picker/time-picker.js +59 -38
  168. package/dist/components/layout/animate/animate.js +1 -1
  169. package/dist/components/layout/animate/animate.styles.js +2 -2
  170. package/dist/components/layout/divider/divider.js +1 -1
  171. package/dist/components/layout/divider/divider.styles.js +1 -1
  172. package/dist/components/loader/loader/loader.js +2 -2
  173. package/dist/components/loader/loader/loader.styles.js +14 -12
  174. package/dist/components/loader/skeleton/skeleton.js +1 -1
  175. package/dist/components/navigation/carousel/carousel.d.ts +31 -7
  176. package/dist/components/navigation/carousel/carousel.js +74 -35
  177. package/dist/components/navigation/carousel/carousel.styles.js +5 -2
  178. package/dist/components/navigation/pagination/pagination.d.ts +23 -21
  179. package/dist/components/navigation/pagination/pagination.js +30 -53
  180. package/dist/components/navigation/sidebar/sidebar.d.ts +15 -13
  181. package/dist/components/navigation/sidebar/sidebar.js +21 -33
  182. package/dist/components/navigation/sidebar/sidebar.styles.js +5 -3
  183. package/dist/components/navigation/stepper/step.js +9 -8
  184. package/dist/components/navigation/stepper/stepper.js +12 -5
  185. package/dist/components/navigation/tabs/tab-group/tab-group.js +2 -2
  186. package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +2 -2
  187. package/dist/components/navigation/toolbar/toolbar.d.ts +13 -13
  188. package/dist/components/navigation/toolbar/toolbar.js +20 -34
  189. package/dist/features/scheduler/calendar/calendar.js +1 -1
  190. package/dist/features/scheduler/scheduler/scheduler.d.ts +7 -7
  191. package/dist/features/scheduler/scheduler/scheduler.js +15 -24
  192. package/dist/features/scheduler/scheduler-event/scheduler-event.js +3 -3
  193. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +1 -1
  194. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +6 -4
  195. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +6 -7
  196. package/dist/i18n/en.d.ts +68 -0
  197. package/dist/i18n/en.js +68 -0
  198. package/dist/i18n/fr.js +68 -2
  199. package/dist/index.d.ts +2 -0
  200. package/dist/index.js +1 -0
  201. package/dist/mixins/button.mixin.js +3 -2
  202. package/dist/mixins/check.mixin.js +11 -10
  203. package/dist/mixins/disabled.mixin.d.ts +5 -0
  204. package/dist/mixins/disabled.mixin.js +21 -1
  205. package/dist/mixins/editable.mixin.js +28 -5
  206. package/dist/mixins/field-appearance.mixin.js +3 -2
  207. package/dist/mixins/form.mixin.d.ts +4 -0
  208. package/dist/mixins/form.mixin.js +87 -13
  209. package/dist/mixins/localizable.mixin.d.ts +1 -1
  210. package/dist/mixins/localizable.mixin.js +1 -1
  211. package/dist/mixins/radio.mixin.js +11 -10
  212. package/dist/mixins/readonly.mixin.d.ts +2 -1
  213. package/dist/mixins/readonly.mixin.js +10 -3
  214. package/dist/ssr/alert-ssr.css +187 -0
  215. package/dist/ssr/badge-ssr.css +67 -0
  216. package/dist/ssr/breadcrumb-ssr.css +41 -0
  217. package/dist/ssr/card-ssr.css +27 -15
  218. package/dist/ssr/carousel-ssr.css +238 -0
  219. package/dist/ssr/checkbox-ssr.css +67 -0
  220. package/dist/ssr/chip-ssr.css +242 -0
  221. package/dist/ssr/collapse-ssr.css +151 -0
  222. package/dist/ssr/field-ssr.css +163 -0
  223. package/dist/ssr/icon-ssr.css +266 -0
  224. package/dist/ssr/image-carousel-ssr.css +24 -0
  225. package/dist/ssr/links-ssr.css +7 -1
  226. package/dist/ssr/pagination-ssr.css +4 -0
  227. package/dist/ssr/rating-ssr.css +254 -0
  228. package/dist/ssr/sidebar-ssr.css +9 -1
  229. package/dist/ssr/skeleton-ssr.css +63 -0
  230. package/dist/ssr/tabs-ssr.css +129 -0
  231. package/dist/ssr/toggle-group-ssr.css +182 -0
  232. package/dist/ssr/toolbar-ssr.css +31 -2
  233. package/dist/utils/implicit-submission.utils.d.ts +18 -0
  234. package/dist/utils/implicit-submission.utils.js +79 -0
  235. package/dist/utils/listbox-options.utils.d.ts +11 -0
  236. package/dist/utils/listbox-options.utils.js +41 -3
  237. package/package.json +26 -7
  238. package/dist/cdn/components/chunks/chunk-4PI6RDUS.js +0 -1
  239. package/dist/cdn/components/chunks/chunk-A3X4KD2X.js +0 -1
  240. package/dist/cdn/components/chunks/chunk-BQFJR2UP.js +0 -110
  241. package/dist/cdn/components/chunks/chunk-G5SBDQQ3.js +0 -1
  242. package/dist/cdn/components/chunks/chunk-KSZRQRN4.js +0 -1
  243. package/dist/cdn/components/chunks/chunk-PE4DAXHQ.js +0 -3
  244. package/dist/cdn/components/chunks/chunk-RS7TWEMQ.js +0 -1
  245. package/dist/cdn/components/chunks/chunk-VOTRXBDS.js +0 -38
package/dist/i18n/fr.js CHANGED
@@ -4,7 +4,15 @@
4
4
  * error here, not a silent fallback to English at runtime.
5
5
  */
6
6
  export const fr = {
7
+ common: {
8
+ close: "Fermer",
9
+ cancel: "Annuler",
10
+ confirm: "Confirmer",
11
+ save: "Enregistrer",
12
+ noValue: "Aucune valeur",
13
+ },
7
14
  datePicker: {
15
+ openCalendar: "Ouvrir le calendrier",
8
16
  previousMonth: "Mois précédent",
9
17
  chooseMonthYear: "Choisir le mois et l'année",
10
18
  nextMonth: "Mois suivant",
@@ -17,6 +25,11 @@ export const fr = {
17
25
  amPm: "AM/PM",
18
26
  hour: "Heure",
19
27
  minute: "Minute",
28
+ day: "Jour",
29
+ month: "Mois",
30
+ year: "Année",
31
+ startDate: "Date de début",
32
+ endDate: "Date de fin",
20
33
  heading: {
21
34
  day: {
22
35
  single: "Sélectionner une date",
@@ -31,8 +44,6 @@ export const fr = {
31
44
  range: "Sélectionner une plage d'années",
32
45
  },
33
46
  },
34
- // French keeps the article in both contexts, unlike English's shorter
35
- // "Select date" — same phrasing as `heading` above.
36
47
  modalPreview: {
37
48
  day: {
38
49
  single: "Sélectionner une date",
@@ -49,6 +60,7 @@ export const fr = {
49
60
  },
50
61
  },
51
62
  timePicker: {
63
+ openClock: "Ouvrir l'horloge",
52
64
  amPm: "AM/PM",
53
65
  hour: "Heure",
54
66
  minute: "Minute",
@@ -58,6 +70,8 @@ export const fr = {
58
70
  mustBeAtOrBefore: (time) => `L'heure doit être à ${time} ou avant`,
59
71
  },
60
72
  scheduler: {
73
+ previous: "Période précédente",
74
+ next: "Période suivante",
61
75
  calendarView: "Vue du calendrier",
62
76
  },
63
77
  carousel: {
@@ -82,6 +96,11 @@ export const fr = {
82
96
  chip: {
83
97
  remove: "Retirer",
84
98
  },
99
+ passwordStrength: {
100
+ label: "Robustesse du mot de passe",
101
+ levels: ["Faible", "Moyen", "Bon", "Fort"],
102
+ caption: (label) => `${label}\u00A0:`,
103
+ },
85
104
  infiniteList: {
86
105
  loadingMore: "Chargement d'autres éléments…",
87
106
  itemsLoaded: (count) => count > 1
@@ -106,6 +125,53 @@ export const fr = {
106
125
  link: {
107
126
  opensInNewTab: "ouvre dans un nouvel onglet",
108
127
  },
128
+ input: {
129
+ clear: "Effacer le champ",
130
+ showPassword: "Afficher le mot de passe",
131
+ hidePassword: "Masquer le mot de passe",
132
+ },
133
+ search: {
134
+ panel: "Rechercher",
135
+ },
136
+ counter: {
137
+ increment: "Augmenter la valeur",
138
+ decrement: "Diminuer la valeur",
139
+ },
140
+ inputFile: {
141
+ remove: "Retirer le fichier",
142
+ select: "Sélectionner un fichier",
143
+ open: "Ouvrir dans un nouvel onglet",
144
+ },
145
+ inputPhone: {
146
+ selectCountry: "Sélectionner un pays",
147
+ },
148
+ colorPicker: {
149
+ noColor: "Aucune couleur sélectionnée",
150
+ },
151
+ pagination: {
152
+ previous: "Page précédente",
153
+ next: "Page suivante",
154
+ first: "Première page",
155
+ last: "Dernière page",
156
+ page: "Page",
157
+ },
158
+ sidebar: {
159
+ expand: "Déplier la barre latérale",
160
+ collapse: "Replier la barre latérale",
161
+ resize: "Redimensionner la barre latérale",
162
+ },
163
+ toolbar: {
164
+ menuOpen: "Ouvrir le menu",
165
+ menuClose: "Fermer le menu",
166
+ menu: "Menu",
167
+ },
168
+ rating: {
169
+ label: "Note",
170
+ valueText: (value, max) => `${value} sur ${max}`,
171
+ summary: (label, valueText) => `${label}\u00A0: ${valueText}`,
172
+ noValue: "Non noté",
173
+ clear: "Effacer la note",
174
+ },
109
175
  validation: {
110
176
  valueMissing: "Ce champ est obligatoire",
111
177
  tooShort: (min, length) => `Saisissez au moins ${min} caractères (actuellement ${length}).`,
package/dist/index.d.ts CHANGED
@@ -83,6 +83,8 @@ export { EunomiaColorPicker, EunomiaColorPickerTagName, } from "./components/for
83
83
  export { EunomiaInputFile, EunomiaInputFileTagName, } from "./components/form/input-file/input-file.js";
84
84
  export type { EunomiaInputFileKind } from "./components/form/input-file/input-file.js";
85
85
  export { EunomiaSlider, EunomiaSliderTagName, } from "./components/form/slider/slider.js";
86
+ export { EunomiaRating, EunomiaRatingTagName, } from "./components/form/rating/rating.js";
87
+ export type { EunomiaRatingStep } from "./components/form/rating/rating.js";
86
88
  export { EunomiaLoader, EunomiaLoaderTagName, } from "./components/loader/loader/loader.js";
87
89
  export type { EunomiaLoaderVariant } from "./components/loader/loader/loader.js";
88
90
  export { EunomiaSkeleton, EunomiaSkeletonTagName, } from "./components/loader/skeleton/skeleton.js";
package/dist/index.js CHANGED
@@ -90,6 +90,7 @@ export { EunomiaSelect, EunomiaSelectTagName, } from "./components/form/select/s
90
90
  export { EunomiaColorPicker, EunomiaColorPickerTagName, } from "./components/form/color-picker/color-picker.js";
91
91
  export { EunomiaInputFile, EunomiaInputFileTagName, } from "./components/form/input-file/input-file.js";
92
92
  export { EunomiaSlider, EunomiaSliderTagName, } from "./components/form/slider/slider.js";
93
+ export { EunomiaRating, EunomiaRatingTagName, } from "./components/form/rating/rating.js";
93
94
  export { EunomiaLoader, EunomiaLoaderTagName, } from "./components/loader/loader/loader.js";
94
95
  export { EunomiaSkeleton, EunomiaSkeletonTagName, } from "./components/loader/skeleton/skeleton.js";
95
96
  export { EunomiaScheduler, EunomiaSchedulerTagName, } from "./features/scheduler/scheduler/scheduler.js";
@@ -36,7 +36,8 @@ export const ButtonMixin = (superClass) => {
36
36
  */
37
37
  this.fixedColor = false;
38
38
  /**
39
- * The button size.
39
+ * The button size. The default isn't reflected, so an SSR framework
40
+ * doesn't see an attribute it never rendered.
40
41
  * @default "m"
41
42
  */
42
43
  this.size = "m";
@@ -171,7 +172,7 @@ export const ButtonMixin = (superClass) => {
171
172
  property({ type: Boolean, reflect: true, attribute: "fixed-color" })
172
173
  ], ButtonMixinClass.prototype, "fixedColor", void 0);
173
174
  __decorate([
174
- property({ reflect: true })
175
+ property({ reflect: true, useDefault: true })
175
176
  ], ButtonMixinClass.prototype, "size", void 0);
176
177
  __decorate([
177
178
  property({ type: Boolean, reflect: true })
@@ -30,6 +30,17 @@ export const CheckMixin = (superClass) => {
30
30
  * @default true
31
31
  */
32
32
  this.checkable = true;
33
+ /**
34
+ * The host is the control, so its hint or error goes on its own
35
+ * `aria-description`.
36
+ * @internal
37
+ */
38
+ this.descriptionOnHost = true;
39
+ /**
40
+ * Every change is a complete choice, so its error shows right away.
41
+ * @internal
42
+ */
43
+ this.errorOnChange = true;
33
44
  /**
34
45
  * Overrides `ValidatorsMixin`'s own `required` check, which validates
35
46
  * emptiness of `this.value` — meaningless here, since a checkable
@@ -120,7 +131,6 @@ export const CheckMixin = (superClass) => {
120
131
  * - Prevents propagation.
121
132
  * - Ignores action if `disabled` or `readonly`.
122
133
  * - Toggles the `checked` state.
123
- * - Updates ARIA attributes (`aria-description`).
124
134
  * - Dispatches a custom `ChangeEvent`.
125
135
  *
126
136
  * @param event The triggered mouse or keyboard event
@@ -134,15 +144,6 @@ export const CheckMixin = (superClass) => {
134
144
  this.checked = !this.checked;
135
145
  this.updateInternals();
136
146
  this.checkValidity(this.checked);
137
- if (this.description) {
138
- const attribute = this.description instanceof Array
139
- ? this.description.join(",")
140
- : this.description;
141
- this.setAttribute("aria-description", attribute);
142
- }
143
- else {
144
- this.removeAttribute("aria-description");
145
- }
146
147
  this.dispatchEvent(new ChangeEvent(this.checked));
147
148
  }
148
149
  /**
@@ -13,6 +13,11 @@ export declare class DisabledMixinInterface {
13
13
  * - `tabindex` (to prevent focus when disabled),
14
14
  * - `aria-disabled` for accessibility, only present while disabled.
15
15
  *
16
+ * A component whose host is the control itself (a checkbox, a button) gets
17
+ * `tabindex="0"` while enabled. One rendering its own focusable controls
18
+ * inside its shadow root overrides {@link hostTabStop} to `false`, so the
19
+ * host never becomes an extra, empty stop in front of them.
20
+ *
16
21
  * @param superClass - The base class to extend.
17
22
  * @returns A new class extending the base with `disabled` behavior.
18
23
  */
@@ -12,6 +12,11 @@ import { property } from "lit/decorators.js";
12
12
  * - `tabindex` (to prevent focus when disabled),
13
13
  * - `aria-disabled` for accessibility, only present while disabled.
14
14
  *
15
+ * A component whose host is the control itself (a checkbox, a button) gets
16
+ * `tabindex="0"` while enabled. One rendering its own focusable controls
17
+ * inside its shadow root overrides {@link hostTabStop} to `false`, so the
18
+ * host never becomes an extra, empty stop in front of them.
19
+ *
15
20
  * @param superClass - The base class to extend.
16
21
  * @returns A new class extending the base with `disabled` behavior.
17
22
  */
@@ -26,6 +31,13 @@ export const DisabledMixin = (superClass) => {
26
31
  */
27
32
  this.disabled = false;
28
33
  }
34
+ /**
35
+ * Whether the host itself is a tab stop while enabled. `false` for a
36
+ * component whose focusable controls live inside its shadow root.
37
+ */
38
+ get hostTabStop() {
39
+ return true;
40
+ }
29
41
  /**
30
42
  * LitElement lifecycle method.
31
43
  * Called when reactive properties are updated.
@@ -35,7 +47,15 @@ export const DisabledMixin = (superClass) => {
35
47
  updated(_changedProperties) {
36
48
  super.updated(_changedProperties);
37
49
  if (_changedProperties.has("disabled")) {
38
- this.setAttribute("tabindex", this.disabled ? "-1" : "0");
50
+ if (this.disabled) {
51
+ this.setAttribute("tabindex", "-1");
52
+ }
53
+ else if (this.hostTabStop) {
54
+ this.setAttribute("tabindex", "0");
55
+ }
56
+ else {
57
+ this.removeAttribute("tabindex");
58
+ }
39
59
  if (this.disabled) {
40
60
  this.setAttribute("aria-disabled", "true");
41
61
  }
@@ -4,6 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
+ };
7
12
  import { property } from "lit/decorators.js";
8
13
  import { CommitEvent } from "../events/commit.event.js";
9
14
  /**
@@ -22,9 +27,11 @@ import { CommitEvent } from "../events/commit.event.js";
22
27
  * @returns A class extending the provided superclass with editable behavior.
23
28
  */
24
29
  export const EditableMixin = (superClass) => {
30
+ var _EditableMixinClass_instances, _EditableMixinClass_leaveEdit, _EditableMixinClass_ownsFocus;
25
31
  class EditableMixinClass extends superClass {
26
32
  constructor() {
27
33
  super(...arguments);
34
+ _EditableMixinClass_instances.add(this);
28
35
  /**
29
36
  * Whether the field can switch between a static read display and an
30
37
  * editable one. When false, the field always renders as fully editable.
@@ -50,15 +57,19 @@ export const EditableMixin = (superClass) => {
50
57
  }
51
58
  /**
52
59
  * Confirms the current edit. Runs validation first; if it fails, the
53
- * field stays in edit mode and the error is shown instead of committing.
54
- * On success, dispatches a {@link CommitEvent} so consumers can persist
55
- * the new value.
60
+ * field stays in edit mode, shows its error and gets the focus back
61
+ * instead of committing. On success, dispatches a {@link CommitEvent}
62
+ * so consumers can persist the new value.
56
63
  */
57
64
  confirmEdit() {
58
65
  if (!this.checkValidity(this.value)) {
66
+ this.validationRequested = true;
67
+ if (__classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_ownsFocus).call(this)) {
68
+ this.focus();
69
+ }
59
70
  return;
60
71
  }
61
- this.editing = false;
72
+ __classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_leaveEdit).call(this);
62
73
  this.dispatchEvent(new CommitEvent());
63
74
  }
64
75
  /**
@@ -67,9 +78,21 @@ export const EditableMixin = (superClass) => {
67
78
  */
68
79
  cancelEdit() {
69
80
  this.value = this.valueOnEditStart;
70
- this.editing = false;
81
+ __classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_leaveEdit).call(this);
71
82
  }
72
83
  }
84
+ _EditableMixinClass_instances = new WeakSet(), _EditableMixinClass_leaveEdit = function _EditableMixinClass_leaveEdit() {
85
+ const restoreFocus = __classPrivateFieldGet(this, _EditableMixinClass_instances, "m", _EditableMixinClass_ownsFocus).call(this);
86
+ this.editing = false;
87
+ if (restoreFocus) {
88
+ void this.updateComplete.then(() => this.shadowRoot
89
+ ?.querySelector("#readonly-display")
90
+ ?.focus());
91
+ }
92
+ }, _EditableMixinClass_ownsFocus = function _EditableMixinClass_ownsFocus() {
93
+ const active = document.activeElement;
94
+ return (!active || active === document.body || this.matches(":focus-within"));
95
+ };
73
96
  __decorate([
74
97
  property({
75
98
  type: Boolean,
@@ -20,13 +20,14 @@ export const FieldAppearanceMixin = (superClass) => {
20
20
  super(...arguments);
21
21
  /**
22
22
  * How the field's surface is drawn.
23
- * By default, set to "outline".
23
+ * By default, set to "outline". The default isn't reflected, so an SSR
24
+ * framework doesn't see an attribute it never rendered.
24
25
  */
25
26
  this.appearance = "outline";
26
27
  }
27
28
  }
28
29
  __decorate([
29
- property({ reflect: true })
30
+ property({ reflect: true, useDefault: true })
30
31
  ], FieldAppearanceMixinClass.prototype, "appearance", void 0);
31
32
  return FieldAppearanceMixinClass;
32
33
  };
@@ -17,12 +17,16 @@ export declare class FormMixinInterface<T> {
17
17
  description?: string | string[] | undefined;
18
18
  valueState?: T;
19
19
  hideError?: boolean;
20
+ invalid: boolean;
20
21
  form: HTMLFormElement | null;
21
22
  dirty: boolean;
22
23
  touched: boolean;
23
24
  validationRequested: boolean;
24
25
  controlled: boolean;
26
+ descriptionOnHost: boolean;
27
+ errorOnChange: boolean;
25
28
  get showError(): boolean;
29
+ get showErrorMessages(): boolean;
26
30
  get pristine(): boolean;
27
31
  get untouched(): boolean;
28
32
  get value(): T;
@@ -21,6 +21,7 @@ import { ChangeEvent } from "../events/change.event.js";
21
21
  export const ERROR_DISPLAY_PROPERTIES = [
22
22
  "valid",
23
23
  "hideError",
24
+ "invalid",
24
25
  "disabled",
25
26
  "touched",
26
27
  "dirty",
@@ -46,6 +47,13 @@ export const FormMixin = (superClass) => {
46
47
  * @default false
47
48
  */
48
49
  this.hideError = false;
50
+ /**
51
+ * When true, the field is shown as invalid (error styling and
52
+ * `aria-invalid`) without any message, for an error whose message is
53
+ * displayed elsewhere. Does not change the field's validity.
54
+ * @default false
55
+ */
56
+ this.invalid = false;
49
57
  /**
50
58
  * Whether this field behaves like a checkbox/radio (checkable).
51
59
  * @default false
@@ -99,6 +107,25 @@ export const FormMixin = (superClass) => {
99
107
  * @default false
100
108
  */
101
109
  this.controlled = false;
110
+ /**
111
+ * Whether the hint or error is exposed through the host's own
112
+ * `aria-description`, for a component whose host is the control itself
113
+ * (a checkbox, a radio, a switch). The rendered message is then hidden
114
+ * from assistive technology, so it isn't read again as part of the
115
+ * control's name, which is computed from the host's content.
116
+ * @default false
117
+ * @internal
118
+ */
119
+ this.descriptionOnHost = false;
120
+ /**
121
+ * Whether a change alone reveals the error, without waiting for focus
122
+ * to leave the field, for a field whose every change is a complete
123
+ * choice (a checkbox, a radio, a select) rather than an entry still
124
+ * being typed.
125
+ * @default false
126
+ * @internal
127
+ */
128
+ this.errorOnChange = false;
102
129
  /**
103
130
  * Marks the field dirty on its own `eunchange` — dispatched only from a
104
131
  * genuine user-interaction handler, never from the `value`/`checked`
@@ -130,16 +157,29 @@ export const FormMixin = (superClass) => {
130
157
  }
131
158
  }
132
159
  /**
133
- * Whether the field currently shows its error : invalid, not disabled,
134
- * not `hideError`, and either interacted with (`touched`, `dirty`),
135
- * checked by its form, or given an external `error`. A required field
136
- * left empty stays quiet until then.
160
+ * Whether the field currently shows its error state (styling and
161
+ * `aria-invalid`): not disabled, and either forced by {@link invalid} or
162
+ * showing its error messages.
137
163
  */
138
164
  get showError() {
165
+ return (this.invalid && !this.disabled) || this.showErrorMessages;
166
+ }
167
+ /**
168
+ * Whether the field currently shows its error messages : invalid, not
169
+ * disabled, not `hideError`, and either left once (`touched`), changed
170
+ * while {@link errorOnChange} is set (`dirty`), checked by its form, or
171
+ * given an external `error`. Typing alone never reveals an error, so an
172
+ * unfinished entry isn't reported as invalid; once shown, the error
173
+ * follows the value live.
174
+ */
175
+ get showErrorMessages() {
139
176
  return (!this.valid &&
140
177
  !this.hideError &&
141
178
  !this.disabled &&
142
- (this.touched || this.dirty || this.validationRequested || !!this.error));
179
+ (this.touched ||
180
+ (this.dirty && this.errorOnChange) ||
181
+ this.validationRequested ||
182
+ !!this.error));
143
183
  }
144
184
  /**
145
185
  * Whether the value hasn't changed since the field connected (or since
@@ -198,13 +238,13 @@ export const FormMixin = (superClass) => {
198
238
  this.setFormValue(value);
199
239
  }
200
240
  /**
201
- * Gets the validation errors while {@link showError} is true, the hint
202
- * otherwise.
241
+ * Gets the validation errors while {@link showErrorMessages} is true, the
242
+ * hint otherwise.
203
243
  *
204
244
  * @returns Error message string, array of messages, or the hint.
205
245
  */
206
246
  get description() {
207
- if (!this.showError) {
247
+ if (!this.showErrorMessages) {
208
248
  return this.hint;
209
249
  }
210
250
  if (this.errorMessages.length) {
@@ -282,6 +322,29 @@ export const FormMixin = (superClass) => {
282
322
  }
283
323
  super.willUpdate(changedProperties);
284
324
  }
325
+ /**
326
+ * LitElement lifecycle method called after update. Mirrors the hint or
327
+ * error onto the host's `aria-description` while
328
+ * {@link descriptionOnHost} is set.
329
+ *
330
+ * @param changedProperties - Map of changed properties and their old values.
331
+ */
332
+ updated(changedProperties) {
333
+ super.updated(changedProperties);
334
+ if (!this.descriptionOnHost) {
335
+ return;
336
+ }
337
+ const { description } = this;
338
+ const text = Array.isArray(description)
339
+ ? description.join(" ")
340
+ : description;
341
+ if (text) {
342
+ this.setAttribute("aria-description", text);
343
+ }
344
+ else {
345
+ this.removeAttribute("aria-description");
346
+ }
347
+ }
285
348
  /**
286
349
  * Syncs the field value with the form submission internals.
287
350
  * If disabled or unchecked (for checkable), sets empty form data.
@@ -351,8 +414,8 @@ export const FormMixin = (superClass) => {
351
414
  return this.renderError();
352
415
  }
353
416
  /**
354
- * Renders the error messages while {@link showError} is true, the hint
355
- * otherwise.
417
+ * Renders the error messages while {@link showErrorMessages} is true, the
418
+ * hint otherwise.
356
419
  *
357
420
  * @returns Template result with error messages, hint or nothing.
358
421
  */
@@ -361,15 +424,23 @@ export const FormMixin = (superClass) => {
361
424
  if (!description?.length) {
362
425
  return nothing;
363
426
  }
364
- if (!this.showError) {
427
+ if (!this.showErrorMessages) {
365
428
  return html `
366
- <p id="description" class="hint-messages">
429
+ <p
430
+ id="description"
431
+ class="hint-messages"
432
+ aria-hidden=${this.descriptionOnHost ? "true" : nothing}
433
+ >
367
434
  <span>${description}</span>
368
435
  </p>
369
436
  `;
370
437
  }
371
438
  return html `
372
- <p id="description" class="error-messages">
439
+ <p
440
+ id="description"
441
+ class="error-messages"
442
+ aria-hidden=${this.descriptionOnHost ? "true" : nothing}
443
+ >
373
444
  ${when(Array.isArray(description), () => description.map((msg) => html `<span>${msg}</span>`), () => html `<span>${description}</span>`)}
374
445
  </p>
375
446
  `;
@@ -386,6 +457,9 @@ export const FormMixin = (superClass) => {
386
457
  __decorate([
387
458
  property({ type: Boolean, attribute: "hide-error" })
388
459
  ], FormMixinClass.prototype, "hideError", void 0);
460
+ __decorate([
461
+ property({ type: Boolean })
462
+ ], FormMixinClass.prototype, "invalid", void 0);
389
463
  __decorate([
390
464
  state()
391
465
  ], FormMixinClass.prototype, "valueState", void 0);
@@ -14,7 +14,7 @@ export declare class LocalizableMixinInterface {
14
14
  * it: user-facing strings with no dedicated override property at all
15
15
  * (navigation button labels, ARIA group names, and the like), and
16
16
  * strings that *do* have their own override property (e.g. `eun-chip`'s
17
- * `ariaLabelRemove`) but fall back to `this.dictionary` — instead of a
17
+ * `removeLabel`) but fall back to `this.dictionary` — instead of a
18
18
  * hardcoded English literal — when that property is left unset, so the
19
19
  * default follows `locale` while an explicit override still wins.
20
20
  *
@@ -12,7 +12,7 @@ import { dictionaries, getDefaultLocale } from "../i18n/index.js";
12
12
  * it: user-facing strings with no dedicated override property at all
13
13
  * (navigation button labels, ARIA group names, and the like), and
14
14
  * strings that *do* have their own override property (e.g. `eun-chip`'s
15
- * `ariaLabelRemove`) but fall back to `this.dictionary` — instead of a
15
+ * `removeLabel`) but fall back to `this.dictionary` — instead of a
16
16
  * hardcoded English literal — when that property is left unset, so the
17
17
  * default follows `locale` while an explicit override still wins.
18
18
  *
@@ -37,6 +37,17 @@ export const RadioMixin = (superClass) => {
37
37
  * @default true
38
38
  */
39
39
  this.checkable = true;
40
+ /**
41
+ * The host is the control, so its hint or error goes on its own
42
+ * `aria-description`.
43
+ * @internal
44
+ */
45
+ this.descriptionOnHost = true;
46
+ /**
47
+ * Every change is a complete choice, so its error shows right away.
48
+ * @internal
49
+ */
50
+ this.errorOnChange = true;
40
51
  /**
41
52
  * Overrides `ValidatorsMixin`'s own `required` check, which validates
42
53
  * emptiness of `this.value` — meaningless here, since a radio's `value`
@@ -124,7 +135,6 @@ export const RadioMixin = (superClass) => {
124
135
  * - Prevents propagation.
125
136
  * - Ignores action if `disabled` or `readonly`.
126
137
  * - Sets `checked` to `true` ; never unchecks (see the class doc).
127
- * - Updates ARIA attributes (`aria-description`).
128
138
  * - Dispatches a custom `ChangeEvent`.
129
139
  *
130
140
  * @param event The triggered mouse or keyboard event
@@ -141,15 +151,6 @@ export const RadioMixin = (superClass) => {
141
151
  this.checked = true;
142
152
  this.updateInternals();
143
153
  this.checkValidity(this.checked);
144
- if (this.description) {
145
- const attribute = this.description instanceof Array
146
- ? this.description.join(",")
147
- : this.description;
148
- this.setAttribute("aria-description", attribute);
149
- }
150
- else {
151
- this.removeAttribute("aria-description");
152
- }
153
154
  this.dispatchEvent(new ChangeEvent(this.checked));
154
155
  }
155
156
  /**
@@ -10,7 +10,8 @@ export declare class ReadonlyMixinInterface {
10
10
  * A mixin that adds a `readonly` property to a LitElement component.
11
11
  *
12
12
  * When the `readonly` state changes, it automatically updates the `aria-readonly` attribute
13
- * for accessibility compliance.
13
+ * for accessibility compliance. The attribute is only present while readonly, so an SSR
14
+ * framework hydrating a non-readonly field doesn't see an attribute it never rendered.
14
15
  *
15
16
  * @param superClass - The base LitElement class to extend.
16
17
  * @returns A class extending the base class with `readonly` functionality.
@@ -9,7 +9,8 @@ import { property } from "lit/decorators.js";
9
9
  * A mixin that adds a `readonly` property to a LitElement component.
10
10
  *
11
11
  * When the `readonly` state changes, it automatically updates the `aria-readonly` attribute
12
- * for accessibility compliance.
12
+ * for accessibility compliance. The attribute is only present while readonly, so an SSR
13
+ * framework hydrating a non-readonly field doesn't see an attribute it never rendered.
13
14
  *
14
15
  * @param superClass - The base LitElement class to extend.
15
16
  * @returns A class extending the base class with `readonly` functionality.
@@ -28,12 +29,18 @@ export const ReadonlyMixin = (superClass) => {
28
29
  * LitElement lifecycle method.
29
30
  * Called when reactive properties are updated.
30
31
  *
31
- * Updates `aria-readonly` whenever `readonly` changes.
32
+ * Updates `aria-readonly` whenever `readonly` changes. Removed rather
33
+ * than set to "false", which means the same.
32
34
  */
33
35
  updated(_changedProperties) {
34
36
  super.updated(_changedProperties);
35
37
  if (_changedProperties.has("readonly")) {
36
- this.setAttribute("aria-readonly", String(this.readonly));
38
+ if (this.readonly) {
39
+ this.setAttribute("aria-readonly", "true");
40
+ }
41
+ else {
42
+ this.removeAttribute("aria-readonly");
43
+ }
37
44
  }
38
45
  }
39
46
  }