asta-ui 0.2.0 → 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.
Files changed (413) hide show
  1. package/dist/ai-chat.d.ts +2 -0
  2. package/dist/ai-chat.js +9 -0
  3. package/dist/alert.d.ts +2 -0
  4. package/dist/alert.js +9 -0
  5. package/dist/announcement-bar.d.ts +2 -0
  6. package/dist/announcement-bar.js +9 -0
  7. package/dist/avatar-group.d.ts +2 -0
  8. package/dist/avatar-group.js +10 -0
  9. package/dist/avatar.js +3 -1
  10. package/dist/base/ai-chat.d.ts +2 -0
  11. package/dist/base/ai-chat.js +9 -0
  12. package/dist/base/alert.d.ts +2 -0
  13. package/dist/base/alert.js +9 -0
  14. package/dist/base/announcement-bar.d.ts +2 -0
  15. package/dist/base/announcement-bar.js +9 -0
  16. package/dist/base/avatar-group.d.ts +2 -0
  17. package/dist/base/avatar-group.js +10 -0
  18. package/dist/base/avatar.js +3 -1
  19. package/dist/base/booking-slots.d.ts +2 -0
  20. package/dist/base/booking-slots.js +7 -0
  21. package/dist/base/breadcrumb.d.ts +2 -0
  22. package/dist/base/breadcrumb.js +9 -0
  23. package/dist/base/carousel.d.ts +2 -0
  24. package/dist/base/carousel.js +9 -0
  25. package/dist/base/chat-thread.d.ts +2 -0
  26. package/dist/base/chat-thread.js +7 -0
  27. package/dist/base/checkout.d.ts +2 -0
  28. package/dist/base/checkout.js +12 -0
  29. package/dist/base/color-picker.d.ts +2 -0
  30. package/dist/base/color-picker.js +9 -0
  31. package/dist/base/combobox.d.ts +2 -0
  32. package/dist/base/combobox.js +9 -0
  33. package/dist/base/comments.d.ts +2 -0
  34. package/dist/base/comments.js +11 -0
  35. package/dist/base/context-menu.d.ts +2 -0
  36. package/dist/base/context-menu.js +9 -0
  37. package/dist/base/copy-button.d.ts +2 -0
  38. package/dist/base/copy-button.js +9 -0
  39. package/dist/base/data-table.d.ts +2 -0
  40. package/dist/base/data-table.js +9 -0
  41. package/dist/base/date-picker.d.ts +2 -0
  42. package/dist/base/date-picker.js +9 -0
  43. package/dist/base/drawer.d.ts +2 -0
  44. package/dist/base/drawer.js +9 -0
  45. package/dist/base/empty-state.d.ts +2 -0
  46. package/dist/base/empty-state.js +10 -0
  47. package/dist/base/event-calendar.d.ts +2 -0
  48. package/dist/base/event-calendar.js +9 -0
  49. package/dist/base/file-upload.d.ts +2 -0
  50. package/dist/base/file-upload.js +11 -0
  51. package/dist/base/hover-card.d.ts +2 -0
  52. package/dist/base/hover-card.js +9 -0
  53. package/dist/base/image-compare.d.ts +2 -0
  54. package/dist/base/image-compare.js +9 -0
  55. package/dist/base/inline-edit.d.ts +2 -0
  56. package/dist/base/inline-edit.js +9 -0
  57. package/dist/base/kanban.d.ts +2 -0
  58. package/dist/base/kanban.js +10 -0
  59. package/dist/base/notification-center.d.ts +2 -0
  60. package/dist/base/notification-center.js +11 -0
  61. package/dist/base/notification-stack.d.ts +2 -0
  62. package/dist/base/notification-stack.js +7 -0
  63. package/dist/base/now-playing.d.ts +2 -0
  64. package/dist/base/now-playing.js +7 -0
  65. package/dist/base/onboarding.d.ts +2 -0
  66. package/dist/base/onboarding.js +10 -0
  67. package/dist/base/otp-input.d.ts +2 -0
  68. package/dist/base/otp-input.js +9 -0
  69. package/dist/base/pagination.d.ts +2 -0
  70. package/dist/base/pagination.js +11 -0
  71. package/dist/base/password-input.d.ts +2 -0
  72. package/dist/base/password-input.js +13 -0
  73. package/dist/base/payment-received.d.ts +2 -0
  74. package/dist/base/payment-received.js +7 -0
  75. package/dist/base/plan-switcher.d.ts +2 -0
  76. package/dist/base/plan-switcher.js +7 -0
  77. package/dist/base/popover.d.ts +2 -0
  78. package/dist/base/popover.js +9 -0
  79. package/dist/base/progress.d.ts +2 -0
  80. package/dist/base/progress.js +11 -0
  81. package/dist/base/range-slider.d.ts +2 -0
  82. package/dist/base/range-slider.js +9 -0
  83. package/dist/base/rating.d.ts +2 -0
  84. package/dist/base/rating.js +9 -0
  85. package/dist/base/seat-picker.d.ts +2 -0
  86. package/dist/base/seat-picker.js +7 -0
  87. package/dist/base/shipment-tracker.d.ts +2 -0
  88. package/dist/base/shipment-tracker.js +7 -0
  89. package/dist/base/sidebar.d.ts +2 -0
  90. package/dist/base/sidebar.js +10 -0
  91. package/dist/base/stat-card.d.ts +2 -0
  92. package/dist/base/stat-card.js +9 -0
  93. package/dist/base/stepper.d.ts +2 -0
  94. package/dist/base/stepper.js +9 -0
  95. package/dist/base/team-members.d.ts +2 -0
  96. package/dist/base/team-members.js +12 -0
  97. package/dist/base/timeline.d.ts +2 -0
  98. package/dist/base/timeline.js +9 -0
  99. package/dist/base/toggle-group.d.ts +2 -0
  100. package/dist/base/toggle-group.js +9 -0
  101. package/dist/base/token-swap.d.ts +2 -0
  102. package/dist/base/token-swap.js +7 -0
  103. package/dist/base/tree-view.d.ts +2 -0
  104. package/dist/base/tree-view.js +9 -0
  105. package/dist/base/wishlist.d.ts +2 -0
  106. package/dist/base/wishlist.js +7 -0
  107. package/dist/base.js +250 -46
  108. package/dist/booking-slots.d.ts +2 -0
  109. package/dist/booking-slots.js +7 -0
  110. package/dist/breadcrumb.d.ts +2 -0
  111. package/dist/breadcrumb.js +9 -0
  112. package/dist/carousel.d.ts +2 -0
  113. package/dist/carousel.js +9 -0
  114. package/dist/chat-thread.d.ts +2 -0
  115. package/dist/chat-thread.js +7 -0
  116. package/dist/checkout.d.ts +2 -0
  117. package/dist/checkout.js +12 -0
  118. package/dist/{chunk-VGBP42IZ.js → chunk-2LZM435Z.js} +3 -2
  119. package/dist/chunk-33N6SZB5.js +186 -0
  120. package/dist/chunk-3KS5EN3Q.js +134 -0
  121. package/dist/chunk-3RMCFFW2.js +228 -0
  122. package/dist/chunk-45VUWOHQ.js +299 -0
  123. package/dist/chunk-4FR6KJOJ.js +91 -0
  124. package/dist/chunk-4GF7WTR3.js +230 -0
  125. package/dist/chunk-4XM6DKEO.js +164 -0
  126. package/dist/chunk-57PESBSZ.js +97 -0
  127. package/dist/chunk-6HPSPZTF.js +232 -0
  128. package/dist/chunk-6VQTFRSP.js +435 -0
  129. package/dist/chunk-72UKXOMW.js +150 -0
  130. package/dist/chunk-7JNO265Q.js +431 -0
  131. package/dist/chunk-AYSC7AIC.js +322 -0
  132. package/dist/chunk-B5F775GP.js +339 -0
  133. package/dist/chunk-B5OESWCR.js +339 -0
  134. package/dist/chunk-BP3LXM3X.js +309 -0
  135. package/dist/chunk-CA7YQ5BJ.js +271 -0
  136. package/dist/chunk-DRX3KRNL.js +191 -0
  137. package/dist/chunk-EAUUUVUR.js +123 -0
  138. package/dist/chunk-EXX6YSUX.js +340 -0
  139. package/dist/chunk-F7LAUVDJ.js +97 -0
  140. package/dist/chunk-FDHU3RWR.js +213 -0
  141. package/dist/chunk-FJGGXXTT.js +109 -0
  142. package/dist/chunk-FKHNK5VC.js +172 -0
  143. package/dist/chunk-FY6BRODJ.js +230 -0
  144. package/dist/chunk-GDTSCUHY.js +234 -0
  145. package/dist/chunk-H7D6G3GQ.js +290 -0
  146. package/dist/chunk-HB7DFNZP.js +109 -0
  147. package/dist/{chunk-H5C7HOQJ.js → chunk-HNO6EUGJ.js} +3 -2
  148. package/dist/chunk-HPVPHWDM.js +197 -0
  149. package/dist/chunk-I5NZSWDW.js +431 -0
  150. package/dist/chunk-IMBCYI3F.js +114 -0
  151. package/dist/chunk-IS2VTYDA.js +235 -0
  152. package/dist/chunk-ISZ7O2Q6.js +245 -0
  153. package/dist/chunk-JAQKJBVJ.js +170 -0
  154. package/dist/chunk-KYFZ5TTK.js +271 -0
  155. package/dist/chunk-LBXIMJFU.js +170 -0
  156. package/dist/chunk-MSBN2O66.js +110 -0
  157. package/dist/chunk-NB7X26PY.js +388 -0
  158. package/dist/chunk-NIYIT2QU.js +118 -0
  159. package/dist/chunk-QJXPS55V.js +246 -0
  160. package/dist/chunk-RBTX7TVA.js +170 -0
  161. package/dist/chunk-RFVKRVTD.js +172 -0
  162. package/dist/chunk-RIWKIBEP.js +271 -0
  163. package/dist/chunk-RSUZHZCG.js +230 -0
  164. package/dist/chunk-S2DJLW6B.js +322 -0
  165. package/dist/chunk-SDL3JXFN.js +97 -0
  166. package/dist/chunk-SDOWCCM2.js +271 -0
  167. package/dist/chunk-SPKSRH6G.js +283 -0
  168. package/dist/chunk-TLODJONC.js +120 -0
  169. package/dist/chunk-TXRLBMFL.js +191 -0
  170. package/dist/chunk-UWQ26LYZ.js +133 -0
  171. package/dist/chunk-V3SPSN3A.js +308 -0
  172. package/dist/chunk-W57O4RLL.js +435 -0
  173. package/dist/chunk-WO36QUH3.js +188 -0
  174. package/dist/chunk-YLAL6ICI.js +142 -0
  175. package/dist/chunk-ZGMBQZDV.js +250 -0
  176. package/dist/chunk-ZKMEKSJZ.js +133 -0
  177. package/dist/color-picker.d.ts +2 -0
  178. package/dist/color-picker.js +9 -0
  179. package/dist/combobox.d.ts +2 -0
  180. package/dist/combobox.js +9 -0
  181. package/dist/comments.d.ts +2 -0
  182. package/dist/comments.js +11 -0
  183. package/dist/context-menu.d.ts +2 -0
  184. package/dist/context-menu.js +9 -0
  185. package/dist/copy-button.d.ts +2 -0
  186. package/dist/copy-button.js +9 -0
  187. package/dist/data-table.d.ts +2 -0
  188. package/dist/data-table.js +9 -0
  189. package/dist/date-picker.d.ts +2 -0
  190. package/dist/date-picker.js +9 -0
  191. package/dist/drawer.d.ts +2 -0
  192. package/dist/drawer.js +9 -0
  193. package/dist/empty-state.d.ts +2 -0
  194. package/dist/empty-state.js +10 -0
  195. package/dist/event-calendar.d.ts +2 -0
  196. package/dist/event-calendar.js +9 -0
  197. package/dist/file-upload.d.ts +2 -0
  198. package/dist/file-upload.js +11 -0
  199. package/dist/hover-card.d.ts +2 -0
  200. package/dist/hover-card.js +9 -0
  201. package/dist/image-compare.d.ts +2 -0
  202. package/dist/image-compare.js +9 -0
  203. package/dist/index.js +250 -46
  204. package/dist/inline-edit.d.ts +2 -0
  205. package/dist/inline-edit.js +9 -0
  206. package/dist/kanban.d.ts +2 -0
  207. package/dist/kanban.js +10 -0
  208. package/dist/notification-center.d.ts +2 -0
  209. package/dist/notification-center.js +11 -0
  210. package/dist/notification-stack.d.ts +2 -0
  211. package/dist/notification-stack.js +7 -0
  212. package/dist/now-playing.d.ts +2 -0
  213. package/dist/now-playing.js +7 -0
  214. package/dist/onboarding.d.ts +2 -0
  215. package/dist/onboarding.js +10 -0
  216. package/dist/otp-input.d.ts +2 -0
  217. package/dist/otp-input.js +9 -0
  218. package/dist/pagination.d.ts +2 -0
  219. package/dist/pagination.js +11 -0
  220. package/dist/password-input.d.ts +2 -0
  221. package/dist/password-input.js +13 -0
  222. package/dist/payment-received.d.ts +2 -0
  223. package/dist/payment-received.js +7 -0
  224. package/dist/plan-switcher.d.ts +2 -0
  225. package/dist/plan-switcher.js +7 -0
  226. package/dist/popover.d.ts +2 -0
  227. package/dist/popover.js +9 -0
  228. package/dist/progress.d.ts +2 -0
  229. package/dist/progress.js +11 -0
  230. package/dist/range-slider.d.ts +2 -0
  231. package/dist/range-slider.js +9 -0
  232. package/dist/rating.d.ts +2 -0
  233. package/dist/rating.js +9 -0
  234. package/dist/seat-picker.d.ts +2 -0
  235. package/dist/seat-picker.js +7 -0
  236. package/dist/shipment-tracker.d.ts +2 -0
  237. package/dist/shipment-tracker.js +7 -0
  238. package/dist/sidebar.d.ts +2 -0
  239. package/dist/sidebar.js +10 -0
  240. package/dist/stat-card.d.ts +2 -0
  241. package/dist/stat-card.js +9 -0
  242. package/dist/stepper.d.ts +2 -0
  243. package/dist/stepper.js +9 -0
  244. package/dist/team-members.d.ts +2 -0
  245. package/dist/team-members.js +12 -0
  246. package/dist/timeline.d.ts +2 -0
  247. package/dist/timeline.js +9 -0
  248. package/dist/toggle-group.d.ts +2 -0
  249. package/dist/toggle-group.js +9 -0
  250. package/dist/token-swap.d.ts +2 -0
  251. package/dist/token-swap.js +7 -0
  252. package/dist/tree-view.d.ts +2 -0
  253. package/dist/tree-view.js +9 -0
  254. package/dist/types/components/kit/ai-chat.d.ts +37 -0
  255. package/dist/types/components/kit/alert.d.ts +27 -0
  256. package/dist/types/components/kit/announcement-bar.d.ts +36 -0
  257. package/dist/types/components/kit/avatar-group.d.ts +22 -0
  258. package/dist/types/components/kit/avatar.d.ts +2 -0
  259. package/dist/types/components/kit/base/avatar-group.d.ts +22 -0
  260. package/dist/types/components/kit/base/avatar.d.ts +2 -0
  261. package/dist/types/components/kit/base/checkout.d.ts +68 -0
  262. package/dist/types/components/kit/base/comments.d.ts +30 -0
  263. package/dist/types/components/kit/base/empty-state.d.ts +29 -0
  264. package/dist/types/components/kit/base/kanban.d.ts +26 -0
  265. package/dist/types/components/kit/base/notification-center.d.ts +34 -0
  266. package/dist/types/components/kit/base/onboarding.d.ts +28 -0
  267. package/dist/types/components/kit/base/sidebar.d.ts +43 -0
  268. package/dist/types/components/kit/base/team-members.d.ts +46 -0
  269. package/dist/types/components/kit/breadcrumb.d.ts +29 -0
  270. package/dist/types/components/kit/carousel.d.ts +21 -0
  271. package/dist/types/components/kit/checkout.d.ts +68 -0
  272. package/dist/types/components/kit/color-picker.d.ts +28 -0
  273. package/dist/types/components/kit/combobox.d.ts +40 -0
  274. package/dist/types/components/kit/comments.d.ts +30 -0
  275. package/dist/types/components/kit/context-menu.d.ts +37 -0
  276. package/dist/types/components/kit/copy-button.d.ts +20 -0
  277. package/dist/types/components/kit/data-table.d.ts +47 -0
  278. package/dist/types/components/kit/date-picker.d.ts +40 -0
  279. package/dist/types/components/kit/drawer.d.ts +26 -0
  280. package/dist/types/components/kit/empty-state.d.ts +29 -0
  281. package/dist/types/components/kit/event-calendar.d.ts +34 -0
  282. package/dist/types/components/kit/file-upload.d.ts +37 -0
  283. package/dist/types/components/kit/hover-card.d.ts +31 -0
  284. package/dist/types/components/kit/image-compare.d.ts +29 -0
  285. package/dist/types/components/kit/inline-edit.d.ts +26 -0
  286. package/dist/types/components/kit/kanban.d.ts +26 -0
  287. package/dist/types/components/kit/notification-center.d.ts +34 -0
  288. package/dist/types/components/kit/onboarding.d.ts +28 -0
  289. package/dist/types/components/kit/otp-input.d.ts +28 -0
  290. package/dist/types/components/kit/pagination.d.ts +25 -0
  291. package/dist/types/components/kit/password-input.d.ts +32 -0
  292. package/dist/types/components/kit/popover.d.ts +40 -0
  293. package/dist/types/components/kit/progress.d.ts +37 -0
  294. package/dist/types/components/kit/range-slider.d.ts +27 -0
  295. package/dist/types/components/kit/rating.d.ts +23 -0
  296. package/dist/types/components/kit/sidebar.d.ts +43 -0
  297. package/dist/types/components/kit/stat-card.d.ts +24 -0
  298. package/dist/types/components/kit/stepper.d.ts +36 -0
  299. package/dist/types/components/kit/team-members.d.ts +46 -0
  300. package/dist/types/components/kit/timeline.d.ts +24 -0
  301. package/dist/types/components/kit/toggle-group.d.ts +42 -0
  302. package/dist/types/components/kit/tree-view.d.ts +31 -0
  303. package/dist/types/components/lab/blocks/BookingSlots.d.ts +2 -0
  304. package/dist/types/components/lab/blocks/ChatThread.d.ts +2 -0
  305. package/dist/types/components/lab/blocks/NotificationStack.d.ts +2 -0
  306. package/dist/types/components/lab/blocks/NowPlaying.d.ts +2 -0
  307. package/dist/types/components/lab/blocks/PaymentReceived.d.ts +2 -0
  308. package/dist/types/components/lab/blocks/PlanSwitcher.d.ts +2 -0
  309. package/dist/types/components/lab/blocks/SeatPicker.d.ts +2 -0
  310. package/dist/types/components/lab/blocks/ShipmentTracker.d.ts +2 -0
  311. package/dist/types/components/lab/blocks/TokenSwap.d.ts +2 -0
  312. package/dist/types/components/lab/blocks/Wishlist.d.ts +2 -0
  313. package/dist/types/packages/asta-ui/src/ai-chat.d.ts +2 -0
  314. package/dist/types/packages/asta-ui/src/alert.d.ts +2 -0
  315. package/dist/types/packages/asta-ui/src/announcement-bar.d.ts +2 -0
  316. package/dist/types/packages/asta-ui/src/avatar-group.d.ts +2 -0
  317. package/dist/types/packages/asta-ui/src/base/ai-chat.d.ts +2 -0
  318. package/dist/types/packages/asta-ui/src/base/alert.d.ts +2 -0
  319. package/dist/types/packages/asta-ui/src/base/announcement-bar.d.ts +2 -0
  320. package/dist/types/packages/asta-ui/src/base/avatar-group.d.ts +2 -0
  321. package/dist/types/packages/asta-ui/src/base/booking-slots.d.ts +2 -0
  322. package/dist/types/packages/asta-ui/src/base/breadcrumb.d.ts +2 -0
  323. package/dist/types/packages/asta-ui/src/base/carousel.d.ts +2 -0
  324. package/dist/types/packages/asta-ui/src/base/chat-thread.d.ts +2 -0
  325. package/dist/types/packages/asta-ui/src/base/checkout.d.ts +2 -0
  326. package/dist/types/packages/asta-ui/src/base/color-picker.d.ts +2 -0
  327. package/dist/types/packages/asta-ui/src/base/combobox.d.ts +2 -0
  328. package/dist/types/packages/asta-ui/src/base/comments.d.ts +2 -0
  329. package/dist/types/packages/asta-ui/src/base/context-menu.d.ts +2 -0
  330. package/dist/types/packages/asta-ui/src/base/copy-button.d.ts +2 -0
  331. package/dist/types/packages/asta-ui/src/base/data-table.d.ts +2 -0
  332. package/dist/types/packages/asta-ui/src/base/date-picker.d.ts +2 -0
  333. package/dist/types/packages/asta-ui/src/base/drawer.d.ts +2 -0
  334. package/dist/types/packages/asta-ui/src/base/empty-state.d.ts +2 -0
  335. package/dist/types/packages/asta-ui/src/base/event-calendar.d.ts +2 -0
  336. package/dist/types/packages/asta-ui/src/base/file-upload.d.ts +2 -0
  337. package/dist/types/packages/asta-ui/src/base/hover-card.d.ts +2 -0
  338. package/dist/types/packages/asta-ui/src/base/image-compare.d.ts +2 -0
  339. package/dist/types/packages/asta-ui/src/base/inline-edit.d.ts +2 -0
  340. package/dist/types/packages/asta-ui/src/base/kanban.d.ts +2 -0
  341. package/dist/types/packages/asta-ui/src/base/notification-center.d.ts +2 -0
  342. package/dist/types/packages/asta-ui/src/base/notification-stack.d.ts +2 -0
  343. package/dist/types/packages/asta-ui/src/base/now-playing.d.ts +2 -0
  344. package/dist/types/packages/asta-ui/src/base/onboarding.d.ts +2 -0
  345. package/dist/types/packages/asta-ui/src/base/otp-input.d.ts +2 -0
  346. package/dist/types/packages/asta-ui/src/base/pagination.d.ts +2 -0
  347. package/dist/types/packages/asta-ui/src/base/password-input.d.ts +2 -0
  348. package/dist/types/packages/asta-ui/src/base/payment-received.d.ts +2 -0
  349. package/dist/types/packages/asta-ui/src/base/plan-switcher.d.ts +2 -0
  350. package/dist/types/packages/asta-ui/src/base/popover.d.ts +2 -0
  351. package/dist/types/packages/asta-ui/src/base/progress.d.ts +2 -0
  352. package/dist/types/packages/asta-ui/src/base/range-slider.d.ts +2 -0
  353. package/dist/types/packages/asta-ui/src/base/rating.d.ts +2 -0
  354. package/dist/types/packages/asta-ui/src/base/seat-picker.d.ts +2 -0
  355. package/dist/types/packages/asta-ui/src/base/shipment-tracker.d.ts +2 -0
  356. package/dist/types/packages/asta-ui/src/base/sidebar.d.ts +2 -0
  357. package/dist/types/packages/asta-ui/src/base/stat-card.d.ts +2 -0
  358. package/dist/types/packages/asta-ui/src/base/stepper.d.ts +2 -0
  359. package/dist/types/packages/asta-ui/src/base/team-members.d.ts +2 -0
  360. package/dist/types/packages/asta-ui/src/base/timeline.d.ts +2 -0
  361. package/dist/types/packages/asta-ui/src/base/toggle-group.d.ts +2 -0
  362. package/dist/types/packages/asta-ui/src/base/token-swap.d.ts +2 -0
  363. package/dist/types/packages/asta-ui/src/base/tree-view.d.ts +2 -0
  364. package/dist/types/packages/asta-ui/src/base/wishlist.d.ts +2 -0
  365. package/dist/types/packages/asta-ui/src/base.d.ts +87 -1
  366. package/dist/types/packages/asta-ui/src/booking-slots.d.ts +2 -0
  367. package/dist/types/packages/asta-ui/src/breadcrumb.d.ts +2 -0
  368. package/dist/types/packages/asta-ui/src/carousel.d.ts +2 -0
  369. package/dist/types/packages/asta-ui/src/chat-thread.d.ts +2 -0
  370. package/dist/types/packages/asta-ui/src/checkout.d.ts +2 -0
  371. package/dist/types/packages/asta-ui/src/color-picker.d.ts +2 -0
  372. package/dist/types/packages/asta-ui/src/combobox.d.ts +2 -0
  373. package/dist/types/packages/asta-ui/src/comments.d.ts +2 -0
  374. package/dist/types/packages/asta-ui/src/context-menu.d.ts +2 -0
  375. package/dist/types/packages/asta-ui/src/copy-button.d.ts +2 -0
  376. package/dist/types/packages/asta-ui/src/data-table.d.ts +2 -0
  377. package/dist/types/packages/asta-ui/src/date-picker.d.ts +2 -0
  378. package/dist/types/packages/asta-ui/src/drawer.d.ts +2 -0
  379. package/dist/types/packages/asta-ui/src/empty-state.d.ts +2 -0
  380. package/dist/types/packages/asta-ui/src/event-calendar.d.ts +2 -0
  381. package/dist/types/packages/asta-ui/src/file-upload.d.ts +2 -0
  382. package/dist/types/packages/asta-ui/src/hover-card.d.ts +2 -0
  383. package/dist/types/packages/asta-ui/src/image-compare.d.ts +2 -0
  384. package/dist/types/packages/asta-ui/src/index.d.ts +87 -1
  385. package/dist/types/packages/asta-ui/src/inline-edit.d.ts +2 -0
  386. package/dist/types/packages/asta-ui/src/kanban.d.ts +2 -0
  387. package/dist/types/packages/asta-ui/src/notification-center.d.ts +2 -0
  388. package/dist/types/packages/asta-ui/src/notification-stack.d.ts +2 -0
  389. package/dist/types/packages/asta-ui/src/now-playing.d.ts +2 -0
  390. package/dist/types/packages/asta-ui/src/onboarding.d.ts +2 -0
  391. package/dist/types/packages/asta-ui/src/otp-input.d.ts +2 -0
  392. package/dist/types/packages/asta-ui/src/pagination.d.ts +2 -0
  393. package/dist/types/packages/asta-ui/src/password-input.d.ts +2 -0
  394. package/dist/types/packages/asta-ui/src/payment-received.d.ts +2 -0
  395. package/dist/types/packages/asta-ui/src/plan-switcher.d.ts +2 -0
  396. package/dist/types/packages/asta-ui/src/popover.d.ts +2 -0
  397. package/dist/types/packages/asta-ui/src/progress.d.ts +2 -0
  398. package/dist/types/packages/asta-ui/src/range-slider.d.ts +2 -0
  399. package/dist/types/packages/asta-ui/src/rating.d.ts +2 -0
  400. package/dist/types/packages/asta-ui/src/seat-picker.d.ts +2 -0
  401. package/dist/types/packages/asta-ui/src/shipment-tracker.d.ts +2 -0
  402. package/dist/types/packages/asta-ui/src/sidebar.d.ts +2 -0
  403. package/dist/types/packages/asta-ui/src/stat-card.d.ts +2 -0
  404. package/dist/types/packages/asta-ui/src/stepper.d.ts +2 -0
  405. package/dist/types/packages/asta-ui/src/team-members.d.ts +2 -0
  406. package/dist/types/packages/asta-ui/src/timeline.d.ts +2 -0
  407. package/dist/types/packages/asta-ui/src/toggle-group.d.ts +2 -0
  408. package/dist/types/packages/asta-ui/src/token-swap.d.ts +2 -0
  409. package/dist/types/packages/asta-ui/src/tree-view.d.ts +2 -0
  410. package/dist/types/packages/asta-ui/src/wishlist.d.ts +2 -0
  411. package/dist/wishlist.d.ts +2 -0
  412. package/dist/wishlist.js +7 -0
  413. package/package.json +1 -1
@@ -0,0 +1,246 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/PaymentReceived.tsx
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var EASE = "cubic-bezier(.16,1,.3,1)";
7
+ var RING = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]";
8
+ var DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
9
+ var BASE = 12480.2;
10
+ var OLD = [
11
+ { id: -1, name: "Pine Cafe", amount: 34, via: "Card \xB7\xB7 2207" },
12
+ { id: -2, name: "M. Silva", amount: 120, via: "Transfer" },
13
+ { id: -3, name: "Orbit Print", amount: 76.5, via: "Card \xB7\xB7 5530" }
14
+ ];
15
+ var INCOMING = [
16
+ { id: 1, name: "Maple & Co.", amount: 128, via: "Card \xB7\xB7 4821" },
17
+ { id: 2, name: "Juniper Studio", amount: 342.5, via: "Transfer" },
18
+ { id: 3, name: "R. Okafor", amount: 46.2, via: "Card \xB7\xB7 0937" },
19
+ { id: 4, name: "Northfield Goods", amount: 219.99, via: "Transfer" },
20
+ { id: 5, name: "Lumen Bakery", amount: 18.75, via: "Card \xB7\xB7 1150" },
21
+ { id: 6, name: "Atlas Rentals", amount: 512, via: "Transfer" },
22
+ { id: 7, name: "K. Tanaka", amount: 89.4, via: "Card \xB7\xB7 7718" },
23
+ { id: 8, name: "Harbor Supply", amount: 264.1, via: "Transfer" }
24
+ ];
25
+ var SPARK = [80, 140, 60, 210, 120, 180, 90, 160, 230, 110];
26
+ var ROWS = 3;
27
+ var money = (n) => `$${n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
28
+ var initials = (n) => n.replace(/[^A-Za-z ]/g, "").split(" ").filter(Boolean).slice(0, 2).map((w) => w[0]).join("");
29
+ function Roll({ value, instant }) {
30
+ const chars = value.split("");
31
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-start leading-[1.1em] tabular-nums", "aria-label": value, children: chars.map((c, i) => {
32
+ const key = chars.length - i;
33
+ if (!/\d/.test(c))
34
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-[1.1em]", children: c }, `s${key}`);
35
+ return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative inline-block h-[1.1em] overflow-hidden leading-[1.1em]", children: [
36
+ /* @__PURE__ */ jsx("span", { className: "invisible", children: "0" }),
37
+ /* @__PURE__ */ jsx(
38
+ "span",
39
+ {
40
+ className: "absolute left-0 top-0 flex flex-col motion-reduce:transition-none",
41
+ style: { transform: `translateY(-${Number(c) * 1.1}em)`, transition: instant ? "none" : `transform .8s ${EASE} ${(chars.length - i) * 22}ms` },
42
+ children: DIGITS.map((d) => /* @__PURE__ */ jsx("span", { className: "block h-[1.1em]", children: d }, d))
43
+ }
44
+ )
45
+ ] }, `d${key}`);
46
+ }) });
47
+ }
48
+ var Incoming = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className, fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M11.5 4.5l-7 7M4.5 5.5v6h6" }) });
49
+ function PaymentReceived() {
50
+ const [shown, setShown] = useState(0);
51
+ const [applied, setApplied] = useState(0);
52
+ const [hot, setHot] = useState(false);
53
+ const [fade, setFade] = useState(false);
54
+ const [instant, setInstant] = useState(false);
55
+ const [paused, setPaused] = useState(false);
56
+ const k = useRef(0);
57
+ useEffect(() => {
58
+ if (paused) return;
59
+ const still = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
60
+ const t = [];
61
+ let alive = true;
62
+ const later = (ms, f) => t.push(setTimeout(() => alive && f(), ms));
63
+ const cycle = () => {
64
+ if (k.current >= INCOMING.length) {
65
+ setFade(true);
66
+ later(450, () => {
67
+ k.current = 0;
68
+ setInstant(true);
69
+ setShown(0);
70
+ setApplied(0);
71
+ setHot(false);
72
+ });
73
+ later(560, () => setInstant(false));
74
+ later(620, () => setFade(false));
75
+ later(1500, cycle);
76
+ return;
77
+ }
78
+ const i = ++k.current;
79
+ setShown(i);
80
+ later(still ? 0 : 420, () => {
81
+ setApplied(i);
82
+ setHot(true);
83
+ });
84
+ later(2e3, () => setHot(false));
85
+ later(3e3, cycle);
86
+ };
87
+ later(900, cycle);
88
+ return () => {
89
+ alive = false;
90
+ t.forEach(clearTimeout);
91
+ setApplied(k.current);
92
+ setHot(false);
93
+ setFade(false);
94
+ };
95
+ }, [paused]);
96
+ const got = INCOMING.slice(0, applied);
97
+ const sum = got.reduce((a, b) => a + b.amount, 0);
98
+ const toasts = INCOMING.slice(Math.max(0, shown - 3), shown).reverse();
99
+ const rows = [...got].reverse().concat(OLD).slice(0, ROWS + 1);
100
+ const pts = SPARK.concat(got.map((g) => Math.min(560, g.amount)));
101
+ const W = 120;
102
+ const H = 44;
103
+ const step = W / (SPARK.length - 1);
104
+ const y = (v) => H - 5 - v / 560 * (H - 12);
105
+ const xy = (i) => `${(i * step).toFixed(2)} ${y(pts[i]).toFixed(2)}`;
106
+ const line = pts.slice(0, -1).map((_, i) => `${i ? "L" : "M"}${xy(i)}`).join(" ");
107
+ const tail = `M${xy(pts.length - 2)} L${xy(pts.length - 1)}`;
108
+ const area = `${pts.map((_, i) => `${i ? "L" : "M"}${xy(i)}`).join(" ")} L${((pts.length - 1) * step).toFixed(2)} ${H} L0 ${H} Z`;
109
+ const shift = (pts.length - SPARK.length) * step;
110
+ const last = pts.length - 1;
111
+ const toggle = () => setPaused((p) => !p);
112
+ return /* @__PURE__ */ jsxs(
113
+ "div",
114
+ {
115
+ role: "group",
116
+ tabIndex: 0,
117
+ "aria-label": `Merchant balance ${money(BASE + sum)}. ${paused ? "Paused" : "Live"}. Press space to ${paused ? "resume" : "pause"}`,
118
+ onPointerEnter: (e) => e.pointerType === "mouse" && setPaused(true),
119
+ onPointerLeave: (e) => e.pointerType === "mouse" && setPaused(false),
120
+ onPointerUp: (e) => e.pointerType !== "mouse" && toggle(),
121
+ onKeyDown: (e) => {
122
+ if (e.key === " " || e.key === "Enter") {
123
+ e.preventDefault();
124
+ toggle();
125
+ }
126
+ },
127
+ className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-11 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-brand/50",
128
+ style: { containerType: "size" },
129
+ children: [
130
+ /* @__PURE__ */ jsx("style", { href: "asta-paymentreceived", precedence: "asta", children: `
131
+ @keyframes lab-pr-drop { from { transform: translateY(-120%) scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }
132
+ @keyframes lab-pr-in { from { opacity: 0; transform: translateY(-40%) } to { opacity: 1; transform: none } }
133
+ @keyframes lab-pr-draw { from { stroke-dashoffset: 1 } to { stroke-dashoffset: 0 } }
134
+ @keyframes lab-pr-fade { from { opacity: 0 } to { opacity: 1 } }
135
+ @keyframes lab-pr-dot { 0% { transform: scale(0) } 60% { transform: scale(1.4) } 100% { transform: scale(1) } }
136
+ @keyframes lab-pr-live { from { transform: scale(1); opacity: .6 } to { transform: scale(2.6); opacity: 0 } }
137
+ .lab-pr-drop { animation: lab-pr-drop .6s ${EASE} backwards }
138
+ .lab-pr-in { animation: lab-pr-in .55s ${EASE} backwards }
139
+ .lab-pr-draw { stroke-dasharray: 1; animation: lab-pr-draw .6s ${EASE} .15s both }
140
+ .lab-pr-fade { animation: lab-pr-fade .8s ${EASE} .2s both }
141
+ .lab-pr-dot { transform-box: fill-box; transform-origin: center; animation: lab-pr-dot .5s ${EASE} .55s both }
142
+ .lab-pr-live { animation: lab-pr-live 1.6s ${EASE} infinite }
143
+ @media (prefers-reduced-motion: reduce) { .lab-pr-drop, .lab-pr-in, .lab-pr-draw, .lab-pr-fade, .lab-pr-dot, .lab-pr-live { animation: none } }
144
+ ` }),
145
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[460px] flex-col gap-[max(10px,3.6cqh)]", style: { opacity: fade ? 0 : 1, transition: `opacity .45s ${EASE}` }, children: [
146
+ /* @__PURE__ */ jsxs("div", { className: "relative h-[clamp(42px,15cqh,50px)]", "aria-live": "polite", children: [
147
+ toasts.length === 0 && /* @__PURE__ */ jsx("div", { className: `flex h-full items-center justify-center rounded-[11px] text-[12px] text-mute ${RING}`, children: "Waiting for payments\u2026" }),
148
+ toasts.map((tx, d) => /* @__PURE__ */ jsx(
149
+ "div",
150
+ {
151
+ className: "absolute inset-0 origin-bottom",
152
+ style: {
153
+ zIndex: 3 - d,
154
+ opacity: d === 0 ? 1 : d === 1 ? 0.55 : 0,
155
+ transform: d === 0 ? "none" : `translateY(${d * 7}px) scale(${1 - d * 0.05})`,
156
+ transition: instant ? "none" : `transform .6s ${EASE}, opacity .6s ${EASE}`
157
+ },
158
+ children: /* @__PURE__ */ jsxs("div", { className: "lab-pr-drop flex h-full items-center gap-2.5 rounded-[11px] bg-paper px-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_10px_24px_-14px_rgb(0_0_0/0.7)]", children: [
159
+ /* @__PURE__ */ jsx("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-brand text-paper", children: /* @__PURE__ */ jsx(Incoming, { className: "h-3.5 w-3.5" }) }),
160
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 leading-tight", children: [
161
+ /* @__PURE__ */ jsx("span", { className: "block text-[12.5px] font-medium text-ink", children: "Payment received" }),
162
+ /* @__PURE__ */ jsxs("span", { className: "block truncate text-[11.5px] text-mute", children: [
163
+ "from ",
164
+ tx.name
165
+ ] })
166
+ ] }),
167
+ /* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[13px] font-medium tabular-nums text-brand", children: [
168
+ "+",
169
+ money(tx.amount)
170
+ ] })
171
+ ] })
172
+ },
173
+ tx.id
174
+ ))
175
+ ] }),
176
+ /* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-4", children: [
177
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
178
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 font-mono text-[10.5px] uppercase tracking-wider text-mute", children: [
179
+ "Available balance",
180
+ /* @__PURE__ */ jsxs("span", { className: "relative inline-flex h-1.5 w-1.5", children: [
181
+ !paused && /* @__PURE__ */ jsx("span", { className: "lab-pr-live absolute inset-0 rounded-full bg-brand" }),
182
+ /* @__PURE__ */ jsx("span", { className: `relative h-1.5 w-1.5 rounded-full transition-opacity duration-300 ${paused ? "bg-mute" : "bg-brand"}` })
183
+ ] }),
184
+ /* @__PURE__ */ jsx("span", { className: "normal-case tracking-normal", children: paused ? "Paused" : "Live" })
185
+ ] }),
186
+ /* @__PURE__ */ jsx("div", { className: "mt-1.5 font-medium tracking-[-0.035em] text-ink", style: { fontSize: "clamp(24px, 9.5cqmin, 38px)", lineHeight: 1 }, children: /* @__PURE__ */ jsx(Roll, { value: money(BASE + sum), instant }) })
187
+ ] }),
188
+ /* @__PURE__ */ jsxs("svg", { viewBox: `0 0 ${W} ${H}`, className: "w-[34%] max-w-[150px] shrink-0 overflow-hidden", fill: "none", "aria-hidden": true, children: [
189
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: "lab-pr-area", x1: "0", x2: "0", y1: "0", y2: "1", children: [
190
+ /* @__PURE__ */ jsx("stop", { offset: "0", stopColor: "var(--brand)", stopOpacity: "0.22" }),
191
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopColor: "var(--brand)", stopOpacity: "0" })
192
+ ] }) }),
193
+ /* @__PURE__ */ jsxs("g", { style: { transform: `translateX(${-shift}px)`, transition: instant ? "none" : `transform .8s ${EASE}` }, children: [
194
+ /* @__PURE__ */ jsx("path", { d: area, fill: "url(#lab-pr-area)", className: applied ? "lab-pr-fade" : "" }, `a${last}`),
195
+ /* @__PURE__ */ jsx("path", { d: line, stroke: "var(--brand)", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round" }),
196
+ /* @__PURE__ */ jsx("path", { d: tail, pathLength: 1, stroke: "var(--brand)", strokeWidth: "1.6", strokeLinecap: "round", className: applied ? "lab-pr-draw" : "" }, `t${last}`),
197
+ /* @__PURE__ */ jsx("circle", { cx: last * step, cy: y(pts[last]), r: "2.6", fill: "var(--brand)", className: applied ? "lab-pr-dot" : "" }, `d${last}`)
198
+ ] })
199
+ ] })
200
+ ] }),
201
+ /* @__PURE__ */ jsx("div", { "aria-label": "Recent payments", children: /* @__PURE__ */ jsx("div", { className: "relative", style: { height: `calc(${ROWS} * clamp(28px, 9.5cqh, 38px))` }, children: rows.map((tx, i) => /* @__PURE__ */ jsxs(
202
+ "div",
203
+ {
204
+ className: `absolute inset-x-0 top-0 flex h-[clamp(28px,9.5cqh,38px)] items-center gap-2.5 px-2`,
205
+ style: {
206
+ transform: `translateY(${i * 100}%)`,
207
+ opacity: i < ROWS ? 1 : 0,
208
+ transition: instant ? "none" : `transform .7s ${EASE}, opacity .5s ${EASE}`
209
+ },
210
+ children: [
211
+ /* @__PURE__ */ jsx(
212
+ "span",
213
+ {
214
+ "aria-hidden": true,
215
+ className: "absolute inset-0 rounded-[8px] bg-brand/12",
216
+ style: { opacity: hot && i === 0 && tx.id > 0 ? 1 : 0, transition: `opacity ${hot ? ".3s" : "1.2s"} ${EASE}` }
217
+ }
218
+ ),
219
+ /* @__PURE__ */ jsxs("span", { className: `relative flex w-full items-center gap-2.5 ${tx.id > 0 && i === 0 && !instant ? "lab-pr-in" : ""}`, children: [
220
+ /* @__PURE__ */ jsx("span", { className: `flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-paper text-[9.5px] font-semibold text-ink-2 ${RING}`, children: initials(tx.name) }),
221
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 truncate text-[12.5px] text-ink", children: [
222
+ tx.name,
223
+ " ",
224
+ /* @__PURE__ */ jsxs("span", { className: "text-mute", children: [
225
+ "\xB7 ",
226
+ tx.via
227
+ ] })
228
+ ] }),
229
+ /* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[12.5px] tabular-nums text-ink-2", children: [
230
+ "+",
231
+ money(tx.amount)
232
+ ] })
233
+ ] })
234
+ ]
235
+ },
236
+ tx.id
237
+ )) }) })
238
+ ] })
239
+ ]
240
+ }
241
+ );
242
+ }
243
+
244
+ export {
245
+ PaymentReceived
246
+ };
@@ -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
+ };
@@ -0,0 +1,172 @@
1
+ "use client";
2
+
3
+ // components/kit/drawer.tsx
4
+ import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
5
+ import { createPortal } from "react-dom";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var cx = (...c) => c.filter(Boolean).join(" ");
8
+ var EASE = "cubic-bezier(.16,1,.3,1)";
9
+ var FOCUSABLE = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';
10
+ var still = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
11
+ var offscreen = (side) => side === "right" ? "translateX(calc(100% + 16px))" : side === "left" ? "translateX(calc(-100% - 16px))" : "translateY(calc(100% + 16px))";
12
+ function Drawer({ open, onOpenChange, side = "right", title, description, children, footer, contained = false, draggable = true, className }) {
13
+ const [mounted, setMounted] = useState(open);
14
+ if (open && !mounted) setMounted(true);
15
+ const uid = useId();
16
+ const panel = useRef(null);
17
+ const overlay = useRef(null);
18
+ const opener = useRef(null);
19
+ const drag = useRef(null);
20
+ useLayoutEffect(() => {
21
+ const p = panel.current;
22
+ if (!open || !p) return;
23
+ if (!p.contains(document.activeElement)) opener.current = document.activeElement;
24
+ const first = p.querySelector("[data-autofocus]") ?? p.querySelector(`[data-body] ${FOCUSABLE}`) ?? p;
25
+ first.focus({ preventScroll: true });
26
+ for (const el of [p, overlay.current]) {
27
+ el?.getAnimations().forEach((a) => a.cancel());
28
+ el?.style.removeProperty(el === p ? "transform" : "opacity");
29
+ }
30
+ if (still()) return;
31
+ p.animate([{ transform: offscreen(side) }, { transform: "none" }], { duration: 560, easing: EASE });
32
+ overlay.current?.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 360, easing: EASE });
33
+ }, [open, side]);
34
+ useEffect(() => {
35
+ if (open || !mounted) return;
36
+ const p = panel.current;
37
+ if (!p) return;
38
+ const from = getComputedStyle(p).transform;
39
+ const ms = still() ? 0 : 340;
40
+ overlay.current?.animate([{ opacity: getComputedStyle(overlay.current).opacity }, { opacity: 0 }], { duration: ms, easing: EASE, fill: "forwards" });
41
+ const a = p.animate([{ transform: from === "none" ? "none" : from }, { transform: offscreen(side) }], { duration: ms, easing: EASE, fill: "forwards" });
42
+ a.onfinish = () => {
43
+ setMounted(false);
44
+ opener.current?.focus({ preventScroll: true });
45
+ opener.current = null;
46
+ };
47
+ return () => {
48
+ a.onfinish = null;
49
+ };
50
+ }, [open, mounted, side]);
51
+ useEffect(() => {
52
+ if (!mounted || contained) return;
53
+ const prev = document.body.style.overflow;
54
+ document.body.style.overflow = "hidden";
55
+ return () => {
56
+ document.body.style.overflow = prev;
57
+ };
58
+ }, [mounted, contained]);
59
+ const onKey = (e) => {
60
+ if (e.key === "Escape") {
61
+ e.stopPropagation();
62
+ onOpenChange(false);
63
+ return;
64
+ }
65
+ if (e.key !== "Tab" || !panel.current) return;
66
+ const items = [...panel.current.querySelectorAll(FOCUSABLE)].filter((el) => el.offsetParent !== null || el === document.activeElement);
67
+ if (!items.length) return e.preventDefault();
68
+ const first = items[0];
69
+ const last = items[items.length - 1];
70
+ if (e.shiftKey && (document.activeElement === first || document.activeElement === panel.current)) {
71
+ e.preventDefault();
72
+ last.focus();
73
+ } else if (!e.shiftKey && document.activeElement === last) {
74
+ e.preventDefault();
75
+ first.focus();
76
+ }
77
+ };
78
+ const canDrag = side === "bottom" && draggable;
79
+ const onDragStart = (e) => {
80
+ if (!canDrag || e.button !== 0 || !open) return;
81
+ e.currentTarget.setPointerCapture(e.pointerId);
82
+ drag.current = { y: e.clientY, t: e.timeStamp, dy: 0, v: 0 };
83
+ panel.current?.getAnimations().forEach((a) => a.cancel());
84
+ };
85
+ const onDragMove = (e) => {
86
+ const d = drag.current;
87
+ const p = panel.current;
88
+ if (!d || !p) return;
89
+ const raw = e.clientY - d.y;
90
+ const dy = raw < 0 ? -Math.sqrt(-raw) * 2 : raw;
91
+ d.v = (dy - d.dy) / Math.max(1, e.timeStamp - d.t);
92
+ d.t = e.timeStamp;
93
+ d.dy = dy;
94
+ p.style.transform = `translateY(${dy}px)`;
95
+ if (overlay.current) overlay.current.style.opacity = String(Math.max(0, 1 - Math.max(0, dy) / p.offsetHeight));
96
+ };
97
+ const onDragEnd = () => {
98
+ const d = drag.current;
99
+ const p = panel.current;
100
+ drag.current = null;
101
+ if (!d || !p) return;
102
+ if (d.dy > p.offsetHeight * 0.3 || d.v > 0.6) return onOpenChange(false);
103
+ const from = p.style.transform;
104
+ p.style.transform = "";
105
+ if (overlay.current) overlay.current.style.opacity = "";
106
+ if (!still()) p.animate([{ transform: from || "none" }, { transform: "none" }], { duration: 420, easing: EASE });
107
+ };
108
+ if (!mounted || typeof document === "undefined") return null;
109
+ const bottom = side === "bottom";
110
+ const layer = /* @__PURE__ */ jsxs("div", { className: cx(contained ? "absolute" : "fixed", "inset-0 z-50 overflow-hidden", contained && "rounded-[inherit]"), children: [
111
+ /* @__PURE__ */ jsx("div", { ref: overlay, "aria-hidden": true, onClick: () => onOpenChange(false), className: "absolute inset-0 bg-[color-mix(in_srgb,var(--ink)_28%,transparent)] will-change-[opacity]" }),
112
+ /* @__PURE__ */ jsxs(
113
+ "div",
114
+ {
115
+ ref: panel,
116
+ role: "dialog",
117
+ "aria-modal": "true",
118
+ "aria-labelledby": `${uid}-title`,
119
+ "aria-describedby": description ? `${uid}-desc` : void 0,
120
+ tabIndex: -1,
121
+ onKeyDown: onKey,
122
+ className: cx(
123
+ "absolute flex flex-col overflow-hidden rounded-[14px] bg-paper outline-none will-change-transform",
124
+ "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent),0_24px_64px_-24px_color-mix(in_srgb,var(--ink)_45%,transparent)]",
125
+ side === "right" && "inset-y-2 right-2 w-[min(400px,calc(100%-48px))]",
126
+ side === "left" && "inset-y-2 left-2 w-[min(400px,calc(100%-48px))]",
127
+ bottom && "inset-x-2 bottom-2 mx-auto max-h-[calc(100%-56px)] max-w-[520px]",
128
+ className
129
+ ),
130
+ children: [
131
+ bottom && /* @__PURE__ */ jsx(
132
+ "div",
133
+ {
134
+ onPointerDown: onDragStart,
135
+ onPointerMove: onDragMove,
136
+ onPointerUp: onDragEnd,
137
+ onPointerCancel: onDragEnd,
138
+ "aria-hidden": true,
139
+ className: cx("flex shrink-0 justify-center pb-1 pt-2.5 [touch-action:none]", canDrag && "cursor-grab active:cursor-grabbing"),
140
+ children: /* @__PURE__ */ jsx("span", { className: "h-1 w-9 rounded-full bg-[color-mix(in_srgb,var(--ink)_16%,transparent)]" })
141
+ }
142
+ ),
143
+ /* @__PURE__ */ jsxs("div", { className: cx("flex shrink-0 items-start justify-between gap-4 px-5", bottom ? "pt-2" : "pt-5"), children: [
144
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
145
+ /* @__PURE__ */ jsx("h2", { id: `${uid}-title`, className: "text-[16px] font-medium tracking-[-0.02em] text-ink", children: title }),
146
+ description && /* @__PURE__ */ jsx("p", { id: `${uid}-desc`, className: "mt-1 text-[13.5px] leading-relaxed text-mute", children: description })
147
+ ] }),
148
+ /* @__PURE__ */ jsx(
149
+ "button",
150
+ {
151
+ type: "button",
152
+ "aria-label": "Close",
153
+ onClick: () => onOpenChange(false),
154
+ className: "-mr-1.5 -mt-1 flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-mute outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50",
155
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) })
156
+ }
157
+ )
158
+ ] }),
159
+ /* @__PURE__ */ jsx("div", { "data-body": true, className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 pb-5 pt-4", children }),
160
+ footer && /* @__PURE__ */ jsx("div", { className: "flex shrink-0 flex-col-reverse gap-2 px-5 pb-5 sm:flex-row sm:justify-end", children: footer })
161
+ ]
162
+ }
163
+ )
164
+ ] });
165
+ return contained ? layer : createPortal(layer, document.body);
166
+ }
167
+ var drawer_default = Drawer;
168
+
169
+ export {
170
+ Drawer,
171
+ drawer_default
172
+ };