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,114 @@
1
+ "use client";
2
+
3
+ // components/kit/progress.tsx
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ var cx = (...c) => c.filter(Boolean).join(" ");
6
+ var KEYFRAMES = `@keyframes asta-progress-sweep { from { transform: translateX(-100%) } to { transform: translateX(260%) } }
7
+ @keyframes asta-progress-spin { to { transform: rotate(360deg) } }
8
+ @keyframes asta-progress-breathe { 50% { opacity: .45 } }`;
9
+ var EASE = "cubic-bezier(.16,1,.3,1)";
10
+ function clamp(value, max) {
11
+ if (value === void 0 || Number.isNaN(value)) return void 0;
12
+ return Math.max(0, Math.min(max, value));
13
+ }
14
+ function ProgressBar({ value, max = 100, label = "Progress", showValue, valueText, size = "md", hideLabel, className }) {
15
+ const v = clamp(value, max);
16
+ const pct = v === void 0 ? void 0 : v / max * 100;
17
+ const text = valueText ?? (pct === void 0 ? void 0 : `${Math.round(pct)}%`);
18
+ return /* @__PURE__ */ jsxs("div", { className: cx("w-full", className), children: [
19
+ /* @__PURE__ */ jsx("style", { href: "asta-progress", precedence: "asta", children: KEYFRAMES }),
20
+ (!hideLabel || showValue) && /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-baseline justify-between gap-4 text-[13px]", children: [
21
+ /* @__PURE__ */ jsx("span", { className: cx("text-ink-2", hideLabel && "sr-only"), children: label }),
22
+ showValue && text && /* @__PURE__ */ jsx("span", { className: "tabular-nums text-mute", children: text })
23
+ ] }),
24
+ /* @__PURE__ */ jsx(
25
+ "div",
26
+ {
27
+ role: "progressbar",
28
+ "aria-label": label,
29
+ "aria-valuemin": 0,
30
+ "aria-valuemax": max,
31
+ "aria-valuenow": v,
32
+ "aria-valuetext": v === void 0 ? "Loading" : text,
33
+ "aria-busy": v === void 0 || void 0,
34
+ className: cx("relative w-full overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--ink)_9%,transparent)]", size === "md" ? "h-1.5" : "h-1"),
35
+ children: pct === void 0 ? /* @__PURE__ */ jsx(
36
+ "span",
37
+ {
38
+ className: "absolute inset-y-0 left-0 w-[38%] rounded-full bg-brand motion-reduce:!w-full motion-reduce:![animation:asta-progress-breathe_1.8s_ease-in-out_infinite]",
39
+ style: { animation: `asta-progress-sweep 1.5s ${EASE} infinite` }
40
+ }
41
+ ) : /* @__PURE__ */ jsx(
42
+ "span",
43
+ {
44
+ className: "absolute inset-0 rounded-full bg-brand transition-transform duration-700 motion-reduce:transition-none",
45
+ style: { transform: `translateX(${pct - 100}%)`, transitionTimingFunction: EASE }
46
+ }
47
+ )
48
+ }
49
+ )
50
+ ] });
51
+ }
52
+ function ProgressRing({ value, max = 100, label = "Progress", showValue, valueText, size = 44, thickness = 3.5, children, className }) {
53
+ const v = clamp(value, max);
54
+ const pct = v === void 0 ? void 0 : v / max * 100;
55
+ const text = valueText ?? (pct === void 0 ? void 0 : `${Math.round(pct)}%`);
56
+ const r = (size - thickness) / 2;
57
+ const c = size / 2;
58
+ const inner = children ?? (showValue && text ? /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: text }) : null);
59
+ return /* @__PURE__ */ jsxs(
60
+ "span",
61
+ {
62
+ role: "progressbar",
63
+ "aria-label": label,
64
+ "aria-valuemin": 0,
65
+ "aria-valuemax": max,
66
+ "aria-valuenow": v,
67
+ "aria-valuetext": v === void 0 ? "Loading" : text,
68
+ "aria-busy": v === void 0 || void 0,
69
+ className: cx("relative inline-flex shrink-0 items-center justify-center", className),
70
+ style: { width: size, height: size },
71
+ children: [
72
+ /* @__PURE__ */ jsx("style", { href: "asta-progress", precedence: "asta", children: KEYFRAMES }),
73
+ /* @__PURE__ */ jsxs(
74
+ "svg",
75
+ {
76
+ viewBox: `0 0 ${size} ${size}`,
77
+ width: size,
78
+ height: size,
79
+ "aria-hidden": true,
80
+ className: cx("absolute inset-0", pct === void 0 && "motion-reduce:![animation:asta-progress-breathe_1.8s_ease-in-out_infinite]"),
81
+ style: pct === void 0 ? { animation: "asta-progress-spin 1s linear infinite" } : { transform: "rotate(-90deg)" },
82
+ children: [
83
+ /* @__PURE__ */ jsx("circle", { cx: c, cy: c, r, fill: "none", strokeWidth: thickness, style: { stroke: "color-mix(in srgb, var(--ink) 9%, transparent)" } }),
84
+ /* @__PURE__ */ jsx(
85
+ "circle",
86
+ {
87
+ cx: c,
88
+ cy: c,
89
+ r,
90
+ fill: "none",
91
+ strokeWidth: thickness,
92
+ strokeLinecap: "round",
93
+ pathLength: 100,
94
+ strokeDasharray: "100 100",
95
+ strokeDashoffset: pct === void 0 ? 75 : 100 - pct,
96
+ className: "stroke-brand transition-[stroke-dashoffset] duration-700 motion-reduce:transition-none",
97
+ style: { transitionTimingFunction: EASE, opacity: pct === 0 ? 0 : 1 }
98
+ }
99
+ )
100
+ ]
101
+ }
102
+ ),
103
+ inner && /* @__PURE__ */ jsx("span", { className: "relative text-[11px] font-medium text-ink", children: inner })
104
+ ]
105
+ }
106
+ );
107
+ }
108
+ var progress_default = ProgressBar;
109
+
110
+ export {
111
+ ProgressBar,
112
+ ProgressRing,
113
+ progress_default
114
+ };
@@ -0,0 +1,235 @@
1
+ "use client";
2
+
3
+ // components/kit/tree-view.tsx
4
+ import { useEffect, useMemo, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var KEYFRAMES = `@keyframes asta-tree-in { from { opacity: 0; transform: translateY(-4px) } }`;
8
+ var isFolder = (n) => n.children !== void 0;
9
+ function FolderIcon({ open }) {
10
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round", "aria-hidden": true, children: open ? /* @__PURE__ */ jsx("path", { d: "M2 12.5v-8a1 1 0 0 1 1-1h3l1.5 1.5H12a1 1 0 0 1 1 1V7M2 12.5 3.8 8a1 1 0 0 1 .9-.6h9.1a.6.6 0 0 1 .6.8l-1.6 4.3h-11Z" }) : /* @__PURE__ */ jsx("path", { d: "M2 4.5a1 1 0 0 1 1-1h3L7.5 5H13a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-7.5Z" }) });
11
+ }
12
+ function FileIcon() {
13
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4 2.5h5L12.5 6v7.5H4zM9 2.5V6h3.5" }) });
14
+ }
15
+ function TreeView({ nodes, selected, defaultSelected = null, onSelect, expanded, defaultExpanded = [], onExpandedChange, label, className }) {
16
+ const [innerSel, setInnerSel] = useState(defaultSelected);
17
+ const [innerExp, setInnerExp] = useState(defaultExpanded);
18
+ const sel = selected !== void 0 ? selected : innerSel;
19
+ const exp = useMemo(() => new Set(expanded ?? innerExp), [expanded, innerExp]);
20
+ const [opened, setOpened] = useState(() => /* @__PURE__ */ new Set());
21
+ const [focusId, setFocusId] = useState(null);
22
+ const refs = useRef(/* @__PURE__ */ new Map());
23
+ const tree = useRef(null);
24
+ const typed = useRef({ text: "", at: 0 });
25
+ const index = useMemo(() => {
26
+ const m = /* @__PURE__ */ new Map();
27
+ const walk = (list, level, parent) => {
28
+ for (const n of list) {
29
+ m.set(n.id, { node: n, level, parent });
30
+ if (n.children) walk(n.children, level + 1, n.id);
31
+ }
32
+ };
33
+ walk(nodes, 1, null);
34
+ return m;
35
+ }, [nodes]);
36
+ const visible = useMemo(() => {
37
+ const out = [];
38
+ const walk = (list, level, parent) => {
39
+ for (const n of list) {
40
+ out.push({ node: n, level, parent });
41
+ if (n.children && exp.has(n.id)) walk(n.children, level + 1, n.id);
42
+ }
43
+ };
44
+ walk(nodes, 1, null);
45
+ return out;
46
+ }, [nodes, exp]);
47
+ const visibleIds = new Set(visible.map((r) => r.node.id));
48
+ const tabId = focusId && visibleIds.has(focusId) ? focusId : sel && visibleIds.has(sel) ? sel : visible[0]?.node.id ?? null;
49
+ const setExp = (next) => {
50
+ const ids = [...next];
51
+ if (expanded === void 0) setInnerExp(ids);
52
+ onExpandedChange?.(ids);
53
+ };
54
+ const isAncestor = (id, of) => {
55
+ for (let p = of ? index.get(of)?.parent : null; p; p = index.get(p)?.parent) if (p === id) return true;
56
+ return false;
57
+ };
58
+ const toggle = (id, open = !exp.has(id)) => {
59
+ if (open === exp.has(id)) return;
60
+ const next = new Set(exp);
61
+ if (open) {
62
+ next.add(id);
63
+ setOpened((o) => o.has(id) ? o : new Set(o).add(id));
64
+ } else {
65
+ next.delete(id);
66
+ if (isAncestor(id, focusId)) setFocusId(id);
67
+ }
68
+ setExp(next);
69
+ };
70
+ const choose = (n) => {
71
+ if (n.disabled) return;
72
+ if (selected === void 0) setInnerSel(n.id);
73
+ onSelect?.(n.id, n);
74
+ };
75
+ const focus = (id) => {
76
+ if (!id) return;
77
+ setFocusId(id);
78
+ refs.current.get(id)?.focus();
79
+ };
80
+ useEffect(() => {
81
+ if (!focusId || !tree.current?.contains(document.activeElement)) return;
82
+ const el = refs.current.get(focusId);
83
+ if (el && document.activeElement !== el) el.focus();
84
+ }, [focusId, visible]);
85
+ const onKey = (e) => {
86
+ const i = visible.findIndex((r) => r.node.id === tabId);
87
+ const row = visible[i];
88
+ if (!row) return;
89
+ const n = row.node;
90
+ let handled = true;
91
+ switch (e.key) {
92
+ case "ArrowDown":
93
+ focus(visible[i + 1]?.node.id);
94
+ break;
95
+ case "ArrowUp":
96
+ focus(visible[i - 1]?.node.id);
97
+ break;
98
+ case "Home":
99
+ focus(visible[0]?.node.id);
100
+ break;
101
+ case "End":
102
+ focus(visible[visible.length - 1]?.node.id);
103
+ break;
104
+ case "ArrowRight":
105
+ if (isFolder(n) && !n.disabled) {
106
+ if (!exp.has(n.id)) toggle(n.id, true);
107
+ else if (n.children.length) focus(n.children[0].id);
108
+ }
109
+ break;
110
+ case "ArrowLeft":
111
+ if (isFolder(n) && exp.has(n.id)) toggle(n.id, false);
112
+ else focus(row.parent);
113
+ break;
114
+ case "Enter":
115
+ choose(n);
116
+ if (isFolder(n) && !n.disabled) toggle(n.id);
117
+ break;
118
+ case " ":
119
+ choose(n);
120
+ break;
121
+ case "*": {
122
+ const siblings = row.parent ? index.get(row.parent).node.children : nodes;
123
+ const next = new Set(exp);
124
+ const fresh = [];
125
+ for (const s of siblings)
126
+ if (isFolder(s) && !s.disabled && !next.has(s.id)) {
127
+ next.add(s.id);
128
+ fresh.push(s.id);
129
+ }
130
+ if (fresh.length) {
131
+ setOpened((o) => /* @__PURE__ */ new Set([...o, ...fresh]));
132
+ setExp(next);
133
+ }
134
+ break;
135
+ }
136
+ default:
137
+ handled = false;
138
+ if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {
139
+ const t = typed.current;
140
+ t.text = e.timeStamp - t.at > 600 ? e.key.toLowerCase() : t.text + e.key.toLowerCase();
141
+ t.at = e.timeStamp;
142
+ const start = t.text.length === 1 ? i + 1 : i;
143
+ const order = [...visible.slice(start), ...visible.slice(0, start)];
144
+ const hit = order.find((r) => r.node.label.toLowerCase().startsWith(t.text));
145
+ if (hit) {
146
+ focus(hit.node.id);
147
+ handled = true;
148
+ }
149
+ }
150
+ }
151
+ if (handled) e.preventDefault();
152
+ };
153
+ const renderList = (list, level, parent) => list.map((n, k) => {
154
+ const folder = isFolder(n);
155
+ const open = folder && exp.has(n.id);
156
+ const isSel = sel === n.id;
157
+ const animate = parent !== null && opened.has(parent);
158
+ return /* @__PURE__ */ jsxs(
159
+ "li",
160
+ {
161
+ ref: (el) => {
162
+ if (el) refs.current.set(n.id, el);
163
+ else refs.current.delete(n.id);
164
+ },
165
+ role: "treeitem",
166
+ tabIndex: tabId === n.id ? 0 : -1,
167
+ "aria-level": level,
168
+ "aria-setsize": list.length,
169
+ "aria-posinset": k + 1,
170
+ "aria-expanded": folder ? open : void 0,
171
+ "aria-selected": isSel,
172
+ "aria-disabled": n.disabled || void 0,
173
+ onFocus: (e) => {
174
+ if (e.target === e.currentTarget) setFocusId(n.id);
175
+ },
176
+ className: cx(
177
+ "outline-none [&:focus-visible>div:first-child]:ring-2 [&:focus-visible>div:first-child]:ring-inset [&:focus-visible>div:first-child]:ring-brand/50",
178
+ animate && "animate-[asta-tree-in_.32s_cubic-bezier(.16,1,.3,1)_both] motion-reduce:animate-none"
179
+ ),
180
+ style: animate ? { animationDelay: `${Math.min(k, 8) * 24}ms` } : void 0,
181
+ children: [
182
+ /* @__PURE__ */ jsxs(
183
+ "div",
184
+ {
185
+ "data-selected": isSel || void 0,
186
+ onClick: () => {
187
+ if (n.disabled) return;
188
+ focus(n.id);
189
+ choose(n);
190
+ if (folder) toggle(n.id);
191
+ },
192
+ style: { paddingLeft: 8 + (level - 1) * 18 },
193
+ className: cx(
194
+ "group/row flex h-8 select-none items-center gap-2 rounded-lg pr-2.5 text-[13px] transition-colors duration-150",
195
+ n.disabled ? "cursor-not-allowed text-mute opacity-50" : "cursor-pointer",
196
+ isSel ? "bg-paper-2 text-ink" : !n.disabled && "text-ink-2 hover:bg-[color-mix(in_srgb,var(--paper-2)_60%,transparent)] hover:text-ink"
197
+ ),
198
+ children: [
199
+ /* @__PURE__ */ jsx(
200
+ "span",
201
+ {
202
+ "aria-hidden": true,
203
+ onClick: (e) => {
204
+ if (!folder || n.disabled) return;
205
+ e.stopPropagation();
206
+ focus(n.id);
207
+ toggle(n.id);
208
+ },
209
+ className: "grid h-4 w-4 shrink-0 place-items-center text-mute",
210
+ children: folder && /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: cx("h-3 w-3 transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none", open && "rotate-90"), fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "m6 4 4 4-4 4" }) })
211
+ }
212
+ ),
213
+ /* @__PURE__ */ jsx("span", { className: cx("inline-flex h-4 w-4 shrink-0 transition-colors [&_svg]:h-4 [&_svg]:w-4", isSel ? "text-brand" : "text-mute group-hover/row:text-ink-2"), children: n.icon ?? (folder ? /* @__PURE__ */ jsx(FolderIcon, { open }) : /* @__PURE__ */ jsx(FileIcon, {})) }),
214
+ /* @__PURE__ */ jsx("span", { className: "flex-1 truncate", children: n.label }),
215
+ n.meta && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-[11.5px] tabular-nums text-mute", children: n.meta })
216
+ ]
217
+ }
218
+ ),
219
+ open && n.children.length > 0 && /* @__PURE__ */ jsx("ul", { role: "group", className: "flex flex-col gap-px pt-px", children: renderList(n.children, level + 1, n.id) })
220
+ ]
221
+ },
222
+ n.id
223
+ );
224
+ });
225
+ return /* @__PURE__ */ jsxs("ul", { ref: tree, role: "tree", "aria-label": label, onKeyDown: onKey, className: cx("flex flex-col gap-px", className), children: [
226
+ /* @__PURE__ */ jsx("style", { href: "asta-tree-view", precedence: "asta", children: KEYFRAMES }),
227
+ renderList(nodes, 1, null)
228
+ ] });
229
+ }
230
+ var tree_view_default = TreeView;
231
+
232
+ export {
233
+ TreeView,
234
+ tree_view_default
235
+ };
@@ -0,0 +1,245 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/PlanSwitcher.tsx
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var EASE = "cubic-bezier(.16,1,.3,1)";
7
+ var RING = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]";
8
+ var DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
9
+ var PLANS = [
10
+ { name: "Starter", note: "Just you", month: 9, year: 7, has: 2 },
11
+ { name: "Pro", note: "Growing work", month: 29, year: 24, has: 4 },
12
+ { name: "Team", note: "The whole crew", month: 79, year: 66, has: 5 }
13
+ ];
14
+ var FEATURES = ["Core editor", "Version history", "Custom domain", "Priority support", "Shared workspace"];
15
+ var DEMO = [
16
+ [1, true],
17
+ [2, true],
18
+ [2, false],
19
+ [0, false],
20
+ [0, true],
21
+ [1, false]
22
+ ];
23
+ function next(s, sel, yearly) {
24
+ if (s.sel === sel && s.yearly === yearly) return s;
25
+ const stamp = s.stamp + 1;
26
+ const born = s.born.map((b, i) => i < PLANS[sel].has && i >= PLANS[s.sel].has ? stamp : b);
27
+ return { sel, yearly, stamp, born };
28
+ }
29
+ function Roll({ value }) {
30
+ const chars = value.split("");
31
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-start leading-[1.1em] tabular-nums", "aria-label": value, children: chars.map((c, i) => {
32
+ const key = chars.length - i;
33
+ if (!/\d/.test(c))
34
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-[1.1em]", children: c }, `s${key}`);
35
+ return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative inline-block h-[1.1em] overflow-hidden leading-[1.1em]", children: [
36
+ /* @__PURE__ */ jsx("span", { className: "invisible", children: "0" }),
37
+ /* @__PURE__ */ jsx(
38
+ "span",
39
+ {
40
+ className: "absolute left-0 top-0 flex flex-col transition-transform duration-700 motion-reduce:transition-none",
41
+ style: { transform: `translateY(-${Number(c) * 1.1}em)`, transitionTimingFunction: EASE },
42
+ children: DIGITS.map((d) => /* @__PURE__ */ jsx("span", { className: "block h-[1.1em]", children: d }, d))
43
+ }
44
+ )
45
+ ] }, `d${key}`);
46
+ }) });
47
+ }
48
+ var Check = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-[62%] w-[62%]", fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3.5 8.5l3 3 6-7" }) });
49
+ function PlanSwitcher() {
50
+ const [s, setS] = useState({ sel: 1, yearly: false, stamp: 0, born: FEATURES.map(() => -1) });
51
+ const [paused, setPaused] = useState(false);
52
+ const idle = useRef(null);
53
+ const radios = useRef([]);
54
+ const takeOver = () => {
55
+ setPaused(true);
56
+ if (idle.current) clearTimeout(idle.current);
57
+ idle.current = setTimeout(() => setPaused(false), 8e3);
58
+ };
59
+ useEffect(() => () => void (idle.current && clearTimeout(idle.current)), []);
60
+ useEffect(() => {
61
+ if (paused || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
62
+ let i = 0;
63
+ let id;
64
+ const tick = () => {
65
+ const [p, y] = DEMO[i % DEMO.length];
66
+ setS((v) => next(v, p, y));
67
+ i++;
68
+ id = setTimeout(tick, 2100);
69
+ };
70
+ id = setTimeout(tick, 1400);
71
+ return () => clearTimeout(id);
72
+ }, [paused]);
73
+ const pick = (sel, yearly = s.yearly) => {
74
+ takeOver();
75
+ setS((v) => next(v, sel, yearly));
76
+ };
77
+ const onKey = (e) => {
78
+ const d = e.key === "ArrowDown" || e.key === "ArrowRight" ? 1 : e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 0;
79
+ if (!d) return;
80
+ e.preventDefault();
81
+ const n = (s.sel + d + PLANS.length) % PLANS.length;
82
+ pick(n);
83
+ radios.current[n]?.focus();
84
+ };
85
+ const plan = PLANS[s.sel];
86
+ const price = s.yearly ? plan.year : plan.month;
87
+ const save = (plan.month - plan.year) * 12;
88
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-11", style: { containerType: "size" }, children: [
89
+ /* @__PURE__ */ jsx("style", { href: "asta-planswitcher", precedence: "asta", children: `
90
+ .lab-pl-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: min(6cqw, 32px); align-items: center }
91
+ .lab-pl-note { display: none }
92
+ @container (min-width: 500px) { .lab-pl-note { display: block } }
93
+ @container (max-width: 400px) { .lab-pl-row { display: none } }
94
+ @container (aspect-ratio < 1.05) { .lab-pl-body { grid-template-columns: minmax(0, 1fr); gap: 16px } }
95
+ @keyframes lab-pl-tick { 0% { transform: scale(.3); opacity: 0 } 55% { transform: scale(1.18); opacity: 1 } 80% { transform: scale(.94) } 100% { transform: none; opacity: 1 } }
96
+ @keyframes lab-pl-in { from { transform: translateX(-10px); opacity: 0 } to { transform: none; opacity: 1 } }
97
+ @keyframes lab-pl-pop { 0% { transform: translateY(6px) scale(.7); opacity: 0 } 55% { transform: scale(1.07); opacity: 1 } 80% { transform: scale(.98) } 100% { transform: none; opacity: 1 } }
98
+ .lab-pl-tick { animation: lab-pl-tick .6s ${EASE} both }
99
+ .lab-pl-in { animation: lab-pl-in .55s ${EASE} both }
100
+ .lab-pl-pop { animation: lab-pl-pop .6s ${EASE} both }
101
+ @media (prefers-reduced-motion: reduce) { .lab-pl-tick, .lab-pl-in, .lab-pl-pop { animation: none } }
102
+ ` }),
103
+ /* @__PURE__ */ jsxs("div", { className: "lab-pl-body w-full max-w-[520px]", children: [
104
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-3", children: [
105
+ /* @__PURE__ */ jsxs(
106
+ "button",
107
+ {
108
+ type: "button",
109
+ role: "switch",
110
+ "aria-checked": s.yearly,
111
+ "aria-label": "Bill yearly",
112
+ onClick: () => pick(s.sel, !s.yearly),
113
+ className: `relative grid h-8 w-full grid-cols-2 rounded-full bg-paper-2 p-[3px] text-[11.5px] font-medium outline-none focus-visible:ring-2 focus-visible:ring-brand/60 ${RING}`,
114
+ children: [
115
+ /* @__PURE__ */ jsx(
116
+ "span",
117
+ {
118
+ "aria-hidden": true,
119
+ className: "absolute inset-y-[3px] left-[3px] w-[calc(50%-3px)] rounded-full bg-paper shadow-[0_1px_2px_rgb(0_0_0/0.18)] transition-transform duration-500 motion-reduce:transition-none",
120
+ style: { transform: s.yearly ? "translateX(100%)" : "none", transitionTimingFunction: EASE }
121
+ }
122
+ ),
123
+ /* @__PURE__ */ jsx("span", { className: `relative px-2.5 leading-[22px] transition-opacity duration-300 ${s.yearly ? "text-mute" : "text-ink"}`, children: "Monthly" }),
124
+ /* @__PURE__ */ jsx("span", { className: `relative px-2.5 leading-[22px] transition-opacity duration-300 ${s.yearly ? "text-ink" : "text-mute"}`, children: "Yearly" })
125
+ ]
126
+ }
127
+ ),
128
+ /* @__PURE__ */ jsxs("div", { role: "radiogroup", "aria-label": "Plan", onKeyDown: onKey, className: "relative flex flex-col", children: [
129
+ /* @__PURE__ */ jsx(
130
+ "span",
131
+ {
132
+ "aria-hidden": true,
133
+ className: "pointer-events-none absolute inset-x-0 top-0 h-1/3 rounded-[10px] bg-paper shadow-[inset_0_0_0_1.5px_var(--brand),0_6px_16px_-10px_rgb(0_0_0/0.5)] transition-transform duration-[650ms] motion-reduce:transition-none",
134
+ style: { transform: `translateY(${s.sel * 100}%)`, transitionTimingFunction: EASE }
135
+ }
136
+ ),
137
+ PLANS.map((p, i) => /* @__PURE__ */ jsxs(
138
+ "button",
139
+ {
140
+ ref: (el) => {
141
+ radios.current[i] = el;
142
+ },
143
+ type: "button",
144
+ role: "radio",
145
+ "aria-checked": s.sel === i,
146
+ tabIndex: s.sel === i ? 0 : -1,
147
+ onClick: () => pick(i),
148
+ className: "relative flex h-[clamp(40px,14cqh,52px)] items-center justify-between gap-3 rounded-[10px] px-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-brand/60",
149
+ children: [
150
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2.5", children: [
151
+ /* @__PURE__ */ jsx("span", { className: `relative h-3.5 w-3.5 shrink-0 rounded-full ${RING}`, children: /* @__PURE__ */ jsx(
152
+ "span",
153
+ {
154
+ className: "absolute inset-[3px] rounded-full bg-brand transition-[opacity,transform] duration-500 motion-reduce:transition-none",
155
+ style: { opacity: s.sel === i ? 1 : 0, transform: s.sel === i ? "none" : "scale(.3)", transitionTimingFunction: EASE }
156
+ }
157
+ ) }),
158
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
159
+ /* @__PURE__ */ jsx("span", { className: "block truncate text-[13.5px] font-medium leading-tight text-ink", children: p.name }),
160
+ /* @__PURE__ */ jsx("span", { className: "lab-pl-note truncate text-[11.5px] leading-tight text-mute", children: p.note })
161
+ ] })
162
+ ] }),
163
+ /* @__PURE__ */ jsxs("span", { className: "lab-pl-row shrink-0 text-[12px] tabular-nums text-ink-2", children: [
164
+ "$",
165
+ s.yearly ? p.year : p.month,
166
+ "/mo"
167
+ ] })
168
+ ]
169
+ },
170
+ p.name
171
+ ))
172
+ ] })
173
+ ] }),
174
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col", children: [
175
+ /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-1.5", children: [
176
+ /* @__PURE__ */ jsxs("span", { className: "font-medium tracking-[-0.04em] text-ink", style: { fontSize: "clamp(30px, 12cqmin, 46px)", lineHeight: 1 }, "aria-live": "polite", children: [
177
+ "$",
178
+ /* @__PURE__ */ jsx(Roll, { value: String(price) })
179
+ ] }),
180
+ /* @__PURE__ */ jsx("span", { className: "pb-[3px] text-[13px] text-mute", children: "/mo" })
181
+ ] }),
182
+ /* @__PURE__ */ jsxs("div", { className: "relative mt-2 h-6", children: [
183
+ /* @__PURE__ */ jsx(
184
+ "span",
185
+ {
186
+ className: "absolute left-0 top-0 text-[12px] leading-6 text-mute transition-opacity duration-300",
187
+ style: { opacity: s.yearly ? 0 : 1 },
188
+ "aria-hidden": s.yearly,
189
+ children: "Billed monthly"
190
+ }
191
+ ),
192
+ /* @__PURE__ */ jsx(
193
+ "span",
194
+ {
195
+ className: "absolute left-0 top-0 transition-[opacity,transform] duration-500 motion-reduce:transition-none",
196
+ style: { opacity: s.yearly ? 1 : 0, transform: s.yearly ? "none" : "translateY(4px) scale(.92)", transitionTimingFunction: EASE },
197
+ "aria-hidden": !s.yearly,
198
+ children: /* @__PURE__ */ jsxs(
199
+ "span",
200
+ {
201
+ className: `inline-flex h-6 items-center whitespace-pre rounded-full bg-brand px-2.5 text-[11.5px] font-medium text-paper ${s.yearly ? "lab-pl-pop" : ""}`,
202
+ children: [
203
+ "You save $",
204
+ /* @__PURE__ */ jsx(Roll, { value: String(save) }),
205
+ "/yr"
206
+ ]
207
+ },
208
+ s.yearly ? "y" : "m"
209
+ )
210
+ }
211
+ )
212
+ ] }),
213
+ /* @__PURE__ */ jsx("ul", { className: "mt-[max(10px,3.5cqh)] flex flex-col gap-[max(4px,1.4cqh)]", "aria-label": `${plan.name} features`, children: FEATURES.map((f, i) => {
214
+ const on = i < plan.has;
215
+ const fresh = s.born[i] >= 0;
216
+ return /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2.5 text-[clamp(12px,3.6cqmin,14px)] leading-snug", "aria-hidden": !on, children: [
217
+ /* @__PURE__ */ jsx("span", { className: `relative h-4 w-4 shrink-0 rounded-full ${RING}`, children: /* @__PURE__ */ jsx(
218
+ "span",
219
+ {
220
+ className: "absolute inset-0 transition-[opacity,transform] duration-500 motion-reduce:transition-none",
221
+ style: { opacity: on ? 1 : 0, transform: on ? "none" : "scale(.4)", transitionTimingFunction: EASE },
222
+ children: /* @__PURE__ */ jsx("span", { className: `flex h-full w-full items-center justify-center rounded-full bg-brand text-paper ${fresh ? "lab-pl-tick" : ""}`, children: /* @__PURE__ */ jsx(Check, {}) }, s.born[i])
223
+ }
224
+ ) }),
225
+ /* @__PURE__ */ jsxs("span", { className: "relative min-w-0 transition-opacity duration-500", style: { opacity: on ? 1 : 0.32 }, children: [
226
+ /* @__PURE__ */ jsx("span", { className: `block truncate ${on ? "text-ink" : "text-mute"} ${fresh ? "lab-pl-in" : ""}`, children: f }, s.born[i]),
227
+ /* @__PURE__ */ jsx(
228
+ "span",
229
+ {
230
+ "aria-hidden": true,
231
+ className: "absolute left-0 top-1/2 h-px w-full origin-left bg-current text-mute transition-transform duration-500 motion-reduce:transition-none",
232
+ style: { transform: on ? "scaleX(0)" : "scaleX(1)", transitionTimingFunction: EASE }
233
+ }
234
+ )
235
+ ] })
236
+ ] }, f);
237
+ }) })
238
+ ] })
239
+ ] })
240
+ ] });
241
+ }
242
+
243
+ export {
244
+ PlanSwitcher
245
+ };