@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
@@ -0,0 +1,182 @@
1
+ :where(
2
+ :is(
3
+ eun-calendar,
4
+ eun-scheduler,
5
+ eun-scheduler-event,
6
+ eun-scheduler-event-editor
7
+ ):not(:defined)
8
+ ) {
9
+ display: block;
10
+ }
11
+
12
+ :is(eun-calendar, eun-scheduler):not(:defined) {
13
+ --_bodyHeight: var(--scheduler-body-max-height, 640px);
14
+ --_viewHeight: var(--_bodyHeight);
15
+ --_headerHeight: 0px;
16
+ --_frameHeight: 0px;
17
+ box-sizing: border-box;
18
+ container-type: inline-size;
19
+ font-family: var(--eun-font-family, "Mulish", sans-serif);
20
+ }
21
+
22
+ :is(eun-calendar, eun-scheduler):not(:defined) > * {
23
+ display: none;
24
+ }
25
+
26
+ :is(eun-calendar, eun-scheduler):not(:defined)::before {
27
+ content: "";
28
+ display: block;
29
+ height: calc(var(--_headerHeight) + var(--_viewHeight));
30
+ }
31
+
32
+ :is(eun-calendar, eun-scheduler)[view="month"]:not(:defined) {
33
+ --_viewHeight: min(653px, var(--scheduler-body-max-height, 653px));
34
+ }
35
+
36
+ eun-calendar:is([day-start-hour], [day-end-hour]):not(:defined)::before {
37
+ content: none;
38
+ }
39
+
40
+ eun-scheduler:not(:defined) {
41
+ --_headerHeight: 103px;
42
+ border: 1px solid
43
+ var(--scheduler-border-color, var(--eun-border-color, #dee0e7));
44
+ border-radius: var(--eun-border-radius-m, 10px);
45
+ background: var(--scheduler-background, var(--eun-surface-color, #ffffff));
46
+ }
47
+
48
+ @media (width >= 768px) {
49
+ eun-scheduler[readonly]:not(:defined) {
50
+ --_headerHeight: 101px;
51
+ }
52
+ }
53
+
54
+ @container (width >= 768px) {
55
+ :is(eun-calendar, eun-scheduler)[view="year"]:not(:defined)::before {
56
+ height: calc(var(--_headerHeight) + var(--_bodyHeight) + 32px);
57
+ }
58
+ }
59
+
60
+ @media (width < 768px) {
61
+ eun-scheduler:not(:defined) {
62
+ --_headerHeight: 84px;
63
+ }
64
+
65
+ :is(eun-calendar, eun-scheduler):is(
66
+ :not([view]),
67
+ [view="week"],
68
+ [view="work-week"]
69
+ ):not(:defined) {
70
+ --_viewHeight: calc(var(--_bodyHeight) + 54px);
71
+ }
72
+ }
73
+
74
+ eun-scheduler-event:not(:defined) {
75
+ --_accent: var(--eun-color-blue-600, #0aa5a8);
76
+ --_tintBase: var(--eun-color-blue-500, #3bb3b9);
77
+ box-sizing: border-box;
78
+ padding: var(
79
+ --scheduler-event-padding,
80
+ var(--scheduler-event-padding-block, var(--eun-space-xs, 4px))
81
+ var(--scheduler-event-padding-inline, var(--eun-space-xs, 4px))
82
+ );
83
+ padding-inline-start: calc(
84
+ var(--scheduler-event-padding-inline, var(--eun-space-xs, 4px)) +
85
+ var(--scheduler-event-bar-width, 3px) +
86
+ var(--scheduler-event-gap, var(--eun-space-xs, 4px))
87
+ );
88
+ overflow: hidden;
89
+ border-radius: var(--scheduler-event-radius, var(--eun-border-radius-s, 5px));
90
+ background:
91
+ linear-gradient(var(--_accent), var(--_accent))
92
+ var(--scheduler-event-padding-inline, var(--eun-space-xs, 4px)) center /
93
+ var(--scheduler-event-bar-width, 3px)
94
+ calc(100% - 2 * var(--eun-space-xs, 4px)) no-repeat,
95
+ color-mix(
96
+ in srgb,
97
+ var(--_tintBase) var(--scheduler-event-opaque-tint, 16%),
98
+ var(--eun-surface-color, #ffffff)
99
+ );
100
+ font-family: var(--eun-font-family, "Mulish", sans-serif);
101
+ line-height: 1.3;
102
+ white-space: nowrap;
103
+ }
104
+
105
+ eun-scheduler-event[color="red"]:not(:defined) {
106
+ --_accent: var(--eun-color-red-600, #ed1b2f);
107
+ --_tintBase: var(--eun-color-red-500, #f14959);
108
+ }
109
+ eun-scheduler-event[color="purple"]:not(:defined) {
110
+ --_accent: var(--eun-color-purple-600, #991bed);
111
+ --_tintBase: var(--eun-color-purple-500, #9562e3);
112
+ }
113
+ eun-scheduler-event[color="yellow"]:not(:defined) {
114
+ --_accent: var(--eun-color-yellow-600, #e0e000);
115
+ --_tintBase: var(--eun-color-yellow-500, #f0f050);
116
+ }
117
+ eun-scheduler-event[color="green"]:not(:defined) {
118
+ --_accent: var(--eun-color-green-600, #1bed22);
119
+ --_tintBase: var(--eun-color-green-500, #49f15f);
120
+ }
121
+ eun-scheduler-event[color="pink"]:not(:defined) {
122
+ --_accent: var(--eun-color-pink-600, #c300ff);
123
+ --_tintBase: var(--eun-color-pink-500, #d05df3);
124
+ }
125
+
126
+ eun-scheduler-event[appearance="transparent"]:not(:defined) {
127
+ background-color: color-mix(
128
+ in srgb,
129
+ var(--_tintBase) var(--scheduler-event-transparent-tint, 22%),
130
+ transparent
131
+ );
132
+ }
133
+ eun-scheduler-event[appearance="ghost"]:not(:defined) {
134
+ background-color: transparent;
135
+ }
136
+
137
+ eun-scheduler-event:not(:defined)::before {
138
+ content: attr(label) "\200b";
139
+ display: block;
140
+ overflow: hidden;
141
+ text-overflow: ellipsis;
142
+ color: var(--scheduler-event-title-color, var(--eun-text-color, #071621));
143
+ font-size: 12px;
144
+ font-weight: var(--eun-font-weight-m, 600);
145
+ }
146
+
147
+ eun-scheduler-event:not([hide-time]):not([direction="row"]):not(
148
+ :defined
149
+ )::after {
150
+ content: "\200b";
151
+ display: block;
152
+ font-size: 11px;
153
+ }
154
+
155
+ /*
156
+ * The editor's ten field labels, as many lines of text so they follow the
157
+ * font, and its row of color swatches, standing on the text baseline as
158
+ * they do. Then its fixed part : the field boxes, the gaps between fields,
159
+ * the two 6rem text areas and, unless hidden, the action buttons.
160
+ */
161
+ eun-scheduler-event-editor:not(:defined) {
162
+ font-family: var(--eun-font-family, "Mulish", sans-serif);
163
+ font-size: var(--field-label-font-size, var(--eun-font-size-s, 14px));
164
+ }
165
+
166
+ eun-scheduler-event-editor:not(:defined)::before {
167
+ content: "\200b\A\200b\A\200b\A\200b\A\200b\A\200b\A\200b\A\200b\A\200b\A\200b";
168
+ display: block;
169
+ padding-block-end: calc(12rem + 417px);
170
+ white-space: pre;
171
+ line-height: normal;
172
+ }
173
+
174
+ eun-scheduler-event-editor:not([hide-actions]):not(:defined)::before {
175
+ padding-block-end: calc(12rem + 483px);
176
+ }
177
+
178
+ eun-scheduler-event-editor:not(:defined)::after {
179
+ content: "";
180
+ display: inline-block;
181
+ height: 20px;
182
+ }
@@ -0,0 +1,136 @@
1
+ :where(eun-stepper:not(:defined)) {
2
+ display: block;
3
+ width: 100%;
4
+ }
5
+
6
+ eun-stepper:not(:defined) {
7
+ min-height: var(--stepper-indicator-size, 24px);
8
+ font-family: var(--eun-font-family, "Mulish", sans-serif);
9
+ }
10
+
11
+ eun-stepper[steps*='"description"']:not([variant="progress"]):not(
12
+ :defined
13
+ )::before {
14
+ content: "\200b\A\200b";
15
+ display: block;
16
+ padding-block-end: 2px;
17
+ white-space: pre;
18
+ font-size: var(
19
+ --stepper-description-font-size,
20
+ var(--eun-font-size-xs, 12px)
21
+ );
22
+ }
23
+
24
+ eun-stepper[steps*='"description"']:not([variant="progress"]):not(
25
+ :defined
26
+ )::first-line {
27
+ font-size: var(--stepper-label-font-size, var(--eun-font-size-s, 14px));
28
+ }
29
+
30
+ eun-stepper[variant="progress"]:not(:defined) {
31
+ display: flex;
32
+ flex-direction: column;
33
+ gap: var(--progress-bar-corner-gap, var(--eun-space-xs, 4px));
34
+ min-height: 0;
35
+ }
36
+
37
+ eun-stepper[variant="progress"]:not(:defined)::before {
38
+ content: "\200b";
39
+ font-size: var(
40
+ --progress-bar-corner-font-size,
41
+ var(--eun-font-size-xs, 12px)
42
+ );
43
+ }
44
+
45
+ eun-stepper[variant="progress"]:not(:defined)::after {
46
+ content: "";
47
+ height: var(--progress-bar-track-height, 8px);
48
+ border-radius: var(
49
+ --progress-bar-border-radius,
50
+ var(--eun-border-radius-full, 999px)
51
+ );
52
+ background: var(
53
+ --progress-bar-track-color,
54
+ var(--eun-surface-sunken-strong, #ecedf0)
55
+ );
56
+ }
57
+
58
+ eun-stepper[variant="progress"]:not(:defined) > eun-step {
59
+ display: none;
60
+ }
61
+
62
+ eun-stepper:not([variant="progress"]):not(:defined):has(> eun-step) {
63
+ display: flex;
64
+ align-items: flex-start;
65
+ gap: var(--stepper-gap, 0);
66
+ counter-reset: eun-step;
67
+ }
68
+
69
+ eun-stepper[orientation="vertical"]:not([variant="progress"]):not(:defined):has(
70
+ > eun-step
71
+ ) {
72
+ flex-direction: column;
73
+ gap: var(--stepper-gap, var(--eun-space-l, 32px));
74
+ }
75
+
76
+ eun-stepper:not(:defined) > eun-step:not(:defined) {
77
+ --_indicatorSize: var(--stepper-indicator-size, 24px);
78
+ position: relative;
79
+ display: flex;
80
+ flex-direction: column;
81
+ justify-content: center;
82
+ gap: 2px;
83
+ box-sizing: border-box;
84
+ min-height: var(--_indicatorSize);
85
+ padding-inline-start: calc(var(--_indicatorSize) + var(--eun-space-s, 8px));
86
+ counter-increment: eun-step;
87
+ color: var(--stepper-label-color, var(--eun-text-color, #071621));
88
+ font-size: var(--stepper-label-font-size, var(--eun-font-size-s, 14px));
89
+ font-weight: var(--stepper-label-font-weight, var(--eun-font-weight-m, 500));
90
+ }
91
+
92
+ eun-stepper:not(:defined) > eun-step:not(:defined)::before {
93
+ content: counter(eun-step);
94
+ position: absolute;
95
+ inset-block-start: 0;
96
+ inset-inline-start: 0;
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ width: var(--_indicatorSize);
101
+ height: var(--_indicatorSize);
102
+ border-radius: var(
103
+ --stepper-indicator-border-radius,
104
+ var(--eun-border-radius-xl, 999px)
105
+ );
106
+ background: var(
107
+ --stepper-indicator-background,
108
+ var(--eun-content-hover, #edeff0)
109
+ );
110
+ color: var(--stepper-indicator-color, var(--eun-text-secondary, #666e8a));
111
+ font-size: var(--stepper-indicator-font-size, var(--eun-font-size-xs, 12px));
112
+ font-weight: var(
113
+ --stepper-indicator-font-weight,
114
+ var(--eun-font-weight-m, 500)
115
+ );
116
+ }
117
+
118
+ eun-stepper:not(:defined) > eun-step:not(:defined):has(> [slot="description"]) {
119
+ justify-content: flex-start;
120
+ }
121
+
122
+ eun-stepper:not(:defined) > eun-step:not(:defined) > [slot="description"] {
123
+ order: 1;
124
+ color: var(--stepper-description-color, var(--eun-text-secondary, #666e8a));
125
+ font-size: var(
126
+ --stepper-description-font-size,
127
+ var(--eun-font-size-xs, 12px)
128
+ );
129
+ font-weight: normal;
130
+ }
131
+
132
+ eun-stepper:not([orientation="vertical"]):not(:defined)
133
+ > eun-step:not(:defined) {
134
+ flex: 1 1 auto;
135
+ min-width: 0;
136
+ }
@@ -286,7 +286,7 @@ eun-table {
286
286
  );
287
287
  text-align: center;
288
288
  font-size: var(--eun-font-size-s, 13px);
289
- color: var(--table-empty-color, var(--eun-text-secondary, #484e61));
289
+ color: var(--table-empty-color, var(--eun-text-secondary, #666e8a));
290
290
  }
291
291
 
292
292
  eun-table:not(:defined):is([loading], :has(> table > tbody > tr))
@@ -354,7 +354,10 @@ eun-table {
354
354
  var(--eun-surface-color, #ffffff)
355
355
  );
356
356
  font-weight: var(--table-column-font-weight, var(--eun-font-weight-m, 500));
357
- color: var(--table-column-color, var(--eun-text-secondary, #484e61));
357
+ color: var(
358
+ --table-header-color,
359
+ var(--table-column-color, var(--eun-text-secondary, #666e8a))
360
+ );
358
361
  white-space: nowrap;
359
362
  }
360
363
 
@@ -477,7 +480,7 @@ eun-table {
477
480
  text-align: center;
478
481
  white-space: nowrap;
479
482
  font-variant-numeric: tabular-nums;
480
- color: var(--table-row-number-color, var(--eun-text-secondary, #484e61));
483
+ color: var(--table-row-number-color, var(--eun-text-secondary, #666e8a));
481
484
  background-color: var(
482
485
  --table-sticky-column-background,
483
486
  var(--table-row-background, var(--eun-surface-color, #ffffff))
@@ -584,7 +587,7 @@ eun-table {
584
587
  --_table-action-opacity: 0 !important;
585
588
  }
586
589
 
587
- @media (hover: none) {
590
+ @media (hover: none), (width < 1024px) {
588
591
  eun-table > table > tbody > tr > [data-table-select] eun-checkbox {
589
592
  opacity: 1;
590
593
  }
@@ -7,7 +7,7 @@ eun-tag:not(:defined) {
7
7
  --_fg-outline: var(--_accent);
8
8
  --_bd-outline: var(--_solid);
9
9
  --_bg-flat: var(--eun-content-hover, #edeff0);
10
- --_fg-flat: var(--eun-text-secondary, #484e61);
10
+ --_fg-flat: var(--eun-text-secondary, #666e8a);
11
11
  --_solid: var(--eun-color-grey-700, #484e61);
12
12
  --_onSolid: var(--eun-color-grey-0, #ffffff);
13
13
  --_tint: color-mix(
@@ -1,7 +1,8 @@
1
1
  eun-toolbar:not(:defined) > :not([slot]),
2
2
  eun-toolbar:not(:defined) > [slot="skip-links"],
3
3
  eun-toolbar:not(:defined) > [slot="menu-icon"],
4
- eun-toolbar:not(:defined) > [slot="close-icon"] {
4
+ eun-toolbar:not(:defined) > [slot="close-icon"],
5
+ eun-toolbar:not(:defined) > [slot="burger-icon"] {
5
6
  display: none;
6
7
  }
7
8
 
@@ -25,6 +26,8 @@ eun-toolbar:not(:defined) {
25
26
  border-block-end: var(--eun-border-width-s, 1px) solid
26
27
  var(--toolbar-border-color, var(--eun-border-color, #dee0e7));
27
28
  box-shadow: var(--toolbar-shadow, none);
29
+ backdrop-filter: blur(var(--toolbar-backdrop-blur));
30
+ -webkit-backdrop-filter: blur(var(--toolbar-backdrop-blur));
28
31
  }
29
32
  :where(eun-toolbar:not(:defined)) {
30
33
  display: flex;
@@ -46,9 +49,8 @@ eun-toolbar[theme="dark"]:not(:defined) {
46
49
  );
47
50
  }
48
51
 
49
- /* A page loads scrolled to the top, where the upgraded bar is transparent. */
50
52
  eun-toolbar[transparent-at-top]:not(:defined) {
51
- background: transparent;
53
+ background: var(--toolbar-background-at-top, transparent);
52
54
  border-color: transparent;
53
55
  box-shadow: none;
54
56
  }
@@ -90,7 +92,7 @@ eun-toolbar:not(:defined):where(:not(:has(> [slot="center"])))
90
92
  }
91
93
 
92
94
  eun-toolbar:not(:defined):where(
93
- :has(> [slot="start"]):has(> [slot="end"]):not(
95
+ :not([layout="between"]):has(> [slot="start"]):has(> [slot="end"]):not(
94
96
  :has(> :nth-child(2 of [slot="start"]), > :nth-child(2 of [slot="end"]))
95
97
  )
96
98
  )
@@ -99,7 +101,7 @@ eun-toolbar:not(:defined):where(
99
101
  }
100
102
 
101
103
  eun-toolbar:not(:defined):where(
102
- :has(> [slot="start"]):has(> [slot="end"]):not(
104
+ :not([layout="between"]):has(> [slot="start"]):has(> [slot="end"]):not(
103
105
  :has(> :nth-child(2 of [slot="start"]), > :nth-child(2 of [slot="end"]))
104
106
  )
105
107
  )
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Reads a length custom property off an element, in pixels. The computed
3
+ * value of an unregistered custom property is the raw text it was set to,
4
+ * so a token such as `var(--eun-space-l)` reads back as `2rem`, and parsing
5
+ * it as a number would give `2` instead of `32`. Anything other than a plain
6
+ * number or pixel value is resolved by the browser on a hidden probe, so
7
+ * `rem`, `em`, viewport units and `calc()` all come back in pixels. The
8
+ * probe is appended and removed synchronously, never left in the DOM.
9
+ *
10
+ * @param element the element the custom property is read from.
11
+ * @param name the custom property's name, such as `--carousel-nav-icon-size`.
12
+ * @returns the length in pixels, or `NaN` when unset or not a length.
13
+ */
14
+ export declare function readCssLength(element: Element, name: string): number;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Reads a length custom property off an element, in pixels. The computed
3
+ * value of an unregistered custom property is the raw text it was set to,
4
+ * so a token such as `var(--eun-space-l)` reads back as `2rem`, and parsing
5
+ * it as a number would give `2` instead of `32`. Anything other than a plain
6
+ * number or pixel value is resolved by the browser on a hidden probe, so
7
+ * `rem`, `em`, viewport units and `calc()` all come back in pixels. The
8
+ * probe is appended and removed synchronously, never left in the DOM.
9
+ *
10
+ * @param element the element the custom property is read from.
11
+ * @param name the custom property's name, such as `--carousel-nav-icon-size`.
12
+ * @returns the length in pixels, or `NaN` when unset or not a length.
13
+ */
14
+ export function readCssLength(element, name) {
15
+ const raw = getComputedStyle(element).getPropertyValue(name).trim();
16
+ if (!raw) {
17
+ return Number.NaN;
18
+ }
19
+ if (/^-?(\d+\.?\d*|\.\d+)(px)?$/.test(raw)) {
20
+ return Number.parseFloat(raw);
21
+ }
22
+ const probe = document.createElement("div");
23
+ probe.style.display = "none";
24
+ probe.style.setProperty("scroll-margin-top", raw);
25
+ if (!probe.style.getPropertyValue("scroll-margin-top")) {
26
+ return Number.NaN;
27
+ }
28
+ (element.shadowRoot ?? element).append(probe);
29
+ const px = Number.parseFloat(getComputedStyle(probe).scrollMarginTop);
30
+ probe.remove();
31
+ return px;
32
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Buttons that can submit a form, in the order the browser looks for the
3
+ * form's default button. `eun-button` and `eun-fab` aren't form-associated,
4
+ * so they're found in the form's own subtree rather than in `form.elements`.
5
+ */
6
+ export declare const SUBMIT_BUTTONS: string;
7
+ /**
8
+ * Runs `report` with `target` marked as reporting its validity, so the
9
+ * `invalid` events it fires are told apart from a silent check.
10
+ *
11
+ * @param target - The form or field reporting its validity.
12
+ * @param report - The call firing the `invalid` events.
13
+ * @returns What `report` returns.
14
+ */
15
+ export declare function reportingValidity<T>(target: Element, report: () => T): T;
16
+ /**
17
+ * Whether `target` is reporting its validity to the user right now.
18
+ *
19
+ * @param target - The form or field to check.
20
+ * @returns true during a submit attempt or a `reportValidity()` call.
21
+ */
22
+ export declare function isReportingValidity(target: Element): boolean;
23
+ /**
24
+ * Watches the clicks on every submit button of the document, native or
25
+ * not, so their form's validation counts as a submit attempt. Installed
26
+ * once, by the first form field to connect.
27
+ */
28
+ export declare function watchSubmissions(): void;
29
+ /**
30
+ * Focuses the first invalid field of `form` in document order, once all
31
+ * the `invalid` events of the current validation have fired, as the
32
+ * browser does for a form of native controls only.
33
+ *
34
+ * @param form - The form whose submission failed.
35
+ */
36
+ export declare function focusFirstInvalid(form: HTMLFormElement): void;
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Buttons that can submit a form, in the order the browser looks for the
3
+ * form's default button. `eun-button` and `eun-fab` aren't form-associated,
4
+ * so they're found in the form's own subtree rather than in `form.elements`.
5
+ */
6
+ export const SUBMIT_BUTTONS = [
7
+ "button:not([type])",
8
+ 'button[type="submit"]',
9
+ 'input[type="submit"]',
10
+ 'input[type="image"]',
11
+ 'eun-button[type="submit"]',
12
+ 'eun-fab[type="submit"]',
13
+ ].join(", ");
14
+ /**
15
+ * Forms and fields whose validity is being reported to the user right now:
16
+ * on a submit attempt or a field's own `reportValidity()`, as opposed to a
17
+ * silent `checkValidity()`, which fires the same `invalid` events.
18
+ */
19
+ const reporting = new WeakSet();
20
+ /**
21
+ * Forms whose first invalid field is already about to receive focus.
22
+ */
23
+ const pendingFocus = new WeakSet();
24
+ /**
25
+ * Whether the submit button listener is installed.
26
+ */
27
+ let watchingSubmissions = false;
28
+ /**
29
+ * Runs `report` with `target` marked as reporting its validity, so the
30
+ * `invalid` events it fires are told apart from a silent check.
31
+ *
32
+ * @param target - The form or field reporting its validity.
33
+ * @param report - The call firing the `invalid` events.
34
+ * @returns What `report` returns.
35
+ */
36
+ export function reportingValidity(target, report) {
37
+ reporting.add(target);
38
+ try {
39
+ return report();
40
+ }
41
+ finally {
42
+ reporting.delete(target);
43
+ }
44
+ }
45
+ /**
46
+ * Whether `target` is reporting its validity to the user right now.
47
+ *
48
+ * @param target - The form or field to check.
49
+ * @returns true during a submit attempt or a `reportValidity()` call.
50
+ */
51
+ export function isReportingValidity(target) {
52
+ return reporting.has(target);
53
+ }
54
+ /**
55
+ * The form a submit button submits: its `form` attribute's target, or its
56
+ * closest ancestor form.
57
+ *
58
+ * @param button - The submit button.
59
+ * @returns The form, or `null` when the button belongs to none.
60
+ */
61
+ function formOf(button) {
62
+ const id = button.getAttribute("form");
63
+ const form = id
64
+ ? button.getRootNode().getElementById?.(id)
65
+ : button.closest("form");
66
+ return form instanceof HTMLFormElement ? form : null;
67
+ }
68
+ /**
69
+ * Marks the form of a clicked submit button as reporting its validity until
70
+ * the click's default action, which runs the browser's validation, is over.
71
+ *
72
+ * @param event - The click event.
73
+ */
74
+ function markSubmission(event) {
75
+ const button = event.target?.closest?.(SUBMIT_BUTTONS);
76
+ const form = button && formOf(button);
77
+ if (!form) {
78
+ return;
79
+ }
80
+ reporting.add(form);
81
+ setTimeout(() => reporting.delete(form));
82
+ }
83
+ /**
84
+ * Watches the clicks on every submit button of the document, native or
85
+ * not, so their form's validation counts as a submit attempt. Installed
86
+ * once, by the first form field to connect.
87
+ */
88
+ export function watchSubmissions() {
89
+ if (watchingSubmissions || typeof document === "undefined") {
90
+ return;
91
+ }
92
+ watchingSubmissions = true;
93
+ document.addEventListener("click", markSubmission, true);
94
+ }
95
+ /**
96
+ * Focuses the first invalid field of `form` in document order, once all
97
+ * the `invalid` events of the current validation have fired, as the
98
+ * browser does for a form of native controls only.
99
+ *
100
+ * @param form - The form whose submission failed.
101
+ */
102
+ export function focusFirstInvalid(form) {
103
+ if (pendingFocus.has(form)) {
104
+ return;
105
+ }
106
+ pendingFocus.add(form);
107
+ setTimeout(() => {
108
+ pendingFocus.delete(form);
109
+ const first = Array.from(form.elements).find((element) => element.willValidate &&
110
+ !element.validity.valid);
111
+ first?.focus();
112
+ });
113
+ }
@@ -1,16 +1,4 @@
1
- /**
2
- * Buttons that can submit a form, in the order the browser looks for the
3
- * form's default button. `eun-button` and `eun-fab` aren't form-associated,
4
- * so they're found in the form's own subtree rather than in `form.elements`.
5
- */
6
- const SUBMIT_BUTTONS = [
7
- "button:not([type])",
8
- 'button[type="submit"]',
9
- 'input[type="submit"]',
10
- 'input[type="image"]',
11
- 'eun-button[type="submit"]',
12
- 'eun-fab[type="submit"]',
13
- ].join(", ");
1
+ import { reportingValidity, SUBMIT_BUTTONS } from "./form-validation.utils.js";
14
2
  /**
15
3
  * Native input types that block implicit submission, per the HTML spec.
16
4
  */
@@ -74,6 +62,6 @@ export function submitImplicitly(form) {
74
62
  BLOCKING_INPUT_TYPES.has(element.type)) ||
75
63
  element.matches(BLOCKING_FIELDS));
76
64
  if (blockingFields.length <= 1) {
77
- form.requestSubmit();
65
+ reportingValidity(form, () => form.requestSubmit());
78
66
  }
79
67
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Whether `event` comes from interactive content slotted into `host`, such
3
+ * as a link in a checkbox's label. Like a native `<label>`, the control
4
+ * then leaves the event to that content instead of toggling.
5
+ *
6
+ * @param event - The click or keydown event.
7
+ * @param host - The control receiving the event.
8
+ * @returns true when interactive content inside `host` was hit first.
9
+ */
10
+ export declare function isFromInteractiveContent(event: Event, host: Element): boolean;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Interactive content a click or a key press reaches before the control
3
+ * wrapping it, per the HTML spec, plus the library's own links and buttons.
4
+ */
5
+ const INTERACTIVE_CONTENT = [
6
+ "a[href]",
7
+ "area[href]",
8
+ "button",
9
+ "details",
10
+ "summary",
11
+ "input:not([type='hidden'])",
12
+ "select",
13
+ "textarea",
14
+ "iframe",
15
+ "embed",
16
+ "audio[controls]",
17
+ "video[controls]",
18
+ "[contenteditable]:not([contenteditable='false'])",
19
+ "eun-link",
20
+ "eun-button",
21
+ ].join(", ");
22
+ /**
23
+ * Whether `event` comes from interactive content slotted into `host`, such
24
+ * as a link in a checkbox's label. Like a native `<label>`, the control
25
+ * then leaves the event to that content instead of toggling.
26
+ *
27
+ * @param event - The click or keydown event.
28
+ * @param host - The control receiving the event.
29
+ * @returns true when interactive content inside `host` was hit first.
30
+ */
31
+ export function isFromInteractiveContent(event, host) {
32
+ for (const target of event.composedPath()) {
33
+ if (target === host) {
34
+ return false;
35
+ }
36
+ if (target instanceof Element &&
37
+ host.contains(target) &&
38
+ target.matches(INTERACTIVE_CONTENT)) {
39
+ return true;
40
+ }
41
+ }
42
+ return false;
43
+ }