@eunomia/elements 1.0.0-beta.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/README.md +28 -6
  2. package/dist/angular/forms.d.ts +80 -0
  3. package/dist/angular/forms.js +267 -0
  4. package/dist/cdn/components/chunks/chunk-2XPIGFBD.js +1 -0
  5. package/dist/cdn/components/chunks/chunk-5IUNSTM3.js +1 -0
  6. package/dist/cdn/components/chunks/chunk-7HXPLZ7C.js +1 -0
  7. package/dist/cdn/components/chunks/{chunk-J3SZBXM6.js → chunk-A2NO4RSF.js} +7 -7
  8. package/dist/cdn/components/chunks/{chunk-Q34EQ5HZ.js → chunk-A623JJXJ.js} +1 -1
  9. package/dist/cdn/components/chunks/{chunk-Y3HOIL64.js → chunk-AW7PU43S.js} +2 -2
  10. package/dist/cdn/components/chunks/{chunk-FF3I7C3C.js → chunk-DWTNRFWW.js} +1 -3
  11. package/dist/cdn/components/chunks/chunk-FPNWPMHA.js +1 -0
  12. package/dist/cdn/components/chunks/chunk-GMWUHGNI.js +319 -0
  13. package/dist/cdn/components/chunks/{chunk-FQUWHNQT.js → chunk-GXOEPXDW.js} +1 -1
  14. package/dist/cdn/components/chunks/chunk-HXESKTK2.js +1 -0
  15. package/dist/cdn/components/chunks/chunk-JDUWKPHW.js +46 -0
  16. package/dist/cdn/components/chunks/{chunk-D3JJBHXN.js → chunk-JLKCBPD2.js} +2 -2
  17. package/dist/cdn/components/chunks/chunk-M6ZJHL4Q.js +1 -0
  18. package/dist/cdn/components/chunks/{chunk-TN3HGHQO.js → chunk-MDSUMP3O.js} +4 -4
  19. package/dist/cdn/components/chunks/chunk-MSQWOKBB.js +1 -0
  20. package/dist/cdn/components/chunks/{chunk-3UUZM7X2.js → chunk-NPXRQHUN.js} +3 -3
  21. package/dist/cdn/components/chunks/chunk-OB7DEGNX.js +1 -0
  22. package/dist/cdn/components/chunks/{chunk-JANNHW4Q.js → chunk-PADHCLBG.js} +4 -4
  23. package/dist/cdn/components/chunks/chunk-QMXE3KLT.js +1 -0
  24. package/dist/cdn/components/chunks/chunk-QNWKRPOW.js +1 -0
  25. package/dist/cdn/components/chunks/{chunk-KQUUMZ7U.js → chunk-RZF7QQDX.js} +7 -7
  26. package/dist/cdn/components/chunks/chunk-SCAP7J35.js +1 -0
  27. package/dist/cdn/components/chunks/chunk-TISMX7UL.js +1 -0
  28. package/dist/cdn/components/chunks/chunk-TWLI2ZOT.js +1 -0
  29. package/dist/cdn/components/chunks/chunk-W4VCWRY7.js +210 -0
  30. package/dist/cdn/components/chunks/{chunk-SZZRMJ65.js → chunk-WEG3KO6T.js} +3 -3
  31. package/dist/cdn/components/chunks/chunk-WP6ZYBAC.js +1 -0
  32. package/dist/cdn/components/chunks/{chunk-HGX6GPHM.js → chunk-XCBQ4CKH.js} +1 -1
  33. package/dist/cdn/components/chunks/{chunk-3UW2LJ7T.js → chunk-XZ3LFOQP.js} +2 -2
  34. package/dist/cdn/components/eun-alert.js +1 -1
  35. package/dist/cdn/components/eun-animate.js +92 -180
  36. package/dist/cdn/components/eun-breadcrumb.js +4 -4
  37. package/dist/cdn/components/eun-button.js +1 -1
  38. package/dist/cdn/components/eun-calendar.js +188 -115
  39. package/dist/cdn/components/eun-card.js +1 -1
  40. package/dist/cdn/components/eun-carousel.js +36 -28
  41. package/dist/cdn/components/eun-check-card.js +3 -3
  42. package/dist/cdn/components/eun-checkbox-list.js +2 -2
  43. package/dist/cdn/components/eun-checkbox.js +1 -1
  44. package/dist/cdn/components/eun-chip.js +11 -15
  45. package/dist/cdn/components/eun-collapse.js +21 -10
  46. package/dist/cdn/components/eun-color-picker.js +32 -32
  47. package/dist/cdn/components/eun-counter.js +8 -8
  48. package/dist/cdn/components/eun-date-picker.js +83 -79
  49. package/dist/cdn/components/eun-description-list.js +1 -1
  50. package/dist/cdn/components/eun-divider.js +9 -8
  51. package/dist/cdn/components/eun-drawer.js +8 -6
  52. package/dist/cdn/components/eun-dropdown-button.js +1 -1
  53. package/dist/cdn/components/eun-dropdown-item.js +4 -4
  54. package/dist/cdn/components/eun-fab.js +1 -1
  55. package/dist/cdn/components/eun-image-card.js +2 -2
  56. package/dist/cdn/components/eun-image-carousel.js +55 -29
  57. package/dist/cdn/components/eun-infinite-list.js +2 -2
  58. package/dist/cdn/components/eun-input-file.js +3 -3
  59. package/dist/cdn/components/eun-input-phone.js +6 -6
  60. package/dist/cdn/components/eun-input.js +1 -1
  61. package/dist/cdn/components/eun-label.js +1 -1
  62. package/dist/cdn/components/eun-link.js +18 -329
  63. package/dist/cdn/components/eun-loader.js +1 -1
  64. package/dist/cdn/components/eun-modal.js +9 -7
  65. package/dist/cdn/components/eun-nav-menu.js +363 -0
  66. package/dist/cdn/components/eun-pagination.js +4 -4
  67. package/dist/cdn/components/eun-password-strength.js +2 -2
  68. package/dist/cdn/components/eun-progress-bar.js +1 -1
  69. package/dist/cdn/components/eun-radio-card.js +4 -4
  70. package/dist/cdn/components/eun-radio-list.js +1 -1
  71. package/dist/cdn/components/eun-radio.js +1 -1
  72. package/dist/cdn/components/eun-rating.js +9 -9
  73. package/dist/cdn/components/eun-scheduler-event-editor.js +113 -77
  74. package/dist/cdn/components/eun-scheduler-event.js +1 -1
  75. package/dist/cdn/components/eun-scheduler.js +137 -79
  76. package/dist/cdn/components/eun-search.js +6 -6
  77. package/dist/cdn/components/eun-select.js +1 -1
  78. package/dist/cdn/components/eun-sidebar.js +23 -14
  79. package/dist/cdn/components/eun-slider.js +2 -2
  80. package/dist/cdn/components/eun-sliding-card.js +1 -1
  81. package/dist/cdn/components/eun-step.js +2 -2
  82. package/dist/cdn/components/eun-stepper.js +11 -12
  83. package/dist/cdn/components/eun-switch.js +2 -2
  84. package/dist/cdn/components/eun-tab-group.js +1 -1
  85. package/dist/cdn/components/eun-tab-panel.js +1 -1
  86. package/dist/cdn/components/eun-table-action-bar.js +1 -1
  87. package/dist/cdn/components/eun-table.js +13 -10
  88. package/dist/cdn/components/eun-tag.js +1 -1
  89. package/dist/cdn/components/eun-textarea.js +4 -4
  90. package/dist/cdn/components/eun-time-picker.js +28 -25
  91. package/dist/cdn/components/eun-toast.js +8 -8
  92. package/dist/cdn/components/eun-toggle-group.js +8 -2
  93. package/dist/cdn/components/eun-toggle-item.js +8 -2
  94. package/dist/cdn/components/eun-toggle.js +4 -1
  95. package/dist/cdn/components/eun-toolbar.js +114 -36
  96. package/dist/cdn/components/eun-tooltip.js +1 -1
  97. package/dist/cdn/styles/eunomia-themes.css +1 -1
  98. package/dist/cdn/styles/themes/eunomia-theme.css +1 -1
  99. package/dist/cdn/styles/themes/mixins/eunomia-neutrals.mixin.scss +2 -2
  100. package/dist/cdn/styles/themes/prebuilt-themes/eunomia/eunomia.theme.css +1 -1
  101. package/dist/cdn/styles/themes/prebuilt-themes/fire/eunomia-fire.theme.css +1 -1
  102. package/dist/cdn/styles/themes/prebuilt-themes/forest/eunomia-forest.theme.css +1 -1
  103. package/dist/cdn/styles/themes/prebuilt-themes/gold/eunomia-gold.theme.css +1 -1
  104. package/dist/cdn/styles/themes/prebuilt-themes/ocean/eunomia-ocean.theme.css +1 -1
  105. package/dist/cdn/styles/themes/prebuilt-themes/salmon/eunomia-salmon.theme.css +1 -1
  106. package/dist/cdn/styles/themes/prebuilt-themes/violet/eunomia-violet.theme.css +1 -1
  107. package/dist/cdn/styles/tools/mixins/layout/eunomia-grid.mixin.scss +116 -8
  108. package/dist/components/action/button/button.styles.js +2 -2
  109. package/dist/components/action/dropdown-button/dropdown-button.d.ts +4 -0
  110. package/dist/components/action/dropdown-button/dropdown-button.js +1 -0
  111. package/dist/components/action/dropdown-button/dropdown-button.styles.js +5 -4
  112. package/dist/components/action/dropdown-button/dropdown-item.d.ts +1 -0
  113. package/dist/components/action/dropdown-button/dropdown-item.js +1 -0
  114. package/dist/components/action/dropdown-button/dropdown-item.styles.js +4 -4
  115. package/dist/components/action/link/link.d.ts +2 -1
  116. package/dist/components/action/link/link.js +2 -1
  117. package/dist/components/action/link/link.styles.d.ts +40 -1
  118. package/dist/components/action/link/link.styles.js +83 -60
  119. package/dist/components/action/shared-styles/button-palette.styles.js +1 -1
  120. package/dist/components/action/toggle/toggle-group.d.ts +1 -0
  121. package/dist/components/action/toggle/toggle-group.js +1 -0
  122. package/dist/components/action/toggle/toggle-group.styles.d.ts +1 -0
  123. package/dist/components/action/toggle/toggle-group.styles.js +9 -2
  124. package/dist/components/action/toggle/toggle-item.styles.js +8 -2
  125. package/dist/components/action/toggle/toggle.d.ts +1 -0
  126. package/dist/components/action/toggle/toggle.js +1 -0
  127. package/dist/components/action/toggle/toggle.styles.d.ts +1 -0
  128. package/dist/components/action/toggle/toggle.styles.js +5 -1
  129. package/dist/components/alert/drawer/drawer.d.ts +14 -13
  130. package/dist/components/alert/drawer/drawer.js +20 -28
  131. package/dist/components/alert/modal/modal.d.ts +14 -13
  132. package/dist/components/alert/modal/modal.js +20 -28
  133. package/dist/components/alert/modal/modal.styles.js +1 -1
  134. package/dist/components/alert/toast/toast.d.ts +5 -5
  135. package/dist/components/alert/toast/toast.js +9 -10
  136. package/dist/components/alert/toast/toast.styles.js +3 -3
  137. package/dist/components/content/card/image-card.styles.js +1 -1
  138. package/dist/components/content/chip/chip.d.ts +7 -9
  139. package/dist/components/content/chip/chip.js +11 -14
  140. package/dist/components/content/chip/chip.styles.js +1 -5
  141. package/dist/components/content/collapse/collapse.d.ts +5 -0
  142. package/dist/components/content/collapse/collapse.js +7 -0
  143. package/dist/components/content/collapse/collapse.styles.d.ts +3 -0
  144. package/dist/components/content/collapse/collapse.styles.js +13 -1
  145. package/dist/components/content/description-list/description-list.styles.js +1 -1
  146. package/dist/components/content/image-carousel/image-carousel.d.ts +60 -13
  147. package/dist/components/content/image-carousel/image-carousel.js +100 -22
  148. package/dist/components/content/image-carousel/image-carousel.styles.js +32 -6
  149. package/dist/components/content/password-strength/password-strength.styles.js +1 -1
  150. package/dist/components/content/progress-bar/progress-bar.styles.js +1 -1
  151. package/dist/components/content/shared-styles/card-link.styles.js +1 -1
  152. package/dist/components/content/shared-styles/tone-surface.styles.js +1 -3
  153. package/dist/components/form/checkbox/check-card.styles.js +2 -2
  154. package/dist/components/form/checkbox/checkbox-list.d.ts +3 -1
  155. package/dist/components/form/checkbox/checkbox-list.js +3 -1
  156. package/dist/components/form/checkbox/checkbox.styles.js +1 -1
  157. package/dist/components/form/color-picker/color-picker.d.ts +28 -3
  158. package/dist/components/form/color-picker/color-picker.js +53 -7
  159. package/dist/components/form/counter/counter.js +1 -1
  160. package/dist/components/form/counter/counter.styles.js +2 -2
  161. package/dist/components/form/date-picker/date-picker-day-grid.styles.js +1 -1
  162. package/dist/components/form/date-picker/date-picker-month-grid.js +1 -1
  163. package/dist/components/form/date-picker/date-picker.d.ts +50 -13
  164. package/dist/components/form/date-picker/date-picker.js +178 -43
  165. package/dist/components/form/input/input.js +1 -4
  166. package/dist/components/form/input-file/input-file.styles.js +2 -2
  167. package/dist/components/form/input-phone/input-phone.js +4 -3
  168. package/dist/components/form/label/label.styles.js +1 -1
  169. package/dist/components/form/radio/radio-card.styles.js +2 -2
  170. package/dist/components/form/radio/radio.styles.js +1 -1
  171. package/dist/components/form/rating/rating.js +3 -5
  172. package/dist/components/form/rating/rating.styles.js +2 -2
  173. package/dist/components/form/search/search.d.ts +1 -7
  174. package/dist/components/form/search/search.js +2 -12
  175. package/dist/components/form/shared-styles/field.styles.js +2 -2
  176. package/dist/components/form/slider/slider.styles.js +1 -1
  177. package/dist/components/form/switch/switch.styles.js +1 -1
  178. package/dist/components/form/textarea/textarea.js +1 -5
  179. package/dist/components/form/textarea/textarea.styles.js +2 -2
  180. package/dist/components/form/time-picker/time-picker-columns.d.ts +4 -1
  181. package/dist/components/form/time-picker/time-picker-columns.js +64 -15
  182. package/dist/components/form/time-picker/time-picker-columns.styles.js +5 -1
  183. package/dist/components/form/time-picker/time-picker-list.d.ts +4 -1
  184. package/dist/components/form/time-picker/time-picker-list.js +15 -8
  185. package/dist/components/form/time-picker/time-picker.d.ts +11 -2
  186. package/dist/components/form/time-picker/time-picker.js +22 -8
  187. package/dist/components/layout/animate/animate.d.ts +35 -17
  188. package/dist/components/layout/animate/animate.js +27 -14
  189. package/dist/components/layout/animate/animate.styles.d.ts +2 -1
  190. package/dist/components/layout/animate/animate.styles.js +107 -179
  191. package/dist/components/layout/divider/divider.d.ts +1 -0
  192. package/dist/components/layout/divider/divider.js +2 -1
  193. package/dist/components/layout/divider/divider.styles.js +7 -6
  194. package/dist/components/layout/infinite-list/infinite-list.styles.js +1 -1
  195. package/dist/components/navigation/breadcrumb/breadcrumb.styles.js +3 -3
  196. package/dist/components/navigation/carousel/carousel.d.ts +23 -14
  197. package/dist/components/navigation/carousel/carousel.js +39 -27
  198. package/dist/components/navigation/carousel/carousel.styles.js +16 -8
  199. package/dist/components/navigation/nav-menu/nav-menu.d.ts +201 -0
  200. package/dist/components/navigation/nav-menu/nav-menu.js +673 -0
  201. package/dist/components/navigation/nav-menu/nav-menu.styles.d.ts +1 -0
  202. package/dist/components/navigation/nav-menu/nav-menu.styles.js +352 -0
  203. package/dist/components/navigation/pagination/pagination.d.ts +3 -0
  204. package/dist/components/navigation/pagination/pagination.styles.js +2 -2
  205. package/dist/components/navigation/sidebar/sidebar.d.ts +8 -10
  206. package/dist/components/navigation/sidebar/sidebar.js +12 -15
  207. package/dist/components/navigation/sidebar/sidebar.styles.js +13 -4
  208. package/dist/components/navigation/stepper/step.styles.js +2 -2
  209. package/dist/components/navigation/stepper/stepper.d.ts +24 -13
  210. package/dist/components/navigation/stepper/stepper.js +36 -23
  211. package/dist/components/navigation/stepper/stepper.styles.js +2 -2
  212. package/dist/components/navigation/tabs/tab-group/tab-group.js +1 -1
  213. package/dist/components/navigation/tabs/tab-panel/tab-panel.styles.js +1 -1
  214. package/dist/components/navigation/toolbar/toolbar.d.ts +121 -20
  215. package/dist/components/navigation/toolbar/toolbar.js +176 -45
  216. package/dist/components/navigation/toolbar/toolbar.styles.js +113 -28
  217. package/dist/events/editor-state-change.event.d.ts +28 -0
  218. package/dist/events/editor-state-change.event.js +22 -0
  219. package/dist/events/event-cancel.event.d.ts +20 -0
  220. package/dist/events/event-cancel.event.js +17 -0
  221. package/dist/events/period-change.event.d.ts +14 -6
  222. package/dist/events/period-change.event.js +9 -6
  223. package/dist/features/scheduler/calendar/calendar.d.ts +52 -20
  224. package/dist/features/scheduler/calendar/calendar.js +84 -36
  225. package/dist/features/scheduler/calendar/calendar.styles.js +5 -2
  226. package/dist/features/scheduler/scheduler/scheduler.d.ts +69 -4
  227. package/dist/features/scheduler/scheduler/scheduler.js +172 -47
  228. package/dist/features/scheduler/scheduler/scheduler.styles.js +6 -0
  229. package/dist/features/scheduler/scheduler-event/scheduler-event.d.ts +18 -20
  230. package/dist/features/scheduler/scheduler-event/scheduler-event.js +29 -38
  231. package/dist/features/scheduler/scheduler-event/scheduler-event.styles.js +2 -2
  232. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.d.ts +102 -18
  233. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.js +249 -112
  234. package/dist/features/scheduler/scheduler-event-editor/scheduler-event-editor.styles.js +11 -1
  235. package/dist/features/scheduler/shared/scheduler-event-popover.d.ts +9 -1
  236. package/dist/features/scheduler/shared/scheduler-event-popover.js +77 -42
  237. package/dist/features/scheduler/shared/scheduler-event-popover.styles.js +14 -3
  238. package/dist/features/scheduler/shared/scheduler-hour-grid.d.ts +3 -2
  239. package/dist/features/scheduler/shared/scheduler-hour-grid.js +53 -46
  240. package/dist/features/scheduler/shared/scheduler-hour-grid.styles.js +13 -7
  241. package/dist/features/scheduler/shared/scheduler-month-view.js +1 -1
  242. package/dist/features/scheduler/shared/scheduler-month-view.styles.js +13 -7
  243. package/dist/features/scheduler/shared/scheduler-year-view.d.ts +6 -5
  244. package/dist/features/scheduler/shared/scheduler-year-view.js +11 -7
  245. package/dist/features/scheduler/shared/scheduler-year-view.styles.js +57 -3
  246. package/dist/features/scheduler/shared/scheduler.types.d.ts +5 -9
  247. package/dist/features/scheduler/shared/scheduler.utils.d.ts +61 -0
  248. package/dist/features/scheduler/shared/scheduler.utils.js +78 -4
  249. package/dist/features/table/table/table-native.styles.js +8 -4
  250. package/dist/features/table/table/table.d.ts +2 -1
  251. package/dist/features/table/table/table.js +2 -1
  252. package/dist/features/table/table/table.styles.js +6 -4
  253. package/dist/i18n/en.d.ts +17 -0
  254. package/dist/i18n/en.js +17 -0
  255. package/dist/i18n/fr.js +17 -0
  256. package/dist/index.d.ts +6 -0
  257. package/dist/index.js +4 -0
  258. package/dist/jsx.d.ts +48 -6
  259. package/dist/mixins/anchor-position.mixin.d.ts +17 -0
  260. package/dist/mixins/anchor-position.mixin.js +45 -7
  261. package/dist/mixins/button.mixin.js +2 -1
  262. package/dist/mixins/check.mixin.js +14 -5
  263. package/dist/mixins/dialog-surface.mixin.d.ts +1 -1
  264. package/dist/mixins/dialog-surface.mixin.js +5 -5
  265. package/dist/mixins/form.mixin.js +33 -13
  266. package/dist/mixins/localizable.mixin.d.ts +1 -0
  267. package/dist/mixins/localizable.mixin.js +9 -2
  268. package/dist/mixins/radio.mixin.js +14 -5
  269. package/dist/mixins/validators.mixin.js +4 -3
  270. package/dist/react.d.ts +59 -0
  271. package/dist/react.js +42 -0
  272. package/dist/ssr/animate-ssr.css +35 -0
  273. package/dist/ssr/breadcrumb-ssr.css +3 -3
  274. package/dist/ssr/button-ssr.css +8 -2
  275. package/dist/ssr/card-ssr.css +1 -1
  276. package/dist/ssr/carousel-ssr.css +15 -4
  277. package/dist/ssr/chip-ssr.css +3 -3
  278. package/dist/ssr/collapse-ssr.css +2 -2
  279. package/dist/ssr/description-list-ssr.css +1 -1
  280. package/dist/ssr/divider-ssr.css +23 -0
  281. package/dist/ssr/field-ssr.css +245 -42
  282. package/dist/ssr/image-carousel-ssr.css +2 -4
  283. package/dist/ssr/links-ssr.css +17 -3
  284. package/dist/ssr/nav-menu-ssr.css +82 -0
  285. package/dist/ssr/overlay-ssr.css +4 -0
  286. package/dist/ssr/scheduler-ssr.css +182 -0
  287. package/dist/ssr/stepper-ssr.css +136 -0
  288. package/dist/ssr/table-ssr.css +7 -4
  289. package/dist/ssr/tag-ssr.css +1 -1
  290. package/dist/ssr/toolbar-ssr.css +7 -5
  291. package/dist/utils/css-length.utils.d.ts +14 -0
  292. package/dist/utils/css-length.utils.js +32 -0
  293. package/dist/utils/form-validation.utils.d.ts +36 -0
  294. package/dist/utils/form-validation.utils.js +113 -0
  295. package/dist/utils/implicit-submission.utils.js +2 -14
  296. package/dist/utils/interactive-content.utils.d.ts +10 -0
  297. package/dist/utils/interactive-content.utils.js +43 -0
  298. package/dist/utils/popover.utils.js +3 -2
  299. package/dist/utils/scroll-lock.utils.d.ts +9 -1
  300. package/dist/utils/scroll-lock.utils.js +21 -2
  301. package/dist/utils/theme-generator.utils.d.ts +1 -0
  302. package/dist/utils/theme-generator.utils.js +23 -10
  303. package/dist/utils/validity.utils.d.ts +18 -4
  304. package/dist/utils/validity.utils.js +74 -4
  305. package/package.json +34 -3
  306. package/styles/themes/mixins/eunomia-neutrals.mixin.scss +2 -2
  307. package/styles/tools/mixins/layout/eunomia-grid.mixin.scss +116 -8
  308. package/dist/cdn/components/chunks/chunk-4DRU3IYJ.js +0 -1
  309. package/dist/cdn/components/chunks/chunk-647ISUF4.js +0 -1
  310. package/dist/cdn/components/chunks/chunk-6TIEBY34.js +0 -1
  311. package/dist/cdn/components/chunks/chunk-E6UOI36Q.js +0 -1
  312. package/dist/cdn/components/chunks/chunk-GNAUNTS5.js +0 -1
  313. package/dist/cdn/components/chunks/chunk-IJJ67C66.js +0 -1
  314. package/dist/cdn/components/chunks/chunk-J7ETIRSK.js +0 -1
  315. package/dist/cdn/components/chunks/chunk-JGV7LHEI.js +0 -1
  316. package/dist/cdn/components/chunks/chunk-L74LXUGL.js +0 -1
  317. package/dist/cdn/components/chunks/chunk-MY6ORZJR.js +0 -46
  318. package/dist/cdn/components/chunks/chunk-QWTFP56P.js +0 -1
  319. package/dist/cdn/components/chunks/chunk-SFX2LQ4K.js +0 -205
  320. package/dist/cdn/components/chunks/chunk-WW4BTWMH.js +0 -1
  321. package/dist/utils/boolean.utils.d.ts +0 -14
  322. package/dist/utils/boolean.utils.js +0 -20
@@ -1,4 +1,4 @@
1
- import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chunk-J3SZBXM6.js";import{a as pe}from"./chunks/chunk-BRSNQMCD.js";import{d as re,e as oe,f as ie,g as ne,h as ae,i as se,j as le,k as de,l as ce}from"./chunks/chunk-647ISUF4.js";import{a as b}from"./chunks/chunk-22D3SRFR.js";import{a as B,c as L,d as te,h as D,k as F,m as T,n as R,p as E,q as V,s as W}from"./chunks/chunk-MJ4RDZLL.js";import{a as k}from"./chunks/chunk-DBY4CPCM.js";import{b as ee}from"./chunks/chunk-OTX6FWAF.js";import{a as f}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import{a as Z}from"./chunks/chunk-JGV7LHEI.js";import"./chunks/chunk-GNAUNTS5.js";import{a as h,f as Q,h as M,j as g,k as H,l as U,p as d,u as J}from"./chunks/chunk-YITWLCD3.js";var Se=M`
1
+ import{a as pe}from"./chunks/chunk-TISMX7UL.js";import{a as he}from"./chunks/chunk-A2NO4RSF.js";import{a as ve}from"./chunks/chunk-BRSNQMCD.js";import{g as ie,h as ne,i as K,j as ae,k as se,l as le,m as de,n as ce,o as ue}from"./chunks/chunk-QMXE3KLT.js";import{a as b}from"./chunks/chunk-22D3SRFR.js";import"./chunks/chunk-TWLI2ZOT.js";import{a as B,c as R,d as oe,h as k,k as F,m as $,n as L,p as E,q as V,s as W}from"./chunks/chunk-MJ4RDZLL.js";import{a as S,b as re}from"./chunks/chunk-DBY4CPCM.js";import{b as te}from"./chunks/chunk-OTX6FWAF.js";import{a as f}from"./chunks/chunk-O7PHBLH2.js";import"./chunks/chunk-SGM2X2TC.js";import{a as ee}from"./chunks/chunk-WP6ZYBAC.js";import"./chunks/chunk-2XPIGFBD.js";import{a as h,f as U,h as M,j as g,k as T,l as J,p as d,u as Z}from"./chunks/chunk-YITWLCD3.js";var Me=M`
2
2
  :host {
3
3
  display: block;
4
4
  box-sizing: border-box;
@@ -85,7 +85,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
85
85
 
86
86
  .week-day-strip-weekday {
87
87
  font-size: 11px;
88
- color: var(--eun-text-secondary, #484e61);
88
+ color: var(--eun-text-secondary, #666e8a);
89
89
  }
90
90
 
91
91
  .week-day-strip-daynum {
@@ -118,11 +118,14 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
118
118
 
119
119
  .week-day-strip-day:focus-visible {
120
120
  outline: 2px solid
121
- var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff));
121
+ var(
122
+ --scheduler-focus-outline-color,
123
+ var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff))
124
+ );
122
125
  outline-offset: 1px;
123
126
  }
124
127
 
125
- @media ${k("tablet")} {
128
+ @media ${S("tablet")} {
126
129
  :host {
127
130
  display: flex;
128
131
  flex-direction: column;
@@ -137,7 +140,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
137
140
  min-height: 0;
138
141
  }
139
142
  }
140
- `,ve=Se;var Me=M`
143
+ `,me=Me;var $e=M`
141
144
  :host {
142
145
  --scheduler-mobile: false;
143
146
  --scheduler-tablet: false;
@@ -150,12 +153,17 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
150
153
  touch-action: pan-y;
151
154
  }
152
155
 
153
- .hour-grid-header {
154
- display: flex;
156
+ .hour-grid-top {
155
157
  position: sticky;
156
158
  top: 0;
157
159
  z-index: 3;
160
+ width: max-content;
161
+ min-width: 100%;
158
162
  background: var(--eun-surface-color, #ffffff);
163
+ }
164
+
165
+ .hour-grid-header {
166
+ display: flex;
159
167
  border-bottom: 1px solid var(--eun-border-color, #dee0e7);
160
168
  }
161
169
 
@@ -176,7 +184,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
176
184
  border-left: 1px solid var(--eun-divider-color, #dee0e7);
177
185
  text-align: center;
178
186
  font-size: 12px;
179
- color: var(--eun-text-secondary, #484e61);
187
+ color: var(--eun-text-secondary, #666e8a);
180
188
  }
181
189
 
182
190
  .hour-grid-day-header.today {
@@ -227,7 +235,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
227
235
  padding-right: var(--eun-space-xs, 4px);
228
236
  text-align: center;
229
237
  font-size: 11px;
230
- color: var(--eun-text-secondary, #484e61);
238
+ color: var(--eun-text-secondary, #666e8a);
231
239
  transform: translateY(-0.5em);
232
240
  border-top: none;
233
241
  }
@@ -288,13 +296,13 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
288
296
  cursor: grabbing;
289
297
  }
290
298
 
291
- @container ${k("mobile")} {
299
+ @container ${S("mobile")} {
292
300
  #hour-grid-scroll {
293
301
  --scheduler-mobile: true;
294
302
  }
295
303
  }
296
304
 
297
- @container ${k("tablet")} {
305
+ @container ${S("tablet")} {
298
306
  #hour-grid-scroll {
299
307
  --scheduler-tablet: true;
300
308
  flex: 1 1 auto;
@@ -314,13 +322,13 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
314
322
  min-width: var(--scheduler-day-column-min-width-mobile, 76px);
315
323
  }
316
324
  }
317
- `,me=Me;var $e=M`
325
+ `,ge=$e;var Ce=M`
318
326
  .month-scroll {
319
- max-height: var(--scheduler-body-max-height, 640px);
327
+ max-height: var(--scheduler-body-max-height, none);
320
328
  overflow-y: auto;
321
329
  }
322
330
 
323
- @media ${k("tablet")} {
331
+ @media ${S("tablet")} {
324
332
  .month-scroll {
325
333
  flex: 1 1 auto;
326
334
  height: 100%;
@@ -342,7 +350,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
342
350
  padding: var(--eun-space-xs, 4px) var(--eun-space-s, 8px);
343
351
  text-align: center;
344
352
  font-size: 12px;
345
- color: var(--eun-text-secondary, #484e61);
353
+ color: var(--eun-text-secondary, #666e8a);
346
354
  }
347
355
 
348
356
  .month-week {
@@ -365,7 +373,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
365
373
  .month-cell.outside {
366
374
  background: color-mix(
367
375
  in srgb,
368
- var(--eun-text-secondary, #484e61) 4%,
376
+ var(--eun-text-secondary, #666e8a) 4%,
369
377
  transparent
370
378
  );
371
379
  }
@@ -384,7 +392,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
384
392
  }
385
393
 
386
394
  .month-cell.outside .month-cell-day {
387
- color: var(--eun-text-secondary, #484e61);
395
+ color: var(--eun-text-secondary, #666e8a);
388
396
  }
389
397
 
390
398
  .month-cell-day.today {
@@ -401,7 +409,10 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
401
409
 
402
410
  .month-cell-day:focus-visible {
403
411
  outline: 2px solid
404
- var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff));
412
+ var(
413
+ --scheduler-focus-outline-color,
414
+ var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff))
415
+ );
405
416
  outline-offset: 2px;
406
417
  }
407
418
 
@@ -422,7 +433,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
422
433
  padding: 1px 4px;
423
434
  cursor: pointer;
424
435
  font-size: 11px;
425
- color: var(--eun-text-secondary, #484e61);
436
+ color: var(--eun-text-secondary, #666e8a);
426
437
  z-index: 1;
427
438
  }
428
439
 
@@ -433,16 +444,19 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
433
444
 
434
445
  .month-week-more:focus-visible {
435
446
  outline: 2px solid
436
- var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff));
447
+ var(
448
+ --scheduler-focus-outline-color,
449
+ var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff))
450
+ );
437
451
  outline-offset: -2px;
438
452
  }
439
- `,ge=$e;var Ce=M`
453
+ `,ye=Ce;var He=M`
440
454
  .year-scroll {
441
455
  max-height: var(--scheduler-body-max-height, 640px);
442
456
  overflow-y: auto;
443
457
  }
444
458
 
445
- @media ${k("tablet")} {
459
+ @media ${S("tablet")} {
446
460
  .year-scroll {
447
461
  flex: 1 1 auto;
448
462
  height: 100%;
@@ -467,7 +481,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
467
481
  padding: var(--eun-space-xs, 4px) var(--eun-space-s, 8px);
468
482
  text-align: center;
469
483
  font-size: 12px;
470
- color: var(--eun-text-secondary, #484e61);
484
+ color: var(--eun-text-secondary, #666e8a);
471
485
  }
472
486
 
473
487
  .year-month-section {
@@ -508,6 +522,18 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
508
522
  grid-template-columns: repeat(7, 1fr);
509
523
  }
510
524
 
525
+ .year-month-weekdays {
526
+ display: none;
527
+ grid-template-columns: repeat(7, 1fr);
528
+ }
529
+
530
+ .year-month-weekdays span {
531
+ padding: var(--eun-space-xs, 4px) 0;
532
+ text-align: center;
533
+ font-size: 11px;
534
+ color: var(--eun-text-secondary, #666e8a);
535
+ }
536
+
511
537
  .year-day {
512
538
  all: unset;
513
539
  box-sizing: border-box;
@@ -547,7 +573,10 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
547
573
 
548
574
  .year-day:focus-visible {
549
575
  outline: 2px solid
550
- var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff));
576
+ var(
577
+ --scheduler-focus-outline-color,
578
+ var(--scheduler-accent-color, var(--eun-color-primary-500, #3d6fff))
579
+ );
551
580
  outline-offset: 1px;
552
581
  }
553
582
 
@@ -558,46 +587,87 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
558
587
  border-radius: 999px;
559
588
  background: currentColor;
560
589
  }
561
- `,ye=Ce;var He=34,fe=22;function I(o){let{days:a,events:e,dayStartHour:t,dayEndHour:r,slotDuration:i,locale:s}=o,n=60/i,p=r-t,w=Array.from({length:p},(l,v)=>t+v),y=new Date,S=le(e,a),u=S.reduce((l,v)=>Math.max(l,v.row+1),0);return d`
590
+
591
+ @container ${re("tablet")} {
592
+ .year-scroll {
593
+ display: grid;
594
+ grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
595
+ align-content: start;
596
+ gap: var(--eun-space-m, 16px) var(--eun-space-l, 24px);
597
+ padding: var(--eun-space-m, 16px);
598
+ }
599
+
600
+ .year-weekday-header {
601
+ display: none;
602
+ }
603
+
604
+ .year-month-section {
605
+ padding-bottom: 0;
606
+ border-bottom: none;
607
+ }
608
+
609
+ .year-month-label {
610
+ position: static;
611
+ margin: 0 0 var(--eun-space-xs, 4px);
612
+ padding: var(--eun-space-xs, 4px) var(--eun-space-s, 8px);
613
+ }
614
+
615
+ .year-month-weekdays {
616
+ display: grid;
617
+ }
618
+
619
+ .year-day {
620
+ aspect-ratio: auto;
621
+ height: 32px;
622
+ font-size: 12px;
623
+ }
624
+
625
+ .year-day-number {
626
+ width: 26px;
627
+ }
628
+ }
629
+ `,fe=He;var Te=34,be=22;function I(o){let{days:s,events:e,dayStartHour:t,dayEndHour:r,slotDuration:i,locale:a}=o,n=60/i,p=r-t,w=Array.from({length:p},(l,m)=>t+m),y=new Date,x=de(e,s),c=x.reduce((l,m)=>Math.max(l,m.row+1),0);return d`
562
630
  <div id="hour-grid-scroll">
563
- <div class="hour-grid-header">
564
- <div class="hour-grid-gutter-spacer"></div>
565
- ${a.map(l=>d`
566
- <div
567
- class=${f({"hour-grid-day-header":!0,today:E(l)})}
568
- >
569
- ${l.toLocaleDateString(s,{weekday:"short"})}
570
- <br />
571
- ${l.toLocaleDateString(s,{day:"numeric",month:"short"})}
572
- </div>
573
- `)}
574
- </div>
575
- ${u>0?d`
576
- <div
577
- class="hour-grid-allday-row"
578
- style=${b({height:`${u*fe}px`})}
579
- >
631
+ <div class="hour-grid-top">
632
+ ${o.hideDayHeader?null:d`<div class="hour-grid-header">
580
633
  <div class="hour-grid-gutter-spacer"></div>
581
- <div class="hour-grid-allday-days">
582
- ${S.map(l=>{let v=l.endIndex-l.startIndex+1,x=l.startIndex/a.length*100,$=v/a.length*100;return d`
583
- <div
584
- class="hour-grid-allday-event"
585
- style=${b({top:`${l.row*fe}px`,left:`${x}%`,width:`${$}%`})}
586
- >
587
- <eun-scheduler-event
588
- .label=${l.event.title}
589
- .start=${l.event.start}
590
- .end=${l.event.end}
591
- color=${l.event.color}
592
- appearance=${o.eventAppearance}
593
- hide-time
594
- @click=${C=>o.onEventClick(l.event,C)}
595
- ></eun-scheduler-event>
596
- </div>
597
- `})}
634
+ ${s.map(l=>d`
635
+ <div
636
+ class=${f({"hour-grid-day-header":!0,today:E(l)})}
637
+ >
638
+ ${l.toLocaleDateString(a,{weekday:"short"})}
639
+ <br />
640
+ ${l.toLocaleDateString(a,{day:"numeric",month:"short"})}
641
+ </div>
642
+ `)}
643
+ </div>`}
644
+ ${c>0?d`
645
+ <div
646
+ class="hour-grid-allday-row"
647
+ style=${b({height:`${c*be}px`})}
648
+ >
649
+ <div class="hour-grid-gutter-spacer"></div>
650
+ <div class="hour-grid-allday-days">
651
+ ${x.map(l=>{let m=l.endIndex-l.startIndex+1,D=l.startIndex/s.length*100,C=m/s.length*100;return d`
652
+ <div
653
+ class="hour-grid-allday-event"
654
+ style=${b({top:`${l.row*be}px`,left:`${D}%`,width:`${C}%`})}
655
+ >
656
+ <eun-scheduler-event
657
+ .label=${l.event.title}
658
+ .start=${l.event.start}
659
+ .end=${l.event.end}
660
+ color=${l.event.color}
661
+ appearance=${o.eventAppearance}
662
+ hide-time
663
+ @click=${H=>o.onEventClick(l.event,H)}
664
+ ></eun-scheduler-event>
665
+ </div>
666
+ `})}
667
+ </div>
598
668
  </div>
599
- </div>
600
- `:null}
669
+ `:null}
670
+ </div>
601
671
  <div
602
672
  class="hour-grid-body"
603
673
  style=${b({"--_slotsPerHour":String(n)})}
@@ -605,14 +675,14 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
605
675
  <div class="hour-grid-gutter">
606
676
  ${w.map(l=>d`
607
677
  <div class="hour-grid-gutter-slot">
608
- ${ce(l,s)}
678
+ ${ue(l,a)}
609
679
  </div>
610
680
  `)}
611
681
  </div>
612
- ${a.map(l=>Te(l,o,y,w.length))}
682
+ ${s.map(l=>Oe(l,o,y,w.length))}
613
683
  </div>
614
684
  </div>
615
- `}function Te(o,a,e,t){let{events:r,dayStartHour:i,dayEndHour:s,slotDuration:n,slotHeight:p,eventAppearance:w,onSlotClick:y,onEventClick:S,draggingEventId:u,onEventDragStart:l}=a,v=i*60,x=s*60,$=ne(r,o),C=se($),Ee=m=>{if(m.target.closest("eun-scheduler-event"))return;let z=m.currentTarget.getBoundingClientRect(),A=(m.clientY-z.top)/p*n,G=Math.floor(A/n)*n+v,O=new Date(o);O.setHours(0,G,0,0),y(O)},_=e.getHours()*60+e.getMinutes(),ke=T(o,e)&&_>=v&&_<=x;return d`
685
+ `}function Oe(o,s,e,t){let{events:r,dayStartHour:i,dayEndHour:a,slotDuration:n,slotHeight:p,eventAppearance:w,onSlotClick:y,onEventClick:x,draggingEventId:c,onEventDragStart:l}=s,m=i*60,D=a*60,C=ae(r,o),H=le(C),Ee=v=>{if(v.target.closest("eun-scheduler-event"))return;let z=v.currentTarget.getBoundingClientRect(),A=(v.clientY-z.top)/p*n,G=Math.floor(A/n)*n+m,O=new Date(o);O.setHours(0,G,0,0),y(O)},_=e.getHours()*60+e.getMinutes(),Se=$(o,e)&&_>=m&&_<=D;return d`
616
686
  <div
617
687
  class=${f({"hour-grid-day-column":!0,today:E(o)})}
618
688
  data-date=${o.toISOString()}
@@ -620,113 +690,116 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
620
690
  @click=${Ee}
621
691
  >
622
692
  ${Array.from({length:t},()=>1).map(()=>d`<div class="hour-grid-hour-line"></div>`)}
623
- ${ke?d`
693
+ ${Se?d`
624
694
  <div
625
695
  class="hour-grid-now-line"
626
- style=${b({top:`${(_-v)/n*p}px`})}
696
+ style=${b({top:`${(_-m)/n*p}px`})}
627
697
  ></div>
628
698
  `:null}
629
- ${C.map(m=>{let P=Math.max(m.event.start.getHours()*60+m.event.start.getMinutes(),v),z=Math.min(m.event.end.getHours()*60+m.event.end.getMinutes(),x);if(z<=v||P>=x)return null;let j=(P-v)/n*p,A=Math.max((z-P)/n*p,p/2),G=100/m.columnCount;return d`
699
+ ${H.map(v=>{let P=Math.max(v.event.start.getHours()*60+v.event.start.getMinutes(),m),z=Math.min($(v.event.start,v.event.end)?v.event.end.getHours()*60+v.event.end.getMinutes():1440,D);if(z<=m||P>=D)return null;let Q=(P-m)/n*p,A=Math.max((z-P)/n*p,p/2),G=100/v.columnCount;return d`
630
700
  <div
631
- class=${f({"hour-grid-event":!0,"dragging-source":m.event.id===u})}
632
- style=${b({top:`${j}px`,height:`${A}px`,left:`${m.column*G}%`,width:`${G}%`})}
633
- @pointerdown=${O=>l?.(m.event,O)}
701
+ class=${f({"hour-grid-event":!0,"dragging-source":v.event.id===c})}
702
+ style=${b({top:`${Q}px`,height:`${A}px`,left:`${v.column*G}%`,width:`${G}%`})}
703
+ @pointerdown=${O=>l?.(v.event,O)}
634
704
  >
635
705
  <eun-scheduler-event
636
- .label=${m.event.title}
637
- .start=${m.event.start}
638
- .end=${m.event.end}
639
- color=${m.event.color}
706
+ .label=${v.event.title}
707
+ .start=${v.event.start}
708
+ .end=${v.event.end}
709
+ color=${v.event.color}
640
710
  appearance=${w}
641
- ?hide-time=${A<He}
642
- @click=${O=>S(m.event,O)}
711
+ ?hide-time=${A<Te}
712
+ @click=${O=>x(v.event,O)}
643
713
  ></eun-scheduler-event>
644
714
  </div>
645
715
  `})}
646
716
  </div>
647
- `}function K(o,a){return I({...a,days:[o]})}function be(o,a,e,t){let r=L(o,a),i=Array.from({length:7},(s,n)=>D(r,n)).filter(s=>!e||!V(s));return I({...t,days:i})}var X=22;function xe(o){let{displayedMonth:a,weekStartsOn:e,locale:t}=o,r=W(a,e),i=Re(e,t);return d`
717
+ `}function q(o,s){return I({...s,days:[o]})}function we(o,s,e,t){let r=R(o,s),i=Array.from({length:7},(a,n)=>k(r,n)).filter(a=>!e||!V(a));return I({...t,days:i})}var X=22;function De(o){let{displayedMonth:s,weekStartsOn:e,locale:t}=o,r=W(s,e),i=Pe(e,t);return d`
648
718
  <div class="month-scroll">
649
719
  <div class="month-grid-weekdays" role="row">
650
- ${i.map(s=>d`<span role="columnheader">${s}</span>`)}
720
+ ${i.map(a=>d`<span role="columnheader">${a}</span>`)}
651
721
  </div>
652
722
  <div class="month-grid" role="grid">
653
- ${r.map(s=>Oe(s,o))}
723
+ ${r.map(a=>Re(a,o))}
654
724
  </div>
655
725
  </div>
656
- `}function we(o,a){return o.filter(e=>e.startIndex<=a&&e.endIndex>=a)}function Oe(o,a){let{events:e,maxEventsPerCell:t,moreLabel:r,onEventClick:i,desktop:s}=a,n=Math.max(t,1),p=de(e,o),w=o.some((u,l)=>we(p,l).length>n),y=w?n-1:n,S=p.filter(u=>u.row<y);return d`
726
+ `}function xe(o,s){return o.filter(e=>e.startIndex<=s&&e.endIndex>=s)}function Re(o,s){let{events:e,maxEventsPerCell:t,moreLabel:r,onEventClick:i,desktop:a}=s,n=Math.max(t,1),p=ce(e,o),w=o.some((c,l)=>xe(p,l).length>n),y=w?n-1:n,x=p.filter(c=>c.row<y);return d`
657
727
  <div
658
728
  class="month-week"
659
729
  role="row"
660
730
  style=${b({gridTemplateRows:`auto repeat(${n}, ${X}px)`})}
661
731
  >
662
- ${o.map((u,l)=>Le(u,l,a))}
663
- ${S.map(u=>d`
732
+ ${o.map((c,l)=>Le(c,l,s))}
733
+ ${x.map(c=>d`
664
734
  <eun-scheduler-event
665
735
  class="month-week-event"
666
- style=${b({gridColumn:`${u.startIndex+1} / ${u.endIndex+2}`,gridRow:`${u.row+2}`})}
667
- .label=${u.event.title}
668
- .start=${u.event.start}
669
- .end=${u.event.end}
670
- color=${u.event.color}
671
- appearance=${ie(u.event)?"default":"ghost"}
672
- direction=${s?"row":"column"}
673
- ?hide-time=${!s||!!u.event.allDay}
674
- @click=${l=>i(u.event,l)}
736
+ style=${b({gridColumn:`${c.startIndex+1} / ${c.endIndex+2}`,gridRow:`${c.row+2}`})}
737
+ .label=${c.event.title}
738
+ .start=${c.event.start}
739
+ .end=${c.event.end}
740
+ color=${c.event.color}
741
+ appearance=${K(c.event)?"default":"ghost"}
742
+ direction=${a?"row":"column"}
743
+ ?hide-time=${!a||K(c.event)}
744
+ @click=${l=>i(c.event,l)}
675
745
  ></eun-scheduler-event>
676
746
  `)}
677
- ${w?o.map((u,l)=>{let v=we(p,l).length-y;return v>0?d`
747
+ ${w?o.map((c,l)=>{let m=xe(p,l).length-y;return m>0?d`
678
748
  <button
679
749
  type="button"
680
750
  class="month-week-more"
681
751
  style=${b({gridColumn:`${l+1}`,gridRow:`${y+2}`})}
682
- @click=${()=>a.onDayClick(u)}
752
+ @click=${()=>s.onDayClick(c)}
683
753
  >
684
- ${r(v)}
754
+ ${r(m)}
685
755
  </button>
686
756
  `:null}):null}
687
757
  </div>
688
- `}function Le(o,a,e){let{displayedMonth:t,focusedDate:r,onDayClick:i,onDayKeydown:s}=e;return d`
758
+ `}function Le(o,s,e){let{displayedMonth:t,focusedDate:r,onDayClick:i,onDayKeydown:a}=e;return d`
689
759
  <div
690
- class=${f({"month-cell":!0,outside:!R(o,t)})}
691
- style=${b({gridColumn:`${a+1}`})}
760
+ class=${f({"month-cell":!0,outside:!L(o,t)})}
761
+ style=${b({gridColumn:`${s+1}`})}
692
762
  >
693
763
  <button
694
764
  type="button"
695
765
  class=${f({"month-cell-day":!0,today:E(o)})}
696
766
  role="gridcell"
697
- tabindex=${T(o,r)?"0":"-1"}
767
+ tabindex=${$(o,r)?"0":"-1"}
698
768
  aria-label=${o.toLocaleDateString(e.locale,{weekday:"long",day:"numeric",month:"long",year:"numeric"})}
699
769
  @click=${()=>i(o)}
700
- @keydown=${n=>s(n,o)}
770
+ @keydown=${n=>a(n,o)}
701
771
  >
702
772
  ${o.getDate()}
703
773
  </button>
704
774
  </div>
705
- `}function Re(o,a){let e=new Date(1970,0,4);return Array.from({length:7},(t,r)=>D(e,o+r)).map(t=>t.toLocaleDateString(a,{weekday:"short"}))}function De(o){let{displayedYear:a,weekStartsOn:e,locale:t}=o,r=a.getFullYear(),i=Array.from({length:12},(n,p)=>new Date(r,p,1)),s=Ae(e,t);return d`
775
+ `}function Pe(o,s){let e=new Date(1970,0,4);return Array.from({length:7},(t,r)=>k(e,o+r)).map(t=>t.toLocaleDateString(s,{weekday:"short"}))}function ke(o){let{displayedYear:s,weekStartsOn:e,locale:t}=o,r=s.getFullYear(),i=Array.from({length:12},(n,p)=>new Date(r,p,1)),a=Ge(e,t);return d`
706
776
  <div class="year-scroll">
707
777
  <div class="year-weekday-header" role="row">
708
- ${s.map(n=>d`<span role="columnheader">${n}</span>`)}
778
+ ${a.map(n=>d`<span role="columnheader">${n}</span>`)}
709
779
  </div>
710
- ${i.map(n=>Pe(n,e,t,o))}
780
+ ${i.map(n=>ze(n,e,a,t,o))}
711
781
  </div>
712
- `}function Pe(o,a,e,t){let r=W(o,a);return d`
782
+ `}function ze(o,s,e,t,r){let i=W(o,s);return d`
713
783
  <div class="year-month-section">
714
784
  <button
715
785
  type="button"
716
786
  class="year-month-label"
717
- @click=${()=>t.onMonthLabelClick(o)}
787
+ @click=${()=>r.onMonthLabelClick(o)}
718
788
  >
719
- ${o.toLocaleDateString(e,{month:"long",year:"numeric"})}
789
+ ${o.toLocaleDateString(t,{month:"long",year:"numeric"})}
720
790
  </button>
721
791
  <div class="year-month-grid" role="grid">
722
- ${r.map(i=>d`
792
+ <div class="year-month-weekdays" role="row">
793
+ ${e.map(a=>d`<span role="columnheader">${a}</span>`)}
794
+ </div>
795
+ ${i.map(a=>d`
723
796
  <div class="year-month-row" role="row">
724
- ${i.map(s=>ze(s,o,e,t))}
797
+ ${a.map(n=>Ae(n,o,t,r))}
725
798
  </div>
726
799
  `)}
727
800
  </div>
728
801
  </div>
729
- `}function ze(o,a,e,t){let r=!R(o,a),i=!r&&ae(t.events,o).length>0;return d`
802
+ `}function Ae(o,s,e,t){let r=!L(o,s),i=!r&&se(t.events,o).length>0;return d`
730
803
  <button
731
804
  type="button"
732
805
  class=${f({"year-day":!0,outside:r,today:E(o)})}
@@ -739,7 +812,7 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
739
812
  <span class="year-day-number">${o.getDate()}</span>
740
813
  ${i?d`<span class="year-day-dot" aria-hidden="true"></span>`:null}
741
814
  </button>
742
- `}function Ae(o,a){let e=new Date(1970,0,4);return Array.from({length:7},(t,r)=>D(e,o+r)).map(t=>t.toLocaleDateString(a,{weekday:"short"}))}var Y=class o extends Event{static{this.eventName="euneventclick"}constructor(a,e){super(o.eventName,{bubbles:!0,composed:!1}),this.event=a,this.anchor=e}};var N=class o extends Event{static{this.eventName="eunslotclick"}constructor(a){super(o.eventName,{bubbles:!0,composed:!1}),this.start=a}};var Ge="eun-calendar",Ve=40,We=ee("tablet"),Ie=4,q=24,c=class extends Z(J){constructor(){super(...arguments);this.events=[];this.view="week";this.displayedDate=new Date;this.weekStartsOn=1;this.dayStartHour=0;this.dayEndHour=24;this.slotDuration=30;this.readonly=!1;this.noAnimation=!1;this.hideNowLine=!1;this.eventAppearance="default";this.focusedDate=B(new Date);this.selectedWeekDay=null;this.swipeDirection=null;this.isMobile=!1;this.swipeStart=null;this.draggingEventId=null;this.dragEvent=null;this.dragPointerId=null;this.dragActivated=!1;this.dragStartClientX=0;this.dragStartClientY=0;this.dragGrabOffsetX=0;this.dragGrabOffsetY=0;this.dragChipWidth=0;this.dragChipHeight=0;this.dragDurationMs=0;this.dragGhostEl=null;this.dragFinalStart=null;this.suppressNextClick=!1;this.monthMaxEventsPerCell=3;this.observedMonthCell=null;this.handleMonthDayKeydown=e=>{switch(e.key){case"ArrowLeft":e.preventDefault(),this.moveMonthFocus(-1);break;case"ArrowRight":e.preventDefault(),this.moveMonthFocus(1);break;case"ArrowUp":e.preventDefault(),this.moveMonthFocus(-7);break;case"ArrowDown":e.preventDefault(),this.moveMonthFocus(7);break;case"Home":e.preventDefault(),this.jumpMonthFocus(L(this.focusedDate,this.weekStartsOn));break;case"End":e.preventDefault(),this.jumpMonthFocus(D(L(this.focusedDate,this.weekStartsOn),6));break;case"PageUp":e.preventDefault(),this.jumpMonthFocus(F(this.focusedDate,e.shiftKey?-12:-1));break;case"PageDown":e.preventDefault(),this.jumpMonthFocus(F(this.focusedDate,e.shiftKey?12:1));break;default:break}};this.handleMobileMediaChange=e=>{this.isMobile=e.matches};this.handleEventClick=(e,t)=>{this.dispatchEvent(new Y(e,t.currentTarget))};this.handleSlotClick=e=>{this.readonly||this.dispatchEvent(new N(e))};this.handleEventDragStart=(e,t)=>{if(this.readonly||t.pointerType==="touch"||t.button!==0)return;let r=t.currentTarget.getBoundingClientRect();this.dragEvent=e,this.dragPointerId=t.pointerId,this.dragActivated=!1,this.dragStartClientX=t.clientX,this.dragStartClientY=t.clientY,this.dragGrabOffsetX=t.clientX-r.left,this.dragGrabOffsetY=t.clientY-r.top,this.dragChipWidth=r.width,this.dragChipHeight=r.height,this.dragDurationMs=e.end.getTime()-e.start.getTime(),document.addEventListener("pointermove",this.handleDragPointerMove),document.addEventListener("pointerup",this.handleDragPointerUp),document.addEventListener("pointercancel",this.handleDragPointerCancel),document.addEventListener("keydown",this.handleDragKeydown)};this.handleDragPointerMove=e=>{if(!this.dragEvent||e.pointerId!==this.dragPointerId)return;let t=e.clientX-this.dragStartClientX,r=e.clientY-this.dragStartClientY;if(!this.dragActivated){if(Math.hypot(t,r)<Ie)return;this.dragActivated=!0,this.draggingEventId=this.dragEvent.id,this.mountDragGhost(this.dragEvent)}e.preventDefault(),this.updateDragGhost(e.clientX,e.clientY)};this.handleDragPointerUp=e=>{if(!this.dragEvent||e.pointerId!==this.dragPointerId)return;let t=this.dragEvent,r=this.dragActivated,i=this.dragFinalStart;this.teardownDrag(),!(!r||!i)&&(this.suppressNextClick=!0,i.getTime()!==t.start.getTime()&&this.dispatchEvent(new pe({...t,start:i,end:new Date(i.getTime()+this.dragDurationMs)})))};this.handleDragPointerCancel=e=>{!this.dragEvent||e.pointerId!==this.dragPointerId||this.teardownDrag()};this.handleDragKeydown=e=>{e.key==="Escape"&&this.dragEvent&&(e.stopPropagation(),this.teardownDrag())};this.goToDayView=e=>{this.view="day",this.displayedDate=e};this.handleViewClickCapture={handleEvent:e=>{this.suppressNextClick&&(this.suppressNextClick=!1,e.stopPropagation())},capture:!0};this.handleSwipeStart=e=>{this.suppressNextClick=!1,e.pointerType==="touch"&&(this.swipeStart={x:e.clientX,y:e.clientY})};this.handleSwipeEnd=e=>{let t=this.swipeStart;if(this.swipeStart=null,e.pointerType!=="touch"||!t)return;let r=e.clientX-t.x,i=e.clientY-t.y;Math.abs(r)<Ve||Math.abs(r)<Math.abs(i)||(r<0?(this.navigate(1),this.playSwipeAnimation("next")):(this.navigate(-1),this.playSwipeAnimation("previous")))};this.handleSwipeCancel=()=>{this.swipeStart=null}}willUpdate(e){e.has("displayedDate")&&!e.has("focusedDate")&&(this.focusedDate=B(this.displayedDate))}syncDisplayedMonth(){R(this.focusedDate,this.displayedDate)||(this.displayedDate=te(this.focusedDate))}focusMonthCell(){this.shadowRoot?.querySelector('.month-cell-day[tabindex="0"]')?.focus()}moveMonthFocus(e){this.focusedDate=D(this.focusedDate,e),this.syncDisplayedMonth(),this.updateComplete.then(()=>this.focusMonthCell())}jumpMonthFocus(e){this.focusedDate=e,this.syncDisplayedMonth(),this.updateComplete.then(()=>this.focusMonthCell())}updated(e){if(super.updated(e),e.has("view")||e.has("displayedDate")||e.has("weekStartsOn")){let t=re(this.view,this.displayedDate,this.weekStartsOn);this.dispatchEvent(new he(this.view,t.start,t.end))}this.syncMonthCellObserver()}firstUpdated(e){super.firstUpdated(e),this.view==="year"?this.runOnceVisible(".year-scroll",()=>this.scrollYearViewToCurrentMonth()):this.view!=="month"&&this.runOnceVisible("#hour-grid-scroll",()=>this.scrollHourGridToNow())}runOnceVisible(e,t){let r=this.shadowRoot?.querySelector(e);if(r){if(r.clientHeight>0){t();return}this.initialScrollObserver?.disconnect(),this.initialScrollObserver=new ResizeObserver(()=>{r.clientHeight>0&&(this.initialScrollObserver?.disconnect(),this.initialScrollObserver=void 0,t())}),this.initialScrollObserver.observe(r)}}scrollHourGridToNow(){let e=this.shadowRoot?.querySelector("#hour-grid-scroll"),t=this.shadowRoot?.querySelector(".hour-grid-body"),r=this.shadowRoot?.querySelector(".hour-grid-day-column.today");if(!e||!t||!r)return;let i=new Date,s=this.dayStartHour*60,n=this.dayEndHour*60,w=(Math.min(Math.max(i.getHours()*60+i.getMinutes(),s),n)-s)/this.slotDuration*q,y=t.getBoundingClientRect().top-e.getBoundingClientRect().top+e.scrollTop;e.scrollTop=Math.max(0,y+w-e.clientHeight/3)}scrollYearViewToCurrentMonth(){let e=new Date;if(this.displayedDate.getFullYear()!==e.getFullYear())return;let t=this.shadowRoot?.querySelector(".year-scroll"),i=this.shadowRoot?.querySelectorAll(".year-month-section")?.[e.getMonth()];if(!t||!i)return;let s=this.shadowRoot?.querySelector(".year-weekday-header")?.getBoundingClientRect().height??0,n=i.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop;t.scrollTop=Math.max(0,n-s)}syncMonthCellObserver(){if(this.view!=="month"){this.monthCellResizeObserver?.disconnect(),this.monthCellResizeObserver=void 0,this.observedMonthCell=null;return}let e=this.shadowRoot?.querySelector(".month-cell");!e||e===this.observedMonthCell||(this.monthCellResizeObserver?.disconnect(),this.observedMonthCell=e,this.monthCellResizeObserver=new ResizeObserver(()=>this.measureMonthCellCapacity()),this.monthCellResizeObserver.observe(e))}measureMonthCellCapacity(){let e=this.observedMonthCell,t=e?.closest(".month-week"),r=t?.querySelector(".month-cell-day");if(!e||!t||!r)return;let i=Number.parseFloat(getComputedStyle(t).rowGap)||0,s=e.clientHeight-r.offsetHeight-i,n=Math.max(1,Math.floor((s+i)/(X+i)));n!==this.monthMaxEventsPerCell&&(this.monthMaxEventsPerCell=n)}updateMobileMediaQuery(){this.mobileMediaQuery?.removeEventListener("change",this.handleMobileMediaChange),this.mobileMediaQuery=window.matchMedia(We),this.mobileMediaQuery.addEventListener("change",this.handleMobileMediaChange),this.isMobile=this.mobileMediaQuery.matches}connectedCallback(){super.connectedCallback?.(),this.updateMobileMediaQuery()}disconnectedCallback(){this.mobileMediaQuery?.removeEventListener("change",this.handleMobileMediaChange),this.monthCellResizeObserver?.disconnect(),this.initialScrollObserver?.disconnect(),this.teardownDrag(),super.disconnectedCallback?.()}navigate(e){this.displayedDate=oe(this.view,this.displayedDate,e)}mountDragGhost(e){let t=document.createElement(ue);t.label=e.title,t.color=e.color,t.appearance=this.eventAppearance,t.locale=this.locale,t.start=e.start,t.end=e.end,Object.assign(t.style,{position:"fixed",width:`${this.dragChipWidth}px`,height:`${this.dragChipHeight}px`,pointerEvents:"none",zIndex:"1000",boxShadow:"0 8px 20px rgba(0, 0, 0, 0.2)",borderRadius:"var(--eun-border-radius-s, 5px)"}),this.dragGhostLayerEl?.appendChild(t),this.dragGhostEl=t}updateDragGhost(e,t){if(!this.dragGhostEl||!this.dragEvent)return;let r=e-this.dragGrabOffsetX,i=t-this.dragGrabOffsetY;this.dragGhostEl.style.left=`${r}px`,this.dragGhostEl.style.top=`${i}px`;let s=Array.from(this.shadowRoot?.querySelectorAll(".hour-grid-day-column")??[]);if(!s.length)return;let n=s[0];for(let $ of s){let C=$.getBoundingClientRect();if(e>=C.left&&e<=C.right){n=$;break}e>C.right&&(n=$)}let p=n.dataset.date?new Date(n.dataset.date):null;if(!p)return;let w=n.getBoundingClientRect(),y=this.dayStartHour*60,S=this.dayEndHour*60,u=this.dragDurationMs/6e4,l=(i-w.top)/q*this.slotDuration,v=Math.min(Math.max(Math.round(l/this.slotDuration)*this.slotDuration+y,y),S-u),x=new Date(p);x.setHours(0,v,0,0),this.dragFinalStart=x,this.dragGhostEl.start=x,this.dragGhostEl.end=new Date(x.getTime()+this.dragDurationMs)}teardownDrag(){document.removeEventListener("pointermove",this.handleDragPointerMove),document.removeEventListener("pointerup",this.handleDragPointerUp),document.removeEventListener("pointercancel",this.handleDragPointerCancel),document.removeEventListener("keydown",this.handleDragKeydown),this.dragGhostEl?.remove(),this.dragGhostEl=null,this.dragEvent=null,this.dragPointerId=null,this.dragActivated=!1,this.dragFinalStart=null,this.draggingEventId=null}playSwipeAnimation(e){this.swipeDirection=null,this.updateComplete.then(()=>{this.shadowRoot?.querySelector("#view")?.getBoundingClientRect(),this.swipeDirection=e})}render(){return d`
815
+ `}function Ge(o,s){let e=new Date(1970,0,4);return Array.from({length:7},(t,r)=>k(e,o+r)).map(t=>t.toLocaleDateString(s,{weekday:"short"}))}var N=class o extends Event{static{this.eventName="euneventclick"}constructor(s,e){super(o.eventName,{bubbles:!0,composed:!1}),this.event=s,this.anchor=e}};var Y=class o extends Event{static{this.eventName="eunslotclick"}constructor(s){super(o.eventName,{bubbles:!0,composed:!1}),this.start=s}};var Ve="eun-calendar",We=40,Ie=te("tablet"),Ne=4,j=24,u=class extends ee(Z){constructor(){super(...arguments);this.events=[];this.view="week";this.displayedDate=new Date;this.weekStartsOn=1;this.dayStartHour=0;this.dayEndHour=24;this.slotDuration=30;this.readonly=!1;this.noAnimation=!1;this.hideNowLine=!1;this.eventAppearance="default";this.focusedDate=B(new Date);this.selectedWeekDay=null;this.swipeDirection=null;this.isMobile=!1;this.swipeStart=null;this.draggingEventId=null;this.dragEvent=null;this.dragPointerId=null;this.dragActivated=!1;this.dragStartClientX=0;this.dragStartClientY=0;this.dragGrabOffsetX=0;this.dragGrabOffsetY=0;this.dragChipWidth=0;this.dragChipHeight=0;this.dragDurationMs=0;this.dragGhostEl=null;this.dragFinalStart=null;this.suppressNextClick=!1;this.monthMaxEventsPerCell=3;this.observedMonthCell=null;this.handleMonthDayKeydown=e=>{switch(e.key){case"ArrowLeft":e.preventDefault(),this.moveMonthFocus(-1);break;case"ArrowRight":e.preventDefault(),this.moveMonthFocus(1);break;case"ArrowUp":e.preventDefault(),this.moveMonthFocus(-7);break;case"ArrowDown":e.preventDefault(),this.moveMonthFocus(7);break;case"Home":e.preventDefault(),this.jumpMonthFocus(R(this.focusedDate,this.weekStartsOn));break;case"End":e.preventDefault(),this.jumpMonthFocus(k(R(this.focusedDate,this.weekStartsOn),6));break;case"PageUp":e.preventDefault(),this.jumpMonthFocus(F(this.focusedDate,e.shiftKey?-12:-1));break;case"PageDown":e.preventDefault(),this.jumpMonthFocus(F(this.focusedDate,e.shiftKey?12:1));break;default:break}};this.handleMobileMediaChange=e=>{this.isMobile=e.matches};this.handleEventClick=(e,t)=>{this.dispatchEvent(new N(e,t.currentTarget))};this.handleSlotClick=e=>{this.readonly||this.dispatchEvent(new Y(e))};this.handleEventDragStart=(e,t)=>{if(this.readonly||t.pointerType==="touch"||t.button!==0)return;let r=t.currentTarget.getBoundingClientRect();this.dragEvent=e,this.dragPointerId=t.pointerId,this.dragActivated=!1,this.dragStartClientX=t.clientX,this.dragStartClientY=t.clientY,this.dragGrabOffsetX=t.clientX-r.left,this.dragGrabOffsetY=t.clientY-r.top,this.dragChipWidth=r.width,this.dragChipHeight=r.height,this.dragDurationMs=e.end.getTime()-e.start.getTime(),document.addEventListener("pointermove",this.handleDragPointerMove),document.addEventListener("pointerup",this.handleDragPointerUp),document.addEventListener("pointercancel",this.handleDragPointerCancel),document.addEventListener("keydown",this.handleDragKeydown)};this.handleDragPointerMove=e=>{if(!this.dragEvent||e.pointerId!==this.dragPointerId)return;let t=e.clientX-this.dragStartClientX,r=e.clientY-this.dragStartClientY;if(!this.dragActivated){if(Math.hypot(t,r)<Ne)return;this.dragActivated=!0,this.draggingEventId=this.dragEvent.id,this.mountDragGhost(this.dragEvent)}e.preventDefault(),this.updateDragGhost(e.clientX,e.clientY)};this.handleDragPointerUp=e=>{if(!this.dragEvent||e.pointerId!==this.dragPointerId)return;let t=this.dragEvent,r=this.dragActivated,i=this.dragFinalStart;this.teardownDrag(),!(!r||!i)&&(this.suppressNextClick=!0,i.getTime()!==t.start.getTime()&&this.dispatchEvent(new ve({...t,start:i,end:new Date(i.getTime()+this.dragDurationMs)})))};this.handleDragPointerCancel=e=>{!this.dragEvent||e.pointerId!==this.dragPointerId||this.teardownDrag()};this.handleDragKeydown=e=>{e.key==="Escape"&&this.dragEvent&&(e.stopPropagation(),this.teardownDrag())};this.goToDayView=e=>{this.view="day",this.displayedDate=e};this.handleViewClickCapture={handleEvent:e=>{this.suppressNextClick&&(this.suppressNextClick=!1,e.stopPropagation())},capture:!0};this.handleSwipeStart=e=>{this.suppressNextClick=!1,e.pointerType==="touch"&&(this.swipeStart={x:e.clientX,y:e.clientY})};this.handleSwipeEnd=e=>{let t=this.swipeStart;if(this.swipeStart=null,e.pointerType!=="touch"||!t)return;let r=e.clientX-t.x,i=e.clientY-t.y;Math.abs(r)<We||Math.abs(r)<Math.abs(i)||(r<0?(this.navigate(1),this.playSwipeAnimation("next")):(this.navigate(-1),this.playSwipeAnimation("previous")))};this.handleSwipeCancel=()=>{this.swipeStart=null}}willUpdate(e){e.has("displayedDate")&&!e.has("focusedDate")&&(this.focusedDate=B(this.displayedDate))}syncDisplayedMonth(){L(this.focusedDate,this.displayedDate)||(this.displayedDate=oe(this.focusedDate))}focusMonthCell(){this.shadowRoot?.querySelector('.month-cell-day[tabindex="0"]')?.focus()}moveMonthFocus(e){this.focusedDate=k(this.focusedDate,e),this.syncDisplayedMonth(),this.updateComplete.then(()=>this.focusMonthCell())}jumpMonthFocus(e){this.focusedDate=e,this.syncDisplayedMonth(),this.updateComplete.then(()=>this.focusMonthCell())}get visibleRange(){return ie(this.view,this.displayedDate,this.weekStartsOn)}next(){this.navigate(1)}previous(){this.navigate(-1)}today(){this.displayedDate=new Date}updated(e){if(super.updated(e),["view","displayedDate","weekStartsOn"].some(r=>e.has(r)&&e.get(r)!==void 0)){let r=this.visibleRange;this.dispatchEvent(new pe(this.view,r.start,r.end,this.displayedDate))}e.has("view")&&e.get("view")!==void 0&&this.scrollToCurrentPeriod(),this.syncMonthCellObserver()}firstUpdated(e){super.firstUpdated(e),this.scrollToCurrentPeriod()}scrollToCurrentPeriod(){this.view==="year"?this.runOnceVisible(".year-scroll",()=>this.scrollYearViewToCurrentMonth()):this.view!=="month"&&this.runOnceVisible("#hour-grid-scroll",()=>this.scrollHourGridToNow())}runOnceVisible(e,t){let r=this.shadowRoot?.querySelector(e);if(r){if(r.clientHeight>0){t();return}this.initialScrollObserver?.disconnect(),this.initialScrollObserver=new ResizeObserver(()=>{r.clientHeight>0&&(this.initialScrollObserver?.disconnect(),this.initialScrollObserver=void 0,t())}),this.initialScrollObserver.observe(r)}}scrollHourGridToNow(){let e=this.shadowRoot?.querySelector("#hour-grid-scroll"),t=this.shadowRoot?.querySelector(".hour-grid-body"),r=this.shadowRoot?.querySelector(".hour-grid-day-column.today");if(!e||!t||!r)return;let i=new Date,a=this.dayStartHour*60,n=this.dayEndHour*60,w=(Math.min(Math.max(i.getHours()*60+i.getMinutes(),a),n)-a)/this.slotDuration*j,y=t.getBoundingClientRect().top-e.getBoundingClientRect().top+e.scrollTop,x=this.shadowRoot?.querySelector(".hour-grid-top")?.getBoundingClientRect().height??0,c=e.clientHeight-x;e.scrollTop=Math.max(0,y+w-x-c/3)}scrollYearViewToCurrentMonth(){let e=this.shadowRoot?.querySelector(".year-scroll"),r=this.shadowRoot?.querySelectorAll(".year-month-section")?.[this.displayedDate.getMonth()];if(!e||!r)return;let i=this.shadowRoot?.querySelector(".year-weekday-header")?.getBoundingClientRect().height??0,a=r.getBoundingClientRect().top-e.getBoundingClientRect().top+e.scrollTop;e.scrollTop=Math.max(0,a-i)}syncMonthCellObserver(){if(this.view!=="month"){this.monthCellResizeObserver?.disconnect(),this.monthCellResizeObserver=void 0,this.observedMonthCell=null;return}let e=this.shadowRoot?.querySelector(".month-cell");!e||e===this.observedMonthCell||(this.monthCellResizeObserver?.disconnect(),this.observedMonthCell=e,this.monthCellResizeObserver=new ResizeObserver(()=>this.measureMonthCellCapacity()),this.monthCellResizeObserver.observe(e))}measureMonthCellCapacity(){let e=this.observedMonthCell,t=e?.closest(".month-week"),r=t?.querySelector(".month-cell-day");if(!e||!t||!r)return;let i=Number.parseFloat(getComputedStyle(t).rowGap)||0,a=e.clientHeight-r.offsetHeight-i,n=Math.max(1,Math.floor((a+i)/(X+i)));n!==this.monthMaxEventsPerCell&&(this.monthMaxEventsPerCell=n)}updateMobileMediaQuery(){this.mobileMediaQuery?.removeEventListener("change",this.handleMobileMediaChange),this.mobileMediaQuery=window.matchMedia(Ie),this.mobileMediaQuery.addEventListener("change",this.handleMobileMediaChange),this.isMobile=this.mobileMediaQuery.matches}connectedCallback(){super.connectedCallback?.(),this.updateMobileMediaQuery()}disconnectedCallback(){this.mobileMediaQuery?.removeEventListener("change",this.handleMobileMediaChange),this.monthCellResizeObserver?.disconnect(),this.initialScrollObserver?.disconnect(),this.teardownDrag(),super.disconnectedCallback?.()}navigate(e){this.displayedDate=ne(this.view,this.displayedDate,e)}mountDragGhost(e){let t=document.createElement(he);t.label=e.title,t.color=e.color,t.appearance=this.eventAppearance,t.locale=this.locale,t.start=e.start,t.end=e.end,Object.assign(t.style,{position:"fixed",width:`${this.dragChipWidth}px`,height:`${this.dragChipHeight}px`,pointerEvents:"none",zIndex:"1000",boxShadow:"0 8px 20px rgba(0, 0, 0, 0.2)",borderRadius:"var(--eun-border-radius-s, 5px)"}),this.dragGhostLayerEl?.appendChild(t),this.dragGhostEl=t}updateDragGhost(e,t){if(!this.dragGhostEl||!this.dragEvent)return;let r=e-this.dragGrabOffsetX,i=t-this.dragGrabOffsetY;this.dragGhostEl.style.left=`${r}px`,this.dragGhostEl.style.top=`${i}px`;let a=Array.from(this.shadowRoot?.querySelectorAll(".hour-grid-day-column")??[]);if(!a.length)return;let n=a[0];for(let C of a){let H=C.getBoundingClientRect();if(e>=H.left&&e<=H.right){n=C;break}e>H.right&&(n=C)}let p=n.dataset.date?new Date(n.dataset.date):null;if(!p)return;let w=n.getBoundingClientRect(),y=this.dayStartHour*60,x=this.dayEndHour*60,c=this.dragDurationMs/6e4,l=(i-w.top)/j*this.slotDuration,m=Math.min(Math.max(Math.round(l/this.slotDuration)*this.slotDuration+y,y),x-c),D=new Date(p);D.setHours(0,m,0,0),this.dragFinalStart=D,this.dragGhostEl.start=D,this.dragGhostEl.end=new Date(D.getTime()+this.dragDurationMs)}teardownDrag(){document.removeEventListener("pointermove",this.handleDragPointerMove),document.removeEventListener("pointerup",this.handleDragPointerUp),document.removeEventListener("pointercancel",this.handleDragPointerCancel),document.removeEventListener("keydown",this.handleDragKeydown),this.dragGhostEl?.remove(),this.dragGhostEl=null,this.dragEvent=null,this.dragPointerId=null,this.dragActivated=!1,this.dragFinalStart=null,this.draggingEventId=null}playSwipeAnimation(e){this.swipeDirection=null,this.updateComplete.then(()=>{this.shadowRoot?.querySelector("#view")?.getBoundingClientRect(),this.swipeDirection=e})}render(){return d`
743
816
  <div
744
817
  id="view"
745
818
  class=${f({"swiping-next":this.swipeDirection==="next","swiping-previous":this.swipeDirection==="previous"})}
@@ -751,12 +824,12 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
751
824
  <div id="view-content">${this.renderActiveView()}</div>
752
825
  </div>
753
826
  <div id="drag-ghost-layer"></div>
754
- `}renderActiveView(){let e={events:this.events,dayStartHour:this.dayStartHour,dayEndHour:this.dayEndHour,slotDuration:this.slotDuration,locale:this.locale,slotHeight:q,eventAppearance:this.eventAppearance,onSlotClick:this.handleSlotClick,onEventClick:this.handleEventClick,draggingEventId:this.draggingEventId,onEventDragStart:this.handleEventDragStart};switch(this.view){case"day":return K(this.displayedDate,e);case"week":return this.renderWeekOrWorkWeek(!1,e);case"work-week":return this.renderWeekOrWorkWeek(!0,e);case"month":return xe({displayedMonth:this.displayedDate,events:this.events,weekStartsOn:this.weekStartsOn,focusedDate:this.focusedDate,locale:this.locale,desktop:!this.isMobile,maxEventsPerCell:this.monthMaxEventsPerCell,moreLabel:t=>(this.moreEventsLabel??this.dictionary.calendar.moreEvents).replace("{count}",String(t)),onDayClick:this.goToDayView,onEventClick:this.handleEventClick,onDayKeydown:this.handleMonthDayKeydown});case"year":return De({displayedYear:this.displayedDate,events:this.events,weekStartsOn:this.weekStartsOn,locale:this.locale,onDayClick:this.goToDayView,onMonthLabelClick:t=>{this.view="month",this.displayedDate=t}});default:return d``}}renderWeekOrWorkWeek(e,t){if(!this.isMobile)return be(this.displayedDate,this.weekStartsOn,e,t);let r=L(this.displayedDate,this.weekStartsOn),i=Array.from({length:7},(n,p)=>D(r,p)).filter(n=>!e||!V(n)),s=this.selectedWeekDay&&i.some(n=>T(n,this.selectedWeekDay))?this.selectedWeekDay:i.find(n=>E(n))??i[0];return d`
755
- ${this.renderWeekDayStrip(i,s)}
756
- ${K(s,t)}
827
+ `}renderActiveView(){let e={events:this.events,dayStartHour:this.dayStartHour,dayEndHour:this.dayEndHour,slotDuration:this.slotDuration,locale:this.resolvedLocale,slotHeight:j,eventAppearance:this.eventAppearance,onSlotClick:this.handleSlotClick,onEventClick:this.handleEventClick,draggingEventId:this.draggingEventId,onEventDragStart:this.handleEventDragStart};switch(this.view){case"day":return q(this.displayedDate,e);case"week":return this.renderWeekOrWorkWeek(!1,e);case"work-week":return this.renderWeekOrWorkWeek(!0,e);case"month":return De({displayedMonth:this.displayedDate,events:this.events,weekStartsOn:this.weekStartsOn,focusedDate:this.focusedDate,locale:this.resolvedLocale,desktop:!this.isMobile,maxEventsPerCell:this.monthMaxEventsPerCell,moreLabel:t=>(this.moreEventsLabel??this.dictionary.calendar.moreEvents).replace("{count}",String(t)),onDayClick:this.goToDayView,onEventClick:this.handleEventClick,onDayKeydown:this.handleMonthDayKeydown});case"year":return ke({displayedYear:this.displayedDate,events:this.events,weekStartsOn:this.weekStartsOn,locale:this.resolvedLocale,onDayClick:this.goToDayView,onMonthLabelClick:t=>{this.view="month",this.displayedDate=t}});default:return d``}}renderWeekOrWorkWeek(e,t){if(!this.isMobile)return we(this.displayedDate,this.weekStartsOn,e,t);let r=R(this.displayedDate,this.weekStartsOn),i=Array.from({length:7},(n,p)=>k(r,p)).filter(n=>!e||!V(n)),a=this.selectedWeekDay&&i.some(n=>$(n,this.selectedWeekDay))?this.selectedWeekDay:i.find(n=>E(n))??i[0];return d`
828
+ ${this.renderWeekDayStrip(i,a)}
829
+ ${q(a,{...t,hideDayHeader:!0})}
757
830
  `}renderWeekDayStrip(e,t){return d`
758
831
  <div class="week-day-strip" role="tablist">
759
- ${e.map(r=>{let i=T(r,t);return d`
832
+ ${e.map(r=>{let i=$(r,t);return d`
760
833
  <button
761
834
  type="button"
762
835
  class=${f({"week-day-strip-day":!0,selected:i,today:E(r)})}
@@ -765,10 +838,10 @@ import{a as he}from"./chunks/chunk-IJJ67C66.js";import{a as ue}from"./chunks/chu
765
838
  @click=${()=>{this.selectedWeekDay=r}}
766
839
  >
767
840
  <span class="week-day-strip-weekday">
768
- ${r.toLocaleDateString(this.locale,{weekday:"short"})}
841
+ ${r.toLocaleDateString(this.resolvedLocale,{weekday:"short"})}
769
842
  </span>
770
843
  <span class="week-day-strip-daynum">${r.getDate()}</span>
771
844
  </button>
772
845
  `})}
773
846
  </div>
774
- `}};c.styles=[ve,me,ge,ye],h([g({attribute:!1})],c.prototype,"events",2),h([g({reflect:!0,useDefault:!0})],c.prototype,"view",2),h([g({attribute:!1})],c.prototype,"displayedDate",2),h([g({type:Number,attribute:"week-starts-on"})],c.prototype,"weekStartsOn",2),h([g({type:Number,attribute:"day-start-hour"})],c.prototype,"dayStartHour",2),h([g({type:Number,attribute:"day-end-hour"})],c.prototype,"dayEndHour",2),h([g({type:Number,attribute:"slot-duration"})],c.prototype,"slotDuration",2),h([g()],c.prototype,"locale",2),h([g({type:Boolean,reflect:!0})],c.prototype,"readonly",2),h([g({type:Boolean,reflect:!0,attribute:"no-animation"})],c.prototype,"noAnimation",2),h([g({type:Boolean,reflect:!0,attribute:"hide-now-line"})],c.prototype,"hideNowLine",2),h([g({attribute:"more-events-label"})],c.prototype,"moreEventsLabel",2),h([g({attribute:"event-appearance"})],c.prototype,"eventAppearance",2),h([H()],c.prototype,"focusedDate",2),h([H()],c.prototype,"selectedWeekDay",2),h([H()],c.prototype,"swipeDirection",2),h([H()],c.prototype,"isMobile",2),h([H()],c.prototype,"draggingEventId",2),h([U("#drag-ghost-layer")],c.prototype,"dragGhostLayerEl",2),h([H()],c.prototype,"monthMaxEventsPerCell",2),c=h([Q(Ge)],c);export{c as EunomiaCalendar,Ge as EunomiaCalendarTagName};
847
+ `}};u.styles=[me,ge,ye,fe],h([g({attribute:!1})],u.prototype,"events",2),h([g({reflect:!0,useDefault:!0})],u.prototype,"view",2),h([g({attribute:!1})],u.prototype,"displayedDate",2),h([g({type:Number,attribute:"week-starts-on"})],u.prototype,"weekStartsOn",2),h([g({type:Number,attribute:"day-start-hour"})],u.prototype,"dayStartHour",2),h([g({type:Number,attribute:"day-end-hour"})],u.prototype,"dayEndHour",2),h([g({type:Number,attribute:"slot-duration"})],u.prototype,"slotDuration",2),h([g()],u.prototype,"locale",2),h([g({type:Boolean,reflect:!0})],u.prototype,"readonly",2),h([g({type:Boolean,reflect:!0,attribute:"no-animation"})],u.prototype,"noAnimation",2),h([g({type:Boolean,reflect:!0,attribute:"hide-now-line"})],u.prototype,"hideNowLine",2),h([g({attribute:"more-events-label"})],u.prototype,"moreEventsLabel",2),h([g({attribute:"event-appearance"})],u.prototype,"eventAppearance",2),h([T()],u.prototype,"focusedDate",2),h([T()],u.prototype,"selectedWeekDay",2),h([T()],u.prototype,"swipeDirection",2),h([T()],u.prototype,"isMobile",2),h([T()],u.prototype,"draggingEventId",2),h([J("#drag-ghost-layer")],u.prototype,"dragGhostLayerEl",2),h([T()],u.prototype,"monthMaxEventsPerCell",2),u=h([U(Ve)],u);export{u as EunomiaCalendar,Ve as EunomiaCalendarTagName};
@@ -1,4 +1,4 @@
1
- import{a as f,b as h}from"./chunks/chunk-3UW2LJ7T.js";import{a as p}from"./chunks/chunk-3MTUVMM5.js";import{b as v}from"./chunks/chunk-5GKM5DIB.js";import{a as u}from"./chunks/chunk-PPCHQG7P.js";import"./chunks/chunk-JGV7LHEI.js";import"./chunks/chunk-GNAUNTS5.js";import{a as o,b as d,c as n,f as s,h as i,j as c,p as t,u as l}from"./chunks/chunk-YITWLCD3.js";var m=i`
1
+ import{a as f,b as h}from"./chunks/chunk-XZ3LFOQP.js";import{a as p}from"./chunks/chunk-3MTUVMM5.js";import{b as v}from"./chunks/chunk-5GKM5DIB.js";import{a as u}from"./chunks/chunk-PPCHQG7P.js";import"./chunks/chunk-WP6ZYBAC.js";import"./chunks/chunk-2XPIGFBD.js";import{a as o,b as d,c as n,f as s,h as i,j as c,p as t,u as l}from"./chunks/chunk-YITWLCD3.js";var m=i`
2
2
  :host {
3
3
  display: block;
4
4
  position: relative;