@dmsi/wedgekit-react 0.0.4

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 (596) hide show
  1. package/README.md +35 -0
  2. package/dist/acc.css +3 -0
  3. package/dist/agility.css +7 -0
  4. package/dist/chunk-22YZ6LFN.js +322 -0
  5. package/dist/chunk-25Y2OMTD.js +38 -0
  6. package/dist/chunk-27KIIUAR.js +59 -0
  7. package/dist/chunk-27OSC5OM.js +68 -0
  8. package/dist/chunk-2B7WUAOV.js +28 -0
  9. package/dist/chunk-2EHJFFX4.js +124 -0
  10. package/dist/chunk-2G2E2JMA.js +123 -0
  11. package/dist/chunk-2GC2SPSS.js +130 -0
  12. package/dist/chunk-2KLCMD2M.js +106 -0
  13. package/dist/chunk-2TLQVCQQ.js +130 -0
  14. package/dist/chunk-2Y6GPKXR.js +263 -0
  15. package/dist/chunk-322ATVWD.js +298 -0
  16. package/dist/chunk-35DCQU2F.js +127 -0
  17. package/dist/chunk-3B7FAEF7.js +38 -0
  18. package/dist/chunk-3FLOLZYP.js +21 -0
  19. package/dist/chunk-3IZWY2C7.js +221 -0
  20. package/dist/chunk-3NGYDV56.js +38 -0
  21. package/dist/chunk-3NLKVKFR.js +72 -0
  22. package/dist/chunk-3R7YVBRL.js +135 -0
  23. package/dist/chunk-3RDFNEVD.js +91 -0
  24. package/dist/chunk-3TPGMRVY.js +123 -0
  25. package/dist/chunk-42X2EOOI.js +129 -0
  26. package/dist/chunk-47GJZWOH.js +103 -0
  27. package/dist/chunk-4BUU5MTT.js +263 -0
  28. package/dist/chunk-4C66DLIJ.js +51 -0
  29. package/dist/chunk-4IZG2UCW.js +31 -0
  30. package/dist/chunk-4M7CJVTZ.js +136 -0
  31. package/dist/chunk-4NZBVXM3.js +53 -0
  32. package/dist/chunk-4RD5ZF2V.js +55 -0
  33. package/dist/chunk-4RJKB7LC.js +14 -0
  34. package/dist/chunk-4S4WZ3MQ.js +103 -0
  35. package/dist/chunk-4SV7MJMP.js +340 -0
  36. package/dist/chunk-4T7F5BZZ.js +26 -0
  37. package/dist/chunk-4TH2SUHQ.js +145 -0
  38. package/dist/chunk-56ORPWGF.js +148 -0
  39. package/dist/chunk-5GOBP2JS.js +53 -0
  40. package/dist/chunk-5HIUW5CM.js +128 -0
  41. package/dist/chunk-5K3U4IUW.js +34 -0
  42. package/dist/chunk-5KOZKEEM.js +91 -0
  43. package/dist/chunk-5OIRPFRD.js +114 -0
  44. package/dist/chunk-5QW5SJNW.js +31 -0
  45. package/dist/chunk-5QZO37QK.js +263 -0
  46. package/dist/chunk-5ROMJJRK.js +135 -0
  47. package/dist/chunk-5VHYVTZI.js +123 -0
  48. package/dist/chunk-6277DY3K.js +437 -0
  49. package/dist/chunk-6C5NOV6D.js +263 -0
  50. package/dist/chunk-6CDVHKTS.js +103 -0
  51. package/dist/chunk-6E4OJA7E.js +263 -0
  52. package/dist/chunk-6GBZFWQ4.js +105 -0
  53. package/dist/chunk-6GGLA6DI.js +263 -0
  54. package/dist/chunk-6HKVN4QK.js +340 -0
  55. package/dist/chunk-6HLJFPGY.js +284 -0
  56. package/dist/chunk-6KUUK27D.js +31 -0
  57. package/dist/chunk-6Q5NNY5V.js +135 -0
  58. package/dist/chunk-6VAZR5GK.js +122 -0
  59. package/dist/chunk-6XDXJ3Z3.js +131 -0
  60. package/dist/chunk-6XIXUFSA.js +114 -0
  61. package/dist/chunk-7CG4GVU7.js +21 -0
  62. package/dist/chunk-7DNCGSXK.js +284 -0
  63. package/dist/chunk-7GFGBJCU.js +287 -0
  64. package/dist/chunk-7VA3AERB.js +31 -0
  65. package/dist/chunk-7YJLGGIR.js +83 -0
  66. package/dist/chunk-7ZCBQXHR.js +272 -0
  67. package/dist/chunk-A4BGWCF6.js +221 -0
  68. package/dist/chunk-A6RDEIAN.js +254 -0
  69. package/dist/chunk-AE7SZPWF.js +121 -0
  70. package/dist/chunk-AEQYZFXI.js +50 -0
  71. package/dist/chunk-AFEIB2Y7.js +213 -0
  72. package/dist/chunk-AGQML5BM.js +340 -0
  73. package/dist/chunk-AHBE63RV.js +263 -0
  74. package/dist/chunk-AHHXD4EH.js +31 -0
  75. package/dist/chunk-AILPQXDY.js +47 -0
  76. package/dist/chunk-AKTL6JU5.js +25 -0
  77. package/dist/chunk-AMZFEIAM.js +114 -0
  78. package/dist/chunk-ANI7PKSV.js +38 -0
  79. package/dist/chunk-AO6WGDPJ.js +105 -0
  80. package/dist/chunk-ASDN5OZ3.js +318 -0
  81. package/dist/chunk-ASSOOV4N.js +53 -0
  82. package/dist/chunk-AWQSSKCK.js +32 -0
  83. package/dist/chunk-AWSUZLRR.js +79 -0
  84. package/dist/chunk-B6A3BOGW.js +31 -0
  85. package/dist/chunk-B6NMINKX.js +72 -0
  86. package/dist/chunk-B7UOXS2S.js +221 -0
  87. package/dist/chunk-BDN7SDV5.js +31 -0
  88. package/dist/chunk-BDPJYJD2.js +218 -0
  89. package/dist/chunk-BDYWCYRG.js +263 -0
  90. package/dist/chunk-BENTHNAQ.js +51 -0
  91. package/dist/chunk-BGPBLXQ5.js +131 -0
  92. package/dist/chunk-BKC5DNOX.js +162 -0
  93. package/dist/chunk-BMGYSXYW.js +50 -0
  94. package/dist/chunk-BNHSAFMP.js +93 -0
  95. package/dist/chunk-BNOE4DGB.js +79 -0
  96. package/dist/chunk-BQMI4NKT.js +103 -0
  97. package/dist/chunk-BSBXTPTA.js +84 -0
  98. package/dist/chunk-BYNATA7V.js +114 -0
  99. package/dist/chunk-BZFVPEG3.js +98 -0
  100. package/dist/chunk-C2GYWE4S.js +263 -0
  101. package/dist/chunk-C5NNFQ4B.js +114 -0
  102. package/dist/chunk-C7ALJGJG.js +322 -0
  103. package/dist/chunk-C7S6DKZ6.js +31 -0
  104. package/dist/chunk-CA4BW655.js +50 -0
  105. package/dist/chunk-CABAANHQ.js +249 -0
  106. package/dist/chunk-CELC37U6.js +38 -0
  107. package/dist/chunk-CIWOBFZ4.js +340 -0
  108. package/dist/chunk-CKB4S3O3.js +284 -0
  109. package/dist/chunk-CL6RYGIT.js +263 -0
  110. package/dist/chunk-CLB4OQS5.js +84 -0
  111. package/dist/chunk-CMBMFSP4.js +340 -0
  112. package/dist/chunk-CTHHLBRT.js +90 -0
  113. package/dist/chunk-DDQ4KWHW.js +74 -0
  114. package/dist/chunk-DHWXCPF2.js +56 -0
  115. package/dist/chunk-DV3IMUO6.js +50 -0
  116. package/dist/chunk-DZHPNWUL.js +70 -0
  117. package/dist/chunk-DZLUR2I7.js +34 -0
  118. package/dist/chunk-E5ALT5W7.js +182 -0
  119. package/dist/chunk-E7H6GJIB.js +31 -0
  120. package/dist/chunk-EAJ37R7R.js +31 -0
  121. package/dist/chunk-EDMIKY4Q.js +50 -0
  122. package/dist/chunk-EE4GUGFX.js +31 -0
  123. package/dist/chunk-EHCD3FVZ.js +50 -0
  124. package/dist/chunk-EHOMG5B4.js +31 -0
  125. package/dist/chunk-EM7ODK2O.js +53 -0
  126. package/dist/chunk-ER3HQRPL.js +105 -0
  127. package/dist/chunk-ER6TD3DA.js +30 -0
  128. package/dist/chunk-ESK7AT3B.js +38 -0
  129. package/dist/chunk-ETWMDEUU.js +114 -0
  130. package/dist/chunk-EWX2EDF5.js +236 -0
  131. package/dist/chunk-EXJKOP3Y.js +236 -0
  132. package/dist/chunk-F2YQE6G5.js +145 -0
  133. package/dist/chunk-F3U3RHIB.js +131 -0
  134. package/dist/chunk-F433MJII.js +91 -0
  135. package/dist/chunk-F4JE6AD2.js +160 -0
  136. package/dist/chunk-FCYGYC7R.js +30 -0
  137. package/dist/chunk-FEEMBYZR.js +98 -0
  138. package/dist/chunk-FKQ63FLW.js +91 -0
  139. package/dist/chunk-FNFDOS7L.js +263 -0
  140. package/dist/chunk-FNLYAP3I.js +135 -0
  141. package/dist/chunk-FQVCRL3Z.js +145 -0
  142. package/dist/chunk-FY7PTP6E.js +322 -0
  143. package/dist/chunk-FZ6I2KRT.js +263 -0
  144. package/dist/chunk-FZLYFJ53.js +26 -0
  145. package/dist/chunk-G3AYBQ2Y.js +221 -0
  146. package/dist/chunk-G4V7WZAV.js +72 -0
  147. package/dist/chunk-GDAY5XPY.js +47 -0
  148. package/dist/chunk-GELM4Z36.js +263 -0
  149. package/dist/chunk-GGR5UY3Q.js +83 -0
  150. package/dist/chunk-GK556OXV.js +263 -0
  151. package/dist/chunk-GOB3NB3Q.js +130 -0
  152. package/dist/chunk-GPIG2QUB.js +437 -0
  153. package/dist/chunk-GV63QYC5.js +130 -0
  154. package/dist/chunk-GWNDXZUZ.js +263 -0
  155. package/dist/chunk-H3INEB6H.js +296 -0
  156. package/dist/chunk-H3VQYL46.js +50 -0
  157. package/dist/chunk-H53EBFHV.js +114 -0
  158. package/dist/chunk-HBD6NLMB.js +51 -0
  159. package/dist/chunk-HBTQFVPW.js +121 -0
  160. package/dist/chunk-HCDYAZGJ.js +91 -0
  161. package/dist/chunk-HE3XKR3P.js +130 -0
  162. package/dist/chunk-HK3NQMPY.js +51 -0
  163. package/dist/chunk-HK54SJNM.js +103 -0
  164. package/dist/chunk-HL2IYNCS.js +50 -0
  165. package/dist/chunk-I5A3SU35.js +282 -0
  166. package/dist/chunk-I5HKQSF2.js +59 -0
  167. package/dist/chunk-I7LXSGQA.js +10 -0
  168. package/dist/chunk-IDAZ53A4.js +261 -0
  169. package/dist/chunk-IGQVA7SC.js +41 -0
  170. package/dist/chunk-II6HWGH6.js +295 -0
  171. package/dist/chunk-IIDPTJCI.js +31 -0
  172. package/dist/chunk-IJ6AAL4W.js +59 -0
  173. package/dist/chunk-IKZQIIV3.js +123 -0
  174. package/dist/chunk-ISKELMPI.js +67 -0
  175. package/dist/chunk-IWUZ6NSN.js +218 -0
  176. package/dist/chunk-IYDKL3OH.js +130 -0
  177. package/dist/chunk-IZ75D7KD.js +30 -0
  178. package/dist/chunk-JCLVMFRY.js +122 -0
  179. package/dist/chunk-JDHZQIFC.js +135 -0
  180. package/dist/chunk-JFMZU3WS.js +123 -0
  181. package/dist/chunk-JI54AM6E.js +105 -0
  182. package/dist/chunk-JM4DMO5V.js +91 -0
  183. package/dist/chunk-JNLDVEK3.js +221 -0
  184. package/dist/chunk-JU3RVFK5.js +114 -0
  185. package/dist/chunk-JU4PINK3.js +282 -0
  186. package/dist/chunk-K2YPB4SV.js +38 -0
  187. package/dist/chunk-K3IKUSZW.js +59 -0
  188. package/dist/chunk-K5EXR7F7.js +253 -0
  189. package/dist/chunk-K7CWFWAA.js +263 -0
  190. package/dist/chunk-KENSVWOY.js +151 -0
  191. package/dist/chunk-KGCFZ3ZY.js +263 -0
  192. package/dist/chunk-KJEU2OLC.js +263 -0
  193. package/dist/chunk-KNZWZVWO.js +50 -0
  194. package/dist/chunk-KVQDUSDT.js +33 -0
  195. package/dist/chunk-KX3O6GJ6.js +138 -0
  196. package/dist/chunk-KXFCVFX7.js +50 -0
  197. package/dist/chunk-KXWYWY7O.js +135 -0
  198. package/dist/chunk-KYJFCVGO.js +53 -0
  199. package/dist/chunk-L4SK5HYC.js +114 -0
  200. package/dist/chunk-L5OMTPWT.js +130 -0
  201. package/dist/chunk-LBL6VQ5F.js +51 -0
  202. package/dist/chunk-LCJKAY5H.js +122 -0
  203. package/dist/chunk-LEPHUIU3.js +263 -0
  204. package/dist/chunk-LFNCUQNK.js +103 -0
  205. package/dist/chunk-LIQIMUDD.js +270 -0
  206. package/dist/chunk-LJ2W2FEG.js +134 -0
  207. package/dist/chunk-LJGUNBDS.js +238 -0
  208. package/dist/chunk-LK6UNOMX.js +24 -0
  209. package/dist/chunk-LQLPGMGP.js +238 -0
  210. package/dist/chunk-LRNZOITG.js +318 -0
  211. package/dist/chunk-LSDPH4GX.js +38 -0
  212. package/dist/chunk-LXYDGV6K.js +437 -0
  213. package/dist/chunk-MFNBBTWX.js +177 -0
  214. package/dist/chunk-MGJ3GO6Z.js +284 -0
  215. package/dist/chunk-MIMYQH75.js +91 -0
  216. package/dist/chunk-MKIVQLZW.js +122 -0
  217. package/dist/chunk-MLQQU3ZN.js +31 -0
  218. package/dist/chunk-MLTOT73W.js +38 -0
  219. package/dist/chunk-MM2YBW7A.js +31 -0
  220. package/dist/chunk-MMHTKJ7Z.js +50 -0
  221. package/dist/chunk-MNZUBPVB.js +263 -0
  222. package/dist/chunk-MRXJRTKP.js +62 -0
  223. package/dist/chunk-MSM2B2VT.js +106 -0
  224. package/dist/chunk-MTJDLHR6.js +218 -0
  225. package/dist/chunk-MU4ZBPUT.js +263 -0
  226. package/dist/chunk-MUQHKNFV.js +158 -0
  227. package/dist/chunk-N2XNU5PP.js +91 -0
  228. package/dist/chunk-N4NGR36H.js +263 -0
  229. package/dist/chunk-NA4H2JQX.js +145 -0
  230. package/dist/chunk-NBV3Y6UB.js +315 -0
  231. package/dist/chunk-NEBYCDGE.js +284 -0
  232. package/dist/chunk-NS2KPONF.js +263 -0
  233. package/dist/chunk-O2KOOPL4.js +148 -0
  234. package/dist/chunk-OEIQDS7X.js +50 -0
  235. package/dist/chunk-OJ4PX3ZG.js +59 -0
  236. package/dist/chunk-OOIM4AHV.js +106 -0
  237. package/dist/chunk-OQ2SDHRA.js +267 -0
  238. package/dist/chunk-OQAOAEH5.js +114 -0
  239. package/dist/chunk-OQWOF5CI.js +322 -0
  240. package/dist/chunk-ORMEWXMH.js +37 -0
  241. package/dist/chunk-ORW5CX24.js +316 -0
  242. package/dist/chunk-OUHI4UBN.js +38 -0
  243. package/dist/chunk-OULD24TE.js +98 -0
  244. package/dist/chunk-P66A67NV.js +30 -0
  245. package/dist/chunk-PC5JSEHD.js +269 -0
  246. package/dist/chunk-PLCJ56FF.js +72 -0
  247. package/dist/chunk-PMNRGAPH.js +191 -0
  248. package/dist/chunk-PMQOPIJZ.js +75 -0
  249. package/dist/chunk-PPU6PK34.js +263 -0
  250. package/dist/chunk-PQEWSSM5.js +31 -0
  251. package/dist/chunk-PY6MF2II.js +51 -0
  252. package/dist/chunk-QBXVAKCM.js +59 -0
  253. package/dist/chunk-QDAFX66E.js +55 -0
  254. package/dist/chunk-QEXYUSGH.js +201 -0
  255. package/dist/chunk-QFEYPU44.js +91 -0
  256. package/dist/chunk-QJWVR7FR.js +387 -0
  257. package/dist/chunk-QKKRKHFR.js +38 -0
  258. package/dist/chunk-QKQ4M6UK.js +263 -0
  259. package/dist/chunk-QTKPVQAY.js +66 -0
  260. package/dist/chunk-R3IEEDQ6.js +284 -0
  261. package/dist/chunk-R4UZI5WE.js +171 -0
  262. package/dist/chunk-RBXILAST.js +437 -0
  263. package/dist/chunk-RENGWIST.js +263 -0
  264. package/dist/chunk-REZ33AJK.js +172 -0
  265. package/dist/chunk-RGI3V47F.js +216 -0
  266. package/dist/chunk-RMIQDOJV.js +287 -0
  267. package/dist/chunk-ROYYCT4A.js +31 -0
  268. package/dist/chunk-RWVJ2YAO.js +131 -0
  269. package/dist/chunk-RZLSOKZB.js +123 -0
  270. package/dist/chunk-S3POCSOH.js +31 -0
  271. package/dist/chunk-S4IHG5J6.js +54 -0
  272. package/dist/chunk-SEKKGFM6.js +28 -0
  273. package/dist/chunk-SHQVFIVR.js +122 -0
  274. package/dist/chunk-SPQH4CSJ.js +31 -0
  275. package/dist/chunk-SPV52UKB.js +50 -0
  276. package/dist/chunk-SSBZHFHQ.js +123 -0
  277. package/dist/chunk-STVC6SBJ.js +91 -0
  278. package/dist/chunk-SY3HT54E.js +91 -0
  279. package/dist/chunk-T23U4LBM.js +148 -0
  280. package/dist/chunk-TBHTISFW.js +119 -0
  281. package/dist/chunk-TC5ACZ3X.js +263 -0
  282. package/dist/chunk-TD5JMMNX.js +72 -0
  283. package/dist/chunk-TDEEN7O7.js +50 -0
  284. package/dist/chunk-TKRAU33B.js +53 -0
  285. package/dist/chunk-TMLPJ27P.js +126 -0
  286. package/dist/chunk-TTKSTVEF.js +41 -0
  287. package/dist/chunk-TVYKK7ZX.js +123 -0
  288. package/dist/chunk-TWZZB4WO.js +114 -0
  289. package/dist/chunk-TYI74BSP.js +62 -0
  290. package/dist/chunk-TZCA2T5D.js +282 -0
  291. package/dist/chunk-U2CMWI75.js +250 -0
  292. package/dist/chunk-UA7N4NQJ.js +30 -0
  293. package/dist/chunk-UEN5BURK.js +106 -0
  294. package/dist/chunk-UGXT677T.js +437 -0
  295. package/dist/chunk-ULCNZZBV.js +38 -0
  296. package/dist/chunk-UO4T3RQ7.js +62 -0
  297. package/dist/chunk-US3SPKKB.js +266 -0
  298. package/dist/chunk-UU3FA6LV.js +72 -0
  299. package/dist/chunk-UUNHTQDU.js +79 -0
  300. package/dist/chunk-UUZXVVJY.js +161 -0
  301. package/dist/chunk-UZJMB6V7.js +26 -0
  302. package/dist/chunk-V3HXUE6V.js +221 -0
  303. package/dist/chunk-V6UMVJGA.js +53 -0
  304. package/dist/chunk-V7C6DTJ6.js +72 -0
  305. package/dist/chunk-VFWFORJJ.js +131 -0
  306. package/dist/chunk-VHWB6H64.js +75 -0
  307. package/dist/chunk-VI62SXXU.js +284 -0
  308. package/dist/chunk-VK3FB67Z.js +31 -0
  309. package/dist/chunk-VKC7QT46.js +83 -0
  310. package/dist/chunk-VVTY2NT4.js +105 -0
  311. package/dist/chunk-VWEOVI4O.js +123 -0
  312. package/dist/chunk-WOCMJF6O.js +221 -0
  313. package/dist/chunk-WPDU5H5L.js +114 -0
  314. package/dist/chunk-WQMFGEAF.js +235 -0
  315. package/dist/chunk-WTAZ6P6T.js +263 -0
  316. package/dist/chunk-WUJFEG3H.js +118 -0
  317. package/dist/chunk-WUTFZGXS.js +50 -0
  318. package/dist/chunk-WVUIIBRR.js +51 -0
  319. package/dist/chunk-X65IBJJM.js +436 -0
  320. package/dist/chunk-XATMLZOP.js +263 -0
  321. package/dist/chunk-XFCRKJRI.js +261 -0
  322. package/dist/chunk-XGKHSZ6E.js +38 -0
  323. package/dist/chunk-XJAQVF2E.js +83 -0
  324. package/dist/chunk-XQX7HSL5.js +38 -0
  325. package/dist/chunk-XTP3ODBD.js +56 -0
  326. package/dist/chunk-XWF3ZJCZ.js +97 -0
  327. package/dist/chunk-XX3GHFG5.js +121 -0
  328. package/dist/chunk-XZ6AMNDQ.js +290 -0
  329. package/dist/chunk-Y2LOHSZL.js +72 -0
  330. package/dist/chunk-Y66VCVZZ.js +122 -0
  331. package/dist/chunk-YD462QK7.js +346 -0
  332. package/dist/chunk-YELD6VJI.js +68 -0
  333. package/dist/chunk-YHPZ5T3W.js +91 -0
  334. package/dist/chunk-YJV7JCIC.js +38 -0
  335. package/dist/chunk-YMZUZ5HX.js +263 -0
  336. package/dist/chunk-YN7MUHAZ.js +218 -0
  337. package/dist/chunk-YOCKCBUA.js +72 -0
  338. package/dist/chunk-YPFUW2PT.js +306 -0
  339. package/dist/chunk-YRLRIQNP.js +284 -0
  340. package/dist/chunk-YRTR6KJN.js +210 -0
  341. package/dist/chunk-YSSJHCRC.js +221 -0
  342. package/dist/chunk-YWLJJNJY.js +259 -0
  343. package/dist/chunk-YYRH2SGW.js +114 -0
  344. package/dist/chunk-YZRIJ4AP.js +263 -0
  345. package/dist/chunk-Z4UCFUF7.js +299 -0
  346. package/dist/chunk-Z64CLA4J.js +53 -0
  347. package/dist/chunk-ZCFOYW2U.js +296 -0
  348. package/dist/chunk-ZEYZVUG5.js +53 -0
  349. package/dist/chunk-ZHRZMJA3.js +31 -0
  350. package/dist/chunk-ZJQAMKIP.js +113 -0
  351. package/dist/chunk-ZRQZOT6X.js +141 -0
  352. package/dist/chunk-ZUTAZW53.js +306 -0
  353. package/dist/chunk-ZVJ2T3DC.js +79 -0
  354. package/dist/chunk-ZWJZHUKU.js +50 -0
  355. package/dist/chunk-ZXQKFHBO.js +221 -0
  356. package/dist/components/Breadcrumbs.cjs +376 -0
  357. package/dist/components/Breadcrumbs.js +90 -0
  358. package/dist/components/Button.cjs +319 -0
  359. package/dist/components/Button.js +8 -0
  360. package/dist/components/Calendar.cjs +219 -0
  361. package/dist/components/Calendar.js +10 -0
  362. package/dist/components/CalendarRange.cjs +520 -0
  363. package/dist/components/CalendarRange.js +13 -0
  364. package/dist/components/CalendarRange.stories.cjs +1 -0
  365. package/dist/components/CalendarRange.stories.js +0 -0
  366. package/dist/components/Caption.cjs +283 -0
  367. package/dist/components/Caption.js +80 -0
  368. package/dist/components/Checkbox.cjs +377 -0
  369. package/dist/components/Checkbox.js +11 -0
  370. package/dist/components/ContentTab.cjs +382 -0
  371. package/dist/components/ContentTab.js +10 -0
  372. package/dist/components/ContentTabs.cjs +472 -0
  373. package/dist/components/ContentTabs.js +98 -0
  374. package/dist/components/DMSiLogo.cjs +79 -0
  375. package/dist/components/DMSiLogo.js +56 -0
  376. package/dist/components/DataGrid.cjs +2985 -0
  377. package/dist/components/DataGrid.js +639 -0
  378. package/dist/components/DataGridCell.cjs +1905 -0
  379. package/dist/components/DataGridCell.js +24 -0
  380. package/dist/components/DataTable.cjs +791 -0
  381. package/dist/components/DataTable.js +720 -0
  382. package/dist/components/DateInput.cjs +1128 -0
  383. package/dist/components/DateInput.js +170 -0
  384. package/dist/components/DateRangeInput.cjs +1129 -0
  385. package/dist/components/DateRangeInput.js +171 -0
  386. package/dist/components/DebugJson.cjs +50 -0
  387. package/dist/components/DebugJson.js +27 -0
  388. package/dist/components/Display.cjs +234 -0
  389. package/dist/components/Display.js +12 -0
  390. package/dist/components/Display1.cjs +223 -0
  391. package/dist/components/Display1.js +8 -0
  392. package/dist/components/Display2.cjs +220 -0
  393. package/dist/components/Display2.js +46 -0
  394. package/dist/components/EditingContext.cjs +73 -0
  395. package/dist/components/EditingContext.js +35 -0
  396. package/dist/components/FilterGroup.cjs +903 -0
  397. package/dist/components/FilterGroup.js +213 -0
  398. package/dist/components/FullViewportBox.cjs +35 -0
  399. package/dist/components/FullViewportBox.js +12 -0
  400. package/dist/components/Grid.cjs +69 -0
  401. package/dist/components/Grid.js +36 -0
  402. package/dist/components/GridContainer.cjs +125 -0
  403. package/dist/components/GridContainer.js +92 -0
  404. package/dist/components/Heading.cjs +238 -0
  405. package/dist/components/Heading.js +14 -0
  406. package/dist/components/Heading1.cjs +223 -0
  407. package/dist/components/Heading1.js +49 -0
  408. package/dist/components/Heading2.cjs +223 -0
  409. package/dist/components/Heading2.js +8 -0
  410. package/dist/components/Heading3.cjs +223 -0
  411. package/dist/components/Heading3.js +8 -0
  412. package/dist/components/HorizontalDivider.cjs +33 -0
  413. package/dist/components/HorizontalDivider.js +10 -0
  414. package/dist/components/Icon.cjs +98 -0
  415. package/dist/components/Icon.js +7 -0
  416. package/dist/components/Input.cjs +670 -0
  417. package/dist/components/Input.js +21 -0
  418. package/dist/components/InputGroup.cjs +270 -0
  419. package/dist/components/InputGroup.js +60 -0
  420. package/dist/components/Label.cjs +223 -0
  421. package/dist/components/Label.js +8 -0
  422. package/dist/components/Link.cjs +262 -0
  423. package/dist/components/Link.js +8 -0
  424. package/dist/components/List.cjs +37 -0
  425. package/dist/components/List.js +14 -0
  426. package/dist/components/LiveChatComponent.cjs +63 -0
  427. package/dist/components/LiveChatComponent.js +40 -0
  428. package/dist/components/LogoAgilityTopBar.cjs +115 -0
  429. package/dist/components/LogoAgilityTopBar.js +92 -0
  430. package/dist/components/LogoDMSiTopBar.cjs +79 -0
  431. package/dist/components/LogoDMSiTopBar.js +7 -0
  432. package/dist/components/LogoMillworkTopBar.cjs +221 -0
  433. package/dist/components/LogoMillworkTopBar.js +198 -0
  434. package/dist/components/MainBar.cjs +210 -0
  435. package/dist/components/MainBar.js +64 -0
  436. package/dist/components/Menu.cjs +437 -0
  437. package/dist/components/Menu.js +11 -0
  438. package/dist/components/MenuOption.cjs +483 -0
  439. package/dist/components/MenuOption.js +13 -0
  440. package/dist/components/Modal.cjs +688 -0
  441. package/dist/components/Modal.js +195 -0
  442. package/dist/components/ModalButtons.cjs +381 -0
  443. package/dist/components/ModalButtons.js +10 -0
  444. package/dist/components/ModalContent.cjs +34 -0
  445. package/dist/components/ModalContent.js +7 -0
  446. package/dist/components/ModalHeader.cjs +418 -0
  447. package/dist/components/ModalHeader.js +11 -0
  448. package/dist/components/ModalScrim.cjs +65 -0
  449. package/dist/components/ModalScrim.js +7 -0
  450. package/dist/components/NavigationTab.cjs +431 -0
  451. package/dist/components/NavigationTab.js +10 -0
  452. package/dist/components/NavigationTabs.cjs +477 -0
  453. package/dist/components/NavigationTabs.js +56 -0
  454. package/dist/components/Notification.cjs +529 -0
  455. package/dist/components/Notification.js +104 -0
  456. package/dist/components/OptionPill.cjs +478 -0
  457. package/dist/components/OptionPill.js +11 -0
  458. package/dist/components/Paragraph.cjs +231 -0
  459. package/dist/components/Paragraph.js +8 -0
  460. package/dist/components/Password.cjs +698 -0
  461. package/dist/components/Password.js +53 -0
  462. package/dist/components/ProjectBar.cjs +242 -0
  463. package/dist/components/ProjectBar.js +63 -0
  464. package/dist/components/Radio.cjs +349 -0
  465. package/dist/components/Radio.js +131 -0
  466. package/dist/components/Search.cjs +765 -0
  467. package/dist/components/Search.js +12 -0
  468. package/dist/components/Select.cjs +750 -0
  469. package/dist/components/Select.js +12 -0
  470. package/dist/components/SideMenu.cjs +54 -0
  471. package/dist/components/SideMenu.js +21 -0
  472. package/dist/components/SideMenuGroup.cjs +393 -0
  473. package/dist/components/SideMenuGroup.js +83 -0
  474. package/dist/components/SideMenuItem.cjs +359 -0
  475. package/dist/components/SideMenuItem.js +70 -0
  476. package/dist/components/Stack.cjs +109 -0
  477. package/dist/components/Stack.js +7 -0
  478. package/dist/components/StatusPill.cjs +265 -0
  479. package/dist/components/StatusPill.js +52 -0
  480. package/dist/components/Stepper.cjs +883 -0
  481. package/dist/components/Stepper.js +105 -0
  482. package/dist/components/Subheader.cjs +226 -0
  483. package/dist/components/Subheader.js +8 -0
  484. package/dist/components/Surface.cjs +98 -0
  485. package/dist/components/Surface.js +7 -0
  486. package/dist/components/Swatch.cjs +779 -0
  487. package/dist/components/Swatch.js +398 -0
  488. package/dist/components/Textarea.cjs +269 -0
  489. package/dist/components/Textarea.js +96 -0
  490. package/dist/components/Theme.cjs +36 -0
  491. package/dist/components/Theme.js +13 -0
  492. package/dist/components/Time.cjs +1059 -0
  493. package/dist/components/Time.js +365 -0
  494. package/dist/components/Toast.cjs +644 -0
  495. package/dist/components/Toast.js +218 -0
  496. package/dist/components/Tooltip.cjs +273 -0
  497. package/dist/components/Tooltip.js +9 -0
  498. package/dist/components/TopBar.cjs +352 -0
  499. package/dist/components/TopBar.js +132 -0
  500. package/dist/components/useInfiniteScroll.cjs +57 -0
  501. package/dist/components/useInfiniteScroll.js +8 -0
  502. package/dist/components/useMatchesMedia.cjs +53 -0
  503. package/dist/components/useMatchesMedia.js +9 -0
  504. package/dist/components/useMenuSystem.cjs +358 -0
  505. package/dist/components/useMenuSystem.js +11 -0
  506. package/dist/components/useMounted.cjs +39 -0
  507. package/dist/components/useMounted.js +8 -0
  508. package/dist/fonts.css +19 -0
  509. package/dist/icons-light-QXLRBPC4.woff2 +0 -0
  510. package/dist/icons-light[FILL]-PPZXOLWS.woff2 +0 -0
  511. package/dist/icons-normal-MJATZ73K.woff2 +0 -0
  512. package/dist/icons-normal[FILL]-PPZXOLWS.woff2 +0 -0
  513. package/dist/index.css +4049 -0
  514. package/dist/millwork.css +4 -0
  515. package/dist/open-sans-55T6A4JE.woff2 +0 -0
  516. package/dist/types.cjs +18 -0
  517. package/dist/types.js +0 -0
  518. package/package.json +66 -0
  519. package/src/brand.css +110 -0
  520. package/src/classNames.ts +144 -0
  521. package/src/components/Breadcrumbs.tsx +116 -0
  522. package/src/components/Button.tsx +210 -0
  523. package/src/components/CalendarRange.tsx +429 -0
  524. package/src/components/Caption.tsx +101 -0
  525. package/src/components/Checkbox.tsx +195 -0
  526. package/src/components/ContentTab.tsx +66 -0
  527. package/src/components/ContentTabs.tsx +103 -0
  528. package/src/components/DMSiLogo.tsx +32 -0
  529. package/src/components/DataGrid.tsx +819 -0
  530. package/src/components/DataGridCell.tsx +384 -0
  531. package/src/components/DataTable.tsx +835 -0
  532. package/src/components/DateInput.tsx +188 -0
  533. package/src/components/DateRangeInput.tsx +179 -0
  534. package/src/components/DebugJson.tsx +24 -0
  535. package/src/components/Display.tsx +60 -0
  536. package/src/components/EditingContext.tsx +40 -0
  537. package/src/components/FilterGroup.tsx +211 -0
  538. package/src/components/FullViewportBox.tsx +11 -0
  539. package/src/components/Grid.tsx +75 -0
  540. package/src/components/GridContainer.tsx +124 -0
  541. package/src/components/Heading.tsx +66 -0
  542. package/src/components/HorizontalDivider.tsx +3 -0
  543. package/src/components/Icon.tsx +36 -0
  544. package/src/components/Input.tsx +508 -0
  545. package/src/components/InputGroup.tsx +51 -0
  546. package/src/components/Label.tsx +40 -0
  547. package/src/components/Link.tsx +106 -0
  548. package/src/components/List.tsx +10 -0
  549. package/src/components/LiveChatComponent.tsx +56 -0
  550. package/src/components/LogoAgilityTopBar.tsx +53 -0
  551. package/src/components/LogoDMSiTopBar.tsx +32 -0
  552. package/src/components/LogoMillworkTopBar.tsx +118 -0
  553. package/src/components/MainBar.tsx +82 -0
  554. package/src/components/Menu.tsx +279 -0
  555. package/src/components/MenuOption.tsx +275 -0
  556. package/src/components/Modal.tsx +211 -0
  557. package/src/components/ModalButtons.tsx +35 -0
  558. package/src/components/ModalContent.tsx +5 -0
  559. package/src/components/ModalHeader.tsx +30 -0
  560. package/src/components/ModalScrim.tsx +34 -0
  561. package/src/components/NavigationTab.tsx +89 -0
  562. package/src/components/NavigationTabs.tsx +63 -0
  563. package/src/components/Notification.tsx +113 -0
  564. package/src/components/OptionPill.tsx +114 -0
  565. package/src/components/Paragraph.tsx +49 -0
  566. package/src/components/Password.tsx +46 -0
  567. package/src/components/ProjectBar.tsx +76 -0
  568. package/src/components/Radio.tsx +140 -0
  569. package/src/components/Search.tsx +129 -0
  570. package/src/components/Select.tsx +106 -0
  571. package/src/components/SideMenu.tsx +21 -0
  572. package/src/components/SideMenuGroup.tsx +81 -0
  573. package/src/components/SideMenuItem.tsx +90 -0
  574. package/src/components/Stack.tsx +114 -0
  575. package/src/components/StatusPill.tsx +51 -0
  576. package/src/components/Stepper.tsx +91 -0
  577. package/src/components/Subheader.tsx +44 -0
  578. package/src/components/Surface.tsx +35 -0
  579. package/src/components/Swatch.tsx +293 -0
  580. package/src/components/Textarea.tsx +101 -0
  581. package/src/components/Theme.tsx +13 -0
  582. package/src/components/Time.tsx +457 -0
  583. package/src/components/Toast.tsx +244 -0
  584. package/src/components/Tooltip.tsx +137 -0
  585. package/src/components/TopBar.tsx +124 -0
  586. package/src/components/useInfiniteScroll.tsx +40 -0
  587. package/src/components/useMatchesMedia.tsx +28 -0
  588. package/src/components/useMenuSystem.tsx +367 -0
  589. package/src/components/useMounted.tsx +14 -0
  590. package/src/darkmode.css +125 -0
  591. package/src/fonts.css +21 -0
  592. package/src/index.css +489 -0
  593. package/src/index.tsx +2 -0
  594. package/src/types.ts +149 -0
  595. package/src/utils/formatting.tsx +81 -0
  596. package/src/utils.ts +23 -0
@@ -0,0 +1,1905 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __defProps = Object.defineProperties;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropNames = Object.getOwnPropertyNames;
9
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
+ var __getProtoOf = Object.getPrototypeOf;
11
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
12
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
13
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
14
+ var __spreadValues = (a, b) => {
15
+ for (var prop in b || (b = {}))
16
+ if (__hasOwnProp.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ if (__getOwnPropSymbols)
19
+ for (var prop of __getOwnPropSymbols(b)) {
20
+ if (__propIsEnum.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ }
23
+ return a;
24
+ };
25
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
26
+ var __objRest = (source, exclude) => {
27
+ var target = {};
28
+ for (var prop in source)
29
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
30
+ target[prop] = source[prop];
31
+ if (source != null && __getOwnPropSymbols)
32
+ for (var prop of __getOwnPropSymbols(source)) {
33
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
34
+ target[prop] = source[prop];
35
+ }
36
+ return target;
37
+ };
38
+ var __export = (target, all) => {
39
+ for (var name in all)
40
+ __defProp(target, name, { get: all[name], enumerable: true });
41
+ };
42
+ var __copyProps = (to, from, except, desc) => {
43
+ if (from && typeof from === "object" || typeof from === "function") {
44
+ for (let key of __getOwnPropNames(from))
45
+ if (!__hasOwnProp.call(to, key) && key !== except)
46
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
47
+ }
48
+ return to;
49
+ };
50
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
51
+ // If the importer is in node compatibility mode or this is not an ESM
52
+ // file that has been converted to a CommonJS file using a Babel-
53
+ // compatible transform (i.e. "__esModule" has not been set), then set
54
+ // "default" to the CommonJS "module.exports" for node compatibility.
55
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
56
+ mod
57
+ ));
58
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
59
+
60
+ // src/components/DataGridCell.tsx
61
+ var DataGridCell_exports = {};
62
+ __export(DataGridCell_exports, {
63
+ DataGridCell: () => DataGridCell,
64
+ DragAlongCell: () => DragAlongCell,
65
+ DraggableCellHeader: () => DraggableCellHeader
66
+ });
67
+ module.exports = __toCommonJS(DataGridCell_exports);
68
+ var import_sortable = require("@dnd-kit/sortable");
69
+
70
+ // ../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js
71
+ var import_react = require("react");
72
+ var canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
73
+ var CSS = /* @__PURE__ */ Object.freeze({
74
+ Translate: {
75
+ toString(transform) {
76
+ if (!transform) {
77
+ return;
78
+ }
79
+ const {
80
+ x,
81
+ y
82
+ } = transform;
83
+ return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
84
+ }
85
+ },
86
+ Scale: {
87
+ toString(transform) {
88
+ if (!transform) {
89
+ return;
90
+ }
91
+ const {
92
+ scaleX,
93
+ scaleY
94
+ } = transform;
95
+ return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
96
+ }
97
+ },
98
+ Transform: {
99
+ toString(transform) {
100
+ if (!transform) {
101
+ return;
102
+ }
103
+ return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(" ");
104
+ }
105
+ },
106
+ Transition: {
107
+ toString(_ref) {
108
+ let {
109
+ property,
110
+ duration,
111
+ easing
112
+ } = _ref;
113
+ return property + " " + duration + "ms " + easing;
114
+ }
115
+ }
116
+ });
117
+
118
+ // src/components/DataGridCell.tsx
119
+ var import_clsx8 = __toESM(require("clsx"), 1);
120
+ var import_react8 = require("react");
121
+
122
+ // src/classNames.ts
123
+ var import_clsx = __toESM(require("clsx"), 1);
124
+ var typography = {
125
+ display1: (0, import_clsx.default)(
126
+ "font-sans font-semibold",
127
+ "text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
128
+ "leading-display-1-mobile desktop:leading-display-1-desktop"
129
+ ),
130
+ display2: (0, import_clsx.default)(
131
+ "font-sans font-bold",
132
+ "text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
133
+ "leading-display-2-mobile desktop:leading-display-2-desktop"
134
+ ),
135
+ heading1: (0, import_clsx.default)(
136
+ "font-sans font-semibold",
137
+ "text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
138
+ "leading-heading-1-mobile desktop:leading-heading-1-desktop"
139
+ ),
140
+ heading2: (0, import_clsx.default)(
141
+ "font-sans font-normal",
142
+ "text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
143
+ "leading-heading-2-mobile desktop:leading-heading-2-desktop"
144
+ ),
145
+ heading3: (0, import_clsx.default)(
146
+ "font-sans font-semibold",
147
+ "text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
148
+ "leading-heading-3-mobile desktop:leading-heading-3-desktop"
149
+ ),
150
+ subheader: (0, import_clsx.default)(
151
+ "font-sans font-semibold",
152
+ "text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
153
+ "leading-subheader-mobile desktop:leading-subheader-desktop"
154
+ ),
155
+ link: (0, import_clsx.default)(
156
+ "font-sans font-normal",
157
+ "text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
158
+ "leading-link-mobile desktop:leading-link-desktop"
159
+ ),
160
+ buttonLabel: (0, import_clsx.default)(
161
+ "font-sans font-semibold",
162
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
163
+ "leading-label-mobile desktop:leading-label-desktop"
164
+ ),
165
+ label: (0, import_clsx.default)(
166
+ "font-sans font-semibold",
167
+ "text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
168
+ "leading-label-mobile desktop:leading-label-desktop"
169
+ ),
170
+ paragraph: (0, import_clsx.default)(
171
+ "font-sans font-normal",
172
+ "text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
173
+ "leading-paragraph-mobile desktop:leading-paragraph-desktop"
174
+ ),
175
+ caption: (0, import_clsx.default)(
176
+ "font-sans font-normal",
177
+ "text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
178
+ "leading-caption-mobile desktop:leading-caption-desktop"
179
+ )
180
+ };
181
+ var baseTransition = (0, import_clsx.default)(
182
+ "transition-colors duration-100 ease-in-out"
183
+ );
184
+ var componentGap = (0, import_clsx.default)(
185
+ "gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap"
186
+ );
187
+ var paddingUsingComponentGap = (0, import_clsx.default)(
188
+ "p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap"
189
+ );
190
+ var paddingYUsingLayoutGroupGap = (0, import_clsx.default)(
191
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
192
+ );
193
+ var componentPadding = (0, import_clsx.default)(
194
+ "p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding"
195
+ );
196
+ var componentPaddingBottom = (0, import_clsx.default)(
197
+ "pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding"
198
+ );
199
+ var componentPaddingY = (0, import_clsx.default)(
200
+ "py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding"
201
+ );
202
+ var componentPaddingXUsingComponentGap = (0, import_clsx.default)(
203
+ "px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap"
204
+ );
205
+ var componentPaddingYUsingComponentGap = (0, import_clsx.default)(
206
+ "py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap"
207
+ );
208
+ var componentPaddingMinusBorder = (0, import_clsx.default)(
209
+ "p-[calc(var(--spacing-mobile-component-padding)_-_1px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_1px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_1px)]"
210
+ );
211
+ var componentPaddingMinus2pxBorder = (0, import_clsx.default)(
212
+ "p-[calc(var(--spacing-mobile-component-padding)_-_2px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_2px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_2px)]"
213
+ );
214
+ var layoutPaddingBottom = (0, import_clsx.default)(
215
+ "pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding"
216
+ );
217
+ var layoutPaddingY = (0, import_clsx.default)(
218
+ "py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding"
219
+ );
220
+ var containerPaddingX = (0, import_clsx.default)(
221
+ "px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding"
222
+ );
223
+ var containerPaddingY = (0, import_clsx.default)(
224
+ "py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding"
225
+ );
226
+ var layoutGroupGapPaddingY = (0, import_clsx.default)(
227
+ "py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap"
228
+ );
229
+ var layoutGroupGap = (0, import_clsx.default)(
230
+ "gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap"
231
+ );
232
+ var layoutGap = (0, import_clsx.default)(
233
+ "gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap"
234
+ );
235
+ var gapUsingContainerPadding = (0, import_clsx.default)(
236
+ "gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding"
237
+ );
238
+
239
+ // src/components/Icon.tsx
240
+ var import_clsx2 = __toESM(require("clsx"), 1);
241
+ var import_jsx_runtime = require("react/jsx-runtime");
242
+ function Icon(_a) {
243
+ var _b = _a, {
244
+ name,
245
+ size = 24,
246
+ variant = "outline"
247
+ } = _b, props = __objRest(_b, [
248
+ "name",
249
+ "size",
250
+ "variant"
251
+ ]);
252
+ const variantStyle = variant === "filled" ? '"FILL" 1' : '"FILL" 0';
253
+ const weightStyle = size === 16 ? '"wght" 400' : '"wght" 300';
254
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
255
+ "span",
256
+ __spreadProps(__spreadValues({}, props), {
257
+ className: (0, import_clsx2.default)(
258
+ "icon",
259
+ `icon-${size}`,
260
+ // size === 16 ? "font-normal" : "font-light", // size 16 font weight is not working as normal from before
261
+ props.className
262
+ ),
263
+ style: __spreadValues({
264
+ fontVariationSettings: variantStyle + `, ${weightStyle}`
265
+ }, props.style),
266
+ children: name
267
+ })
268
+ );
269
+ }
270
+
271
+ // src/components/Search.tsx
272
+ var import_react3 = require("react");
273
+
274
+ // src/components/Input.tsx
275
+ var import_react2 = require("react");
276
+ var import_clsx4 = __toESM(require("clsx"), 1);
277
+
278
+ // src/components/Label.tsx
279
+ var import_clsx3 = __toESM(require("clsx"), 1);
280
+ var import_jsx_runtime2 = require("react/jsx-runtime");
281
+ var Label = (_a) => {
282
+ var _b = _a, {
283
+ as = "span",
284
+ padded,
285
+ className,
286
+ color,
287
+ align
288
+ } = _b, props = __objRest(_b, [
289
+ "as",
290
+ "padded",
291
+ "className",
292
+ "color",
293
+ "align"
294
+ ]);
295
+ const Element = as;
296
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
297
+ Element,
298
+ __spreadProps(__spreadValues({
299
+ className: (0, import_clsx3.default)(
300
+ typography.label,
301
+ align === "left" && "text-left",
302
+ align === "center" && "text-center",
303
+ align === "right" && "text-right",
304
+ className,
305
+ padded && componentPaddingXUsingComponentGap
306
+ )
307
+ }, props), {
308
+ style: __spreadProps(__spreadValues({}, props.style), {
309
+ color: color ? `var(--color-${color})` : void 0
310
+ })
311
+ })
312
+ );
313
+ };
314
+ Label.displayName = "Label";
315
+
316
+ // src/utils/formatting.tsx
317
+ function getDecimalPlaceholder(decimals) {
318
+ if (!decimals || decimals <= 0) {
319
+ return {};
320
+ }
321
+ return {
322
+ placeholder: `0.${"0".repeat(decimals)}`
323
+ };
324
+ }
325
+ function formatDecimalValue(value, decimals) {
326
+ if (!value || value === "") {
327
+ return "";
328
+ }
329
+ const numValue = typeof value === "string" ? parseFloat(value) : value;
330
+ if (isNaN(numValue)) {
331
+ return "";
332
+ }
333
+ if (!decimals || decimals <= 0) {
334
+ return String(Math.round(numValue));
335
+ }
336
+ return numValue.toFixed(decimals);
337
+ }
338
+ function formatCurrencyDisplay(value) {
339
+ if (!value || value === "") {
340
+ return "";
341
+ }
342
+ const parts = value.split(".");
343
+ const integerPart = parts[0];
344
+ const decimalPart = parts[1];
345
+ const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
346
+ return decimalPart !== void 0 ? `${formattedInteger}.${decimalPart}` : formattedInteger;
347
+ }
348
+
349
+ // src/components/Input.tsx
350
+ var import_jsx_runtime3 = require("react/jsx-runtime");
351
+ var InputBase = (_a) => {
352
+ var _b = _a, {
353
+ before,
354
+ after,
355
+ type,
356
+ label,
357
+ error,
358
+ className,
359
+ align = "left",
360
+ caption,
361
+ required,
362
+ selectOnFocus,
363
+ removeRoundness,
364
+ inputContainerRef,
365
+ removeBorder,
366
+ wrapperClassName,
367
+ focus
368
+ } = _b, props = __objRest(_b, [
369
+ "before",
370
+ "after",
371
+ "type",
372
+ "label",
373
+ "error",
374
+ "className",
375
+ "align",
376
+ "caption",
377
+ "required",
378
+ "selectOnFocus",
379
+ "removeRoundness",
380
+ "inputContainerRef",
381
+ "removeBorder",
382
+ "wrapperClassName",
383
+ "focus"
384
+ ]);
385
+ const attributes = {
386
+ "data-error": error && !focus || null,
387
+ "data-focus": focus || null
388
+ };
389
+ const inputRef = (0, import_react2.useRef)(null);
390
+ (0, import_react2.useEffect)(() => {
391
+ var _a2;
392
+ const input = inputRef.current;
393
+ const focusHandler = () => {
394
+ input == null ? void 0 : input.select();
395
+ };
396
+ if (selectOnFocus) {
397
+ (_a2 = inputRef.current) == null ? void 0 : _a2.addEventListener("focus", focusHandler);
398
+ return () => {
399
+ input == null ? void 0 : input.removeEventListener("focus", focusHandler);
400
+ };
401
+ }
402
+ }, [selectOnFocus]);
403
+ const inputBaseClass = (0, import_clsx4.default)(
404
+ "w-full",
405
+ "flex flex-row items-center",
406
+ "bg-background-action-secondary-normal caret-icon-on-action-secondary-normal",
407
+ componentGap,
408
+ baseTransition,
409
+ "outline-transparent outline-2 -outline-offset-2",
410
+ componentPaddingMinusBorder,
411
+ !removeRoundness && "rounded-base",
412
+ !removeBorder && "border border-border-primary-normal",
413
+ "relative"
414
+ );
415
+ const inputFocusClass = (0, import_clsx4.default)(
416
+ "has-[[data-focus]]:border-transparent has-[[data-focus]]:outline-border-primary-focus focus-within:border-transparent focus-within:outline-border-primary-focus"
417
+ );
418
+ const inputDisabledClass = (0, import_clsx4.default)(
419
+ "has-disabled:bg-background-action-secondary-disabled"
420
+ );
421
+ const inputReadOnlyClass = (0, import_clsx4.default)(
422
+ "has-[input:not(:disabled):read-only]:outline-none has-[input:not(:disabled):read-only]:bg-transparent has-[input:not(:disabled):read-only]:border-transparent has-[input:not(:disabled):read-only]:pl-0"
423
+ );
424
+ const inputInvalidClass = (0, import_clsx4.default)(
425
+ "has-[[data-error]]:border-transparent has-[[data-error]]:not-focus-within:outline-border-primary-error has-[[data-error]]:not-focus-within:outline-1"
426
+ );
427
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
428
+ "label",
429
+ {
430
+ ref: inputContainerRef,
431
+ className: (0, import_clsx4.default)(
432
+ "w-full flex flex-col",
433
+ "block",
434
+ "text-text-primary-normal has-disabled:text-text-primary-disabled",
435
+ componentGap
436
+ ),
437
+ style: __spreadValues({}, props.style),
438
+ children: [
439
+ label && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import_clsx4.default)("flex items-center", componentGap), children: [
440
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
441
+ Label,
442
+ {
443
+ className: (0, import_clsx4.default)(
444
+ props.disabled || props.readOnly ? "cursor-default" : "cursor-pointer"
445
+ ),
446
+ children: label
447
+ }
448
+ ),
449
+ required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
450
+ "span",
451
+ {
452
+ className: (0, import_clsx4.default)(typography.label, "text-text-critical-normal"),
453
+ children: "*"
454
+ }
455
+ )
456
+ ] }),
457
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
458
+ "div",
459
+ {
460
+ className: (0, import_clsx4.default)(
461
+ inputBaseClass,
462
+ !props.disabled && inputInvalidClass,
463
+ inputFocusClass,
464
+ inputDisabledClass,
465
+ inputReadOnlyClass,
466
+ wrapperClassName
467
+ ),
468
+ children: [
469
+ before,
470
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
471
+ "input",
472
+ __spreadProps(__spreadValues(__spreadValues({
473
+ ref: (el) => {
474
+ inputRef.current = el;
475
+ },
476
+ type,
477
+ required
478
+ }, props), attributes), {
479
+ id: props.id,
480
+ className: (0, import_clsx4.default)(
481
+ "flex-1 outline-none w-full max-w-full min-h-6 min-w-0",
482
+ "[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",
483
+ "placeholder:text-text-secondary-normal disabled:text-text-secondary-disabled",
484
+ align === "right" && "text-right",
485
+ align === "center" && "text-center",
486
+ componentPaddingXUsingComponentGap,
487
+ typography.paragraph,
488
+ className,
489
+ props.readOnly && !props.disabled && "!px-0"
490
+ )
491
+ })
492
+ ),
493
+ after
494
+ ]
495
+ }
496
+ ),
497
+ caption
498
+ ]
499
+ }
500
+ );
501
+ };
502
+ var Input = (_a) => {
503
+ var _b = _a, {
504
+ variant = "default",
505
+ decimals,
506
+ uom,
507
+ removeSearchIcon,
508
+ value: propValue,
509
+ onChange,
510
+ onBlur,
511
+ onClear
512
+ } = _b, props = __objRest(_b, [
513
+ "variant",
514
+ "decimals",
515
+ "uom",
516
+ "removeSearchIcon",
517
+ "value",
518
+ "onChange",
519
+ "onBlur",
520
+ "onClear"
521
+ ]);
522
+ const [internalValue, setInternalValue] = (0, import_react2.useState)("");
523
+ const [displayValue, setDisplayValue] = (0, import_react2.useState)("");
524
+ (0, import_react2.useEffect)(() => {
525
+ var _a2;
526
+ const stringValue = (_a2 = propValue == null ? void 0 : propValue.toString()) != null ? _a2 : "";
527
+ if (variant === "currency") {
528
+ if (propValue === void 0 || propValue === "" || typeof propValue === "number" && isNaN(propValue)) {
529
+ setInternalValue("");
530
+ setDisplayValue("");
531
+ } else {
532
+ const numValue = typeof propValue === "string" ? parseFloat(propValue) : propValue;
533
+ if (!isNaN(numValue)) {
534
+ const formatted = numValue.toFixed(decimals != null ? decimals : 2);
535
+ setInternalValue(formatted);
536
+ setDisplayValue(formatCurrencyDisplay(formatted));
537
+ }
538
+ }
539
+ } else {
540
+ setInternalValue(stringValue);
541
+ setDisplayValue(stringValue);
542
+ }
543
+ }, [propValue, decimals, variant]);
544
+ const getInputProps = () => {
545
+ var _a2;
546
+ const baseProps = __spreadValues(__spreadValues({}, props), getDecimalPlaceholder(decimals));
547
+ switch (variant) {
548
+ case "search":
549
+ return __spreadProps(__spreadValues({}, baseProps), {
550
+ placeholder: (_a2 = props.placeholder) != null ? _a2 : "Search",
551
+ className: "!mr-6",
552
+ value: displayValue
553
+ });
554
+ case "finder":
555
+ return baseProps;
556
+ case "currency":
557
+ return __spreadProps(__spreadValues({}, baseProps), {
558
+ align: "right",
559
+ type: "text",
560
+ value: displayValue
561
+ });
562
+ case "percentage":
563
+ case "uom":
564
+ return __spreadProps(__spreadValues({}, baseProps), {
565
+ type: "number",
566
+ align: "right"
567
+ });
568
+ default:
569
+ return baseProps;
570
+ }
571
+ };
572
+ const getBeforeElement = () => {
573
+ if (props.before) return props.before;
574
+ switch (variant) {
575
+ case "search":
576
+ return !removeSearchIcon ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { name: "search" }) }) : null;
577
+ case "currency":
578
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { name: "attach_money" }) });
579
+ default:
580
+ return null;
581
+ }
582
+ };
583
+ const getAfterElement = () => {
584
+ if (props.after) return props.after;
585
+ switch (variant) {
586
+ case "search": {
587
+ const hasValue = displayValue.length > 0;
588
+ return hasValue && !props.readOnly ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
589
+ Icon,
590
+ {
591
+ name: "close",
592
+ onClick: handleSearchReset,
593
+ className: "cursor-pointer absolute right-2 bottom-2/4 translate-y-2/4"
594
+ }
595
+ ) : null;
596
+ }
597
+ case "finder":
598
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { name: "search" });
599
+ case "uom":
600
+ return uom ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-text-secondary-normal uppercase", children: uom }) : null;
601
+ case "percentage":
602
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-icon-primary-normal contents", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Icon, { name: "percent" }) });
603
+ default:
604
+ return null;
605
+ }
606
+ };
607
+ const handleSearchReset = () => {
608
+ setInternalValue("");
609
+ setDisplayValue("");
610
+ if (onChange) {
611
+ const syntheticEvent = {
612
+ target: { value: "" }
613
+ };
614
+ if (typeof onChange === "function") {
615
+ onChange(syntheticEvent);
616
+ }
617
+ }
618
+ onClear == null ? void 0 : onClear();
619
+ };
620
+ const handleChange = (e) => {
621
+ const rawValue = e.target.value;
622
+ if (variant === "search") {
623
+ setInternalValue(rawValue);
624
+ setDisplayValue(rawValue);
625
+ if (typeof onChange === "function") {
626
+ onChange(e);
627
+ }
628
+ return;
629
+ }
630
+ if (variant === "currency") {
631
+ const raw = rawValue.replace(/,/g, "");
632
+ if (raw === "") {
633
+ setInternalValue("");
634
+ setDisplayValue("");
635
+ if (onChange) {
636
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
637
+ target: __spreadProps(__spreadValues({}, e.target), { value: "" })
638
+ });
639
+ onChange(syntheticEvent);
640
+ }
641
+ return;
642
+ }
643
+ const regex = /^\d*\.?\d*$/;
644
+ if (!regex.test(raw)) return;
645
+ const parts = raw.split(".");
646
+ const currentDecimals = decimals != null ? decimals : 2;
647
+ if (parts.length === 2 && parts[1].length > currentDecimals) return;
648
+ setInternalValue(raw);
649
+ setDisplayValue(formatCurrencyDisplay(raw));
650
+ const asNumber = Number(raw);
651
+ if (!isNaN(asNumber) && onChange) {
652
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
653
+ target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
654
+ });
655
+ onChange(syntheticEvent);
656
+ }
657
+ return;
658
+ }
659
+ setInternalValue(rawValue);
660
+ setDisplayValue(rawValue);
661
+ if (typeof onChange === "function") {
662
+ onChange(e);
663
+ }
664
+ };
665
+ const handleBlur = (e) => {
666
+ if (variant === "currency") {
667
+ const formatted = formatDecimalValue(internalValue, decimals != null ? decimals : 2);
668
+ setInternalValue(formatted);
669
+ setDisplayValue(formatCurrencyDisplay(formatted));
670
+ const asNumber = Number(formatted);
671
+ if (!isNaN(asNumber) && onChange) {
672
+ const syntheticEvent = __spreadProps(__spreadValues({}, e), {
673
+ target: __spreadProps(__spreadValues({}, e.target), { value: asNumber.toString() })
674
+ });
675
+ onChange(syntheticEvent);
676
+ }
677
+ } else if (variant === "uom" || variant === "percentage") {
678
+ const formattedValue = formatDecimalValue(e.target.value, decimals);
679
+ e.target.value = formattedValue;
680
+ }
681
+ onBlur == null ? void 0 : onBlur(e);
682
+ };
683
+ const inputProps = getInputProps();
684
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
685
+ InputBase,
686
+ __spreadProps(__spreadValues({}, inputProps), {
687
+ before: getBeforeElement(),
688
+ after: getAfterElement(),
689
+ onChange: handleChange,
690
+ onBlur: handleBlur
691
+ })
692
+ );
693
+ };
694
+ Input.displayName = "Input";
695
+ var Finder = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "finder" }));
696
+ var UOM = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "uom" }));
697
+ var Currency = (props) => {
698
+ var _a;
699
+ const handleCurrencyChange = (e) => {
700
+ var _a2;
701
+ (_a2 = props.onChange) == null ? void 0 : _a2.call(props, e);
702
+ };
703
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
704
+ Input,
705
+ __spreadProps(__spreadValues({}, props), {
706
+ variant: "currency",
707
+ decimals: (_a = props.decimals) != null ? _a : 2,
708
+ onChange: handleCurrencyChange
709
+ })
710
+ );
711
+ };
712
+ var Percentage = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Input, __spreadProps(__spreadValues({}, props), { variant: "percentage" }));
713
+ Finder.displayName = "Finder";
714
+ UOM.displayName = "UOM";
715
+ Currency.displayName = "Currency";
716
+ Percentage.displayName = "Percentage";
717
+
718
+ // src/components/Search.tsx
719
+ var import_jsx_runtime4 = require("react/jsx-runtime");
720
+ var Search = (_a) => {
721
+ var _b = _a, {
722
+ label,
723
+ error,
724
+ children,
725
+ readOnly,
726
+ renderMenu,
727
+ onClick,
728
+ className,
729
+ wrapperClassName,
730
+ removeRoundness
731
+ } = _b, props = __objRest(_b, [
732
+ "label",
733
+ "error",
734
+ "children",
735
+ "readOnly",
736
+ "renderMenu",
737
+ "onClick",
738
+ "className",
739
+ "wrapperClassName",
740
+ "removeRoundness"
741
+ ]);
742
+ const inputRef = (0, import_react3.useRef)(null);
743
+ const inputContainerRef = (0, import_react3.useRef)(null);
744
+ const preventFocusOnInitialRender = (0, import_react3.useRef)(true);
745
+ const [show, setShow] = (0, import_react3.useState)(false);
746
+ const [clearing, setClearing] = (0, import_react3.useState)(false);
747
+ const uniqueId = (0, import_react3.useId)();
748
+ const searchMenuName = `search-menu-${uniqueId}`;
749
+ (0, import_react3.useEffect)(() => {
750
+ var _a2;
751
+ if (preventFocusOnInitialRender.current) {
752
+ preventFocusOnInitialRender.current = false;
753
+ return;
754
+ }
755
+ (_a2 = inputRef.current) == null ? void 0 : _a2.focus();
756
+ }, [props.value]);
757
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
758
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
759
+ Input,
760
+ __spreadValues({
761
+ variant: "search",
762
+ inputContainerRef,
763
+ ref: inputRef,
764
+ label,
765
+ wrapperClassName,
766
+ onClick: (e) => {
767
+ if (props.disabled || readOnly) {
768
+ return;
769
+ }
770
+ if (clearing) {
771
+ setClearing(false);
772
+ return;
773
+ }
774
+ onClick == null ? void 0 : onClick(e);
775
+ setShow(!show);
776
+ },
777
+ onClear: () => {
778
+ setClearing(true);
779
+ },
780
+ onKeyDown: (e) => {
781
+ setShow(true);
782
+ if (["ArrowUp", "ArrowDown"].includes(e.key)) {
783
+ e.preventDefault();
784
+ const menu = document.querySelector(`[data-menu="${searchMenuName}"]`);
785
+ const selectedMenuOption = menu == null ? void 0 : menu.querySelector("[data-selected]");
786
+ if (selectedMenuOption) {
787
+ const allMenuOptions = Array.from((menu == null ? void 0 : menu.querySelectorAll('[role="menuitem"]')) || []);
788
+ const currentIndex = allMenuOptions.indexOf(selectedMenuOption);
789
+ let targetOption;
790
+ if (e.key === "ArrowDown") {
791
+ targetOption = allMenuOptions[currentIndex + 1] || allMenuOptions[0];
792
+ } else {
793
+ targetOption = allMenuOptions[currentIndex - 1] || allMenuOptions[allMenuOptions.length - 1];
794
+ }
795
+ targetOption == null ? void 0 : targetOption.focus();
796
+ } else {
797
+ const toFocusMenuOption = e.key === "ArrowDown" ? menu == null ? void 0 : menu.querySelector('[role="menuitem"]') : menu == null ? void 0 : menu.querySelector('[role="menuitem"]:last-child');
798
+ toFocusMenuOption == null ? void 0 : toFocusMenuOption.focus();
799
+ }
800
+ }
801
+ },
802
+ error,
803
+ readOnly,
804
+ removeRoundness,
805
+ focus: show
806
+ }, props)
807
+ ),
808
+ renderMenu ? renderMenu({
809
+ positionTo: inputContainerRef,
810
+ show,
811
+ setShow,
812
+ topOffset: props.caption ? -16 : null,
813
+ autoFocusOff: true,
814
+ menuName: searchMenuName
815
+ }) : children
816
+ ] });
817
+ };
818
+ Search.displayName = "Search";
819
+
820
+ // src/components/Menu.tsx
821
+ var import_clsx5 = __toESM(require("clsx"), 1);
822
+ var import_react6 = require("react");
823
+ var import_react_dom = require("react-dom");
824
+
825
+ // src/components/useMenuSystem.tsx
826
+ var import_react5 = require("react");
827
+
828
+ // src/components/useMatchesMedia.tsx
829
+ var import_react4 = require("react");
830
+ var useMatchesMedia = (query) => {
831
+ const [matches, setMatches] = (0, import_react4.useState)(
832
+ () => typeof window !== "undefined" ? window.matchMedia(query).matches : false
833
+ );
834
+ (0, import_react4.useLayoutEffect)(() => {
835
+ const mediaQueryList = window.matchMedia(query);
836
+ const listener = (event) => {
837
+ setMatches(event.matches);
838
+ };
839
+ mediaQueryList.addEventListener("change", listener);
840
+ setMatches(mediaQueryList.matches);
841
+ return () => {
842
+ mediaQueryList.removeEventListener("change", listener);
843
+ };
844
+ }, [query]);
845
+ return matches;
846
+ };
847
+ var useMatchesMobile = () => {
848
+ const isMobile = useMatchesMedia("(width < 48rem)");
849
+ return isMobile;
850
+ };
851
+
852
+ // src/components/useMenuSystem.tsx
853
+ function useSubMenuSystem(mobilePositionTo) {
854
+ const [activeMenus, setActiveMenus] = (0, import_react5.useState)(
855
+ {}
856
+ );
857
+ const [activeMenu, setActiveMenu] = (0, import_react5.useState)("");
858
+ const [currentSubMenuLevel, setCurrentSubMenuLevel] = (0, import_react5.useState)(null);
859
+ const menuRootRef = (0, import_react5.useRef)(null);
860
+ const subMenuRefs = (0, import_react5.useRef)({});
861
+ const hoverTimeoutRef = (0, import_react5.useRef)(null);
862
+ const closeTimeoutRef = (0, import_react5.useRef)(null);
863
+ const isMobile = useMatchesMobile();
864
+ const toggleMenu = (menuId, level) => {
865
+ if (closeTimeoutRef.current) {
866
+ clearTimeout(closeTimeoutRef.current);
867
+ closeTimeoutRef.current = null;
868
+ }
869
+ setActiveMenu(menuId);
870
+ setCurrentSubMenuLevel(level);
871
+ setActiveMenus((prev) => {
872
+ const newActiveMenus = __spreadValues({}, prev);
873
+ if (newActiveMenus[level] === menuId) {
874
+ delete newActiveMenus[level];
875
+ } else {
876
+ newActiveMenus[level] = menuId;
877
+ }
878
+ Object.keys(newActiveMenus).forEach((key) => {
879
+ if (Number(key) > level) {
880
+ delete newActiveMenus[Number(key)];
881
+ }
882
+ });
883
+ return newActiveMenus;
884
+ });
885
+ };
886
+ const openMenu = (menuId, level) => {
887
+ if (closeTimeoutRef.current) {
888
+ clearTimeout(closeTimeoutRef.current);
889
+ closeTimeoutRef.current = null;
890
+ }
891
+ setActiveMenus((prev) => {
892
+ const newActiveMenus = __spreadValues({}, prev);
893
+ newActiveMenus[level] = menuId;
894
+ Object.keys(newActiveMenus).forEach((key) => {
895
+ if (Number(key) > level) {
896
+ delete newActiveMenus[Number(key)];
897
+ }
898
+ });
899
+ return newActiveMenus;
900
+ });
901
+ };
902
+ const openMenuWithDelay = (menuId, level, delay = 150) => {
903
+ if (isMobile) {
904
+ return;
905
+ }
906
+ if (hoverTimeoutRef.current) {
907
+ clearTimeout(hoverTimeoutRef.current);
908
+ }
909
+ hoverTimeoutRef.current = setTimeout(() => {
910
+ openMenu(menuId, level);
911
+ }, delay);
912
+ };
913
+ const closeMenuWithDelay = (level, delay = 500) => {
914
+ if (isMobile) {
915
+ return;
916
+ }
917
+ if (hoverTimeoutRef.current) {
918
+ clearTimeout(hoverTimeoutRef.current);
919
+ hoverTimeoutRef.current = null;
920
+ }
921
+ closeTimeoutRef.current = setTimeout(() => {
922
+ closeSubMenuLevel(level);
923
+ }, delay);
924
+ };
925
+ const cancelCloseTimeout = () => {
926
+ if (isMobile) {
927
+ return;
928
+ }
929
+ if (closeTimeoutRef.current) {
930
+ clearTimeout(closeTimeoutRef.current);
931
+ closeTimeoutRef.current = null;
932
+ }
933
+ };
934
+ const closeSubMenuLevel = (level) => {
935
+ setActiveMenus((prev) => {
936
+ const newActiveMenus = __spreadValues({}, prev);
937
+ delete newActiveMenus[level];
938
+ Object.keys(newActiveMenus).forEach((key) => {
939
+ if (Number(key) >= level) {
940
+ delete newActiveMenus[Number(key)];
941
+ }
942
+ });
943
+ if (isMobile) {
944
+ const newSubMenuLevel = level - 1;
945
+ setCurrentSubMenuLevel(newSubMenuLevel);
946
+ const newActiveMenu = newActiveMenus[newSubMenuLevel];
947
+ if (Object.keys(newActiveMenus).length > 0 && newActiveMenu) {
948
+ setActiveMenu(newActiveMenu);
949
+ }
950
+ }
951
+ return newActiveMenus;
952
+ });
953
+ };
954
+ const registerSubMenu = (id, element) => {
955
+ subMenuRefs.current[id] = element;
956
+ };
957
+ const isMenuActive = (menuId, level) => {
958
+ return activeMenus[level] === menuId;
959
+ };
960
+ (0, import_react5.useEffect)(() => {
961
+ const handleClickOutside = (event) => {
962
+ var _a;
963
+ if (Object.keys(activeMenus).length === 0) return;
964
+ const target = event.target;
965
+ if ((_a = menuRootRef.current) == null ? void 0 : _a.contains(target)) return;
966
+ const isInsideActiveSubmenu = Object.values(activeMenus).some((id) => {
967
+ const submenuEl = subMenuRefs.current[id];
968
+ return submenuEl == null ? void 0 : submenuEl.contains(target);
969
+ });
970
+ if (!isInsideActiveSubmenu) {
971
+ setActiveMenus({});
972
+ }
973
+ };
974
+ document.addEventListener("mousedown", handleClickOutside);
975
+ return () => {
976
+ document.removeEventListener("mousedown", handleClickOutside);
977
+ };
978
+ }, [activeMenus]);
979
+ (0, import_react5.useEffect)(() => {
980
+ return () => {
981
+ if (hoverTimeoutRef.current) {
982
+ clearTimeout(hoverTimeoutRef.current);
983
+ }
984
+ if (closeTimeoutRef.current) {
985
+ clearTimeout(closeTimeoutRef.current);
986
+ }
987
+ };
988
+ }, []);
989
+ const getAllFocusableMenuElements = () => {
990
+ const elements = [];
991
+ if (menuRootRef.current) {
992
+ elements.push(...Array.from(menuRootRef.current.children));
993
+ }
994
+ Object.values(activeMenus).forEach((menuId) => {
995
+ const submenuEl = subMenuRefs.current[menuId];
996
+ if (submenuEl) {
997
+ elements.push(...Array.from(submenuEl.children));
998
+ }
999
+ });
1000
+ return elements;
1001
+ };
1002
+ const findCurrentMenuLevel = (element) => {
1003
+ let current = element.parentElement;
1004
+ while (current) {
1005
+ const level = current.getAttribute("data-menu-level");
1006
+ if (level !== null) {
1007
+ return parseInt(level, 10);
1008
+ }
1009
+ current = current.parentElement;
1010
+ }
1011
+ return 0;
1012
+ };
1013
+ const getMenuElementsAtLevel = (level) => {
1014
+ var _a;
1015
+ if (level === 0 && menuRootRef.current) {
1016
+ return Array.from(menuRootRef.current.children);
1017
+ }
1018
+ const menuId = (_a = Object.entries(activeMenus).find(([, id]) => {
1019
+ const submenuEl = subMenuRefs.current[id];
1020
+ return submenuEl && submenuEl.getAttribute("data-menu-level") === level.toString();
1021
+ })) == null ? void 0 : _a[1];
1022
+ if (menuId) {
1023
+ const submenuEl = subMenuRefs.current[menuId];
1024
+ if (submenuEl) {
1025
+ return Array.from(submenuEl.children);
1026
+ }
1027
+ }
1028
+ return [];
1029
+ };
1030
+ return {
1031
+ menuRootRef,
1032
+ activeMenus,
1033
+ openMenu,
1034
+ isMenuActive,
1035
+ registerSubMenu,
1036
+ closeSubMenuLevel,
1037
+ getAllFocusableMenuElements,
1038
+ findCurrentMenuLevel,
1039
+ getMenuElementsAtLevel,
1040
+ mobileHide: isMobile && Object.keys(activeMenus).length > 0,
1041
+ listeners: {
1042
+ onSubMenuHover: openMenuWithDelay,
1043
+ onSubMenuLeave: closeMenuWithDelay,
1044
+ onSubMenuEnter: cancelCloseTimeout,
1045
+ toggleMenu,
1046
+ mobilePositionTo,
1047
+ activeMenu,
1048
+ currentSubMenuLevel,
1049
+ closeSubMenuLevel
1050
+ }
1051
+ };
1052
+ }
1053
+ function useMenuPosition(elementRef, position = "bottom", options) {
1054
+ const [menuPosition, setMenuPosition] = (0, import_react5.useState)({
1055
+ top: 0,
1056
+ left: 0,
1057
+ minWidth: 0
1058
+ });
1059
+ const isMobile = useMatchesMobile();
1060
+ const updatePosition = (0, import_react5.useCallback)(() => {
1061
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
1062
+ if (!(elementRef == null ? void 0 : elementRef.current)) return;
1063
+ const triggerRect = elementRef.current.getBoundingClientRect();
1064
+ const menuRect = (_b = (_a = options == null ? void 0 : options.menuRef) == null ? void 0 : _a.current) == null ? void 0 : _b.getBoundingClientRect();
1065
+ const viewportWidth = window.innerWidth;
1066
+ const menuWidth = (menuRect == null ? void 0 : menuRect.width) || triggerRect.width;
1067
+ const topOffset = (_c = options == null ? void 0 : options.topOffset) != null ? _c : 4;
1068
+ let top = 0;
1069
+ let left = 0;
1070
+ if (position === "bottom" || position === "bottom-right") {
1071
+ top = triggerRect.top + triggerRect.height + topOffset;
1072
+ } else {
1073
+ top = triggerRect.top;
1074
+ }
1075
+ if (position === "bottom") {
1076
+ left = triggerRect.left + window.scrollX;
1077
+ } else if (position === "bottom-right") {
1078
+ left = triggerRect.right + window.scrollX - menuWidth;
1079
+ } else if (position === "right") {
1080
+ left = triggerRect.right + window.scrollX;
1081
+ }
1082
+ const overflowsLeftViewport = left + menuWidth > viewportWidth;
1083
+ if (overflowsLeftViewport) {
1084
+ left = triggerRect.left - menuWidth;
1085
+ }
1086
+ if (isMobile) {
1087
+ left = triggerRect.left + menuWidth > viewportWidth ? Math.max(viewportWidth - menuWidth, 0) - 8 : triggerRect.left;
1088
+ top = ((_f = (_e = (_d = elementRef.current.parentElement) == null ? void 0 : _d.getBoundingClientRect()) == null ? void 0 : _e.top) != null ? _f : 0) + ((_i = (_h = (_g = elementRef.current.parentElement) == null ? void 0 : _g.getBoundingClientRect()) == null ? void 0 : _h.height) != null ? _i : 0) + topOffset;
1089
+ }
1090
+ setMenuPosition({
1091
+ top,
1092
+ left,
1093
+ minWidth: triggerRect.width
1094
+ });
1095
+ }, [elementRef, position, options == null ? void 0 : options.menuRef, options == null ? void 0 : options.topOffset, isMobile]);
1096
+ (0, import_react5.useEffect)(() => {
1097
+ if (!(options == null ? void 0 : options.isOpen) || !(options == null ? void 0 : options.setIsOpen)) return;
1098
+ const handleClickOutside = (event) => {
1099
+ var _a, _b, _c, _d, _e;
1100
+ const target = event.target;
1101
+ if ((_a = elementRef.current) == null ? void 0 : _a.contains(target)) return;
1102
+ if ((_c = (_b = options.menuRef) == null ? void 0 : _b.current) == null ? void 0 : _c.contains(target)) return;
1103
+ if ((_d = options.additionalRefs) == null ? void 0 : _d.some((ref) => {
1104
+ var _a2;
1105
+ return (_a2 = ref.current) == null ? void 0 : _a2.contains(target);
1106
+ }))
1107
+ return;
1108
+ (_e = options.setIsOpen) == null ? void 0 : _e.call(options, false);
1109
+ };
1110
+ document.addEventListener("mousedown", handleClickOutside);
1111
+ return () => {
1112
+ document.removeEventListener("mousedown", handleClickOutside);
1113
+ };
1114
+ }, [
1115
+ options,
1116
+ elementRef,
1117
+ options == null ? void 0 : options.isOpen,
1118
+ options == null ? void 0 : options.setIsOpen,
1119
+ options == null ? void 0 : options.menuRef,
1120
+ options == null ? void 0 : options.additionalRefs
1121
+ ]);
1122
+ (0, import_react5.useEffect)(() => {
1123
+ updatePosition();
1124
+ const resizeObserver = new ResizeObserver(updatePosition);
1125
+ if (elementRef == null ? void 0 : elementRef.current) {
1126
+ resizeObserver.observe(elementRef.current);
1127
+ }
1128
+ window.addEventListener("scroll", updatePosition);
1129
+ window.addEventListener("resize", updatePosition);
1130
+ return () => {
1131
+ resizeObserver.disconnect();
1132
+ window.removeEventListener("scroll", updatePosition);
1133
+ window.removeEventListener("resize", updatePosition);
1134
+ };
1135
+ }, [elementRef, updatePosition]);
1136
+ return { menuPosition, updatePosition };
1137
+ }
1138
+
1139
+ // src/utils.ts
1140
+ function findDocumentRoot(element) {
1141
+ if (typeof window === "undefined" || typeof document === "undefined") {
1142
+ throw new Error(
1143
+ "findDocumentRoot can only be used in a browser environment."
1144
+ );
1145
+ }
1146
+ if (!element || !(element instanceof Node)) {
1147
+ return window.document.body;
1148
+ }
1149
+ var currentElement = element;
1150
+ while (currentElement && currentElement.parentNode) {
1151
+ if (currentElement.parentNode === document) {
1152
+ return document.body;
1153
+ } else if (currentElement.parentNode instanceof DocumentFragment) {
1154
+ return currentElement.parentNode;
1155
+ } else {
1156
+ currentElement = currentElement.parentNode;
1157
+ }
1158
+ }
1159
+ return window.document.body;
1160
+ }
1161
+
1162
+ // src/components/Menu.tsx
1163
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1164
+ var Menu = (_a) => {
1165
+ var _b = _a, {
1166
+ children,
1167
+ className,
1168
+ ref,
1169
+ positionTo,
1170
+ mobilePositionTo,
1171
+ show,
1172
+ setShow,
1173
+ position = "bottom",
1174
+ maxHeight: customMaxHeight,
1175
+ topOffset,
1176
+ mobileBackMenuOption,
1177
+ mobileHide,
1178
+ useDefaultMinWidth,
1179
+ autoFocusOff,
1180
+ menuName
1181
+ } = _b, props = __objRest(_b, [
1182
+ "children",
1183
+ "className",
1184
+ "ref",
1185
+ "positionTo",
1186
+ "mobilePositionTo",
1187
+ "show",
1188
+ "setShow",
1189
+ "position",
1190
+ "maxHeight",
1191
+ "topOffset",
1192
+ "mobileBackMenuOption",
1193
+ "mobileHide",
1194
+ "useDefaultMinWidth",
1195
+ "autoFocusOff",
1196
+ "menuName"
1197
+ ]);
1198
+ const internalRef = (0, import_react6.useRef)(null);
1199
+ const actualRef = ref || internalRef;
1200
+ const [maxHeight, setMaxHeight] = (0, import_react6.useState)("180px");
1201
+ const isMobile = useMatchesMobile();
1202
+ const { menuPosition, updatePosition } = useMenuPosition(
1203
+ isMobile && mobilePositionTo ? mobilePositionTo : positionTo,
1204
+ position,
1205
+ {
1206
+ isOpen: show,
1207
+ setIsOpen: setShow,
1208
+ menuRef: internalRef,
1209
+ topOffset
1210
+ }
1211
+ );
1212
+ (0, import_react6.useEffect)(() => {
1213
+ const raf = requestAnimationFrame(() => {
1214
+ if (!actualRef || !actualRef.current || customMaxHeight) {
1215
+ return;
1216
+ }
1217
+ if (actualRef.current.childElementCount > 4) {
1218
+ let accumulatedHeight = 0;
1219
+ Array.from(actualRef.current.children).forEach((child, index) => {
1220
+ if (index >= 5) {
1221
+ return;
1222
+ }
1223
+ accumulatedHeight += child.clientHeight;
1224
+ });
1225
+ accumulatedHeight = accumulatedHeight / 5 * 4.5;
1226
+ setMaxHeight(`${accumulatedHeight}px`);
1227
+ }
1228
+ });
1229
+ return () => {
1230
+ cancelAnimationFrame(raf);
1231
+ };
1232
+ }, [actualRef, customMaxHeight]);
1233
+ (0, import_react6.useEffect)(() => {
1234
+ if (!show) {
1235
+ return;
1236
+ }
1237
+ initializeMenuFocus();
1238
+ updatePosition();
1239
+ }, [show, updatePosition]);
1240
+ (0, import_react6.useEffect)(() => {
1241
+ if (!show || !setShow) {
1242
+ return;
1243
+ }
1244
+ const handleEscapeKey = (event) => {
1245
+ var _a2;
1246
+ if (event.key !== "Escape") {
1247
+ return;
1248
+ }
1249
+ setShow(false);
1250
+ (_a2 = positionTo == null ? void 0 : positionTo.current) == null ? void 0 : _a2.focus();
1251
+ };
1252
+ document.addEventListener("keydown", handleEscapeKey);
1253
+ return () => {
1254
+ document.removeEventListener("keydown", handleEscapeKey);
1255
+ };
1256
+ }, [show, setShow, positionTo]);
1257
+ return show && (0, import_react_dom.createPortal)(
1258
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1259
+ "div",
1260
+ __spreadProps(__spreadValues({
1261
+ ref: setRefs,
1262
+ className: (0, import_clsx5.default)(
1263
+ "shadow-4 rounded-base bg-background-grouped-primary-normal overflow-x-hidden overflow-y-auto flex flex-col outline-0",
1264
+ "fixed",
1265
+ "z-50",
1266
+ mobileHide && "opacity-0 pointer-events-none",
1267
+ className
1268
+ )
1269
+ }, props), {
1270
+ style: __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, props.style), {
1271
+ maxHeight: customMaxHeight || maxHeight
1272
+ }), menuPosition), {
1273
+ minWidth: useDefaultMinWidth ? "212px" : menuPosition.minWidth
1274
+ }),
1275
+ onKeyDown: handleKeydown,
1276
+ onMouseDown: stopPropagation,
1277
+ onMouseUp: stopPropagation,
1278
+ onTouchStart: stopPropagation,
1279
+ onTouchEnd: stopPropagation,
1280
+ tabIndex: -1,
1281
+ "data-menu": menuName != null ? menuName : "",
1282
+ children: [
1283
+ mobileBackMenuOption == null ? void 0 : mobileBackMenuOption(),
1284
+ children
1285
+ ]
1286
+ })
1287
+ ),
1288
+ findDocumentRoot(internalRef.current)
1289
+ );
1290
+ function handleKeydown(e) {
1291
+ var _a2, _b2;
1292
+ if (!internalRef.current) {
1293
+ return;
1294
+ }
1295
+ if (e.key !== "Escape") {
1296
+ e.stopPropagation();
1297
+ }
1298
+ const menuOptions = Array.from(
1299
+ internalRef.current.querySelectorAll('[role="menuitem"]')
1300
+ );
1301
+ if (menuOptions.length === 0) {
1302
+ return;
1303
+ }
1304
+ let currentIndex = -1;
1305
+ const focusedElement = document.activeElement;
1306
+ for (let i = 0; i < menuOptions.length; i++) {
1307
+ if (menuOptions[i] === focusedElement) {
1308
+ currentIndex = i;
1309
+ break;
1310
+ }
1311
+ }
1312
+ switch (e.key) {
1313
+ case "ArrowDown": {
1314
+ e.preventDefault();
1315
+ const nextIndex = currentIndex < menuOptions.length - 1 ? currentIndex + 1 : 0;
1316
+ menuOptions[nextIndex].focus();
1317
+ break;
1318
+ }
1319
+ case "ArrowUp": {
1320
+ e.preventDefault();
1321
+ const prevIndex = currentIndex > 0 ? currentIndex - 1 : menuOptions.length - 1;
1322
+ menuOptions[prevIndex].focus();
1323
+ break;
1324
+ }
1325
+ case "Home":
1326
+ e.preventDefault();
1327
+ menuOptions[0].focus();
1328
+ break;
1329
+ case "End":
1330
+ e.preventDefault();
1331
+ menuOptions[menuOptions.length - 1].focus();
1332
+ break;
1333
+ case "Enter":
1334
+ case " ":
1335
+ case "ArrowRight":
1336
+ e.preventDefault();
1337
+ if (currentIndex >= 0) {
1338
+ menuOptions[currentIndex].click();
1339
+ }
1340
+ break;
1341
+ case "ArrowLeft":
1342
+ e.preventDefault();
1343
+ (_a2 = positionTo == null ? void 0 : positionTo.current) == null ? void 0 : _a2.click();
1344
+ (_b2 = positionTo == null ? void 0 : positionTo.current) == null ? void 0 : _b2.focus();
1345
+ break;
1346
+ }
1347
+ }
1348
+ function initializeMenuFocus() {
1349
+ var _a2, _b2, _c;
1350
+ if (!autoFocusOff) {
1351
+ (_a2 = internalRef.current) == null ? void 0 : _a2.focus();
1352
+ }
1353
+ const selectedOption = (_b2 = internalRef.current) == null ? void 0 : _b2.querySelector(
1354
+ "[data-selected]"
1355
+ );
1356
+ const firstMenuItem = (_c = internalRef.current) == null ? void 0 : _c.querySelector(
1357
+ '[role="menuitem"]'
1358
+ );
1359
+ const targetElement = selectedOption || firstMenuItem;
1360
+ if (!targetElement) {
1361
+ return;
1362
+ }
1363
+ targetElement.scrollIntoView({
1364
+ block: "nearest",
1365
+ behavior: "instant"
1366
+ });
1367
+ if (autoFocusOff) {
1368
+ return;
1369
+ }
1370
+ requestAnimationFrame(() => {
1371
+ targetElement.focus();
1372
+ });
1373
+ }
1374
+ function setRefs(node) {
1375
+ internalRef.current = node;
1376
+ if (ref) {
1377
+ if (typeof ref === "function") {
1378
+ ref(node);
1379
+ } else {
1380
+ ref.current = node;
1381
+ }
1382
+ }
1383
+ }
1384
+ function stopPropagation(e) {
1385
+ e.stopPropagation();
1386
+ }
1387
+ };
1388
+ Menu.displayName = "Menu";
1389
+
1390
+ // src/components/MenuOption.tsx
1391
+ var import_clsx7 = __toESM(require("clsx"), 1);
1392
+ var import_react7 = require("react");
1393
+
1394
+ // src/components/Paragraph.tsx
1395
+ var import_clsx6 = __toESM(require("clsx"), 1);
1396
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1397
+ var Paragraph = (_a) => {
1398
+ var _b = _a, {
1399
+ className,
1400
+ color,
1401
+ padded,
1402
+ align = "left",
1403
+ tall,
1404
+ addOverflow,
1405
+ children,
1406
+ as = "p"
1407
+ } = _b, props = __objRest(_b, [
1408
+ "className",
1409
+ "color",
1410
+ "padded",
1411
+ "align",
1412
+ "tall",
1413
+ "addOverflow",
1414
+ "children",
1415
+ "as"
1416
+ ]);
1417
+ const Element = as;
1418
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1419
+ Element,
1420
+ __spreadProps(__spreadValues({}, props), {
1421
+ className: (0, import_clsx6.default)(
1422
+ typography.paragraph,
1423
+ className,
1424
+ padded && componentPaddingXUsingComponentGap,
1425
+ align === "left" && "text-left",
1426
+ align === "center" && "text-center",
1427
+ align === "right" && "text-right",
1428
+ tall && "!leading-6",
1429
+ addOverflow && "whitespace-nowrap text-ellipsis overflow-hidden"
1430
+ ),
1431
+ style: __spreadProps(__spreadValues({}, props.style), {
1432
+ color: color ? `var(--color-${color})` : void 0
1433
+ }),
1434
+ children
1435
+ })
1436
+ );
1437
+ };
1438
+ Paragraph.displayName = "Paragraph";
1439
+
1440
+ // src/components/MenuOption.tsx
1441
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1442
+ var MenuOption = ({
1443
+ children,
1444
+ disabled = false,
1445
+ variant = "normal",
1446
+ value,
1447
+ before,
1448
+ after,
1449
+ subMenu,
1450
+ onClick,
1451
+ selected,
1452
+ ref,
1453
+ onSubMenuHover,
1454
+ onSubMenuLeave,
1455
+ onSubMenuEnter,
1456
+ toggleMenu,
1457
+ subMenuLevel = 1,
1458
+ currentSubMenuLevel,
1459
+ closeSubMenuLevel,
1460
+ activeMenu,
1461
+ mobilePositionTo,
1462
+ highlightMatchingText = false,
1463
+ menuValue
1464
+ }) => {
1465
+ const uniqueId = (0, import_react7.useId)();
1466
+ const internalRef = (0, import_react7.useRef)(null);
1467
+ const actualRef = ref || internalRef;
1468
+ const menuId = (0, import_react7.useRef)(`menu-${uniqueId}`);
1469
+ const isMobile = useMatchesMobile();
1470
+ const handleMouseEnter = () => {
1471
+ if (subMenu && onSubMenuHover && !disabled) {
1472
+ onSubMenuHover(menuId.current, subMenuLevel);
1473
+ }
1474
+ };
1475
+ const handleMouseLeave = () => {
1476
+ if (subMenu && onSubMenuLeave && !disabled) {
1477
+ onSubMenuLeave(subMenuLevel);
1478
+ }
1479
+ };
1480
+ const handleSubMenuEnter = () => {
1481
+ if (onSubMenuEnter) {
1482
+ onSubMenuEnter();
1483
+ }
1484
+ };
1485
+ const additionalAttributes = {
1486
+ "data-selected": selected || null
1487
+ };
1488
+ const svgStyles = (0, import_clsx7.default)(
1489
+ "[&>svg]:shrink-0 [&>svg]:fill-icon-action-primary-normal"
1490
+ );
1491
+ const textLabelStyles = (0, import_clsx7.default)("w-full whitespace-nowrap !leading-6");
1492
+ const normalStyles = variant === "normal" && !disabled && (0, import_clsx7.default)(
1493
+ "bg-transparent text-text-primary-normal",
1494
+ "hover:bg-background-action-secondary-hover",
1495
+ "focus:bg-background-action-secondary-hover",
1496
+ "data-selected:bg-background-action-secondary-hover",
1497
+ "active:bg-background-action-secondary-active"
1498
+ );
1499
+ const normalDisabledStyles = variant === "normal" && disabled && (0, import_clsx7.default)("text-text-primary-disabled");
1500
+ const actionStyles = variant === "action" && !disabled && (0, import_clsx7.default)(
1501
+ "text-action-400 bg-transparent",
1502
+ "hover:bg-background-action-secondary-hover hover:text-text-action-hover",
1503
+ "focus:bg-background-action-secondary-hover focus:text-text-action-hover",
1504
+ "data-selected:bg-background-action-secondary-active data-selected:text-text-action-active",
1505
+ "active:bg-background-action-secondary-active active:text-text-action-active"
1506
+ );
1507
+ const actionDisabledStyles = variant === "action" && disabled && (0, import_clsx7.default)("text-text-action-disabled");
1508
+ const disabledStyles = disabled && (0, import_clsx7.default)("bg-transparent cursor-default pointer-events-none");
1509
+ const renderChildren = typeof children === "string" && highlightMatchingText ? highlightMatch(children, menuValue) : children;
1510
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1511
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1512
+ "div",
1513
+ __spreadProps(__spreadValues({
1514
+ ref: actualRef,
1515
+ className: (0, import_clsx7.default)(
1516
+ "flex items-center cursor-pointer w-full text-left relative outline-none",
1517
+ svgStyles,
1518
+ componentGap,
1519
+ componentPadding,
1520
+ baseTransition,
1521
+ normalStyles,
1522
+ normalDisabledStyles,
1523
+ actionStyles,
1524
+ actionDisabledStyles,
1525
+ disabledStyles
1526
+ ),
1527
+ "data-value": value || children,
1528
+ onClick: () => {
1529
+ onClick == null ? void 0 : onClick(menuId.current, value || children);
1530
+ if (subMenu) {
1531
+ toggleMenu(menuId.current, subMenuLevel);
1532
+ }
1533
+ },
1534
+ onMouseEnter: handleMouseEnter,
1535
+ onMouseLeave: handleMouseLeave
1536
+ }, additionalAttributes), {
1537
+ tabIndex: -1,
1538
+ role: "menuitem",
1539
+ "aria-haspopup": subMenu ? "menu" : void 0,
1540
+ children: [
1541
+ before && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "shrink-0 flex items-center", children: before }),
1542
+ variant === "action" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Label, { padded: true, className: textLabelStyles, children: renderChildren }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Paragraph, { padded: true, className: textLabelStyles, children: renderChildren }),
1543
+ renderAfterProp()
1544
+ ]
1545
+ })
1546
+ ),
1547
+ subMenu && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1548
+ "div",
1549
+ {
1550
+ onMouseEnter: handleSubMenuEnter,
1551
+ onMouseLeave: handleMouseLeave,
1552
+ "data-submenu-parent": menuId.current,
1553
+ "data-menu-level": subMenuLevel + 1,
1554
+ children: subMenu({ menuId: menuId.current, positionTo: actualRef, mobilePositionTo, position: "right", subMenuLevel, mobileBackMenuOption, mobileHide: isMobile && activeMenu !== menuId.current })
1555
+ }
1556
+ )
1557
+ ] });
1558
+ function renderAfterProp() {
1559
+ if (after) {
1560
+ return after;
1561
+ }
1562
+ if (subMenu && after !== null) {
1563
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron_right" });
1564
+ }
1565
+ }
1566
+ function mobileBackMenuOption() {
1567
+ if (!isMobile) {
1568
+ return;
1569
+ }
1570
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1571
+ MenuOption,
1572
+ {
1573
+ onClick: () => {
1574
+ closeSubMenuLevel == null ? void 0 : closeSubMenuLevel(currentSubMenuLevel != null ? currentSubMenuLevel : 0);
1575
+ },
1576
+ variant: "action",
1577
+ before: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { name: "chevron_left" }),
1578
+ children: "Back"
1579
+ }
1580
+ );
1581
+ }
1582
+ };
1583
+ MenuOption.displayName = "MenuOption";
1584
+ function highlightMatch(text, searchValue) {
1585
+ if (!searchValue || !searchValue.trim()) {
1586
+ return text;
1587
+ }
1588
+ const regex = new RegExp(`(${searchValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
1589
+ const parts = text.split(regex);
1590
+ return parts.map(
1591
+ (part, index) => regex.test(part) ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-bold", children: part }, index) : part
1592
+ );
1593
+ }
1594
+
1595
+ // src/components/DataGridCell.tsx
1596
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1597
+ var DataGridCell = (0, import_react8.memo)(
1598
+ (_a) => {
1599
+ var _b = _a, {
1600
+ type = "default",
1601
+ component = "static",
1602
+ children,
1603
+ className,
1604
+ locked = false,
1605
+ noPadding = false,
1606
+ paddedLeft = false,
1607
+ style,
1608
+ onClick,
1609
+ onRightClick,
1610
+ error,
1611
+ warning,
1612
+ center,
1613
+ width
1614
+ } = _b, props = __objRest(_b, [
1615
+ "type",
1616
+ "component",
1617
+ "children",
1618
+ "className",
1619
+ "locked",
1620
+ "noPadding",
1621
+ "paddedLeft",
1622
+ "style",
1623
+ "onClick",
1624
+ "onRightClick",
1625
+ "error",
1626
+ "warning",
1627
+ "center",
1628
+ "width"
1629
+ ]);
1630
+ const Element = type === "header" ? "th" : "td";
1631
+ const timerRef = (0, import_react8.useRef)(null);
1632
+ const [isGrabbing, setIsGrabbing] = (0, import_react8.useState)(false);
1633
+ const [isPointerPressed, setIsPointerPressed] = (0, import_react8.useState)(false);
1634
+ (0, import_react8.useEffect)(() => {
1635
+ return () => {
1636
+ if (timerRef.current) {
1637
+ clearTimeout(timerRef.current);
1638
+ timerRef.current = null;
1639
+ }
1640
+ };
1641
+ }, []);
1642
+ const handlePointerDown = (_event) => {
1643
+ setIsPointerPressed(true);
1644
+ timerRef.current = window.setTimeout(() => {
1645
+ setIsGrabbing(true);
1646
+ }, 500);
1647
+ };
1648
+ const handlePointerUp = (event) => {
1649
+ if (timerRef.current) {
1650
+ clearTimeout(timerRef.current);
1651
+ timerRef.current = null;
1652
+ }
1653
+ const rightClick = event.nativeEvent instanceof MouseEvent && event.nativeEvent.button === 2;
1654
+ if (!isGrabbing && onClick && !rightClick && isPointerPressed) {
1655
+ onClick(event);
1656
+ }
1657
+ if (rightClick && onRightClick) {
1658
+ onRightClick();
1659
+ }
1660
+ setIsGrabbing(false);
1661
+ setIsPointerPressed(false);
1662
+ };
1663
+ const handlePointerLeave = () => {
1664
+ if (timerRef.current) {
1665
+ clearTimeout(timerRef.current);
1666
+ timerRef.current = null;
1667
+ }
1668
+ };
1669
+ const headerBgStyles = type === "header" && !locked && !["button"].includes(component) && "bg-brand-400 border-brand-200";
1670
+ const lockedHeaderBgStyles = locked && !["button"].includes(component) && "bg-neutral-400 border-neutral-300";
1671
+ const headerTypeStyles = type === "header" && component !== "button" && component !== "icon" && (0, import_clsx8.default)("border-r");
1672
+ const buttonComponentStyles = component === "button" && (0, import_clsx8.default)("border-r border-b border-border-primary-normal");
1673
+ const iconComponentStyles = component === "icon" && (0, import_clsx8.default)("border-l");
1674
+ const cellClasses = (0, import_clsx8.default)(
1675
+ headerTypeStyles,
1676
+ buttonComponentStyles,
1677
+ headerBgStyles,
1678
+ lockedHeaderBgStyles,
1679
+ iconComponentStyles,
1680
+ className,
1681
+ "flex flex-1 items-center gap-1 whitespace-nowrap min-w-full max-h-10 relative text-text-primary-normal",
1682
+ "focus-within:!z-10",
1683
+ component === "input" && "border",
1684
+ component === "input" && !error && !warning && "border-border-primary-normal",
1685
+ component === "input" && error && "border-border-primary-error",
1686
+ component === "input" && warning && "border-background-warning-normal",
1687
+ !["button", "icon"].includes(component) && !noPadding && "p-2",
1688
+ paddedLeft && "pl-2",
1689
+ component === "icon" && "border-l",
1690
+ isGrabbing && "!cursor-grabbing",
1691
+ component === "checkbox" || center && "justify-center"
1692
+ );
1693
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1694
+ Element,
1695
+ __spreadProps(__spreadValues({
1696
+ className: (0, import_clsx8.default)("flex", !width && "flex-1"),
1697
+ style: { width }
1698
+ }, props), {
1699
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1700
+ "div",
1701
+ {
1702
+ className: cellClasses,
1703
+ style: __spreadValues({}, style),
1704
+ onMouseDown: handlePointerDown,
1705
+ onMouseUp: handlePointerUp,
1706
+ onMouseLeave: handlePointerLeave,
1707
+ onTouchStart: handlePointerDown,
1708
+ onTouchEnd: handlePointerUp,
1709
+ onTouchCancel: handlePointerLeave,
1710
+ onContextMenu: (e) => e.preventDefault(),
1711
+ children
1712
+ }
1713
+ )
1714
+ })
1715
+ );
1716
+ }
1717
+ );
1718
+ DataGridCell.displayName = "DataGridCell";
1719
+ function DraggableCellHeader(_a) {
1720
+ var _b = _a, {
1721
+ header,
1722
+ children,
1723
+ locked = false
1724
+ } = _b, props = __objRest(_b, [
1725
+ "header",
1726
+ "children",
1727
+ "locked"
1728
+ ]);
1729
+ var _a2;
1730
+ const { attributes, isDragging, listeners, setNodeRef, transform, node } = (0, import_sortable.useSortable)({
1731
+ id: header.column.id
1732
+ });
1733
+ const [showMenu, setShowMenu] = (0, import_react8.useState)(false);
1734
+ const [filter, setFilter] = (0, import_react8.useState)(
1735
+ (_a2 = header.column.getFilterValue()) != null ? _a2 : ""
1736
+ );
1737
+ const {
1738
+ menuRootRef,
1739
+ isMenuActive,
1740
+ registerSubMenu,
1741
+ listeners: subMenuListeners,
1742
+ mobileHide
1743
+ } = useSubMenuSystem(node);
1744
+ (0, import_react8.useEffect)(() => {
1745
+ const handler = setTimeout(() => {
1746
+ header.column.setFilterValue(filter);
1747
+ }, 500);
1748
+ return () => {
1749
+ clearTimeout(handler);
1750
+ };
1751
+ }, [filter]);
1752
+ const style = {
1753
+ opacity: isDragging ? 0.8 : 1,
1754
+ position: "relative",
1755
+ transform: CSS.Translate.toString(transform),
1756
+ transition: "width transform 0.2s ease-in-out",
1757
+ whiteSpace: "nowrap",
1758
+ width: header.column.getSize(),
1759
+ zIndex: isDragging ? 1 : 0,
1760
+ "--color-text-primary-normal": "var(--color-neutral-000)"
1761
+ };
1762
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1763
+ DataGridCell,
1764
+ __spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({
1765
+ locked,
1766
+ type: "header",
1767
+ component: "header",
1768
+ ref: setNodeRef,
1769
+ colSpan: header.colSpan,
1770
+ style
1771
+ }, props), {
1772
+ onClick: header.column.getToggleSortingHandler(),
1773
+ onRightClick: () => setShowMenu(!showMenu)
1774
+ }), locked ? {} : attributes), locked ? {} : listeners), {
1775
+ children: [
1776
+ children,
1777
+ header.column.getCanFilter() && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1778
+ Menu,
1779
+ {
1780
+ ref: menuRootRef,
1781
+ positionTo: node,
1782
+ show: showMenu,
1783
+ setShow: setShowMenu,
1784
+ mobileHide,
1785
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1786
+ MenuOption,
1787
+ __spreadProps(__spreadValues({}, subMenuListeners), {
1788
+ subMenu: (_b2) => {
1789
+ var _c = _b2, { menuId, subMenuLevel } = _c, props2 = __objRest(_c, ["menuId", "subMenuLevel"]);
1790
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1791
+ Menu,
1792
+ __spreadProps(__spreadValues({}, props2), {
1793
+ show: isMenuActive(menuId, subMenuLevel),
1794
+ ref: (el) => {
1795
+ registerSubMenu(menuId, el);
1796
+ },
1797
+ children: [
1798
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: (0, import_clsx8.default)(paddingUsingComponentGap), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1799
+ Search,
1800
+ {
1801
+ onChange: (event) => {
1802
+ setFilter(event.target.value);
1803
+ },
1804
+ onKeyDown: (event) => {
1805
+ if ([" ", "Space"].includes(event.key)) {
1806
+ event.stopPropagation();
1807
+ }
1808
+ },
1809
+ value: filter != null ? filter : ""
1810
+ }
1811
+ ) }),
1812
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1813
+ MenuOption,
1814
+ {
1815
+ onClick: handleFilterFnChange,
1816
+ before: menuOptionIcon("includesString"),
1817
+ children: "Contains"
1818
+ }
1819
+ ),
1820
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1821
+ MenuOption,
1822
+ {
1823
+ onClick: handleFilterFnChange,
1824
+ before: menuOptionIcon("startsWith"),
1825
+ children: "Starts with"
1826
+ }
1827
+ ),
1828
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1829
+ MenuOption,
1830
+ {
1831
+ onClick: handleFilterFnChange,
1832
+ before: menuOptionIcon("endsWith"),
1833
+ children: "Ends with"
1834
+ }
1835
+ )
1836
+ ]
1837
+ })
1838
+ );
1839
+ },
1840
+ children: "Filter"
1841
+ })
1842
+ )
1843
+ }
1844
+ )
1845
+ ]
1846
+ })
1847
+ );
1848
+ function menuOptionIcon(value) {
1849
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1850
+ Icon,
1851
+ {
1852
+ name: "check",
1853
+ className: (0, import_clsx8.default)(
1854
+ header.column.columnDef.filterFn !== value && "text-transparent"
1855
+ )
1856
+ }
1857
+ );
1858
+ }
1859
+ function handleFilterFnChange(_id, value) {
1860
+ var _a3;
1861
+ let filterFn = "includesString";
1862
+ const currentFilterFn = header.column.columnDef.filterFn;
1863
+ if ((value == null ? void 0 : value.toLowerCase()) === "starts with") {
1864
+ filterFn = currentFilterFn === "startsWith" ? "auto" : "startsWith";
1865
+ }
1866
+ if ((value == null ? void 0 : value.toLowerCase()) === "ends with") {
1867
+ filterFn = currentFilterFn === "endsWith" ? "auto" : "endsWith";
1868
+ }
1869
+ if ((value == null ? void 0 : value.toLowerCase()) === "contains") {
1870
+ filterFn = currentFilterFn === "includesString" ? "auto" : "includesString";
1871
+ }
1872
+ header.column.columnDef.filterFn = filterFn;
1873
+ header.column.setFilterValue((_a3 = header.column.getFilterValue()) != null ? _a3 : "");
1874
+ }
1875
+ }
1876
+ DraggableCellHeader.displayName = "DraggableCellHeader";
1877
+ function DragAlongCell(_a) {
1878
+ var _b = _a, {
1879
+ cell,
1880
+ children
1881
+ } = _b, props = __objRest(_b, [
1882
+ "cell",
1883
+ "children"
1884
+ ]);
1885
+ const { isDragging, setNodeRef, transform } = (0, import_sortable.useSortable)({
1886
+ id: cell.column.id
1887
+ });
1888
+ const style = {
1889
+ opacity: isDragging ? 0.8 : 1,
1890
+ position: "relative",
1891
+ transform: CSS.Translate.toString(transform),
1892
+ transition: "width transform 0.2s ease-in-out",
1893
+ zIndex: isDragging ? 1 : 0,
1894
+ width: cell.column.getSize(),
1895
+ minWidth: "min-content"
1896
+ };
1897
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DataGridCell, __spreadProps(__spreadValues({ style, ref: setNodeRef }, props), { children }));
1898
+ }
1899
+ DragAlongCell.displayName = "DragAlongCell";
1900
+ // Annotate the CommonJS export names for ESM import in node:
1901
+ 0 && (module.exports = {
1902
+ DataGridCell,
1903
+ DragAlongCell,
1904
+ DraggableCellHeader
1905
+ });