asta-ui 0.2.1 → 0.4.0
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/dist/accordion.js +1 -1
- package/dist/ai-chat.d.ts +2 -0
- package/dist/ai-chat.js +9 -0
- package/dist/alert.d.ts +2 -0
- package/dist/alert.js +9 -0
- package/dist/announcement-bar.d.ts +2 -0
- package/dist/announcement-bar.js +9 -0
- package/dist/avatar-group.d.ts +2 -0
- package/dist/avatar-group.js +10 -0
- package/dist/avatar.js +3 -1
- package/dist/base/ai-chat.d.ts +2 -0
- package/dist/base/ai-chat.js +9 -0
- package/dist/base/alert.d.ts +2 -0
- package/dist/base/alert.js +9 -0
- package/dist/base/announcement-bar.d.ts +2 -0
- package/dist/base/announcement-bar.js +9 -0
- package/dist/base/avatar-group.d.ts +2 -0
- package/dist/base/avatar-group.js +10 -0
- package/dist/base/avatar.js +3 -1
- package/dist/base/booking-slots.d.ts +2 -0
- package/dist/base/booking-slots.js +7 -0
- package/dist/base/breadcrumb.d.ts +2 -0
- package/dist/base/breadcrumb.js +9 -0
- package/dist/base/card-checkout.js +1 -1
- package/dist/base/carousel.d.ts +2 -0
- package/dist/base/carousel.js +9 -0
- package/dist/base/chat-thread.d.ts +2 -0
- package/dist/base/chat-thread.js +7 -0
- package/dist/base/checkout.d.ts +2 -0
- package/dist/base/checkout.js +12 -0
- package/dist/base/color-picker.d.ts +2 -0
- package/dist/base/color-picker.js +9 -0
- package/dist/base/combobox.d.ts +2 -0
- package/dist/base/combobox.js +9 -0
- package/dist/base/comments.d.ts +2 -0
- package/dist/base/comments.js +11 -0
- package/dist/base/context-menu.d.ts +2 -0
- package/dist/base/context-menu.js +9 -0
- package/dist/base/copy-button.d.ts +2 -0
- package/dist/base/copy-button.js +9 -0
- package/dist/base/data-table.d.ts +2 -0
- package/dist/base/data-table.js +9 -0
- package/dist/base/date-picker.d.ts +2 -0
- package/dist/base/date-picker.js +9 -0
- package/dist/base/drawer.d.ts +2 -0
- package/dist/base/drawer.js +9 -0
- package/dist/base/empty-state.d.ts +2 -0
- package/dist/base/empty-state.js +10 -0
- package/dist/base/event-calendar.d.ts +2 -0
- package/dist/base/event-calendar.js +9 -0
- package/dist/base/file-upload.d.ts +2 -0
- package/dist/base/file-upload.js +11 -0
- package/dist/base/footer-aui-025.d.ts +2 -0
- package/dist/base/footer-aui-025.js +9 -0
- package/dist/base/footer-aui-026.d.ts +2 -0
- package/dist/base/footer-aui-026.js +9 -0
- package/dist/base/footer-aui-027.d.ts +2 -0
- package/dist/base/footer-aui-027.js +9 -0
- package/dist/base/footer-aui-028.d.ts +2 -0
- package/dist/base/footer-aui-028.js +9 -0
- package/dist/base/hover-card.d.ts +2 -0
- package/dist/base/hover-card.js +9 -0
- package/dist/base/image-compare.d.ts +2 -0
- package/dist/base/image-compare.js +9 -0
- package/dist/base/inline-edit.d.ts +2 -0
- package/dist/base/inline-edit.js +9 -0
- package/dist/base/kanban.d.ts +2 -0
- package/dist/base/kanban.js +10 -0
- package/dist/base/navbar-aui-009.d.ts +2 -0
- package/dist/base/navbar-aui-009.js +9 -0
- package/dist/base/navbar-aui-010.d.ts +2 -0
- package/dist/base/navbar-aui-010.js +9 -0
- package/dist/base/navbar-aui-011.d.ts +2 -0
- package/dist/base/navbar-aui-011.js +9 -0
- package/dist/base/navbar-aui-012.d.ts +2 -0
- package/dist/base/navbar-aui-012.js +9 -0
- package/dist/base/navbar-aui-013.d.ts +2 -0
- package/dist/base/navbar-aui-013.js +9 -0
- package/dist/base/navbar-aui-014.d.ts +2 -0
- package/dist/base/navbar-aui-014.js +9 -0
- package/dist/base/notification-center.d.ts +2 -0
- package/dist/base/notification-center.js +11 -0
- package/dist/base/notification-stack.d.ts +2 -0
- package/dist/base/notification-stack.js +7 -0
- package/dist/base/now-playing.d.ts +2 -0
- package/dist/base/now-playing.js +7 -0
- package/dist/base/onboarding.d.ts +2 -0
- package/dist/base/onboarding.js +10 -0
- package/dist/base/otp-input.d.ts +2 -0
- package/dist/base/otp-input.js +9 -0
- package/dist/base/pagination.d.ts +2 -0
- package/dist/base/pagination.js +11 -0
- package/dist/base/password-input.d.ts +2 -0
- package/dist/base/password-input.js +13 -0
- package/dist/base/payment-received.d.ts +2 -0
- package/dist/base/payment-received.js +7 -0
- package/dist/base/plan-switcher.d.ts +2 -0
- package/dist/base/plan-switcher.js +7 -0
- package/dist/base/popover.d.ts +2 -0
- package/dist/base/popover.js +9 -0
- package/dist/base/pricing-aui-021.d.ts +2 -0
- package/dist/base/pricing-aui-021.js +9 -0
- package/dist/base/pricing-aui-022.d.ts +2 -0
- package/dist/base/pricing-aui-022.js +9 -0
- package/dist/base/pricing-aui-023.d.ts +2 -0
- package/dist/base/pricing-aui-023.js +9 -0
- package/dist/base/pricing-aui-024.d.ts +2 -0
- package/dist/base/pricing-aui-024.js +9 -0
- package/dist/base/progress.d.ts +2 -0
- package/dist/base/progress.js +11 -0
- package/dist/base/range-slider.d.ts +2 -0
- package/dist/base/range-slider.js +9 -0
- package/dist/base/rating.d.ts +2 -0
- package/dist/base/rating.js +9 -0
- package/dist/base/seat-picker.d.ts +2 -0
- package/dist/base/seat-picker.js +7 -0
- package/dist/base/shipment-tracker.d.ts +2 -0
- package/dist/base/shipment-tracker.js +7 -0
- package/dist/base/sidebar.d.ts +2 -0
- package/dist/base/sidebar.js +10 -0
- package/dist/base/sign-in-aui-015.d.ts +2 -0
- package/dist/base/sign-in-aui-015.js +9 -0
- package/dist/base/sign-in-aui-016.d.ts +2 -0
- package/dist/base/sign-in-aui-016.js +9 -0
- package/dist/base/sign-in-aui-017.d.ts +2 -0
- package/dist/base/sign-in-aui-017.js +9 -0
- package/dist/base/sign-in-aui-018.d.ts +2 -0
- package/dist/base/sign-in-aui-018.js +9 -0
- package/dist/base/sign-in-aui-019.d.ts +2 -0
- package/dist/base/sign-in-aui-019.js +9 -0
- package/dist/base/sign-in-aui-020.d.ts +2 -0
- package/dist/base/sign-in-aui-020.js +9 -0
- package/dist/base/spinner.js +1 -1
- package/dist/base/stat-card.d.ts +2 -0
- package/dist/base/stat-card.js +9 -0
- package/dist/base/stepper.d.ts +2 -0
- package/dist/base/stepper.js +9 -0
- package/dist/base/team-members.d.ts +2 -0
- package/dist/base/team-members.js +12 -0
- package/dist/base/timeline.d.ts +2 -0
- package/dist/base/timeline.js +9 -0
- package/dist/base/toggle-group.d.ts +2 -0
- package/dist/base/toggle-group.js +9 -0
- package/dist/base/token-swap.d.ts +2 -0
- package/dist/base/token-swap.js +7 -0
- package/dist/base/tree-view.d.ts +2 -0
- package/dist/base/tree-view.js +9 -0
- package/dist/base/wishlist.d.ts +2 -0
- package/dist/base/wishlist.js +7 -0
- package/dist/base.js +371 -47
- package/dist/booking-slots.d.ts +2 -0
- package/dist/booking-slots.js +7 -0
- package/dist/breadcrumb.d.ts +2 -0
- package/dist/breadcrumb.js +9 -0
- package/dist/card-checkout.js +1 -1
- package/dist/carousel.d.ts +2 -0
- package/dist/carousel.js +9 -0
- package/dist/chat-thread.d.ts +2 -0
- package/dist/chat-thread.js +7 -0
- package/dist/checkout.d.ts +2 -0
- package/dist/checkout.js +12 -0
- package/dist/{chunk-VGBP42IZ.js → chunk-2LZM435Z.js} +3 -2
- package/dist/chunk-2SQQFICY.js +493 -0
- package/dist/chunk-33N6SZB5.js +186 -0
- package/dist/chunk-3KS5EN3Q.js +134 -0
- package/dist/chunk-3RMCFFW2.js +228 -0
- package/dist/chunk-45VUWOHQ.js +299 -0
- package/dist/chunk-4FR6KJOJ.js +91 -0
- package/dist/chunk-4GF7WTR3.js +230 -0
- package/dist/chunk-4XM6DKEO.js +164 -0
- package/dist/chunk-57PESBSZ.js +97 -0
- package/dist/chunk-5TSQZY34.js +246 -0
- package/dist/chunk-5U4H2CXC.js +308 -0
- package/dist/chunk-5WGDQ62P.js +122 -0
- package/dist/chunk-6B6NTRMC.js +293 -0
- package/dist/chunk-6HPSPZTF.js +232 -0
- package/dist/chunk-6NNHSXFD.js +539 -0
- package/dist/chunk-6VQTFRSP.js +435 -0
- package/dist/chunk-72UKXOMW.js +150 -0
- package/dist/chunk-746WX2DF.js +480 -0
- package/dist/chunk-7GKCX4IE.js +636 -0
- package/dist/chunk-7JNO265Q.js +431 -0
- package/dist/chunk-7SNVRPED.js +223 -0
- package/dist/chunk-AYSC7AIC.js +322 -0
- package/dist/chunk-B5F775GP.js +339 -0
- package/dist/chunk-B5OESWCR.js +339 -0
- package/dist/chunk-BGVAXPHD.js +305 -0
- package/dist/chunk-CA7YQ5BJ.js +271 -0
- package/dist/chunk-DRX3KRNL.js +191 -0
- package/dist/chunk-EAUUUVUR.js +123 -0
- package/dist/chunk-EXX6YSUX.js +340 -0
- package/dist/chunk-F526V5BA.js +254 -0
- package/dist/chunk-F7LAUVDJ.js +97 -0
- package/dist/chunk-FDHU3RWR.js +213 -0
- package/dist/chunk-FJGGXXTT.js +109 -0
- package/dist/chunk-FKHNK5VC.js +172 -0
- package/dist/chunk-FY6BRODJ.js +230 -0
- package/dist/chunk-GDTSCUHY.js +234 -0
- package/dist/chunk-H7D6G3GQ.js +290 -0
- package/dist/chunk-HB7DFNZP.js +109 -0
- package/dist/{chunk-H5C7HOQJ.js → chunk-HNO6EUGJ.js} +3 -2
- package/dist/chunk-HPVPHWDM.js +197 -0
- package/dist/chunk-I5NZSWDW.js +431 -0
- package/dist/chunk-IMBCYI3F.js +114 -0
- package/dist/chunk-IS2VTYDA.js +235 -0
- package/dist/chunk-ISZ7O2Q6.js +245 -0
- package/dist/chunk-JAQKJBVJ.js +170 -0
- package/dist/chunk-KYFZ5TTK.js +271 -0
- package/dist/chunk-LBXIMJFU.js +170 -0
- package/dist/chunk-LPTY5WXM.js +231 -0
- package/dist/chunk-MDI73RL6.js +245 -0
- package/dist/chunk-MSBN2O66.js +110 -0
- package/dist/chunk-MUDW65ZT.js +220 -0
- package/dist/chunk-NB7X26PY.js +388 -0
- package/dist/chunk-NIYIT2QU.js +118 -0
- package/dist/chunk-NZRQL3SA.js +201 -0
- package/dist/chunk-OFYGJUKP.js +278 -0
- package/dist/{chunk-NDBLIYMX.js → chunk-OKCSTMX3.js} +2 -2
- package/dist/chunk-P37H477M.js +236 -0
- package/dist/chunk-QSLS3ENY.js +469 -0
- package/dist/chunk-RBTX7TVA.js +170 -0
- package/dist/chunk-RFVKRVTD.js +172 -0
- package/dist/chunk-RIWKIBEP.js +271 -0
- package/dist/chunk-RRHQBGRO.js +327 -0
- package/dist/chunk-RSUZHZCG.js +230 -0
- package/dist/chunk-S2DJLW6B.js +322 -0
- package/dist/chunk-SDL3JXFN.js +97 -0
- package/dist/chunk-SDOWCCM2.js +271 -0
- package/dist/chunk-SPKSRH6G.js +283 -0
- package/dist/chunk-TLODJONC.js +120 -0
- package/dist/chunk-TXRLBMFL.js +191 -0
- package/dist/{chunk-2OGTIQVU.js → chunk-UEOEWP7L.js} +1 -1
- package/dist/chunk-UTGEGGSE.js +309 -0
- package/dist/chunk-UWQ26LYZ.js +133 -0
- package/dist/chunk-V3SPSN3A.js +308 -0
- package/dist/chunk-W57O4RLL.js +435 -0
- package/dist/chunk-WNPMHOXE.js +136 -0
- package/dist/chunk-WO36QUH3.js +188 -0
- package/dist/chunk-WTNNS7AX.js +362 -0
- package/dist/{chunk-AS6RA64I.js → chunk-XTP6ITUJ.js} +3 -1
- package/dist/chunk-YLAL6ICI.js +142 -0
- package/dist/chunk-ZGMBQZDV.js +250 -0
- package/dist/chunk-ZKMEKSJZ.js +133 -0
- package/dist/color-picker.d.ts +2 -0
- package/dist/color-picker.js +9 -0
- package/dist/combobox.d.ts +2 -0
- package/dist/combobox.js +9 -0
- package/dist/comments.d.ts +2 -0
- package/dist/comments.js +11 -0
- package/dist/context-menu.d.ts +2 -0
- package/dist/context-menu.js +9 -0
- package/dist/copy-button.d.ts +2 -0
- package/dist/copy-button.js +9 -0
- package/dist/data-table.d.ts +2 -0
- package/dist/data-table.js +9 -0
- package/dist/date-picker.d.ts +2 -0
- package/dist/date-picker.js +9 -0
- package/dist/drawer.d.ts +2 -0
- package/dist/drawer.js +9 -0
- package/dist/empty-state.d.ts +2 -0
- package/dist/empty-state.js +10 -0
- package/dist/event-calendar.d.ts +2 -0
- package/dist/event-calendar.js +9 -0
- package/dist/file-upload.d.ts +2 -0
- package/dist/file-upload.js +11 -0
- package/dist/footer-aui-025.d.ts +2 -0
- package/dist/footer-aui-025.js +9 -0
- package/dist/footer-aui-026.d.ts +2 -0
- package/dist/footer-aui-026.js +9 -0
- package/dist/footer-aui-027.d.ts +2 -0
- package/dist/footer-aui-027.js +9 -0
- package/dist/footer-aui-028.d.ts +2 -0
- package/dist/footer-aui-028.js +9 -0
- package/dist/hover-card.d.ts +2 -0
- package/dist/hover-card.js +9 -0
- package/dist/image-compare.d.ts +2 -0
- package/dist/image-compare.js +9 -0
- package/dist/index.js +372 -48
- package/dist/inline-edit.d.ts +2 -0
- package/dist/inline-edit.js +9 -0
- package/dist/kanban.d.ts +2 -0
- package/dist/kanban.js +10 -0
- package/dist/navbar-aui-009.d.ts +2 -0
- package/dist/navbar-aui-009.js +9 -0
- package/dist/navbar-aui-010.d.ts +2 -0
- package/dist/navbar-aui-010.js +9 -0
- package/dist/navbar-aui-011.d.ts +2 -0
- package/dist/navbar-aui-011.js +9 -0
- package/dist/navbar-aui-012.d.ts +2 -0
- package/dist/navbar-aui-012.js +9 -0
- package/dist/navbar-aui-013.d.ts +2 -0
- package/dist/navbar-aui-013.js +9 -0
- package/dist/navbar-aui-014.d.ts +2 -0
- package/dist/navbar-aui-014.js +9 -0
- package/dist/notification-center.d.ts +2 -0
- package/dist/notification-center.js +11 -0
- package/dist/notification-stack.d.ts +2 -0
- package/dist/notification-stack.js +7 -0
- package/dist/now-playing.d.ts +2 -0
- package/dist/now-playing.js +7 -0
- package/dist/onboarding.d.ts +2 -0
- package/dist/onboarding.js +10 -0
- package/dist/otp-input.d.ts +2 -0
- package/dist/otp-input.js +9 -0
- package/dist/pagination.d.ts +2 -0
- package/dist/pagination.js +11 -0
- package/dist/password-input.d.ts +2 -0
- package/dist/password-input.js +13 -0
- package/dist/payment-received.d.ts +2 -0
- package/dist/payment-received.js +7 -0
- package/dist/plan-switcher.d.ts +2 -0
- package/dist/plan-switcher.js +7 -0
- package/dist/popover.d.ts +2 -0
- package/dist/popover.js +9 -0
- package/dist/pricing-aui-021.d.ts +2 -0
- package/dist/pricing-aui-021.js +9 -0
- package/dist/pricing-aui-022.d.ts +2 -0
- package/dist/pricing-aui-022.js +9 -0
- package/dist/pricing-aui-023.d.ts +2 -0
- package/dist/pricing-aui-023.js +9 -0
- package/dist/pricing-aui-024.d.ts +2 -0
- package/dist/pricing-aui-024.js +9 -0
- package/dist/progress.d.ts +2 -0
- package/dist/progress.js +11 -0
- package/dist/range-slider.d.ts +2 -0
- package/dist/range-slider.js +9 -0
- package/dist/rating.d.ts +2 -0
- package/dist/rating.js +9 -0
- package/dist/seat-picker.d.ts +2 -0
- package/dist/seat-picker.js +7 -0
- package/dist/shipment-tracker.d.ts +2 -0
- package/dist/shipment-tracker.js +7 -0
- package/dist/sidebar.d.ts +2 -0
- package/dist/sidebar.js +10 -0
- package/dist/sign-in-aui-015.d.ts +2 -0
- package/dist/sign-in-aui-015.js +9 -0
- package/dist/sign-in-aui-016.d.ts +2 -0
- package/dist/sign-in-aui-016.js +9 -0
- package/dist/sign-in-aui-017.d.ts +2 -0
- package/dist/sign-in-aui-017.js +9 -0
- package/dist/sign-in-aui-018.d.ts +2 -0
- package/dist/sign-in-aui-018.js +9 -0
- package/dist/sign-in-aui-019.d.ts +2 -0
- package/dist/sign-in-aui-019.js +9 -0
- package/dist/sign-in-aui-020.d.ts +2 -0
- package/dist/sign-in-aui-020.js +9 -0
- package/dist/spinner.js +1 -1
- package/dist/stat-card.d.ts +2 -0
- package/dist/stat-card.js +9 -0
- package/dist/stepper.d.ts +2 -0
- package/dist/stepper.js +9 -0
- package/dist/team-members.d.ts +2 -0
- package/dist/team-members.js +12 -0
- package/dist/timeline.d.ts +2 -0
- package/dist/timeline.js +9 -0
- package/dist/toggle-group.d.ts +2 -0
- package/dist/toggle-group.js +9 -0
- package/dist/token-swap.d.ts +2 -0
- package/dist/token-swap.js +7 -0
- package/dist/tree-view.d.ts +2 -0
- package/dist/tree-view.js +9 -0
- package/dist/types/components/kit/ai-chat.d.ts +37 -0
- package/dist/types/components/kit/alert.d.ts +27 -0
- package/dist/types/components/kit/announcement-bar.d.ts +36 -0
- package/dist/types/components/kit/avatar-group.d.ts +22 -0
- package/dist/types/components/kit/avatar.d.ts +2 -0
- package/dist/types/components/kit/base/avatar-group.d.ts +22 -0
- package/dist/types/components/kit/base/avatar.d.ts +2 -0
- package/dist/types/components/kit/base/checkout.d.ts +68 -0
- package/dist/types/components/kit/base/comments.d.ts +30 -0
- package/dist/types/components/kit/base/empty-state.d.ts +29 -0
- package/dist/types/components/kit/base/kanban.d.ts +26 -0
- package/dist/types/components/kit/base/notification-center.d.ts +34 -0
- package/dist/types/components/kit/base/onboarding.d.ts +28 -0
- package/dist/types/components/kit/base/sidebar.d.ts +43 -0
- package/dist/types/components/kit/base/team-members.d.ts +46 -0
- package/dist/types/components/kit/breadcrumb.d.ts +29 -0
- package/dist/types/components/kit/carousel.d.ts +21 -0
- package/dist/types/components/kit/checkout.d.ts +68 -0
- package/dist/types/components/kit/color-picker.d.ts +28 -0
- package/dist/types/components/kit/combobox.d.ts +40 -0
- package/dist/types/components/kit/comments.d.ts +30 -0
- package/dist/types/components/kit/context-menu.d.ts +37 -0
- package/dist/types/components/kit/copy-button.d.ts +20 -0
- package/dist/types/components/kit/data-table.d.ts +47 -0
- package/dist/types/components/kit/date-picker.d.ts +40 -0
- package/dist/types/components/kit/drawer.d.ts +26 -0
- package/dist/types/components/kit/empty-state.d.ts +29 -0
- package/dist/types/components/kit/event-calendar.d.ts +34 -0
- package/dist/types/components/kit/file-upload.d.ts +37 -0
- package/dist/types/components/kit/hover-card.d.ts +31 -0
- package/dist/types/components/kit/image-compare.d.ts +29 -0
- package/dist/types/components/kit/inline-edit.d.ts +26 -0
- package/dist/types/components/kit/kanban.d.ts +26 -0
- package/dist/types/components/kit/notification-center.d.ts +34 -0
- package/dist/types/components/kit/onboarding.d.ts +28 -0
- package/dist/types/components/kit/otp-input.d.ts +28 -0
- package/dist/types/components/kit/pagination.d.ts +25 -0
- package/dist/types/components/kit/password-input.d.ts +32 -0
- package/dist/types/components/kit/popover.d.ts +40 -0
- package/dist/types/components/kit/progress.d.ts +37 -0
- package/dist/types/components/kit/range-slider.d.ts +27 -0
- package/dist/types/components/kit/rating.d.ts +23 -0
- package/dist/types/components/kit/sidebar.d.ts +43 -0
- package/dist/types/components/kit/stat-card.d.ts +24 -0
- package/dist/types/components/kit/stepper.d.ts +36 -0
- package/dist/types/components/kit/team-members.d.ts +46 -0
- package/dist/types/components/kit/timeline.d.ts +24 -0
- package/dist/types/components/kit/toggle-group.d.ts +42 -0
- package/dist/types/components/kit/tree-view.d.ts +31 -0
- package/dist/types/components/kit/variants/footer-aui-025.d.ts +22 -0
- package/dist/types/components/kit/variants/footer-aui-026.d.ts +21 -0
- package/dist/types/components/kit/variants/footer-aui-027.d.ts +36 -0
- package/dist/types/components/kit/variants/footer-aui-028.d.ts +34 -0
- package/dist/types/components/kit/variants/navbar-aui-009.d.ts +62 -0
- package/dist/types/components/kit/variants/navbar-aui-010.d.ts +30 -0
- package/dist/types/components/kit/variants/navbar-aui-011.d.ts +65 -0
- package/dist/types/components/kit/variants/navbar-aui-012.d.ts +50 -0
- package/dist/types/components/kit/variants/navbar-aui-013.d.ts +70 -0
- package/dist/types/components/kit/variants/navbar-aui-014.d.ts +31 -0
- package/dist/types/components/kit/variants/pricing-aui-021.d.ts +30 -0
- package/dist/types/components/kit/variants/pricing-aui-022.d.ts +34 -0
- package/dist/types/components/kit/variants/pricing-aui-023.d.ts +26 -0
- package/dist/types/components/kit/variants/pricing-aui-024.d.ts +29 -0
- package/dist/types/components/kit/variants/sign-in-aui-015.d.ts +21 -0
- package/dist/types/components/kit/variants/sign-in-aui-016.d.ts +28 -0
- package/dist/types/components/kit/variants/sign-in-aui-017.d.ts +21 -0
- package/dist/types/components/kit/variants/sign-in-aui-018.d.ts +22 -0
- package/dist/types/components/kit/variants/sign-in-aui-019.d.ts +22 -0
- package/dist/types/components/kit/variants/sign-in-aui-020.d.ts +27 -0
- package/dist/types/components/lab/blocks/BookingSlots.d.ts +2 -0
- package/dist/types/components/lab/blocks/ChatThread.d.ts +2 -0
- package/dist/types/components/lab/blocks/NotificationStack.d.ts +2 -0
- package/dist/types/components/lab/blocks/NowPlaying.d.ts +2 -0
- package/dist/types/components/lab/blocks/PaymentReceived.d.ts +2 -0
- package/dist/types/components/lab/blocks/PlanSwitcher.d.ts +2 -0
- package/dist/types/components/lab/blocks/SeatPicker.d.ts +2 -0
- package/dist/types/components/lab/blocks/ShipmentTracker.d.ts +2 -0
- package/dist/types/components/lab/blocks/TokenSwap.d.ts +2 -0
- package/dist/types/components/lab/blocks/Wishlist.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/ai-chat.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/alert.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/announcement-bar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/avatar-group.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/ai-chat.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/alert.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/announcement-bar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/avatar-group.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/booking-slots.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/breadcrumb.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/carousel.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/chat-thread.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/checkout.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/color-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/combobox.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/comments.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/context-menu.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/copy-button.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/data-table.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/date-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/drawer.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/empty-state.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/event-calendar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/file-upload.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-025.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-026.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-027.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/footer-aui-028.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/hover-card.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/image-compare.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/inline-edit.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/kanban.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-009.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-010.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-011.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-012.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-013.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/navbar-aui-014.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/notification-center.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/notification-stack.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/now-playing.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/onboarding.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/otp-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pagination.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/password-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/payment-received.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/plan-switcher.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/popover.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-021.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-022.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-023.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/pricing-aui-024.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/progress.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/range-slider.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/rating.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/seat-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/shipment-tracker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sidebar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-015.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-016.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-017.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-018.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-019.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/sign-in-aui-020.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/stat-card.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/stepper.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/team-members.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/timeline.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/toggle-group.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/token-swap.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/tree-view.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base/wishlist.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/base.d.ts +127 -1
- package/dist/types/packages/asta-ui/src/booking-slots.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/breadcrumb.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/carousel.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/chat-thread.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/checkout.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/color-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/combobox.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/comments.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/context-menu.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/copy-button.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/data-table.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/date-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/drawer.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/empty-state.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/event-calendar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/file-upload.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-025.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-026.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-027.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/footer-aui-028.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/hover-card.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/image-compare.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/index.d.ts +127 -1
- package/dist/types/packages/asta-ui/src/inline-edit.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/kanban.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-009.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-010.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-011.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-012.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-013.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/navbar-aui-014.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/notification-center.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/notification-stack.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/now-playing.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/onboarding.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/otp-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pagination.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/password-input.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/payment-received.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/plan-switcher.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/popover.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-021.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-022.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-023.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/pricing-aui-024.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/progress.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/range-slider.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/rating.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/seat-picker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/shipment-tracker.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sidebar.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-015.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-016.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-017.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-018.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-019.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/sign-in-aui-020.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/stat-card.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/stepper.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/team-members.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/timeline.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/toggle-group.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/token-swap.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/tree-view.d.ts +2 -0
- package/dist/types/packages/asta-ui/src/wishlist.d.ts +2 -0
- package/dist/wishlist.d.ts +2 -0
- package/dist/wishlist.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/stepper.tsx
|
|
4
|
+
import { useId, useState } from "react";
|
|
5
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var KEYFRAMES = `@keyframes kit-step-next { from { opacity: 0; transform: translateX(32px) } }
|
|
8
|
+
@keyframes kit-step-back { from { opacity: 0; transform: translateX(-32px) } }`;
|
|
9
|
+
function Mark({ index, state }) {
|
|
10
|
+
const done = state === "done";
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
"span",
|
|
13
|
+
{
|
|
14
|
+
className: cx(
|
|
15
|
+
"relative flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-[13px] font-medium tabular-nums transition-[background-color,box-shadow,color] duration-300",
|
|
16
|
+
done && "bg-brand text-white",
|
|
17
|
+
state === "current" && "bg-paper text-brand shadow-[inset_0_0_0_1.5px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_14%,transparent)]",
|
|
18
|
+
state === "todo" && "bg-paper text-mute shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_16%,transparent)]"
|
|
19
|
+
),
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ jsx("span", { className: cx("transition-[opacity,transform] duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none", done ? "scale-50 opacity-0" : "scale-100 opacity-100"), children: index + 1 }),
|
|
22
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "absolute h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx(
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
d: "m3.5 8.5 3 3 6-7",
|
|
26
|
+
pathLength: 1,
|
|
27
|
+
strokeDasharray: 1,
|
|
28
|
+
strokeDashoffset: done ? 0 : 1,
|
|
29
|
+
className: "transition-[stroke-dashoffset] delay-150 duration-[450ms] ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none"
|
|
30
|
+
}
|
|
31
|
+
) })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function Stepper({ steps, step, defaultStep = 0, onStepChange, clickable = true, complete, children, className }) {
|
|
37
|
+
const [inner, setInner] = useState(defaultStep);
|
|
38
|
+
const current = Math.max(0, Math.min(steps.length, step ?? inner));
|
|
39
|
+
const uid = useId();
|
|
40
|
+
const [prev, setPrev] = useState(current);
|
|
41
|
+
const [dir, setDir] = useState(1);
|
|
42
|
+
if (prev !== current) {
|
|
43
|
+
setDir(current > prev ? 1 : -1);
|
|
44
|
+
setPrev(current);
|
|
45
|
+
}
|
|
46
|
+
const goTo = (n) => {
|
|
47
|
+
const next = Math.max(0, Math.min(steps.length, n));
|
|
48
|
+
if (next === current) return;
|
|
49
|
+
if (step === void 0) setInner(next);
|
|
50
|
+
onStepChange?.(next);
|
|
51
|
+
};
|
|
52
|
+
const isComplete = current >= steps.length;
|
|
53
|
+
const controls = {
|
|
54
|
+
step: current,
|
|
55
|
+
next: () => goTo(current + 1),
|
|
56
|
+
back: () => goTo(current - 1),
|
|
57
|
+
goTo,
|
|
58
|
+
isFirst: current === 0,
|
|
59
|
+
isLast: current === steps.length - 1,
|
|
60
|
+
isComplete
|
|
61
|
+
};
|
|
62
|
+
const body = isComplete ? complete : steps[current]?.content;
|
|
63
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("flex w-full flex-col", className), children: [
|
|
64
|
+
/* @__PURE__ */ jsx("style", { href: "asta-stepper", precedence: "asta", children: KEYFRAMES }),
|
|
65
|
+
/* @__PURE__ */ jsx("ol", { "aria-label": "Progress", className: "flex items-start", children: steps.map((s, i) => {
|
|
66
|
+
const state = i < current ? "done" : i === current ? "current" : "todo";
|
|
67
|
+
const canClick = clickable && state === "done" && !isComplete;
|
|
68
|
+
const label = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Mark, { index: i, state }),
|
|
70
|
+
/* @__PURE__ */ jsxs("span", { className: cx("min-w-0 flex-col text-left", state === "current" ? "flex" : "hidden sm:flex"), children: [
|
|
71
|
+
/* @__PURE__ */ jsx("span", { className: cx("truncate text-[13px] font-medium tracking-[-0.01em] transition-colors duration-300", state === "todo" ? "text-mute" : "text-ink"), children: s.title }),
|
|
72
|
+
s.description && /* @__PURE__ */ jsx("span", { className: "truncate text-[12px] text-mute", children: s.description })
|
|
73
|
+
] })
|
|
74
|
+
] });
|
|
75
|
+
return /* @__PURE__ */ jsxs("li", { "aria-current": state === "current" ? "step" : void 0, className: cx("flex min-w-0 items-center", i < steps.length - 1 && "flex-1"), children: [
|
|
76
|
+
canClick ? /* @__PURE__ */ jsx(
|
|
77
|
+
"button",
|
|
78
|
+
{
|
|
79
|
+
type: "button",
|
|
80
|
+
onClick: () => goTo(i),
|
|
81
|
+
"aria-label": `${s.title}, done. Go back to this step`,
|
|
82
|
+
className: "-m-1 flex min-w-0 items-center gap-2.5 rounded-lg p-1 outline-none transition-transform duration-200 hover:opacity-80 focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-[0.98]",
|
|
83
|
+
children: label
|
|
84
|
+
}
|
|
85
|
+
) : /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2.5", children: [
|
|
86
|
+
label,
|
|
87
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: state === "done" ? ", done" : state === "todo" ? ", not started" : "" })
|
|
88
|
+
] }),
|
|
89
|
+
i < steps.length - 1 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "relative mx-3 h-[2px] min-w-6 flex-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_10%,transparent)]", children: /* @__PURE__ */ jsx(
|
|
90
|
+
"span",
|
|
91
|
+
{
|
|
92
|
+
className: "absolute inset-0 origin-left rounded-full bg-brand transition-transform duration-500 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none",
|
|
93
|
+
style: { transform: `scaleX(${i < current ? 1 : 0})` }
|
|
94
|
+
}
|
|
95
|
+
) })
|
|
96
|
+
] }, s.title);
|
|
97
|
+
}) }),
|
|
98
|
+
/* @__PURE__ */ jsx("div", { className: "mt-6 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
id: `${uid}-panel`,
|
|
102
|
+
role: "region",
|
|
103
|
+
"aria-label": isComplete ? "Done" : steps[current]?.title,
|
|
104
|
+
className: cx(
|
|
105
|
+
"motion-reduce:!animate-none",
|
|
106
|
+
dir === 1 ? "animate-[kit-step-next_.42s_cubic-bezier(.16,1,.3,1)_both]" : "animate-[kit-step-back_.42s_cubic-bezier(.16,1,.3,1)_both]"
|
|
107
|
+
),
|
|
108
|
+
children: body
|
|
109
|
+
},
|
|
110
|
+
current
|
|
111
|
+
) }),
|
|
112
|
+
children && /* @__PURE__ */ jsx("div", { className: "mt-6", children: typeof children === "function" ? children(controls) : children })
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
var stepper_default = Stepper;
|
|
116
|
+
|
|
117
|
+
export {
|
|
118
|
+
Stepper,
|
|
119
|
+
stepper_default
|
|
120
|
+
};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Avatar
|
|
4
|
+
} from "./chunk-HNO6EUGJ.js";
|
|
5
|
+
import {
|
|
6
|
+
Button
|
|
7
|
+
} from "./chunk-ZWBJUJTR.js";
|
|
8
|
+
|
|
9
|
+
// components/kit/comments.tsx
|
|
10
|
+
import { useId, useRef, useState } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
13
|
+
var CURVE = "cubic-bezier(.16,1,.3,1)";
|
|
14
|
+
function Composer({
|
|
15
|
+
user,
|
|
16
|
+
label,
|
|
17
|
+
placeholder,
|
|
18
|
+
initial = "",
|
|
19
|
+
autoFocus,
|
|
20
|
+
onSubmit,
|
|
21
|
+
onCancel
|
|
22
|
+
}) {
|
|
23
|
+
const [text, setText] = useState(initial);
|
|
24
|
+
const id = useId();
|
|
25
|
+
const area = useRef(null);
|
|
26
|
+
const empty = !text.trim();
|
|
27
|
+
const send = () => {
|
|
28
|
+
if (empty) return;
|
|
29
|
+
onSubmit(text.trim());
|
|
30
|
+
setText("");
|
|
31
|
+
area.current?.focus();
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
34
|
+
/* @__PURE__ */ jsx(Avatar, { name: user.name, src: user.src, size: "sm" }),
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 rounded-[10px] bg-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent)] transition-shadow duration-200 focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_3px_color-mix(in_srgb,var(--brand)_14%,transparent)]", children: [
|
|
36
|
+
/* @__PURE__ */ jsx("label", { htmlFor: id, className: "sr-only", children: label }),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
"textarea",
|
|
39
|
+
{
|
|
40
|
+
ref: area,
|
|
41
|
+
id,
|
|
42
|
+
rows: 1,
|
|
43
|
+
value: text,
|
|
44
|
+
autoFocus,
|
|
45
|
+
placeholder,
|
|
46
|
+
onChange: (e) => setText(e.target.value),
|
|
47
|
+
onFocus: (e) => e.currentTarget.setSelectionRange(e.currentTarget.value.length, e.currentTarget.value.length),
|
|
48
|
+
onKeyDown: (e) => {
|
|
49
|
+
if (e.key === "Enter" && (e.metaKey || e.ctrlKey)) {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
send();
|
|
52
|
+
} else if (e.key === "Escape" && onCancel) {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
onCancel();
|
|
55
|
+
}
|
|
56
|
+
},
|
|
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
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1.5 px-2 pb-2", children: [
|
|
61
|
+
onCancel && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "xs", onClick: onCancel, children: "Cancel" }),
|
|
62
|
+
/* @__PURE__ */ jsx(Button, { variant: "accent", size: "xs", disabled: empty, onClick: send, kbd: "\u2318\u21B5", children: label })
|
|
63
|
+
] })
|
|
64
|
+
] })
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
67
|
+
function Like({ count, liked, pop, onToggle }) {
|
|
68
|
+
return /* @__PURE__ */ jsxs(
|
|
69
|
+
"button",
|
|
70
|
+
{
|
|
71
|
+
type: "button",
|
|
72
|
+
"aria-pressed": liked,
|
|
73
|
+
"aria-label": `Like, ${count}`,
|
|
74
|
+
onClick: onToggle,
|
|
75
|
+
className: cx(
|
|
76
|
+
"inline-flex h-7 items-center gap-1.5 rounded-full px-2.5 text-[12px] tabular-nums outline-none transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
77
|
+
liked ? "bg-[color-mix(in_srgb,var(--brand)_10%,transparent)] text-brand" : "text-mute hover:bg-paper-2 hover:text-ink"
|
|
78
|
+
),
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
"svg",
|
|
82
|
+
{
|
|
83
|
+
viewBox: "0 0 16 16",
|
|
84
|
+
className: "h-3.5 w-3.5",
|
|
85
|
+
fill: liked ? "currentColor" : "none",
|
|
86
|
+
stroke: "currentColor",
|
|
87
|
+
strokeWidth: "1.5",
|
|
88
|
+
strokeLinejoin: "round",
|
|
89
|
+
"aria-hidden": true,
|
|
90
|
+
style: pop && liked ? { animation: `kit-cm-pop .45s ${CURVE}` } : void 0,
|
|
91
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 13.5S2.5 10.3 2.5 6.4A2.9 2.9 0 0 1 8 5a2.9 2.9 0 0 1 5.5 1.4c0 3.9-5.5 7.1-5.5 7.1Z" })
|
|
92
|
+
},
|
|
93
|
+
liked ? "on" : "off"
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ jsx("span", { className: "relative inline-flex overflow-hidden", children: /* @__PURE__ */ jsx("span", { style: pop ? { animation: `kit-cm-roll .35s ${CURVE}` } : void 0, children: count }, count) })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function Comments({ defaultComments, currentUser, title = "Discussion", onPost, className }) {
|
|
101
|
+
const [comments, setComments] = useState(defaultComments);
|
|
102
|
+
const [replyTo, setReplyTo] = useState(null);
|
|
103
|
+
const [fresh, setFresh] = useState([]);
|
|
104
|
+
const [popped, setPopped] = useState(null);
|
|
105
|
+
const replyButtons = useRef(/* @__PURE__ */ new Map());
|
|
106
|
+
const seq = useRef(0);
|
|
107
|
+
const total = comments.reduce((n, c) => n + 1 + (c.replies?.length ?? 0), 0);
|
|
108
|
+
const post = (body, parent) => {
|
|
109
|
+
const item = { id: `new-${++seq.current}`, author: currentUser, time: "Just now", body, likes: 0 };
|
|
110
|
+
setComments((list) => parent ? list.map((c) => c.id === parent ? { ...c, replies: [...c.replies ?? [], item] } : c) : [...list, item]);
|
|
111
|
+
setFresh((f) => [...f, item.id]);
|
|
112
|
+
onPost?.(body, parent);
|
|
113
|
+
};
|
|
114
|
+
const toggleLike = (id) => {
|
|
115
|
+
const flip = (c) => c.id === id ? { ...c, liked: !c.liked, likes: (c.likes ?? 0) + (c.liked ? -1 : 1) } : { ...c, replies: c.replies?.map(flip) };
|
|
116
|
+
setComments((list) => list.map(flip));
|
|
117
|
+
setPopped(id);
|
|
118
|
+
};
|
|
119
|
+
const closeReply = () => {
|
|
120
|
+
const parent = replyTo?.parent;
|
|
121
|
+
setReplyTo(null);
|
|
122
|
+
if (parent) replyButtons.current.get(parent)?.focus();
|
|
123
|
+
};
|
|
124
|
+
const row = (c, parent) => /* @__PURE__ */ jsxs("article", { className: "flex gap-3", style: fresh.includes(c.id) ? { animation: `kit-cm-in .5s ${CURVE} both` } : void 0, children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Avatar, { name: c.author.name, src: c.author.src, size: "sm" }),
|
|
126
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
127
|
+
/* @__PURE__ */ jsxs("header", { className: "flex items-baseline gap-2", children: [
|
|
128
|
+
/* @__PURE__ */ jsx("span", { className: "text-[13.5px] font-medium text-ink", children: c.author.name }),
|
|
129
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12px] text-mute", children: c.time })
|
|
130
|
+
] }),
|
|
131
|
+
/* @__PURE__ */ jsx("p", { className: "mt-0.5 whitespace-pre-wrap break-words text-[14px] leading-relaxed text-ink-2", children: c.body }),
|
|
132
|
+
/* @__PURE__ */ jsxs("div", { className: "-ml-2.5 mt-1.5 flex items-center gap-0.5", children: [
|
|
133
|
+
/* @__PURE__ */ jsx(Like, { count: c.likes ?? 0, liked: !!c.liked, pop: popped === c.id, onToggle: () => toggleLike(c.id) }),
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
"button",
|
|
136
|
+
{
|
|
137
|
+
ref: (el) => {
|
|
138
|
+
if (el && c.id === parent) replyButtons.current.set(parent, el);
|
|
139
|
+
},
|
|
140
|
+
type: "button",
|
|
141
|
+
onClick: () => setReplyTo({ parent, mention: c.id === parent ? void 0 : c.author.name.split(" ")[0] }),
|
|
142
|
+
className: "inline-flex h-7 items-center rounded-full px-2.5 text-[12px] text-mute outline-none transition-colors hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
143
|
+
children: "Reply"
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
] })
|
|
147
|
+
] })
|
|
148
|
+
] }, c.id);
|
|
149
|
+
return /* @__PURE__ */ jsxs("section", { "aria-label": title, className: cx("kit-cm w-full max-w-[560px]", className), children: [
|
|
150
|
+
/* @__PURE__ */ jsx("style", { href: "asta-comments", precedence: "asta", children: `
|
|
151
|
+
@keyframes kit-cm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
|
|
152
|
+
@keyframes kit-cm-pop { 0% { transform: scale(.6); } 55% { transform: scale(1.25); } 100% { transform: none; } }
|
|
153
|
+
@keyframes kit-cm-roll { from { opacity: 0; transform: translateY(70%); } to { opacity: 1; transform: none; } }
|
|
154
|
+
@media (prefers-reduced-motion: reduce) { .kit-cm, .kit-cm * { animation: none !important; transition-duration: 0s !important; } }
|
|
155
|
+
` }),
|
|
156
|
+
/* @__PURE__ */ jsxs("h3", { className: "mb-5 flex items-baseline gap-2 text-[15px] font-medium tracking-[-0.01em] text-ink", children: [
|
|
157
|
+
title,
|
|
158
|
+
/* @__PURE__ */ jsx("span", { className: "text-[12.5px] font-normal tabular-nums text-mute", children: total })
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6", children: comments.map((c) => /* @__PURE__ */ jsxs("div", { children: [
|
|
161
|
+
row(c, c.id),
|
|
162
|
+
(!!c.replies?.length || replyTo?.parent === c.id) && /* @__PURE__ */ jsxs("div", { className: "relative mt-4 flex flex-col gap-4 pl-11", children: [
|
|
163
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute bottom-1 left-4 top-0 w-px bg-[color-mix(in_srgb,var(--ink)_9%,transparent)]" }),
|
|
164
|
+
c.replies?.map((r) => row(r, c.id)),
|
|
165
|
+
replyTo?.parent === c.id && /* @__PURE__ */ jsx("div", { style: { animation: `kit-cm-in .4s ${CURVE} both` }, children: /* @__PURE__ */ jsx(
|
|
166
|
+
Composer,
|
|
167
|
+
{
|
|
168
|
+
user: currentUser,
|
|
169
|
+
label: "Reply",
|
|
170
|
+
placeholder: `Reply to ${c.author.name.split(" ")[0]}\u2026`,
|
|
171
|
+
initial: replyTo.mention ? `@${replyTo.mention} ` : "",
|
|
172
|
+
autoFocus: true,
|
|
173
|
+
onSubmit: (body) => {
|
|
174
|
+
post(body, c.id);
|
|
175
|
+
closeReply();
|
|
176
|
+
},
|
|
177
|
+
onCancel: closeReply
|
|
178
|
+
},
|
|
179
|
+
replyTo.mention ?? "reply"
|
|
180
|
+
) })
|
|
181
|
+
] })
|
|
182
|
+
] }, c.id)) }),
|
|
183
|
+
/* @__PURE__ */ jsx("div", { className: "mt-8", children: /* @__PURE__ */ jsx(Composer, { user: currentUser, label: "Comment", placeholder: "Add a comment\u2026", onSubmit: (body) => post(body) }) })
|
|
184
|
+
] });
|
|
185
|
+
}
|
|
186
|
+
var comments_default = Comments;
|
|
187
|
+
|
|
188
|
+
export {
|
|
189
|
+
Comments,
|
|
190
|
+
comments_default
|
|
191
|
+
};
|
|
@@ -160,7 +160,7 @@ function CardCheckout() {
|
|
|
160
160
|
style: { containerType: "inline-size", background: "linear-gradient(165deg, #ffffff, #f2f2f0)", boxShadow: shadow, color: INK },
|
|
161
161
|
children: [
|
|
162
162
|
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 100 63", className: "pointer-events-none absolute inset-0 h-full w-full", fill: "none", stroke: INK, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: DOODLES.map((o, i) => /* @__PURE__ */ jsx("g", { transform: `translate(${o.x} ${o.y * 63 / 100}) rotate(${o.r} ${o.s / 2} ${o.s / 2}) scale(${o.s / 32})`, children: /* @__PURE__ */ jsx("path", { d: o.d, strokeWidth: 0.5 * (32 / o.s) }) }, i)) }),
|
|
163
|
-
/* @__PURE__ */ jsx("div", { className: "absolute right-[7%] top-[7%] text-[3.6cqw] tracking-[0.04em] text-black/55", children: "
|
|
163
|
+
/* @__PURE__ */ jsx("div", { className: "absolute right-[7%] top-[7%] text-[3.6cqw] tracking-[0.04em] text-black/55", children: "Astabyte" }),
|
|
164
164
|
/* @__PURE__ */ jsxs("div", { className: "absolute left-[8%] top-[34%] h-[11cqw] w-[15cqw] rounded-[2cqw] bg-gradient-to-br from-[#ececea] to-[#cdcdc9] shadow-[inset_0_0_0_1px_rgb(0_0_0/0.12)]", children: [
|
|
165
165
|
/* @__PURE__ */ jsx("span", { className: "absolute inset-x-[32%] inset-y-0 border-x border-black/15" }),
|
|
166
166
|
/* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 top-1/2 border-t border-black/15" })
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/lab/blocks/NowPlaying.tsx
|
|
4
|
+
import { useEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var EASE = "cubic-bezier(.16,1,.3,1)";
|
|
7
|
+
var RING = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]";
|
|
8
|
+
var BRAND = "var(--brand)";
|
|
9
|
+
var INK = "var(--ink)";
|
|
10
|
+
var TRACKS = [
|
|
11
|
+
{
|
|
12
|
+
title: "Slow Orbit",
|
|
13
|
+
artist: "Halden",
|
|
14
|
+
len: 204,
|
|
15
|
+
start: 38,
|
|
16
|
+
bg: `linear-gradient(150deg, color-mix(in srgb, ${BRAND} 70%, white), ${BRAND})`,
|
|
17
|
+
shape: { inset: "34% -12% -12% 34%", borderRadius: "50%", background: "rgb(255 255 255 / .9)" }
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
title: "Northern Static",
|
|
21
|
+
artist: "Ivy Arden",
|
|
22
|
+
len: 187,
|
|
23
|
+
start: 64,
|
|
24
|
+
bg: `linear-gradient(200deg, color-mix(in srgb, ${INK} 88%, ${BRAND}), ${INK})`,
|
|
25
|
+
shape: { inset: "22%", borderRadius: "50%", boxShadow: `inset 0 0 0 7px ${BRAND}` }
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
title: "Glass Hours",
|
|
29
|
+
artist: "The Quiet Rooms",
|
|
30
|
+
len: 232,
|
|
31
|
+
start: 91,
|
|
32
|
+
bg: `linear-gradient(180deg, color-mix(in srgb, ${BRAND} 12%, white), color-mix(in srgb, ${BRAND} 30%, white))`,
|
|
33
|
+
shape: { inset: "50% 0 0 0", background: BRAND, borderRadius: "50% 50% 0 0 / 100% 100% 0 0" }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "Soft Meridian",
|
|
37
|
+
artist: "Low Tide",
|
|
38
|
+
len: 199,
|
|
39
|
+
start: 47,
|
|
40
|
+
bg: `radial-gradient(circle at 70% 25%, color-mix(in srgb, ${BRAND} 60%, white), ${BRAND} 55%, color-mix(in srgb, ${BRAND} 60%, black))`,
|
|
41
|
+
shape: { inset: "62% 18% 30% 18%", background: "rgb(255 255 255 / .85)", borderRadius: "2px" }
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
var BARS = [0.9, 1.15, 0.8, 1.05];
|
|
45
|
+
var DWELL = 9e3;
|
|
46
|
+
var still = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
47
|
+
var clock = (s) => `${Math.floor(s / 60)}:${String(Math.floor(s % 60)).padStart(2, "0")}`;
|
|
48
|
+
var Skip = ({ back }) => /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "currentColor", style: back ? { transform: "scaleX(-1)" } : void 0, "aria-hidden": true, children: [
|
|
49
|
+
/* @__PURE__ */ jsx("path", { d: "M3 3.2v9.6c0 .5.5.8.9.5L10.5 8.4a.6.6 0 0 0 0-.8L3.9 2.7c-.4-.3-.9 0-.9.5Z" }),
|
|
50
|
+
/* @__PURE__ */ jsx("rect", { x: "11.6", y: "2.8", width: "1.8", height: "10.4", rx: ".6" })
|
|
51
|
+
] });
|
|
52
|
+
function NowPlaying() {
|
|
53
|
+
const [cur, setCur] = useState(0);
|
|
54
|
+
const [prev, setPrev] = useState(null);
|
|
55
|
+
const [dir, setDir] = useState(1);
|
|
56
|
+
const [at, setAt] = useState(TRACKS[0].start);
|
|
57
|
+
const [playing, setPlaying] = useState(true);
|
|
58
|
+
const [demo, setDemo] = useState(true);
|
|
59
|
+
const idle = useRef(null);
|
|
60
|
+
const bar = useRef(null);
|
|
61
|
+
const n = useRef(0);
|
|
62
|
+
const curRef = useRef(0);
|
|
63
|
+
const track = TRACKS[cur];
|
|
64
|
+
const go = (d) => {
|
|
65
|
+
const c = curRef.current;
|
|
66
|
+
const next = (c + d + TRACKS.length) % TRACKS.length;
|
|
67
|
+
curRef.current = next;
|
|
68
|
+
setPrev({ i: c, dir: d, n: ++n.current });
|
|
69
|
+
setCur(next);
|
|
70
|
+
setAt(TRACKS[next].start);
|
|
71
|
+
setDir(d);
|
|
72
|
+
};
|
|
73
|
+
const takeOver = () => {
|
|
74
|
+
setDemo(false);
|
|
75
|
+
if (idle.current) clearTimeout(idle.current);
|
|
76
|
+
idle.current = setTimeout(() => setDemo(true), 1e4);
|
|
77
|
+
};
|
|
78
|
+
useEffect(() => () => void (idle.current && clearTimeout(idle.current)), []);
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (!still()) return;
|
|
81
|
+
const id = setTimeout(() => setPlaying(false), 0);
|
|
82
|
+
return () => clearTimeout(id);
|
|
83
|
+
}, []);
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
if (!playing) return;
|
|
86
|
+
const id = setInterval(() => setAt((a) => a + 0.25), 250);
|
|
87
|
+
return () => clearInterval(id);
|
|
88
|
+
}, [playing]);
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
if (at < track.len) return;
|
|
91
|
+
const id = setTimeout(() => go(1), 0);
|
|
92
|
+
return () => clearTimeout(id);
|
|
93
|
+
}, [at, track.len]);
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
if (!demo || !playing || still()) return;
|
|
96
|
+
const id = setTimeout(() => go(1), DWELL);
|
|
97
|
+
return () => clearTimeout(id);
|
|
98
|
+
}, [demo, playing, cur]);
|
|
99
|
+
useEffect(() => {
|
|
100
|
+
if (!prev) return;
|
|
101
|
+
const id = setTimeout(() => setPrev((p2) => p2 && p2.n === prev.n ? null : p2), 600);
|
|
102
|
+
return () => clearTimeout(id);
|
|
103
|
+
}, [prev]);
|
|
104
|
+
const toggle = () => {
|
|
105
|
+
takeOver();
|
|
106
|
+
setPlaying((p2) => !p2);
|
|
107
|
+
};
|
|
108
|
+
const skip = (d) => {
|
|
109
|
+
takeOver();
|
|
110
|
+
go(d);
|
|
111
|
+
};
|
|
112
|
+
const seekTo = (x) => {
|
|
113
|
+
const r = bar.current?.getBoundingClientRect();
|
|
114
|
+
if (!r) return;
|
|
115
|
+
setAt(Math.max(0, Math.min(track.len - 1, (x - r.left) / r.width * track.len)));
|
|
116
|
+
};
|
|
117
|
+
const onBar = (e) => {
|
|
118
|
+
takeOver();
|
|
119
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
120
|
+
seekTo(e.clientX);
|
|
121
|
+
};
|
|
122
|
+
const onKey = (e) => {
|
|
123
|
+
const onButton = e.target !== e.currentTarget && e.target.tagName === "BUTTON";
|
|
124
|
+
if (e.key === " " && !onButton) {
|
|
125
|
+
e.preventDefault();
|
|
126
|
+
toggle();
|
|
127
|
+
} else if (e.key === "ArrowRight" || e.key === "ArrowLeft") {
|
|
128
|
+
e.preventDefault();
|
|
129
|
+
takeOver();
|
|
130
|
+
const d = e.key === "ArrowRight" ? 5 : -5;
|
|
131
|
+
setAt((a) => Math.max(0, Math.min(track.len - 1, a + d)));
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const p = Math.min(1, at / track.len);
|
|
135
|
+
const slide = (i, out, d) => /* @__PURE__ */ jsxs("span", { className: `${out ? "absolute inset-0" : "block"} ${out ? d > 0 ? "lab-np-out" : "lab-np-out-b" : d > 0 ? "lab-np-in" : d < 0 ? "lab-np-in-b" : ""}`, children: [
|
|
136
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-[15px] font-medium tracking-[-0.015em] text-ink", children: TRACKS[i].title }),
|
|
137
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-[12.5px] text-mute", children: TRACKS[i].artist })
|
|
138
|
+
] }, `${i}-${out ? prev?.n : "in"}-${cur}`);
|
|
139
|
+
return /* @__PURE__ */ jsxs(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
role: "group",
|
|
143
|
+
tabIndex: 0,
|
|
144
|
+
"aria-label": `Music player. ${track.title} by ${track.artist}. ${playing ? "Playing" : "Paused"}. Space to ${playing ? "pause" : "play"}, arrows to seek`,
|
|
145
|
+
onKeyDown: onKey,
|
|
146
|
+
className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-11 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand/50",
|
|
147
|
+
style: { containerType: "size" },
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ jsx("style", { href: "asta-nowplaying", precedence: "asta", children: `
|
|
150
|
+
.lab-np-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: min(6cqw, 28px); align-items: center }
|
|
151
|
+
.lab-np-cover { width: min(62cqh, 40cqw, 200px) }
|
|
152
|
+
@container (aspect-ratio < 1.15) { .lab-np-body { grid-template-columns: minmax(0, 1fr); gap: 16px } .lab-np-cover { width: min(38cqh, 100%) } }
|
|
153
|
+
@keyframes lab-np-in { from { transform: translateX(18px); opacity: 0 } to { transform: none; opacity: 1 } }
|
|
154
|
+
@keyframes lab-np-in-b { from { transform: translateX(-18px); opacity: 0 } to { transform: none; opacity: 1 } }
|
|
155
|
+
@keyframes lab-np-out { to { transform: translateX(-18px); opacity: 0 } }
|
|
156
|
+
@keyframes lab-np-out-b { to { transform: translateX(18px); opacity: 0 } }
|
|
157
|
+
@keyframes lab-np-eq { 0% { transform: scaleY(.3) } 35% { transform: scaleY(1) } 65% { transform: scaleY(.55) } 100% { transform: scaleY(.85) } }
|
|
158
|
+
.lab-np-in { animation: lab-np-in .55s ${EASE} both }
|
|
159
|
+
.lab-np-in-b { animation: lab-np-in-b .55s ${EASE} both }
|
|
160
|
+
.lab-np-out { animation: lab-np-out .45s ${EASE} both }
|
|
161
|
+
.lab-np-out-b { animation: lab-np-out-b .45s ${EASE} both }
|
|
162
|
+
.lab-np-eq { transform-origin: bottom; animation: lab-np-eq var(--d) ${EASE} infinite alternate }
|
|
163
|
+
@media (prefers-reduced-motion: reduce) {
|
|
164
|
+
.lab-np-in, .lab-np-in-b, .lab-np-out, .lab-np-out-b, .lab-np-eq { animation: none }
|
|
165
|
+
.lab-np-out, .lab-np-out-b { opacity: 0 }
|
|
166
|
+
.lab-np-eq { transform: scaleY(.5) }
|
|
167
|
+
}
|
|
168
|
+
` }),
|
|
169
|
+
/* @__PURE__ */ jsxs("div", { className: "lab-np-body w-full max-w-[460px]", children: [
|
|
170
|
+
/* @__PURE__ */ jsx("div", { className: `lab-np-cover relative mx-auto aspect-square overflow-hidden rounded-[12px] bg-paper-2 ${RING}`, children: TRACKS.map((t, i) => /* @__PURE__ */ jsx(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
"aria-hidden": true,
|
|
174
|
+
className: "absolute inset-0 transition-[opacity,transform] duration-700 motion-reduce:transition-none",
|
|
175
|
+
style: {
|
|
176
|
+
background: t.bg,
|
|
177
|
+
opacity: i === cur ? 1 : 0,
|
|
178
|
+
transform: i === cur ? "none" : prev?.i === i ? `translateX(${-dir * 8}%) scale(.98)` : `translateX(${dir * 8}%) scale(.98)`,
|
|
179
|
+
transitionTimingFunction: EASE
|
|
180
|
+
},
|
|
181
|
+
children: /* @__PURE__ */ jsx("span", { className: "absolute", style: t.shape })
|
|
182
|
+
},
|
|
183
|
+
t.title
|
|
184
|
+
)) }),
|
|
185
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
186
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[10.5px] uppercase tracking-[0.12em] text-mute", children: [
|
|
187
|
+
/* @__PURE__ */ jsx(
|
|
188
|
+
"span",
|
|
189
|
+
{
|
|
190
|
+
className: "flex h-3 items-end gap-[2px] transition-[opacity,transform] duration-500",
|
|
191
|
+
style: { opacity: playing ? 1 : 0.45, transform: playing ? "none" : "scaleY(.35)", transformOrigin: "bottom", transitionTimingFunction: EASE },
|
|
192
|
+
"aria-hidden": true,
|
|
193
|
+
children: BARS.map((d, i) => /* @__PURE__ */ jsx(
|
|
194
|
+
"span",
|
|
195
|
+
{
|
|
196
|
+
className: "lab-np-eq block h-full w-[2.5px] rounded-[1px] bg-brand",
|
|
197
|
+
style: { ["--d"]: `${d * 0.5}s`, animationDelay: `${-i * 0.17}s`, animationPlayState: playing ? "running" : "paused" }
|
|
198
|
+
},
|
|
199
|
+
i
|
|
200
|
+
))
|
|
201
|
+
}
|
|
202
|
+
),
|
|
203
|
+
playing ? "Now playing" : "Paused"
|
|
204
|
+
] }),
|
|
205
|
+
/* @__PURE__ */ jsxs("div", { className: "relative mt-2 overflow-hidden", "aria-live": "polite", children: [
|
|
206
|
+
prev && slide(prev.i, true, prev.dir),
|
|
207
|
+
slide(cur, false, prev ? prev.dir : 0)
|
|
208
|
+
] }),
|
|
209
|
+
/* @__PURE__ */ jsxs(
|
|
210
|
+
"div",
|
|
211
|
+
{
|
|
212
|
+
ref: bar,
|
|
213
|
+
role: "slider",
|
|
214
|
+
"aria-label": "Seek",
|
|
215
|
+
"aria-valuemin": 0,
|
|
216
|
+
"aria-valuemax": track.len,
|
|
217
|
+
"aria-valuenow": Math.floor(at),
|
|
218
|
+
"aria-valuetext": `${clock(at)} of ${clock(track.len)}`,
|
|
219
|
+
onPointerDown: onBar,
|
|
220
|
+
onPointerMove: (e) => e.buttons && seekTo(e.clientX),
|
|
221
|
+
className: "group relative mt-[max(12px,4cqh)] flex h-4 cursor-pointer touch-none items-center",
|
|
222
|
+
children: [
|
|
223
|
+
/* @__PURE__ */ jsx("span", { className: "relative h-[3px] w-full overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_12%,transparent)]", children: /* @__PURE__ */ jsx(
|
|
224
|
+
"span",
|
|
225
|
+
{
|
|
226
|
+
className: "absolute inset-0 origin-left rounded-full bg-brand",
|
|
227
|
+
style: { transform: `scaleX(${p})`, transition: `transform .25s linear` }
|
|
228
|
+
},
|
|
229
|
+
cur
|
|
230
|
+
) }),
|
|
231
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-0", style: { transform: `translateX(${p * 100}%)`, transition: `transform .25s linear` }, children: /* @__PURE__ */ jsx("span", { className: "absolute left-0 top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-ink opacity-0 transition-opacity duration-300 group-hover:opacity-100" }) }, `k${cur}`)
|
|
232
|
+
]
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-1 flex justify-between text-[11px] tabular-nums text-mute", children: [
|
|
236
|
+
/* @__PURE__ */ jsx("span", { children: clock(at) }),
|
|
237
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
238
|
+
"-",
|
|
239
|
+
clock(Math.max(0, track.len - at))
|
|
240
|
+
] })
|
|
241
|
+
] }),
|
|
242
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-[max(8px,2.5cqh)] flex items-center justify-center gap-2", children: [
|
|
243
|
+
/* @__PURE__ */ jsx(
|
|
244
|
+
"button",
|
|
245
|
+
{
|
|
246
|
+
type: "button",
|
|
247
|
+
"aria-label": "Previous track",
|
|
248
|
+
onClick: () => skip(-1),
|
|
249
|
+
className: "flex h-9 w-9 items-center justify-center rounded-[8px] text-ink-2 outline-none transition-transform duration-200 active:scale-90 focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
250
|
+
children: /* @__PURE__ */ jsx(Skip, { back: true })
|
|
251
|
+
}
|
|
252
|
+
),
|
|
253
|
+
/* @__PURE__ */ jsxs(
|
|
254
|
+
"button",
|
|
255
|
+
{
|
|
256
|
+
type: "button",
|
|
257
|
+
"aria-label": playing ? "Pause" : "Play",
|
|
258
|
+
onClick: toggle,
|
|
259
|
+
className: "relative flex h-10 w-10 items-center justify-center rounded-[9px] bg-ink text-paper outline-none transition-transform duration-200 active:scale-95 focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
|
|
260
|
+
children: [
|
|
261
|
+
/* @__PURE__ */ jsx(
|
|
262
|
+
"svg",
|
|
263
|
+
{
|
|
264
|
+
viewBox: "0 0 16 16",
|
|
265
|
+
className: "absolute h-4 w-4 transition-[opacity,transform] duration-500 motion-reduce:transition-none",
|
|
266
|
+
style: { opacity: playing ? 0 : 1, transform: playing ? "rotate(-90deg) scale(.5)" : "none", transitionTimingFunction: EASE },
|
|
267
|
+
fill: "currentColor",
|
|
268
|
+
"aria-hidden": true,
|
|
269
|
+
children: /* @__PURE__ */ jsx("path", { d: "M4.5 2.9v10.2c0 .5.5.8.9.5l7.6-5.1a.6.6 0 0 0 0-1L5.4 2.4c-.4-.3-.9 0-.9.5Z" })
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ jsxs(
|
|
273
|
+
"svg",
|
|
274
|
+
{
|
|
275
|
+
viewBox: "0 0 16 16",
|
|
276
|
+
className: "absolute h-4 w-4 transition-[opacity,transform] duration-500 motion-reduce:transition-none",
|
|
277
|
+
style: { opacity: playing ? 1 : 0, transform: playing ? "none" : "rotate(90deg) scale(.5)", transitionTimingFunction: EASE },
|
|
278
|
+
fill: "currentColor",
|
|
279
|
+
"aria-hidden": true,
|
|
280
|
+
children: [
|
|
281
|
+
/* @__PURE__ */ jsx("rect", { x: "3.5", y: "2.5", width: "3", height: "11", rx: "1" }),
|
|
282
|
+
/* @__PURE__ */ jsx("rect", { x: "9.5", y: "2.5", width: "3", height: "11", rx: "1" })
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
)
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
),
|
|
289
|
+
/* @__PURE__ */ jsx(
|
|
290
|
+
"button",
|
|
291
|
+
{
|
|
292
|
+
type: "button",
|
|
293
|
+
"aria-label": "Next track",
|
|
294
|
+
onClick: () => skip(1),
|
|
295
|
+
className: "flex h-9 w-9 items-center justify-center rounded-[8px] text-ink-2 outline-none transition-transform duration-200 active:scale-90 focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
296
|
+
children: /* @__PURE__ */ jsx(Skip, {})
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
] })
|
|
300
|
+
] })
|
|
301
|
+
] })
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export {
|
|
308
|
+
NowPlaying
|
|
309
|
+
};
|