@mhmo91/schmancy 0.10.41 → 0.10.43

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 (764) hide show
  1. package/custom-elements.json +291 -179
  2. package/dist/SchmancyElement-CeKrBW2j.cjs +2 -0
  3. package/dist/SchmancyElement-CeKrBW2j.cjs.map +1 -0
  4. package/dist/SchmancyElement-Ob9yGkiG.js +286 -0
  5. package/dist/SchmancyElement-Ob9yGkiG.js.map +1 -0
  6. package/dist/agent/schmancy.agent.js +4057 -4082
  7. package/dist/agent/schmancy.agent.js.map +1 -1
  8. package/dist/agent/schmancy.manifest.json +225 -94
  9. package/dist/animation-CCOIW4wJ.cjs.map +1 -1
  10. package/dist/animation-DCznELuT.js.map +1 -1
  11. package/dist/area-CbajcnmJ.cjs +21 -0
  12. package/dist/area-CbajcnmJ.cjs.map +1 -0
  13. package/dist/{area-BiM7V2ns.js → area-MxLAyWgV.js} +22 -22
  14. package/dist/area-MxLAyWgV.js.map +1 -0
  15. package/dist/area.cjs +1 -1
  16. package/dist/area.js +1 -1
  17. package/dist/{audio-CxO_j__6.js → audio-B_0PGwYC.js} +1 -1
  18. package/dist/audio-B_0PGwYC.js.map +1 -0
  19. package/dist/{audio-xXFfMPCS.cjs → audio-CpwrIaw-.cjs} +1 -1
  20. package/dist/audio-CpwrIaw-.cjs.map +1 -0
  21. package/dist/audio.cjs +1 -1
  22. package/dist/audio.js +2 -2
  23. package/dist/autocomplete-CILzaDB7.cjs +115 -0
  24. package/dist/autocomplete-CILzaDB7.cjs.map +1 -0
  25. package/dist/{autocomplete-DUBY9RtH.js → autocomplete-DV9RxCun.js} +113 -113
  26. package/dist/autocomplete-DV9RxCun.js.map +1 -0
  27. package/dist/autocomplete.cjs +1 -1
  28. package/dist/autocomplete.js +1 -1
  29. package/dist/avatar.cjs +1 -1
  30. package/dist/avatar.cjs.map +1 -1
  31. package/dist/avatar.js +4 -4
  32. package/dist/avatar.js.map +1 -1
  33. package/dist/badge.cjs +1 -1
  34. package/dist/badge.js +1 -1
  35. package/dist/{boat-ScvAima3.js → boat-DoZGgQ0P.js} +6 -8
  36. package/dist/{boat-ScvAima3.js.map → boat-DoZGgQ0P.js.map} +1 -1
  37. package/dist/{boat-BIYaPAHp.cjs → boat-sg0cWO8a.cjs} +3 -5
  38. package/dist/{boat-BIYaPAHp.cjs.map → boat-sg0cWO8a.cjs.map} +1 -1
  39. package/dist/boat.cjs +1 -1
  40. package/dist/boat.js +1 -1
  41. package/dist/breadcrumb.cjs +32 -31
  42. package/dist/breadcrumb.cjs.map +1 -1
  43. package/dist/breadcrumb.js +33 -32
  44. package/dist/breadcrumb.js.map +1 -1
  45. package/dist/busy-Brs-TDh9.cjs +133 -0
  46. package/dist/busy-Brs-TDh9.cjs.map +1 -0
  47. package/dist/busy-g4LoQmhB.js +172 -0
  48. package/dist/busy-g4LoQmhB.js.map +1 -0
  49. package/dist/busy.cjs +1 -1
  50. package/dist/busy.js +1 -1
  51. package/dist/{button-BTpxQ1Kd.cjs → button-Cml67Y_d.cjs} +41 -32
  52. package/dist/button-Cml67Y_d.cjs.map +1 -0
  53. package/dist/{button-D7QHfYf4.js → button-DWANpZfD.js} +43 -34
  54. package/dist/button-DWANpZfD.js.map +1 -0
  55. package/dist/button.cjs +40 -33
  56. package/dist/button.cjs.map +1 -1
  57. package/dist/button.js +42 -35
  58. package/dist/button.js.map +1 -1
  59. package/dist/calendar-2dJrw9pR.cjs +58 -0
  60. package/dist/calendar-2dJrw9pR.cjs.map +1 -0
  61. package/dist/calendar-kCe5LaBa.js +434 -0
  62. package/dist/calendar-kCe5LaBa.js.map +1 -0
  63. package/dist/calendar.cjs +1 -0
  64. package/dist/calendar.js +2 -0
  65. package/dist/{card-DCdtJ5Dy.js → card-CS_hYJbz.js} +136 -136
  66. package/dist/card-CS_hYJbz.js.map +1 -0
  67. package/dist/card-d0KhTnx5.cjs +177 -0
  68. package/dist/card-d0KhTnx5.cjs.map +1 -0
  69. package/dist/card.cjs +1 -1
  70. package/dist/card.js +1 -1
  71. package/dist/{checkbox-DVtyPk7l.js → checkbox-Bjp7kWuE.js} +2 -2
  72. package/dist/{checkbox-DVtyPk7l.js.map → checkbox-Bjp7kWuE.js.map} +1 -1
  73. package/dist/{checkbox-CYGOVPP-.cjs → checkbox-DZ2Wrz7Y.cjs} +1 -1
  74. package/dist/{checkbox-CYGOVPP-.cjs.map → checkbox-DZ2Wrz7Y.cjs.map} +1 -1
  75. package/dist/checkbox.cjs +1 -1
  76. package/dist/checkbox.js +1 -1
  77. package/dist/{chips-DVes-BSz.cjs → chips-BHBVkxsa.cjs} +142 -153
  78. package/dist/chips-BHBVkxsa.cjs.map +1 -0
  79. package/dist/{chips-C5bpgWyf.js → chips-DACeW7YL.js} +127 -138
  80. package/dist/chips-DACeW7YL.js.map +1 -0
  81. package/dist/chips.cjs +1 -1
  82. package/dist/chips.js +2 -2
  83. package/dist/connectivity.cjs +54 -38
  84. package/dist/connectivity.cjs.map +1 -1
  85. package/dist/connectivity.js +56 -40
  86. package/dist/connectivity.js.map +1 -1
  87. package/dist/content-drawer.cjs +1 -1
  88. package/dist/content-drawer.js +1 -1
  89. package/dist/cursor-glow-Ah7VXSj7.js.map +1 -1
  90. package/dist/cursor-glow-Bulq-38P.cjs.map +1 -1
  91. package/dist/date-range-CVAWMdar.cjs +138 -0
  92. package/dist/date-range-CVAWMdar.cjs.map +1 -0
  93. package/dist/date-range-D2NZU5Yg.js +433 -0
  94. package/dist/date-range-D2NZU5Yg.js.map +1 -0
  95. package/dist/{date-range-inline-Dx4Reboo.cjs → date-range-inline-CGM0SPK9.cjs} +2 -4
  96. package/dist/date-range-inline-CGM0SPK9.cjs.map +1 -0
  97. package/dist/{date-range-inline-DPqY9YYf.js → date-range-inline-D6Ozerzw.js} +3 -5
  98. package/dist/date-range-inline-D6Ozerzw.js.map +1 -0
  99. package/dist/date-range-inline.cjs +1 -1
  100. package/dist/date-range-inline.js +1 -1
  101. package/dist/date-range.cjs +1 -1
  102. package/dist/date-range.js +2 -2
  103. package/dist/dayjs.min-CvRZTfam.cjs +1 -0
  104. package/dist/dayjs.min-CvRZTfam.cjs.map +1 -0
  105. package/dist/dayjs.min-DnELezPs.js +296 -0
  106. package/dist/dayjs.min-DnELezPs.js.map +1 -0
  107. package/dist/delay.cjs +1 -1
  108. package/dist/delay.js +3 -3
  109. package/dist/{details-BnleHmYe.js → details-Ct1_GwKr.js} +104 -92
  110. package/dist/details-Ct1_GwKr.js.map +1 -0
  111. package/dist/{details-Bx2jSJxG.cjs → details-D4fVOaj4.cjs} +109 -97
  112. package/dist/details-D4fVOaj4.cjs.map +1 -0
  113. package/dist/details.cjs +1 -1
  114. package/dist/details.js +1 -1
  115. package/dist/{directives-CYf2fAdA.cjs → directives-B2VxfwRL.cjs} +1 -1
  116. package/dist/directives-B2VxfwRL.cjs.map +1 -0
  117. package/dist/{directives-d1rEbW1A.js → directives-Dj8jlv-Q.js} +3 -3
  118. package/dist/directives-Dj8jlv-Q.js.map +1 -0
  119. package/dist/directives.cjs +1 -1
  120. package/dist/directives.js +2 -2
  121. package/dist/discovery.service-CIa3Eeuk.cjs.map +1 -1
  122. package/dist/discovery.service-DZFxtRwW.js.map +1 -1
  123. package/dist/divider-B3v33OnX.cjs +57 -0
  124. package/dist/divider-B3v33OnX.cjs.map +1 -0
  125. package/dist/divider-BJHW3q11.js +89 -0
  126. package/dist/divider-BJHW3q11.js.map +1 -0
  127. package/dist/divider.cjs +1 -1
  128. package/dist/divider.js +1 -1
  129. package/dist/dropdown.cjs +40 -40
  130. package/dist/dropdown.cjs.map +1 -1
  131. package/dist/dropdown.js +41 -41
  132. package/dist/dropdown.js.map +1 -1
  133. package/dist/{expand-DNrWuG_-.js → expand-BT8mOu8Q.js} +103 -97
  134. package/dist/expand-BT8mOu8Q.js.map +1 -0
  135. package/dist/expand-D0YdR9nR.cjs +147 -0
  136. package/dist/expand-D0YdR9nR.cjs.map +1 -0
  137. package/dist/expand.cjs +1 -1
  138. package/dist/expand.js +1 -1
  139. package/dist/fab.cjs +1 -1
  140. package/dist/fab.cjs.map +1 -1
  141. package/dist/fab.js +2 -2
  142. package/dist/fab.js.map +1 -1
  143. package/dist/{float-V7VQKTb8.cjs → float-BPQlDyai.cjs} +1 -1
  144. package/dist/{float-V7VQKTb8.cjs.map → float-BPQlDyai.cjs.map} +1 -1
  145. package/dist/{float-C_CMle0q.js → float-BQcxj3i_.js} +2 -2
  146. package/dist/{float-C_CMle0q.js.map → float-BQcxj3i_.js.map} +1 -1
  147. package/dist/float.cjs +1 -1
  148. package/dist/float.js +1 -1
  149. package/dist/{form-DaaAQd2A.cjs → form-CoWFnClb.cjs} +8 -13
  150. package/dist/form-CoWFnClb.cjs.map +1 -0
  151. package/dist/{form-CMgYSZ3y.js → form-hC2LvCHX.js} +10 -15
  152. package/dist/form-hC2LvCHX.js.map +1 -0
  153. package/dist/form.cjs +12 -13
  154. package/dist/form.cjs.map +1 -1
  155. package/dist/form.js +23 -24
  156. package/dist/form.js.map +1 -1
  157. package/dist/gravity-6pL6CfIr.cjs.map +1 -1
  158. package/dist/gravity-sVK3zGBF.js.map +1 -1
  159. package/dist/handover/agent-runtime-followups.md +1 -1
  160. package/dist/handover/agent-runtime-v1.md +3 -3
  161. package/dist/{hashContent-iRZJJWtE.cjs.map → hashContent--s09Ed_g.cjs.map} +1 -1
  162. package/dist/{hashContent-BqU6v1Xr.js.map → hashContent-CAvrQ56N.js.map} +1 -1
  163. package/dist/icons-BeGKDZ-k.cjs +22 -0
  164. package/dist/icons-BeGKDZ-k.cjs.map +1 -0
  165. package/dist/{icons-mbpHO_73.js → icons-DEJnIxml.js} +20 -22
  166. package/dist/icons-DEJnIxml.js.map +1 -0
  167. package/dist/icons.cjs +1 -1
  168. package/dist/icons.js +1 -1
  169. package/dist/{iframe-88SN5JPu.cjs → iframe-BkSukM9C.cjs} +9 -9
  170. package/dist/iframe-BkSukM9C.cjs.map +1 -0
  171. package/dist/{iframe-U3P1DnQv.js → iframe-V3S-bwEY.js} +10 -10
  172. package/dist/iframe-V3S-bwEY.js.map +1 -0
  173. package/dist/iframe.cjs +1 -1
  174. package/dist/iframe.js +1 -1
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.js +61 -60
  177. package/dist/{input-CPWvGjE4.js → input-CPFCSQld.js} +3 -10
  178. package/dist/input-CPFCSQld.js.map +1 -0
  179. package/dist/{input-BY4Korc5.cjs → input-DSfwfhhj.cjs} +2 -9
  180. package/dist/input-DSfwfhhj.cjs.map +1 -0
  181. package/dist/input-chip-BUuFJUky.cjs +129 -0
  182. package/dist/input-chip-BUuFJUky.cjs.map +1 -0
  183. package/dist/{input-chip-CCZ3i3Sf.js → input-chip-C3a1fwKB.js} +87 -104
  184. package/dist/input-chip-C3a1fwKB.js.map +1 -0
  185. package/dist/input.cjs +1 -1
  186. package/dist/input.js +1 -1
  187. package/dist/json.cjs +5 -1
  188. package/dist/json.cjs.map +1 -1
  189. package/dist/json.js +8 -4
  190. package/dist/json.js.map +1 -1
  191. package/dist/kbd.cjs +28 -28
  192. package/dist/kbd.cjs.map +1 -1
  193. package/dist/kbd.js +29 -29
  194. package/dist/kbd.js.map +1 -1
  195. package/dist/{layout-BhfC26Ks.cjs → layout-CdyHy_oX.cjs} +1 -1
  196. package/dist/layout-CdyHy_oX.cjs.map +1 -0
  197. package/dist/{layout-DC0Npqu7.js → layout-k6fOkpif.js} +1 -1
  198. package/dist/layout-k6fOkpif.js.map +1 -0
  199. package/dist/layout.cjs +26 -26
  200. package/dist/layout.cjs.map +1 -1
  201. package/dist/layout.js +27 -27
  202. package/dist/layout.js.map +1 -1
  203. package/dist/lazy-BaAiIUru.js.map +1 -1
  204. package/dist/lazy-C-7a4FAe.cjs.map +1 -1
  205. package/dist/{lightbox-BSwWvDQc.js → lightbox-DIG0VLOK.js} +8 -14
  206. package/dist/lightbox-DIG0VLOK.js.map +1 -0
  207. package/dist/{lightbox-KrZQH9w9.cjs → lightbox-E5rgd-hu.cjs} +7 -13
  208. package/dist/lightbox-E5rgd-hu.cjs.map +1 -0
  209. package/dist/lightbox.cjs +1 -1
  210. package/dist/lightbox.js +1 -1
  211. package/dist/list-BRz0rDSH.cjs +47 -0
  212. package/dist/list-BRz0rDSH.cjs.map +1 -0
  213. package/dist/{list-BwGtAAfi.js → list-NrOYDPBo.js} +48 -34
  214. package/dist/list-NrOYDPBo.js.map +1 -0
  215. package/dist/list.cjs +1 -1
  216. package/dist/list.js +1 -1
  217. package/dist/magnetic-DKtc4umC.cjs.map +1 -1
  218. package/dist/magnetic-DaOOv5Dz.js.map +1 -1
  219. package/dist/{menu-DX8d96x-.js → menu-B1Ei9SVj.js} +12 -12
  220. package/dist/menu-B1Ei9SVj.js.map +1 -0
  221. package/dist/{menu-jT_yAk5V.cjs → menu-Duvl66Nl.cjs} +10 -10
  222. package/dist/menu-Duvl66Nl.cjs.map +1 -0
  223. package/dist/menu.cjs +1 -1
  224. package/dist/menu.js +1 -1
  225. package/dist/{mixins-XGVIOvKt.cjs → mixins-Cjn20BQH.cjs} +42 -170
  226. package/dist/mixins-Cjn20BQH.cjs.map +1 -0
  227. package/dist/{mixins-COeG4DiX.js → mixins-q4KAL8Xr.js} +43 -177
  228. package/dist/mixins-q4KAL8Xr.js.map +1 -0
  229. package/dist/mixins.cjs +1 -1
  230. package/dist/mixins.js +2 -2
  231. package/dist/nav-drawer.cjs +1 -1
  232. package/dist/nav-drawer.js +1 -1
  233. package/dist/navigation-bar.cjs +1 -1
  234. package/dist/navigation-bar.js +1 -1
  235. package/dist/navigation-rail.cjs +2 -4
  236. package/dist/navigation-rail.cjs.map +1 -1
  237. package/dist/navigation-rail.js +3 -5
  238. package/dist/navigation-rail.js.map +1 -1
  239. package/dist/{notification-CAJVpLne.js → notification-COhUhUCr.js} +5 -7
  240. package/dist/notification-COhUhUCr.js.map +1 -0
  241. package/dist/{notification-DO3VXceY.cjs → notification-DsdA_MJe.cjs} +2 -4
  242. package/dist/notification-DsdA_MJe.cjs.map +1 -0
  243. package/dist/notification.cjs +1 -1
  244. package/dist/notification.js +1 -1
  245. package/dist/{option-JISY0wZJ.js → option-BIzgTbXz.js} +20 -20
  246. package/dist/option-BIzgTbXz.js.map +1 -0
  247. package/dist/option-C5hhqR2z.cjs +43 -0
  248. package/dist/option-C5hhqR2z.cjs.map +1 -0
  249. package/dist/option.cjs +1 -1
  250. package/dist/option.js +1 -1
  251. package/dist/{overlay-B1jVf-ge.cjs → overlay-BzgF8P7i.cjs} +48 -41
  252. package/dist/overlay-BzgF8P7i.cjs.map +1 -0
  253. package/dist/{overlay-CT-tMHDX.js → overlay-LoRRemny.js} +52 -45
  254. package/dist/overlay-LoRRemny.js.map +1 -0
  255. package/dist/overlay-stack-Bdr9lOqi.cjs.map +1 -1
  256. package/dist/overlay-stack-D2rgxQLh.js.map +1 -1
  257. package/dist/overlay.cjs +1 -1
  258. package/dist/{overlay.confirm-body-Dn-Zgogx.js → overlay.confirm-body-D0b1MoCw.js} +30 -45
  259. package/dist/overlay.confirm-body-D0b1MoCw.js.map +1 -0
  260. package/dist/{overlay.confirm-body-mYDYoJL8.cjs → overlay.confirm-body-DCneq73Z.cjs} +22 -37
  261. package/dist/overlay.confirm-body-DCneq73Z.cjs.map +1 -0
  262. package/dist/overlay.js +3 -3
  263. package/dist/{overlay.service-yqTOyLlr.js → overlay.service-BuUeti6X.js} +2 -2
  264. package/dist/overlay.service-BuUeti6X.js.map +1 -0
  265. package/dist/{overlay.service-BQmva9GY.cjs → overlay.service-MMTiW2T3.cjs} +1 -1
  266. package/dist/overlay.service-MMTiW2T3.cjs.map +1 -0
  267. package/dist/{progress-CGWozq_n.js → progress-D7n3SKAO.js} +50 -50
  268. package/dist/progress-D7n3SKAO.js.map +1 -0
  269. package/dist/progress-DsCnFsH5.cjs +51 -0
  270. package/dist/progress-DsCnFsH5.cjs.map +1 -0
  271. package/dist/progress.cjs +1 -1
  272. package/dist/progress.js +1 -1
  273. package/dist/{radio-group-DoSX5D2V.cjs → radio-group-CaAjg9UV.cjs} +1 -1
  274. package/dist/radio-group-CaAjg9UV.cjs.map +1 -0
  275. package/dist/{radio-group-CXkq6qAF.js → radio-group-Drpl6Pl8.js} +2 -2
  276. package/dist/radio-group-Drpl6Pl8.js.map +1 -0
  277. package/dist/radio-group.cjs +1 -1
  278. package/dist/radio-group.js +1 -1
  279. package/dist/range.cjs +4 -2
  280. package/dist/range.cjs.map +1 -1
  281. package/dist/range.js +5 -3
  282. package/dist/range.js.map +1 -1
  283. package/dist/reduced-motion-D-L12p7G.js.map +1 -1
  284. package/dist/reduced-motion-Ds-HjMzn.cjs.map +1 -1
  285. package/dist/{rxjs-utils-Csnks202.cjs.map → rxjs-utils-4P2v57ke.cjs.map} +1 -1
  286. package/dist/{rxjs-utils-d-ivVN84.js.map → rxjs-utils-JMFdgQSl.js.map} +1 -1
  287. package/dist/rxjs-utils.cjs +1 -1
  288. package/dist/rxjs-utils.js +1 -1
  289. package/dist/search-DPKoC-dT.cjs.map +1 -1
  290. package/dist/search-MvIBA93K.js.map +1 -1
  291. package/dist/{select-CU90i50_.js → select-CTXkrrVZ.js} +13 -13
  292. package/dist/select-CTXkrrVZ.js.map +1 -0
  293. package/dist/select-DcLcpPCh.cjs +56 -0
  294. package/dist/select-DcLcpPCh.cjs.map +1 -0
  295. package/dist/select.cjs +1 -1
  296. package/dist/select.js +1 -1
  297. package/dist/skeleton.cjs +37 -33
  298. package/dist/skeleton.cjs.map +1 -1
  299. package/dist/skeleton.js +38 -34
  300. package/dist/skeleton.js.map +1 -1
  301. package/dist/skills/schmancy/surface.md +79 -39
  302. package/dist/skills/surface.md +79 -39
  303. package/dist/slider.cjs +31 -31
  304. package/dist/slider.cjs.map +1 -1
  305. package/dist/slider.js +32 -32
  306. package/dist/slider.js.map +1 -1
  307. package/dist/{sound.service-m8WjOhjn.js → sound.service-AJwuk3yr.js} +1 -1
  308. package/dist/sound.service-AJwuk3yr.js.map +1 -0
  309. package/dist/{sound.service-Qhr8nCeG.cjs → sound.service-CVsxhQkX.cjs} +1 -1
  310. package/dist/sound.service-CVsxhQkX.cjs.map +1 -0
  311. package/dist/{splash-screen-Cs3dbPN3.js → splash-screen-DANfqvlo.js} +23 -26
  312. package/dist/splash-screen-DANfqvlo.js.map +1 -0
  313. package/dist/splash-screen-K74cgU6S.cjs +38 -0
  314. package/dist/splash-screen-K74cgU6S.cjs.map +1 -0
  315. package/dist/splash-screen.cjs +1 -1
  316. package/dist/splash-screen.js +1 -1
  317. package/dist/{src-CCVbLLgC.js → src-DAtcPmCb.js} +295 -389
  318. package/dist/src-DAtcPmCb.js.map +1 -0
  319. package/dist/src-DuRvYagm.cjs +237 -0
  320. package/dist/src-DuRvYagm.cjs.map +1 -0
  321. package/dist/{state--x58-AuK.cjs → state-BWQiqN6I.cjs} +1 -1
  322. package/dist/state-BWQiqN6I.cjs.map +1 -0
  323. package/dist/{state-QSwQ61sA.js → state-DBA_gzJO.js} +1 -1
  324. package/dist/state-DBA_gzJO.js.map +1 -0
  325. package/dist/state.cjs +1 -1
  326. package/dist/state.js +2 -2
  327. package/dist/steps.cjs +20 -12
  328. package/dist/steps.cjs.map +1 -1
  329. package/dist/steps.js +21 -13
  330. package/dist/steps.js.map +1 -1
  331. package/dist/surface-COBvWWFb.cjs +7 -0
  332. package/dist/surface-COBvWWFb.cjs.map +1 -0
  333. package/dist/{surface-cqMsHJHM.js → surface-DXk1X1tL.js} +9 -9
  334. package/dist/surface-DXk1X1tL.js.map +1 -0
  335. package/dist/surface.cjs +1 -1
  336. package/dist/surface.js +1 -1
  337. package/dist/switch.cjs +13 -4
  338. package/dist/switch.cjs.map +1 -1
  339. package/dist/switch.js +14 -5
  340. package/dist/switch.js.map +1 -1
  341. package/dist/table.cjs +4 -10
  342. package/dist/table.cjs.map +1 -1
  343. package/dist/table.js +5 -11
  344. package/dist/table.js.map +1 -1
  345. package/dist/{tabs-Ib0Mh__1.js → tabs-BYhFWnsx.js} +7 -7
  346. package/dist/tabs-BYhFWnsx.js.map +1 -0
  347. package/dist/{tabs-Dk9UDWpq.cjs → tabs-CJwB0fr0.cjs} +6 -6
  348. package/dist/tabs-CJwB0fr0.cjs.map +1 -0
  349. package/dist/tabs.cjs +1 -1
  350. package/dist/tabs.js +1 -1
  351. package/dist/teleport.cjs +1 -1
  352. package/dist/teleport.js +1 -1
  353. package/dist/{textarea-CcRsw08B.js → textarea-BjDx1w2g.js} +37 -41
  354. package/dist/textarea-BjDx1w2g.js.map +1 -0
  355. package/dist/{textarea-Cntd9tfV.cjs → textarea-CGgznhd6.cjs} +36 -40
  356. package/dist/textarea-CGgznhd6.cjs.map +1 -0
  357. package/dist/textarea.cjs +1 -1
  358. package/dist/textarea.js +1 -1
  359. package/dist/{theme-wwFbvp5e.cjs → theme-BVul7lHS.cjs} +6 -6
  360. package/dist/{theme-wwFbvp5e.cjs.map → theme-BVul7lHS.cjs.map} +1 -1
  361. package/dist/{theme-CKYXG0le.js → theme-Dvm5J8nh.js} +11 -11
  362. package/dist/{theme-CKYXG0le.js.map → theme-Dvm5J8nh.js.map} +1 -1
  363. package/dist/{theme-button-iLqT56KA.js → theme-button-Bko5ohFP.js} +2 -2
  364. package/dist/{theme-button-iLqT56KA.js.map → theme-button-Bko5ohFP.js.map} +1 -1
  365. package/dist/{theme-button-DE9Lrl7m.cjs → theme-button-YLY7zR1c.cjs} +1 -1
  366. package/dist/{theme-button-DE9Lrl7m.cjs.map → theme-button-YLY7zR1c.cjs.map} +1 -1
  367. package/dist/theme-button.cjs +1 -1
  368. package/dist/theme-button.js +1 -1
  369. package/dist/theme.cjs +1 -1
  370. package/dist/{theme.interface-CSt7JUBD.cjs.map → theme.interface-B-qxDsZQ.cjs.map} +1 -1
  371. package/dist/{theme.interface-odQEpZZH.js.map → theme.interface-B7caS5cg.js.map} +1 -1
  372. package/dist/theme.js +4 -4
  373. package/dist/{theme.service-5RjyR7Sy.js → theme.service-D94nm7Bf.js} +1 -1
  374. package/dist/theme.service-D94nm7Bf.js.map +1 -0
  375. package/dist/{theme.service-DA6KY52G.cjs → theme.service-h2fXQq7x.cjs} +1 -1
  376. package/dist/theme.service-h2fXQq7x.cjs.map +1 -0
  377. package/dist/tooltip.cjs.map +1 -1
  378. package/dist/tooltip.js.map +1 -1
  379. package/dist/tree.cjs +14 -14
  380. package/dist/tree.cjs.map +1 -1
  381. package/dist/tree.js +15 -15
  382. package/dist/tree.js.map +1 -1
  383. package/dist/types.cjs +1 -1
  384. package/dist/types.cjs.map +1 -1
  385. package/dist/types.js +19 -2
  386. package/dist/types.js.map +1 -1
  387. package/dist/typewriter.cjs.map +1 -1
  388. package/dist/typewriter.js.map +1 -1
  389. package/dist/typography-ByF2k5yW.js +358 -0
  390. package/dist/typography-ByF2k5yW.js.map +1 -0
  391. package/dist/typography-Cfav17it.cjs +282 -0
  392. package/dist/typography-Cfav17it.cjs.map +1 -0
  393. package/dist/typography.cjs +1 -1
  394. package/dist/typography.js +1 -1
  395. package/dist/utils-DIXndz6Q.cjs.map +1 -0
  396. package/dist/utils-dSPH7Oh9.js.map +1 -0
  397. package/dist/utils.cjs +1 -1
  398. package/dist/utils.js +1 -1
  399. package/dist/visually-hidden.cjs +13 -13
  400. package/dist/visually-hidden.cjs.map +1 -1
  401. package/dist/visually-hidden.js +14 -14
  402. package/dist/visually-hidden.js.map +1 -1
  403. package/dist/window-Br1OmpL-.cjs +67 -0
  404. package/dist/window-Br1OmpL-.cjs.map +1 -0
  405. package/dist/{window-Db5ZYY6t.js → window-CCmN4but.js} +28 -20
  406. package/dist/window-CCmN4but.js.map +1 -0
  407. package/dist/window.cjs +1 -1
  408. package/dist/window.js +1 -1
  409. package/package.json +1 -1
  410. package/skills/schmancy/surface.md +79 -39
  411. package/src/area/area.component.ts +249 -163
  412. package/src/area/area.service.test.ts +994 -1006
  413. package/src/area/area.service.ts +76 -72
  414. package/src/area/index.ts +7 -7
  415. package/src/area/lazy.ts +39 -42
  416. package/src/area/route.component.ts +54 -52
  417. package/src/area/router.types.ts +7 -7
  418. package/src/audio/emotional-sounds.ts +880 -801
  419. package/src/audio/sound.service.ts +26 -5
  420. package/src/avatar/avatar.ts +4 -4
  421. package/src/badge/badge.ts +60 -209
  422. package/src/badge/index.ts +1 -1
  423. package/src/boat/boat.ts +2 -4
  424. package/src/breadcrumb/breadcrumb.ts +37 -32
  425. package/src/busy/busy.ts +15 -12
  426. package/src/busy/index.ts +2 -2
  427. package/src/busy/spinner.ts +132 -119
  428. package/src/button/button.test.ts +5 -1
  429. package/src/button/button.ts +113 -72
  430. package/src/button/icon-button.ts +64 -46
  431. package/src/button/index.ts +2 -2
  432. package/src/calendar/calendar.test.ts +504 -0
  433. package/src/calendar/calendar.ts +587 -0
  434. package/src/calendar/index.ts +2 -0
  435. package/src/card/actions.ts +11 -9
  436. package/src/card/card.ts +79 -77
  437. package/src/card/content.ts +8 -6
  438. package/src/card/index.ts +4 -4
  439. package/src/card/media.ts +50 -50
  440. package/src/chips/assist-chip.ts +1 -1
  441. package/src/chips/chips.ts +1 -1
  442. package/src/chips/filter-chip.ts +1 -1
  443. package/src/chips/index.ts +1 -1
  444. package/src/chips/input-chip.ts +1 -1
  445. package/src/chips/suggestion-chip.ts +1 -1
  446. package/src/connectivity/connectivity-status.ts +91 -65
  447. package/src/content-drawer/drawer.service.ts +47 -36
  448. package/src/content-drawer/drawer.ts +31 -18
  449. package/src/content-drawer/index.ts +5 -5
  450. package/src/content-drawer/main.ts +9 -7
  451. package/src/content-drawer/sheet.ts +8 -6
  452. package/src/date-range-inline/date-range-inline.ts +523 -522
  453. package/src/date-range-inline/index.ts +2 -2
  454. package/src/delay/index.ts +1 -1
  455. package/src/details/details.ts +119 -105
  456. package/src/details/index.ts +1 -1
  457. package/src/directives/ai-badge.ts +1 -5
  458. package/src/directives/animate-text.ts +43 -31
  459. package/src/directives/art/effects/howl.ts +1 -4
  460. package/src/directives/art/effects/samwa.ts +11 -5
  461. package/src/directives/art/effects/snow.ts +1 -2
  462. package/src/directives/battery.ts +21 -12
  463. package/src/directives/confirm-click.ts +9 -17
  464. package/src/directives/cursor-glow.ts +1 -1
  465. package/src/directives/cycle-text.ts +7 -21
  466. package/src/directives/drag.ts +50 -45
  467. package/src/directives/fyi.ts +1 -6
  468. package/src/directives/gravity.ts +10 -8
  469. package/src/directives/hummingbird.ts +256 -107
  470. package/src/directives/index.ts +29 -29
  471. package/src/directives/intersect.ts +11 -11
  472. package/src/directives/layout.ts +25 -36
  473. package/src/directives/liquid.ts +4 -10
  474. package/src/directives/living-border.ts +7 -5
  475. package/src/directives/long-press.ts +2 -1
  476. package/src/directives/magnetic.ts +7 -6
  477. package/src/directives/nebula.ts +34 -28
  478. package/src/directives/overflow-within.ts +18 -20
  479. package/src/directives/reduced-motion.ts +9 -9
  480. package/src/directives/reveal.ts +193 -195
  481. package/src/directives/ripple.ts +9 -7
  482. package/src/directives/urgent.ts +3 -1
  483. package/src/directives/working-snake.ts +1 -1
  484. package/src/discovery/discovery.service.ts +198 -210
  485. package/src/discovery/index.ts +1 -1
  486. package/src/divider/divider.ts +49 -47
  487. package/src/divider/index.ts +1 -1
  488. package/src/dropdown/dropdown-content.ts +42 -40
  489. package/src/dropdown/index.ts +2 -2
  490. package/src/expand/expand-root.component.ts +70 -61
  491. package/src/expand/expand.component.ts +48 -43
  492. package/src/fab/fab.test.ts +1 -2
  493. package/src/fab/fab.ts +2 -4
  494. package/src/form/fields/autocomplete/autocomplete.scss +6 -2
  495. package/src/form/fields/autocomplete/autocomplete.ts +712 -724
  496. package/src/form/fields/autocomplete/index.ts +1 -1
  497. package/src/form/fields/checkbox/checkbox.ts +1 -4
  498. package/src/form/fields/chips/assist-chip.ts +69 -72
  499. package/src/form/fields/chips/chips.ts +14 -15
  500. package/src/form/fields/chips/filter-chip.ts +36 -32
  501. package/src/form/fields/chips/index.ts +5 -5
  502. package/src/form/fields/chips/input-chip.ts +130 -142
  503. package/src/form/fields/chips/suggestion-chip.ts +69 -72
  504. package/src/form/fields/date-range/date-range-dialog.ts +141 -194
  505. package/src/form/fields/date-range/date-range-helpers.ts +63 -64
  506. package/src/form/fields/date-range/date-range.test.ts +359 -122
  507. package/src/form/fields/date-range/date-range.ts +319 -395
  508. package/src/form/fields/date-range/index.ts +2 -2
  509. package/src/form/fields/input/index.ts +8 -8
  510. package/src/form/fields/input/input.scss +30 -26
  511. package/src/form/fields/input/input.test.ts +4 -1
  512. package/src/form/fields/input/input.ts +4 -20
  513. package/src/form/fields/radio-group/index.ts +2 -2
  514. package/src/form/fields/radio-group/radio-button.ts +8 -8
  515. package/src/form/fields/radio-group/radio-group.ts +4 -1
  516. package/src/form/fields/range/range.ts +3 -1
  517. package/src/form/fields/select/index.ts +2 -2
  518. package/src/form/fields/select/select.ts +51 -45
  519. package/src/form/fields/switch/switch.ts +13 -7
  520. package/src/form/fields/textarea/index.ts +1 -1
  521. package/src/form/fields/textarea/textarea.ts +44 -49
  522. package/src/form/form-summary.ts +15 -14
  523. package/src/form/form.test.ts +0 -1
  524. package/src/form/form.ts +11 -23
  525. package/src/icons/icon.ts +25 -25
  526. package/src/icons/index.ts +1 -1
  527. package/src/iframe/iframe.ts +11 -9
  528. package/src/index.ts +1 -0
  529. package/src/json/json.ts +9 -2
  530. package/src/kbd/kbd.ts +30 -28
  531. package/src/layout/scroll/index.ts +1 -1
  532. package/src/layout/scroll/scroll.ts +54 -54
  533. package/src/lightbox/lightbox-service.ts +27 -18
  534. package/src/lightbox/lightbox.directive.ts +2 -1
  535. package/src/lightbox/lightbox.ts +21 -38
  536. package/src/list/index.ts +3 -3
  537. package/src/list/list-item.ts +32 -26
  538. package/src/list/list.ts +13 -8
  539. package/src/menu/index.ts +2 -2
  540. package/src/menu/menu-item.ts +7 -5
  541. package/src/menu/menu.ts +8 -6
  542. package/src/nav-drawer/appbar.ts +9 -7
  543. package/src/nav-drawer/content.ts +10 -8
  544. package/src/nav-drawer/drawer.ts +29 -25
  545. package/src/nav-drawer/index.ts +6 -6
  546. package/src/navigation-bar/index.ts +2 -2
  547. package/src/navigation-bar/navigation-bar-item.ts +127 -118
  548. package/src/navigation-bar/navigation-bar.ts +103 -91
  549. package/src/navigation-rail/index.ts +2 -2
  550. package/src/navigation-rail/navigation-rail.ts +21 -22
  551. package/src/notification/index.ts +6 -6
  552. package/src/notification/notification-service.ts +1 -2
  553. package/src/notification/notification.scss +5 -1
  554. package/src/notification/notification.ts +1 -3
  555. package/src/notification/notify.ts +204 -207
  556. package/src/option/index.ts +1 -1
  557. package/src/option/option.ts +26 -25
  558. package/src/overlay/overlay.animations.ts +4 -14
  559. package/src/overlay/overlay.component.ts +110 -131
  560. package/src/overlay/overlay.confirm-body.ts +26 -48
  561. package/src/overlay/overlay.gestures.ts +8 -10
  562. package/src/overlay/overlay.layout.ts +1 -4
  563. package/src/overlay/overlay.positioning.ts +4 -15
  564. package/src/overlay/overlay.service.ts +9 -24
  565. package/src/overlay/overlay.stack.test.ts +4 -1
  566. package/src/overlay/overlay.stack.ts +4 -4
  567. package/src/overlay/overlay.types.ts +11 -20
  568. package/src/progress/index.ts +1 -1
  569. package/src/progress/progress.ts +135 -133
  570. package/src/rxjs-utils/index.ts +6 -6
  571. package/src/rxjs-utils/waitForElement.ts +20 -20
  572. package/src/rxjs-utils/waitForElementAll.ts +21 -21
  573. package/src/rxjs-utils/waitForElements.ts +27 -27
  574. package/src/rxjs-utils/waitForElementsAll.ts +27 -29
  575. package/src/rxjs-utils/waitUntil.ts +7 -12
  576. package/src/skeleton/skeleton.ts +39 -33
  577. package/src/slider/index.ts +2 -2
  578. package/src/slider/slide.ts +14 -12
  579. package/src/slider/slider.ts +24 -22
  580. package/src/splash-screen/index.ts +1 -1
  581. package/src/splash-screen/splash-screen.ts +26 -27
  582. package/src/state/active-host.ts +4 -5
  583. package/src/state/index.ts +34 -53
  584. package/src/state/persist.ts +14 -11
  585. package/src/state/schmancy-context.ts +88 -88
  586. package/src/state/state.test-d.ts +3 -13
  587. package/src/state/state.test.ts +1 -4
  588. package/src/steps/index.ts +3 -3
  589. package/src/steps/schmancy-step.ts +41 -31
  590. package/src/steps/schmancy-steps.ts +7 -5
  591. package/src/surface/index.ts +1 -1
  592. package/src/surface/surface.styles.ts +55 -191
  593. package/src/surface/surface.ts +18 -16
  594. package/src/table/index.ts +2 -2
  595. package/src/table/row.ts +1 -4
  596. package/src/table/table.ts +2 -5
  597. package/src/tabs/index.ts +2 -2
  598. package/src/tabs/tabs-group.ts +8 -6
  599. package/src/teleport/index.ts +2 -2
  600. package/src/test-utils/a11y.ts +1 -3
  601. package/src/theme/index.ts +17 -17
  602. package/src/theme/theme-audio-player.ts +18 -16
  603. package/src/theme/theme-controller-boat.ts +1 -1
  604. package/src/theme/theme-controller.ts +36 -32
  605. package/src/theme/theme.component.ts +5 -9
  606. package/src/theme/theme.events.ts +1 -1
  607. package/src/theme/theme.format.ts +7 -7
  608. package/src/theme/theme.service.ts +453 -468
  609. package/src/theme/theme.style.css +78 -23
  610. package/src/theme-button/index.ts +1 -1
  611. package/src/tooltip/tooltip.directive.ts +1 -1
  612. package/src/tree/index.ts +1 -1
  613. package/src/tree/tree.ts +24 -16
  614. package/src/types/surface.ts +38 -44
  615. package/src/typewriter/typewriter.directive.ts +30 -39
  616. package/src/typography/typography.ts +289 -269
  617. package/src/utils/animation.ts +2 -8
  618. package/src/utils/index.ts +6 -6
  619. package/src/utils/number.ts +480 -517
  620. package/src/utils/overlay-stack.ts +1 -3
  621. package/src/utils/search.ts +5 -9
  622. package/src/visually-hidden/visually-hidden.ts +15 -13
  623. package/src/window/window-manager.ts +6 -1
  624. package/src/window/window-position.ts +7 -5
  625. package/src/window/window.ts +146 -114
  626. package/types/mixins/surface.mixin.d.ts +8 -14
  627. package/types/src/badge/badge.d.ts +15 -48
  628. package/types/src/calendar/calendar.d.ts +108 -0
  629. package/types/src/calendar/calendar.test.d.ts +1 -0
  630. package/types/src/calendar/index.d.ts +2 -0
  631. package/types/src/directives/cursor-glow.d.ts +1 -1
  632. package/types/src/directives/hummingbird.d.ts +3 -3
  633. package/types/src/form/fields/date-range/date-range-dialog.d.ts +24 -28
  634. package/types/src/form/fields/date-range/date-range.d.ts +35 -66
  635. package/types/src/form/fields/date-range/date-range.test.d.ts +1 -0
  636. package/types/src/form/fields/date-range/index.d.ts +1 -1
  637. package/types/src/index.d.ts +1 -0
  638. package/types/src/surface/surface.d.ts +9 -7
  639. package/types/src/surface/surface.styles.d.ts +15 -20
  640. package/types/src/types/surface.d.ts +17 -22
  641. package/types/src/utils/number.d.ts +1 -1
  642. package/types/src/window/window.d.ts +0 -1
  643. package/dist/SchmancyElement-D9WA9FP9.cjs +0 -2
  644. package/dist/SchmancyElement-D9WA9FP9.cjs.map +0 -1
  645. package/dist/SchmancyElement-OWgz9ePG.js +0 -286
  646. package/dist/SchmancyElement-OWgz9ePG.js.map +0 -1
  647. package/dist/area-BiM7V2ns.js.map +0 -1
  648. package/dist/area-C7XjCoet.cjs +0 -21
  649. package/dist/area-C7XjCoet.cjs.map +0 -1
  650. package/dist/audio-CxO_j__6.js.map +0 -1
  651. package/dist/audio-xXFfMPCS.cjs.map +0 -1
  652. package/dist/autocomplete-DD7Hd59N.cjs +0 -115
  653. package/dist/autocomplete-DD7Hd59N.cjs.map +0 -1
  654. package/dist/autocomplete-DUBY9RtH.js.map +0 -1
  655. package/dist/busy-BjsO3y2A.js +0 -173
  656. package/dist/busy-BjsO3y2A.js.map +0 -1
  657. package/dist/busy-UbCGkTAi.cjs +0 -134
  658. package/dist/busy-UbCGkTAi.cjs.map +0 -1
  659. package/dist/button-BTpxQ1Kd.cjs.map +0 -1
  660. package/dist/button-D7QHfYf4.js.map +0 -1
  661. package/dist/card-DCdtJ5Dy.js.map +0 -1
  662. package/dist/card-rprhCYIC.cjs +0 -177
  663. package/dist/card-rprhCYIC.cjs.map +0 -1
  664. package/dist/chips-C5bpgWyf.js.map +0 -1
  665. package/dist/chips-DVes-BSz.cjs.map +0 -1
  666. package/dist/date-range-DDUuBlJ6.cjs +0 -142
  667. package/dist/date-range-DDUuBlJ6.cjs.map +0 -1
  668. package/dist/date-range-IPlbrhwW.js +0 -966
  669. package/dist/date-range-IPlbrhwW.js.map +0 -1
  670. package/dist/date-range-inline-DPqY9YYf.js.map +0 -1
  671. package/dist/date-range-inline-Dx4Reboo.cjs.map +0 -1
  672. package/dist/details-BnleHmYe.js.map +0 -1
  673. package/dist/details-Bx2jSJxG.cjs.map +0 -1
  674. package/dist/directives-CYf2fAdA.cjs.map +0 -1
  675. package/dist/directives-d1rEbW1A.js.map +0 -1
  676. package/dist/divider-CimQJVr3.cjs +0 -57
  677. package/dist/divider-CimQJVr3.cjs.map +0 -1
  678. package/dist/divider-Cr-rx3vA.js +0 -89
  679. package/dist/divider-Cr-rx3vA.js.map +0 -1
  680. package/dist/expand-DNrWuG_-.js.map +0 -1
  681. package/dist/expand-_cp8oBjp.cjs +0 -141
  682. package/dist/expand-_cp8oBjp.cjs.map +0 -1
  683. package/dist/form-CMgYSZ3y.js.map +0 -1
  684. package/dist/form-DaaAQd2A.cjs.map +0 -1
  685. package/dist/icons-C2RkSXjP.cjs +0 -24
  686. package/dist/icons-C2RkSXjP.cjs.map +0 -1
  687. package/dist/icons-mbpHO_73.js.map +0 -1
  688. package/dist/iframe-88SN5JPu.cjs.map +0 -1
  689. package/dist/iframe-U3P1DnQv.js.map +0 -1
  690. package/dist/input-BY4Korc5.cjs.map +0 -1
  691. package/dist/input-CPWvGjE4.js.map +0 -1
  692. package/dist/input-chip-CCZ3i3Sf.js.map +0 -1
  693. package/dist/input-chip-kytMdbaM.cjs +0 -146
  694. package/dist/input-chip-kytMdbaM.cjs.map +0 -1
  695. package/dist/layout-BhfC26Ks.cjs.map +0 -1
  696. package/dist/layout-DC0Npqu7.js.map +0 -1
  697. package/dist/lightbox-BSwWvDQc.js.map +0 -1
  698. package/dist/lightbox-KrZQH9w9.cjs.map +0 -1
  699. package/dist/list-BwGtAAfi.js.map +0 -1
  700. package/dist/list-DIs02A3d.cjs +0 -40
  701. package/dist/list-DIs02A3d.cjs.map +0 -1
  702. package/dist/menu-DX8d96x-.js.map +0 -1
  703. package/dist/menu-jT_yAk5V.cjs.map +0 -1
  704. package/dist/mixins-COeG4DiX.js.map +0 -1
  705. package/dist/mixins-XGVIOvKt.cjs.map +0 -1
  706. package/dist/notification-CAJVpLne.js.map +0 -1
  707. package/dist/notification-DO3VXceY.cjs.map +0 -1
  708. package/dist/option-BNo1Zs-l.cjs +0 -43
  709. package/dist/option-BNo1Zs-l.cjs.map +0 -1
  710. package/dist/option-JISY0wZJ.js.map +0 -1
  711. package/dist/overlay-B1jVf-ge.cjs.map +0 -1
  712. package/dist/overlay-CT-tMHDX.js.map +0 -1
  713. package/dist/overlay.confirm-body-Dn-Zgogx.js.map +0 -1
  714. package/dist/overlay.confirm-body-mYDYoJL8.cjs.map +0 -1
  715. package/dist/overlay.service-BQmva9GY.cjs.map +0 -1
  716. package/dist/overlay.service-yqTOyLlr.js.map +0 -1
  717. package/dist/progress-CGWozq_n.js.map +0 -1
  718. package/dist/progress-DOVJhsR0.cjs +0 -51
  719. package/dist/progress-DOVJhsR0.cjs.map +0 -1
  720. package/dist/radio-group-CXkq6qAF.js.map +0 -1
  721. package/dist/radio-group-DoSX5D2V.cjs.map +0 -1
  722. package/dist/select-CObZenqg.cjs +0 -56
  723. package/dist/select-CObZenqg.cjs.map +0 -1
  724. package/dist/select-CU90i50_.js.map +0 -1
  725. package/dist/sound.service-Qhr8nCeG.cjs.map +0 -1
  726. package/dist/sound.service-m8WjOhjn.js.map +0 -1
  727. package/dist/splash-screen-Ca6Ew8p6.cjs +0 -41
  728. package/dist/splash-screen-Ca6Ew8p6.cjs.map +0 -1
  729. package/dist/splash-screen-Cs3dbPN3.js.map +0 -1
  730. package/dist/src-CCVbLLgC.js.map +0 -1
  731. package/dist/src-CpftzdZV.cjs +0 -264
  732. package/dist/src-CpftzdZV.cjs.map +0 -1
  733. package/dist/state--x58-AuK.cjs.map +0 -1
  734. package/dist/state-QSwQ61sA.js.map +0 -1
  735. package/dist/surface-bTjOiq8n.cjs +0 -7
  736. package/dist/surface-bTjOiq8n.cjs.map +0 -1
  737. package/dist/surface-cqMsHJHM.js.map +0 -1
  738. package/dist/tabs-Dk9UDWpq.cjs.map +0 -1
  739. package/dist/tabs-Ib0Mh__1.js.map +0 -1
  740. package/dist/textarea-CcRsw08B.js.map +0 -1
  741. package/dist/textarea-Cntd9tfV.cjs.map +0 -1
  742. package/dist/theme.service-5RjyR7Sy.js.map +0 -1
  743. package/dist/theme.service-DA6KY52G.cjs.map +0 -1
  744. package/dist/typography-DeEYdMhW.js +0 -358
  745. package/dist/typography-DeEYdMhW.js.map +0 -1
  746. package/dist/typography-Tm7wSaB2.cjs +0 -282
  747. package/dist/typography-Tm7wSaB2.cjs.map +0 -1
  748. package/dist/utils-DTa3QHxk.cjs.map +0 -1
  749. package/dist/utils-H8wNknWC.js.map +0 -1
  750. package/dist/window-Db5ZYY6t.js.map +0 -1
  751. package/dist/window-oQqx5xqQ.cjs +0 -59
  752. package/dist/window-oQqx5xqQ.cjs.map +0 -1
  753. package/src/form/fields/date-range/date-range-presets.ts +0 -220
  754. package/src/form/fields/date-range/date-utils.ts +0 -58
  755. package/types/src/form/fields/date-range/date-range-presets.d.ts +0 -18
  756. package/types/src/form/fields/date-range/date-utils.d.ts +0 -15
  757. /package/dist/{hashContent-iRZJJWtE.cjs → hashContent--s09Ed_g.cjs} +0 -0
  758. /package/dist/{hashContent-BqU6v1Xr.js → hashContent-CAvrQ56N.js} +0 -0
  759. /package/dist/{rxjs-utils-Csnks202.cjs → rxjs-utils-4P2v57ke.cjs} +0 -0
  760. /package/dist/{rxjs-utils-d-ivVN84.js → rxjs-utils-JMFdgQSl.js} +0 -0
  761. /package/dist/{theme.interface-CSt7JUBD.cjs → theme.interface-B-qxDsZQ.cjs} +0 -0
  762. /package/dist/{theme.interface-odQEpZZH.js → theme.interface-B7caS5cg.js} +0 -0
  763. /package/dist/{utils-DTa3QHxk.cjs → utils-DIXndz6Q.cjs} +0 -0
  764. /package/dist/{utils-H8wNknWC.js → utils-dSPH7Oh9.js} +0 -0
@@ -1,522 +1,523 @@
1
- import { html } from 'lit'
2
- import { customElement, property, state } from 'lit/decorators.js'
3
- import { SchmancyFormField } from '@mixins/index'
4
-
5
- declare global {
6
- interface HTMLElementTagNameMap {
7
- 'schmancy-date-range-inline': SchmancyDateRangeInline
8
- }
9
- }
10
-
11
- export type SchmancyDateRangeInlineChangeEvent = CustomEvent<{
12
- dateFrom: string
13
- dateTo: string
14
- isValid: boolean
15
- }>
16
-
17
- /**
18
- * Smart inline date range picker that handles all the heavy lifting.
19
- * Auto-corrects invalid ranges, provides smart defaults, and validates dates.
20
- */
21
- @customElement('schmancy-date-range-inline')
22
- export default class SchmancyDateRangeInline extends SchmancyFormField() {
23
- /**
24
- * Input type - 'date' or 'datetime-local'
25
- */
26
- @property({ type: String })
27
- type: 'date' | 'datetime-local' = 'date'
28
-
29
- /**
30
- * From date configuration
31
- */
32
- @property({ type: Object })
33
- dateFrom: { label: string; value: string } = { label: 'From', value: '' }
34
-
35
- /**
36
- * To date configuration
37
- */
38
- @property({ type: Object })
39
- dateTo: { label: string; value: string } = { label: 'To', value: '' }
40
-
41
- /**
42
- * Minimum allowed date
43
- */
44
- @property({ type: String })
45
- minDate?: string
46
-
47
- /**
48
- * Maximum allowed date
49
- */
50
- @property({ type: String })
51
- maxDate?: string
52
-
53
- /**
54
- * Compact mode for smaller UI
55
- */
56
- @property({ type: Boolean })
57
- compact = false
58
-
59
- /**
60
- * Auto-correct invalid date ranges
61
- */
62
- @property({ type: Boolean })
63
- autoCorrect = true
64
-
65
- /**
66
- * Minimum gap between dates (in days)
67
- */
68
- @property({ type: Number })
69
- minGap = 0
70
-
71
- /**
72
- * Maximum gap between dates (in days)
73
- */
74
- @property({ type: Number })
75
- maxGap?: number
76
-
77
- /**
78
- * Default gap when auto-setting dates (in days)
79
- */
80
- @property({ type: Number })
81
- defaultGap = 1
82
-
83
- /**
84
- * Whether to allow same date selection
85
- */
86
- @property({ type: Boolean })
87
- allowSameDate = false
88
-
89
- /**
90
- * Internal validation state
91
- */
92
- @state()
93
- private validationState = {
94
- dateFromError: '',
95
- dateToError: '',
96
- rangeError: ''
97
- }
98
-
99
- connectedCallback() {
100
- super.connectedCallback()
101
- // Initialize with smart defaults if no values provided
102
- if (!this.dateFrom.value && !this.dateTo.value) {
103
- this.setSmartDefaults()
104
- } else {
105
- // Validate initial values
106
- this.validateAndCorrect()
107
- }
108
- }
109
-
110
- /**
111
- * Set smart default dates based on context
112
- */
113
- private setSmartDefaults() {
114
- const today = new Date()
115
- const tomorrow = new Date(today)
116
- tomorrow.setDate(tomorrow.getDate() + this.defaultGap)
117
-
118
- const format = this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'
119
-
120
- this.dateFrom = {
121
- ...this.dateFrom,
122
- value: this.formatDate(today, format)
123
- }
124
-
125
- this.dateTo = {
126
- ...this.dateTo,
127
- value: this.formatDate(tomorrow, format)
128
- }
129
- }
130
-
131
- /**
132
- * Format date to required string format
133
- */
134
- private formatDate(date: Date, format: string): string {
135
- const year = date.getFullYear()
136
- const month = String(date.getMonth() + 1).padStart(2, '0')
137
- const day = String(date.getDate()).padStart(2, '0')
138
-
139
- if (format === 'YYYY-MM-DD') {
140
- return `${year}-${month}-${day}`
141
- } else {
142
- const hours = String(date.getHours()).padStart(2, '0')
143
- const minutes = String(date.getMinutes()).padStart(2, '0')
144
- return `${year}-${month}-${day}T${hours}:${minutes}`
145
- }
146
- }
147
-
148
- /**
149
- * Parse date string to Date object
150
- */
151
- private parseDate(dateStr: string): Date | null {
152
- if (!dateStr) return null
153
- const date = new Date(dateStr)
154
- return isNaN(date.getTime()) ? null : date
155
- }
156
-
157
- /**
158
- * Calculate days between two dates
159
- */
160
- private getDaysBetween(date1: Date, date2: Date): number {
161
- const msPerDay = 24 * 60 * 60 * 1000
162
- return Math.floor((date2.getTime() - date1.getTime()) / msPerDay)
163
- }
164
-
165
- /**
166
- * Handle from date change with validation and auto-correction
167
- */
168
- private handleDateFromChange(e: Event) {
169
- const input = e.target as HTMLInputElement
170
- const newValue = input.value
171
-
172
- // Update the value
173
- this.dateFrom = { ...this.dateFrom, value: newValue }
174
-
175
- // Clear previous errors
176
- this.validationState = { ...this.validationState, dateFromError: '', rangeError: '' }
177
-
178
- if (!newValue) {
179
- // Allow empty for optional fields
180
- if (!this.required) {
181
- this.emitChange()
182
- return
183
- }
184
- this.validationState = { ...this.validationState, dateFromError: 'Start date is required' }
185
- this.error = true
186
- return
187
- }
188
-
189
- // Validate and potentially auto-correct
190
- this.validateAndCorrect('from')
191
- }
192
-
193
- /**
194
- * Handle to date change with validation and auto-correction
195
- */
196
- private handleDateToChange(e: Event) {
197
- const input = e.target as HTMLInputElement
198
- const newValue = input.value
199
-
200
- // Update the value
201
- this.dateTo = { ...this.dateTo, value: newValue }
202
-
203
- // Clear previous errors
204
- this.validationState = { ...this.validationState, dateToError: '', rangeError: '' }
205
-
206
- if (!newValue) {
207
- // Allow empty for optional fields
208
- if (!this.required) {
209
- this.emitChange()
210
- return
211
- }
212
- this.validationState = { ...this.validationState, dateToError: 'End date is required' }
213
- this.error = true
214
- return
215
- }
216
-
217
- // Validate and potentially auto-correct
218
- this.validateAndCorrect('to')
219
- }
220
-
221
- /**
222
- * Validate dates and auto-correct if enabled
223
- */
224
- private validateAndCorrect(changedField?: 'from' | 'to') {
225
- const fromDate = this.parseDate(this.dateFrom.value)
226
- const toDate = this.parseDate(this.dateTo.value)
227
-
228
- // Reset validation state
229
- let hasError = false
230
- const newValidationState = { dateFromError: '', dateToError: '', rangeError: '' }
231
-
232
- // Validate individual dates
233
- if (this.dateFrom.value && !fromDate) {
234
- newValidationState.dateFromError = 'Invalid date format'
235
- hasError = true
236
- }
237
-
238
- if (this.dateTo.value && !toDate) {
239
- newValidationState.dateToError = 'Invalid date format'
240
- hasError = true
241
- }
242
-
243
- // If both dates are valid, check range constraints
244
- if (fromDate && toDate) {
245
- const daysBetween = this.getDaysBetween(fromDate, toDate)
246
-
247
- // Check if from date is after to date
248
- if (fromDate > toDate) {
249
- if (this.autoCorrect) {
250
- // Auto-correct based on which field changed
251
- if (changedField === 'from') {
252
- // User changed from date, adjust to date
253
- const newToDate = new Date(fromDate)
254
- newToDate.setDate(newToDate.getDate() + this.defaultGap)
255
- this.dateTo = {
256
- ...this.dateTo,
257
- value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
258
- }
259
- } else if (changedField === 'to') {
260
- // User changed to date, adjust from date
261
- const newFromDate = new Date(toDate)
262
- newFromDate.setDate(newFromDate.getDate() - this.defaultGap)
263
- this.dateFrom = {
264
- ...this.dateFrom,
265
- value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
266
- }
267
- } else {
268
- // No specific field changed, swap them
269
- const tempValue = this.dateFrom.value
270
- this.dateFrom = { ...this.dateFrom, value: this.dateTo.value }
271
- this.dateTo = { ...this.dateTo, value: tempValue }
272
- }
273
- // Re-validate after correction
274
- this.validateAndCorrect()
275
- return
276
- } else {
277
- newValidationState.rangeError = 'End date must be after start date'
278
- hasError = true
279
- }
280
- }
281
-
282
- // Check same date constraint
283
- if (!this.allowSameDate && daysBetween === 0) {
284
- if (this.autoCorrect && changedField) {
285
- // Auto-correct by adjusting the other date
286
- if (changedField === 'from') {
287
- const newToDate = new Date(fromDate)
288
- newToDate.setDate(newToDate.getDate() + this.defaultGap)
289
- this.dateTo = {
290
- ...this.dateTo,
291
- value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
292
- }
293
- } else {
294
- const newFromDate = new Date(toDate)
295
- newFromDate.setDate(newFromDate.getDate() - this.defaultGap)
296
- this.dateFrom = {
297
- ...this.dateFrom,
298
- value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
299
- }
300
- }
301
- // Re-validate after correction
302
- this.validateAndCorrect()
303
- return
304
- } else {
305
- newValidationState.rangeError = 'Start and end dates cannot be the same'
306
- hasError = true
307
- }
308
- }
309
-
310
- // Check minimum gap
311
- if (this.minGap > 0 && daysBetween < this.minGap) {
312
- if (this.autoCorrect && changedField) {
313
- // Auto-correct to maintain minimum gap
314
- if (changedField === 'from') {
315
- const newToDate = new Date(fromDate)
316
- newToDate.setDate(newToDate.getDate() + this.minGap)
317
- this.dateTo = {
318
- ...this.dateTo,
319
- value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
320
- }
321
- } else {
322
- const newFromDate = new Date(toDate)
323
- newFromDate.setDate(newFromDate.getDate() - this.minGap)
324
- this.dateFrom = {
325
- ...this.dateFrom,
326
- value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
327
- }
328
- }
329
- // Re-validate after correction
330
- this.validateAndCorrect()
331
- return
332
- } else {
333
- newValidationState.rangeError = `Minimum ${this.minGap} day${this.minGap > 1 ? 's' : ''} required between dates`
334
- hasError = true
335
- }
336
- }
337
-
338
- // Check maximum gap
339
- if (this.maxGap !== undefined && daysBetween > this.maxGap) {
340
- if (this.autoCorrect && changedField) {
341
- // Auto-correct to maintain maximum gap
342
- if (changedField === 'from') {
343
- const newToDate = new Date(fromDate)
344
- newToDate.setDate(newToDate.getDate() + this.maxGap)
345
- this.dateTo = {
346
- ...this.dateTo,
347
- value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
348
- }
349
- } else {
350
- const newFromDate = new Date(toDate)
351
- newFromDate.setDate(newFromDate.getDate() - this.maxGap)
352
- this.dateFrom = {
353
- ...this.dateFrom,
354
- value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
355
- }
356
- }
357
- // Re-validate after correction
358
- this.validateAndCorrect()
359
- return
360
- } else {
361
- newValidationState.rangeError = `Maximum ${this.maxGap} day${this.maxGap > 1 ? 's' : ''} allowed between dates`
362
- hasError = true
363
- }
364
- }
365
-
366
- // Check against min/max date constraints
367
- if (this.minDate) {
368
- const minDateObj = this.parseDate(this.minDate)
369
- if (minDateObj && fromDate < minDateObj) {
370
- newValidationState.dateFromError = 'Date is before minimum allowed date'
371
- hasError = true
372
- }
373
- }
374
-
375
- if (this.maxDate) {
376
- const maxDateObj = this.parseDate(this.maxDate)
377
- if (maxDateObj && toDate > maxDateObj) {
378
- newValidationState.dateToError = 'Date is after maximum allowed date'
379
- hasError = true
380
- }
381
- }
382
- }
383
-
384
- // Update validation state
385
- this.validationState = newValidationState
386
- this.error = hasError
387
-
388
- // Emit change event with validation status
389
- this.emitChange()
390
- }
391
-
392
- /**
393
- * Get computed min date for the "to" field based on "from" value
394
- */
395
- private getComputedMinDateTo(): string | undefined {
396
- if (!this.dateFrom.value) return this.minDate
397
-
398
- const fromDate = this.parseDate(this.dateFrom.value)
399
- if (!fromDate) return this.minDate
400
-
401
- // Calculate minimum date based on constraints
402
- const minToDate = new Date(fromDate)
403
-
404
- if (!this.allowSameDate) {
405
- minToDate.setDate(minToDate.getDate() + 1)
406
- }
407
-
408
- if (this.minGap > 0) {
409
- minToDate.setDate(fromDate.getDate() + this.minGap)
410
- }
411
-
412
- // Compare with global minDate if set
413
- if (this.minDate) {
414
- const globalMin = this.parseDate(this.minDate)
415
- if (globalMin && globalMin > minToDate) {
416
- return this.minDate
417
- }
418
- }
419
-
420
- return this.formatDate(minToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
421
- }
422
-
423
- /**
424
- * Get computed max date for the "from" field based on "to" value
425
- */
426
- private getComputedMaxDateFrom(): string | undefined {
427
- if (!this.dateTo.value) return this.maxDate
428
-
429
- const toDate = this.parseDate(this.dateTo.value)
430
- if (!toDate) return this.maxDate
431
-
432
- // Calculate maximum date based on constraints
433
- const maxFromDate = new Date(toDate)
434
-
435
- if (!this.allowSameDate) {
436
- maxFromDate.setDate(maxFromDate.getDate() - 1)
437
- }
438
-
439
- if (this.minGap > 0) {
440
- maxFromDate.setDate(toDate.getDate() - this.minGap)
441
- }
442
-
443
- // Compare with global maxDate if set
444
- if (this.maxDate) {
445
- const globalMax = this.parseDate(this.maxDate)
446
- if (globalMax && globalMax < maxFromDate) {
447
- return this.maxDate
448
- }
449
- }
450
-
451
- return this.formatDate(maxFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
452
- }
453
-
454
- emitChange() {
455
- const isValid = !this.error &&
456
- !!this.dateFrom.value &&
457
- !!this.dateTo.value &&
458
- !this.validationState.dateFromError &&
459
- !this.validationState.dateToError &&
460
- !this.validationState.rangeError
461
-
462
- this.dispatchEvent(new CustomEvent<SchmancyDateRangeInlineChangeEvent['detail']>('change', {
463
- detail: {
464
- dateFrom: this.dateFrom.value,
465
- dateTo: this.dateTo.value,
466
- isValid
467
- },
468
- bubbles: true,
469
- composed: true
470
- }))
471
- }
472
-
473
- protected render() {
474
- // Determine which error to show on each input
475
- const fromError = this.validationState.dateFromError || this.validationState.rangeError
476
- const toError = this.validationState.dateToError || this.validationState.rangeError
477
-
478
- return html`
479
- <div class="w-full">
480
- <div class="flex items-start gap-2 w-full">
481
- <div class="flex-1">
482
- <schmancy-input
483
- .type=${this.type}
484
- .label=${this.dateFrom.label}
485
- .value=${this.dateFrom.value}
486
- .min=${this.minDate}
487
- .max=${this.getComputedMaxDateFrom()}
488
- @change=${this.handleDateFromChange}
489
- .error=${!!fromError}
490
- .hint=${fromError || ''}
491
- .required=${this.required}
492
- .disabled=${this.disabled}
493
- size=${this.compact ? 'sm' : 'md'}
494
- ></schmancy-input>
495
- </div>
496
-
497
- <div class="flex items-center justify-center ${this.compact ? 'pt-8' : 'pt-10'} px-1">
498
- <schmancy-icon class="text-surface-onVariant opacity-50">
499
- arrow_forward
500
- </schmancy-icon>
501
- </div>
502
-
503
- <div class="flex-1">
504
- <schmancy-input
505
- .type=${this.type}
506
- .label=${this.dateTo.label}
507
- .value=${this.dateTo.value}
508
- .min=${this.getComputedMinDateTo()}
509
- .max=${this.maxDate}
510
- @change=${this.handleDateToChange}
511
- .error=${!!toError}
512
- .hint=${toError || ''}
513
- .required=${this.required}
514
- .disabled=${this.disabled}
515
- size=${this.compact ? 'sm' : 'md'}
516
- ></schmancy-input>
517
- </div>
518
- </div>
519
- </div>
520
- `
521
- }
522
- }
1
+ import { html } from 'lit'
2
+ import { customElement, property, state } from 'lit/decorators.js'
3
+ import { SchmancyFormField } from '@mixins/index'
4
+
5
+ declare global {
6
+ interface HTMLElementTagNameMap {
7
+ 'schmancy-date-range-inline': SchmancyDateRangeInline
8
+ }
9
+ }
10
+
11
+ export type SchmancyDateRangeInlineChangeEvent = CustomEvent<{
12
+ dateFrom: string
13
+ dateTo: string
14
+ isValid: boolean
15
+ }>
16
+
17
+ /**
18
+ * Smart inline date range picker that handles all the heavy lifting.
19
+ * Auto-corrects invalid ranges, provides smart defaults, and validates dates.
20
+ */
21
+ @customElement('schmancy-date-range-inline')
22
+ export default class SchmancyDateRangeInline extends SchmancyFormField() {
23
+ /**
24
+ * Input type - 'date' or 'datetime-local'
25
+ */
26
+ @property({ type: String })
27
+ type: 'date' | 'datetime-local' = 'date'
28
+
29
+ /**
30
+ * From date configuration
31
+ */
32
+ @property({ type: Object })
33
+ dateFrom: { label: string; value: string } = { label: 'From', value: '' }
34
+
35
+ /**
36
+ * To date configuration
37
+ */
38
+ @property({ type: Object })
39
+ dateTo: { label: string; value: string } = { label: 'To', value: '' }
40
+
41
+ /**
42
+ * Minimum allowed date
43
+ */
44
+ @property({ type: String })
45
+ minDate?: string
46
+
47
+ /**
48
+ * Maximum allowed date
49
+ */
50
+ @property({ type: String })
51
+ maxDate?: string
52
+
53
+ /**
54
+ * Compact mode for smaller UI
55
+ */
56
+ @property({ type: Boolean })
57
+ compact = false
58
+
59
+ /**
60
+ * Auto-correct invalid date ranges
61
+ */
62
+ @property({ type: Boolean })
63
+ autoCorrect = true
64
+
65
+ /**
66
+ * Minimum gap between dates (in days)
67
+ */
68
+ @property({ type: Number })
69
+ minGap = 0
70
+
71
+ /**
72
+ * Maximum gap between dates (in days)
73
+ */
74
+ @property({ type: Number })
75
+ maxGap?: number
76
+
77
+ /**
78
+ * Default gap when auto-setting dates (in days)
79
+ */
80
+ @property({ type: Number })
81
+ defaultGap = 1
82
+
83
+ /**
84
+ * Whether to allow same date selection
85
+ */
86
+ @property({ type: Boolean })
87
+ allowSameDate = false
88
+
89
+ /**
90
+ * Internal validation state
91
+ */
92
+ @state()
93
+ private validationState = {
94
+ dateFromError: '',
95
+ dateToError: '',
96
+ rangeError: '',
97
+ }
98
+
99
+ connectedCallback() {
100
+ super.connectedCallback()
101
+ // Initialize with smart defaults if no values provided
102
+ if (!this.dateFrom.value && !this.dateTo.value) {
103
+ this.setSmartDefaults()
104
+ } else {
105
+ // Validate initial values
106
+ this.validateAndCorrect()
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Set smart default dates based on context
112
+ */
113
+ private setSmartDefaults() {
114
+ const today = new Date()
115
+ const tomorrow = new Date(today)
116
+ tomorrow.setDate(tomorrow.getDate() + this.defaultGap)
117
+
118
+ const format = this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'
119
+
120
+ this.dateFrom = {
121
+ ...this.dateFrom,
122
+ value: this.formatDate(today, format),
123
+ }
124
+
125
+ this.dateTo = {
126
+ ...this.dateTo,
127
+ value: this.formatDate(tomorrow, format),
128
+ }
129
+ }
130
+
131
+ /**
132
+ * Format date to required string format
133
+ */
134
+ private formatDate(date: Date, format: string): string {
135
+ const year = date.getFullYear()
136
+ const month = String(date.getMonth() + 1).padStart(2, '0')
137
+ const day = String(date.getDate()).padStart(2, '0')
138
+
139
+ if (format === 'YYYY-MM-DD') {
140
+ return `${year}-${month}-${day}`
141
+ } else {
142
+ const hours = String(date.getHours()).padStart(2, '0')
143
+ const minutes = String(date.getMinutes()).padStart(2, '0')
144
+ return `${year}-${month}-${day}T${hours}:${minutes}`
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Parse date string to Date object
150
+ */
151
+ private parseDate(dateStr: string): Date | null {
152
+ if (!dateStr) return null
153
+ const date = new Date(dateStr)
154
+ return isNaN(date.getTime()) ? null : date
155
+ }
156
+
157
+ /**
158
+ * Calculate days between two dates
159
+ */
160
+ private getDaysBetween(date1: Date, date2: Date): number {
161
+ const msPerDay = 24 * 60 * 60 * 1000
162
+ return Math.floor((date2.getTime() - date1.getTime()) / msPerDay)
163
+ }
164
+
165
+ /**
166
+ * Handle from date change with validation and auto-correction
167
+ */
168
+ private handleDateFromChange(e: Event) {
169
+ const input = e.target as HTMLInputElement
170
+ const newValue = input.value
171
+
172
+ // Update the value
173
+ this.dateFrom = { ...this.dateFrom, value: newValue }
174
+
175
+ // Clear previous errors
176
+ this.validationState = { ...this.validationState, dateFromError: '', rangeError: '' }
177
+
178
+ if (!newValue) {
179
+ // Allow empty for optional fields
180
+ if (!this.required) {
181
+ this.emitChange()
182
+ return
183
+ }
184
+ this.validationState = { ...this.validationState, dateFromError: 'Start date is required' }
185
+ this.error = true
186
+ return
187
+ }
188
+
189
+ // Validate and potentially auto-correct
190
+ this.validateAndCorrect('from')
191
+ }
192
+
193
+ /**
194
+ * Handle to date change with validation and auto-correction
195
+ */
196
+ private handleDateToChange(e: Event) {
197
+ const input = e.target as HTMLInputElement
198
+ const newValue = input.value
199
+
200
+ // Update the value
201
+ this.dateTo = { ...this.dateTo, value: newValue }
202
+
203
+ // Clear previous errors
204
+ this.validationState = { ...this.validationState, dateToError: '', rangeError: '' }
205
+
206
+ if (!newValue) {
207
+ // Allow empty for optional fields
208
+ if (!this.required) {
209
+ this.emitChange()
210
+ return
211
+ }
212
+ this.validationState = { ...this.validationState, dateToError: 'End date is required' }
213
+ this.error = true
214
+ return
215
+ }
216
+
217
+ // Validate and potentially auto-correct
218
+ this.validateAndCorrect('to')
219
+ }
220
+
221
+ /**
222
+ * Validate dates and auto-correct if enabled
223
+ */
224
+ private validateAndCorrect(changedField?: 'from' | 'to') {
225
+ const fromDate = this.parseDate(this.dateFrom.value)
226
+ const toDate = this.parseDate(this.dateTo.value)
227
+
228
+ // Reset validation state
229
+ let hasError = false
230
+ const newValidationState = { dateFromError: '', dateToError: '', rangeError: '' }
231
+
232
+ // Validate individual dates
233
+ if (this.dateFrom.value && !fromDate) {
234
+ newValidationState.dateFromError = 'Invalid date format'
235
+ hasError = true
236
+ }
237
+
238
+ if (this.dateTo.value && !toDate) {
239
+ newValidationState.dateToError = 'Invalid date format'
240
+ hasError = true
241
+ }
242
+
243
+ // If both dates are valid, check range constraints
244
+ if (fromDate && toDate) {
245
+ const daysBetween = this.getDaysBetween(fromDate, toDate)
246
+
247
+ // Check if from date is after to date
248
+ if (fromDate > toDate) {
249
+ if (this.autoCorrect) {
250
+ // Auto-correct based on which field changed
251
+ if (changedField === 'from') {
252
+ // User changed from date, adjust to date
253
+ const newToDate = new Date(fromDate)
254
+ newToDate.setDate(newToDate.getDate() + this.defaultGap)
255
+ this.dateTo = {
256
+ ...this.dateTo,
257
+ value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
258
+ }
259
+ } else if (changedField === 'to') {
260
+ // User changed to date, adjust from date
261
+ const newFromDate = new Date(toDate)
262
+ newFromDate.setDate(newFromDate.getDate() - this.defaultGap)
263
+ this.dateFrom = {
264
+ ...this.dateFrom,
265
+ value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
266
+ }
267
+ } else {
268
+ // No specific field changed, swap them
269
+ const tempValue = this.dateFrom.value
270
+ this.dateFrom = { ...this.dateFrom, value: this.dateTo.value }
271
+ this.dateTo = { ...this.dateTo, value: tempValue }
272
+ }
273
+ // Re-validate after correction
274
+ this.validateAndCorrect()
275
+ return
276
+ } else {
277
+ newValidationState.rangeError = 'End date must be after start date'
278
+ hasError = true
279
+ }
280
+ }
281
+
282
+ // Check same date constraint
283
+ if (!this.allowSameDate && daysBetween === 0) {
284
+ if (this.autoCorrect && changedField) {
285
+ // Auto-correct by adjusting the other date
286
+ if (changedField === 'from') {
287
+ const newToDate = new Date(fromDate)
288
+ newToDate.setDate(newToDate.getDate() + this.defaultGap)
289
+ this.dateTo = {
290
+ ...this.dateTo,
291
+ value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
292
+ }
293
+ } else {
294
+ const newFromDate = new Date(toDate)
295
+ newFromDate.setDate(newFromDate.getDate() - this.defaultGap)
296
+ this.dateFrom = {
297
+ ...this.dateFrom,
298
+ value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
299
+ }
300
+ }
301
+ // Re-validate after correction
302
+ this.validateAndCorrect()
303
+ return
304
+ } else {
305
+ newValidationState.rangeError = 'Start and end dates cannot be the same'
306
+ hasError = true
307
+ }
308
+ }
309
+
310
+ // Check minimum gap
311
+ if (this.minGap > 0 && daysBetween < this.minGap) {
312
+ if (this.autoCorrect && changedField) {
313
+ // Auto-correct to maintain minimum gap
314
+ if (changedField === 'from') {
315
+ const newToDate = new Date(fromDate)
316
+ newToDate.setDate(newToDate.getDate() + this.minGap)
317
+ this.dateTo = {
318
+ ...this.dateTo,
319
+ value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
320
+ }
321
+ } else {
322
+ const newFromDate = new Date(toDate)
323
+ newFromDate.setDate(newFromDate.getDate() - this.minGap)
324
+ this.dateFrom = {
325
+ ...this.dateFrom,
326
+ value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
327
+ }
328
+ }
329
+ // Re-validate after correction
330
+ this.validateAndCorrect()
331
+ return
332
+ } else {
333
+ newValidationState.rangeError = `Minimum ${this.minGap} day${this.minGap > 1 ? 's' : ''} required between dates`
334
+ hasError = true
335
+ }
336
+ }
337
+
338
+ // Check maximum gap
339
+ if (this.maxGap !== undefined && daysBetween > this.maxGap) {
340
+ if (this.autoCorrect && changedField) {
341
+ // Auto-correct to maintain maximum gap
342
+ if (changedField === 'from') {
343
+ const newToDate = new Date(fromDate)
344
+ newToDate.setDate(newToDate.getDate() + this.maxGap)
345
+ this.dateTo = {
346
+ ...this.dateTo,
347
+ value: this.formatDate(newToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
348
+ }
349
+ } else {
350
+ const newFromDate = new Date(toDate)
351
+ newFromDate.setDate(newFromDate.getDate() - this.maxGap)
352
+ this.dateFrom = {
353
+ ...this.dateFrom,
354
+ value: this.formatDate(newFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD'),
355
+ }
356
+ }
357
+ // Re-validate after correction
358
+ this.validateAndCorrect()
359
+ return
360
+ } else {
361
+ newValidationState.rangeError = `Maximum ${this.maxGap} day${this.maxGap > 1 ? 's' : ''} allowed between dates`
362
+ hasError = true
363
+ }
364
+ }
365
+
366
+ // Check against min/max date constraints
367
+ if (this.minDate) {
368
+ const minDateObj = this.parseDate(this.minDate)
369
+ if (minDateObj && fromDate < minDateObj) {
370
+ newValidationState.dateFromError = 'Date is before minimum allowed date'
371
+ hasError = true
372
+ }
373
+ }
374
+
375
+ if (this.maxDate) {
376
+ const maxDateObj = this.parseDate(this.maxDate)
377
+ if (maxDateObj && toDate > maxDateObj) {
378
+ newValidationState.dateToError = 'Date is after maximum allowed date'
379
+ hasError = true
380
+ }
381
+ }
382
+ }
383
+
384
+ // Update validation state
385
+ this.validationState = newValidationState
386
+ this.error = hasError
387
+
388
+ // Emit change event with validation status
389
+ this.emitChange()
390
+ }
391
+
392
+ /**
393
+ * Get computed min date for the "to" field based on "from" value
394
+ */
395
+ private getComputedMinDateTo(): string | undefined {
396
+ if (!this.dateFrom.value) return this.minDate
397
+
398
+ const fromDate = this.parseDate(this.dateFrom.value)
399
+ if (!fromDate) return this.minDate
400
+
401
+ // Calculate minimum date based on constraints
402
+ const minToDate = new Date(fromDate)
403
+
404
+ if (!this.allowSameDate) {
405
+ minToDate.setDate(minToDate.getDate() + 1)
406
+ }
407
+
408
+ if (this.minGap > 0) {
409
+ minToDate.setDate(fromDate.getDate() + this.minGap)
410
+ }
411
+
412
+ // Compare with global minDate if set
413
+ if (this.minDate) {
414
+ const globalMin = this.parseDate(this.minDate)
415
+ if (globalMin && globalMin > minToDate) {
416
+ return this.minDate
417
+ }
418
+ }
419
+
420
+ return this.formatDate(minToDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
421
+ }
422
+
423
+ /**
424
+ * Get computed max date for the "from" field based on "to" value
425
+ */
426
+ private getComputedMaxDateFrom(): string | undefined {
427
+ if (!this.dateTo.value) return this.maxDate
428
+
429
+ const toDate = this.parseDate(this.dateTo.value)
430
+ if (!toDate) return this.maxDate
431
+
432
+ // Calculate maximum date based on constraints
433
+ const maxFromDate = new Date(toDate)
434
+
435
+ if (!this.allowSameDate) {
436
+ maxFromDate.setDate(maxFromDate.getDate() - 1)
437
+ }
438
+
439
+ if (this.minGap > 0) {
440
+ maxFromDate.setDate(toDate.getDate() - this.minGap)
441
+ }
442
+
443
+ // Compare with global maxDate if set
444
+ if (this.maxDate) {
445
+ const globalMax = this.parseDate(this.maxDate)
446
+ if (globalMax && globalMax < maxFromDate) {
447
+ return this.maxDate
448
+ }
449
+ }
450
+
451
+ return this.formatDate(maxFromDate, this.type === 'datetime-local' ? 'YYYY-MM-DDTHH:mm' : 'YYYY-MM-DD')
452
+ }
453
+
454
+ emitChange() {
455
+ const isValid =
456
+ !this.error &&
457
+ !!this.dateFrom.value &&
458
+ !!this.dateTo.value &&
459
+ !this.validationState.dateFromError &&
460
+ !this.validationState.dateToError &&
461
+ !this.validationState.rangeError
462
+
463
+ this.dispatchEvent(
464
+ new CustomEvent<SchmancyDateRangeInlineChangeEvent['detail']>('change', {
465
+ detail: {
466
+ dateFrom: this.dateFrom.value,
467
+ dateTo: this.dateTo.value,
468
+ isValid,
469
+ },
470
+ bubbles: true,
471
+ composed: true,
472
+ }),
473
+ )
474
+ }
475
+
476
+ protected render() {
477
+ // Determine which error to show on each input
478
+ const fromError = this.validationState.dateFromError || this.validationState.rangeError
479
+ const toError = this.validationState.dateToError || this.validationState.rangeError
480
+
481
+ return html`
482
+ <div class="w-full">
483
+ <div class="flex items-start gap-2 w-full">
484
+ <div class="flex-1">
485
+ <schmancy-input
486
+ .type=${this.type}
487
+ .label=${this.dateFrom.label}
488
+ .value=${this.dateFrom.value}
489
+ .min=${this.minDate}
490
+ .max=${this.getComputedMaxDateFrom()}
491
+ @change=${this.handleDateFromChange}
492
+ .error=${!!fromError}
493
+ .hint=${fromError || ''}
494
+ .required=${this.required}
495
+ .disabled=${this.disabled}
496
+ size=${this.compact ? 'sm' : 'md'}
497
+ ></schmancy-input>
498
+ </div>
499
+
500
+ <div class="flex items-center justify-center ${this.compact ? 'pt-8' : 'pt-10'} px-1">
501
+ <schmancy-icon class="text-surface-onVariant opacity-50"> arrow_forward </schmancy-icon>
502
+ </div>
503
+
504
+ <div class="flex-1">
505
+ <schmancy-input
506
+ .type=${this.type}
507
+ .label=${this.dateTo.label}
508
+ .value=${this.dateTo.value}
509
+ .min=${this.getComputedMinDateTo()}
510
+ .max=${this.maxDate}
511
+ @change=${this.handleDateToChange}
512
+ .error=${!!toError}
513
+ .hint=${toError || ''}
514
+ .required=${this.required}
515
+ .disabled=${this.disabled}
516
+ size=${this.compact ? 'sm' : 'md'}
517
+ ></schmancy-input>
518
+ </div>
519
+ </div>
520
+ </div>
521
+ `
522
+ }
523
+ }