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,322 @@
1
+ "use client";
2
+ import {
3
+ Avatar
4
+ } from "./chunk-2LZM435Z.js";
5
+
6
+ // components/kit/base/sidebar.tsx
7
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var cx = (...c) => c.filter(Boolean).join(" ");
10
+ var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
11
+ var RING = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]";
12
+ var Icon = ({ d, className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-4 w-4", className), fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d }) });
13
+ function Tile({ name, on }) {
14
+ return /* @__PURE__ */ jsx(
15
+ "span",
16
+ {
17
+ "aria-hidden": true,
18
+ className: cx(
19
+ "flex h-7 w-7 shrink-0 items-center justify-center rounded-[7px] text-[12.5px] font-semibold tracking-[-0.02em]",
20
+ on ? "bg-ink text-paper" : cx("bg-paper text-ink", RING)
21
+ ),
22
+ children: name.charAt(0)
23
+ }
24
+ );
25
+ }
26
+ function Label({ hidden, children, className }) {
27
+ return /* @__PURE__ */ jsx(
28
+ "span",
29
+ {
30
+ className: cx(
31
+ "min-w-0 flex-1 overflow-hidden whitespace-nowrap text-left transition-[opacity,transform] duration-300",
32
+ EASE,
33
+ hidden ? "pointer-events-none -translate-x-1 opacity-0" : "translate-x-0 opacity-100 delay-75",
34
+ className
35
+ ),
36
+ children
37
+ }
38
+ );
39
+ }
40
+ function Tip({ children }) {
41
+ return /* @__PURE__ */ jsx(
42
+ "span",
43
+ {
44
+ "aria-hidden": true,
45
+ className: cx(
46
+ "pointer-events-none absolute left-[calc(100%+10px)] top-1/2 z-20 -translate-x-1 -translate-y-1/2 whitespace-nowrap rounded-md bg-ink px-2 py-1 text-[12px] text-paper opacity-0 transition-[opacity,translate] duration-200",
47
+ "group-hover/item:translate-x-0 group-hover/item:opacity-100 group-focus-visible/item:translate-x-0 group-focus-visible/item:opacity-100",
48
+ EASE
49
+ ),
50
+ children
51
+ }
52
+ );
53
+ }
54
+ var itemCls = "group/item relative flex h-9 w-full items-center rounded-lg text-[13.5px] outline-none transition-colors duration-200 focus-visible:ring-2 focus-visible:ring-brand/50";
55
+ function Sidebar({
56
+ workspaces,
57
+ defaultWorkspace,
58
+ onWorkspaceChange,
59
+ groups,
60
+ active: activeProp,
61
+ defaultActive,
62
+ onNavigate,
63
+ collapsed: collapsedProp,
64
+ defaultCollapsed = false,
65
+ onCollapsedChange,
66
+ user,
67
+ className
68
+ }) {
69
+ const [activeState, setActive] = useState(defaultActive ?? groups[0]?.items[0]?.id ?? "");
70
+ const [collapsedState, setCollapsed] = useState(defaultCollapsed);
71
+ const [workspace, setWorkspace] = useState(defaultWorkspace ?? workspaces[0]?.id);
72
+ const [menu, setMenu] = useState(false);
73
+ const active = activeProp ?? activeState;
74
+ const collapsed = collapsedProp ?? collapsedState;
75
+ const current = workspaces.find((w) => w.id === workspace) ?? workspaces[0];
76
+ const nav = useRef(null);
77
+ const indicator = useRef(null);
78
+ const placed = useRef(false);
79
+ const switcher = useRef(null);
80
+ const trigger = useRef(null);
81
+ useLayoutEffect(() => {
82
+ const ind = indicator.current;
83
+ const el = nav.current?.querySelector(`[data-sb-id="${CSS.escape(active)}"]`);
84
+ if (!ind) return;
85
+ if (!el) {
86
+ ind.style.opacity = "0";
87
+ return;
88
+ }
89
+ if (!placed.current) ind.style.transition = "none";
90
+ ind.style.transform = `translateY(${el.offsetTop}px)`;
91
+ ind.style.opacity = "1";
92
+ if (!placed.current) {
93
+ void ind.offsetHeight;
94
+ ind.style.transition = "";
95
+ placed.current = true;
96
+ }
97
+ }, [active]);
98
+ useEffect(() => {
99
+ if (!menu) return;
100
+ switcher.current?.querySelector("[role=menuitemradio][aria-checked=true]")?.focus();
101
+ const down = (e) => {
102
+ if (!switcher.current?.contains(e.target)) setMenu(false);
103
+ };
104
+ document.addEventListener("pointerdown", down);
105
+ return () => document.removeEventListener("pointerdown", down);
106
+ }, [menu]);
107
+ const navigate = (id) => {
108
+ setActive(id);
109
+ onNavigate?.(id);
110
+ };
111
+ const toggle = () => {
112
+ setCollapsed(!collapsed);
113
+ onCollapsedChange?.(!collapsed);
114
+ };
115
+ const pick = (id) => {
116
+ setWorkspace(id);
117
+ onWorkspaceChange?.(id);
118
+ setMenu(false);
119
+ trigger.current?.focus();
120
+ };
121
+ const rove = (e, selector, root) => {
122
+ const els = [...root?.querySelectorAll(selector) ?? []];
123
+ const i = els.indexOf(document.activeElement);
124
+ const next = { ArrowDown: i + 1, ArrowUp: i - 1, Home: 0, End: els.length - 1 }[e.key];
125
+ if (next === void 0 || !els.length) return;
126
+ e.preventDefault();
127
+ els[(next + els.length) % els.length]?.focus();
128
+ };
129
+ return /* @__PURE__ */ jsxs(
130
+ "aside",
131
+ {
132
+ "aria-label": "Sidebar",
133
+ "data-collapsed": collapsed || void 0,
134
+ className: cx(
135
+ "relative flex h-full shrink-0 flex-col bg-paper-2 px-3 py-3 transition-[width] duration-500",
136
+ EASE,
137
+ collapsed ? "w-16" : "w-[248px]",
138
+ className
139
+ ),
140
+ children: [
141
+ /* @__PURE__ */ jsx("style", { href: "asta-sidebar", precedence: "asta", children: `
142
+ @keyframes kit-sb-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
143
+ @media (prefers-reduced-motion: reduce) { .kit-sb, .kit-sb * { animation: none !important; transition-duration: 0s !important; } }
144
+ ` }),
145
+ /* @__PURE__ */ jsxs("div", { className: "kit-sb flex min-h-0 flex-1 flex-col", children: [
146
+ /* @__PURE__ */ jsxs("div", { ref: switcher, className: "relative", children: [
147
+ /* @__PURE__ */ jsxs(
148
+ "button",
149
+ {
150
+ ref: trigger,
151
+ type: "button",
152
+ "aria-haspopup": "menu",
153
+ "aria-expanded": menu,
154
+ "aria-label": collapsed ? `Workspace: ${current?.name}` : void 0,
155
+ onClick: () => setMenu((v) => !v),
156
+ onKeyDown: (e) => {
157
+ if (e.key === "ArrowDown" && !menu) {
158
+ e.preventDefault();
159
+ setMenu(true);
160
+ }
161
+ },
162
+ className: cx(itemCls, "h-11 hover:bg-[color-mix(in_srgb,var(--ink)_5%,transparent)] aria-expanded:bg-[color-mix(in_srgb,var(--ink)_5%,transparent)]"),
163
+ children: [
164
+ /* @__PURE__ */ jsx("span", { className: "flex w-10 shrink-0 justify-center", children: current && /* @__PURE__ */ jsx(Tile, { name: current.name, on: true }) }),
165
+ /* @__PURE__ */ jsxs(Label, { hidden: collapsed, className: "flex flex-col leading-tight", children: [
166
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[13.5px] font-medium text-ink", children: current?.name }),
167
+ current?.plan && /* @__PURE__ */ jsx("span", { className: "truncate text-[11.5px] text-mute", children: current.plan })
168
+ ] }),
169
+ /* @__PURE__ */ jsx(
170
+ Icon,
171
+ {
172
+ d: "m5.5 6 2.5-2.5L10.5 6M5.5 10l2.5 2.5 2.5-2.5",
173
+ className: cx("mr-2 shrink-0 text-mute transition-opacity duration-300", collapsed ? "opacity-0" : "opacity-100")
174
+ }
175
+ ),
176
+ collapsed && /* @__PURE__ */ jsx(Tip, { children: current?.name })
177
+ ]
178
+ }
179
+ ),
180
+ menu && /* @__PURE__ */ jsxs(
181
+ "div",
182
+ {
183
+ role: "menu",
184
+ "aria-label": "Switch workspace",
185
+ onKeyDown: (e) => {
186
+ if (e.key === "Escape" || e.key === "Tab") {
187
+ if (e.key === "Escape") e.preventDefault();
188
+ setMenu(false);
189
+ trigger.current?.focus();
190
+ } else rove(e, "[role=menuitemradio]", e.currentTarget);
191
+ },
192
+ className: "absolute left-0 top-[calc(100%+6px)] z-30 w-[232px] origin-top-left rounded-xl bg-paper p-1.5 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_16px_36px_-14px_rgb(0_0_0/0.3)]",
193
+ style: { animation: "kit-sb-pop .32s cubic-bezier(.16,1,.3,1) both" },
194
+ children: [
195
+ /* @__PURE__ */ jsx("p", { className: "px-2 pb-1.5 pt-1 text-[11.5px] text-mute", children: "Workspaces" }),
196
+ workspaces.map((w) => {
197
+ const on = w.id === current?.id;
198
+ return /* @__PURE__ */ jsxs(
199
+ "button",
200
+ {
201
+ type: "button",
202
+ role: "menuitemradio",
203
+ "aria-checked": on,
204
+ onClick: () => pick(w.id),
205
+ className: "flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left outline-none transition-colors hover:bg-paper-2 focus-visible:bg-paper-2",
206
+ children: [
207
+ /* @__PURE__ */ jsx(Tile, { name: w.name, on }),
208
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
209
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[13.5px] text-ink", children: w.name }),
210
+ w.plan && /* @__PURE__ */ jsx("span", { className: "truncate text-[11.5px] text-mute", children: w.plan })
211
+ ] }),
212
+ on && /* @__PURE__ */ jsx(Icon, { d: "M3.5 8.5l3 3 6-7", className: "shrink-0 text-brand" })
213
+ ]
214
+ },
215
+ w.id
216
+ );
217
+ })
218
+ ]
219
+ }
220
+ )
221
+ ] }),
222
+ /* @__PURE__ */ jsx("nav", { "aria-label": "Main", className: "mt-4 min-h-0 flex-1", onKeyDown: (e) => rove(e, "[data-sb-id]", nav.current), children: /* @__PURE__ */ jsxs("div", { ref: nav, className: "relative", children: [
223
+ /* @__PURE__ */ jsx(
224
+ "span",
225
+ {
226
+ ref: indicator,
227
+ "aria-hidden": true,
228
+ className: cx(
229
+ "absolute inset-x-0 top-0 h-9 rounded-lg bg-paper opacity-0 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent),0_1px_2px_rgb(0_0_0/0.06)] transition-[transform,opacity] duration-500",
230
+ EASE
231
+ )
232
+ }
233
+ ),
234
+ groups.map((g, gi) => /* @__PURE__ */ jsxs("div", { className: cx(gi > 0 && "mt-3"), children: [
235
+ g.label && /* @__PURE__ */ jsxs("div", { className: "relative flex h-7 items-center px-3", "aria-hidden": collapsed || void 0, children: [
236
+ /* @__PURE__ */ jsx("span", { className: cx("text-[11.5px] text-mute transition-opacity duration-300", collapsed ? "opacity-0" : "opacity-100"), children: g.label }),
237
+ /* @__PURE__ */ jsx(
238
+ "span",
239
+ {
240
+ className: cx(
241
+ "absolute left-1/2 h-px w-3 -translate-x-1/2 bg-[color-mix(in_srgb,var(--ink)_14%,transparent)] transition-opacity duration-300",
242
+ collapsed ? "opacity-100" : "opacity-0"
243
+ )
244
+ }
245
+ )
246
+ ] }),
247
+ /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-0.5", children: g.items.map((it) => {
248
+ const on = it.id === active;
249
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
250
+ "button",
251
+ {
252
+ type: "button",
253
+ "data-sb-id": it.id,
254
+ "aria-current": on ? "page" : void 0,
255
+ "aria-label": collapsed ? it.label : void 0,
256
+ onClick: () => navigate(it.id),
257
+ className: cx(itemCls, on ? "text-ink" : "text-ink-2 hover:text-ink hover:bg-[color-mix(in_srgb,var(--ink)_4%,transparent)]"),
258
+ children: [
259
+ /* @__PURE__ */ jsxs("span", { className: cx("relative flex w-10 shrink-0 justify-center transition-colors duration-300", on ? "text-brand" : "text-mute group-hover/item:text-ink"), children: [
260
+ it.icon,
261
+ !!it.badge && /* @__PURE__ */ jsx(
262
+ "span",
263
+ {
264
+ className: cx(
265
+ "absolute right-2 top-0 h-1.5 w-1.5 rounded-full bg-brand shadow-[0_0_0_2px_var(--paper-2)] transition-[opacity,transform] duration-300",
266
+ EASE,
267
+ collapsed ? "scale-100 opacity-100" : "scale-50 opacity-0"
268
+ )
269
+ }
270
+ )
271
+ ] }),
272
+ /* @__PURE__ */ jsx(Label, { hidden: collapsed, className: "relative", children: it.label }),
273
+ !!it.badge && /* @__PURE__ */ jsx(
274
+ "span",
275
+ {
276
+ className: cx(
277
+ "relative mr-2 rounded-md bg-[color-mix(in_srgb,var(--ink)_6%,transparent)] px-1.5 text-[11.5px] tabular-nums leading-5 text-mute transition-opacity duration-300",
278
+ collapsed ? "opacity-0" : "opacity-100"
279
+ ),
280
+ children: it.badge
281
+ }
282
+ ),
283
+ collapsed && /* @__PURE__ */ jsx(Tip, { children: it.label })
284
+ ]
285
+ }
286
+ ) }, it.id);
287
+ }) })
288
+ ] }, g.label ?? gi))
289
+ ] }) }),
290
+ /* @__PURE__ */ jsxs(
291
+ "button",
292
+ {
293
+ type: "button",
294
+ "aria-pressed": collapsed,
295
+ "aria-label": collapsed ? "Expand sidebar" : "Collapse sidebar",
296
+ onClick: toggle,
297
+ className: cx(itemCls, "text-mute hover:bg-[color-mix(in_srgb,var(--ink)_4%,transparent)] hover:text-ink"),
298
+ children: [
299
+ /* @__PURE__ */ jsx("span", { className: "flex w-10 shrink-0 justify-center", children: /* @__PURE__ */ jsx(Icon, { d: "M2.5 3.5h11v9h-11zM6 3.5v9M10.5 6.5 9 8l1.5 1.5", className: cx("transition-transform duration-500", EASE, collapsed && "-scale-x-100") }) }),
300
+ /* @__PURE__ */ jsx(Label, { hidden: collapsed, children: "Collapse" }),
301
+ collapsed && /* @__PURE__ */ jsx(Tip, { children: "Expand" })
302
+ ]
303
+ }
304
+ ),
305
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 flex h-12 items-center rounded-lg", children: [
306
+ /* @__PURE__ */ jsx("span", { className: "flex w-10 shrink-0 justify-center", children: /* @__PURE__ */ jsx(Avatar, { name: user.name, src: user.src, size: "sm" }) }),
307
+ /* @__PURE__ */ jsxs(Label, { hidden: collapsed, className: "flex flex-col pl-1 leading-tight", children: [
308
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[13px] font-medium text-ink", children: user.name }),
309
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[11.5px] text-mute", children: user.email })
310
+ ] })
311
+ ] })
312
+ ] })
313
+ ]
314
+ }
315
+ );
316
+ }
317
+ var sidebar_default = Sidebar;
318
+
319
+ export {
320
+ Sidebar,
321
+ sidebar_default
322
+ };
@@ -0,0 +1,339 @@
1
+ "use client";
2
+ import {
3
+ Avatar
4
+ } from "./chunk-HNO6EUGJ.js";
5
+
6
+ // components/kit/kanban.tsx
7
+ import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ var cx = (...c) => c.filter(Boolean).join(" ");
10
+ var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
11
+ var CURVE = "cubic-bezier(.16,1,.3,1)";
12
+ var GAP = 8;
13
+ var reduced = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
14
+ function place(cards, card, col, index) {
15
+ const rest = cards.filter((c) => c.id !== card.id);
16
+ const inCol = rest.filter((c) => c.column === col);
17
+ const before = inCol[index];
18
+ const at = before ? rest.indexOf(before) : inCol.length ? rest.indexOf(inCol[inCol.length - 1]) + 1 : rest.length;
19
+ rest.splice(at, 0, { ...card, column: col });
20
+ return rest;
21
+ }
22
+ function shiftOf(d, g, id) {
23
+ const D = d.h + GAP;
24
+ const i = g.ids.indexOf(id);
25
+ const src = g.id === d.from ? g.ids.indexOf(d.id) : -1;
26
+ const after = src >= 0 && i > src;
27
+ const compact = after ? i - 1 : i;
28
+ return (after ? -D : 0) + (g.id === d.target.col && compact >= d.target.index ? D : 0);
29
+ }
30
+ function gapTop(d, g) {
31
+ const D = d.h + GAP;
32
+ const src = g.id === d.from ? g.ids.indexOf(d.id) : -1;
33
+ const adj = (id) => src >= 0 && g.ids.indexOf(id) > src ? -D : 0;
34
+ const compact = g.ids.filter((id) => id !== d.id);
35
+ if (d.target.index < compact.length) {
36
+ const id = compact[d.target.index];
37
+ return g.box[id].top + adj(id);
38
+ }
39
+ const last = compact[compact.length - 1];
40
+ return last ? g.box[last].top + adj(last) + g.box[last].h + GAP : 0;
41
+ }
42
+ function CardBody({ card }) {
43
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
44
+ /* @__PURE__ */ jsx("p", { className: "text-[13.5px] leading-snug text-ink", children: card.title }),
45
+ (card.tag || card.assignee || card.due) && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2 text-[11.5px] text-mute", children: [
46
+ card.tag && /* @__PURE__ */ jsx("span", { className: "rounded-md bg-paper-2 px-1.5 leading-5", children: card.tag }),
47
+ card.due && /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: card.due }),
48
+ card.assignee && /* @__PURE__ */ jsx(Avatar, { name: card.assignee, size: "xs", className: "ml-auto" })
49
+ ] })
50
+ ] });
51
+ }
52
+ var cardCls = "rounded-[10px] bg-paper p-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_9%,transparent),0_1px_2px_rgb(0_0_0/0.04)]";
53
+ function Kanban({ columns, defaultCards, onChange, className }) {
54
+ const [cards, setCards] = useState(defaultCards);
55
+ const [drag, setDrag] = useState(null);
56
+ const [picked, setPicked] = useState(null);
57
+ const [msg, setMsg] = useState("");
58
+ const hintId = useId();
59
+ const root = useRef(null);
60
+ const lists = useRef(/* @__PURE__ */ new Map());
61
+ const els = useRef(/* @__PURE__ */ new Map());
62
+ const press = useRef(null);
63
+ const flip = useRef(null);
64
+ const refocus = useRef(null);
65
+ const pickedRef = useRef(picked);
66
+ useEffect(() => {
67
+ pickedRef.current = picked;
68
+ }, [picked]);
69
+ const inCol = (list, col) => list.filter((c) => c.column === col);
70
+ const titleOf = (col) => columns.find((c) => c.id === col)?.title ?? col;
71
+ const where = (list, id) => {
72
+ const card = list.find((c) => c.id === id);
73
+ const col = inCol(list, card.column);
74
+ return `${titleOf(card.column)}, position ${col.indexOf(card) + 1} of ${col.length}`;
75
+ };
76
+ useLayoutEffect(() => {
77
+ const from = flip.current;
78
+ flip.current = null;
79
+ if (from && !reduced()) {
80
+ from.forEach((r, id2) => {
81
+ const el = els.current.get(id2);
82
+ if (!el) return;
83
+ const n = el.getBoundingClientRect();
84
+ const dx = r.left - n.left;
85
+ const dy = r.top - n.top;
86
+ if (dx || dy) el.animate([{ transform: `translate(${dx}px, ${dy}px)` }, { transform: "none" }], { duration: 340, easing: CURVE });
87
+ });
88
+ }
89
+ const id = picked?.id ?? refocus.current;
90
+ refocus.current = null;
91
+ if (id && document.activeElement !== els.current.get(id)) els.current.get(id)?.focus();
92
+ }, [cards, picked]);
93
+ const start = (e, card) => {
94
+ const board = root.current.getBoundingClientRect();
95
+ const geo = columns.map((c) => {
96
+ const r2 = lists.current.get(c.id).getBoundingClientRect();
97
+ const ids = inCol(cards, c.id).map((k) => k.id);
98
+ const box = Object.fromEntries(ids.map((id) => [id, { top: els.current.get(id).offsetTop, h: els.current.get(id).offsetHeight }]));
99
+ return { id: c.id, left: r2.left - board.left, right: r2.right - board.left, top: r2.top - board.top, ids, box };
100
+ });
101
+ const r = els.current.get(card.id).getBoundingClientRect();
102
+ const index = geo.find((g) => g.id === card.column).ids.indexOf(card.id);
103
+ setDrag({
104
+ id: card.id,
105
+ from: card.column,
106
+ x: r.left - board.left,
107
+ y: r.top - board.top,
108
+ w: r.width,
109
+ h: r.height,
110
+ ox: e.clientX - r.left,
111
+ oy: e.clientY - r.top,
112
+ target: { col: card.column, index },
113
+ geo
114
+ });
115
+ };
116
+ const move = (e, d) => {
117
+ const board = root.current.getBoundingClientRect();
118
+ const x = e.clientX - board.left - d.ox;
119
+ const y = e.clientY - board.top - d.oy;
120
+ const px = e.clientX - board.left;
121
+ const g = d.geo.find((c) => px >= c.left && px <= c.right) ?? d.geo.reduce((a, b) => Math.abs((a.left + a.right) / 2 - px) < Math.abs((b.left + b.right) / 2 - px) ? a : b);
122
+ const cy = y + d.h / 2 - g.top;
123
+ const closing = { ...d, target: { col: "", index: 0 } };
124
+ const compact = g.ids.filter((id) => id !== d.id);
125
+ let index = compact.length;
126
+ for (let i = 0; i < compact.length; i++) {
127
+ const b = g.box[compact[i]];
128
+ const top = b.top + shiftOf(closing, g, compact[i]);
129
+ if (cy < top + b.h / 2) {
130
+ index = i;
131
+ break;
132
+ }
133
+ }
134
+ setDrag({ ...d, x, y, target: { col: g.id, index } });
135
+ };
136
+ const commit = (d) => {
137
+ const card = cards.find((c) => c.id === d.id);
138
+ const next = place(cards, card, d.target.col, d.target.index);
139
+ setCards(next);
140
+ setDrag(null);
141
+ setMsg(`Dropped ${card.title} in ${where(next, card.id)}.`);
142
+ onChange?.(next);
143
+ };
144
+ const drop = (d) => {
145
+ if (reduced()) return commit(d);
146
+ const g = d.geo.find((c) => c.id === d.target.col);
147
+ setDrag({ ...d, x: g.left, y: g.top + gapTop(d, g), dropping: true });
148
+ setTimeout(() => commit(d), 260);
149
+ };
150
+ const cancelPick = (focus) => {
151
+ const p = pickedRef.current;
152
+ if (!p) return;
153
+ pickedRef.current = null;
154
+ const card = p.origin.find((c) => c.id === p.id);
155
+ flip.current = new Map([...els.current].map(([id, el]) => [id, el.getBoundingClientRect()]));
156
+ if (focus) refocus.current = p.id;
157
+ setCards(p.origin);
158
+ setPicked(null);
159
+ setMsg(`Cancelled. ${card.title} is back in ${where(p.origin, p.id)}.`);
160
+ };
161
+ const pointer = {
162
+ down: (e, card) => {
163
+ if (picked) return cancelPick(false);
164
+ if (e.button !== 0 || drag) return;
165
+ press.current = { id: card.id, sx: e.clientX, sy: e.clientY };
166
+ e.currentTarget.setPointerCapture(e.pointerId);
167
+ },
168
+ move: (e, card) => {
169
+ const p = press.current;
170
+ if (!p || p.id !== card.id) return;
171
+ if (drag) {
172
+ if (!drag.dropping) move(e, drag);
173
+ } else if (Math.hypot(e.clientX - p.sx, e.clientY - p.sy) > 4) start(e, card);
174
+ },
175
+ up: () => {
176
+ press.current = null;
177
+ if (drag && !drag.dropping) drop(drag);
178
+ },
179
+ cancel: () => {
180
+ press.current = null;
181
+ if (drag && !drag.dropping) setDrag(null);
182
+ }
183
+ };
184
+ const keyMove = (card, dx, dy) => {
185
+ const ci = columns.findIndex((c) => c.id === card.column);
186
+ const nci = Math.min(columns.length - 1, Math.max(0, ci + dx));
187
+ const col = columns[nci].id;
188
+ const here = inCol(cards, card.column).indexOf(card);
189
+ const others = inCol(cards, col).filter((c) => c.id !== card.id);
190
+ const index = dx ? Math.min(here, others.length) : Math.min(others.length, Math.max(0, here + dy));
191
+ if (col === card.column && index === here) return;
192
+ flip.current = new Map([...els.current].map(([id, el]) => [id, el.getBoundingClientRect()]));
193
+ const next = place(cards, card, col, index);
194
+ setCards(next);
195
+ setMsg(`${card.title}: ${where(next, card.id)}.`);
196
+ };
197
+ const onKey = (e, card) => {
198
+ const held = picked?.id === card.id;
199
+ if (e.key === " " || e.key === "Enter") {
200
+ e.preventDefault();
201
+ if (held) {
202
+ setPicked(null);
203
+ setMsg(`Dropped ${card.title} in ${where(cards, card.id)}.`);
204
+ onChange?.(cards);
205
+ } else if (!picked) {
206
+ setPicked({ id: card.id, origin: cards });
207
+ setMsg(`Picked up ${card.title}. Use the arrow keys to move it, Space to drop, Escape to cancel.`);
208
+ }
209
+ return;
210
+ }
211
+ if (!held) return;
212
+ const dir = { ArrowLeft: [-1, 0], ArrowRight: [1, 0], ArrowUp: [0, -1], ArrowDown: [0, 1] }[e.key];
213
+ if (dir) {
214
+ e.preventDefault();
215
+ keyMove(card, dir[0], dir[1]);
216
+ } else if (e.key === "Escape") {
217
+ e.preventDefault();
218
+ cancelPick(true);
219
+ }
220
+ };
221
+ const onBlur = (id) => {
222
+ if (pickedRef.current?.id !== id) return;
223
+ setTimeout(() => {
224
+ if (pickedRef.current?.id === id && document.activeElement !== els.current.get(id)) cancelPick(false);
225
+ });
226
+ };
227
+ const dragged = drag ? cards.find((c) => c.id === drag.id) : void 0;
228
+ return /* @__PURE__ */ jsxs("div", { className: cx("w-full overflow-x-auto", className), children: [
229
+ /* @__PURE__ */ jsx("style", { href: "asta-kanban", precedence: "asta", children: `
230
+ @keyframes kit-kb-lift { to { transform: rotate(1.5deg) scale(1.03); box-shadow: 0 18px 36px -14px rgb(0 0 0 / .28); } }
231
+ @keyframes kit-kb-land { from { transform: rotate(1.5deg) scale(1.03); box-shadow: 0 18px 36px -14px rgb(0 0 0 / .28); } }
232
+ @keyframes kit-kb-fade { from { opacity: 0; } }
233
+ @keyframes kit-kb-count { from { opacity: 0; transform: translateY(4px); } }
234
+ @media (prefers-reduced-motion: reduce) { .kit-kb, .kit-kb * { animation: none !important; transition-duration: 0s !important; } }
235
+ ` }),
236
+ /* @__PURE__ */ jsx("p", { id: hintId, className: "sr-only", children: "Press Space to pick up a card. Use the arrow keys to move it, Space to drop, Escape to cancel." }),
237
+ /* @__PURE__ */ jsx("p", { className: "sr-only", "aria-live": "polite", children: msg }),
238
+ /* @__PURE__ */ jsxs("div", { ref: root, className: "kit-kb relative grid min-w-[620px] gap-3", style: { gridTemplateColumns: `repeat(${columns.length}, minmax(0, 1fr))` }, children: [
239
+ columns.map((col) => {
240
+ const list = inCol(cards, col.id);
241
+ const g = drag?.geo.find((c) => c.id === col.id);
242
+ const count = list.length - (drag?.from === col.id ? 1 : 0) + (drag?.target.col === col.id ? 1 : 0);
243
+ return /* @__PURE__ */ jsxs("section", { "aria-label": col.title, className: "flex min-h-[340px] flex-col rounded-xl bg-paper-2 p-2", children: [
244
+ /* @__PURE__ */ jsxs("header", { className: "flex items-center gap-2 px-1.5 pb-2.5 pt-1", children: [
245
+ /* @__PURE__ */ jsx("h4", { className: "text-[13px] font-medium text-ink", children: col.title }),
246
+ /* @__PURE__ */ jsx("span", { className: "text-[12px] tabular-nums text-mute", style: { animation: `kit-kb-count .4s ${CURVE}` }, children: count }, count)
247
+ ] }),
248
+ /* @__PURE__ */ jsxs(
249
+ "ul",
250
+ {
251
+ ref: (el) => {
252
+ if (el) lists.current.set(col.id, el);
253
+ },
254
+ className: "relative flex flex-1 flex-col gap-2",
255
+ children: [
256
+ drag && g && drag.target.col === col.id && /* @__PURE__ */ jsx(
257
+ "li",
258
+ {
259
+ "aria-hidden": true,
260
+ className: cx(
261
+ "pointer-events-none absolute inset-x-0 top-0 rounded-[10px] bg-[color-mix(in_srgb,var(--brand)_5%,transparent)] shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--brand)_28%,transparent)] transition-transform duration-300",
262
+ EASE
263
+ ),
264
+ style: { height: drag.h, transform: `translateY(${gapTop(drag, g)}px)`, animation: `kit-kb-fade .25s ${CURVE}` }
265
+ },
266
+ `gap-${col.id}`
267
+ ),
268
+ list.map((card) => {
269
+ const held = picked?.id === card.id;
270
+ const hidden = drag?.id === card.id;
271
+ const dy = drag && g ? shiftOf(drag, g, card.id) : 0;
272
+ return /* @__PURE__ */ jsx(
273
+ "li",
274
+ {
275
+ ref: (el) => {
276
+ if (!el) return;
277
+ els.current.set(card.id, el);
278
+ return () => {
279
+ if (els.current.get(card.id) === el) els.current.delete(card.id);
280
+ };
281
+ },
282
+ tabIndex: 0,
283
+ "aria-roledescription": "draggable card",
284
+ "aria-describedby": hintId,
285
+ "data-picked": held || void 0,
286
+ onPointerDown: (e) => pointer.down(e, card),
287
+ onPointerMove: (e) => pointer.move(e, card),
288
+ onPointerUp: pointer.up,
289
+ onPointerCancel: pointer.cancel,
290
+ onKeyDown: (e) => onKey(e, card),
291
+ onBlur: () => onBlur(card.id),
292
+ className: cx(
293
+ cardCls,
294
+ "relative cursor-grab touch-none select-none outline-none focus-visible:ring-2 focus-visible:ring-brand/50",
295
+ drag && "transition-transform duration-300",
296
+ EASE,
297
+ hidden && "opacity-0",
298
+ held && "z-10 scale-[1.02] !shadow-[inset_0_0_0_1.5px_var(--brand),0_14px_30px_-14px_rgb(0_0_0/0.3)] transition-[scale,box-shadow] duration-300"
299
+ ),
300
+ style: dy ? { transform: `translateY(${dy}px)` } : void 0,
301
+ children: /* @__PURE__ */ jsx(CardBody, { card })
302
+ },
303
+ card.id
304
+ );
305
+ })
306
+ ]
307
+ }
308
+ )
309
+ ] }, col.id);
310
+ }),
311
+ drag && dragged && /* @__PURE__ */ jsx(
312
+ "div",
313
+ {
314
+ "aria-hidden": true,
315
+ className: "pointer-events-none absolute left-0 top-0 z-30",
316
+ style: {
317
+ width: drag.w,
318
+ transform: `translate3d(${drag.x}px, ${drag.y}px, 0)`,
319
+ transition: drag.dropping ? `transform .26s ${CURVE}` : "none"
320
+ },
321
+ children: /* @__PURE__ */ jsx(
322
+ "div",
323
+ {
324
+ className: cx(cardCls, "cursor-grabbing"),
325
+ style: { animation: drag.dropping ? `kit-kb-land .26s ${CURVE} both` : `kit-kb-lift .22s ${CURVE} both` },
326
+ children: /* @__PURE__ */ jsx(CardBody, { card: dragged })
327
+ }
328
+ )
329
+ }
330
+ )
331
+ ] })
332
+ ] });
333
+ }
334
+ var kanban_default = Kanban;
335
+
336
+ export {
337
+ Kanban,
338
+ kanban_default
339
+ };