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,170 @@
1
+ "use client";
2
+ import {
3
+ Button
4
+ } from "./chunk-WSL4JGEA.js";
5
+
6
+ // components/kit/base/onboarding.tsx
7
+ import { useId, useRef, useState } from "react";
8
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
+ var cx = (...c) => c.filter(Boolean).join(" ");
10
+ var EASE = "ease-[cubic-bezier(.16,1,.3,1)]";
11
+ var CURVE = "cubic-bezier(.16,1,.3,1)";
12
+ var Check = ({ className = "" }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className, fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4 8.5l2.5 2.5 5.5-6" }) });
13
+ function Mark({ done, current }) {
14
+ return /* @__PURE__ */ jsxs("span", { className: "relative flex h-5 w-5 shrink-0 items-center justify-center", "aria-hidden": true, children: [
15
+ /* @__PURE__ */ jsx(
16
+ "span",
17
+ {
18
+ className: cx(
19
+ "absolute inset-0 rounded-full transition-[opacity,transform] duration-300",
20
+ EASE,
21
+ done ? "scale-75 opacity-0" : "scale-100 opacity-100",
22
+ current ? "shadow-[inset_0_0_0_1.5px_var(--ink)]" : "shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_22%,transparent)]"
23
+ )
24
+ }
25
+ ),
26
+ /* @__PURE__ */ jsx(
27
+ "span",
28
+ {
29
+ className: cx(
30
+ "absolute inset-0 flex items-center justify-center rounded-full bg-brand text-white transition-[opacity,transform] duration-500",
31
+ EASE,
32
+ done ? "scale-100 opacity-100" : "scale-50 opacity-0"
33
+ ),
34
+ children: /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" })
35
+ }
36
+ )
37
+ ] });
38
+ }
39
+ function Onboarding({ title = "Get set up", subtitle, steps, defaultCompleted = [], onStep, onFinish, finishLabel = "Go to dashboard", className }) {
40
+ const [done, setDone] = useState(defaultCompleted);
41
+ const doneRef = useRef(done);
42
+ const firstOpen = steps.find((s) => !defaultCompleted.includes(s.id))?.id ?? null;
43
+ const [open, setOpen] = useState(firstOpen);
44
+ const [busy, setBusy] = useState(null);
45
+ const [review, setReview] = useState(false);
46
+ const uid = useId();
47
+ const total = steps.length;
48
+ const count = steps.filter((s) => done.includes(s.id)).length;
49
+ const finished = count === total && !review;
50
+ const complete = async (id) => {
51
+ try {
52
+ const r = onStep?.(id);
53
+ if (r instanceof Promise) {
54
+ setBusy(id);
55
+ await r;
56
+ }
57
+ } catch (err) {
58
+ console.error(err);
59
+ return;
60
+ } finally {
61
+ setBusy((b) => b === id ? null : b);
62
+ }
63
+ const next = doneRef.current.includes(id) ? doneRef.current : [...doneRef.current, id];
64
+ doneRef.current = next;
65
+ setDone((d) => d.includes(id) ? d : [...d, id]);
66
+ const i = steps.findIndex((s) => s.id === id);
67
+ const after = [...steps.slice(i + 1), ...steps.slice(0, i)].find((s) => !next.includes(s.id));
68
+ setOpen(after?.id ?? null);
69
+ };
70
+ return /* @__PURE__ */ jsxs(
71
+ "div",
72
+ {
73
+ className: cx(
74
+ "kit-ob relative w-full max-w-[440px] overflow-hidden rounded-[14px] bg-paper shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_18px_40px_-24px_rgb(0_0_0/0.3)]",
75
+ className
76
+ ),
77
+ children: [
78
+ /* @__PURE__ */ jsx("style", { href: "asta-onboarding", precedence: "asta", children: `
79
+ @keyframes kit-ob-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
80
+ @keyframes kit-ob-pop { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.06); } 100% { transform: none; } }
81
+ @media (prefers-reduced-motion: reduce) { .kit-ob, .kit-ob * { animation: none !important; transition-duration: 0s !important; } }
82
+ ` }),
83
+ finished ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center px-8 py-12 text-center", style: { animation: `kit-ob-in .5s ${CURVE} both` }, children: [
84
+ /* @__PURE__ */ jsx("span", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-brand text-white", style: { animation: `kit-ob-pop .6s ${CURVE} .1s both` }, children: /* @__PURE__ */ jsx(Check, { className: "h-6 w-6" }) }),
85
+ /* @__PURE__ */ jsx("h3", { className: "mt-5 text-[18px] font-medium tracking-[-0.02em] text-ink", children: "You are all set" }),
86
+ /* @__PURE__ */ jsx("p", { className: "mt-1.5 max-w-[30ch] text-[13.5px] leading-relaxed text-mute", children: "Every step is done. You can come back to this list from Settings." }),
87
+ /* @__PURE__ */ jsxs("div", { className: "mt-6 flex gap-2", children: [
88
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: () => setReview(true), children: "Review steps" }),
89
+ onFinish && /* @__PURE__ */ jsx(Button, { size: "sm", onClick: onFinish, children: finishLabel })
90
+ ] })
91
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
92
+ /* @__PURE__ */ jsxs("div", { className: "px-5 pb-4 pt-5", children: [
93
+ /* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-4", children: [
94
+ /* @__PURE__ */ jsx("h3", { className: "text-[15px] font-medium tracking-[-0.01em] text-ink", children: title }),
95
+ /* @__PURE__ */ jsxs("span", { className: "text-[12.5px] tabular-nums text-mute", children: [
96
+ count,
97
+ " of ",
98
+ total
99
+ ] })
100
+ ] }),
101
+ subtitle && /* @__PURE__ */ jsx("p", { className: "mt-1 text-[13px] text-mute", children: subtitle }),
102
+ /* @__PURE__ */ jsx(
103
+ "div",
104
+ {
105
+ role: "progressbar",
106
+ "aria-label": "Setup progress",
107
+ "aria-valuemin": 0,
108
+ "aria-valuemax": total,
109
+ "aria-valuenow": count,
110
+ className: "mt-4 h-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_8%,transparent)]",
111
+ children: /* @__PURE__ */ jsx("div", { className: cx("h-full origin-left rounded-full bg-brand transition-transform duration-700", EASE), style: { transform: `scaleX(${count / total})` } })
112
+ }
113
+ )
114
+ ] }),
115
+ /* @__PURE__ */ jsx("ol", { className: "px-2 pb-2", children: steps.map((s) => {
116
+ const isDone = done.includes(s.id);
117
+ const isOpen = open === s.id;
118
+ const panel = `${uid}-${s.id}`;
119
+ return /* @__PURE__ */ jsxs("li", { className: cx("rounded-[10px] transition-colors duration-300", isOpen && "bg-paper-2"), children: [
120
+ /* @__PURE__ */ jsxs(
121
+ "button",
122
+ {
123
+ type: "button",
124
+ "aria-expanded": isOpen,
125
+ "aria-controls": panel,
126
+ onClick: () => setOpen(isOpen ? null : s.id),
127
+ className: "flex w-full items-center gap-3 rounded-[10px] px-3 py-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-brand/50",
128
+ children: [
129
+ /* @__PURE__ */ jsx(Mark, { done: isDone, current: isOpen }),
130
+ /* @__PURE__ */ jsxs("span", { className: cx("flex-1 text-[14px] transition-colors duration-300", isDone && !isOpen ? "text-mute" : "text-ink"), children: [
131
+ s.title,
132
+ isDone && /* @__PURE__ */ jsx("span", { className: "sr-only", children: " (done)" })
133
+ ] }),
134
+ s.duration && !isDone && /* @__PURE__ */ jsx("span", { className: "text-[12px] tabular-nums text-mute", children: s.duration }),
135
+ /* @__PURE__ */ jsx(
136
+ "svg",
137
+ {
138
+ viewBox: "0 0 16 16",
139
+ className: cx("h-3.5 w-3.5 shrink-0 text-mute transition-transform duration-300", EASE, isOpen && "rotate-180"),
140
+ fill: "none",
141
+ stroke: "currentColor",
142
+ strokeWidth: "1.7",
143
+ strokeLinecap: "round",
144
+ "aria-hidden": true,
145
+ children: /* @__PURE__ */ jsx("path", { d: "m4.5 6.5 3.5 3.5 3.5-3.5" })
146
+ }
147
+ )
148
+ ]
149
+ }
150
+ ),
151
+ /* @__PURE__ */ jsx("div", { id: panel, role: "region", "aria-label": s.title, className: cx("grid transition-[grid-template-rows] duration-500", EASE, isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"), children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", inert: !isOpen, children: /* @__PURE__ */ jsxs("div", { className: cx("pb-4 pl-11 pr-4 transition-[opacity,transform] duration-500", EASE, isOpen ? "translate-y-0 opacity-100" : "-translate-y-1 opacity-0"), children: [
152
+ /* @__PURE__ */ jsx("div", { className: "text-[13px] leading-relaxed text-mute", children: s.description }),
153
+ /* @__PURE__ */ jsx("div", { className: "mt-3.5 flex items-center gap-2", children: isDone ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 text-[12.5px] text-mute", children: [
154
+ /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 text-brand" }),
155
+ "Done"
156
+ ] }) : /* @__PURE__ */ jsx(Button, { size: "sm", loading: busy === s.id, onClick: () => complete(s.id), children: s.action ?? "Mark as done" }) })
157
+ ] }) }) })
158
+ ] }, s.id);
159
+ }) })
160
+ ] })
161
+ ]
162
+ }
163
+ );
164
+ }
165
+ var onboarding_default = Onboarding;
166
+
167
+ export {
168
+ Onboarding,
169
+ onboarding_default
170
+ };
@@ -0,0 +1,271 @@
1
+ "use client";
2
+
3
+ // components/kit/data-table.tsx
4
+ import { useState } from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var KEYFRAMES = `@keyframes asta-table-row { from { opacity: 0; transform: translateY(6px) } }`;
8
+ var EASE = "cubic-bezier(.16,1,.3,1)";
9
+ var field = (row, key) => row[key];
10
+ function Check({ state, onToggle, label }) {
11
+ const on = state === true;
12
+ const mixed = state === "mixed";
13
+ return /* @__PURE__ */ jsxs(
14
+ "button",
15
+ {
16
+ type: "button",
17
+ role: "checkbox",
18
+ "aria-checked": state,
19
+ "aria-label": label,
20
+ onClick: onToggle,
21
+ className: cx(
22
+ "relative grid h-[18px] w-[18px] shrink-0 place-items-center rounded-[6px] outline-none transition-[background-color,box-shadow,transform] duration-200 active:scale-90",
23
+ "focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
24
+ on || mixed ? "bg-brand shadow-[inset_0_1px_0_rgb(255_255_255/0.2),0_1px_2px_rgb(0_0_0/0.2)]" : "bg-paper shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_22%,transparent)] hover:shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_40%,transparent)]"
25
+ ),
26
+ children: [
27
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "col-start-1 row-start-1 h-3 w-3 text-white", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx(
28
+ "path",
29
+ {
30
+ d: "M3.5 8.5l3 3 6-7",
31
+ pathLength: 1,
32
+ strokeDasharray: "1",
33
+ className: "transition-[stroke-dashoffset] ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none",
34
+ style: { strokeDashoffset: on ? 0 : 1, transitionDuration: on ? "380ms" : "120ms" }
35
+ }
36
+ ) }),
37
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cx("col-start-1 row-start-1 h-[2.2px] w-2 rounded-full bg-white transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)]", mixed ? "scale-x-100" : "scale-x-0") })
38
+ ]
39
+ }
40
+ );
41
+ }
42
+ var ALIGN = { left: "text-left justify-start", center: "text-center justify-center", right: "text-right justify-end" };
43
+ var Chevron = ({ dir }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: dir === "left" ? "M10 3.5 5.5 8l4.5 4.5" : "M6 3.5 10.5 8 6 12.5" }) });
44
+ function DataTable({
45
+ columns,
46
+ data,
47
+ getRowId,
48
+ selectable,
49
+ selected,
50
+ defaultSelected = [],
51
+ onSelectedChange,
52
+ searchable,
53
+ searchPlaceholder = "Search\u2026",
54
+ filter,
55
+ pageSize = 8,
56
+ actions,
57
+ empty,
58
+ maxHeight,
59
+ label,
60
+ className
61
+ }) {
62
+ const [query, setQuery] = useState("");
63
+ const [sort, setSort] = useState(null);
64
+ const [page, setPage] = useState(0);
65
+ const [inner, setInner] = useState(defaultSelected);
66
+ const present = new Set(data.map(getRowId));
67
+ const picked = new Set((selected ?? inner).filter((id) => present.has(id)));
68
+ const setPicked = (next) => {
69
+ const ids = [...next];
70
+ if (selected === void 0) setInner(ids);
71
+ onSelectedChange?.(ids);
72
+ };
73
+ const q = query.trim().toLowerCase();
74
+ const rows = q ? data.filter((r) => filter ? filter(r, q) : columns.some((c) => String(field(r, c.key) ?? "").toLowerCase().includes(q))) : data;
75
+ const sortCol = sort && columns.find((c) => c.key === sort.key);
76
+ const sorted = sortCol ? [...rows].sort((a, b) => {
77
+ const va = sortCol.sortValue ? sortCol.sortValue(a) : field(a, sortCol.key);
78
+ const vb = sortCol.sortValue ? sortCol.sortValue(b) : field(b, sortCol.key);
79
+ const d = typeof va === "number" && typeof vb === "number" ? va - vb : String(va ?? "").localeCompare(String(vb ?? ""), void 0, { numeric: true });
80
+ return sort.dir === "asc" ? d : -d;
81
+ }) : rows;
82
+ const size = pageSize > 0 ? pageSize : Math.max(1, sorted.length);
83
+ const pages = Math.max(1, Math.ceil(sorted.length / size));
84
+ const pg = Math.min(page, pages - 1);
85
+ const view = sorted.slice(pg * size, pg * size + size);
86
+ const pageIds = view.map(getRowId);
87
+ const onPage = pageIds.filter((id) => picked.has(id)).length;
88
+ const allState = onPage === 0 ? false : onPage === pageIds.length ? true : "mixed";
89
+ const toggleAll = () => {
90
+ const next = new Set(picked);
91
+ if (allState === true) pageIds.forEach((id) => next.delete(id));
92
+ else pageIds.forEach((id) => next.add(id));
93
+ setPicked(next);
94
+ };
95
+ const toggle = (id) => {
96
+ const next = new Set(picked);
97
+ if (next.has(id)) next.delete(id);
98
+ else next.add(id);
99
+ setPicked(next);
100
+ };
101
+ const cycle = (key) => {
102
+ setSort((s) => !s || s.key !== key ? { key, dir: "asc" } : s.dir === "asc" ? { key, dir: "desc" } : null);
103
+ setPage(0);
104
+ };
105
+ const selectedRows = data.filter((r) => picked.has(getRowId(r)));
106
+ const pass = `${sort?.key ?? ""}:${sort?.dir ?? ""}:${pg}:${q}`;
107
+ const cols = columns.length + (selectable ? 1 : 0);
108
+ return /* @__PURE__ */ jsxs("div", { className: cx("flex w-full flex-col gap-3", className), children: [
109
+ /* @__PURE__ */ jsx("style", { href: "asta-data-table", precedence: "asta", children: KEYFRAMES }),
110
+ (searchable || actions) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
111
+ searchable && /* @__PURE__ */ jsxs("label", { className: "flex h-9 min-w-0 flex-1 items-center gap-2 rounded-lg bg-paper px-3 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] transition-shadow duration-200 focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)] sm:max-w-[280px]", children: [
112
+ /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5 shrink-0 text-mute", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": true, children: [
113
+ /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "4.5" }),
114
+ /* @__PURE__ */ jsx("path", { d: "m10.5 10.5 3 3" })
115
+ ] }),
116
+ /* @__PURE__ */ jsx(
117
+ "input",
118
+ {
119
+ type: "search",
120
+ value: query,
121
+ onChange: (e) => {
122
+ setQuery(e.target.value);
123
+ setPage(0);
124
+ },
125
+ placeholder: searchPlaceholder,
126
+ "aria-label": searchPlaceholder.replace(/…$/, ""),
127
+ className: "h-full min-w-0 flex-1 bg-transparent text-[13.5px] text-ink outline-none placeholder:text-mute [&::-webkit-search-cancel-button]:hidden"
128
+ }
129
+ )
130
+ ] }),
131
+ actions && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-2", children: actions(selectedRows) })
132
+ ] }),
133
+ /* @__PURE__ */ jsx("div", { className: "relative rounded-xl bg-paper after:pointer-events-none after:absolute after:inset-0 after:z-20 after:rounded-xl after:shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]", children: /* @__PURE__ */ jsx("div", { className: "overflow-auto rounded-xl", style: { maxHeight }, children: /* @__PURE__ */ jsxs("table", { "aria-label": label, className: "w-full border-separate border-spacing-0 text-[13.5px]", children: [
134
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
135
+ selectable && /* @__PURE__ */ jsx("th", { scope: "col", className: "sticky top-0 z-10 w-11 bg-paper-2 py-2.5 pl-4 pr-1", children: /* @__PURE__ */ jsx(Check, { state: allState, onToggle: toggleAll, label: allState === true ? "Deselect all rows on this page" : "Select all rows on this page" }) }),
136
+ columns.map((c) => {
137
+ const active = sort?.key === c.key;
138
+ const align = ALIGN[c.align ?? "left"];
139
+ return /* @__PURE__ */ jsx(
140
+ "th",
141
+ {
142
+ scope: "col",
143
+ "aria-sort": active ? sort.dir === "asc" ? "ascending" : "descending" : c.sortable ? "none" : void 0,
144
+ style: { width: c.width },
145
+ className: cx("sticky top-0 z-10 whitespace-nowrap bg-paper-2 px-4 py-2.5 text-[12px] font-medium text-mute", align),
146
+ children: c.sortable ? /* @__PURE__ */ jsxs(
147
+ "button",
148
+ {
149
+ type: "button",
150
+ onClick: () => cycle(c.key),
151
+ className: cx(
152
+ "group/sort -mx-1.5 inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 outline-none transition-colors duration-150 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50",
153
+ active && "text-ink",
154
+ c.align === "right" && "flex-row-reverse"
155
+ ),
156
+ children: [
157
+ c.header,
158
+ /* @__PURE__ */ jsx(
159
+ "svg",
160
+ {
161
+ viewBox: "0 0 16 16",
162
+ className: cx(
163
+ "h-3 w-3 transition-[transform,opacity] duration-300 ease-[cubic-bezier(.16,1,.3,1)]",
164
+ active ? "opacity-100" : "opacity-0 group-hover/sort:opacity-40 group-focus-visible/sort:opacity-40",
165
+ active && sort.dir === "desc" && "rotate-180"
166
+ ),
167
+ fill: "none",
168
+ stroke: "currentColor",
169
+ strokeWidth: "1.8",
170
+ strokeLinecap: "round",
171
+ strokeLinejoin: "round",
172
+ "aria-hidden": true,
173
+ children: /* @__PURE__ */ jsx("path", { d: "M8 12.5v-9M4.5 7 8 3.5 11.5 7" })
174
+ }
175
+ )
176
+ ]
177
+ }
178
+ ) : c.header
179
+ },
180
+ c.key
181
+ );
182
+ })
183
+ ] }) }),
184
+ /* @__PURE__ */ jsx("tbody", { children: view.length === 0 ? /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: cols, className: "px-4 py-14 text-center", children: q ? /* @__PURE__ */ jsxs("div", { className: "mx-auto flex max-w-[260px] flex-col items-center gap-1.5", children: [
185
+ /* @__PURE__ */ jsx("span", { className: "grid h-10 w-10 place-items-center rounded-[10px] bg-paper-2 text-mute", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", "aria-hidden": true, children: [
186
+ /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "4.5" }),
187
+ /* @__PURE__ */ jsx("path", { d: "m10.5 10.5 3 3M5.5 7h3" })
188
+ ] }) }),
189
+ /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-[14px] font-medium text-ink", children: "No matches" }),
190
+ /* @__PURE__ */ jsxs("p", { className: "text-[13px] text-mute", children: [
191
+ "Nothing matches \u201C",
192
+ query.trim(),
193
+ "\u201D."
194
+ ] }),
195
+ /* @__PURE__ */ jsx(
196
+ "button",
197
+ {
198
+ type: "button",
199
+ onClick: () => setQuery(""),
200
+ className: "mt-2 h-8 rounded-md px-3 text-[13px] font-medium text-ink outline-none shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] transition-colors hover:bg-paper-2 focus-visible:ring-2 focus-visible:ring-brand/50",
201
+ children: "Clear search"
202
+ }
203
+ )
204
+ ] }) : empty ?? /* @__PURE__ */ jsx("p", { className: "text-[13.5px] text-mute", children: "No rows yet." }) }) }) : view.map((row, i) => {
205
+ const id = getRowId(row);
206
+ const on = picked.has(id);
207
+ return /* @__PURE__ */ jsxs(
208
+ "tr",
209
+ {
210
+ className: cx("group/row transition-colors duration-150 motion-reduce:!animate-none", on ? "bg-[color-mix(in_srgb,var(--brand)_7%,transparent)]" : "hover:bg-[color-mix(in_srgb,var(--ink)_3%,transparent)]"),
211
+ style: { animation: `asta-table-row .42s ${EASE} ${Math.min(i, 12) * 28}ms both` },
212
+ children: [
213
+ selectable && /* @__PURE__ */ jsx("td", { className: "py-3 pl-4 pr-1 align-middle", children: /* @__PURE__ */ jsx(Check, { state: on, onToggle: () => toggle(id), label: `Select row ${pg * size + i + 1}` }) }),
214
+ columns.map((c) => /* @__PURE__ */ jsx("td", { className: cx("whitespace-nowrap px-4 py-3 align-middle text-ink-2", ALIGN[c.align ?? "left"], c.align === "right" && "tabular-nums"), children: c.cell ? c.cell(row) : String(field(row, c.key) ?? "") }, c.key))
215
+ ]
216
+ },
217
+ id
218
+ );
219
+ }) }, pass)
220
+ ] }) }) }),
221
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3 px-1 text-[12.5px] text-mute", children: [
222
+ /* @__PURE__ */ jsx("p", { className: "tabular-nums", "aria-live": "polite", children: selectable && picked.size > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
223
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-ink", children: picked.size }),
224
+ " selected",
225
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => setPicked(/* @__PURE__ */ new Set()), className: "ml-2 rounded px-1 text-ink-2 underline-offset-2 outline-none hover:text-ink hover:underline focus-visible:ring-2 focus-visible:ring-brand/50", children: "Clear" })
226
+ ] }) : sorted.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
227
+ pg * size + 1,
228
+ "\u2013",
229
+ Math.min(sorted.length, pg * size + size),
230
+ " of ",
231
+ sorted.length
232
+ ] }) : "0 rows" }),
233
+ pages > 1 && /* @__PURE__ */ jsxs("nav", { "aria-label": "Pagination", className: "flex items-center gap-1", children: [
234
+ /* @__PURE__ */ jsx(
235
+ "button",
236
+ {
237
+ type: "button",
238
+ "aria-label": "Previous page",
239
+ disabled: pg === 0,
240
+ onClick: () => setPage(pg - 1),
241
+ className: "grid h-7 w-7 place-items-center rounded-md text-ink-2 outline-none transition-[background-color,transform,opacity] hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-90 disabled:pointer-events-none disabled:opacity-30",
242
+ children: /* @__PURE__ */ jsx(Chevron, { dir: "left" })
243
+ }
244
+ ),
245
+ /* @__PURE__ */ jsxs("span", { className: "min-w-[70px] text-center tabular-nums", children: [
246
+ "Page ",
247
+ /* @__PURE__ */ jsx("span", { className: "text-ink", children: pg + 1 }),
248
+ " of ",
249
+ pages
250
+ ] }),
251
+ /* @__PURE__ */ jsx(
252
+ "button",
253
+ {
254
+ type: "button",
255
+ "aria-label": "Next page",
256
+ disabled: pg >= pages - 1,
257
+ onClick: () => setPage(pg + 1),
258
+ className: "grid h-7 w-7 place-items-center rounded-md text-ink-2 outline-none transition-[background-color,transform,opacity] hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 active:scale-90 disabled:pointer-events-none disabled:opacity-30",
259
+ children: /* @__PURE__ */ jsx(Chevron, { dir: "right" })
260
+ }
261
+ )
262
+ ] })
263
+ ] })
264
+ ] });
265
+ }
266
+ var data_table_default = DataTable;
267
+
268
+ export {
269
+ DataTable,
270
+ data_table_default
271
+ };
@@ -0,0 +1,170 @@
1
+ "use client";
2
+
3
+ // components/kit/breadcrumb.tsx
4
+ import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var KEYFRAMES = `@keyframes asta-crumb-menu { from { opacity: 0; transform: translateY(-4px) scale(.97) } }`;
8
+ var Chevron = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m6 3.5 4.5 4.5L6 12.5" }) });
9
+ var LINK = "flex min-w-0 items-center gap-1.5 rounded-md text-mute outline-none transition-colors hover:text-ink focus-visible:text-ink focus-visible:ring-2 focus-visible:ring-brand/50";
10
+ function Item({ item, current, renderLink }) {
11
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
12
+ item.icon && /* @__PURE__ */ jsx("span", { className: "flex shrink-0", children: item.icon }),
13
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: item.label })
14
+ ] });
15
+ if (current)
16
+ return /* @__PURE__ */ jsx("span", { "aria-current": "page", className: "flex min-w-0 items-center gap-1.5 font-medium text-ink", children: body });
17
+ if (item.href) {
18
+ if (renderLink) return /* @__PURE__ */ jsx(Fragment, { children: renderLink({ href: item.href, className: LINK, children: body, onClick: item.onClick }) });
19
+ return /* @__PURE__ */ jsx("a", { href: item.href, onClick: item.onClick, className: LINK, children: body });
20
+ }
21
+ return /* @__PURE__ */ jsx("button", { type: "button", onClick: item.onClick, className: LINK, children: body });
22
+ }
23
+ function Overflow({ items }) {
24
+ const [open, setOpen] = useState(false);
25
+ const id = useId();
26
+ const root = useRef(null);
27
+ const btn = useRef(null);
28
+ const menu = useRef(null);
29
+ useEffect(() => {
30
+ if (!open) return;
31
+ menu.current?.querySelector("[role=menuitem]")?.focus();
32
+ const onDown = (e) => {
33
+ if (!root.current?.contains(e.target)) setOpen(false);
34
+ };
35
+ document.addEventListener("pointerdown", onDown);
36
+ return () => document.removeEventListener("pointerdown", onDown);
37
+ }, [open]);
38
+ const onKey = (e) => {
39
+ const all = [...menu.current?.querySelectorAll("[role=menuitem]") ?? []];
40
+ const i = all.indexOf(document.activeElement);
41
+ let next = -1;
42
+ if (e.key === "ArrowDown") next = (i + 1) % all.length;
43
+ else if (e.key === "ArrowUp") next = (i - 1 + all.length) % all.length;
44
+ else if (e.key === "Home") next = 0;
45
+ else if (e.key === "End") next = all.length - 1;
46
+ else if (e.key === "Escape" || e.key === "Tab") {
47
+ if (e.key === "Escape") e.preventDefault();
48
+ setOpen(false);
49
+ btn.current?.focus();
50
+ return;
51
+ } else return;
52
+ e.preventDefault();
53
+ all[next]?.focus();
54
+ };
55
+ const ROW = "flex w-full min-w-0 items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-[13px] text-ink-2 outline-none transition-colors hover:bg-paper-2 hover:text-ink focus-visible:bg-paper-2 focus-visible:text-ink";
56
+ return /* @__PURE__ */ jsxs("div", { ref: root, className: "relative flex", children: [
57
+ /* @__PURE__ */ jsx(
58
+ "button",
59
+ {
60
+ ref: btn,
61
+ type: "button",
62
+ "aria-label": `Show ${items.length} more`,
63
+ "aria-haspopup": "menu",
64
+ "aria-expanded": open,
65
+ "aria-controls": open ? id : void 0,
66
+ onClick: () => setOpen((o) => !o),
67
+ onKeyDown: (e) => {
68
+ if (e.key === "ArrowDown") {
69
+ e.preventDefault();
70
+ setOpen(true);
71
+ }
72
+ },
73
+ className: cx(
74
+ "flex h-6 w-7 items-center justify-center rounded-md text-mute outline-none transition-colors hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50",
75
+ open && "bg-paper-2 text-ink"
76
+ ),
77
+ children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "currentColor", "aria-hidden": true, children: [
78
+ /* @__PURE__ */ jsx("circle", { cx: "3.5", cy: "8", r: "1.25" }),
79
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "1.25" }),
80
+ /* @__PURE__ */ jsx("circle", { cx: "12.5", cy: "8", r: "1.25" })
81
+ ] })
82
+ }
83
+ ),
84
+ open && /* @__PURE__ */ jsx(
85
+ "div",
86
+ {
87
+ ref: menu,
88
+ id,
89
+ role: "menu",
90
+ "aria-label": "Hidden pages",
91
+ onKeyDown: onKey,
92
+ className: "absolute left-0 top-full z-50 mt-1.5 flex w-max min-w-40 max-w-64 origin-top-left flex-col rounded-[10px] bg-paper p-1 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent),0_14px_32px_-14px_rgb(0_0_0/0.3)] animate-[asta-crumb-menu_.22s_cubic-bezier(.16,1,.3,1)_both] motion-reduce:animate-none",
93
+ children: items.map((item) => {
94
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
95
+ item.icon && /* @__PURE__ */ jsx("span", { className: "flex shrink-0 text-mute", children: item.icon }),
96
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: item.label })
97
+ ] });
98
+ const close = () => {
99
+ item.onClick?.();
100
+ setOpen(false);
101
+ };
102
+ return item.href ? /* @__PURE__ */ jsx("a", { role: "menuitem", tabIndex: -1, href: item.href, onClick: close, className: ROW, children: body }, item.label) : /* @__PURE__ */ jsx("button", { role: "menuitem", tabIndex: -1, type: "button", onClick: close, className: ROW, children: body }, item.label);
103
+ })
104
+ }
105
+ )
106
+ ] });
107
+ }
108
+ function Breadcrumb({ items, separator, collapse = "auto", renderLink, className }) {
109
+ const wrap = useRef(null);
110
+ const measure = useRef(null);
111
+ const [fit, setFit] = useState(0);
112
+ const sep = separator ?? /* @__PURE__ */ jsx(Chevron, {});
113
+ const capped = typeof collapse === "number" ? Math.max(0, items.length - Math.max(2, collapse)) : 0;
114
+ const hidden = collapse === "auto" ? fit : capped;
115
+ useLayoutEffect(() => {
116
+ if (collapse !== "auto") return;
117
+ const calc = () => {
118
+ const box = wrap.current;
119
+ const ol = measure.current;
120
+ if (!box || !ol) return;
121
+ const kids = [...ol.children];
122
+ const more = kids.pop().offsetWidth;
123
+ const widths = kids.map((k) => k.offsetWidth);
124
+ const room = box.clientWidth;
125
+ let total = widths.reduce((a, b) => a + b, 0);
126
+ let n = 0;
127
+ while (total > room && n < items.length - 2) {
128
+ total -= widths[n + 1];
129
+ if (n === 0) total += more;
130
+ n++;
131
+ }
132
+ setFit(n);
133
+ };
134
+ calc();
135
+ const ro = new ResizeObserver(calc);
136
+ ro.observe(wrap.current);
137
+ return () => ro.disconnect();
138
+ }, [collapse, items]);
139
+ const folded = hidden > 0 ? items.slice(1, 1 + hidden) : [];
140
+ const shown = hidden > 0 ? [items[0], "more", ...items.slice(1 + hidden)] : items;
141
+ const li = "flex min-w-0 items-center gap-1.5";
142
+ const sepEl = /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "flex shrink-0 text-[color-mix(in_srgb,var(--ink)_28%,transparent)]", children: sep });
143
+ return /* @__PURE__ */ jsxs("nav", { ref: wrap, "aria-label": "Breadcrumb", className: cx("relative min-w-0 text-[13.5px]", className), children: [
144
+ /* @__PURE__ */ jsx("style", { href: "asta-breadcrumb", precedence: "asta", children: KEYFRAMES }),
145
+ /* @__PURE__ */ jsx("ol", { className: "flex min-w-0 items-center gap-1.5", children: shown.map((item, i) => {
146
+ const last = i === shown.length - 1;
147
+ return /* @__PURE__ */ jsxs("li", { className: cx(li, item === "more" || i === 0 ? "shrink-0" : last ? "min-w-8 shrink" : "shrink-[2]"), children: [
148
+ item === "more" ? /* @__PURE__ */ jsx(Overflow, { items: folded }) : /* @__PURE__ */ jsx(Item, { item, current: last, renderLink }),
149
+ !last && sepEl
150
+ ] }, item === "more" ? "more" : item.label + i);
151
+ }) }),
152
+ collapse === "auto" && /* @__PURE__ */ jsxs("ol", { ref: measure, "aria-hidden": true, className: "pointer-events-none invisible absolute left-0 top-0 flex w-max items-center gap-0 whitespace-nowrap", children: [
153
+ items.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5 pr-1.5", children: [
154
+ item.icon && /* @__PURE__ */ jsx("span", { className: "flex", children: item.icon }),
155
+ /* @__PURE__ */ jsx("span", { className: i === items.length - 1 ? "font-medium" : void 0, children: item.label }),
156
+ i < items.length - 1 && sepEl
157
+ ] }, item.label + i)),
158
+ /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5 pr-1.5", children: [
159
+ /* @__PURE__ */ jsx("span", { className: "w-7" }),
160
+ sepEl
161
+ ] })
162
+ ] })
163
+ ] });
164
+ }
165
+ var breadcrumb_default = Breadcrumb;
166
+
167
+ export {
168
+ Breadcrumb,
169
+ breadcrumb_default
170
+ };