asta-ui 0.0.0-stage → 0.2.1

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 (547) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -2
  3. package/bin/asta-ui.mjs +218 -0
  4. package/dist/accordion.d.ts +2 -0
  5. package/dist/accordion.js +9 -0
  6. package/dist/add-to-cart.d.ts +2 -0
  7. package/dist/add-to-cart.js +7 -0
  8. package/dist/avatar.d.ts +2 -0
  9. package/dist/avatar.js +13 -0
  10. package/dist/badge.d.ts +2 -0
  11. package/dist/badge.js +11 -0
  12. package/dist/base/accordion.d.ts +2 -0
  13. package/dist/base/accordion.js +9 -0
  14. package/dist/base/add-to-cart.d.ts +2 -0
  15. package/dist/base/add-to-cart.js +7 -0
  16. package/dist/base/avatar.d.ts +2 -0
  17. package/dist/base/avatar.js +13 -0
  18. package/dist/base/badge.d.ts +2 -0
  19. package/dist/base/badge.js +11 -0
  20. package/dist/base/bubble-wrap.d.ts +2 -0
  21. package/dist/base/bubble-wrap.js +7 -0
  22. package/dist/base/button.d.ts +2 -0
  23. package/dist/base/button.js +13 -0
  24. package/dist/base/candlestick.d.ts +2 -0
  25. package/dist/base/candlestick.js +7 -0
  26. package/dist/base/card-checkout.d.ts +2 -0
  27. package/dist/base/card-checkout.js +7 -0
  28. package/dist/base/cart-drawer.d.ts +2 -0
  29. package/dist/base/cart-drawer.js +7 -0
  30. package/dist/base/checkbox.d.ts +2 -0
  31. package/dist/base/checkbox.js +9 -0
  32. package/dist/base/combo-lock.d.ts +2 -0
  33. package/dist/base/combo-lock.js +7 -0
  34. package/dist/base/command-palette.d.ts +2 -0
  35. package/dist/base/command-palette.js +11 -0
  36. package/dist/base/dial-knob.d.ts +2 -0
  37. package/dist/base/dial-knob.js +7 -0
  38. package/dist/base/dialog.d.ts +2 -0
  39. package/dist/base/dialog.js +9 -0
  40. package/dist/base/dropdown-menu.d.ts +2 -0
  41. package/dist/base/dropdown-menu.js +10 -0
  42. package/dist/base/elastic-string.d.ts +2 -0
  43. package/dist/base/elastic-string.js +7 -0
  44. package/dist/base/field.d.ts +2 -0
  45. package/dist/base/field.js +11 -0
  46. package/dist/base/footer.d.ts +2 -0
  47. package/dist/base/footer.js +12 -0
  48. package/dist/base/gravity-pills.d.ts +2 -0
  49. package/dist/base/gravity-pills.js +7 -0
  50. package/dist/base/hold-to-confirm.d.ts +2 -0
  51. package/dist/base/hold-to-confirm.js +7 -0
  52. package/dist/base/ink-trail.d.ts +2 -0
  53. package/dist/base/ink-trail.js +7 -0
  54. package/dist/base/input.d.ts +2 -0
  55. package/dist/base/input.js +11 -0
  56. package/dist/base/kbd.d.ts +2 -0
  57. package/dist/base/kbd.js +11 -0
  58. package/dist/base/morse-tap.d.ts +2 -0
  59. package/dist/base/morse-tap.js +7 -0
  60. package/dist/base/motion-button.d.ts +2 -0
  61. package/dist/base/motion-button.js +23 -0
  62. package/dist/base/navbar.d.ts +2 -0
  63. package/dist/base/navbar.js +10 -0
  64. package/dist/base/needle-field.d.ts +2 -0
  65. package/dist/base/needle-field.js +7 -0
  66. package/dist/base/number-input.d.ts +2 -0
  67. package/dist/base/number-input.js +9 -0
  68. package/dist/base/order-book.d.ts +2 -0
  69. package/dist/base/order-book.js +7 -0
  70. package/dist/base/pay-methods.d.ts +2 -0
  71. package/dist/base/pay-methods.js +7 -0
  72. package/dist/base/payment-status.d.ts +2 -0
  73. package/dist/base/payment-status.js +7 -0
  74. package/dist/base/pixel-reveal.d.ts +2 -0
  75. package/dist/base/pixel-reveal.js +7 -0
  76. package/dist/base/price-chart.d.ts +2 -0
  77. package/dist/base/price-chart.js +7 -0
  78. package/dist/base/pricing.d.ts +2 -0
  79. package/dist/base/pricing.js +14 -0
  80. package/dist/base/radio-group.d.ts +2 -0
  81. package/dist/base/radio-group.js +11 -0
  82. package/dist/base/scramble-text.d.ts +2 -0
  83. package/dist/base/scramble-text.js +7 -0
  84. package/dist/base/segmented-control.d.ts +2 -0
  85. package/dist/base/segmented-control.js +9 -0
  86. package/dist/base/select.d.ts +2 -0
  87. package/dist/base/select.js +9 -0
  88. package/dist/base/settings-panel.d.ts +2 -0
  89. package/dist/base/settings-panel.js +10 -0
  90. package/dist/base/sign-in.d.ts +2 -0
  91. package/dist/base/sign-in.js +10 -0
  92. package/dist/base/skeleton.d.ts +2 -0
  93. package/dist/base/skeleton.js +13 -0
  94. package/dist/base/slider.d.ts +2 -0
  95. package/dist/base/slider.js +9 -0
  96. package/dist/base/snap-grid.d.ts +2 -0
  97. package/dist/base/snap-grid.js +7 -0
  98. package/dist/base/spinner.d.ts +2 -0
  99. package/dist/base/spinner.js +11 -0
  100. package/dist/base/split-flap.d.ts +2 -0
  101. package/dist/base/split-flap.js +7 -0
  102. package/dist/base/spotlight-grid.d.ts +2 -0
  103. package/dist/base/spotlight-grid.js +7 -0
  104. package/dist/base/switch.d.ts +2 -0
  105. package/dist/base/switch.js +9 -0
  106. package/dist/base/tabs.d.ts +2 -0
  107. package/dist/base/tabs.js +9 -0
  108. package/dist/base/tag-input.d.ts +2 -0
  109. package/dist/base/tag-input.js +9 -0
  110. package/dist/base/textarea-aui-001.d.ts +2 -0
  111. package/dist/base/textarea-aui-001.js +9 -0
  112. package/dist/base/textarea-aui-002.d.ts +2 -0
  113. package/dist/base/textarea-aui-002.js +9 -0
  114. package/dist/base/textarea-aui-003.d.ts +2 -0
  115. package/dist/base/textarea-aui-003.js +9 -0
  116. package/dist/base/textarea-aui-004.d.ts +2 -0
  117. package/dist/base/textarea-aui-004.js +9 -0
  118. package/dist/base/textarea-aui-005.d.ts +2 -0
  119. package/dist/base/textarea-aui-005.js +9 -0
  120. package/dist/base/textarea-aui-006.d.ts +2 -0
  121. package/dist/base/textarea-aui-006.js +9 -0
  122. package/dist/base/textarea-aui-007.d.ts +2 -0
  123. package/dist/base/textarea-aui-007.js +9 -0
  124. package/dist/base/textarea-aui-008.d.ts +2 -0
  125. package/dist/base/textarea-aui-008.js +9 -0
  126. package/dist/base/textarea.d.ts +2 -0
  127. package/dist/base/textarea.js +9 -0
  128. package/dist/base/toast.d.ts +2 -0
  129. package/dist/base/toast.js +11 -0
  130. package/dist/base/tooltip.d.ts +2 -0
  131. package/dist/base/tooltip.js +9 -0
  132. package/dist/base/trade-ticket.d.ts +2 -0
  133. package/dist/base/trade-ticket.js +7 -0
  134. package/dist/base/variant-picker.d.ts +2 -0
  135. package/dist/base/variant-picker.js +7 -0
  136. package/dist/base.d.ts +1 -0
  137. package/dist/base.js +315 -0
  138. package/dist/bubble-wrap.d.ts +2 -0
  139. package/dist/bubble-wrap.js +7 -0
  140. package/dist/button.d.ts +2 -0
  141. package/dist/button.js +13 -0
  142. package/dist/candlestick.d.ts +2 -0
  143. package/dist/candlestick.js +7 -0
  144. package/dist/card-checkout.d.ts +2 -0
  145. package/dist/card-checkout.js +7 -0
  146. package/dist/cart-drawer.d.ts +2 -0
  147. package/dist/cart-drawer.js +7 -0
  148. package/dist/checkbox.d.ts +2 -0
  149. package/dist/checkbox.js +9 -0
  150. package/dist/chunk-2KJNBHUV.js +137 -0
  151. package/dist/chunk-2OGTIQVU.js +237 -0
  152. package/dist/chunk-2Z5Z4YYZ.js +57 -0
  153. package/dist/chunk-37JQA6PI.js +98 -0
  154. package/dist/chunk-3JNUC3FU.js +92 -0
  155. package/dist/chunk-4L4EKC46.js +360 -0
  156. package/dist/chunk-4WK3F76T.js +57 -0
  157. package/dist/chunk-56BEMYK3.js +36 -0
  158. package/dist/chunk-5A36JYGI.js +71 -0
  159. package/dist/chunk-5RPJPL2V.js +102 -0
  160. package/dist/chunk-6322OCI4.js +189 -0
  161. package/dist/chunk-66OZ7CBK.js +153 -0
  162. package/dist/chunk-6AZKJUL4.js +67 -0
  163. package/dist/chunk-7L4YE6HM.js +56 -0
  164. package/dist/chunk-7MGB7FVD.js +221 -0
  165. package/dist/chunk-7RCBOTWL.js +138 -0
  166. package/dist/chunk-7TK42PS3.js +247 -0
  167. package/dist/chunk-7UMBKY3H.js +105 -0
  168. package/dist/chunk-AS6RA64I.js +53 -0
  169. package/dist/chunk-B7V4ZTKI.js +53 -0
  170. package/dist/chunk-BH2DLHFW.js +145 -0
  171. package/dist/chunk-BOJCW7Z7.js +131 -0
  172. package/dist/chunk-C2G5BUEG.js +197 -0
  173. package/dist/chunk-CLCP2GFW.js +93 -0
  174. package/dist/chunk-CNY76NHF.js +92 -0
  175. package/dist/chunk-CTO36MY2.js +87 -0
  176. package/dist/chunk-DK2BM32V.js +71 -0
  177. package/dist/chunk-DQWKBQBT.js +68 -0
  178. package/dist/chunk-DUGKLVQJ.js +89 -0
  179. package/dist/chunk-E4MX3E3B.js +66 -0
  180. package/dist/chunk-EG7NXGDD.js +109 -0
  181. package/dist/chunk-EVSTTLOT.js +141 -0
  182. package/dist/chunk-F5I6EK7F.js +55 -0
  183. package/dist/chunk-FATLQKRY.js +88 -0
  184. package/dist/chunk-FK2LKLRN.js +89 -0
  185. package/dist/chunk-FT7WZV3D.js +184 -0
  186. package/dist/chunk-FUNXYRSG.js +198 -0
  187. package/dist/chunk-H4URFOQC.js +69 -0
  188. package/dist/chunk-H5C7HOQJ.js +84 -0
  189. package/dist/chunk-JAQANAOP.js +247 -0
  190. package/dist/chunk-JIVLBHHE.js +266 -0
  191. package/dist/chunk-KEMMI76V.js +94 -0
  192. package/dist/chunk-N6FMS47F.js +225 -0
  193. package/dist/chunk-NDBLIYMX.js +62 -0
  194. package/dist/chunk-OBU2UOYI.js +96 -0
  195. package/dist/chunk-OLNMOTAD.js +141 -0
  196. package/dist/chunk-OQU6KGVR.js +70 -0
  197. package/dist/chunk-PIC5ZIR3.js +55 -0
  198. package/dist/chunk-PSTMF66E.js +79 -0
  199. package/dist/chunk-Q7OHWQP2.js +108 -0
  200. package/dist/chunk-QDRBMWRX.js +190 -0
  201. package/dist/chunk-R3LWG23K.js +138 -0
  202. package/dist/chunk-RS3XHHDE.js +77 -0
  203. package/dist/chunk-SAJ4D3Z2.js +206 -0
  204. package/dist/chunk-SATIWCJQ.js +141 -0
  205. package/dist/chunk-SRGDJSW7.js +107 -0
  206. package/dist/chunk-T4SOPNM5.js +107 -0
  207. package/dist/chunk-TCID6NNE.js +69 -0
  208. package/dist/chunk-TIAKMX7U.js +49 -0
  209. package/dist/chunk-TRIXMWR3.js +74 -0
  210. package/dist/chunk-TRR3J5NJ.js +28 -0
  211. package/dist/chunk-U7BYEW3Y.js +115 -0
  212. package/dist/chunk-U7VX6A6K.js +136 -0
  213. package/dist/chunk-UAP47MSR.js +230 -0
  214. package/dist/chunk-UXRTPEH7.js +57 -0
  215. package/dist/chunk-VGBP42IZ.js +84 -0
  216. package/dist/chunk-VWYX5IRP.js +92 -0
  217. package/dist/chunk-WRB66XD3.js +31 -0
  218. package/dist/chunk-WSL4JGEA.js +87 -0
  219. package/dist/chunk-WVIV4JBH.js +69 -0
  220. package/dist/chunk-WWQV7LE7.js +198 -0
  221. package/dist/chunk-XIU7K2YE.js +60 -0
  222. package/dist/chunk-XNL5BLUR.js +283 -0
  223. package/dist/chunk-XRVVZA2Y.js +360 -0
  224. package/dist/chunk-XYNJQGYX.js +107 -0
  225. package/dist/chunk-YON5SU2G.js +156 -0
  226. package/dist/chunk-Z6IAITZJ.js +214 -0
  227. package/dist/chunk-ZE7BT2K4.js +173 -0
  228. package/dist/chunk-ZN3W5PAI.js +107 -0
  229. package/dist/chunk-ZQV2GAWY.js +178 -0
  230. package/dist/chunk-ZRGPSYW6.js +237 -0
  231. package/dist/chunk-ZWBJUJTR.js +83 -0
  232. package/dist/combo-lock.d.ts +2 -0
  233. package/dist/combo-lock.js +7 -0
  234. package/dist/command-palette.d.ts +2 -0
  235. package/dist/command-palette.js +11 -0
  236. package/dist/dial-knob.d.ts +2 -0
  237. package/dist/dial-knob.js +7 -0
  238. package/dist/dialog.d.ts +2 -0
  239. package/dist/dialog.js +9 -0
  240. package/dist/dropdown-menu.d.ts +2 -0
  241. package/dist/dropdown-menu.js +10 -0
  242. package/dist/elastic-string.d.ts +2 -0
  243. package/dist/elastic-string.js +7 -0
  244. package/dist/field.d.ts +2 -0
  245. package/dist/field.js +11 -0
  246. package/dist/footer.d.ts +2 -0
  247. package/dist/footer.js +12 -0
  248. package/dist/gravity-pills.d.ts +2 -0
  249. package/dist/gravity-pills.js +7 -0
  250. package/dist/hold-to-confirm.d.ts +2 -0
  251. package/dist/hold-to-confirm.js +7 -0
  252. package/dist/index.d.ts +1 -0
  253. package/dist/index.js +315 -0
  254. package/dist/ink-trail.d.ts +2 -0
  255. package/dist/ink-trail.js +7 -0
  256. package/dist/input.d.ts +2 -0
  257. package/dist/input.js +11 -0
  258. package/dist/kbd.d.ts +2 -0
  259. package/dist/kbd.js +11 -0
  260. package/dist/morse-tap.d.ts +2 -0
  261. package/dist/morse-tap.js +7 -0
  262. package/dist/motion-button.d.ts +2 -0
  263. package/dist/motion-button.js +23 -0
  264. package/dist/navbar.d.ts +2 -0
  265. package/dist/navbar.js +10 -0
  266. package/dist/needle-field.d.ts +2 -0
  267. package/dist/needle-field.js +7 -0
  268. package/dist/number-input.d.ts +2 -0
  269. package/dist/number-input.js +9 -0
  270. package/dist/order-book.d.ts +2 -0
  271. package/dist/order-book.js +7 -0
  272. package/dist/pay-methods.d.ts +2 -0
  273. package/dist/pay-methods.js +7 -0
  274. package/dist/payment-status.d.ts +2 -0
  275. package/dist/payment-status.js +7 -0
  276. package/dist/pixel-reveal.d.ts +2 -0
  277. package/dist/pixel-reveal.js +7 -0
  278. package/dist/price-chart.d.ts +2 -0
  279. package/dist/price-chart.js +7 -0
  280. package/dist/pricing.d.ts +2 -0
  281. package/dist/pricing.js +14 -0
  282. package/dist/radio-group.d.ts +2 -0
  283. package/dist/radio-group.js +11 -0
  284. package/dist/scramble-text.d.ts +2 -0
  285. package/dist/scramble-text.js +7 -0
  286. package/dist/segmented-control.d.ts +2 -0
  287. package/dist/segmented-control.js +9 -0
  288. package/dist/select.d.ts +2 -0
  289. package/dist/select.js +9 -0
  290. package/dist/settings-panel.d.ts +2 -0
  291. package/dist/settings-panel.js +10 -0
  292. package/dist/sign-in.d.ts +2 -0
  293. package/dist/sign-in.js +10 -0
  294. package/dist/skeleton.d.ts +2 -0
  295. package/dist/skeleton.js +13 -0
  296. package/dist/slider.d.ts +2 -0
  297. package/dist/slider.js +9 -0
  298. package/dist/snap-grid.d.ts +2 -0
  299. package/dist/snap-grid.js +7 -0
  300. package/dist/spinner.d.ts +2 -0
  301. package/dist/spinner.js +11 -0
  302. package/dist/split-flap.d.ts +2 -0
  303. package/dist/split-flap.js +7 -0
  304. package/dist/spotlight-grid.d.ts +2 -0
  305. package/dist/spotlight-grid.js +7 -0
  306. package/dist/styles.css +46 -0
  307. package/dist/switch.d.ts +2 -0
  308. package/dist/switch.js +9 -0
  309. package/dist/tabs.d.ts +2 -0
  310. package/dist/tabs.js +9 -0
  311. package/dist/tag-input.d.ts +2 -0
  312. package/dist/tag-input.js +9 -0
  313. package/dist/textarea-aui-001.d.ts +2 -0
  314. package/dist/textarea-aui-001.js +9 -0
  315. package/dist/textarea-aui-002.d.ts +2 -0
  316. package/dist/textarea-aui-002.js +9 -0
  317. package/dist/textarea-aui-003.d.ts +2 -0
  318. package/dist/textarea-aui-003.js +9 -0
  319. package/dist/textarea-aui-004.d.ts +2 -0
  320. package/dist/textarea-aui-004.js +9 -0
  321. package/dist/textarea-aui-005.d.ts +2 -0
  322. package/dist/textarea-aui-005.js +9 -0
  323. package/dist/textarea-aui-006.d.ts +2 -0
  324. package/dist/textarea-aui-006.js +9 -0
  325. package/dist/textarea-aui-007.d.ts +2 -0
  326. package/dist/textarea-aui-007.js +9 -0
  327. package/dist/textarea-aui-008.d.ts +2 -0
  328. package/dist/textarea-aui-008.js +9 -0
  329. package/dist/textarea.d.ts +2 -0
  330. package/dist/textarea.js +9 -0
  331. package/dist/toast.d.ts +2 -0
  332. package/dist/toast.js +11 -0
  333. package/dist/tooltip.d.ts +2 -0
  334. package/dist/tooltip.js +9 -0
  335. package/dist/trade-ticket.d.ts +2 -0
  336. package/dist/trade-ticket.js +7 -0
  337. package/dist/types/components/kit/accordion.d.ts +19 -0
  338. package/dist/types/components/kit/avatar.d.ts +32 -0
  339. package/dist/types/components/kit/badge.d.ts +23 -0
  340. package/dist/types/components/kit/base/accordion.d.ts +19 -0
  341. package/dist/types/components/kit/base/avatar.d.ts +32 -0
  342. package/dist/types/components/kit/base/button.d.ts +38 -0
  343. package/dist/types/components/kit/base/checkbox.d.ts +19 -0
  344. package/dist/types/components/kit/base/command-palette.d.ts +38 -0
  345. package/dist/types/components/kit/base/dialog.d.ts +21 -0
  346. package/dist/types/components/kit/base/dropdown-menu.d.ts +32 -0
  347. package/dist/types/components/kit/base/footer.d.ts +29 -0
  348. package/dist/types/components/kit/base/navbar.d.ts +54 -0
  349. package/dist/types/components/kit/base/pricing.d.ts +39 -0
  350. package/dist/types/components/kit/base/radio-group.d.ts +29 -0
  351. package/dist/types/components/kit/base/segmented-control.d.ts +23 -0
  352. package/dist/types/components/kit/base/select.d.ts +29 -0
  353. package/dist/types/components/kit/base/settings-panel.d.ts +29 -0
  354. package/dist/types/components/kit/base/sign-in.d.ts +17 -0
  355. package/dist/types/components/kit/base/slider.d.ts +27 -0
  356. package/dist/types/components/kit/base/switch.d.ts +22 -0
  357. package/dist/types/components/kit/base/tabs.d.ts +23 -0
  358. package/dist/types/components/kit/base/tooltip.d.ts +20 -0
  359. package/dist/types/components/kit/base/variants/textarea-aui-008.d.ts +23 -0
  360. package/dist/types/components/kit/button.d.ts +38 -0
  361. package/dist/types/components/kit/checkbox.d.ts +19 -0
  362. package/dist/types/components/kit/command-palette.d.ts +38 -0
  363. package/dist/types/components/kit/dialog.d.ts +21 -0
  364. package/dist/types/components/kit/dropdown-menu.d.ts +32 -0
  365. package/dist/types/components/kit/field.d.ts +19 -0
  366. package/dist/types/components/kit/footer.d.ts +29 -0
  367. package/dist/types/components/kit/input.d.ts +19 -0
  368. package/dist/types/components/kit/kbd.d.ts +26 -0
  369. package/dist/types/components/kit/motion-button.d.ts +30 -0
  370. package/dist/types/components/kit/navbar.d.ts +54 -0
  371. package/dist/types/components/kit/number-input.d.ts +20 -0
  372. package/dist/types/components/kit/pricing.d.ts +39 -0
  373. package/dist/types/components/kit/radio-group.d.ts +29 -0
  374. package/dist/types/components/kit/segmented-control.d.ts +23 -0
  375. package/dist/types/components/kit/select.d.ts +29 -0
  376. package/dist/types/components/kit/settings-panel.d.ts +29 -0
  377. package/dist/types/components/kit/sign-in.d.ts +17 -0
  378. package/dist/types/components/kit/skeleton.d.ts +20 -0
  379. package/dist/types/components/kit/slider.d.ts +27 -0
  380. package/dist/types/components/kit/spinner.d.ts +18 -0
  381. package/dist/types/components/kit/switch.d.ts +22 -0
  382. package/dist/types/components/kit/tabs.d.ts +23 -0
  383. package/dist/types/components/kit/tag-input.d.ts +16 -0
  384. package/dist/types/components/kit/textarea.d.ts +11 -0
  385. package/dist/types/components/kit/toast.d.ts +32 -0
  386. package/dist/types/components/kit/tooltip.d.ts +20 -0
  387. package/dist/types/components/kit/variants/textarea-aui-001.d.ts +13 -0
  388. package/dist/types/components/kit/variants/textarea-aui-002.d.ts +13 -0
  389. package/dist/types/components/kit/variants/textarea-aui-003.d.ts +16 -0
  390. package/dist/types/components/kit/variants/textarea-aui-004.d.ts +7 -0
  391. package/dist/types/components/kit/variants/textarea-aui-005.d.ts +8 -0
  392. package/dist/types/components/kit/variants/textarea-aui-006.d.ts +21 -0
  393. package/dist/types/components/kit/variants/textarea-aui-007.d.ts +20 -0
  394. package/dist/types/components/kit/variants/textarea-aui-008.d.ts +23 -0
  395. package/dist/types/components/lab/blocks/AddToCart.d.ts +10 -0
  396. package/dist/types/components/lab/blocks/BubbleWrap.d.ts +2 -0
  397. package/dist/types/components/lab/blocks/Candlestick.d.ts +2 -0
  398. package/dist/types/components/lab/blocks/CardCheckout.d.ts +5 -0
  399. package/dist/types/components/lab/blocks/CartDrawer.d.ts +2 -0
  400. package/dist/types/components/lab/blocks/ComboLock.d.ts +2 -0
  401. package/dist/types/components/lab/blocks/DialKnob.d.ts +2 -0
  402. package/dist/types/components/lab/blocks/ElasticString.d.ts +2 -0
  403. package/dist/types/components/lab/blocks/GravityPills.d.ts +2 -0
  404. package/dist/types/components/lab/blocks/HoldToConfirm.d.ts +6 -0
  405. package/dist/types/components/lab/blocks/InkTrail.d.ts +2 -0
  406. package/dist/types/components/lab/blocks/MorseTap.d.ts +2 -0
  407. package/dist/types/components/lab/blocks/NeedleField.d.ts +2 -0
  408. package/dist/types/components/lab/blocks/OrderBook.d.ts +2 -0
  409. package/dist/types/components/lab/blocks/PayMethods.d.ts +2 -0
  410. package/dist/types/components/lab/blocks/PaymentStatus.d.ts +2 -0
  411. package/dist/types/components/lab/blocks/PixelReveal.d.ts +2 -0
  412. package/dist/types/components/lab/blocks/PriceChart.d.ts +2 -0
  413. package/dist/types/components/lab/blocks/ScrambleText.d.ts +1 -0
  414. package/dist/types/components/lab/blocks/SnapGrid.d.ts +2 -0
  415. package/dist/types/components/lab/blocks/SplitFlap.d.ts +2 -0
  416. package/dist/types/components/lab/blocks/SpotlightGrid.d.ts +1 -0
  417. package/dist/types/components/lab/blocks/TradeTicket.d.ts +2 -0
  418. package/dist/types/components/lab/blocks/VariantPicker.d.ts +2 -0
  419. package/dist/types/packages/asta-ui/src/accordion.d.ts +2 -0
  420. package/dist/types/packages/asta-ui/src/add-to-cart.d.ts +2 -0
  421. package/dist/types/packages/asta-ui/src/avatar.d.ts +2 -0
  422. package/dist/types/packages/asta-ui/src/badge.d.ts +2 -0
  423. package/dist/types/packages/asta-ui/src/base/accordion.d.ts +2 -0
  424. package/dist/types/packages/asta-ui/src/base/add-to-cart.d.ts +2 -0
  425. package/dist/types/packages/asta-ui/src/base/avatar.d.ts +2 -0
  426. package/dist/types/packages/asta-ui/src/base/badge.d.ts +2 -0
  427. package/dist/types/packages/asta-ui/src/base/bubble-wrap.d.ts +2 -0
  428. package/dist/types/packages/asta-ui/src/base/button.d.ts +2 -0
  429. package/dist/types/packages/asta-ui/src/base/candlestick.d.ts +2 -0
  430. package/dist/types/packages/asta-ui/src/base/card-checkout.d.ts +2 -0
  431. package/dist/types/packages/asta-ui/src/base/cart-drawer.d.ts +2 -0
  432. package/dist/types/packages/asta-ui/src/base/checkbox.d.ts +2 -0
  433. package/dist/types/packages/asta-ui/src/base/combo-lock.d.ts +2 -0
  434. package/dist/types/packages/asta-ui/src/base/command-palette.d.ts +2 -0
  435. package/dist/types/packages/asta-ui/src/base/dial-knob.d.ts +2 -0
  436. package/dist/types/packages/asta-ui/src/base/dialog.d.ts +2 -0
  437. package/dist/types/packages/asta-ui/src/base/dropdown-menu.d.ts +2 -0
  438. package/dist/types/packages/asta-ui/src/base/elastic-string.d.ts +2 -0
  439. package/dist/types/packages/asta-ui/src/base/field.d.ts +2 -0
  440. package/dist/types/packages/asta-ui/src/base/footer.d.ts +2 -0
  441. package/dist/types/packages/asta-ui/src/base/gravity-pills.d.ts +2 -0
  442. package/dist/types/packages/asta-ui/src/base/hold-to-confirm.d.ts +2 -0
  443. package/dist/types/packages/asta-ui/src/base/ink-trail.d.ts +2 -0
  444. package/dist/types/packages/asta-ui/src/base/input.d.ts +2 -0
  445. package/dist/types/packages/asta-ui/src/base/kbd.d.ts +2 -0
  446. package/dist/types/packages/asta-ui/src/base/morse-tap.d.ts +2 -0
  447. package/dist/types/packages/asta-ui/src/base/motion-button.d.ts +2 -0
  448. package/dist/types/packages/asta-ui/src/base/navbar.d.ts +2 -0
  449. package/dist/types/packages/asta-ui/src/base/needle-field.d.ts +2 -0
  450. package/dist/types/packages/asta-ui/src/base/number-input.d.ts +2 -0
  451. package/dist/types/packages/asta-ui/src/base/order-book.d.ts +2 -0
  452. package/dist/types/packages/asta-ui/src/base/pay-methods.d.ts +2 -0
  453. package/dist/types/packages/asta-ui/src/base/payment-status.d.ts +2 -0
  454. package/dist/types/packages/asta-ui/src/base/pixel-reveal.d.ts +2 -0
  455. package/dist/types/packages/asta-ui/src/base/price-chart.d.ts +2 -0
  456. package/dist/types/packages/asta-ui/src/base/pricing.d.ts +2 -0
  457. package/dist/types/packages/asta-ui/src/base/radio-group.d.ts +2 -0
  458. package/dist/types/packages/asta-ui/src/base/scramble-text.d.ts +2 -0
  459. package/dist/types/packages/asta-ui/src/base/segmented-control.d.ts +2 -0
  460. package/dist/types/packages/asta-ui/src/base/select.d.ts +2 -0
  461. package/dist/types/packages/asta-ui/src/base/settings-panel.d.ts +2 -0
  462. package/dist/types/packages/asta-ui/src/base/sign-in.d.ts +2 -0
  463. package/dist/types/packages/asta-ui/src/base/skeleton.d.ts +2 -0
  464. package/dist/types/packages/asta-ui/src/base/slider.d.ts +2 -0
  465. package/dist/types/packages/asta-ui/src/base/snap-grid.d.ts +2 -0
  466. package/dist/types/packages/asta-ui/src/base/spinner.d.ts +2 -0
  467. package/dist/types/packages/asta-ui/src/base/split-flap.d.ts +2 -0
  468. package/dist/types/packages/asta-ui/src/base/spotlight-grid.d.ts +2 -0
  469. package/dist/types/packages/asta-ui/src/base/switch.d.ts +2 -0
  470. package/dist/types/packages/asta-ui/src/base/tabs.d.ts +2 -0
  471. package/dist/types/packages/asta-ui/src/base/tag-input.d.ts +2 -0
  472. package/dist/types/packages/asta-ui/src/base/textarea-aui-001.d.ts +2 -0
  473. package/dist/types/packages/asta-ui/src/base/textarea-aui-002.d.ts +2 -0
  474. package/dist/types/packages/asta-ui/src/base/textarea-aui-003.d.ts +2 -0
  475. package/dist/types/packages/asta-ui/src/base/textarea-aui-004.d.ts +2 -0
  476. package/dist/types/packages/asta-ui/src/base/textarea-aui-005.d.ts +2 -0
  477. package/dist/types/packages/asta-ui/src/base/textarea-aui-006.d.ts +2 -0
  478. package/dist/types/packages/asta-ui/src/base/textarea-aui-007.d.ts +2 -0
  479. package/dist/types/packages/asta-ui/src/base/textarea-aui-008.d.ts +2 -0
  480. package/dist/types/packages/asta-ui/src/base/textarea.d.ts +2 -0
  481. package/dist/types/packages/asta-ui/src/base/toast.d.ts +2 -0
  482. package/dist/types/packages/asta-ui/src/base/tooltip.d.ts +2 -0
  483. package/dist/types/packages/asta-ui/src/base/trade-ticket.d.ts +2 -0
  484. package/dist/types/packages/asta-ui/src/base/variant-picker.d.ts +2 -0
  485. package/dist/types/packages/asta-ui/src/base.d.ts +100 -0
  486. package/dist/types/packages/asta-ui/src/bubble-wrap.d.ts +2 -0
  487. package/dist/types/packages/asta-ui/src/button.d.ts +2 -0
  488. package/dist/types/packages/asta-ui/src/candlestick.d.ts +2 -0
  489. package/dist/types/packages/asta-ui/src/card-checkout.d.ts +2 -0
  490. package/dist/types/packages/asta-ui/src/cart-drawer.d.ts +2 -0
  491. package/dist/types/packages/asta-ui/src/checkbox.d.ts +2 -0
  492. package/dist/types/packages/asta-ui/src/combo-lock.d.ts +2 -0
  493. package/dist/types/packages/asta-ui/src/command-palette.d.ts +2 -0
  494. package/dist/types/packages/asta-ui/src/dial-knob.d.ts +2 -0
  495. package/dist/types/packages/asta-ui/src/dialog.d.ts +2 -0
  496. package/dist/types/packages/asta-ui/src/dropdown-menu.d.ts +2 -0
  497. package/dist/types/packages/asta-ui/src/elastic-string.d.ts +2 -0
  498. package/dist/types/packages/asta-ui/src/field.d.ts +2 -0
  499. package/dist/types/packages/asta-ui/src/footer.d.ts +2 -0
  500. package/dist/types/packages/asta-ui/src/gravity-pills.d.ts +2 -0
  501. package/dist/types/packages/asta-ui/src/hold-to-confirm.d.ts +2 -0
  502. package/dist/types/packages/asta-ui/src/index.d.ts +100 -0
  503. package/dist/types/packages/asta-ui/src/ink-trail.d.ts +2 -0
  504. package/dist/types/packages/asta-ui/src/input.d.ts +2 -0
  505. package/dist/types/packages/asta-ui/src/kbd.d.ts +2 -0
  506. package/dist/types/packages/asta-ui/src/morse-tap.d.ts +2 -0
  507. package/dist/types/packages/asta-ui/src/motion-button.d.ts +2 -0
  508. package/dist/types/packages/asta-ui/src/navbar.d.ts +2 -0
  509. package/dist/types/packages/asta-ui/src/needle-field.d.ts +2 -0
  510. package/dist/types/packages/asta-ui/src/number-input.d.ts +2 -0
  511. package/dist/types/packages/asta-ui/src/order-book.d.ts +2 -0
  512. package/dist/types/packages/asta-ui/src/pay-methods.d.ts +2 -0
  513. package/dist/types/packages/asta-ui/src/payment-status.d.ts +2 -0
  514. package/dist/types/packages/asta-ui/src/pixel-reveal.d.ts +2 -0
  515. package/dist/types/packages/asta-ui/src/price-chart.d.ts +2 -0
  516. package/dist/types/packages/asta-ui/src/pricing.d.ts +2 -0
  517. package/dist/types/packages/asta-ui/src/radio-group.d.ts +2 -0
  518. package/dist/types/packages/asta-ui/src/scramble-text.d.ts +2 -0
  519. package/dist/types/packages/asta-ui/src/segmented-control.d.ts +2 -0
  520. package/dist/types/packages/asta-ui/src/select.d.ts +2 -0
  521. package/dist/types/packages/asta-ui/src/settings-panel.d.ts +2 -0
  522. package/dist/types/packages/asta-ui/src/sign-in.d.ts +2 -0
  523. package/dist/types/packages/asta-ui/src/skeleton.d.ts +2 -0
  524. package/dist/types/packages/asta-ui/src/slider.d.ts +2 -0
  525. package/dist/types/packages/asta-ui/src/snap-grid.d.ts +2 -0
  526. package/dist/types/packages/asta-ui/src/spinner.d.ts +2 -0
  527. package/dist/types/packages/asta-ui/src/split-flap.d.ts +2 -0
  528. package/dist/types/packages/asta-ui/src/spotlight-grid.d.ts +2 -0
  529. package/dist/types/packages/asta-ui/src/switch.d.ts +2 -0
  530. package/dist/types/packages/asta-ui/src/tabs.d.ts +2 -0
  531. package/dist/types/packages/asta-ui/src/tag-input.d.ts +2 -0
  532. package/dist/types/packages/asta-ui/src/textarea-aui-001.d.ts +2 -0
  533. package/dist/types/packages/asta-ui/src/textarea-aui-002.d.ts +2 -0
  534. package/dist/types/packages/asta-ui/src/textarea-aui-003.d.ts +2 -0
  535. package/dist/types/packages/asta-ui/src/textarea-aui-004.d.ts +2 -0
  536. package/dist/types/packages/asta-ui/src/textarea-aui-005.d.ts +2 -0
  537. package/dist/types/packages/asta-ui/src/textarea-aui-006.d.ts +2 -0
  538. package/dist/types/packages/asta-ui/src/textarea-aui-007.d.ts +2 -0
  539. package/dist/types/packages/asta-ui/src/textarea-aui-008.d.ts +2 -0
  540. package/dist/types/packages/asta-ui/src/textarea.d.ts +2 -0
  541. package/dist/types/packages/asta-ui/src/toast.d.ts +2 -0
  542. package/dist/types/packages/asta-ui/src/tooltip.d.ts +2 -0
  543. package/dist/types/packages/asta-ui/src/trade-ticket.d.ts +2 -0
  544. package/dist/types/packages/asta-ui/src/variant-picker.d.ts +2 -0
  545. package/dist/variant-picker.d.ts +2 -0
  546. package/dist/variant-picker.js +7 -0
  547. package/package.json +86 -4
@@ -0,0 +1,214 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/TradeTicket.tsx
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var UP = "var(--brand)";
7
+ var DOWN = "var(--ink)";
8
+ var EASE = "cubic-bezier(.16,1,.3,1)";
9
+ var PRICE = 1842.5;
10
+ var BALANCE = { buy: 4600, sell: 2.4 };
11
+ var DETENTS = [0, 25, 50, 75, 100];
12
+ function TradeTicket() {
13
+ const [side, setSide] = useState("buy");
14
+ const [pct, setPct] = useState(40);
15
+ const [glide, setGlide] = useState(true);
16
+ const [phase, setPhase] = useState("idle");
17
+ const touched = useRef(false);
18
+ const track = useRef(null);
19
+ const timers = useRef([]);
20
+ const [shown, setShown] = useState(40);
21
+ const target = useRef({ pct: 40, glide: true });
22
+ useEffect(() => {
23
+ target.current = { pct, glide };
24
+ }, [pct, glide]);
25
+ useEffect(() => {
26
+ const still = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
27
+ let raf = 0;
28
+ let last = performance.now();
29
+ let v = target.current.pct;
30
+ const step = (now) => {
31
+ const dt = Math.min(64, now - last);
32
+ last = now;
33
+ const t = target.current;
34
+ if (still || !t.glide) v = t.pct;
35
+ else v += (t.pct - v) * (1 - Math.exp(-dt / 160));
36
+ if (Math.abs(t.pct - v) < 0.02) v = t.pct;
37
+ setShown((o) => o === v ? o : v);
38
+ raf = requestAnimationFrame(step);
39
+ };
40
+ raf = requestAnimationFrame(step);
41
+ return () => cancelAnimationFrame(raf);
42
+ }, []);
43
+ const amount = side === "buy" ? BALANCE.buy * shown / 100 / PRICE : BALANCE.sell * shown / 100;
44
+ const usd = amount * PRICE;
45
+ const color = side === "buy" ? UP : DOWN;
46
+ const submit = () => {
47
+ if (phase !== "idle" || pct === 0) return;
48
+ setPhase("sending");
49
+ timers.current.push(setTimeout(() => setPhase("done"), 900));
50
+ timers.current.push(setTimeout(() => setPhase("idle"), 2400));
51
+ };
52
+ useEffect(() => {
53
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
54
+ let n = 0;
55
+ const T = timers.current;
56
+ const loop = () => {
57
+ if (touched.current) return;
58
+ n++;
59
+ if (n % 3 === 0) setSide((s) => s === "buy" ? "sell" : "buy");
60
+ setGlide(true);
61
+ setPct(DETENTS[1 + Math.floor(Math.random() * 4)]);
62
+ T.push(setTimeout(() => !touched.current && setPhase("sending"), 1300));
63
+ T.push(setTimeout(() => !touched.current && setPhase("done"), 2200));
64
+ T.push(setTimeout(() => !touched.current && setPhase("idle"), 3600));
65
+ T.push(setTimeout(loop, 4400));
66
+ };
67
+ T.push(setTimeout(loop, 900));
68
+ return () => T.forEach(clearTimeout);
69
+ }, []);
70
+ const stopDemo = () => {
71
+ if (touched.current) return;
72
+ touched.current = true;
73
+ timers.current.forEach(clearTimeout);
74
+ timers.current = [];
75
+ setPhase("idle");
76
+ };
77
+ const fromX = (clientX) => {
78
+ const r = track.current.getBoundingClientRect();
79
+ let v = Math.max(0, Math.min(100, (clientX - r.left) / r.width * 100));
80
+ const near = DETENTS.find((d) => Math.abs(d - v) < 3);
81
+ if (near !== void 0) v = near;
82
+ setPct(Math.round(v));
83
+ };
84
+ return /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center px-6 pb-6 pt-14", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[340px] flex-col gap-[clamp(14px,4vh,26px)]", children: [
85
+ /* @__PURE__ */ jsxs("div", { className: "relative grid grid-cols-2 rounded-[10px] bg-paper-2 p-1 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)]", children: [
86
+ /* @__PURE__ */ jsx(
87
+ "span",
88
+ {
89
+ "aria-hidden": true,
90
+ className: "absolute inset-y-1 left-1 w-[calc(50%-4px)] rounded-[7px] transition-[transform,background-color] duration-500 motion-reduce:transition-none",
91
+ style: { transform: side === "sell" ? "translateX(100%)" : "none", background: color, transitionTimingFunction: EASE }
92
+ }
93
+ ),
94
+ ["buy", "sell"].map((s) => /* @__PURE__ */ jsx(
95
+ "button",
96
+ {
97
+ type: "button",
98
+ "aria-pressed": side === s,
99
+ onClick: () => {
100
+ stopDemo();
101
+ setSide(s);
102
+ },
103
+ className: `relative z-10 h-9 rounded-[7px] text-[14px] font-medium capitalize outline-none transition-colors duration-300 focus-visible:ring-2 focus-visible:ring-signal/60 ${side === s ? "text-paper" : "text-mute hover:text-ink"}`,
104
+ children: s
105
+ },
106
+ s
107
+ ))
108
+ ] }),
109
+ /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
110
+ /* @__PURE__ */ jsxs("div", { className: "text-[clamp(2.2rem,7vw,3.4rem)] font-medium leading-none tracking-[-0.045em] text-ink tabular-nums", children: [
111
+ amount.toFixed(3),
112
+ /* @__PURE__ */ jsx("span", { className: "ml-2 text-[0.42em] font-normal tracking-normal text-mute", children: "ACME" })
113
+ ] }),
114
+ /* @__PURE__ */ jsxs("p", { className: "mt-2 font-mono text-[12px] tabular-nums text-mute", children: [
115
+ "\u2248 $",
116
+ usd.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
117
+ ] })
118
+ ] }),
119
+ /* @__PURE__ */ jsxs(
120
+ "div",
121
+ {
122
+ ref: track,
123
+ role: "slider",
124
+ tabIndex: 0,
125
+ "aria-label": "Order size",
126
+ "aria-valuemin": 0,
127
+ "aria-valuemax": 100,
128
+ "aria-valuenow": pct,
129
+ "aria-valuetext": `${pct}% of balance`,
130
+ className: "group relative h-8 cursor-pointer outline-none [touch-action:none]",
131
+ onPointerDown: (e) => {
132
+ stopDemo();
133
+ setGlide(false);
134
+ e.currentTarget.setPointerCapture(e.pointerId);
135
+ fromX(e.clientX);
136
+ },
137
+ onPointerMove: (e) => e.buttons && fromX(e.clientX),
138
+ onPointerUp: () => setGlide(true),
139
+ onKeyDown: (e) => {
140
+ const i = DETENTS.findIndex((d) => d >= pct);
141
+ if (e.key === "ArrowRight" || e.key === "ArrowUp") setPct(DETENTS[Math.min(4, DETENTS[i] === pct ? i + 1 : i)]);
142
+ else if (e.key === "ArrowLeft" || e.key === "ArrowDown") setPct(DETENTS[Math.max(0, i - 1)]);
143
+ else return;
144
+ e.preventDefault();
145
+ stopDemo();
146
+ setGlide(true);
147
+ },
148
+ children: [
149
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-paper-2 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent)]" }),
150
+ /* @__PURE__ */ jsx(
151
+ "div",
152
+ {
153
+ className: "absolute inset-x-0 top-1/2 h-1.5 origin-left rounded-full",
154
+ style: { transform: `translateY(-50%) scaleX(${shown / 100})`, background: color, transition: `background-color .5s ${EASE}` }
155
+ }
156
+ ),
157
+ DETENTS.map((d) => /* @__PURE__ */ jsx(
158
+ "span",
159
+ {
160
+ "aria-hidden": true,
161
+ className: "absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 transition-colors duration-300",
162
+ style: { left: `${d}%`, borderColor: d <= shown + 0.5 ? color : "color-mix(in srgb, var(--ink) 18%, transparent)", background: "var(--paper)" }
163
+ },
164
+ d
165
+ )),
166
+ /* @__PURE__ */ jsx(
167
+ "span",
168
+ {
169
+ "aria-hidden": true,
170
+ className: "absolute top-1/2 h-5 w-5 -translate-x-1/2 -translate-y-1/2 rounded-full bg-ink shadow-[0_2px_8px_rgb(0_0_0/0.45)] ring-4 ring-transparent transition-shadow group-focus-visible:ring-signal/40",
171
+ style: { left: `${shown}%` }
172
+ }
173
+ ),
174
+ /* @__PURE__ */ jsxs("span", { className: "absolute -bottom-4 right-0 font-mono text-[11px] tabular-nums text-mute", children: [
175
+ Math.round(shown),
176
+ "%"
177
+ ] })
178
+ ]
179
+ }
180
+ ),
181
+ /* @__PURE__ */ jsxs(
182
+ "button",
183
+ {
184
+ type: "button",
185
+ onClick: () => {
186
+ stopDemo();
187
+ submit();
188
+ },
189
+ disabled: pct === 0,
190
+ className: "relative mt-2 flex h-12 items-center justify-center overflow-hidden rounded-[10px] text-[15px] font-medium text-paper outline-none transition-[background-color,transform,opacity] duration-300 active:scale-[0.98] disabled:opacity-40 focus-visible:ring-2 focus-visible:ring-signal/60",
191
+ style: { background: color },
192
+ children: [
193
+ /* @__PURE__ */ jsxs("span", { className: `absolute flex items-center gap-2 transition-[transform,opacity] duration-500 ease-[cubic-bezier(.16,1,.3,1)] ${phase === "idle" ? "translate-y-0 opacity-100" : "-translate-y-4 opacity-0"}`, children: [
194
+ /* @__PURE__ */ jsx("span", { className: "capitalize", children: side }),
195
+ " ACME"
196
+ ] }),
197
+ /* @__PURE__ */ jsx("span", { className: `absolute transition-[transform,opacity] duration-500 ease-[cubic-bezier(.16,1,.3,1)] ${phase === "sending" ? "scale-100 opacity-100" : "scale-50 opacity-0"}`, children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 16 16", className: "h-5 w-5 animate-spin", fill: "none", "aria-hidden": true, children: [
198
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeOpacity: ".3", strokeWidth: "2" }),
199
+ /* @__PURE__ */ jsx("path", { d: "M14 8a6 6 0 0 0-6-6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
200
+ ] }) }),
201
+ /* @__PURE__ */ jsxs("span", { className: `absolute flex items-center gap-2 transition-[transform,opacity] duration-500 ease-[cubic-bezier(.16,1,.3,1)] ${phase === "done" ? "translate-y-0 opacity-100" : "translate-y-4 opacity-0"}`, children: [
202
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3.5 8.5l3 3 6-7" }) }),
203
+ "Filled ",
204
+ amount.toFixed(3)
205
+ ] })
206
+ ]
207
+ }
208
+ )
209
+ ] }) });
210
+ }
211
+
212
+ export {
213
+ TradeTicket
214
+ };
@@ -0,0 +1,173 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/GravityPills.tsx
4
+ import { useEffect, useRef } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var WORDS = ["motion", "type", "rust", "grid", "lab", "brand", "spring", "ui", "craft", "pixels"];
7
+ function GravityPills() {
8
+ const ref = useRef(null);
9
+ useEffect(() => {
10
+ const cv = ref.current;
11
+ const css = getComputedStyle(cv);
12
+ const SIG = css.getPropertyValue("--color-signal").trim() || "#c5f82a";
13
+ const ON = css.getPropertyValue("--color-on-signal").trim() || "#0a0b0a";
14
+ const ctx = cv.getContext("2d");
15
+ let w = 0;
16
+ let h = 0;
17
+ let dpr = 1;
18
+ let raf = 0;
19
+ let bodies = [];
20
+ let grab = null;
21
+ const reset = () => {
22
+ bodies = WORDS.map((word, i) => ({
23
+ x: w * (0.2 + i * 0.37 % 0.6),
24
+ y: -40 - i * 45,
25
+ vx: 0,
26
+ vy: 0,
27
+ r: Math.max(22, Math.min(w * 0.09, 14 + word.length * 4.2)),
28
+ word,
29
+ hot: i === 4
30
+ }));
31
+ };
32
+ const size = () => {
33
+ const r = cv.getBoundingClientRect();
34
+ w = r.width;
35
+ h = r.height;
36
+ dpr = Math.min(window.devicePixelRatio || 1, 2);
37
+ cv.width = Math.round(w * dpr);
38
+ cv.height = Math.round(h * dpr);
39
+ if (!bodies.length) reset();
40
+ };
41
+ const step = () => {
42
+ for (const b of bodies) {
43
+ if (grab?.b === b) continue;
44
+ b.vy += 0.45;
45
+ b.vx *= 0.995;
46
+ b.x += b.vx;
47
+ b.y += b.vy;
48
+ if (b.y > h - b.r) {
49
+ b.y = h - b.r;
50
+ b.vy *= -0.35;
51
+ b.vx *= 0.9;
52
+ }
53
+ if (b.x < b.r) {
54
+ b.x = b.r;
55
+ b.vx *= -0.5;
56
+ }
57
+ if (b.x > w - b.r) {
58
+ b.x = w - b.r;
59
+ b.vx *= -0.5;
60
+ }
61
+ }
62
+ for (let k = 0; k < 3; k++) {
63
+ for (let i = 0; i < bodies.length; i++) {
64
+ for (let j = i + 1; j < bodies.length; j++) {
65
+ const a = bodies[i];
66
+ const b = bodies[j];
67
+ const dx = b.x - a.x;
68
+ const dy = b.y - a.y;
69
+ const d = Math.hypot(dx, dy) || 0.01;
70
+ const min = a.r + b.r;
71
+ if (d < min) {
72
+ const push = (min - d) / 2;
73
+ const nx = dx / d;
74
+ const ny = dy / d;
75
+ const ag = grab?.b === a;
76
+ const bg = grab?.b === b;
77
+ if (!ag) {
78
+ a.x -= nx * push * (bg ? 2 : 1);
79
+ a.y -= ny * push * (bg ? 2 : 1);
80
+ }
81
+ if (!bg) {
82
+ b.x += nx * push * (ag ? 2 : 1);
83
+ b.y += ny * push * (ag ? 2 : 1);
84
+ }
85
+ const rv = (b.vx - a.vx) * nx + (b.vy - a.vy) * ny;
86
+ if (rv < 0) {
87
+ const imp = -rv * 0.6;
88
+ if (!ag) {
89
+ a.vx -= imp * nx;
90
+ a.vy -= imp * ny;
91
+ }
92
+ if (!bg) {
93
+ b.vx += imp * nx;
94
+ b.vy += imp * ny;
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ };
102
+ const draw = () => {
103
+ step();
104
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
105
+ ctx.clearRect(0, 0, w, h);
106
+ ctx.textAlign = "center";
107
+ ctx.textBaseline = "middle";
108
+ for (const b of bodies) {
109
+ ctx.beginPath();
110
+ ctx.arc(b.x, b.y, b.r, 0, Math.PI * 2);
111
+ ctx.fillStyle = b.hot ? SIG : grab?.b === b ? "#e9e9e4" : "#141513";
112
+ ctx.fill();
113
+ ctx.strokeStyle = b.hot ? SIG : "rgba(233,233,228,.22)";
114
+ ctx.stroke();
115
+ ctx.fillStyle = b.hot || grab?.b === b ? ON : "#e9e9e4";
116
+ ctx.font = `500 ${Math.round(b.r * 0.42)}px ui-sans-serif, system-ui`;
117
+ ctx.fillText(b.word, b.x, b.y + 1);
118
+ }
119
+ raf = requestAnimationFrame(draw);
120
+ };
121
+ const pos = (e) => {
122
+ const r = cv.getBoundingClientRect();
123
+ return { x: e.clientX - r.left, y: e.clientY - r.top };
124
+ };
125
+ const down = (e) => {
126
+ const p = pos(e);
127
+ const b = [...bodies].reverse().find((b2) => Math.hypot(b2.x - p.x, b2.y - p.y) < b2.r);
128
+ if (!b) return;
129
+ cv.setPointerCapture(e.pointerId);
130
+ grab = { b, ox: b.x - p.x, oy: b.y - p.y, px: p.x, py: p.y };
131
+ };
132
+ const move = (e) => {
133
+ if (!grab) return;
134
+ const p = pos(e);
135
+ grab.b.vx = p.x - grab.px;
136
+ grab.b.vy = p.y - grab.py;
137
+ grab.b.x = Math.max(grab.b.r, Math.min(w - grab.b.r, p.x + grab.ox));
138
+ grab.b.y = Math.max(grab.b.r, Math.min(h - grab.b.r, p.y + grab.oy));
139
+ grab.px = p.x;
140
+ grab.py = p.y;
141
+ };
142
+ const up = () => {
143
+ grab = null;
144
+ };
145
+ const dbl = () => reset();
146
+ size();
147
+ const ro = new ResizeObserver(size);
148
+ ro.observe(cv);
149
+ raf = requestAnimationFrame(draw);
150
+ cv.addEventListener("pointerdown", down);
151
+ cv.addEventListener("pointermove", move);
152
+ cv.addEventListener("pointerup", up);
153
+ cv.addEventListener("pointercancel", up);
154
+ cv.addEventListener("dblclick", dbl);
155
+ return () => {
156
+ cancelAnimationFrame(raf);
157
+ ro.disconnect();
158
+ cv.removeEventListener("pointerdown", down);
159
+ cv.removeEventListener("pointermove", move);
160
+ cv.removeEventListener("pointerup", up);
161
+ cv.removeEventListener("pointercancel", up);
162
+ cv.removeEventListener("dblclick", dbl);
163
+ };
164
+ }, []);
165
+ return /* @__PURE__ */ jsxs("div", { className: "relative h-full w-full", children: [
166
+ /* @__PURE__ */ jsx("canvas", { ref, className: "absolute inset-0 h-full w-full cursor-grab [touch-action:none] active:cursor-grabbing", "aria-label": "Throwable words" }),
167
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-[11px] uppercase tracking-[0.08em] pointer-events-none absolute left-4 top-3 text-mute", children: "Grab & throw \xB7 double-click to drop again" })
168
+ ] });
169
+ }
170
+
171
+ export {
172
+ GravityPills
173
+ };
@@ -0,0 +1,107 @@
1
+ "use client";
2
+
3
+ // components/kit/variants/textarea-aui-005.tsx
4
+ import { useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var cx = (...c) => c.filter(Boolean).join(" ");
7
+ var TOOLS = [
8
+ { id: "bold", label: "Bold", key: "b", before: "**", after: "**", d: "M5 3h4a2.5 2.5 0 0 1 0 5H5zM5 8h4.5a2.5 2.5 0 0 1 0 5H5z" },
9
+ { id: "italic", label: "Italic", key: "i", before: "_", after: "_", d: "M10 3H7M9 13H6M9 3 7 13" },
10
+ { id: "code", label: "Code", key: "e", before: "`", after: "`", d: "m6 4-4 4 4 4M10 4l4 4-4 4" },
11
+ { id: "link", label: "Link", key: "k", before: "[", after: "](https://)", d: "M7 9a3 3 0 0 0 4 0l2-2a3 3 0 0 0-4-4l-.5.5M9 7a3 3 0 0 0-4 0L3 9a3 3 0 0 0 4 4l.5-.5" },
12
+ { id: "quote", label: "Quote", before: "> ", after: "", line: true, d: "M3 6h4v4H4l-1 3M9 6h4v4h-3l-1 3" },
13
+ { id: "list", label: "List", before: "- ", after: "", line: true, d: "M6 4h8M6 8h8M6 12h8M2.5 4h.01M2.5 8h.01M2.5 12h.01" }
14
+ ];
15
+ function MarkdownTextarea({ tools = TOOLS.map((t) => t.id), className, rows = 6, ...rest }) {
16
+ const area = useRef(null);
17
+ const controlled = rest.value !== void 0;
18
+ const [inner, setInner] = useState(String(rest.defaultValue ?? ""));
19
+ const value = controlled ? String(rest.value) : inner;
20
+ const [flash, setFlash] = useState(null);
21
+ const words = value.trim() ? value.trim().split(/\s+/).length : 0;
22
+ function apply(t) {
23
+ const el = area.current;
24
+ if (!el) return;
25
+ el.focus();
26
+ const { selectionStart: s, selectionEnd: e } = el;
27
+ if (t.line) {
28
+ const from = el.value.lastIndexOf("\n", s - 1) + 1;
29
+ const block = el.value.slice(from, e).split("\n").map((l) => t.before + l).join("\n");
30
+ el.setRangeText(block, from, e, "end");
31
+ } else {
32
+ const picked = el.value.slice(s, e) || t.label.toLowerCase();
33
+ el.setRangeText(t.before + picked + t.after, s, e, "end");
34
+ el.setSelectionRange(s + t.before.length, s + t.before.length + picked.length);
35
+ }
36
+ el.dispatchEvent(new Event("input", { bubbles: true }));
37
+ if (!controlled) setInner(el.value);
38
+ setFlash(t.id);
39
+ setTimeout(() => setFlash((f) => f === t.id ? null : f), 300);
40
+ }
41
+ function onKeyDown(e) {
42
+ if (e.metaKey || e.ctrlKey) {
43
+ const t = TOOLS.find((x) => x.key === e.key.toLowerCase() && tools.includes(x.id));
44
+ if (t) {
45
+ e.preventDefault();
46
+ apply(t);
47
+ return;
48
+ }
49
+ }
50
+ rest.onKeyDown?.(e);
51
+ }
52
+ return /* @__PURE__ */ jsxs(
53
+ "div",
54
+ {
55
+ className: cx(
56
+ "w-full overflow-hidden rounded-xl bg-paper transition-shadow duration-200 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] focus-within:shadow-[inset_0_0_0_1px_var(--brand),0_0_0_4px_color-mix(in_srgb,var(--brand)_16%,transparent)] motion-reduce:transition-none",
57
+ className
58
+ ),
59
+ children: [
60
+ /* @__PURE__ */ jsx("div", { role: "toolbar", "aria-label": "Formatting", className: "flex items-center gap-0.5 bg-paper-2/60 px-1.5 py-1.5", children: TOOLS.filter((t) => tools.includes(t.id)).map((t) => /* @__PURE__ */ jsx(
61
+ "button",
62
+ {
63
+ type: "button",
64
+ onMouseDown: (e) => e.preventDefault(),
65
+ onClick: () => apply(t),
66
+ "aria-label": t.label,
67
+ title: t.key ? `${t.label} (\u2318${t.key.toUpperCase()})` : t.label,
68
+ className: cx(
69
+ "grid h-7 w-7 place-items-center rounded-md text-mute transition-[background-color,color,transform] duration-200 ease-[cubic-bezier(.16,1,.3,1)] hover:bg-paper hover:text-ink active:scale-90 motion-reduce:transition-none",
70
+ flash === t.id && "scale-90 bg-paper text-brand"
71
+ ),
72
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: t.d }) })
73
+ },
74
+ t.id
75
+ )) }),
76
+ /* @__PURE__ */ jsx(
77
+ "textarea",
78
+ {
79
+ ref: area,
80
+ rows,
81
+ ...rest,
82
+ onKeyDown,
83
+ onChange: (e) => {
84
+ if (!controlled) setInner(e.target.value);
85
+ rest.onChange?.(e);
86
+ },
87
+ className: "block w-full resize-y bg-transparent px-3.5 py-3 font-mono text-[13px] leading-[1.6] text-ink outline-none placeholder:font-sans placeholder:text-mute"
88
+ }
89
+ ),
90
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-3.5 pb-2.5 text-[11.5px] text-mute", children: [
91
+ /* @__PURE__ */ jsx("span", { children: "Markdown supported" }),
92
+ /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
93
+ words,
94
+ " ",
95
+ words === 1 ? "word" : "words"
96
+ ] })
97
+ ] })
98
+ ]
99
+ }
100
+ );
101
+ }
102
+ var textarea_aui_005_default = MarkdownTextarea;
103
+
104
+ export {
105
+ MarkdownTextarea,
106
+ textarea_aui_005_default
107
+ };
@@ -0,0 +1,178 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/VariantPicker.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 SPRING = "cubic-bezier(.3,1.18,.5,1)";
8
+ var RING = "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]";
9
+ var DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
10
+ function Roll({ value }) {
11
+ const chars = value.split("");
12
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-start leading-[1.15em] tabular-nums", "aria-label": value, children: chars.map((c, i) => {
13
+ const key = chars.length - i;
14
+ if (!/\d/.test(c))
15
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-[1.15em]", children: c }, `s${key}`);
16
+ return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative inline-block h-[1.15em] overflow-hidden leading-[1.15em]", children: [
17
+ /* @__PURE__ */ jsx("span", { className: "invisible", children: "0" }),
18
+ /* @__PURE__ */ jsx(
19
+ "span",
20
+ {
21
+ className: "absolute left-0 top-0 flex flex-col transition-transform duration-700 motion-reduce:transition-none",
22
+ style: { transform: `translateY(-${Number(c) * 1.15}em)`, transitionTimingFunction: EASE },
23
+ children: DIGITS.map((d) => /* @__PURE__ */ jsx("span", { className: "block h-[1.15em]", children: d }, d))
24
+ }
25
+ )
26
+ ] }, `d${key}`);
27
+ }) });
28
+ }
29
+ var FINISHES = [
30
+ { name: "Graphite", fill: "color-mix(in srgb, var(--ink) 14%, var(--paper-2))", mark: "var(--ink)" },
31
+ { name: "Silver", fill: "color-mix(in srgb, var(--ink) 52%, var(--paper-2))", mark: "var(--paper)" },
32
+ { name: "White", fill: "color-mix(in srgb, var(--ink) 94%, var(--paper))", mark: "var(--paper)" },
33
+ { name: "Blue", fill: "var(--brand)", mark: "var(--paper)" }
34
+ ];
35
+ var SIZES = [
36
+ { label: "128 GB", price: 249 },
37
+ { label: "256 GB", price: 299 },
38
+ { label: "512 GB", price: 369 }
39
+ ];
40
+ function Device({ fill, mark }) {
41
+ return /* @__PURE__ */ jsxs("span", { className: "absolute inset-0 rounded-[22%]", style: { background: fill }, children: [
42
+ /* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-[22%] bg-[linear-gradient(160deg,rgb(255_255_255/0.16),transparent_45%,rgb(0_0_0/0.18))]" }),
43
+ /* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-1/2 h-[34%] w-[34%] -translate-x-1/2 -translate-y-1/2 rounded-full", style: { boxShadow: `inset 0 0 0 1.5px color-mix(in srgb, ${mark} 45%, transparent)` } }),
44
+ /* @__PURE__ */ jsx("span", { className: "absolute left-1/2 top-1/2 h-[9%] w-[9%] -translate-x-1/2 -translate-y-1/2 rounded-full", style: { background: mark, opacity: 0.7 } }),
45
+ /* @__PURE__ */ jsx("span", { className: "absolute bottom-[12%] left-1/2 h-[3%] w-[22%] -translate-x-1/2 rounded-full", style: { background: mark, opacity: 0.35 } })
46
+ ] });
47
+ }
48
+ function VariantPicker() {
49
+ const [cur, setCur] = useState(0);
50
+ const [prev, setPrev] = useState(0);
51
+ const [size, setSize] = useState(1);
52
+ const [tick, setTick] = useState(0);
53
+ const [paused, setPaused] = useState(false);
54
+ const idle = useRef(null);
55
+ const sw = useRef([]);
56
+ const pick = (i) => {
57
+ if (i === cur) return;
58
+ setPrev(cur);
59
+ setCur(i);
60
+ setTick((t) => t + 1);
61
+ };
62
+ const takeOver = () => {
63
+ setPaused(true);
64
+ if (idle.current) clearTimeout(idle.current);
65
+ idle.current = setTimeout(() => setPaused(false), 8e3);
66
+ };
67
+ useEffect(() => () => void (idle.current && clearTimeout(idle.current)), []);
68
+ useEffect(() => {
69
+ if (paused) return;
70
+ let n = 0;
71
+ const id = setInterval(() => {
72
+ n++;
73
+ if (n % 3 === 0) setSize((s) => (s + 1) % SIZES.length);
74
+ else {
75
+ setCur((c) => {
76
+ setPrev(c);
77
+ return (c + 1) % FINISHES.length;
78
+ });
79
+ setTick((t) => t + 1);
80
+ }
81
+ }, 3e3);
82
+ return () => clearInterval(id);
83
+ }, [paused]);
84
+ const f = FINISHES[cur];
85
+ const p = FINISHES[prev];
86
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col items-center justify-center gap-[5cqh] px-5 pt-8", style: { containerType: "size" }, children: [
87
+ /* @__PURE__ */ jsx("style", { href: "asta-variantpicker", precedence: "asta", children: `
88
+ @keyframes lab-vp-sweep { from { -webkit-mask-position: 100% 0; mask-position: 100% 0 } to { -webkit-mask-position: 0 0; mask-position: 0 0 } }
89
+ .lab-vp-sweep { -webkit-mask-image: linear-gradient(90deg, #000 38%, transparent 62%); mask-image: linear-gradient(90deg, #000 38%, transparent 62%); -webkit-mask-size: 300% 100%; mask-size: 300% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; will-change: mask-position }
90
+ @keyframes lab-vp-name { from { opacity: 0; transform: translateY(35%); filter: blur(2px) } to { opacity: 1; transform: none; filter: none } }
91
+ @media (prefers-reduced-motion: reduce) { .lab-vp-sweep, .lab-vp-name { animation: none !important } }
92
+ ` }),
93
+ /* @__PURE__ */ jsxs("div", { className: "relative shrink-0", style: { width: "min(40cqh, 42cqw)", aspectRatio: "1" }, children: [
94
+ /* @__PURE__ */ jsx("span", { className: "absolute -bottom-[8%] left-[14%] right-[14%] h-[10%] rounded-[50%] bg-black/45 blur-lg" }),
95
+ /* @__PURE__ */ jsx(Device, { fill: p.fill, mark: p.mark }),
96
+ /* @__PURE__ */ jsx("span", { className: "lab-vp-sweep absolute inset-0", style: { animation: `lab-vp-sweep .95s ${EASE} both` }, children: /* @__PURE__ */ jsx(Device, { fill: f.fill, mark: f.mark }) }, tick)
97
+ ] }),
98
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[340px] flex-col gap-3", children: [
99
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
100
+ /* @__PURE__ */ jsxs("span", { className: "text-[13px] text-ink-2", children: [
101
+ /* @__PURE__ */ jsx("span", { className: "font-mono text-[10.5px] uppercase tracking-wider text-mute", children: "Finish" }),
102
+ /* @__PURE__ */ jsx("span", { className: "lab-vp-name ml-2 inline-block text-ink", style: { animation: `lab-vp-name .55s ${EASE} both` }, children: f.name }, f.name)
103
+ ] }),
104
+ /* @__PURE__ */ jsxs("div", { role: "radiogroup", "aria-label": "Finish", className: "relative flex gap-2", children: [
105
+ /* @__PURE__ */ jsx(
106
+ "span",
107
+ {
108
+ "aria-hidden": true,
109
+ className: "pointer-events-none absolute -left-[4px] -top-[4px] h-8 w-8 rounded-full transition-transform duration-[650ms] will-change-transform motion-reduce:transition-none",
110
+ style: { boxShadow: "inset 0 0 0 1.25px var(--ink)", transform: `translateX(${cur * 32}px)`, transitionTimingFunction: SPRING }
111
+ }
112
+ ),
113
+ FINISHES.map((o, i) => /* @__PURE__ */ jsx(
114
+ "button",
115
+ {
116
+ ref: (el) => {
117
+ sw.current[i] = el;
118
+ },
119
+ type: "button",
120
+ role: "radio",
121
+ "aria-checked": cur === i,
122
+ "aria-label": o.name,
123
+ tabIndex: cur === i ? 0 : -1,
124
+ onClick: () => {
125
+ takeOver();
126
+ pick(i);
127
+ },
128
+ onKeyDown: (e) => {
129
+ const d = e.key === "ArrowRight" || e.key === "ArrowDown" ? 1 : e.key === "ArrowLeft" || e.key === "ArrowUp" ? -1 : 0;
130
+ if (!d) return;
131
+ e.preventDefault();
132
+ takeOver();
133
+ const n = (cur + d + FINISHES.length) % FINISHES.length;
134
+ pick(n);
135
+ sw.current[n]?.focus();
136
+ },
137
+ className: "relative h-6 w-6 rounded-full outline-none focus-visible:ring-2 focus-visible:ring-brand/60 focus-visible:ring-offset-2 focus-visible:ring-offset-paper",
138
+ children: /* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full shadow-[inset_0_0_0_1px_rgb(255_255_255/0.12)]", style: { background: o.fill } })
139
+ },
140
+ o.name
141
+ ))
142
+ ] })
143
+ ] }),
144
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
145
+ /* @__PURE__ */ jsxs("div", { role: "radiogroup", "aria-label": "Storage", className: `relative grid flex-1 grid-cols-3 rounded-[9px] bg-paper-2 p-[3px] ${RING}`, children: [
146
+ /* @__PURE__ */ jsx(
147
+ "span",
148
+ {
149
+ "aria-hidden": true,
150
+ className: "absolute bottom-[3px] top-[3px] rounded-[7px] bg-ink transition-transform duration-[650ms] will-change-transform motion-reduce:transition-none",
151
+ style: { left: 3, width: "calc((100% - 6px) / 3)", transform: `translateX(${size * 100}%)`, transitionTimingFunction: SPRING }
152
+ }
153
+ ),
154
+ SIZES.map((s, i) => /* @__PURE__ */ jsx(
155
+ "button",
156
+ {
157
+ type: "button",
158
+ role: "radio",
159
+ "aria-checked": size === i,
160
+ onClick: () => {
161
+ takeOver();
162
+ setSize(i);
163
+ },
164
+ className: `relative z-10 h-8 rounded-[7px] text-[12.5px] font-medium tabular-nums outline-none transition-colors duration-500 focus-visible:ring-2 focus-visible:ring-brand/60 ${size === i ? "text-paper" : "text-mute hover:text-ink"}`,
165
+ children: s.label
166
+ },
167
+ s.label
168
+ ))
169
+ ] }),
170
+ /* @__PURE__ */ jsx("span", { className: "w-[76px] text-right text-[20px] font-medium tracking-[-0.02em] text-ink", children: /* @__PURE__ */ jsx(Roll, { value: `$${SIZES[size].price}` }) })
171
+ ] })
172
+ ] })
173
+ ] });
174
+ }
175
+
176
+ export {
177
+ VariantPicker
178
+ };