asta-ui 0.2.1 → 0.3.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/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/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/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/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/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/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 +250 -46
- 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/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-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-6HPSPZTF.js +232 -0
- package/dist/chunk-6VQTFRSP.js +435 -0
- package/dist/chunk-72UKXOMW.js +150 -0
- package/dist/chunk-7JNO265Q.js +431 -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-BP3LXM3X.js +309 -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-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-MSBN2O66.js +110 -0
- package/dist/chunk-NB7X26PY.js +388 -0
- package/dist/chunk-NIYIT2QU.js +118 -0
- package/dist/chunk-QJXPS55V.js +246 -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-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-UWQ26LYZ.js +133 -0
- package/dist/chunk-V3SPSN3A.js +308 -0
- package/dist/chunk-W57O4RLL.js +435 -0
- package/dist/chunk-WO36QUH3.js +188 -0
- 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/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 +250 -46
- 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/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/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/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/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/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/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/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/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 +87 -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/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 +87 -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/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/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/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,435 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Select
|
|
4
|
+
} from "./chunk-QDRBMWRX.js";
|
|
5
|
+
import {
|
|
6
|
+
Avatar
|
|
7
|
+
} from "./chunk-2LZM435Z.js";
|
|
8
|
+
import {
|
|
9
|
+
Button
|
|
10
|
+
} from "./chunk-WSL4JGEA.js";
|
|
11
|
+
|
|
12
|
+
// components/kit/base/team-members.tsx
|
|
13
|
+
import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
16
|
+
var CURVE = "cubic-bezier(.16,1,.3,1)";
|
|
17
|
+
var DEFAULT_ROLES = [
|
|
18
|
+
{ value: "owner", label: "Owner" },
|
|
19
|
+
{ value: "admin", label: "Admin" },
|
|
20
|
+
{ value: "member", label: "Member" },
|
|
21
|
+
{ value: "viewer", label: "Viewer" }
|
|
22
|
+
];
|
|
23
|
+
var KEYFRAMES = `@keyframes kit-tm-in { from { opacity: 0; transform: translateY(6px) } }
|
|
24
|
+
@keyframes kit-tm-chip { from { opacity: 0; transform: scale(.85) } }
|
|
25
|
+
@keyframes kit-tm-swap { from { opacity: 0; transform: translateX(-6px) } }
|
|
26
|
+
@keyframes kit-tm-count { from { transform: scaleX(1) } to { transform: scaleX(0) } }
|
|
27
|
+
@media (prefers-reduced-motion: reduce) { .kit-tm, .kit-tm * { animation: none !important; transition-duration: 0s !important; } }`;
|
|
28
|
+
var EMAIL = /^[^\s@,;]+@[^\s@,;]+\.[^\s@,;]+$/;
|
|
29
|
+
var seq = 0;
|
|
30
|
+
var uid = () => `t${Date.now().toString(36)}${(seq++).toString(36)}`;
|
|
31
|
+
var reduced = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
32
|
+
function useFlip(deps) {
|
|
33
|
+
const els = useRef(/* @__PURE__ */ new Map());
|
|
34
|
+
const before = useRef(null);
|
|
35
|
+
const snap = () => {
|
|
36
|
+
before.current = new Map([...els.current].map(([k, el]) => [k, el.getBoundingClientRect()]));
|
|
37
|
+
};
|
|
38
|
+
useLayoutEffect(() => {
|
|
39
|
+
const from = before.current;
|
|
40
|
+
before.current = null;
|
|
41
|
+
if (!from || reduced()) return;
|
|
42
|
+
from.forEach((r, k) => {
|
|
43
|
+
const el = els.current.get(k);
|
|
44
|
+
if (!el) return;
|
|
45
|
+
const dy = r.top - el.getBoundingClientRect().top;
|
|
46
|
+
if (dy) el.animate([{ transform: `translateY(${dy}px)` }, { transform: "none" }], { duration: 380, easing: CURVE });
|
|
47
|
+
});
|
|
48
|
+
}, deps);
|
|
49
|
+
const reg = (k) => (el) => {
|
|
50
|
+
if (el) els.current.set(k, el);
|
|
51
|
+
else els.current.delete(k);
|
|
52
|
+
};
|
|
53
|
+
return { snap, reg };
|
|
54
|
+
}
|
|
55
|
+
function EmailChips({
|
|
56
|
+
chips,
|
|
57
|
+
onChange,
|
|
58
|
+
taken,
|
|
59
|
+
disabled,
|
|
60
|
+
label
|
|
61
|
+
}) {
|
|
62
|
+
const [text, setText] = useState("");
|
|
63
|
+
const [armed, setArmed] = useState(false);
|
|
64
|
+
const input = useRef(null);
|
|
65
|
+
const id = useId();
|
|
66
|
+
const add = (raw) => {
|
|
67
|
+
const parts = raw.split(/[\s,;]+/).map((s) => s.trim().toLowerCase()).filter(Boolean);
|
|
68
|
+
if (!parts.length) return;
|
|
69
|
+
const have = new Set(chips.map((c) => c.email));
|
|
70
|
+
const next = [...chips];
|
|
71
|
+
for (const email of parts) {
|
|
72
|
+
if (have.has(email)) continue;
|
|
73
|
+
have.add(email);
|
|
74
|
+
next.push({ id: uid(), email, problem: !EMAIL.test(email) ? "not a valid email" : taken(email) });
|
|
75
|
+
}
|
|
76
|
+
onChange(next);
|
|
77
|
+
setText("");
|
|
78
|
+
};
|
|
79
|
+
const onKey = (e) => {
|
|
80
|
+
if (e.key === "Enter" || e.key === "," || e.key === " " || e.key === ";" || e.key === "Tab" && text.trim()) {
|
|
81
|
+
if (!text.trim()) return;
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
add(text);
|
|
84
|
+
} else if (e.key === "Backspace" && !text && chips.length) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
if (armed) {
|
|
87
|
+
onChange(chips.slice(0, -1));
|
|
88
|
+
setArmed(false);
|
|
89
|
+
} else setArmed(true);
|
|
90
|
+
} else setArmed(false);
|
|
91
|
+
};
|
|
92
|
+
return /* @__PURE__ */ jsxs(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
onPointerDown: (e) => {
|
|
96
|
+
if (e.target === e.currentTarget) {
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
input.current?.focus();
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
className: cx(
|
|
102
|
+
"flex min-h-10 flex-1 flex-wrap items-center gap-1.5 rounded-lg bg-paper px-2 py-1.5 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)]",
|
|
103
|
+
disabled && "pointer-events-none opacity-60"
|
|
104
|
+
),
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsx("label", { htmlFor: id, className: "sr-only", children: label }),
|
|
107
|
+
chips.map((c, i) => {
|
|
108
|
+
const hot = armed && i === chips.length - 1;
|
|
109
|
+
return /* @__PURE__ */ jsxs(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
className: cx(
|
|
113
|
+
"inline-flex h-7 max-w-full items-center gap-1 rounded-md pl-2 pr-0.5 text-[12.5px] transition-shadow duration-200",
|
|
114
|
+
c.problem ? "text-mute outline outline-1 -outline-offset-1 outline-dashed outline-[color-mix(in_srgb,var(--ink)_35%,transparent)]" : "bg-paper-2 text-ink",
|
|
115
|
+
hot && "shadow-[inset_0_0_0_1.5px_var(--brand)]"
|
|
116
|
+
),
|
|
117
|
+
style: { animation: `kit-tm-chip .3s ${CURVE}` },
|
|
118
|
+
title: c.problem ? `${c.email}: ${c.problem}` : void 0,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ jsx("span", { className: cx("truncate", c.problem && "line-through decoration-[color-mix(in_srgb,var(--ink)_35%,transparent)]"), children: c.email }),
|
|
121
|
+
c.problem && /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
122
|
+
", ",
|
|
123
|
+
c.problem
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsx(
|
|
126
|
+
"button",
|
|
127
|
+
{
|
|
128
|
+
type: "button",
|
|
129
|
+
"aria-label": `Remove ${c.email}`,
|
|
130
|
+
onClick: () => {
|
|
131
|
+
onChange(chips.filter((x) => x.id !== c.id));
|
|
132
|
+
input.current?.focus();
|
|
133
|
+
},
|
|
134
|
+
className: "grid h-5 w-5 place-items-center rounded text-mute outline-none transition-colors hover:bg-[color-mix(in_srgb,var(--ink)_8%,transparent)] hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50",
|
|
135
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", className: "h-2.5 w-2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 3l6 6M9 3 3 9" }) })
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
c.id
|
|
141
|
+
);
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ jsx(
|
|
144
|
+
"input",
|
|
145
|
+
{
|
|
146
|
+
ref: input,
|
|
147
|
+
id,
|
|
148
|
+
type: "email",
|
|
149
|
+
multiple: true,
|
|
150
|
+
value: text,
|
|
151
|
+
disabled,
|
|
152
|
+
placeholder: chips.length ? "" : "name@company.com, another@company.com",
|
|
153
|
+
onChange: (e) => {
|
|
154
|
+
setText(e.target.value);
|
|
155
|
+
setArmed(false);
|
|
156
|
+
},
|
|
157
|
+
onKeyDown: onKey,
|
|
158
|
+
onPaste: (e) => {
|
|
159
|
+
const t = e.clipboardData.getData("text");
|
|
160
|
+
if (/[\s,;]/.test(t.trim())) {
|
|
161
|
+
e.preventDefault();
|
|
162
|
+
add(text + t);
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
onBlur: () => {
|
|
166
|
+
setArmed(false);
|
|
167
|
+
if (text.trim()) add(text);
|
|
168
|
+
},
|
|
169
|
+
className: "h-7 min-w-[140px] flex-1 bg-transparent px-1 text-[13.5px] text-ink outline-none placeholder:text-mute"
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
var iconBtn = "grid h-8 w-8 shrink-0 place-items-center rounded-md text-mute outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 disabled:pointer-events-none disabled:opacity-30";
|
|
177
|
+
function TeamMembers({
|
|
178
|
+
defaultMembers,
|
|
179
|
+
defaultInvites = [],
|
|
180
|
+
roles = DEFAULT_ROLES,
|
|
181
|
+
defaultInviteRole,
|
|
182
|
+
onInvite,
|
|
183
|
+
onRoleChange,
|
|
184
|
+
onRemove,
|
|
185
|
+
onRevoke,
|
|
186
|
+
onResend,
|
|
187
|
+
undoMs = 5e3,
|
|
188
|
+
title = "Team",
|
|
189
|
+
className
|
|
190
|
+
}) {
|
|
191
|
+
const [members, setMembers] = useState(defaultMembers);
|
|
192
|
+
const [invites, setInvites] = useState(defaultInvites);
|
|
193
|
+
const [chips, setChips] = useState([]);
|
|
194
|
+
const [inviteRole, setInviteRole] = useState(defaultInviteRole ?? roles[roles.length - 1]?.value ?? "");
|
|
195
|
+
const [sending, setSending] = useState(false);
|
|
196
|
+
const [inviteMsg, setInviteMsg] = useState("");
|
|
197
|
+
const [removing, setRemoving] = useState([]);
|
|
198
|
+
const [resent, setResent] = useState([]);
|
|
199
|
+
const [status, setStatus] = useState("");
|
|
200
|
+
const timers = useRef(/* @__PURE__ */ new Map());
|
|
201
|
+
const removingRef = useRef(removing);
|
|
202
|
+
const onRemoveRef = useRef(onRemove);
|
|
203
|
+
const listHead = useRef(null);
|
|
204
|
+
const alive = useRef(true);
|
|
205
|
+
useEffect(() => {
|
|
206
|
+
removingRef.current = removing;
|
|
207
|
+
onRemoveRef.current = onRemove;
|
|
208
|
+
});
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
alive.current = true;
|
|
211
|
+
const t = timers.current;
|
|
212
|
+
return () => {
|
|
213
|
+
alive.current = false;
|
|
214
|
+
t.forEach((x) => clearTimeout(x));
|
|
215
|
+
t.clear();
|
|
216
|
+
removingRef.current.forEach((id) => onRemoveRef.current?.(id));
|
|
217
|
+
};
|
|
218
|
+
}, []);
|
|
219
|
+
const memberFlip = useFlip([members]);
|
|
220
|
+
const inviteFlip = useFlip([invites]);
|
|
221
|
+
const root = useRef(null);
|
|
222
|
+
const refocus = useRef(null);
|
|
223
|
+
const setRefocus = (k) => {
|
|
224
|
+
refocus.current = k;
|
|
225
|
+
};
|
|
226
|
+
useLayoutEffect(() => {
|
|
227
|
+
const k = refocus.current;
|
|
228
|
+
if (!k) return;
|
|
229
|
+
refocus.current = null;
|
|
230
|
+
root.current?.querySelector(`[data-tm-focus="${k}"]`)?.focus();
|
|
231
|
+
});
|
|
232
|
+
const roleLabel = (v) => roles.find((r) => r.value === v)?.label ?? v;
|
|
233
|
+
const taken = (email) => members.some((m) => m.email.toLowerCase() === email) ? "already on the team" : invites.some((i) => i.email.toLowerCase() === email) ? "already invited" : void 0;
|
|
234
|
+
const freeChip = (email, problem) => {
|
|
235
|
+
const e = email.toLowerCase();
|
|
236
|
+
setChips((cs) => cs.some((c) => c.email === e && c.problem === problem) ? cs.map((c) => c.email === e && c.problem === problem ? { ...c, problem: void 0 } : c) : cs);
|
|
237
|
+
};
|
|
238
|
+
const finalize = (id) => {
|
|
239
|
+
timers.current.delete(id);
|
|
240
|
+
const gone = members.find((m) => m.id === id);
|
|
241
|
+
const name = gone?.name;
|
|
242
|
+
if (gone) freeChip(gone.email, "already on the team");
|
|
243
|
+
const hadFocus = !!document.activeElement?.closest(`[data-tm-row="${id}"]`);
|
|
244
|
+
memberFlip.snap();
|
|
245
|
+
setMembers((all) => all.filter((m) => m.id !== id));
|
|
246
|
+
setRemoving((r) => r.filter((x) => x !== id));
|
|
247
|
+
onRemoveRef.current?.(id);
|
|
248
|
+
if (name) setStatus(`${name} removed.`);
|
|
249
|
+
if (hadFocus) listHead.current?.focus();
|
|
250
|
+
};
|
|
251
|
+
const remove = (m) => {
|
|
252
|
+
setRemoving((r) => [...r, m.id]);
|
|
253
|
+
setStatus(`${m.name} will be removed. Press Undo to keep them.`);
|
|
254
|
+
setRefocus(`undo-${m.id}`);
|
|
255
|
+
timers.current.set(
|
|
256
|
+
m.id,
|
|
257
|
+
setTimeout(() => finalize(m.id), undoMs)
|
|
258
|
+
);
|
|
259
|
+
};
|
|
260
|
+
const undo = (m) => {
|
|
261
|
+
clearTimeout(timers.current.get(m.id));
|
|
262
|
+
timers.current.delete(m.id);
|
|
263
|
+
setRemoving((r) => r.filter((x) => x !== m.id));
|
|
264
|
+
setStatus(`${m.name} kept.`);
|
|
265
|
+
setRefocus(`remove-${m.id}`);
|
|
266
|
+
};
|
|
267
|
+
const changeRole = (m, role) => {
|
|
268
|
+
setMembers((all) => all.map((x) => x.id === m.id ? { ...x, role } : x));
|
|
269
|
+
onRoleChange?.(m.id, role);
|
|
270
|
+
setStatus(`${m.name} is now ${roleLabel(role)}.`);
|
|
271
|
+
};
|
|
272
|
+
const good = chips.filter((c) => !c.problem);
|
|
273
|
+
const bad = chips.length - good.length;
|
|
274
|
+
const send = async () => {
|
|
275
|
+
if (!good.length || bad || sending) return;
|
|
276
|
+
const emails = good.map((c) => c.email);
|
|
277
|
+
setSending(true);
|
|
278
|
+
setInviteMsg("");
|
|
279
|
+
try {
|
|
280
|
+
await onInvite?.(emails, inviteRole);
|
|
281
|
+
if (!alive.current) return;
|
|
282
|
+
inviteFlip.snap();
|
|
283
|
+
setInvites((all) => [...emails.map((email) => ({ id: uid(), email, role: inviteRole, sent: "just now" })), ...all]);
|
|
284
|
+
setChips([]);
|
|
285
|
+
const msg = `Invited ${emails.length === 1 ? emails[0] : `${emails.length} people`} as ${roleLabel(inviteRole)}.`;
|
|
286
|
+
setInviteMsg(msg);
|
|
287
|
+
setStatus(msg);
|
|
288
|
+
} catch {
|
|
289
|
+
if (!alive.current) return;
|
|
290
|
+
setInviteMsg("Couldn't send the invites. Try again.");
|
|
291
|
+
setStatus("Couldn't send the invites.");
|
|
292
|
+
} finally {
|
|
293
|
+
if (alive.current) setSending(false);
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
const revoke = (inv) => {
|
|
297
|
+
const i = invites.findIndex((x) => x.id === inv.id);
|
|
298
|
+
const next = invites[i + 1] ?? invites[i - 1];
|
|
299
|
+
inviteFlip.snap();
|
|
300
|
+
setInvites((all) => all.filter((x) => x.id !== inv.id));
|
|
301
|
+
onRevoke?.(inv.id);
|
|
302
|
+
freeChip(inv.email, "already invited");
|
|
303
|
+
setStatus(`Invite to ${inv.email} revoked.`);
|
|
304
|
+
setRefocus(next ? `revoke-${next.id}` : "invite-input");
|
|
305
|
+
};
|
|
306
|
+
const resend = (inv) => {
|
|
307
|
+
onResend?.(inv.id);
|
|
308
|
+
setResent((r) => [...r, inv.id]);
|
|
309
|
+
setStatus(`Invite sent again to ${inv.email}.`);
|
|
310
|
+
clearTimeout(timers.current.get(`resend-${inv.id}`));
|
|
311
|
+
timers.current.set(
|
|
312
|
+
`resend-${inv.id}`,
|
|
313
|
+
setTimeout(() => {
|
|
314
|
+
timers.current.delete(`resend-${inv.id}`);
|
|
315
|
+
setResent((r) => r.filter((x) => x !== inv.id));
|
|
316
|
+
}, 2200)
|
|
317
|
+
);
|
|
318
|
+
};
|
|
319
|
+
const count = members.length - removing.length;
|
|
320
|
+
return /* @__PURE__ */ jsxs("div", { ref: root, className: cx("kit-tm w-full", className), children: [
|
|
321
|
+
/* @__PURE__ */ jsx("style", { href: "asta-team-members", precedence: "asta", children: KEYFRAMES }),
|
|
322
|
+
/* @__PURE__ */ jsx("p", { className: "sr-only", "aria-live": "polite", children: status }),
|
|
323
|
+
/* @__PURE__ */ jsxs("header", { className: "flex items-baseline justify-between gap-4", children: [
|
|
324
|
+
/* @__PURE__ */ jsx("h3", { className: "text-[17px] font-medium tracking-[-0.02em] text-ink", children: title }),
|
|
325
|
+
/* @__PURE__ */ jsxs("p", { className: "text-[12.5px] tabular-nums text-mute", children: [
|
|
326
|
+
count,
|
|
327
|
+
" member",
|
|
328
|
+
count === 1 ? "" : "s",
|
|
329
|
+
invites.length > 0 && ` \xB7 ${invites.length} pending`
|
|
330
|
+
] })
|
|
331
|
+
] }),
|
|
332
|
+
/* @__PURE__ */ jsxs(
|
|
333
|
+
"form",
|
|
334
|
+
{
|
|
335
|
+
className: "mt-5 rounded-[12px] bg-paper-2 p-3",
|
|
336
|
+
onSubmit: (e) => {
|
|
337
|
+
e.preventDefault();
|
|
338
|
+
send();
|
|
339
|
+
},
|
|
340
|
+
children: [
|
|
341
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start", children: [
|
|
342
|
+
/* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", "data-tm-focus": "invite-input", tabIndex: -1, onFocus: (e) => {
|
|
343
|
+
if (e.target === e.currentTarget) e.currentTarget.querySelector("input")?.focus();
|
|
344
|
+
}, children: /* @__PURE__ */ jsx(EmailChips, { chips, onChange: setChips, taken, disabled: sending, label: "Email addresses to invite" }) }),
|
|
345
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
346
|
+
/* @__PURE__ */ jsx(Select, { label: "Role for new invites", size: "md", options: roles, value: inviteRole, onChange: setInviteRole, disabled: sending, className: "w-[124px] bg-paper" }),
|
|
347
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", variant: "accent", loading: sending, disabled: !good.length || bad > 0, children: "Invite" })
|
|
348
|
+
] })
|
|
349
|
+
] }),
|
|
350
|
+
/* @__PURE__ */ jsx("p", { className: "mt-2 min-h-4 px-1 text-[12px] text-mute", "aria-live": "polite", children: bad > 0 ? `Remove ${bad} address${bad > 1 ? "es" : ""} that can't be invited.` : inviteMsg || "Separate addresses with a comma, space or Enter." })
|
|
351
|
+
]
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
/* @__PURE__ */ jsx("h4", { ref: listHead, tabIndex: -1, className: "mt-7 mb-1 px-1 text-[12px] font-medium text-mute outline-none", children: "Members" }),
|
|
355
|
+
/* @__PURE__ */ jsx("ul", { children: members.map((m) => {
|
|
356
|
+
const gone = removing.includes(m.id);
|
|
357
|
+
return /* @__PURE__ */ jsx("li", { ref: memberFlip.reg(m.id), "data-tm-row": m.id, className: "relative", children: gone ? /* @__PURE__ */ jsxs("div", { className: "relative flex h-[60px] items-center gap-3 overflow-hidden rounded-[10px] bg-paper-2 px-3", style: { animation: `kit-tm-swap .35s ${CURVE}` }, children: [
|
|
358
|
+
/* @__PURE__ */ jsxs("p", { className: "min-w-0 flex-1 truncate text-[13px] text-ink-2", children: [
|
|
359
|
+
"Removed ",
|
|
360
|
+
/* @__PURE__ */ jsx("span", { className: "text-ink", children: m.name })
|
|
361
|
+
] }),
|
|
362
|
+
/* @__PURE__ */ jsx(Button, { "data-tm-focus": `undo-${m.id}`, variant: "ghost", size: "xs", onClick: () => undo(m), className: "text-brand hover:text-brand", children: "Undo" }),
|
|
363
|
+
/* @__PURE__ */ jsx(
|
|
364
|
+
"span",
|
|
365
|
+
{
|
|
366
|
+
"aria-hidden": true,
|
|
367
|
+
className: "absolute inset-x-0 bottom-0 h-0.5 origin-left bg-brand/40",
|
|
368
|
+
style: { animation: `kit-tm-count ${undoMs}ms linear forwards` }
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "flex h-[60px] items-center gap-3 rounded-[10px] px-1 transition-colors duration-200 hover:bg-[color-mix(in_srgb,var(--paper-2)_55%,transparent)] sm:px-3", children: [
|
|
372
|
+
/* @__PURE__ */ jsx(Avatar, { name: m.name, src: m.src, size: "sm" }),
|
|
373
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
374
|
+
/* @__PURE__ */ jsxs("p", { className: "flex items-center gap-2 truncate text-[13.5px] text-ink", children: [
|
|
375
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: m.name }),
|
|
376
|
+
m.you && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-md bg-paper-2 px-1.5 text-[11px] leading-5 text-mute", children: "You" })
|
|
377
|
+
] }),
|
|
378
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-[12.5px] text-mute", children: m.email })
|
|
379
|
+
] }),
|
|
380
|
+
/* @__PURE__ */ jsx(
|
|
381
|
+
Select,
|
|
382
|
+
{
|
|
383
|
+
label: `Role for ${m.name}`,
|
|
384
|
+
size: "sm",
|
|
385
|
+
options: roles,
|
|
386
|
+
value: m.role,
|
|
387
|
+
onChange: (v) => changeRole(m, v),
|
|
388
|
+
disabled: m.you,
|
|
389
|
+
className: "w-[112px]"
|
|
390
|
+
}
|
|
391
|
+
),
|
|
392
|
+
/* @__PURE__ */ jsx(
|
|
393
|
+
"button",
|
|
394
|
+
{
|
|
395
|
+
type: "button",
|
|
396
|
+
"data-tm-focus": `remove-${m.id}`,
|
|
397
|
+
"aria-label": `Remove ${m.name}`,
|
|
398
|
+
title: m.you ? "You can't remove yourself" : `Remove ${m.name}`,
|
|
399
|
+
disabled: m.you,
|
|
400
|
+
onClick: () => remove(m),
|
|
401
|
+
className: iconBtn,
|
|
402
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4.5 4.5l7 7M11.5 4.5l-7 7" }) })
|
|
403
|
+
}
|
|
404
|
+
)
|
|
405
|
+
] }) }, m.id);
|
|
406
|
+
}) }),
|
|
407
|
+
invites.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
408
|
+
/* @__PURE__ */ jsx("h4", { className: "mt-7 mb-1 px-1 text-[12px] font-medium text-mute", children: "Pending invites" }),
|
|
409
|
+
/* @__PURE__ */ jsx("ul", { children: invites.map((inv) => {
|
|
410
|
+
const again = resent.includes(inv.id);
|
|
411
|
+
return /* @__PURE__ */ jsxs("li", { ref: inviteFlip.reg(inv.id), className: "flex h-[52px] items-center gap-3 px-1 sm:px-3", style: { animation: `kit-tm-in .4s ${CURVE}` }, children: [
|
|
412
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "grid h-8 w-8 shrink-0 place-items-center rounded-full shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] text-mute", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round", "aria-hidden": true, children: [
|
|
413
|
+
/* @__PURE__ */ jsx("rect", { x: "2", y: "3.5", width: "12", height: "9", rx: "1.6" }),
|
|
414
|
+
/* @__PURE__ */ jsx("path", { d: "m2.5 4.5 5.5 4 5.5-4" })
|
|
415
|
+
] }) }),
|
|
416
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
417
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-[13.5px] text-ink", children: inv.email }),
|
|
418
|
+
/* @__PURE__ */ jsxs("p", { className: "truncate text-[12px] text-mute", children: [
|
|
419
|
+
roleLabel(inv.role),
|
|
420
|
+
inv.sent && ` \xB7 Sent ${inv.sent}`
|
|
421
|
+
] })
|
|
422
|
+
] }),
|
|
423
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "xs", onClick: () => !again && resend(inv), "aria-disabled": again || void 0, children: /* @__PURE__ */ jsx("span", { style: { animation: `kit-tm-swap .3s ${CURVE}` }, children: again ? "Sent" : "Resend" }, again ? "sent" : "resend") }),
|
|
424
|
+
/* @__PURE__ */ jsx(Button, { "data-tm-focus": `revoke-${inv.id}`, variant: "ghost", size: "xs", onClick: () => revoke(inv), children: "Revoke" })
|
|
425
|
+
] }, inv.id);
|
|
426
|
+
}) })
|
|
427
|
+
] })
|
|
428
|
+
] });
|
|
429
|
+
}
|
|
430
|
+
var team_members_default = TeamMembers;
|
|
431
|
+
|
|
432
|
+
export {
|
|
433
|
+
TeamMembers,
|
|
434
|
+
team_members_default
|
|
435
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// components/kit/announcement-bar.tsx
|
|
4
|
+
import { useEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var cx = (...c) => c.filter(Boolean).join(" ");
|
|
7
|
+
var KEYFRAMES = `@keyframes asta-announce-in { from { opacity: 0; transform: translateY(100%) } }
|
|
8
|
+
@keyframes asta-announce-out { to { opacity: 0; transform: translateY(-100%) } }`;
|
|
9
|
+
var noop = () => () => {
|
|
10
|
+
};
|
|
11
|
+
var readFlag = (key) => {
|
|
12
|
+
if (!key) return false;
|
|
13
|
+
try {
|
|
14
|
+
return localStorage.getItem(key) === "1";
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var SURFACE = {
|
|
20
|
+
ink: { bar: "bg-ink text-paper", badge: "bg-brand text-white", link: "text-paper", close: "text-paper/60 hover:text-paper hover:bg-paper/10" },
|
|
21
|
+
brand: { bar: "bg-brand text-white", badge: "bg-white/15 text-white", link: "text-white", close: "text-white/70 hover:text-white hover:bg-white/10" },
|
|
22
|
+
subtle: { bar: "bg-paper-2 text-ink", badge: "bg-[color-mix(in_srgb,var(--brand)_14%,transparent)] text-brand", link: "text-brand", close: "text-mute hover:text-ink hover:bg-paper" }
|
|
23
|
+
};
|
|
24
|
+
function Message({ m, tone, tabbable }) {
|
|
25
|
+
return /* @__PURE__ */ jsxs("p", { className: "flex min-w-0 items-center justify-center gap-2.5 text-[13px] leading-snug", children: [
|
|
26
|
+
m.badge && /* @__PURE__ */ jsx("span", { className: cx("shrink-0 rounded-md px-1.5 py-0.5 text-[11px] font-medium", tone.badge), children: m.badge }),
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: m.text }),
|
|
28
|
+
m.href && /* @__PURE__ */ jsxs(
|
|
29
|
+
"a",
|
|
30
|
+
{
|
|
31
|
+
href: m.href,
|
|
32
|
+
tabIndex: tabbable ? void 0 : -1,
|
|
33
|
+
className: cx("group/link inline-flex shrink-0 items-center gap-1 rounded-sm font-medium underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-brand/60", tone.link),
|
|
34
|
+
children: [
|
|
35
|
+
m.linkLabel ?? "Learn more",
|
|
36
|
+
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5 transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)] group-hover/link:translate-x-0.5", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3.5 8h9M9 4.5 12.5 8 9 11.5" }) })
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
function AnnouncementBar({ messages, variant = "ink", interval = 5e3, dismissible = true, open, onDismiss, onExited, storageKey, label = "Announcement", className }) {
|
|
43
|
+
const remembered = useSyncExternalStore(noop, () => readFlag(storageKey), () => false);
|
|
44
|
+
const [inner, setInner] = useState(true);
|
|
45
|
+
const visible = open ?? inner;
|
|
46
|
+
const [present, setPresent] = useState(visible);
|
|
47
|
+
if (visible && !present) setPresent(true);
|
|
48
|
+
const [{ cur, prev }, setTurn] = useState({ cur: 0, prev: null });
|
|
49
|
+
const [paused, setPaused] = useState(false);
|
|
50
|
+
const [calm, setCalm] = useState(false);
|
|
51
|
+
const root = useRef(null);
|
|
52
|
+
const tone = SURFACE[variant];
|
|
53
|
+
const count = messages.length;
|
|
54
|
+
const index = count ? cur % count : 0;
|
|
55
|
+
const rotating = count > 1 && !paused && !calm;
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
58
|
+
const sync = () => setCalm(mq.matches);
|
|
59
|
+
sync();
|
|
60
|
+
mq.addEventListener("change", sync);
|
|
61
|
+
return () => mq.removeEventListener("change", sync);
|
|
62
|
+
}, []);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!rotating || !present) return;
|
|
65
|
+
const id = setInterval(() => {
|
|
66
|
+
if (document.hidden) return;
|
|
67
|
+
setTurn((t) => ({ cur: (t.cur + 1) % count, prev: t.cur % count }));
|
|
68
|
+
}, interval);
|
|
69
|
+
return () => clearInterval(id);
|
|
70
|
+
}, [rotating, present, interval, count]);
|
|
71
|
+
const dismiss = () => {
|
|
72
|
+
if (root.current?.contains(document.activeElement)) document.activeElement.blur();
|
|
73
|
+
if (open === void 0) setInner(false);
|
|
74
|
+
onDismiss?.();
|
|
75
|
+
};
|
|
76
|
+
if (!present || !count || open === void 0 && remembered) return null;
|
|
77
|
+
return /* @__PURE__ */ jsxs(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
ref: root,
|
|
81
|
+
role: "region",
|
|
82
|
+
"aria-label": label,
|
|
83
|
+
"data-state": visible ? "open" : "closed",
|
|
84
|
+
onPointerEnter: (e) => e.pointerType === "mouse" && setPaused(true),
|
|
85
|
+
onPointerLeave: (e) => e.pointerType === "mouse" && setPaused(false),
|
|
86
|
+
onFocus: () => setPaused(true),
|
|
87
|
+
onBlur: (e) => {
|
|
88
|
+
if (!e.currentTarget.contains(e.relatedTarget)) setPaused(false);
|
|
89
|
+
},
|
|
90
|
+
onAnimationEnd: (e) => {
|
|
91
|
+
if (e.target !== e.currentTarget || visible) return;
|
|
92
|
+
if (storageKey) {
|
|
93
|
+
try {
|
|
94
|
+
localStorage.setItem(storageKey, "1");
|
|
95
|
+
} catch {
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
setPresent(false);
|
|
99
|
+
onExited?.();
|
|
100
|
+
},
|
|
101
|
+
className: cx(
|
|
102
|
+
"relative flex min-h-10 w-full items-center gap-2 px-3 sm:px-4",
|
|
103
|
+
"data-[state=closed]:pointer-events-none data-[state=closed]:animate-[asta-announce-out_.32s_cubic-bezier(.16,1,.3,1)_both] motion-reduce:![animation-duration:1ms]",
|
|
104
|
+
tone.bar,
|
|
105
|
+
className
|
|
106
|
+
),
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ jsx("style", { href: "asta-announcement-bar", precedence: "asta", children: KEYFRAMES }),
|
|
109
|
+
dismissible && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "w-7 shrink-0" }),
|
|
110
|
+
count === 1 ? /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1 py-2.5", children: /* @__PURE__ */ jsx(Message, { m: messages[0], tone, tabbable: true }) }) : (
|
|
111
|
+
// Live only while still, so a rotating bar doesn't talk over the page.
|
|
112
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-10 min-w-0 flex-1 overflow-hidden", "aria-live": rotating ? "off" : "polite", children: messages.map((m, i) => {
|
|
113
|
+
const isCur = i === index;
|
|
114
|
+
const isPrev = i === prev && !isCur;
|
|
115
|
+
return /* @__PURE__ */ jsx(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
"aria-hidden": !isCur,
|
|
119
|
+
className: cx(
|
|
120
|
+
"absolute inset-0 flex items-center justify-center",
|
|
121
|
+
isCur && prev !== null && !calm && "animate-[asta-announce-in_.6s_cubic-bezier(.16,1,.3,1)_both]",
|
|
122
|
+
isPrev && !calm && "animate-[asta-announce-out_.6s_cubic-bezier(.16,1,.3,1)_both]",
|
|
123
|
+
!isCur && (isPrev && !calm ? "pointer-events-none" : "invisible opacity-0")
|
|
124
|
+
),
|
|
125
|
+
children: /* @__PURE__ */ jsx(Message, { m, tone, tabbable: isCur })
|
|
126
|
+
},
|
|
127
|
+
i
|
|
128
|
+
);
|
|
129
|
+
}) })
|
|
130
|
+
),
|
|
131
|
+
dismissible && /* @__PURE__ */ jsx(
|
|
132
|
+
"button",
|
|
133
|
+
{
|
|
134
|
+
type: "button",
|
|
135
|
+
"aria-label": "Dismiss announcement",
|
|
136
|
+
onClick: dismiss,
|
|
137
|
+
className: cx("grid h-7 w-7 shrink-0 place-items-center rounded-md outline-none transition-[background-color,color,transform] duration-200 active:scale-90 focus-visible:ring-2 focus-visible:ring-brand/60", tone.close),
|
|
138
|
+
children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m4.5 4.5 7 7m0-7-7 7" }) })
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
var announcement_bar_default = AnnouncementBar;
|
|
146
|
+
|
|
147
|
+
export {
|
|
148
|
+
AnnouncementBar,
|
|
149
|
+
announcement_bar_default
|
|
150
|
+
};
|