asta-ui 0.9.3 → 0.9.5

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 (448) hide show
  1. package/css/asta.css +2 -2
  2. package/css/asta.js +248 -1
  3. package/css/components.css +722 -44
  4. package/css/runtime/core.css +5 -5
  5. package/css/runtime/data.css +2 -2
  6. package/css/runtime/modules.css +49 -0
  7. package/css/runtime/modules.js +245 -0
  8. package/css/runtime/overlays.css +22 -9
  9. package/css/src/blocks.css +3 -3
  10. package/css/src/core.css +8 -8
  11. package/css/src/data.css +3 -3
  12. package/css/src/display.css +6 -5
  13. package/css/src/forms.css +6 -6
  14. package/css/src/modules.css +616 -0
  15. package/css/src/overlays.css +3 -3
  16. package/css/tokens.css +6 -2
  17. package/dist/ai-chat.js +1 -1
  18. package/dist/avatar-group.js +2 -2
  19. package/dist/avatar.js +1 -1
  20. package/dist/base/ai-chat.js +1 -1
  21. package/dist/base/avatar-group.js +2 -2
  22. package/dist/base/avatar.js +1 -1
  23. package/dist/base/billing.d.ts +2 -0
  24. package/dist/base/billing.js +11 -0
  25. package/dist/base/bubble-wrap.js +1 -1
  26. package/dist/base/candlestick.js +1 -1
  27. package/dist/base/card-checkout.js +1 -1
  28. package/dist/base/chart-card.d.ts +2 -0
  29. package/dist/base/chart-card.js +11 -0
  30. package/dist/base/chat-thread.js +1 -1
  31. package/dist/base/checkbox.js +1 -1
  32. package/dist/base/checkout.js +3 -3
  33. package/dist/base/color-picker.js +1 -1
  34. package/dist/base/combo-lock.js +1 -1
  35. package/dist/base/combobox-aui-046.js +1 -1
  36. package/dist/base/combobox-aui-047.js +1 -1
  37. package/dist/base/combobox.js +1 -1
  38. package/dist/base/command-palette.js +1 -1
  39. package/dist/base/comments.js +2 -2
  40. package/dist/base/context-menu.js +1 -1
  41. package/dist/base/cookie-consent.d.ts +2 -0
  42. package/dist/base/cookie-consent.js +13 -0
  43. package/dist/base/countdown.d.ts +2 -0
  44. package/dist/base/countdown.js +9 -0
  45. package/dist/base/data-table.js +1 -1
  46. package/dist/base/dialog.js +1 -1
  47. package/dist/base/dropdown-menu.js +1 -1
  48. package/dist/base/field.js +1 -1
  49. package/dist/base/file-manager.d.ts +2 -0
  50. package/dist/base/file-manager.js +19 -0
  51. package/dist/base/flash-sale.d.ts +2 -0
  52. package/dist/base/flash-sale.js +7 -0
  53. package/dist/base/footer-aui-027.js +1 -1
  54. package/dist/base/footer-aui-028.js +1 -1
  55. package/dist/base/footer.js +1 -1
  56. package/dist/base/hover-card.js +1 -1
  57. package/dist/base/inbox.d.ts +2 -0
  58. package/dist/base/inbox.js +11 -0
  59. package/dist/base/inline-edit.js +1 -1
  60. package/dist/base/input-aui-029.js +1 -1
  61. package/dist/base/input-aui-030.js +1 -1
  62. package/dist/base/input-aui-031.js +1 -1
  63. package/dist/base/input-aui-032.js +1 -1
  64. package/dist/base/input-aui-033.js +1 -1
  65. package/dist/base/input-aui-034.js +1 -1
  66. package/dist/base/input.js +1 -1
  67. package/dist/base/invoice.d.ts +2 -0
  68. package/dist/base/invoice.js +10 -0
  69. package/dist/base/kanban.js +2 -2
  70. package/dist/base/menubar.d.ts +2 -0
  71. package/dist/base/menubar.js +9 -0
  72. package/dist/base/meter.d.ts +2 -0
  73. package/dist/base/meter.js +9 -0
  74. package/dist/base/morse-tap.js +1 -1
  75. package/dist/base/navbar-aui-009.js +1 -1
  76. package/dist/base/navbar-aui-011.js +1 -1
  77. package/dist/base/navbar-aui-012.js +1 -1
  78. package/dist/base/navbar-aui-013.js +1 -1
  79. package/dist/base/navbar.js +1 -1
  80. package/dist/base/notification-center.js +3 -3
  81. package/dist/base/number-input.js +1 -1
  82. package/dist/base/order-book.js +1 -1
  83. package/dist/base/otp-input-aui-041.js +1 -1
  84. package/dist/base/otp-input-aui-042.js +1 -1
  85. package/dist/base/otp-input.js +1 -1
  86. package/dist/base/password-input-aui-039.js +1 -1
  87. package/dist/base/password-input-aui-040.js +1 -1
  88. package/dist/base/password-input.js +1 -1
  89. package/dist/base/payment-received.js +1 -1
  90. package/dist/base/phone-input.d.ts +2 -0
  91. package/dist/base/phone-input.js +13 -0
  92. package/dist/base/popover.js +1 -1
  93. package/dist/base/price-alert.d.ts +2 -0
  94. package/dist/base/price-alert.js +7 -0
  95. package/dist/base/price-chart.js +1 -1
  96. package/dist/base/properties-panel.js +1 -1
  97. package/dist/base/radio-group.js +1 -1
  98. package/dist/base/select-aui-045.js +1 -1
  99. package/dist/base/select.js +1 -1
  100. package/dist/base/settings-panel.js +1 -1
  101. package/dist/base/shipment-tracker.js +1 -1
  102. package/dist/base/sidebar.js +2 -2
  103. package/dist/base/sign-in-aui-015.js +1 -1
  104. package/dist/base/sign-in-aui-016.js +1 -1
  105. package/dist/base/sign-in-aui-017.js +1 -1
  106. package/dist/base/sign-in-aui-018.js +1 -1
  107. package/dist/base/sign-in-aui-019.js +1 -1
  108. package/dist/base/sign-in-aui-020.js +1 -1
  109. package/dist/base/sign-in.js +1 -1
  110. package/dist/base/snap-grid.js +1 -1
  111. package/dist/base/sortable-list.d.ts +2 -0
  112. package/dist/base/sortable-list.js +9 -0
  113. package/dist/base/split-bill.d.ts +2 -0
  114. package/dist/base/split-bill.js +7 -0
  115. package/dist/base/stat-card.js +1 -1
  116. package/dist/base/tag-input-aui-048.js +1 -1
  117. package/dist/base/tag-input-aui-049.js +1 -1
  118. package/dist/base/tag-input.js +1 -1
  119. package/dist/base/team-members.js +3 -3
  120. package/dist/base/testimonials.d.ts +2 -0
  121. package/dist/base/testimonials.js +10 -0
  122. package/dist/base/textarea-aui-001.js +1 -1
  123. package/dist/base/textarea-aui-002.js +1 -1
  124. package/dist/base/textarea-aui-003.js +1 -1
  125. package/dist/base/textarea-aui-004.js +1 -1
  126. package/dist/base/textarea-aui-005.js +1 -1
  127. package/dist/base/textarea-aui-006.js +1 -1
  128. package/dist/base/textarea-aui-007.js +1 -1
  129. package/dist/base/textarea-aui-008.js +1 -1
  130. package/dist/base/textarea-aui-035.js +1 -1
  131. package/dist/base/textarea-aui-036.js +1 -1
  132. package/dist/base/textarea-aui-037.js +1 -1
  133. package/dist/base/textarea-aui-038.js +1 -1
  134. package/dist/base/textarea.js +1 -1
  135. package/dist/base/token-swap.js +1 -1
  136. package/dist/base/tooltip.js +1 -1
  137. package/dist/base/trade-ticket.js +1 -1
  138. package/dist/base/watchlist.d.ts +2 -0
  139. package/dist/base/watchlist.js +7 -0
  140. package/dist/base.js +166 -90
  141. package/dist/billing.d.ts +2 -0
  142. package/dist/billing.js +11 -0
  143. package/dist/bubble-wrap.js +1 -1
  144. package/dist/candlestick.js +1 -1
  145. package/dist/card-checkout.js +1 -1
  146. package/dist/chart-card.d.ts +2 -0
  147. package/dist/chart-card.js +11 -0
  148. package/dist/chat-thread.js +1 -1
  149. package/dist/checkbox.js +1 -1
  150. package/dist/checkout.js +3 -3
  151. package/dist/{chunk-7TK42PS3.js → chunk-25RCKHWV.js} +19 -4
  152. package/dist/{chunk-4L4EKC46.js → chunk-2EBWWZPS.js} +1 -1
  153. package/dist/chunk-2F5CE6ZB.js +269 -0
  154. package/dist/{chunk-SATIWCJQ.js → chunk-2LM3VHNO.js} +3 -2
  155. package/dist/{chunk-5VQV2I7C.js → chunk-2PPF4GK5.js} +9 -6
  156. package/dist/{chunk-ZRGPSYW6.js → chunk-2PQIPQGO.js} +10 -6
  157. package/dist/{chunk-HB7DFNZP.js → chunk-3PQTSFOS.js} +1 -1
  158. package/dist/{chunk-VPZP6TCT.js → chunk-3UQIYJTI.js} +7 -3
  159. package/dist/{chunk-FY6BRODJ.js → chunk-3ZFF6VC5.js} +4 -2
  160. package/dist/{chunk-V3SPSN3A.js → chunk-45KDL3JM.js} +1 -1
  161. package/dist/{chunk-EVSTTLOT.js → chunk-4SLC3EK6.js} +18 -4
  162. package/dist/{chunk-VWYHP4SB.js → chunk-4WCMPLE3.js} +13 -4
  163. package/dist/chunk-5DLY6FGD.js +160 -0
  164. package/dist/{chunk-SRGDJSW7.js → chunk-5GGS6VP5.js} +1 -0
  165. package/dist/chunk-5N2G462S.js +338 -0
  166. package/dist/{chunk-FKHNK5VC.js → chunk-6C52ZQRB.js} +2 -1
  167. package/dist/{chunk-VVAL2JZJ.js → chunk-6MPEI6V5.js} +2 -2
  168. package/dist/{chunk-HNO6EUGJ.js → chunk-6RA7LJ3K.js} +7 -1
  169. package/dist/{chunk-RRHQBGRO.js → chunk-77RFV2MG.js} +7 -2
  170. package/dist/{chunk-RIWKIBEP.js → chunk-7MBTBYTJ.js} +3 -3
  171. package/dist/{chunk-XIU7K2YE.js → chunk-ADZI4ROA.js} +1 -1
  172. package/dist/{chunk-SAJ4D3Z2.js → chunk-AMVX4DDT.js} +7 -3
  173. package/dist/{chunk-7JNO265Q.js → chunk-B4XRAVHL.js} +33 -17
  174. package/dist/{chunk-MDI73RL6.js → chunk-B7MVYR7C.js} +7 -4
  175. package/dist/{chunk-OFPZUTBI.js → chunk-BEV2X4YL.js} +2 -1
  176. package/dist/chunk-BG2W2KVE.js +200 -0
  177. package/dist/chunk-BKHH2CJA.js +146 -0
  178. package/dist/{chunk-XRVVZA2Y.js → chunk-CACW5LH3.js} +1 -1
  179. package/dist/{chunk-I2WXKWTQ.js → chunk-CBJUY4WE.js} +10 -5
  180. package/dist/{chunk-746WX2DF.js → chunk-CSTI5CTF.js} +8 -2
  181. package/dist/{chunk-3KS5EN3Q.js → chunk-D2JJSUXI.js} +1 -1
  182. package/dist/chunk-D4AYULMF.js +338 -0
  183. package/dist/{chunk-4XM6DKEO.js → chunk-DD2TBHSJ.js} +2 -1
  184. package/dist/{chunk-B5OESWCR.js → chunk-DPLH3EGO.js} +1 -1
  185. package/dist/{chunk-5TSQZY34.js → chunk-DU3CZ3K7.js} +1 -1
  186. package/dist/{chunk-YON5SU2G.js → chunk-DWA62IYV.js} +5 -2
  187. package/dist/{chunk-FUNXYRSG.js → chunk-DWZT455C.js} +24 -9
  188. package/dist/{chunk-WSTQ6WZO.js → chunk-ECGJ6D5D.js} +3 -2
  189. package/dist/{chunk-3JNUC3FU.js → chunk-EN6XBXW5.js} +1 -1
  190. package/dist/{chunk-GJ3R6IZL.js → chunk-EOZDJA7Z.js} +1 -1
  191. package/dist/{chunk-KXWC2UHE.js → chunk-FBIGYEFN.js} +6 -3
  192. package/dist/{chunk-RS3XHHDE.js → chunk-FDE3S2YK.js} +1 -1
  193. package/dist/{chunk-DRX3KRNL.js → chunk-FFRJW5O7.js} +3 -2
  194. package/dist/{chunk-UEOEWP7L.js → chunk-FIPWA5KL.js} +3 -2
  195. package/dist/chunk-FLCT7THQ.js +75 -0
  196. package/dist/{chunk-RTAHGY6P.js → chunk-FOJRZASV.js} +7 -1
  197. package/dist/{chunk-CA7YQ5BJ.js → chunk-FQ4YUKAE.js} +3 -3
  198. package/dist/{chunk-33N6SZB5.js → chunk-FXXR3FM3.js} +6 -3
  199. package/dist/{chunk-BGVAXPHD.js → chunk-G7WTEBMX.js} +21 -6
  200. package/dist/{chunk-HPVPHWDM.js → chunk-IATF2OTU.js} +1 -1
  201. package/dist/{chunk-CLCP2GFW.js → chunk-IDXERBKL.js} +3 -3
  202. package/dist/{chunk-NB7X26PY.js → chunk-IF6CWIUB.js} +1 -1
  203. package/dist/{chunk-WVIV4JBH.js → chunk-ITGWD7ZY.js} +2 -2
  204. package/dist/{chunk-2LZM435Z.js → chunk-IVCHYE55.js} +7 -1
  205. package/dist/{chunk-BH2DLHFW.js → chunk-JE2MAZGR.js} +3 -2
  206. package/dist/{chunk-W57O4RLL.js → chunk-JF4BKHFK.js} +37 -9
  207. package/dist/{chunk-QDRBMWRX.js → chunk-JLCSRNI2.js} +7 -3
  208. package/dist/{chunk-7L4YE6HM.js → chunk-JNNMKFEQ.js} +1 -1
  209. package/dist/{chunk-GDTSCUHY.js → chunk-JRD6FENH.js} +1 -1
  210. package/dist/{chunk-F5I6EK7F.js → chunk-JSS4QASL.js} +1 -1
  211. package/dist/{chunk-B5F775GP.js → chunk-JWBGI7FN.js} +1 -1
  212. package/dist/{chunk-WTNNS7AX.js → chunk-JX7V6EFT.js} +36 -9
  213. package/dist/{chunk-7SNVRPED.js → chunk-KEMC4RIF.js} +2 -1
  214. package/dist/chunk-KVARQNGF.js +123 -0
  215. package/dist/chunk-LDTCIVDX.js +146 -0
  216. package/dist/{chunk-45VUWOHQ.js → chunk-LKRE4HLZ.js} +4 -2
  217. package/dist/{chunk-ZN3W5PAI.js → chunk-LOHFV5JF.js} +1 -1
  218. package/dist/chunk-LS6CFF6X.js +80 -0
  219. package/dist/{chunk-I5NZSWDW.js → chunk-MAKFUH34.js} +33 -17
  220. package/dist/{chunk-OQU6KGVR.js → chunk-MDB4RFMV.js} +1 -1
  221. package/dist/{chunk-FDHU3RWR.js → chunk-MJJU6OLM.js} +1 -1
  222. package/dist/{chunk-PIC5ZIR3.js → chunk-MPH64VG7.js} +1 -1
  223. package/dist/{chunk-AYSC7AIC.js → chunk-MVE7RJJ6.js} +1 -1
  224. package/dist/{chunk-2SQQFICY.js → chunk-N3X4T5OR.js} +25 -8
  225. package/dist/{chunk-CNY76NHF.js → chunk-NFJDL44V.js} +7 -3
  226. package/dist/{chunk-FJGGXXTT.js → chunk-NPVUFQGC.js} +1 -1
  227. package/dist/{chunk-QSLS3ENY.js → chunk-NVLYF4UL.js} +1 -1
  228. package/dist/chunk-O626XQW2.js +165 -0
  229. package/dist/chunk-OH5VAD27.js +224 -0
  230. package/dist/{chunk-TIAKMX7U.js → chunk-OIOZQP2H.js} +1 -1
  231. package/dist/{chunk-56BEMYK3.js → chunk-OU3EEX4Y.js} +1 -1
  232. package/dist/{chunk-6AZKJUL4.js → chunk-OUIOJROO.js} +1 -1
  233. package/dist/{chunk-OLNMOTAD.js → chunk-PAXDHYBX.js} +18 -4
  234. package/dist/chunk-PIE76JKF.js +224 -0
  235. package/dist/{chunk-6B6NTRMC.js → chunk-PIXHOFUT.js} +7 -2
  236. package/dist/{chunk-FATLQKRY.js → chunk-PZ2ZUHC3.js} +3 -3
  237. package/dist/chunk-Q5A5OTLI.js +192 -0
  238. package/dist/{chunk-TXRLBMFL.js → chunk-QASSYLQQ.js} +3 -2
  239. package/dist/{chunk-TCID6NNE.js → chunk-QJXVIEB5.js} +1 -1
  240. package/dist/{chunk-K5PWBSVO.js → chunk-QWOO4V7N.js} +2 -2
  241. package/dist/chunk-RGVRHFKY.js +213 -0
  242. package/dist/{chunk-J6GK2V2C.js → chunk-RQNXELUL.js} +2 -1
  243. package/dist/{chunk-KQCXQY5K.js → chunk-RXOVKEYG.js} +2 -1
  244. package/dist/{chunk-NICNFGHT.js → chunk-S2VTHA6G.js} +2 -2
  245. package/dist/chunk-SCQ6A4ZG.js +247 -0
  246. package/dist/{chunk-EVCUN45S.js → chunk-SMZVKQKM.js} +3 -2
  247. package/dist/{chunk-GERWW3CA.js → chunk-SR4NYQWO.js} +2 -2
  248. package/dist/{chunk-DQWKBQBT.js → chunk-TAAAYFBT.js} +2 -2
  249. package/dist/{chunk-S2DJLW6B.js → chunk-TBMUSER2.js} +1 -1
  250. package/dist/chunk-TMOEFAXQ.js +165 -0
  251. package/dist/chunk-TXC6CCSA.js +75 -0
  252. package/dist/chunk-UC55XR76.js +193 -0
  253. package/dist/{chunk-5U4H2CXC.js → chunk-UJYZZSII.js} +11 -4
  254. package/dist/chunk-UOOGRGEC.js +185 -0
  255. package/dist/{chunk-ZBF2UYXP.js → chunk-USDST2TI.js} +1 -1
  256. package/dist/{chunk-W7RITVDV.js → chunk-UX6CWJT7.js} +1 -1
  257. package/dist/{chunk-U7BYEW3Y.js → chunk-UZF7SCRT.js} +13 -5
  258. package/dist/{chunk-Q7OHWQP2.js → chunk-V7JUJQNR.js} +1 -0
  259. package/dist/{chunk-WWQV7LE7.js → chunk-VNUX5LOC.js} +24 -9
  260. package/dist/{chunk-CTO36MY2.js → chunk-VS3GQ4JR.js} +2 -2
  261. package/dist/{chunk-UMDVPRJW.js → chunk-VTTXURIB.js} +1 -1
  262. package/dist/{chunk-6NNHSXFD.js → chunk-W2S6JDBM.js} +1 -1
  263. package/dist/{chunk-3XMVXIOF.js → chunk-W5M3EHJL.js} +4 -2
  264. package/dist/chunk-X2VID7XY.js +228 -0
  265. package/dist/{chunk-H7D6G3GQ.js → chunk-X4JYOCFA.js} +7 -1
  266. package/dist/{chunk-6VQTFRSP.js → chunk-XKA3LTJZ.js} +37 -9
  267. package/dist/{chunk-7GKCX4IE.js → chunk-XUZH4Y52.js} +1 -1
  268. package/dist/{chunk-UAP47MSR.js → chunk-Y4JOW2UW.js} +11 -5
  269. package/dist/{chunk-T4SOPNM5.js → chunk-YCXZ3TYF.js} +1 -1
  270. package/dist/{chunk-2KJNBHUV.js → chunk-YF3XSH54.js} +2 -1
  271. package/dist/{chunk-66OZ7CBK.js → chunk-YJAZHJY3.js} +1 -1
  272. package/dist/{chunk-4WK3F76T.js → chunk-YLILJ2FH.js} +1 -1
  273. package/dist/{chunk-FGQPCDXI.js → chunk-YNPG4WOS.js} +1 -1
  274. package/dist/chunk-YPFZXGPT.js +160 -0
  275. package/dist/{chunk-KYFZ5TTK.js → chunk-YRPLUNP4.js} +3 -1
  276. package/dist/{chunk-P3USWDWR.js → chunk-YVGC7QT7.js} +4 -2
  277. package/dist/{chunk-4ZJEAWNG.js → chunk-Z2DF2YL5.js} +4 -2
  278. package/dist/{chunk-JAQANAOP.js → chunk-ZUH7XRX7.js} +19 -4
  279. package/dist/{chunk-UWQ26LYZ.js → chunk-ZYI6J34Q.js} +2 -2
  280. package/dist/{chunk-BOJCW7Z7.js → chunk-ZZ25XSK2.js} +3 -2
  281. package/dist/color-picker.js +1 -1
  282. package/dist/combo-lock.js +1 -1
  283. package/dist/combobox-aui-046.js +1 -1
  284. package/dist/combobox-aui-047.js +1 -1
  285. package/dist/combobox.js +1 -1
  286. package/dist/command-palette.js +1 -1
  287. package/dist/comments.js +2 -2
  288. package/dist/context-menu.js +1 -1
  289. package/dist/cookie-consent.d.ts +2 -0
  290. package/dist/cookie-consent.js +13 -0
  291. package/dist/countdown.d.ts +2 -0
  292. package/dist/countdown.js +9 -0
  293. package/dist/data-table.js +1 -1
  294. package/dist/dialog.js +1 -1
  295. package/dist/dropdown-menu.js +1 -1
  296. package/dist/field.js +1 -1
  297. package/dist/file-manager.d.ts +2 -0
  298. package/dist/file-manager.js +19 -0
  299. package/dist/flash-sale.d.ts +2 -0
  300. package/dist/flash-sale.js +7 -0
  301. package/dist/footer-aui-027.js +1 -1
  302. package/dist/footer-aui-028.js +1 -1
  303. package/dist/footer.js +1 -1
  304. package/dist/hover-card.js +1 -1
  305. package/dist/inbox.d.ts +2 -0
  306. package/dist/inbox.js +11 -0
  307. package/dist/index.js +166 -90
  308. package/dist/inline-edit.js +1 -1
  309. package/dist/input-aui-029.js +1 -1
  310. package/dist/input-aui-030.js +1 -1
  311. package/dist/input-aui-031.js +1 -1
  312. package/dist/input-aui-032.js +1 -1
  313. package/dist/input-aui-033.js +1 -1
  314. package/dist/input-aui-034.js +1 -1
  315. package/dist/input.js +1 -1
  316. package/dist/invoice.d.ts +2 -0
  317. package/dist/invoice.js +10 -0
  318. package/dist/kanban.js +2 -2
  319. package/dist/menubar.d.ts +2 -0
  320. package/dist/menubar.js +9 -0
  321. package/dist/meter.d.ts +2 -0
  322. package/dist/meter.js +9 -0
  323. package/dist/morse-tap.js +1 -1
  324. package/dist/navbar-aui-009.js +1 -1
  325. package/dist/navbar-aui-011.js +1 -1
  326. package/dist/navbar-aui-012.js +1 -1
  327. package/dist/navbar-aui-013.js +1 -1
  328. package/dist/navbar.js +1 -1
  329. package/dist/notification-center.js +3 -3
  330. package/dist/number-input.js +1 -1
  331. package/dist/order-book.js +1 -1
  332. package/dist/otp-input-aui-041.js +1 -1
  333. package/dist/otp-input-aui-042.js +1 -1
  334. package/dist/otp-input.js +1 -1
  335. package/dist/password-input-aui-039.js +1 -1
  336. package/dist/password-input-aui-040.js +1 -1
  337. package/dist/password-input.js +1 -1
  338. package/dist/payment-received.js +1 -1
  339. package/dist/phone-input.d.ts +2 -0
  340. package/dist/phone-input.js +13 -0
  341. package/dist/popover.js +1 -1
  342. package/dist/price-alert.d.ts +2 -0
  343. package/dist/price-alert.js +7 -0
  344. package/dist/price-chart.js +1 -1
  345. package/dist/properties-panel.js +1 -1
  346. package/dist/radio-group.js +1 -1
  347. package/dist/select-aui-045.js +1 -1
  348. package/dist/select.js +1 -1
  349. package/dist/settings-panel.js +1 -1
  350. package/dist/shipment-tracker.js +1 -1
  351. package/dist/sidebar.js +2 -2
  352. package/dist/sign-in-aui-015.js +1 -1
  353. package/dist/sign-in-aui-016.js +1 -1
  354. package/dist/sign-in-aui-017.js +1 -1
  355. package/dist/sign-in-aui-018.js +1 -1
  356. package/dist/sign-in-aui-019.js +1 -1
  357. package/dist/sign-in-aui-020.js +1 -1
  358. package/dist/sign-in.js +1 -1
  359. package/dist/snap-grid.js +1 -1
  360. package/dist/sortable-list.d.ts +2 -0
  361. package/dist/sortable-list.js +9 -0
  362. package/dist/split-bill.d.ts +2 -0
  363. package/dist/split-bill.js +7 -0
  364. package/dist/stat-card.js +1 -1
  365. package/dist/styles.css +2 -2
  366. package/dist/tag-input-aui-048.js +1 -1
  367. package/dist/tag-input-aui-049.js +1 -1
  368. package/dist/tag-input.js +1 -1
  369. package/dist/team-members.js +3 -3
  370. package/dist/testimonials.d.ts +2 -0
  371. package/dist/testimonials.js +10 -0
  372. package/dist/textarea-aui-001.js +1 -1
  373. package/dist/textarea-aui-002.js +1 -1
  374. package/dist/textarea-aui-003.js +1 -1
  375. package/dist/textarea-aui-004.js +1 -1
  376. package/dist/textarea-aui-005.js +1 -1
  377. package/dist/textarea-aui-006.js +1 -1
  378. package/dist/textarea-aui-007.js +1 -1
  379. package/dist/textarea-aui-008.js +1 -1
  380. package/dist/textarea-aui-035.js +1 -1
  381. package/dist/textarea-aui-036.js +1 -1
  382. package/dist/textarea-aui-037.js +1 -1
  383. package/dist/textarea-aui-038.js +1 -1
  384. package/dist/textarea.js +1 -1
  385. package/dist/token-swap.js +1 -1
  386. package/dist/tooltip.js +1 -1
  387. package/dist/trade-ticket.js +1 -1
  388. package/dist/types/components/kit/base/billing.d.ts +53 -0
  389. package/dist/types/components/kit/base/cookie-consent.d.ts +37 -0
  390. package/dist/types/components/kit/base/file-manager.d.ts +41 -0
  391. package/dist/types/components/kit/base/inbox.d.ts +33 -0
  392. package/dist/types/components/kit/base/invoice.d.ts +45 -0
  393. package/dist/types/components/kit/base/testimonials.d.ts +25 -0
  394. package/dist/types/components/kit/billing.d.ts +53 -0
  395. package/dist/types/components/kit/chart-card.d.ts +43 -0
  396. package/dist/types/components/kit/cookie-consent.d.ts +37 -0
  397. package/dist/types/components/kit/countdown.d.ts +21 -0
  398. package/dist/types/components/kit/file-manager.d.ts +41 -0
  399. package/dist/types/components/kit/inbox.d.ts +33 -0
  400. package/dist/types/components/kit/invoice.d.ts +45 -0
  401. package/dist/types/components/kit/menubar.d.ts +41 -0
  402. package/dist/types/components/kit/meter.d.ts +32 -0
  403. package/dist/types/components/kit/number-input.d.ts +3 -1
  404. package/dist/types/components/kit/phone-input.d.ts +42 -0
  405. package/dist/types/components/kit/sortable-list.d.ts +25 -0
  406. package/dist/types/components/kit/tag-input.d.ts +3 -1
  407. package/dist/types/components/kit/testimonials.d.ts +25 -0
  408. package/dist/types/components/lab/blocks/FlashSale.d.ts +2 -0
  409. package/dist/types/components/lab/blocks/PriceAlert.d.ts +2 -0
  410. package/dist/types/components/lab/blocks/SplitBill.d.ts +2 -0
  411. package/dist/types/components/lab/blocks/Watchlist.d.ts +2 -0
  412. package/dist/types/packages/asta-ui/src/base/billing.d.ts +2 -0
  413. package/dist/types/packages/asta-ui/src/base/chart-card.d.ts +2 -0
  414. package/dist/types/packages/asta-ui/src/base/cookie-consent.d.ts +2 -0
  415. package/dist/types/packages/asta-ui/src/base/countdown.d.ts +2 -0
  416. package/dist/types/packages/asta-ui/src/base/file-manager.d.ts +2 -0
  417. package/dist/types/packages/asta-ui/src/base/flash-sale.d.ts +2 -0
  418. package/dist/types/packages/asta-ui/src/base/inbox.d.ts +2 -0
  419. package/dist/types/packages/asta-ui/src/base/invoice.d.ts +2 -0
  420. package/dist/types/packages/asta-ui/src/base/menubar.d.ts +2 -0
  421. package/dist/types/packages/asta-ui/src/base/meter.d.ts +2 -0
  422. package/dist/types/packages/asta-ui/src/base/phone-input.d.ts +2 -0
  423. package/dist/types/packages/asta-ui/src/base/price-alert.d.ts +2 -0
  424. package/dist/types/packages/asta-ui/src/base/sortable-list.d.ts +2 -0
  425. package/dist/types/packages/asta-ui/src/base/split-bill.d.ts +2 -0
  426. package/dist/types/packages/asta-ui/src/base/testimonials.d.ts +2 -0
  427. package/dist/types/packages/asta-ui/src/base/watchlist.d.ts +2 -0
  428. package/dist/types/packages/asta-ui/src/base.d.ts +29 -1
  429. package/dist/types/packages/asta-ui/src/billing.d.ts +2 -0
  430. package/dist/types/packages/asta-ui/src/chart-card.d.ts +2 -0
  431. package/dist/types/packages/asta-ui/src/cookie-consent.d.ts +2 -0
  432. package/dist/types/packages/asta-ui/src/countdown.d.ts +2 -0
  433. package/dist/types/packages/asta-ui/src/file-manager.d.ts +2 -0
  434. package/dist/types/packages/asta-ui/src/flash-sale.d.ts +2 -0
  435. package/dist/types/packages/asta-ui/src/inbox.d.ts +2 -0
  436. package/dist/types/packages/asta-ui/src/index.d.ts +29 -1
  437. package/dist/types/packages/asta-ui/src/invoice.d.ts +2 -0
  438. package/dist/types/packages/asta-ui/src/menubar.d.ts +2 -0
  439. package/dist/types/packages/asta-ui/src/meter.d.ts +2 -0
  440. package/dist/types/packages/asta-ui/src/phone-input.d.ts +2 -0
  441. package/dist/types/packages/asta-ui/src/price-alert.d.ts +2 -0
  442. package/dist/types/packages/asta-ui/src/sortable-list.d.ts +2 -0
  443. package/dist/types/packages/asta-ui/src/split-bill.d.ts +2 -0
  444. package/dist/types/packages/asta-ui/src/testimonials.d.ts +2 -0
  445. package/dist/types/packages/asta-ui/src/watchlist.d.ts +2 -0
  446. package/dist/watchlist.d.ts +2 -0
  447. package/dist/watchlist.js +7 -0
  448. package/package.json +1 -1
@@ -0,0 +1,224 @@
1
+ "use client";
2
+ import {
3
+ SegmentedControl
4
+ } from "./chunk-FK2LKLRN.js";
5
+ import {
6
+ Meter
7
+ } from "./chunk-LS6CFF6X.js";
8
+ import {
9
+ TreeView
10
+ } from "./chunk-IS2VTYDA.js";
11
+ import {
12
+ FileCard
13
+ } from "./chunk-PZJYDIJI.js";
14
+ import {
15
+ Breadcrumb
16
+ } from "./chunk-LBXIMJFU.js";
17
+ import {
18
+ Button
19
+ } from "./chunk-WSL4JGEA.js";
20
+
21
+ // components/kit/base/file-manager.tsx
22
+ import { useMemo, useState } from "react";
23
+ import { jsx, jsxs } from "react/jsx-runtime";
24
+ var cx = (...c) => c.filter(Boolean).join(" ");
25
+ var KEYFRAMES = `@keyframes asta-fm-in { from { opacity: 0; transform: translateY(6px) } }
26
+ @keyframes asta-fm-bar { from { opacity: 0; transform: translateY(8px) } }
27
+ @media (prefers-reduced-motion: reduce) { .asta-fm-a { animation: none !important } }`;
28
+ var ROOT = "__root";
29
+ function formatBytes(n) {
30
+ if (n < 1024) return `${n} B`;
31
+ const u = ["KB", "MB", "GB", "TB"];
32
+ let i = -1;
33
+ do {
34
+ n /= 1024;
35
+ i++;
36
+ } while (n >= 1024 && i < u.length - 1);
37
+ return `${n >= 100 ? Math.round(n) : n.toFixed(1)} ${u[i]}`;
38
+ }
39
+ var PATHS = {
40
+ folder: "M2.5 4.5a1 1 0 0 1 1-1h3l1.5 1.5h4.5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1z",
41
+ image: "M3 3h10v10H3zM3 11l3-3 2.5 2.5L10 9l3 3M10 6h.01",
42
+ doc: "M4 2.5h5l3 3v8H4zM9 2.5v3h3M6 8.5h4M6 10.5h4",
43
+ sheet: "M3 3h10v10H3zM3 6.5h10M3 9.8h10M7 3v10",
44
+ video: "M2.5 4h8v8h-8zM10.5 7l3-2v6l-3-2",
45
+ archive: "M3 3h10v10H3zM8 3v2M8 6v1M8 8v1M7 10h2v2H7z"
46
+ };
47
+ var FileKindIcon = ({ kind, className = "h-4 w-4" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className, fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: PATHS[kind] }) });
48
+ function FileManager({ items: initial, rootLabel = "My files", quota, defaultView = "grid", onDelete, onOpenFile, actions, className }) {
49
+ const [items, setItems] = useState(initial);
50
+ const [folder, setFolder] = useState(ROOT);
51
+ const [view, setView] = useState(defaultView);
52
+ const [query, setQuery] = useState("");
53
+ const [sel, setSel] = useState([]);
54
+ const [expanded, setExpanded] = useState([ROOT]);
55
+ const byId = useMemo(() => new Map(items.map((i) => [i.id, i])), [items]);
56
+ const sizeOf = useMemo(() => {
57
+ const memo = /* @__PURE__ */ new Map();
58
+ const walk = (id) => {
59
+ if (memo.has(id)) return memo.get(id);
60
+ const it = byId.get(id);
61
+ const n = it?.kind === "folder" ? items.filter((c) => c.parent === id).reduce((a, c) => a + walk(c.id), 0) : it?.size ?? 0;
62
+ memo.set(id, n);
63
+ return n;
64
+ };
65
+ return walk;
66
+ }, [byId, items]);
67
+ const used = items.filter((i) => i.kind !== "folder").reduce((a, i) => a + (i.size ?? 0), 0);
68
+ const parentOf = (i) => i.parent ?? ROOT;
69
+ const q = query.trim().toLowerCase();
70
+ const shown = (q ? items.filter((i) => i.name.toLowerCase().includes(q)) : items.filter((i) => parentOf(i) === folder)).sort(
71
+ (a, b) => Number(b.kind === "folder") - Number(a.kind === "folder") || a.name.localeCompare(b.name)
72
+ );
73
+ const trail = [];
74
+ for (let f = byId.get(folder); f; f = f.parent ? byId.get(f.parent) : void 0) trail.unshift({ id: f.id, label: f.name });
75
+ trail.unshift({ id: ROOT, label: rootLabel });
76
+ const tree = useMemo(() => {
77
+ const build = (pid) => items.filter((i) => i.kind === "folder" && (i.parent ?? ROOT) === pid).sort((a, b) => a.name.localeCompare(b.name)).map((f) => {
78
+ const children = build(f.id);
79
+ return { id: f.id, label: f.name, icon: /* @__PURE__ */ jsx(FileKindIcon, { kind: "folder" }), children: children.length ? children : void 0 };
80
+ });
81
+ return [{ id: ROOT, label: rootLabel, icon: /* @__PURE__ */ jsx(FileKindIcon, { kind: "folder" }), children: build(ROOT) }];
82
+ }, [items, rootLabel]);
83
+ const go = (id) => {
84
+ setFolder(id);
85
+ setSel([]);
86
+ setQuery("");
87
+ const open = new Set(expanded);
88
+ for (let f = byId.get(id); f; f = f.parent ? byId.get(f.parent) : void 0) open.add(f.parent ?? ROOT);
89
+ setExpanded([...open]);
90
+ };
91
+ const toggle = (id) => setSel((s) => s.includes(id) ? s.filter((x) => x !== id) : [...s, id]);
92
+ const remove = () => {
93
+ const gone = new Set(sel);
94
+ let grew = true;
95
+ while (grew) {
96
+ grew = false;
97
+ for (const i of items) if (i.parent && gone.has(i.parent) && !gone.has(i.id)) {
98
+ gone.add(i.id);
99
+ grew = true;
100
+ }
101
+ }
102
+ setItems((l) => l.filter((i) => !gone.has(i.id)));
103
+ onDelete?.([...gone]);
104
+ setSel([]);
105
+ };
106
+ const allStarred = sel.length > 0 && sel.every((id) => byId.get(id)?.starred);
107
+ const star = () => setItems((l) => l.map((i) => sel.includes(i.id) ? { ...i, starred: !allStarred } : i));
108
+ const meta = (i) => i.kind === "folder" ? `${items.filter((c) => c.parent === i.id).length} items \xB7 ${formatBytes(sizeOf(i.id))}` : [i.modified, i.size ? formatBytes(i.size) : null].filter(Boolean).join(" \xB7 ");
109
+ return /* @__PURE__ */ jsxs("div", { className: cx("@container w-full overflow-hidden rounded-[14px] bg-paper text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]", className), children: [
110
+ /* @__PURE__ */ jsx("style", { href: "asta-file-manager", precedence: "asta", children: KEYFRAMES }),
111
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-[520px] @min-[640px]:grid @min-[640px]:grid-cols-[220px_1fr]", children: [
112
+ /* @__PURE__ */ jsxs("aside", { className: "hidden flex-col gap-4 bg-paper-2/60 p-3 @min-[640px]:flex", children: [
113
+ /* @__PURE__ */ jsx(TreeView, { nodes: tree, label: "Folders", selected: folder, onSelect: (id) => go(id), expanded, onExpandedChange: setExpanded }),
114
+ quota && /* @__PURE__ */ jsx("div", { className: "mt-auto rounded-[10px] bg-paper p-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)]", children: /* @__PURE__ */ jsx(Meter, { label: "Storage", value: used, max: quota, format: formatBytes, size: "sm" }) })
115
+ ] }),
116
+ /* @__PURE__ */ jsxs("section", { "aria-label": trail[trail.length - 1].label, className: "relative flex min-w-0 flex-1 flex-col", children: [
117
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-3 pb-2 @min-[640px]:p-4 @min-[640px]:pb-2", children: [
118
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
119
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: q ? /* @__PURE__ */ jsxs("p", { className: "text-[13.5px] text-mute", children: [
120
+ shown.length,
121
+ " result",
122
+ shown.length === 1 ? "" : "s",
123
+ " for \u201C",
124
+ /* @__PURE__ */ jsx("span", { className: "text-ink", children: query }),
125
+ "\u201D"
126
+ ] }) : /* @__PURE__ */ jsx(Breadcrumb, { items: trail.map((t, i) => i === trail.length - 1 ? { label: t.label } : { label: t.label, onClick: () => go(t.id) }) }) }),
127
+ actions
128
+ ] }),
129
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
130
+ /* @__PURE__ */ jsxs("label", { className: "flex h-8 min-w-0 flex-1 items-center gap-2 rounded-lg bg-paper-2 px-2.5 text-mute focus-within:shadow-[inset_0_0_0_1px_var(--brand)]", children: [
131
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5 shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M7 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm3.6-1.4L14 14" }) }),
132
+ /* @__PURE__ */ jsx(
133
+ "input",
134
+ {
135
+ type: "search",
136
+ name: "q",
137
+ autoComplete: "off",
138
+ value: query,
139
+ onChange: (e) => {
140
+ setQuery(e.target.value);
141
+ setSel([]);
142
+ },
143
+ placeholder: "Search all files\u2026",
144
+ "aria-label": "Search all files",
145
+ className: "h-full min-w-0 flex-1 bg-transparent text-[16px] sm:text-[13px] text-ink outline-none placeholder:text-mute [&::-webkit-search-cancel-button]:hidden"
146
+ }
147
+ )
148
+ ] }),
149
+ /* @__PURE__ */ jsx(
150
+ SegmentedControl,
151
+ {
152
+ size: "sm",
153
+ label: "View",
154
+ value: view,
155
+ onChange: (v) => setView(v),
156
+ segments: [
157
+ {
158
+ value: "grid",
159
+ label: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Grid" }),
160
+ icon: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 3h4v4H3zM9 3h4v4H9zM3 9h4v4H3zM9 9h4v4H9z" }) })
161
+ },
162
+ {
163
+ value: "list",
164
+ label: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "List" }),
165
+ icon: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 4h10M3 8h10M3 12h10" }) })
166
+ }
167
+ ]
168
+ }
169
+ )
170
+ ] })
171
+ ] }),
172
+ /* @__PURE__ */ jsx("div", { className: "asta-fm-a min-h-0 flex-1 animate-[asta-fm-in_.35s_cubic-bezier(.16,1,.3,1)_both] overflow-y-auto px-3 pb-16 pt-1 @min-[640px]:px-4", children: shown.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-[240px] flex-col items-center justify-center gap-1 text-center", children: [
173
+ /* @__PURE__ */ jsx("p", { className: "text-[14px] font-medium", children: q ? "No files match" : "This folder is empty" }),
174
+ /* @__PURE__ */ jsx("p", { className: "text-[12.5px] text-mute", children: q ? "Try another name." : "Drop files here or use Upload." })
175
+ ] }) : /* @__PURE__ */ jsx("ul", { className: cx(view === "grid" ? "grid grid-cols-2 gap-3 @min-[520px]:grid-cols-3 @min-[860px]:grid-cols-4" : "flex flex-col gap-0.5"), children: shown.map((i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
176
+ FileCard,
177
+ {
178
+ view,
179
+ title: i.name,
180
+ meta: meta(i),
181
+ icon: /* @__PURE__ */ jsx(FileKindIcon, { kind: i.kind }),
182
+ thumbnail: i.kind === "folder" ? /* @__PURE__ */ jsx(FolderThumb, { count: items.filter((c) => c.parent === i.id).length }) : i.thumbnail ?? /* @__PURE__ */ jsx(KindThumb, { kind: i.kind }),
183
+ selected: sel.includes(i.id),
184
+ starred: !!i.starred,
185
+ onStarChange: (on) => setItems((l) => l.map((x) => x.id === i.id ? { ...x, starred: on } : x)),
186
+ onOpen: () => {
187
+ if (i.kind === "folder") return go(i.id);
188
+ toggle(i.id);
189
+ onOpenFile?.(i);
190
+ }
191
+ }
192
+ ) }, i.id)) }) }, folder + view + (q ? "q" : "")),
193
+ sel.length > 0 && /* @__PURE__ */ jsxs("div", { role: "toolbar", "aria-label": "Selection", className: "asta-fm-a absolute inset-x-3 bottom-3 flex animate-[asta-fm-bar_.35s_cubic-bezier(.16,1,.3,1)_both] items-center gap-2 rounded-[10px] bg-ink py-1.5 pl-3.5 pr-1.5 text-[12.5px] text-paper shadow-[0_12px_28px_-12px_rgb(0_0_0/0.5)] @min-[640px]:inset-x-4", children: [
194
+ /* @__PURE__ */ jsxs("span", { className: "mr-auto truncate tabular-nums", children: [
195
+ sel.length,
196
+ " selected \xB7 ",
197
+ formatBytes(sel.reduce((a, id) => a + sizeOf(id), 0))
198
+ ] }),
199
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: star, className: "h-7 rounded-md px-2.5 font-medium outline-none transition-colors hover:bg-paper/15 focus-visible:ring-2 focus-visible:ring-paper/60", children: allStarred ? "Unstar" : "Star" }),
200
+ /* @__PURE__ */ jsx(Button, { size: "xs", variant: "soft", onClick: remove, className: "!bg-paper !text-ink", children: "Delete" }),
201
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Clear selection", onClick: () => setSel([]), className: "grid h-7 w-7 place-items-center rounded-md outline-none transition-colors hover:bg-paper/15 focus-visible:ring-2 focus-visible:ring-paper/60", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) }) })
202
+ ] }),
203
+ quota && /* @__PURE__ */ jsx("div", { className: "px-3 pb-3 @min-[640px]:hidden", children: /* @__PURE__ */ jsx(Meter, { label: "Storage", value: used, max: quota, format: formatBytes, size: "sm" }) })
204
+ ] })
205
+ ] })
206
+ ] });
207
+ }
208
+ function FolderThumb({ count }) {
209
+ return /* @__PURE__ */ jsxs("span", { className: "absolute inset-0 grid place-items-center bg-[color-mix(in_srgb,var(--brand)_7%,var(--paper-2))] text-brand", children: [
210
+ /* @__PURE__ */ jsx(FileKindIcon, { kind: "folder", className: "h-9 w-9" }),
211
+ /* @__PURE__ */ jsx("span", { className: "absolute bottom-2 right-2.5 font-mono text-[10.5px] text-mute", children: count })
212
+ ] });
213
+ }
214
+ function KindThumb({ kind }) {
215
+ return /* @__PURE__ */ jsx("span", { className: "absolute inset-0 grid place-items-center text-mute", children: /* @__PURE__ */ jsx(FileKindIcon, { kind, className: "h-8 w-8" }) });
216
+ }
217
+ var file_manager_default = FileManager;
218
+
219
+ export {
220
+ formatBytes,
221
+ FileKindIcon,
222
+ FileManager,
223
+ file_manager_default
224
+ };
@@ -28,7 +28,7 @@ function TextareaField({ label, hint, maxLength, optional, className, rows = 4,
28
28
  if (!controlled) setInner(e.target.value);
29
29
  rest.onChange?.(e);
30
30
  },
31
- className: "block w-full resize-y rounded-xl bg-paper px-3.5 py-3 text-[14px] leading-[1.55] text-ink outline-none transition-shadow duration-200 placeholder:text-mute shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_24%,transparent)] focus:!shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)] disabled:opacity-50 motion-reduce:transition-none"
31
+ className: "block w-full resize-y rounded-xl bg-paper px-3.5 py-3 text-[16px] sm:text-[14px] leading-[1.55] text-ink outline-none transition-shadow duration-200 placeholder:text-mute shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_24%,transparent)] focus:!shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)] disabled:opacity-50 motion-reduce:transition-none"
32
32
  }
33
33
  ),
34
34
  (hint || maxLength !== void 0) && /* @__PURE__ */ jsxs("div", { id: `${fid}-meta`, className: "flex items-start justify-between gap-3 text-[12.5px]", children: [
@@ -15,7 +15,7 @@ function FloatingLabelTextarea({ label, className, rows = 4, id, ...rest }) {
15
15
  rows,
16
16
  placeholder: " ",
17
17
  ...rest,
18
- className: "peer block w-full resize-none rounded-xl bg-paper px-3.5 pb-3 pt-7 text-[14px] leading-[1.55] text-ink outline-none transition-shadow duration-200 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_24%,transparent)] focus:!shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)] motion-reduce:transition-none"
18
+ className: "peer block w-full resize-none rounded-xl bg-paper px-3.5 pb-3 pt-7 text-[16px] sm:text-[14px] leading-[1.55] text-ink outline-none transition-shadow duration-200 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_24%,transparent)] focus:!shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)] motion-reduce:transition-none"
19
19
  }
20
20
  ),
21
21
  /* @__PURE__ */ jsx(
@@ -43,7 +43,7 @@ function Tooltip({ content, side = "top", delay = 500, shortcut, children, class
43
43
  "flex w-max max-w-[240px] select-none items-center gap-2 rounded-lg bg-ink px-2.5 py-1.5 text-[12px] font-medium leading-snug text-paper",
44
44
  "shadow-[0_6px_20px_-6px_rgb(0_0_0/0.35)] origin-[var(--transform-origin)]",
45
45
  // Enter: rise from the trigger side with the studio ease. Exit: a quicker fade.
46
- "transition-[opacity,transform] duration-200 ease-[cubic-bezier(.16,1,.3,1)] data-[ending-style]:duration-100 data-[ending-style]:ease-in",
46
+ "transition-[opacity,transform] duration-200 ease-[cubic-bezier(.16,1,.3,1)] data-[ending-style]:duration-100 data-[ending-style]:ease-[cubic-bezier(.16,1,.3,1)]",
47
47
  "data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 data-[ending-style]:scale-[.97]",
48
48
  "data-[side=top]:data-[starting-style]:[transform:translateY(4px)_scale(.95)] data-[side=bottom]:data-[starting-style]:[transform:translateY(-4px)_scale(.95)]",
49
49
  "data-[side=left]:data-[starting-style]:[transform:translateX(4px)_scale(.95)] data-[side=right]:data-[starting-style]:[transform:translateX(-4px)_scale(.95)]",
@@ -11,14 +11,22 @@ var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
11
11
  function Newsletter({ onSubscribe }) {
12
12
  const [email, setEmail] = useState("");
13
13
  const [state, setState] = useState("idle");
14
+ const [msg, setMsg] = useState("");
15
+ const field = useRef(null);
14
16
  const submit = async (e) => {
15
17
  e.preventDefault();
16
- if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) return setState("error");
18
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.trim())) {
19
+ setMsg(email.trim() ? "Enter an email like name@company.com." : "Enter your email to subscribe.");
20
+ setState("error");
21
+ field.current?.focus();
22
+ return;
23
+ }
17
24
  setState("busy");
18
25
  try {
19
- await (onSubscribe?.(email) ?? new Promise((r) => setTimeout(r, 900)));
26
+ await (onSubscribe?.(email.trim()) ?? new Promise((r) => setTimeout(r, 900)));
20
27
  setState("done");
21
28
  } catch {
29
+ setMsg("Couldn't subscribe right now. Try again in a moment.");
22
30
  setState("error");
23
31
  }
24
32
  };
@@ -40,8 +48,14 @@ function Newsletter({ onSubscribe }) {
40
48
  /* @__PURE__ */ jsx(
41
49
  "input",
42
50
  {
51
+ ref: field,
43
52
  id: "kit-footer-email",
53
+ name: "email",
44
54
  type: "email",
55
+ autoComplete: "email",
56
+ inputMode: "email",
57
+ autoCapitalize: "none",
58
+ spellCheck: false,
45
59
  value: email,
46
60
  onChange: (e) => {
47
61
  setEmail(e.target.value);
@@ -51,7 +65,7 @@ function Newsletter({ onSubscribe }) {
51
65
  "aria-invalid": state === "error" || void 0,
52
66
  "aria-describedby": "kit-footer-msg",
53
67
  tabIndex: state === "done" ? -1 : void 0,
54
- className: "min-w-0 flex-1 bg-transparent text-[14px] text-paper outline-none placeholder:text-paper/40"
68
+ className: "min-w-0 flex-1 bg-transparent text-[16px] sm:text-[14px] text-paper outline-none placeholder:text-paper/40"
55
69
  }
56
70
  ),
57
71
  /* @__PURE__ */ jsx(Button, { type: "submit", variant: "accent", size: "sm", shape: "pill", loading: state === "busy", className: "shadow-none", tabIndex: state === "done" ? -1 : void 0, children: "Subscribe" })
@@ -73,7 +87,7 @@ function Newsletter({ onSubscribe }) {
73
87
  ]
74
88
  }
75
89
  ),
76
- /* @__PURE__ */ jsx("p", { id: "kit-footer-msg", role: "status", className: "mt-2 h-4 text-[12px] text-[#ff8a8d]", children: state === "error" ? "That doesn't look like an email address." : "" })
90
+ /* @__PURE__ */ jsx("p", { id: "kit-footer-msg", role: "status", className: "mt-2 h-4 text-[12px] text-[#ff8a8d]", children: state === "error" ? msg : "" })
77
91
  ] });
78
92
  }
79
93
  function Wordmark({ text }) {
@@ -0,0 +1,224 @@
1
+ "use client";
2
+ import {
3
+ SegmentedControl
4
+ } from "./chunk-DUGKLVQJ.js";
5
+ import {
6
+ Meter
7
+ } from "./chunk-LS6CFF6X.js";
8
+ import {
9
+ TreeView
10
+ } from "./chunk-IS2VTYDA.js";
11
+ import {
12
+ FileCard
13
+ } from "./chunk-PZJYDIJI.js";
14
+ import {
15
+ Breadcrumb
16
+ } from "./chunk-LBXIMJFU.js";
17
+ import {
18
+ Button
19
+ } from "./chunk-ZWBJUJTR.js";
20
+
21
+ // components/kit/file-manager.tsx
22
+ import { useMemo, useState } from "react";
23
+ import { jsx, jsxs } from "react/jsx-runtime";
24
+ var cx = (...c) => c.filter(Boolean).join(" ");
25
+ var KEYFRAMES = `@keyframes asta-fm-in { from { opacity: 0; transform: translateY(6px) } }
26
+ @keyframes asta-fm-bar { from { opacity: 0; transform: translateY(8px) } }
27
+ @media (prefers-reduced-motion: reduce) { .asta-fm-a { animation: none !important } }`;
28
+ var ROOT = "__root";
29
+ function formatBytes(n) {
30
+ if (n < 1024) return `${n} B`;
31
+ const u = ["KB", "MB", "GB", "TB"];
32
+ let i = -1;
33
+ do {
34
+ n /= 1024;
35
+ i++;
36
+ } while (n >= 1024 && i < u.length - 1);
37
+ return `${n >= 100 ? Math.round(n) : n.toFixed(1)} ${u[i]}`;
38
+ }
39
+ var PATHS = {
40
+ folder: "M2.5 4.5a1 1 0 0 1 1-1h3l1.5 1.5h4.5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1z",
41
+ image: "M3 3h10v10H3zM3 11l3-3 2.5 2.5L10 9l3 3M10 6h.01",
42
+ doc: "M4 2.5h5l3 3v8H4zM9 2.5v3h3M6 8.5h4M6 10.5h4",
43
+ sheet: "M3 3h10v10H3zM3 6.5h10M3 9.8h10M7 3v10",
44
+ video: "M2.5 4h8v8h-8zM10.5 7l3-2v6l-3-2",
45
+ archive: "M3 3h10v10H3zM8 3v2M8 6v1M8 8v1M7 10h2v2H7z"
46
+ };
47
+ var FileKindIcon = ({ kind, className = "h-4 w-4" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className, fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: PATHS[kind] }) });
48
+ function FileManager({ items: initial, rootLabel = "My files", quota, defaultView = "grid", onDelete, onOpenFile, actions, className }) {
49
+ const [items, setItems] = useState(initial);
50
+ const [folder, setFolder] = useState(ROOT);
51
+ const [view, setView] = useState(defaultView);
52
+ const [query, setQuery] = useState("");
53
+ const [sel, setSel] = useState([]);
54
+ const [expanded, setExpanded] = useState([ROOT]);
55
+ const byId = useMemo(() => new Map(items.map((i) => [i.id, i])), [items]);
56
+ const sizeOf = useMemo(() => {
57
+ const memo = /* @__PURE__ */ new Map();
58
+ const walk = (id) => {
59
+ if (memo.has(id)) return memo.get(id);
60
+ const it = byId.get(id);
61
+ const n = it?.kind === "folder" ? items.filter((c) => c.parent === id).reduce((a, c) => a + walk(c.id), 0) : it?.size ?? 0;
62
+ memo.set(id, n);
63
+ return n;
64
+ };
65
+ return walk;
66
+ }, [byId, items]);
67
+ const used = items.filter((i) => i.kind !== "folder").reduce((a, i) => a + (i.size ?? 0), 0);
68
+ const parentOf = (i) => i.parent ?? ROOT;
69
+ const q = query.trim().toLowerCase();
70
+ const shown = (q ? items.filter((i) => i.name.toLowerCase().includes(q)) : items.filter((i) => parentOf(i) === folder)).sort(
71
+ (a, b) => Number(b.kind === "folder") - Number(a.kind === "folder") || a.name.localeCompare(b.name)
72
+ );
73
+ const trail = [];
74
+ for (let f = byId.get(folder); f; f = f.parent ? byId.get(f.parent) : void 0) trail.unshift({ id: f.id, label: f.name });
75
+ trail.unshift({ id: ROOT, label: rootLabel });
76
+ const tree = useMemo(() => {
77
+ const build = (pid) => items.filter((i) => i.kind === "folder" && (i.parent ?? ROOT) === pid).sort((a, b) => a.name.localeCompare(b.name)).map((f) => {
78
+ const children = build(f.id);
79
+ return { id: f.id, label: f.name, icon: /* @__PURE__ */ jsx(FileKindIcon, { kind: "folder" }), children: children.length ? children : void 0 };
80
+ });
81
+ return [{ id: ROOT, label: rootLabel, icon: /* @__PURE__ */ jsx(FileKindIcon, { kind: "folder" }), children: build(ROOT) }];
82
+ }, [items, rootLabel]);
83
+ const go = (id) => {
84
+ setFolder(id);
85
+ setSel([]);
86
+ setQuery("");
87
+ const open = new Set(expanded);
88
+ for (let f = byId.get(id); f; f = f.parent ? byId.get(f.parent) : void 0) open.add(f.parent ?? ROOT);
89
+ setExpanded([...open]);
90
+ };
91
+ const toggle = (id) => setSel((s) => s.includes(id) ? s.filter((x) => x !== id) : [...s, id]);
92
+ const remove = () => {
93
+ const gone = new Set(sel);
94
+ let grew = true;
95
+ while (grew) {
96
+ grew = false;
97
+ for (const i of items) if (i.parent && gone.has(i.parent) && !gone.has(i.id)) {
98
+ gone.add(i.id);
99
+ grew = true;
100
+ }
101
+ }
102
+ setItems((l) => l.filter((i) => !gone.has(i.id)));
103
+ onDelete?.([...gone]);
104
+ setSel([]);
105
+ };
106
+ const allStarred = sel.length > 0 && sel.every((id) => byId.get(id)?.starred);
107
+ const star = () => setItems((l) => l.map((i) => sel.includes(i.id) ? { ...i, starred: !allStarred } : i));
108
+ const meta = (i) => i.kind === "folder" ? `${items.filter((c) => c.parent === i.id).length} items \xB7 ${formatBytes(sizeOf(i.id))}` : [i.modified, i.size ? formatBytes(i.size) : null].filter(Boolean).join(" \xB7 ");
109
+ return /* @__PURE__ */ jsxs("div", { className: cx("@container w-full overflow-hidden rounded-[14px] bg-paper text-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]", className), children: [
110
+ /* @__PURE__ */ jsx("style", { href: "asta-file-manager", precedence: "asta", children: KEYFRAMES }),
111
+ /* @__PURE__ */ jsxs("div", { className: "flex min-h-[520px] @min-[640px]:grid @min-[640px]:grid-cols-[220px_1fr]", children: [
112
+ /* @__PURE__ */ jsxs("aside", { className: "hidden flex-col gap-4 bg-paper-2/60 p-3 @min-[640px]:flex", children: [
113
+ /* @__PURE__ */ jsx(TreeView, { nodes: tree, label: "Folders", selected: folder, onSelect: (id) => go(id), expanded, onExpandedChange: setExpanded }),
114
+ quota && /* @__PURE__ */ jsx("div", { className: "mt-auto rounded-[10px] bg-paper p-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)]", children: /* @__PURE__ */ jsx(Meter, { label: "Storage", value: used, max: quota, format: formatBytes, size: "sm" }) })
115
+ ] }),
116
+ /* @__PURE__ */ jsxs("section", { "aria-label": trail[trail.length - 1].label, className: "relative flex min-w-0 flex-1 flex-col", children: [
117
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 p-3 pb-2 @min-[640px]:p-4 @min-[640px]:pb-2", children: [
118
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
119
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: q ? /* @__PURE__ */ jsxs("p", { className: "text-[13.5px] text-mute", children: [
120
+ shown.length,
121
+ " result",
122
+ shown.length === 1 ? "" : "s",
123
+ " for \u201C",
124
+ /* @__PURE__ */ jsx("span", { className: "text-ink", children: query }),
125
+ "\u201D"
126
+ ] }) : /* @__PURE__ */ jsx(Breadcrumb, { items: trail.map((t, i) => i === trail.length - 1 ? { label: t.label } : { label: t.label, onClick: () => go(t.id) }) }) }),
127
+ actions
128
+ ] }),
129
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
130
+ /* @__PURE__ */ jsxs("label", { className: "flex h-8 min-w-0 flex-1 items-center gap-2 rounded-lg bg-paper-2 px-2.5 text-mute focus-within:shadow-[inset_0_0_0_1px_var(--brand)]", children: [
131
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5 shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M7 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm3.6-1.4L14 14" }) }),
132
+ /* @__PURE__ */ jsx(
133
+ "input",
134
+ {
135
+ type: "search",
136
+ name: "q",
137
+ autoComplete: "off",
138
+ value: query,
139
+ onChange: (e) => {
140
+ setQuery(e.target.value);
141
+ setSel([]);
142
+ },
143
+ placeholder: "Search all files\u2026",
144
+ "aria-label": "Search all files",
145
+ className: "h-full min-w-0 flex-1 bg-transparent text-[16px] sm:text-[13px] text-ink outline-none placeholder:text-mute [&::-webkit-search-cancel-button]:hidden"
146
+ }
147
+ )
148
+ ] }),
149
+ /* @__PURE__ */ jsx(
150
+ SegmentedControl,
151
+ {
152
+ size: "sm",
153
+ label: "View",
154
+ value: view,
155
+ onChange: (v) => setView(v),
156
+ segments: [
157
+ {
158
+ value: "grid",
159
+ label: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Grid" }),
160
+ icon: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 3h4v4H3zM9 3h4v4H9zM3 9h4v4H3zM9 9h4v4H9z" }) })
161
+ },
162
+ {
163
+ value: "list",
164
+ label: /* @__PURE__ */ jsx("span", { className: "sr-only", children: "List" }),
165
+ icon: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 4h10M3 8h10M3 12h10" }) })
166
+ }
167
+ ]
168
+ }
169
+ )
170
+ ] })
171
+ ] }),
172
+ /* @__PURE__ */ jsx("div", { className: "asta-fm-a min-h-0 flex-1 animate-[asta-fm-in_.35s_cubic-bezier(.16,1,.3,1)_both] overflow-y-auto px-3 pb-16 pt-1 @min-[640px]:px-4", children: shown.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-[240px] flex-col items-center justify-center gap-1 text-center", children: [
173
+ /* @__PURE__ */ jsx("p", { className: "text-[14px] font-medium", children: q ? "No files match" : "This folder is empty" }),
174
+ /* @__PURE__ */ jsx("p", { className: "text-[12.5px] text-mute", children: q ? "Try another name." : "Drop files here or use Upload." })
175
+ ] }) : /* @__PURE__ */ jsx("ul", { className: cx(view === "grid" ? "grid grid-cols-2 gap-3 @min-[520px]:grid-cols-3 @min-[860px]:grid-cols-4" : "flex flex-col gap-0.5"), children: shown.map((i) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
176
+ FileCard,
177
+ {
178
+ view,
179
+ title: i.name,
180
+ meta: meta(i),
181
+ icon: /* @__PURE__ */ jsx(FileKindIcon, { kind: i.kind }),
182
+ thumbnail: i.kind === "folder" ? /* @__PURE__ */ jsx(FolderThumb, { count: items.filter((c) => c.parent === i.id).length }) : i.thumbnail ?? /* @__PURE__ */ jsx(KindThumb, { kind: i.kind }),
183
+ selected: sel.includes(i.id),
184
+ starred: !!i.starred,
185
+ onStarChange: (on) => setItems((l) => l.map((x) => x.id === i.id ? { ...x, starred: on } : x)),
186
+ onOpen: () => {
187
+ if (i.kind === "folder") return go(i.id);
188
+ toggle(i.id);
189
+ onOpenFile?.(i);
190
+ }
191
+ }
192
+ ) }, i.id)) }) }, folder + view + (q ? "q" : "")),
193
+ sel.length > 0 && /* @__PURE__ */ jsxs("div", { role: "toolbar", "aria-label": "Selection", className: "asta-fm-a absolute inset-x-3 bottom-3 flex animate-[asta-fm-bar_.35s_cubic-bezier(.16,1,.3,1)_both] items-center gap-2 rounded-[10px] bg-ink py-1.5 pl-3.5 pr-1.5 text-[12.5px] text-paper shadow-[0_12px_28px_-12px_rgb(0_0_0/0.5)] @min-[640px]:inset-x-4", children: [
194
+ /* @__PURE__ */ jsxs("span", { className: "mr-auto truncate tabular-nums", children: [
195
+ sel.length,
196
+ " selected \xB7 ",
197
+ formatBytes(sel.reduce((a, id) => a + sizeOf(id), 0))
198
+ ] }),
199
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: star, className: "h-7 rounded-md px-2.5 font-medium outline-none transition-colors hover:bg-paper/15 focus-visible:ring-2 focus-visible:ring-paper/60", children: allStarred ? "Unstar" : "Star" }),
200
+ /* @__PURE__ */ jsx(Button, { size: "xs", variant: "soft", onClick: remove, className: "!bg-paper !text-ink", children: "Delete" }),
201
+ /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Clear selection", onClick: () => setSel([]), className: "grid h-7 w-7 place-items-center rounded-md outline-none transition-colors hover:bg-paper/15 focus-visible:ring-2 focus-visible:ring-paper/60", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) }) })
202
+ ] }),
203
+ quota && /* @__PURE__ */ jsx("div", { className: "px-3 pb-3 @min-[640px]:hidden", children: /* @__PURE__ */ jsx(Meter, { label: "Storage", value: used, max: quota, format: formatBytes, size: "sm" }) })
204
+ ] })
205
+ ] })
206
+ ] });
207
+ }
208
+ function FolderThumb({ count }) {
209
+ return /* @__PURE__ */ jsxs("span", { className: "absolute inset-0 grid place-items-center bg-[color-mix(in_srgb,var(--brand)_7%,var(--paper-2))] text-brand", children: [
210
+ /* @__PURE__ */ jsx(FileKindIcon, { kind: "folder", className: "h-9 w-9" }),
211
+ /* @__PURE__ */ jsx("span", { className: "absolute bottom-2 right-2.5 font-mono text-[10.5px] text-mute", children: count })
212
+ ] });
213
+ }
214
+ function KindThumb({ kind }) {
215
+ return /* @__PURE__ */ jsx("span", { className: "absolute inset-0 grid place-items-center text-mute", children: /* @__PURE__ */ jsx(FileKindIcon, { kind, className: "h-8 w-8" }) });
216
+ }
217
+ var file_manager_default = FileManager;
218
+
219
+ export {
220
+ formatBytes,
221
+ FileKindIcon,
222
+ FileManager,
223
+ file_manager_default
224
+ };
@@ -59,7 +59,7 @@ function MagicLinkSignIn({
59
59
  const alive = useRef(true);
60
60
  const input = useRef(null);
61
61
  const heading = useRef(null);
62
- const error = !email.trim() ? "Enter your email." : !validEmail(email) ? "That doesn't look like an email address." : "";
62
+ const error = !email.trim() ? "Enter your email." : !validEmail(email) ? "Enter an email like name@company.com." : "";
63
63
  const shown = touched && error || formError;
64
64
  const box = useShake(!!shown, shake);
65
65
  useEffect(() => {
@@ -155,19 +155,24 @@ function MagicLinkSignIn({
155
155
  {
156
156
  ref: input,
157
157
  id: `${id}-email`,
158
+ name: "email",
158
159
  type: "email",
159
160
  autoComplete: "email",
161
+ inputMode: "email",
162
+ autoCapitalize: "none",
163
+ spellCheck: false,
160
164
  placeholder: "you@company.com",
161
165
  value: email,
162
166
  onChange: (e) => {
163
167
  setEmail(e.target.value);
164
168
  setFormError("");
169
+ if (touched && validEmail(e.target.value)) setTouched(false);
165
170
  },
166
171
  onBlur: () => email && setTouched(true),
167
172
  "aria-invalid": !!shown || void 0,
168
173
  "aria-describedby": shown ? `${id}-err` : `${id}-hint`,
169
174
  className: cx(
170
- "h-11 w-full rounded-[9px] bg-paper pl-9 pr-3 text-[14.5px] text-ink outline-none transition-shadow duration-200 placeholder:text-mute focus-visible:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_14%,transparent)]",
175
+ "h-11 w-full rounded-[9px] bg-paper pl-9 pr-3 text-[16px] sm:text-[14.5px] text-ink outline-none transition-shadow duration-200 placeholder:text-mute focus-visible:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_14%,transparent)]",
171
176
  shown ? "shadow-[inset_0_0_0_1.5px_var(--ink)]" : RING
172
177
  )
173
178
  }
@@ -36,8 +36,8 @@ function Dialog({ open, onOpenChange, title, description, children, footer, cont
36
36
  useLayoutEffect(() => {
37
37
  const p = panel.current;
38
38
  if (open || !p || still()) return;
39
- backdrop.current?.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 260, easing: "ease-in", fill: "forwards" });
40
- p.animate([{ transform: "none", opacity: 1 }, { transform: fromTrigger(), opacity: 0 }], { duration: 320, easing: "cubic-bezier(.7,0,.84,0)", fill: "forwards" });
39
+ backdrop.current?.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 200, easing: "ease-out", fill: "forwards" });
40
+ p.animate([{ transform: "none", opacity: 1 }, { transform: fromTrigger(), opacity: 0 }], { duration: 280, easing: EASE, fill: "forwards" });
41
41
  }, [open, fromTrigger]);
42
42
  return /* @__PURE__ */ jsxs(Fragment, { children: [
43
43
  contained && /* @__PURE__ */ jsx("span", { ref: host, className: "contents" }),
@@ -57,7 +57,7 @@ function Dialog({ open, onOpenChange, title, description, children, footer, cont
57
57
  return back && back.isConnected ? back : true;
58
58
  },
59
59
  className: cx(
60
- "relative w-full max-w-[400px] rounded-2xl bg-paper p-6 outline-none",
60
+ "relative max-h-full w-full max-w-[400px] overflow-y-auto overscroll-contain rounded-2xl bg-paper p-6 outline-none",
61
61
  "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent),0_24px_60px_-20px_rgb(0_0_0/0.45)]",
62
62
  className
63
63
  ),