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,469 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/variants/navbar-aui-011.tsx
|
|
4
|
+
import { Fragment, useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { Fragment as Fragment2, 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 TW_EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
|
|
9
|
+
var FOCUS = "outline-none focus-visible:ring-2 focus-visible:ring-brand/60";
|
|
10
|
+
var HATCH = "bg-[repeating-linear-gradient(135deg,color-mix(in_srgb,var(--paper)_5%,transparent)_0_1px,transparent_1px_7px)]";
|
|
11
|
+
var CSS = `
|
|
12
|
+
@keyframes aui-011-letter { from { opacity: 0; transform: translateY(70%) rotate(6deg); } }
|
|
13
|
+
@keyframes aui-011-rise { from { opacity: 0; transform: translateY(6px); } }
|
|
14
|
+
@keyframes aui-011-drop { from { opacity: 0; transform: translateY(-8px); } }
|
|
15
|
+
@keyframes aui-011-vp-in { from { opacity: 0; transform: translateY(-4px) scale(.96); } }
|
|
16
|
+
@keyframes aui-011-vp-out { to { opacity: 0; transform: translateY(-4px) scale(.96); } }
|
|
17
|
+
@keyframes aui-011-from-l { from { opacity: 0; transform: translateX(-28px); } }
|
|
18
|
+
@keyframes aui-011-from-r { from { opacity: 0; transform: translateX(28px); } }
|
|
19
|
+
@keyframes aui-011-to-l { to { opacity: 0; transform: translateX(-28px); } }
|
|
20
|
+
@keyframes aui-011-to-r { to { opacity: 0; transform: translateX(28px); } }
|
|
21
|
+
.aui-011-l { display: inline-block; animation: aui-011-letter .8s ${EASE} both; animation-delay: calc(120ms + var(--i, 0) * 45ms); }
|
|
22
|
+
.aui-011-in { animation: aui-011-rise .55s ${EASE} both; animation-delay: calc(var(--i, 0) * 50ms); }
|
|
23
|
+
.aui-011-sheet { animation: aui-011-drop .4s ${EASE} both; }
|
|
24
|
+
.aui-011-vp { transform-origin: top center; }
|
|
25
|
+
.aui-011-vp[data-state=open] { animation: aui-011-vp-in .26s ${EASE}; }
|
|
26
|
+
.aui-011-vp[data-state=closed] { animation: aui-011-vp-out .16s ease-in forwards; }
|
|
27
|
+
.aui-011-c[data-motion=from-start] { animation: aui-011-from-l .3s ${EASE}; }
|
|
28
|
+
.aui-011-c[data-motion=from-end] { animation: aui-011-from-r .3s ${EASE}; }
|
|
29
|
+
.aui-011-c[data-motion=to-start] { animation: aui-011-to-l .3s ${EASE} forwards; }
|
|
30
|
+
.aui-011-c[data-motion=to-end] { animation: aui-011-to-r .3s ${EASE} forwards; }
|
|
31
|
+
.aui-011-t { animation: aui-011-rise .45s ${EASE} both; animation-delay: calc(40ms + var(--i, 0) * 40ms); }
|
|
32
|
+
@media (prefers-reduced-motion: reduce) { .aui-011-m, .aui-011-m * { animation: none !important; transition-duration: 0s !important; } .aui-011-vp[data-state=closed] { visibility: hidden; } }
|
|
33
|
+
`;
|
|
34
|
+
var at = (n) => ({ "--i": n });
|
|
35
|
+
var PATHS = {
|
|
36
|
+
vase: "M6.5 2.5h3M7 2.5v2C4.5 6 4 8.5 4.5 11c.4 1.7 1.8 2.5 3.5 2.5s3.1-.8 3.5-2.5c.5-2.5 0-5-2.5-6.5v-2",
|
|
37
|
+
bowl: "M2.5 7h11c-.4 3.3-2.6 5.5-5.5 5.5S2.9 10.3 2.5 7ZM6 13.5h4",
|
|
38
|
+
jug: "M5 3h5l-.5 2c1.8 1.4 2 4.5 1.2 6.5-.4 1.2-1.5 2-2.7 2s-2.3-.8-2.7-2C4.5 9.5 4.7 6.4 6.5 5L5 3ZM11 6.5c1.8 0 2.4 2.6.4 3.4",
|
|
39
|
+
plate: "M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11ZM8 10.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",
|
|
40
|
+
cup: "M3.5 5h7v4.5a3.5 3.5 0 0 1-7 0ZM10.5 6.5h1a1.75 1.75 0 0 1 0 3.5h-1.2",
|
|
41
|
+
gift: "M2.5 6h11v2.5h-11ZM3.5 8.5h9v5h-9ZM8 6v7.5M8 6C6.5 3 4.5 3.5 5 5.2M8 6c1.5-3 3.5-2.5 3 -.8",
|
|
42
|
+
pin: "M8 14s4.5-4 4.5-7.5a4.5 4.5 0 0 0-9 0C3.5 10 8 14 8 14ZM8 8a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z",
|
|
43
|
+
brush: "M13 3 7.5 8.5M7.5 8.5c-1-1-3-.5-3.2 1.6-.2 1.6-.8 2.4-1.8 2.9 2.5.6 5.3-.3 5.6-2.3",
|
|
44
|
+
leaf: "M3 13c0-6 3.5-9.5 10-10 0 6.5-3.5 10-10 10ZM3 13l5-5",
|
|
45
|
+
box: "M2.5 5 8 2.5 13.5 5v6L8 13.5 2.5 11ZM2.5 5 8 7.5 13.5 5M8 7.5v6",
|
|
46
|
+
undo: "M5.5 4 2.5 7l3 3M2.5 7h7a4 4 0 0 1 0 8H7",
|
|
47
|
+
mail: "M2.5 4h11v8h-11ZM2.5 4.5 8 9l5.5-4.5"
|
|
48
|
+
};
|
|
49
|
+
var Glyph = ({ name, className = "h-3.5 w-3.5" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className, fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: PATHS[name] }) });
|
|
50
|
+
var Badge = ({ icon, size = "h-7 w-7" }) => /* @__PURE__ */ jsx("span", { className: cx("grid shrink-0 place-items-center rounded-[7px] bg-paper/[.06] text-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_12%,transparent)]", size), children: /* @__PURE__ */ jsx(Glyph, { name: icon }) });
|
|
51
|
+
var Chevron = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-3.5 w-3.5", className), fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m6 4 4 4-4 4" }) });
|
|
52
|
+
var LEFT = [
|
|
53
|
+
{
|
|
54
|
+
label: "Shop",
|
|
55
|
+
menu: {
|
|
56
|
+
type: "grid",
|
|
57
|
+
items: [
|
|
58
|
+
{ title: "Vases", description: "Tall forms, matte glazes", href: "#", icon: "vase" },
|
|
59
|
+
{ title: "Bowls", description: "Breakfast to serving", href: "#", icon: "bowl" },
|
|
60
|
+
{ title: "Jugs", description: "Pour without a drip", href: "#", icon: "jug" },
|
|
61
|
+
{ title: "Plates", description: "Sets of two and four", href: "#", icon: "plate" },
|
|
62
|
+
{ title: "Cups", description: "Espresso to mug", href: "#", icon: "cup" },
|
|
63
|
+
{ title: "Gift cards", description: "Sent by email, never expire", href: "#", icon: "gift" }
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: "Studio",
|
|
69
|
+
menu: {
|
|
70
|
+
type: "columns",
|
|
71
|
+
columns: [
|
|
72
|
+
{
|
|
73
|
+
heading: "Visit",
|
|
74
|
+
items: [
|
|
75
|
+
{ title: "The studio", description: "Two people, one kiln, Porto", href: "#", icon: "pin" },
|
|
76
|
+
{ title: "Workshops", description: "Saturdays, six seats", href: "#", icon: "brush" },
|
|
77
|
+
{ title: "Care guide", description: "Keep the glaze bright", href: "#", icon: "leaf" }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
heading: "Help",
|
|
82
|
+
items: [
|
|
83
|
+
{ title: "Shipping", description: "Packed by hand in a week", href: "#", icon: "box" },
|
|
84
|
+
{ title: "Returns", description: "30 days, no questions", href: "#", icon: "undo" },
|
|
85
|
+
{ title: "Contact", description: "We reply the same day", href: "#", icon: "mail" }
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
cta: { title: "Autumn collection", description: "14 pieces, fired twice.", label: "Shop the drop", href: "#" }
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
var RIGHT = [
|
|
94
|
+
{ label: "Journal", href: "#" },
|
|
95
|
+
{ label: "Stores", href: "#" }
|
|
96
|
+
];
|
|
97
|
+
var tile = cx(
|
|
98
|
+
"group/t relative flex flex-col overflow-hidden rounded-[6px] p-3.5 transition-[opacity,box-shadow] duration-300",
|
|
99
|
+
"shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_9%,transparent)] hover:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_20%,transparent)]",
|
|
100
|
+
"group-has-[a:hover]/m:opacity-65 hover:!opacity-100",
|
|
101
|
+
FOCUS
|
|
102
|
+
);
|
|
103
|
+
function Panel({ menu }) {
|
|
104
|
+
if (menu.type === "grid")
|
|
105
|
+
return /* @__PURE__ */ jsx("div", { className: "group/m grid w-[min(600px,calc(100cqw-24px))] grid-cols-3 gap-2 p-2", children: menu.items.map((it, n) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("a", { href: it.href, style: at(n), className: cx(tile, HATCH, "aui-011-t h-[118px] justify-between"), children: [
|
|
106
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 bg-linear-to-b from-transparent from-40% to-[color-mix(in_srgb,var(--brand)_22%,transparent)] opacity-0 transition-opacity duration-500 group-hover/t:opacity-100" }),
|
|
107
|
+
it.icon && /* @__PURE__ */ jsx("span", { className: cx("relative transition-transform duration-500 group-hover/t:-translate-y-0.5 group-hover/t:text-brand", TW_EASE), children: /* @__PURE__ */ jsx(Badge, { icon: it.icon, size: "h-8 w-8" }) }),
|
|
108
|
+
/* @__PURE__ */ jsxs("span", { className: "relative", children: [
|
|
109
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 text-[14px] font-medium text-paper", children: [
|
|
110
|
+
it.title,
|
|
111
|
+
/* @__PURE__ */ jsx(Chevron, { className: cx("-translate-x-0.5 text-paper/40 transition-[translate,color] duration-300 group-hover/t:translate-x-0 group-hover/t:text-paper", TW_EASE) })
|
|
112
|
+
] }),
|
|
113
|
+
it.description && /* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[12px] text-paper/55", children: it.description })
|
|
114
|
+
] })
|
|
115
|
+
] }) }, it.title)) });
|
|
116
|
+
return /* @__PURE__ */ jsxs("div", { className: "group/m grid w-[min(620px,calc(100cqw-24px))] grid-cols-[1fr_1fr_180px] gap-2 p-2", children: [
|
|
117
|
+
menu.columns.map((c, ci) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5 pt-1.5", children: [
|
|
118
|
+
/* @__PURE__ */ jsx("span", { className: "mb-1 px-2.5 font-mono text-[10.5px] uppercase tracking-[0.08em] text-paper/45", children: c.heading }),
|
|
119
|
+
c.items.map((it, n) => /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
120
|
+
"a",
|
|
121
|
+
{
|
|
122
|
+
href: it.href,
|
|
123
|
+
style: at(ci * 3 + n),
|
|
124
|
+
className: cx(
|
|
125
|
+
"aui-011-t flex items-center gap-2.5 rounded-[8px] px-2.5 py-2 transition-[background-color,opacity] duration-200 hover:bg-paper/[.07] group-has-[a:hover]/m:opacity-65 hover:!opacity-100",
|
|
126
|
+
FOCUS
|
|
127
|
+
),
|
|
128
|
+
children: [
|
|
129
|
+
it.icon && /* @__PURE__ */ jsx(Badge, { icon: it.icon }),
|
|
130
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
131
|
+
/* @__PURE__ */ jsx("span", { className: "text-[13.5px] font-medium leading-tight text-paper", children: it.title }),
|
|
132
|
+
it.description && /* @__PURE__ */ jsx("span", { className: "truncate text-[12px] leading-snug text-paper/55", children: it.description })
|
|
133
|
+
] })
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
) }, it.title))
|
|
137
|
+
] }, c.heading)),
|
|
138
|
+
/* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
139
|
+
"a",
|
|
140
|
+
{
|
|
141
|
+
href: menu.cta.href,
|
|
142
|
+
style: at(6),
|
|
143
|
+
className: cx(
|
|
144
|
+
"aui-011-t group/t relative flex min-h-[176px] flex-col justify-end overflow-hidden rounded-[6px] bg-brand p-4 text-white transition-opacity duration-300 group-has-[a:hover]/m:opacity-75 hover:!opacity-100",
|
|
145
|
+
FOCUS
|
|
146
|
+
),
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cx("absolute -right-6 -top-4 text-white/25 transition-transform duration-700 group-hover/t:-translate-y-1 group-hover/t:rotate-6", TW_EASE), children: /* @__PURE__ */ jsx(Glyph, { name: "vase", className: "h-28 w-28" }) }),
|
|
149
|
+
/* @__PURE__ */ jsx("span", { className: "relative block text-[15px] font-medium leading-tight tracking-[-0.02em]", children: menu.cta.title }),
|
|
150
|
+
/* @__PURE__ */ jsx("span", { className: "relative mt-1 block text-[12.5px] text-white/75", children: menu.cta.description }),
|
|
151
|
+
/* @__PURE__ */ jsxs("span", { className: "relative mt-3 flex items-center gap-1 text-[13px] font-medium", children: [
|
|
152
|
+
menu.cta.label,
|
|
153
|
+
/* @__PURE__ */ jsx(Chevron, { className: cx("transition-transform duration-300 group-hover/t:translate-x-0.5", TW_EASE) })
|
|
154
|
+
] })
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
) })
|
|
158
|
+
] });
|
|
159
|
+
}
|
|
160
|
+
var flat = (m) => m.type === "grid" ? m.items : m.columns.flatMap((c) => c.items);
|
|
161
|
+
function useMega(labels, root, openOnMount, delay = 700) {
|
|
162
|
+
const [m, setM] = useState({ value: "", last: "", dir: "" });
|
|
163
|
+
const timer = useRef(void 0);
|
|
164
|
+
const hoverAt = useRef(0);
|
|
165
|
+
const current = useRef("");
|
|
166
|
+
const wasOpen = useRef(false);
|
|
167
|
+
const panelRef = useRef(null);
|
|
168
|
+
const innerRef = useRef(null);
|
|
169
|
+
const triggers = useRef(/* @__PURE__ */ new Map());
|
|
170
|
+
const open = (v) => {
|
|
171
|
+
clearTimeout(timer.current);
|
|
172
|
+
setM((p) => p.value === v ? p : { value: v, last: v, dir: p.value ? labels.indexOf(v) > labels.indexOf(p.value) ? "from-end" : "from-start" : "" });
|
|
173
|
+
};
|
|
174
|
+
const close = useCallback((focus = false) => {
|
|
175
|
+
clearTimeout(timer.current);
|
|
176
|
+
if (focus) triggers.current.get(current.current)?.focus();
|
|
177
|
+
setM((p) => p.value ? { ...p, value: "", dir: "" } : p);
|
|
178
|
+
}, []);
|
|
179
|
+
const later = () => {
|
|
180
|
+
clearTimeout(timer.current);
|
|
181
|
+
timer.current = setTimeout(() => close(), 150);
|
|
182
|
+
};
|
|
183
|
+
const cancel = () => clearTimeout(timer.current);
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
current.current = m.value;
|
|
186
|
+
if (!m.value) return;
|
|
187
|
+
const down = (e) => !root.current?.contains(e.target) && close();
|
|
188
|
+
const key = (e) => e.key === "Escape" && close(true);
|
|
189
|
+
const focus = (e) => !root.current?.contains(e.target) && close();
|
|
190
|
+
document.addEventListener("pointerdown", down);
|
|
191
|
+
document.addEventListener("keydown", key);
|
|
192
|
+
document.addEventListener("focusin", focus);
|
|
193
|
+
return () => {
|
|
194
|
+
document.removeEventListener("pointerdown", down);
|
|
195
|
+
document.removeEventListener("keydown", key);
|
|
196
|
+
document.removeEventListener("focusin", focus);
|
|
197
|
+
};
|
|
198
|
+
}, [m.value, root, close]);
|
|
199
|
+
useEffect(() => () => clearTimeout(timer.current), []);
|
|
200
|
+
useEffect(() => {
|
|
201
|
+
if (!openOnMount) return;
|
|
202
|
+
const t = setTimeout(() => setM({ value: openOnMount, last: openOnMount, dir: "" }), delay);
|
|
203
|
+
return () => clearTimeout(t);
|
|
204
|
+
}, [openOnMount, delay]);
|
|
205
|
+
useLayoutEffect(() => {
|
|
206
|
+
const box = panelRef.current;
|
|
207
|
+
const el = innerRef.current?.firstElementChild;
|
|
208
|
+
if (!box || !el || !m.value) {
|
|
209
|
+
wasOpen.current = false;
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const fit = (instant) => {
|
|
213
|
+
if (instant) box.style.transition = "none";
|
|
214
|
+
box.style.width = `${el.offsetWidth}px`;
|
|
215
|
+
box.style.height = `${el.offsetHeight}px`;
|
|
216
|
+
if (instant) {
|
|
217
|
+
void box.offsetWidth;
|
|
218
|
+
box.style.transition = "";
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
fit(!wasOpen.current);
|
|
222
|
+
wasOpen.current = true;
|
|
223
|
+
const ro = new ResizeObserver(() => fit(true));
|
|
224
|
+
ro.observe(el);
|
|
225
|
+
return () => ro.disconnect();
|
|
226
|
+
}, [m.value]);
|
|
227
|
+
const register = (label) => (el) => {
|
|
228
|
+
if (el) triggers.current.set(label, el);
|
|
229
|
+
else triggers.current.delete(label);
|
|
230
|
+
};
|
|
231
|
+
const enter = (label, mouse) => {
|
|
232
|
+
if (!mouse) return;
|
|
233
|
+
if (current.current !== label) hoverAt.current = Date.now();
|
|
234
|
+
open(label);
|
|
235
|
+
};
|
|
236
|
+
const click = (label) => m.value === label && Date.now() - hoverAt.current > 400 ? close() : open(label);
|
|
237
|
+
const focusFirst = () => requestAnimationFrame(() => panelRef.current?.querySelector("a")?.focus());
|
|
238
|
+
const triggerKeys = (label, e) => {
|
|
239
|
+
if (e.key === "ArrowDown" || e.key === "Tab" && !e.shiftKey && m.value === label) {
|
|
240
|
+
e.preventDefault();
|
|
241
|
+
open(label);
|
|
242
|
+
focusFirst();
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
const panelKeys = (e) => {
|
|
246
|
+
const first = panelRef.current?.querySelector("a");
|
|
247
|
+
if (e.key === "Tab" && e.shiftKey && e.target === first) {
|
|
248
|
+
e.preventDefault();
|
|
249
|
+
triggers.current.get(current.current)?.focus();
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
const ended = (e) => {
|
|
253
|
+
if (e.target === e.currentTarget) setM((p) => p.value ? p : { ...p, last: "" });
|
|
254
|
+
};
|
|
255
|
+
return { m, panelRef, innerRef, close, later, cancel, register, enter, click, triggerKeys, panelKeys, ended };
|
|
256
|
+
}
|
|
257
|
+
function CenteredNavbar({
|
|
258
|
+
wordmark = "Astabyte",
|
|
259
|
+
brandHref = "/",
|
|
260
|
+
left = LEFT,
|
|
261
|
+
right = RIGHT,
|
|
262
|
+
secondary = { label: "Sign in", href: "#" },
|
|
263
|
+
cta = { label: "Bag \xB7 2", href: "#" },
|
|
264
|
+
active,
|
|
265
|
+
openOnMount,
|
|
266
|
+
className
|
|
267
|
+
}) {
|
|
268
|
+
const [sheet, setSheet] = useState(false);
|
|
269
|
+
const [section, setSection] = useState(null);
|
|
270
|
+
const root = useRef(null);
|
|
271
|
+
const { panelRef: megaPanel, innerRef: megaInner, ...mega } = useMega(left.map((x) => x.label), root, openOnMount, 900);
|
|
272
|
+
const value = mega.m.value;
|
|
273
|
+
const lastMenu = left.find((x) => x.label === mega.m.last)?.menu;
|
|
274
|
+
const mark = useRef(null);
|
|
275
|
+
const burger = useRef(null);
|
|
276
|
+
const id = useId();
|
|
277
|
+
const close = useCallback((focus) => {
|
|
278
|
+
setSheet(false);
|
|
279
|
+
if (focus) burger.current?.focus();
|
|
280
|
+
}, []);
|
|
281
|
+
useEffect(() => {
|
|
282
|
+
if (!sheet) return;
|
|
283
|
+
const down = (e) => !root.current?.contains(e.target) && close(false);
|
|
284
|
+
const key = (e) => e.key === "Escape" && close(true);
|
|
285
|
+
document.addEventListener("pointerdown", down);
|
|
286
|
+
document.addEventListener("keydown", key);
|
|
287
|
+
return () => {
|
|
288
|
+
document.removeEventListener("pointerdown", down);
|
|
289
|
+
document.removeEventListener("keydown", key);
|
|
290
|
+
};
|
|
291
|
+
}, [sheet, close]);
|
|
292
|
+
const ripple = (x) => {
|
|
293
|
+
const el = mark.current;
|
|
294
|
+
if (!el || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
295
|
+
for (const s of el.querySelectorAll("[data-l]")) {
|
|
296
|
+
if (x === null) {
|
|
297
|
+
s.style.transform = "";
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
const r = s.getBoundingClientRect();
|
|
301
|
+
const k = Math.max(0, 1 - Math.abs(x - (r.left + r.width / 2)) / (r.width * 2.4));
|
|
302
|
+
s.style.transform = `translateY(${-k * 24}%)`;
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
const pill = (on) => cx(
|
|
306
|
+
"group/p flex h-8 items-center gap-1 rounded-lg px-2.5 text-[14px] font-medium transition-colors duration-200 hover:bg-paper/[.08] hover:text-paper aria-expanded:bg-paper/[.08] aria-expanded:text-paper",
|
|
307
|
+
FOCUS,
|
|
308
|
+
on ? "text-paper" : "text-paper/65"
|
|
309
|
+
);
|
|
310
|
+
const dot = /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "ml-0.5 h-1 w-1 rounded-full bg-brand" });
|
|
311
|
+
return /* @__PURE__ */ jsxs("header", { ref: root, className: cx("aui-011-m @container sticky top-0 z-30 w-full bg-ink text-paper shadow-[0_1px_0_color-mix(in_srgb,var(--paper)_10%,transparent)]", className), children: [
|
|
312
|
+
/* @__PURE__ */ jsx("style", { href: "asta-navbar-aui-011", precedence: "asta", children: CSS }),
|
|
313
|
+
/* @__PURE__ */ jsxs("div", { className: "relative mx-auto grid h-14 max-w-[1120px] grid-cols-[1fr_auto_1fr] items-center gap-3 px-4", children: [
|
|
314
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
315
|
+
/* @__PURE__ */ jsxs(
|
|
316
|
+
"button",
|
|
317
|
+
{
|
|
318
|
+
ref: burger,
|
|
319
|
+
type: "button",
|
|
320
|
+
"aria-label": sheet ? "Close menu" : "Open menu",
|
|
321
|
+
"aria-expanded": sheet,
|
|
322
|
+
"aria-controls": id,
|
|
323
|
+
onClick: () => setSheet((v) => !v),
|
|
324
|
+
className: cx("relative -ml-1 flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-paper/10 @min-[640px]:hidden", FOCUS),
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ jsx("span", { className: cx("absolute h-[1.5px] w-4 rounded-full bg-paper transition-transform duration-500", TW_EASE, sheet ? "rotate-45" : "-translate-y-[3.5px]") }),
|
|
327
|
+
/* @__PURE__ */ jsx("span", { className: cx("absolute h-[1.5px] w-4 rounded-full bg-paper transition-transform duration-500", TW_EASE, sheet ? "-rotate-45" : "translate-y-[3.5px]") })
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
),
|
|
331
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": "Shop", className: "hidden @min-[640px]:block", children: /* @__PURE__ */ jsx("ul", { className: "-ml-2.5 flex items-center gap-px", children: left.map((it, n) => /* @__PURE__ */ jsx("li", { className: "aui-011-in", style: at(n), children: it.menu ? /* @__PURE__ */ jsx(Fragment2, { children: /* @__PURE__ */ jsxs(
|
|
332
|
+
"button",
|
|
333
|
+
{
|
|
334
|
+
ref: mega.register(it.label),
|
|
335
|
+
type: "button",
|
|
336
|
+
"aria-expanded": value === it.label,
|
|
337
|
+
"aria-controls": `${id}-m${n}`,
|
|
338
|
+
onPointerEnter: (e) => mega.enter(it.label, e.pointerType === "mouse"),
|
|
339
|
+
onPointerLeave: (e) => e.pointerType === "mouse" && mega.later(),
|
|
340
|
+
onClick: () => mega.click(it.label),
|
|
341
|
+
onKeyDown: (e) => mega.triggerKeys(it.label, e),
|
|
342
|
+
className: cx(pill(active === n), "pr-2"),
|
|
343
|
+
children: [
|
|
344
|
+
it.label,
|
|
345
|
+
/* @__PURE__ */ jsx(Chevron, { className: cx("rotate-90 text-paper/40 transition-transform duration-300 group-aria-expanded/p:-rotate-90", TW_EASE) })
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
) }) : /* @__PURE__ */ jsxs("a", { href: it.href, "aria-current": active === n ? "page" : void 0, className: pill(active === n), children: [
|
|
349
|
+
it.label,
|
|
350
|
+
active === n && dot
|
|
351
|
+
] }) }, it.label)) }) }),
|
|
352
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-x-0 top-full z-40 hidden justify-center pt-1.5 @min-[640px]:flex", children: mega.m.last && /* @__PURE__ */ jsx(
|
|
353
|
+
"div",
|
|
354
|
+
{
|
|
355
|
+
ref: megaPanel,
|
|
356
|
+
"data-state": value ? "open" : "closed",
|
|
357
|
+
onPointerEnter: mega.cancel,
|
|
358
|
+
onPointerLeave: (e) => e.pointerType === "mouse" && mega.later(),
|
|
359
|
+
onClick: (e) => e.target.closest("a") && mega.close(),
|
|
360
|
+
onKeyDown: mega.panelKeys,
|
|
361
|
+
onAnimationEnd: mega.ended,
|
|
362
|
+
className: cx(
|
|
363
|
+
"aui-011-vp pointer-events-auto relative overflow-hidden rounded-[8px] bg-ink shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--paper)_12%,transparent),0_20px_44px_-14px_rgb(0_0_0/0.55)]",
|
|
364
|
+
"transition-[width,height] duration-300 data-[state=closed]:pointer-events-none",
|
|
365
|
+
TW_EASE
|
|
366
|
+
),
|
|
367
|
+
children: /* @__PURE__ */ jsx("div", { ref: megaInner, id: `${id}-m${left.findIndex((x) => x.label === mega.m.last)}`, "data-motion": mega.m.dir || void 0, className: "aui-011-c absolute left-0 top-0", children: lastMenu && /* @__PURE__ */ jsx(Panel, { menu: lastMenu }) }, mega.m.last)
|
|
368
|
+
}
|
|
369
|
+
) })
|
|
370
|
+
] }),
|
|
371
|
+
/* @__PURE__ */ jsxs(
|
|
372
|
+
"a",
|
|
373
|
+
{
|
|
374
|
+
ref: mark,
|
|
375
|
+
href: brandHref,
|
|
376
|
+
"aria-label": wordmark,
|
|
377
|
+
onPointerMove: (e) => e.pointerType === "mouse" && ripple(e.clientX),
|
|
378
|
+
onPointerLeave: () => ripple(null),
|
|
379
|
+
className: cx("flex select-none items-end overflow-hidden rounded-md px-1 pb-0.5 pt-1 text-[20px] font-semibold leading-none tracking-[-0.06em]", FOCUS),
|
|
380
|
+
children: [
|
|
381
|
+
wordmark.split("").map((c, n) => /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "aui-011-l", style: at(n), children: /* @__PURE__ */ jsx("span", { "data-l": true, className: cx("inline-block transition-transform duration-500", TW_EASE), children: c === " " ? " " : c }) }, n)),
|
|
382
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "aui-011-l mb-[2px] ml-0.5 h-[5px] w-[5px] rounded-full bg-brand", style: at(wordmark.length) })
|
|
383
|
+
]
|
|
384
|
+
}
|
|
385
|
+
),
|
|
386
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1.5", children: [
|
|
387
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": "More", className: "mr-auto hidden @min-[640px]:block", children: /* @__PURE__ */ jsx("ul", { className: "flex items-center gap-px", children: right.map((l, n) => /* @__PURE__ */ jsx("li", { className: "aui-011-in", style: at(left.length + n + 2), children: /* @__PURE__ */ jsxs("a", { href: l.href, "aria-current": active === left.length + n ? "page" : void 0, className: pill(active === left.length + n), children: [
|
|
388
|
+
l.label,
|
|
389
|
+
active === left.length + n && dot
|
|
390
|
+
] }) }, l.label)) }) }),
|
|
391
|
+
secondary && /* @__PURE__ */ jsx(
|
|
392
|
+
"a",
|
|
393
|
+
{
|
|
394
|
+
href: secondary.href,
|
|
395
|
+
style: at(left.length + right.length + 2),
|
|
396
|
+
className: cx("aui-011-in hidden h-8 items-center rounded-lg px-3 text-[13px] font-medium text-paper/65 transition-colors hover:bg-paper/[.08] hover:text-paper @min-[860px]:inline-flex", FOCUS),
|
|
397
|
+
children: secondary.label
|
|
398
|
+
}
|
|
399
|
+
),
|
|
400
|
+
/* @__PURE__ */ jsxs(
|
|
401
|
+
"a",
|
|
402
|
+
{
|
|
403
|
+
href: cta.href,
|
|
404
|
+
style: at(left.length + right.length + 3),
|
|
405
|
+
className: cx(
|
|
406
|
+
"aui-011-in group/cta inline-flex h-8 items-center gap-1 rounded-lg bg-paper pl-3 pr-2.5 text-[13px] font-medium text-ink transition-transform duration-300 hover:-translate-y-px active:translate-y-0 active:scale-[.97]",
|
|
407
|
+
TW_EASE,
|
|
408
|
+
FOCUS
|
|
409
|
+
),
|
|
410
|
+
children: [
|
|
411
|
+
cta.label,
|
|
412
|
+
/* @__PURE__ */ jsx(Chevron, { className: cx("transition-transform duration-300 group-hover/cta:translate-x-0.5", TW_EASE) })
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
)
|
|
416
|
+
] })
|
|
417
|
+
] }),
|
|
418
|
+
sheet && /* @__PURE__ */ jsxs("nav", { id, "aria-label": "Main", className: "aui-011-sheet absolute inset-x-0 top-full max-h-[70vh] overflow-y-auto bg-ink pb-4 shadow-[0_24px_40px_-24px_rgb(0_0_0/0.6)] @min-[640px]:hidden", children: [
|
|
419
|
+
left.map(
|
|
420
|
+
(it, n) => it.menu ? /* @__PURE__ */ jsxs("div", { className: "aui-011-in shadow-[0_1px_0_color-mix(in_srgb,var(--paper)_9%,transparent)]", style: at(n), children: [
|
|
421
|
+
/* @__PURE__ */ jsxs(
|
|
422
|
+
"button",
|
|
423
|
+
{
|
|
424
|
+
type: "button",
|
|
425
|
+
"aria-expanded": section === it.label,
|
|
426
|
+
onClick: () => setSection((s) => s === it.label ? null : it.label),
|
|
427
|
+
className: cx("flex h-12 w-full items-center justify-between px-4 text-[16px] font-medium", FOCUS),
|
|
428
|
+
children: [
|
|
429
|
+
it.label,
|
|
430
|
+
/* @__PURE__ */ jsx(Chevron, { className: cx("text-paper/45 transition-transform duration-300", TW_EASE, section === it.label ? "-rotate-90" : "rotate-90") })
|
|
431
|
+
]
|
|
432
|
+
}
|
|
433
|
+
),
|
|
434
|
+
/* @__PURE__ */ jsx("div", { className: cx("grid transition-[grid-template-rows] duration-500", TW_EASE, section === it.label ? "grid-rows-[1fr]" : "grid-rows-[0fr]"), children: /* @__PURE__ */ jsxs("ul", { className: "overflow-hidden px-2", inert: section !== it.label || void 0, children: [
|
|
435
|
+
flat(it.menu).map((t) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("a", { href: t.href, onClick: () => close(false), className: cx("flex items-center gap-3 rounded-[8px] px-2 py-2 hover:bg-paper/[.07]", FOCUS), children: [
|
|
436
|
+
t.icon && /* @__PURE__ */ jsx(Badge, { icon: t.icon }),
|
|
437
|
+
/* @__PURE__ */ jsxs("span", { className: "flex flex-col", children: [
|
|
438
|
+
/* @__PURE__ */ jsx("span", { className: "text-[14px] font-medium", children: t.title }),
|
|
439
|
+
t.description && /* @__PURE__ */ jsx("span", { className: "text-[12px] text-paper/55", children: t.description })
|
|
440
|
+
] })
|
|
441
|
+
] }) }, t.title)),
|
|
442
|
+
/* @__PURE__ */ jsx("li", { "aria-hidden": true, className: "h-2" })
|
|
443
|
+
] }) })
|
|
444
|
+
] }, it.label) : /* @__PURE__ */ jsx("a", { href: it.href, onClick: () => close(false), style: at(n), className: cx("aui-011-in flex h-12 items-center px-4 text-[16px] font-medium shadow-[0_1px_0_color-mix(in_srgb,var(--paper)_9%,transparent)]", FOCUS), children: it.label }, it.label)
|
|
445
|
+
),
|
|
446
|
+
right.map((l, n) => /* @__PURE__ */ jsxs(
|
|
447
|
+
"a",
|
|
448
|
+
{
|
|
449
|
+
href: l.href,
|
|
450
|
+
onClick: () => close(false),
|
|
451
|
+
style: at(left.length + n),
|
|
452
|
+
className: cx("aui-011-in flex h-12 items-center justify-between px-4 text-[16px] font-medium shadow-[0_1px_0_color-mix(in_srgb,var(--paper)_9%,transparent)]", FOCUS),
|
|
453
|
+
children: [
|
|
454
|
+
l.label,
|
|
455
|
+
active === left.length + n && /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-brand" })
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
l.label
|
|
459
|
+
)),
|
|
460
|
+
secondary && /* @__PURE__ */ jsx("div", { className: "aui-011-in mt-4 px-4", style: at(left.length + right.length), children: /* @__PURE__ */ jsx("a", { href: secondary.href, className: cx("flex h-10 items-center justify-center rounded-lg bg-paper/[.08] text-[14px] font-medium", FOCUS), children: secondary.label }) })
|
|
461
|
+
] })
|
|
462
|
+
] });
|
|
463
|
+
}
|
|
464
|
+
var navbar_aui_011_default = CenteredNavbar;
|
|
465
|
+
|
|
466
|
+
export {
|
|
467
|
+
CenteredNavbar,
|
|
468
|
+
navbar_aui_011_default
|
|
469
|
+
};
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Button
|
|
4
|
+
} from "./chunk-ZWBJUJTR.js";
|
|
5
|
+
|
|
6
|
+
// components/kit/onboarding.tsx
|
|
7
|
+
import { useId, useRef, useState } from "react";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
10
|
+
var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
|
|
11
|
+
var CURVE = "cubic-bezier(.16,1,.3,1)";
|
|
12
|
+
var Check = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4 8.5l2.5 2.5 5.5-6" }) });
|
|
13
|
+
function Mark({ done, current }) {
|
|
14
|
+
return /* @__PURE__ */ jsxs("span", { className: "relative flex h-5 w-5 shrink-0 items-center justify-center", "aria-hidden": true, children: [
|
|
15
|
+
/* @__PURE__ */ jsx(
|
|
16
|
+
"span",
|
|
17
|
+
{
|
|
18
|
+
className: cx(
|
|
19
|
+
"absolute inset-0 rounded-full transition-[opacity,transform] duration-300",
|
|
20
|
+
EASE,
|
|
21
|
+
done ? "scale-75 opacity-0" : "scale-100 opacity-100",
|
|
22
|
+
current ? "shadow-[inset_0_0_0_1.5px_var(--ink)]" : "shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_22%,transparent)]"
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"span",
|
|
28
|
+
{
|
|
29
|
+
className: cx(
|
|
30
|
+
"absolute inset-0 flex items-center justify-center rounded-full bg-brand text-white transition-[opacity,transform] duration-500",
|
|
31
|
+
EASE,
|
|
32
|
+
done ? "scale-100 opacity-100" : "scale-50 opacity-0"
|
|
33
|
+
),
|
|
34
|
+
children: /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" })
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function Onboarding({ title = "Get set up", subtitle, steps, defaultCompleted = [], onStep, onFinish, finishLabel = "Go to dashboard", className }) {
|
|
40
|
+
const [done, setDone] = useState(defaultCompleted);
|
|
41
|
+
const doneRef = useRef(done);
|
|
42
|
+
const firstOpen = steps.find((s) => !defaultCompleted.includes(s.id))?.id ?? null;
|
|
43
|
+
const [open, setOpen] = useState(firstOpen);
|
|
44
|
+
const [busy, setBusy] = useState(null);
|
|
45
|
+
const [review, setReview] = useState(false);
|
|
46
|
+
const uid = useId();
|
|
47
|
+
const total = steps.length;
|
|
48
|
+
const count = steps.filter((s) => done.includes(s.id)).length;
|
|
49
|
+
const finished = count === total && !review;
|
|
50
|
+
const complete = async (id) => {
|
|
51
|
+
try {
|
|
52
|
+
const r = onStep?.(id);
|
|
53
|
+
if (r instanceof Promise) {
|
|
54
|
+
setBusy(id);
|
|
55
|
+
await r;
|
|
56
|
+
}
|
|
57
|
+
} catch (err) {
|
|
58
|
+
console.error(err);
|
|
59
|
+
return;
|
|
60
|
+
} finally {
|
|
61
|
+
setBusy((b) => b === id ? null : b);
|
|
62
|
+
}
|
|
63
|
+
const next = doneRef.current.includes(id) ? doneRef.current : [...doneRef.current, id];
|
|
64
|
+
doneRef.current = next;
|
|
65
|
+
setDone((d) => d.includes(id) ? d : [...d, id]);
|
|
66
|
+
const i = steps.findIndex((s) => s.id === id);
|
|
67
|
+
const after = [...steps.slice(i + 1), ...steps.slice(0, i)].find((s) => !next.includes(s.id));
|
|
68
|
+
setOpen(after?.id ?? null);
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ jsxs(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
className: cx(
|
|
74
|
+
"kit-ob relative w-full max-w-[440px] overflow-hidden rounded-[14px] bg-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_18px_40px_-24px_rgb(0_0_0/0.3)]",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
children: [
|
|
78
|
+
/* @__PURE__ */ jsx("style", { href: "asta-onboarding", precedence: "asta", children: `
|
|
79
|
+
@keyframes kit-ob-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
|
|
80
|
+
@keyframes kit-ob-pop { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.06); } 100% { transform: none; } }
|
|
81
|
+
@media (prefers-reduced-motion: reduce) { .kit-ob, .kit-ob * { animation: none !important; transition-duration: 0s !important; } }
|
|
82
|
+
` }),
|
|
83
|
+
finished ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center px-8 py-12 text-center", style: { animation: `kit-ob-in .5s ${CURVE} both` }, children: [
|
|
84
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-brand text-white", style: { animation: `kit-ob-pop .6s ${CURVE} .1s both` }, children: /* @__PURE__ */ jsx(Check, { className: "h-6 w-6" }) }),
|
|
85
|
+
/* @__PURE__ */ jsx("h3", { className: "mt-5 text-[18px] font-medium tracking-[-0.02em] text-ink", children: "You are all set" }),
|
|
86
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1.5 max-w-[30ch] text-[13.5px] leading-relaxed text-mute", children: "Every step is done. You can come back to this list from Settings." }),
|
|
87
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-6 flex gap-2", children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: () => setReview(true), children: "Review steps" }),
|
|
89
|
+
onFinish && /* @__PURE__ */ jsx(Button, { size: "sm", onClick: onFinish, children: finishLabel })
|
|
90
|
+
] })
|
|
91
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
92
|
+
/* @__PURE__ */ jsxs("div", { className: "px-5 pb-4 pt-5", children: [
|
|
93
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [
|
|
94
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[15px] font-medium tracking-[-0.01em] text-ink", children: title }),
|
|
95
|
+
/* @__PURE__ */ jsxs("span", { className: "text-[12.5px] tabular-nums text-mute", children: [
|
|
96
|
+
count,
|
|
97
|
+
" of ",
|
|
98
|
+
total
|
|
99
|
+
] })
|
|
100
|
+
] }),
|
|
101
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 text-[13px] text-mute", children: subtitle }),
|
|
102
|
+
/* @__PURE__ */ jsx(
|
|
103
|
+
"div",
|
|
104
|
+
{
|
|
105
|
+
role: "progressbar",
|
|
106
|
+
"aria-label": "Setup progress",
|
|
107
|
+
"aria-valuemin": 0,
|
|
108
|
+
"aria-valuemax": total,
|
|
109
|
+
"aria-valuenow": count,
|
|
110
|
+
className: "mt-4 h-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_8%,transparent)]",
|
|
111
|
+
children: /* @__PURE__ */ jsx("div", { className: cx("h-full origin-left rounded-full bg-brand transition-transform duration-700", EASE), style: { transform: `scaleX(${count / total})` } })
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ jsx("ol", { className: "px-2 pb-2", children: steps.map((s) => {
|
|
116
|
+
const isDone = done.includes(s.id);
|
|
117
|
+
const isOpen = open === s.id;
|
|
118
|
+
const panel = `${uid}-${s.id}`;
|
|
119
|
+
return /* @__PURE__ */ jsxs("li", { className: cx("rounded-[10px] transition-colors duration-300", isOpen && "bg-paper-2"), children: [
|
|
120
|
+
/* @__PURE__ */ jsxs(
|
|
121
|
+
"button",
|
|
122
|
+
{
|
|
123
|
+
type: "button",
|
|
124
|
+
"aria-expanded": isOpen,
|
|
125
|
+
"aria-controls": panel,
|
|
126
|
+
onClick: () => setOpen(isOpen ? null : s.id),
|
|
127
|
+
className: "flex w-full items-center gap-3 rounded-[10px] px-3 py-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Mark, { done: isDone, current: isOpen }),
|
|
130
|
+
/* @__PURE__ */ jsxs("span", { className: cx("flex-1 text-[14px] transition-colors duration-300", isDone && !isOpen ? "text-mute" : "text-ink"), children: [
|
|
131
|
+
s.title,
|
|
132
|
+
isDone && /* @__PURE__ */ jsx("span", { className: "sr-only", children: " (done)" })
|
|
133
|
+
] }),
|
|
134
|
+
s.duration && !isDone && /* @__PURE__ */ jsx("span", { className: "text-[12px] tabular-nums text-mute", children: s.duration }),
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
"svg",
|
|
137
|
+
{
|
|
138
|
+
viewBox: "0 0 16 16",
|
|
139
|
+
className: cx("h-3.5 w-3.5 shrink-0 text-mute transition-transform duration-300", EASE, isOpen && "rotate-180"),
|
|
140
|
+
fill: "none",
|
|
141
|
+
stroke: "currentColor",
|
|
142
|
+
strokeWidth: "1.7",
|
|
143
|
+
strokeLinecap: "round",
|
|
144
|
+
"aria-hidden": true,
|
|
145
|
+
children: /* @__PURE__ */ jsx("path", { d: "m4.5 6.5 3.5 3.5 3.5-3.5" })
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ jsx("div", { id: panel, role: "region", "aria-label": s.title, className: cx("grid transition-[grid-template-rows] duration-500", EASE, isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"), children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", inert: !isOpen, children: /* @__PURE__ */ jsxs("div", { className: cx("pb-4 pl-11 pr-4 transition-[opacity,transform] duration-500", EASE, isOpen ? "translate-y-0 opacity-100" : "-translate-y-1 opacity-0"), children: [
|
|
152
|
+
/* @__PURE__ */ jsx("div", { className: "text-[13px] leading-relaxed text-mute", children: s.description }),
|
|
153
|
+
/* @__PURE__ */ jsx("div", { className: "mt-3.5 flex items-center gap-2", children: isDone ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-[12.5px] text-mute", children: [
|
|
154
|
+
/* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-brand" }),
|
|
155
|
+
"Done"
|
|
156
|
+
] }) : /* @__PURE__ */ jsx(Button, { size: "sm", loading: busy === s.id, onClick: () => complete(s.id), children: s.action ?? "Mark as done" }) })
|
|
157
|
+
] }) }) })
|
|
158
|
+
] }, s.id);
|
|
159
|
+
}) })
|
|
160
|
+
] })
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
var onboarding_default = Onboarding;
|
|
166
|
+
|
|
167
|
+
export {
|
|
168
|
+
Onboarding,
|
|
169
|
+
onboarding_default
|
|
170
|
+
};
|