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.
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,234 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/ShipmentTracker.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 STOPS = [
9
+ { label: "Ordered", time: "09:12", eta: 4380 },
10
+ { label: "Packed", time: "16:40", eta: 3300 },
11
+ { label: "Shipped", time: "07:05", eta: 1980 },
12
+ { label: "Out for delivery", time: "08:30", eta: 185 },
13
+ { label: "Delivered", time: "11:36", eta: 0 }
14
+ ];
15
+ var LAST = STOPS.length - 1;
16
+ var START = { stage: 0, stamp: 0, born: STOPS.map((_, i) => i === 0 ? 0 : -1) };
17
+ function to(s, stage) {
18
+ if (s.stage === stage) return s;
19
+ const stamp = s.stamp + 1;
20
+ return { stage, stamp, born: s.born.map((b, i) => i <= stage ? i > s.stage ? stamp : b : -1) };
21
+ }
22
+ function useTween(target, ms, instant) {
23
+ const [v, setV] = useState(target);
24
+ const cur = useRef(target);
25
+ useEffect(() => {
26
+ const from = cur.current;
27
+ const still = instant || window.matchMedia("(prefers-reduced-motion: reduce)").matches;
28
+ const t0 = performance.now();
29
+ let id = 0;
30
+ const step = (t) => {
31
+ const k = still ? 1 : Math.min(1, (t - t0) / ms);
32
+ const e = 1 - Math.pow(1 - k, 4);
33
+ cur.current = from + (target - from) * e;
34
+ setV(cur.current);
35
+ if (k < 1) id = requestAnimationFrame(step);
36
+ };
37
+ id = requestAnimationFrame(step);
38
+ return () => cancelAnimationFrame(id);
39
+ }, [target, ms, instant]);
40
+ return v;
41
+ }
42
+ var fmt = (min) => {
43
+ const m = Math.max(0, Math.round(min));
44
+ const d = Math.floor(m / 1440);
45
+ const h = Math.floor(m % 1440 / 60);
46
+ return d > 0 ? `${d}d ${String(h).padStart(2, "0")}h` : `${h}h ${String(m % 60).padStart(2, "0")}m`;
47
+ };
48
+ var Typed = ({ text, delay }) => /* @__PURE__ */ jsx("span", { "aria-label": text, children: text.split("").map((c, i) => /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "lab-st-type", style: { animationDelay: `${delay + i * 32}ms` }, children: c === " " ? "\xA0" : c }, i)) });
49
+ function ShipmentTracker() {
50
+ const [s, setS] = useState(START);
51
+ const [fade, setFade] = useState(false);
52
+ const [instant, setInstant] = useState(false);
53
+ const [paused, setPaused] = useState(false);
54
+ const idle = useRef(null);
55
+ const stops = useRef([]);
56
+ const takeOver = () => {
57
+ setPaused(true);
58
+ setFade(false);
59
+ setInstant(false);
60
+ if (idle.current) clearTimeout(idle.current);
61
+ idle.current = setTimeout(() => setPaused(false), 8e3);
62
+ };
63
+ useEffect(() => () => void (idle.current && clearTimeout(idle.current)), []);
64
+ useEffect(() => {
65
+ if (paused || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
66
+ const t = [];
67
+ let alive = true;
68
+ const later = (ms, f) => t.push(setTimeout(() => alive && f(), ms));
69
+ const run = () => {
70
+ for (let i = 1; i <= LAST; i++) later(i * 2200, () => setS((v) => to(v, i)));
71
+ const end = LAST * 2200 + 2800;
72
+ later(end, () => setFade(true));
73
+ later(end + 450, () => {
74
+ setInstant(true);
75
+ setS(START);
76
+ });
77
+ later(end + 520, () => setInstant(false));
78
+ later(end + 560, () => setFade(false));
79
+ later(end + 1100, run);
80
+ };
81
+ later(0, () => setS((v) => v.stage === LAST ? START : v));
82
+ run();
83
+ return () => {
84
+ alive = false;
85
+ t.forEach(clearTimeout);
86
+ };
87
+ }, [paused]);
88
+ const go = (i) => {
89
+ takeOver();
90
+ setS((v) => to(v, i));
91
+ };
92
+ const onKey = (e) => {
93
+ const d = e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : e.key === "ArrowLeft" || e.key === "ArrowUp" ? -1 : 0;
94
+ if (!d) return;
95
+ e.preventDefault();
96
+ const n = Math.min(LAST, Math.max(0, s.stage + d));
97
+ go(n);
98
+ stops.current[n]?.focus();
99
+ };
100
+ const pct = s.stage / LAST;
101
+ const done = s.stage === LAST;
102
+ const eta = useTween(STOPS[s.stage].eta, 1100, instant);
103
+ const move = (ms) => instant ? "none" : `transform ${ms}ms ${EASE}`;
104
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-11", style: { containerType: "size" }, children: [
105
+ /* @__PURE__ */ jsx("style", { href: "asta-shipmenttracker", precedence: "asta", children: `
106
+ @keyframes lab-st-type { from { opacity: 0 } to { opacity: 1 } }
107
+ @keyframes lab-st-swap { from { opacity: 0; transform: translateY(35%) } to { opacity: 1; transform: none } }
108
+ @keyframes lab-st-draw { from { stroke-dashoffset: 1 } to { stroke-dashoffset: 0 } }
109
+ @keyframes lab-st-pulse { from { transform: scale(1); opacity: .5 } to { transform: scale(2.1); opacity: 0 } }
110
+ .lab-st-type { display: inline-block; animation: lab-st-type .12s linear both }
111
+ .lab-st-swap { animation: lab-st-swap .5s ${EASE} both }
112
+ .lab-st-draw { stroke-dasharray: 1; animation: lab-st-draw .5s ${EASE} .75s both }
113
+ .lab-st-pulse { animation: lab-st-pulse 1.2s ${EASE} .7s both }
114
+ @media (prefers-reduced-motion: reduce) { .lab-st-type, .lab-st-swap, .lab-st-draw, .lab-st-pulse { animation: none } }
115
+ ` }),
116
+ /* @__PURE__ */ jsxs(
117
+ "div",
118
+ {
119
+ className: "flex w-full max-w-[520px] flex-col gap-[max(12px,5cqh)]",
120
+ style: { opacity: fade ? 0 : 1, transition: `opacity .45s ${EASE}` },
121
+ children: [
122
+ /* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-4", children: [
123
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
124
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-[10.5px] uppercase tracking-wider text-mute", children: "Order \xB7 NW-48213" }),
125
+ /* @__PURE__ */ jsx("div", { className: "relative mt-1.5 h-[1.25em] overflow-hidden text-[clamp(17px,5.6cqmin,24px)] font-medium tracking-[-0.025em] text-ink", "aria-live": "polite", children: /* @__PURE__ */ jsx("span", { className: "lab-st-swap block truncate", children: STOPS[s.stage].label }, s.stage) })
126
+ ] }),
127
+ /* @__PURE__ */ jsxs("div", { className: "shrink-0 text-right", children: [
128
+ /* @__PURE__ */ jsx("div", { className: "font-mono text-[10.5px] uppercase tracking-wider text-mute", children: done ? "Signed by" : "Arrives in" }),
129
+ /* @__PURE__ */ jsxs("div", { className: "relative mt-1.5 h-[1.25em] text-[clamp(15px,4.6cqmin,19px)] font-medium tabular-nums tracking-[-0.02em] text-ink", children: [
130
+ /* @__PURE__ */ jsx("span", { className: "absolute right-0 top-0 whitespace-nowrap transition-opacity duration-300", style: { opacity: done ? 0 : 1 }, children: fmt(eta) }),
131
+ /* @__PURE__ */ jsx("span", { className: "absolute right-0 top-0 whitespace-nowrap transition-opacity duration-500", style: { opacity: done ? 1 : 0 }, children: "Front desk" })
132
+ ] })
133
+ ] })
134
+ ] }),
135
+ /* @__PURE__ */ jsxs("div", { className: "px-[9%] pt-[36px]", children: [
136
+ /* @__PURE__ */ jsxs("div", { role: "group", "aria-label": "Delivery progress", onKeyDown: onKey, className: "relative h-[3px]", children: [
137
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-[2px] bg-ink/10" }),
138
+ /* @__PURE__ */ jsx(
139
+ "div",
140
+ {
141
+ className: "absolute inset-0 origin-left rounded-[2px] bg-brand",
142
+ style: { transform: `scaleX(${pct})`, transition: move(1100) }
143
+ }
144
+ ),
145
+ STOPS.map((st, i) => {
146
+ const reached = i <= s.stage;
147
+ return /* @__PURE__ */ jsx(
148
+ "button",
149
+ {
150
+ ref: (el) => {
151
+ stops.current[i] = el;
152
+ },
153
+ type: "button",
154
+ onClick: () => go(i),
155
+ tabIndex: i === s.stage ? 0 : -1,
156
+ "aria-current": i === s.stage ? "step" : void 0,
157
+ "aria-label": `${st.label}${reached ? `, ${st.time}` : ""}`,
158
+ className: "group absolute top-1/2 -ml-3 -mt-3 flex h-6 w-6 items-center justify-center rounded-full outline-none focus-visible:ring-2 focus-visible:ring-brand/60",
159
+ style: { left: `${i / LAST * 100}%` },
160
+ children: /* @__PURE__ */ jsx("span", { className: `relative h-2.5 w-2.5 rounded-full bg-paper-2 ${RING} transition-transform duration-300 group-hover:scale-125`, children: /* @__PURE__ */ jsx(
161
+ "span",
162
+ {
163
+ className: "absolute inset-0 rounded-full bg-brand",
164
+ style: {
165
+ opacity: reached ? 1 : 0,
166
+ transform: reached ? "none" : "scale(.2)",
167
+ transition: instant ? "none" : `opacity .4s ${EASE} ${reached ? ".6s" : "0s"}, transform .5s ${EASE} ${reached ? ".6s" : "0s"}`
168
+ }
169
+ }
170
+ ) })
171
+ },
172
+ st.label
173
+ );
174
+ }),
175
+ /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-x-0 top-0", style: { transform: `translateX(${pct * 100}%)`, transition: move(1100) }, children: /* @__PURE__ */ jsxs("div", { className: "absolute bottom-[8px] left-0 h-[27px] w-[27px] -translate-x-1/2", children: [
176
+ done && /* @__PURE__ */ jsx("span", { className: "lab-st-pulse absolute inset-0 rounded-full", style: { boxShadow: "0 0 0 2px var(--brand)" } }, `p${s.stamp}`),
177
+ /* @__PURE__ */ jsxs("span", { className: "absolute inset-0 flex items-center justify-center rounded-full bg-brand text-paper shadow-[0_6px_14px_-6px_rgb(0_0_0/0.6)]", children: [
178
+ /* @__PURE__ */ jsxs(
179
+ "svg",
180
+ {
181
+ viewBox: "0 0 24 24",
182
+ className: "absolute h-[15px] w-[15px] transition-[opacity,transform] duration-500",
183
+ style: { opacity: done ? 0 : 1, transform: done ? "scale(.5)" : "none", transitionDelay: done ? ".55s" : "0s" },
184
+ fill: "none",
185
+ stroke: "currentColor",
186
+ strokeWidth: "1.7",
187
+ strokeLinecap: "round",
188
+ strokeLinejoin: "round",
189
+ "aria-hidden": true,
190
+ children: [
191
+ /* @__PURE__ */ jsx("path", { d: "M2.5 6.5h11v9h-11ZM13.5 9.5h4l3 3v3h-7" }),
192
+ /* @__PURE__ */ jsx("circle", { cx: "6.5", cy: "17.5", r: "1.6" }),
193
+ /* @__PURE__ */ jsx("circle", { cx: "16.5", cy: "17.5", r: "1.6" })
194
+ ]
195
+ }
196
+ ),
197
+ done && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "absolute h-[14px] w-[14px]", fill: "none", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { className: "lab-st-draw", pathLength: 1, d: "M5 12.5l4.5 4.5L19 7.5", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round" }) }, `c${s.stamp}`)
198
+ ] }),
199
+ /* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-full h-[6px] w-px -translate-x-1/2 bg-brand" })
200
+ ] }) })
201
+ ] }),
202
+ /* @__PURE__ */ jsx("div", { className: "relative mt-3 h-[3.4em] text-[clamp(10.5px,3.1cqmin,12.5px)] leading-tight", children: STOPS.map((st, i) => {
203
+ const reached = i <= s.stage;
204
+ return /* @__PURE__ */ jsxs(
205
+ "div",
206
+ {
207
+ className: "absolute top-0 w-[26%] -translate-x-1/2 text-center",
208
+ style: { left: `${i / LAST * 100}%` },
209
+ children: [
210
+ /* @__PURE__ */ jsx("div", { className: `transition-colors duration-500 ${reached ? "text-ink" : "text-mute"}`, children: st.label }),
211
+ /* @__PURE__ */ jsx("div", { className: "mt-0.5 font-mono text-[0.88em] tabular-nums text-mute transition-opacity duration-300", style: { opacity: reached ? 1 : 0 }, children: /* @__PURE__ */ jsx(Typed, { text: st.time, delay: i === 0 && s.born[i] === 0 ? 200 : 650 }, s.born[i]) })
212
+ ]
213
+ },
214
+ st.label
215
+ );
216
+ }) })
217
+ ] }),
218
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
219
+ /* @__PURE__ */ jsx("span", { className: `flex h-[clamp(34px,11cqmin,42px)] w-[clamp(34px,11cqmin,42px)] shrink-0 items-center justify-center rounded-[9px] bg-paper text-ink-2 ${RING}`, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-[48%] w-[48%]", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M12 3 4 7v10l8 4 8-4V7ZM4 7l8 4 8-4M12 11v10M8 5l8 4" }) }) }),
220
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
221
+ /* @__PURE__ */ jsx("div", { className: "truncate text-[13px] font-medium text-ink", children: "Pour-over set \xB7 2 items" }),
222
+ /* @__PURE__ */ jsx("div", { className: "truncate text-[12px] text-mute", children: "Parcelnorth \xB7 14 Harbor St" })
223
+ ] }),
224
+ /* @__PURE__ */ jsx("span", { className: "hidden shrink-0 font-mono text-[10.5px] uppercase tracking-wider text-mute @min-[380px]:inline", children: "Click a stop" })
225
+ ] })
226
+ ]
227
+ }
228
+ )
229
+ ] });
230
+ }
231
+
232
+ export {
233
+ ShipmentTracker
234
+ };
@@ -0,0 +1,290 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/TokenSwap.tsx
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { Fragment, 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 ROW = 78;
10
+ var GAP = 6;
11
+ var REFRESH = 10;
12
+ var TICKS = 10;
13
+ var TOKENS = [
14
+ { sym: "ASTA", bal: "1,240.00" },
15
+ { sym: "USDX", bal: "860.50" }
16
+ ];
17
+ var DRIFT = [21e-4, -12e-4, 34e-4, -18e-4, 9e-4, -26e-4];
18
+ var BASE = 2.4318;
19
+ var fmt = (n) => n.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
20
+ function Roll({ value }) {
21
+ const chars = value.split("");
22
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-start leading-[1.15em] tabular-nums", "aria-label": value, children: chars.map((c, i) => {
23
+ const key = chars.length - i;
24
+ if (!/\d/.test(c))
25
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-[1.15em]", children: c }, `s${key}`);
26
+ return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative inline-block h-[1.15em] overflow-hidden leading-[1.15em]", children: [
27
+ /* @__PURE__ */ jsx("span", { className: "invisible", children: "0" }),
28
+ /* @__PURE__ */ jsx(
29
+ "span",
30
+ {
31
+ className: "absolute left-0 top-0 flex flex-col motion-reduce:transition-none",
32
+ style: { transform: `translateY(-${Number(c) * 1.15}em)`, transition: `transform .7s ${EASE} ${key * 18}ms` },
33
+ children: DIGITS.map((d) => /* @__PURE__ */ jsx("span", { className: "block h-[1.15em]", children: d }, d))
34
+ }
35
+ )
36
+ ] }, `d${key}`);
37
+ }) });
38
+ }
39
+ var Mark = ({ sym }) => /* @__PURE__ */ jsxs("span", { className: `inline-flex h-8 shrink-0 items-center gap-1.5 rounded-[8px] bg-paper pl-1.5 pr-2.5 text-[13px] font-medium text-ink ${RING}`, children: [
40
+ /* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 items-center justify-center rounded-full bg-ink text-[9.5px] font-semibold text-paper", children: sym[0] }),
41
+ sym
42
+ ] });
43
+ function TokenSwap() {
44
+ const [amt, setAmt] = useState("");
45
+ const [from, setFrom] = useState(0);
46
+ const [flips, setFlips] = useState(0);
47
+ const [rate, setRate] = useState(BASE);
48
+ const [delta, setDelta] = useState(0);
49
+ const [secs, setSecs] = useState(REFRESH);
50
+ const [status, setStatus] = useState("idle");
51
+ const [paused, setPaused] = useState(false);
52
+ const idle = useRef(null);
53
+ const timers = useRef(/* @__PURE__ */ new Set());
54
+ const view = useRef({ amt, from, rate });
55
+ useEffect(() => {
56
+ view.current = { amt, from, rate };
57
+ }, [amt, from, rate]);
58
+ const still = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
59
+ const takeOver = () => {
60
+ setPaused(true);
61
+ if (idle.current) clearTimeout(idle.current);
62
+ idle.current = setTimeout(() => setPaused(false), 8e3);
63
+ };
64
+ useEffect(
65
+ () => () => {
66
+ if (idle.current) clearTimeout(idle.current);
67
+ timers.current.forEach(clearTimeout);
68
+ },
69
+ []
70
+ );
71
+ const quoteOf = (a, f, r) => {
72
+ const n = Number(a) || 0;
73
+ return f === 0 ? n * r : n / r;
74
+ };
75
+ const flip = () => {
76
+ const v = view.current;
77
+ const out2 = quoteOf(v.amt, v.from, v.rate);
78
+ setFlips((x) => x + 1);
79
+ setFrom((x) => 1 - x);
80
+ setAmt(v.amt ? String(Math.round(out2 * 100) / 100) : "");
81
+ };
82
+ const swap = () => {
83
+ setStatus("pending");
84
+ const fast = still();
85
+ const later = (ms, f) => {
86
+ const id = setTimeout(() => {
87
+ timers.current.delete(id);
88
+ f();
89
+ }, ms);
90
+ timers.current.add(id);
91
+ };
92
+ later(fast ? 0 : 1200, () => setStatus("done"));
93
+ later(fast ? 1600 : 2900, () => setStatus("idle"));
94
+ };
95
+ useEffect(() => {
96
+ if (still()) return;
97
+ let n = 0;
98
+ let left = REFRESH;
99
+ const id = setInterval(() => {
100
+ left = left > 1 ? left - 1 : REFRESH;
101
+ setSecs(left);
102
+ if (left !== REFRESH) return;
103
+ const d = DRIFT[n++ % DRIFT.length];
104
+ setDelta(d);
105
+ setRate((r) => Math.round(r * (1 + d) * 1e4) / 1e4);
106
+ }, 1e3);
107
+ return () => clearInterval(id);
108
+ }, []);
109
+ useEffect(() => {
110
+ if (paused || still()) return;
111
+ const t = /* @__PURE__ */ new Set();
112
+ let at = 0;
113
+ const later = (ms, f) => {
114
+ const id = setTimeout(() => {
115
+ t.delete(id);
116
+ f();
117
+ }, at += ms);
118
+ t.add(id);
119
+ };
120
+ const run = () => {
121
+ at = 0;
122
+ ["1", "12", "125"].forEach((v, i) => later(i ? 220 : 700, () => setAmt(v)));
123
+ later(1300, swap);
124
+ later(3300, flip);
125
+ later(1900, flip);
126
+ later(1600, () => setAmt("12"));
127
+ later(200, () => setAmt("1"));
128
+ later(200, () => setAmt(""));
129
+ later(900, run);
130
+ };
131
+ run();
132
+ return () => t.forEach(clearTimeout);
133
+ }, [paused]);
134
+ const out = quoteOf(amt, from, rate);
135
+ const has = Number(amt) > 0;
136
+ const busy = status !== "idle";
137
+ const pay = TOKENS[from];
138
+ const get = TOKENS[1 - from];
139
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-11", style: { containerType: "size" }, children: [
140
+ /* @__PURE__ */ jsx("style", { href: "asta-tokenswap", precedence: "asta", children: `
141
+ @container (max-height: 330px) { .lab-sw-rate { display: none } }
142
+ @keyframes lab-sw-spin { to { transform: rotate(360deg) } }
143
+ @keyframes lab-sw-draw { from { stroke-dashoffset: 1 } to { stroke-dashoffset: 0 } }
144
+ @keyframes lab-sw-in { from { transform: translateY(5px); opacity: 0 } to { transform: none; opacity: 1 } }
145
+ .lab-sw-spin { animation: lab-sw-spin .8s linear infinite }
146
+ .lab-sw-draw { stroke-dasharray: 1; animation: lab-sw-draw .45s ${EASE} .05s both }
147
+ .lab-sw-in { animation: lab-sw-in .4s ${EASE} both }
148
+ @media (prefers-reduced-motion: reduce) { .lab-sw-spin, .lab-sw-draw, .lab-sw-in { animation: none } }
149
+ ` }),
150
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[380px] flex-col gap-[max(10px,3.5cqh)]", children: [
151
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
152
+ /* @__PURE__ */ jsx("span", { className: "text-[clamp(15px,4.6cqmin,18px)] font-medium tracking-[-0.02em] text-ink", children: "Swap" }),
153
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-[11.5px] tabular-nums text-mute", role: "timer", "aria-label": `Quote refreshes in ${secs} seconds`, children: [
154
+ /* @__PURE__ */ jsxs("span", { "aria-hidden": true, children: [
155
+ secs,
156
+ "s"
157
+ ] }),
158
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", className: "h-[18px] w-[18px] text-ink-2", "aria-hidden": true, children: Array.from({ length: TICKS }, (_, i) => /* @__PURE__ */ jsx(
159
+ "rect",
160
+ {
161
+ x: "9.25",
162
+ y: "1.5",
163
+ width: "1.5",
164
+ height: "4",
165
+ rx: ".75",
166
+ fill: "currentColor",
167
+ transform: `rotate(${i * (360 / TICKS)} 10 10)`,
168
+ style: { opacity: i < secs / REFRESH * TICKS ? 1 : 0.18, transition: `opacity .5s ${EASE}` }
169
+ },
170
+ i
171
+ )) })
172
+ ] })
173
+ ] }),
174
+ /* @__PURE__ */ jsxs("div", { className: "relative", style: { height: ROW * 2 + GAP }, children: [
175
+ TOKENS.map((tk, t) => {
176
+ const isPay = t === from;
177
+ return /* @__PURE__ */ jsxs(
178
+ "div",
179
+ {
180
+ className: "absolute inset-x-0 top-0 flex flex-col justify-center gap-1.5 rounded-[12px] bg-paper-2 px-3.5 motion-reduce:transition-none",
181
+ style: { height: ROW, transform: `translateY(${isPay ? 0 : ROW + GAP}px)`, transition: `transform .6s ${EASE}` },
182
+ children: [
183
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center justify-between text-[11.5px] text-mute", children: [
184
+ /* @__PURE__ */ jsx("span", { children: isPay ? "You pay" : "You receive" }),
185
+ /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
186
+ "Balance ",
187
+ tk.bal
188
+ ] })
189
+ ] }),
190
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center justify-between gap-3", children: [
191
+ isPay ? /* @__PURE__ */ jsx(
192
+ "input",
193
+ {
194
+ inputMode: "decimal",
195
+ "aria-label": `Amount of ${tk.sym} to pay`,
196
+ placeholder: "0",
197
+ value: amt,
198
+ onChange: (e) => {
199
+ const v = e.target.value.replace(/,/g, "");
200
+ if (!/^\d{0,7}(\.\d{0,2})?$/.test(v)) return;
201
+ takeOver();
202
+ setAmt(v);
203
+ },
204
+ className: "w-full min-w-0 bg-transparent text-[24px] font-medium tracking-[-0.03em] text-ink outline-none placeholder:text-mute"
205
+ }
206
+ ) : /* @__PURE__ */ jsx("span", { className: `min-w-0 truncate text-[24px] font-medium tracking-[-0.03em] ${has ? "text-ink" : "text-mute"}`, "aria-live": "polite", children: /* @__PURE__ */ jsx(Roll, { value: fmt(out) }) }),
207
+ /* @__PURE__ */ jsx(Mark, { sym: tk.sym })
208
+ ] })
209
+ ]
210
+ },
211
+ tk.sym
212
+ );
213
+ }),
214
+ /* @__PURE__ */ jsx(
215
+ "button",
216
+ {
217
+ type: "button",
218
+ "aria-label": `Flip, pay with ${get.sym}`,
219
+ onClick: () => {
220
+ takeOver();
221
+ flip();
222
+ },
223
+ className: `absolute left-1/2 z-10 -ml-4 flex h-8 w-8 items-center justify-center rounded-[9px] bg-paper text-ink-2 outline-none transition-transform duration-200 active:scale-90 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/60 ${RING}`,
224
+ style: { top: ROW + GAP / 2 - 16 },
225
+ children: /* @__PURE__ */ jsx(
226
+ "svg",
227
+ {
228
+ viewBox: "0 0 16 16",
229
+ className: "h-3.5 w-3.5 motion-reduce:transition-none",
230
+ fill: "none",
231
+ stroke: "currentColor",
232
+ strokeWidth: "1.6",
233
+ strokeLinecap: "round",
234
+ strokeLinejoin: "round",
235
+ "aria-hidden": true,
236
+ style: { transform: `rotate(${flips * 180}deg)`, transition: `transform .6s ${EASE}` },
237
+ children: /* @__PURE__ */ jsx("path", { d: "M8 2.5v11M4 9.5l4 4 4-4" })
238
+ }
239
+ )
240
+ }
241
+ )
242
+ ] }),
243
+ /* @__PURE__ */ jsxs("div", { className: "lab-sw-rate flex items-center justify-between text-[12px] text-mute", children: [
244
+ /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
245
+ "1 ASTA = ",
246
+ /* @__PURE__ */ jsx(Roll, { value: rate.toFixed(4) }),
247
+ " USDX"
248
+ ] }),
249
+ delta !== 0 && /* @__PURE__ */ jsxs("span", { className: `lab-sw-in tabular-nums ${delta > 0 ? "text-brand" : "text-mute"}`, children: [
250
+ delta > 0 ? "\u25B2" : "\u25BC",
251
+ " ",
252
+ Math.abs(delta * 100).toFixed(2),
253
+ "%"
254
+ ] }, rate)
255
+ ] }),
256
+ /* @__PURE__ */ jsxs(
257
+ "button",
258
+ {
259
+ type: "button",
260
+ disabled: !has || busy,
261
+ onClick: () => {
262
+ takeOver();
263
+ swap();
264
+ },
265
+ "aria-live": "polite",
266
+ className: "relative h-10 overflow-hidden rounded-[8px] bg-ink text-[13px] font-medium text-paper outline-none transition-opacity duration-300 focus-visible:ring-2 focus-visible:ring-brand/60 disabled:cursor-default",
267
+ style: { opacity: has || busy ? 1 : 0.35 },
268
+ children: [
269
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-0 bg-brand transition-opacity duration-500", style: { opacity: status === "done" ? 1 : 0, transitionTimingFunction: EASE } }),
270
+ /* @__PURE__ */ jsxs("span", { className: "lab-sw-in relative flex items-center justify-center gap-2", children: [
271
+ status === "pending" && /* @__PURE__ */ jsxs(Fragment, { children: [
272
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "lab-sw-spin h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M8 2a6 6 0 0 1 6 6" }) }),
273
+ "Confirming"
274
+ ] }),
275
+ status === "done" && /* @__PURE__ */ jsxs(Fragment, { children: [
276
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { className: "lab-sw-draw", pathLength: 1, d: "M3.5 8.5l3 3 6-7" }) }),
277
+ "Swapped"
278
+ ] }),
279
+ status === "idle" && (has ? `Swap ${pay.sym} for ${get.sym}` : "Enter an amount")
280
+ ] }, status)
281
+ ]
282
+ }
283
+ )
284
+ ] })
285
+ ] });
286
+ }
287
+
288
+ export {
289
+ TokenSwap
290
+ };
@@ -0,0 +1,109 @@
1
+ "use client";
2
+ import {
3
+ avatarFill,
4
+ initials
5
+ } from "./chunk-HNO6EUGJ.js";
6
+
7
+ // components/kit/avatar-group.tsx
8
+ import { useRef, useState } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var cx = (...c) => c.filter(Boolean).join(" ");
11
+ var SIZES = {
12
+ sm: { box: 28, text: "text-[11px]", overlap: -8 },
13
+ md: { box: 36, text: "text-[13px]", overlap: -10 },
14
+ lg: { box: 44, text: "text-[15px]", overlap: -12 }
15
+ };
16
+ function Face({ person, text }) {
17
+ const [broken, setBroken] = useState(null);
18
+ const showImg = person.src && broken !== person.src;
19
+ return /* @__PURE__ */ jsx("span", { className: cx("flex h-full w-full select-none items-center justify-center overflow-hidden rounded-full font-medium tracking-[-0.02em]", !showImg && avatarFill(person.name), text), children: showImg ? /* @__PURE__ */ jsx("img", { src: person.src, alt: "", draggable: false, onError: () => setBroken(person.src), className: "h-full w-full object-cover" }) : initials(person.name) });
20
+ }
21
+ function Tip({ children }) {
22
+ return /* @__PURE__ */ jsx(
23
+ "span",
24
+ {
25
+ "aria-hidden": true,
26
+ className: "pointer-events-none absolute bottom-full left-1/2 z-20 mb-2 max-w-[220px] -translate-x-1/2 translate-y-1 truncate whitespace-nowrap rounded-[6px] bg-ink px-2 py-1 text-[12px] font-medium leading-none text-paper opacity-0 transition-[opacity,translate] duration-200 ease-[cubic-bezier(.16,1,.3,1)] group-hover/face:translate-y-0 group-hover/face:opacity-100 group-focus-visible/face:translate-y-0 group-focus-visible/face:opacity-100 motion-reduce:transition-none",
27
+ children
28
+ }
29
+ );
30
+ }
31
+ function AvatarStack({ people, max = 4, size = "md", onOverflowClick, label, className }) {
32
+ const s = SIZES[size];
33
+ const cap = Math.max(1, max);
34
+ const shown = people.length - cap === 1 ? people : people.slice(0, cap);
35
+ const rest = people.slice(shown.length);
36
+ const items = shown.length + (rest.length ? 1 : 0);
37
+ const restNames = rest.map((p) => p.name);
38
+ const restText = restNames.length > 3 ? `${restNames.slice(0, 3).join(", ")} and ${restNames.length - 3} more` : restNames.join(", ");
39
+ const root = useRef(null);
40
+ const [focusIdx, setFocusIdx] = useState(0);
41
+ const stop = Math.min(focusIdx, items - 1);
42
+ const onKey = (e) => {
43
+ let i = stop;
44
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") i = Math.min(items - 1, stop + 1);
45
+ else if (e.key === "ArrowLeft" || e.key === "ArrowUp") i = Math.max(0, stop - 1);
46
+ else if (e.key === "Home") i = 0;
47
+ else if (e.key === "End") i = items - 1;
48
+ else return;
49
+ e.preventDefault();
50
+ setFocusIdx(i);
51
+ root.current?.querySelectorAll("[data-face]")[i]?.focus();
52
+ };
53
+ const face = "group/face relative block rounded-full outline-none shadow-[0_0_0_2px_var(--paper)] focus-visible:shadow-[0_0_0_2px_var(--paper),0_0_0_4px_var(--brand)]";
54
+ const li = (i) => cx(
55
+ "relative transition-[translate] duration-500 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none",
56
+ "group-hover/stack:translate-x-[calc(var(--i)*5px)] group-focus-within/stack:translate-x-[calc(var(--i)*5px)]",
57
+ "hover:z-10 focus-within:z-10 [&:hover>*]:-translate-y-1 [&:focus-within>*]:-translate-y-1",
58
+ i > 0 && "-ml-[var(--o)]"
59
+ );
60
+ const vars = (i) => ({ "--i": i, "--o": `${-s.overlap}px` });
61
+ const Overflow = onOverflowClick ? "button" : "span";
62
+ if (!people.length) return null;
63
+ return /* @__PURE__ */ jsxs("ul", { ref: root, "aria-label": label ?? `${people.length} ${people.length === 1 ? "person" : "people"}`, onKeyDown: onKey, className: cx("group/stack flex items-center", className), children: [
64
+ shown.map((p, i) => /* @__PURE__ */ jsx("li", { className: li(i), style: vars(i), children: /* @__PURE__ */ jsxs(
65
+ "span",
66
+ {
67
+ "data-face": true,
68
+ role: "img",
69
+ "aria-label": p.name,
70
+ tabIndex: i === stop ? 0 : -1,
71
+ onFocus: () => setFocusIdx(i),
72
+ className: cx(face, "transition-[translate] duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none"),
73
+ style: { width: s.box, height: s.box },
74
+ children: [
75
+ /* @__PURE__ */ jsx(Face, { person: p, text: s.text }),
76
+ /* @__PURE__ */ jsx(Tip, { children: p.name })
77
+ ]
78
+ }
79
+ ) }, `${p.name}-${i}`)),
80
+ rest.length > 0 && /* @__PURE__ */ jsx("li", { className: li(shown.length), style: vars(shown.length), children: /* @__PURE__ */ jsxs(
81
+ Overflow,
82
+ {
83
+ ...onOverflowClick ? { type: "button", onClick: onOverflowClick } : { role: "img" },
84
+ "data-face": true,
85
+ "aria-label": `${rest.length} more: ${restText}`,
86
+ tabIndex: shown.length === stop ? 0 : -1,
87
+ onFocus: () => setFocusIdx(shown.length),
88
+ className: cx(
89
+ face,
90
+ "flex items-center justify-center bg-paper-2 font-medium tabular-nums text-ink-2 duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none",
91
+ onOverflowClick ? "transition-[translate,color] hover:text-ink" : "transition-[translate]",
92
+ s.text
93
+ ),
94
+ style: { width: s.box, height: s.box },
95
+ children: [
96
+ "+",
97
+ rest.length,
98
+ /* @__PURE__ */ jsx(Tip, { children: restText })
99
+ ]
100
+ }
101
+ ) })
102
+ ] });
103
+ }
104
+ var avatar_group_default = AvatarStack;
105
+
106
+ export {
107
+ AvatarStack,
108
+ avatar_group_default
109
+ };
@@ -20,14 +20,14 @@ var FILLS = [
20
20
  "bg-[color-mix(in_srgb,var(--ink)_70%,var(--paper))] text-paper"
21
21
  ];
22
22
  var initials = (name) => name.split(/\s+/).filter(Boolean).slice(0, 2).map((p) => p[0].toUpperCase()).join("");
23
- var fillFor = (name) => FILLS[[...name].reduce((n, c) => n + c.charCodeAt(0), 0) % FILLS.length];
23
+ var avatarFill = (name) => FILLS[[...name].reduce((n, c) => n + c.charCodeAt(0), 0) % FILLS.length];
24
24
  function Avatar({ name, src, size = "md", status, shape = "circle", className }) {
25
25
  const s = SIZE[size];
26
26
  const round = shape === "circle" ? "rounded-full" : "rounded-[30%]";
27
27
  return /* @__PURE__ */ jsxs("span", { className: cx("relative inline-flex shrink-0", s.box, className), role: "img", "aria-label": status ? `${name} (${status})` : name, children: [
28
28
  /* @__PURE__ */ jsxs(A.Root, { className: cx("flex h-full w-full select-none overflow-hidden bg-paper-2 font-medium tracking-[-0.02em]", round, s.text), children: [
29
29
  src && /* @__PURE__ */ jsx(A.Image, { src, alt: "", className: "h-full w-full object-cover animate-[kit-av-in_.3s_ease-out] motion-reduce:animate-none" }),
30
- /* @__PURE__ */ jsx(A.Fallback, { delayMs: src ? 250 : void 0, className: cx("flex h-full w-full items-center justify-center", fillFor(name)), children: initials(name) })
30
+ /* @__PURE__ */ jsx(A.Fallback, { delayMs: src ? 250 : void 0, className: cx("flex h-full w-full items-center justify-center", avatarFill(name)), children: initials(name) })
31
31
  ] }),
32
32
  /* @__PURE__ */ jsx("style", { href: "kit-avatar", precedence: "default", children: `@keyframes kit-av-in { from { opacity: 0 } }` }),
33
33
  status && /* @__PURE__ */ jsx(
@@ -78,6 +78,7 @@ var avatar_default = Avatar;
78
78
 
79
79
  export {
80
80
  initials,
81
+ avatarFill,
81
82
  Avatar,
82
83
  AvatarGroup,
83
84
  avatar_default