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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/components/chunks/{chunk-KDN4O5W2.js → chunk-32L2QYWQ.js} +5 -5
  3. package/dist/cdn/components/chunks/{chunk-JYIIWN2P.js → chunk-36KLGY6U.js} +8 -8
  4. package/dist/cdn/components/chunks/chunk-3BMACIDO.js +1 -0
  5. package/dist/cdn/components/chunks/{chunk-2Y2EU2CI.js → chunk-3UUZM7X2.js} +1 -1
  6. package/dist/cdn/components/chunks/chunk-55PUDL7D.js +109 -0
  7. package/dist/cdn/components/chunks/chunk-5LA5DQMP.js +1 -0
  8. package/dist/cdn/components/chunks/chunk-5LXGJVJR.js +1 -0
  9. package/dist/cdn/components/chunks/{chunk-ZKZV2YG5.js → chunk-5XPOGBPL.js} +1 -1
  10. package/dist/cdn/components/chunks/{chunk-LMVW522V.js → chunk-62RLISRD.js} +1 -1
  11. package/dist/cdn/components/chunks/{chunk-PMPSJG5V.js → chunk-6FYW5TQU.js} +3 -3
  12. package/dist/cdn/components/chunks/chunk-6TIEBY34.js +1 -0
  13. package/dist/cdn/components/chunks/{chunk-MOMYII3P.js → chunk-AH2SKZ7T.js} +14 -1
  14. package/dist/cdn/components/chunks/chunk-AK2DIJX7.js +1 -0
  15. package/dist/cdn/components/chunks/chunk-B5XMGWM7.js +10 -0
  16. package/dist/cdn/components/chunks/chunk-GVS6IUKC.js +1 -0
  17. package/dist/cdn/components/chunks/chunk-GWLD2I3P.js +8 -0
  18. package/dist/cdn/components/chunks/{chunk-UDVB4LAE.js → chunk-I4ERDXSM.js} +5 -3
  19. package/dist/cdn/components/chunks/{chunk-QZ5SHR3I.js → chunk-J3SZBXM6.js} +2 -2
  20. package/dist/cdn/components/chunks/chunk-JAGZL7JH.js +1 -0
  21. package/dist/cdn/components/chunks/{chunk-VYFR364B.js → chunk-LD35BFNK.js} +18 -17
  22. package/dist/cdn/components/chunks/{chunk-XDPRWUKN.js → chunk-MQQJ6DID.js} +1 -1
  23. package/dist/cdn/components/chunks/chunk-P6LGU3FT.js +1 -0
  24. package/dist/cdn/components/chunks/chunk-QL5GSW2A.js +1 -0
  25. package/dist/cdn/components/chunks/{chunk-UYZR4JXZ.js → chunk-QSZO4GIH.js} +45 -9
  26. package/dist/cdn/components/chunks/{chunk-7KKWYPHY.js → chunk-QXQ25SQS.js} +21 -19
  27. package/dist/cdn/components/chunks/{chunk-SZYEBMG6.js → chunk-QYB6Z6FG.js} +5 -5
  28. package/dist/cdn/components/chunks/{chunk-RIFF2D2F.js → chunk-RGC3I6MK.js} +1 -1
  29. package/dist/cdn/components/chunks/{chunk-L2ADCEN7.js → chunk-SVGWCKWT.js} +1 -1
  30. package/dist/cdn/components/chunks/{chunk-N6ZW5CDN.js → chunk-TCSB2MLU.js} +1 -1
  31. package/dist/cdn/components/chunks/{chunk-MQQ4BGVJ.js → chunk-TFTRCIIK.js} +7 -6
  32. package/dist/cdn/components/chunks/chunk-TLBXTBMM.js +46 -0
  33. package/dist/cdn/components/chunks/chunk-UVHVQRPT.js +1 -0
  34. package/dist/cdn/components/chunks/chunk-WIUERJII.js +1 -0
  35. package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +1 -0
  36. package/dist/cdn/components/eun-alert.js +13 -6
  37. package/dist/cdn/components/eun-animate.js +6 -6
  38. package/dist/cdn/components/eun-badge.js +1 -1
  39. package/dist/cdn/components/eun-button.js +1 -1
  40. package/dist/cdn/components/eun-calendar.js +2 -2
  41. package/dist/cdn/components/eun-card.js +4 -4
  42. package/dist/cdn/components/eun-carousel.js +26 -22
  43. package/dist/cdn/components/eun-check-card.js +1 -1
  44. package/dist/cdn/components/eun-checkbox-list.js +11 -8
  45. package/dist/cdn/components/eun-checkbox.js +1 -1
  46. package/dist/cdn/components/eun-chip.js +17 -11
  47. package/dist/cdn/components/eun-collapse.js +1 -1
  48. package/dist/cdn/components/eun-color-picker.js +74 -69
  49. package/dist/cdn/components/eun-counter.js +16 -14
  50. package/dist/cdn/components/eun-date-picker.js +67 -63
  51. package/dist/cdn/components/eun-description-list.js +2 -2
  52. package/dist/cdn/components/eun-divider.js +3 -3
  53. package/dist/cdn/components/eun-drawer.js +21 -22
  54. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  55. package/dist/cdn/components/eun-dropdown-item.js +3 -3
  56. package/dist/cdn/components/eun-fab.js +2 -2
  57. package/dist/cdn/components/eun-icon.js +1 -1
  58. package/dist/cdn/components/eun-image-card.js +1 -1
  59. package/dist/cdn/components/eun-image-carousel.js +10 -10
  60. package/dist/cdn/components/eun-infinite-list.js +1 -1
  61. package/dist/cdn/components/eun-input-file.js +21 -21
  62. package/dist/cdn/components/eun-input-phone.js +16 -12
  63. package/dist/cdn/components/eun-input.js +1 -1
  64. package/dist/cdn/components/eun-link.js +59 -13
  65. package/dist/cdn/components/eun-loader.js +1 -1
  66. package/dist/cdn/components/eun-modal.js +33 -23
  67. package/dist/cdn/components/eun-pagination.js +16 -16
  68. package/dist/cdn/components/eun-password-strength.js +14 -10
  69. package/dist/cdn/components/eun-radio-card.js +1 -1
  70. package/dist/cdn/components/eun-radio-list.js +11 -8
  71. package/dist/cdn/components/eun-radio.js +1 -1
  72. package/dist/cdn/components/eun-rating.js +276 -0
  73. package/dist/cdn/components/eun-scheduler-event-editor.js +11 -11
  74. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  75. package/dist/cdn/components/eun-scheduler.js +28 -28
  76. package/dist/cdn/components/eun-search.js +36 -32
  77. package/dist/cdn/components/eun-select.js +27 -27
  78. package/dist/cdn/components/eun-sidebar.js +73 -26
  79. package/dist/cdn/components/eun-skeleton.js +1 -1
  80. package/dist/cdn/components/eun-slider.js +3 -3
  81. package/dist/cdn/components/eun-sliding-card.js +1 -1
  82. package/dist/cdn/components/eun-step.js +5 -4
  83. package/dist/cdn/components/eun-stepper.js +30 -30
  84. package/dist/cdn/components/eun-switch.js +1 -1
  85. package/dist/cdn/components/eun-tab-group.js +4 -4
  86. package/dist/cdn/components/eun-tab-panel.js +1 -1
  87. package/dist/cdn/components/eun-tab.js +1 -1
  88. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  89. package/dist/cdn/components/eun-table.js +2 -2
  90. package/dist/cdn/components/eun-tag.js +3 -3
  91. package/dist/cdn/components/eun-textarea.js +36 -28
  92. package/dist/cdn/components/eun-time-picker.js +31 -28
  93. package/dist/cdn/components/eun-toast.js +24 -15
  94. package/dist/cdn/components/eun-toggle-group.js +75 -37
  95. package/dist/cdn/components/eun-toggle-item.js +9 -9
  96. package/dist/cdn/components/eun-toggle.js +2 -2
  97. package/dist/cdn/components/eun-toolbar.js +22 -22
  98. package/dist/cdn/components/eun-tooltip.js +6 -6
  99. package/dist/cdn/styles/eunomia-themes.css +1 -1
  100. package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
  101. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
  102. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
  103. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
  104. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
  105. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
  106. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
  107. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
  108. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
  109. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
  110. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
  111. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
  112. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
  113. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
  114. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
  115. package/dist/components/action/button/button.d.ts +4 -3
  116. package/dist/components/action/button/button.js +6 -9
  117. package/dist/components/action/button/button.styles.js +13 -8
  118. package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -6
  119. package/dist/components/action/dropdown-button/dropdown-button.js +16 -13
  120. package/dist/components/action/dropdown-button/dropdown-item.d.ts +10 -2
  121. package/dist/components/action/dropdown-button/dropdown-item.js +24 -9
  122. package/dist/components/action/link/link.d.ts +10 -1
  123. package/dist/components/action/link/link.js +13 -1
  124. package/dist/components/action/link/link.styles.js +50 -3
  125. package/dist/components/action/toggle/toggle-group.d.ts +12 -2
  126. package/dist/components/action/toggle/toggle-group.js +18 -3
  127. package/dist/components/action/toggle/toggle-group.styles.js +58 -20
  128. package/dist/components/action/toggle/toggle-item.js +1 -3
  129. package/dist/components/action/toggle/toggle-item.styles.js +7 -7
  130. package/dist/components/action/toggle/toggle.js +1 -1
  131. package/dist/components/alert/alert/alert.d.ts +9 -7
  132. package/dist/components/alert/alert/alert.js +11 -14
  133. package/dist/components/alert/alert/alert.styles.js +9 -2
  134. package/dist/components/alert/drawer/drawer.d.ts +30 -5
  135. package/dist/components/alert/drawer/drawer.js +48 -13
  136. package/dist/components/alert/drawer/drawer.styles.js +7 -7
  137. package/dist/components/alert/modal/modal.d.ts +35 -10
  138. package/dist/components/alert/modal/modal.js +55 -28
  139. package/dist/components/alert/modal/modal.styles.js +17 -6
  140. package/dist/components/alert/toast/toast.d.ts +7 -5
  141. package/dist/components/alert/toast/toast.js +12 -15
  142. package/dist/components/alert/toast/toast.styles.js +18 -9
  143. package/dist/components/content/badge/badge.js +2 -2
  144. package/dist/components/content/card/card.js +1 -1
  145. package/dist/components/content/card/card.styles.js +2 -2
  146. package/dist/components/content/chip/chip.d.ts +4 -4
  147. package/dist/components/content/chip/chip.js +11 -10
  148. package/dist/components/content/chip/chip.styles.js +9 -3
  149. package/dist/components/content/description-list/description-list.js +3 -3
  150. package/dist/components/content/icon/icon.d.ts +3 -0
  151. package/dist/components/content/icon/icon.js +3 -0
  152. package/dist/components/content/icon/icon.style.d.ts +2 -0
  153. package/dist/components/content/icon/icon.style.js +4 -0
  154. package/dist/components/content/image-carousel/image-carousel.d.ts +12 -12
  155. package/dist/components/content/image-carousel/image-carousel.js +29 -28
  156. package/dist/components/content/password-strength/password-strength.d.ts +21 -6
  157. package/dist/components/content/password-strength/password-strength.js +37 -16
  158. package/dist/components/content/password-strength/password-strength.styles.js +4 -0
  159. package/dist/components/content/tag/tag.js +2 -2
  160. package/dist/components/content/tooltip/tooltip.d.ts +16 -9
  161. package/dist/components/content/tooltip/tooltip.js +31 -15
  162. package/dist/components/content/tooltip/tooltip.styles.js +1 -1
  163. package/dist/components/form/checkbox/check-card.d.ts +1 -0
  164. package/dist/components/form/checkbox/check-card.js +1 -0
  165. package/dist/components/form/checkbox/checkbox-list.d.ts +17 -0
  166. package/dist/components/form/checkbox/checkbox-list.js +39 -10
  167. package/dist/components/form/checkbox/checkbox.d.ts +1 -0
  168. package/dist/components/form/checkbox/checkbox.js +3 -1
  169. package/dist/components/form/checkbox/checkbox.styles.js +3 -2
  170. package/dist/components/form/color-picker/color-picker.d.ts +47 -28
  171. package/dist/components/form/color-picker/color-picker.js +73 -51
  172. package/dist/components/form/color-picker/color-picker.styles.js +14 -1
  173. package/dist/components/form/counter/counter.d.ts +24 -18
  174. package/dist/components/form/counter/counter.js +61 -61
  175. package/dist/components/form/counter/counter.styles.js +6 -4
  176. package/dist/components/form/date-picker/date-picker.d.ts +33 -7
  177. package/dist/components/form/date-picker/date-picker.js +82 -56
  178. package/dist/components/form/date-picker/date-picker.styles.js +9 -6
  179. package/dist/components/form/input/input.d.ts +43 -39
  180. package/dist/components/form/input/input.js +91 -110
  181. package/dist/components/form/input-file/input-file.d.ts +26 -13
  182. package/dist/components/form/input-file/input-file.js +35 -35
  183. package/dist/components/form/input-file/input-file.styles.js +4 -4
  184. package/dist/components/form/input-phone/input-phone.d.ts +28 -5
  185. package/dist/components/form/input-phone/input-phone.js +47 -13
  186. package/dist/components/form/input-phone/input-phone.styles.js +6 -3
  187. package/dist/components/form/radio/radio-card.d.ts +1 -0
  188. package/dist/components/form/radio/radio-card.js +1 -0
  189. package/dist/components/form/radio/radio-list.d.ts +23 -7
  190. package/dist/components/form/radio/radio-list.js +47 -22
  191. package/dist/components/form/radio/radio.d.ts +1 -0
  192. package/dist/components/form/radio/radio.js +1 -0
  193. package/dist/components/form/rating/rating.d.ts +349 -0
  194. package/dist/components/form/rating/rating.js +665 -0
  195. package/dist/components/form/rating/rating.styles.d.ts +1 -0
  196. package/dist/components/form/rating/rating.styles.js +213 -0
  197. package/dist/components/form/search/search.d.ts +72 -18
  198. package/dist/components/form/search/search.js +135 -72
  199. package/dist/components/form/search/search.styles.js +2 -0
  200. package/dist/components/form/select/select.d.ts +29 -10
  201. package/dist/components/form/select/select.js +65 -41
  202. package/dist/components/form/shared-styles/field.styles.js +45 -8
  203. package/dist/components/form/shared-styles/listbox.styles.js +15 -1
  204. package/dist/components/form/slider/slider.d.ts +7 -8
  205. package/dist/components/form/slider/slider.js +9 -12
  206. package/dist/components/form/switch/switch.d.ts +1 -0
  207. package/dist/components/form/switch/switch.js +1 -0
  208. package/dist/components/form/textarea/textarea.d.ts +90 -23
  209. package/dist/components/form/textarea/textarea.js +194 -44
  210. package/dist/components/form/textarea/textarea.styles.js +3 -0
  211. package/dist/components/form/time-picker/time-picker-columns.d.ts +2 -2
  212. package/dist/components/form/time-picker/time-picker-columns.js +8 -8
  213. package/dist/components/form/time-picker/time-picker.d.ts +30 -9
  214. package/dist/components/form/time-picker/time-picker.js +66 -40
  215. package/dist/components/form/time-picker/time-picker.styles.js +7 -5
  216. package/dist/components/layout/animate/animate.js +3 -2
  217. package/dist/components/layout/animate/animate.styles.js +2 -2
  218. package/dist/components/layout/divider/divider.js +1 -1
  219. package/dist/components/layout/divider/divider.styles.js +1 -1
  220. package/dist/components/loader/loader/loader.js +2 -2
  221. package/dist/components/loader/loader/loader.styles.js +14 -12
  222. package/dist/components/loader/skeleton/skeleton.js +1 -1
  223. package/dist/components/navigation/carousel/carousel.d.ts +32 -9
  224. package/dist/components/navigation/carousel/carousel.js +88 -41
  225. package/dist/components/navigation/carousel/carousel.styles.js +10 -6
  226. package/dist/components/navigation/pagination/pagination.d.ts +23 -21
  227. package/dist/components/navigation/pagination/pagination.js +30 -53
  228. package/dist/components/navigation/sidebar/sidebar.d.ts +113 -65
  229. package/dist/components/navigation/sidebar/sidebar.js +161 -118
  230. package/dist/components/navigation/sidebar/sidebar.styles.d.ts +1 -1
  231. package/dist/components/navigation/sidebar/sidebar.styles.js +74 -24
  232. package/dist/components/navigation/stepper/step.js +9 -8
  233. package/dist/components/navigation/stepper/stepper.d.ts +1 -3
  234. package/dist/components/navigation/stepper/stepper.js +15 -26
  235. package/dist/components/navigation/tabs/tab-group/tab-group.js +2 -2
  236. package/dist/components/navigation/tabs/tab-group/tab-group.styles.js +2 -2
  237. package/dist/components/navigation/toolbar/toolbar.d.ts +23 -13
  238. package/dist/components/navigation/toolbar/toolbar.js +28 -35
  239. package/dist/components/navigation/toolbar/toolbar.styles.js +18 -17
  240. package/dist/events/select.event.d.ts +3 -2
  241. package/dist/events/select.event.js +2 -1
  242. package/dist/features/scheduler/calendar/calendar.js +1 -1
  243. package/dist/features/scheduler/scheduler/scheduler.d.ts +7 -7
  244. package/dist/features/scheduler/scheduler/scheduler.js +15 -24
  245. package/dist/features/scheduler/scheduler-event/scheduler-event.js +3 -3
  246. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +1 -1
  247. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +6 -4
  248. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +7 -8
  249. package/dist/features/table/table/table.js +1 -1
  250. package/dist/features/table/table-action-bar/table-action-bar.js +2 -2
  251. package/dist/i18n/en.d.ts +68 -0
  252. package/dist/i18n/en.js +68 -0
  253. package/dist/i18n/fr.js +68 -2
  254. package/dist/index.d.ts +3 -0
  255. package/dist/index.js +1 -0
  256. package/dist/mixins/button.mixin.d.ts +1 -1
  257. package/dist/mixins/button.mixin.js +9 -6
  258. package/dist/mixins/check.mixin.js +11 -10
  259. package/dist/mixins/dialog-surface.mixin.d.ts +8 -0
  260. package/dist/mixins/disabled.mixin.d.ts +5 -0
  261. package/dist/mixins/disabled.mixin.js +21 -1
  262. package/dist/mixins/editable.mixin.js +28 -5
  263. package/dist/mixins/field-appearance.mixin.js +3 -2
  264. package/dist/mixins/field-size.mixin.d.ts +19 -0
  265. package/dist/mixins/field-size.mixin.js +33 -0
  266. package/dist/mixins/form.mixin.d.ts +4 -0
  267. package/dist/mixins/form.mixin.js +87 -13
  268. package/dist/mixins/localizable.mixin.d.ts +1 -1
  269. package/dist/mixins/localizable.mixin.js +1 -1
  270. package/dist/mixins/radio.mixin.js +11 -10
  271. package/dist/mixins/readonly.mixin.d.ts +2 -1
  272. package/dist/mixins/readonly.mixin.js +10 -3
  273. package/dist/mixins/rounded.mixin.d.ts +18 -0
  274. package/dist/mixins/rounded.mixin.js +32 -0
  275. package/dist/ssr/alert-ssr.css +187 -0
  276. package/dist/ssr/badge-ssr.css +67 -0
  277. package/dist/ssr/breadcrumb-ssr.css +41 -0
  278. package/dist/ssr/button-ssr.css +5 -5
  279. package/dist/ssr/card-ssr.css +27 -15
  280. package/dist/ssr/carousel-ssr.css +247 -0
  281. package/dist/ssr/checkbox-ssr.css +67 -0
  282. package/dist/ssr/chip-ssr.css +250 -0
  283. package/dist/ssr/collapse-ssr.css +180 -0
  284. package/dist/ssr/field-ssr.css +202 -0
  285. package/dist/ssr/icon-ssr.css +266 -0
  286. package/dist/ssr/image-carousel-ssr.css +34 -0
  287. package/dist/ssr/links-ssr.css +44 -1
  288. package/dist/ssr/pagination-ssr.css +4 -0
  289. package/dist/ssr/rating-ssr.css +254 -0
  290. package/dist/ssr/sidebar-ssr.css +102 -3
  291. package/dist/ssr/skeleton-ssr.css +63 -0
  292. package/dist/ssr/tabs-ssr.css +129 -0
  293. package/dist/ssr/toggle-group-ssr.css +233 -0
  294. package/dist/ssr/toolbar-ssr.css +81 -2
  295. package/dist/types/variant.type.d.ts +4 -1
  296. package/dist/utils/boolean.utils.d.ts +14 -0
  297. package/dist/utils/boolean.utils.js +20 -0
  298. package/dist/utils/dropdown-menu.utils.d.ts +1 -1
  299. package/dist/utils/focusable-elements.utils.d.ts +12 -0
  300. package/dist/utils/focusable-elements.utils.js +26 -0
  301. package/dist/utils/implicit-submission.utils.d.ts +18 -0
  302. package/dist/utils/implicit-submission.utils.js +79 -0
  303. package/dist/utils/input-modality.utils.d.ts +13 -0
  304. package/dist/utils/input-modality.utils.js +34 -0
  305. package/dist/utils/listbox-options.utils.d.ts +11 -0
  306. package/dist/utils/listbox-options.utils.js +41 -3
  307. package/dist/utils/theme-generator.utils.d.ts +8 -2
  308. package/dist/utils/theme-generator.utils.js +30 -9
  309. package/package.json +26 -7
  310. package/styles/themes/mixins/eunomia-neutrals.mixin.scss +6 -2
  311. package/styles/themes/prebuilt-themes/eunomia/eunomia-dark.mixin.scss +6 -2
  312. package/styles/themes/prebuilt-themes/fire/eunomia-fire-dark.mixin.scss +6 -2
  313. package/styles/themes/prebuilt-themes/forest/eunomia-forest-dark.mixin.scss +6 -2
  314. package/styles/themes/prebuilt-themes/gold/eunomia-gold-dark.mixin.scss +6 -2
  315. package/styles/themes/prebuilt-themes/ocean/eunomia-ocean-dark.mixin.scss +6 -2
  316. package/styles/themes/prebuilt-themes/salmon/eunomia-salmon-dark.mixin.scss +6 -2
  317. package/styles/themes/prebuilt-themes/violet/eunomia-violet-dark.mixin.scss +6 -2
  318. package/dist/cdn/components/chunks/chunk-4PI6RDUS.js +0 -1
  319. package/dist/cdn/components/chunks/chunk-6VK6SHCG.js +0 -1
  320. package/dist/cdn/components/chunks/chunk-A3X4KD2X.js +0 -1
  321. package/dist/cdn/components/chunks/chunk-BQFJR2UP.js +0 -110
  322. package/dist/cdn/components/chunks/chunk-G5SBDQQ3.js +0 -1
  323. package/dist/cdn/components/chunks/chunk-KSZRQRN4.js +0 -1
  324. package/dist/cdn/components/chunks/chunk-PE4DAXHQ.js +0 -3
  325. package/dist/cdn/components/chunks/chunk-RS7TWEMQ.js +0 -1
  326. package/dist/cdn/components/chunks/chunk-UDOZRIJZ.js +0 -1
  327. package/dist/cdn/components/chunks/chunk-VOTRXBDS.js +0 -38
@@ -1,4 +1,4 @@
1
- import{a as f}from"./chunks/chunk-PPCHQG7P.js";import{a as x}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import{a as s,f as c,h as u,j as l,l as v,p as i,r as g,u as h}from"./chunks/chunk-YITWLCD3.js";var L=u`
1
+ import{a as x}from"./chunks/chunk-PPCHQG7P.js";import{a as d}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import{a as w}from"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import{a as s,f as u,h as g,j as l,l as h,p,r as f,u as m}from"./chunks/chunk-YITWLCD3.js";var R=g`
2
2
  :host {
3
3
  display: block;
4
4
  width: 100%;
@@ -81,6 +81,10 @@ import{a as f}from"./chunks/chunk-PPCHQG7P.js";import{a as x}from"./chunks/chunk
81
81
  );
82
82
  }
83
83
 
84
+ #label.empty {
85
+ visibility: hidden;
86
+ }
87
+
84
88
  #caption {
85
89
  color: var(
86
90
  --password-strength-caption-color,
@@ -116,19 +120,19 @@ import{a as f}from"./chunks/chunk-PPCHQG7P.js";import{a as x}from"./chunks/chunk
116
120
  transition: none;
117
121
  }
118
122
  }
119
- `,w=L;var m=[{label:"At least 8 characters",regex:/.{8,}/},{label:"Upper and lower case letters",regex:/(?=.*[a-z])(?=.*[A-Z])/},{label:"At least one number",regex:/\d/},{label:"At least one special character",regex:/[^A-Za-z0-9]/}],b=[{label:"Weak",severity:"critical"},{label:"Fair",severity:"warning"},{label:"Good",severity:"info"},{label:"Strong",severity:"success"}];function R(a,o){return o.reduce((e,r)=>e+(r.regex.test(a)?1:0),0)}function y(a,o,e){if(!a)return-1;let r=R(a,o),p=0;return e.forEach((n,d)=>{(n.rules?.length?n.rules.every(S=>S.regex.test(a)):r>=(n.minScore??d+1))&&(p=d)}),p}var T="eun-password-strength",t=class extends h{constructor(){super(...arguments);this.value="";this.label="Password strength";this.rules=m;this.levels=b;this.hideLabel=!1;this.previousLevelIndex=-1}get currentLevelIndex(){return y(this.value,this.rules,this.levels)}updated(e){if(super.updated(e),!e.has("value")&&!e.has("rules")&&!e.has("levels"))return;let r=this.currentLevelIndex;r!==this.previousLevelIndex&&(this.previousLevelIndex=r,this.announcerEl&&(this.announcerEl.textContent=r===-1?"":`${this.label}: ${this.levels[r].label}`))}render(){let e=this.currentLevelIndex,r=e===-1?void 0:this.levels[e];return i`
120
- <div id="wrapper" data-severity=${f(r?.severity)}>
123
+ `,b=R;var y=[{label:"At least 8 characters",regex:/.{8,}/},{label:"Upper and lower case letters",regex:/(?=.*[a-z])(?=.*[A-Z])/},{label:"At least one number",regex:/\d/},{label:"At least one special character",regex:/[^A-Za-z0-9]/}],c=[{label:"Weak",severity:"critical"},{label:"Fair",severity:"warning"},{label:"Good",severity:"info"},{label:"Strong",severity:"success"}];function T(a,i){return i.reduce((e,r)=>e+(r.regex.test(a)?1:0),0)}function S(a,i,e){if(!a)return-1;let r=T(a,i),n=0;return e.forEach((o,v)=>{(o.rules?.length?o.rules.every(L=>L.regex.test(a)):r>=(o.minScore??v+1))&&(n=v)}),n}var _="eun-password-strength",t=class extends w(m){constructor(){super(...arguments);this.value="";this.rules=y;this.levels=c;this.hideLabel=!1;this.previousLevelIndex=-1}get currentLevelIndex(){return S(this.value,this.rules,this.levels)}get resolvedLevels(){if(this.levels!==c)return this.levels;let e=this.dictionary.passwordStrength.levels;return this.levels.map((r,n)=>({...r,label:e[n]??r.label}))}get caption(){let{passwordStrength:e}=this.dictionary;return e.caption(this.label??e.label)}updated(e){if(super.updated(e),!e.has("value")&&!e.has("rules")&&!e.has("levels"))return;let r=this.currentLevelIndex;r!==this.previousLevelIndex&&(this.previousLevelIndex=r,this.announcerEl&&(this.announcerEl.textContent=r===-1?"":`${this.caption} ${this.resolvedLevels[r].label}`))}render(){let e=this.currentLevelIndex,r=e===-1?void 0:this.resolvedLevels[e];return p`
124
+ <div id="wrapper" data-severity=${x(r?.severity)}>
121
125
  <div id="segments" role="presentation" aria-hidden="true">
122
- ${this.levels.map((p,n)=>i`
126
+ ${this.levels.map((n,o)=>p`
123
127
  <span
124
- class=${x({segment:!0,filled:n<=e})}
128
+ class=${d({segment:!0,filled:o<=e})}
125
129
  ></span>
126
130
  `)}
127
131
  </div>
128
- ${this.hideLabel||!r?g:i`
129
- <span id="label">
130
- <span id="caption">${this.label}:</span>
131
- <span id="level-name">${r.label}</span>
132
+ ${this.hideLabel?f:p`
133
+ <span id="label" class=${d({empty:!r})}>
134
+ <span id="caption">${this.caption}</span>
135
+ <span id="level-name">${r?.label??"\xA0"}</span>
132
136
  </span>
133
137
  `}
134
138
  </div>
@@ -138,4 +142,4 @@ import{a as f}from"./chunks/chunk-PPCHQG7P.js";import{a as x}from"./chunks/chunk
138
142
  aria-live="polite"
139
143
  class="visually-hidden"
140
144
  ></div>
141
- `}};t.styles=[w],s([l()],t.prototype,"value",2),s([l()],t.prototype,"label",2),s([l({type:Array})],t.prototype,"rules",2),s([l({type:Array})],t.prototype,"levels",2),s([l({type:Boolean,attribute:"hide-label"})],t.prototype,"hideLabel",2),s([v("#announcer")],t.prototype,"announcerEl",2),t=s([c(T)],t);export{t as EunomiaPasswordStrength,T as EunomiaPasswordStrengthTagName};
145
+ `}};t.styles=[b],s([l()],t.prototype,"value",2),s([l()],t.prototype,"label",2),s([l({type:Array})],t.prototype,"rules",2),s([l({type:Array})],t.prototype,"levels",2),s([l({type:Boolean,attribute:"hide-label"})],t.prototype,"hideLabel",2),s([h("#announcer")],t.prototype,"announcerEl",2),t=s([u(_)],t);export{t as EunomiaPasswordStrength,_ as EunomiaPasswordStrengthTagName};
@@ -1,4 +1,4 @@
1
- import{b as u}from"./chunks/chunk-PMPSJG5V.js";import{a as s}from"./chunks/chunk-FOILAXLL.js";import{f as a}from"./chunks/chunk-VOTRXBDS.js";import"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-RS7TWEMQ.js";import{a as l}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-KSZRQRN4.js";import{a as o,f as d,h as i,j as c,n,p as e,r as t}from"./chunks/chunk-YITWLCD3.js";var p=i`
1
+ import{b as u}from"./chunks/chunk-6FYW5TQU.js";import{a as s}from"./chunks/chunk-FOILAXLL.js";import{f as a}from"./chunks/chunk-TLBXTBMM.js";import"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-3BMACIDO.js";import{a as l}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-QL5GSW2A.js";import{a as o,f as d,h as i,j as c,n,p as e,r as t}from"./chunks/chunk-YITWLCD3.js";var p=i`
2
2
  :host {
3
3
  --_borderWidth: var(--radio-card-border-width, 1px);
4
4
  --_borderColor: var(
@@ -1,4 +1,4 @@
1
- import{a as A}from"./chunks/chunk-ZBN4HTWP.js";import{a as E}from"./chunks/chunk-BO3JOEWM.js";import{b as m,c as b,d as g,e as y,f as d}from"./chunks/chunk-VOTRXBDS.js";import{a as v}from"./chunks/chunk-YYCEPZUN.js";import{a as p}from"./chunks/chunk-RS7TWEMQ.js";import"./chunks/chunk-PPCHQG7P.js";import{a as f}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-KSZRQRN4.js";import{a as r,f as l,h,j as o,l as u,p as c,u as n}from"./chunks/chunk-YITWLCD3.js";var w=h`
1
+ import{a as k}from"./chunks/chunk-ZBN4HTWP.js";import{a as $}from"./chunks/chunk-BO3JOEWM.js";import{b as g,c as y,d as E,e as C,f as u}from"./chunks/chunk-TLBXTBMM.js";import{a as b}from"./chunks/chunk-YYCEPZUN.js";import{a as m}from"./chunks/chunk-3BMACIDO.js";import{a as h}from"./chunks/chunk-PPCHQG7P.js";import{a as v}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import"./chunks/chunk-QL5GSW2A.js";import{a as r,f as c,h as p,j as o,l as f,p as n,r as d,u as l}from"./chunks/chunk-YITWLCD3.js";var V=p`
2
2
  :host {
3
3
  --_container-gap: var(--radio-list-gap, var(--eun-space-s, 8px));
4
4
  --_options-gap: var(--radio-list-options-gap, var(--eun-space-s, 8px));
@@ -7,17 +7,20 @@ import{a as A}from"./chunks/chunk-ZBN4HTWP.js";import{a as E}from"./chunks/chunk
7
7
  var(--eun-color-critical-100, #aa0014)
8
8
  );
9
9
  }
10
- `,C=w;var x="eun-radio-list",k="eun-radio",$="eun-radio-card",L=p(y(n)),s=class extends E(g(b(L))){constructor(){super(...arguments);this.inline=!1;this.handleChangeEvent=e=>{!e.target||e.target===this||(e.stopPropagation(),this.setActive(e.target))}}get fields(){return Array.from(this.querySelectorAll(`:scope > ${k}, :scope > ${$}`))}get active(){return this.fields.find(e=>e.checked)}get value(){return this.active?.value}set value(e){this.updateComplete.then(()=>{this.fields.forEach(t=>{t.checked=t.value===e})})}get defaultValue(){return super.defaultValue}set defaultValue(e){super.defaultValue=e}firstUpdated(){this.fields.forEach(e=>{e.name=this.name,e.id=e.id||`radio-${this.name}-${e.value}`}),this.defaultValue!==void 0&&(this.fields.forEach(e=>{e.checked=e.value===this.defaultValue}),this.value=this.defaultValue,this.sendChangeEvent()),Promise.all(this.fields.map(e=>e.updateComplete)).then(()=>{this.active&&this.optionsList&&this.optionsList.setAttribute("aria-activedescendant",this.active.id),this.setFocus(),this.checkValidity(this.value)})}connectedCallback(){super.connectedCallback?.(),this.addEventListener("eunchange",this.handleChangeEvent,{capture:!0}),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){this.removeEventListener("eunchange",this.handleChangeEvent),this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback?.()}updated(e){if(super.updated(e),e.has("disabled")&&(this.fields.forEach(t=>{t.disabled=this.disabled}),this.setFocus()),e.has("readonly")&&(this.fields.forEach(t=>{t.readonly=this.readonly}),this.setFocus()),m(e)){let{showError:t}=this;this.fields.forEach(i=>{i.valid=!t,i.validationRequested=t})}e.has("label")&&!this.hasAttribute("aria-label")&&this.setAttribute("aria-label",`${this.label}. ${this.instructions??""}`),e.has("name")&&this.fields.forEach(t=>{t.name=this.name})}getFocusAnchor(){return this.querySelector(`${k}, ${$}`)}focus(){super.focus?.(),(this.active??this.fields[0])?.focus?.()}handleKeydown(e){let t=this.fields.filter(a=>!a.disabled&&!a.readonly);if(!t.length)return;let i=t.findIndex(a=>a.checked);switch(e.key){case" ":{if(e.preventDefault(),i!==-1)return;i=0;break}case"ArrowDown":case"ArrowRight":{e.preventDefault(),i=i===-1?0:(i+1)%t.length;break}case"ArrowUp":case"ArrowLeft":{e.preventDefault(),i=i===-1?t.length-1:(t.length+i-1)%t.length;break}default:return}this.setActive(t[i],!0)}setFocus(){if(!this.fields.length||(this.fields.forEach(t=>{t.setAttribute("tabindex","-1")}),this.readonly||this.disabled))return;let e=this.active??this.fields[0];e&&!e.disabled&&!e.readonly&&e.setAttribute("tabindex","0")}setActive(e,t=!1){this.disabled||this.readonly||!e||!this.optionsList||(this.optionsList.setAttribute("aria-activedescendant",e.id),t&&e.focus(),this.fields.forEach(i=>{let a=i===e;i.checked=a,i.setAttribute("tabindex",a?"0":"-1")}),this.sendChangeEvent())}formResetCallback(){super.formResetCallback?.(),this.updateComplete.then(()=>{this.setFocus(),this.sendChangeEvent()})}sendChangeEvent(){this.checkValidity(this.value),this.dispatchEvent(new v(this.value))}handleSlotChange(){this.fields.forEach(e=>{e.name=this.name,e.id=e.id||`radio-${this.name}-${e.value}`})}render(){return c`
11
- <fieldset id="fieldset">
10
+ `,A=V;var M="eun-radio-list",w="eun-radio",x="eun-radio-card",R=m(C(l)),s=class extends $(E(y(R))){constructor(){super(...arguments);this.errorOnChange=!0;this.inline=!1;this.handleChangeEvent=e=>{!e.target||e.target===this||(e.stopPropagation(),this.setActive(e.target))}}get fields(){return Array.from(this.querySelectorAll(`:scope > ${w}, :scope > ${x}`))}get active(){return this.fields.find(e=>e.checked)}get value(){return this.active?.value}set value(e){this.updateComplete.then(()=>{this.fields.forEach(t=>{t.checked=t.value===e})})}get defaultValue(){return super.defaultValue}set defaultValue(e){super.defaultValue=e}firstUpdated(){this.fields.forEach(e=>{e.name=this.name,e.id=e.id||`radio-${this.name}-${e.value}`}),this.defaultValue!==void 0&&(this.fields.forEach(e=>{e.checked=e.value===this.defaultValue}),this.value=this.defaultValue,this.sendChangeEvent()),Promise.all(this.fields.map(e=>e.updateComplete)).then(()=>{this.setFocus(),this.checkValidity(this.value)})}connectedCallback(){super.connectedCallback?.(),this.addEventListener("eunchange",this.handleChangeEvent,{capture:!0}),this.addEventListener("keydown",this.handleKeydown)}disconnectedCallback(){this.removeEventListener("eunchange",this.handleChangeEvent),this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback?.()}isGroupChange(e,t){return e.has(t)&&(this[t]||e.get(t)!==void 0)}updated(e){if(super.updated(e),this.isGroupChange(e,"disabled")&&(this.fields.forEach(t=>{t.disabled=this.disabled}),this.setFocus()),this.isGroupChange(e,"readonly")&&(this.fields.forEach(t=>{t.readonly=this.readonly}),this.setFocus()),g(e)){let{showError:t}=this;this.fields.forEach(i=>{i.valid=!t,i.validationRequested=t})}e.has("name")&&this.fields.forEach(t=>{t.name=this.name})}getFocusAnchor(){return this.querySelector(`${w}, ${x}`)}focus(){super.focus?.(),(this.active??this.fields[0])?.focus?.()}handleKeydown(e){let t=this.fields.filter(a=>!a.disabled&&!a.readonly);if(!t.length)return;let i=t.findIndex(a=>a.checked);switch(e.key){case" ":{if(e.preventDefault(),i!==-1)return;i=0;break}case"ArrowDown":case"ArrowRight":{e.preventDefault(),i=i===-1?0:(i+1)%t.length;break}case"ArrowUp":case"ArrowLeft":{e.preventDefault(),i=i===-1?t.length-1:(t.length+i-1)%t.length;break}default:return}this.setActive(t[i],!0)}setFocus(){if(!this.fields.length||(this.fields.forEach(t=>{t.setAttribute("tabindex","-1")}),this.readonly||this.disabled))return;let e=this.active??this.fields.find(t=>!t.disabled&&!t.readonly);e&&!e.disabled&&!e.readonly&&e.setAttribute("tabindex","0")}setActive(e,t=!1){this.disabled||this.readonly||!e||!this.optionsList||(t&&e.focus(),this.fields.forEach(i=>{let a=i===e;i.checked=a,i.setAttribute("tabindex",a?"0":"-1")}),this.sendChangeEvent())}formResetCallback(){super.formResetCallback?.(),this.updateComplete.then(()=>{this.setFocus(),this.sendChangeEvent()})}sendChangeEvent(){this.checkValidity(this.value),this.dispatchEvent(new b(this.value))}handleSlotChange(){this.fields.forEach(e=>{e.name=this.name,e.id=e.id||`radio-${this.name}-${e.value}`})}render(){let e=this.renderDescription(),t=[this.instructions?"group-instructions":"",e===d?"":"description"].filter(Boolean).join(" ")||void 0;return n`
11
+ <fieldset id="fieldset" role="presentation">
12
12
  <div id="legend">${this.renderFormLabels("options")}</div>
13
+ ${this.instructions?n`<span id="group-instructions" hidden
14
+ >${this.instructions}</span
15
+ >`:d}
13
16
  <div
14
17
  id="options"
15
18
  part="options"
16
19
  role="radiogroup"
17
- class=${f({inline:this.inline})}
20
+ class=${v({inline:this.inline})}
18
21
  ?disabled=${this.disabled}
19
- aria-labelledby="legend"
20
- aria-describedby="messages"
22
+ aria-label=${h(this.label)}
23
+ aria-describedby=${h(t)}
21
24
  aria-disabled=${this.disabled?"true":"false"}
22
25
  aria-readonly=${this.readonly?"true":"false"}
23
26
  aria-required=${this.required?"true":"false"}
@@ -25,6 +28,6 @@ import{a as A}from"./chunks/chunk-ZBN4HTWP.js";import{a as E}from"./chunks/chunk
25
28
  >
26
29
  <slot @slotchange=${this.handleSlotChange}></slot>
27
30
  </div>
28
- ${this.renderDescription()}
31
+ ${e}
29
32
  </fieldset>
30
- `}};s.styles=[C,A,d.base,d.errorMessages],s.shadowRootOptions={...n.shadowRootOptions,delegatesFocus:!0},r([o({type:Boolean,reflect:!0})],s.prototype,"inline",2),r([u("#options")],s.prototype,"optionsList",2),r([o({attribute:"default-value"})],s.prototype,"defaultValue",1),s=r([l(x)],s);export{s as EunomiaRadioList,x as EunomiaRadioListTagName};
33
+ `}};s.styles=[A,k,u.base,u.errorMessages],s.shadowRootOptions={...l.shadowRootOptions,delegatesFocus:!0},r([o({type:Boolean,reflect:!0})],s.prototype,"inline",2),r([f("#options")],s.prototype,"optionsList",2),r([o({attribute:"default-value"})],s.prototype,"defaultValue",1),s=r([c(M)],s);export{s as EunomiaRadioList,M as EunomiaRadioListTagName};
@@ -1 +1 @@
1
- import{a,b}from"./chunks/chunk-PMPSJG5V.js";import"./chunks/chunk-VOTRXBDS.js";import"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-RS7TWEMQ.js";import"./chunks/chunk-KSZRQRN4.js";import"./chunks/chunk-YITWLCD3.js";export{b as EunomiaRadio,a as EunomiaRadioTagName};
1
+ import{a,b}from"./chunks/chunk-6FYW5TQU.js";import"./chunks/chunk-TLBXTBMM.js";import"./chunks/chunk-YYCEPZUN.js";import"./chunks/chunk-3BMACIDO.js";import"./chunks/chunk-QL5GSW2A.js";import"./chunks/chunk-YITWLCD3.js";export{b as EunomiaRadio,a as EunomiaRadioTagName};
@@ -0,0 +1,276 @@
1
+ import{a as _}from"./chunks/chunk-B5XMGWM7.js";import"./chunks/chunk-VJCNHMQZ.js";import{a as E}from"./chunks/chunk-BO3JOEWM.js";import{c as T,d as L,e as C,f as c}from"./chunks/chunk-TLBXTBMM.js";import{a as I}from"./chunks/chunk-YYCEPZUN.js";import{a as S}from"./chunks/chunk-3BMACIDO.js";import{a as w}from"./chunks/chunk-22D3SRFR.js";import{a as M}from"./chunks/chunk-PPCHQG7P.js";import{a as m}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import{a as k}from"./chunks/chunk-62RLISRD.js";import{a as $}from"./chunks/chunk-QL5GSW2A.js";import{a,f as v,h as b,j as s,k as y,l as g,p as l,r as d,u as x}from"./chunks/chunk-YITWLCD3.js";var V=b`
2
+ :host {
3
+ --_iconSize: var(--rating-size, 24px);
4
+ --_gap: var(--rating-gap, var(--eun-space-xs, 4px));
5
+ --_color: var(--rating-color, var(--eun-color-primary-500, #3d6fff));
6
+ --_emptyColor: var(
7
+ --rating-empty-color,
8
+ color-mix(
9
+ in srgb,
10
+ var(--eun-text-color, #071621) 55%,
11
+ var(--eun-surface-color, #ffffff)
12
+ )
13
+ );
14
+ --_errorColor: var(
15
+ --rating-error-color,
16
+ var(--eun-color-critical-100, #aa0014)
17
+ );
18
+ --_hintColor: var(--rating-hint-color, var(--eun-text-secondary, #484e61));
19
+ --_focusIndicator: var(
20
+ --rating-focus-outline-color,
21
+ var(--eun-color-primary-500, #3d6fff)
22
+ );
23
+ font-family: var(--eun-font-family, "Mulish", sans-serif);
24
+ font-size: var(--eun-font-size-s, 14px);
25
+ display: inline-block;
26
+ vertical-align: middle;
27
+ outline: none;
28
+ }
29
+
30
+ #wrapper {
31
+ display: flex;
32
+ flex-direction: column;
33
+ gap: var(--eun-space-xs, 4px);
34
+ }
35
+
36
+ #control {
37
+ display: flex;
38
+ align-items: center;
39
+ gap: var(--eun-space-s, 8px);
40
+ }
41
+
42
+ #items {
43
+ display: flex;
44
+ gap: var(--_gap);
45
+ cursor: pointer;
46
+ }
47
+
48
+ .item {
49
+ position: relative;
50
+ flex: none;
51
+ width: var(--_iconSize);
52
+ height: var(--_iconSize);
53
+ }
54
+
55
+ :host([display-only]) #items {
56
+ cursor: default;
57
+ }
58
+
59
+ .icon {
60
+ position: absolute;
61
+ inset: 0;
62
+ pointer-events: none;
63
+ }
64
+
65
+ .icon eun-icon {
66
+ --icon-size: var(--_iconSize);
67
+ display: block;
68
+ width: var(--_iconSize);
69
+ height: var(--_iconSize);
70
+ }
71
+
72
+ .empty {
73
+ --icon-color: var(--_emptyColor);
74
+ }
75
+
76
+ .fill {
77
+ position: absolute;
78
+ inset-block: 0;
79
+ inset-inline-start: 0;
80
+ overflow: hidden;
81
+ --icon-color: var(--_color);
82
+ }
83
+
84
+ .fill eun-icon {
85
+ flex: none;
86
+ }
87
+
88
+ input {
89
+ position: absolute;
90
+ inset-block: 0;
91
+ inset-inline-start: 0;
92
+ width: 100%;
93
+ height: 100%;
94
+ margin: 0;
95
+ opacity: 0;
96
+ appearance: none;
97
+ pointer-events: none;
98
+ }
99
+
100
+ input.half {
101
+ width: 50%;
102
+ }
103
+
104
+ input.end {
105
+ inset-inline-start: 50%;
106
+ width: 50%;
107
+ }
108
+
109
+ .focus-ring {
110
+ position: absolute;
111
+ inset: -3px;
112
+ border-radius: var(--eun-border-radius-s, 4px);
113
+ outline: 2px solid transparent;
114
+ pointer-events: none;
115
+ transition: outline-color var(--eun-duration-s, 150ms)
116
+ var(--eun-easing-default, ease);
117
+ }
118
+
119
+ .focus-ring.half {
120
+ inset-inline-end: 50%;
121
+ }
122
+
123
+ input:focus-visible + .focus-ring {
124
+ outline-color: var(--_focusIndicator);
125
+ }
126
+
127
+ #clear {
128
+ display: inline-flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ min-width: 24px;
132
+ min-height: 24px;
133
+ padding: 2px;
134
+ border: none;
135
+ border-radius: 50%;
136
+ background: transparent;
137
+ color: var(--eun-text-secondary, #484e61);
138
+ cursor: pointer;
139
+ outline: 2px solid transparent;
140
+ outline-offset: 2px;
141
+ --icon-size: 18px;
142
+ transition:
143
+ background-color var(--eun-duration-s, 150ms)
144
+ var(--eun-easing-default, ease),
145
+ outline-color var(--eun-duration-s, 150ms) var(--eun-easing-default, ease);
146
+ }
147
+
148
+ #clear:hover {
149
+ background: var(--eun-content-hover, #9696961a);
150
+ }
151
+
152
+ #clear:active {
153
+ background: var(--eun-content-pressed, #e4e6e8);
154
+ }
155
+
156
+ #clear:focus-visible {
157
+ outline-color: var(--_focusIndicator);
158
+ }
159
+
160
+ #items[aria-invalid="true"] {
161
+ --_emptyColor: var(--_errorColor);
162
+ }
163
+
164
+ :host([aria-readonly="true"]) {
165
+ --_color: var(--eun-readonly-color, #666e8a);
166
+ }
167
+
168
+ :host([aria-readonly="true"]) #items {
169
+ cursor: default;
170
+ }
171
+
172
+ :host([aria-disabled="true"]) {
173
+ --_color: var(--eun-text-disabled-color, #8d93aa);
174
+ --_emptyColor: var(--eun-disabled-content, #c1c9d6);
175
+ }
176
+
177
+ :host([aria-disabled="true"]) #items {
178
+ cursor: not-allowed;
179
+ }
180
+
181
+ @media (forced-colors: active) {
182
+ .fill {
183
+ --icon-color: CanvasText;
184
+ }
185
+
186
+ .empty {
187
+ --icon-color: CanvasText;
188
+ }
189
+
190
+ input:focus-visible + .focus-ring,
191
+ #clear:focus-visible {
192
+ outline-color: Highlight;
193
+ }
194
+
195
+ :host([aria-disabled="true"]) .icon eun-icon {
196
+ --icon-color: GrayText;
197
+ }
198
+ }
199
+ `,N=V;var F="eun-rating",z=S(C(x)),H=k(E(L(T(z)))),n=class extends H{constructor(){super(...arguments);this.errorOnChange=!0;this.max=5;this.step=1;this.displayOnly=!1;this.clearable=!1;this.icon="star";this.emptyIcon="star_border";this.handleClick=e=>{if(this.locked||e.target instanceof HTMLInputElement)return;let t=this.valueAtPointer(e);t!==void 0&&(this.pick(t),this.radioFor(t)?.focus({preventScroll:!0}))};this.handlePointerMove=e=>{this.locked||e.pointerType!=="mouse"||(this.hoverValue=this.valueAtPointer(e))};this.handlePointerLeave=()=>{this.hoverValue=void 0};this.handleChange=e=>{this.locked||this.pick(Number(e.target.value))};this.handleRadioClick=e=>{this.readonly&&e.preventDefault()};this.handleKeydown=e=>{if(!(e.target instanceof HTMLInputElement))return;let t=this.resolvedStep,i=getComputedStyle(this).direction==="rtl",o=this.value??0,r;switch(e.key){case"ArrowRight":r=o+(i?-t:t);break;case"ArrowLeft":r=o+(i?t:-t);break;case"ArrowDown":r=o+t;break;case"ArrowUp":r=o-t;break;case"Home":r=t;break;case"End":r=this.count;break;case" ":this.readonly&&e.preventDefault();return;default:return}if(e.preventDefault(),this.readonly)return;let u=Math.min(this.count,Math.max(t,r));this.pick(u),this.radioFor(u)?.focus()};this.handleClear=async()=>{this.pick(void 0),await this.updateComplete,this.focus()}}get value(){return super.value}set value(e){super.value=this.clamp(e)}get defaultValue(){return super.defaultValue}set defaultValue(e){super.defaultValue=e}get count(){let e=Math.round(this.max);return Number.isFinite(e)&&e>=1?e:5}get resolvedStep(){return Number(this.step)===.5?.5:1}clamp(e){if(e==null||e==="")return;let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return Math.min(t,this.count)}snap(e){let t=this.clamp(e);if(t===void 0||this.displayOnly)return t;let i=this.resolvedStep;return Math.min(this.count,Math.max(i,Math.round(t/i)*i))}format(e){let t=this.locale??$();try{return new Intl.NumberFormat(t,{maximumFractionDigits:2}).format(e)}catch{return String(e)}}valueText(e){return this.dictionary.rating.valueText(this.format(e),this.format(this.count))}radioFor(e){let t=this.itemsEl?.querySelectorAll("input");return Array.from(t??[]).find(i=>Number(i.value)===e)??null}get tabStopValue(){return this.value??this.resolvedStep}get hostTabStop(){return!1}getFocusAnchor(){return this.radioFor(this.tabStopValue)??void 0}focus(e){super.focus?.(e),this.radioFor(this.tabStopValue)?.focus(e)}pick(e){e!==this.value&&(this.value=e,this.dispatchEvent(new I(this.value)))}get locked(){return this.disabled||this.readonly||this.displayOnly}valueAtPointer(e){let t=getComputedStyle(this).direction==="rtl",i=e.target.closest(".item");if(!i){let p;return this.itemsEl?.querySelectorAll(".item").forEach(h=>{let f=h.getBoundingClientRect();(t?f.right>=e.clientX:f.left<=e.clientX)&&(p=h)}),p?Number(p.dataset.index):void 0}let o=Number(i.dataset.index);if(this.resolvedStep===1)return o;let r=i.getBoundingClientRect(),u=r.width?(e.clientX-r.left)/r.width:1;return(t?1-u:u)<=.5?o-.5:o}willUpdate(e){if(["value","valueState","max","step","displayOnly"].some(t=>e.has(t))){let t=this.snap(this.value);t!==this.value&&(this.value=t)}(e.has("disabled")||e.has("readonly"))&&(this.hoverValue=void 0),super.willUpdate(e)}renderIcon(e){return l`
200
+ <span class="icon" aria-hidden="true">
201
+ <eun-icon class="empty" name=${this.emptyIcon}></eun-icon>
202
+ <span class="fill" style=${w({width:`${e*100}%`})}>
203
+ <eun-icon name=${this.icon}></eun-icon>
204
+ </span>
205
+ </span>
206
+ `}renderRadio(e){let t=!Number.isInteger(e),i=m({half:t,end:!t&&this.resolvedStep===.5});return l`
207
+ <input
208
+ type="radio"
209
+ name="rating"
210
+ class=${i}
211
+ .value=${String(e)}
212
+ .checked=${_(this.value===e)}
213
+ ?disabled=${this.disabled}
214
+ tabindex=${e===this.tabStopValue?"0":"-1"}
215
+ aria-label=${this.valueText(e)}
216
+ @click=${this.handleRadioClick}
217
+ />
218
+ <span class="focus-ring ${t?"half":""}" aria-hidden="true"></span>
219
+ `}renderDisplay(){let{rating:e}=this.dictionary,t=this.value,i=t===void 0?e.noValue:this.valueText(t);return l`
220
+ <div
221
+ id="items"
222
+ part="items"
223
+ role="img"
224
+ aria-label=${e.summary(this.label||e.label,i)}
225
+ >
226
+ ${Array.from({length:this.count},(o,r)=>l`<span class="item">
227
+ ${this.renderIcon(Math.min(1,Math.max(0,(t??0)-r)))}
228
+ </span>`)}
229
+ </div>
230
+ `}renderClear(){return!this.clearable||this.value===void 0||this.locked?d:l`
231
+ <button
232
+ type="button"
233
+ id="clear"
234
+ part="clear"
235
+ aria-label=${this.clearLabel??this.dictionary.rating.clear}
236
+ @click=${this.handleClear}
237
+ >
238
+ <eun-icon name="close" aria-hidden="true"></eun-icon>
239
+ </button>
240
+ `}render(){if(this.displayOnly)return l`<div id="wrapper">${this.renderDisplay()}</div>`;let e=this.renderDescription(),t=[this.instructions?"group-instructions":"",e===d?"":"description"].filter(Boolean).join(" ")||void 0,i=this.hoverValue??this.value??0;return l`
241
+ <div id="wrapper">
242
+ ${this.renderFormLabels()}
243
+ ${this.instructions?l`<span id="group-instructions" hidden
244
+ >${this.instructions}</span
245
+ >`:d}
246
+ <div id="control">
247
+ <div
248
+ id="items"
249
+ part="items"
250
+ role="radiogroup"
251
+ class=${m({preview:this.hoverValue!==void 0})}
252
+ aria-label=${this.label||this.dictionary.rating.label}
253
+ aria-describedby=${M(t)}
254
+ aria-required=${this.required?"true":d}
255
+ aria-readonly=${this.readonly?"true":d}
256
+ aria-disabled=${this.disabled?"true":d}
257
+ aria-invalid=${this.showError?"true":"false"}
258
+ @click=${this.handleClick}
259
+ @change=${this.handleChange}
260
+ @keydown=${this.handleKeydown}
261
+ @pointermove=${this.handlePointerMove}
262
+ @pointerleave=${this.handlePointerLeave}
263
+ >
264
+ ${Array.from({length:this.count},(o,r)=>{let u=r+1;return l`
265
+ <span class="item" data-index=${u}>
266
+ ${this.renderIcon(Math.min(1,Math.max(0,i-r)))}
267
+ ${this.resolvedStep===.5?this.renderRadio(u-.5):d}
268
+ ${this.renderRadio(u)}
269
+ </span>
270
+ `})}
271
+ </div>
272
+ ${this.renderClear()}
273
+ </div>
274
+ ${e}
275
+ </div>
276
+ `}};n.styles=[N,c.base,c.errorMessages,c.hintMessages],a([s({type:Number})],n.prototype,"max",2),a([s({type:Number})],n.prototype,"step",2),a([s({type:Boolean,attribute:"display-only",reflect:!0})],n.prototype,"displayOnly",2),a([s({type:Boolean,reflect:!0})],n.prototype,"clearable",2),a([s({attribute:"clear-label"})],n.prototype,"clearLabel",2),a([s()],n.prototype,"icon",2),a([s({attribute:"empty-icon"})],n.prototype,"emptyIcon",2),a([y()],n.prototype,"hoverValue",2),a([s({type:Number})],n.prototype,"value",1),a([s({attribute:"default-value",type:Number})],n.prototype,"defaultValue",1),a([g("#items")],n.prototype,"itemsEl",2),n=a([v(F)],n);export{n as EunomiaRating,F as EunomiaRatingTagName};
@@ -1,4 +1,4 @@
1
- import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunks/chunk-BRSNQMCD.js";import{b as $,c as f}from"./chunks/chunk-647ISUF4.js";import{a as n,b as g,j as y}from"./chunks/chunk-MJ4RDZLL.js";import{a as p}from"./chunks/chunk-PPCHQG7P.js";import{a,f as d,h as b,j as r,k as s,p as l,r as c,u as v}from"./chunks/chunk-YITWLCD3.js";var x=b`
1
+ import{a as k,b as x}from"./chunks/chunk-IKAZYVB7.js";import{a as L}from"./chunks/chunk-BRSNQMCD.js";import{b as D,c as f}from"./chunks/chunk-647ISUF4.js";import{a as n,b as y,j as $}from"./chunks/chunk-MJ4RDZLL.js";import{a as p}from"./chunks/chunk-PPCHQG7P.js";import{a as g}from"./chunks/chunk-62RLISRD.js";import"./chunks/chunk-QL5GSW2A.js";import{a,f as d,h as b,j as r,k as s,p as l,r as c,u as v}from"./chunks/chunk-YITWLCD3.js";var w=b`
2
2
  :host {
3
3
  display: block;
4
4
  font-family: var(--eun-font-family, "Mulish", sans-serif);
@@ -66,7 +66,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
66
66
  #actions .spacer {
67
67
  flex: 1 1 auto;
68
68
  }
69
- `,T=x;var h=class u extends Event{static{this.eventName="eunguestinvite"}constructor(m,t){super(u.eventName,{bubbles:!0,composed:!1}),this.email=m,this.eventId=t}};var w="eun-scheduler-event-editor",C=[{name:"red",value:"#f14959"},{name:"purple",value:"#9562e3"},{name:"yellow",value:"#f0f050"},{name:"blue",value:"#3bb3b9"},{name:"green",value:"#49f15f"},{name:"pink",value:"#d05df3"}],G=["low","medium","high","critical"],P={low:"success",high:"warning",critical:"critical"},I=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,i=class extends v{constructor(){super(...arguments);this.hideActions=!1;this.titleLabel="Title";this.descriptionLabel="Description";this.allDayLabel="All day";this.dateLabel="Date";this.endDateLabel="End date";this.startTimeLabel="Start time";this.endTimeLabel="End time";this.locationLabel="Location";this.notesLabel="Notes";this.priorityLabel="Priority";this.colorLabel="Color";this.requiredLabel="is required";this.colorLabels={red:"Red",purple:"Purple",yellow:"Yellow",blue:"Blue",green:"Green",pink:"Pink"};this.guestsLabel="Guests";this.addGuestLabel="Add guest";this.removeGuestLabel="Remove";this.saveLabel="Save";this.cancelLabel="Cancel";this.deleteLabel="Delete";this.formTitle="";this.formDescription="";this.formAllDay=!1;this.formDate=n(new Date);this.formEndDate=n(new Date);this.formStart=null;this.formEnd=null;this.formLocation="";this.formNotes="";this.formPriority="medium";this.formColor="#3bb3b9";this.formGuests=[];this.guestInputValue="";this.guestInputError=!1;this.showErrors=!1;this.seedSnapshot="";this.handleSaveClick=()=>{this.requestSave()};this.handleCancelClick=()=>{this.seedForm()};this.handlePriorityChange=t=>{this.formPriority=t.target.value[0]};this.handleGuestInputChange=t=>{this.guestInputValue=t.target.value??"",this.guestInputError=!1};this.handleGuestInputKeydown=t=>{t.key==="Enter"&&(t.preventDefault(),this.addGuest())};this.handleAddGuestClick=()=>{this.addGuest()};this.handleRemoveGuest=t=>{this.formGuests=this.formGuests.filter(e=>e.email!==t)}}connectedCallback(){super.connectedCallback?.(),this.seedForm()}willUpdate(t){(t.has("event")||t.has("initialStart")||t.has("initialEnd"))&&this.seedForm(),super.willUpdate(t)}updated(t){super.updated(t),["formTitle","formDescription","formAllDay","formDate","formEndDate","formStart","formEnd","formLocation","formNotes","formPriority","formColor","formGuests"].some(o=>t.has(o))&&this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}seedForm(){let t=this.event;if(t)this.formTitle=t.title,this.formDescription=t.description??"",this.formAllDay=!!t.allDay,this.formDate=n(t.start),this.formEndDate=n(t.end),this.formStart=t.start,this.formEnd=t.end,this.formLocation=t.location??"",this.formNotes=t.notes??"",this.formPriority=t.priority??"medium",this.formColor=t.color,this.formGuests=t.guests?t.guests.map(e=>({...e})):[];else{let e=this.initialStart??A(new Date),o=this.initialEnd??y(e,1);this.formTitle="",this.formDescription="",this.formAllDay=!1,this.formDate=n(e),this.formEndDate=n(e),this.formStart=e,this.formEnd=o,this.formLocation="",this.formNotes="",this.formPriority="medium",this.formColor="blue",this.formGuests=[]}this.guestInputValue="",this.guestInputError=!1,this.showErrors=!1,this.seedSnapshot=this.snapshot()}snapshot(){return JSON.stringify({title:this.formTitle,description:this.formDescription,allDay:this.formAllDay,date:this.formDate.getTime(),endDate:this.formEndDate.getTime(),start:this.formStart?.getTime(),end:this.formEnd?.getTime(),location:this.formLocation,notes:this.formNotes,priority:this.formPriority,color:this.formColor,guests:this.formGuests})}get dirty(){return this.snapshot()!==this.seedSnapshot}get isEditing(){return!!this.event}composeStartEnd(){if(this.formAllDay)return{start:n(this.formDate),end:g(this.formEndDate)};if(!this.formStart||!this.formEnd)return null;let t=new Date(this.formDate);t.setHours(this.formStart.getHours(),this.formStart.getMinutes(),0,0);let e=new Date(this.formDate);return e.setHours(this.formEnd.getHours(),this.formEnd.getMinutes(),0,0),e.getTime()<=t.getTime()&&e.setDate(e.getDate()+1),{start:t,end:e}}get valid(){if(!this.formTitle.trim())return!1;let t=this.composeStartEnd();return!!t&&t.end.getTime()>t.start.getTime()}requestSave(){if(!this.valid)return this.showErrors=!0,!1;let t=this.composeStartEnd(),e={id:this.event?.id??crypto.randomUUID(),title:this.formTitle.trim(),description:this.formDescription||void 0,allDay:this.formAllDay,start:t.start,end:t.end,location:this.formLocation||void 0,notes:this.formNotes||void 0,color:this.formColor,priority:this.formPriority,guests:this.formGuests.length?this.formGuests:void 0};return this.dispatchEvent(this.event?new D(e):new L(e)),this.event=e,this.seedSnapshot=this.snapshot(),!0}requestDelete(){this.event&&this.dispatchEvent(new k(this.event.id))}addGuest(){let t=this.guestInputValue.trim();if(!t)return;if(!I.test(t)){this.guestInputError=!0;return}let e=this.formGuests.some(o=>o.email.toLowerCase()===t.toLowerCase());this.guestInputValue="",this.guestInputError=!1,!e&&(this.formGuests=[...this.formGuests,{email:t,status:"pending"}],this.dispatchEvent(new h(t,this.event?.id)))}render(){let t=this.showErrors&&!this.formTitle.trim();return l`
69
+ `,T=w;var h=class u extends Event{static{this.eventName="eunguestinvite"}constructor(m,t){super(u.eventName,{bubbles:!0,composed:!1}),this.email=m,this.eventId=t}};var C="eun-scheduler-event-editor",G=[{name:"red",value:"#f14959"},{name:"purple",value:"#9562e3"},{name:"yellow",value:"#f0f050"},{name:"blue",value:"#3bb3b9"},{name:"green",value:"#49f15f"},{name:"pink",value:"#d05df3"}],P=["low","medium","high","critical"],I={low:"success",high:"warning",critical:"critical"},A=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,i=class extends g(v){constructor(){super(...arguments);this.hideActions=!1;this.titleLabel="Title";this.descriptionLabel="Description";this.allDayLabel="All day";this.dateLabel="Date";this.endDateLabel="End date";this.startTimeLabel="Start time";this.endTimeLabel="End time";this.locationLabel="Location";this.notesLabel="Notes";this.priorityLabel="Priority";this.colorLabel="Color";this.requiredLabel="is required";this.colorLabels={red:"Red",purple:"Purple",yellow:"Yellow",blue:"Blue",green:"Green",pink:"Pink"};this.guestsLabel="Guests";this.addGuestLabel="Add guest";this.removeGuestLabel="Remove";this.saveLabel="Save";this.deleteLabel="Delete";this.formTitle="";this.formDescription="";this.formAllDay=!1;this.formDate=n(new Date);this.formEndDate=n(new Date);this.formStart=null;this.formEnd=null;this.formLocation="";this.formNotes="";this.formPriority="medium";this.formColor="#3bb3b9";this.formGuests=[];this.guestInputValue="";this.guestInputError=!1;this.showErrors=!1;this.seedSnapshot="";this.handleSaveClick=()=>{this.requestSave()};this.handleCancelClick=()=>{this.seedForm()};this.handlePriorityChange=t=>{this.formPriority=t.target.value[0]};this.handleGuestInputChange=t=>{this.guestInputValue=t.target.value??"",this.guestInputError=!1};this.handleGuestInputKeydown=t=>{t.key==="Enter"&&(t.preventDefault(),this.addGuest())};this.handleAddGuestClick=()=>{this.addGuest()};this.handleRemoveGuest=t=>{this.formGuests=this.formGuests.filter(e=>e.email!==t)}}connectedCallback(){super.connectedCallback?.(),this.seedForm()}willUpdate(t){(t.has("event")||t.has("initialStart")||t.has("initialEnd"))&&this.seedForm(),super.willUpdate(t)}updated(t){super.updated(t),["formTitle","formDescription","formAllDay","formDate","formEndDate","formStart","formEnd","formLocation","formNotes","formPriority","formColor","formGuests"].some(o=>t.has(o))&&this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0}))}seedForm(){let t=this.event;if(t)this.formTitle=t.title,this.formDescription=t.description??"",this.formAllDay=!!t.allDay,this.formDate=n(t.start),this.formEndDate=n(t.end),this.formStart=t.start,this.formEnd=t.end,this.formLocation=t.location??"",this.formNotes=t.notes??"",this.formPriority=t.priority??"medium",this.formColor=t.color,this.formGuests=t.guests?t.guests.map(e=>({...e})):[];else{let e=this.initialStart??N(new Date),o=this.initialEnd??$(e,1);this.formTitle="",this.formDescription="",this.formAllDay=!1,this.formDate=n(e),this.formEndDate=n(e),this.formStart=e,this.formEnd=o,this.formLocation="",this.formNotes="",this.formPriority="medium",this.formColor="blue",this.formGuests=[]}this.guestInputValue="",this.guestInputError=!1,this.showErrors=!1,this.seedSnapshot=this.snapshot()}snapshot(){return JSON.stringify({title:this.formTitle,description:this.formDescription,allDay:this.formAllDay,date:this.formDate.getTime(),endDate:this.formEndDate.getTime(),start:this.formStart?.getTime(),end:this.formEnd?.getTime(),location:this.formLocation,notes:this.formNotes,priority:this.formPriority,color:this.formColor,guests:this.formGuests})}get dirty(){return this.snapshot()!==this.seedSnapshot}get isEditing(){return!!this.event}composeStartEnd(){if(this.formAllDay)return{start:n(this.formDate),end:y(this.formEndDate)};if(!this.formStart||!this.formEnd)return null;let t=new Date(this.formDate);t.setHours(this.formStart.getHours(),this.formStart.getMinutes(),0,0);let e=new Date(this.formDate);return e.setHours(this.formEnd.getHours(),this.formEnd.getMinutes(),0,0),e.getTime()<=t.getTime()&&e.setDate(e.getDate()+1),{start:t,end:e}}get valid(){if(!this.formTitle.trim())return!1;let t=this.composeStartEnd();return!!t&&t.end.getTime()>t.start.getTime()}requestSave(){if(!this.valid)return this.showErrors=!0,!1;let t=this.composeStartEnd(),e={id:this.event?.id??crypto.randomUUID(),title:this.formTitle.trim(),description:this.formDescription||void 0,allDay:this.formAllDay,start:t.start,end:t.end,location:this.formLocation||void 0,notes:this.formNotes||void 0,color:this.formColor,priority:this.formPriority,guests:this.formGuests.length?this.formGuests:void 0};return this.dispatchEvent(this.event?new L(e):new k(e)),this.event=e,this.seedSnapshot=this.snapshot(),!0}requestDelete(){this.event&&this.dispatchEvent(new x(this.event.id))}addGuest(){let t=this.guestInputValue.trim();if(!t)return;if(!A.test(t)){this.guestInputError=!0;return}let e=this.formGuests.some(o=>o.email.toLowerCase()===t.toLowerCase());this.guestInputValue="",this.guestInputError=!1,!e&&(this.formGuests=[...this.formGuests,{email:t,status:"pending"}],this.dispatchEvent(new h(t,this.event?.id)))}render(){let t=this.showErrors&&!this.formTitle.trim();return l`
70
70
  <div id="fields">
71
71
  <eun-input
72
72
  label=${this.titleLabel}
@@ -163,7 +163,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
163
163
  @keydown=${this.handleGuestInputKeydown}
164
164
  ></eun-input>
165
165
  <eun-button
166
- appearance="default"
166
+ appearance="soft"
167
167
  id="guest-add-button"
168
168
  color="secondary"
169
169
  aria-label=${this.addGuestLabel}
@@ -185,9 +185,9 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
185
185
  >
186
186
  <eun-chip
187
187
  appearance="outline"
188
- icon=${$[e.status]}
188
+ icon=${D[e.status]}
189
189
  .severity=${f[e.status]}
190
- .ariaLabelRemove=${this.removeGuestLabel}
190
+ .removeLabel=${this.removeGuestLabel}
191
191
  @eunclose=${()=>this.handleRemoveGuest(e.email)}
192
192
  >
193
193
  ${e.email}
@@ -215,12 +215,12 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
215
215
  .value=${[this.formPriority]}
216
216
  @eunchange=${this.handlePriorityChange}
217
217
  >
218
- ${G.map(e=>l`
218
+ ${P.map(e=>l`
219
219
  <eun-toggle-item
220
220
  value=${e}
221
- color=${p(P[e])}
221
+ color=${p(I[e])}
222
222
  >
223
- ${N(e)}
223
+ ${R(e)}
224
224
  </eun-toggle-item>
225
225
  `)}
226
226
  </eun-toggle-group>
@@ -233,7 +233,7 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
233
233
  .value=${this.formColor}
234
234
  @eunchange=${e=>{this.formColor=e.target.value}}
235
235
  >
236
- ${C.map(e=>l`
236
+ ${G.map(e=>l`
237
237
  <option value=${e.value}>
238
238
  ${this.colorLabels[e.name]}
239
239
  </option>
@@ -250,11 +250,11 @@ import{a as L,b as k}from"./chunks/chunk-IKAZYVB7.js";import{a as D}from"./chunk
250
250
  `:c}
251
251
  <span class="spacer"></span>
252
252
  <eun-button appearance="ghost" @click=${this.handleCancelClick}>
253
- ${this.cancelLabel}
253
+ ${this.cancelLabel??this.dictionary.common.cancel}
254
254
  </eun-button>
255
255
  <eun-button color="primary" @click=${this.handleSaveClick}>
256
256
  ${this.saveLabel}
257
257
  </eun-button>
258
258
  </div>
259
259
  `}
260
- `}};i.styles=T,a([r({attribute:!1})],i.prototype,"event",2),a([r({attribute:!1})],i.prototype,"initialStart",2),a([r({attribute:!1})],i.prototype,"initialEnd",2),a([r()],i.prototype,"locale",2),a([r({type:Boolean,attribute:"hide-actions"})],i.prototype,"hideActions",2),a([r({attribute:"title-label"})],i.prototype,"titleLabel",2),a([r({attribute:"description-label"})],i.prototype,"descriptionLabel",2),a([r({attribute:"all-day-label"})],i.prototype,"allDayLabel",2),a([r({attribute:"date-label"})],i.prototype,"dateLabel",2),a([r({attribute:"end-date-label"})],i.prototype,"endDateLabel",2),a([r({attribute:"start-time-label"})],i.prototype,"startTimeLabel",2),a([r({attribute:"end-time-label"})],i.prototype,"endTimeLabel",2),a([r({attribute:"location-label"})],i.prototype,"locationLabel",2),a([r({attribute:"notes-label"})],i.prototype,"notesLabel",2),a([r({attribute:"priority-label"})],i.prototype,"priorityLabel",2),a([r({attribute:"color-label"})],i.prototype,"colorLabel",2),a([r({attribute:"required-label"})],i.prototype,"requiredLabel",2),a([r({attribute:!1})],i.prototype,"colorLabels",2),a([r({attribute:"guests-label"})],i.prototype,"guestsLabel",2),a([r({attribute:"add-guest-label"})],i.prototype,"addGuestLabel",2),a([r({attribute:"remove-guest-label"})],i.prototype,"removeGuestLabel",2),a([r({attribute:"save-label"})],i.prototype,"saveLabel",2),a([r({attribute:"cancel-label"})],i.prototype,"cancelLabel",2),a([r({attribute:"delete-label"})],i.prototype,"deleteLabel",2),a([s()],i.prototype,"formTitle",2),a([s()],i.prototype,"formDescription",2),a([s()],i.prototype,"formAllDay",2),a([s()],i.prototype,"formDate",2),a([s()],i.prototype,"formEndDate",2),a([s()],i.prototype,"formStart",2),a([s()],i.prototype,"formEnd",2),a([s()],i.prototype,"formLocation",2),a([s()],i.prototype,"formNotes",2),a([s()],i.prototype,"formPriority",2),a([s()],i.prototype,"formColor",2),a([s()],i.prototype,"formGuests",2),a([s()],i.prototype,"guestInputValue",2),a([s()],i.prototype,"guestInputError",2),a([s()],i.prototype,"showErrors",2),i=a([d(w)],i);function A(u){let m=new Date(u);return m.setHours(m.getHours()+1,0,0,0),m}function N(u){return u.charAt(0).toUpperCase()+u.slice(1)}export{i as EunomiaSchedulerEventEditor,w as EunomiaSchedulerEventEditorTagName};
260
+ `}};i.styles=T,a([r({attribute:!1})],i.prototype,"event",2),a([r({attribute:!1})],i.prototype,"initialStart",2),a([r({attribute:!1})],i.prototype,"initialEnd",2),a([r()],i.prototype,"locale",2),a([r({type:Boolean,attribute:"hide-actions"})],i.prototype,"hideActions",2),a([r({attribute:"title-label"})],i.prototype,"titleLabel",2),a([r({attribute:"description-label"})],i.prototype,"descriptionLabel",2),a([r({attribute:"all-day-label"})],i.prototype,"allDayLabel",2),a([r({attribute:"date-label"})],i.prototype,"dateLabel",2),a([r({attribute:"end-date-label"})],i.prototype,"endDateLabel",2),a([r({attribute:"start-time-label"})],i.prototype,"startTimeLabel",2),a([r({attribute:"end-time-label"})],i.prototype,"endTimeLabel",2),a([r({attribute:"location-label"})],i.prototype,"locationLabel",2),a([r({attribute:"notes-label"})],i.prototype,"notesLabel",2),a([r({attribute:"priority-label"})],i.prototype,"priorityLabel",2),a([r({attribute:"color-label"})],i.prototype,"colorLabel",2),a([r({attribute:"required-label"})],i.prototype,"requiredLabel",2),a([r({attribute:!1})],i.prototype,"colorLabels",2),a([r({attribute:"guests-label"})],i.prototype,"guestsLabel",2),a([r({attribute:"add-guest-label"})],i.prototype,"addGuestLabel",2),a([r({attribute:"remove-guest-label"})],i.prototype,"removeGuestLabel",2),a([r({attribute:"save-label"})],i.prototype,"saveLabel",2),a([r({attribute:"cancel-label"})],i.prototype,"cancelLabel",2),a([r({attribute:"delete-label"})],i.prototype,"deleteLabel",2),a([s()],i.prototype,"formTitle",2),a([s()],i.prototype,"formDescription",2),a([s()],i.prototype,"formAllDay",2),a([s()],i.prototype,"formDate",2),a([s()],i.prototype,"formEndDate",2),a([s()],i.prototype,"formStart",2),a([s()],i.prototype,"formEnd",2),a([s()],i.prototype,"formLocation",2),a([s()],i.prototype,"formNotes",2),a([s()],i.prototype,"formPriority",2),a([s()],i.prototype,"formColor",2),a([s()],i.prototype,"formGuests",2),a([s()],i.prototype,"guestInputValue",2),a([s()],i.prototype,"guestInputError",2),a([s()],i.prototype,"showErrors",2),i=a([d(C)],i);function N(u){let m=new Date(u);return m.setHours(m.getHours()+1,0,0,0),m}function R(u){return u.charAt(0).toUpperCase()+u.slice(1)}export{i as EunomiaSchedulerEventEditor,C as EunomiaSchedulerEventEditorTagName};
@@ -1 +1 @@
1
- import{a,b}from"./chunks/chunk-QZ5SHR3I.js";import"./chunks/chunk-647ISUF4.js";import"./chunks/chunk-MJ4RDZLL.js";import"./chunks/chunk-YITWLCD3.js";export{b as EunomiaSchedulerEventCard,a as EunomiaSchedulerEventCardTagName};
1
+ import{a,b}from"./chunks/chunk-J3SZBXM6.js";import"./chunks/chunk-647ISUF4.js";import"./chunks/chunk-MJ4RDZLL.js";import"./chunks/chunk-YITWLCD3.js";export{b as EunomiaSchedulerEventCard,a as EunomiaSchedulerEventCardTagName};