silver-ui 0.5.0 → 0.6.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 (480) hide show
  1. package/README.md +1 -65
  2. package/dist/{chunk-FNRYGCO3.js → chunk-2SN3KVWF.js} +4 -4
  3. package/dist/{chunk-FNRYGCO3.js.map → chunk-2SN3KVWF.js.map} +1 -1
  4. package/dist/{chunk-BSPWX2OZ.cjs → chunk-3IDT3PZC.cjs} +10 -10
  5. package/dist/{chunk-BSPWX2OZ.cjs.map → chunk-3IDT3PZC.cjs.map} +1 -1
  6. package/dist/chunk-3PEK2Q54.cjs +31 -0
  7. package/dist/chunk-3PEK2Q54.cjs.map +1 -0
  8. package/dist/{chunk-4SUQFPWH.js → chunk-45OSUS5A.js} +6 -6
  9. package/dist/{chunk-4SUQFPWH.js.map → chunk-45OSUS5A.js.map} +1 -1
  10. package/dist/{chunk-L7XJZJCM.js → chunk-4EUUZQAM.js} +5 -5
  11. package/dist/{chunk-L7XJZJCM.js.map → chunk-4EUUZQAM.js.map} +1 -1
  12. package/dist/{chunk-Q3HMGFGI.js → chunk-4JJFQZVY.js} +98 -77
  13. package/dist/chunk-4JJFQZVY.js.map +1 -0
  14. package/dist/chunk-5FQKELP6.js +28 -0
  15. package/dist/chunk-5FQKELP6.js.map +1 -0
  16. package/dist/{chunk-TTDNCN5G.cjs → chunk-5JROXZBG.cjs} +13 -39
  17. package/dist/chunk-5JROXZBG.cjs.map +1 -0
  18. package/dist/{chunk-OUZX7STE.cjs → chunk-5K3C3INR.cjs} +25 -53
  19. package/dist/chunk-5K3C3INR.cjs.map +1 -0
  20. package/dist/{chunk-AEYJ6PWC.js → chunk-5RFHYDQY.js} +16 -11
  21. package/dist/chunk-5RFHYDQY.js.map +1 -0
  22. package/dist/{chunk-PGTOVMP7.cjs → chunk-6FC5YF2O.cjs} +10 -10
  23. package/dist/{chunk-PGTOVMP7.cjs.map → chunk-6FC5YF2O.cjs.map} +1 -1
  24. package/dist/{chunk-6EYLEVC6.js → chunk-6I5QWA6A.js} +13 -6
  25. package/dist/chunk-6I5QWA6A.js.map +1 -0
  26. package/dist/{chunk-F7BFO3SD.cjs → chunk-6ZV7HGZT.cjs} +24 -8
  27. package/dist/chunk-6ZV7HGZT.cjs.map +1 -0
  28. package/dist/{chunk-2WTHSGDP.cjs → chunk-7EE6DCRP.cjs} +14 -14
  29. package/dist/{chunk-2WTHSGDP.cjs.map → chunk-7EE6DCRP.cjs.map} +1 -1
  30. package/dist/{chunk-HIH6MS5D.js → chunk-7TJ2O56S.js} +4 -4
  31. package/dist/{chunk-HIH6MS5D.js.map → chunk-7TJ2O56S.js.map} +1 -1
  32. package/dist/chunk-A2AC6WL5.cjs +4 -0
  33. package/dist/chunk-A2AC6WL5.cjs.map +1 -0
  34. package/dist/{chunk-BIJ6YDWJ.cjs → chunk-AFJEAYR4.cjs} +15 -8
  35. package/dist/chunk-AFJEAYR4.cjs.map +1 -0
  36. package/dist/chunk-AFXU6XIS.js +3 -0
  37. package/dist/chunk-AFXU6XIS.js.map +1 -0
  38. package/dist/{chunk-L5PJCLV6.js → chunk-AKAXQ4RL.js} +16 -25
  39. package/dist/chunk-AKAXQ4RL.js.map +1 -0
  40. package/dist/{chunk-OTQAREYU.js → chunk-ATK3F3MC.js} +4 -4
  41. package/dist/{chunk-OTQAREYU.js.map → chunk-ATK3F3MC.js.map} +1 -1
  42. package/dist/{chunk-2VL66QBX.js → chunk-B5QX6KGJ.js} +3 -3
  43. package/dist/{chunk-2VL66QBX.js.map → chunk-B5QX6KGJ.js.map} +1 -1
  44. package/dist/{chunk-TOQ4MGM5.js → chunk-BDFNEQR3.js} +6 -6
  45. package/dist/{chunk-TOQ4MGM5.js.map → chunk-BDFNEQR3.js.map} +1 -1
  46. package/dist/{chunk-UARQIMPS.js → chunk-BGLT7XH6.js} +5 -5
  47. package/dist/{chunk-UARQIMPS.js.map → chunk-BGLT7XH6.js.map} +1 -1
  48. package/dist/{chunk-2AWSJF22.js → chunk-BNGYGCT2.js} +8 -8
  49. package/dist/chunk-BNGYGCT2.js.map +1 -0
  50. package/dist/{chunk-TH537HOM.js → chunk-C6EWA3H2.js} +6 -6
  51. package/dist/{chunk-TH537HOM.js.map → chunk-C6EWA3H2.js.map} +1 -1
  52. package/dist/{chunk-2F5TDBRT.cjs → chunk-CABYRYVA.cjs} +8 -8
  53. package/dist/{chunk-2F5TDBRT.cjs.map → chunk-CABYRYVA.cjs.map} +1 -1
  54. package/dist/{chunk-7CTHD4G6.cjs → chunk-CNDUYO7I.cjs} +5 -5
  55. package/dist/{chunk-7CTHD4G6.cjs.map → chunk-CNDUYO7I.cjs.map} +1 -1
  56. package/dist/{chunk-3VJIUZAY.cjs → chunk-CVT7JW6C.cjs} +16 -25
  57. package/dist/chunk-CVT7JW6C.cjs.map +1 -0
  58. package/dist/{chunk-GSTINE4X.js → chunk-CZUMVOPH.js} +1771 -575
  59. package/dist/chunk-CZUMVOPH.js.map +1 -0
  60. package/dist/{chunk-MGJLBHPJ.js → chunk-DAO4UXR4.js} +4 -4
  61. package/dist/{chunk-MGJLBHPJ.js.map → chunk-DAO4UXR4.js.map} +1 -1
  62. package/dist/{chunk-HWD4HDQ5.cjs → chunk-DFEAB7Z3.cjs} +10 -10
  63. package/dist/{chunk-HWD4HDQ5.cjs.map → chunk-DFEAB7Z3.cjs.map} +1 -1
  64. package/dist/{chunk-GY2ZZR4Z.cjs → chunk-DK6USFZP.cjs} +18 -18
  65. package/dist/{chunk-GY2ZZR4Z.cjs.map → chunk-DK6USFZP.cjs.map} +1 -1
  66. package/dist/{chunk-WPMWHKJX.js → chunk-DPSAPA6B.js} +5 -5
  67. package/dist/{chunk-WPMWHKJX.js.map → chunk-DPSAPA6B.js.map} +1 -1
  68. package/dist/{chunk-AV7D3SXF.js → chunk-DWZR2AGT.js} +4 -4
  69. package/dist/{chunk-AV7D3SXF.js.map → chunk-DWZR2AGT.js.map} +1 -1
  70. package/dist/{chunk-2RZNX26F.cjs → chunk-DXUFDJHA.cjs} +12 -13
  71. package/dist/chunk-DXUFDJHA.cjs.map +1 -0
  72. package/dist/{chunk-67UUGI3M.cjs → chunk-DYMZ4DLN.cjs} +8 -8
  73. package/dist/{chunk-67UUGI3M.cjs.map → chunk-DYMZ4DLN.cjs.map} +1 -1
  74. package/dist/{chunk-JM4Q7ZQH.cjs → chunk-EEOUWM2F.cjs} +8 -8
  75. package/dist/chunk-EEOUWM2F.cjs.map +1 -0
  76. package/dist/{chunk-KC4EKXGF.js → chunk-EIJSWHG7.js} +9 -10
  77. package/dist/chunk-EIJSWHG7.js.map +1 -0
  78. package/dist/{chunk-FCUUGJTM.cjs → chunk-ENVDR66N.cjs} +132 -160
  79. package/dist/chunk-ENVDR66N.cjs.map +1 -0
  80. package/dist/{chunk-J2YKUHQM.js → chunk-ERVWZILR.js} +14 -23
  81. package/dist/chunk-ERVWZILR.js.map +1 -0
  82. package/dist/{chunk-IX26TMZD.cjs → chunk-EVCQCZMM.cjs} +5 -5
  83. package/dist/{chunk-IX26TMZD.cjs.map → chunk-EVCQCZMM.cjs.map} +1 -1
  84. package/dist/{chunk-E42WOTIC.js → chunk-FIOCTAXT.js} +3 -3
  85. package/dist/{chunk-E42WOTIC.js.map → chunk-FIOCTAXT.js.map} +1 -1
  86. package/dist/{chunk-LW3DJOF4.cjs → chunk-FLDTPAG4.cjs} +6 -6
  87. package/dist/{chunk-LW3DJOF4.cjs.map → chunk-FLDTPAG4.cjs.map} +1 -1
  88. package/dist/{chunk-XHJRAEGW.js → chunk-FQN22DO5.js} +5 -5
  89. package/dist/{chunk-XHJRAEGW.js.map → chunk-FQN22DO5.js.map} +1 -1
  90. package/dist/{chunk-XPGIWOJO.cjs → chunk-FWBYCTUB.cjs} +18 -18
  91. package/dist/chunk-FWBYCTUB.cjs.map +1 -0
  92. package/dist/{chunk-UXGHFKLA.js → chunk-G5PU2EL2.js} +4 -4
  93. package/dist/{chunk-UXGHFKLA.js.map → chunk-G5PU2EL2.js.map} +1 -1
  94. package/dist/{chunk-UXQSSRBQ.cjs → chunk-GJKRSQEA.cjs} +1781 -581
  95. package/dist/chunk-GJKRSQEA.cjs.map +1 -0
  96. package/dist/{chunk-JSAYTQTJ.cjs → chunk-GJZAGTPV.cjs} +7 -7
  97. package/dist/chunk-GJZAGTPV.cjs.map +1 -0
  98. package/dist/{chunk-BSI4BQEX.cjs → chunk-GU65FGY6.cjs} +4 -4
  99. package/dist/{chunk-BSI4BQEX.cjs.map → chunk-GU65FGY6.cjs.map} +1 -1
  100. package/dist/{chunk-W5F7PYT2.js → chunk-GUUCIG7U.js} +6 -6
  101. package/dist/{chunk-W5F7PYT2.js.map → chunk-GUUCIG7U.js.map} +1 -1
  102. package/dist/{chunk-XZZI3JYK.cjs → chunk-H5VMHDRD.cjs} +6 -6
  103. package/dist/{chunk-XZZI3JYK.cjs.map → chunk-H5VMHDRD.cjs.map} +1 -1
  104. package/dist/{chunk-ZPJW3PP7.cjs → chunk-H7VK36SZ.cjs} +16 -9
  105. package/dist/chunk-H7VK36SZ.cjs.map +1 -0
  106. package/dist/{chunk-2Y7ULSEU.js → chunk-HKGFMJFK.js} +17 -17
  107. package/dist/{chunk-2Y7ULSEU.js.map → chunk-HKGFMJFK.js.map} +1 -1
  108. package/dist/{chunk-THTVYP5V.js → chunk-HMJINNXZ.js} +21 -32
  109. package/dist/chunk-HMJINNXZ.js.map +1 -0
  110. package/dist/{chunk-VV72PGKH.cjs → chunk-HPOURAKV.cjs} +27 -27
  111. package/dist/chunk-HPOURAKV.cjs.map +1 -0
  112. package/dist/{chunk-I2NG2P5K.cjs → chunk-INQ34SVW.cjs} +5 -5
  113. package/dist/{chunk-I2NG2P5K.cjs.map → chunk-INQ34SVW.cjs.map} +1 -1
  114. package/dist/{chunk-D5OX6II7.cjs → chunk-IREOTHD3.cjs} +8 -8
  115. package/dist/chunk-IREOTHD3.cjs.map +1 -0
  116. package/dist/{chunk-GW6P4FJ4.cjs → chunk-ISWZQUVA.cjs} +25 -40
  117. package/dist/chunk-ISWZQUVA.cjs.map +1 -0
  118. package/dist/{chunk-J3X465QT.cjs → chunk-J4LJXCXB.cjs} +9 -9
  119. package/dist/{chunk-J3X465QT.cjs.map → chunk-J4LJXCXB.cjs.map} +1 -1
  120. package/dist/{chunk-PBQMHXVO.js → chunk-JC66FRQX.js} +3 -3
  121. package/dist/{chunk-PBQMHXVO.js.map → chunk-JC66FRQX.js.map} +1 -1
  122. package/dist/{chunk-S5CMLG2E.js → chunk-JHMUMJF3.js} +9 -5
  123. package/dist/chunk-JHMUMJF3.js.map +1 -0
  124. package/dist/{chunk-CUHJDV6K.js → chunk-JR353MN5.js} +6 -6
  125. package/dist/{chunk-CUHJDV6K.js.map → chunk-JR353MN5.js.map} +1 -1
  126. package/dist/{chunk-JS6MRT6M.js → chunk-K2V3IOAX.js} +4 -4
  127. package/dist/{chunk-JS6MRT6M.js.map → chunk-K2V3IOAX.js.map} +1 -1
  128. package/dist/{chunk-VH3G4IUX.js → chunk-K2WT7A64.js} +12 -38
  129. package/dist/chunk-K2WT7A64.js.map +1 -0
  130. package/dist/{chunk-OERNLR2P.js → chunk-KCI4I42U.js} +8 -8
  131. package/dist/{chunk-OERNLR2P.js.map → chunk-KCI4I42U.js.map} +1 -1
  132. package/dist/{chunk-EBJPUXFQ.js → chunk-KEPCKSDE.js} +31 -11
  133. package/dist/chunk-KEPCKSDE.js.map +1 -0
  134. package/dist/{chunk-OF5NULAO.js → chunk-KG7RHDVX.js} +7 -7
  135. package/dist/{chunk-OF5NULAO.js.map → chunk-KG7RHDVX.js.map} +1 -1
  136. package/dist/{chunk-6PIVWNUR.js → chunk-KWZMXX4F.js} +5 -5
  137. package/dist/chunk-KWZMXX4F.js.map +1 -0
  138. package/dist/{chunk-DZZEJY3J.js → chunk-LDYUVGD4.js} +120 -148
  139. package/dist/chunk-LDYUVGD4.js.map +1 -0
  140. package/dist/{chunk-VD52FLHL.js → chunk-LF6I2B7G.js} +9 -9
  141. package/dist/{chunk-VD52FLHL.js.map → chunk-LF6I2B7G.js.map} +1 -1
  142. package/dist/{chunk-3IYM5MAC.js → chunk-LLSWAAFH.js} +4 -4
  143. package/dist/{chunk-3IYM5MAC.js.map → chunk-LLSWAAFH.js.map} +1 -1
  144. package/dist/{chunk-LBGC6EC5.js → chunk-M64WMYYV.js} +15 -15
  145. package/dist/chunk-M64WMYYV.js.map +1 -0
  146. package/dist/{chunk-3Z5PF75J.cjs → chunk-MHAXS4GO.cjs} +17 -19
  147. package/dist/chunk-MHAXS4GO.cjs.map +1 -0
  148. package/dist/{chunk-TKTCN4JE.cjs → chunk-MHEPDHL5.cjs} +9 -9
  149. package/dist/{chunk-TKTCN4JE.cjs.map → chunk-MHEPDHL5.cjs.map} +1 -1
  150. package/dist/{chunk-Z7OUMVR5.cjs → chunk-NFEL5GNX.cjs} +9 -9
  151. package/dist/{chunk-Z7OUMVR5.cjs.map → chunk-NFEL5GNX.cjs.map} +1 -1
  152. package/dist/{chunk-X4I5YARV.cjs → chunk-NG2H3PYA.cjs} +11 -11
  153. package/dist/{chunk-X4I5YARV.cjs.map → chunk-NG2H3PYA.cjs.map} +1 -1
  154. package/dist/{chunk-VO4FG3L2.cjs → chunk-NW36BN7N.cjs} +17 -17
  155. package/dist/{chunk-VO4FG3L2.cjs.map → chunk-NW36BN7N.cjs.map} +1 -1
  156. package/dist/{chunk-RJEZBOSH.js → chunk-NXTDP6AX.js} +12 -14
  157. package/dist/chunk-NXTDP6AX.js.map +1 -0
  158. package/dist/{chunk-N77K3NQY.cjs → chunk-P5LMEANN.cjs} +7 -7
  159. package/dist/{chunk-N77K3NQY.cjs.map → chunk-P5LMEANN.cjs.map} +1 -1
  160. package/dist/{chunk-4HXNBLCJ.js → chunk-P7TSM63O.js} +3 -3
  161. package/dist/{chunk-4HXNBLCJ.js.map → chunk-P7TSM63O.js.map} +1 -1
  162. package/dist/chunk-PG4CZRTU.js +77 -0
  163. package/dist/chunk-PG4CZRTU.js.map +1 -0
  164. package/dist/{chunk-SUT35RHA.cjs → chunk-PHFJBQXU.cjs} +8 -8
  165. package/dist/{chunk-SUT35RHA.cjs.map → chunk-PHFJBQXU.cjs.map} +1 -1
  166. package/dist/{chunk-YJEX32HZ.cjs → chunk-PNM7MPUX.cjs} +8 -8
  167. package/dist/{chunk-YJEX32HZ.cjs.map → chunk-PNM7MPUX.cjs.map} +1 -1
  168. package/dist/{chunk-MEXR5ONE.js → chunk-PU4PBI3H.js} +5 -5
  169. package/dist/{chunk-MEXR5ONE.js.map → chunk-PU4PBI3H.js.map} +1 -1
  170. package/dist/{chunk-2GMDMZKI.cjs → chunk-PYJX2SBC.cjs} +5 -5
  171. package/dist/{chunk-2GMDMZKI.cjs.map → chunk-PYJX2SBC.cjs.map} +1 -1
  172. package/dist/{chunk-U5M4JZBX.js → chunk-PYN75QAG.js} +6 -6
  173. package/dist/chunk-PYN75QAG.js.map +1 -0
  174. package/dist/{chunk-2VAUVJVG.js → chunk-QHXI2QDK.js} +3 -3
  175. package/dist/{chunk-2VAUVJVG.js.map → chunk-QHXI2QDK.js.map} +1 -1
  176. package/dist/{chunk-RRXOSNCX.cjs → chunk-QTOFQB26.cjs} +11 -11
  177. package/dist/{chunk-RRXOSNCX.cjs.map → chunk-QTOFQB26.cjs.map} +1 -1
  178. package/dist/{chunk-DV4K35UC.cjs → chunk-QYZXTIB2.cjs} +4 -4
  179. package/dist/{chunk-DV4K35UC.cjs.map → chunk-QYZXTIB2.cjs.map} +1 -1
  180. package/dist/{chunk-FFF57VHO.cjs → chunk-R3ZS6FU6.cjs} +8 -8
  181. package/dist/{chunk-FFF57VHO.cjs.map → chunk-R3ZS6FU6.cjs.map} +1 -1
  182. package/dist/{chunk-L5JS6P62.cjs → chunk-RAMDISDK.cjs} +14 -10
  183. package/dist/chunk-RAMDISDK.cjs.map +1 -0
  184. package/dist/{chunk-SUWRSJAN.cjs → chunk-RLIBY7XB.cjs} +16 -11
  185. package/dist/chunk-RLIBY7XB.cjs.map +1 -0
  186. package/dist/{chunk-I47WOF6E.js → chunk-RU7JPU7V.js} +3 -3
  187. package/dist/{chunk-I47WOF6E.js.map → chunk-RU7JPU7V.js.map} +1 -1
  188. package/dist/{chunk-HNDDNW52.js → chunk-RXKDRZF3.js} +3 -3
  189. package/dist/{chunk-HNDDNW52.js.map → chunk-RXKDRZF3.js.map} +1 -1
  190. package/dist/{chunk-EFBSEJBD.js → chunk-S4WWBV4N.js} +22 -47
  191. package/dist/chunk-S4WWBV4N.js.map +1 -0
  192. package/dist/{chunk-6J326CN6.js → chunk-SEDUAMDW.js} +4 -4
  193. package/dist/{chunk-6J326CN6.js.map → chunk-SEDUAMDW.js.map} +1 -1
  194. package/dist/{chunk-TSKFGLGQ.cjs → chunk-SKZNSOB7.cjs} +18 -27
  195. package/dist/chunk-SKZNSOB7.cjs.map +1 -0
  196. package/dist/{chunk-YDNEAHVK.cjs → chunk-TNYAYXKC.cjs} +37 -37
  197. package/dist/{chunk-YDNEAHVK.cjs.map → chunk-TNYAYXKC.cjs.map} +1 -1
  198. package/dist/{chunk-JJNXQ7EL.js → chunk-TQDJVPHP.js} +3 -3
  199. package/dist/{chunk-JJNXQ7EL.js.map → chunk-TQDJVPHP.js.map} +1 -1
  200. package/dist/{chunk-MEUELWGO.cjs → chunk-TVWU4XBL.cjs} +8 -8
  201. package/dist/{chunk-MEUELWGO.cjs.map → chunk-TVWU4XBL.cjs.map} +1 -1
  202. package/dist/{chunk-HWP2UGOC.cjs → chunk-U4L75VA4.cjs} +126 -105
  203. package/dist/chunk-U4L75VA4.cjs.map +1 -0
  204. package/dist/{chunk-6DAZ2ZOW.cjs → chunk-U5HW5P7Q.cjs} +11 -11
  205. package/dist/{chunk-6DAZ2ZOW.cjs.map → chunk-U5HW5P7Q.cjs.map} +1 -1
  206. package/dist/{chunk-R4DGCQTA.cjs → chunk-UMS46KF4.cjs} +7 -7
  207. package/dist/{chunk-R4DGCQTA.cjs.map → chunk-UMS46KF4.cjs.map} +1 -1
  208. package/dist/{chunk-75KSHZTV.js → chunk-UT45YVPI.js} +7 -7
  209. package/dist/{chunk-75KSHZTV.js.map → chunk-UT45YVPI.js.map} +1 -1
  210. package/dist/{chunk-LKGHYNLH.js → chunk-UYZQGHFI.js} +10 -10
  211. package/dist/chunk-UYZQGHFI.js.map +1 -0
  212. package/dist/{chunk-IGJEZLHP.cjs → chunk-UZGPFPIV.cjs} +17 -17
  213. package/dist/{chunk-IGJEZLHP.cjs.map → chunk-UZGPFPIV.cjs.map} +1 -1
  214. package/dist/{chunk-Q4HAXT5C.cjs → chunk-VK7DXUGH.cjs} +31 -11
  215. package/dist/chunk-VK7DXUGH.cjs.map +1 -0
  216. package/dist/chunk-VPWNRWNO.cjs +81 -0
  217. package/dist/chunk-VPWNRWNO.cjs.map +1 -0
  218. package/dist/{chunk-K4K4FU3D.cjs → chunk-VREW3BK6.cjs} +11 -11
  219. package/dist/{chunk-K4K4FU3D.cjs.map → chunk-VREW3BK6.cjs.map} +1 -1
  220. package/dist/{chunk-ANACERIO.cjs → chunk-VRQ66IBW.cjs} +6 -6
  221. package/dist/{chunk-ANACERIO.cjs.map → chunk-VRQ66IBW.cjs.map} +1 -1
  222. package/dist/{chunk-HXIU3SIQ.cjs → chunk-VW52NVGM.cjs} +5 -5
  223. package/dist/{chunk-HXIU3SIQ.cjs.map → chunk-VW52NVGM.cjs.map} +1 -1
  224. package/dist/{chunk-5XMWGK3O.cjs → chunk-VXOIOPGZ.cjs} +25 -36
  225. package/dist/chunk-VXOIOPGZ.cjs.map +1 -0
  226. package/dist/{chunk-4RDA4W4N.js → chunk-WAWHHXSR.js} +23 -7
  227. package/dist/chunk-WAWHHXSR.js.map +1 -0
  228. package/dist/{chunk-65MJZYO6.js → chunk-WEXTGWRE.js} +14 -29
  229. package/dist/chunk-WEXTGWRE.js.map +1 -0
  230. package/dist/{chunk-ECDYAZ2R.js → chunk-WHDDBOJN.js} +5 -5
  231. package/dist/{chunk-ECDYAZ2R.js.map → chunk-WHDDBOJN.js.map} +1 -1
  232. package/dist/{chunk-ESRDHDYN.cjs → chunk-WINDLDH3.cjs} +9 -9
  233. package/dist/{chunk-ESRDHDYN.cjs.map → chunk-WINDLDH3.cjs.map} +1 -1
  234. package/dist/{chunk-ADSG24VE.js → chunk-WM7NEOME.js} +6 -6
  235. package/dist/{chunk-ADSG24VE.js.map → chunk-WM7NEOME.js.map} +1 -1
  236. package/dist/{chunk-H4L456EW.js → chunk-XTLNUYCK.js} +12 -5
  237. package/dist/chunk-XTLNUYCK.js.map +1 -0
  238. package/dist/{chunk-QO5C7TIV.js → chunk-ZSB43DEI.js} +5 -5
  239. package/dist/{chunk-QO5C7TIV.js.map → chunk-ZSB43DEI.js.map} +1 -1
  240. package/dist/{chunk-V4ZH2H2P.cjs → chunk-ZUAWNT66.cjs} +14 -14
  241. package/dist/{chunk-V4ZH2H2P.cjs.map → chunk-ZUAWNT66.cjs.map} +1 -1
  242. package/dist/components/Alert/index.cjs +10 -8
  243. package/dist/components/Alert/index.js +9 -7
  244. package/dist/components/AlertDialog/index.cjs +12 -10
  245. package/dist/components/AlertDialog/index.js +10 -8
  246. package/dist/components/AppShell/index.cjs +18 -15
  247. package/dist/components/AppShell/index.js +15 -12
  248. package/dist/components/AutocompleteInput/index.cjs +17 -14
  249. package/dist/components/AutocompleteInput/index.js +13 -10
  250. package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
  251. package/dist/components/Breadcrumbs/index.cjs +5 -10
  252. package/dist/components/Breadcrumbs/index.js +2 -7
  253. package/dist/components/Button/Button.d.ts +5 -3
  254. package/dist/components/Button/Button.d.ts.map +1 -1
  255. package/dist/components/Button/index.cjs +9 -7
  256. package/dist/components/Button/index.js +8 -6
  257. package/dist/components/Calendar/index.cjs +10 -8
  258. package/dist/components/Calendar/index.js +9 -7
  259. package/dist/components/CheckboxInput/index.cjs +9 -8
  260. package/dist/components/CheckboxInput/index.js +8 -7
  261. package/dist/components/CodeBlock/index.cjs +10 -8
  262. package/dist/components/CodeBlock/index.js +9 -7
  263. package/dist/components/ContextMenu/index.cjs +14 -12
  264. package/dist/components/ContextMenu/index.js +12 -10
  265. package/dist/components/DateInput/index.cjs +13 -11
  266. package/dist/components/DateInput/index.js +12 -10
  267. package/dist/components/DateRangeInput/index.cjs +13 -11
  268. package/dist/components/DateRangeInput/index.js +12 -10
  269. package/dist/components/DateTimeInput/index.cjs +15 -13
  270. package/dist/components/DateTimeInput/index.js +14 -12
  271. package/dist/components/DropdownMenu/index.cjs +15 -13
  272. package/dist/components/DropdownMenu/index.js +11 -9
  273. package/dist/components/EmptyState/index.cjs +5 -5
  274. package/dist/components/EmptyState/index.js +4 -4
  275. package/dist/components/Field/index.cjs +6 -6
  276. package/dist/components/Field/index.js +4 -4
  277. package/dist/components/FileInput/index.cjs +11 -9
  278. package/dist/components/FileInput/index.js +10 -8
  279. package/dist/components/HoverCard/HoverCard.d.ts +6 -6
  280. package/dist/components/HoverCard/HoverCard.d.ts.map +1 -1
  281. package/dist/components/HoverCard/index.cjs +4 -4
  282. package/dist/components/HoverCard/index.js +2 -2
  283. package/dist/components/InputGroup/index.cjs +9 -9
  284. package/dist/components/InputGroup/index.js +5 -5
  285. package/dist/components/Item/Item.d.ts.map +1 -1
  286. package/dist/components/Item/index.cjs +7 -8
  287. package/dist/components/Item/index.js +6 -7
  288. package/dist/components/Layout/Layout.recipe.d.ts +17 -0
  289. package/dist/components/Layout/Layout.recipe.d.ts.map +1 -1
  290. package/dist/components/Layout/LayoutHeader.d.ts +6 -1
  291. package/dist/components/Layout/LayoutHeader.d.ts.map +1 -1
  292. package/dist/components/Layout/index.cjs +14 -12
  293. package/dist/components/Layout/index.js +9 -7
  294. package/dist/components/Lightbox/index.cjs +11 -9
  295. package/dist/components/Lightbox/index.js +9 -7
  296. package/dist/components/Link/Link.d.ts +4 -5
  297. package/dist/components/Link/Link.d.ts.map +1 -1
  298. package/dist/components/Link/Link.recipe.d.ts.map +1 -1
  299. package/dist/components/Link/index.cjs +9 -6
  300. package/dist/components/Link/index.js +6 -3
  301. package/dist/components/List/index.cjs +9 -10
  302. package/dist/components/List/index.js +7 -8
  303. package/dist/components/MetadataList/MetadataList.recipe.d.ts +9 -1
  304. package/dist/components/MetadataList/MetadataList.recipe.d.ts.map +1 -1
  305. package/dist/components/MetadataList/MetadataListItem.d.ts +6 -1
  306. package/dist/components/MetadataList/MetadataListItem.d.ts.map +1 -1
  307. package/dist/components/MetadataList/index.cjs +9 -6
  308. package/dist/components/MetadataList/index.js +7 -4
  309. package/dist/components/MultiSelect/index.cjs +13 -11
  310. package/dist/components/MultiSelect/index.js +12 -10
  311. package/dist/components/NumberInput/index.cjs +12 -10
  312. package/dist/components/NumberInput/index.js +11 -9
  313. package/dist/components/Pagination/index.cjs +10 -8
  314. package/dist/components/Pagination/index.js +9 -7
  315. package/dist/components/PasswordInput/index.cjs +13 -11
  316. package/dist/components/PasswordInput/index.js +12 -10
  317. package/dist/components/Popover/Popover.d.ts +13 -1
  318. package/dist/components/Popover/Popover.d.ts.map +1 -1
  319. package/dist/components/Popover/index.cjs +11 -9
  320. package/dist/components/Popover/index.js +9 -7
  321. package/dist/components/RadioGroup/index.cjs +10 -9
  322. package/dist/components/RadioGroup/index.js +8 -7
  323. package/dist/components/Schedule/CalendarEvent.d.ts +18 -4
  324. package/dist/components/Schedule/CalendarEvent.d.ts.map +1 -1
  325. package/dist/components/Schedule/DayView.d.ts +7 -1
  326. package/dist/components/Schedule/DayView.d.ts.map +1 -1
  327. package/dist/components/Schedule/ListView.d.ts.map +1 -1
  328. package/dist/components/Schedule/ListView.recipe.d.ts +56 -0
  329. package/dist/components/Schedule/ListView.recipe.d.ts.map +1 -0
  330. package/dist/components/Schedule/MonthlyView.d.ts.map +1 -1
  331. package/dist/components/Schedule/MonthlyView.recipe.d.ts +47 -0
  332. package/dist/components/Schedule/MonthlyView.recipe.d.ts.map +1 -0
  333. package/dist/components/Schedule/ScheduleEvent.recipe.d.ts +17 -0
  334. package/dist/components/Schedule/ScheduleEvent.recipe.d.ts.map +1 -1
  335. package/dist/components/Schedule/TimeGridView.d.ts +7 -1
  336. package/dist/components/Schedule/TimeGridView.d.ts.map +1 -1
  337. package/dist/components/Schedule/TimeGridView.recipe.d.ts +43 -0
  338. package/dist/components/Schedule/TimeGridView.recipe.d.ts.map +1 -0
  339. package/dist/components/Schedule/WeeklyView.d.ts +7 -1
  340. package/dist/components/Schedule/WeeklyView.d.ts.map +1 -1
  341. package/dist/components/Schedule/index.cjs +44 -21
  342. package/dist/components/Schedule/index.d.ts +6 -2
  343. package/dist/components/Schedule/index.d.ts.map +1 -1
  344. package/dist/components/Schedule/index.js +17 -10
  345. package/dist/components/Schedule/plugins/EventMovePlugin.d.ts +23 -0
  346. package/dist/components/Schedule/plugins/EventMovePlugin.d.ts.map +1 -0
  347. package/dist/components/Schedule/plugins/EventPopoverPlugin.d.ts +31 -0
  348. package/dist/components/Schedule/plugins/EventPopoverPlugin.d.ts.map +1 -0
  349. package/dist/components/Schedule/plugins/EventResizePlugin.d.ts +24 -0
  350. package/dist/components/Schedule/plugins/EventResizePlugin.d.ts.map +1 -0
  351. package/dist/components/Schedule/plugins/ScheduleEventPopoverContent.d.ts +39 -0
  352. package/dist/components/Schedule/plugins/ScheduleEventPopoverContent.d.ts.map +1 -0
  353. package/dist/components/Schedule/plugins/index.d.ts +4 -0
  354. package/dist/components/Schedule/plugins/index.d.ts.map +1 -1
  355. package/dist/components/Schedule/shared.d.ts +58 -3
  356. package/dist/components/Schedule/shared.d.ts.map +1 -1
  357. package/dist/components/Schedule/types.d.ts +47 -1
  358. package/dist/components/Schedule/types.d.ts.map +1 -1
  359. package/dist/components/SearchFilterInput/SearchFilterInputEditPopover.d.ts.map +1 -1
  360. package/dist/components/SearchFilterInput/SearchFilterInputEditPopover.recipe.d.ts +4 -0
  361. package/dist/components/SearchFilterInput/SearchFilterInputEditPopover.recipe.d.ts.map +1 -0
  362. package/dist/components/SearchFilterInput/index.cjs +32 -29
  363. package/dist/components/SearchFilterInput/index.js +24 -21
  364. package/dist/components/Select/index.cjs +15 -13
  365. package/dist/components/Select/index.js +13 -11
  366. package/dist/components/SideNav/SideNav.d.ts.map +1 -1
  367. package/dist/components/SideNav/SideNav.recipe.d.ts +26 -7
  368. package/dist/components/SideNav/SideNav.recipe.d.ts.map +1 -1
  369. package/dist/components/SideNav/SideNavItem.d.ts.map +1 -1
  370. package/dist/components/SideNav/index.cjs +18 -15
  371. package/dist/components/SideNav/index.js +12 -9
  372. package/dist/components/Slider/index.cjs +6 -6
  373. package/dist/components/Slider/index.js +5 -5
  374. package/dist/components/Spinner/index.cjs +5 -5
  375. package/dist/components/Spinner/index.js +4 -4
  376. package/dist/components/SplitButton/index.cjs +13 -11
  377. package/dist/components/SplitButton/index.js +12 -10
  378. package/dist/components/Stepper/index.cjs +5 -5
  379. package/dist/components/Stepper/index.js +4 -4
  380. package/dist/components/Switch/index.cjs +6 -6
  381. package/dist/components/Switch/index.js +5 -5
  382. package/dist/components/Table/index.cjs +54 -51
  383. package/dist/components/Table/index.js +28 -25
  384. package/dist/components/Tabs/Tab.d.ts.map +1 -1
  385. package/dist/components/Tabs/index.cjs +15 -13
  386. package/dist/components/Tabs/index.js +10 -8
  387. package/dist/components/Tag/Tag.d.ts.map +1 -1
  388. package/dist/components/Tag/index.cjs +8 -5
  389. package/dist/components/Tag/index.js +7 -4
  390. package/dist/components/TagsInput/index.cjs +15 -12
  391. package/dist/components/TagsInput/index.js +14 -11
  392. package/dist/components/Text/Heading.d.ts +5 -5
  393. package/dist/components/Text/Heading.d.ts.map +1 -1
  394. package/dist/components/Text/Text.d.ts +5 -5
  395. package/dist/components/Text/Text.d.ts.map +1 -1
  396. package/dist/components/Text/index.cjs +5 -5
  397. package/dist/components/Text/index.js +3 -3
  398. package/dist/components/TextArea/index.cjs +7 -7
  399. package/dist/components/TextArea/index.js +6 -6
  400. package/dist/components/TextInput/index.cjs +12 -10
  401. package/dist/components/TextInput/index.js +11 -9
  402. package/dist/components/Thumbnail/index.cjs +10 -8
  403. package/dist/components/Thumbnail/index.js +9 -7
  404. package/dist/components/TimeInput/index.cjs +11 -9
  405. package/dist/components/TimeInput/index.js +10 -8
  406. package/dist/components/Toast/index.cjs +12 -10
  407. package/dist/components/Toast/index.js +9 -7
  408. package/dist/components/ToggleButton/ToggleButton.recipe.d.ts.map +1 -1
  409. package/dist/components/ToggleButton/index.cjs +7 -7
  410. package/dist/components/ToggleButton/index.js +5 -5
  411. package/dist/components/Tooltip/Tooltip.d.ts +6 -6
  412. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  413. package/dist/components/Tooltip/index.cjs +4 -4
  414. package/dist/components/Tooltip/index.js +2 -2
  415. package/dist/components/TopNav/TopNavItem.d.ts.map +1 -1
  416. package/dist/components/TopNav/index.cjs +16 -13
  417. package/dist/components/TopNav/index.js +11 -8
  418. package/dist/components/TreeView/TreeViewItem.d.ts.map +1 -1
  419. package/dist/components/TreeView/index.cjs +3 -2
  420. package/dist/components/TreeView/index.js +2 -1
  421. package/dist/index.cjs +233 -214
  422. package/dist/index.cjs.map +1 -1
  423. package/dist/index.d.ts +1 -1
  424. package/dist/index.d.ts.map +1 -1
  425. package/dist/index.js +60 -57
  426. package/dist/index.js.map +1 -1
  427. package/dist/internal/ActionElement.d.ts +45 -0
  428. package/dist/internal/ActionElement.d.ts.map +1 -0
  429. package/dist/internal/HoverLayerTrigger.d.ts +3 -4
  430. package/dist/internal/HoverLayerTrigger.d.ts.map +1 -1
  431. package/dist/internal/useLayer.d.ts +12 -0
  432. package/dist/internal/useLayer.d.ts.map +1 -1
  433. package/dist/internal/useSelectListbox.d.ts +5 -5
  434. package/dist/internal/useSelectListbox.d.ts.map +1 -1
  435. package/dist/styles.css +1 -1
  436. package/package.json +1 -1
  437. package/dist/chunk-2AWSJF22.js.map +0 -1
  438. package/dist/chunk-2RZNX26F.cjs.map +0 -1
  439. package/dist/chunk-3VJIUZAY.cjs.map +0 -1
  440. package/dist/chunk-3Z5PF75J.cjs.map +0 -1
  441. package/dist/chunk-4RDA4W4N.js.map +0 -1
  442. package/dist/chunk-5XMWGK3O.cjs.map +0 -1
  443. package/dist/chunk-65MJZYO6.js.map +0 -1
  444. package/dist/chunk-6EYLEVC6.js.map +0 -1
  445. package/dist/chunk-6PIVWNUR.js.map +0 -1
  446. package/dist/chunk-AEYJ6PWC.js.map +0 -1
  447. package/dist/chunk-BIJ6YDWJ.cjs.map +0 -1
  448. package/dist/chunk-D5OX6II7.cjs.map +0 -1
  449. package/dist/chunk-DZZEJY3J.js.map +0 -1
  450. package/dist/chunk-EBJPUXFQ.js.map +0 -1
  451. package/dist/chunk-EFBSEJBD.js.map +0 -1
  452. package/dist/chunk-F7BFO3SD.cjs.map +0 -1
  453. package/dist/chunk-FCUUGJTM.cjs.map +0 -1
  454. package/dist/chunk-GSTINE4X.js.map +0 -1
  455. package/dist/chunk-GW6P4FJ4.cjs.map +0 -1
  456. package/dist/chunk-H4L456EW.js.map +0 -1
  457. package/dist/chunk-HWP2UGOC.cjs.map +0 -1
  458. package/dist/chunk-J2YKUHQM.js.map +0 -1
  459. package/dist/chunk-JM4Q7ZQH.cjs.map +0 -1
  460. package/dist/chunk-JSAYTQTJ.cjs.map +0 -1
  461. package/dist/chunk-KC4EKXGF.js.map +0 -1
  462. package/dist/chunk-L5JS6P62.cjs.map +0 -1
  463. package/dist/chunk-L5PJCLV6.js.map +0 -1
  464. package/dist/chunk-LBGC6EC5.js.map +0 -1
  465. package/dist/chunk-LKGHYNLH.js.map +0 -1
  466. package/dist/chunk-OUZX7STE.cjs.map +0 -1
  467. package/dist/chunk-Q3HMGFGI.js.map +0 -1
  468. package/dist/chunk-Q4HAXT5C.cjs.map +0 -1
  469. package/dist/chunk-RJEZBOSH.js.map +0 -1
  470. package/dist/chunk-S5CMLG2E.js.map +0 -1
  471. package/dist/chunk-SUWRSJAN.cjs.map +0 -1
  472. package/dist/chunk-THTVYP5V.js.map +0 -1
  473. package/dist/chunk-TSKFGLGQ.cjs.map +0 -1
  474. package/dist/chunk-TTDNCN5G.cjs.map +0 -1
  475. package/dist/chunk-U5M4JZBX.js.map +0 -1
  476. package/dist/chunk-UXQSSRBQ.cjs.map +0 -1
  477. package/dist/chunk-VH3G4IUX.js.map +0 -1
  478. package/dist/chunk-VV72PGKH.cjs.map +0 -1
  479. package/dist/chunk-XPGIWOJO.cjs.map +0 -1
  480. package/dist/chunk-ZPJW3PP7.cjs.map +0 -1
@@ -1,20 +1,27 @@
1
- import { DropdownMenu, DropdownMenuItem } from './chunk-TH537HOM.js';
1
+ import { ToggleButtonGroup, ToggleButton } from './chunk-XTLNUYCK.js';
2
+ import { MetadataList, MetadataListItem } from './chunk-WAWHHXSR.js';
3
+ import { DropdownMenu, DropdownMenuItem } from './chunk-C6EWA3H2.js';
2
4
  import { ButtonGroup } from './chunk-D3CHBU46.js';
3
5
  import { plainDateToInstant, plainDateFromInstant, plainDateIsEqual, plainDateFormat, DATE_FORMAT_WITH_WEEKDAY, DATE_FORMAT_MONTH_YEAR, plainDateIsBefore, plainDateIsAfter, plainDateDayOfWeek } from './chunk-5HPXUDX6.js';
4
6
  import { getBrowserTimezoneID, nowEpochMilliseconds } from './chunk-OX4ZMUF4.js';
5
- import { Popover } from './chunk-S5CMLG2E.js';
6
- import { Button } from './chunk-THTVYP5V.js';
7
- import { Spinner } from './chunk-2VAUVJVG.js';
8
- import { Heading, Text } from './chunk-RJEZBOSH.js';
9
- import { Tooltip } from './chunk-6PIVWNUR.js';
7
+ import { Layout, LayoutHeader, LayoutFooter, LayoutContent } from './chunk-6I5QWA6A.js';
8
+ import { Popover, usePopover } from './chunk-JHMUMJF3.js';
9
+ import { Link } from './chunk-S4WWBV4N.js';
10
+ import { Button } from './chunk-HMJINNXZ.js';
11
+ import { Spinner } from './chunk-QHXI2QDK.js';
12
+ import { Text, Heading } from './chunk-NXTDP6AX.js';
13
+ import { Tooltip } from './chunk-KWZMXX4F.js';
14
+ import { useLatest_default } from './chunk-KEPCKSDE.js';
15
+ import { isReactNode } from './chunk-2PSZAWLC.js';
10
16
  import { Icon } from './chunk-IUW777WZ.js';
11
17
  import { sva } from './chunk-IAVZKGZS.js';
18
+ import { cva } from './chunk-FMEIPGUP.js';
12
19
  import { css } from './chunk-OD4DHHZH.js';
13
20
  import { cx } from './chunk-PPNETWIP.js';
14
21
  import { Temporal } from '@js-temporal/polyfill';
15
- import { createContext, use, useMemo, useState, Suspense, useSyncExternalStore, useCallback } from 'react';
22
+ import { createContext, use, useRef, useCallback, useMemo, useState, Suspense, useSyncExternalStore } from 'react';
16
23
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
- import { ChevronLeft, ChevronRight, Check } from 'lucide-react';
24
+ import { Pencil, Trash2, X, CalendarDays, MapPin, AlignLeft, Tag, ChevronLeft, ChevronRight, Check } from 'lucide-react';
18
25
 
19
26
  var DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
20
27
  function createEventFromISO({
@@ -60,6 +67,22 @@ var scheduleEventRecipe = sva({
60
67
  color: "var(--schedule-event-fg)",
61
68
  _hover: {
62
69
  bg: "var(--schedule-event-bg-hover)"
70
+ },
71
+ // Active state: the pill's popover is open. Interactive pills carry
72
+ // `aria-expanded`, so this only matches the open trigger. The outline uses
73
+ // the category accent color and composes cleanly with the color/past
74
+ // background overrides.
75
+ '&[aria-expanded="true"]': {
76
+ outlineWidth: "focus",
77
+ outlineStyle: "solid",
78
+ outlineColor: "var(--schedule-event-dot)",
79
+ outlineOffset: "1px"
80
+ },
81
+ '&[data-state="past"]': {
82
+ "--schedule-event-bg": "color-mix(in srgb, var(--schedule-event-dot) 10%, token(colors.bg))",
83
+ "--schedule-event-bg-hover": "color-mix(in srgb, var(--schedule-event-dot) 14%, token(colors.bg))",
84
+ "--schedule-event-border": "color-mix(in srgb, var(--schedule-event-dot) 48%, token(colors.border))",
85
+ "--schedule-event-fg": "color-mix(in srgb, var(--schedule-event-fg-base) 52%, token(colors.fg.muted))"
63
86
  }
64
87
  },
65
88
  dot: {
@@ -115,6 +138,26 @@ var scheduleEventRecipe = sva({
115
138
  true: { event: { w: "full" } },
116
139
  false: {}
117
140
  },
141
+ // Applied when the pill is rendered as a clickable <button> trigger (event
142
+ // popover plugin). Resets user-agent button styling so the pill looks
143
+ // identical to its static <span> form.
144
+ isInteractive: {
145
+ true: {
146
+ event: {
147
+ appearance: "none",
148
+ textAlign: "inherit",
149
+ font: "inherit",
150
+ m: 0,
151
+ cursor: "pointer",
152
+ _focusVisible: {
153
+ outlineWidth: "focus",
154
+ outlineStyle: "solid",
155
+ outlineColor: "primary"
156
+ }
157
+ }
158
+ },
159
+ false: {}
160
+ },
118
161
  color: {
119
162
  blue: {
120
163
  event: {
@@ -230,6 +273,9 @@ var scheduleEventRecipe = sva({
230
273
  isPast: {
231
274
  true: {
232
275
  event: {
276
+ // Keep `isPast` in the recipe API for class-based assertions and
277
+ // callers, but rely on `[data-state="past"]` for the actual variable
278
+ // overrides so the color variant cannot win by atomic CSS order.
233
279
  "--schedule-event-bg": "color-mix(in srgb, var(--schedule-event-dot) 10%, token(colors.bg))",
234
280
  "--schedule-event-bg-hover": "color-mix(in srgb, var(--schedule-event-dot) 14%, token(colors.bg))",
235
281
  "--schedule-event-border": "color-mix(in srgb, var(--schedule-event-dot) 48%, token(colors.border))",
@@ -243,9 +289,208 @@ var scheduleEventRecipe = sva({
243
289
  layout: "inline",
244
290
  color: "blue",
245
291
  isFullWidth: false,
292
+ isInteractive: false,
246
293
  isPast: false
247
294
  }
248
295
  });
296
+
297
+ // src/components/Schedule/TimeGridView.recipe.ts
298
+ var scheduleTimeGridViewRecipe = sva({
299
+ slots: [
300
+ "grid",
301
+ "header",
302
+ "corner",
303
+ "dayHeader",
304
+ "dayHeaderContent",
305
+ "dayHeaderDayNumber",
306
+ "allDayLabel",
307
+ "allDayRow",
308
+ "dayCell",
309
+ "timeLabel",
310
+ "timeRow",
311
+ "hourCell",
312
+ "events",
313
+ "allDayEvents",
314
+ "allDayPopoverContent",
315
+ "allDayPopoverEvents",
316
+ "allDaySeeMoreButton",
317
+ "rowContents"
318
+ ],
319
+ base: {
320
+ grid: {
321
+ display: "grid",
322
+ gridTemplateColumns: "72px 1fr",
323
+ overflow: "auto"
324
+ },
325
+ header: {
326
+ display: "grid",
327
+ gridTemplateColumns: "repeat(var(--schedule-day-count), minmax(160px, 1fr))",
328
+ borderBlockEndWidth: "default",
329
+ borderBlockEndStyle: "solid",
330
+ borderBlockEndColor: "border"
331
+ },
332
+ corner: {
333
+ borderInlineEndWidth: "default",
334
+ borderInlineEndStyle: "solid",
335
+ borderInlineEndColor: "border",
336
+ borderBlockEndWidth: "default",
337
+ borderBlockEndStyle: "solid",
338
+ borderBlockEndColor: "border"
339
+ },
340
+ dayHeader: {
341
+ p: "2",
342
+ textAlign: "center",
343
+ borderInlineEndWidth: "default",
344
+ borderInlineEndStyle: "solid",
345
+ borderInlineEndColor: "border"
346
+ },
347
+ dayHeaderContent: {
348
+ display: "inline-flex",
349
+ alignItems: "center",
350
+ justifyContent: "center",
351
+ gap: "1"
352
+ },
353
+ dayHeaderDayNumber: {
354
+ display: "inline-flex",
355
+ alignItems: "center",
356
+ justifyContent: "center",
357
+ minW: "30px",
358
+ h: "30px",
359
+ lineHeight: "30px",
360
+ borderRadius: "full"
361
+ },
362
+ allDayLabel: {
363
+ display: "flex",
364
+ alignItems: "flex-start",
365
+ justifyContent: "flex-end",
366
+ py: "0.5",
367
+ px: "2",
368
+ borderInlineEndWidth: "default",
369
+ borderInlineEndStyle: "solid",
370
+ borderInlineEndColor: "border",
371
+ borderBlockEndWidth: "default",
372
+ borderBlockEndStyle: "solid",
373
+ borderBlockEndColor: "border"
374
+ },
375
+ allDayRow: {
376
+ display: "grid",
377
+ gridTemplateColumns: "repeat(var(--schedule-day-count), minmax(160px, 1fr))",
378
+ borderBlockEndWidth: "default",
379
+ borderBlockEndStyle: "solid",
380
+ borderBlockEndColor: "border"
381
+ },
382
+ dayCell: {
383
+ minH: 0,
384
+ p: "0.5",
385
+ borderInlineEndWidth: "default",
386
+ borderInlineEndStyle: "solid",
387
+ borderInlineEndColor: "border"
388
+ },
389
+ timeLabel: {
390
+ p: "2",
391
+ color: "fg.muted",
392
+ textAlign: "end",
393
+ borderInlineEndWidth: "default",
394
+ borderInlineEndStyle: "solid",
395
+ borderInlineEndColor: "border",
396
+ borderBlockEndWidth: "default",
397
+ borderBlockEndStyle: "solid",
398
+ borderBlockEndColor: "border"
399
+ },
400
+ timeRow: {
401
+ display: "grid",
402
+ gridTemplateColumns: "repeat(var(--schedule-day-count), minmax(160px, 1fr))"
403
+ },
404
+ hourCell: {
405
+ position: "relative",
406
+ minH: "14",
407
+ p: "1",
408
+ borderInlineEndWidth: "default",
409
+ borderInlineEndStyle: "solid",
410
+ borderInlineEndColor: "border",
411
+ borderBlockEndWidth: "default",
412
+ borderBlockEndStyle: "solid",
413
+ borderBlockEndColor: "border"
414
+ },
415
+ events: {
416
+ display: "flex",
417
+ flexDirection: "column",
418
+ gap: "1"
419
+ },
420
+ allDayEvents: {
421
+ display: "flex",
422
+ flexDirection: "column",
423
+ gap: "0.5"
424
+ },
425
+ allDayPopoverContent: {
426
+ display: "flex",
427
+ flexDirection: "column",
428
+ gap: "1",
429
+ p: "3"
430
+ },
431
+ allDayPopoverEvents: {
432
+ display: "flex",
433
+ flexDirection: "column",
434
+ gap: 0,
435
+ m: 0,
436
+ p: 0,
437
+ listStyleType: "none"
438
+ },
439
+ allDaySeeMoreButton: {
440
+ display: "inline-flex",
441
+ alignItems: "center",
442
+ maxW: "full",
443
+ h: "5",
444
+ px: "1",
445
+ borderRadius: "sm",
446
+ color: "primary",
447
+ cursor: "pointer",
448
+ fontSize: "xs",
449
+ fontWeight: "medium",
450
+ lineHeight: "tight",
451
+ overflow: "hidden",
452
+ textOverflow: "ellipsis",
453
+ whiteSpace: "nowrap",
454
+ _hover: {
455
+ bg: "bg.muted"
456
+ }
457
+ },
458
+ rowContents: {
459
+ display: "contents"
460
+ }
461
+ },
462
+ variants: {
463
+ isCurrentDay: {
464
+ true: {
465
+ dayHeaderDayNumber: {
466
+ bg: "primary",
467
+ color: "fg.onPrimary"
468
+ }
469
+ },
470
+ false: {}
471
+ },
472
+ isLastColumn: {
473
+ true: {
474
+ dayHeader: { borderInlineEndWidth: 0 },
475
+ dayCell: { borderInlineEndWidth: 0 },
476
+ hourCell: { borderInlineEndWidth: 0 }
477
+ },
478
+ false: {}
479
+ },
480
+ isLastRow: {
481
+ true: {
482
+ timeLabel: { borderBlockEndWidth: 0 },
483
+ hourCell: { borderBlockEndWidth: 0 }
484
+ },
485
+ false: {}
486
+ }
487
+ },
488
+ defaultVariants: {
489
+ isCurrentDay: false,
490
+ isLastColumn: false,
491
+ isLastRow: false
492
+ }
493
+ });
249
494
  var ScheduleContext = createContext(null);
250
495
  ScheduleContext.displayName = "ScheduleContext";
251
496
  function useScheduleContext() {
@@ -382,6 +627,53 @@ var scheduleRecipe = sva({
382
627
  });
383
628
  var scheduleClasses = scheduleRecipe();
384
629
  var categoryFallback = { label: "Event", color: "blue" };
630
+ var currentTimeIndicator = cva({
631
+ base: {
632
+ h: "0.5",
633
+ bg: "surface.orange.accent",
634
+ borderRadius: "full",
635
+ pointerEvents: "none",
636
+ _before: {
637
+ content: '""',
638
+ position: "absolute",
639
+ insetInlineStart: "-6px",
640
+ top: "50%",
641
+ w: "2.5",
642
+ h: "2.5",
643
+ borderRadius: "full",
644
+ bg: "surface.orange.accent",
645
+ transform: "translateY(-50%)"
646
+ }
647
+ },
648
+ variants: {
649
+ layout: {
650
+ list: {
651
+ position: "relative"
652
+ },
653
+ timeGrid: {
654
+ position: "absolute",
655
+ insetInline: "0",
656
+ transform: "translateY(2px)",
657
+ zIndex: "20"
658
+ }
659
+ }
660
+ }
661
+ });
662
+ function ScheduleCurrentTimeIndicator({
663
+ layout,
664
+ testId,
665
+ style
666
+ }) {
667
+ return /* @__PURE__ */ jsx(
668
+ "div",
669
+ {
670
+ "aria-hidden": "true",
671
+ className: currentTimeIndicator({ layout }),
672
+ "data-testid": testId,
673
+ style
674
+ }
675
+ );
676
+ }
385
677
  function createCategoryMap(categories) {
386
678
  const categoryMap = /* @__PURE__ */ new Map();
387
679
  categories.forEach((category) => {
@@ -458,45 +750,197 @@ function isEventInPast(event, currentTime2, timezoneID) {
458
750
  }
459
751
  return event.end <= currentTime2;
460
752
  }
461
- function CalendarEventPill({
753
+ function hasEventPopoverPlugin(plugins) {
754
+ return plugins.some((plugin) => plugin.renderEventPopover != null);
755
+ }
756
+ function useScheduleEventPopover(event, { placement = "end" } = {}) {
757
+ const { categoryMap, plugins, timezoneID } = useScheduleContext();
758
+ const popover = usePopover({
759
+ // Content renders its own close affordance via the `controls.close` passed
760
+ // to renderEventPopover, so suppress the built-in close button.
761
+ hasCloseButton: false,
762
+ label: getEventAccessibleLabel(event, categoryMap, timezoneID),
763
+ role: "dialog"
764
+ });
765
+ const { hide } = popover;
766
+ const controls = useMemo(
767
+ () => ({ close: hide }),
768
+ [hide]
769
+ );
770
+ const content = useMemo(() => {
771
+ for (const plugin of plugins) {
772
+ const node = plugin.renderEventPopover?.(event, controls);
773
+ if (isReactNode(node)) {
774
+ return node;
775
+ }
776
+ }
777
+ return null;
778
+ }, [controls, event, plugins]);
779
+ if (!isReactNode(content)) {
780
+ return {};
781
+ }
782
+ return {
783
+ popover: popover.render(content, {
784
+ alignment: "start",
785
+ offsetX: 8,
786
+ offsetY: -3,
787
+ placement
788
+ }),
789
+ triggerProps: {
790
+ ...popover.triggerProps,
791
+ onClick: popover.toggle,
792
+ ref: popover.triggerRef
793
+ }
794
+ };
795
+ }
796
+ function useScheduleEventPluginProps({
462
797
  event,
463
- isPast = false
798
+ layout
464
799
  }) {
465
- const { categoryMap, timezoneID } = useScheduleContext();
466
- const category = getCategory(categoryMap, event);
467
- const classes = scheduleEventRecipe({ color: category.color, isPast });
800
+ const { plugins, timezoneID } = useScheduleContext();
801
+ return useMemo(() => {
802
+ let props;
803
+ plugins.forEach((plugin) => {
804
+ const pluginProps = plugin.getEventProps?.({ event, layout, timezoneID });
805
+ if (pluginProps != null) {
806
+ props = { ...props, ...pluginProps };
807
+ }
808
+ });
809
+ return props;
810
+ }, [event, layout, plugins, timezoneID]);
811
+ }
812
+ function EventPillRoot({
813
+ children,
814
+ className,
815
+ dataState,
816
+ dataTestId,
817
+ pluginProps,
818
+ triggerProps
819
+ }) {
820
+ if (triggerProps != null) {
821
+ return /* @__PURE__ */ jsx(
822
+ "button",
823
+ {
824
+ className,
825
+ "data-state": dataState,
826
+ "data-testid": dataTestId,
827
+ ...pluginProps,
828
+ type: "button",
829
+ ...triggerProps,
830
+ children
831
+ }
832
+ );
833
+ }
468
834
  return /* @__PURE__ */ jsx(
469
835
  "span",
470
836
  {
471
- className: classes.event,
472
- "data-state": isPast ? "past" : void 0,
473
- "data-testid": `schedule-event-${event.id}`,
474
- children: /* @__PURE__ */ jsx("span", { className: classes.title, children: isDayEvent(event) ? event.title : getEventAccessibleLabel(event, categoryMap, timezoneID) })
837
+ className,
838
+ "data-state": dataState,
839
+ "data-testid": dataTestId,
840
+ ...pluginProps,
841
+ children
475
842
  }
476
843
  );
477
844
  }
845
+ function CalendarEventPill({
846
+ event,
847
+ isFullWidth = false,
848
+ isPast = false
849
+ }) {
850
+ const { categoryMap, timezoneID } = useScheduleContext();
851
+ const { popover, triggerProps } = useScheduleEventPopover(event);
852
+ const pluginProps = useScheduleEventPluginProps({ event, layout: "inline" });
853
+ const category = getCategory(categoryMap, event);
854
+ const classes = scheduleEventRecipe({
855
+ color: category.color,
856
+ isFullWidth,
857
+ isPast,
858
+ isInteractive: triggerProps != null
859
+ });
860
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
861
+ /* @__PURE__ */ jsx(
862
+ EventPillRoot,
863
+ {
864
+ className: classes.event,
865
+ dataState: isPast ? "past" : void 0,
866
+ dataTestId: `schedule-event-${event.id}`,
867
+ pluginProps,
868
+ triggerProps,
869
+ children: /* @__PURE__ */ jsx("span", { className: classes.title, children: isDayEvent(event) ? event.title : getEventAccessibleLabel(event, categoryMap, timezoneID) })
870
+ }
871
+ ),
872
+ popover
873
+ ] });
874
+ }
478
875
  function CalendarMonthEventPill({
479
876
  event,
480
877
  isPast = false
481
878
  }) {
482
879
  const { categoryMap, timezoneID } = useScheduleContext();
880
+ const { popover, triggerProps } = useScheduleEventPopover(event);
881
+ const pluginProps = useScheduleEventPluginProps({ event, layout: "month" });
483
882
  const category = getCategory(categoryMap, event);
484
883
  const startTimeLabel = getEventStartTimeLabel(event, timezoneID);
485
884
  const classes = scheduleEventRecipe({
486
885
  color: category.color,
487
886
  isPast,
488
- isFullWidth: true
887
+ isFullWidth: true,
888
+ isInteractive: triggerProps != null
489
889
  });
490
- return /* @__PURE__ */ jsxs(
491
- "span",
890
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
891
+ /* @__PURE__ */ jsxs(
892
+ EventPillRoot,
893
+ {
894
+ className: classes.event,
895
+ dataState: isPast ? "past" : void 0,
896
+ dataTestId: `schedule-event-${event.id}`,
897
+ pluginProps,
898
+ triggerProps,
899
+ children: [
900
+ startTimeLabel != null ? /* @__PURE__ */ jsx("span", { className: classes.time, children: startTimeLabel }) : null,
901
+ /* @__PURE__ */ jsx("span", { className: classes.title, children: event.title })
902
+ ]
903
+ }
904
+ ),
905
+ popover
906
+ ] });
907
+ }
908
+ function ScheduleEventOverflowPopover({
909
+ buttonClassName,
910
+ contentClassName,
911
+ events,
912
+ eventsClassName,
913
+ hiddenEventCount,
914
+ label,
915
+ renderEvent,
916
+ testId,
917
+ title
918
+ }) {
919
+ return /* @__PURE__ */ jsx(
920
+ Popover,
492
921
  {
493
- className: classes.event,
494
- "data-state": isPast ? "past" : void 0,
495
- "data-testid": `schedule-event-${event.id}`,
496
- children: [
497
- startTimeLabel != null ? /* @__PURE__ */ jsx("span", { className: classes.time, children: startTimeLabel }) : null,
498
- /* @__PURE__ */ jsx("span", { className: classes.title, children: event.title })
499
- ]
922
+ content: /* @__PURE__ */ jsxs("div", { className: contentClassName, children: [
923
+ /* @__PURE__ */ jsx(Heading, { level: 4, children: title }),
924
+ /* @__PURE__ */ jsx("ul", { className: eventsClassName, children: events.map((event) => /* @__PURE__ */ jsx("li", { children: renderEvent(event) }, event.id)) })
925
+ ] }),
926
+ "data-testid": testId,
927
+ label,
928
+ width: 320,
929
+ children: /* @__PURE__ */ jsxs(
930
+ Link,
931
+ {
932
+ className: buttonClassName,
933
+ color: "primary",
934
+ label,
935
+ size: "xs",
936
+ weight: "medium",
937
+ children: [
938
+ "+",
939
+ hiddenEventCount,
940
+ " more"
941
+ ]
942
+ }
943
+ )
500
944
  }
501
945
  );
502
946
  }
@@ -570,141 +1014,7 @@ function subscribe(listener) {
570
1014
  function useCurrentTime() {
571
1015
  return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
572
1016
  }
573
- var styles = {
574
- grid: css({
575
- display: "grid",
576
- gridTemplateColumns: "72px 1fr",
577
- overflow: "auto"
578
- }),
579
- header: css({
580
- display: "grid",
581
- gridTemplateColumns: "repeat(var(--schedule-day-count), minmax(160px, 1fr))",
582
- borderBlockEndWidth: "default",
583
- borderBlockEndStyle: "solid",
584
- borderBlockEndColor: "border"
585
- }),
586
- corner: css({
587
- borderInlineEndWidth: "default",
588
- borderInlineEndStyle: "solid",
589
- borderInlineEndColor: "border",
590
- borderBlockEndWidth: "default",
591
- borderBlockEndStyle: "solid",
592
- borderBlockEndColor: "border"
593
- }),
594
- dayHeader: css({
595
- p: "2",
596
- textAlign: "center",
597
- borderInlineEndWidth: "default",
598
- borderInlineEndStyle: "solid",
599
- borderInlineEndColor: "border"
600
- }),
601
- lastColumn: css({
602
- borderInlineEndWidth: 0
603
- }),
604
- dayHeaderContent: css({
605
- display: "inline-flex",
606
- alignItems: "center",
607
- justifyContent: "center",
608
- gap: "1"
609
- }),
610
- dayHeaderDayNumber: css({
611
- display: "inline-flex",
612
- alignItems: "center",
613
- justifyContent: "center",
614
- minW: "30px",
615
- h: "30px",
616
- lineHeight: "30px",
617
- borderRadius: "full"
618
- }),
619
- dayHeaderCurrent: css({
620
- bg: "primary",
621
- color: "fg.onPrimary"
622
- }),
623
- allDayLabel: css({
624
- display: "flex",
625
- alignItems: "center",
626
- justifyContent: "flex-end",
627
- py: "1",
628
- px: "2",
629
- borderInlineEndWidth: "default",
630
- borderInlineEndStyle: "solid",
631
- borderInlineEndColor: "border",
632
- borderBlockEndWidth: "default",
633
- borderBlockEndStyle: "solid",
634
- borderBlockEndColor: "border"
635
- }),
636
- allDayRow: css({
637
- display: "grid",
638
- gridTemplateColumns: "repeat(var(--schedule-day-count), minmax(160px, 1fr))",
639
- borderBlockEndWidth: "default",
640
- borderBlockEndStyle: "solid",
641
- borderBlockEndColor: "border"
642
- }),
643
- dayCell: css({
644
- minH: 0,
645
- p: "0.5",
646
- borderInlineEndWidth: "default",
647
- borderInlineEndStyle: "solid",
648
- borderInlineEndColor: "border"
649
- }),
650
- timeLabel: css({
651
- p: "2",
652
- color: "fg.muted",
653
- textAlign: "end",
654
- borderInlineEndWidth: "default",
655
- borderInlineEndStyle: "solid",
656
- borderInlineEndColor: "border",
657
- borderBlockEndWidth: "default",
658
- borderBlockEndStyle: "solid",
659
- borderBlockEndColor: "border"
660
- }),
661
- timeRow: css({
662
- display: "grid",
663
- gridTemplateColumns: "repeat(var(--schedule-day-count), minmax(160px, 1fr))"
664
- }),
665
- hourCell: css({
666
- position: "relative",
667
- minH: "14",
668
- p: "1",
669
- borderInlineEndWidth: "default",
670
- borderInlineEndStyle: "solid",
671
- borderInlineEndColor: "border",
672
- borderBlockEndWidth: "default",
673
- borderBlockEndStyle: "solid",
674
- borderBlockEndColor: "border"
675
- }),
676
- lastRow: css({
677
- borderBlockEndWidth: 0
678
- }),
679
- events: css({
680
- display: "flex",
681
- flexDirection: "column",
682
- gap: "1"
683
- }),
684
- currentTimeLine: css({
685
- position: "absolute",
686
- insetInline: "0",
687
- borderBlockStartWidth: "2px",
688
- borderBlockStartStyle: "solid",
689
- borderBlockStartColor: "surface.orange.accent",
690
- transform: "translateY(2px)",
691
- zIndex: "20",
692
- pointerEvents: "none",
693
- _before: {
694
- content: '""',
695
- position: "absolute",
696
- insetInlineStart: "-6px",
697
- top: "-6px",
698
- w: "2.5",
699
- h: "2.5",
700
- borderRadius: "full",
701
- bg: "surface.orange.accent"
702
- }
703
- }),
704
- rowContents: css({
705
- display: "contents"
706
- })
707
- };
1017
+ var styles = scheduleTimeGridViewRecipe();
708
1018
  function eventOverlapsHour(event, day, hour, timezoneID) {
709
1019
  if (isDayEvent(event)) {
710
1020
  return false;
@@ -785,6 +1095,73 @@ function getTimedEventStyle({
785
1095
  zIndex: level + 1
786
1096
  };
787
1097
  }
1098
+ function TimeGridEvent({
1099
+ currentTime: currentTime2,
1100
+ hourHeight,
1101
+ layout,
1102
+ maxHour,
1103
+ minHour
1104
+ }) {
1105
+ const { categoryMap, plugins, timezoneID } = useScheduleContext();
1106
+ const { event } = layout;
1107
+ const { popover, triggerProps } = useScheduleEventPopover(event);
1108
+ const eventPluginProps = useScheduleEventPluginProps({
1109
+ event,
1110
+ layout: "timeGrid"
1111
+ });
1112
+ const pluginEndContent = useMemo(
1113
+ () => plugins.map(
1114
+ (plugin) => plugin.renderTimeGridEventContent?.({
1115
+ event,
1116
+ hourHeight,
1117
+ maxHour,
1118
+ minHour,
1119
+ timezoneID
1120
+ })
1121
+ ).filter(isReactNode),
1122
+ [event, hourHeight, maxHour, minHour, plugins, timezoneID]
1123
+ );
1124
+ const category = getCategory(categoryMap, event);
1125
+ const isPast = isEventInPast(event, currentTime2, timezoneID);
1126
+ const classes = scheduleEventRecipe({
1127
+ layout: "block",
1128
+ color: category.color,
1129
+ isPast,
1130
+ isInteractive: triggerProps != null
1131
+ });
1132
+ const style = getTimedEventStyle(layout);
1133
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
1134
+ /* @__PURE__ */ jsx("span", { className: classes.title, children: event.title }),
1135
+ /* @__PURE__ */ jsx("span", { className: classes.time, children: getEventTimeLabel(event, timezoneID) }),
1136
+ pluginEndContent
1137
+ ] });
1138
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1139
+ triggerProps != null ? /* @__PURE__ */ jsx(
1140
+ "button",
1141
+ {
1142
+ className: classes.event,
1143
+ "data-state": isPast ? "past" : void 0,
1144
+ "data-testid": `schedule-event-${event.id}`,
1145
+ style,
1146
+ type: "button",
1147
+ ...eventPluginProps,
1148
+ ...triggerProps,
1149
+ children: body
1150
+ }
1151
+ ) : /* @__PURE__ */ jsx(
1152
+ "div",
1153
+ {
1154
+ className: classes.event,
1155
+ "data-state": isPast ? "past" : void 0,
1156
+ "data-testid": `schedule-event-${event.id}`,
1157
+ ...eventPluginProps,
1158
+ style,
1159
+ children: body
1160
+ }
1161
+ ),
1162
+ popover
1163
+ ] });
1164
+ }
788
1165
  function getCellName({
789
1166
  categoryMap,
790
1167
  date,
@@ -799,12 +1176,13 @@ function getCellName({
799
1176
  return eventLabels.length > 0 ? `${dateLabel} ${hourLabel}. ${eventLabels.join(". ")}` : `${dateLabel} ${hourLabel}`;
800
1177
  }
801
1178
  function TimeGridView({
1179
+ allDayEventLimit = 3,
802
1180
  days,
803
1181
  hourHeight = 100,
804
1182
  maxHour = 24,
805
1183
  minHour = 0
806
1184
  }) {
807
- const { categoryMap, events, highlightDate, timezoneID } = useScheduleContext();
1185
+ const { categoryMap, events, highlightDate, plugins, timezoneID } = useScheduleContext();
808
1186
  const normalizedMinHour = Math.max(0, Math.min(23, Math.floor(minHour)));
809
1187
  const normalizedMaxHour = Math.max(
810
1188
  normalizedMinHour + 1,
@@ -824,6 +1202,7 @@ function TimeGridView({
824
1202
  "--schedule-day-count": String(days.length)
825
1203
  };
826
1204
  const normalizedHourHeight = Math.max(1, Math.floor(hourHeight));
1205
+ const normalizedAllDayEventLimit = Number.isFinite(allDayEventLimit) ? Math.max(0, Math.floor(allDayEventLimit)) : 3;
827
1206
  const hourStyle = {
828
1207
  height: normalizedHourHeight,
829
1208
  minHeight: normalizedHourHeight
@@ -859,42 +1238,37 @@ function TimeGridView({
859
1238
  role: "columnheader"
860
1239
  }
861
1240
  ),
862
- /* @__PURE__ */ jsx("div", { className: styles.header, children: days.map((day, index) => /* @__PURE__ */ jsx(
863
- "div",
864
- {
865
- "aria-colindex": index + 2,
866
- "aria-current": plainDateIsEqual(day, highlightPlainDate) ? "date" : void 0,
867
- "aria-label": plainDateFormat(day, DATE_FORMAT_WITH_WEEKDAY),
868
- className: cx(
869
- styles.dayHeader,
870
- index === days.length - 1 && styles.lastColumn
871
- ),
872
- role: "columnheader",
873
- children: /* @__PURE__ */ jsx(
874
- Heading,
875
- {
876
- "aria-hidden": "true",
877
- color: "secondary",
878
- level: 4,
879
- textWrap: "nowrap",
880
- children: /* @__PURE__ */ jsxs("span", { className: styles.dayHeaderContent, children: [
881
- plainDateFormat(day, { weekday: "short" }),
882
- /* @__PURE__ */ jsx(
883
- "span",
884
- {
885
- className: cx(
886
- styles.dayHeaderDayNumber,
887
- plainDateIsEqual(day, highlightPlainDate) && styles.dayHeaderCurrent
888
- ),
889
- children: day.day
890
- }
891
- )
892
- ] })
893
- }
894
- )
895
- },
896
- day.toString()
897
- )) })
1241
+ /* @__PURE__ */ jsx("div", { className: styles.header, children: days.map((day, index) => {
1242
+ const isCurrentDay = plainDateIsEqual(day, highlightPlainDate);
1243
+ const dayHeaderClasses = scheduleTimeGridViewRecipe({
1244
+ isCurrentDay,
1245
+ isLastColumn: index === days.length - 1
1246
+ });
1247
+ return /* @__PURE__ */ jsx(
1248
+ "div",
1249
+ {
1250
+ "aria-colindex": index + 2,
1251
+ "aria-current": isCurrentDay ? "date" : void 0,
1252
+ "aria-label": plainDateFormat(day, DATE_FORMAT_WITH_WEEKDAY),
1253
+ className: dayHeaderClasses.dayHeader,
1254
+ role: "columnheader",
1255
+ children: /* @__PURE__ */ jsx(
1256
+ Heading,
1257
+ {
1258
+ "aria-hidden": "true",
1259
+ color: "secondary",
1260
+ level: 4,
1261
+ textWrap: "nowrap",
1262
+ children: /* @__PURE__ */ jsxs("span", { className: styles.dayHeaderContent, children: [
1263
+ plainDateFormat(day, { weekday: "short" }),
1264
+ /* @__PURE__ */ jsx("span", { className: dayHeaderClasses.dayHeaderDayNumber, children: day.day })
1265
+ ] })
1266
+ }
1267
+ )
1268
+ },
1269
+ day.toString()
1270
+ );
1271
+ }) })
898
1272
  ] }),
899
1273
  /* @__PURE__ */ jsxs("div", { className: styles.rowContents, role: "row", children: [
900
1274
  /* @__PURE__ */ jsx(
@@ -911,6 +1285,16 @@ function TimeGridView({
911
1285
  const dayEvents = events.filter(
912
1286
  (event) => isDayEvent(event) && eventOccursOnDate(event, day, timezoneID)
913
1287
  );
1288
+ const visibleDayEvents = dayEvents.slice(
1289
+ 0,
1290
+ normalizedAllDayEventLimit
1291
+ );
1292
+ const hiddenDayEvents = dayEvents.slice(normalizedAllDayEventLimit);
1293
+ const dayCellClasses = scheduleTimeGridViewRecipe({
1294
+ isLastColumn: index === days.length - 1
1295
+ });
1296
+ const dateLabel = plainDateFormat(day, DATE_FORMAT_WITH_WEEKDAY);
1297
+ const seeMoreLabel = `Show ${hiddenDayEvents.length} more all-day events for ${dateLabel}`;
914
1298
  return /* @__PURE__ */ jsx(
915
1299
  "div",
916
1300
  {
@@ -922,19 +1306,39 @@ function TimeGridView({
922
1306
  hourLabel: "all day",
923
1307
  timezoneID
924
1308
  }),
925
- className: cx(
926
- styles.dayCell,
927
- index === days.length - 1 && styles.lastColumn
928
- ),
1309
+ className: dayCellClasses.dayCell,
929
1310
  role: "gridcell",
930
- children: /* @__PURE__ */ jsx("div", { className: styles.events, children: dayEvents.map((event) => /* @__PURE__ */ jsx(
931
- CalendarEventPill,
932
- {
933
- event,
934
- isPast: isEventInPast(event, currentTime2, timezoneID)
935
- },
936
- event.id
937
- )) })
1311
+ children: /* @__PURE__ */ jsxs("div", { className: styles.allDayEvents, children: [
1312
+ visibleDayEvents.map((event) => /* @__PURE__ */ jsx(
1313
+ CalendarEventPill,
1314
+ {
1315
+ event,
1316
+ isPast: isEventInPast(event, currentTime2, timezoneID)
1317
+ },
1318
+ event.id
1319
+ )),
1320
+ hiddenDayEvents.length > 0 ? /* @__PURE__ */ jsx(
1321
+ ScheduleEventOverflowPopover,
1322
+ {
1323
+ buttonClassName: styles.allDaySeeMoreButton,
1324
+ contentClassName: styles.allDayPopoverContent,
1325
+ events: dayEvents,
1326
+ eventsClassName: styles.allDayPopoverEvents,
1327
+ hiddenEventCount: hiddenDayEvents.length,
1328
+ label: seeMoreLabel,
1329
+ renderEvent: (event) => /* @__PURE__ */ jsx(
1330
+ CalendarEventPill,
1331
+ {
1332
+ event,
1333
+ isFullWidth: true,
1334
+ isPast: isEventInPast(event, currentTime2, timezoneID)
1335
+ }
1336
+ ),
1337
+ testId: `schedule-all-day-see-more-${day.toString()}`,
1338
+ title: dateLabel
1339
+ }
1340
+ ) : null
1341
+ ] })
938
1342
  },
939
1343
  `${day.toString()}-all-day`
940
1344
  );
@@ -943,12 +1347,15 @@ function TimeGridView({
943
1347
  hours.map((hour) => {
944
1348
  const hourLabel = formatHour(hour);
945
1349
  const isLastHour = hour === hours[hours.length - 1];
1350
+ const timeLabelClasses = scheduleTimeGridViewRecipe({
1351
+ isLastRow: isLastHour
1352
+ });
946
1353
  return /* @__PURE__ */ jsxs("div", { className: styles.rowContents, role: "row", children: [
947
1354
  /* @__PURE__ */ jsx(
948
1355
  "div",
949
1356
  {
950
1357
  "aria-colindex": 1,
951
- className: cx(styles.timeLabel, isLastHour && styles.lastRow),
1358
+ className: timeLabelClasses.timeLabel,
952
1359
  role: "rowheader",
953
1360
  style: hourStyle,
954
1361
  children: hourLabel
@@ -967,6 +1374,24 @@ function TimeGridView({
967
1374
  minHour: normalizedMinHour,
968
1375
  timezoneID
969
1376
  });
1377
+ const hourCellClasses = scheduleTimeGridViewRecipe({
1378
+ isLastColumn: index === days.length - 1,
1379
+ isLastRow: isLastHour
1380
+ });
1381
+ const hourCellPluginProps = plugins.reduce(
1382
+ (props, plugin) => ({
1383
+ ...props,
1384
+ ...plugin.getTimeGridCellProps?.({
1385
+ date: day,
1386
+ hour,
1387
+ hourHeight: normalizedHourHeight,
1388
+ maxHour: normalizedMaxHour,
1389
+ minHour: normalizedMinHour,
1390
+ timezoneID
1391
+ })
1392
+ }),
1393
+ {}
1394
+ );
970
1395
  return /* @__PURE__ */ jsxs(
971
1396
  "div",
972
1397
  {
@@ -978,51 +1403,31 @@ function TimeGridView({
978
1403
  hourLabel,
979
1404
  timezoneID
980
1405
  }),
981
- className: cx(
982
- styles.hourCell,
983
- index === days.length - 1 && styles.lastColumn,
984
- isLastHour && styles.lastRow
985
- ),
1406
+ className: hourCellClasses.hourCell,
1407
+ "data-testid": `schedule-time-grid-cell-${day.toString()}-${hour}`,
986
1408
  role: "gridcell",
987
1409
  style: hourStyle,
1410
+ ...hourCellPluginProps,
988
1411
  children: [
989
1412
  currentTimeTop != null ? /* @__PURE__ */ jsx(
990
- "div",
1413
+ ScheduleCurrentTimeIndicator,
991
1414
  {
992
- "aria-hidden": "true",
993
- className: styles.currentTimeLine,
994
- "data-testid": "schedule-current-time-line",
995
- style: { top: `${currentTimeTop}%` }
1415
+ layout: "timeGrid",
1416
+ style: { top: `${currentTimeTop}%` },
1417
+ testId: "schedule-current-time-line"
996
1418
  }
997
1419
  ) : null,
998
- /* @__PURE__ */ jsx("div", { className: styles.events, children: visibleTimedEventLayouts.map((layout) => {
999
- const { event } = layout;
1000
- const category = getCategory(categoryMap, event);
1001
- const isPast = isEventInPast(
1002
- event,
1003
- currentTime2,
1004
- timezoneID
1005
- );
1006
- const eventClasses = scheduleEventRecipe({
1007
- layout: "block",
1008
- color: category.color,
1009
- isPast
1010
- });
1011
- return /* @__PURE__ */ jsxs(
1012
- "div",
1013
- {
1014
- className: eventClasses.event,
1015
- "data-state": isPast ? "past" : void 0,
1016
- "data-testid": `schedule-event-${event.id}`,
1017
- style: getTimedEventStyle(layout),
1018
- children: [
1019
- /* @__PURE__ */ jsx("span", { className: eventClasses.title, children: event.title }),
1020
- /* @__PURE__ */ jsx("span", { className: eventClasses.time, children: getEventTimeLabel(event, timezoneID) })
1021
- ]
1022
- },
1023
- event.id
1024
- );
1025
- }) })
1420
+ /* @__PURE__ */ jsx("div", { className: styles.events, children: visibleTimedEventLayouts.map((layout) => /* @__PURE__ */ jsx(
1421
+ TimeGridEvent,
1422
+ {
1423
+ currentTime: currentTime2,
1424
+ hourHeight: normalizedHourHeight,
1425
+ layout,
1426
+ maxHour: normalizedMaxHour,
1427
+ minHour: normalizedMinHour
1428
+ },
1429
+ layout.event.id
1430
+ )) })
1026
1431
  ]
1027
1432
  },
1028
1433
  `${day.toString()}-${hour}`
@@ -1099,6 +1504,7 @@ function ScheduleDayView({
1099
1504
  return /* @__PURE__ */ jsx(ScheduleFrame, { title: formatMonthTitle(day), titleLabel: formatDate(day), children: /* @__PURE__ */ jsx(
1100
1505
  TimeGridView,
1101
1506
  {
1507
+ allDayEventLimit: options.allDayEventLimit,
1102
1508
  days: [day],
1103
1509
  hourHeight: options.hourHeight,
1104
1510
  maxHour: options.maxHour,
@@ -1107,6 +1513,7 @@ function ScheduleDayView({
1107
1513
  ) });
1108
1514
  }
1109
1515
  function createScheduleDayView({
1516
+ allDayEventLimit = 3,
1110
1517
  hourHeight = 100,
1111
1518
  maxHour = 24,
1112
1519
  minHour = 0
@@ -1129,114 +1536,192 @@ function createScheduleDayView({
1129
1536
  label: "Previous day",
1130
1537
  range: [date.startOfDay().addDays(-1), date.startOfDay()]
1131
1538
  }),
1132
- options: { hourHeight, maxHour, minHour }
1539
+ options: { allDayEventLimit, hourHeight, maxHour, minHour }
1133
1540
  };
1134
1541
  }
1135
- var styles2 = {
1136
- list: css({
1137
- display: "flex",
1138
- flexDirection: "column"
1139
- }),
1140
- day: css({
1141
- display: "grid",
1142
- gridTemplateColumns: "112px minmax(0, 1fr)",
1143
- alignItems: "start",
1144
- columnGap: "3",
1145
- p: "3",
1146
- borderBlockEndWidth: "default",
1147
- borderBlockEndStyle: "solid",
1148
- borderBlockEndColor: "border"
1149
- }),
1150
- dayLast: css({
1151
- borderBlockEndWidth: 0
1152
- }),
1153
- dayHeading: css({
1154
- m: 0,
1155
- display: "inline-flex",
1156
- alignItems: "center",
1157
- justifyContent: "flex-start",
1158
- gap: "2",
1159
- color: "fg.muted",
1160
- fontFamily: "body",
1161
- fontSize: "lg",
1162
- fontWeight: "semibold",
1163
- lineHeight: "tight",
1164
- whiteSpace: "nowrap"
1165
- }),
1166
- dayWeekday: css({
1167
- display: "inline-block",
1168
- fontSize: "lg"
1169
- }),
1170
- dayNumber: css({
1171
- display: "inline-flex",
1172
- flexShrink: 0,
1173
- alignItems: "center",
1174
- justifyContent: "center",
1175
- w: "30px",
1176
- h: "30px",
1177
- borderRadius: "full",
1178
- fontWeight: "bold"
1179
- }),
1180
- dayNumberCurrent: css({
1181
- bg: "primary",
1182
- color: "fg.onPrimary"
1183
- }),
1184
- events: css({
1185
- display: "flex",
1186
- flexDirection: "column",
1187
- gap: "2"
1188
- }),
1189
- eventRow: css({
1190
- display: "grid",
1191
- gridTemplateColumns: "160px minmax(0, 1fr)",
1192
- alignItems: "center",
1193
- gap: "3"
1194
- }),
1195
- eventPast: css({
1196
- opacity: 0.64
1197
- }),
1198
- eventContent: css({
1199
- display: "flex",
1200
- alignItems: "center",
1201
- gap: "2",
1202
- minW: 0
1203
- }),
1204
- eventTime: css({
1205
- whiteSpace: "nowrap"
1206
- }),
1207
- nowRow: css({
1208
- h: "0.5",
1209
- bg: "fg.danger",
1210
- borderRadius: "full"
1211
- })
1212
- };
1542
+
1543
+ // src/components/Schedule/ListView.recipe.ts
1544
+ var scheduleListViewRecipe = sva({
1545
+ slots: [
1546
+ "list",
1547
+ "day",
1548
+ "dayHeading",
1549
+ "dayWeekday",
1550
+ "dayNumber",
1551
+ "events",
1552
+ "eventRow",
1553
+ "eventContent",
1554
+ "eventTime"
1555
+ ],
1556
+ base: {
1557
+ list: {
1558
+ display: "flex",
1559
+ flexDirection: "column"
1560
+ },
1561
+ day: {
1562
+ display: "grid",
1563
+ gridTemplateColumns: "112px minmax(0, 1fr)",
1564
+ alignItems: "start",
1565
+ columnGap: "3",
1566
+ p: "3",
1567
+ borderBlockEndWidth: "default",
1568
+ borderBlockEndStyle: "solid",
1569
+ borderBlockEndColor: "border"
1570
+ },
1571
+ dayHeading: {
1572
+ m: 0,
1573
+ display: "inline-flex",
1574
+ alignItems: "center",
1575
+ justifyContent: "flex-start",
1576
+ gap: "2",
1577
+ color: "fg.muted",
1578
+ fontFamily: "body",
1579
+ fontSize: "lg",
1580
+ fontWeight: "semibold",
1581
+ lineHeight: "tight",
1582
+ whiteSpace: "nowrap"
1583
+ },
1584
+ dayWeekday: {
1585
+ display: "inline-block",
1586
+ fontSize: "lg"
1587
+ },
1588
+ dayNumber: {
1589
+ display: "inline-flex",
1590
+ flexShrink: 0,
1591
+ alignItems: "center",
1592
+ justifyContent: "center",
1593
+ w: "30px",
1594
+ h: "30px",
1595
+ borderRadius: "full",
1596
+ fontWeight: "bold"
1597
+ },
1598
+ events: {
1599
+ display: "flex",
1600
+ flexDirection: "column",
1601
+ gap: "2"
1602
+ },
1603
+ eventRow: {
1604
+ display: "grid",
1605
+ gridTemplateColumns: "160px minmax(0, 1fr)",
1606
+ alignItems: "center",
1607
+ gap: "3"
1608
+ },
1609
+ eventContent: {
1610
+ display: "flex",
1611
+ alignItems: "center",
1612
+ gap: "2",
1613
+ justifySelf: "start",
1614
+ minW: 0
1615
+ },
1616
+ eventTime: {
1617
+ whiteSpace: "nowrap"
1618
+ }
1619
+ },
1620
+ variants: {
1621
+ isHighlightedDay: {
1622
+ true: {
1623
+ dayNumber: {
1624
+ bg: "primary",
1625
+ color: "fg.onPrimary"
1626
+ }
1627
+ },
1628
+ false: {}
1629
+ },
1630
+ isLastDay: {
1631
+ true: {
1632
+ day: {
1633
+ borderBlockEndWidth: 0
1634
+ }
1635
+ },
1636
+ false: {}
1637
+ },
1638
+ isPastEvent: {
1639
+ true: {
1640
+ eventRow: {
1641
+ opacity: 0.64
1642
+ }
1643
+ },
1644
+ false: {}
1645
+ },
1646
+ isInteractiveEvent: {
1647
+ true: {
1648
+ eventContent: {
1649
+ appearance: "none",
1650
+ bg: "none",
1651
+ borderWidth: 0,
1652
+ p: 0,
1653
+ m: 0,
1654
+ font: "inherit",
1655
+ textAlign: "inherit",
1656
+ color: "inherit",
1657
+ cursor: "pointer",
1658
+ borderRadius: "sm",
1659
+ _focusVisible: {
1660
+ outlineWidth: "focus",
1661
+ outlineStyle: "solid",
1662
+ outlineColor: "primary"
1663
+ }
1664
+ }
1665
+ },
1666
+ false: {}
1667
+ }
1668
+ },
1669
+ defaultVariants: {
1670
+ isHighlightedDay: false,
1671
+ isLastDay: false,
1672
+ isPastEvent: false,
1673
+ isInteractiveEvent: false
1674
+ }
1675
+ });
1676
+ var styles2 = scheduleListViewRecipe();
1213
1677
  function ListEvent({
1214
1678
  event,
1215
1679
  isPast
1216
1680
  }) {
1217
1681
  const { categoryMap, timezoneID } = useScheduleContext();
1682
+ const { popover, triggerProps } = useScheduleEventPopover(event, {
1683
+ placement: "end"
1684
+ });
1218
1685
  const category = getCategory(categoryMap, event);
1219
- return /* @__PURE__ */ jsxs(
1220
- "div",
1221
- {
1222
- className: cx(styles2.eventRow, isPast && styles2.eventPast),
1223
- "data-state": isPast ? "past" : void 0,
1224
- children: [
1225
- /* @__PURE__ */ jsx(Text, { className: styles2.eventTime, color: "secondary", type: "supporting", children: isDayEvent(event) ? "All day" : getEventTimeLabel(event, timezoneID) }),
1226
- /* @__PURE__ */ jsxs("div", { className: styles2.eventContent, children: [
1227
- /* @__PURE__ */ jsx(Tooltip, { content: category.label, hasHoverIndication: false, children: /* @__PURE__ */ jsx(
1228
- "span",
1229
- {
1230
- "aria-label": category.label,
1231
- className: scheduleEventRecipe({ color: category.color }).dot,
1232
- role: "img"
1233
- }
1234
- ) }),
1235
- /* @__PURE__ */ jsx(Text, { children: event.title })
1236
- ] })
1237
- ]
1238
- }
1239
- );
1686
+ const eventDataState = isPast ? "past" : void 0;
1687
+ const classes = scheduleListViewRecipe({
1688
+ isInteractiveEvent: triggerProps != null,
1689
+ isPastEvent: isPast
1690
+ });
1691
+ const eventContent = /* @__PURE__ */ jsxs(Fragment, { children: [
1692
+ /* @__PURE__ */ jsx(Tooltip, { content: category.label, hoverIndication: "never", children: /* @__PURE__ */ jsx(
1693
+ "span",
1694
+ {
1695
+ "aria-label": category.label,
1696
+ className: scheduleEventRecipe({ color: category.color }).dot,
1697
+ role: "img"
1698
+ }
1699
+ ) }),
1700
+ /* @__PURE__ */ jsx(Text, { children: event.title })
1701
+ ] });
1702
+ return /* @__PURE__ */ jsxs("div", { className: classes.eventRow, "data-state": eventDataState, children: [
1703
+ /* @__PURE__ */ jsx(Text, { className: classes.eventTime, color: "secondary", type: "supporting", children: isDayEvent(event) ? "All day" : getEventTimeLabel(event, timezoneID) }),
1704
+ triggerProps != null ? /* @__PURE__ */ jsx(
1705
+ "button",
1706
+ {
1707
+ className: classes.eventContent,
1708
+ "data-state": eventDataState,
1709
+ "data-testid": `schedule-event-${event.id}`,
1710
+ type: "button",
1711
+ ...triggerProps,
1712
+ children: eventContent
1713
+ }
1714
+ ) : /* @__PURE__ */ jsx(
1715
+ "div",
1716
+ {
1717
+ className: classes.eventContent,
1718
+ "data-state": eventDataState,
1719
+ "data-testid": `schedule-event-${event.id}`,
1720
+ children: eventContent
1721
+ }
1722
+ ),
1723
+ popover
1724
+ ] });
1240
1725
  }
1241
1726
  function ScheduleListView() {
1242
1727
  const { events, highlightDate, isLoading, range, timezoneID } = useScheduleContext();
@@ -1264,45 +1749,30 @@ function ScheduleListView() {
1264
1749
  return /* @__PURE__ */ jsx(ScheduleFrame, { title, titleLabel: title, children: /* @__PURE__ */ jsx("div", { className: cx(scheduleClasses.surface, styles2.list), children: visibleDays.map(
1265
1750
  ({ day, dayEvents, isCurrentDay, isHighlightedDay }, index) => {
1266
1751
  const fullDate = plainDateFormat(day, DATE_FORMAT_WITH_WEEKDAY);
1267
- return /* @__PURE__ */ jsxs(
1268
- "section",
1269
- {
1270
- className: cx(
1271
- styles2.day,
1272
- index === visibleDays.length - 1 && styles2.dayLast
1273
- ),
1274
- children: [
1275
- /* @__PURE__ */ jsxs(
1276
- "h4",
1277
- {
1278
- "aria-current": isHighlightedDay ? "date" : void 0,
1279
- "aria-label": fullDate,
1280
- className: styles2.dayHeading,
1281
- children: [
1282
- /* @__PURE__ */ jsx(
1283
- "span",
1284
- {
1285
- className: cx(
1286
- styles2.dayNumber,
1287
- isHighlightedDay && styles2.dayNumberCurrent
1288
- ),
1289
- children: day.day
1290
- }
1291
- ),
1292
- /* @__PURE__ */ jsx("span", { className: styles2.dayWeekday, children: plainDateFormat(day, { weekday: "short" }) })
1293
- ]
1294
- }
1295
- ),
1296
- /* @__PURE__ */ jsx("div", { className: styles2.events, children: renderListRows({
1297
- currentTime: currentTime2,
1298
- events: dayEvents,
1299
- isShowingCurrentTime: isCurrentDay && !isLoading,
1300
- timezoneID
1301
- }) })
1302
- ]
1303
- },
1304
- day.toString()
1305
- );
1752
+ const dayClasses = scheduleListViewRecipe({
1753
+ isHighlightedDay,
1754
+ isLastDay: index === visibleDays.length - 1
1755
+ });
1756
+ return /* @__PURE__ */ jsxs("section", { className: dayClasses.day, children: [
1757
+ /* @__PURE__ */ jsxs(
1758
+ "h4",
1759
+ {
1760
+ "aria-current": isHighlightedDay ? "date" : void 0,
1761
+ "aria-label": fullDate,
1762
+ className: dayClasses.dayHeading,
1763
+ children: [
1764
+ /* @__PURE__ */ jsx("span", { className: dayClasses.dayNumber, children: day.day }),
1765
+ /* @__PURE__ */ jsx("span", { className: dayClasses.dayWeekday, children: plainDateFormat(day, { weekday: "short" }) })
1766
+ ]
1767
+ }
1768
+ ),
1769
+ /* @__PURE__ */ jsx("div", { className: dayClasses.events, children: renderListRows({
1770
+ currentTime: currentTime2,
1771
+ events: dayEvents,
1772
+ isShowingCurrentTime: isCurrentDay && !isLoading,
1773
+ timezoneID
1774
+ }) })
1775
+ ] }, day.toString());
1306
1776
  }
1307
1777
  ) }) });
1308
1778
  }
@@ -1324,11 +1794,10 @@ function renderListRows({
1324
1794
  return rows;
1325
1795
  }
1326
1796
  const marker = /* @__PURE__ */ jsx(
1327
- "div",
1797
+ ScheduleCurrentTimeIndicator,
1328
1798
  {
1329
- "aria-hidden": "true",
1330
- className: styles2.nowRow,
1331
- "data-testid": "schedule-list-current-time"
1799
+ layout: "list",
1800
+ testId: "schedule-list-current-time"
1332
1801
  },
1333
1802
  "current-time"
1334
1803
  );
@@ -1363,127 +1832,159 @@ function createScheduleListView({
1363
1832
  options: { days }
1364
1833
  };
1365
1834
  }
1366
- var styles3 = {
1367
- grid: css({
1368
- display: "grid",
1369
- gridTemplateColumns: "repeat(7, minmax(0, 1fr))"
1370
- }),
1371
- weekday: css({
1372
- p: "2",
1373
- textAlign: "center",
1374
- borderBlockEndWidth: "default",
1375
- borderBlockEndStyle: "solid",
1376
- borderBlockEndColor: "border"
1377
- }),
1378
- cell: css({
1379
- minH: "24",
1380
- p: "0.5",
1381
- borderInlineEndWidth: "default",
1382
- borderInlineEndStyle: "solid",
1383
- borderInlineEndColor: "border",
1384
- borderBlockEndWidth: "default",
1385
- borderBlockEndStyle: "solid",
1386
- borderBlockEndColor: "border"
1387
- }),
1388
- lastColumn: css({
1389
- borderInlineEndWidth: 0
1390
- }),
1391
- lastRow: css({
1392
- borderBlockEndWidth: 0
1393
- }),
1394
- otherMonth: css({
1395
- bg: "bg.subtle",
1396
- color: "fg.muted"
1397
- }),
1398
- dayNumber: css({
1399
- display: "inline-flex",
1400
- alignItems: "center",
1401
- justifyContent: "center",
1402
- w: "6",
1403
- h: "6",
1404
- m: "0.5",
1405
- borderRadius: "full"
1406
- }),
1407
- today: css({
1408
- bg: "primary",
1409
- color: "fg.onPrimary"
1410
- }),
1411
- events: css({
1412
- display: "flex",
1413
- flexDirection: "column",
1414
- gap: "1",
1415
- m: 0,
1416
- p: 0,
1417
- listStyleType: "none"
1418
- }),
1419
- eventItem: css({
1420
- display: "flex"
1421
- }),
1422
- monthSurface: css({
1423
- position: "relative",
1424
- gridColumn: "1 / -1"
1425
- }),
1426
- monthCellGrid: css({
1427
- display: "grid",
1428
- gridTemplateColumns: "repeat(7, minmax(0, 1fr))",
1429
- gridAutoRows: "var(--schedule-month-row-height)"
1430
- }),
1431
- monthEventOverlay: css({
1432
- position: "absolute",
1433
- inset: 0,
1434
- display: "grid",
1435
- gridTemplateColumns: "repeat(7, minmax(0, 1fr))",
1436
- gridAutoRows: "var(--schedule-month-row-height)",
1437
- pointerEvents: "none"
1438
- }),
1439
- monthEventSpan: css({
1440
- alignSelf: "start",
1441
- minW: 0,
1442
- mx: "0.5",
1443
- pointerEvents: "auto",
1444
- zIndex: 1
1445
- }),
1446
- monthSeeMoreSpan: css({
1447
- alignSelf: "start",
1448
- minW: 0,
1449
- mx: "0.5",
1450
- pointerEvents: "auto",
1451
- zIndex: 2
1452
- }),
1453
- monthSeeMoreButton: css({
1454
- display: "inline-flex",
1455
- alignItems: "center",
1456
- maxW: "full",
1457
- h: "5",
1458
- px: "1",
1459
- borderRadius: "sm",
1460
- color: "primary",
1461
- cursor: "pointer",
1462
- fontSize: "xs",
1463
- fontWeight: "medium",
1464
- lineHeight: "tight",
1465
- overflow: "hidden",
1466
- textOverflow: "ellipsis",
1467
- whiteSpace: "nowrap",
1468
- _hover: {
1469
- bg: "bg.muted"
1835
+
1836
+ // src/components/Schedule/MonthlyView.recipe.ts
1837
+ var scheduleMonthlyViewRecipe = sva({
1838
+ slots: [
1839
+ "grid",
1840
+ "weekday",
1841
+ "cell",
1842
+ "dayNumber",
1843
+ "todayText",
1844
+ "monthSurface",
1845
+ "monthCellGrid",
1846
+ "monthEventOverlay",
1847
+ "monthEventSpan",
1848
+ "monthSeeMoreSpan",
1849
+ "monthSeeMoreButton",
1850
+ "monthPopoverContent",
1851
+ "monthPopoverEvents"
1852
+ ],
1853
+ base: {
1854
+ grid: {
1855
+ display: "grid",
1856
+ gridTemplateColumns: "repeat(7, minmax(0, 1fr))"
1857
+ },
1858
+ weekday: {
1859
+ p: "2",
1860
+ textAlign: "center",
1861
+ borderBlockEndWidth: "default",
1862
+ borderBlockEndStyle: "solid",
1863
+ borderBlockEndColor: "border"
1864
+ },
1865
+ cell: {
1866
+ minH: "24",
1867
+ p: "0.5",
1868
+ borderInlineEndWidth: "default",
1869
+ borderInlineEndStyle: "solid",
1870
+ borderInlineEndColor: "border",
1871
+ borderBlockEndWidth: "default",
1872
+ borderBlockEndStyle: "solid",
1873
+ borderBlockEndColor: "border"
1874
+ },
1875
+ dayNumber: {
1876
+ display: "inline-flex",
1877
+ alignItems: "center",
1878
+ justifyContent: "center",
1879
+ w: "6",
1880
+ h: "6",
1881
+ m: "0.5",
1882
+ borderRadius: "full"
1883
+ },
1884
+ monthSurface: {
1885
+ position: "relative",
1886
+ gridColumn: "1 / -1"
1887
+ },
1888
+ monthCellGrid: {
1889
+ display: "grid",
1890
+ gridTemplateColumns: "repeat(7, minmax(0, 1fr))",
1891
+ gridAutoRows: "var(--schedule-month-row-height)"
1892
+ },
1893
+ monthEventOverlay: {
1894
+ position: "absolute",
1895
+ inset: 0,
1896
+ display: "grid",
1897
+ gridTemplateColumns: "repeat(7, minmax(0, 1fr))",
1898
+ gridAutoRows: "var(--schedule-month-row-height)",
1899
+ pointerEvents: "none"
1900
+ },
1901
+ monthEventSpan: {
1902
+ alignSelf: "start",
1903
+ minW: 0,
1904
+ mx: "0.5",
1905
+ pointerEvents: "auto",
1906
+ zIndex: 1
1907
+ },
1908
+ monthSeeMoreSpan: {
1909
+ alignSelf: "start",
1910
+ minW: 0,
1911
+ mx: "0.5",
1912
+ pointerEvents: "auto",
1913
+ zIndex: 2
1914
+ },
1915
+ monthSeeMoreButton: {
1916
+ display: "inline-flex",
1917
+ alignItems: "center",
1918
+ maxW: "full",
1919
+ h: "5",
1920
+ px: "1",
1921
+ borderRadius: "sm",
1922
+ color: "primary",
1923
+ cursor: "pointer",
1924
+ fontSize: "xs",
1925
+ fontWeight: "medium",
1926
+ lineHeight: "tight",
1927
+ overflow: "hidden",
1928
+ textOverflow: "ellipsis",
1929
+ whiteSpace: "nowrap",
1930
+ _hover: {
1931
+ bg: "bg.muted"
1932
+ }
1933
+ },
1934
+ monthPopoverContent: {
1935
+ display: "flex",
1936
+ flexDirection: "column",
1937
+ gap: "1",
1938
+ p: "3"
1939
+ },
1940
+ monthPopoverEvents: {
1941
+ display: "flex",
1942
+ flexDirection: "column",
1943
+ gap: 0,
1944
+ m: 0,
1945
+ p: 0,
1946
+ listStyleType: "none"
1470
1947
  }
1471
- }),
1472
- monthPopoverContent: css({
1473
- display: "flex",
1474
- flexDirection: "column",
1475
- gap: "1",
1476
- p: "3"
1477
- }),
1478
- monthPopoverEvents: css({
1479
- display: "flex",
1480
- flexDirection: "column",
1481
- gap: 0,
1482
- m: 0,
1483
- p: 0,
1484
- listStyleType: "none"
1485
- })
1486
- };
1948
+ },
1949
+ variants: {
1950
+ isLastColumn: {
1951
+ true: { cell: { borderInlineEndWidth: 0 } },
1952
+ false: {}
1953
+ },
1954
+ isLastRow: {
1955
+ true: { cell: { borderBlockEndWidth: 0 } },
1956
+ false: {}
1957
+ },
1958
+ isOtherMonth: {
1959
+ true: {
1960
+ cell: {
1961
+ bg: "bg.subtle",
1962
+ color: "fg.muted"
1963
+ }
1964
+ },
1965
+ false: {}
1966
+ },
1967
+ isToday: {
1968
+ true: {
1969
+ dayNumber: {
1970
+ bg: "primary",
1971
+ color: "fg.onPrimary"
1972
+ },
1973
+ todayText: {
1974
+ marginInlineEnd: "1px"
1975
+ }
1976
+ },
1977
+ false: {}
1978
+ }
1979
+ },
1980
+ defaultVariants: {
1981
+ isLastColumn: false,
1982
+ isLastRow: false,
1983
+ isOtherMonth: false,
1984
+ isToday: false
1985
+ }
1986
+ });
1987
+ var styles3 = scheduleMonthlyViewRecipe();
1487
1988
  var weekdays = [
1488
1989
  { label: "Sunday", shortLabel: "Sun" },
1489
1990
  { label: "Monday", shortLabel: "Mon" },
@@ -1732,7 +2233,8 @@ function getGridCellName({
1732
2233
  function ScheduleMonthlyView({
1733
2234
  options
1734
2235
  }) {
1735
- const { categoryMap, events, highlightDate, timezoneID, viewDate } = useScheduleContext();
2236
+ const { categoryMap, events, highlightDate, plugins, timezoneID, viewDate } = useScheduleContext();
2237
+ const eventPopoverActive = hasEventPopoverPlugin(plugins);
1736
2238
  const currentTime2 = useCurrentTime();
1737
2239
  const month = viewDate.toPlainDate();
1738
2240
  const title = formatMonthTitle(month);
@@ -1790,43 +2292,52 @@ function ScheduleMonthlyView({
1790
2292
  const isCurrentMonth = day.month === month.month && day.year === month.year;
1791
2293
  const isLastColumn = index % 7 === 6;
1792
2294
  const isLastRow = index >= days.length - 7;
2295
+ const isToday = plainDateIsEqual(day, today);
2296
+ const dayClasses = scheduleMonthlyViewRecipe({
2297
+ isLastColumn,
2298
+ isLastRow,
2299
+ isOtherMonth: !isCurrentMonth,
2300
+ isToday
2301
+ });
2302
+ const dayCellPluginProps = plugins.reduce(
2303
+ (props, plugin) => ({
2304
+ ...props,
2305
+ ...plugin.getMonthCellProps?.({
2306
+ date: day,
2307
+ timezoneID
2308
+ })
2309
+ }),
2310
+ {}
2311
+ );
1793
2312
  return /* @__PURE__ */ jsx(
1794
2313
  "div",
1795
2314
  {
1796
- "aria-current": plainDateIsEqual(day, today) ? "date" : void 0,
2315
+ "aria-current": isToday ? "date" : void 0,
1797
2316
  "aria-label": getGridCellName({
1798
2317
  categoryMap,
1799
2318
  date: day,
1800
- events: dayEvents,
2319
+ // When events are interactive popover triggers they expose
2320
+ // their own accessible names, so omit them here to avoid
2321
+ // announcing each event twice.
2322
+ events: eventPopoverActive ? [] : dayEvents,
1801
2323
  timezoneID
1802
2324
  }),
1803
- className: cx(
1804
- styles3.cell,
1805
- isLastColumn ? styles3.lastColumn : void 0,
1806
- isLastRow ? styles3.lastRow : void 0,
1807
- !isCurrentMonth ? styles3.otherMonth : void 0
1808
- ),
2325
+ className: dayClasses.cell,
2326
+ "data-testid": `schedule-month-cell-${day.toString()}`,
1809
2327
  role: "gridcell",
1810
- children: /* @__PURE__ */ jsx(
1811
- "span",
2328
+ ...dayCellPluginProps,
2329
+ children: /* @__PURE__ */ jsx("span", { className: dayClasses.dayNumber, children: /* @__PURE__ */ jsx(
2330
+ Text,
1812
2331
  {
1813
- className: cx(
1814
- styles3.dayNumber,
1815
- plainDateIsEqual(day, today) ? styles3.today : void 0
1816
- ),
1817
- children: /* @__PURE__ */ jsx(
1818
- Text,
1819
- {
1820
- as: "span",
1821
- color: "inherit",
1822
- hasTabularNumbers: true,
1823
- type: "supporting",
1824
- weight: "medium",
1825
- children: day.day
1826
- }
1827
- )
2332
+ as: "span",
2333
+ className: dayClasses.todayText,
2334
+ color: "inherit",
2335
+ hasTabularNumbers: true,
2336
+ type: "supporting",
2337
+ weight: "medium",
2338
+ children: day.day
1828
2339
  }
1829
- )
2340
+ ) })
1830
2341
  },
1831
2342
  day.toString()
1832
2343
  );
@@ -1835,7 +2346,7 @@ function ScheduleMonthlyView({
1835
2346
  visibleEventSegments.map((segment) => /* @__PURE__ */ jsx(
1836
2347
  "div",
1837
2348
  {
1838
- "aria-hidden": "true",
2349
+ "aria-hidden": eventPopoverActive ? void 0 : "true",
1839
2350
  className: styles3.monthEventSpan,
1840
2351
  "data-testid": `schedule-event-span-${segment.event.id}`,
1841
2352
  style: getMonthEventSegmentStyle(segment),
@@ -1865,40 +2376,23 @@ function ScheduleMonthlyView({
1865
2376
  level: Math.max(0, monthEventLevelCount - 1)
1866
2377
  }),
1867
2378
  children: /* @__PURE__ */ jsx(
1868
- Popover,
2379
+ ScheduleEventOverflowPopover,
1869
2380
  {
1870
- content: /* @__PURE__ */ jsxs("div", { className: styles3.monthPopoverContent, children: [
1871
- /* @__PURE__ */ jsx(Heading, { level: 4, children: dateLabel }),
1872
- /* @__PURE__ */ jsx("ul", { className: styles3.monthPopoverEvents, children: (eventsByDate.get(day.toString()) ?? []).map(
1873
- (event) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
1874
- CalendarMonthEventPill,
1875
- {
1876
- event,
1877
- isPast: isEventInPast(
1878
- event,
1879
- currentTime2,
1880
- timezoneID
1881
- )
1882
- }
1883
- ) }, event.id)
1884
- ) })
1885
- ] }),
1886
- "data-testid": `schedule-month-see-more-${day.toString()}`,
2381
+ buttonClassName: styles3.monthSeeMoreButton,
2382
+ contentClassName: styles3.monthPopoverContent,
2383
+ events: eventsByDate.get(day.toString()) ?? [],
2384
+ eventsClassName: styles3.monthPopoverEvents,
2385
+ hiddenEventCount: hiddenEvents.length,
1887
2386
  label,
1888
- width: 320,
1889
- children: /* @__PURE__ */ jsxs(
1890
- "button",
2387
+ renderEvent: (event) => /* @__PURE__ */ jsx(
2388
+ CalendarMonthEventPill,
1891
2389
  {
1892
- "aria-label": label,
1893
- className: styles3.monthSeeMoreButton,
1894
- type: "button",
1895
- children: [
1896
- "+",
1897
- hiddenEvents.length,
1898
- " more"
1899
- ]
2390
+ event,
2391
+ isPast: isEventInPast(event, currentTime2, timezoneID)
1900
2392
  }
1901
- )
2393
+ ),
2394
+ testId: `schedule-month-see-more-${day.toString()}`,
2395
+ title: dateLabel
1902
2396
  }
1903
2397
  )
1904
2398
  },
@@ -1944,6 +2438,706 @@ function createScheduleMonthlyView({
1944
2438
  options: { monthRowHeight, weekCount, weekStartsOn }
1945
2439
  };
1946
2440
  }
2441
+ var DEFAULT_SNAP_MINUTES = 15;
2442
+ var MILLISECONDS_PER_MINUTE = 6e4;
2443
+ var MINUTES_PER_DAY = 24 * 60;
2444
+ function getSnappedMinutes(minutes, snapMinutes) {
2445
+ return Math.round(minutes / snapMinutes) * snapMinutes;
2446
+ }
2447
+ function getTimeGridStartMinutes({
2448
+ drag,
2449
+ hour,
2450
+ pointerOffsetMinutes,
2451
+ snapMinutes
2452
+ }) {
2453
+ return getSnappedMinutes(
2454
+ hour * 60 + pointerOffsetMinutes - drag.offsetMinutes,
2455
+ snapMinutes
2456
+ );
2457
+ }
2458
+ function instantFromDateAndMinutes(date, minutes, timezoneID) {
2459
+ const clampedMinutes = Math.round(
2460
+ Math.max(0, Math.min(MINUTES_PER_DAY - 1, minutes))
2461
+ );
2462
+ const hour = Math.floor(clampedMinutes / 60);
2463
+ const minute = clampedMinutes % 60;
2464
+ return date.toPlainDateTime(Temporal.PlainTime.from({ hour, minute })).toZonedDateTime(timezoneID).epochMilliseconds;
2465
+ }
2466
+ function moveEventToDate(event, date, timezoneID) {
2467
+ if (isDayEvent(event)) {
2468
+ const durationDays = event.start.until(event.end).days;
2469
+ return {
2470
+ end: date.add({ days: durationDays }),
2471
+ event,
2472
+ start: date
2473
+ };
2474
+ }
2475
+ const startTime = Temporal.Instant.fromEpochMilliseconds(event.start).toZonedDateTimeISO(timezoneID).toPlainTime();
2476
+ const start = date.toPlainDateTime(startTime).toZonedDateTime(timezoneID).epochMilliseconds;
2477
+ return {
2478
+ end: start + (event.end - event.start),
2479
+ event,
2480
+ start
2481
+ };
2482
+ }
2483
+ function moveEventToDateTime({
2484
+ date,
2485
+ drag,
2486
+ hour,
2487
+ pointerOffsetMinutes,
2488
+ snapMinutes,
2489
+ timezoneID
2490
+ }) {
2491
+ if (isDayEvent(drag.event)) {
2492
+ return null;
2493
+ }
2494
+ const startMinutes = getTimeGridStartMinutes({
2495
+ drag,
2496
+ hour,
2497
+ pointerOffsetMinutes,
2498
+ snapMinutes
2499
+ });
2500
+ const start = instantFromDateAndMinutes(date, startMinutes, timezoneID);
2501
+ return {
2502
+ end: start + (drag.event.end - drag.event.start),
2503
+ event: drag.event,
2504
+ start
2505
+ };
2506
+ }
2507
+ function hasChanged({
2508
+ end,
2509
+ event,
2510
+ start
2511
+ }) {
2512
+ return event.start !== start || event.end !== end;
2513
+ }
2514
+ function getDragEventClientY(dragEvent, fallback) {
2515
+ return Number.isFinite(dragEvent.clientY) ? dragEvent.clientY : fallback;
2516
+ }
2517
+ function applyDragPreview(drag, targetLeft, targetTop) {
2518
+ drag.previewElement.style.left = `${targetLeft}px`;
2519
+ drag.previewElement.style.top = `${targetTop}px`;
2520
+ }
2521
+ function resetDragPreview(drag) {
2522
+ drag.sourceElement.style.opacity = drag.initialOpacity;
2523
+ drag.previewElement.remove();
2524
+ }
2525
+ function createDragPreviewElement(event, sourceElement, sourceRect) {
2526
+ const preview = sourceElement.cloneNode(true);
2527
+ if (!(preview instanceof HTMLElement)) {
2528
+ throw new Error("Schedule event preview must be an HTMLElement.");
2529
+ }
2530
+ preview.setAttribute("aria-hidden", "true");
2531
+ preview.setAttribute(
2532
+ "data-testid",
2533
+ `schedule-event-move-preview-${event.id}`
2534
+ );
2535
+ preview.style.position = "fixed";
2536
+ preview.style.inset = "auto";
2537
+ preview.style.left = `${sourceRect.left}px`;
2538
+ preview.style.top = `${sourceRect.top}px`;
2539
+ preview.style.width = `${sourceRect.width}px`;
2540
+ preview.style.height = `${sourceRect.height}px`;
2541
+ preview.style.margin = "0";
2542
+ preview.style.opacity = "0.45";
2543
+ preview.style.pointerEvents = "none";
2544
+ preview.style.transform = "none";
2545
+ preview.style.zIndex = "1000";
2546
+ document.body.append(preview);
2547
+ return preview;
2548
+ }
2549
+ function createScheduleEventMovePlugin({
2550
+ dragRef,
2551
+ onMove,
2552
+ snapMinutes = DEFAULT_SNAP_MINUTES
2553
+ }) {
2554
+ const normalizedSnapMinutes = Number.isFinite(snapMinutes) && snapMinutes > 0 ? Math.max(1, Math.floor(snapMinutes)) : DEFAULT_SNAP_MINUTES;
2555
+ return {
2556
+ getEventProps({
2557
+ event,
2558
+ layout,
2559
+ timezoneID
2560
+ }) {
2561
+ if (layout !== "month" && (layout !== "timeGrid" || isDayEvent(event))) {
2562
+ return {};
2563
+ }
2564
+ return {
2565
+ draggable: true,
2566
+ onDragEnd: () => {
2567
+ if (dragRef.current != null) {
2568
+ resetDragPreview(dragRef.current);
2569
+ }
2570
+ dragRef.current = null;
2571
+ },
2572
+ onDragStart: (dragEvent) => {
2573
+ const element = dragEvent.currentTarget;
2574
+ const sourceRect = element.getBoundingClientRect();
2575
+ const isTimedTimeGridEvent = layout === "timeGrid" && !isDayEvent(event);
2576
+ const eventStartTime = isDayEvent(event) ? null : Temporal.Instant.fromEpochMilliseconds(event.start).toZonedDateTimeISO(timezoneID).toPlainTime();
2577
+ const eventStartMinutes = eventStartTime == null ? 0 : eventStartTime.hour * 60 + eventStartTime.minute;
2578
+ let offsetMinutes = eventStartMinutes;
2579
+ if (isTimedTimeGridEvent) {
2580
+ const durationMinutes = Math.max(
2581
+ 15,
2582
+ (event.end - event.start) / MILLISECONDS_PER_MINUTE
2583
+ );
2584
+ offsetMinutes = Math.max(
2585
+ 0,
2586
+ (getDragEventClientY(dragEvent, sourceRect.top) - sourceRect.top) / Math.max(1, sourceRect.height) * durationMinutes
2587
+ );
2588
+ }
2589
+ dragEvent.dataTransfer.setData("text/plain", event.id);
2590
+ dragEvent.dataTransfer.setDragImage(element, 0, 0);
2591
+ dragRef.current = {
2592
+ event,
2593
+ initialOpacity: element.style.opacity,
2594
+ offsetMinutes,
2595
+ previewElement: createDragPreviewElement(
2596
+ event,
2597
+ element,
2598
+ sourceRect
2599
+ ),
2600
+ sourceElement: element,
2601
+ sourceRect
2602
+ };
2603
+ element.style.opacity = "0.25";
2604
+ }
2605
+ };
2606
+ },
2607
+ getMonthCellProps({
2608
+ date,
2609
+ timezoneID
2610
+ }) {
2611
+ return {
2612
+ onDragOver: (dragEvent) => {
2613
+ if (dragRef.current != null) {
2614
+ dragEvent.preventDefault();
2615
+ const rect = dragEvent.currentTarget.getBoundingClientRect();
2616
+ applyDragPreview(dragRef.current, rect.left + 4, rect.top + 30);
2617
+ }
2618
+ },
2619
+ onDrop: (dragEvent) => {
2620
+ const drag = dragRef.current;
2621
+ if (drag == null) {
2622
+ return;
2623
+ }
2624
+ dragEvent.preventDefault();
2625
+ const change = moveEventToDate(drag.event, date, timezoneID);
2626
+ if (hasChanged(change)) {
2627
+ onMove(change);
2628
+ }
2629
+ resetDragPreview(drag);
2630
+ dragRef.current = null;
2631
+ }
2632
+ };
2633
+ },
2634
+ getTimeGridCellProps({
2635
+ date,
2636
+ hour,
2637
+ hourHeight,
2638
+ timezoneID
2639
+ }) {
2640
+ return {
2641
+ onDragOver: (dragEvent) => {
2642
+ if (dragRef.current != null && !isDayEvent(dragRef.current.event)) {
2643
+ dragEvent.preventDefault();
2644
+ const rect = dragEvent.currentTarget.getBoundingClientRect();
2645
+ const pointerOffsetMinutes = (getDragEventClientY(dragEvent, rect.top) - rect.top) / Math.max(1, hourHeight) * 60;
2646
+ const startMinutes = getTimeGridStartMinutes({
2647
+ drag: dragRef.current,
2648
+ hour,
2649
+ pointerOffsetMinutes,
2650
+ snapMinutes: normalizedSnapMinutes
2651
+ });
2652
+ const top = rect.top + (startMinutes - hour * 60) / 60 * hourHeight + 2;
2653
+ applyDragPreview(dragRef.current, rect.left + 2, top);
2654
+ }
2655
+ },
2656
+ onDrop: (dragEvent) => {
2657
+ const drag = dragRef.current;
2658
+ if (drag == null || isDayEvent(drag.event)) {
2659
+ return;
2660
+ }
2661
+ dragEvent.preventDefault();
2662
+ const rect = dragEvent.currentTarget.getBoundingClientRect();
2663
+ const pointerOffsetMinutes = (getDragEventClientY(dragEvent, rect.top) - rect.top) / Math.max(1, hourHeight) * 60;
2664
+ const change = moveEventToDateTime({
2665
+ date,
2666
+ drag,
2667
+ hour,
2668
+ pointerOffsetMinutes,
2669
+ snapMinutes: normalizedSnapMinutes,
2670
+ timezoneID
2671
+ });
2672
+ if (change != null && hasChanged(change)) {
2673
+ onMove(change);
2674
+ }
2675
+ resetDragPreview(drag);
2676
+ dragRef.current = null;
2677
+ }
2678
+ };
2679
+ }
2680
+ };
2681
+ }
2682
+ function useScheduleEventMovePlugin(options) {
2683
+ const optionsRef = useLatest_default(options);
2684
+ const dragRef = useRef(null);
2685
+ const onMove = useCallback(
2686
+ (change) => {
2687
+ optionsRef.current.onMove(change);
2688
+ },
2689
+ [optionsRef]
2690
+ );
2691
+ return useMemo(() => {
2692
+ return createScheduleEventMovePlugin({
2693
+ dragRef,
2694
+ onMove,
2695
+ snapMinutes: options.snapMinutes
2696
+ });
2697
+ }, [dragRef, onMove, options.snapMinutes]);
2698
+ }
2699
+ var MIN_DURATION_MINUTES = 15;
2700
+ var DEFAULT_SNAP_MINUTES2 = 15;
2701
+ var MILLISECONDS_PER_MINUTE2 = 6e4;
2702
+ var resizeHandle = cva({
2703
+ base: {
2704
+ position: "absolute",
2705
+ insetInline: 0,
2706
+ h: "3",
2707
+ cursor: "ns-resize",
2708
+ touchAction: "none",
2709
+ _focusVisible: {
2710
+ outlineWidth: "focus",
2711
+ outlineStyle: "solid",
2712
+ outlineColor: "primary",
2713
+ outlineOffset: "-2px"
2714
+ }
2715
+ },
2716
+ variants: {
2717
+ edge: {
2718
+ start: {
2719
+ insetBlockStart: 0
2720
+ },
2721
+ end: {
2722
+ insetBlockEnd: 0
2723
+ }
2724
+ }
2725
+ }
2726
+ });
2727
+ var resizeHandleClassNames = {
2728
+ end: resizeHandle({ edge: "end" }),
2729
+ start: resizeHandle({ edge: "start" })
2730
+ };
2731
+ function getDurationMinutes(start, end) {
2732
+ return (end - start) / MILLISECONDS_PER_MINUTE2;
2733
+ }
2734
+ function getSnappedDeltaMinutes(deltaPixels, hourHeight, snapMinutes) {
2735
+ const rawMinutes = deltaPixels / hourHeight * 60;
2736
+ return Math.round(rawMinutes / snapMinutes) * snapMinutes;
2737
+ }
2738
+ function getResizeRange(state, clientY) {
2739
+ const deltaMinutes = getSnappedDeltaMinutes(
2740
+ clientY - state.initialPointerY,
2741
+ state.hourHeight,
2742
+ state.snapMinutes
2743
+ );
2744
+ const delta = deltaMinutes * MILLISECONDS_PER_MINUTE2;
2745
+ const minDuration = MIN_DURATION_MINUTES * MILLISECONDS_PER_MINUTE2;
2746
+ if (state.edge === "start") {
2747
+ return {
2748
+ end: state.event.end,
2749
+ start: Math.min(state.event.end - minDuration, state.event.start + delta)
2750
+ };
2751
+ }
2752
+ return {
2753
+ end: Math.max(state.event.start + minDuration, state.event.end + delta),
2754
+ start: state.event.start
2755
+ };
2756
+ }
2757
+ function getPreviewHeight(state, range) {
2758
+ return `${Math.max(
2759
+ 36,
2760
+ getDurationMinutes(range.start, range.end) / 60 * state.hourHeight - 5
2761
+ )}px`;
2762
+ }
2763
+ function getPreviewTop(state, range) {
2764
+ const initialTop = Number.parseFloat(state.initialTop || "0");
2765
+ if (state.edge === "end") {
2766
+ return state.initialTop;
2767
+ }
2768
+ const deltaMinutes = getDurationMinutes(state.event.start, range.start);
2769
+ return `${initialTop + deltaMinutes / 60 * state.hourHeight}px`;
2770
+ }
2771
+ function applyPreview(state, range) {
2772
+ state.eventElement.style.height = getPreviewHeight(state, range);
2773
+ state.eventElement.style.top = getPreviewTop(state, range);
2774
+ }
2775
+ function ScheduleEventResizeHandle({
2776
+ edge,
2777
+ event,
2778
+ hourHeight,
2779
+ onResize,
2780
+ snapMinutes
2781
+ }) {
2782
+ const resizeStateRef = useRef(null);
2783
+ const pointerListenersRef = useRef(null);
2784
+ const removePointerListeners = useCallback(() => {
2785
+ const listeners2 = pointerListenersRef.current;
2786
+ if (listeners2 == null) {
2787
+ return;
2788
+ }
2789
+ window.removeEventListener("pointermove", listeners2.move);
2790
+ window.removeEventListener("pointerup", listeners2.up);
2791
+ window.removeEventListener("pointercancel", listeners2.cancel);
2792
+ pointerListenersRef.current = null;
2793
+ }, []);
2794
+ const finishResize = useCallback((clientY, isCommit) => {
2795
+ const state = resizeStateRef.current;
2796
+ if (state == null) {
2797
+ return;
2798
+ }
2799
+ const range = getResizeRange(state, clientY);
2800
+ if (isCommit) {
2801
+ if (range.start !== state.event.start || range.end !== state.event.end) {
2802
+ state.onResize({
2803
+ end: range.end,
2804
+ event: state.event,
2805
+ start: range.start
2806
+ });
2807
+ }
2808
+ } else {
2809
+ state.eventElement.style.height = state.initialHeight;
2810
+ state.eventElement.style.top = state.initialTop;
2811
+ }
2812
+ resizeStateRef.current = null;
2813
+ }, []);
2814
+ const handlePointerMove = useCallback((event2) => {
2815
+ const state = resizeStateRef.current;
2816
+ if (state == null) {
2817
+ return;
2818
+ }
2819
+ applyPreview(state, getResizeRange(state, event2.clientY));
2820
+ }, []);
2821
+ const handlePointerUp = useCallback(
2822
+ (event2) => {
2823
+ removePointerListeners();
2824
+ finishResize(event2.clientY, true);
2825
+ },
2826
+ [finishResize, removePointerListeners]
2827
+ );
2828
+ const handlePointerCancel = useCallback(
2829
+ (event2) => {
2830
+ removePointerListeners();
2831
+ finishResize(event2.clientY, false);
2832
+ },
2833
+ [finishResize, removePointerListeners]
2834
+ );
2835
+ const handlePointerDown = useCallback(
2836
+ (pointerEvent) => {
2837
+ pointerEvent.preventDefault();
2838
+ pointerEvent.stopPropagation();
2839
+ const eventElement = pointerEvent.currentTarget.parentElement;
2840
+ if (!(eventElement instanceof HTMLElement)) {
2841
+ return;
2842
+ }
2843
+ resizeStateRef.current = {
2844
+ edge,
2845
+ event,
2846
+ eventElement,
2847
+ hourHeight,
2848
+ initialHeight: eventElement.style.height,
2849
+ initialPointerY: pointerEvent.clientY,
2850
+ initialTop: eventElement.style.top,
2851
+ onResize,
2852
+ snapMinutes
2853
+ };
2854
+ pointerListenersRef.current = {
2855
+ cancel: handlePointerCancel,
2856
+ move: handlePointerMove,
2857
+ up: handlePointerUp
2858
+ };
2859
+ window.addEventListener("pointermove", handlePointerMove);
2860
+ window.addEventListener("pointerup", handlePointerUp);
2861
+ window.addEventListener("pointercancel", handlePointerCancel);
2862
+ },
2863
+ [
2864
+ edge,
2865
+ event,
2866
+ handlePointerCancel,
2867
+ handlePointerMove,
2868
+ handlePointerUp,
2869
+ hourHeight,
2870
+ onResize,
2871
+ snapMinutes
2872
+ ]
2873
+ );
2874
+ const handleKeyDown = useCallback(
2875
+ (keyEvent) => {
2876
+ const direction = keyEvent.key === "ArrowDown" ? 1 : keyEvent.key === "ArrowUp" ? -1 : 0;
2877
+ if (direction === 0) {
2878
+ return;
2879
+ }
2880
+ keyEvent.preventDefault();
2881
+ keyEvent.stopPropagation();
2882
+ const delta = direction * snapMinutes * MILLISECONDS_PER_MINUTE2;
2883
+ const minDuration = MIN_DURATION_MINUTES * MILLISECONDS_PER_MINUTE2;
2884
+ const range = edge === "start" ? {
2885
+ end: event.end,
2886
+ start: Math.min(event.end - minDuration, event.start + delta)
2887
+ } : {
2888
+ end: Math.max(event.start + minDuration, event.end + delta),
2889
+ start: event.start
2890
+ };
2891
+ if (range.start !== event.start || range.end !== event.end) {
2892
+ onResize({ event, ...range });
2893
+ }
2894
+ },
2895
+ [edge, event, onResize, snapMinutes]
2896
+ );
2897
+ return /* @__PURE__ */ jsx(
2898
+ "span",
2899
+ {
2900
+ "aria-label": `${edge === "start" ? "Resize start of" : "Resize end of"} ${event.title}`,
2901
+ "aria-orientation": "vertical",
2902
+ "aria-valuemax": event.end,
2903
+ "aria-valuemin": event.start,
2904
+ "aria-valuenow": edge === "start" ? event.start : event.end,
2905
+ className: resizeHandleClassNames[edge],
2906
+ "data-testid": `schedule-event-resize-${edge}-handle-${event.id}`,
2907
+ onClick: (event2) => event2.stopPropagation(),
2908
+ onKeyDown: handleKeyDown,
2909
+ onPointerDown: handlePointerDown,
2910
+ role: "slider",
2911
+ tabIndex: 0
2912
+ }
2913
+ );
2914
+ }
2915
+ function ScheduleEventResizeHandles({
2916
+ event,
2917
+ hourHeight,
2918
+ onResize,
2919
+ snapMinutes
2920
+ }) {
2921
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
2922
+ /* @__PURE__ */ jsx(
2923
+ ScheduleEventResizeHandle,
2924
+ {
2925
+ edge: "start",
2926
+ event,
2927
+ hourHeight,
2928
+ onResize,
2929
+ snapMinutes
2930
+ }
2931
+ ),
2932
+ /* @__PURE__ */ jsx(
2933
+ ScheduleEventResizeHandle,
2934
+ {
2935
+ edge: "end",
2936
+ event,
2937
+ hourHeight,
2938
+ onResize,
2939
+ snapMinutes
2940
+ }
2941
+ )
2942
+ ] });
2943
+ }
2944
+ function createScheduleEventResizePlugin({
2945
+ onResize,
2946
+ snapMinutes = DEFAULT_SNAP_MINUTES2
2947
+ }) {
2948
+ const normalizedSnapMinutes = Number.isFinite(snapMinutes) && snapMinutes > 0 ? Math.max(1, Math.floor(snapMinutes)) : DEFAULT_SNAP_MINUTES2;
2949
+ return {
2950
+ renderTimeGridEventContent({
2951
+ event,
2952
+ hourHeight
2953
+ }) {
2954
+ if (isDayEvent(event)) {
2955
+ return null;
2956
+ }
2957
+ return /* @__PURE__ */ jsx(
2958
+ ScheduleEventResizeHandles,
2959
+ {
2960
+ event,
2961
+ hourHeight,
2962
+ onResize,
2963
+ snapMinutes: normalizedSnapMinutes
2964
+ }
2965
+ );
2966
+ }
2967
+ };
2968
+ }
2969
+ function useScheduleEventResizePlugin(options) {
2970
+ const optionsRef = useLatest_default(options);
2971
+ const onResize = useCallback(
2972
+ (change) => {
2973
+ optionsRef.current.onResize(change);
2974
+ },
2975
+ [optionsRef]
2976
+ );
2977
+ return useMemo(
2978
+ () => createScheduleEventResizePlugin({
2979
+ onResize,
2980
+ snapMinutes: options.snapMinutes
2981
+ }),
2982
+ [onResize, options.snapMinutes]
2983
+ );
2984
+ }
2985
+ var styles4 = {
2986
+ layout: css({
2987
+ minW: "80",
2988
+ maxW: "96"
2989
+ }),
2990
+ dot: css({
2991
+ w: "3",
2992
+ h: "3"
2993
+ }),
2994
+ dateValue: css({
2995
+ display: "flex",
2996
+ flexDirection: "column"
2997
+ }),
2998
+ footerActions: css({
2999
+ display: "flex",
3000
+ justifyContent: "flex-end"
3001
+ })
3002
+ };
3003
+ function getEventDateLabel(event, timezoneID) {
3004
+ const startDate = isDayEvent(event) ? event.start : plainDateFromInstant(event.start, timezoneID);
3005
+ return formatDate(startDate);
3006
+ }
3007
+ function ScheduleEventPopoverContent({
3008
+ event,
3009
+ onClose,
3010
+ onDelete,
3011
+ onEdit,
3012
+ onRespond
3013
+ }) {
3014
+ const { categoryMap, timezoneID } = useScheduleContext();
3015
+ const [response, setResponse] = useState(null);
3016
+ const category = getCategory(categoryMap, event);
3017
+ const dotClass = scheduleEventRecipe({ color: category.color }).dot;
3018
+ return /* @__PURE__ */ jsx(
3019
+ Layout,
3020
+ {
3021
+ className: styles4.layout,
3022
+ content: /* @__PURE__ */ jsx(LayoutContent, { isScrollable: false, padding: 3, children: /* @__PURE__ */ jsxs(MetadataList, { children: [
3023
+ /* @__PURE__ */ jsx(
3024
+ MetadataListItem,
3025
+ {
3026
+ icon: CalendarDays,
3027
+ isIconOnly: true,
3028
+ label: "Date and time",
3029
+ children: /* @__PURE__ */ jsxs("span", { className: styles4.dateValue, children: [
3030
+ /* @__PURE__ */ jsx(Text, { children: getEventDateLabel(event, timezoneID) }),
3031
+ /* @__PURE__ */ jsx(Text, { color: "secondary", type: "supporting", children: getEventTimeLabel(event, timezoneID) })
3032
+ ] })
3033
+ }
3034
+ ),
3035
+ event.location != null && event.location !== "" ? /* @__PURE__ */ jsx(MetadataListItem, { icon: MapPin, isIconOnly: true, label: "Location", children: event.location }) : null,
3036
+ event.description != null && event.description !== "" ? /* @__PURE__ */ jsx(MetadataListItem, { icon: AlignLeft, isIconOnly: true, label: "Description", children: event.description }) : null,
3037
+ /* @__PURE__ */ jsx(MetadataListItem, { icon: Tag, isIconOnly: true, label: "Category", children: category.label })
3038
+ ] }) }),
3039
+ "data-testid": "schedule-event-popover",
3040
+ footer: /* @__PURE__ */ jsx(LayoutFooter, { label: "Your response", padding: 3, children: /* @__PURE__ */ jsx("div", { className: styles4.footerActions, children: /* @__PURE__ */ jsxs(
3041
+ ToggleButtonGroup,
3042
+ {
3043
+ label: "Your response",
3044
+ onChange: (value) => {
3045
+ setResponse(value);
3046
+ onRespond?.(event, value);
3047
+ },
3048
+ size: "sm",
3049
+ type: "single",
3050
+ value: response,
3051
+ children: [
3052
+ /* @__PURE__ */ jsx(ToggleButton, { label: "Not Going", value: "not-going" }),
3053
+ /* @__PURE__ */ jsx(ToggleButton, { label: "Maybe", value: "maybe" }),
3054
+ /* @__PURE__ */ jsx(
3055
+ ToggleButton,
3056
+ {
3057
+ "data-testid": "schedule-event-popover-response-going",
3058
+ label: "Going",
3059
+ value: "going"
3060
+ }
3061
+ )
3062
+ ]
3063
+ }
3064
+ ) }) }),
3065
+ header: /* @__PURE__ */ jsx(
3066
+ LayoutHeader,
3067
+ {
3068
+ align: "center",
3069
+ endContent: /* @__PURE__ */ jsxs(Fragment, { children: [
3070
+ onEdit != null ? /* @__PURE__ */ jsx(
3071
+ Button,
3072
+ {
3073
+ "data-testid": "schedule-event-popover-edit",
3074
+ icon: Pencil,
3075
+ isIconOnly: true,
3076
+ label: "Edit event",
3077
+ onClick: () => onEdit(event),
3078
+ size: "sm",
3079
+ variant: "ghost"
3080
+ }
3081
+ ) : null,
3082
+ onDelete != null ? /* @__PURE__ */ jsx(
3083
+ Button,
3084
+ {
3085
+ "data-testid": "schedule-event-popover-delete",
3086
+ icon: Trash2,
3087
+ isIconOnly: true,
3088
+ label: "Delete event",
3089
+ onClick: () => onDelete(event),
3090
+ size: "sm",
3091
+ variant: "ghost"
3092
+ }
3093
+ ) : null,
3094
+ /* @__PURE__ */ jsx(
3095
+ Button,
3096
+ {
3097
+ "data-testid": "schedule-event-popover-close",
3098
+ icon: X,
3099
+ isIconOnly: true,
3100
+ label: "Close",
3101
+ onClick: onClose,
3102
+ size: "sm",
3103
+ variant: "ghost"
3104
+ }
3105
+ )
3106
+ ] }),
3107
+ padding: 3,
3108
+ startContent: /* @__PURE__ */ jsx("span", { className: cx(dotClass, styles4.dot) }),
3109
+ title: event.title
3110
+ }
3111
+ ),
3112
+ height: "auto"
3113
+ }
3114
+ );
3115
+ }
3116
+ function createScheduleEventPopoverPlugin(options) {
3117
+ const { renderContent } = options;
3118
+ return {
3119
+ renderEventPopover(event, controls) {
3120
+ const typedEvent = event;
3121
+ if (renderContent != null) {
3122
+ return renderContent({ event: typedEvent, ...controls });
3123
+ }
3124
+ return /* @__PURE__ */ jsx(
3125
+ ScheduleEventPopoverContent,
3126
+ {
3127
+ event: typedEvent,
3128
+ onClose: controls.close
3129
+ }
3130
+ );
3131
+ }
3132
+ };
3133
+ }
3134
+ function useScheduleEventPopoverPlugin(options = {}) {
3135
+ const { renderContent } = options;
3136
+ return useMemo(
3137
+ () => createScheduleEventPopoverPlugin({ renderContent }),
3138
+ [renderContent]
3139
+ );
3140
+ }
1947
3141
  function SchedulePaginationControls({
1948
3142
  onViewDateChange
1949
3143
  }) {
@@ -2280,6 +3474,7 @@ function ScheduleWeeklyView({
2280
3474
  return /* @__PURE__ */ jsx(ScheduleFrame, { title, titleLabel: title, children: /* @__PURE__ */ jsx(
2281
3475
  TimeGridView,
2282
3476
  {
3477
+ allDayEventLimit: options.allDayEventLimit,
2283
3478
  days,
2284
3479
  hourHeight: options.hourHeight,
2285
3480
  maxHour: options.maxHour,
@@ -2288,6 +3483,7 @@ function ScheduleWeeklyView({
2288
3483
  ) });
2289
3484
  }
2290
3485
  function createScheduleWeeklyView({
3486
+ allDayEventLimit = 3,
2291
3487
  hourHeight = 100,
2292
3488
  maxHour = 24,
2293
3489
  minHour = 0,
@@ -2316,7 +3512,7 @@ function createScheduleWeeklyView({
2316
3512
  label: "Previous week",
2317
3513
  range: getWeekRange(date.addDays(-7))
2318
3514
  }),
2319
- options: { hourHeight, maxHour, minHour, weekStartsOn }
3515
+ options: { allDayEventLimit, hourHeight, maxHour, minHour, weekStartsOn }
2320
3516
  };
2321
3517
  }
2322
3518
  function setStartOfWeek2(date, weekStartsOn) {
@@ -2324,6 +3520,6 @@ function setStartOfWeek2(date, weekStartsOn) {
2324
3520
  return date.add({ days: -daysSinceWeekStart });
2325
3521
  }
2326
3522
 
2327
- export { Schedule, ScheduleContext, createEventFromISO, createScheduleDayView, createScheduleListView, createScheduleMonthlyView, createScheduleWeeklyView, defaultSchedulePlugins, useScheduleContext, useSchedulePaginationPlugin, useScheduleViewSelectorPlugin };
2328
- //# sourceMappingURL=chunk-GSTINE4X.js.map
2329
- //# sourceMappingURL=chunk-GSTINE4X.js.map
3523
+ export { Schedule, ScheduleContext, ScheduleEventPopoverContent, createEventFromISO, createScheduleDayView, createScheduleListView, createScheduleMonthlyView, createScheduleWeeklyView, defaultSchedulePlugins, useScheduleContext, useScheduleEventMovePlugin, useScheduleEventPopoverPlugin, useScheduleEventResizePlugin, useSchedulePaginationPlugin, useScheduleViewSelectorPlugin };
3524
+ //# sourceMappingURL=chunk-CZUMVOPH.js.map
3525
+ //# sourceMappingURL=chunk-CZUMVOPH.js.map