asta-ui 0.9.2 → 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,192 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/sortable-list.tsx
|
|
4
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var EASE = "cubic-bezier(.16,1,.3,1)";
|
|
8
|
+
var move = (list, from, to) => {
|
|
9
|
+
const next = list.slice();
|
|
10
|
+
const [it] = next.splice(from, 1);
|
|
11
|
+
next.splice(to, 0, it);
|
|
12
|
+
return next;
|
|
13
|
+
};
|
|
14
|
+
var Grip = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "currentColor", "aria-hidden": true, children: [4, 8, 12].flatMap((y) => [6, 10].map((x) => /* @__PURE__ */ jsx("circle", { cx: x, cy: y, r: "1.15" }, `${x}${y}`))) });
|
|
15
|
+
function SortableList({ items, onReorder, renderItem, label, getLabel = (it) => it.id, className }) {
|
|
16
|
+
const [drag, setDrag] = useState(null);
|
|
17
|
+
const [grabbed, setGrabbed] = useState(null);
|
|
18
|
+
const [say, setSay] = useState("");
|
|
19
|
+
const rows = useRef(/* @__PURE__ */ new Map());
|
|
20
|
+
const handles = useRef(/* @__PURE__ */ new Map());
|
|
21
|
+
const flip = useRef(null);
|
|
22
|
+
const before = useRef(null);
|
|
23
|
+
const reduce = useRef(false);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
reduce.current = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
26
|
+
}, []);
|
|
27
|
+
const snapshot = () => {
|
|
28
|
+
const m = /* @__PURE__ */ new Map();
|
|
29
|
+
rows.current.forEach((el, id) => m.set(id, el.getBoundingClientRect().top));
|
|
30
|
+
flip.current = m;
|
|
31
|
+
};
|
|
32
|
+
useLayoutEffect(() => {
|
|
33
|
+
const m = flip.current;
|
|
34
|
+
if (!m) return;
|
|
35
|
+
flip.current = null;
|
|
36
|
+
if (reduce.current) return;
|
|
37
|
+
rows.current.forEach((el, id) => {
|
|
38
|
+
const old = m.get(id);
|
|
39
|
+
if (old === void 0) return;
|
|
40
|
+
const d = old - el.getBoundingClientRect().top;
|
|
41
|
+
if (Math.abs(d) > 0.5) el.animate([{ transform: `translateY(${d}px)` }, { transform: "none" }], { duration: 320, easing: EASE });
|
|
42
|
+
});
|
|
43
|
+
if (grabbed) handles.current.get(grabbed)?.focus();
|
|
44
|
+
}, [items, grabbed]);
|
|
45
|
+
const name = (id) => {
|
|
46
|
+
const it = items.find((x) => x.id === id);
|
|
47
|
+
return it ? getLabel(it) : id;
|
|
48
|
+
};
|
|
49
|
+
const onDown = (e, id, index) => {
|
|
50
|
+
if (e.button !== 0 || grabbed) return;
|
|
51
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
52
|
+
const els = items.map((it) => rows.current.get(it.id));
|
|
53
|
+
const tops = els.map((el) => el.offsetTop);
|
|
54
|
+
const heights = els.map((el) => el.offsetHeight);
|
|
55
|
+
const gap = els.length > 1 ? tops[1] - tops[0] - heights[0] : 0;
|
|
56
|
+
setDrag({ id, from: index, to: index, startY: e.clientY, tops, heights, gap });
|
|
57
|
+
setSay(`Picked up ${name(id)}.`);
|
|
58
|
+
};
|
|
59
|
+
const onMove = (e) => {
|
|
60
|
+
if (!drag) return;
|
|
61
|
+
const dy = e.clientY - drag.startY;
|
|
62
|
+
const el = rows.current.get(drag.id);
|
|
63
|
+
if (el) el.style.transform = `translateY(${dy}px) scale(1.015)`;
|
|
64
|
+
const center = drag.tops[drag.from] + drag.heights[drag.from] / 2 + dy;
|
|
65
|
+
let to = drag.from;
|
|
66
|
+
drag.tops.forEach((t, i) => {
|
|
67
|
+
const mid = t + drag.heights[i] / 2;
|
|
68
|
+
if (i > drag.from && center > mid) to = i;
|
|
69
|
+
if (i < drag.from && center < mid && i < to) to = i;
|
|
70
|
+
});
|
|
71
|
+
if (to !== drag.to) setDrag({ ...drag, to });
|
|
72
|
+
};
|
|
73
|
+
const onUp = (e) => {
|
|
74
|
+
if (!drag) return;
|
|
75
|
+
const el = rows.current.get(drag.id);
|
|
76
|
+
setDrag(null);
|
|
77
|
+
if (drag.to !== drag.from) {
|
|
78
|
+
snapshot();
|
|
79
|
+
if (el) el.style.transform = "";
|
|
80
|
+
onReorder(move(items, drag.from, drag.to));
|
|
81
|
+
setSay(`${name(drag.id)} dropped at position ${drag.to + 1} of ${items.length}.`);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
if (el) {
|
|
85
|
+
el.style.transform = "";
|
|
86
|
+
const dy = e.clientY - drag.startY;
|
|
87
|
+
if (!reduce.current && Math.abs(dy) > 0.5) el.animate([{ transform: `translateY(${dy}px)` }, { transform: "none" }], { duration: 320, easing: EASE });
|
|
88
|
+
}
|
|
89
|
+
setSay(`${name(drag.id)} dropped. Position unchanged.`);
|
|
90
|
+
};
|
|
91
|
+
const onKey = (e, id, index) => {
|
|
92
|
+
const n = items.length;
|
|
93
|
+
if (e.key === " " || e.key === "Enter") {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
if (grabbed) {
|
|
96
|
+
setGrabbed(null);
|
|
97
|
+
before.current = null;
|
|
98
|
+
setSay(`${name(id)} dropped at position ${index + 1} of ${n}.`);
|
|
99
|
+
} else {
|
|
100
|
+
setGrabbed(id);
|
|
101
|
+
before.current = items;
|
|
102
|
+
setSay(`Picked up ${name(id)}, position ${index + 1} of ${n}. Use the up and down arrows to move it, Space to drop, Escape to cancel.`);
|
|
103
|
+
}
|
|
104
|
+
} else if (grabbed === id && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
const to = Math.max(0, Math.min(n - 1, index + (e.key === "ArrowUp" ? -1 : 1)));
|
|
107
|
+
if (to === index) return;
|
|
108
|
+
snapshot();
|
|
109
|
+
onReorder(move(items, index, to));
|
|
110
|
+
setSay(`${name(id)} moved to position ${to + 1} of ${n}.`);
|
|
111
|
+
} else if (grabbed === id && e.key === "Escape") {
|
|
112
|
+
e.preventDefault();
|
|
113
|
+
if (before.current) {
|
|
114
|
+
snapshot();
|
|
115
|
+
onReorder(before.current);
|
|
116
|
+
}
|
|
117
|
+
before.current = null;
|
|
118
|
+
setGrabbed(null);
|
|
119
|
+
setSay(`Cancelled. ${name(id)} is back where it was.`);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const shiftFor = (i) => {
|
|
123
|
+
if (!drag || i === drag.from) return 0;
|
|
124
|
+
const h = drag.heights[drag.from] + drag.gap;
|
|
125
|
+
if (drag.from < drag.to && i > drag.from && i <= drag.to) return -h;
|
|
126
|
+
if (drag.to < drag.from && i >= drag.to && i < drag.from) return h;
|
|
127
|
+
return 0;
|
|
128
|
+
};
|
|
129
|
+
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
130
|
+
/* @__PURE__ */ jsx("ul", { "aria-label": label, className: "flex flex-col gap-1.5", children: items.map((it, i) => {
|
|
131
|
+
const dragging = drag?.id === it.id;
|
|
132
|
+
const lifted = dragging || grabbed === it.id;
|
|
133
|
+
const shift = shiftFor(i);
|
|
134
|
+
return /* @__PURE__ */ jsxs(
|
|
135
|
+
"li",
|
|
136
|
+
{
|
|
137
|
+
ref: (el) => {
|
|
138
|
+
if (el) rows.current.set(it.id, el);
|
|
139
|
+
else rows.current.delete(it.id);
|
|
140
|
+
},
|
|
141
|
+
style: dragging ? void 0 : { transform: shift ? `translateY(${shift}px)` : void 0, transition: drag ? `transform .28s ${EASE}` : void 0 },
|
|
142
|
+
className: cx(
|
|
143
|
+
"relative flex items-center gap-2 rounded-[11px] bg-paper py-2 pl-1.5 pr-3",
|
|
144
|
+
"shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)] transition-shadow duration-200",
|
|
145
|
+
lifted && "z-10 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--brand)_55%,transparent),0_14px_30px_-14px_rgb(0_0_0/0.35)]"
|
|
146
|
+
),
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
"button",
|
|
150
|
+
{
|
|
151
|
+
ref: (el) => {
|
|
152
|
+
if (el) handles.current.set(it.id, el);
|
|
153
|
+
else handles.current.delete(it.id);
|
|
154
|
+
},
|
|
155
|
+
type: "button",
|
|
156
|
+
"aria-label": `Reorder ${getLabel(it)}`,
|
|
157
|
+
"aria-pressed": grabbed === it.id,
|
|
158
|
+
onPointerDown: (e) => onDown(e, it.id, i),
|
|
159
|
+
onPointerMove: onMove,
|
|
160
|
+
onPointerUp: onUp,
|
|
161
|
+
onPointerCancel: onUp,
|
|
162
|
+
onKeyDown: (e) => onKey(e, it.id, i),
|
|
163
|
+
onBlur: () => {
|
|
164
|
+
if (grabbed === it.id && !flip.current) {
|
|
165
|
+
setGrabbed(null);
|
|
166
|
+
before.current = null;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
className: cx(
|
|
170
|
+
"flex h-8 w-7 shrink-0 touch-none items-center justify-center rounded-md outline-none transition-colors",
|
|
171
|
+
"focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
172
|
+
dragging ? "cursor-grabbing text-ink" : "cursor-grab text-mute hover:bg-paper-2 hover:text-ink",
|
|
173
|
+
grabbed === it.id && "bg-brand text-white hover:bg-brand hover:text-white"
|
|
174
|
+
),
|
|
175
|
+
children: /* @__PURE__ */ jsx(Grip, {})
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: renderItem(it, { index: i, dragging: lifted }) })
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
it.id
|
|
182
|
+
);
|
|
183
|
+
}) }),
|
|
184
|
+
/* @__PURE__ */ jsx("p", { "aria-live": "assertive", className: "sr-only", children: say })
|
|
185
|
+
] });
|
|
186
|
+
}
|
|
187
|
+
var sortable_list_default = SortableList;
|
|
188
|
+
|
|
189
|
+
export {
|
|
190
|
+
SortableList,
|
|
191
|
+
sortable_list_default
|
|
192
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Avatar
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6RA7LJ3K.js";
|
|
5
5
|
import {
|
|
6
6
|
Button
|
|
7
7
|
} from "./chunk-ZWBJUJTR.js";
|
|
@@ -39,6 +39,7 @@ function Composer({
|
|
|
39
39
|
{
|
|
40
40
|
ref: area,
|
|
41
41
|
id,
|
|
42
|
+
name: "body",
|
|
42
43
|
rows: 1,
|
|
43
44
|
value: text,
|
|
44
45
|
autoFocus,
|
|
@@ -54,7 +55,7 @@ function Composer({
|
|
|
54
55
|
onCancel();
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
|
-
className: "block max-h-40 min-h-[44px] w-full resize-none bg-transparent px-3 pt-2.5 text-[14px] leading-relaxed text-ink outline-none [field-sizing:content] placeholder:text-mute"
|
|
58
|
+
className: "block max-h-40 min-h-[44px] w-full resize-none bg-transparent px-3 pt-2.5 text-[16px] sm:text-[14px] leading-relaxed text-ink outline-none [field-sizing:content] placeholder:text-mute"
|
|
58
59
|
}
|
|
59
60
|
),
|
|
60
61
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1.5 px-2 pb-2", children: [
|
|
@@ -33,7 +33,7 @@ function DropdownMenu({ children, groups, align = "start", variant = "outline",
|
|
|
33
33
|
"min-w-[232px] rounded-xl bg-paper p-1.5 outline-none",
|
|
34
34
|
"shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_12px_32px_-12px_rgb(0_0_0/0.28),0_4px_10px_-6px_rgb(0_0_0/0.12)]",
|
|
35
35
|
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-200 ease-[cubic-bezier(.16,1,.3,1)]",
|
|
36
|
-
"data-[starting-style]:scale-[.96] data-[starting-style]:opacity-0 data-[ending-style]:scale-[.97] data-[ending-style]:opacity-0 data-[ending-style]:duration-[120ms] data-[ending-style]:ease-
|
|
36
|
+
"data-[starting-style]:scale-[.96] data-[starting-style]:opacity-0 data-[ending-style]:scale-[.97] data-[ending-style]:opacity-0 data-[ending-style]:duration-[120ms] data-[ending-style]:ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:!transition-none"
|
|
37
37
|
),
|
|
38
38
|
children: groups.map((g, gi) => /* @__PURE__ */ jsxs(Menu.Group, { children: [
|
|
39
39
|
gi > 0 && /* @__PURE__ */ jsx(Menu.Separator, { className: "mx-1 my-1.5 h-px bg-[color-mix(in_srgb,var(--ink)_8%,transparent)]" }),
|
|
@@ -20,7 +20,7 @@ function SuggestTagInput({
|
|
|
20
20
|
suggestions = SUGGEST,
|
|
21
21
|
max = 6,
|
|
22
22
|
label = "Tags",
|
|
23
|
-
placeholder = "Add a tag",
|
|
23
|
+
placeholder = "Add a tag\u2026",
|
|
24
24
|
name,
|
|
25
25
|
className
|
|
26
26
|
}) {
|
|
@@ -157,7 +157,7 @@ function SuggestTagInput({
|
|
|
157
157
|
} else if (e.key === "Escape") setText("");
|
|
158
158
|
},
|
|
159
159
|
onBlur: () => text.trim() && add(text),
|
|
160
|
-
className: "relative h-7 w-full bg-transparent px-1.5 text-[13.5px] text-ink outline-none placeholder:text-mute disabled:cursor-not-allowed"
|
|
160
|
+
className: "relative h-7 w-full bg-transparent px-1.5 text-[16px] sm:text-[13.5px] text-ink outline-none placeholder:text-mute disabled:cursor-not-allowed"
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
] })
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/menubar.tsx
|
|
4
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var KEYFRAMES = `@keyframes asta-menubar-in { from { opacity: 0; transform: translateY(-4px) scale(.97) } }
|
|
8
|
+
@media (prefers-reduced-motion: reduce) { .asta-menubar-panel { animation: none !important } }`;
|
|
9
|
+
var actionable = (it) => it.type !== "separator" && it.type !== "label";
|
|
10
|
+
var enabled = (it) => actionable(it) && !it.disabled;
|
|
11
|
+
var Check = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.9", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m3.5 8.5 3 3 6-7" }) });
|
|
12
|
+
function Menubar({ menus, label = "Menu bar", className }) {
|
|
13
|
+
const [open, setOpen] = useState(null);
|
|
14
|
+
const [focus, setFocus] = useState(0);
|
|
15
|
+
const [hi, setHi] = useState(-1);
|
|
16
|
+
const [instant, setInstant] = useState(false);
|
|
17
|
+
const [shift, setShift] = useState(0);
|
|
18
|
+
const root = useRef(null);
|
|
19
|
+
const tops = useRef([]);
|
|
20
|
+
const items = useRef([]);
|
|
21
|
+
const panel = useRef(null);
|
|
22
|
+
const first = (m, from = -1, dir = 1) => {
|
|
23
|
+
const list = menus[m].items;
|
|
24
|
+
for (let k = 1; k <= list.length; k++) {
|
|
25
|
+
const i = (from + dir * k + list.length * 2) % list.length;
|
|
26
|
+
if (enabled(list[i])) return i;
|
|
27
|
+
}
|
|
28
|
+
return -1;
|
|
29
|
+
};
|
|
30
|
+
const show = (m, highlight = -1) => {
|
|
31
|
+
setInstant(open !== null && m !== null);
|
|
32
|
+
setOpen(m);
|
|
33
|
+
setHi(highlight);
|
|
34
|
+
if (m !== null) setFocus(m);
|
|
35
|
+
};
|
|
36
|
+
const close = (refocus = true) => {
|
|
37
|
+
const m = open;
|
|
38
|
+
show(null);
|
|
39
|
+
if (refocus && m !== null) tops.current[m]?.focus();
|
|
40
|
+
};
|
|
41
|
+
useLayoutEffect(() => {
|
|
42
|
+
const el = panel.current;
|
|
43
|
+
if (!el) return;
|
|
44
|
+
const r = el.getBoundingClientRect();
|
|
45
|
+
const over = r.right - (window.innerWidth - 8);
|
|
46
|
+
setShift(over > 0 ? -Math.min(over, r.left - 8) : 0);
|
|
47
|
+
}, [open]);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (open !== null && hi >= 0) items.current[hi]?.focus();
|
|
50
|
+
}, [open, hi]);
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (open === null) return;
|
|
53
|
+
const down = (e) => {
|
|
54
|
+
if (!root.current?.contains(e.target)) {
|
|
55
|
+
setOpen(null);
|
|
56
|
+
setHi(-1);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
document.addEventListener("pointerdown", down);
|
|
60
|
+
return () => document.removeEventListener("pointerdown", down);
|
|
61
|
+
}, [open]);
|
|
62
|
+
const activate = (it) => {
|
|
63
|
+
if (!enabled(it)) return;
|
|
64
|
+
if (it.type === "checkbox") it.onCheckedChange(!it.checked);
|
|
65
|
+
else if (it.type === "radio" || it.type === void 0 || it.type === "item") it.onSelect?.();
|
|
66
|
+
close();
|
|
67
|
+
};
|
|
68
|
+
const onTopKey = (e, i) => {
|
|
69
|
+
const n = menus.length;
|
|
70
|
+
const go = (j) => {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
setFocus(j);
|
|
73
|
+
tops.current[j]?.focus();
|
|
74
|
+
if (open !== null) show(j, first(j));
|
|
75
|
+
};
|
|
76
|
+
if (e.key === "ArrowRight") go((i + 1) % n);
|
|
77
|
+
else if (e.key === "ArrowLeft") go((i - 1 + n) % n);
|
|
78
|
+
else if (e.key === "Home") go(0);
|
|
79
|
+
else if (e.key === "End") go(n - 1);
|
|
80
|
+
else if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
show(i, first(i));
|
|
83
|
+
} else if (e.key === "ArrowUp") {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
show(i, first(i, 0, -1));
|
|
86
|
+
} else if (e.key === "Escape" && open !== null) {
|
|
87
|
+
e.preventDefault();
|
|
88
|
+
close();
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const onMenuKey = (e) => {
|
|
92
|
+
if (open === null) return;
|
|
93
|
+
const list = menus[open].items;
|
|
94
|
+
const n = menus.length;
|
|
95
|
+
const k = e.key;
|
|
96
|
+
if (k === "ArrowDown" || k === "ArrowUp") {
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
setHi(first(open, hi < 0 && k === "ArrowUp" ? 0 : hi, k === "ArrowDown" ? 1 : -1));
|
|
99
|
+
} else if (k === "Home" || k === "End") {
|
|
100
|
+
e.preventDefault();
|
|
101
|
+
setHi(k === "Home" ? first(open) : first(open, 0, -1));
|
|
102
|
+
} else if (k === "ArrowRight" || k === "ArrowLeft") {
|
|
103
|
+
e.preventDefault();
|
|
104
|
+
const j = (open + (k === "ArrowRight" ? 1 : -1) + n) % n;
|
|
105
|
+
show(j, first(j));
|
|
106
|
+
} else if (k === "Escape") {
|
|
107
|
+
e.preventDefault();
|
|
108
|
+
close();
|
|
109
|
+
} else if (k === "Tab") {
|
|
110
|
+
close(false);
|
|
111
|
+
} else if (k.length === 1 && /\S/.test(k)) {
|
|
112
|
+
const ch = k.toLowerCase();
|
|
113
|
+
for (let s = 1; s <= list.length; s++) {
|
|
114
|
+
const i = (hi + s) % list.length;
|
|
115
|
+
const it = list[i];
|
|
116
|
+
if (enabled(it) && actionable(it) && it.label.toLowerCase().startsWith(ch)) {
|
|
117
|
+
setHi(i);
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
return /* @__PURE__ */ jsxs("div", { ref: root, role: "menubar", "aria-label": label, className: cx("relative flex items-center gap-0.5", className), children: [
|
|
124
|
+
/* @__PURE__ */ jsx("style", { href: "asta-menubar", precedence: "asta", children: KEYFRAMES }),
|
|
125
|
+
menus.map((m, i) => {
|
|
126
|
+
const isOpen = open === i;
|
|
127
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
128
|
+
/* @__PURE__ */ jsx(
|
|
129
|
+
"button",
|
|
130
|
+
{
|
|
131
|
+
ref: (el) => {
|
|
132
|
+
tops.current[i] = el;
|
|
133
|
+
},
|
|
134
|
+
type: "button",
|
|
135
|
+
role: "menuitem",
|
|
136
|
+
"aria-haspopup": "menu",
|
|
137
|
+
"aria-expanded": isOpen,
|
|
138
|
+
tabIndex: focus === i ? 0 : -1,
|
|
139
|
+
onClick: () => isOpen ? close() : show(i),
|
|
140
|
+
onPointerEnter: (e) => {
|
|
141
|
+
if (e.pointerType === "mouse" && open !== null && open !== i) show(i);
|
|
142
|
+
},
|
|
143
|
+
onKeyDown: (e) => onTopKey(e, i),
|
|
144
|
+
className: cx(
|
|
145
|
+
"flex h-8 select-none items-center rounded-md px-2.5 text-[13px] font-medium outline-none transition-colors duration-150",
|
|
146
|
+
"focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
147
|
+
isOpen ? "bg-paper-2 text-ink" : "text-ink-2 hover:bg-paper-2 hover:text-ink"
|
|
148
|
+
),
|
|
149
|
+
children: m.label
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
isOpen && /* @__PURE__ */ jsx(
|
|
153
|
+
"div",
|
|
154
|
+
{
|
|
155
|
+
ref: panel,
|
|
156
|
+
role: "menu",
|
|
157
|
+
"aria-label": m.label,
|
|
158
|
+
onKeyDown: onMenuKey,
|
|
159
|
+
style: { transform: shift ? `translateX(${shift}px)` : void 0 },
|
|
160
|
+
className: cx(
|
|
161
|
+
"asta-menubar-panel absolute left-0 top-full z-50 mt-1.5 flex min-w-[232px] origin-top-left flex-col rounded-[11px] bg-paper p-1",
|
|
162
|
+
"shadow-[0_0_0_1px_color-mix(in_srgb,var(--ink)_9%,transparent),0_12px_32px_-12px_rgb(0_0_0/0.28),0_2px_6px_-2px_rgb(0_0_0/0.08)]",
|
|
163
|
+
!instant && "animate-[asta-menubar-in_.18s_cubic-bezier(.16,1,.3,1)_both]"
|
|
164
|
+
),
|
|
165
|
+
children: m.items.map((it, j) => {
|
|
166
|
+
if (it.type === "separator") return /* @__PURE__ */ jsx("div", { role: "separator", className: "mx-2 my-1 h-px bg-[color-mix(in_srgb,var(--ink)_8%,transparent)]" }, `s${j}`);
|
|
167
|
+
if (it.type === "label")
|
|
168
|
+
return /* @__PURE__ */ jsx("p", { className: "px-2.5 pb-1 pt-2 font-mono text-[10.5px] uppercase tracking-wider text-mute", children: it.label }, `l${j}`);
|
|
169
|
+
const role = it.type === "checkbox" ? "menuitemcheckbox" : it.type === "radio" ? "menuitemradio" : "menuitem";
|
|
170
|
+
const checked = it.type === "checkbox" || it.type === "radio" ? it.checked : void 0;
|
|
171
|
+
return /* @__PURE__ */ jsxs(
|
|
172
|
+
"button",
|
|
173
|
+
{
|
|
174
|
+
ref: (el) => {
|
|
175
|
+
items.current[j] = el;
|
|
176
|
+
},
|
|
177
|
+
type: "button",
|
|
178
|
+
role,
|
|
179
|
+
"aria-checked": checked,
|
|
180
|
+
"aria-disabled": it.disabled || void 0,
|
|
181
|
+
tabIndex: -1,
|
|
182
|
+
onClick: () => activate(it),
|
|
183
|
+
onPointerMove: () => !it.disabled && hi !== j && setHi(j),
|
|
184
|
+
className: cx(
|
|
185
|
+
"flex h-8 w-full select-none items-center gap-2 rounded-[7px] px-2 text-left text-[13px] outline-none",
|
|
186
|
+
hi === j ? "bg-paper-2 text-ink" : "text-ink-2",
|
|
187
|
+
it.disabled && "opacity-45"
|
|
188
|
+
),
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ jsxs("span", { className: "flex w-4 shrink-0 justify-center text-ink", children: [
|
|
191
|
+
it.type === "checkbox" && it.checked && /* @__PURE__ */ jsx(Check, {}),
|
|
192
|
+
it.type === "radio" && it.checked && /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }),
|
|
193
|
+
(it.type === void 0 || it.type === "item") && it.icon && /* @__PURE__ */ jsx("span", { className: "flex text-mute [&_svg]:h-3.5 [&_svg]:w-3.5", children: it.icon })
|
|
194
|
+
] }),
|
|
195
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: it.label }),
|
|
196
|
+
it.shortcut && /* @__PURE__ */ jsx("span", { className: "pl-4 text-[12px] tracking-wide text-mute", children: it.shortcut })
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
it.label
|
|
200
|
+
);
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
] }, m.label);
|
|
205
|
+
})
|
|
206
|
+
] });
|
|
207
|
+
}
|
|
208
|
+
var menubar_default = Menubar;
|
|
209
|
+
|
|
210
|
+
export {
|
|
211
|
+
Menubar,
|
|
212
|
+
menubar_default
|
|
213
|
+
};
|
|
@@ -188,6 +188,7 @@ function VerifyOtp({
|
|
|
188
188
|
{
|
|
189
189
|
ref: input,
|
|
190
190
|
id,
|
|
191
|
+
name: "code",
|
|
191
192
|
"aria-label": `${length}-digit verification code`,
|
|
192
193
|
value: code,
|
|
193
194
|
inputMode: "numeric",
|
|
@@ -207,7 +208,7 @@ function VerifyOtp({
|
|
|
207
208
|
},
|
|
208
209
|
onBlur: () => setFocused(false),
|
|
209
210
|
onSelect: toEnd,
|
|
210
|
-
className: "absolute inset-0 h-full w-full cursor-text bg-transparent text-transparent caret-transparent outline-none selection:bg-transparent disabled:cursor-default"
|
|
211
|
+
className: "absolute inset-0 h-full w-full cursor-text bg-transparent text-[16px] text-transparent caret-transparent outline-none selection:bg-transparent disabled:cursor-default"
|
|
211
212
|
}
|
|
212
213
|
)
|
|
213
214
|
] }),
|
|
@@ -107,6 +107,7 @@ function SplitOtp({ value, defaultValue = "", onChange, onComplete, error, paste
|
|
|
107
107
|
{
|
|
108
108
|
ref: input,
|
|
109
109
|
id,
|
|
110
|
+
name: "code",
|
|
110
111
|
"aria-label": label,
|
|
111
112
|
value: code,
|
|
112
113
|
inputMode: "numeric",
|
|
@@ -123,7 +124,7 @@ function SplitOtp({ value, defaultValue = "", onChange, onComplete, error, paste
|
|
|
123
124
|
},
|
|
124
125
|
onBlur: () => setFocused(false),
|
|
125
126
|
onSelect: toEnd,
|
|
126
|
-
className: "absolute inset-0 h-full w-full cursor-text bg-transparent text-transparent caret-transparent outline-none selection:bg-transparent"
|
|
127
|
+
className: "absolute inset-0 h-full w-full cursor-text bg-transparent text-[16px] text-transparent caret-transparent outline-none selection:bg-transparent"
|
|
127
128
|
}
|
|
128
129
|
)
|
|
129
130
|
] }),
|
|
@@ -62,7 +62,7 @@ function BudgetTextarea({
|
|
|
62
62
|
{
|
|
63
63
|
ref: mirror,
|
|
64
64
|
"aria-hidden": true,
|
|
65
|
-
className: "pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap break-words px-4 pb-2 pt-3.5 text-[14.5px] leading-[1.6] text-transparent",
|
|
65
|
+
className: "pointer-events-none absolute inset-0 overflow-hidden whitespace-pre-wrap break-words px-4 pb-2 pt-3.5 text-[16px] sm:text-[14.5px] leading-[1.6] text-transparent",
|
|
66
66
|
children: [
|
|
67
67
|
head,
|
|
68
68
|
/* @__PURE__ */ jsx("mark", { className: "rounded-[3px] bg-[color-mix(in_srgb,var(--brand)_16%,transparent)] text-transparent shadow-[0_1.5px_0_var(--brand)]", children: tail }),
|
|
@@ -85,7 +85,7 @@ function BudgetTextarea({
|
|
|
85
85
|
if (value === void 0) setInner(e.target.value);
|
|
86
86
|
onChange?.(e.target.value);
|
|
87
87
|
},
|
|
88
|
-
className: "relative block w-full resize-none bg-transparent px-4 pb-2 pt-3.5 text-[14.5px] leading-[1.6] text-ink outline-none placeholder:text-mute"
|
|
88
|
+
className: "relative block w-full resize-none bg-transparent px-4 pb-2 pt-3.5 text-[16px] sm:text-[14.5px] leading-[1.6] text-ink outline-none placeholder:text-mute"
|
|
89
89
|
}
|
|
90
90
|
)
|
|
91
91
|
] }),
|