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,109 @@
1
+ "use client";
2
+ import {
3
+ avatarFill,
4
+ initials
5
+ } from "./chunk-2LZM435Z.js";
6
+
7
+ // components/kit/base/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
+ };
@@ -0,0 +1,172 @@
1
+ "use client";
2
+
3
+ // components/kit/color-picker.tsx
4
+ import { useId, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var DEFAULT_SWATCHES = [
8
+ { value: "#111113", name: "Ink" },
9
+ { value: "#52525b", name: "Graphite" },
10
+ { value: "#a1a1aa", name: "Stone" },
11
+ { value: "#e4e4e7", name: "Mist" },
12
+ { value: "#2f54eb", name: "Blue" },
13
+ { value: "#4f8ef7", name: "Sky" },
14
+ { value: "#93b4ff", name: "Haze" },
15
+ { value: "#5b5bd6", name: "Indigo" },
16
+ { value: "#7c5cd6", name: "Violet" },
17
+ { value: "#b4a7e8", name: "Lilac" }
18
+ ];
19
+ var parseHex = (input) => {
20
+ const s = input.trim().replace(/^#/, "").toLowerCase();
21
+ if (/^[0-9a-f]{3}$/.test(s)) return `#${[...s].map((c) => c + c).join("")}`;
22
+ if (/^[0-9a-f]{6}$/.test(s)) return `#${s}`;
23
+ return null;
24
+ };
25
+ var light = (hex) => {
26
+ const n = parseInt(hex.slice(1), 16);
27
+ const [r, g, b] = [n >> 16 & 255, n >> 8 & 255, n & 255];
28
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b > 200;
29
+ };
30
+ function ColorPicker({ value, defaultValue, onValueChange, swatches = DEFAULT_SWATCHES, custom = true, columns = 5, size = "md", label = "Colour", disabled, className }) {
31
+ const list = swatches.map((s) => typeof s === "string" ? { value: s } : s).map((s) => ({ ...s, value: parseHex(s.value) ?? s.value }));
32
+ const [inner, setInner] = useState(() => parseHex(defaultValue ?? "") ?? list[0]?.value ?? "#000000");
33
+ const current = parseHex(value ?? "") ?? inner;
34
+ const grid = useRef(null);
35
+ const uid = useId();
36
+ const [draft, setDraft] = useState(null);
37
+ const [focusIdx, setFocusIdx] = useState(null);
38
+ const pickedIdx = list.findIndex((s) => s.value === current);
39
+ const stop = focusIdx !== null && focusIdx < list.length ? focusIdx : Math.max(0, pickedIdx);
40
+ const pick = (hex) => {
41
+ if (hex === current) return;
42
+ if (value === void 0) setInner(hex);
43
+ onValueChange?.(hex);
44
+ };
45
+ const move = (e) => {
46
+ const n = list.length;
47
+ if (!n) return;
48
+ let i = stop;
49
+ if (e.key === "ArrowRight") i = (stop + 1) % n;
50
+ else if (e.key === "ArrowLeft") i = (stop - 1 + n) % n;
51
+ else if (e.key === "ArrowDown") i = Math.min(n - 1, stop + columns);
52
+ else if (e.key === "ArrowUp") i = Math.max(0, stop - columns);
53
+ else if (e.key === "Home") i = 0;
54
+ else if (e.key === "End") i = n - 1;
55
+ else return;
56
+ e.preventDefault();
57
+ setFocusIdx(i);
58
+ pick(list[i].value);
59
+ grid.current?.querySelectorAll("[role=radio]")[i]?.focus();
60
+ };
61
+ const preview = draft !== null ? parseHex(draft) : current;
62
+ const invalid = draft !== null && draft.trim() !== "" && !parseHex(draft);
63
+ const commit = () => {
64
+ if (draft === null) return;
65
+ const hex = parseHex(draft);
66
+ if (hex) pick(hex);
67
+ setDraft(null);
68
+ };
69
+ const px = size === "sm" ? 22 : 28;
70
+ return /* @__PURE__ */ jsxs("div", { className: cx("inline-flex flex-col gap-3", disabled && "pointer-events-none opacity-50", className), children: [
71
+ /* @__PURE__ */ jsx(
72
+ "div",
73
+ {
74
+ ref: grid,
75
+ role: "radiogroup",
76
+ "aria-label": label,
77
+ "aria-disabled": disabled || void 0,
78
+ onKeyDown: move,
79
+ className: "grid w-max",
80
+ style: { gridTemplateColumns: `repeat(${Math.max(1, columns)}, ${px}px)`, gap: size === "sm" ? 8 : 10 },
81
+ children: list.map((s, i) => {
82
+ const on = s.value === current;
83
+ return /* @__PURE__ */ jsxs(
84
+ "button",
85
+ {
86
+ type: "button",
87
+ role: "radio",
88
+ "aria-checked": on,
89
+ "aria-label": s.name ? `${s.name}, ${s.value}` : s.value,
90
+ title: s.name ?? s.value,
91
+ tabIndex: disabled ? -1 : i === stop ? 0 : -1,
92
+ onFocus: () => setFocusIdx(i),
93
+ onClick: () => pick(s.value),
94
+ className: "group/sw relative rounded-full outline-none transition-[scale] duration-200 ease-[cubic-bezier(.16,1,.3,1)] hover:scale-110 active:scale-95 motion-reduce:transition-none",
95
+ style: { width: px, height: px },
96
+ children: [
97
+ /* @__PURE__ */ jsx(
98
+ "span",
99
+ {
100
+ "aria-hidden": true,
101
+ className: cx(
102
+ "pointer-events-none absolute -inset-[4px] rounded-full shadow-[0_0_0_1.5px_var(--ink)] transition-[opacity,scale] duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none",
103
+ on ? "scale-100 opacity-100" : "scale-75 opacity-0",
104
+ "group-focus-visible/sw:shadow-[0_0_0_1.5px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_22%,transparent)] group-focus-visible/sw:scale-100 group-focus-visible/sw:opacity-100"
105
+ )
106
+ }
107
+ ),
108
+ /* @__PURE__ */ jsx(
109
+ "span",
110
+ {
111
+ "aria-hidden": true,
112
+ className: cx("absolute inset-0 rounded-full", light(s.value) && "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)]"),
113
+ style: { background: s.value }
114
+ }
115
+ )
116
+ ]
117
+ },
118
+ `${s.value}-${i}`
119
+ );
120
+ })
121
+ }
122
+ ),
123
+ custom && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
124
+ /* @__PURE__ */ jsx(
125
+ "span",
126
+ {
127
+ "aria-hidden": true,
128
+ className: "relative h-8 w-8 shrink-0 rounded-[8px] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent)] transition-[background-color] duration-200",
129
+ style: { background: preview ?? "transparent" },
130
+ children: !preview && /* @__PURE__ */ jsx("span", { className: "absolute inset-0 flex items-center justify-center text-[12px] text-mute", children: "?" })
131
+ }
132
+ ),
133
+ /* @__PURE__ */ jsx("label", { htmlFor: `${uid}-hex`, className: "sr-only", children: "Custom hex colour" }),
134
+ /* @__PURE__ */ jsxs("div", { className: "flex h-8 min-w-0 flex-1 items-center rounded-[8px] bg-paper-2 pl-2.5 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)] transition-shadow duration-200 focus-within:shadow-[inset_0_0_0_1.5px_var(--brand)]", children: [
135
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-[13px] text-mute", children: "#" }),
136
+ /* @__PURE__ */ jsx(
137
+ "input",
138
+ {
139
+ id: `${uid}-hex`,
140
+ value: (draft ?? current).replace(/^#/, ""),
141
+ onChange: (e) => setDraft(e.target.value.replace(/^#/, "").slice(0, 7)),
142
+ onBlur: commit,
143
+ onKeyDown: (e) => {
144
+ if (e.key === "Enter") {
145
+ e.preventDefault();
146
+ commit();
147
+ } else if (e.key === "Escape" && draft !== null) {
148
+ e.preventDefault();
149
+ setDraft(null);
150
+ }
151
+ },
152
+ spellCheck: false,
153
+ autoComplete: "off",
154
+ maxLength: 7,
155
+ disabled,
156
+ "aria-invalid": invalid || void 0,
157
+ "aria-describedby": invalid ? `${uid}-hint` : void 0,
158
+ className: "h-full w-full min-w-0 bg-transparent pl-1 pr-2.5 font-mono text-[13px] uppercase tracking-[0.02em] text-ink outline-none placeholder:text-mute",
159
+ placeholder: "2F54EB"
160
+ }
161
+ )
162
+ ] }),
163
+ /* @__PURE__ */ jsx("span", { id: `${uid}-hint`, "aria-live": "polite", className: cx("w-14 text-[12px] text-mute transition-opacity duration-200", invalid ? "opacity-100" : "opacity-0"), children: invalid ? "Not a hex" : "" })
164
+ ] })
165
+ ] });
166
+ }
167
+ var color_picker_default = ColorPicker;
168
+
169
+ export {
170
+ ColorPicker,
171
+ color_picker_default
172
+ };
@@ -0,0 +1,230 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/ChatThread.tsx
4
+ import { useEffect, useLayoutEffect, 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 START = [
9
+ { id: 1, me: false, text: "Morning. Did the samples arrive?" },
10
+ { id: 2, me: true, text: "They did. The oak one is lovely." }
11
+ ];
12
+ var SCRIPT = [
13
+ { me: false, text: "Great. Shall I hold it for Friday?" },
14
+ { me: true, text: "Yes please, Friday works." },
15
+ { me: false, text: "Done. Invoice comes tonight." },
16
+ { me: true, text: "Perfect, thank you." }
17
+ ];
18
+ var REPLIES = ["Got it.", "Sounds good to me.", "Noted. I'll get back to you soon."];
19
+ var KEEP = 8;
20
+ var still = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches;
21
+ var Tick = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", className, fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M2.5 6.4l2.2 2.1L9.5 3.6" }) });
22
+ function ChatThread() {
23
+ const [msgs, setMsgs] = useState(START);
24
+ const [typing, setTyping] = useState(false);
25
+ const [read, setRead] = useState(2);
26
+ const [draft, setDraft] = useState("");
27
+ const [fade, setFade] = useState(false);
28
+ const [instant, setInstant] = useState(false);
29
+ const [paused, setPaused] = useState(false);
30
+ const nextId = useRef(3);
31
+ const pos = useRef(0);
32
+ const reply = useRef(0);
33
+ const list = useRef(null);
34
+ const tops = useRef(/* @__PURE__ */ new Map());
35
+ const idle = useRef(null);
36
+ const own = useRef([]);
37
+ const add = (m) => {
38
+ const id = nextId.current++;
39
+ setMsgs((s) => [...s, { ...m, id }].slice(-KEEP));
40
+ return id;
41
+ };
42
+ useLayoutEffect(() => {
43
+ const move = !instant && !still();
44
+ const next = /* @__PURE__ */ new Map();
45
+ list.current?.querySelectorAll("[data-flip]").forEach((el) => {
46
+ const key = el.dataset.flip ?? "";
47
+ const top = el.getBoundingClientRect().top;
48
+ next.set(key, top);
49
+ const before = tops.current.get(key);
50
+ if (move && before !== void 0 && Math.abs(before - top) > 0.5) {
51
+ el.animate([{ transform: `translateY(${before - top}px)` }, { transform: "none" }], { duration: 560, easing: EASE });
52
+ }
53
+ });
54
+ tops.current = next;
55
+ });
56
+ const takeOver = () => {
57
+ setPaused(true);
58
+ if (idle.current) clearTimeout(idle.current);
59
+ idle.current = setTimeout(() => setPaused(false), 9e3);
60
+ };
61
+ useEffect(
62
+ () => () => {
63
+ if (idle.current) clearTimeout(idle.current);
64
+ own.current.forEach(clearTimeout);
65
+ },
66
+ []
67
+ );
68
+ useEffect(() => {
69
+ if (paused || still()) return;
70
+ let alive = true;
71
+ const t = /* @__PURE__ */ new Set();
72
+ const later = (ms, f) => {
73
+ const id = setTimeout(() => {
74
+ t.delete(id);
75
+ if (alive) f();
76
+ }, ms);
77
+ t.add(id);
78
+ };
79
+ const run = () => {
80
+ if (pos.current >= SCRIPT.length) {
81
+ setFade(true);
82
+ later(500, () => {
83
+ pos.current = 0;
84
+ nextId.current = 3;
85
+ setInstant(true);
86
+ setMsgs(START);
87
+ setRead(2);
88
+ });
89
+ later(620, () => setInstant(false));
90
+ later(680, () => setFade(false));
91
+ later(1700, run);
92
+ return;
93
+ }
94
+ const m = SCRIPT[pos.current++];
95
+ if (!m.me) {
96
+ setTyping(true);
97
+ later(1500, () => {
98
+ setTyping(false);
99
+ add(m);
100
+ later(1500, run);
101
+ });
102
+ return;
103
+ }
104
+ m.text.split("").forEach((_, i) => later(i * 32, () => setDraft(m.text.slice(0, i + 1))));
105
+ later(m.text.length * 32 + 380, () => {
106
+ setDraft("");
107
+ const id = add(m);
108
+ later(1e3, () => setRead(id));
109
+ later(2300, run);
110
+ });
111
+ };
112
+ later(1100, run);
113
+ return () => {
114
+ alive = false;
115
+ t.forEach(clearTimeout);
116
+ setTyping(false);
117
+ setFade(false);
118
+ };
119
+ }, [paused]);
120
+ const send = (e) => {
121
+ e.preventDefault();
122
+ takeOver();
123
+ const text = draft.trim();
124
+ if (!text) return;
125
+ setDraft("");
126
+ const id = add({ me: true, text });
127
+ own.current.forEach(clearTimeout);
128
+ own.current = [
129
+ setTimeout(() => setRead(id), 900),
130
+ setTimeout(() => setTyping(true), 1400),
131
+ setTimeout(() => {
132
+ setTyping(false);
133
+ add({ me: false, text: REPLIES[reply.current++ % REPLIES.length] });
134
+ }, 2900)
135
+ ];
136
+ };
137
+ const lastMe = [...msgs].reverse().find((m) => m.me)?.id;
138
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-11", style: { containerType: "size" }, children: [
139
+ /* @__PURE__ */ jsx("style", { href: "asta-chatthread", precedence: "asta", children: `
140
+ @keyframes lab-ct-grow { from { transform: scale(.55); opacity: 0 } to { transform: none; opacity: 1 } }
141
+ @keyframes lab-ct-fly { from { transform: translateY(28px) scale(.97); opacity: 0 } to { transform: none; opacity: 1 } }
142
+ @keyframes lab-ct-dot { 0%, 60%, 100% { transform: none; opacity: .35 } 30% { transform: translateY(-2.5px); opacity: 1 } }
143
+ @keyframes lab-ct-tick { from { transform: translateX(-3px) scale(.6); opacity: 0 } to { transform: none; opacity: 1 } }
144
+ .lab-ct-grow { transform-origin: 0 100%; animation: lab-ct-grow .5s ${EASE} both }
145
+ .lab-ct-fly { transform-origin: 100% 100%; animation: lab-ct-fly .6s ${EASE} both }
146
+ .lab-ct-dot { animation: lab-ct-dot 1.2s ${EASE} infinite }
147
+ .lab-ct-tick { animation: lab-ct-tick .45s ${EASE} both }
148
+ @media (prefers-reduced-motion: reduce) { .lab-ct-grow, .lab-ct-fly, .lab-ct-dot, .lab-ct-tick { animation: none } .lab-ct-dot { opacity: .6 } }
149
+ ` }),
150
+ /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full max-w-[400px] flex-col", children: [
151
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
152
+ /* @__PURE__ */ jsx("span", { className: `flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-paper-2 text-[11px] font-medium text-ink-2 ${RING}`, children: "NL" }),
153
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0 leading-tight", children: [
154
+ /* @__PURE__ */ jsx("span", { className: "block truncate text-[13px] font-medium text-ink", children: "Nora Lind" }),
155
+ /* @__PURE__ */ jsx("span", { className: "block truncate text-[11.5px] text-mute", children: typing ? "Typing\u2026" : "Lindqvist Studio" })
156
+ ] })
157
+ ] }),
158
+ /* @__PURE__ */ jsx(
159
+ "div",
160
+ {
161
+ className: "relative mt-3 min-h-0 flex-1 overflow-hidden",
162
+ style: { maskImage: "linear-gradient(to bottom, transparent, #000 28px)", WebkitMaskImage: "linear-gradient(to bottom, transparent, #000 28px)" },
163
+ children: /* @__PURE__ */ jsxs(
164
+ "div",
165
+ {
166
+ ref: list,
167
+ role: "log",
168
+ "aria-live": "polite",
169
+ "aria-label": "Conversation with Nora Lind",
170
+ className: "absolute inset-x-0 bottom-0 flex flex-col gap-1.5 pb-1",
171
+ style: { opacity: fade ? 0 : 1, transition: `opacity .5s ${EASE}` },
172
+ children: [
173
+ msgs.map((m) => /* @__PURE__ */ jsxs("div", { "data-flip": m.id, className: `flex flex-col ${m.me ? "items-end" : "items-start"}`, children: [
174
+ /* @__PURE__ */ jsx(
175
+ "span",
176
+ {
177
+ className: `max-w-[78%] px-3 py-[7px] text-[13px] leading-snug ${m.me ? "rounded-[14px] rounded-br-[5px] bg-brand text-paper" : "rounded-[14px] rounded-bl-[5px] bg-paper-2 text-ink"} ${m.id > 2 && !instant ? m.me ? "lab-ct-fly" : "lab-ct-grow" : ""}`,
178
+ children: m.text
179
+ }
180
+ ),
181
+ m.id === lastMe && /* @__PURE__ */ jsxs("span", { className: "mt-1 flex items-center gap-1 pr-0.5 text-[10.5px] text-mute", children: [
182
+ read >= m.id ? "Read" : "Delivered",
183
+ /* @__PURE__ */ jsxs("span", { className: "relative flex h-3 w-[15px]", children: [
184
+ /* @__PURE__ */ jsx(Tick, { className: `absolute left-0 top-0 h-3 w-3 ${read >= m.id ? "text-brand" : ""}` }),
185
+ read >= m.id && /* @__PURE__ */ jsx("span", { className: "lab-ct-tick absolute left-[4px] top-0 h-3 w-3 text-brand", children: /* @__PURE__ */ jsx(Tick, { className: "h-3 w-3" }) }, `r${m.id}`)
186
+ ] })
187
+ ] })
188
+ ] }, m.id)),
189
+ typing && /* @__PURE__ */ jsx("div", { "data-flip": "typing", className: "flex", children: /* @__PURE__ */ jsx("span", { "aria-label": "Nora is typing", className: "lab-ct-grow flex h-[31px] items-center gap-[4px] rounded-[14px] rounded-bl-[5px] bg-paper-2 px-3", children: [0, 1, 2].map((d) => /* @__PURE__ */ jsx("span", { className: "lab-ct-dot h-[5px] w-[5px] rounded-full bg-mute", style: { animationDelay: `${d * 0.16}s` } }, d)) }) })
190
+ ]
191
+ }
192
+ )
193
+ }
194
+ ),
195
+ /* @__PURE__ */ jsxs("form", { onSubmit: send, className: "mt-3 flex items-center gap-2", children: [
196
+ /* @__PURE__ */ jsx(
197
+ "input",
198
+ {
199
+ value: draft,
200
+ onFocus: () => {
201
+ takeOver();
202
+ if (!paused) setDraft("");
203
+ },
204
+ onChange: (e) => {
205
+ takeOver();
206
+ setDraft(e.target.value);
207
+ },
208
+ placeholder: "Message",
209
+ "aria-label": "Message",
210
+ className: `h-9 min-w-0 flex-1 rounded-[9px] bg-paper px-3 text-[13px] text-ink outline-none placeholder:text-mute focus-visible:ring-2 focus-visible:ring-brand/50 ${RING}`
211
+ }
212
+ ),
213
+ /* @__PURE__ */ jsx(
214
+ "button",
215
+ {
216
+ type: "submit",
217
+ "aria-label": "Send",
218
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-[9px] bg-brand text-paper outline-none transition-[opacity,transform] duration-300 active:scale-95 focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
219
+ style: { opacity: draft.trim() ? 1 : 0.35, transitionTimingFunction: EASE },
220
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M8 13V3.5M4 7.5l4-4 4 4" }) })
221
+ }
222
+ )
223
+ ] })
224
+ ] })
225
+ ] });
226
+ }
227
+
228
+ export {
229
+ ChatThread
230
+ };