motion-brew 0.0.0-stage → 0.1.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 (663) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +106 -2
  3. package/dist/account-menu.d.ts +1 -0
  4. package/dist/account-menu.js +16 -0
  5. package/dist/action-menu.d.ts +1 -0
  6. package/dist/action-menu.js +10 -0
  7. package/dist/activity-grid.d.ts +1 -0
  8. package/dist/activity-grid.js +14 -0
  9. package/dist/add-card.d.ts +1 -0
  10. package/dist/add-card.js +11 -0
  11. package/dist/amount-slider.d.ts +1 -0
  12. package/dist/amount-slider.js +10 -0
  13. package/dist/annotation-text.d.ts +1 -0
  14. package/dist/annotation-text.js +8 -0
  15. package/dist/aura-card.d.ts +1 -0
  16. package/dist/aura-card.js +19 -0
  17. package/dist/auth-card.d.ts +1 -0
  18. package/dist/auth-card.js +15 -0
  19. package/dist/avatar-testimonial.d.ts +1 -0
  20. package/dist/avatar-testimonial.js +8 -0
  21. package/dist/backspace-text.d.ts +1 -0
  22. package/dist/backspace-text.js +8 -0
  23. package/dist/bell-toggle.d.ts +1 -0
  24. package/dist/bell-toggle.js +8 -0
  25. package/dist/bill-list.d.ts +1 -0
  26. package/dist/bill-list.js +15 -0
  27. package/dist/binary-text.d.ts +1 -0
  28. package/dist/binary-text.js +8 -0
  29. package/dist/blur-accordion.d.ts +1 -0
  30. package/dist/blur-accordion.js +8 -0
  31. package/dist/blur-text.d.ts +1 -0
  32. package/dist/blur-text.js +8 -0
  33. package/dist/booking-card.d.ts +1 -0
  34. package/dist/booking-card.js +11 -0
  35. package/dist/brand-bridge.d.ts +1 -0
  36. package/dist/brand-bridge.js +12 -0
  37. package/dist/calendar-agenda.d.ts +1 -0
  38. package/dist/calendar-agenda.js +12 -0
  39. package/dist/channel-mix.d.ts +1 -0
  40. package/dist/channel-mix.js +11 -0
  41. package/dist/chunk-25254AZA.js +141 -0
  42. package/dist/chunk-2CIJ5TVW.js +59 -0
  43. package/dist/chunk-2GXY54MP.js +247 -0
  44. package/dist/chunk-2IMPUH4H.js +135 -0
  45. package/dist/chunk-2NRXP4HM.js +371 -0
  46. package/dist/chunk-2QCWELWT.js +120 -0
  47. package/dist/chunk-2TQSHVXA.js +12 -0
  48. package/dist/chunk-327TGRS5.js +75 -0
  49. package/dist/chunk-3B2RYSTL.js +867 -0
  50. package/dist/chunk-3RKCLFY5.js +634 -0
  51. package/dist/chunk-4BVCRIR4.js +51 -0
  52. package/dist/chunk-4CKKTOJK.js +366 -0
  53. package/dist/chunk-4IGMH34C.js +319 -0
  54. package/dist/chunk-4PI6UNIZ.js +464 -0
  55. package/dist/chunk-4RHQKP2P.js +664 -0
  56. package/dist/chunk-5MP5QNFG.js +560 -0
  57. package/dist/chunk-62RBYLIN.js +128 -0
  58. package/dist/chunk-6GAKTS3D.js +329 -0
  59. package/dist/chunk-6GRDT3OE.js +124 -0
  60. package/dist/chunk-6JQY7AX5.js +307 -0
  61. package/dist/chunk-6LOUA6XB.js +237 -0
  62. package/dist/chunk-6V6OTHNE.js +299 -0
  63. package/dist/chunk-6VZIT62Q.js +142 -0
  64. package/dist/chunk-6WSY725U.js +387 -0
  65. package/dist/chunk-6XSJC7M7.js +764 -0
  66. package/dist/chunk-75DEIDBX.js +129 -0
  67. package/dist/chunk-7FQ4XU7E.js +127 -0
  68. package/dist/chunk-7IL5WRJR.js +615 -0
  69. package/dist/chunk-7MPC3RUE.js +1462 -0
  70. package/dist/chunk-7PS2W7PU.js +112 -0
  71. package/dist/chunk-AATJOPNH.js +86 -0
  72. package/dist/chunk-ADXWPWJR.js +209 -0
  73. package/dist/chunk-ANNDITUM.js +47 -0
  74. package/dist/chunk-AQN6BHWC.js +325 -0
  75. package/dist/chunk-AVOS73MR.js +537 -0
  76. package/dist/chunk-B4LNE6YK.js +473 -0
  77. package/dist/chunk-BHUNLG6S.js +142 -0
  78. package/dist/chunk-BN4MA5UY.js +127 -0
  79. package/dist/chunk-BPE43MTT.js +183 -0
  80. package/dist/chunk-BPF3FQRS.js +590 -0
  81. package/dist/chunk-BRTZFUFR.js +503 -0
  82. package/dist/chunk-BS4ZFJKW.js +121 -0
  83. package/dist/chunk-BXAKCY6X.js +86 -0
  84. package/dist/chunk-CEQ56RF6.js +129 -0
  85. package/dist/chunk-CGDKH6BB.js +902 -0
  86. package/dist/chunk-CMTGYFT7.js +395 -0
  87. package/dist/chunk-COKBF5PG.js +3291 -0
  88. package/dist/chunk-DD55JZOI.js +257 -0
  89. package/dist/chunk-DQUXBNSH.js +412 -0
  90. package/dist/chunk-DR4DUSNF.js +265 -0
  91. package/dist/chunk-EDPCK6VU.js +419 -0
  92. package/dist/chunk-EEQ2WHTN.js +142 -0
  93. package/dist/chunk-ERVE5RSN.js +793 -0
  94. package/dist/chunk-FFUBTMDC.js +303 -0
  95. package/dist/chunk-FK4TZ5OW.js +29 -0
  96. package/dist/chunk-FXI6NHNR.js +1033 -0
  97. package/dist/chunk-G3XH7YT2.js +122 -0
  98. package/dist/chunk-G7KDH7ME.js +559 -0
  99. package/dist/chunk-GRUDTDLX.js +534 -0
  100. package/dist/chunk-GUQINNWS.js +770 -0
  101. package/dist/chunk-GV3Q4D2N.js +320 -0
  102. package/dist/chunk-GVWOJJ3T.js +129 -0
  103. package/dist/chunk-GYDTIVOY.js +934 -0
  104. package/dist/chunk-H2JOCJWM.js +125 -0
  105. package/dist/chunk-H7XKIWHA.js +135 -0
  106. package/dist/chunk-HHXK3NAH.js +1382 -0
  107. package/dist/chunk-HK34LPY6.js +112 -0
  108. package/dist/chunk-HLJXNSMM.js +320 -0
  109. package/dist/chunk-HPJJAQ5L.js +406 -0
  110. package/dist/chunk-HYSXVKZB.js +213 -0
  111. package/dist/chunk-I45D4XV4.js +124 -0
  112. package/dist/chunk-I7KTTOOJ.js +113 -0
  113. package/dist/chunk-IDJOKV6S.js +67 -0
  114. package/dist/chunk-IGI6OLRX.js +138 -0
  115. package/dist/chunk-IKM7EEYN.js +117 -0
  116. package/dist/chunk-INV5FI6O.js +394 -0
  117. package/dist/chunk-IUBUAIQZ.js +321 -0
  118. package/dist/chunk-IYZOANPX.js +159 -0
  119. package/dist/chunk-JFTD3YAL.js +163 -0
  120. package/dist/chunk-JGEV462J.js +235 -0
  121. package/dist/chunk-JHT6RCGY.js +127 -0
  122. package/dist/chunk-JJEWOQYQ.js +141 -0
  123. package/dist/chunk-JT2EIO5M.js +129 -0
  124. package/dist/chunk-K3HQEHJ6.js +663 -0
  125. package/dist/chunk-K6ET254T.js +398 -0
  126. package/dist/chunk-KE563QS4.js +425 -0
  127. package/dist/chunk-LBRMNY72.js +159 -0
  128. package/dist/chunk-LNBTWX4J.js +114 -0
  129. package/dist/chunk-LS4FP6SI.js +37 -0
  130. package/dist/chunk-M22UY764.js +135 -0
  131. package/dist/chunk-M4YMNHPI.js +204 -0
  132. package/dist/chunk-MGBS5LRY.js +412 -0
  133. package/dist/chunk-MKJOBHPQ.js +215 -0
  134. package/dist/chunk-MQDOFNKI.js +818 -0
  135. package/dist/chunk-MUDKP3LK.js +120 -0
  136. package/dist/chunk-N4ZNBWKO.js +118 -0
  137. package/dist/chunk-NB5CB65C.js +137 -0
  138. package/dist/chunk-NCEAUODT.js +172 -0
  139. package/dist/chunk-NGX34WJO.js +335 -0
  140. package/dist/chunk-NIQFSLPC.js +114 -0
  141. package/dist/chunk-NJWTPRGJ.js +806 -0
  142. package/dist/chunk-NNKC6NEH.js +128 -0
  143. package/dist/chunk-NY7M42KC.js +112 -0
  144. package/dist/chunk-O7G4ISAC.js +277 -0
  145. package/dist/chunk-O7QYPA6X.js +700 -0
  146. package/dist/chunk-OEDHLZ4T.js +651 -0
  147. package/dist/chunk-OGQQ2FZZ.js +114 -0
  148. package/dist/chunk-OINRQUYT.js +186 -0
  149. package/dist/chunk-OMJBDFEW.js +506 -0
  150. package/dist/chunk-ONUWTWKP.js +345 -0
  151. package/dist/chunk-OS6REIBR.js +154 -0
  152. package/dist/chunk-OUVP5VKH.js +702 -0
  153. package/dist/chunk-OVEBMZHA.js +573 -0
  154. package/dist/chunk-PFEHD3A2.js +409 -0
  155. package/dist/chunk-PJ5EVDNN.js +157 -0
  156. package/dist/chunk-PKM6B4JJ.js +108 -0
  157. package/dist/chunk-PV3OYTMT.js +596 -0
  158. package/dist/chunk-RBSLSNMW.js +444 -0
  159. package/dist/chunk-RE74K7KI.js +370 -0
  160. package/dist/chunk-RP22J4NX.js +247 -0
  161. package/dist/chunk-RU2Q2XVP.js +287 -0
  162. package/dist/chunk-RWUARRFZ.js +267 -0
  163. package/dist/chunk-RZ2UCZ3C.js +212 -0
  164. package/dist/chunk-SBDTC4UY.js +367 -0
  165. package/dist/chunk-SKEE23KW.js +137 -0
  166. package/dist/chunk-SOW7S7ET.js +1103 -0
  167. package/dist/chunk-SQ7F3VBU.js +1069 -0
  168. package/dist/chunk-SSWKGVRI.js +172 -0
  169. package/dist/chunk-T2TSMDP3.js +1022 -0
  170. package/dist/chunk-TAFVHTWV.js +607 -0
  171. package/dist/chunk-TNLY4CSA.js +523 -0
  172. package/dist/chunk-TP3XIHL5.js +787 -0
  173. package/dist/chunk-TQ6KSDDE.js +682 -0
  174. package/dist/chunk-TRWXLGL7.js +885 -0
  175. package/dist/chunk-TTNORJF5.js +908 -0
  176. package/dist/chunk-UD5OQ2T3.js +117 -0
  177. package/dist/chunk-UDFBQWUH.js +333 -0
  178. package/dist/chunk-USRMXCZD.js +625 -0
  179. package/dist/chunk-VAPHE4G4.js +442 -0
  180. package/dist/chunk-VEC5QAOY.js +104 -0
  181. package/dist/chunk-VIR5NV5W.js +118 -0
  182. package/dist/chunk-VT2FNWQF.js +240 -0
  183. package/dist/chunk-VX4XEYQN.js +837 -0
  184. package/dist/chunk-WE7VCUOA.js +130 -0
  185. package/dist/chunk-WFWO2EIW.js +120 -0
  186. package/dist/chunk-WGIT4MMH.js +350 -0
  187. package/dist/chunk-WOR2GMMN.js +114 -0
  188. package/dist/chunk-WTTDB475.js +54 -0
  189. package/dist/chunk-WWWKMU4Y.js +184 -0
  190. package/dist/chunk-XDR4FO6Q.js +124 -0
  191. package/dist/chunk-XH6YNONO.js +112 -0
  192. package/dist/chunk-XL4L2J6N.js +129 -0
  193. package/dist/chunk-Y6MTC46Q.js +684 -0
  194. package/dist/chunk-YFLQ4HPJ.js +119 -0
  195. package/dist/chunk-YGONLKWH.js +180 -0
  196. package/dist/chunk-YLSWBUDC.js +373 -0
  197. package/dist/chunk-YU6B7YRO.js +128 -0
  198. package/dist/chunk-YURGXJSP.js +102 -0
  199. package/dist/chunk-YVYYDPE2.js +124 -0
  200. package/dist/chunk-ZPGAMYOQ.js +1 -0
  201. package/dist/chunk-ZWGOAY27.js +234 -0
  202. package/dist/column-card.d.ts +1 -0
  203. package/dist/column-card.js +8 -0
  204. package/dist/components/account-menu/account-menu.d.ts +56 -0
  205. package/dist/components/account-menu/index.d.ts +1 -0
  206. package/dist/components/action-menu/action-menu.d.ts +45 -0
  207. package/dist/components/action-menu/index.d.ts +1 -0
  208. package/dist/components/activity-grid/activity-grid.d.ts +54 -0
  209. package/dist/components/activity-grid/index.d.ts +1 -0
  210. package/dist/components/add-card/add-card.d.ts +41 -0
  211. package/dist/components/add-card/index.d.ts +1 -0
  212. package/dist/components/amount-slider/amount-slider.d.ts +43 -0
  213. package/dist/components/amount-slider/index.d.ts +1 -0
  214. package/dist/components/annotation-text/annotation-text.d.ts +27 -0
  215. package/dist/components/annotation-text/index.d.ts +1 -0
  216. package/dist/components/aura-card/aura-card.d.ts +63 -0
  217. package/dist/components/aura-card/index.d.ts +1 -0
  218. package/dist/components/auth-card/auth-card.d.ts +51 -0
  219. package/dist/components/auth-card/index.d.ts +1 -0
  220. package/dist/components/avatar-testimonial/avatar-testimonial.d.ts +39 -0
  221. package/dist/components/avatar-testimonial/index.d.ts +1 -0
  222. package/dist/components/backspace-text/backspace-text.d.ts +27 -0
  223. package/dist/components/backspace-text/index.d.ts +1 -0
  224. package/dist/components/bell-toggle/bell-toggle.d.ts +33 -0
  225. package/dist/components/bell-toggle/index.d.ts +1 -0
  226. package/dist/components/bill-list/bill-list.d.ts +49 -0
  227. package/dist/components/bill-list/index.d.ts +1 -0
  228. package/dist/components/binary-text/binary-text.d.ts +24 -0
  229. package/dist/components/binary-text/index.d.ts +1 -0
  230. package/dist/components/blur-accordion/blur-accordion.d.ts +35 -0
  231. package/dist/components/blur-accordion/index.d.ts +1 -0
  232. package/dist/components/blur-text/blur-text.d.ts +33 -0
  233. package/dist/components/blur-text/index.d.ts +1 -0
  234. package/dist/components/booking-card/booking-card.d.ts +56 -0
  235. package/dist/components/booking-card/index.d.ts +1 -0
  236. package/dist/components/brand-bridge/brand-bridge.d.ts +63 -0
  237. package/dist/components/brand-bridge/index.d.ts +1 -0
  238. package/dist/components/calendar-agenda/calendar-agenda.d.ts +64 -0
  239. package/dist/components/calendar-agenda/index.d.ts +1 -0
  240. package/dist/components/channel-mix/channel-mix.d.ts +63 -0
  241. package/dist/components/channel-mix/index.d.ts +1 -0
  242. package/dist/components/column-card/column-card.d.ts +39 -0
  243. package/dist/components/column-card/index.d.ts +1 -0
  244. package/dist/components/contact-card/contact-card.d.ts +44 -0
  245. package/dist/components/contact-card/index.d.ts +1 -0
  246. package/dist/components/context-menu/context-menu.d.ts +59 -0
  247. package/dist/components/context-menu/index.d.ts +1 -0
  248. package/dist/components/contour-feature-card/contour-feature-card.d.ts +36 -0
  249. package/dist/components/contour-feature-card/index.d.ts +1 -0
  250. package/dist/components/contour-lines/contour-lines.d.ts +34 -0
  251. package/dist/components/contour-lines/index.d.ts +1 -0
  252. package/dist/components/decay-card/decay-card.d.ts +44 -0
  253. package/dist/components/decay-card/index.d.ts +1 -0
  254. package/dist/components/deploy-streak/deploy-streak.d.ts +30 -0
  255. package/dist/components/deploy-streak/index.d.ts +1 -0
  256. package/dist/components/depth-carousel/depth-carousel.d.ts +42 -0
  257. package/dist/components/depth-carousel/index.d.ts +1 -0
  258. package/dist/components/device-traffic/device-traffic.d.ts +59 -0
  259. package/dist/components/device-traffic/index.d.ts +1 -0
  260. package/dist/components/download-button/download-button.d.ts +36 -0
  261. package/dist/components/download-button/index.d.ts +1 -0
  262. package/dist/components/event-card/event-card.d.ts +55 -0
  263. package/dist/components/event-card/index.d.ts +1 -0
  264. package/dist/components/file-drop/file-drop.d.ts +46 -0
  265. package/dist/components/file-drop/index.d.ts +1 -0
  266. package/dist/components/flip-words/flip-words.d.ts +26 -0
  267. package/dist/components/flip-words/index.d.ts +1 -0
  268. package/dist/components/flux-card/flux-card.d.ts +56 -0
  269. package/dist/components/flux-card/index.d.ts +1 -0
  270. package/dist/components/fuse-button/fuse-button.d.ts +75 -0
  271. package/dist/components/fuse-button/index.d.ts +1 -0
  272. package/dist/components/globe-card/globe-card.d.ts +46 -0
  273. package/dist/components/globe-card/index.d.ts +1 -0
  274. package/dist/components/goal-gauge/goal-gauge.d.ts +47 -0
  275. package/dist/components/goal-gauge/index.d.ts +1 -0
  276. package/dist/components/gradient-card/gradient-card.d.ts +56 -0
  277. package/dist/components/gradient-card/index.d.ts +1 -0
  278. package/dist/components/gradient-text/gradient-text.d.ts +22 -0
  279. package/dist/components/gradient-text/index.d.ts +1 -0
  280. package/dist/components/gravity-tag-pile/gravity-tag-pile.d.ts +69 -0
  281. package/dist/components/gravity-tag-pile/index.d.ts +1 -0
  282. package/dist/components/growth-stream/growth-stream.d.ts +47 -0
  283. package/dist/components/growth-stream/index.d.ts +1 -0
  284. package/dist/components/highlight-text/highlight-text.d.ts +22 -0
  285. package/dist/components/highlight-text/index.d.ts +1 -0
  286. package/dist/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
  287. package/dist/components/hold-to-confirm/index.d.ts +1 -0
  288. package/dist/components/infinite-gallery/index.d.ts +1 -0
  289. package/dist/components/infinite-gallery/infinite-gallery.d.ts +73 -0
  290. package/dist/components/integration-hub/index.d.ts +1 -0
  291. package/dist/components/integration-hub/integration-hub.d.ts +40 -0
  292. package/dist/components/liquid-card/index.d.ts +1 -0
  293. package/dist/components/liquid-card/liquid-card.d.ts +66 -0
  294. package/dist/components/liquid-metal-card/index.d.ts +1 -0
  295. package/dist/components/liquid-metal-card/liquid-metal-card.d.ts +45 -0
  296. package/dist/components/liquid-tabs/index.d.ts +1 -0
  297. package/dist/components/liquid-tabs/liquid-tabs.d.ts +47 -0
  298. package/dist/components/magnetic-button/index.d.ts +1 -0
  299. package/dist/components/magnetic-button/magnetic-button.d.ts +46 -0
  300. package/dist/components/magnetic-flow/index.d.ts +1 -0
  301. package/dist/components/magnetic-flow/magnetic-flow.d.ts +35 -0
  302. package/dist/components/message-composer/index.d.ts +1 -0
  303. package/dist/components/message-composer/message-composer.d.ts +79 -0
  304. package/dist/components/metal-card-stack/index.d.ts +1 -0
  305. package/dist/components/metal-card-stack/metal-card-stack.d.ts +49 -0
  306. package/dist/components/metric-split/index.d.ts +1 -0
  307. package/dist/components/metric-split/metric-split.d.ts +45 -0
  308. package/dist/components/mix-chart/index.d.ts +1 -0
  309. package/dist/components/mix-chart/mix-chart.d.ts +59 -0
  310. package/dist/components/month-calendar/index.d.ts +1 -0
  311. package/dist/components/month-calendar/month-calendar.d.ts +34 -0
  312. package/dist/components/morph-search/index.d.ts +1 -0
  313. package/dist/components/morph-search/morph-search.d.ts +33 -0
  314. package/dist/components/orbit-card/index.d.ts +1 -0
  315. package/dist/components/orbit-card/orbit-card.d.ts +50 -0
  316. package/dist/components/otp-code/index.d.ts +1 -0
  317. package/dist/components/otp-code/otp-code.d.ts +61 -0
  318. package/dist/components/particle-card/index.d.ts +1 -0
  319. package/dist/components/particle-card/particle-card.d.ts +57 -0
  320. package/dist/components/payment-form/index.d.ts +1 -0
  321. package/dist/components/payment-form/payment-form.d.ts +54 -0
  322. package/dist/components/pill-tabs/index.d.ts +1 -0
  323. package/dist/components/pill-tabs/pill-tabs.d.ts +39 -0
  324. package/dist/components/pixel-blast/index.d.ts +1 -0
  325. package/dist/components/pixel-blast/pixel-blast.d.ts +41 -0
  326. package/dist/components/pixel-feature-card/index.d.ts +1 -0
  327. package/dist/components/pixel-feature-card/pixel-feature-card.d.ts +43 -0
  328. package/dist/components/pixel-scroll/index.d.ts +1 -0
  329. package/dist/components/pixel-scroll/pixel-scroll.d.ts +64 -0
  330. package/dist/components/pricing-card/index.d.ts +1 -0
  331. package/dist/components/pricing-card/pricing-card.d.ts +60 -0
  332. package/dist/components/prism-carousel/index.d.ts +1 -0
  333. package/dist/components/prism-carousel/prism-carousel.d.ts +54 -0
  334. package/dist/components/prism-flow/index.d.ts +1 -0
  335. package/dist/components/prism-flow/prism-flow.d.ts +41 -0
  336. package/dist/components/privacy-banner/index.d.ts +1 -0
  337. package/dist/components/privacy-banner/privacy-banner.d.ts +41 -0
  338. package/dist/components/profile-card/index.d.ts +1 -0
  339. package/dist/components/profile-card/profile-card.d.ts +52 -0
  340. package/dist/components/profile-menu/index.d.ts +1 -0
  341. package/dist/components/profile-menu/profile-menu.d.ts +43 -0
  342. package/dist/components/project-index/index.d.ts +1 -0
  343. package/dist/components/project-index/project-index.d.ts +65 -0
  344. package/dist/components/prompt-input/index.d.ts +1 -0
  345. package/dist/components/prompt-input/prompt-input.d.ts +49 -0
  346. package/dist/components/quota-gauge/index.d.ts +1 -0
  347. package/dist/components/quota-gauge/quota-gauge.d.ts +30 -0
  348. package/dist/components/range-chart/index.d.ts +1 -0
  349. package/dist/components/range-chart/range-chart.d.ts +47 -0
  350. package/dist/components/reaction-card/index.d.ts +1 -0
  351. package/dist/components/reaction-card/reaction-card.d.ts +60 -0
  352. package/dist/components/recap-card/index.d.ts +1 -0
  353. package/dist/components/recap-card/recap-card.d.ts +61 -0
  354. package/dist/components/receipt-button/index.d.ts +1 -0
  355. package/dist/components/receipt-button/receipt-button.d.ts +53 -0
  356. package/dist/components/ribbon-gallery/index.d.ts +1 -0
  357. package/dist/components/ribbon-gallery/ribbon-gallery.d.ts +61 -0
  358. package/dist/components/roadmap-card/index.d.ts +1 -0
  359. package/dist/components/roadmap-card/roadmap-card.d.ts +38 -0
  360. package/dist/components/rolling-card-stack/index.d.ts +1 -0
  361. package/dist/components/rolling-card-stack/rolling-card-stack.d.ts +53 -0
  362. package/dist/components/rolling-stepper/index.d.ts +1 -0
  363. package/dist/components/rolling-stepper/rolling-stepper.d.ts +33 -0
  364. package/dist/components/rotating-text/index.d.ts +1 -0
  365. package/dist/components/rotating-text/rotating-text.d.ts +25 -0
  366. package/dist/components/score-card/index.d.ts +1 -0
  367. package/dist/components/score-card/score-card.d.ts +40 -0
  368. package/dist/components/search-modal/index.d.ts +1 -0
  369. package/dist/components/search-modal/search-modal.d.ts +62 -0
  370. package/dist/components/shimmer-text/index.d.ts +1 -0
  371. package/dist/components/shimmer-text/shimmer-text.d.ts +22 -0
  372. package/dist/components/sidebar-nav/index.d.ts +1 -0
  373. package/dist/components/sidebar-nav/sidebar-nav.d.ts +71 -0
  374. package/dist/components/slide-commit/index.d.ts +1 -0
  375. package/dist/components/slide-commit/slide-commit.d.ts +39 -0
  376. package/dist/components/spatial-gallery/index.d.ts +1 -0
  377. package/dist/components/spatial-gallery/spatial-gallery.d.ts +88 -0
  378. package/dist/components/spending-meter/index.d.ts +1 -0
  379. package/dist/components/spending-meter/spending-meter.d.ts +41 -0
  380. package/dist/components/tab-bar/index.d.ts +1 -0
  381. package/dist/components/tab-bar/tab-bar.d.ts +44 -0
  382. package/dist/components/team-member-card/index.d.ts +1 -0
  383. package/dist/components/team-member-card/team-member-card.d.ts +66 -0
  384. package/dist/components/team-morph/index.d.ts +1 -0
  385. package/dist/components/team-morph/team-morph.d.ts +38 -0
  386. package/dist/components/tilt-card/index.d.ts +1 -0
  387. package/dist/components/tilt-card/tilt-card.d.ts +27 -0
  388. package/dist/components/tilt-carousel/index.d.ts +1 -0
  389. package/dist/components/tilt-carousel/tilt-carousel.d.ts +43 -0
  390. package/dist/components/toast-stack/index.d.ts +1 -0
  391. package/dist/components/toast-stack/toast-stack.d.ts +57 -0
  392. package/dist/components/usage-ring/index.d.ts +1 -0
  393. package/dist/components/usage-ring/usage-ring.d.ts +40 -0
  394. package/dist/components/verify-flow/index.d.ts +1 -0
  395. package/dist/components/verify-flow/verify-flow.d.ts +49 -0
  396. package/dist/components/voice-prompt/index.d.ts +1 -0
  397. package/dist/components/voice-prompt/voice-prompt.d.ts +55 -0
  398. package/dist/components/wallet-card/index.d.ts +1 -0
  399. package/dist/components/wallet-card/wallet-card.d.ts +54 -0
  400. package/dist/components/wave-text/index.d.ts +1 -0
  401. package/dist/components/wave-text/wave-text.d.ts +27 -0
  402. package/dist/contact-card.d.ts +1 -0
  403. package/dist/contact-card.js +12 -0
  404. package/dist/context-menu.d.ts +1 -0
  405. package/dist/context-menu.js +17 -0
  406. package/dist/contour-feature-card.d.ts +1 -0
  407. package/dist/contour-feature-card.js +9 -0
  408. package/dist/contour-lines.d.ts +1 -0
  409. package/dist/contour-lines.js +8 -0
  410. package/dist/decay-card.d.ts +1 -0
  411. package/dist/decay-card.js +8 -0
  412. package/dist/deploy-streak.d.ts +1 -0
  413. package/dist/deploy-streak.js +9 -0
  414. package/dist/depth-carousel.d.ts +1 -0
  415. package/dist/depth-carousel.js +8 -0
  416. package/dist/device-traffic.d.ts +1 -0
  417. package/dist/device-traffic.js +12 -0
  418. package/dist/download-button.d.ts +1 -0
  419. package/dist/download-button.js +8 -0
  420. package/dist/event-card.d.ts +1 -0
  421. package/dist/event-card.js +12 -0
  422. package/dist/file-drop.d.ts +1 -0
  423. package/dist/file-drop.js +12 -0
  424. package/dist/flip-words.d.ts +1 -0
  425. package/dist/flip-words.js +8 -0
  426. package/dist/flux-card.d.ts +1 -0
  427. package/dist/flux-card.js +13 -0
  428. package/dist/fuse-button.d.ts +1 -0
  429. package/dist/fuse-button.js +9 -0
  430. package/dist/globe-card.d.ts +1 -0
  431. package/dist/globe-card.js +8 -0
  432. package/dist/goal-gauge.d.ts +1 -0
  433. package/dist/goal-gauge.js +9 -0
  434. package/dist/gradient-card.d.ts +1 -0
  435. package/dist/gradient-card.js +8 -0
  436. package/dist/gradient-text.d.ts +1 -0
  437. package/dist/gradient-text.js +8 -0
  438. package/dist/gravity-tag-pile.d.ts +1 -0
  439. package/dist/gravity-tag-pile.js +9 -0
  440. package/dist/growth-stream.d.ts +1 -0
  441. package/dist/growth-stream.js +10 -0
  442. package/dist/highlight-text.d.ts +1 -0
  443. package/dist/highlight-text.js +8 -0
  444. package/dist/hold-to-confirm.d.ts +1 -0
  445. package/dist/hold-to-confirm.js +8 -0
  446. package/dist/icons/activity.d.ts +15 -0
  447. package/dist/icons/archive.d.ts +15 -0
  448. package/dist/icons/arrow-down-right.d.ts +15 -0
  449. package/dist/icons/arrow-down.d.ts +15 -0
  450. package/dist/icons/arrow-right.d.ts +15 -0
  451. package/dist/icons/arrow-up-right.d.ts +15 -0
  452. package/dist/icons/arrow-up.d.ts +15 -0
  453. package/dist/icons/at-sign.d.ts +15 -0
  454. package/dist/icons/attach-file.d.ts +15 -0
  455. package/dist/icons/badge-alert.d.ts +15 -0
  456. package/dist/icons/bell.d.ts +15 -0
  457. package/dist/icons/bold.d.ts +15 -0
  458. package/dist/icons/bookmark.d.ts +15 -0
  459. package/dist/icons/bot.d.ts +15 -0
  460. package/dist/icons/calendar-check-2.d.ts +15 -0
  461. package/dist/icons/calendar-check.d.ts +15 -0
  462. package/dist/icons/calendar-days.d.ts +15 -0
  463. package/dist/icons/chart-line.d.ts +15 -0
  464. package/dist/icons/chart-pie.d.ts +15 -0
  465. package/dist/icons/check.d.ts +15 -0
  466. package/dist/icons/chevron-down.d.ts +15 -0
  467. package/dist/icons/chevron-left.d.ts +15 -0
  468. package/dist/icons/chevron-right.d.ts +15 -0
  469. package/dist/icons/circle-check.d.ts +15 -0
  470. package/dist/icons/circle-dollar-sign.d.ts +15 -0
  471. package/dist/icons/clipboard-check.d.ts +15 -0
  472. package/dist/icons/clock.d.ts +15 -0
  473. package/dist/icons/cloud-upload.d.ts +15 -0
  474. package/dist/icons/compass.d.ts +15 -0
  475. package/dist/icons/contrast.d.ts +15 -0
  476. package/dist/icons/copy.d.ts +15 -0
  477. package/dist/icons/credit-card.d.ts +15 -0
  478. package/dist/icons/delete.d.ts +15 -0
  479. package/dist/icons/download.d.ts +15 -0
  480. package/dist/icons/dribbble.d.ts +15 -0
  481. package/dist/icons/earth.d.ts +15 -0
  482. package/dist/icons/eye-off.d.ts +15 -0
  483. package/dist/icons/eye.d.ts +15 -0
  484. package/dist/icons/feather.d.ts +15 -0
  485. package/dist/icons/figma.d.ts +15 -0
  486. package/dist/icons/file-text.d.ts +16 -0
  487. package/dist/icons/flame.d.ts +15 -0
  488. package/dist/icons/folder-input.d.ts +15 -0
  489. package/dist/icons/folder-open.d.ts +15 -0
  490. package/dist/icons/folders.d.ts +15 -0
  491. package/dist/icons/github.d.ts +15 -0
  492. package/dist/icons/hand-coins.d.ts +15 -0
  493. package/dist/icons/heart.d.ts +15 -0
  494. package/dist/icons/history.d.ts +15 -0
  495. package/dist/icons/home.d.ts +15 -0
  496. package/dist/icons/hourglass.d.ts +15 -0
  497. package/dist/icons/instagram.d.ts +15 -0
  498. package/dist/icons/italic.d.ts +15 -0
  499. package/dist/icons/layout-grid.d.ts +15 -0
  500. package/dist/icons/link.d.ts +15 -0
  501. package/dist/icons/linkedin.d.ts +15 -0
  502. package/dist/icons/loader-circle.d.ts +15 -0
  503. package/dist/icons/lock-keyhole-open.d.ts +15 -0
  504. package/dist/icons/lock-keyhole.d.ts +15 -0
  505. package/dist/icons/lock.d.ts +15 -0
  506. package/dist/icons/logout.d.ts +15 -0
  507. package/dist/icons/mail-check.d.ts +15 -0
  508. package/dist/icons/map-pin.d.ts +15 -0
  509. package/dist/icons/message-circle.d.ts +15 -0
  510. package/dist/icons/mic.d.ts +15 -0
  511. package/dist/icons/monitor-check.d.ts +15 -0
  512. package/dist/icons/moon.d.ts +15 -0
  513. package/dist/icons/palette.d.ts +15 -0
  514. package/dist/icons/panel-left-close.d.ts +15 -0
  515. package/dist/icons/panel-left-open.d.ts +15 -0
  516. package/dist/icons/plug-zap.d.ts +15 -0
  517. package/dist/icons/plus.d.ts +15 -0
  518. package/dist/icons/radio.d.ts +15 -0
  519. package/dist/icons/receipt.d.ts +15 -0
  520. package/dist/icons/refresh-cw.d.ts +15 -0
  521. package/dist/icons/rotate-ccw.d.ts +15 -0
  522. package/dist/icons/search.d.ts +15 -0
  523. package/dist/icons/send.d.ts +15 -0
  524. package/dist/icons/settings.d.ts +15 -0
  525. package/dist/icons/shield-check.d.ts +15 -0
  526. package/dist/icons/smartphone-nfc.d.ts +15 -0
  527. package/dist/icons/smile.d.ts +15 -0
  528. package/dist/icons/sparkles.d.ts +15 -0
  529. package/dist/icons/square-pen.d.ts +15 -0
  530. package/dist/icons/sun.d.ts +15 -0
  531. package/dist/icons/terminal.d.ts +15 -0
  532. package/dist/icons/timer.d.ts +15 -0
  533. package/dist/icons/trending-up.d.ts +15 -0
  534. package/dist/icons/twitter.d.ts +15 -0
  535. package/dist/icons/underline.d.ts +15 -0
  536. package/dist/icons/undo.d.ts +15 -0
  537. package/dist/icons/user-check.d.ts +15 -0
  538. package/dist/icons/user-plus.d.ts +15 -0
  539. package/dist/icons/user-round-plus.d.ts +15 -0
  540. package/dist/icons/user.d.ts +15 -0
  541. package/dist/icons/users.d.ts +15 -0
  542. package/dist/icons/wifi.d.ts +15 -0
  543. package/dist/icons/workflow.d.ts +15 -0
  544. package/dist/icons/x.d.ts +15 -0
  545. package/dist/icons/zap.d.ts +15 -0
  546. package/dist/index.d.ts +100 -0
  547. package/dist/index.js +472 -0
  548. package/dist/infinite-gallery.d.ts +1 -0
  549. package/dist/infinite-gallery.js +9 -0
  550. package/dist/integration-hub.d.ts +1 -0
  551. package/dist/integration-hub.js +8 -0
  552. package/dist/lib/cn.d.ts +3 -0
  553. package/dist/liquid-card.d.ts +1 -0
  554. package/dist/liquid-card.js +10 -0
  555. package/dist/liquid-metal-card.d.ts +1 -0
  556. package/dist/liquid-metal-card.js +8 -0
  557. package/dist/liquid-tabs.d.ts +1 -0
  558. package/dist/liquid-tabs.js +14 -0
  559. package/dist/magnetic-button.d.ts +1 -0
  560. package/dist/magnetic-button.js +8 -0
  561. package/dist/magnetic-flow.d.ts +1 -0
  562. package/dist/magnetic-flow.js +8 -0
  563. package/dist/message-composer.d.ts +1 -0
  564. package/dist/message-composer.js +20 -0
  565. package/dist/metal-card-stack.d.ts +1 -0
  566. package/dist/metal-card-stack.js +8 -0
  567. package/dist/metric-split.d.ts +1 -0
  568. package/dist/metric-split.js +9 -0
  569. package/dist/mix-chart.d.ts +1 -0
  570. package/dist/mix-chart.js +9 -0
  571. package/dist/month-calendar.d.ts +1 -0
  572. package/dist/month-calendar.js +10 -0
  573. package/dist/morph-search.d.ts +1 -0
  574. package/dist/morph-search.js +10 -0
  575. package/dist/orbit-card.d.ts +1 -0
  576. package/dist/orbit-card.js +8 -0
  577. package/dist/otp-code.d.ts +1 -0
  578. package/dist/otp-code.js +17 -0
  579. package/dist/particle-card.d.ts +1 -0
  580. package/dist/particle-card.js +8 -0
  581. package/dist/payment-form.d.ts +1 -0
  582. package/dist/payment-form.js +8 -0
  583. package/dist/pill-tabs.d.ts +1 -0
  584. package/dist/pill-tabs.js +9 -0
  585. package/dist/pixel-blast.d.ts +1 -0
  586. package/dist/pixel-blast.js +8 -0
  587. package/dist/pixel-feature-card.d.ts +1 -0
  588. package/dist/pixel-feature-card.js +9 -0
  589. package/dist/pixel-scroll.d.ts +1 -0
  590. package/dist/pixel-scroll.js +8 -0
  591. package/dist/pricing-card.d.ts +1 -0
  592. package/dist/pricing-card.js +14 -0
  593. package/dist/prism-carousel.d.ts +1 -0
  594. package/dist/prism-carousel.js +8 -0
  595. package/dist/prism-flow.d.ts +1 -0
  596. package/dist/prism-flow.js +8 -0
  597. package/dist/privacy-banner.d.ts +1 -0
  598. package/dist/privacy-banner.js +8 -0
  599. package/dist/profile-card.d.ts +1 -0
  600. package/dist/profile-card.js +13 -0
  601. package/dist/profile-menu.d.ts +1 -0
  602. package/dist/profile-menu.js +21 -0
  603. package/dist/project-index.d.ts +1 -0
  604. package/dist/project-index.js +9 -0
  605. package/dist/prompt-input.d.ts +1 -0
  606. package/dist/prompt-input.js +14 -0
  607. package/dist/quota-gauge.d.ts +1 -0
  608. package/dist/quota-gauge.js +9 -0
  609. package/dist/range-chart.d.ts +1 -0
  610. package/dist/range-chart.js +8 -0
  611. package/dist/reaction-card.d.ts +1 -0
  612. package/dist/reaction-card.js +8 -0
  613. package/dist/recap-card.d.ts +1 -0
  614. package/dist/recap-card.js +15 -0
  615. package/dist/receipt-button.d.ts +1 -0
  616. package/dist/receipt-button.js +8 -0
  617. package/dist/ribbon-gallery.d.ts +1 -0
  618. package/dist/ribbon-gallery.js +8 -0
  619. package/dist/roadmap-card.d.ts +1 -0
  620. package/dist/roadmap-card.js +11 -0
  621. package/dist/rolling-card-stack.d.ts +1 -0
  622. package/dist/rolling-card-stack.js +8 -0
  623. package/dist/rolling-stepper.d.ts +1 -0
  624. package/dist/rolling-stepper.js +8 -0
  625. package/dist/rotating-text.d.ts +1 -0
  626. package/dist/rotating-text.js +9 -0
  627. package/dist/score-card.d.ts +1 -0
  628. package/dist/score-card.js +10 -0
  629. package/dist/search-modal.d.ts +1 -0
  630. package/dist/search-modal.js +16 -0
  631. package/dist/shimmer-text.d.ts +1 -0
  632. package/dist/shimmer-text.js +8 -0
  633. package/dist/sidebar-nav.d.ts +1 -0
  634. package/dist/sidebar-nav.js +19 -0
  635. package/dist/slide-commit.d.ts +1 -0
  636. package/dist/slide-commit.js +9 -0
  637. package/dist/spatial-gallery.d.ts +1 -0
  638. package/dist/spatial-gallery.js +8 -0
  639. package/dist/spending-meter.d.ts +1 -0
  640. package/dist/spending-meter.js +9 -0
  641. package/dist/tab-bar.d.ts +1 -0
  642. package/dist/tab-bar.js +18 -0
  643. package/dist/team-member-card.d.ts +1 -0
  644. package/dist/team-member-card.js +14 -0
  645. package/dist/team-morph.d.ts +1 -0
  646. package/dist/team-morph.js +11 -0
  647. package/dist/tilt-card.d.ts +1 -0
  648. package/dist/tilt-card.js +8 -0
  649. package/dist/tilt-carousel.d.ts +1 -0
  650. package/dist/tilt-carousel.js +8 -0
  651. package/dist/toast-stack.d.ts +1 -0
  652. package/dist/toast-stack.js +13 -0
  653. package/dist/usage-ring.d.ts +1 -0
  654. package/dist/usage-ring.js +9 -0
  655. package/dist/verify-flow.d.ts +1 -0
  656. package/dist/verify-flow.js +10 -0
  657. package/dist/voice-prompt.d.ts +1 -0
  658. package/dist/voice-prompt.js +14 -0
  659. package/dist/wallet-card.d.ts +1 -0
  660. package/dist/wallet-card.js +15 -0
  661. package/dist/wave-text.d.ts +1 -0
  662. package/dist/wave-text.js +8 -0
  663. package/package.json +111 -4
@@ -0,0 +1,257 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-2TQSHVXA.js";
5
+
6
+ // src/components/receipt-button/receipt-button.tsx
7
+ import * as React from "react";
8
+ import gsap from "gsap";
9
+ import { useGSAP } from "@gsap/react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ gsap.registerPlugin(useGSAP);
12
+ var DEFAULT_ITEMS = [
13
+ { qty: 2, name: "Cortado", price: 6.8 },
14
+ { qty: 1, name: "Cardamom bun", price: 4.2 },
15
+ { qty: 1, name: "Sparkling water", price: 2.5 }
16
+ ];
17
+ var TEETH = 18;
18
+ var TOOTH = 5;
19
+ function paperClip(bottom) {
20
+ const pts = [];
21
+ for (let i = 0; i <= TEETH * 2; i++) pts.push(`${i / (TEETH * 2) * 100}% ${i % 2 ? 0 : TOOTH}px`);
22
+ for (let i = TEETH * 2; i >= 0; i--) pts.push(`${i / (TEETH * 2) * 100}% calc(100% - ${i % 2 ? bottom : 0}px)`);
23
+ return `polygon(${pts.join(", ")})`;
24
+ }
25
+ function barcode(seed) {
26
+ let h = 2166136261;
27
+ for (const ch of seed) h = Math.imul(h ^ ch.charCodeAt(0), 16777619);
28
+ const bars = [];
29
+ let x = 0;
30
+ while (x < 176) {
31
+ h = Math.imul(h ^ h >>> 13, 2654435761);
32
+ const w = 1 + Math.abs(h) % 3;
33
+ const gap = 1 + Math.abs(h >> 7) % 2;
34
+ bars.push({ x, w });
35
+ x += w + gap;
36
+ }
37
+ return bars;
38
+ }
39
+ var money = (n) => n.toFixed(2);
40
+ var WAVE_W = 14;
41
+ function wavePath(amplitude, phase) {
42
+ const pts = [];
43
+ for (let y = 0; y <= 96; y += 4) {
44
+ const x = WAVE_W / 2 + amplitude * Math.sin(y / 48 * Math.PI * 2 + phase);
45
+ pts.push(`${x.toFixed(2)} ${y}`);
46
+ }
47
+ return `M0 0 L${pts.join(" L")} L0 96 Z`;
48
+ }
49
+ var WAVE_FRONT = wavePath(4, 0);
50
+ var WAVE_BACK = wavePath(5, Math.PI / 1.5);
51
+ var ReceiptButton = React.forwardRef(function ReceiptButton2({
52
+ items = DEFAULT_ITEMS,
53
+ currency = "$",
54
+ merchant = "NORTH ROAST",
55
+ tagline = "Coffee bar",
56
+ orderId = "1042",
57
+ footer = "Thank you, come again",
58
+ label,
59
+ paidLabel = "Paid",
60
+ processing = 1200,
61
+ feedSpeed = 0.09,
62
+ color = "#141414",
63
+ successColor = "#2f8a4f",
64
+ resetAfter = 3200,
65
+ onPay,
66
+ onComplete,
67
+ className
68
+ }, forwardedRef) {
69
+ const root = React.useRef(null);
70
+ React.useImperativeHandle(forwardedRef, () => root.current);
71
+ const [phase, setPhase] = React.useState("idle");
72
+ const [stamp, setStamp] = React.useState("");
73
+ const resetTimer = React.useRef(null);
74
+ const total = items.reduce((sum, i) => sum + i.qty * i.price, 0);
75
+ const bars = React.useMemo(() => barcode(orderId), [orderId]);
76
+ const { contextSafe } = useGSAP(
77
+ () => {
78
+ gsap.set("[data-receipt]", { yPercent: 100, y: 0, rotation: 0, autoAlpha: 1 });
79
+ gsap.set("[data-paper]", { clipPath: paperClip(0) });
80
+ gsap.set("[data-fill]", { xPercent: -100, x: -WAVE_W });
81
+ gsap.set("[data-part]", { autoAlpha: 0, y: 8 });
82
+ gsap.set("[data-check]", { strokeDashoffset: 24 });
83
+ gsap.set("[data-label]", { autoAlpha: 1, y: 0 });
84
+ },
85
+ { scope: root }
86
+ );
87
+ React.useEffect(() => () => void (resetTimer.current && clearTimeout(resetTimer.current)), []);
88
+ const reset = contextSafe(() => {
89
+ if (resetTimer.current) clearTimeout(resetTimer.current);
90
+ gsap.timeline({ onComplete: () => setPhase("idle") }).to("[data-receipt]", { y: "+=24", autoAlpha: 0, duration: 0.35, ease: "power2.in" }).to("[data-part]", { autoAlpha: 0, y: -8, duration: 0.2, stagger: 0.02 }, "<").to("[data-fill]", { xPercent: 100, x: 0, duration: 0.5, ease: "power3.inOut" }, "<0.1").to("[data-label]", { autoAlpha: 1, y: 0, duration: 0.3, ease: "power2.out" }, "-=0.15").add(() => {
91
+ gsap.set("[data-receipt]", { yPercent: 100, y: 0, rotation: 0, autoAlpha: 1 });
92
+ gsap.set("[data-paper]", { clipPath: paperClip(0) });
93
+ gsap.set("[data-check]", { strokeDashoffset: 24 });
94
+ gsap.set("[data-part]", { y: 8 });
95
+ gsap.set("[data-fill]", { xPercent: -100, x: -WAVE_W });
96
+ });
97
+ });
98
+ const pay = contextSafe(() => {
99
+ if (phase !== "idle") return;
100
+ const now = /* @__PURE__ */ new Date();
101
+ const pad = (n) => String(n).padStart(2, "0");
102
+ setStamp(
103
+ `${pad(now.getDate())}.${pad(now.getMonth() + 1)}.${String(now.getFullYear()).slice(2)} \xB7 ${pad(now.getHours())}:${pad(now.getMinutes())}`
104
+ );
105
+ setPhase("paying");
106
+ onPay?.();
107
+ const rows = gsap.utils.toArray("[data-row]", root.current);
108
+ const tear = { depth: 0 };
109
+ const tl = gsap.timeline({
110
+ onComplete: () => {
111
+ setPhase("printed");
112
+ onComplete?.();
113
+ if (resetAfter !== null) resetTimer.current = setTimeout(reset, resetAfter);
114
+ }
115
+ });
116
+ const ripples = [
117
+ gsap.fromTo("[data-wave=front]", { yPercent: 0 }, { yPercent: -50, duration: 0.7, ease: "none", repeat: -1 }),
118
+ gsap.fromTo("[data-wave=back]", { yPercent: -50 }, { yPercent: 0, duration: 1.1, ease: "none", repeat: -1 })
119
+ ];
120
+ tl.to("[data-label]", { autoAlpha: 0, y: -10, duration: 0.25, ease: "power2.in" }).to(
121
+ "[data-fill]",
122
+ {
123
+ xPercent: 0,
124
+ x: 0,
125
+ duration: processing / 1e3,
126
+ ease: "power2.inOut",
127
+ onComplete: () => ripples.forEach((r) => r.kill())
128
+ },
129
+ "<"
130
+ ).to("[data-check]", { strokeDashoffset: 0, duration: 0.35, ease: "power2.out" }).to("[data-part]", { autoAlpha: 1, y: 0, duration: 0.3, ease: "power3.out", stagger: 0.03 }, "<");
131
+ rows.forEach((_, i) => {
132
+ tl.to("[data-receipt]", {
133
+ yPercent: 100 - (i + 1) / rows.length * 100,
134
+ duration: feedSpeed,
135
+ ease: "power1.out"
136
+ }).to({}, { duration: feedSpeed * 0.45 });
137
+ });
138
+ tl.to("[data-receipt]", { x: -3, duration: 0.05, yoyo: true, repeat: 3, ease: "none" }, "+=0.2").to(tear, {
139
+ depth: TOOTH,
140
+ duration: 0.12,
141
+ ease: "power2.out",
142
+ onUpdate: () => gsap.set("[data-paper]", { clipPath: paperClip(tear.depth) })
143
+ }).to("[data-receipt]", { y: -64, rotation: -3, duration: 0.7, ease: "back.out(1.6)" }, "<");
144
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) tl.progress(1);
145
+ });
146
+ const printed = phase === "printed";
147
+ return /* @__PURE__ */ jsxs("div", { ref: root, className: cn("relative inline-flex flex-col items-center pt-[26rem]", className), children: [
148
+ /* @__PURE__ */ jsx(
149
+ "div",
150
+ {
151
+ "aria-hidden": phase === "idle",
152
+ className: "absolute bottom-7 left-1/2 w-60 -translate-x-1/2",
153
+ style: { clipPath: "inset(-40rem -4rem 0 -4rem)" },
154
+ children: /* @__PURE__ */ jsx(
155
+ "div",
156
+ {
157
+ "data-receipt": true,
158
+ role: printed ? "button" : void 0,
159
+ tabIndex: printed ? 0 : -1,
160
+ onClick: () => printed && reset(),
161
+ onKeyDown: (e) => {
162
+ if (printed && (e.key === "Enter" || e.key === " ")) {
163
+ e.preventDefault();
164
+ reset();
165
+ }
166
+ },
167
+ "aria-label": printed ? "Receipt. Press to dismiss." : void 0,
168
+ className: cn(
169
+ "block w-full text-left drop-shadow-[0_10px_18px_rgba(0,0,0,0.14)] outline-none",
170
+ printed && "cursor-pointer"
171
+ ),
172
+ children: /* @__PURE__ */ jsxs("div", { "data-paper": true, className: "bg-[#fdfcf8] px-5 pb-6 pt-6 font-mono text-[12px] text-zinc-800", children: [
173
+ /* @__PURE__ */ jsxs("div", { "data-row": true, className: "text-center", children: [
174
+ /* @__PURE__ */ jsx("p", { className: "text-lg font-bold tracking-[0.25em] text-zinc-900", children: merchant }),
175
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 uppercase tracking-[0.2em] text-zinc-500", children: tagline })
176
+ ] }),
177
+ /* @__PURE__ */ jsxs("div", { "data-row": true, className: "mt-4 flex justify-between text-zinc-500", children: [
178
+ /* @__PURE__ */ jsxs("span", { children: [
179
+ "Order #",
180
+ orderId
181
+ ] }),
182
+ /* @__PURE__ */ jsx("span", { children: stamp })
183
+ ] }),
184
+ /* @__PURE__ */ jsx("div", { className: "my-3 border-t border-dashed border-zinc-300" }),
185
+ items.map((item) => /* @__PURE__ */ jsxs("div", { "data-row": true, className: "flex justify-between py-0.5", children: [
186
+ /* @__PURE__ */ jsxs("span", { children: [
187
+ item.qty,
188
+ "\xD7 ",
189
+ item.name
190
+ ] }),
191
+ /* @__PURE__ */ jsx("span", { children: money(item.qty * item.price) })
192
+ ] }, item.name)),
193
+ /* @__PURE__ */ jsx("div", { className: "my-3 border-t border-dashed border-zinc-300" }),
194
+ /* @__PURE__ */ jsxs("div", { "data-row": true, className: "flex items-baseline justify-between text-sm font-bold text-zinc-900", children: [
195
+ /* @__PURE__ */ jsx("span", { children: "TOTAL" }),
196
+ /* @__PURE__ */ jsxs("span", { children: [
197
+ currency,
198
+ money(total)
199
+ ] })
200
+ ] }),
201
+ /* @__PURE__ */ jsxs("div", { "data-row": true, className: "mt-1 flex justify-between text-[10px] uppercase tracking-wider text-zinc-500", children: [
202
+ /* @__PURE__ */ jsx("span", { children: "Card \xB7 tap" }),
203
+ /* @__PURE__ */ jsx("span", { children: "Approved" })
204
+ ] }),
205
+ /* @__PURE__ */ jsx("div", { "data-row": true, className: "mt-4 flex justify-center", children: /* @__PURE__ */ jsx("svg", { width: "176", height: "36", viewBox: "0 0 176 36", "aria-hidden": true, children: bars.map((bar, i) => /* @__PURE__ */ jsx("rect", { x: bar.x, y: "0", width: bar.w, height: "36", fill: "#18181b" }, i)) }) }),
206
+ /* @__PURE__ */ jsx("p", { "data-row": true, className: "mt-2 text-center text-[10px] uppercase tracking-[0.2em] text-zinc-500", children: footer })
207
+ ] })
208
+ }
209
+ )
210
+ }
211
+ ),
212
+ /* @__PURE__ */ jsxs(
213
+ "button",
214
+ {
215
+ type: "button",
216
+ onClick: pay,
217
+ "aria-disabled": phase !== "idle",
218
+ "aria-live": "polite",
219
+ style: { background: color },
220
+ className: "relative isolate grid h-14 w-72 cursor-pointer place-items-center overflow-hidden rounded-full text-base font-semibold text-white shadow-[0_12px_28px_-12px_rgba(0,0,0,0.45)] outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2 aria-disabled:cursor-default",
221
+ children: [
222
+ /* @__PURE__ */ jsx("span", { "data-fill": true, "aria-hidden": true, className: "absolute inset-0 -z-10", style: { background: successColor }, children: /* @__PURE__ */ jsxs("span", { className: "absolute left-full top-0 h-full overflow-hidden", style: { width: WAVE_W }, children: [
223
+ /* @__PURE__ */ jsx(
224
+ "svg",
225
+ {
226
+ "data-wave": "back",
227
+ viewBox: `0 0 ${WAVE_W} 96`,
228
+ preserveAspectRatio: "none",
229
+ className: "absolute left-0 top-0 h-[200%] w-full opacity-45",
230
+ children: /* @__PURE__ */ jsx("path", { d: WAVE_BACK, fill: successColor })
231
+ }
232
+ ),
233
+ /* @__PURE__ */ jsx(
234
+ "svg",
235
+ {
236
+ "data-wave": "front",
237
+ viewBox: `0 0 ${WAVE_W} 96`,
238
+ preserveAspectRatio: "none",
239
+ className: "absolute left-0 top-0 h-[200%] w-full",
240
+ children: /* @__PURE__ */ jsx("path", { d: WAVE_FRONT, fill: successColor })
241
+ }
242
+ )
243
+ ] }) }),
244
+ /* @__PURE__ */ jsx("span", { "data-label": true, className: "col-start-1 row-start-1", children: label ?? `Pay ${currency}${money(total)}` }),
245
+ /* @__PURE__ */ jsxs("span", { "data-paid": true, className: "col-start-1 row-start-1 flex items-center gap-2", "aria-hidden": phase === "idle", children: [
246
+ /* @__PURE__ */ jsx("svg", { "data-part": true, viewBox: "0 0 24 24", className: "size-5", fill: "none", stroke: "currentColor", strokeWidth: 2.75, children: /* @__PURE__ */ jsx("path", { "data-check": true, d: "M20 6 9 17l-5-5", strokeLinecap: "round", strokeLinejoin: "round", strokeDasharray: "24" }) }),
247
+ /* @__PURE__ */ jsx("span", { className: "flex", "aria-label": paidLabel, children: Array.from(paidLabel).map((ch, i) => /* @__PURE__ */ jsx("span", { "data-part": true, "aria-hidden": true, className: "inline-block whitespace-pre", children: ch }, i)) })
248
+ ] })
249
+ ]
250
+ }
251
+ )
252
+ ] });
253
+ });
254
+
255
+ export {
256
+ ReceiptButton
257
+ };
@@ -0,0 +1,412 @@
1
+ "use client";
2
+ import {
3
+ ArrowUpRightIcon
4
+ } from "./chunk-I7KTTOOJ.js";
5
+ import {
6
+ cn
7
+ } from "./chunk-2TQSHVXA.js";
8
+
9
+ // src/components/goal-gauge/goal-gauge.tsx
10
+ import * as React from "react";
11
+ import {
12
+ AnimatePresence,
13
+ animate,
14
+ motion,
15
+ useInView,
16
+ useMotionValue,
17
+ useMotionValueEvent,
18
+ useReducedMotion,
19
+ useTransform,
20
+ useVelocity
21
+ } from "motion/react";
22
+ import { jsx, jsxs } from "react/jsx-runtime";
23
+ var W = 280;
24
+ var R = 120;
25
+ var STROKE = 10;
26
+ var CX = W / 2;
27
+ var CY = R + STROKE / 2 + 6;
28
+ var H = CY + STROKE / 2 + 2;
29
+ var ARC = `M ${CX - R} ${CY} A ${R} ${R} 0 0 1 ${CX + R} ${CY}`;
30
+ var GLIDE = [0.22, 1, 0.36, 1];
31
+ var ROLL = { type: "spring", stiffness: 280, damping: 26, mass: 0.8 };
32
+ var DIGITS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
33
+ var MAX_BLUR = 0.5;
34
+ function Digit({ digit, still }) {
35
+ return /* @__PURE__ */ jsx("span", { className: "relative inline-block h-[1em] w-[0.62em] overflow-hidden", children: /* @__PURE__ */ jsx(
36
+ motion.span,
37
+ {
38
+ className: "absolute inset-x-0 top-0 flex flex-col",
39
+ initial: { y: "0%" },
40
+ animate: { y: `${-digit * 10}%` },
41
+ transition: still ? { duration: 0 } : ROLL,
42
+ children: DIGITS.map((d) => /* @__PURE__ */ jsx("span", { className: "flex h-[1em] items-center justify-center", children: d }, d))
43
+ }
44
+ ) });
45
+ }
46
+ function Rolling({ text, still }) {
47
+ const chars = Array.from(text);
48
+ return /* @__PURE__ */ jsx("span", { "aria-label": text, className: "inline-flex leading-none tabular-nums", children: chars.map((ch, i) => {
49
+ const key = chars.length - i;
50
+ return /\d/.test(ch) ? /* @__PURE__ */ jsx(Digit, { digit: Number(ch), still }, key) : /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "inline-block h-[1em]", children: ch }, `${key}-${ch}`);
51
+ }) });
52
+ }
53
+ function Wheel({
54
+ amount,
55
+ rate,
56
+ place,
57
+ unit
58
+ }) {
59
+ const position = useTransform(amount, (a) => {
60
+ const ticks = Math.max(0, a) / unit + 1e-6;
61
+ const whole = Math.floor(ticks);
62
+ const turning = ticks - whole;
63
+ const span = Math.round(place / unit);
64
+ const digit = Math.floor(whole / span) % 10;
65
+ const turn = span === 1 ? turning : whole % span === span - 1 ? turning : 0;
66
+ return digit + turn;
67
+ });
68
+ const y = useTransform(position, (p) => `${-p * 100 / 11}%`);
69
+ const filter = useTransform(rate, (v) => {
70
+ const px = Math.min(MAX_BLUR, Math.abs(v) / place * 0.015);
71
+ return px < 0.1 ? "none" : `blur(${px.toFixed(2)}px)`;
72
+ });
73
+ return /* @__PURE__ */ jsx("span", { className: "relative inline-block h-[1em] w-[0.62em] overflow-hidden", children: /* @__PURE__ */ jsx(motion.span, { className: "absolute inset-x-0 top-0 flex flex-col", style: { y, filter }, children: [...DIGITS, 0].map((d, i) => /* @__PURE__ */ jsx("span", { className: "flex h-[1em] items-center justify-center", children: d }, i)) }) });
74
+ }
75
+ function Odometer({
76
+ amount,
77
+ format,
78
+ label
79
+ }) {
80
+ const parts = React.useMemo(() => format.formatToParts(1234.5), [format]);
81
+ const before = parts.slice(
82
+ 0,
83
+ parts.findIndex((p) => p.type === "integer")
84
+ ).map((p) => p.value).join("");
85
+ const lastNum = parts.map((p) => p.type).lastIndexOf("fraction");
86
+ const after = parts.slice(lastNum + 1).map((p) => p.value).join("");
87
+ const group = parts.find((p) => p.type === "group")?.value ?? ",";
88
+ const decimal = parts.find((p) => p.type === "decimal")?.value ?? ".";
89
+ const fractionDigits = parts.find((p) => p.type === "fraction")?.value.length ?? 2;
90
+ const rate = useVelocity(amount);
91
+ const wholeDigits = (a) => Math.max(1, String(Math.floor(Math.max(0, a) + 1e-6)).length);
92
+ const [count, setCount] = React.useState(() => wholeDigits(amount.get()));
93
+ useMotionValueEvent(amount, "change", (a) => {
94
+ const next = wholeDigits(a);
95
+ if (next !== count) setCount(next);
96
+ });
97
+ const cells = [];
98
+ for (let k = count - 1; k >= 0; k--) {
99
+ cells.push(
100
+ /* @__PURE__ */ jsx(
101
+ motion.span,
102
+ {
103
+ className: "inline-flex",
104
+ initial: { opacity: 0 },
105
+ animate: { opacity: 1 },
106
+ transition: { duration: 0.2 },
107
+ children: /* @__PURE__ */ jsx(Wheel, { amount, rate, place: 10 ** k, unit: 10 ** -fractionDigits })
108
+ },
109
+ `w${k}`
110
+ )
111
+ );
112
+ if (k > 0 && k % 3 === 0) cells.push(/* @__PURE__ */ jsx("span", { children: group }, `g${k}`));
113
+ }
114
+ cells.push(/* @__PURE__ */ jsx("span", { children: decimal }, "dec"));
115
+ for (let f = 1; f <= fractionDigits; f++) {
116
+ cells.push(/* @__PURE__ */ jsx(Wheel, { amount, rate, place: 10 ** -f, unit: 10 ** -fractionDigits }, `f${f}`));
117
+ }
118
+ return /* @__PURE__ */ jsx("span", { "aria-label": label, className: "inline-flex leading-none tabular-nums", children: /* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "inline-flex", children: [
119
+ before,
120
+ cells,
121
+ after
122
+ ] }) });
123
+ }
124
+ var POP = {
125
+ initial: { opacity: 0, y: 6, scale: 0.96 },
126
+ animate: { opacity: 1, y: 0, scale: 1 },
127
+ exit: { opacity: 0, y: 4, scale: 0.98 },
128
+ transition: { duration: 0.25, ease: GLIDE }
129
+ };
130
+ function pointAt(p) {
131
+ const angle = Math.PI * (1 - p);
132
+ return { x: CX + R * Math.cos(angle), y: CY - R * Math.sin(angle) };
133
+ }
134
+ function arcBetween(from, to) {
135
+ const a = pointAt(from);
136
+ const b = pointAt(to);
137
+ return `M ${a.x} ${a.y} A ${R} ${R} 0 0 1 ${b.x} ${b.y}`;
138
+ }
139
+ var GAP = (STROKE + 3) / (Math.PI * R);
140
+ var PALETTE = ["#2a9fbf", "#3d66d6", "#d6498f", "#9150e0", "#269a5a"];
141
+ var DEFAULT_SEGMENTS = [
142
+ { label: "Salary", value: 520 },
143
+ { label: "Freelance", value: 280 },
144
+ { label: "Side shop", value: 140 },
145
+ { label: "Gifts", value: 70 },
146
+ { label: "Interest", value: 42.98 }
147
+ ];
148
+ function normalize(segments) {
149
+ const head = segments.slice(0, PALETTE.length - 1);
150
+ const tail = segments.slice(PALETTE.length - 1);
151
+ const folded = tail.length > 1 ? [{ label: "Other", value: tail.reduce((sum, t) => sum + t.value, 0) }] : tail;
152
+ return [...head, ...folded].map((seg, i) => ({ ...seg, color: seg.color ?? PALETTE[i] }));
153
+ }
154
+ function Segment({
155
+ progress,
156
+ from,
157
+ to,
158
+ color,
159
+ dim
160
+ }) {
161
+ const span = Math.max(1e-6, to - from);
162
+ const length = useTransform(progress, (p) => Math.min(1, Math.max(0, (p - from) / span)));
163
+ const opacity = useTransform(length, (l) => l > 1e-3 ? 1 : 0);
164
+ return /* @__PURE__ */ jsx(motion.g, { animate: { opacity: dim ? 0.28 : 1 }, transition: { duration: 0.25, ease: GLIDE }, children: /* @__PURE__ */ jsx(
165
+ motion.path,
166
+ {
167
+ d: arcBetween(from, to),
168
+ fill: "none",
169
+ stroke: color,
170
+ strokeWidth: STROKE,
171
+ strokeLinecap: "round",
172
+ style: { pathLength: length, opacity }
173
+ }
174
+ ) });
175
+ }
176
+ var GoalGauge = React.forwardRef(function GoalGauge2({
177
+ segments,
178
+ value,
179
+ color = "#269a5a",
180
+ goal = 1200,
181
+ title = "Saving goal",
182
+ subtitle = "1 to 12 Apr, 2026",
183
+ currency = "USD",
184
+ locale = "en-US",
185
+ duration = 1.4,
186
+ actionLabel = "View report",
187
+ onAction,
188
+ className
189
+ }, forwardedRef) {
190
+ const root = React.useRef(null);
191
+ React.useImperativeHandle(forwardedRef, () => root.current);
192
+ const inView = useInView(root, { once: true, amount: 0.4 });
193
+ const reduceMotion = useReducedMotion();
194
+ const [active, setActive] = React.useState(null);
195
+ const money = React.useMemo(
196
+ () => new Intl.NumberFormat(locale, { style: "currency", currency, minimumFractionDigits: 2 }),
197
+ [locale, currency]
198
+ );
199
+ const whole = React.useMemo(
200
+ () => new Intl.NumberFormat(locale, { style: "currency", currency, maximumFractionDigits: 0 }),
201
+ [locale, currency]
202
+ );
203
+ const segs = React.useMemo(
204
+ () => segments ? normalize(segments) : value !== void 0 ? [{ label: typeof title === "string" ? title : "Saved", value, color }] : normalize(DEFAULT_SEGMENTS),
205
+ [segments, value, color, title]
206
+ );
207
+ const total = segs.reduce((sum, seg) => sum + seg.value, 0);
208
+ const remaining = Math.max(0, goal - total);
209
+ const done = total >= goal;
210
+ const ranges = React.useMemo(() => {
211
+ let cursor = 0;
212
+ return segs.map((seg, i) => {
213
+ const start = Math.min(1, cursor / goal);
214
+ cursor += seg.value;
215
+ const end = Math.min(1, cursor / goal);
216
+ return {
217
+ from: start + (i > 0 ? GAP / 2 : 0),
218
+ to: Math.max(start + (i > 0 ? GAP / 2 : 0), end - (i < segs.length - 1 || end < 1 ? GAP / 2 : 0)),
219
+ hitFrom: start,
220
+ hitTo: end
221
+ };
222
+ });
223
+ }, [segs, goal]);
224
+ const amount = useMotionValue(0);
225
+ const shown = useMotionValue(0);
226
+ const progress = useTransform(amount, (a) => Math.min(1, Math.max(0, a / goal)));
227
+ const trackLength = useTransform(progress, (p) => Math.max(0, 1 - Math.min(1, p + GAP / 2)));
228
+ useMotionValueEvent(amount, "change", (a) => {
229
+ if (active === null) shown.set(a);
230
+ });
231
+ React.useEffect(() => {
232
+ if (!inView) return;
233
+ if (reduceMotion) {
234
+ amount.set(total);
235
+ shown.set(total);
236
+ return;
237
+ }
238
+ const controls = animate(amount, total, { duration, ease: GLIDE });
239
+ return () => controls.stop();
240
+ }, [inView, total, duration, reduceMotion, amount, shown]);
241
+ React.useEffect(() => {
242
+ const target = active === null ? amount.get() : active === "rest" ? remaining : segs[active].value;
243
+ if (reduceMotion) {
244
+ shown.set(target);
245
+ return;
246
+ }
247
+ const controls = animate(shown, target, { duration: 0.6, ease: GLIDE });
248
+ return () => controls.stop();
249
+ }, [active, remaining, segs, amount, shown, reduceMotion]);
250
+ const step = (dir) => setActive((cur) => {
251
+ const order = [...segs.map((_, i) => i), ...remaining > 0 ? ["rest"] : []];
252
+ const at = cur === null ? dir === 1 ? -1 : order.length : order.indexOf(cur);
253
+ return order[(at + dir + order.length) % order.length];
254
+ });
255
+ const caption = active === "rest" ? { dot: void 0, text: `To go \xB7 ${Math.round(remaining / goal * 100)}% of goal` } : active !== null ? {
256
+ dot: segs[active].color,
257
+ text: `${segs[active].label} \xB7 ${Math.round(segs[active].value / total * 100)}%`
258
+ } : null;
259
+ return /* @__PURE__ */ jsxs(
260
+ "div",
261
+ {
262
+ ref: root,
263
+ className: cn(
264
+ "w-[340px] max-w-full rounded-3xl bg-white px-6 pb-5 pt-6 text-zinc-900 shadow-[0_1px_2px_rgba(0,0,0,0.04),0_12px_32px_-16px_rgba(0,0,0,0.18)] dark:bg-zinc-900 dark:text-zinc-100",
265
+ className
266
+ ),
267
+ children: [
268
+ /* @__PURE__ */ jsxs("header", { className: "flex items-start justify-between gap-4", children: [
269
+ /* @__PURE__ */ jsxs("div", { children: [
270
+ /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold tracking-tight", children: title }),
271
+ /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-sm text-zinc-500 dark:text-zinc-400", children: subtitle })
272
+ ] }),
273
+ actionLabel !== null && /* @__PURE__ */ jsxs(
274
+ motion.button,
275
+ {
276
+ type: "button",
277
+ onClick: onAction,
278
+ initial: "rest",
279
+ whileHover: "hover",
280
+ whileTap: "press",
281
+ variants: { rest: { scale: 1 }, hover: { scale: 1 }, press: { scale: 0.96 } },
282
+ transition: { duration: 0.15, ease: GLIDE },
283
+ className: "inline-flex shrink-0 cursor-pointer items-center gap-1 rounded-full bg-[#242423]/6 px-3.5 py-1.5 text-sm font-medium text-[#242423] transition-colors hover:bg-[#242423]/10 outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 dark:bg-white/8 dark:text-zinc-100 dark:hover:bg-white/12",
284
+ children: [
285
+ actionLabel,
286
+ /* @__PURE__ */ jsx(
287
+ motion.span,
288
+ {
289
+ variants: { rest: { x: 0, y: 0, opacity: 1 }, hover: { x: 2, y: -2, opacity: 1 } },
290
+ transition: { duration: 0.25, ease: GLIDE },
291
+ className: "flex",
292
+ children: /* @__PURE__ */ jsx(ArrowUpRightIcon, { className: "size-3.5", strokeWidth: 2.5 })
293
+ }
294
+ )
295
+ ]
296
+ }
297
+ )
298
+ ] }),
299
+ /* @__PURE__ */ jsxs(
300
+ "div",
301
+ {
302
+ role: "meter",
303
+ tabIndex: 0,
304
+ "aria-label": typeof title === "string" ? title : "Goal progress",
305
+ "aria-valuemin": 0,
306
+ "aria-valuemax": goal,
307
+ "aria-valuenow": total,
308
+ "aria-valuetext": `${money.format(total)} of ${whole.format(goal)}: ${segs.map((seg) => `${seg.label} ${money.format(seg.value)}`).join(", ")}`,
309
+ onKeyDown: (e) => {
310
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") e.preventDefault(), step(1);
311
+ if (e.key === "ArrowLeft" || e.key === "ArrowUp") e.preventDefault(), step(-1);
312
+ if (e.key === "Escape") setActive(null);
313
+ },
314
+ onBlur: () => setActive(null),
315
+ onPointerLeave: () => setActive(null),
316
+ className: "relative mt-[52px] rounded-2xl outline-none focus-visible:ring-2 focus-visible:ring-zinc-400",
317
+ children: [
318
+ /* @__PURE__ */ jsxs("svg", { viewBox: `0 0 ${W} ${H}`, className: "block w-full overflow-visible", "aria-hidden": true, children: [
319
+ /* @__PURE__ */ jsx(
320
+ motion.path,
321
+ {
322
+ d: arcBetween(1, 1),
323
+ fill: "none",
324
+ className: "stroke-zinc-100 dark:stroke-zinc-800/60",
325
+ strokeWidth: STROKE,
326
+ strokeLinecap: "round"
327
+ }
328
+ ),
329
+ /* @__PURE__ */ jsx(
330
+ motion.path,
331
+ {
332
+ d: `M ${pointAt(1).x} ${pointAt(1).y} A ${R} ${R} 0 0 0 ${pointAt(0).x} ${pointAt(0).y}`,
333
+ fill: "none",
334
+ strokeWidth: STROKE,
335
+ strokeLinecap: "round",
336
+ className: "stroke-zinc-100 dark:stroke-zinc-800/60",
337
+ animate: { opacity: active === null || active === "rest" ? 1 : 0.5 },
338
+ style: { pathLength: trackLength }
339
+ }
340
+ ),
341
+ segs.map((seg, i) => /* @__PURE__ */ jsx(
342
+ Segment,
343
+ {
344
+ progress,
345
+ from: ranges[i].from,
346
+ to: ranges[i].to,
347
+ color: seg.color,
348
+ dim: active !== null && active !== i
349
+ },
350
+ seg.label
351
+ )),
352
+ segs.map((seg, i) => /* @__PURE__ */ jsx(
353
+ "path",
354
+ {
355
+ d: arcBetween(ranges[i].hitFrom, ranges[i].hitTo),
356
+ fill: "none",
357
+ stroke: "transparent",
358
+ strokeWidth: STROKE + 26,
359
+ pointerEvents: "stroke",
360
+ onPointerEnter: () => setActive(i)
361
+ },
362
+ `hit-${seg.label}`
363
+ )),
364
+ remaining > 0 && /* @__PURE__ */ jsx(
365
+ "path",
366
+ {
367
+ d: arcBetween(Math.min(1, total / goal), 1),
368
+ fill: "none",
369
+ stroke: "transparent",
370
+ strokeWidth: STROKE + 26,
371
+ pointerEvents: "stroke",
372
+ onPointerEnter: () => setActive("rest")
373
+ }
374
+ )
375
+ ] }),
376
+ /* @__PURE__ */ jsxs("div", { className: "pointer-events-none absolute inset-x-0 bottom-3 flex flex-col items-center", children: [
377
+ /* @__PURE__ */ jsx("p", { className: "text-[24px] font-medium tracking-tight", children: /* @__PURE__ */ jsx(Odometer, { amount: shown, format: money, label: money.format(total) }) }),
378
+ /* @__PURE__ */ jsx("div", { className: "mt-1.5 grid h-5 text-sm text-zinc-500 dark:text-zinc-400", children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, mode: "popLayout", children: caption ? /* @__PURE__ */ jsxs(
379
+ motion.span,
380
+ {
381
+ ...POP,
382
+ className: "col-start-1 row-start-1 inline-flex items-center justify-center gap-1.5",
383
+ children: [
384
+ caption.dot && /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full", style: { background: caption.dot } }),
385
+ caption.text
386
+ ]
387
+ },
388
+ caption.text
389
+ ) : done ? /* @__PURE__ */ jsx(
390
+ motion.span,
391
+ {
392
+ ...POP,
393
+ className: "col-start-1 row-start-1 font-medium text-zinc-900 dark:text-zinc-100",
394
+ children: "Goal reached"
395
+ },
396
+ "done"
397
+ ) : /* @__PURE__ */ jsxs(motion.span, { ...POP, className: "col-start-1 row-start-1", children: [
398
+ "of ",
399
+ /* @__PURE__ */ jsx(Rolling, { text: whole.format(goal), still: !!reduceMotion })
400
+ ] }, "of") }) })
401
+ ] })
402
+ ]
403
+ }
404
+ )
405
+ ]
406
+ }
407
+ );
408
+ });
409
+
410
+ export {
411
+ GoalGauge
412
+ };