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,197 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/CartDrawer.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 DIGITS = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
8
+ var FREE_AT = 150;
9
+ function Roll({ value }) {
10
+ const chars = value.split("");
11
+ return /* @__PURE__ */ jsx("span", { className: "inline-flex items-start leading-[1.15em] tabular-nums", "aria-label": value, children: chars.map((c, i) => {
12
+ const key = chars.length - i;
13
+ if (!/\d/.test(c))
14
+ return /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-[1.15em]", children: c }, `s${key}`);
15
+ return /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative inline-block h-[1.15em] overflow-hidden leading-[1.15em]", children: [
16
+ /* @__PURE__ */ jsx("span", { className: "invisible", children: "0" }),
17
+ /* @__PURE__ */ jsx(
18
+ "span",
19
+ {
20
+ className: "absolute left-0 top-0 flex flex-col transition-transform duration-700 motion-reduce:transition-none",
21
+ style: { transform: `translateY(-${Number(c) * 1.15}em)`, transitionTimingFunction: EASE },
22
+ children: DIGITS.map((d) => /* @__PURE__ */ jsx("span", { className: "block h-[1.15em]", children: d }, d))
23
+ }
24
+ )
25
+ ] }, `d${key}`);
26
+ }) });
27
+ }
28
+ var G = ({ d }) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-[46%] w-[46%]", fill: "none", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d }) });
29
+ var CATALOG = [
30
+ { name: "Orbit lamp", price: 70, art: /* @__PURE__ */ jsx(G, { d: "M12 3v3M7 10a5 5 0 0 1 10 0v2H7ZM9 21h6M12 12v9" }) },
31
+ { name: "Field notebook", price: 34, art: /* @__PURE__ */ jsx(G, { d: "M6 3h11a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H6ZM9 3v18M12 8h4M12 11h4" }) },
32
+ { name: "Stone mug", price: 28, art: /* @__PURE__ */ jsx(G, { d: "M5 7h11v8a4 4 0 0 1-4 4H9a4 4 0 0 1-4-4ZM16 9h1.5a2.5 2.5 0 0 1 0 5H16" }) },
33
+ { name: "Brass pen", price: 22, art: /* @__PURE__ */ jsx(G, { d: "M16 4l4 4L9 19l-5 1 1-5ZM14 6l4 4" }) }
34
+ ];
35
+ function useTween(target, ms = 600) {
36
+ const [v, setV] = useState(target);
37
+ const from = useRef(target);
38
+ const cur = useRef(target);
39
+ useEffect(() => {
40
+ from.current = cur.current;
41
+ const still = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
42
+ const t0 = performance.now();
43
+ let id = 0;
44
+ const step = (t) => {
45
+ const k = still ? 1 : Math.min(1, (t - t0) / ms);
46
+ const e = 1 - Math.pow(1 - k, 4);
47
+ cur.current = from.current + (target - from.current) * e;
48
+ setV(cur.current);
49
+ if (k < 1) id = requestAnimationFrame(step);
50
+ };
51
+ id = requestAnimationFrame(step);
52
+ return () => cancelAnimationFrame(id);
53
+ }, [target, ms]);
54
+ return v;
55
+ }
56
+ var Check = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3.5 8.5l3 3 6-7" }) });
57
+ function CartDrawer() {
58
+ const [n, setN] = useState(0);
59
+ const [leaving, setLeaving] = useState(false);
60
+ const [paused, setPaused] = useState(false);
61
+ const idle = useRef(null);
62
+ const total = leaving ? 0 : CATALOG.slice(0, n).reduce((s, it) => s + it.price, 0);
63
+ const free = total >= FREE_AT;
64
+ const pct = Math.min(1, total / FREE_AT);
65
+ const away = Math.max(0, FREE_AT - total);
66
+ const shownTotal = useTween(total, 650);
67
+ const takeOver = () => {
68
+ setPaused(true);
69
+ setLeaving(false);
70
+ if (idle.current) clearTimeout(idle.current);
71
+ idle.current = setTimeout(() => setPaused(false), 8e3);
72
+ };
73
+ useEffect(() => () => void (idle.current && clearTimeout(idle.current)), []);
74
+ useEffect(() => {
75
+ if (paused) return;
76
+ const t = [];
77
+ let alive = true;
78
+ const reset = () => {
79
+ if (!alive) return;
80
+ setN(0);
81
+ setLeaving(false);
82
+ };
83
+ const run = () => {
84
+ CATALOG.forEach((_, i) => t.push(setTimeout(() => alive && setN(i + 1), 900 + i * 1500)));
85
+ const end = 900 + CATALOG.length * 1500 + 1800;
86
+ t.push(setTimeout(() => alive && setLeaving(true), end));
87
+ t.push(setTimeout(reset, end + 1e3));
88
+ t.push(setTimeout(() => alive && run(), end + 1300));
89
+ };
90
+ t.push(setTimeout(reset, 0));
91
+ run();
92
+ return () => {
93
+ alive = false;
94
+ t.forEach(clearTimeout);
95
+ };
96
+ }, [paused]);
97
+ const shown = Math.min(n, CATALOG.length);
98
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full items-center justify-center px-5 pt-8", style: { containerType: "size" }, children: [
99
+ /* @__PURE__ */ jsx("style", { href: "asta-cartdrawer", precedence: "asta", children: `
100
+ @keyframes lab-cd-pop { 0% { transform: translateY(-14px) scale(.6); opacity: 0 } 55% { opacity: 1 } 70% { transform: translateY(1px) scale(1.04) } 100% { transform: none; opacity: 1 } }
101
+ @keyframes lab-cd-swap { from { opacity: 0; transform: translateY(30%); filter: blur(2px) } to { opacity: 1; transform: none; filter: none } }
102
+ @keyframes lab-cd-shine { from { transform: translateX(-100%) } to { transform: translateX(320%) } }
103
+ @media (prefers-reduced-motion: reduce) { .lab-cd-anim { animation: none !important } }
104
+ ` }),
105
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-[4.5cqh]", style: { maxWidth: 440 }, children: [
106
+ /* @__PURE__ */ jsx("div", { className: "flex items-end justify-between gap-4", children: /* @__PURE__ */ jsx("div", { className: "relative min-w-0 text-[clamp(14px,4.2cqmin,18px)] font-medium leading-tight text-ink", children: free ? /* @__PURE__ */ jsxs("span", { className: "lab-cd-anim flex items-center gap-2 text-ink", style: { animation: `lab-cd-swap .6s ${EASE} both` }, children: [
107
+ /* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-brand text-paper", children: /* @__PURE__ */ jsx(Check, {}) }),
108
+ "Free shipping unlocked"
109
+ ] }, "free") : /* @__PURE__ */ jsxs("span", { className: "lab-cd-anim block", style: { animation: `lab-cd-swap .6s ${EASE} both` }, children: [
110
+ /* @__PURE__ */ jsx(Roll, { value: `$${away}` }),
111
+ " ",
112
+ /* @__PURE__ */ jsx("span", { className: "text-ink-2", children: "away from free shipping" })
113
+ ] }, "away") }) }),
114
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
115
+ /* @__PURE__ */ jsxs("div", { className: "relative h-2 overflow-hidden rounded-[3px] bg-paper-2 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]", children: [
116
+ /* @__PURE__ */ jsx(
117
+ "div",
118
+ {
119
+ className: "absolute inset-0 origin-left rounded-[3px] transition-transform will-change-transform motion-reduce:transition-none",
120
+ style: {
121
+ transform: `scaleX(${pct})`,
122
+ background: "var(--brand)",
123
+ transitionDuration: leaving ? "900ms" : "800ms",
124
+ transitionTimingFunction: leaving ? "cubic-bezier(.65,0,.35,1)" : EASE
125
+ }
126
+ }
127
+ ),
128
+ /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-0 overflow-hidden rounded-[3px]", children: free && /* @__PURE__ */ jsx(
129
+ "span",
130
+ {
131
+ "aria-hidden": true,
132
+ className: "lab-cd-anim absolute inset-y-0 w-1/3 bg-gradient-to-r from-transparent via-white/30 to-transparent",
133
+ style: { animation: `lab-cd-shine 1.1s cubic-bezier(.65,0,.35,1) .45s both` }
134
+ },
135
+ "shine"
136
+ ) })
137
+ ] }),
138
+ /* @__PURE__ */ jsxs("div", { className: "mt-2 flex justify-between font-mono text-[10.5px] uppercase tracking-wider text-mute", children: [
139
+ /* @__PURE__ */ jsx("span", { children: "$0" }),
140
+ /* @__PURE__ */ jsxs("span", { children: [
141
+ "$",
142
+ FREE_AT
143
+ ] })
144
+ ] })
145
+ ] }),
146
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
147
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
148
+ CATALOG.slice(0, shown).map((it, i) => /* @__PURE__ */ jsx(
149
+ "span",
150
+ {
151
+ title: `${it.name} \xB7 $${it.price}`,
152
+ className: "flex transition-[opacity,transform] duration-500 motion-reduce:transition-none",
153
+ style: {
154
+ opacity: leaving ? 0 : 1,
155
+ transform: leaving ? "translateY(6px) scale(.85)" : "none",
156
+ transitionDelay: leaving ? `${i * 70}ms` : "0ms",
157
+ transitionTimingFunction: EASE
158
+ },
159
+ children: /* @__PURE__ */ jsx(
160
+ "span",
161
+ {
162
+ className: "lab-cd-anim flex h-[clamp(34px,11cqmin,46px)] w-[clamp(34px,11cqmin,46px)] items-center justify-center rounded-[9px] bg-paper-2 text-ink-2 shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_10%,transparent)]",
163
+ style: { animation: `lab-cd-pop .7s ${EASE} both` },
164
+ children: it.art
165
+ }
166
+ )
167
+ },
168
+ `${it.name}-${i}`
169
+ )),
170
+ /* @__PURE__ */ jsx(
171
+ "button",
172
+ {
173
+ type: "button",
174
+ onClick: () => {
175
+ takeOver();
176
+ setN((v) => v >= CATALOG.length ? 1 : v + 1);
177
+ },
178
+ className: "flex h-[clamp(34px,11cqmin,46px)] shrink-0 items-center gap-1 whitespace-nowrap rounded-[9px] px-2.5 text-[13px] text-mute shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_14%,transparent)] border border-dashed border-transparent outline-none transition-colors hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/60",
179
+ children: "+ add"
180
+ }
181
+ )
182
+ ] }),
183
+ /* @__PURE__ */ jsxs("div", { className: "shrink-0 text-right", children: [
184
+ /* @__PURE__ */ jsx("div", { className: "font-mono text-[10.5px] uppercase tracking-wider text-mute", children: "Total" }),
185
+ /* @__PURE__ */ jsx("div", { className: "text-[clamp(18px,6cqmin,26px)] font-medium tracking-[-0.02em] text-ink", "aria-live": "polite", children: /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
186
+ "$",
187
+ shownTotal.toFixed(2)
188
+ ] }) })
189
+ ] })
190
+ ] })
191
+ ] })
192
+ ] });
193
+ }
194
+
195
+ export {
196
+ CartDrawer
197
+ };
@@ -0,0 +1,93 @@
1
+ "use client";
2
+
3
+ // components/kit/dialog.tsx
4
+ import { Dialog as D } from "radix-ui";
5
+ import { useEffect, useLayoutEffect, useRef, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var cx = (...c) => c.filter(Boolean).join(" ");
8
+ var EASE = "cubic-bezier(.16,1,.3,1)";
9
+ var FOCUSABLE = 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])';
10
+ function Dialog({ open, onOpenChange, title, description, children, footer, contained = false, className }) {
11
+ const [mounted, setMounted] = useState(open);
12
+ if (open && !mounted) setMounted(true);
13
+ const panel = useRef(null);
14
+ const backdrop = useRef(null);
15
+ const opener = useRef(null);
16
+ const fromTrigger = () => {
17
+ const p = panel.current?.getBoundingClientRect();
18
+ const t = opener.current?.getBoundingClientRect();
19
+ if (!p || !t || !t.width) return "translateY(12px) scale(.96)";
20
+ const dx = t.left + t.width / 2 - (p.left + p.width / 2);
21
+ const dy = t.top + t.height / 2 - (p.top + p.height / 2);
22
+ return `translate(${dx}px, ${dy}px) scale(${Math.max(0.15, t.width / p.width)}, ${Math.max(0.1, t.height / p.height)})`;
23
+ };
24
+ const still = () => typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
25
+ useLayoutEffect(() => {
26
+ if (!open || !panel.current) return;
27
+ const p = panel.current;
28
+ if (!p.contains(document.activeElement)) opener.current = document.activeElement;
29
+ const from = still() ? "none" : fromTrigger();
30
+ p.animate([{ transform: from, opacity: 0, borderRadius: "999px" }, { transform: "none", opacity: 1, borderRadius: "24px" }], { duration: 520, easing: EASE });
31
+ backdrop.current?.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 300, easing: "ease-out" });
32
+ }, [open]);
33
+ useEffect(() => {
34
+ if (open || !mounted) return;
35
+ const p = panel.current;
36
+ if (!p || still()) return setMounted(false);
37
+ backdrop.current?.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 260, easing: "ease-in", fill: "forwards" });
38
+ const a = p.animate([{ transform: "none", opacity: 1 }, { transform: fromTrigger(), opacity: 0 }], { duration: 320, easing: "cubic-bezier(.7,0,.84,0)", fill: "forwards" });
39
+ a.onfinish = () => setMounted(false);
40
+ return () => {
41
+ a.onfinish = null;
42
+ };
43
+ }, [open, mounted]);
44
+ if (!mounted) return null;
45
+ const layer = /* @__PURE__ */ jsxs("div", { className: cx(contained ? "absolute" : "fixed", "inset-0 z-50 flex items-center justify-center p-4"), children: [
46
+ /* @__PURE__ */ jsx(D.Overlay, { forceMount: true, ref: backdrop, className: cx("absolute inset-0 bg-[rgb(10_10_10/0.38)] will-change-[opacity]", contained && "rounded-[inherit]") }),
47
+ /* @__PURE__ */ jsxs(
48
+ D.Content,
49
+ {
50
+ forceMount: true,
51
+ ref: panel,
52
+ ...description ? {} : { "aria-describedby": void 0 },
53
+ onOpenAutoFocus: (e) => {
54
+ e.preventDefault();
55
+ const p = panel.current;
56
+ const first = p?.querySelector("[data-autofocus]") ?? p?.querySelector(FOCUSABLE);
57
+ (first ?? p)?.focus({ preventScroll: true });
58
+ },
59
+ onCloseAutoFocus: (e) => {
60
+ e.preventDefault();
61
+ opener.current?.focus({ preventScroll: true });
62
+ opener.current = null;
63
+ },
64
+ className: cx(
65
+ "relative w-full max-w-[400px] rounded-2xl bg-paper p-6 outline-none",
66
+ "shadow-[inset_0_0_0_1px_color-mix(in_srgb,var(--ink)_8%,transparent),0_24px_60px_-20px_rgb(0_0_0/0.45)]",
67
+ className
68
+ ),
69
+ children: [
70
+ /* @__PURE__ */ jsx(
71
+ D.Close,
72
+ {
73
+ "aria-label": "Close",
74
+ className: "absolute right-3.5 top-3.5 flex h-8 w-8 items-center justify-center rounded-full text-mute outline-none transition-colors hover:bg-paper-2 hover:text-ink focus-visible:ring-2 focus-visible:ring-brand/50",
75
+ children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "h-3.5 w-3.5", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) })
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx(D.Title, { className: "pr-8 text-[18px] font-medium tracking-[-0.02em] text-ink", children: title }),
79
+ description && /* @__PURE__ */ jsx(D.Description, { className: "mt-1.5 text-[14px] leading-relaxed text-mute", children: description }),
80
+ children && /* @__PURE__ */ jsx("div", { className: "mt-5", children }),
81
+ footer && /* @__PURE__ */ jsx("div", { className: "mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: footer })
82
+ ]
83
+ }
84
+ )
85
+ ] });
86
+ return /* @__PURE__ */ jsx(D.Root, { open, onOpenChange, children: contained ? layer : /* @__PURE__ */ jsx(D.Portal, { forceMount: true, children: layer }) });
87
+ }
88
+ var dialog_default = Dialog;
89
+
90
+ export {
91
+ Dialog,
92
+ dialog_default
93
+ };
@@ -0,0 +1,92 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/OrderBook.tsx
4
+ import { useEffect, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var UP = "var(--brand)";
7
+ var DOWN = "var(--ink-2)";
8
+ var LEVELS = 5;
9
+ var TICK = 0.01;
10
+ var EASE = "cubic-bezier(.16,1,.3,1)";
11
+ function seeded(s) {
12
+ return () => {
13
+ s = s + 1831565813 | 0;
14
+ let t = Math.imul(s ^ s >>> 15, 1 | s);
15
+ t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
16
+ return ((t ^ t >>> 14) >>> 0) / 4294967296;
17
+ };
18
+ }
19
+ function make(mid, prev, rand = Math.random) {
20
+ const size = () => +(0.4 + rand() * 6).toFixed(3);
21
+ const n = (prev?.n ?? 0) + 1;
22
+ const side = (k, old) => Array.from({ length: LEVELS }, (_, i) => {
23
+ const p = +(mid + k * (i + 1) * TICK).toFixed(2);
24
+ const was = old?.find((r) => r.p === p);
25
+ const change = !was || rand() < 0.28;
26
+ return { p, s: change ? size() : was.s, f: change && was ? n : was?.f ?? 0 };
27
+ });
28
+ return { mid, dir: prev ? mid >= prev.mid ? 1 : -1 : 1, asks: side(1, prev?.asks), bids: side(-1, prev?.bids), n };
29
+ }
30
+ function OrderBook() {
31
+ const [book, setBook] = useState(() => make(1842.5, void 0, seeded(1842)));
32
+ useEffect(() => {
33
+ const id = setInterval(() => {
34
+ if (document.hidden) return;
35
+ setBook((b) => {
36
+ const r = Math.random();
37
+ const mid = r < 0.12 ? b.mid + TICK : r < 0.24 ? b.mid - TICK : b.mid;
38
+ return make(+mid.toFixed(2), b);
39
+ });
40
+ }, 1200);
41
+ return () => clearInterval(id);
42
+ }, []);
43
+ const cum = (rows) => rows.reduce((a, r) => [...a, (a.at(-1) ?? 0) + r.s], []);
44
+ const ca = cum(book.asks);
45
+ const cb = cum(book.bids);
46
+ const max = Math.max(ca.at(-1), cb.at(-1));
47
+ const row = (r, depth, color, key, i) => /* @__PURE__ */ jsxs("div", { className: "relative flex min-h-0 flex-1 items-center justify-between overflow-hidden rounded-[5px] px-3", children: [
48
+ /* @__PURE__ */ jsx(
49
+ "span",
50
+ {
51
+ "aria-hidden": true,
52
+ className: "absolute inset-y-[2px] left-0 right-0 origin-right rounded-[4px] transition-transform duration-[900ms] will-change-transform motion-reduce:transition-none",
53
+ style: {
54
+ transform: `scaleX(${depth / max})`,
55
+ background: `color-mix(in srgb, ${color} ${color === UP ? 20 : 7}%, transparent)`,
56
+ transitionTimingFunction: EASE,
57
+ transitionDelay: `${i * 40}ms`
58
+ }
59
+ }
60
+ ),
61
+ r.f === book.n && /* @__PURE__ */ jsx(
62
+ "span",
63
+ {
64
+ "aria-hidden": true,
65
+ className: "absolute inset-0 rounded-[5px] animate-[ob-flash_1.4s_cubic-bezier(.16,1,.3,1)_forwards] motion-reduce:hidden",
66
+ style: { background: `color-mix(in srgb, ${color} 18%, transparent)` }
67
+ },
68
+ r.f
69
+ ),
70
+ /* @__PURE__ */ jsx("span", { className: "relative tabular-nums", style: { color }, children: r.p.toFixed(2) }),
71
+ /* @__PURE__ */ jsx("span", { className: "relative tabular-nums text-ink-2", children: r.s.toFixed(3) })
72
+ ] }, key);
73
+ const mc = book.dir > 0 ? UP : DOWN;
74
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full items-center justify-center px-5 pb-5 pt-14 [container-type:size]", children: [
75
+ /* @__PURE__ */ jsx("style", { href: "asta-orderbook", precedence: "asta", children: `@keyframes ob-flash { from { opacity: 1 } to { opacity: 0 } }` }),
76
+ /* @__PURE__ */ jsxs("div", { className: "flex h-full max-h-[460px] w-full max-w-[380px] flex-col gap-[3px] font-mono text-[clamp(11px,2.6cqh,15px)]", children: [
77
+ [...book.asks].reverse().map((r, i) => row(r, ca[LEVELS - 1 - i], DOWN, `a${i}`, LEVELS - 1 - i)),
78
+ /* @__PURE__ */ jsxs("div", { className: "my-1.5 flex flex-[1.6] items-center justify-between px-3", children: [
79
+ /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 text-[1.55em] font-medium tabular-nums tracking-[-0.02em] transition-colors duration-700", style: { color: mc, transitionTimingFunction: EASE }, children: [
80
+ book.mid.toFixed(2),
81
+ /* @__PURE__ */ jsx("span", { className: `text-[0.6em] transition-transform duration-500 ${book.dir > 0 ? "" : "rotate-180"}`, style: { transitionTimingFunction: EASE }, children: "\u25B2" })
82
+ ] }),
83
+ /* @__PURE__ */ jsx("span", { className: "text-[0.85em] uppercase tracking-[0.1em] text-mute", children: "mid" })
84
+ ] }),
85
+ book.bids.map((r, i) => row(r, cb[i], UP, `b${i}`, i))
86
+ ] })
87
+ ] });
88
+ }
89
+
90
+ export {
91
+ OrderBook
92
+ };
@@ -0,0 +1,87 @@
1
+ "use client";
2
+
3
+ // components/lab/blocks/SnapGrid.tsx
4
+ import { useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var CELL = 44;
7
+ function SnapGrid() {
8
+ const [pos, setPos] = useState({ x: CELL * 2, y: CELL * 1 });
9
+ const [dragging, setDragging] = useState(false);
10
+ const area = useRef(null);
11
+ const off = useRef({ x: 0, y: 0 });
12
+ const down = (e) => {
13
+ e.currentTarget.setPointerCapture(e.pointerId);
14
+ off.current = { x: e.clientX - pos.x, y: e.clientY - pos.y };
15
+ setDragging(true);
16
+ };
17
+ const move = (e) => {
18
+ if (!dragging) return;
19
+ const r = area.current.getBoundingClientRect();
20
+ setPos({
21
+ x: Math.max(0, Math.min(r.width - CELL, e.clientX - off.current.x)),
22
+ y: Math.max(0, Math.min(r.height - CELL, e.clientY - off.current.y))
23
+ });
24
+ };
25
+ const up = () => {
26
+ if (!dragging) return;
27
+ setDragging(false);
28
+ const r = area.current.getBoundingClientRect();
29
+ const maxX = Math.floor(r.width / CELL) - 1;
30
+ const maxY = Math.floor(r.height / CELL) - 1;
31
+ setPos((p) => ({
32
+ x: Math.min(maxX, Math.round(p.x / CELL)) * CELL,
33
+ y: Math.min(maxY, Math.round(p.y / CELL)) * CELL
34
+ }));
35
+ navigator.vibrate?.(8);
36
+ };
37
+ const cx = Math.round(pos.x / CELL);
38
+ const cy = Math.round(pos.y / CELL);
39
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col items-center justify-center gap-3 p-5", children: [
40
+ /* @__PURE__ */ jsxs(
41
+ "div",
42
+ {
43
+ ref: area,
44
+ className: "relative h-[176px] w-[264px] border border-line",
45
+ style: {
46
+ backgroundImage: "linear-gradient(rgba(233,233,228,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(233,233,228,.08) 1px, transparent 1px)",
47
+ backgroundSize: `${CELL}px ${CELL}px`,
48
+ backgroundPosition: "-1px -1px",
49
+ backgroundColor: "transparent",
50
+ transition: "opacity .3s"
51
+ },
52
+ children: [
53
+ /* @__PURE__ */ jsx("div", { className: `pointer-events-none absolute inset-0 bg-paper transition-opacity duration-300 ${dragging ? "opacity-0" : "opacity-100"}` }),
54
+ /* @__PURE__ */ jsx(
55
+ "div",
56
+ {
57
+ className: "pointer-events-none absolute border border-dashed border-signal/60 transition-all duration-150",
58
+ style: { left: cx * CELL, top: cy * CELL, width: CELL, height: CELL, opacity: dragging ? 1 : 0 }
59
+ }
60
+ ),
61
+ /* @__PURE__ */ jsx(
62
+ "div",
63
+ {
64
+ onPointerDown: down,
65
+ onPointerMove: move,
66
+ onPointerUp: up,
67
+ onPointerCancel: up,
68
+ className: `absolute grid cursor-grab place-items-center bg-signal text-paper [touch-action:none] active:cursor-grabbing ${dragging ? "scale-110 shadow-[0_10px_30px_color-mix(in_srgb,var(--signal)_25%,transparent)]" : "transition-[left,top,transform] duration-500 ease-[cubic-bezier(.5,1.8,.4,.8)]"}`,
69
+ style: { left: pos.x, top: pos.y, width: CELL, height: CELL },
70
+ children: /* @__PURE__ */ jsx("span", { className: "font-mono text-[11px] uppercase tracking-[0.08em]", children: "AB" })
71
+ }
72
+ )
73
+ ]
74
+ }
75
+ ),
76
+ /* @__PURE__ */ jsxs("span", { className: "font-mono text-[11px] uppercase tracking-[0.08em] tabular-nums text-mute", children: [
77
+ "X ",
78
+ String(cx).padStart(2, "0"),
79
+ " \xB7 Y ",
80
+ String(cy).padStart(2, "0")
81
+ ] })
82
+ ] });
83
+ }
84
+
85
+ export {
86
+ SnapGrid
87
+ };
@@ -0,0 +1,71 @@
1
+ "use client";
2
+
3
+ // components/kit/switch.tsx
4
+ import { Switch as Sw } from "radix-ui";
5
+ import { useId, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var cx = (...c) => c.filter(Boolean).join(" ");
8
+ var DIM = {
9
+ sm: { w: 30, h: 18, t: 14 },
10
+ md: { w: 40, h: 24, t: 20 },
11
+ lg: { w: 52, h: 30, t: 26 }
12
+ };
13
+ function Switch({ checked, defaultChecked = false, onCheckedChange, size = "md", disabled, label, description, id, name, className, "aria-label": ariaLabel }) {
14
+ const auto = useId();
15
+ const sid = id ?? auto;
16
+ const [inner, setInner] = useState(defaultChecked);
17
+ const [press, setPress] = useState(false);
18
+ const on = checked ?? inner;
19
+ const { w, h, t } = DIM[size];
20
+ const pad = (h - t) / 2;
21
+ const stretch = press ? t * 0.3 : 0;
22
+ const x = on ? w - pad * 2 - t - stretch : 0;
23
+ const control = /* @__PURE__ */ jsx(
24
+ Sw.Root,
25
+ {
26
+ id: sid,
27
+ name,
28
+ checked: on,
29
+ onCheckedChange: (v) => {
30
+ if (checked === void 0) setInner(v);
31
+ onCheckedChange?.(v);
32
+ },
33
+ "aria-label": ariaLabel,
34
+ "aria-describedby": description ? `${sid}-d` : void 0,
35
+ disabled,
36
+ onPointerDown: () => setPress(true),
37
+ onPointerUp: () => setPress(false),
38
+ onPointerLeave: () => setPress(false),
39
+ onKeyDown: (e) => (e.key === " " || e.key === "Enter") && setPress(true),
40
+ onKeyUp: () => setPress(false),
41
+ onBlur: () => setPress(false),
42
+ className: cx(
43
+ "relative shrink-0 rounded-full outline-none transition-[background-color,box-shadow] duration-300",
44
+ "focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper disabled:opacity-45",
45
+ on ? "bg-brand shadow-[inset_0_1px_2px_rgb(0_0_0/0.15)]" : "bg-[color-mix(in_srgb,var(--ink)_14%,var(--paper))] shadow-[inset_0_1px_2px_rgb(0_0_0/0.08)]"
46
+ ),
47
+ style: { width: w, height: h, padding: pad },
48
+ children: /* @__PURE__ */ jsx(
49
+ Sw.Thumb,
50
+ {
51
+ className: "block rounded-full bg-white shadow-[0_1px_2px_rgb(0_0_0/0.2),0_2px_6px_-1px_rgb(0_0_0/0.18)] transition-[transform,width] duration-[450ms] ease-[cubic-bezier(.34,1.56,.64,1)] motion-reduce:transition-none",
52
+ style: { width: t + stretch, height: t, transform: `translateX(${x}px)` }
53
+ }
54
+ )
55
+ }
56
+ );
57
+ if (!label) return /* @__PURE__ */ jsx("span", { className, children: control });
58
+ return /* @__PURE__ */ jsxs("div", { className: cx("flex items-center justify-between gap-4", disabled && "opacity-60", className), children: [
59
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
60
+ /* @__PURE__ */ jsx("label", { htmlFor: sid, className: cx("block select-none text-[14px] leading-5 text-ink", !disabled && "cursor-pointer"), children: label }),
61
+ description && /* @__PURE__ */ jsx("span", { id: `${sid}-d`, className: "mt-0.5 block text-[13px] leading-snug text-mute", children: description })
62
+ ] }),
63
+ control
64
+ ] });
65
+ }
66
+ var switch_default = Switch;
67
+
68
+ export {
69
+ Switch,
70
+ switch_default
71
+ };
@@ -0,0 +1,68 @@
1
+ "use client";
2
+
3
+ // components/kit/checkbox.tsx
4
+ import { Checkbox as C } from "radix-ui";
5
+ import { useId, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var cx = (...c) => c.filter(Boolean).join(" ");
8
+ function Checkbox({ checked, defaultChecked = false, onCheckedChange, disabled, label, description, id, name, className }) {
9
+ const auto = useId();
10
+ const cid = id ?? auto;
11
+ const [inner, setInner] = useState(defaultChecked);
12
+ const state = checked ?? inner;
13
+ const on = state === true;
14
+ const mixed = state === "indeterminate";
15
+ const box = /* @__PURE__ */ jsxs(
16
+ C.Root,
17
+ {
18
+ id: cid,
19
+ name,
20
+ checked: state,
21
+ onCheckedChange: (v) => {
22
+ const next = v === true;
23
+ if (checked === void 0) setInner(next);
24
+ onCheckedChange?.(next);
25
+ },
26
+ "aria-describedby": description ? `${cid}-d` : void 0,
27
+ disabled,
28
+ className: cx(
29
+ "group/cb relative grid h-[18px] w-[18px] shrink-0 place-items-center rounded-[6px] outline-none transition-[background-color,box-shadow,transform] duration-200 active:scale-90",
30
+ "focus-visible:ring-2 focus-visible:ring-brand/50 focus-visible:ring-offset-2 focus-visible:ring-offset-paper disabled:opacity-45",
31
+ on || mixed ? "bg-brand shadow-[inset_0_1px_0_rgb(255_255_255/0.2),0_1px_2px_rgb(0_0_0/0.2)]" : "bg-paper shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_22%,transparent)] hover:shadow-[inset_0_0_0_1.5px_color-mix(in_srgb,var(--ink)_40%,transparent)]"
32
+ ),
33
+ children: [
34
+ /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", className: "col-start-1 row-start-1 h-3 w-3 text-white", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx(
35
+ "path",
36
+ {
37
+ d: "M3.5 8.5l3 3 6-7",
38
+ pathLength: 1,
39
+ strokeDasharray: "1",
40
+ className: "transition-[stroke-dashoffset] ease-[cubic-bezier(.16,1,.3,1)] motion-reduce:transition-none",
41
+ style: { strokeDashoffset: on ? 0 : 1, transitionDuration: on ? "420ms" : "120ms" }
42
+ }
43
+ ) }),
44
+ /* @__PURE__ */ jsx(
45
+ "span",
46
+ {
47
+ "aria-hidden": true,
48
+ className: cx("col-start-1 row-start-1 h-[2.2px] w-2 rounded-full bg-white transition-transform duration-300 ease-[cubic-bezier(.16,1,.3,1)]", mixed ? "scale-x-100" : "scale-x-0")
49
+ }
50
+ )
51
+ ]
52
+ }
53
+ );
54
+ if (!label) return /* @__PURE__ */ jsx("span", { className, children: box });
55
+ return /* @__PURE__ */ jsxs("div", { className: cx("flex items-start gap-3", disabled && "opacity-60", className), children: [
56
+ /* @__PURE__ */ jsx("span", { className: "pt-[1px]", children: box }),
57
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
58
+ /* @__PURE__ */ jsx("label", { htmlFor: cid, className: cx("block select-none text-[14px] leading-5 text-ink", !disabled && "cursor-pointer"), children: label }),
59
+ description && /* @__PURE__ */ jsx("span", { id: `${cid}-d`, className: "mt-0.5 block text-[13px] leading-snug text-mute", children: description })
60
+ ] })
61
+ ] });
62
+ }
63
+ var checkbox_default = Checkbox;
64
+
65
+ export {
66
+ Checkbox,
67
+ checkbox_default
68
+ };