@codefast/ui 0.1.40 → 0.1.42

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 (360) hide show
  1. package/dist/{chunk-S6JAAVCK.js → chunk-23GW7ABR.js} +1 -1
  2. package/dist/{chunk-S6JAAVCK.js.map → chunk-23GW7ABR.js.map} +1 -1
  3. package/dist/{chunk-EYYMRAUH.cjs → chunk-2I4HX5WZ.cjs} +1 -1
  4. package/dist/{chunk-EYYMRAUH.cjs.map → chunk-2I4HX5WZ.cjs.map} +1 -1
  5. package/dist/{chunk-KNSUZHIX.js → chunk-2L66SLK7.js} +1 -1
  6. package/dist/{chunk-KNSUZHIX.js.map → chunk-2L66SLK7.js.map} +1 -1
  7. package/dist/{chunk-JO3GWI7Z.cjs → chunk-2PDUC74G.cjs} +1 -1
  8. package/dist/{chunk-JO3GWI7Z.cjs.map → chunk-2PDUC74G.cjs.map} +1 -1
  9. package/dist/{chunk-4LXGDACG.js → chunk-2S5X6KEC.js} +1 -1
  10. package/dist/{chunk-4LXGDACG.js.map → chunk-2S5X6KEC.js.map} +1 -1
  11. package/dist/{chunk-G7L7OMQC.cjs → chunk-2TPZK3HF.cjs} +1 -1
  12. package/dist/{chunk-G7L7OMQC.cjs.map → chunk-2TPZK3HF.cjs.map} +1 -1
  13. package/dist/{chunk-P3NQKY2O.js → chunk-2UTHZBUW.js} +1 -1
  14. package/dist/{chunk-P3NQKY2O.js.map → chunk-2UTHZBUW.js.map} +1 -1
  15. package/dist/{chunk-ESTQ3TW2.js → chunk-2YPMUBQ3.js} +1 -1
  16. package/dist/{chunk-ESTQ3TW2.js.map → chunk-2YPMUBQ3.js.map} +1 -1
  17. package/dist/{chunk-4GFRDE44.cjs → chunk-2ZFGMWLN.cjs} +2 -2
  18. package/dist/{chunk-4GFRDE44.cjs.map → chunk-2ZFGMWLN.cjs.map} +1 -1
  19. package/dist/{chunk-6ZALWOV2.js → chunk-35I5LYFK.js} +1 -1
  20. package/dist/{chunk-6ZALWOV2.js.map → chunk-35I5LYFK.js.map} +1 -1
  21. package/dist/{chunk-PAG3B6YB.js → chunk-3MX2Z6YO.js} +1 -1
  22. package/dist/{chunk-PAG3B6YB.js.map → chunk-3MX2Z6YO.js.map} +1 -1
  23. package/dist/{chunk-TSLTPMZG.js → chunk-453RCTYD.js} +1 -1
  24. package/dist/{chunk-TSLTPMZG.js.map → chunk-453RCTYD.js.map} +1 -1
  25. package/dist/{chunk-CABVGOLI.js → chunk-4S2IPOFD.js} +1 -1
  26. package/dist/{chunk-CABVGOLI.js.map → chunk-4S2IPOFD.js.map} +1 -1
  27. package/dist/{chunk-2VT6BX7S.cjs → chunk-5PHGQ4WO.cjs} +1 -1
  28. package/dist/{chunk-2VT6BX7S.cjs.map → chunk-5PHGQ4WO.cjs.map} +1 -1
  29. package/dist/{chunk-IDUR6OTC.js → chunk-676AFCKE.js} +1 -1
  30. package/dist/{chunk-IDUR6OTC.js.map → chunk-676AFCKE.js.map} +1 -1
  31. package/dist/{chunk-MS6HNR34.js → chunk-6I2ETZFI.js} +2 -2
  32. package/dist/{chunk-MS6HNR34.js.map → chunk-6I2ETZFI.js.map} +1 -1
  33. package/dist/{chunk-J5GEUQC3.js → chunk-6KQLJXPZ.js} +1 -1
  34. package/dist/{chunk-J5GEUQC3.js.map → chunk-6KQLJXPZ.js.map} +1 -1
  35. package/dist/{chunk-6QQPQ7WN.cjs → chunk-724FVHOW.cjs} +1 -1
  36. package/dist/{chunk-6QQPQ7WN.cjs.map → chunk-724FVHOW.cjs.map} +1 -1
  37. package/dist/{chunk-7AU7CPUH.js → chunk-7IRDNEXB.js} +1 -1
  38. package/dist/{chunk-7AU7CPUH.js.map → chunk-7IRDNEXB.js.map} +1 -1
  39. package/dist/{chunk-ZNOQDIWE.js → chunk-7WGDSUH5.js} +1 -1
  40. package/dist/{chunk-ZNOQDIWE.js.map → chunk-7WGDSUH5.js.map} +1 -1
  41. package/dist/{chunk-R4NKNWAF.cjs → chunk-A4KLN3C7.cjs} +1 -1
  42. package/dist/{chunk-R4NKNWAF.cjs.map → chunk-A4KLN3C7.cjs.map} +1 -1
  43. package/dist/{chunk-ZW5FER3Z.js → chunk-A6JWDJMI.js} +1 -1
  44. package/dist/{chunk-ZW5FER3Z.js.map → chunk-A6JWDJMI.js.map} +1 -1
  45. package/dist/{chunk-PFJKZSJ6.js → chunk-AUV6OPX3.js} +2 -2
  46. package/dist/{chunk-PFJKZSJ6.js.map → chunk-AUV6OPX3.js.map} +1 -1
  47. package/dist/{chunk-D77DV2PY.cjs → chunk-B44J2FJY.cjs} +1 -1
  48. package/dist/{chunk-D77DV2PY.cjs.map → chunk-B44J2FJY.cjs.map} +1 -1
  49. package/dist/{chunk-B2ANDYCK.cjs → chunk-BEB76MFO.cjs} +2 -2
  50. package/dist/{chunk-B2ANDYCK.cjs.map → chunk-BEB76MFO.cjs.map} +1 -1
  51. package/dist/{chunk-EMHBGKJ3.js → chunk-BLLW2IB4.js} +1 -1
  52. package/dist/{chunk-EMHBGKJ3.js.map → chunk-BLLW2IB4.js.map} +1 -1
  53. package/dist/{chunk-UFTG26DA.cjs → chunk-BQTDCIBW.cjs} +1 -1
  54. package/dist/{chunk-UFTG26DA.cjs.map → chunk-BQTDCIBW.cjs.map} +1 -1
  55. package/dist/{chunk-CVSZ456P.cjs → chunk-BRRVMH2P.cjs} +1 -1
  56. package/dist/{chunk-CVSZ456P.cjs.map → chunk-BRRVMH2P.cjs.map} +1 -1
  57. package/dist/{chunk-TAFSGBZZ.cjs → chunk-CEKEAPXG.cjs} +1 -1
  58. package/dist/{chunk-TAFSGBZZ.cjs.map → chunk-CEKEAPXG.cjs.map} +1 -1
  59. package/dist/{chunk-5AQT2M4Q.cjs → chunk-E4OOKNPK.cjs} +1 -1
  60. package/dist/{chunk-5AQT2M4Q.cjs.map → chunk-E4OOKNPK.cjs.map} +1 -1
  61. package/dist/{chunk-R3WIIIAC.js → chunk-EBSEF4UJ.js} +2 -2
  62. package/dist/{chunk-R3WIIIAC.js.map → chunk-EBSEF4UJ.js.map} +1 -1
  63. package/dist/{chunk-IGBASIDT.cjs → chunk-EJKVDVBQ.cjs} +1 -1
  64. package/dist/{chunk-IGBASIDT.cjs.map → chunk-EJKVDVBQ.cjs.map} +1 -1
  65. package/dist/{chunk-VPPKOHWH.js → chunk-END3X3XX.js} +1 -1
  66. package/dist/{chunk-VPPKOHWH.js.map → chunk-END3X3XX.js.map} +1 -1
  67. package/dist/{chunk-5NHYXWLY.js → chunk-EOIBKG5E.js} +1 -1
  68. package/dist/{chunk-5NHYXWLY.js.map → chunk-EOIBKG5E.js.map} +1 -1
  69. package/dist/{chunk-7K56G3OS.cjs → chunk-ESW7HLAR.cjs} +1 -1
  70. package/dist/{chunk-7K56G3OS.cjs.map → chunk-ESW7HLAR.cjs.map} +1 -1
  71. package/dist/{chunk-COVOQ3IT.cjs → chunk-EUKWGLGW.cjs} +1 -1
  72. package/dist/{chunk-COVOQ3IT.cjs.map → chunk-EUKWGLGW.cjs.map} +1 -1
  73. package/dist/{chunk-PSJENEZT.js → chunk-FAHH4BRG.js} +1 -1
  74. package/dist/{chunk-PSJENEZT.js.map → chunk-FAHH4BRG.js.map} +1 -1
  75. package/dist/{chunk-3VRNVFVA.cjs → chunk-FBWVAERI.cjs} +1 -1
  76. package/dist/{chunk-3VRNVFVA.cjs.map → chunk-FBWVAERI.cjs.map} +1 -1
  77. package/dist/{chunk-IHEIUFFB.js → chunk-FFS6LEIC.js} +1 -1
  78. package/dist/{chunk-IHEIUFFB.js.map → chunk-FFS6LEIC.js.map} +1 -1
  79. package/dist/{chunk-HO75YBHT.js → chunk-FQX54EGQ.js} +1 -1
  80. package/dist/chunk-FQX54EGQ.js.map +1 -0
  81. package/dist/{chunk-GLTHRHLI.cjs → chunk-GCH6J4AU.cjs} +1 -1
  82. package/dist/{chunk-GLTHRHLI.cjs.map → chunk-GCH6J4AU.cjs.map} +1 -1
  83. package/dist/{chunk-B6QFTT55.js → chunk-GPWWJ55C.js} +1 -1
  84. package/dist/{chunk-B6QFTT55.js.map → chunk-GPWWJ55C.js.map} +1 -1
  85. package/dist/{chunk-AQBPC4WT.cjs → chunk-GRVBRVSI.cjs} +1 -1
  86. package/dist/{chunk-AQBPC4WT.cjs.map → chunk-GRVBRVSI.cjs.map} +1 -1
  87. package/dist/{chunk-32SQW5RI.cjs → chunk-GTFDLZHV.cjs} +1 -1
  88. package/dist/{chunk-32SQW5RI.cjs.map → chunk-GTFDLZHV.cjs.map} +1 -1
  89. package/dist/{chunk-L7HMJMCP.js → chunk-HLDMGTXD.js} +1 -1
  90. package/dist/{chunk-L7HMJMCP.js.map → chunk-HLDMGTXD.js.map} +1 -1
  91. package/dist/{chunk-Y7NPEE5D.js → chunk-HUPAMFBT.js} +1 -1
  92. package/dist/{chunk-Y7NPEE5D.js.map → chunk-HUPAMFBT.js.map} +1 -1
  93. package/dist/{chunk-YL262UMC.cjs → chunk-ID2YVK5K.cjs} +1 -1
  94. package/dist/{chunk-YL262UMC.cjs.map → chunk-ID2YVK5K.cjs.map} +1 -1
  95. package/dist/{chunk-B6SHQPJP.js → chunk-IFNZQ4X4.js} +2 -2
  96. package/dist/{chunk-B6SHQPJP.js.map → chunk-IFNZQ4X4.js.map} +1 -1
  97. package/dist/{chunk-3SGIRTMN.js → chunk-IL6HKETS.js} +1 -1
  98. package/dist/{chunk-3SGIRTMN.js.map → chunk-IL6HKETS.js.map} +1 -1
  99. package/dist/{chunk-6JVA5L6F.cjs → chunk-IQW2BNVB.cjs} +2 -2
  100. package/dist/{chunk-6JVA5L6F.cjs.map → chunk-IQW2BNVB.cjs.map} +1 -1
  101. package/dist/{chunk-5WJRJGUS.js → chunk-JFUWDWLK.js} +2 -2
  102. package/dist/{chunk-5WJRJGUS.js.map → chunk-JFUWDWLK.js.map} +1 -1
  103. package/dist/{chunk-RN4E5CZJ.js → chunk-JKFXJEBN.js} +1 -1
  104. package/dist/{chunk-RN4E5CZJ.js.map → chunk-JKFXJEBN.js.map} +1 -1
  105. package/dist/{chunk-AIMWT5FF.cjs → chunk-KEAGJ67V.cjs} +1 -1
  106. package/dist/{chunk-AIMWT5FF.cjs.map → chunk-KEAGJ67V.cjs.map} +1 -1
  107. package/dist/{chunk-QZSEGJP3.cjs → chunk-KL3VMRZB.cjs} +2 -2
  108. package/dist/{chunk-QZSEGJP3.cjs.map → chunk-KL3VMRZB.cjs.map} +1 -1
  109. package/dist/{chunk-DQYZFLAN.js → chunk-KMM56U4E.js} +1 -1
  110. package/dist/{chunk-DQYZFLAN.js.map → chunk-KMM56U4E.js.map} +1 -1
  111. package/dist/{chunk-2KJO6CJD.cjs → chunk-KXWXI4E6.cjs} +1 -1
  112. package/dist/{chunk-2KJO6CJD.cjs.map → chunk-KXWXI4E6.cjs.map} +1 -1
  113. package/dist/{chunk-JNSAIWYA.js → chunk-L2GO47JL.js} +2 -2
  114. package/dist/{chunk-JNSAIWYA.js.map → chunk-L2GO47JL.js.map} +1 -1
  115. package/dist/{chunk-G2ZKUHLX.cjs → chunk-L2UFRTIN.cjs} +1 -1
  116. package/dist/{chunk-G2ZKUHLX.cjs.map → chunk-L2UFRTIN.cjs.map} +1 -1
  117. package/dist/{chunk-KU2TWJO6.cjs → chunk-LAABDH76.cjs} +1 -1
  118. package/dist/chunk-LAABDH76.cjs.map +1 -0
  119. package/dist/{chunk-4EPZJQXB.cjs → chunk-LCSG5Q6R.cjs} +1 -1
  120. package/dist/{chunk-4EPZJQXB.cjs.map → chunk-LCSG5Q6R.cjs.map} +1 -1
  121. package/dist/{chunk-QP6DOJTZ.cjs → chunk-LEPRQUPN.cjs} +1 -1
  122. package/dist/{chunk-QP6DOJTZ.cjs.map → chunk-LEPRQUPN.cjs.map} +1 -1
  123. package/dist/{chunk-T3UMGRIG.js → chunk-LK24DDIX.js} +1 -1
  124. package/dist/{chunk-T3UMGRIG.js.map → chunk-LK24DDIX.js.map} +1 -1
  125. package/dist/{chunk-H673265S.js → chunk-MHWTM2SE.js} +1 -1
  126. package/dist/{chunk-H673265S.js.map → chunk-MHWTM2SE.js.map} +1 -1
  127. package/dist/{chunk-6CRPUDHO.cjs → chunk-MOZFPPDY.cjs} +1 -1
  128. package/dist/{chunk-6CRPUDHO.cjs.map → chunk-MOZFPPDY.cjs.map} +1 -1
  129. package/dist/{chunk-Y46KHJVE.cjs → chunk-MSQ7VB7N.cjs} +2 -2
  130. package/dist/{chunk-Y46KHJVE.cjs.map → chunk-MSQ7VB7N.cjs.map} +1 -1
  131. package/dist/{chunk-C3JCUMYC.cjs → chunk-NN5SBICK.cjs} +1 -1
  132. package/dist/{chunk-C3JCUMYC.cjs.map → chunk-NN5SBICK.cjs.map} +1 -1
  133. package/dist/{chunk-4NUC23C3.cjs → chunk-NWNJEQSH.cjs} +1 -1
  134. package/dist/{chunk-4NUC23C3.cjs.map → chunk-NWNJEQSH.cjs.map} +1 -1
  135. package/dist/{chunk-4MEKIJBX.js → chunk-OGNKWQLC.js} +1 -1
  136. package/dist/{chunk-4MEKIJBX.js.map → chunk-OGNKWQLC.js.map} +1 -1
  137. package/dist/{chunk-MKZNGJBS.cjs → chunk-OKAUTO55.cjs} +1 -1
  138. package/dist/{chunk-MKZNGJBS.cjs.map → chunk-OKAUTO55.cjs.map} +1 -1
  139. package/dist/{chunk-5ZLLY3TV.js → chunk-PABBDAHL.js} +2 -2
  140. package/dist/{chunk-5ZLLY3TV.js.map → chunk-PABBDAHL.js.map} +1 -1
  141. package/dist/{chunk-ESGJD3EH.js → chunk-PND7QGPJ.js} +2 -2
  142. package/dist/{chunk-ESGJD3EH.js.map → chunk-PND7QGPJ.js.map} +1 -1
  143. package/dist/{chunk-WIMGJQVV.js → chunk-Q44GDNL2.js} +1 -1
  144. package/dist/{chunk-WIMGJQVV.js.map → chunk-Q44GDNL2.js.map} +1 -1
  145. package/dist/{chunk-DMHFWGKH.cjs → chunk-QHNY23IH.cjs} +1 -1
  146. package/dist/{chunk-DMHFWGKH.cjs.map → chunk-QHNY23IH.cjs.map} +1 -1
  147. package/dist/{chunk-HW6UEQFN.cjs → chunk-QMG62BV3.cjs} +1 -1
  148. package/dist/{chunk-HW6UEQFN.cjs.map → chunk-QMG62BV3.cjs.map} +1 -1
  149. package/dist/{chunk-277MGUJU.cjs → chunk-QSJKKUEW.cjs} +2 -2
  150. package/dist/{chunk-277MGUJU.cjs.map → chunk-QSJKKUEW.cjs.map} +1 -1
  151. package/dist/{chunk-6NCX7KIZ.js → chunk-QZZVFEOG.js} +1 -1
  152. package/dist/{chunk-6NCX7KIZ.js.map → chunk-QZZVFEOG.js.map} +1 -1
  153. package/dist/{chunk-BCBGSRNY.cjs → chunk-RBNJWH4I.cjs} +2 -2
  154. package/dist/chunk-RBNJWH4I.cjs.map +1 -0
  155. package/dist/{chunk-SCKKOG6N.js → chunk-RKGPSBB2.js} +2 -2
  156. package/dist/chunk-RKGPSBB2.js.map +1 -0
  157. package/dist/{chunk-DXKDE2PN.cjs → chunk-RLN3ZMKZ.cjs} +1 -1
  158. package/dist/{chunk-DXKDE2PN.cjs.map → chunk-RLN3ZMKZ.cjs.map} +1 -1
  159. package/dist/{chunk-P43SRU6B.js → chunk-RN6FVK2T.js} +2 -2
  160. package/dist/{chunk-P43SRU6B.js.map → chunk-RN6FVK2T.js.map} +1 -1
  161. package/dist/{chunk-UOKR5A44.js → chunk-S6NZOZO3.js} +1 -1
  162. package/dist/{chunk-UOKR5A44.js.map → chunk-S6NZOZO3.js.map} +1 -1
  163. package/dist/{chunk-5LXJ6LNT.js → chunk-SZJCVDQJ.js} +1 -1
  164. package/dist/{chunk-5LXJ6LNT.js.map → chunk-SZJCVDQJ.js.map} +1 -1
  165. package/dist/{chunk-3X6EEYS3.cjs → chunk-T5MDFGTH.cjs} +2 -2
  166. package/dist/{chunk-3X6EEYS3.cjs.map → chunk-T5MDFGTH.cjs.map} +1 -1
  167. package/dist/{chunk-OILTSDEC.cjs → chunk-TCBTFFUD.cjs} +1 -1
  168. package/dist/{chunk-OILTSDEC.cjs.map → chunk-TCBTFFUD.cjs.map} +1 -1
  169. package/dist/{chunk-YP7NF7KY.cjs → chunk-TMG24RQD.cjs} +2 -2
  170. package/dist/{chunk-YP7NF7KY.cjs.map → chunk-TMG24RQD.cjs.map} +1 -1
  171. package/dist/{chunk-OIBROWV7.js → chunk-UFNNCJZJ.js} +1 -1
  172. package/dist/{chunk-OIBROWV7.js.map → chunk-UFNNCJZJ.js.map} +1 -1
  173. package/dist/{chunk-GP4IX6Q5.cjs → chunk-UNYP4MLA.cjs} +1 -1
  174. package/dist/{chunk-GP4IX6Q5.cjs.map → chunk-UNYP4MLA.cjs.map} +1 -1
  175. package/dist/{chunk-Z7V3J23W.cjs → chunk-USDR57FY.cjs} +1 -1
  176. package/dist/{chunk-Z7V3J23W.cjs.map → chunk-USDR57FY.cjs.map} +1 -1
  177. package/dist/{chunk-YUJO6FOF.cjs → chunk-VGMUU7IK.cjs} +1 -1
  178. package/dist/{chunk-YUJO6FOF.cjs.map → chunk-VGMUU7IK.cjs.map} +1 -1
  179. package/dist/{chunk-JF2IPHMR.js → chunk-VRJTXWVC.js} +1 -1
  180. package/dist/{chunk-JF2IPHMR.js.map → chunk-VRJTXWVC.js.map} +1 -1
  181. package/dist/{chunk-QGXJIDRM.cjs → chunk-WMX6LRVM.cjs} +2 -2
  182. package/dist/chunk-WMX6LRVM.cjs.map +1 -0
  183. package/dist/{chunk-27FVJY2D.cjs → chunk-WPRQHIAB.cjs} +1 -1
  184. package/dist/{chunk-27FVJY2D.cjs.map → chunk-WPRQHIAB.cjs.map} +1 -1
  185. package/dist/{chunk-RZRUQ2YQ.js → chunk-WRNORCGY.js} +1 -1
  186. package/dist/{chunk-RZRUQ2YQ.js.map → chunk-WRNORCGY.js.map} +1 -1
  187. package/dist/{chunk-PHNUQKIK.js → chunk-WRV3NPYH.js} +2 -2
  188. package/dist/{chunk-PHNUQKIK.js.map → chunk-WRV3NPYH.js.map} +1 -1
  189. package/dist/{chunk-2OTO3VQG.js → chunk-X7SCQSLL.js} +1 -1
  190. package/dist/{chunk-2OTO3VQG.js.map → chunk-X7SCQSLL.js.map} +1 -1
  191. package/dist/{chunk-WV3VVLBR.js → chunk-XFVUVJFP.js} +1 -1
  192. package/dist/{chunk-WV3VVLBR.js.map → chunk-XFVUVJFP.js.map} +1 -1
  193. package/dist/{chunk-7RUBTABZ.cjs → chunk-XGECD4OY.cjs} +1 -1
  194. package/dist/{chunk-7RUBTABZ.cjs.map → chunk-XGECD4OY.cjs.map} +1 -1
  195. package/dist/{chunk-2L2JOHZX.js → chunk-XNHIUPPQ.js} +1 -1
  196. package/dist/{chunk-2L2JOHZX.js.map → chunk-XNHIUPPQ.js.map} +1 -1
  197. package/dist/{chunk-RPUH3ITJ.js → chunk-XQIIFT2E.js} +2 -2
  198. package/dist/{chunk-RPUH3ITJ.js.map → chunk-XQIIFT2E.js.map} +1 -1
  199. package/dist/{chunk-NBQOSKVV.cjs → chunk-XWLQZWT4.cjs} +1 -1
  200. package/dist/{chunk-NBQOSKVV.cjs.map → chunk-XWLQZWT4.cjs.map} +1 -1
  201. package/dist/{chunk-QOOHNPY5.js → chunk-XZPVLQDL.js} +1 -1
  202. package/dist/{chunk-QOOHNPY5.js.map → chunk-XZPVLQDL.js.map} +1 -1
  203. package/dist/{chunk-XQQCAIOS.cjs → chunk-YB746ZCF.cjs} +1 -1
  204. package/dist/{chunk-XQQCAIOS.cjs.map → chunk-YB746ZCF.cjs.map} +1 -1
  205. package/dist/{chunk-6WG2BQFJ.cjs → chunk-YD6EZS5C.cjs} +1 -1
  206. package/dist/{chunk-6WG2BQFJ.cjs.map → chunk-YD6EZS5C.cjs.map} +1 -1
  207. package/dist/{chunk-ER57BTKA.js → chunk-YQW267KZ.js} +1 -1
  208. package/dist/{chunk-ER57BTKA.js.map → chunk-YQW267KZ.js.map} +1 -1
  209. package/dist/{chunk-RY34IJ6J.cjs → chunk-YTUXNNEM.cjs} +1 -1
  210. package/dist/{chunk-RY34IJ6J.cjs.map → chunk-YTUXNNEM.cjs.map} +1 -1
  211. package/dist/{chunk-HFROIOY3.cjs → chunk-ZJ27IZXN.cjs} +1 -1
  212. package/dist/{chunk-HFROIOY3.cjs.map → chunk-ZJ27IZXN.cjs.map} +1 -1
  213. package/dist/{chunk-H6BT6PGA.js → chunk-ZTS4YELG.js} +1 -1
  214. package/dist/{chunk-H6BT6PGA.js.map → chunk-ZTS4YELG.js.map} +1 -1
  215. package/dist/{chunk-SFY3PJ4P.cjs → chunk-ZUUL7G4G.cjs} +1 -1
  216. package/dist/{chunk-SFY3PJ4P.cjs.map → chunk-ZUUL7G4G.cjs.map} +1 -1
  217. package/dist/components/accordion.cjs +1 -1
  218. package/dist/components/accordion.js +1 -1
  219. package/dist/components/alert-dialog.cjs +1 -1
  220. package/dist/components/alert-dialog.d.cts +1 -1
  221. package/dist/components/alert-dialog.d.ts +1 -1
  222. package/dist/components/alert-dialog.js +1 -1
  223. package/dist/components/alert.cjs +1 -1
  224. package/dist/components/alert.js +1 -1
  225. package/dist/components/avatar.cjs +1 -1
  226. package/dist/components/avatar.js +1 -1
  227. package/dist/components/breadcrumb.cjs +1 -1
  228. package/dist/components/breadcrumb.js +1 -1
  229. package/dist/components/button.cjs +1 -1
  230. package/dist/components/button.js +1 -1
  231. package/dist/components/calendar.cjs +1 -1
  232. package/dist/components/calendar.js +1 -1
  233. package/dist/components/card.cjs +1 -1
  234. package/dist/components/card.js +1 -1
  235. package/dist/components/carousel.cjs +1 -1
  236. package/dist/components/carousel.d.cts +1 -1
  237. package/dist/components/carousel.d.ts +1 -1
  238. package/dist/components/carousel.js +1 -1
  239. package/dist/components/chart.cjs +1 -1
  240. package/dist/components/chart.js +1 -1
  241. package/dist/components/checkbox-cards.cjs +1 -1
  242. package/dist/components/checkbox-cards.js +1 -1
  243. package/dist/components/checkbox-group.cjs +1 -1
  244. package/dist/components/checkbox-group.js +1 -1
  245. package/dist/components/checkbox.cjs +1 -1
  246. package/dist/components/checkbox.js +1 -1
  247. package/dist/components/collapsible.cjs +1 -1
  248. package/dist/components/collapsible.js +1 -1
  249. package/dist/components/command.cjs +1 -1
  250. package/dist/components/command.d.cts +3 -3
  251. package/dist/components/command.d.ts +3 -3
  252. package/dist/components/command.js +1 -1
  253. package/dist/components/container.cjs +1 -1
  254. package/dist/components/container.js +1 -1
  255. package/dist/components/context-menu.cjs +1 -1
  256. package/dist/components/context-menu.js +1 -1
  257. package/dist/components/data-table.cjs +1 -1
  258. package/dist/components/data-table.d.cts +1 -1
  259. package/dist/components/data-table.d.ts +1 -1
  260. package/dist/components/data-table.js +1 -1
  261. package/dist/components/dialog.cjs +1 -1
  262. package/dist/components/dialog.d.cts +1 -1
  263. package/dist/components/dialog.d.ts +1 -1
  264. package/dist/components/dialog.js +1 -1
  265. package/dist/components/drawer.cjs +1 -1
  266. package/dist/components/drawer.d.cts +1 -1
  267. package/dist/components/drawer.d.ts +1 -1
  268. package/dist/components/drawer.js +1 -1
  269. package/dist/components/dropdown-menu.cjs +1 -1
  270. package/dist/components/dropdown-menu.js +1 -1
  271. package/dist/components/form.cjs +1 -1
  272. package/dist/components/form.js +1 -1
  273. package/dist/components/hover-card.cjs +1 -1
  274. package/dist/components/hover-card.js +1 -1
  275. package/dist/components/input-otp.cjs +1 -1
  276. package/dist/components/input-otp.js +1 -1
  277. package/dist/components/kbd.cjs +1 -1
  278. package/dist/components/kbd.js +1 -1
  279. package/dist/components/label.cjs +1 -1
  280. package/dist/components/label.js +1 -1
  281. package/dist/components/menubar.cjs +1 -1
  282. package/dist/components/menubar.js +1 -1
  283. package/dist/components/navigation-menu.cjs +1 -1
  284. package/dist/components/navigation-menu.js +1 -1
  285. package/dist/components/number-input.cjs +1 -1
  286. package/dist/components/number-input.d.cts +1 -1
  287. package/dist/components/number-input.d.ts +1 -1
  288. package/dist/components/number-input.js +1 -1
  289. package/dist/components/pagination.cjs +1 -1
  290. package/dist/components/pagination.js +1 -1
  291. package/dist/components/password-input.cjs +1 -1
  292. package/dist/components/password-input.d.cts +1 -1
  293. package/dist/components/password-input.d.ts +1 -1
  294. package/dist/components/password-input.js +1 -1
  295. package/dist/components/popover.cjs +1 -1
  296. package/dist/components/popover.js +1 -1
  297. package/dist/components/progress.cjs +1 -1
  298. package/dist/components/progress.js +1 -1
  299. package/dist/components/radio-cards.cjs +1 -1
  300. package/dist/components/radio-cards.js +1 -1
  301. package/dist/components/radio-group.cjs +1 -1
  302. package/dist/components/radio-group.js +1 -1
  303. package/dist/components/radio.cjs +1 -1
  304. package/dist/components/radio.js +1 -1
  305. package/dist/components/resizable.cjs +1 -1
  306. package/dist/components/resizable.js +1 -1
  307. package/dist/components/scroll-area.cjs +1 -1
  308. package/dist/components/scroll-area.js +1 -1
  309. package/dist/components/search-input.cjs +1 -1
  310. package/dist/components/search-input.d.cts +1 -1
  311. package/dist/components/search-input.d.ts +1 -1
  312. package/dist/components/search-input.js +1 -1
  313. package/dist/components/select.cjs +1 -1
  314. package/dist/components/select.d.cts +1 -1
  315. package/dist/components/select.d.ts +1 -1
  316. package/dist/components/select.js +1 -1
  317. package/dist/components/separator.cjs +1 -1
  318. package/dist/components/separator.js +1 -1
  319. package/dist/components/sheet.cjs +1 -1
  320. package/dist/components/sheet.d.cts +1 -1
  321. package/dist/components/sheet.d.ts +1 -1
  322. package/dist/components/sheet.js +1 -1
  323. package/dist/components/skeleton.cjs +1 -1
  324. package/dist/components/skeleton.js +1 -1
  325. package/dist/components/slider.cjs +1 -1
  326. package/dist/components/slider.js +1 -1
  327. package/dist/components/sonner.cjs +1 -1
  328. package/dist/components/sonner.js +1 -1
  329. package/dist/components/spinner.cjs +1 -1
  330. package/dist/components/spinner.js +1 -1
  331. package/dist/components/switch.cjs +1 -1
  332. package/dist/components/switch.js +1 -1
  333. package/dist/components/table.cjs +1 -1
  334. package/dist/components/table.js +1 -1
  335. package/dist/components/tabs.cjs +1 -1
  336. package/dist/components/tabs.js +1 -1
  337. package/dist/components/text-input.cjs +1 -1
  338. package/dist/components/text-input.d.cts +1 -1
  339. package/dist/components/text-input.d.ts +1 -1
  340. package/dist/components/text-input.js +1 -1
  341. package/dist/components/textarea.cjs +1 -1
  342. package/dist/components/textarea.js +1 -1
  343. package/dist/components/toggle-group.cjs +1 -1
  344. package/dist/components/toggle-group.d.cts +1 -1
  345. package/dist/components/toggle-group.d.ts +1 -1
  346. package/dist/components/toggle-group.js +1 -1
  347. package/dist/components/toggle.cjs +1 -1
  348. package/dist/components/toggle.d.cts +1 -1
  349. package/dist/components/toggle.d.ts +1 -1
  350. package/dist/components/toggle.js +1 -1
  351. package/dist/components/tooltip.cjs +1 -1
  352. package/dist/components/tooltip.js +1 -1
  353. package/dist/index.cjs +1 -1
  354. package/dist/index.js +1 -1
  355. package/package.json +9 -9
  356. package/dist/chunk-BCBGSRNY.cjs.map +0 -1
  357. package/dist/chunk-HO75YBHT.js.map +0 -1
  358. package/dist/chunk-KU2TWJO6.cjs.map +0 -1
  359. package/dist/chunk-QGXJIDRM.cjs.map +0 -1
  360. package/dist/chunk-SCKKOG6N.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-B2ANDYCK.cjs","../src/components/calendar.tsx"],"names":["orientation","jsx","props","DayButton","modifiers","className","buttonRef","useRef","Button","cn","Calendar","classNames","DayPicker","DayFlag","UI","CalendarRangeLabel","formatStr","placeholder","date","jsxs","CalendarLabel"],"mappings":"AAAA,ylBAAY,CAAC,wDAAwC,wDAAyC,wDCG5F,mDAMO,mCAC+B,8BAItC,kDAqBW,+CALX,SAAA,CAAA,CAAAA,CAAAA,WAGA,CAAA,CAAA,CAAA,GAAqB,CACnB,CAAA,CAAA,CAAA,MACE,CAAA,CAAA,CAAA,CAAA,IAAOC,IAAe,CAAA,OAAA,6BAAA,yBAAU,CAAA,CAAA,SAAaC,CAAAA,QAG1C,CAAA,GAAA,CAAA,CACH,CAAA,CAAA,IAAA,MAAwB,CAAA,OAAA,6BAAA,2BAAU,CAAA,CAAA,SAAaA,CAAAA,QAG5C,CAAA,GAAA,CAAA,C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BAAA,MAAU,CAAA,CAAA,SACb,CAAA,UAAkB,CAAA,QACrB,CAEJ,CAYA,CAAA,CAAA,KAAA,CAAA,CAASC,CAAAA,CAAc,CACrB,CAAA,SACA,CAAA,CAAA,CAAA,IAAAJ,CAAAA,CAAY,CAAA,SACZ,CAAA,CAAA,CAAA,KAAAC,CAAAA,WAAc,CAAA,CAAA,CAChB,aAKShB,CAAC,CAAA,CAAA,OAAK,CAAA,CAAA,6BAAA,MAAU,CAAA,CAAA,SAAY,CAAA,UAAOiB,CAAMF,QAHtC,CAAA,6BAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,6BAAA,MAAU,CAAA,CAAA,SAAY,CAAA,UAIvC,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAAA,4CAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-B2ANDYCK.cjs","sourcesContent":[null,"'use client';\n\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronUpIcon,\n DotFilledIcon,\n} from '@radix-ui/react-icons';\nimport { format } from 'date-fns';\nimport { type ComponentProps, type JSX, useEffect, useRef } from 'react';\nimport {\n type CustomComponents,\n type DateRange,\n DayFlag,\n DayPicker,\n type DayPickerProps,\n type Matcher,\n SelectionState,\n UI,\n} from 'react-day-picker';\nimport { Button } from '@/components/button';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants } from '@/styles/button-variants';\n\n/* -----------------------------------------------------------------------------\n * Component: Chevron\n * -------------------------------------------------------------------------- */\n\nfunction Chevron({\n orientation,\n ...props\n}: ComponentProps<CustomComponents['Chevron']>): JSX.Element {\n switch (orientation) {\n case 'up': {\n return <ChevronUpIcon className=\"size-4\" {...props} />;\n }\n\n case 'down': {\n return <ChevronDownIcon className=\"size-4\" {...props} />;\n }\n\n case 'left': {\n return <ChevronLeftIcon className=\"size-4\" {...props} />;\n }\n\n case 'right': {\n return <ChevronRightIcon className=\"size-4\" {...props} />;\n }\n\n default:\n return <DotFilledIcon className=\"size-4\" {...props} />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DayButton\n * -------------------------------------------------------------------------- */\n\nfunction DayButton({\n day: _,\n modifiers,\n className,\n ...props\n}: ComponentProps<CustomComponents['DayButton']>): JSX.Element {\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (modifiers.focused) {\n buttonRef.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={buttonRef}\n icon\n className={cn(\n 'transition-none focus-visible:-outline-offset-2',\n (!modifiers.selected || modifiers.range_middle) && [\n modifiers.today\n ? 'bg-accent'\n : 'hover:border-accent hover:bg-transparent',\n modifiers.outside && 'text-opacity-30',\n ],\n modifiers.range_middle && 'bg-transparent',\n className,\n )}\n size=\"sm\"\n variant={\n modifiers.selected && !modifiers.range_middle ? 'default' : 'ghost'\n }\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Calendar\n * -------------------------------------------------------------------------- */\n\ntype CalendarProps = DayPickerProps;\n\nfunction Calendar({\n className,\n classNames,\n ...props\n}: CalendarProps): JSX.Element {\n return (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n [DayFlag.outside]: cn(!props.mode && 'text-opacity-30'),\n [DayFlag.today]: cn(!props.mode && 'bg-accent rounded-md'),\n [SelectionState.range_end]:\n 'to-accent rounded-r-md bg-gradient-to-l from-transparent to-50%',\n [SelectionState.range_middle]:\n 'bg-accent first:rounded-l-md last:rounded-r-md',\n [SelectionState.range_start]:\n 'to-accent rounded-l-md bg-gradient-to-r from-transparent to-50%',\n [UI.CaptionLabel]: 'inline-flex items-center',\n [UI.Day]: cn(\n 'py-0',\n !props.mode &&\n 'text-foreground mx-px flex min-h-9 min-w-9 items-center justify-center text-sm font-medium',\n ),\n [UI.DayButton]: 'border border-transparent',\n [UI.Dropdown]: 'absolute size-full appearance-none opacity-0',\n [UI.DropdownRoot]: 'relative inline-flex',\n [UI.Dropdowns]: 'inline-flex items-center gap-2',\n [UI.Footer]: 'text-sm',\n [UI.Month]: 'grid grid-rows-[2rem_1fr] gap-4',\n [UI.MonthCaption]: 'flex w-full justify-center text-sm font-medium',\n [UI.MonthGrid]:\n 'relative block table-fixed border-collapse space-y-2 [&>thead]:block',\n [UI.Months]: 'relative flex flex-wrap gap-4',\n [UI.Nav]: '-mr-4',\n [UI.NextMonthButton]: buttonVariants({\n className: 'absolute end-0',\n icon: true,\n size: 'xs',\n variant: 'outline',\n }),\n [UI.PreviousMonthButton]: buttonVariants({\n className: 'absolute start-0',\n icon: true,\n size: 'xs',\n variant: 'outline',\n }),\n [UI.Root]: 'inline-grid gap-4',\n [UI.Week]: 'flex',\n [UI.WeekNumber]: 'text-foreground/50 size-9 text-center text-xs',\n [UI.Weekday]: 'text-muted-foreground flex-1 text-sm font-normal',\n [UI.Weekdays]: 'flex',\n [UI.Weeks]: 'block space-y-2',\n ...classNames,\n }}\n components={{ Chevron, DayButton }}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CalendarRangeLabel\n * -------------------------------------------------------------------------- */\n\ninterface CalendarRangeLabelProps {\n date: DateRange | undefined;\n formatStr?: string;\n placeholder?: string;\n}\n\nfunction CalendarRangeLabel({\n date,\n formatStr = 'LLL dd, y',\n placeholder = 'Pick a date',\n}: CalendarRangeLabelProps): string | JSX.Element {\n if (!date?.from) {\n return <span className=\"truncate\">{placeholder}</span>;\n }\n\n const formattedFromDate = format(date.from, formatStr);\n\n if (!date.to) {\n return <span className=\"truncate\">{formattedFromDate}</span>;\n }\n\n const formattedToDate = format(date.to, formatStr);\n\n return (\n <span className=\"truncate\">\n {formattedFromDate} - {formattedToDate}\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CalendarLabel\n * -------------------------------------------------------------------------- */\n\ninterface CalendarLabelProps {\n date: Date | undefined;\n formatStr?: string;\n placeholder?: string;\n}\n\nfunction CalendarLabel({\n date,\n formatStr = 'PPP',\n placeholder = 'Pick a date',\n}: CalendarLabelProps): string | JSX.Element {\n if (!date) {\n return <span className=\"truncate\">{placeholder}</span>;\n }\n\n return <span className=\"truncate\">{format(date, formatStr)}</span>;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Calendar,\n CalendarLabel,\n type CalendarLabelProps,\n type CalendarProps,\n CalendarRangeLabel,\n type CalendarRangeLabelProps,\n type DateRange,\n type Matcher,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-BEB76MFO.cjs","../src/components/calendar.tsx"],"names":["orientation","jsx","props","DayButton","modifiers","className","buttonRef","useRef","Button","cn","Calendar","classNames","DayPicker","DayFlag","UI","CalendarRangeLabel","formatStr","placeholder","date","jsxs","CalendarLabel"],"mappings":"AAAA,ylBAAY,CAAC,wDAAwC,wDAAyC,wDCM5F,mDAMO,mCAC+B,8BAItC,kDAkBW,+CALX,SAAA,CAAA,CAAAA,CAAAA,WAGA,CAAA,CAAA,CAAA,GAAqB,CACnB,CAAA,CAAA,CAAA,MACE,CAAA,CAAA,CAAA,CAAA,IAAOC,IAAe,CAAA,OAAA,6BAAA,yBAAU,CAAA,CAAA,SAAaC,CAAAA,QAG1C,CAAA,GAAA,CAAA,CACH,CAAA,CAAA,IAAA,MAAwB,CAAA,OAAA,6BAAA,2BAAU,CAAA,CAAA,SAAaA,CAAAA,QAG5C,CAAA,GAAA,CAAA,CACH,CAAA,CAAA,IAAA,MAAwB,CAAA,OAAA,6BAAA,2BAAU,CAAA,CAAA,SAAaA,CAAAA,QAG5C,CAAA,GAAA,CAAA,CAAA,CACH,CAAA,IAAA,OAAyB,CAAA,OAAA,6BAAA,4BAAU,CAAA,CAAA,SAAaA,CAAAA,QAGlD,CAAA,GACE,CAAA,CAAA,CAAA,CAAA,OAAsB,CAAA,OAAA,6BAAA,yBAAU,CAAA,CAAA,SAAaA,CAAAA,QAQnD,CAAA,GAAA,CAASC,CAAAA,CAAU,CACj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HtC,CAAA,6BAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,6BAAA,MAAU,CAAA,CAAA,SAAY,CAAA,UAIvC,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAAA,4CAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-BEB76MFO.cjs","sourcesContent":[null,"'use client';\n\nimport { Button } from '@/components/button';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants } from '@/styles/button-variants';\nimport {\n ChevronDownIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronUpIcon,\n DotFilledIcon,\n} from '@radix-ui/react-icons';\nimport { format } from 'date-fns';\nimport { type ComponentProps, type JSX, useEffect, useRef } from 'react';\nimport {\n type CustomComponents,\n type DateRange,\n DayFlag,\n DayPicker,\n type DayPickerProps,\n type Matcher,\n SelectionState,\n UI,\n} from 'react-day-picker';\n\n/* -----------------------------------------------------------------------------\n * Component: Chevron\n * -------------------------------------------------------------------------- */\n\nfunction Chevron({\n orientation,\n ...props\n}: ComponentProps<CustomComponents['Chevron']>): JSX.Element {\n switch (orientation) {\n case 'up': {\n return <ChevronUpIcon className=\"size-4\" {...props} />;\n }\n\n case 'down': {\n return <ChevronDownIcon className=\"size-4\" {...props} />;\n }\n\n case 'left': {\n return <ChevronLeftIcon className=\"size-4\" {...props} />;\n }\n\n case 'right': {\n return <ChevronRightIcon className=\"size-4\" {...props} />;\n }\n\n default:\n return <DotFilledIcon className=\"size-4\" {...props} />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DayButton\n * -------------------------------------------------------------------------- */\n\nfunction DayButton({\n day: _,\n modifiers,\n className,\n ...props\n}: ComponentProps<CustomComponents['DayButton']>): JSX.Element {\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (modifiers.focused) {\n buttonRef.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={buttonRef}\n icon\n className={cn(\n 'transition-none focus-visible:-outline-offset-2',\n (!modifiers.selected || modifiers.range_middle) && [\n modifiers.today\n ? 'bg-accent'\n : 'hover:border-accent hover:bg-transparent',\n modifiers.outside && 'text-opacity-30',\n ],\n modifiers.range_middle && 'bg-transparent',\n className,\n )}\n size=\"sm\"\n variant={\n modifiers.selected && !modifiers.range_middle ? 'default' : 'ghost'\n }\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Calendar\n * -------------------------------------------------------------------------- */\n\ntype CalendarProps = DayPickerProps;\n\nfunction Calendar({\n className,\n classNames,\n ...props\n}: CalendarProps): JSX.Element {\n return (\n <DayPicker\n className={cn('p-3', className)}\n classNames={{\n [DayFlag.outside]: cn(!props.mode && 'text-opacity-30'),\n [DayFlag.today]: cn(!props.mode && 'bg-accent rounded-md'),\n [SelectionState.range_end]:\n 'to-accent rounded-r-md bg-gradient-to-l from-transparent to-50%',\n [SelectionState.range_middle]:\n 'bg-accent first:rounded-l-md last:rounded-r-md',\n [SelectionState.range_start]:\n 'to-accent rounded-l-md bg-gradient-to-r from-transparent to-50%',\n [UI.CaptionLabel]: 'inline-flex items-center',\n [UI.Day]: cn(\n 'py-0',\n !props.mode &&\n 'text-foreground mx-px flex min-h-9 min-w-9 items-center justify-center text-sm font-medium',\n ),\n [UI.DayButton]: 'border border-transparent',\n [UI.Dropdown]: 'absolute size-full appearance-none opacity-0',\n [UI.DropdownRoot]: 'relative inline-flex',\n [UI.Dropdowns]: 'inline-flex items-center gap-2',\n [UI.Footer]: 'text-sm',\n [UI.Month]: 'grid grid-rows-[2rem_1fr] gap-4',\n [UI.MonthCaption]: 'flex w-full justify-center text-sm font-medium',\n [UI.MonthGrid]:\n 'relative block table-fixed border-collapse space-y-2 [&>thead]:block',\n [UI.Months]: 'relative flex flex-wrap gap-4',\n [UI.Nav]: '-mr-4',\n [UI.NextMonthButton]: buttonVariants({\n className: 'absolute end-0',\n icon: true,\n size: 'xs',\n variant: 'outline',\n }),\n [UI.PreviousMonthButton]: buttonVariants({\n className: 'absolute start-0',\n icon: true,\n size: 'xs',\n variant: 'outline',\n }),\n [UI.Root]: 'inline-grid gap-4',\n [UI.Week]: 'flex',\n [UI.WeekNumber]: 'text-foreground/50 size-9 text-center text-xs',\n [UI.Weekday]: 'text-muted-foreground flex-1 text-sm font-normal',\n [UI.Weekdays]: 'flex',\n [UI.Weeks]: 'block space-y-2',\n ...classNames,\n }}\n components={{ Chevron, DayButton }}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CalendarRangeLabel\n * -------------------------------------------------------------------------- */\n\ninterface CalendarRangeLabelProps {\n date: DateRange | undefined;\n formatStr?: string;\n placeholder?: string;\n}\n\nfunction CalendarRangeLabel({\n date,\n formatStr = 'LLL dd, y',\n placeholder = 'Pick a date',\n}: CalendarRangeLabelProps): string | JSX.Element {\n if (!date?.from) {\n return <span className=\"truncate\">{placeholder}</span>;\n }\n\n const formattedFromDate = format(date.from, formatStr);\n\n if (!date.to) {\n return <span className=\"truncate\">{formattedFromDate}</span>;\n }\n\n const formattedToDate = format(date.to, formatStr);\n\n return (\n <span className=\"truncate\">\n {formattedFromDate} - {formattedToDate}\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CalendarLabel\n * -------------------------------------------------------------------------- */\n\ninterface CalendarLabelProps {\n date: Date | undefined;\n formatStr?: string;\n placeholder?: string;\n}\n\nfunction CalendarLabel({\n date,\n formatStr = 'PPP',\n placeholder = 'Pick a date',\n}: CalendarLabelProps): string | JSX.Element {\n if (!date) {\n return <span className=\"truncate\">{placeholder}</span>;\n }\n\n return <span className=\"truncate\">{format(date, formatStr)}</span>;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Calendar,\n CalendarLabel,\n CalendarRangeLabel,\n type CalendarLabelProps,\n type CalendarProps,\n type CalendarRangeLabelProps,\n type DateRange,\n type Matcher,\n};\n"]}
@@ -1,4 +1,4 @@
1
1
  "use client";import{a as d}from"./chunk-VPYH6JWS.js";import{createContext as M,forwardRef as x,useContext as H,useId as K,useMemo as L}from"react";import*as g from"recharts";import{Fragment as q,jsx as i,jsxs as f}from"react/jsx-runtime";var N={light:"",dark:".dark"},w=M(null);function _(){let e=H(w);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}var $=x(({children:e,className:r,config:t,id:o,...a},c)=>{let s=K(),l=`chart-${o||s.replace(/:/g,"")}`;return i(w.Provider,{value:{config:t},children:f("div",{ref:c,className:d("flex aspect-video justify-center text-xs","[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground","[&_.recharts-cartesian-grid_line[stroke=#ccc]]:stroke-border/50","[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border","[&_.recharts-dot[stroke=#fff]]:stroke-transparent","[&_.recharts-layer]:outline-none","[&_.recharts-polar-grid_[stroke=#ccc]]:stroke-border","[&_.recharts-radial-bar-background-sector]:fill-muted","[&_.recharts-reference-line_[stroke=#ccc]]:stroke-border","[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted","[&_.recharts-sector]:outline-none","[&_.recharts-sector[stroke=#fff]]:stroke-transparent","[&_.recharts-surface]:outline-none",r),"data-chart":l,...a,children:[i(I,{config:t,id:l}),i(g.ResponsiveContainer,{children:e})]})})});$.displayName="Chart";function I({id:e,config:r}){let t=L(()=>X(e,r),[e,r]);return i("style",{dangerouslySetInnerHTML:{__html:t}})}var Q=g.Tooltip,O=x(({active:e,className:r,color:t,formatter:o,hideIndicator:a=!1,hideLabel:c=!1,indicator:s="dot",label:l,labelClassName:p,labelFormatter:h,labelKey:y,nameKey:E,payload:u},j)=>{let{config:m}=_(),k=L(()=>{if(c||!u?.length)return null;let[n]=u;if(!n)return null;let P=`${y||n.dataKey||n.name||"value"}`,b=T(m,n,P),C=!y&&typeof l=="string"?m[l]?.label||l:b?.label;return h?i("div",{className:d("font-medium",p),children:h(C,u)}):C?i("div",{className:d("font-medium",p),children:C}):null},[m,c,l,p,h,y,u]);if(!e||!u?.length)return null;let v=u.length===1&&s!=="dot";return f("div",{ref:j,className:d("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",r),children:[v?null:k,i("div",{className:"grid gap-1.5",children:u.map((n,P)=>{let b=`${E||n.name||n.dataKey||"value"}`,C=T(m,n,b),R=t||n.payload.fill||n.color;return i("div",{className:d("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",s==="dot"&&"items-center"),children:o&&n.value!==void 0&&n.name?o(n.value,n.name,n,P,n.payload):f(q,{children:[C?.icon?i(C.icon,{}):!a&&i("div",{className:d("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":s==="dot","w-1":s==="line","w-0 border-[1.5px] border-dashed bg-transparent":s==="dashed","my-0.5":v&&s==="dashed"}),style:{"--color-bg":R,"--color-border":R}}),f("div",{className:d("flex flex-1 justify-between leading-none",v?"items-end":"items-center"),children:[f("div",{className:"grid gap-1.5",children:[v?k:null,i("span",{className:"text-muted-foreground",children:C?.label||n.name})]}),n.value?i("span",{className:"text-foreground font-mono font-medium tabular-nums",children:n.value.toLocaleString()}):null]})]})},n.dataKey)})})]})});O.displayName="ChartTooltipContent";var U=g.Legend,D=x(({className:e,hideIcon:r=!1,nameKey:t,payload:o,verticalAlign:a="bottom"},c)=>{let{config:s}=_();return o?.length?i("div",{ref:c,className:d("flex items-center justify-center gap-4",a==="top"?"pb-3":"pt-3",e),children:o.map(l=>{let p="value";t?p=t:l.dataKey&&(p=String(l.dataKey));let h=T(s,l,p);return f("div",{className:d("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:size-3"),children:[h?.icon&&!r?i(h.icon,{}):i("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:l.color}}),h?.label]},String(l.value))})}):null});D.displayName="ChartLegendContent";function T(e,r,t){if(!S(r))return;let o="payload"in r&&S(r.payload)?r.payload:void 0,a=V(r,o,t);return a in e?e[a]:e[t]}function S(e){return typeof e=="object"&&e!==null}function V(e,r,t){return t in e&&typeof e[t]=="string"?e[t]:r&&t in r&&typeof r[t]=="string"?r[t]:t}function J(e,r,t){let o=[];return o.push(`${N[e]} [data-chart=${r}] {`),t.forEach(([a,c])=>{let s=c.theme?.[e]||c.color;s&&o.push(` --color-${a}: ${s};`)}),o.push("}"),o.join(`
2
2
  `)}function X(e,r){let t=Object.entries(r).filter(([a,{theme:c,color:s}])=>c||s),o=[];return Object.keys(N).forEach(a=>{let c=J(a,e,t);o.push(c)}),o.join(`
3
3
  `)}export{$ as a,I as b,Q as c,O as d,U as e,D as f};
4
- //# sourceMappingURL=chunk-EMHBGKJ3.js.map
4
+ //# sourceMappingURL=chunk-BLLW2IB4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/chart.tsx"],"names":["createContext","forwardRef","useContext","useId","useMemo","RechartsPrimitive","Fragment","jsx","jsxs","THEMES","ChartContext","useChart","context","ChartContainer","children","className","config","id","props","ref","uniqueId","chartId","cn","ChartStyle","cssString","generateCSS","ChartTooltip","ChartTooltipContent","active","color","formatter","hideIndicator","hideLabel","indicator","label","labelClassName","labelFormatter","labelKey","nameKey","payload","tooltipLabel","item","key","itemConfig","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","isValidObject","nestedPayload","configLabelKey","getConfigLabelKey","obj","generateThemeCSS","theme","configEntries","rules","themeOrColorConfig","_","allRules","themeCSS"],"mappings":"wCAEA,OAGE,iBAAAA,EAEA,cAAAC,EAGA,cAAAC,EACA,SAAAC,EACA,WAAAC,MACK,QACP,UAAYC,MAAuB,WAkE3B,OA8KU,YAAAC,EAzJR,OAAAC,EArBF,QAAAC,MAAA,oBA1DR,IAAMC,EAAS,CACb,MAAO,GACP,KAAM,OACR,EAwBMC,EAAeV,EAAwC,IAAI,EAEjE,SAASW,GAA8B,CACrC,IAAMC,EAAUV,EA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EAAgB1C,EAAI6C,CAAkB,EAExEE,EAAS,KAAKC,CAAQ,CACxB,CAAC,EAEMD,EAAS,KAAK;AAAA,CAAI,CAC3B","sourcesContent":["'use client';\n\nimport {\n type ComponentProps,\n type ComponentType,\n createContext,\n type CSSProperties,\n forwardRef,\n type JSX,\n type ReactNode,\n useContext,\n useId,\n useMemo,\n} from 'react';\nimport * as RechartsPrimitive from 'recharts';\nimport {\n type NameType,\n type Payload,\n type ValueType,\n} from 'recharts/types/component/DefaultTooltipContent';\nimport { cn } from '@/lib/utils';\n\nconst THEMES = {\n light: '',\n dark: '.dark',\n} as const;\n\ntype Theme = keyof typeof THEMES;\n\ntype ChartConfig = {\n [k in string]: {\n icon?: ComponentType;\n label?: ReactNode;\n } & (\n | {\n color?: string;\n theme?: never;\n }\n | {\n theme: Record<Theme, string>;\n color?: never;\n }\n );\n};\n\ninterface ChartContextProps {\n config: ChartConfig;\n}\n\nconst ChartContext = createContext<ChartContextProps | null>(null);\n\nfunction useChart(): ChartContextProps {\n const context = useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Chart\n * -------------------------------------------------------------------------- */\n\ntype ChartContainerElement = HTMLDivElement;\ninterface ChartContainerProps extends ComponentProps<'div'> {\n children: ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >['children'];\n config: ChartConfig;\n}\n\nconst ChartContainer = forwardRef<ChartContainerElement, ChartContainerProps>(\n ({ children, className, config, id, ...props }, ref) => {\n const uniqueId = useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n ref={ref}\n className={cn(\n 'flex aspect-video justify-center text-xs',\n '[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground',\n '[&_.recharts-cartesian-grid_line[stroke=#ccc]]:stroke-border/50',\n '[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border',\n '[&_.recharts-dot[stroke=#fff]]:stroke-transparent',\n '[&_.recharts-layer]:outline-none',\n '[&_.recharts-polar-grid_[stroke=#ccc]]:stroke-border',\n '[&_.recharts-radial-bar-background-sector]:fill-muted',\n '[&_.recharts-reference-line_[stroke=#ccc]]:stroke-border',\n '[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted',\n '[&_.recharts-sector]:outline-none',\n '[&_.recharts-sector[stroke=#fff]]:stroke-transparent',\n '[&_.recharts-surface]:outline-none',\n className,\n )}\n data-chart={chartId}\n {...props}\n >\n <ChartStyle config={config} id={chartId} />\n <RechartsPrimitive.ResponsiveContainer>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n },\n);\n\nChartContainer.displayName = 'Chart';\n\n/* -----------------------------------------------------------------------------\n * Component: ChartStyle\n * -------------------------------------------------------------------------- */\n\ninterface ChartStyleProps {\n config: ChartConfig;\n id: string;\n}\n\nfunction ChartStyle({ id, config }: ChartStyleProps): JSX.Element | null {\n const cssString = useMemo(() => generateCSS(id, config), [id, config]);\n\n return <style dangerouslySetInnerHTML={{ __html: cssString }} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ChartTooltip\n * -------------------------------------------------------------------------- */\n\ntype ChartTooltipProps = ComponentProps<typeof RechartsPrimitive.Tooltip>;\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\n/* -----------------------------------------------------------------------------\n * Component: ChartTooltipContent\n * -------------------------------------------------------------------------- */\n\ntype ChartTooltipContentElement = HTMLDivElement;\ninterface ChartTooltipContentProps\n extends ComponentProps<typeof RechartsPrimitive.Tooltip>,\n Omit<ComponentProps<'div'>, 'content'> {\n hideIndicator?: boolean;\n hideLabel?: boolean;\n indicator?: 'line' | 'dot' | 'dashed';\n labelKey?: string;\n nameKey?: string;\n}\n\nconst ChartTooltipContent = forwardRef<\n ChartTooltipContentElement,\n ChartTooltipContentProps\n>(\n (\n {\n active,\n className,\n color,\n formatter,\n hideIndicator = false,\n hideLabel = false,\n indicator = 'dot',\n label,\n labelClassName,\n labelFormatter,\n labelKey,\n nameKey,\n payload,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n\n if (!item) {\n return null;\n }\n\n const key = `${labelKey || item.dataKey || item.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn('font-medium', labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n );\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [\n config,\n hideLabel,\n label,\n labelClassName,\n labelFormatter,\n labelKey,\n payload,\n ]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload.map((item, index) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor =\n color || (item.payload as { fill?: string }).fill || item.color;\n\n return (\n <div\n key={item.dataKey}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item.value !== undefined && item.name ? (\n formatter(\n item.value,\n item.name,\n item,\n index,\n item.payload as Payload<ValueType, NameType>[],\n )\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n 'shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]',\n {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent':\n indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n },\n )}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label || item.name}\n </span>\n </div>\n {item.value ? (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n ) : null}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\n\nChartTooltipContent.displayName = 'ChartTooltipContent';\n\n/* -----------------------------------------------------------------------------\n * Component: ChartLegend\n * -------------------------------------------------------------------------- */\n\ntype ChartLegendProps = ComponentProps<typeof RechartsPrimitive.Legend>;\nconst ChartLegend = RechartsPrimitive.Legend;\n\n/* -----------------------------------------------------------------------------\n * Component: ChartLegendContent\n * -------------------------------------------------------------------------- */\n\ntype ChartLegendContent = HTMLDivElement;\ninterface ChartLegendContentProps\n extends ComponentProps<'div'>,\n Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> {\n hideIcon?: boolean;\n nameKey?: string;\n}\n\nconst ChartLegendContent = forwardRef<HTMLDivElement, ChartLegendContentProps>(\n (\n { className, hideIcon = false, nameKey, payload, verticalAlign = 'bottom' },\n ref,\n ) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-center gap-4',\n verticalAlign === 'top' ? 'pb-3' : 'pt-3',\n className,\n )}\n >\n {payload.map((item) => {\n let key = 'value';\n\n if (nameKey) {\n key = nameKey;\n } else if (item.dataKey) {\n key = String(item.dataKey);\n }\n\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={String(item.value)}\n className={cn(\n '[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:size-3',\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n },\n);\n\nChartLegendContent.displayName = 'ChartLegendContent';\n\n/* -----------------------------------------------------------------------------\n * Helpers\n * -------------------------------------------------------------------------- */\n\n/**\n * Extracts and returns the appropriate configuration object from\n * the payload based on the specified key.\n *\n * @param config - The chart configuration object that contains various\n * settings.\n * @param payload - The payload object that might contain nested payload data.\n * @param key - The key used to retrieve the specific configuration from the\n * chart config.\n * @returns Returns a configuration object with optional properties `icon`,\n * `label`, `color` or `theme`, or `undefined` if the payload is invalid or\n * no configuration is found for the provided key.\n */\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string,\n):\n | ({\n icon?: ComponentType;\n label?: ReactNode;\n } & {\n color?: string;\n theme?: never;\n })\n | ({\n icon?: ComponentType;\n label?: ReactNode;\n } & {\n theme: Record<Theme, string>;\n color?: never;\n })\n | undefined {\n if (!isValidObject(payload)) {\n return undefined;\n }\n\n const nestedPayload =\n 'payload' in payload && isValidObject(payload.payload)\n ? payload.payload\n : undefined;\n\n const configLabelKey = getConfigLabelKey(payload, nestedPayload, key);\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n}\n\n/**\n * Checks if the provided value is a valid object.\n *\n * @param obj - The value to check.\n * @returns - Returns true if the value is an object and not null, false\n * otherwise.\n */\nfunction isValidObject(obj: unknown): obj is Record<string, unknown> {\n return typeof obj === 'object' && obj !== null;\n}\n\n/**\n * Retrieves the configuration label key from either the payload or\n * nestedPayload. If the key exists in the payload and is a string, the\n * corresponding value is returned. Otherwise, if the key exists in the\n * nestedPayload and is a string, its value is returned. If the key is not\n * found as a string in either object, the key itself is returned.\n *\n * @param payload - The primary payload containing key-value pairs.\n * @param nestedPayload - An optional nested payload containing additional\n * key-value pairs.\n * @param key - The key to search for within the payload and nestedPayload.\n *\n * @returns The string value associated with the key if found; otherwise, the\n * key itself.\n */\nfunction getConfigLabelKey(\n payload: Record<string, unknown>,\n nestedPayload: Record<string, unknown> | undefined,\n key: string,\n): string {\n if (key in payload && typeof payload[key] === 'string') {\n return payload[key];\n }\n\n if (\n nestedPayload &&\n key in nestedPayload &&\n typeof nestedPayload[key] === 'string'\n ) {\n return nestedPayload[key];\n }\n\n return key;\n}\n\n/**\n * Generates CSS for a specified theme and chart configuration.\n *\n * @param theme - The theme to be used (for example, 'light', 'dark').\n * @param id - The unique identifier of the chart.\n * @param configEntries - A list of configuration entries, each containing a\n * key and a chart configuration.\n * @returns The generated CSS as a string.\n */\nfunction generateThemeCSS(\n theme: Theme,\n id: string,\n configEntries: [string, ChartConfig[string]][],\n): string {\n const rules: string[] = [];\n\n rules.push(`${THEMES[theme]} [data-chart=${id}] {`);\n\n configEntries.forEach(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme] || itemConfig.color;\n\n if (color) {\n rules.push(` --color-${key}: ${color};`);\n }\n });\n\n rules.push('}');\n\n return rules.join('\\n');\n}\n\n/**\n * Generates CSS styles for a chart based on the provided configuration and\n * themes.\n *\n * @param id - The unique identifier for the chart element.\n * @param config - Configuration object for the chart. This includes theme and\n * color settings.\n * @returns A string containing the generated CSS rules.\n */\nfunction generateCSS(id: string, config: ChartConfig): string {\n const themeOrColorConfig = Object.entries(config).filter(\n ([_, { theme, color }]) => theme || color,\n );\n\n const allRules: string[] = [];\n\n Object.keys(THEMES).forEach((theme) => {\n const themeCSS = generateThemeCSS(theme as Theme, id, themeOrColorConfig);\n\n allRules.push(themeCSS);\n });\n\n return allRules.join('\\n');\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ChartContainer,\n type ChartContainerProps,\n ChartLegend,\n ChartLegendContent,\n type ChartLegendContentProps,\n type ChartLegendProps,\n ChartStyle,\n type ChartStyleProps,\n ChartTooltip,\n ChartTooltipContent,\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n type ChartConfig,\n};\n"]}
1
+ {"version":3,"sources":["../src/components/chart.tsx"],"names":["createContext","forwardRef","useContext","useId","useMemo","RechartsPrimitive","Fragment","jsx","jsxs","THEMES","ChartContext","useChart","context","ChartContainer","children","className","config","id","props","ref","uniqueId","chartId","cn","ChartStyle","cssString","generateCSS","ChartTooltip","ChartTooltipContent","active","color","formatter","hideIndicator","hideLabel","indicator","label","labelClassName","labelFormatter","labelKey","nameKey","payload","tooltipLabel","item","key","itemConfig","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","isValidObject","nestedPayload","configLabelKey","getConfigLabelKey","obj","generateThemeCSS","theme","configEntries","rules","themeOrColorConfig","_","allRules","themeCSS"],"mappings":"wCAGA,OAGE,iBAAAA,EAEA,cAAAC,EAGA,cAAAC,EACA,SAAAC,EACA,WAAAC,MACK,QACP,UAAYC,MAAuB,WAiE3B,OA8KU,YAAAC,EAzJR,OAAAC,EArBF,QAAAC,MAAA,oBA1DR,IAAMC,EAAS,CACb,MAAO,GACP,KAAM,OACR,EAwBMC,EAAeV,EAAwC,IAAI,EAEjE,SAASW,GAA8B,CACrC,IAAMC,EAAUV,EAAWQ,CAAY,EAEvC,GAAI,CAACE,EACH,MAAM,IAAI,MAAM,mDAAmD,EAGrE,OAAOA,CACT,CAcA,IAAMC,EAAiBZ,EACrB,CAAC,CAAE,SAAAa,EAAU,UAAAC,EAAW,OAAAC,EAAQ,GAAAC,EAAI,GAAGC,CAAM,EAAGC,IAAQ,CACtD,IAAMC,EAAWjB,EAAM,EACjBkB,EAAU,SAASJ,GAAMG,EAAS,QAAQ,KAAM,EAAE,CAAC,G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ASA,SAASW,EAAcI,EAA8C,CACnE,OAAO,OAAOA,GAAQ,UAAYA,IAAQ,IAC5C,CAiBA,SAASD,EACPjB,EACAe,EACAZ,EACQ,CACR,OAAIA,KAAOH,GAAW,OAAOA,EAAQG,CAAG,GAAM,SACrCH,EAAQG,CAAG,EAIlBY,GACAZ,KAAOY,GACP,OAAOA,EAAcZ,CAAG,GAAM,SAEvBY,EAAcZ,CAAG,EAGnBA,CACT,CAWA,SAASgB,EACPC,EACA1C,EACA2C,EACQ,CACR,IAAMC,EAAkB,CAAC,EAEzB,OAAAA,EAAM,KAAK,GAAGpD,EAAOkD,CAAK,CAAC,gBAAgB1C,CAAE,KAAK,EAElD2C,EAAc,QAAQ,CAAC,CAAClB,EAAKC,CAAU,IAAM,CAC3C,IAAMd,EAAQc,EAAW,QAAQgB,CAAK,GAAKhB,EAAW,MAElDd,GACFgC,EAAM,KAAK,aAAanB,CAAG,KAAKb,CAAK,GAAG,CAE5C,CAAC,EAEDgC,EAAM,KAAK,GAAG,EAEPA,EAAM,KAAK;AAAA,CAAI,CACxB,CAWA,SAASpC,EAAYR,EAAYD,EAA6B,CAC5D,IAAM8C,EAAqB,OAAO,QAAQ9C,CAAM,EAAE,OAChD,CAAC,CAAC+C,EAAG,CAAE,MAAAJ,EAAO,MAAA9B,CAAM,CAAC,IAAM8B,GAAS9B,CACtC,EAEMmC,EAAqB,CAAC,EAE5B,cAAO,KAAKvD,CAAM,EAAE,QAASkD,GAAU,CACrC,IAAMM,EAAWP,EAAiBC,EAAgB1C,EAAI6C,CAAkB,EAExEE,EAAS,KAAKC,CAAQ,CACxB,CAAC,EAEMD,EAAS,KAAK;AAAA,CAAI,CAC3B","sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\nimport {\n type ComponentProps,\n type ComponentType,\n createContext,\n type CSSProperties,\n forwardRef,\n type JSX,\n type ReactNode,\n useContext,\n useId,\n useMemo,\n} from 'react';\nimport * as RechartsPrimitive from 'recharts';\nimport {\n type NameType,\n type Payload,\n type ValueType,\n} from 'recharts/types/component/DefaultTooltipContent';\n\nconst THEMES = {\n light: '',\n dark: '.dark',\n} as const;\n\ntype Theme = keyof typeof THEMES;\n\ntype ChartConfig = {\n [k in string]: {\n icon?: ComponentType;\n label?: ReactNode;\n } & (\n | {\n color?: string;\n theme?: never;\n }\n | {\n theme: Record<Theme, string>;\n color?: never;\n }\n );\n};\n\ninterface ChartContextProps {\n config: ChartConfig;\n}\n\nconst ChartContext = createContext<ChartContextProps | null>(null);\n\nfunction useChart(): ChartContextProps {\n const context = useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: Chart\n * -------------------------------------------------------------------------- */\n\ntype ChartContainerElement = HTMLDivElement;\ninterface ChartContainerProps extends ComponentProps<'div'> {\n children: ComponentProps<\n typeof RechartsPrimitive.ResponsiveContainer\n >['children'];\n config: ChartConfig;\n}\n\nconst ChartContainer = forwardRef<ChartContainerElement, ChartContainerProps>(\n ({ children, className, config, id, ...props }, ref) => {\n const uniqueId = useId();\n const chartId = `chart-${id || uniqueId.replace(/:/g, '')}`;\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div\n ref={ref}\n className={cn(\n 'flex aspect-video justify-center text-xs',\n '[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground',\n '[&_.recharts-cartesian-grid_line[stroke=#ccc]]:stroke-border/50',\n '[&_.recharts-curve.recharts-tooltip-cursor]:stroke-border',\n '[&_.recharts-dot[stroke=#fff]]:stroke-transparent',\n '[&_.recharts-layer]:outline-none',\n '[&_.recharts-polar-grid_[stroke=#ccc]]:stroke-border',\n '[&_.recharts-radial-bar-background-sector]:fill-muted',\n '[&_.recharts-reference-line_[stroke=#ccc]]:stroke-border',\n '[&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted',\n '[&_.recharts-sector]:outline-none',\n '[&_.recharts-sector[stroke=#fff]]:stroke-transparent',\n '[&_.recharts-surface]:outline-none',\n className,\n )}\n data-chart={chartId}\n {...props}\n >\n <ChartStyle config={config} id={chartId} />\n <RechartsPrimitive.ResponsiveContainer>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n },\n);\n\nChartContainer.displayName = 'Chart';\n\n/* -----------------------------------------------------------------------------\n * Component: ChartStyle\n * -------------------------------------------------------------------------- */\n\ninterface ChartStyleProps {\n config: ChartConfig;\n id: string;\n}\n\nfunction ChartStyle({ id, config }: ChartStyleProps): JSX.Element | null {\n const cssString = useMemo(() => generateCSS(id, config), [id, config]);\n\n return <style dangerouslySetInnerHTML={{ __html: cssString }} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ChartTooltip\n * -------------------------------------------------------------------------- */\n\ntype ChartTooltipProps = ComponentProps<typeof RechartsPrimitive.Tooltip>;\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\n/* -----------------------------------------------------------------------------\n * Component: ChartTooltipContent\n * -------------------------------------------------------------------------- */\n\ntype ChartTooltipContentElement = HTMLDivElement;\ninterface ChartTooltipContentProps\n extends ComponentProps<typeof RechartsPrimitive.Tooltip>,\n Omit<ComponentProps<'div'>, 'content'> {\n hideIndicator?: boolean;\n hideLabel?: boolean;\n indicator?: 'line' | 'dot' | 'dashed';\n labelKey?: string;\n nameKey?: string;\n}\n\nconst ChartTooltipContent = forwardRef<\n ChartTooltipContentElement,\n ChartTooltipContentProps\n>(\n (\n {\n active,\n className,\n color,\n formatter,\n hideIndicator = false,\n hideLabel = false,\n indicator = 'dot',\n label,\n labelClassName,\n labelFormatter,\n labelKey,\n nameKey,\n payload,\n },\n ref,\n ) => {\n const { config } = useChart();\n\n const tooltipLabel = useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n\n if (!item) {\n return null;\n }\n\n const key = `${labelKey || item.dataKey || item.name || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string'\n ? config[label]?.label || label\n : itemConfig?.label;\n\n if (labelFormatter) {\n return (\n <div className={cn('font-medium', labelClassName)}>\n {labelFormatter(value, payload)}\n </div>\n );\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cn('font-medium', labelClassName)}>{value}</div>;\n }, [\n config,\n hideLabel,\n label,\n labelClassName,\n labelFormatter,\n labelKey,\n payload,\n ]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl',\n className,\n )}\n >\n {!nestLabel ? tooltipLabel : null}\n <div className=\"grid gap-1.5\">\n {payload.map((item, index) => {\n const key = `${nameKey || item.name || item.dataKey || 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor =\n color || (item.payload as { fill?: string }).fill || item.color;\n\n return (\n <div\n key={item.dataKey}\n className={cn(\n '[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5',\n indicator === 'dot' && 'items-center',\n )}\n >\n {formatter && item.value !== undefined && item.name ? (\n formatter(\n item.value,\n item.name,\n item,\n index,\n item.payload as Payload<ValueType, NameType>[],\n )\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cn(\n 'shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]',\n {\n 'h-2.5 w-2.5': indicator === 'dot',\n 'w-1': indicator === 'line',\n 'w-0 border-[1.5px] border-dashed bg-transparent':\n indicator === 'dashed',\n 'my-0.5': nestLabel && indicator === 'dashed',\n },\n )}\n style={\n {\n '--color-bg': indicatorColor,\n '--color-border': indicatorColor,\n } as CSSProperties\n }\n />\n )\n )}\n <div\n className={cn(\n 'flex flex-1 justify-between leading-none',\n nestLabel ? 'items-end' : 'items-center',\n )}\n >\n <div className=\"grid gap-1.5\">\n {nestLabel ? tooltipLabel : null}\n <span className=\"text-muted-foreground\">\n {itemConfig?.label || item.name}\n </span>\n </div>\n {item.value ? (\n <span className=\"text-foreground font-mono font-medium tabular-nums\">\n {item.value.toLocaleString()}\n </span>\n ) : null}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n },\n);\n\nChartTooltipContent.displayName = 'ChartTooltipContent';\n\n/* -----------------------------------------------------------------------------\n * Component: ChartLegend\n * -------------------------------------------------------------------------- */\n\ntype ChartLegendProps = ComponentProps<typeof RechartsPrimitive.Legend>;\nconst ChartLegend = RechartsPrimitive.Legend;\n\n/* -----------------------------------------------------------------------------\n * Component: ChartLegendContent\n * -------------------------------------------------------------------------- */\n\ntype ChartLegendContent = HTMLDivElement;\ninterface ChartLegendContentProps\n extends ComponentProps<'div'>,\n Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> {\n hideIcon?: boolean;\n nameKey?: string;\n}\n\nconst ChartLegendContent = forwardRef<HTMLDivElement, ChartLegendContentProps>(\n (\n { className, hideIcon = false, nameKey, payload, verticalAlign = 'bottom' },\n ref,\n ) => {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-center gap-4',\n verticalAlign === 'top' ? 'pb-3' : 'pt-3',\n className,\n )}\n >\n {payload.map((item) => {\n let key = 'value';\n\n if (nameKey) {\n key = nameKey;\n } else if (item.dataKey) {\n key = String(item.dataKey);\n }\n\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div\n key={String(item.value)}\n className={cn(\n '[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:size-3',\n )}\n >\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div\n className=\"h-2 w-2 shrink-0 rounded-[2px]\"\n style={{\n backgroundColor: item.color,\n }}\n />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n },\n);\n\nChartLegendContent.displayName = 'ChartLegendContent';\n\n/* -----------------------------------------------------------------------------\n * Helpers\n * -------------------------------------------------------------------------- */\n\n/**\n * Extracts and returns the appropriate configuration object from\n * the payload based on the specified key.\n *\n * @param config - The chart configuration object that contains various\n * settings.\n * @param payload - The payload object that might contain nested payload data.\n * @param key - The key used to retrieve the specific configuration from the\n * chart config.\n * @returns Returns a configuration object with optional properties `icon`,\n * `label`, `color` or `theme`, or `undefined` if the payload is invalid or\n * no configuration is found for the provided key.\n */\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string,\n):\n | ({\n icon?: ComponentType;\n label?: ReactNode;\n } & {\n color?: string;\n theme?: never;\n })\n | ({\n icon?: ComponentType;\n label?: ReactNode;\n } & {\n theme: Record<Theme, string>;\n color?: never;\n })\n | undefined {\n if (!isValidObject(payload)) {\n return undefined;\n }\n\n const nestedPayload =\n 'payload' in payload && isValidObject(payload.payload)\n ? payload.payload\n : undefined;\n\n const configLabelKey = getConfigLabelKey(payload, nestedPayload, key);\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n}\n\n/**\n * Checks if the provided value is a valid object.\n *\n * @param obj - The value to check.\n * @returns - Returns true if the value is an object and not null, false\n * otherwise.\n */\nfunction isValidObject(obj: unknown): obj is Record<string, unknown> {\n return typeof obj === 'object' && obj !== null;\n}\n\n/**\n * Retrieves the configuration label key from either the payload or\n * nestedPayload. If the key exists in the payload and is a string, the\n * corresponding value is returned. Otherwise, if the key exists in the\n * nestedPayload and is a string, its value is returned. If the key is not\n * found as a string in either object, the key itself is returned.\n *\n * @param payload - The primary payload containing key-value pairs.\n * @param nestedPayload - An optional nested payload containing additional\n * key-value pairs.\n * @param key - The key to search for within the payload and nestedPayload.\n *\n * @returns The string value associated with the key if found; otherwise, the\n * key itself.\n */\nfunction getConfigLabelKey(\n payload: Record<string, unknown>,\n nestedPayload: Record<string, unknown> | undefined,\n key: string,\n): string {\n if (key in payload && typeof payload[key] === 'string') {\n return payload[key];\n }\n\n if (\n nestedPayload &&\n key in nestedPayload &&\n typeof nestedPayload[key] === 'string'\n ) {\n return nestedPayload[key];\n }\n\n return key;\n}\n\n/**\n * Generates CSS for a specified theme and chart configuration.\n *\n * @param theme - The theme to be used (for example, 'light', 'dark').\n * @param id - The unique identifier of the chart.\n * @param configEntries - A list of configuration entries, each containing a\n * key and a chart configuration.\n * @returns The generated CSS as a string.\n */\nfunction generateThemeCSS(\n theme: Theme,\n id: string,\n configEntries: [string, ChartConfig[string]][],\n): string {\n const rules: string[] = [];\n\n rules.push(`${THEMES[theme]} [data-chart=${id}] {`);\n\n configEntries.forEach(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme] || itemConfig.color;\n\n if (color) {\n rules.push(` --color-${key}: ${color};`);\n }\n });\n\n rules.push('}');\n\n return rules.join('\\n');\n}\n\n/**\n * Generates CSS styles for a chart based on the provided configuration and\n * themes.\n *\n * @param id - The unique identifier for the chart element.\n * @param config - Configuration object for the chart. This includes theme and\n * color settings.\n * @returns A string containing the generated CSS rules.\n */\nfunction generateCSS(id: string, config: ChartConfig): string {\n const themeOrColorConfig = Object.entries(config).filter(\n ([_, { theme, color }]) => theme || color,\n );\n\n const allRules: string[] = [];\n\n Object.keys(THEMES).forEach((theme) => {\n const themeCSS = generateThemeCSS(theme as Theme, id, themeOrColorConfig);\n\n allRules.push(themeCSS);\n });\n\n return allRules.join('\\n');\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartStyle,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n type ChartContainerProps,\n type ChartLegendContentProps,\n type ChartLegendProps,\n type ChartStyleProps,\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkUF5YIM7Lcjs = require('./chunk-UF5YIM7L.cjs');var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reactalertdialog = require('@radix-ui/react-alert-dialog'); var t = _interopRequireWildcard(_reactalertdialog);var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var v=t.Root,u= exports.b =t.Trigger,m= exports.c =_react.forwardRef.call(void 0, ({className:e,...i},l)=>_jsxruntime.jsx.call(void 0, t.Portal,{children:_jsxruntime.jsx.call(void 0, t.Overlay,{className:_chunkDD6AVCRHcjs.a.call(void 0, "fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8","data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in","data-[state=closed]:animate-duration-200 data-[state=closed]:animate-fade-out"),children:_jsxruntime.jsx.call(void 0, t.Content,{ref:l,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-background relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg","data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:animate-duration-200 data-[state=open]:fade-in","data-[state=closed]:zoom-out-95 data-[state=closed]:animate-duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out",e),...i})})}));m.displayName=t.Content.displayName;function C({className:e,...i}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkDD6AVCRHcjs.a.call(void 0, "flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",e),...i})}function T({className:e,...i}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunkDD6AVCRHcjs.a.call(void 0, "overflow-auto px-6 py-2",e),...i})}function x({className:e,...i}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkDD6AVCRHcjs.a.call(void 0, "flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end",e),...i})}var g=_react.forwardRef.call(void 0, ({className:e,...i},l)=>_jsxruntime.jsx.call(void 0, t.Title,{ref:l,className:_chunkDD6AVCRHcjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",e),...i}));g.displayName=t.Title.displayName;var A=_react.forwardRef.call(void 0, ({className:e,...i},l)=>_jsxruntime.jsx.call(void 0, t.Description,{ref:l,className:_chunkDD6AVCRHcjs.a.call(void 0, "text-muted-foreground text-sm",e),...i}));A.displayName=t.Description.displayName;var D=_react.forwardRef.call(void 0, ({className:e,size:i,variant:l,...n},p)=>_jsxruntime.jsx.call(void 0, t.Action,{ref:p,className:_chunkUF5YIM7Lcjs.a.call(void 0, {className:e,size:i,variant:l}),...n}));D.displayName=t.Action.displayName;var P=_react.forwardRef.call(void 0, ({className:e,size:i,variant:l="outline",...n},p)=>_jsxruntime.jsx.call(void 0, t.Cancel,{ref:p,className:_chunkUF5YIM7Lcjs.a.call(void 0, {className:e,size:i,variant:l}),...n}));P.displayName=t.Cancel.displayName;exports.a = v; exports.b = u; exports.c = m; exports.d = C; exports.e = T; exports.f = x; exports.g = g; exports.h = A; exports.i = D; exports.j = P;
2
- //# sourceMappingURL=chunk-UFTG26DA.cjs.map
2
+ //# sourceMappingURL=chunk-BQTDCIBW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-UFTG26DA.cjs","../src/components/alert-dialog.tsx"],"names":["AlertDialog","AlertDialogTrigger","AlertDialogContent","forwardRef","className","props","forwardedRef","jsx","cn","AlertDialogHeader","AlertDialogBody","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","size","variant","buttonVariants","AlertDialogCancel"],"mappings":"AAAA,mZAAwC,wDAAyC,oHCA3C,8BAQ/B,+CA8CD,IAlCAA,CAAAA,CAAmC,CAAA,CAAA,IAAA,CASnCC,CAAAA,aAA0C,CAAA,CAAA,OAAA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AAAA,EACrDC,6BAAAA,CAAsB,CAAA,MAAA,CAArB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWW,iCAAAA,CAAiB,SAAA,CAAAb,CAAAA,CAAW,IAAA,CAAAW,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAC,CAAA,CACrD,GAAGX,CAAAA,CACN,CACD,CAAA,CAEDa,CAAAA,CAAkB,WAAA,CAAmC,CAAA,CAAA,MAAA,CAAO,WAAA,CAAA,qJAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-UFTG26DA.cjs","sourcesContent":[null,"import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\nimport { cn } from '@/lib/utils';\nimport {\n buttonVariants,\n type ButtonVariantsProps,\n} from '@/styles/button-variants';\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialog\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root>;\nconst AlertDialog = AlertDialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTriggerProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Trigger\n>;\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogContent\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogContentElement = ComponentRef<\n typeof AlertDialogPrimitive.Content\n>;\ntype AlertDialogContentProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Content\n>;\n\nconst AlertDialogContent = forwardRef<\n AlertDialogContentElement,\n AlertDialogContentProps\n>(({ className, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Portal>\n <AlertDialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8',\n 'data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-duration-200 data-[state=closed]:animate-fade-out',\n )}\n >\n <AlertDialogPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg',\n 'data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:animate-duration-200 data-[state=open]:fade-in',\n 'data-[state=closed]:zoom-out-95 data-[state=closed]:animate-duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out',\n className,\n )}\n {...props}\n />\n </AlertDialogPrimitive.Overlay>\n </AlertDialogPrimitive.Portal>\n));\n\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogHeader\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogHeaderProps = HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: AlertDialogHeaderProps): JSX.Element {\n return (\n <div\n className={cn(\n 'flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogBodyProps = HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogBody({\n className,\n ...props\n}: AlertDialogBodyProps): JSX.Element {\n return (\n <main className={cn('overflow-auto px-6 py-2', className)} {...props} />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogFooter\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogFooterProps = HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: AlertDialogFooterProps): JSX.Element {\n return (\n <div\n className={cn(\n 'flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTitle\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTitleElement = ComponentRef<typeof AlertDialogPrimitive.Title>;\ntype AlertDialogTitleProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Title\n>;\n\nconst AlertDialogTitle = forwardRef<\n AlertDialogTitleElement,\n AlertDialogTitleProps\n>(({ className, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Title\n ref={forwardedRef}\n className={cn(\n 'text-lg font-semibold leading-none tracking-tight',\n className,\n )}\n {...props}\n />\n));\n\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogDescription\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogDescriptionElement = ComponentRef<\n typeof AlertDialogPrimitive.Description\n>;\ntype AlertDialogDescriptionProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Description\n>;\n\nconst AlertDialogDescription = forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>(({ className, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n));\n\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogAction\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogActionElement = ComponentRef<\n typeof AlertDialogPrimitive.Action\n>;\n\ninterface AlertDialogActionProps\n extends ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst AlertDialogAction = forwardRef<\n AlertDialogActionElement,\n AlertDialogActionProps\n>(({ className, size, variant, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Action\n ref={forwardedRef}\n className={buttonVariants({ className, size, variant })}\n {...props}\n />\n));\n\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogCancel\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogCancelElement = ComponentRef<\n typeof AlertDialogPrimitive.Cancel\n>;\n\ninterface AlertDialogCancelProps\n extends ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst AlertDialogCancel = forwardRef<\n AlertDialogCancelElement,\n AlertDialogCancelProps\n>(({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Cancel\n ref={forwardedRef}\n className={buttonVariants({ className, size, variant })}\n {...props}\n />\n));\n\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n AlertDialog,\n AlertDialogAction,\n type AlertDialogActionProps,\n AlertDialogBody,\n type AlertDialogBodyProps,\n AlertDialogCancel,\n type AlertDialogCancelProps,\n AlertDialogContent,\n type AlertDialogContentProps,\n AlertDialogDescription,\n type AlertDialogDescriptionProps,\n AlertDialogFooter,\n type AlertDialogFooterProps,\n AlertDialogHeader,\n type AlertDialogHeaderProps,\n type AlertDialogProps,\n AlertDialogTitle,\n type AlertDialogTitleProps,\n AlertDialogTrigger,\n type AlertDialogTriggerProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-BQTDCIBW.cjs","../src/components/alert-dialog.tsx"],"names":["AlertDialog","AlertDialogTrigger","AlertDialogContent","forwardRef","className","props","forwardedRef","jsx","cn","AlertDialogHeader","AlertDialogBody","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","size","variant","buttonVariants","AlertDialogCancel"],"mappings":"AAAA,mZAAwC,wDAAyC,oHCK3C,8BAQ/B,+CAyCD,IAlCAA,CAAAA,CAA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CAAAA,CAAU,SAAA,CAAW,GAAGX,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACrDC,6BAAAA,CAAsB,CAAA,MAAA,CAArB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWW,iCAAAA,CAAiB,SAAA,CAAAb,CAAAA,CAAW,IAAA,CAAAW,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAC,CAAA,CACrD,GAAGX,CAAAA,CACN,CACD,CAAA,CAEDa,CAAAA,CAAkB,WAAA,CAAmC,CAAA,CAAA,MAAA,CAAO,WAAA,CAAA,qJAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-BQTDCIBW.cjs","sourcesContent":[null,"import { cn } from '@/lib/utils';\nimport {\n buttonVariants,\n type ButtonVariantsProps,\n} from '@/styles/button-variants';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialog\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root>;\nconst AlertDialog = AlertDialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTriggerProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Trigger\n>;\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogContent\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogContentElement = ComponentRef<\n typeof AlertDialogPrimitive.Content\n>;\ntype AlertDialogContentProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Content\n>;\n\nconst AlertDialogContent = forwardRef<\n AlertDialogContentElement,\n AlertDialogContentProps\n>(({ className, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Portal>\n <AlertDialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 grid place-items-center overflow-auto bg-black/80 p-4 sm:pb-12 sm:pt-8',\n 'data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in',\n 'data-[state=closed]:animate-duration-200 data-[state=closed]:animate-fade-out',\n )}\n >\n <AlertDialogPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background relative z-50 flex w-full max-w-lg flex-col rounded-lg border shadow-lg',\n 'data-[state=open]:animate-in data-[state=open]:zoom-in-95 data-[state=open]:animate-duration-200 data-[state=open]:fade-in',\n 'data-[state=closed]:zoom-out-95 data-[state=closed]:animate-duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out',\n className,\n )}\n {...props}\n />\n </AlertDialogPrimitive.Overlay>\n </AlertDialogPrimitive.Portal>\n));\n\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogHeader\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogHeaderProps = HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: AlertDialogHeaderProps): JSX.Element {\n return (\n <div\n className={cn(\n 'flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DialogBody\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogBodyProps = HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogBody({\n className,\n ...props\n}: AlertDialogBodyProps): JSX.Element {\n return (\n <main className={cn('overflow-auto px-6 py-2', className)} {...props} />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogFooter\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogFooterProps = HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: AlertDialogFooterProps): JSX.Element {\n return (\n <div\n className={cn(\n 'flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTitle\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTitleElement = ComponentRef<typeof AlertDialogPrimitive.Title>;\ntype AlertDialogTitleProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Title\n>;\n\nconst AlertDialogTitle = forwardRef<\n AlertDialogTitleElement,\n AlertDialogTitleProps\n>(({ className, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Title\n ref={forwardedRef}\n className={cn(\n 'text-lg font-semibold leading-none tracking-tight',\n className,\n )}\n {...props}\n />\n));\n\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogDescription\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogDescriptionElement = ComponentRef<\n typeof AlertDialogPrimitive.Description\n>;\ntype AlertDialogDescriptionProps = ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Description\n>;\n\nconst AlertDialogDescription = forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>(({ className, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n));\n\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogAction\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogActionElement = ComponentRef<\n typeof AlertDialogPrimitive.Action\n>;\n\ninterface AlertDialogActionProps\n extends ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst AlertDialogAction = forwardRef<\n AlertDialogActionElement,\n AlertDialogActionProps\n>(({ className, size, variant, ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Action\n ref={forwardedRef}\n className={buttonVariants({ className, size, variant })}\n {...props}\n />\n));\n\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogCancel\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogCancelElement = ComponentRef<\n typeof AlertDialogPrimitive.Cancel\n>;\n\ninterface AlertDialogCancelProps\n extends ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst AlertDialogCancel = forwardRef<\n AlertDialogCancelElement,\n AlertDialogCancelProps\n>(({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <AlertDialogPrimitive.Cancel\n ref={forwardedRef}\n className={buttonVariants({ className, size, variant })}\n {...props}\n />\n));\n\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogBody,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n type AlertDialogActionProps,\n type AlertDialogBodyProps,\n type AlertDialogCancelProps,\n type AlertDialogContentProps,\n type AlertDialogDescriptionProps,\n type AlertDialogFooterProps,\n type AlertDialogHeaderProps,\n type AlertDialogProps,\n type AlertDialogTitleProps,\n type AlertDialogTriggerProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reactcontextmenu = require('@radix-ui/react-context-menu'); var e = _interopRequireWildcard(_reactcontextmenu);var _reacticons = require('@radix-ui/react-icons');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var h=e.Root,N= exports.b =e.Trigger,E= exports.c =e.Group,T= exports.d =e.Sub,w= exports.e =e.RadioGroup,d= exports.f =_react.forwardRef.call(void 0, ({children:t,className:o,inset:n,...a},s)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:s,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",n&&"pl-8",o),...a,children:[t,_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"ml-auto size-4"})]}));d.displayName=e.SubTrigger.displayName;var l=_react.forwardRef.call(void 0, ({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.SubContent,{ref:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=open]:data-[side=top]:slide-in-from-bottom-2","data-[state=open]:data-[side=right]:slide-in-from-left-2","data-[state=open]:data-[side=bottom]:slide-in-from-top-2","data-[state=open]:data-[side=left]:slide-in-from-right-2","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2",t),...o})}));l.displayName=e.SubContent.displayName;var M=_react.forwardRef.call(void 0, ({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95","data-[state=open]:data-[side=top]:slide-in-from-bottom-2","data-[state=open]:data-[side=right]:slide-in-from-left-2","data-[state=open]:data-[side=bottom]:slide-in-from-top-2","data-[state=open]:data-[side=left]:slide-in-from-right-2",t),...o})}));M.displayName=e.Content.displayName;var c=_react.forwardRef.call(void 0, ({className:t,inset:o,...n},a)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:a,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));c.displayName=e.Item.displayName;var P=_react.forwardRef.call(void 0, ({children:t,className:o,checked:n,...a},s)=>_jsxruntime.jsxs.call(void 0, e.CheckboxItem,{ref:s,checked:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","pl-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...a,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-4"})})}),t]}));P.displayName=e.CheckboxItem.displayName;var f=_react.forwardRef.call(void 0, ({children:t,className:o,...n},a)=>_jsxruntime.jsxs.call(void 0, e.RadioItem,{ref:a,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","pl-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{className:"size-4 fill-current"})})}),t]}));f.displayName=e.RadioItem.displayName;var y=_react.forwardRef.call(void 0, ({className:t,inset:o,...n},a)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:a,className:_chunkDD6AVCRHcjs.a.call(void 0, "gap-x-2 px-3 py-1.5","flex items-center text-sm font-semibold",o&&"pl-8",t),...n}));y.displayName=e.Label.displayName;var b=_react.forwardRef.call(void 0, ({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-muted mx-2 my-1 h-px",t),...o}));b.displayName=e.Separator.displayName;function k({className:t,...o}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunkDD6AVCRHcjs.a.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",t),...o})}var v=_react.forwardRef.call(void 0, ({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Arrow,{ref:n,className:_chunkDD6AVCRHcjs.a.call(void 0, "fill-popover",t),...o}));v.displayName=e.Arrow.displayName;exports.a = h; exports.b = N; exports.c = E; exports.d = T; exports.e = w; exports.f = d; exports.g = l; exports.h = M; exports.i = c; exports.j = P; exports.k = f; exports.l = y; exports.m = b; exports.n = k; exports.o = v;
2
- //# sourceMappingURL=chunk-CVSZ456P.cjs.map
2
+ //# sourceMappingURL=chunk-BRRVMH2P.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-CVSZ456P.cjs","../src/components/context-menu.tsx"],"names":["ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","forwardRef","children","className","inset","props","forwardedRef","jsxs","cn","jsx","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotFilledIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"AAAA,mZAAwC,oHCAF,mDAK/B,8BAQA,+CA6DL,IArDIA,CAAAA,CAAmC,CAAA,CAAA,IAAA,CASnCC,CAAAA,aAA0C,CAAA,CAAA,OAAA,CAS1CC,CAAAA,aAAwC,CAAA,CAAA,KAAA,CAOxCC,CAAAA,aAAsC,CAAA,CAAA,GAAA,CAStCC,CAAAA,aAA6C,CAAA,CAAA,UAAA,CAe7CC,CAAAA,aAAwBC,+BAAAA,CAG3B,CAAE,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAW,KAAA,CAAAC,CAAAA,CAAO,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC3CC,8BAAAA,CAAsB,CAAA,UAAA,CAArB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,qBACT,CACA,iEAAA,CACA,iEAAA,CACA,sEAAA,CACAJ,CAAAA,EAAS,MAAA,CACTD,CACF,CAAA,CACC,GAAGE,CAAAA,CAEH,QAAA,CAAA,CAAAH,CAAAA,CACDO,6BAAAA,4BAACC,CAAA,CAAiB,SAAA,CAAU,gBAAA,CAAiB,CAAA,CAAA,CAC/C,CACD,CAAA,CAEDV,CAAAA,CAAsB,WAAA,CAAmC,CAAA,CAAA,UAAA,CAAW,WAAA,CAapE,IAAMW,CAAAA,CAAwBV,+BAAAA,CAG3B,CAAE,SAAA,CAAAE,CAAAA,CAAW,GAAGE,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BG,6BAAAA,CAAsB,CAAA,MAAA,CAArB,CACC,QAAA,CAAAA,6BAAAA,CAAsB,CAAA,UAAA,CAArB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,iCAAAA,kFACT,CACA,qFAAA,CACA,0DAA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,CAAiB,WAAA,CAAmC,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,gOAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-CVSZ456P.cjs","sourcesContent":[null,"import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from '@radix-ui/react-icons';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Trigger\n>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Group\n>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = ComponentProps<typeof ContextMenuPrimitive.Sub>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioGroup\n>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = ComponentRef<\n typeof ContextMenuPrimitive.SubTrigger\n>;\n\ninterface ContextMenuSubTriggerProps\n extends ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(({ children, className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = ComponentRef<\n typeof ContextMenuPrimitive.SubContent\n>;\ntype ContextMenuSubContentProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.SubContent\n>;\n\nconst ContextMenuSubContent = forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:data-[side=top]:slide-out-to-bottom-2',\n 'data-[state=closed]:data-[side=right]:slide-out-to-left-2',\n 'data-[state=closed]:data-[side=bottom]:slide-out-to-top-2',\n 'data-[state=closed]:data-[side=left]:slide-out-to-right-2',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = ComponentRef<\n typeof ContextMenuPrimitive.Content\n>;\ntype ContextMenuContentProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Content\n>;\n\nconst ContextMenuContent = forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = ComponentRef<typeof ContextMenuPrimitive.Item>;\n\ninterface ContextMenuItemProps\n extends ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = ComponentRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\ntype ContextMenuCheckboxItemProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\n\nconst ContextMenuCheckboxItem = forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(({ children, className, checked, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\n\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = ComponentRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\ntype ContextMenuRadioItemProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\n\nconst ContextMenuRadioItem = forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(({ children, className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = ComponentRef<typeof ContextMenuPrimitive.Label>;\n\ninterface ContextMenuLabelProps\n extends ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Label\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'flex items-center text-sm font-semibold',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = ComponentRef<\n typeof ContextMenuPrimitive.Separator\n>;\ntype ContextMenuSeparatorProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Separator\n>;\n\nconst ContextMenuSeparator = forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Separator\n ref={forwardedRef}\n className={cn('bg-muted mx-2 my-1 h-px', className)}\n {...props}\n />\n));\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: ContextMenuShortcutProps): JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = ComponentRef<typeof ContextMenuPrimitive.Arrow>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Arrow\n ref={forwardedRef}\n className={cn('fill-popover', className)}\n {...props}\n />\n));\n\nContextMenuArrow.displayName = ContextMenuPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuArrow,\n type ContextMenuArrowProps,\n ContextMenuCheckboxItem,\n type ContextMenuCheckboxItemProps,\n ContextMenuContent,\n type ContextMenuContentProps,\n ContextMenuGroup,\n type ContextMenuGroupProps,\n ContextMenuItem,\n type ContextMenuItemProps,\n ContextMenuLabel,\n type ContextMenuLabelProps,\n type ContextMenuProps,\n ContextMenuRadioGroup,\n type ContextMenuRadioGroupProps,\n ContextMenuRadioItem,\n type ContextMenuRadioItemProps,\n ContextMenuSeparator,\n type ContextMenuSeparatorProps,\n ContextMenuShortcut,\n type ContextMenuShortcutProps,\n ContextMenuSub,\n ContextMenuSubContent,\n type ContextMenuSubContentProps,\n type ContextMenuSubProps,\n ContextMenuSubTrigger,\n type ContextMenuSubTriggerProps,\n ContextMenuTrigger,\n type ContextMenuTriggerProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-BRRVMH2P.cjs","../src/components/context-menu.tsx"],"names":["ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","forwardRef","children","className","inset","props","forwardedRef","jsxs","cn","jsx","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotFilledIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"AAAA,mZAAwC,oHCCF,mDAK/B,8BAQA,+CA4DL,IArDIA,CAAAA,CAAmC,CAAA,CAAA,IAAA,CASnCC,CAAAA,aAA0C,CAAA,CAAA,OAAA,CAS1CC,CAAAA,aAAwC,CAAA,CAAA,KAAA,CAOxCC,CAAAA,aAAsC,CAAA,CAAA,GAAA,CAStCC,CAAAA,aAA6C,CAAA,CAAA,UAAA,CAe7CC,CAAAA,aAAwBC,+BAAAA,CAG3B,CAAE,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAW,KAAA,CAAAC,CAAAA,CAAO,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC3CC,8BAAAA,CAAsB,CAAA,UAAA,CAArB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,qBACT,CACA,iEAAA,CACA,iEAAA,CACA,sEAAA,CACAJ,CAAAA,EAAS,MAAA,CACTD,CACF,CAAA,CACC,GAAGE,CAAAA,CAEH,QAAA,CAAA,CAAAH,CAAAA,CACDO,6BAAAA,4BAACC,CAAA,CAAiB,SAAA,CAAU,gBAAA,CAAiB,CAAA,CAA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CAAA,CACC,SAAA,CAAWD,iCAAAA,uDACT,CACAL,CACF,CAAA,CACC,GAAGE,CAAAA,CACN,CAEJ,CASA,IAAMiB,CAAAA,CAAmBrB,+BAAAA,CAGtB,CAAE,SAAA,CAAAE,CAAAA,CAAW,GAAGE,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BG,6BAAAA,CAAsB,CAAA,KAAA,CAArB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,iCAAAA,cAAG,CAAgBL,CAAS,CAAA,CACtC,GAAGE,CAAAA,CACN,CACD,CAAA,CAEDiB,CAAAA,CAAiB,WAAA,CAAmC,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,gOAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-BRRVMH2P.cjs","sourcesContent":[null,"import { cn } from '@/lib/utils';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from '@radix-ui/react-icons';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n} from 'react';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Trigger\n>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Group\n>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = ComponentProps<typeof ContextMenuPrimitive.Sub>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioGroup\n>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = ComponentRef<\n typeof ContextMenuPrimitive.SubTrigger\n>;\n\ninterface ContextMenuSubTriggerProps\n extends ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(({ children, className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = ComponentRef<\n typeof ContextMenuPrimitive.SubContent\n>;\ntype ContextMenuSubContentProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.SubContent\n>;\n\nconst ContextMenuSubContent = forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:data-[side=top]:slide-out-to-bottom-2',\n 'data-[state=closed]:data-[side=right]:slide-out-to-left-2',\n 'data-[state=closed]:data-[side=bottom]:slide-out-to-top-2',\n 'data-[state=closed]:data-[side=left]:slide-out-to-right-2',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = ComponentRef<\n typeof ContextMenuPrimitive.Content\n>;\ntype ContextMenuContentProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Content\n>;\n\nconst ContextMenuContent = forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = ComponentRef<typeof ContextMenuPrimitive.Item>;\n\ninterface ContextMenuItemProps\n extends ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = ComponentRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\ntype ContextMenuCheckboxItemProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\n\nconst ContextMenuCheckboxItem = forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(({ children, className, checked, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\n\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = ComponentRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\ntype ContextMenuRadioItemProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\n\nconst ContextMenuRadioItem = forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(({ children, className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = ComponentRef<typeof ContextMenuPrimitive.Label>;\n\ninterface ContextMenuLabelProps\n extends ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Label\n ref={forwardedRef}\n className={cn(\n 'gap-x-2 px-3 py-1.5',\n 'flex items-center text-sm font-semibold',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = ComponentRef<\n typeof ContextMenuPrimitive.Separator\n>;\ntype ContextMenuSeparatorProps = ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Separator\n>;\n\nconst ContextMenuSeparator = forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Separator\n ref={forwardedRef}\n className={cn('bg-muted mx-2 my-1 h-px', className)}\n {...props}\n />\n));\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: ContextMenuShortcutProps): JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = ComponentRef<typeof ContextMenuPrimitive.Arrow>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Arrow\n ref={forwardedRef}\n className={cn('fill-popover', className)}\n {...props}\n />\n));\n\nContextMenuArrow.displayName = ContextMenuPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuArrow,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n type ContextMenuArrowProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuContentProps,\n type ContextMenuGroupProps,\n type ContextMenuItemProps,\n type ContextMenuLabelProps,\n type ContextMenuProps,\n type ContextMenuRadioGroupProps,\n type ContextMenuRadioItemProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuTriggerProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reactswitch = require('@radix-ui/react-switch'); var t = _interopRequireWildcard(_reactswitch);var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var n=_react.forwardRef.call(void 0, ({className:o,...s},r)=>_jsxruntime.jsx.call(void 0, t.Root,{className:_chunkDD6AVCRHcjs.a.call(void 0, "peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-sm transition","data-[state=checked]:bg-primary data-[state=unchecked]:bg-input","focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1","disabled:cursor-default disabled:opacity-50",o),...s,ref:r,children:_jsxruntime.jsx.call(void 0, t.Thumb,{className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-background pointer-events-none block size-4 rounded-full shadow transition","data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));n.displayName=t.Root.displayName;exports.a = n;
2
- //# sourceMappingURL=chunk-TAFSGBZZ.cjs.map
2
+ //# sourceMappingURL=chunk-CEKEAPXG.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-TAFSGBZZ.cjs","../src/components/switch.tsx"],"names":["Switch","forwardRef","className","props","forwardedRef","jsx","cn"],"mappings":"AAAA,mZAAwC,oGCAN,8BAK3B,+CAuBD,IAbAA,CAAAA,CAASC,+BAAAA,CACZ,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAkB,CAAA,IAAA,CAAjB,CACC,SAAA,CAAWC,iCAAAA,8GACT,CACA,iEAAA,CACA,+EAAA,CACA,6CAAA,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CAEL,QAAA,CAAAC,6BAAAA,CAAkB,CAAA,KAAA,CAAjB,CACC,SAAA,CAAWC,iCAAAA,+EACT,CACA,yEACF,CAAA,CACF,CAAA,CACF,CAEJ,CAAA,CAEAN,CAAAA,CAAO,WAAA,CAA+B,CAAA,CAAA,IAAA,CAAK,WAAA,CAAA,cAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-TAFSGBZZ.cjs","sourcesContent":[null,"import * as SwitchPrimitives from '@radix-ui/react-switch';\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from 'react';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Switch\n * -------------------------------------------------------------------------- */\n\ntype SwitchElement = ComponentRef<typeof SwitchPrimitives.Root>;\ntype SwitchProps = ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>;\n\nconst Switch = forwardRef<SwitchElement, SwitchProps>(\n ({ className, ...props }, forwardedRef) => (\n <SwitchPrimitives.Root\n className={cn(\n 'peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-sm transition',\n 'data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',\n 'focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1',\n 'disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n ref={forwardedRef}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n 'bg-background pointer-events-none block size-4 rounded-full shadow transition',\n 'data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0',\n )}\n />\n </SwitchPrimitives.Root>\n ),\n);\n\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Switch, type SwitchProps };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-CEKEAPXG.cjs","../src/components/switch.tsx"],"names":["Switch","forwardRef","className","props","forwardedRef","jsx","cn"],"mappings":"AAAA,mZAAwC,oGCCN,8BAK3B,+CAsBD,IAbAA,CAAAA,CAASC,+BAAAA,CACZ,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAkB,CAAA,IAAA,CAAjB,CACC,SAAA,CAAWC,iCAAAA,8GACT,CACA,iEAAA,CACA,+EAAA,CACA,6CAAA,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CAEL,QAAA,CAAAC,6BAAAA,CAAkB,CAAA,KAAA,CAAjB,CACC,SAAA,CAAWC,iCAAAA,+EACT,CACA,yEACF,CAAA,CACF,CAAA,CACF,CAEJ,CAAA,CAEAN,CAAAA,CAAO,WAAA,CAA+B,CAAA,CAAA,IAAA,CAAK,WAAA,CAAA,cAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-CEKEAPXG.cjs","sourcesContent":[null,"import { cn } from '@/lib/utils';\nimport * as SwitchPrimitives from '@radix-ui/react-switch';\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from 'react';\n\n/* -----------------------------------------------------------------------------\n * Component: Switch\n * -------------------------------------------------------------------------- */\n\ntype SwitchElement = ComponentRef<typeof SwitchPrimitives.Root>;\ntype SwitchProps = ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>;\n\nconst Switch = forwardRef<SwitchElement, SwitchProps>(\n ({ className, ...props }, forwardedRef) => (\n <SwitchPrimitives.Root\n className={cn(\n 'peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-sm transition',\n 'data-[state=checked]:bg-primary data-[state=unchecked]:bg-input',\n 'focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1',\n 'disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n ref={forwardedRef}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n 'bg-background pointer-events-none block size-4 rounded-full shadow transition',\n 'data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0',\n )}\n />\n </SwitchPrimitives.Root>\n ),\n);\n\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Switch, type SwitchProps };\n"]}
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reactseparator = require('@radix-ui/react-separator'); var a = _interopRequireWildcard(_reactseparator);var _react = require('react');var _tailwindvariants = require('tailwind-variants');var _jsxruntime = require('react/jsx-runtime');var f=_tailwindvariants.tv.call(void 0, {base:"bg-muted relative flex shrink-0 items-center",defaultVariants:{align:"center",orientation:"horizontal"},variants:{align:{start:"justify-start",center:"justify-center",end:"justify-end"},orientation:{horizontal:"h-px w-full",vertical:"h-full w-px flex-col"}}}),S= exports.a =_react.forwardRef.call(void 0, ({className:e,orientation:t,align:r,decorative:n=!0,...s},m)=>_jsxruntime.jsx.call(void 0, a.Root,{ref:m,className:f({align:r,orientation:t,className:e}),decorative:n,orientation:t,...s}));S.displayName=a.Root.displayName;var y=_react.forwardRef.call(void 0, ({className:e,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-background text-muted-foreground absolute mx-2 px-2 text-sm",e),...t}));y.displayName="SeparatorItem";exports.a = S; exports.b = y;
2
- //# sourceMappingURL=chunk-5AQT2M4Q.cjs.map
2
+ //# sourceMappingURL=chunk-E4OOKNPK.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-5AQT2M4Q.cjs","../src/components/separator.tsx"],"names":["separatorVariants","tv","Separator","forwardRef","className","orientation","align","decorative","props","forwardedRef","jsx","SeparatorItem","cn"],"mappings":"AAAA,mZAAwC,6GCAJ,8BAM7B,qDAC+B,+CA2ClC,IApCEA,CAAAA,CAAoBC,kCAAAA,CACxB,IAAA,CAAM,8CAAA,CACN,eAAA,CAAiB,CACf,KAAA,CAAO,QAAA,CACP,WAAA,CAAa,YACf,CAAA,CACA,QAAA,CAAU,CACR,KAAA,CAAO,CACL,KAAA,CAAO,eAAA,CACP,MAAA,CAAQ,gBAAA,CACR,GAAA,CAAK,aACP,CAAA,CACA,WAAA,CAAa,CACX,UAAA,CAAY,aAAA,CACZ,QAAA,CAAU,sBACZ,CACF,CACF,CAAC,CAAA,CAcKC,CAAAA,aAAYC,+BAAAA,CAEd,CAAE,SAAA,CAAAC,CAAAA,CAAW,WAAA,CAAAC,CAAAA,CAAa,KAAA,CAAAC,CAAAA,CAAO,UAAA,CAAAC,CAAAA,CAAa,CAAA,CAAA,CAAM,GAAGC,CAAM,CAAA,CAC7DC,CAAAA,CAAAA,EAEAC,6BAAAA,CAAoB,CAAA,IAAA,CAAnB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWT,CAAAA,CAAkB,CAAE,KAAA,CAAAM,CAAAA,CAAO,WAAA,CAAAD,CAAAA,CAAa,SAAA,CAAAD,CAAU,CAAC,CAAA,CAC9D,UAAA,CAAYG,CAAAA,CACZ,WAAA,CAAaF,CAAAA,CACZ,GAAGG,CAAAA,CACN,CAEJ,CAAA,CAEAN,CAAAA,CAAU,WAAA,CAAiC,CAAA,CAAA,IAAA,CAAK,WAAA,CAShD,IAAMS,CAAAA,CAAgBR,+BAAAA,CACnB,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGI,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,KAAC,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWG,iCAAAA,gEACT,CACAR,CACF,CAAA,CACC,GAAGI,CAAAA,CACN,CAEJ,CAAA,CAEAG,CAAAA,CAAc,WAAA,CAAc,eAAA,CAAA,6BAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-5AQT2M4Q.cjs","sourcesContent":[null,"import * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n} from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Variant: Separator\n * -------------------------------------------------------------------------- */\n\nconst separatorVariants = tv({\n base: 'bg-muted relative flex shrink-0 items-center',\n defaultVariants: {\n align: 'center',\n orientation: 'horizontal',\n },\n variants: {\n align: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n },\n orientation: {\n horizontal: 'h-px w-full',\n vertical: 'h-full w-px flex-col',\n },\n },\n});\n\ntype SeparatorVariantsProps = VariantProps<typeof separatorVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Separator\n * -------------------------------------------------------------------------- */\n\ntype SeparatorElement = ComponentRef<typeof SeparatorPrimitive.Root>;\n\ninterface SeparatorProps\n extends ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>,\n Omit<SeparatorVariantsProps, 'orientation'> {}\n\nconst Separator = forwardRef<SeparatorElement, SeparatorProps>(\n (\n { className, orientation, align, decorative = true, ...props },\n forwardedRef,\n ) => (\n <SeparatorPrimitive.Root\n ref={forwardedRef}\n className={separatorVariants({ align, orientation, className })}\n decorative={decorative}\n orientation={orientation}\n {...props}\n />\n ),\n);\n\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SeparatorItem\n * -------------------------------------------------------------------------- */\n\ntype SeparatorItemElement = HTMLDivElement;\ntype SeparatorItemProps = HTMLAttributes<HTMLDivElement>;\n\nconst SeparatorItem = forwardRef<SeparatorItemElement, SeparatorItemProps>(\n ({ className, ...props }, forwardedRef) => (\n <div\n ref={forwardedRef}\n className={cn(\n 'bg-background text-muted-foreground absolute mx-2 px-2 text-sm',\n className,\n )}\n {...props}\n />\n ),\n);\n\nSeparatorItem.displayName = 'SeparatorItem';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Separator, SeparatorItem, type SeparatorProps };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-E4OOKNPK.cjs","../src/components/separator.tsx"],"names":["separatorVariants","tv","Separator","forwardRef","className","orientation","align","decorative","props","forwardedRef","jsx","SeparatorItem","cn"],"mappings":"AAAA,mZAAwC,6GCCJ,8BAM7B,qDAC+B,+CA0ClC,IApCEA,CAAAA,CAAoBC,kCAAAA,CACxB,IAAA,CAAM,8CAAA,CACN,eAAA,CAAiB,CACf,KAAA,CAAO,QAAA,CACP,WAAA,CAAa,YACf,CAAA,CACA,QAAA,CAAU,CACR,KAAA,CAAO,CACL,KAAA,CAAO,eAAA,CACP,MAAA,CAAQ,gBAAA,CACR,GAAA,CAAK,aACP,CAAA,CACA,WAAA,CAAa,CACX,UAAA,CAAY,aAAA,CACZ,QAAA,CAAU,sBACZ,CACF,CACF,CAAC,CAAA,CAcKC,CAAAA,aAAYC,+BAAAA,CAEd,CAAE,SAAA,CAAAC,CAAAA,CAAW,WAAA,CAAAC,CAAAA,CAAa,KAAA,CAAAC,CAAAA,CAAO,UAAA,CAAAC,CAAAA,CAAa,CAAA,CAAA,CAAM,GAAGC,CAAM,CAAA,CAC7DC,CAAAA,CAAAA,EAEAC,6BAAAA,CAAoB,CAAA,IAAA,CAAnB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWT,CAAAA,CAAkB,CAAE,KAAA,CAAAM,CAAAA,CAAO,WAAA,CAAAD,CAAAA,CAAa,SAAA,CAAAD,CAAU,CAAC,CAAA,CAC9D,UAAA,CAAYG,CAAAA,CACZ,WAAA,CAAaF,CAAAA,CACZ,GAAGG,CAAAA,CACN,CAEJ,CAAA,CAEAN,CAAAA,CAAU,WAAA,CAAiC,CAAA,CAAA,IAAA,CAAK,WAAA,CAShD,IAAMS,CAAAA,CAAgBR,+BAAAA,CACnB,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGI,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,KAAC,CAAA,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWG,iCAAAA,gEACT,CACAR,CACF,CAAA,CACC,GAAGI,CAAAA,CACN,CAEJ,CAAA,CAEAG,CAAAA,CAAc,WAAA,CAAc,eAAA,CAAA,6BAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-E4OOKNPK.cjs","sourcesContent":[null,"import { cn } from '@/lib/utils';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n} from 'react';\nimport { tv, type VariantProps } from 'tailwind-variants';\n\n/* -----------------------------------------------------------------------------\n * Variant: Separator\n * -------------------------------------------------------------------------- */\n\nconst separatorVariants = tv({\n base: 'bg-muted relative flex shrink-0 items-center',\n defaultVariants: {\n align: 'center',\n orientation: 'horizontal',\n },\n variants: {\n align: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n },\n orientation: {\n horizontal: 'h-px w-full',\n vertical: 'h-full w-px flex-col',\n },\n },\n});\n\ntype SeparatorVariantsProps = VariantProps<typeof separatorVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: Separator\n * -------------------------------------------------------------------------- */\n\ntype SeparatorElement = ComponentRef<typeof SeparatorPrimitive.Root>;\n\ninterface SeparatorProps\n extends ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>,\n Omit<SeparatorVariantsProps, 'orientation'> {}\n\nconst Separator = forwardRef<SeparatorElement, SeparatorProps>(\n (\n { className, orientation, align, decorative = true, ...props },\n forwardedRef,\n ) => (\n <SeparatorPrimitive.Root\n ref={forwardedRef}\n className={separatorVariants({ align, orientation, className })}\n decorative={decorative}\n orientation={orientation}\n {...props}\n />\n ),\n);\n\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SeparatorItem\n * -------------------------------------------------------------------------- */\n\ntype SeparatorItemElement = HTMLDivElement;\ntype SeparatorItemProps = HTMLAttributes<HTMLDivElement>;\n\nconst SeparatorItem = forwardRef<SeparatorItemElement, SeparatorItemProps>(\n ({ className, ...props }, forwardedRef) => (\n <div\n ref={forwardedRef}\n className={cn(\n 'bg-background text-muted-foreground absolute mx-2 px-2 text-sm',\n className,\n )}\n {...props}\n />\n ),\n);\n\nSeparatorItem.displayName = 'SeparatorItem';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Separator, SeparatorItem, type SeparatorProps };\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as u}from"./chunk-H6BT6PGA.js";import{a}from"./chunk-VPYH6JWS.js";import{createContextScope as E}from"@radix-ui/react-context";import{Slot as C}from"@radix-ui/react-slot";import{result as L}from"lodash-es";import{forwardRef as n,useId as N}from"react";import{Controller as V,FormProvider as x,useFormState as f}from"react-hook-form";import{jsx as m}from"react/jsx-runtime";var z=x,y="FormField",[M,K]=E(y),[S,I]=M(y);function F(o,r){let{id:e}=R(o,r);return{formDescriptionId:`form-item-description-${e}`,formItemId:`form-item-${e}`,formMessageId:`form-item-message-${e}`,id:e}}function Q(o){let{__scopeFormField:r,...e}=o;return m(S,{name:e.name,scope:r,children:m(V,{...e})})}var T="FormItem",[b,R]=M(T),D=n(({__scopeFormField:o,className:r,...e},t)=>{let s=N();return m(b,{id:s,scope:o,children:m("div",{ref:t,className:a("grid gap-2",r),...e})})});D.displayName=T;var h="FormLabel",v=n(({__scopeFormField:o,...r},e)=>{let{formItemId:t}=F(p,o);return m(u,{ref:e,htmlFor:t,...r})});v.displayName=h;var g="FormControl",A=n(({__scopeFormField:o,...r},e)=>{let{formItemId:t,formDescriptionId:s,formMessageId:d}=F(p,o),{name:i}=I(g,o),{errors:l}=f({name:i});return m(C,{ref:e,"aria-describedby":l[i]?`${s} ${d}`:s,"aria-invalid":!!l[i],id:t,...r})});A.displayName=g;var _="FormDescription",H=n(({__scopeFormField:o,className:r,...e},t)=>{let{formDescriptionId:s}=F(p,o);return m("p",{ref:t,className:a("text-muted-foreground text-xs",r),id:s,...e})});H.displayName=_;var p="FormMessage",O=n(({__scopeFormField:o,children:r,className:e,...t},s)=>{let{formMessageId:d}=F(p,o),{name:i}=I(p,o),{errors:l}=f({name:i}),c=L(l,i),P=c?.message?String(c.message):r;return P?m("p",{ref:s,className:a("text-xs",c?.message?"text-destructive font-medium":"text-muted-foreground",e),id:d,...t,children:P}):null});O.displayName=p;export{z as a,K as b,Q as c,D as d,v as e,A as f,H as g,O as h};
2
- //# sourceMappingURL=chunk-R3WIIIAC.js.map
1
+ "use client";import{a as u}from"./chunk-ZTS4YELG.js";import{a}from"./chunk-VPYH6JWS.js";import{createContextScope as E}from"@radix-ui/react-context";import{Slot as C}from"@radix-ui/react-slot";import{result as L}from"lodash-es";import{forwardRef as n,useId as N}from"react";import{Controller as V,FormProvider as x,useFormState as f}from"react-hook-form";import{jsx as m}from"react/jsx-runtime";var z=x,y="FormField",[M,K]=E(y),[S,I]=M(y);function F(o,r){let{id:e}=R(o,r);return{formDescriptionId:`form-item-description-${e}`,formItemId:`form-item-${e}`,formMessageId:`form-item-message-${e}`,id:e}}function Q(o){let{__scopeFormField:r,...e}=o;return m(S,{name:e.name,scope:r,children:m(V,{...e})})}var T="FormItem",[b,R]=M(T),D=n(({__scopeFormField:o,className:r,...e},t)=>{let s=N();return m(b,{id:s,scope:o,children:m("div",{ref:t,className:a("grid gap-2",r),...e})})});D.displayName=T;var h="FormLabel",v=n(({__scopeFormField:o,...r},e)=>{let{formItemId:t}=F(p,o);return m(u,{ref:e,htmlFor:t,...r})});v.displayName=h;var g="FormControl",A=n(({__scopeFormField:o,...r},e)=>{let{formItemId:t,formDescriptionId:s,formMessageId:d}=F(p,o),{name:i}=I(g,o),{errors:l}=f({name:i});return m(C,{ref:e,"aria-describedby":l[i]?`${s} ${d}`:s,"aria-invalid":!!l[i],id:t,...r})});A.displayName=g;var _="FormDescription",H=n(({__scopeFormField:o,className:r,...e},t)=>{let{formDescriptionId:s}=F(p,o);return m("p",{ref:t,className:a("text-muted-foreground text-xs",r),id:s,...e})});H.displayName=_;var p="FormMessage",O=n(({__scopeFormField:o,children:r,className:e,...t},s)=>{let{formMessageId:d}=F(p,o),{name:i}=I(p,o),{errors:l}=f({name:i}),c=L(l,i),P=c?.message?String(c.message):r;return P?m("p",{ref:s,className:a("text-xs",c?.message?"text-destructive font-medium":"text-muted-foreground",e),id:d,...t,children:P}):null});O.displayName=p;export{z as a,K as b,Q as c,D as d,v as e,A as f,H as g,O as h};
2
+ //# sourceMappingURL=chunk-EBSEF4UJ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/form.tsx"],"names":["createContextScope","Slot","result","forwardRef","useId","Controller","FormProvider","useFormState","jsx","Form","FORM_FIELD_NAME","createFormFieldContext","createFormFieldScope","FormFieldProvider","useFormFieldContext","useFormItem","consumerName","scope","id","useFormItemContext","FormField","formFieldProps","__scopeFormField","props","FORM_ITEM_NAME","FormItemProvider","FormItem","className","forwardedRef","cn","FORM_LABEL_NAME","FormLabel","formItemId","FORM_MESSAGE_NAME","Label","FORM_CONTROL_NAME","FormControl","formDescriptionId","formMessageId","name","errors","FORM_DESCRIPTION_NAME","FormDescription","FormMessage","children","error","body"],"mappings":"2EAEA,OAAS,sBAAAA,MAAsC,0BAC/C,OAAS,QAAAC,MAAY,uBACrB,OAAS,UAAAC,MAAc,YACvB,OAIE,cAAAC,EAGA,SAAAC,MACK,QACP,OACE,cAAAC,EAIA,gBAAAC,EAEA,gBAAAC,MACK,kBAmED,cAAAC,MAAA,oBAzDN,IAAMC,EAAOH,EAMPI,EAAkB,YAIlB,CAACC,EAAwBC,CAAoB,EACjDZ,EAAmBU,CAAe,EAS9B,CAACG,EAAmBC,CAAmB,EAC3CH,EAA8CD,CAAe,EAE/D,SAASK,EACPC,EACAC,EAMA,CACA,GAAM,CAAE,GAAAC,CAAG,EAAIC,EAAmBH,EAAcC,CAAK,EAErD,MAAO,CACL,kBAAmB,yBAAyBC,CAAE,GAC9C,WAAY,aAAaA,CAAE,GAC3B,cAAe,qBAAqBA,CAAE,GACtC,GAAAA,CACF,CACF,CAOA,SAASE,EAGPC,EAAkE,CAClE,GAAM,CAAE,iBAAAC,EAAkB,GAAGC,CAAM,EAAIF,EAIvC,OACEb,EAACK,EAAA,CAAkB,KAAMU,EAAM,KAAM,MAAOD,EAC1C,SAAAd,EAACH,EAAA,CAAY,GAAGkB,EAAO,EACzB,CAEJ,CAMA,IAAMC,EAAiB,WAMjB,CAACC,EAAkBN,CAAkB,EACzCR,EAA6Ca,CAAc,EAKvDE,EAAWvB,EAC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,KACC,IAAKoB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACxD,GAAIU,EACH,GAAGd,EACN,CAEJ,CACF,EAEAmB,EAAgB,YAAcD,EAM9B,IAAMR,EAAoB,cAKpBU,EAAcxC,EAClB,CACE,CACE,iBAAAmB,EACA,SAAAsB,EACA,UAAAjB,EACA,GAAGJ,CACL,EACAK,IACG,CACH,GAAM,CAAE,cAAAU,CAAc,EAAIvB,EAAYkB,EAAmBX,CAAgB,EACnE,CAAE,KAAAiB,CAAK,EAAIzB,EAAoBmB,EAAmBX,CAAgB,EAClE,CAAE,OAAAkB,CAAO,EAAIjC,EAAa,CAAE,KAAAgC,CAAK,CAAC,EAClCM,EAAQ3C,EAA2BsC,EAAQD,CAAI,EAC/CO,EAAOD,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAID,EAEtD,OAAKE,EAKHtC,EAAC,KACC,IAAKoB,EACL,UAAWC,EACT,UACAgB,GAAO,QACH,+BACA,wBACJlB,CACF,EACA,GAAIW,EACH,GAAGf,EAEH,SAAAuB,EACH,EAjBO,IAmBX,CACF,EAEAH,EAAY,YAAcV","sourcesContent":["'use client';\n\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { Slot } from '@radix-ui/react-slot';\nimport { result } from 'lodash-es';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n useId,\n} from 'react';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type GlobalError,\n useFormState,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Label } from '@/components/label';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\nconst FORM_FIELD_NAME = 'FormField';\n\ntype ScopedProps<P> = P & { __scopeFormField?: Scope };\n\nconst [createFormFieldContext, createFormFieldScope] =\n createContextScope(FORM_FIELD_NAME);\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst [FormFieldProvider, useFormFieldContext] =\n createFormFieldContext<FormFieldContextValue>(FORM_FIELD_NAME);\n\nfunction useFormItem(\n consumerName: string,\n scope: Scope,\n): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n} {\n const { id } = useFormItemContext(consumerName, scope);\n\n return {\n formDescriptionId: `form-item-description-${id}`,\n formItemId: `form-item-${id}`,\n formMessageId: `form-item-message-${id}`,\n id,\n };\n}\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(formFieldProps: FormFieldProps<TFieldValues, TName>): JSX.Element {\n const { __scopeFormField, ...props } = formFieldProps as ScopedProps<\n FormFieldProps<TFieldValues, TName>\n >;\n\n return (\n <FormFieldProvider name={props.name} scope={__scopeFormField}>\n <Controller {...props} />\n </FormFieldProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\nconst FORM_ITEM_NAME = 'FormItem';\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst [FormItemProvider, useFormItemContext] =\n createFormFieldContext<FormItemContextValue>(FORM_ITEM_NAME);\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = forwardRef<FormItemElement, FormItemProps>(\n (\n { __scopeFormField, className, ...props }: ScopedProps<FormItemProps>,\n forwardedRef,\n ) => {\n const id = useId();\n\n return (\n <FormItemProvider id={id} scope={__scopeFormField}>\n <div\n ref={forwardedRef}\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemProvider>\n );\n },\n);\n\nFormItem.displayName = FORM_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\nconst FORM_LABEL_NAME = 'FormLabel';\n\ntype FormFieldElement = ComponentRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = forwardRef<FormFieldElement, FormLabelProps>(\n (\n { __scopeFormField, ...props }: ScopedProps<FormLabelProps>,\n forwardedRef,\n ) => {\n const { formItemId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n\n return <Label ref={forwardedRef} htmlFor={formItemId} {...props} />;\n },\n);\n\nFormLabel.displayName = FORM_LABEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\nconst FORM_CONTROL_NAME = 'FormControl';\n\ntype FormControlElement = ComponentRef<typeof Slot>;\ntype FormControlProps = ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = forwardRef<FormControlElement, FormControlProps>(\n (\n { __scopeFormField, ...props }: ScopedProps<FormControlProps>,\n forwardedRef,\n ) => {\n const { formItemId, formDescriptionId, formMessageId } = useFormItem(\n FORM_MESSAGE_NAME,\n __scopeFormField,\n );\n const { name } = useFormFieldContext(FORM_CONTROL_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n\n return (\n <Slot\n ref={forwardedRef}\n aria-describedby={\n !errors[name]\n ? formDescriptionId\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={Boolean(errors[name])}\n id={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = FORM_CONTROL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\nconst FORM_DESCRIPTION_NAME = 'FormDescription';\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = forwardRef<\n FormDescriptionElement,\n FormDescriptionProps\n>(\n (\n {\n __scopeFormField,\n className,\n ...props\n }: ScopedProps<FormDescriptionProps>,\n forwardedRef,\n ) => {\n const { formDescriptionId } = useFormItem(\n FORM_MESSAGE_NAME,\n __scopeFormField,\n );\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-muted-foreground text-xs', className)}\n id={formDescriptionId}\n {...props}\n />\n );\n },\n);\n\nFormDescription.displayName = FORM_DESCRIPTION_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\nconst FORM_MESSAGE_NAME = 'FormMessage';\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = forwardRef<FormMessageElement, FormMessageProps>(\n (\n {\n __scopeFormField,\n children,\n className,\n ...props\n }: ScopedProps<FormMessageProps>,\n forwardedRef,\n ) => {\n const { formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_MESSAGE_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n const error = result<GlobalError | null>(errors, name);\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={forwardedRef}\n className={cn(\n 'text-xs',\n error?.message\n ? 'text-destructive font-medium'\n : 'text-muted-foreground',\n className,\n )}\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = FORM_MESSAGE_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createFormFieldScope,\n Form,\n FormControl,\n type FormControlProps,\n FormDescription,\n type FormDescriptionProps,\n FormField,\n type FormFieldProps,\n FormItem,\n type FormItemProps,\n FormLabel,\n type FormLabelProps,\n FormMessage,\n type FormMessageProps,\n type FormProps,\n};\n"]}
1
+ {"version":3,"sources":["../src/components/form.tsx"],"names":["createContextScope","Slot","result","forwardRef","useId","Controller","FormProvider","useFormState","jsx","Form","FORM_FIELD_NAME","createFormFieldContext","createFormFieldScope","FormFieldProvider","useFormFieldContext","useFormItem","consumerName","scope","id","useFormItemContext","FormField","formFieldProps","__scopeFormField","props","FORM_ITEM_NAME","FormItemProvider","FormItem","className","forwardedRef","cn","FORM_LABEL_NAME","FormLabel","formItemId","FORM_MESSAGE_NAME","Label","FORM_CONTROL_NAME","FormControl","formDescriptionId","formMessageId","name","errors","FORM_DESCRIPTION_NAME","FormDescription","FormMessage","children","error","body"],"mappings":"2EAIA,OAAS,sBAAAA,MAAsC,0BAE/C,OAAS,QAAAC,MAAY,uBACrB,OAAS,UAAAC,MAAc,YACvB,OAIE,cAAAC,EAGA,SAAAC,MACK,QACP,OACE,cAAAC,EAIA,gBAAAC,EAEA,gBAAAC,MACK,kBAgED,cAAAC,MAAA,oBAzDN,IAAMC,EAAOH,EAMPI,EAAkB,YAIlB,CAACC,EAAwBC,CAAoB,EACjDZ,EAAmBU,CAAe,EAS9B,CAACG,EAAmBC,CAAmB,EAC3CH,EAA8CD,CAAe,EAE/D,SAASK,EACPC,EACAC,EAMA,CACA,GAAM,CAAE,GAAAC,CAAG,EAAIC,EAAmBH,EAAcC,CAAK,EAErD,MAAO,CACL,kBAAmB,yBAAyBC,CAAE,GAC9C,WAAY,aAAaA,CAAE,GAC3B,cAAe,qBAAqBA,CAAE,GACtC,GAAAA,CACF,CACF,CAOA,SAASE,EAGPC,EAAkE,CAClE,GAAM,CAAE,iBAAAC,EAAkB,GAAGC,CAAM,EAAIF,EAIvC,OACEb,EAACK,EAAA,CAAkB,KAAMU,EAAM,KAAM,MAAOD,EAC1C,SAAAd,EAACH,EAAA,CAAY,GAAGkB,EAAO,EACzB,CAEJ,CAMA,IAAMC,EAAiB,WAMjB,CAACC,EAAkBN,CA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B,EAAItB,EAC5BkB,EACAX,CACF,EAEA,OACEd,EAAC,KACC,IAAKoB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACxD,GAAIU,EACH,GAAGd,EACN,CAEJ,CACF,EAEAmB,EAAgB,YAAcD,EAM9B,IAAMR,EAAoB,cAKpBU,EAAcxC,EAClB,CACE,CACE,iBAAAmB,EACA,SAAAsB,EACA,UAAAjB,EACA,GAAGJ,CACL,EACAK,IACG,CACH,GAAM,CAAE,cAAAU,CAAc,EAAIvB,EAAYkB,EAAmBX,CAAgB,EACnE,CAAE,KAAAiB,CAAK,EAAIzB,EAAoBmB,EAAmBX,CAAgB,EAClE,CAAE,OAAAkB,CAAO,EAAIjC,EAAa,CAAE,KAAAgC,CAAK,CAAC,EAClCM,EAAQ3C,EAA2BsC,EAAQD,CAAI,EAC/CO,EAAOD,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAID,EAEtD,OAAKE,EAKHtC,EAAC,KACC,IAAKoB,EACL,UAAWC,EACT,UACAgB,GAAO,QACH,+BACA,wBACJlB,CACF,EACA,GAAIW,EACH,GAAGf,EAEH,SAAAuB,EACH,EAjBO,IAmBX,CACF,EAEAH,EAAY,YAAcV","sourcesContent":["'use client';\n\nimport { Label } from '@/components/label';\nimport { cn } from '@/lib/utils';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { Slot } from '@radix-ui/react-slot';\nimport { result } from 'lodash-es';\nimport {\n type ComponentProps,\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n type HTMLAttributes,\n type JSX,\n useId,\n} from 'react';\nimport {\n Controller,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type GlobalError,\n useFormState,\n} from 'react-hook-form';\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\nconst FORM_FIELD_NAME = 'FormField';\n\ntype ScopedProps<P> = P & { __scopeFormField?: Scope };\n\nconst [createFormFieldContext, createFormFieldScope] =\n createContextScope(FORM_FIELD_NAME);\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\nconst [FormFieldProvider, useFormFieldContext] =\n createFormFieldContext<FormFieldContextValue>(FORM_FIELD_NAME);\n\nfunction useFormItem(\n consumerName: string,\n scope: Scope,\n): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n} {\n const { id } = useFormItemContext(consumerName, scope);\n\n return {\n formDescriptionId: `form-item-description-${id}`,\n formItemId: `form-item-${id}`,\n formMessageId: `form-item-message-${id}`,\n id,\n };\n}\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>(formFieldProps: FormFieldProps<TFieldValues, TName>): JSX.Element {\n const { __scopeFormField, ...props } = formFieldProps as ScopedProps<\n FormFieldProps<TFieldValues, TName>\n >;\n\n return (\n <FormFieldProvider name={props.name} scope={__scopeFormField}>\n <Controller {...props} />\n </FormFieldProvider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\nconst FORM_ITEM_NAME = 'FormItem';\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst [FormItemProvider, useFormItemContext] =\n createFormFieldContext<FormItemContextValue>(FORM_ITEM_NAME);\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = forwardRef<FormItemElement, FormItemProps>(\n (\n { __scopeFormField, className, ...props }: ScopedProps<FormItemProps>,\n forwardedRef,\n ) => {\n const id = useId();\n\n return (\n <FormItemProvider id={id} scope={__scopeFormField}>\n <div\n ref={forwardedRef}\n className={cn('grid gap-2', className)}\n {...props}\n />\n </FormItemProvider>\n );\n },\n);\n\nFormItem.displayName = FORM_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\nconst FORM_LABEL_NAME = 'FormLabel';\n\ntype FormFieldElement = ComponentRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = forwardRef<FormFieldElement, FormLabelProps>(\n (\n { __scopeFormField, ...props }: ScopedProps<FormLabelProps>,\n forwardedRef,\n ) => {\n const { formItemId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n\n return <Label ref={forwardedRef} htmlFor={formItemId} {...props} />;\n },\n);\n\nFormLabel.displayName = FORM_LABEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\nconst FORM_CONTROL_NAME = 'FormControl';\n\ntype FormControlElement = ComponentRef<typeof Slot>;\ntype FormControlProps = ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = forwardRef<FormControlElement, FormControlProps>(\n (\n { __scopeFormField, ...props }: ScopedProps<FormControlProps>,\n forwardedRef,\n ) => {\n const { formItemId, formDescriptionId, formMessageId } = useFormItem(\n FORM_MESSAGE_NAME,\n __scopeFormField,\n );\n const { name } = useFormFieldContext(FORM_CONTROL_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n\n return (\n <Slot\n ref={forwardedRef}\n aria-describedby={\n !errors[name]\n ? formDescriptionId\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={Boolean(errors[name])}\n id={formItemId}\n {...props}\n />\n );\n },\n);\n\nFormControl.displayName = FORM_CONTROL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\nconst FORM_DESCRIPTION_NAME = 'FormDescription';\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = forwardRef<\n FormDescriptionElement,\n FormDescriptionProps\n>(\n (\n {\n __scopeFormField,\n className,\n ...props\n }: ScopedProps<FormDescriptionProps>,\n forwardedRef,\n ) => {\n const { formDescriptionId } = useFormItem(\n FORM_MESSAGE_NAME,\n __scopeFormField,\n );\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-muted-foreground text-xs', className)}\n id={formDescriptionId}\n {...props}\n />\n );\n },\n);\n\nFormDescription.displayName = FORM_DESCRIPTION_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\nconst FORM_MESSAGE_NAME = 'FormMessage';\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = forwardRef<FormMessageElement, FormMessageProps>(\n (\n {\n __scopeFormField,\n children,\n className,\n ...props\n }: ScopedProps<FormMessageProps>,\n forwardedRef,\n ) => {\n const { formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);\n const { name } = useFormFieldContext(FORM_MESSAGE_NAME, __scopeFormField);\n const { errors } = useFormState({ name });\n const error = result<GlobalError | null>(errors, name);\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={forwardedRef}\n className={cn(\n 'text-xs',\n error?.message\n ? 'text-destructive font-medium'\n : 'text-muted-foreground',\n className,\n )}\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = FORM_MESSAGE_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createFormFieldScope,\n Form,\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n type FormControlProps,\n type FormDescriptionProps,\n type FormFieldProps,\n type FormItemProps,\n type FormLabelProps,\n type FormMessageProps,\n type FormProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkDD6AVCRHcjs = require('./chunk-DD6AVCRH.cjs');var _reacticons = require('@radix-ui/react-icons');var _reactresizablepanels = require('react-resizable-panels'); var e = _interopRequireWildcard(_reactresizablepanels);var _jsxruntime = require('react/jsx-runtime');function c({className:t,...i}){return _jsxruntime.jsx.call(void 0, e.PanelGroup,{className:_chunkDD6AVCRHcjs.a.call(void 0, "flex size-full","data-[panel-group-direction=vertical]:flex-col",t),...i})}var f=e.Panel;function d({withHandle:t,className:i,...l}){return _jsxruntime.jsx.call(void 0, e.PanelResizeHandle,{className:_chunkDD6AVCRHcjs.a.call(void 0, "bg-border relative flex w-px items-center justify-center","after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2","focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1","data-[panel-group-direction=vertical]:h-px","data-[panel-group-direction=vertical]:w-full","data-[panel-group-direction=vertical]:after:left-0","data-[panel-group-direction=vertical]:after:h-1","data-[panel-group-direction=vertical]:after:w-full","data-[panel-group-direction=vertical]:after:-translate-y-1/2","data-[panel-group-direction=vertical]:after:translate-x-0","[&[data-panel-group-direction=vertical]>div]:rotate-90",i),...l,children:t?_jsxruntime.jsx.call(void 0, "div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border",children:_jsxruntime.jsx.call(void 0, _reacticons.DragHandleDots2Icon,{className:"size-2.5"})}):null})}exports.a = c; exports.b = f; exports.c = d;
2
- //# sourceMappingURL=chunk-IGBASIDT.cjs.map
2
+ //# sourceMappingURL=chunk-EJKVDVBQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-IGBASIDT.cjs","../src/components/resizable.tsx"],"names":["ResizablePrimitive","className","cn","ResizablePanel","withHandle","jsx","DragHandleDots2Icon"],"mappings":"AAAA,uWAAY,CAAC,wDCEJ,mDAEGA,sHAYR,+CAJF,SAAAC,CAAAA,CACA,CAAA,SAEA,CAAA,CAAA,CAAA,GACsB,CAAA,CAAA,CAAA,CAAA,OAAA,6BAAA,CAClB,CAAA,UAAWC,CACT,CAAA,SAAA,CAAA,iCAAA,gBACA,CAAA,gDAYR,CAAA,CAAMC,CAAAA,CAAoC,GAAA,CAAA,CAAA,CAAA,CAAA,IAM1C,CAAA,CAAA,CAAA,CAAA,KACE,CAAA,SAAA,CAAAC,CAAAA,CACA,UAAAH,CAAAA,CACA,CAAA,SAIA,CAAA,CAAA,CAAA,GACsB,CAAA,CAAA,CAAA,CAAA,OAAA,6BAAA,CAAA,CAAA,iBACPC,CACT,CAAA,SAAA,CAAA,iCAAA,0DACA,CAAA,gFACA,CAAA,+EACA,CAAA,4CACA,CAAA,8CACA,CAAA,oDACA,CAAA,iDACA,CAAA,oDACA,CAAA,8DACA,CAAA,2DACA,CAAA,wDAKD,CAAA,CAAA,CAAA,CAAA,GACCG,CAAAA,CAAC,QAAI,CAAA,CAAA,CAAA,6BAAA,KAAU,CAAA,CAAA,SAAA,CAAA,2EACZC,CAAA,QAAoB,CAAA,6BAAA,+BAAU,CAAA,CAAA,SAAW,CAC5C,UAIR,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,4CAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-IGBASIDT.cjs","sourcesContent":[null,"'use client';\n\nimport { DragHandleDots2Icon } from '@radix-ui/react-icons';\nimport { type ComponentProps, type JSX } from 'react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanelGroup\n * -------------------------------------------------------------------------- */\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ComponentProps<typeof ResizablePrimitive.PanelGroup>): JSX.Element {\n return (\n <ResizablePrimitive.PanelGroup\n className={cn(\n 'flex size-full',\n 'data-[panel-group-direction=vertical]:flex-col',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanel\n * -------------------------------------------------------------------------- */\n\nconst ResizablePanel = ResizablePrimitive.Panel;\n\n/* -----------------------------------------------------------------------------\n * Component: ResizableHandle\n * -------------------------------------------------------------------------- */\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n}): JSX.Element {\n return (\n <ResizablePrimitive.PanelResizeHandle\n className={cn(\n 'bg-border relative flex w-px items-center justify-center',\n 'after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2',\n 'focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1',\n 'data-[panel-group-direction=vertical]:h-px',\n 'data-[panel-group-direction=vertical]:w-full',\n 'data-[panel-group-direction=vertical]:after:left-0',\n 'data-[panel-group-direction=vertical]:after:h-1',\n 'data-[panel-group-direction=vertical]:after:w-full',\n 'data-[panel-group-direction=vertical]:after:-translate-y-1/2',\n 'data-[panel-group-direction=vertical]:after:translate-x-0',\n '[&[data-panel-group-direction=vertical]>div]:rotate-90',\n className,\n )}\n {...props}\n >\n {withHandle ? (\n <div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border\">\n <DragHandleDots2Icon className=\"size-2.5\" />\n </div>\n ) : null}\n </ResizablePrimitive.PanelResizeHandle>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/chunk-EJKVDVBQ.cjs","../src/components/resizable.tsx"],"names":["ResizablePrimitive","className","cn","ResizablePanel","withHandle","jsx","DragHandleDots2Icon"],"mappings":"AAAA,uWAAY,CAAC,wDCGJ,mDAEGA,sHAWR,+CAJF,SAAAC,CAAAA,CACA,CAAA,SAEA,CAAA,CAAA,CAAA,GACsB,CAAA,CAAA,CAAA,CAAA,OAAA,6BAAA,CAClB,CAAA,UAAWC,CACT,CAAA,SAAA,CAAA,iCAAA,gBACA,CAAA,gDAYR,CAAA,CAAMC,CAAAA,CAAoC,GAAA,CAAA,CAAA,CAAA,CAAA,IAM1C,CAAA,CAAA,CAAA,CAAA,KACE,CAAA,SAAA,CAAAC,CAAAA,CACA,UAAAH,CAAAA,CACA,CAAA,SAIA,CAAA,CAAA,CAAA,GACsB,CAAA,CAAA,CAAA,CAAA,OAAA,6BAAA,CAAA,CAAA,iBACPC,CACT,CAAA,SAAA,CAAA,iCAAA,0DACA,CAAA,gFACA,CAAA,+EACA,CAAA,4CACA,CAAA,8CACA,CAAA,oDACA,CAAA,iDACA,CAAA,oDACA,CAAA,8DACA,CAAA,2DACA,CAAA,wDAKD,CAAA,CAAA,CAAA,CAAA,GACCG,CAAAA,CAAC,QAAI,CAAA,CAAA,CAAA,6BAAA,KAAU,CAAA,CAAA,SAAA,CAAA,2EACZC,CAAA,QAAoB,CAAA,6BAAA,+BAAU,CAAA,CAAA,SAAW,CAC5C,UAIR,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,4CAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/chunk-EJKVDVBQ.cjs","sourcesContent":[null,"'use client';\n\nimport { cn } from '@/lib/utils';\nimport { DragHandleDots2Icon } from '@radix-ui/react-icons';\nimport { type ComponentProps, type JSX } from 'react';\nimport * as ResizablePrimitive from 'react-resizable-panels';\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanelGroup\n * -------------------------------------------------------------------------- */\n\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ComponentProps<typeof ResizablePrimitive.PanelGroup>): JSX.Element {\n return (\n <ResizablePrimitive.PanelGroup\n className={cn(\n 'flex size-full',\n 'data-[panel-group-direction=vertical]:flex-col',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ResizablePanel\n * -------------------------------------------------------------------------- */\n\nconst ResizablePanel = ResizablePrimitive.Panel;\n\n/* -----------------------------------------------------------------------------\n * Component: ResizableHandle\n * -------------------------------------------------------------------------- */\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n withHandle?: boolean;\n}): JSX.Element {\n return (\n <ResizablePrimitive.PanelResizeHandle\n className={cn(\n 'bg-border relative flex w-px items-center justify-center',\n 'after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2',\n 'focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1',\n 'data-[panel-group-direction=vertical]:h-px',\n 'data-[panel-group-direction=vertical]:w-full',\n 'data-[panel-group-direction=vertical]:after:left-0',\n 'data-[panel-group-direction=vertical]:after:h-1',\n 'data-[panel-group-direction=vertical]:after:w-full',\n 'data-[panel-group-direction=vertical]:after:-translate-y-1/2',\n 'data-[panel-group-direction=vertical]:after:translate-x-0',\n '[&[data-panel-group-direction=vertical]>div]:rotate-90',\n className,\n )}\n {...props}\n >\n {withHandle ? (\n <div className=\"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border\">\n <DragHandleDots2Icon className=\"size-2.5\" />\n </div>\n ) : null}\n </ResizablePrimitive.PanelResizeHandle>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup };\n"]}
@@ -1,2 +1,2 @@
1
1
  import{a as o}from"./chunk-VPYH6JWS.js";import*as e from"@codefast-ui/checkbox-group";import{CheckIcon as a}from"@radix-ui/react-icons";import{forwardRef as s}from"react";import{jsx as r,jsxs as b}from"react/jsx-runtime";var C=s(({className:t,...i},p)=>r(e.Root,{className:o("grid gap-2",t),...i,ref:p}));C.displayName=e.Root.displayName;var d=s(({children:t,className:i,checkboxClassName:p,...m},c)=>b("label",{className:o("group flex items-center justify-center gap-4 rounded-md border p-4",i),children:[t,r(e.Item,{ref:c,className:o("border-input peer flex size-4 shrink-0 cursor-pointer rounded border shadow-sm","group-hover:border-primary","aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground","focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1","disabled:cursor-default disabled:opacity-50",p),...m,children:r(e.CheckboxGroupIndicator,{className:"flex size-full items-center justify-center text-current",children:r(a,{className:"size-3.5"})})})]}));d.displayName=e.Item.displayName;export{C as a,d as b};
2
- //# sourceMappingURL=chunk-VPPKOHWH.js.map
2
+ //# sourceMappingURL=chunk-END3X3XX.js.map