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,435 @@
1
+ "use client";
2
+ import {
3
+ Select
4
+ } from "./chunk-SAJ4D3Z2.js";
5
+ import {
6
+ Avatar
7
+ } from "./chunk-HNO6EUGJ.js";
8
+ import {
9
+ Button
10
+ } from "./chunk-ZWBJUJTR.js";
11
+
12
+ // components/kit/team-members.tsx
13
+ import { useEffect, useId, useLayoutEffect, useRef, useState } from "react";
14
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
+ var cx = (...c) => c.filter(Boolean).join(" ");
16
+ var CURVE = "cubic-bezier(.16,1,.3,1)";
17
+ var DEFAULT_ROLES = [
18
+ { value: "owner", label: "Owner" },
19
+ { value: "admin", label: "Admin" },
20
+ { value: "member", label: "Member" },
21
+ { value: "viewer", label: "Viewer" }
22
+ ];
23
+ var KEYFRAMES = `@keyframes kit-tm-in { from { opacity: 0; transform: translateY(6px) } }
24
+ @keyframes kit-tm-chip { from { opacity: 0; transform: scale(.85) } }
25
+ @keyframes kit-tm-swap { from { opacity: 0; transform: translateX(-6px) } }
26
+ @keyframes kit-tm-count { from { transform: scaleX(1) } to { transform: scaleX(0) } }
27
+ @media (prefers-reduced-motion: reduce) { .kit-tm, .kit-tm * { animation: none !important; transition-duration: 0s !important; } }`;
28
+ var EMAIL = /^[^\s@,;]+@[^\s@,;]+\.[^\s@,;]+$/;
29
+ var seq = 0;
30
+ var uid = () => `t${Date.now().toString(36)}${(seq++).toString(36)}`;
31
+ var reduced = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
32
+ function useFlip(deps) {
33
+ const els = useRef(/* @__PURE__ */ new Map());
34
+ const before = useRef(null);
35
+ const snap = () => {
36
+ before.current = new Map([...els.current].map(([k, el]) => [k, el.getBoundingClientRect()]));
37
+ };
38
+ useLayoutEffect(() => {
39
+ const from = before.current;
40
+ before.current = null;
41
+ if (!from || reduced()) return;
42
+ from.forEach((r, k) => {
43
+ const el = els.current.get(k);
44
+ if (!el) return;
45
+ const dy = r.top - el.getBoundingClientRect().top;
46
+ if (dy) el.animate([{ transform: `translateY(${dy}px)` }, { transform: "none" }], { duration: 380, easing: CURVE });
47
+ });
48
+ }, deps);
49
+ const reg = (k) => (el) => {
50
+ if (el) els.current.set(k, el);
51
+ else els.current.delete(k);
52
+ };
53
+ return { snap, reg };
54
+ }
55
+ function EmailChips({
56
+ chips,
57
+ onChange,
58
+ taken,
59
+ disabled,
60
+ label
61
+ }) {
62
+ const [text, setText] = useState("");
63
+ const [armed, setArmed] = useState(false);
64
+ const input = useRef(null);
65
+ const id = useId();
66
+ const add = (raw) => {
67
+ const parts = raw.split(/[\s,;]+/).map((s) => s.trim().toLowerCase()).filter(Boolean);
68
+ if (!parts.length) return;
69
+ const have = new Set(chips.map((c) => c.email));
70
+ const next = [...chips];
71
+ for (const email of parts) {
72
+ if (have.has(email)) continue;
73
+ have.add(email);
74
+ next.push({ id: uid(), email, problem: !EMAIL.test(email) ? "not a valid email" : taken(email) });
75
+ }
76
+ onChange(next);
77
+ setText("");
78
+ };
79
+ const onKey = (e) => {
80
+ if (e.key === "Enter" || e.key === "," || e.key === " " || e.key === ";" || e.key === "Tab" && text.trim()) {
81
+ if (!text.trim()) return;
82
+ e.preventDefault();
83
+ add(text);
84
+ } else if (e.key === "Backspace" && !text && chips.length) {
85
+ e.preventDefault();
86
+ if (armed) {
87
+ onChange(chips.slice(0, -1));
88
+ setArmed(false);
89
+ } else setArmed(true);
90
+ } else setArmed(false);
91
+ };
92
+ return /* @__PURE__ */ jsxs(
93
+ "div",
94
+ {
95
+ onPointerDown: (e) => {
96
+ if (e.target === e.currentTarget) {
97
+ e.preventDefault();
98
+ input.current?.focus();
99
+ }
100
+ },
101
+ className: cx(
102
+ "flex min-h-10 flex-1 flex-wrap items-center gap-1.5 rounded-lg bg-paper px-2 py-1.5 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_12%,transparent)] transition-shadow duration-200 focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_3px_color-mix(in_srgb,var(--brand)_14%,transparent)]",
103
+ disabled && "pointer-events-none opacity-60"
104
+ ),
105
+ children: [
106
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "sr-only", children: label }),
107
+ chips.map((c, i) => {
108
+ const hot = armed && i === chips.length - 1;
109
+ return /* @__PURE__ */ jsxs(
110
+ "span",
111
+ {
112
+ className: cx(
113
+ "inline-flex h-7 max-w-full items-center gap-1 rounded-md pl-2 pr-0.5 text-[12.5px] transition-shadow duration-200",
114
+ c.problem ? "text-mute outline outline-1 -outline-offset-1 outline-dashed outline-[color-mix(in_srgb,var(--ink)_35%,transparent)]" : "bg-paper-2 text-ink",
115
+ hot && "shadow-[inset_0_0_0_1.5px_var(--brand)]"
116
+ ),
117
+ style: { animation: `kit-tm-chip .3s ${CURVE}` },
118
+ title: c.problem ? `${c.email}: ${c.problem}` : void 0,
119
+ children: [
120
+ /* @__PURE__ */ jsx("span", { className: cx("truncate", c.problem && "line-through decoration-[color-mix(in_srgb,var(--ink)_35%,transparent)]"), children: c.email }),
121
+ c.problem && /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
122
+ ", ",
123
+ c.problem
124
+ ] }),
125
+ /* @__PURE__ */ jsx(
126
+ "button",
127
+ {
128
+ type: "button",
129
+ "aria-label": `Remove ${c.email}`,
130
+ onClick: () => {
131
+ onChange(chips.filter((x) => x.id !== c.id));
132
+ input.current?.focus();
133
+ },
134
+ className: "grid h-5 w-5 place-items-center rounded text-mute outline-none transition-colors hover:bg-[color-mix(in_srgb,var(--ink)_8%,transparent)] hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50",
135
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", className: "h-2.5 w-2.5", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 3l6 6M9 3 3 9" }) })
136
+ }
137
+ )
138
+ ]
139
+ },
140
+ c.id
141
+ );
142
+ }),
143
+ /* @__PURE__ */ jsx(
144
+ "input",
145
+ {
146
+ ref: input,
147
+ id,
148
+ type: "email",
149
+ multiple: true,
150
+ value: text,
151
+ disabled,
152
+ placeholder: chips.length ? "" : "name@company.com, another@company.com",
153
+ onChange: (e) => {
154
+ setText(e.target.value);
155
+ setArmed(false);
156
+ },
157
+ onKeyDown: onKey,
158
+ onPaste: (e) => {
159
+ const t = e.clipboardData.getData("text");
160
+ if (/[\s,;]/.test(t.trim())) {
161
+ e.preventDefault();
162
+ add(text + t);
163
+ }
164
+ },
165
+ onBlur: () => {
166
+ setArmed(false);
167
+ if (text.trim()) add(text);
168
+ },
169
+ className: "h-7 min-w-[140px] flex-1 bg-transparent px-1 text-[13.5px] text-ink outline-none placeholder:text-mute"
170
+ }
171
+ )
172
+ ]
173
+ }
174
+ );
175
+ }
176
+ var iconBtn = "grid h-8 w-8 shrink-0 place-items-center rounded-md text-mute outline-none transition-colors duration-200 hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50 disabled:pointer-events-none disabled:opacity-30";
177
+ function TeamMembers({
178
+ defaultMembers,
179
+ defaultInvites = [],
180
+ roles = DEFAULT_ROLES,
181
+ defaultInviteRole,
182
+ onInvite,
183
+ onRoleChange,
184
+ onRemove,
185
+ onRevoke,
186
+ onResend,
187
+ undoMs = 5e3,
188
+ title = "Team",
189
+ className
190
+ }) {
191
+ const [members, setMembers] = useState(defaultMembers);
192
+ const [invites, setInvites] = useState(defaultInvites);
193
+ const [chips, setChips] = useState([]);
194
+ const [inviteRole, setInviteRole] = useState(defaultInviteRole ?? roles[roles.length - 1]?.value ?? "");
195
+ const [sending, setSending] = useState(false);
196
+ const [inviteMsg, setInviteMsg] = useState("");
197
+ const [removing, setRemoving] = useState([]);
198
+ const [resent, setResent] = useState([]);
199
+ const [status, setStatus] = useState("");
200
+ const timers = useRef(/* @__PURE__ */ new Map());
201
+ const removingRef = useRef(removing);
202
+ const onRemoveRef = useRef(onRemove);
203
+ const listHead = useRef(null);
204
+ const alive = useRef(true);
205
+ useEffect(() => {
206
+ removingRef.current = removing;
207
+ onRemoveRef.current = onRemove;
208
+ });
209
+ useEffect(() => {
210
+ alive.current = true;
211
+ const t = timers.current;
212
+ return () => {
213
+ alive.current = false;
214
+ t.forEach((x) => clearTimeout(x));
215
+ t.clear();
216
+ removingRef.current.forEach((id) => onRemoveRef.current?.(id));
217
+ };
218
+ }, []);
219
+ const memberFlip = useFlip([members]);
220
+ const inviteFlip = useFlip([invites]);
221
+ const root = useRef(null);
222
+ const refocus = useRef(null);
223
+ const setRefocus = (k) => {
224
+ refocus.current = k;
225
+ };
226
+ useLayoutEffect(() => {
227
+ const k = refocus.current;
228
+ if (!k) return;
229
+ refocus.current = null;
230
+ root.current?.querySelector(`[data-tm-focus="${k}"]`)?.focus();
231
+ });
232
+ const roleLabel = (v) => roles.find((r) => r.value === v)?.label ?? v;
233
+ const taken = (email) => members.some((m) => m.email.toLowerCase() === email) ? "already on the team" : invites.some((i) => i.email.toLowerCase() === email) ? "already invited" : void 0;
234
+ const freeChip = (email, problem) => {
235
+ const e = email.toLowerCase();
236
+ setChips((cs) => cs.some((c) => c.email === e && c.problem === problem) ? cs.map((c) => c.email === e && c.problem === problem ? { ...c, problem: void 0 } : c) : cs);
237
+ };
238
+ const finalize = (id) => {
239
+ timers.current.delete(id);
240
+ const gone = members.find((m) => m.id === id);
241
+ const name = gone?.name;
242
+ if (gone) freeChip(gone.email, "already on the team");
243
+ const hadFocus = !!document.activeElement?.closest(`[data-tm-row="${id}"]`);
244
+ memberFlip.snap();
245
+ setMembers((all) => all.filter((m) => m.id !== id));
246
+ setRemoving((r) => r.filter((x) => x !== id));
247
+ onRemoveRef.current?.(id);
248
+ if (name) setStatus(`${name} removed.`);
249
+ if (hadFocus) listHead.current?.focus();
250
+ };
251
+ const remove = (m) => {
252
+ setRemoving((r) => [...r, m.id]);
253
+ setStatus(`${m.name} will be removed. Press Undo to keep them.`);
254
+ setRefocus(`undo-${m.id}`);
255
+ timers.current.set(
256
+ m.id,
257
+ setTimeout(() => finalize(m.id), undoMs)
258
+ );
259
+ };
260
+ const undo = (m) => {
261
+ clearTimeout(timers.current.get(m.id));
262
+ timers.current.delete(m.id);
263
+ setRemoving((r) => r.filter((x) => x !== m.id));
264
+ setStatus(`${m.name} kept.`);
265
+ setRefocus(`remove-${m.id}`);
266
+ };
267
+ const changeRole = (m, role) => {
268
+ setMembers((all) => all.map((x) => x.id === m.id ? { ...x, role } : x));
269
+ onRoleChange?.(m.id, role);
270
+ setStatus(`${m.name} is now ${roleLabel(role)}.`);
271
+ };
272
+ const good = chips.filter((c) => !c.problem);
273
+ const bad = chips.length - good.length;
274
+ const send = async () => {
275
+ if (!good.length || bad || sending) return;
276
+ const emails = good.map((c) => c.email);
277
+ setSending(true);
278
+ setInviteMsg("");
279
+ try {
280
+ await onInvite?.(emails, inviteRole);
281
+ if (!alive.current) return;
282
+ inviteFlip.snap();
283
+ setInvites((all) => [...emails.map((email) => ({ id: uid(), email, role: inviteRole, sent: "just now" })), ...all]);
284
+ setChips([]);
285
+ const msg = `Invited ${emails.length === 1 ? emails[0] : `${emails.length} people`} as ${roleLabel(inviteRole)}.`;
286
+ setInviteMsg(msg);
287
+ setStatus(msg);
288
+ } catch {
289
+ if (!alive.current) return;
290
+ setInviteMsg("Couldn't send the invites. Try again.");
291
+ setStatus("Couldn't send the invites.");
292
+ } finally {
293
+ if (alive.current) setSending(false);
294
+ }
295
+ };
296
+ const revoke = (inv) => {
297
+ const i = invites.findIndex((x) => x.id === inv.id);
298
+ const next = invites[i + 1] ?? invites[i - 1];
299
+ inviteFlip.snap();
300
+ setInvites((all) => all.filter((x) => x.id !== inv.id));
301
+ onRevoke?.(inv.id);
302
+ freeChip(inv.email, "already invited");
303
+ setStatus(`Invite to ${inv.email} revoked.`);
304
+ setRefocus(next ? `revoke-${next.id}` : "invite-input");
305
+ };
306
+ const resend = (inv) => {
307
+ onResend?.(inv.id);
308
+ setResent((r) => [...r, inv.id]);
309
+ setStatus(`Invite sent again to ${inv.email}.`);
310
+ clearTimeout(timers.current.get(`resend-${inv.id}`));
311
+ timers.current.set(
312
+ `resend-${inv.id}`,
313
+ setTimeout(() => {
314
+ timers.current.delete(`resend-${inv.id}`);
315
+ setResent((r) => r.filter((x) => x !== inv.id));
316
+ }, 2200)
317
+ );
318
+ };
319
+ const count = members.length - removing.length;
320
+ return /* @__PURE__ */ jsxs("div", { ref: root, className: cx("kit-tm w-full", className), children: [
321
+ /* @__PURE__ */ jsx("style", { href: "asta-team-members", precedence: "asta", children: KEYFRAMES }),
322
+ /* @__PURE__ */ jsx("p", { className: "sr-only", "aria-live": "polite", children: status }),
323
+ /* @__PURE__ */ jsxs("header", { className: "flex items-baseline justify-between gap-4", children: [
324
+ /* @__PURE__ */ jsx("h3", { className: "text-[17px] font-medium tracking-[-0.02em] text-ink", children: title }),
325
+ /* @__PURE__ */ jsxs("p", { className: "text-[12.5px] tabular-nums text-mute", children: [
326
+ count,
327
+ " member",
328
+ count === 1 ? "" : "s",
329
+ invites.length > 0 && ` \xB7 ${invites.length} pending`
330
+ ] })
331
+ ] }),
332
+ /* @__PURE__ */ jsxs(
333
+ "form",
334
+ {
335
+ className: "mt-5 rounded-[12px] bg-paper-2 p-3",
336
+ onSubmit: (e) => {
337
+ e.preventDefault();
338
+ send();
339
+ },
340
+ children: [
341
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start", children: [
342
+ /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", "data-tm-focus": "invite-input", tabIndex: -1, onFocus: (e) => {
343
+ if (e.target === e.currentTarget) e.currentTarget.querySelector("input")?.focus();
344
+ }, children: /* @__PURE__ */ jsx(EmailChips, { chips, onChange: setChips, taken, disabled: sending, label: "Email addresses to invite" }) }),
345
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
346
+ /* @__PURE__ */ jsx(Select, { label: "Role for new invites", size: "md", options: roles, value: inviteRole, onChange: setInviteRole, disabled: sending, className: "w-[124px] bg-paper" }),
347
+ /* @__PURE__ */ jsx(Button, { type: "submit", variant: "accent", loading: sending, disabled: !good.length || bad > 0, children: "Invite" })
348
+ ] })
349
+ ] }),
350
+ /* @__PURE__ */ jsx("p", { className: "mt-2 min-h-4 px-1 text-[12px] text-mute", "aria-live": "polite", children: bad > 0 ? `Remove ${bad} address${bad > 1 ? "es" : ""} that can't be invited.` : inviteMsg || "Separate addresses with a comma, space or Enter." })
351
+ ]
352
+ }
353
+ ),
354
+ /* @__PURE__ */ jsx("h4", { ref: listHead, tabIndex: -1, className: "mt-7 mb-1 px-1 text-[12px] font-medium text-mute outline-none", children: "Members" }),
355
+ /* @__PURE__ */ jsx("ul", { children: members.map((m) => {
356
+ const gone = removing.includes(m.id);
357
+ return /* @__PURE__ */ jsx("li", { ref: memberFlip.reg(m.id), "data-tm-row": m.id, className: "relative", children: gone ? /* @__PURE__ */ jsxs("div", { className: "relative flex h-[60px] items-center gap-3 overflow-hidden rounded-[10px] bg-paper-2 px-3", style: { animation: `kit-tm-swap .35s ${CURVE}` }, children: [
358
+ /* @__PURE__ */ jsxs("p", { className: "min-w-0 flex-1 truncate text-[13px] text-ink-2", children: [
359
+ "Removed ",
360
+ /* @__PURE__ */ jsx("span", { className: "text-ink", children: m.name })
361
+ ] }),
362
+ /* @__PURE__ */ jsx(Button, { "data-tm-focus": `undo-${m.id}`, variant: "ghost", size: "xs", onClick: () => undo(m), className: "text-brand hover:text-brand", children: "Undo" }),
363
+ /* @__PURE__ */ jsx(
364
+ "span",
365
+ {
366
+ "aria-hidden": true,
367
+ className: "absolute inset-x-0 bottom-0 h-0.5 origin-left bg-brand/40",
368
+ style: { animation: `kit-tm-count ${undoMs}ms linear forwards` }
369
+ }
370
+ )
371
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "flex h-[60px] items-center gap-3 rounded-[10px] px-1 transition-colors duration-200 hover:bg-[color-mix(in_srgb,var(--paper-2)_55%,transparent)] sm:px-3", children: [
372
+ /* @__PURE__ */ jsx(Avatar, { name: m.name, src: m.src, size: "sm" }),
373
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
374
+ /* @__PURE__ */ jsxs("p", { className: "flex items-center gap-2 truncate text-[13.5px] text-ink", children: [
375
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: m.name }),
376
+ m.you && /* @__PURE__ */ jsx("span", { className: "shrink-0 rounded-md bg-paper-2 px-1.5 text-[11px] leading-5 text-mute", children: "You" })
377
+ ] }),
378
+ /* @__PURE__ */ jsx("p", { className: "truncate text-[12.5px] text-mute", children: m.email })
379
+ ] }),
380
+ /* @__PURE__ */ jsx(
381
+ Select,
382
+ {
383
+ label: `Role for ${m.name}`,
384
+ size: "sm",
385
+ options: roles,
386
+ value: m.role,
387
+ onChange: (v) => changeRole(m, v),
388
+ disabled: m.you,
389
+ className: "w-[112px]"
390
+ }
391
+ ),
392
+ /* @__PURE__ */ jsx(
393
+ "button",
394
+ {
395
+ type: "button",
396
+ "data-tm-focus": `remove-${m.id}`,
397
+ "aria-label": `Remove ${m.name}`,
398
+ title: m.you ? "You can't remove yourself" : `Remove ${m.name}`,
399
+ disabled: m.you,
400
+ onClick: () => remove(m),
401
+ className: iconBtn,
402
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4.5 4.5l7 7M11.5 4.5l-7 7" }) })
403
+ }
404
+ )
405
+ ] }) }, m.id);
406
+ }) }),
407
+ invites.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
408
+ /* @__PURE__ */ jsx("h4", { className: "mt-7 mb-1 px-1 text-[12px] font-medium text-mute", children: "Pending invites" }),
409
+ /* @__PURE__ */ jsx("ul", { children: invites.map((inv) => {
410
+ const again = resent.includes(inv.id);
411
+ return /* @__PURE__ */ jsxs("li", { ref: inviteFlip.reg(inv.id), className: "flex h-[52px] items-center gap-3 px-1 sm:px-3", style: { animation: `kit-tm-in .4s ${CURVE}` }, children: [
412
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "grid h-8 w-8 shrink-0 place-items-center rounded-full shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] text-mute", children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.4", strokeLinejoin: "round", "aria-hidden": true, children: [
413
+ /* @__PURE__ */ jsx("rect", { x: "2", y: "3.5", width: "12", height: "9", rx: "1.6" }),
414
+ /* @__PURE__ */ jsx("path", { d: "m2.5 4.5 5.5 4 5.5-4" })
415
+ ] }) }),
416
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
417
+ /* @__PURE__ */ jsx("p", { className: "truncate text-[13.5px] text-ink", children: inv.email }),
418
+ /* @__PURE__ */ jsxs("p", { className: "truncate text-[12px] text-mute", children: [
419
+ roleLabel(inv.role),
420
+ inv.sent && ` \xB7 Sent ${inv.sent}`
421
+ ] })
422
+ ] }),
423
+ /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "xs", onClick: () => !again && resend(inv), "aria-disabled": again || void 0, children: /* @__PURE__ */ jsx("span", { style: { animation: `kit-tm-swap .3s ${CURVE}` }, children: again ? "Sent" : "Resend" }, again ? "sent" : "resend") }),
424
+ /* @__PURE__ */ jsx(Button, { "data-tm-focus": `revoke-${inv.id}`, variant: "ghost", size: "xs", onClick: () => revoke(inv), children: "Revoke" })
425
+ ] }, inv.id);
426
+ }) })
427
+ ] })
428
+ ] });
429
+ }
430
+ var team_members_default = TeamMembers;
431
+
432
+ export {
433
+ TeamMembers,
434
+ team_members_default
435
+ };
@@ -0,0 +1,188 @@
1
+ "use client";
2
+
3
+ // components/kit/range-slider.tsx
4
+ import { useLayoutEffect, useRef, useState } from "react";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var decimals = (n) => (String(n).split(".")[1] ?? "").length;
8
+ function RangeSlider({
9
+ value,
10
+ defaultValue,
11
+ onValueChange,
12
+ onValueCommit,
13
+ min = 0,
14
+ max = 100,
15
+ step = 1,
16
+ minGap = 0,
17
+ format = (v) => String(v),
18
+ disabled,
19
+ names,
20
+ labels = ["Minimum", "Maximum"],
21
+ className
22
+ }) {
23
+ const span = Math.max(0, max - min);
24
+ const gap = Math.min(Math.max(0, minGap), span);
25
+ const dp = Math.max(decimals(step), decimals(min));
26
+ const snap = (v) => Number((Math.round((v - min) / step) * step + min).toFixed(dp));
27
+ const [inner, setInner] = useState(defaultValue ?? [min, max]);
28
+ const raw = value ?? inner;
29
+ const lo = Math.min(max, Math.max(min, raw[0]));
30
+ const hi = Math.min(max, Math.max(lo, raw[1]));
31
+ const current = [lo, hi];
32
+ const latest = useRef(current);
33
+ useLayoutEffect(() => {
34
+ latest.current = [lo, hi];
35
+ });
36
+ const track = useRef(null);
37
+ const thumbs = useRef([]);
38
+ const [drag, setDrag] = useState(null);
39
+ const [hover, setHover] = useState(null);
40
+ const [focus, setFocus] = useState(null);
41
+ const set = (i, v) => {
42
+ const [a, b] = latest.current;
43
+ let next;
44
+ if (i === 0) next = [Math.max(min, Math.min(snap(v), b - gap)), b];
45
+ else next = [a, Math.min(max, Math.max(snap(v), a + gap))];
46
+ next = [Math.max(min, next[0]), Math.min(max, next[1])];
47
+ if (next[0] === a && next[1] === b) return latest.current;
48
+ latest.current = next;
49
+ if (value === void 0) setInner(next);
50
+ onValueChange?.(next);
51
+ return next;
52
+ };
53
+ const fromX = (x) => {
54
+ const r = track.current?.getBoundingClientRect();
55
+ if (!r || !r.width) return min;
56
+ return min + Math.min(1, Math.max(0, (x - r.left) / r.width)) * span;
57
+ };
58
+ const press = useRef(null);
59
+ const onDown = (e) => {
60
+ if (disabled || e.button !== 0) return;
61
+ e.preventDefault();
62
+ const v = fromX(e.clientX);
63
+ const [a, b] = latest.current;
64
+ const tie = a === b;
65
+ const i = tie ? a >= max ? 0 : a <= min ? 1 : v < a ? 0 : 1 : Math.abs(v - a) < Math.abs(v - b) ? 0 : 1;
66
+ e.currentTarget.setPointerCapture(e.pointerId);
67
+ press.current = { id: e.pointerId, x: e.clientX, v, i, tie, moved: false };
68
+ if (!tie) set(i, v);
69
+ thumbs.current[i]?.focus();
70
+ };
71
+ const onMove = (e) => {
72
+ const p = press.current;
73
+ if (!p || p.id !== e.pointerId) return;
74
+ if (!p.moved) {
75
+ const dx = e.clientX - p.x;
76
+ if (Math.abs(dx) < 2) return;
77
+ p.moved = true;
78
+ if (p.tie) {
79
+ p.i = dx < 0 ? 0 : 1;
80
+ thumbs.current[p.i]?.focus();
81
+ }
82
+ setDrag(p.i);
83
+ }
84
+ set(p.i, fromX(e.clientX));
85
+ };
86
+ const onUp = (e) => {
87
+ const p = press.current;
88
+ if (!p || p.id !== e.pointerId) return;
89
+ press.current = null;
90
+ if (e.currentTarget.hasPointerCapture(e.pointerId)) e.currentTarget.releasePointerCapture(e.pointerId);
91
+ if (!p.moved && p.tie && e.type === "pointerup") set(p.i, p.v);
92
+ setDrag(null);
93
+ onValueCommit?.(latest.current);
94
+ };
95
+ const onKey = (i) => (e) => {
96
+ const v = latest.current[i];
97
+ const big = Math.max(step, snap(min + span / 10) - min);
98
+ let next;
99
+ if (e.key === "ArrowRight" || e.key === "ArrowUp") next = v + step;
100
+ else if (e.key === "ArrowLeft" || e.key === "ArrowDown") next = v - step;
101
+ else if (e.key === "PageUp") next = v + big;
102
+ else if (e.key === "PageDown") next = v - big;
103
+ else if (e.key === "Home") next = min;
104
+ else if (e.key === "End") next = max;
105
+ else return;
106
+ e.preventDefault();
107
+ const before = latest.current;
108
+ const after = set(i, next);
109
+ if (after !== before) onValueCommit?.(after);
110
+ };
111
+ const pct = (v) => span ? (v - min) / span * 100 : 0;
112
+ const glide = drag === null && "transition-transform duration-200 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none";
113
+ return /* @__PURE__ */ jsxs("div", { className: cx("relative w-full select-none pb-1 pt-9", disabled && "pointer-events-none opacity-50", className), children: [
114
+ /* @__PURE__ */ jsxs(
115
+ "div",
116
+ {
117
+ ref: track,
118
+ onPointerDown: onDown,
119
+ onPointerMove: onMove,
120
+ onPointerUp: onUp,
121
+ onPointerCancel: onUp,
122
+ className: "relative mx-[10px] flex h-5 cursor-pointer items-center [touch-action:none]",
123
+ children: [
124
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-x-0 h-1 rounded-full bg-[color-mix(in_srgb,var(--ink)_12%,transparent)]" }),
125
+ /* @__PURE__ */ jsx(
126
+ "span",
127
+ {
128
+ "aria-hidden": true,
129
+ className: cx("absolute inset-x-0 h-1 origin-left bg-brand", glide),
130
+ style: { transform: `translateX(${pct(lo)}%) scaleX(${(pct(hi) - pct(lo)) / 100})` }
131
+ }
132
+ ),
133
+ current.map((v, idx) => {
134
+ const i = idx;
135
+ const active = drag === i || hover === i;
136
+ return /* @__PURE__ */ jsx("span", { className: cx("pointer-events-none absolute inset-0", glide), style: { transform: `translateX(${pct(v)}%)`, zIndex: drag === i || focus === i ? 2 : 1 }, children: /* @__PURE__ */ jsx(
137
+ "span",
138
+ {
139
+ ref: (el) => {
140
+ thumbs.current[i] = el;
141
+ },
142
+ role: "slider",
143
+ tabIndex: disabled ? -1 : 0,
144
+ "aria-label": labels[i],
145
+ "aria-valuemin": i === 0 ? min : Math.min(max, lo + gap),
146
+ "aria-valuemax": i === 0 ? Math.max(min, hi - gap) : max,
147
+ "aria-valuenow": v,
148
+ "aria-valuetext": format(v),
149
+ "aria-orientation": "horizontal",
150
+ "aria-disabled": disabled || void 0,
151
+ onKeyDown: onKey(i),
152
+ onFocus: () => setFocus(i),
153
+ onBlur: () => setFocus((f) => f === i ? null : f),
154
+ onPointerEnter: () => setHover(i),
155
+ onPointerLeave: () => setHover((h) => h === i ? null : h),
156
+ className: cx(
157
+ "group/th pointer-events-auto absolute left-0 top-1/2 block h-5 w-5 -translate-x-1/2 -translate-y-1/2 cursor-grab rounded-full bg-paper shadow-[0_0_0_1.5px_var(--brand),0_2px_6px_-1px_rgb(0_0_0/0.18)] outline-none transition-[scale,box-shadow] duration-200 ease-[cubic-bezier(.16,1,.3,1)] focus-visible:shadow-[0_0_0_1.5px_var(--brand),0_0_0_5px_color-mix(in_srgb,var(--brand)_22%,transparent)] motion-reduce:transition-none",
158
+ drag === i ? "scale-110 cursor-grabbing" : "hover:scale-105"
159
+ ),
160
+ children: /* @__PURE__ */ jsx(
161
+ "span",
162
+ {
163
+ "aria-hidden": true,
164
+ className: cx(
165
+ "pointer-events-none absolute bottom-full left-1/2 mb-2.5 -translate-x-1/2 whitespace-nowrap rounded-[6px] bg-ink px-2 py-1 text-[12px] font-medium tabular-nums leading-none text-paper transition-[opacity,translate] duration-200 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none",
166
+ active ? "translate-y-0 opacity-100" : "translate-y-1 opacity-0 group-focus-visible/th:translate-y-0 group-focus-visible/th:opacity-100"
167
+ ),
168
+ children: format(v)
169
+ }
170
+ )
171
+ }
172
+ ) }, i);
173
+ })
174
+ ]
175
+ }
176
+ ),
177
+ names && /* @__PURE__ */ jsxs(Fragment, { children: [
178
+ /* @__PURE__ */ jsx("input", { type: "hidden", name: names[0], value: lo }),
179
+ /* @__PURE__ */ jsx("input", { type: "hidden", name: names[1], value: hi })
180
+ ] })
181
+ ] });
182
+ }
183
+ var range_slider_default = RangeSlider;
184
+
185
+ export {
186
+ RangeSlider,
187
+ range_slider_default
188
+ };