asta-ui 0.9.3 → 0.9.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.
- package/css/asta.css +2 -2
- package/css/asta.js +248 -1
- package/css/components.css +722 -44
- package/css/runtime/core.css +5 -5
- package/css/runtime/data.css +2 -2
- package/css/runtime/modules.css +49 -0
- package/css/runtime/modules.js +245 -0
- package/css/runtime/overlays.css +22 -9
- package/css/src/blocks.css +3 -3
- package/css/src/core.css +8 -8
- package/css/src/data.css +3 -3
- package/css/src/display.css +6 -5
- package/css/src/forms.css +6 -6
- package/css/src/modules.css +616 -0
- package/css/src/overlays.css +3 -3
- package/css/tokens.css +6 -2
- package/dist/ai-chat.js +1 -1
- package/dist/avatar-group.js +2 -2
- package/dist/avatar.js +1 -1
- package/dist/base/ai-chat.js +1 -1
- package/dist/base/avatar-group.js +2 -2
- package/dist/base/avatar.js +1 -1
- package/dist/base/billing.d.ts +2 -0
- package/dist/base/billing.js +11 -0
- package/dist/base/bubble-wrap.js +1 -1
- package/dist/base/candlestick.js +1 -1
- package/dist/base/card-checkout.js +1 -1
- package/dist/base/chart-card.d.ts +2 -0
- package/dist/base/chart-card.js +11 -0
- package/dist/base/chat-thread.js +1 -1
- package/dist/base/checkbox.js +1 -1
- package/dist/base/checkout.js +3 -3
- package/dist/base/color-picker.js +1 -1
- package/dist/base/combo-lock.js +1 -1
- package/dist/base/combobox-aui-046.js +1 -1
- package/dist/base/combobox-aui-047.js +1 -1
- package/dist/base/combobox.js +1 -1
- package/dist/base/command-palette.js +1 -1
- package/dist/base/comments.js +2 -2
- package/dist/base/context-menu.js +1 -1
- package/dist/base/cookie-consent.d.ts +2 -0
- package/dist/base/cookie-consent.js +13 -0
- package/dist/base/countdown.d.ts +2 -0
- package/dist/base/countdown.js +9 -0
- package/dist/base/data-table.js +1 -1
- package/dist/base/dialog.js +1 -1
- package/dist/base/dropdown-menu.js +1 -1
- package/dist/base/field.js +1 -1
- package/dist/base/file-manager.d.ts +2 -0
- package/dist/base/file-manager.js +19 -0
- package/dist/base/flash-sale.d.ts +2 -0
- package/dist/base/flash-sale.js +7 -0
- package/dist/base/footer-aui-027.js +1 -1
- package/dist/base/footer-aui-028.js +1 -1
- package/dist/base/footer.js +1 -1
- package/dist/base/hover-card.js +1 -1
- package/dist/base/inbox.d.ts +2 -0
- package/dist/base/inbox.js +11 -0
- package/dist/base/inline-edit.js +1 -1
- package/dist/base/input-aui-029.js +1 -1
- package/dist/base/input-aui-030.js +1 -1
- package/dist/base/input-aui-031.js +1 -1
- package/dist/base/input-aui-032.js +1 -1
- package/dist/base/input-aui-033.js +1 -1
- package/dist/base/input-aui-034.js +1 -1
- package/dist/base/input.js +1 -1
- package/dist/base/invoice.d.ts +2 -0
- package/dist/base/invoice.js +10 -0
- package/dist/base/kanban.js +2 -2
- package/dist/base/menubar.d.ts +2 -0
- package/dist/base/menubar.js +9 -0
- package/dist/base/meter.d.ts +2 -0
- package/dist/base/meter.js +9 -0
- package/dist/base/morse-tap.js +1 -1
- package/dist/base/navbar-aui-009.js +1 -1
- package/dist/base/navbar-aui-011.js +1 -1
- package/dist/base/navbar-aui-012.js +1 -1
- package/dist/base/navbar-aui-013.js +1 -1
- package/dist/base/navbar.js +1 -1
- package/dist/base/notification-center.js +3 -3
- package/dist/base/number-input.js +1 -1
- package/dist/base/order-book.js +1 -1
- package/dist/base/otp-input-aui-041.js +1 -1
- package/dist/base/otp-input-aui-042.js +1 -1
- package/dist/base/otp-input.js +1 -1
- package/dist/base/password-input-aui-039.js +1 -1
- package/dist/base/password-input-aui-040.js +1 -1
- package/dist/base/password-input.js +1 -1
- package/dist/base/payment-received.js +1 -1
- package/dist/base/phone-input.d.ts +2 -0
- package/dist/base/phone-input.js +13 -0
- package/dist/base/popover.js +1 -1
- package/dist/base/price-alert.d.ts +2 -0
- package/dist/base/price-alert.js +7 -0
- package/dist/base/price-chart.js +1 -1
- package/dist/base/properties-panel.js +1 -1
- package/dist/base/radio-group.js +1 -1
- package/dist/base/select-aui-045.js +1 -1
- package/dist/base/select.js +1 -1
- package/dist/base/settings-panel.js +1 -1
- package/dist/base/shipment-tracker.js +1 -1
- package/dist/base/sidebar.js +2 -2
- package/dist/base/sign-in-aui-015.js +1 -1
- package/dist/base/sign-in-aui-016.js +1 -1
- package/dist/base/sign-in-aui-017.js +1 -1
- package/dist/base/sign-in-aui-018.js +1 -1
- package/dist/base/sign-in-aui-019.js +1 -1
- package/dist/base/sign-in-aui-020.js +1 -1
- package/dist/base/sign-in.js +1 -1
- package/dist/base/snap-grid.js +1 -1
- package/dist/base/sortable-list.d.ts +2 -0
- package/dist/base/sortable-list.js +9 -0
- package/dist/base/split-bill.d.ts +2 -0
- package/dist/base/split-bill.js +7 -0
- package/dist/base/stat-card.js +1 -1
- package/dist/base/tag-input-aui-048.js +1 -1
- package/dist/base/tag-input-aui-049.js +1 -1
- package/dist/base/tag-input.js +1 -1
- package/dist/base/team-members.js +3 -3
- package/dist/base/testimonials.d.ts +2 -0
- package/dist/base/testimonials.js +10 -0
- package/dist/base/textarea-aui-001.js +1 -1
- package/dist/base/textarea-aui-002.js +1 -1
- package/dist/base/textarea-aui-003.js +1 -1
- package/dist/base/textarea-aui-004.js +1 -1
- package/dist/base/textarea-aui-005.js +1 -1
- package/dist/base/textarea-aui-006.js +1 -1
- package/dist/base/textarea-aui-007.js +1 -1
- package/dist/base/textarea-aui-008.js +1 -1
- package/dist/base/textarea-aui-035.js +1 -1
- package/dist/base/textarea-aui-036.js +1 -1
- package/dist/base/textarea-aui-037.js +1 -1
- package/dist/base/textarea-aui-038.js +1 -1
- package/dist/base/textarea.js +1 -1
- package/dist/base/token-swap.js +1 -1
- package/dist/base/tooltip.js +1 -1
- package/dist/base/trade-ticket.js +1 -1
- package/dist/base/watchlist.d.ts +2 -0
- package/dist/base/watchlist.js +7 -0
- package/dist/base.js +166 -90
- package/dist/billing.d.ts +2 -0
- package/dist/billing.js +11 -0
- package/dist/bubble-wrap.js +1 -1
- package/dist/candlestick.js +1 -1
- package/dist/card-checkout.js +1 -1
- package/dist/chart-card.d.ts +2 -0
- package/dist/chart-card.js +11 -0
- package/dist/chat-thread.js +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/checkout.js +3 -3
- package/dist/{chunk-7TK42PS3.js → chunk-25RCKHWV.js} +19 -4
- package/dist/{chunk-4L4EKC46.js → chunk-2EBWWZPS.js} +1 -1
- package/dist/chunk-2F5CE6ZB.js +269 -0
- package/dist/{chunk-SATIWCJQ.js → chunk-2LM3VHNO.js} +3 -2
- package/dist/{chunk-5VQV2I7C.js → chunk-2PPF4GK5.js} +9 -6
- package/dist/{chunk-ZRGPSYW6.js → chunk-2PQIPQGO.js} +10 -6
- package/dist/{chunk-HB7DFNZP.js → chunk-3PQTSFOS.js} +1 -1
- package/dist/{chunk-VPZP6TCT.js → chunk-3UQIYJTI.js} +7 -3
- package/dist/{chunk-FY6BRODJ.js → chunk-3ZFF6VC5.js} +4 -2
- package/dist/{chunk-V3SPSN3A.js → chunk-45KDL3JM.js} +1 -1
- package/dist/{chunk-EVSTTLOT.js → chunk-4SLC3EK6.js} +18 -4
- package/dist/{chunk-VWYHP4SB.js → chunk-4WCMPLE3.js} +13 -4
- package/dist/chunk-5DLY6FGD.js +160 -0
- package/dist/{chunk-SRGDJSW7.js → chunk-5GGS6VP5.js} +1 -0
- package/dist/chunk-5N2G462S.js +338 -0
- package/dist/{chunk-FKHNK5VC.js → chunk-6C52ZQRB.js} +2 -1
- package/dist/{chunk-VVAL2JZJ.js → chunk-6MPEI6V5.js} +2 -2
- package/dist/{chunk-HNO6EUGJ.js → chunk-6RA7LJ3K.js} +7 -1
- package/dist/{chunk-RRHQBGRO.js → chunk-77RFV2MG.js} +7 -2
- package/dist/{chunk-RIWKIBEP.js → chunk-7MBTBYTJ.js} +3 -3
- package/dist/{chunk-XIU7K2YE.js → chunk-ADZI4ROA.js} +1 -1
- package/dist/{chunk-SAJ4D3Z2.js → chunk-AMVX4DDT.js} +7 -3
- package/dist/{chunk-7JNO265Q.js → chunk-B4XRAVHL.js} +33 -17
- package/dist/{chunk-MDI73RL6.js → chunk-B7MVYR7C.js} +7 -4
- package/dist/{chunk-OFPZUTBI.js → chunk-BEV2X4YL.js} +2 -1
- package/dist/chunk-BG2W2KVE.js +200 -0
- package/dist/chunk-BKHH2CJA.js +146 -0
- package/dist/{chunk-XRVVZA2Y.js → chunk-CACW5LH3.js} +1 -1
- package/dist/{chunk-I2WXKWTQ.js → chunk-CBJUY4WE.js} +10 -5
- package/dist/{chunk-746WX2DF.js → chunk-CSTI5CTF.js} +8 -2
- package/dist/{chunk-3KS5EN3Q.js → chunk-D2JJSUXI.js} +1 -1
- package/dist/chunk-D4AYULMF.js +338 -0
- package/dist/{chunk-4XM6DKEO.js → chunk-DD2TBHSJ.js} +2 -1
- package/dist/{chunk-B5OESWCR.js → chunk-DPLH3EGO.js} +1 -1
- package/dist/{chunk-5TSQZY34.js → chunk-DU3CZ3K7.js} +1 -1
- package/dist/{chunk-YON5SU2G.js → chunk-DWA62IYV.js} +5 -2
- package/dist/{chunk-FUNXYRSG.js → chunk-DWZT455C.js} +24 -9
- package/dist/{chunk-WSTQ6WZO.js → chunk-ECGJ6D5D.js} +3 -2
- package/dist/{chunk-3JNUC3FU.js → chunk-EN6XBXW5.js} +1 -1
- package/dist/{chunk-GJ3R6IZL.js → chunk-EOZDJA7Z.js} +1 -1
- package/dist/{chunk-KXWC2UHE.js → chunk-FBIGYEFN.js} +6 -3
- package/dist/{chunk-RS3XHHDE.js → chunk-FDE3S2YK.js} +1 -1
- package/dist/{chunk-DRX3KRNL.js → chunk-FFRJW5O7.js} +3 -2
- package/dist/{chunk-UEOEWP7L.js → chunk-FIPWA5KL.js} +3 -2
- package/dist/chunk-FLCT7THQ.js +75 -0
- package/dist/{chunk-RTAHGY6P.js → chunk-FOJRZASV.js} +7 -1
- package/dist/{chunk-CA7YQ5BJ.js → chunk-FQ4YUKAE.js} +3 -3
- package/dist/{chunk-33N6SZB5.js → chunk-FXXR3FM3.js} +6 -3
- package/dist/{chunk-BGVAXPHD.js → chunk-G7WTEBMX.js} +21 -6
- package/dist/{chunk-HPVPHWDM.js → chunk-IATF2OTU.js} +1 -1
- package/dist/{chunk-CLCP2GFW.js → chunk-IDXERBKL.js} +3 -3
- package/dist/{chunk-NB7X26PY.js → chunk-IF6CWIUB.js} +1 -1
- package/dist/{chunk-WVIV4JBH.js → chunk-ITGWD7ZY.js} +2 -2
- package/dist/{chunk-2LZM435Z.js → chunk-IVCHYE55.js} +7 -1
- package/dist/{chunk-BH2DLHFW.js → chunk-JE2MAZGR.js} +3 -2
- package/dist/{chunk-W57O4RLL.js → chunk-JF4BKHFK.js} +37 -9
- package/dist/{chunk-QDRBMWRX.js → chunk-JLCSRNI2.js} +7 -3
- package/dist/{chunk-7L4YE6HM.js → chunk-JNNMKFEQ.js} +1 -1
- package/dist/{chunk-GDTSCUHY.js → chunk-JRD6FENH.js} +1 -1
- package/dist/{chunk-F5I6EK7F.js → chunk-JSS4QASL.js} +1 -1
- package/dist/{chunk-B5F775GP.js → chunk-JWBGI7FN.js} +1 -1
- package/dist/{chunk-WTNNS7AX.js → chunk-JX7V6EFT.js} +36 -9
- package/dist/{chunk-7SNVRPED.js → chunk-KEMC4RIF.js} +2 -1
- package/dist/chunk-KVARQNGF.js +123 -0
- package/dist/chunk-LDTCIVDX.js +146 -0
- package/dist/{chunk-45VUWOHQ.js → chunk-LKRE4HLZ.js} +4 -2
- package/dist/{chunk-ZN3W5PAI.js → chunk-LOHFV5JF.js} +1 -1
- package/dist/chunk-LS6CFF6X.js +80 -0
- package/dist/{chunk-I5NZSWDW.js → chunk-MAKFUH34.js} +33 -17
- package/dist/{chunk-OQU6KGVR.js → chunk-MDB4RFMV.js} +1 -1
- package/dist/{chunk-FDHU3RWR.js → chunk-MJJU6OLM.js} +1 -1
- package/dist/{chunk-PIC5ZIR3.js → chunk-MPH64VG7.js} +1 -1
- package/dist/{chunk-AYSC7AIC.js → chunk-MVE7RJJ6.js} +1 -1
- package/dist/{chunk-2SQQFICY.js → chunk-N3X4T5OR.js} +25 -8
- package/dist/{chunk-CNY76NHF.js → chunk-NFJDL44V.js} +7 -3
- package/dist/{chunk-FJGGXXTT.js → chunk-NPVUFQGC.js} +1 -1
- package/dist/{chunk-QSLS3ENY.js → chunk-NVLYF4UL.js} +1 -1
- package/dist/chunk-O626XQW2.js +165 -0
- package/dist/chunk-OH5VAD27.js +224 -0
- package/dist/{chunk-TIAKMX7U.js → chunk-OIOZQP2H.js} +1 -1
- package/dist/{chunk-56BEMYK3.js → chunk-OU3EEX4Y.js} +1 -1
- package/dist/{chunk-6AZKJUL4.js → chunk-OUIOJROO.js} +1 -1
- package/dist/{chunk-OLNMOTAD.js → chunk-PAXDHYBX.js} +18 -4
- package/dist/chunk-PIE76JKF.js +224 -0
- package/dist/{chunk-6B6NTRMC.js → chunk-PIXHOFUT.js} +7 -2
- package/dist/{chunk-FATLQKRY.js → chunk-PZ2ZUHC3.js} +3 -3
- package/dist/chunk-Q5A5OTLI.js +192 -0
- package/dist/{chunk-TXRLBMFL.js → chunk-QASSYLQQ.js} +3 -2
- package/dist/{chunk-TCID6NNE.js → chunk-QJXVIEB5.js} +1 -1
- package/dist/{chunk-K5PWBSVO.js → chunk-QWOO4V7N.js} +2 -2
- package/dist/chunk-RGVRHFKY.js +213 -0
- package/dist/{chunk-J6GK2V2C.js → chunk-RQNXELUL.js} +2 -1
- package/dist/{chunk-KQCXQY5K.js → chunk-RXOVKEYG.js} +2 -1
- package/dist/{chunk-NICNFGHT.js → chunk-S2VTHA6G.js} +2 -2
- package/dist/chunk-SCQ6A4ZG.js +247 -0
- package/dist/{chunk-EVCUN45S.js → chunk-SMZVKQKM.js} +3 -2
- package/dist/{chunk-GERWW3CA.js → chunk-SR4NYQWO.js} +2 -2
- package/dist/{chunk-DQWKBQBT.js → chunk-TAAAYFBT.js} +2 -2
- package/dist/{chunk-S2DJLW6B.js → chunk-TBMUSER2.js} +1 -1
- package/dist/chunk-TMOEFAXQ.js +165 -0
- package/dist/chunk-TXC6CCSA.js +75 -0
- package/dist/chunk-UC55XR76.js +193 -0
- package/dist/{chunk-5U4H2CXC.js → chunk-UJYZZSII.js} +11 -4
- package/dist/chunk-UOOGRGEC.js +185 -0
- package/dist/{chunk-ZBF2UYXP.js → chunk-USDST2TI.js} +1 -1
- package/dist/{chunk-W7RITVDV.js → chunk-UX6CWJT7.js} +1 -1
- package/dist/{chunk-U7BYEW3Y.js → chunk-UZF7SCRT.js} +13 -5
- package/dist/{chunk-Q7OHWQP2.js → chunk-V7JUJQNR.js} +1 -0
- package/dist/{chunk-WWQV7LE7.js → chunk-VNUX5LOC.js} +24 -9
- package/dist/{chunk-CTO36MY2.js → chunk-VS3GQ4JR.js} +2 -2
- package/dist/{chunk-UMDVPRJW.js → chunk-VTTXURIB.js} +1 -1
- package/dist/{chunk-6NNHSXFD.js → chunk-W2S6JDBM.js} +1 -1
- package/dist/{chunk-3XMVXIOF.js → chunk-W5M3EHJL.js} +4 -2
- package/dist/chunk-X2VID7XY.js +228 -0
- package/dist/{chunk-H7D6G3GQ.js → chunk-X4JYOCFA.js} +7 -1
- package/dist/{chunk-6VQTFRSP.js → chunk-XKA3LTJZ.js} +37 -9
- package/dist/{chunk-7GKCX4IE.js → chunk-XUZH4Y52.js} +1 -1
- package/dist/{chunk-UAP47MSR.js → chunk-Y4JOW2UW.js} +11 -5
- package/dist/{chunk-T4SOPNM5.js → chunk-YCXZ3TYF.js} +1 -1
- package/dist/{chunk-2KJNBHUV.js → chunk-YF3XSH54.js} +2 -1
- package/dist/{chunk-66OZ7CBK.js → chunk-YJAZHJY3.js} +1 -1
- package/dist/{chunk-4WK3F76T.js → chunk-YLILJ2FH.js} +1 -1
- package/dist/{chunk-FGQPCDXI.js → chunk-YNPG4WOS.js} +1 -1
- package/dist/chunk-YPFZXGPT.js +160 -0
- package/dist/{chunk-KYFZ5TTK.js → chunk-YRPLUNP4.js} +3 -1
- package/dist/{chunk-P3USWDWR.js → chunk-YVGC7QT7.js} +4 -2
- package/dist/{chunk-4ZJEAWNG.js → chunk-Z2DF2YL5.js} +4 -2
- package/dist/{chunk-JAQANAOP.js → chunk-ZUH7XRX7.js} +19 -4
- package/dist/{chunk-UWQ26LYZ.js → chunk-ZYI6J34Q.js} +2 -2
- package/dist/{chunk-BOJCW7Z7.js → chunk-ZZ25XSK2.js} +3 -2
- package/dist/color-picker.js +1 -1
- package/dist/combo-lock.js +1 -1
- package/dist/combobox-aui-046.js +1 -1
- package/dist/combobox-aui-047.js +1 -1
- package/dist/combobox.js +1 -1
- package/dist/command-palette.js +1 -1
- package/dist/comments.js +2 -2
- package/dist/context-menu.js +1 -1
- package/dist/cookie-consent.d.ts +2 -0
- package/dist/cookie-consent.js +13 -0
- package/dist/countdown.d.ts +2 -0
- package/dist/countdown.js +9 -0
- package/dist/data-table.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/field.js +1 -1
- package/dist/file-manager.d.ts +2 -0
- package/dist/file-manager.js +19 -0
- package/dist/flash-sale.d.ts +2 -0
- package/dist/flash-sale.js +7 -0
- package/dist/footer-aui-027.js +1 -1
- package/dist/footer-aui-028.js +1 -1
- package/dist/footer.js +1 -1
- package/dist/hover-card.js +1 -1
- package/dist/inbox.d.ts +2 -0
- package/dist/inbox.js +11 -0
- package/dist/index.js +166 -90
- package/dist/inline-edit.js +1 -1
- package/dist/input-aui-029.js +1 -1
- package/dist/input-aui-030.js +1 -1
- package/dist/input-aui-031.js +1 -1
- package/dist/input-aui-032.js +1 -1
- package/dist/input-aui-033.js +1 -1
- package/dist/input-aui-034.js +1 -1
- package/dist/input.js +1 -1
- package/dist/invoice.d.ts +2 -0
- package/dist/invoice.js +10 -0
- package/dist/kanban.js +2 -2
- package/dist/menubar.d.ts +2 -0
- package/dist/menubar.js +9 -0
- package/dist/meter.d.ts +2 -0
- package/dist/meter.js +9 -0
- package/dist/morse-tap.js +1 -1
- package/dist/navbar-aui-009.js +1 -1
- package/dist/navbar-aui-011.js +1 -1
- package/dist/navbar-aui-012.js +1 -1
- package/dist/navbar-aui-013.js +1 -1
- package/dist/navbar.js +1 -1
- package/dist/notification-center.js +3 -3
- package/dist/number-input.js +1 -1
- package/dist/order-book.js +1 -1
- package/dist/otp-input-aui-041.js +1 -1
- package/dist/otp-input-aui-042.js +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/password-input-aui-039.js +1 -1
- package/dist/password-input-aui-040.js +1 -1
- package/dist/password-input.js +1 -1
- package/dist/payment-received.js +1 -1
- package/dist/phone-input.d.ts +2 -0
- package/dist/phone-input.js +13 -0
- package/dist/popover.js +1 -1
- package/dist/price-alert.d.ts +2 -0
- package/dist/price-alert.js +7 -0
- package/dist/price-chart.js +1 -1
- package/dist/properties-panel.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/select-aui-045.js +1 -1
- package/dist/select.js +1 -1
- package/dist/settings-panel.js +1 -1
- package/dist/shipment-tracker.js +1 -1
- package/dist/sidebar.js +2 -2
- package/dist/sign-in-aui-015.js +1 -1
- package/dist/sign-in-aui-016.js +1 -1
- package/dist/sign-in-aui-017.js +1 -1
- package/dist/sign-in-aui-018.js +1 -1
- package/dist/sign-in-aui-019.js +1 -1
- package/dist/sign-in-aui-020.js +1 -1
- package/dist/sign-in.js +1 -1
- package/dist/snap-grid.js +1 -1
- package/dist/sortable-list.d.ts +2 -0
- package/dist/sortable-list.js +9 -0
- package/dist/split-bill.d.ts +2 -0
- package/dist/split-bill.js +7 -0
- package/dist/stat-card.js +1 -1
- package/dist/styles.css +2 -2
- package/dist/tag-input-aui-048.js +1 -1
- package/dist/tag-input-aui-049.js +1 -1
- package/dist/tag-input.js +1 -1
- package/dist/team-members.js +3 -3
- package/dist/testimonials.d.ts +2 -0
- package/dist/testimonials.js +10 -0
- package/dist/textarea-aui-001.js +1 -1
- package/dist/textarea-aui-002.js +1 -1
- package/dist/textarea-aui-003.js +1 -1
- package/dist/textarea-aui-004.js +1 -1
- package/dist/textarea-aui-005.js +1 -1
- package/dist/textarea-aui-006.js +1 -1
- package/dist/textarea-aui-007.js +1 -1
- package/dist/textarea-aui-008.js +1 -1
- package/dist/textarea-aui-035.js +1 -1
- package/dist/textarea-aui-036.js +1 -1
- package/dist/textarea-aui-037.js +1 -1
- package/dist/textarea-aui-038.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/token-swap.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/trade-ticket.js +1 -1
- package/dist/types/components/kit/base/billing.d.ts +53 -0
- package/dist/types/components/kit/base/cookie-consent.d.ts +37 -0
- package/dist/types/components/kit/base/file-manager.d.ts +41 -0
- package/dist/types/components/kit/base/inbox.d.ts +33 -0
- package/dist/types/components/kit/base/invoice.d.ts +45 -0
- package/dist/types/components/kit/base/testimonials.d.ts +25 -0
- package/dist/types/components/kit/billing.d.ts +53 -0
- package/dist/types/components/kit/chart-card.d.ts +43 -0
- package/dist/types/components/kit/cookie-consent.d.ts +37 -0
- package/dist/types/components/kit/countdown.d.ts +21 -0
- package/dist/types/components/kit/file-manager.d.ts +41 -0
- package/dist/types/components/kit/inbox.d.ts +33 -0
- package/dist/types/components/kit/invoice.d.ts +45 -0
- package/dist/types/components/kit/menubar.d.ts +41 -0
- package/dist/types/components/kit/meter.d.ts +32 -0
- package/dist/types/components/kit/number-input.d.ts +3 -1
- package/dist/types/components/kit/phone-input.d.ts +42 -0
- package/dist/types/components/kit/sortable-list.d.ts +25 -0
- package/dist/types/components/kit/tag-input.d.ts +3 -1
- package/dist/types/components/kit/testimonials.d.ts +25 -0
- package/dist/types/components/lab/blocks/FlashSale.d.ts +2 -0
- package/dist/types/components/lab/blocks/PriceAlert.d.ts +2 -0
- package/dist/types/components/lab/blocks/SplitBill.d.ts +2 -0
- package/dist/types/components/lab/blocks/Watchlist.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/billing.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/chart-card.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/cookie-consent.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/countdown.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/file-manager.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/flash-sale.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/inbox.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/invoice.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/menubar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/meter.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/phone-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/price-alert.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sortable-list.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/split-bill.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/testimonials.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/watchlist.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base.d.ts +29 -1
- package/dist/types/packages/asta-ui/src/billing.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/chart-card.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/cookie-consent.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/countdown.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/file-manager.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/flash-sale.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/inbox.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/index.d.ts +29 -1
- package/dist/types/packages/asta-ui/src/invoice.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/menubar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/meter.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/phone-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/price-alert.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sortable-list.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/split-bill.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/testimonials.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/watchlist.d.ts +2 -0
- package/dist/watchlist.d.ts +2 -0
- package/dist/watchlist.js +7 -0
- 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-
|
|
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))
|
|
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" ?
|
|
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) ? "
|
|
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:
|
|
40
|
-
p.animate([{ transform: "none", opacity: 1 }, { transform: fromTrigger(), opacity: 0 }], { duration:
|
|
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
|
),
|