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.
- package/LICENSE +21 -0
- package/README.md +106 -2
- package/dist/account-menu.d.ts +1 -0
- package/dist/account-menu.js +16 -0
- package/dist/action-menu.d.ts +1 -0
- package/dist/action-menu.js +10 -0
- package/dist/activity-grid.d.ts +1 -0
- package/dist/activity-grid.js +14 -0
- package/dist/add-card.d.ts +1 -0
- package/dist/add-card.js +11 -0
- package/dist/amount-slider.d.ts +1 -0
- package/dist/amount-slider.js +10 -0
- package/dist/annotation-text.d.ts +1 -0
- package/dist/annotation-text.js +8 -0
- package/dist/aura-card.d.ts +1 -0
- package/dist/aura-card.js +19 -0
- package/dist/auth-card.d.ts +1 -0
- package/dist/auth-card.js +15 -0
- package/dist/avatar-testimonial.d.ts +1 -0
- package/dist/avatar-testimonial.js +8 -0
- package/dist/backspace-text.d.ts +1 -0
- package/dist/backspace-text.js +8 -0
- package/dist/bell-toggle.d.ts +1 -0
- package/dist/bell-toggle.js +8 -0
- package/dist/bill-list.d.ts +1 -0
- package/dist/bill-list.js +15 -0
- package/dist/binary-text.d.ts +1 -0
- package/dist/binary-text.js +8 -0
- package/dist/blur-accordion.d.ts +1 -0
- package/dist/blur-accordion.js +8 -0
- package/dist/blur-text.d.ts +1 -0
- package/dist/blur-text.js +8 -0
- package/dist/booking-card.d.ts +1 -0
- package/dist/booking-card.js +11 -0
- package/dist/brand-bridge.d.ts +1 -0
- package/dist/brand-bridge.js +12 -0
- package/dist/calendar-agenda.d.ts +1 -0
- package/dist/calendar-agenda.js +12 -0
- package/dist/channel-mix.d.ts +1 -0
- package/dist/channel-mix.js +11 -0
- package/dist/chunk-25254AZA.js +141 -0
- package/dist/chunk-2CIJ5TVW.js +59 -0
- package/dist/chunk-2GXY54MP.js +247 -0
- package/dist/chunk-2IMPUH4H.js +135 -0
- package/dist/chunk-2NRXP4HM.js +371 -0
- package/dist/chunk-2QCWELWT.js +120 -0
- package/dist/chunk-2TQSHVXA.js +12 -0
- package/dist/chunk-327TGRS5.js +75 -0
- package/dist/chunk-3B2RYSTL.js +867 -0
- package/dist/chunk-3RKCLFY5.js +634 -0
- package/dist/chunk-4BVCRIR4.js +51 -0
- package/dist/chunk-4CKKTOJK.js +366 -0
- package/dist/chunk-4IGMH34C.js +319 -0
- package/dist/chunk-4PI6UNIZ.js +464 -0
- package/dist/chunk-4RHQKP2P.js +664 -0
- package/dist/chunk-5MP5QNFG.js +560 -0
- package/dist/chunk-62RBYLIN.js +128 -0
- package/dist/chunk-6GAKTS3D.js +329 -0
- package/dist/chunk-6GRDT3OE.js +124 -0
- package/dist/chunk-6JQY7AX5.js +307 -0
- package/dist/chunk-6LOUA6XB.js +237 -0
- package/dist/chunk-6V6OTHNE.js +299 -0
- package/dist/chunk-6VZIT62Q.js +142 -0
- package/dist/chunk-6WSY725U.js +387 -0
- package/dist/chunk-6XSJC7M7.js +764 -0
- package/dist/chunk-75DEIDBX.js +129 -0
- package/dist/chunk-7FQ4XU7E.js +127 -0
- package/dist/chunk-7IL5WRJR.js +615 -0
- package/dist/chunk-7MPC3RUE.js +1462 -0
- package/dist/chunk-7PS2W7PU.js +112 -0
- package/dist/chunk-AATJOPNH.js +86 -0
- package/dist/chunk-ADXWPWJR.js +209 -0
- package/dist/chunk-ANNDITUM.js +47 -0
- package/dist/chunk-AQN6BHWC.js +325 -0
- package/dist/chunk-AVOS73MR.js +537 -0
- package/dist/chunk-B4LNE6YK.js +473 -0
- package/dist/chunk-BHUNLG6S.js +142 -0
- package/dist/chunk-BN4MA5UY.js +127 -0
- package/dist/chunk-BPE43MTT.js +183 -0
- package/dist/chunk-BPF3FQRS.js +590 -0
- package/dist/chunk-BRTZFUFR.js +503 -0
- package/dist/chunk-BS4ZFJKW.js +121 -0
- package/dist/chunk-BXAKCY6X.js +86 -0
- package/dist/chunk-CEQ56RF6.js +129 -0
- package/dist/chunk-CGDKH6BB.js +902 -0
- package/dist/chunk-CMTGYFT7.js +395 -0
- package/dist/chunk-COKBF5PG.js +3291 -0
- package/dist/chunk-DD55JZOI.js +257 -0
- package/dist/chunk-DQUXBNSH.js +412 -0
- package/dist/chunk-DR4DUSNF.js +265 -0
- package/dist/chunk-EDPCK6VU.js +419 -0
- package/dist/chunk-EEQ2WHTN.js +142 -0
- package/dist/chunk-ERVE5RSN.js +793 -0
- package/dist/chunk-FFUBTMDC.js +303 -0
- package/dist/chunk-FK4TZ5OW.js +29 -0
- package/dist/chunk-FXI6NHNR.js +1033 -0
- package/dist/chunk-G3XH7YT2.js +122 -0
- package/dist/chunk-G7KDH7ME.js +559 -0
- package/dist/chunk-GRUDTDLX.js +534 -0
- package/dist/chunk-GUQINNWS.js +770 -0
- package/dist/chunk-GV3Q4D2N.js +320 -0
- package/dist/chunk-GVWOJJ3T.js +129 -0
- package/dist/chunk-GYDTIVOY.js +934 -0
- package/dist/chunk-H2JOCJWM.js +125 -0
- package/dist/chunk-H7XKIWHA.js +135 -0
- package/dist/chunk-HHXK3NAH.js +1382 -0
- package/dist/chunk-HK34LPY6.js +112 -0
- package/dist/chunk-HLJXNSMM.js +320 -0
- package/dist/chunk-HPJJAQ5L.js +406 -0
- package/dist/chunk-HYSXVKZB.js +213 -0
- package/dist/chunk-I45D4XV4.js +124 -0
- package/dist/chunk-I7KTTOOJ.js +113 -0
- package/dist/chunk-IDJOKV6S.js +67 -0
- package/dist/chunk-IGI6OLRX.js +138 -0
- package/dist/chunk-IKM7EEYN.js +117 -0
- package/dist/chunk-INV5FI6O.js +394 -0
- package/dist/chunk-IUBUAIQZ.js +321 -0
- package/dist/chunk-IYZOANPX.js +159 -0
- package/dist/chunk-JFTD3YAL.js +163 -0
- package/dist/chunk-JGEV462J.js +235 -0
- package/dist/chunk-JHT6RCGY.js +127 -0
- package/dist/chunk-JJEWOQYQ.js +141 -0
- package/dist/chunk-JT2EIO5M.js +129 -0
- package/dist/chunk-K3HQEHJ6.js +663 -0
- package/dist/chunk-K6ET254T.js +398 -0
- package/dist/chunk-KE563QS4.js +425 -0
- package/dist/chunk-LBRMNY72.js +159 -0
- package/dist/chunk-LNBTWX4J.js +114 -0
- package/dist/chunk-LS4FP6SI.js +37 -0
- package/dist/chunk-M22UY764.js +135 -0
- package/dist/chunk-M4YMNHPI.js +204 -0
- package/dist/chunk-MGBS5LRY.js +412 -0
- package/dist/chunk-MKJOBHPQ.js +215 -0
- package/dist/chunk-MQDOFNKI.js +818 -0
- package/dist/chunk-MUDKP3LK.js +120 -0
- package/dist/chunk-N4ZNBWKO.js +118 -0
- package/dist/chunk-NB5CB65C.js +137 -0
- package/dist/chunk-NCEAUODT.js +172 -0
- package/dist/chunk-NGX34WJO.js +335 -0
- package/dist/chunk-NIQFSLPC.js +114 -0
- package/dist/chunk-NJWTPRGJ.js +806 -0
- package/dist/chunk-NNKC6NEH.js +128 -0
- package/dist/chunk-NY7M42KC.js +112 -0
- package/dist/chunk-O7G4ISAC.js +277 -0
- package/dist/chunk-O7QYPA6X.js +700 -0
- package/dist/chunk-OEDHLZ4T.js +651 -0
- package/dist/chunk-OGQQ2FZZ.js +114 -0
- package/dist/chunk-OINRQUYT.js +186 -0
- package/dist/chunk-OMJBDFEW.js +506 -0
- package/dist/chunk-ONUWTWKP.js +345 -0
- package/dist/chunk-OS6REIBR.js +154 -0
- package/dist/chunk-OUVP5VKH.js +702 -0
- package/dist/chunk-OVEBMZHA.js +573 -0
- package/dist/chunk-PFEHD3A2.js +409 -0
- package/dist/chunk-PJ5EVDNN.js +157 -0
- package/dist/chunk-PKM6B4JJ.js +108 -0
- package/dist/chunk-PV3OYTMT.js +596 -0
- package/dist/chunk-RBSLSNMW.js +444 -0
- package/dist/chunk-RE74K7KI.js +370 -0
- package/dist/chunk-RP22J4NX.js +247 -0
- package/dist/chunk-RU2Q2XVP.js +287 -0
- package/dist/chunk-RWUARRFZ.js +267 -0
- package/dist/chunk-RZ2UCZ3C.js +212 -0
- package/dist/chunk-SBDTC4UY.js +367 -0
- package/dist/chunk-SKEE23KW.js +137 -0
- package/dist/chunk-SOW7S7ET.js +1103 -0
- package/dist/chunk-SQ7F3VBU.js +1069 -0
- package/dist/chunk-SSWKGVRI.js +172 -0
- package/dist/chunk-T2TSMDP3.js +1022 -0
- package/dist/chunk-TAFVHTWV.js +607 -0
- package/dist/chunk-TNLY4CSA.js +523 -0
- package/dist/chunk-TP3XIHL5.js +787 -0
- package/dist/chunk-TQ6KSDDE.js +682 -0
- package/dist/chunk-TRWXLGL7.js +885 -0
- package/dist/chunk-TTNORJF5.js +908 -0
- package/dist/chunk-UD5OQ2T3.js +117 -0
- package/dist/chunk-UDFBQWUH.js +333 -0
- package/dist/chunk-USRMXCZD.js +625 -0
- package/dist/chunk-VAPHE4G4.js +442 -0
- package/dist/chunk-VEC5QAOY.js +104 -0
- package/dist/chunk-VIR5NV5W.js +118 -0
- package/dist/chunk-VT2FNWQF.js +240 -0
- package/dist/chunk-VX4XEYQN.js +837 -0
- package/dist/chunk-WE7VCUOA.js +130 -0
- package/dist/chunk-WFWO2EIW.js +120 -0
- package/dist/chunk-WGIT4MMH.js +350 -0
- package/dist/chunk-WOR2GMMN.js +114 -0
- package/dist/chunk-WTTDB475.js +54 -0
- package/dist/chunk-WWWKMU4Y.js +184 -0
- package/dist/chunk-XDR4FO6Q.js +124 -0
- package/dist/chunk-XH6YNONO.js +112 -0
- package/dist/chunk-XL4L2J6N.js +129 -0
- package/dist/chunk-Y6MTC46Q.js +684 -0
- package/dist/chunk-YFLQ4HPJ.js +119 -0
- package/dist/chunk-YGONLKWH.js +180 -0
- package/dist/chunk-YLSWBUDC.js +373 -0
- package/dist/chunk-YU6B7YRO.js +128 -0
- package/dist/chunk-YURGXJSP.js +102 -0
- package/dist/chunk-YVYYDPE2.js +124 -0
- package/dist/chunk-ZPGAMYOQ.js +1 -0
- package/dist/chunk-ZWGOAY27.js +234 -0
- package/dist/column-card.d.ts +1 -0
- package/dist/column-card.js +8 -0
- package/dist/components/account-menu/account-menu.d.ts +56 -0
- package/dist/components/account-menu/index.d.ts +1 -0
- package/dist/components/action-menu/action-menu.d.ts +45 -0
- package/dist/components/action-menu/index.d.ts +1 -0
- package/dist/components/activity-grid/activity-grid.d.ts +54 -0
- package/dist/components/activity-grid/index.d.ts +1 -0
- package/dist/components/add-card/add-card.d.ts +41 -0
- package/dist/components/add-card/index.d.ts +1 -0
- package/dist/components/amount-slider/amount-slider.d.ts +43 -0
- package/dist/components/amount-slider/index.d.ts +1 -0
- package/dist/components/annotation-text/annotation-text.d.ts +27 -0
- package/dist/components/annotation-text/index.d.ts +1 -0
- package/dist/components/aura-card/aura-card.d.ts +63 -0
- package/dist/components/aura-card/index.d.ts +1 -0
- package/dist/components/auth-card/auth-card.d.ts +51 -0
- package/dist/components/auth-card/index.d.ts +1 -0
- package/dist/components/avatar-testimonial/avatar-testimonial.d.ts +39 -0
- package/dist/components/avatar-testimonial/index.d.ts +1 -0
- package/dist/components/backspace-text/backspace-text.d.ts +27 -0
- package/dist/components/backspace-text/index.d.ts +1 -0
- package/dist/components/bell-toggle/bell-toggle.d.ts +33 -0
- package/dist/components/bell-toggle/index.d.ts +1 -0
- package/dist/components/bill-list/bill-list.d.ts +49 -0
- package/dist/components/bill-list/index.d.ts +1 -0
- package/dist/components/binary-text/binary-text.d.ts +24 -0
- package/dist/components/binary-text/index.d.ts +1 -0
- package/dist/components/blur-accordion/blur-accordion.d.ts +35 -0
- package/dist/components/blur-accordion/index.d.ts +1 -0
- package/dist/components/blur-text/blur-text.d.ts +33 -0
- package/dist/components/blur-text/index.d.ts +1 -0
- package/dist/components/booking-card/booking-card.d.ts +56 -0
- package/dist/components/booking-card/index.d.ts +1 -0
- package/dist/components/brand-bridge/brand-bridge.d.ts +63 -0
- package/dist/components/brand-bridge/index.d.ts +1 -0
- package/dist/components/calendar-agenda/calendar-agenda.d.ts +64 -0
- package/dist/components/calendar-agenda/index.d.ts +1 -0
- package/dist/components/channel-mix/channel-mix.d.ts +63 -0
- package/dist/components/channel-mix/index.d.ts +1 -0
- package/dist/components/column-card/column-card.d.ts +39 -0
- package/dist/components/column-card/index.d.ts +1 -0
- package/dist/components/contact-card/contact-card.d.ts +44 -0
- package/dist/components/contact-card/index.d.ts +1 -0
- package/dist/components/context-menu/context-menu.d.ts +59 -0
- package/dist/components/context-menu/index.d.ts +1 -0
- package/dist/components/contour-feature-card/contour-feature-card.d.ts +36 -0
- package/dist/components/contour-feature-card/index.d.ts +1 -0
- package/dist/components/contour-lines/contour-lines.d.ts +34 -0
- package/dist/components/contour-lines/index.d.ts +1 -0
- package/dist/components/decay-card/decay-card.d.ts +44 -0
- package/dist/components/decay-card/index.d.ts +1 -0
- package/dist/components/deploy-streak/deploy-streak.d.ts +30 -0
- package/dist/components/deploy-streak/index.d.ts +1 -0
- package/dist/components/depth-carousel/depth-carousel.d.ts +42 -0
- package/dist/components/depth-carousel/index.d.ts +1 -0
- package/dist/components/device-traffic/device-traffic.d.ts +59 -0
- package/dist/components/device-traffic/index.d.ts +1 -0
- package/dist/components/download-button/download-button.d.ts +36 -0
- package/dist/components/download-button/index.d.ts +1 -0
- package/dist/components/event-card/event-card.d.ts +55 -0
- package/dist/components/event-card/index.d.ts +1 -0
- package/dist/components/file-drop/file-drop.d.ts +46 -0
- package/dist/components/file-drop/index.d.ts +1 -0
- package/dist/components/flip-words/flip-words.d.ts +26 -0
- package/dist/components/flip-words/index.d.ts +1 -0
- package/dist/components/flux-card/flux-card.d.ts +56 -0
- package/dist/components/flux-card/index.d.ts +1 -0
- package/dist/components/fuse-button/fuse-button.d.ts +75 -0
- package/dist/components/fuse-button/index.d.ts +1 -0
- package/dist/components/globe-card/globe-card.d.ts +46 -0
- package/dist/components/globe-card/index.d.ts +1 -0
- package/dist/components/goal-gauge/goal-gauge.d.ts +47 -0
- package/dist/components/goal-gauge/index.d.ts +1 -0
- package/dist/components/gradient-card/gradient-card.d.ts +56 -0
- package/dist/components/gradient-card/index.d.ts +1 -0
- package/dist/components/gradient-text/gradient-text.d.ts +22 -0
- package/dist/components/gradient-text/index.d.ts +1 -0
- package/dist/components/gravity-tag-pile/gravity-tag-pile.d.ts +69 -0
- package/dist/components/gravity-tag-pile/index.d.ts +1 -0
- package/dist/components/growth-stream/growth-stream.d.ts +47 -0
- package/dist/components/growth-stream/index.d.ts +1 -0
- package/dist/components/highlight-text/highlight-text.d.ts +22 -0
- package/dist/components/highlight-text/index.d.ts +1 -0
- package/dist/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
- package/dist/components/hold-to-confirm/index.d.ts +1 -0
- package/dist/components/infinite-gallery/index.d.ts +1 -0
- package/dist/components/infinite-gallery/infinite-gallery.d.ts +73 -0
- package/dist/components/integration-hub/index.d.ts +1 -0
- package/dist/components/integration-hub/integration-hub.d.ts +40 -0
- package/dist/components/liquid-card/index.d.ts +1 -0
- package/dist/components/liquid-card/liquid-card.d.ts +66 -0
- package/dist/components/liquid-metal-card/index.d.ts +1 -0
- package/dist/components/liquid-metal-card/liquid-metal-card.d.ts +45 -0
- package/dist/components/liquid-tabs/index.d.ts +1 -0
- package/dist/components/liquid-tabs/liquid-tabs.d.ts +47 -0
- package/dist/components/magnetic-button/index.d.ts +1 -0
- package/dist/components/magnetic-button/magnetic-button.d.ts +46 -0
- package/dist/components/magnetic-flow/index.d.ts +1 -0
- package/dist/components/magnetic-flow/magnetic-flow.d.ts +35 -0
- package/dist/components/message-composer/index.d.ts +1 -0
- package/dist/components/message-composer/message-composer.d.ts +79 -0
- package/dist/components/metal-card-stack/index.d.ts +1 -0
- package/dist/components/metal-card-stack/metal-card-stack.d.ts +49 -0
- package/dist/components/metric-split/index.d.ts +1 -0
- package/dist/components/metric-split/metric-split.d.ts +45 -0
- package/dist/components/mix-chart/index.d.ts +1 -0
- package/dist/components/mix-chart/mix-chart.d.ts +59 -0
- package/dist/components/month-calendar/index.d.ts +1 -0
- package/dist/components/month-calendar/month-calendar.d.ts +34 -0
- package/dist/components/morph-search/index.d.ts +1 -0
- package/dist/components/morph-search/morph-search.d.ts +33 -0
- package/dist/components/orbit-card/index.d.ts +1 -0
- package/dist/components/orbit-card/orbit-card.d.ts +50 -0
- package/dist/components/otp-code/index.d.ts +1 -0
- package/dist/components/otp-code/otp-code.d.ts +61 -0
- package/dist/components/particle-card/index.d.ts +1 -0
- package/dist/components/particle-card/particle-card.d.ts +57 -0
- package/dist/components/payment-form/index.d.ts +1 -0
- package/dist/components/payment-form/payment-form.d.ts +54 -0
- package/dist/components/pill-tabs/index.d.ts +1 -0
- package/dist/components/pill-tabs/pill-tabs.d.ts +39 -0
- package/dist/components/pixel-blast/index.d.ts +1 -0
- package/dist/components/pixel-blast/pixel-blast.d.ts +41 -0
- package/dist/components/pixel-feature-card/index.d.ts +1 -0
- package/dist/components/pixel-feature-card/pixel-feature-card.d.ts +43 -0
- package/dist/components/pixel-scroll/index.d.ts +1 -0
- package/dist/components/pixel-scroll/pixel-scroll.d.ts +64 -0
- package/dist/components/pricing-card/index.d.ts +1 -0
- package/dist/components/pricing-card/pricing-card.d.ts +60 -0
- package/dist/components/prism-carousel/index.d.ts +1 -0
- package/dist/components/prism-carousel/prism-carousel.d.ts +54 -0
- package/dist/components/prism-flow/index.d.ts +1 -0
- package/dist/components/prism-flow/prism-flow.d.ts +41 -0
- package/dist/components/privacy-banner/index.d.ts +1 -0
- package/dist/components/privacy-banner/privacy-banner.d.ts +41 -0
- package/dist/components/profile-card/index.d.ts +1 -0
- package/dist/components/profile-card/profile-card.d.ts +52 -0
- package/dist/components/profile-menu/index.d.ts +1 -0
- package/dist/components/profile-menu/profile-menu.d.ts +43 -0
- package/dist/components/project-index/index.d.ts +1 -0
- package/dist/components/project-index/project-index.d.ts +65 -0
- package/dist/components/prompt-input/index.d.ts +1 -0
- package/dist/components/prompt-input/prompt-input.d.ts +49 -0
- package/dist/components/quota-gauge/index.d.ts +1 -0
- package/dist/components/quota-gauge/quota-gauge.d.ts +30 -0
- package/dist/components/range-chart/index.d.ts +1 -0
- package/dist/components/range-chart/range-chart.d.ts +47 -0
- package/dist/components/reaction-card/index.d.ts +1 -0
- package/dist/components/reaction-card/reaction-card.d.ts +60 -0
- package/dist/components/recap-card/index.d.ts +1 -0
- package/dist/components/recap-card/recap-card.d.ts +61 -0
- package/dist/components/receipt-button/index.d.ts +1 -0
- package/dist/components/receipt-button/receipt-button.d.ts +53 -0
- package/dist/components/ribbon-gallery/index.d.ts +1 -0
- package/dist/components/ribbon-gallery/ribbon-gallery.d.ts +61 -0
- package/dist/components/roadmap-card/index.d.ts +1 -0
- package/dist/components/roadmap-card/roadmap-card.d.ts +38 -0
- package/dist/components/rolling-card-stack/index.d.ts +1 -0
- package/dist/components/rolling-card-stack/rolling-card-stack.d.ts +53 -0
- package/dist/components/rolling-stepper/index.d.ts +1 -0
- package/dist/components/rolling-stepper/rolling-stepper.d.ts +33 -0
- package/dist/components/rotating-text/index.d.ts +1 -0
- package/dist/components/rotating-text/rotating-text.d.ts +25 -0
- package/dist/components/score-card/index.d.ts +1 -0
- package/dist/components/score-card/score-card.d.ts +40 -0
- package/dist/components/search-modal/index.d.ts +1 -0
- package/dist/components/search-modal/search-modal.d.ts +62 -0
- package/dist/components/shimmer-text/index.d.ts +1 -0
- package/dist/components/shimmer-text/shimmer-text.d.ts +22 -0
- package/dist/components/sidebar-nav/index.d.ts +1 -0
- package/dist/components/sidebar-nav/sidebar-nav.d.ts +71 -0
- package/dist/components/slide-commit/index.d.ts +1 -0
- package/dist/components/slide-commit/slide-commit.d.ts +39 -0
- package/dist/components/spatial-gallery/index.d.ts +1 -0
- package/dist/components/spatial-gallery/spatial-gallery.d.ts +88 -0
- package/dist/components/spending-meter/index.d.ts +1 -0
- package/dist/components/spending-meter/spending-meter.d.ts +41 -0
- package/dist/components/tab-bar/index.d.ts +1 -0
- package/dist/components/tab-bar/tab-bar.d.ts +44 -0
- package/dist/components/team-member-card/index.d.ts +1 -0
- package/dist/components/team-member-card/team-member-card.d.ts +66 -0
- package/dist/components/team-morph/index.d.ts +1 -0
- package/dist/components/team-morph/team-morph.d.ts +38 -0
- package/dist/components/tilt-card/index.d.ts +1 -0
- package/dist/components/tilt-card/tilt-card.d.ts +27 -0
- package/dist/components/tilt-carousel/index.d.ts +1 -0
- package/dist/components/tilt-carousel/tilt-carousel.d.ts +43 -0
- package/dist/components/toast-stack/index.d.ts +1 -0
- package/dist/components/toast-stack/toast-stack.d.ts +57 -0
- package/dist/components/usage-ring/index.d.ts +1 -0
- package/dist/components/usage-ring/usage-ring.d.ts +40 -0
- package/dist/components/verify-flow/index.d.ts +1 -0
- package/dist/components/verify-flow/verify-flow.d.ts +49 -0
- package/dist/components/voice-prompt/index.d.ts +1 -0
- package/dist/components/voice-prompt/voice-prompt.d.ts +55 -0
- package/dist/components/wallet-card/index.d.ts +1 -0
- package/dist/components/wallet-card/wallet-card.d.ts +54 -0
- package/dist/components/wave-text/index.d.ts +1 -0
- package/dist/components/wave-text/wave-text.d.ts +27 -0
- package/dist/contact-card.d.ts +1 -0
- package/dist/contact-card.js +12 -0
- package/dist/context-menu.d.ts +1 -0
- package/dist/context-menu.js +17 -0
- package/dist/contour-feature-card.d.ts +1 -0
- package/dist/contour-feature-card.js +9 -0
- package/dist/contour-lines.d.ts +1 -0
- package/dist/contour-lines.js +8 -0
- package/dist/decay-card.d.ts +1 -0
- package/dist/decay-card.js +8 -0
- package/dist/deploy-streak.d.ts +1 -0
- package/dist/deploy-streak.js +9 -0
- package/dist/depth-carousel.d.ts +1 -0
- package/dist/depth-carousel.js +8 -0
- package/dist/device-traffic.d.ts +1 -0
- package/dist/device-traffic.js +12 -0
- package/dist/download-button.d.ts +1 -0
- package/dist/download-button.js +8 -0
- package/dist/event-card.d.ts +1 -0
- package/dist/event-card.js +12 -0
- package/dist/file-drop.d.ts +1 -0
- package/dist/file-drop.js +12 -0
- package/dist/flip-words.d.ts +1 -0
- package/dist/flip-words.js +8 -0
- package/dist/flux-card.d.ts +1 -0
- package/dist/flux-card.js +13 -0
- package/dist/fuse-button.d.ts +1 -0
- package/dist/fuse-button.js +9 -0
- package/dist/globe-card.d.ts +1 -0
- package/dist/globe-card.js +8 -0
- package/dist/goal-gauge.d.ts +1 -0
- package/dist/goal-gauge.js +9 -0
- package/dist/gradient-card.d.ts +1 -0
- package/dist/gradient-card.js +8 -0
- package/dist/gradient-text.d.ts +1 -0
- package/dist/gradient-text.js +8 -0
- package/dist/gravity-tag-pile.d.ts +1 -0
- package/dist/gravity-tag-pile.js +9 -0
- package/dist/growth-stream.d.ts +1 -0
- package/dist/growth-stream.js +10 -0
- package/dist/highlight-text.d.ts +1 -0
- package/dist/highlight-text.js +8 -0
- package/dist/hold-to-confirm.d.ts +1 -0
- package/dist/hold-to-confirm.js +8 -0
- package/dist/icons/activity.d.ts +15 -0
- package/dist/icons/archive.d.ts +15 -0
- package/dist/icons/arrow-down-right.d.ts +15 -0
- package/dist/icons/arrow-down.d.ts +15 -0
- package/dist/icons/arrow-right.d.ts +15 -0
- package/dist/icons/arrow-up-right.d.ts +15 -0
- package/dist/icons/arrow-up.d.ts +15 -0
- package/dist/icons/at-sign.d.ts +15 -0
- package/dist/icons/attach-file.d.ts +15 -0
- package/dist/icons/badge-alert.d.ts +15 -0
- package/dist/icons/bell.d.ts +15 -0
- package/dist/icons/bold.d.ts +15 -0
- package/dist/icons/bookmark.d.ts +15 -0
- package/dist/icons/bot.d.ts +15 -0
- package/dist/icons/calendar-check-2.d.ts +15 -0
- package/dist/icons/calendar-check.d.ts +15 -0
- package/dist/icons/calendar-days.d.ts +15 -0
- package/dist/icons/chart-line.d.ts +15 -0
- package/dist/icons/chart-pie.d.ts +15 -0
- package/dist/icons/check.d.ts +15 -0
- package/dist/icons/chevron-down.d.ts +15 -0
- package/dist/icons/chevron-left.d.ts +15 -0
- package/dist/icons/chevron-right.d.ts +15 -0
- package/dist/icons/circle-check.d.ts +15 -0
- package/dist/icons/circle-dollar-sign.d.ts +15 -0
- package/dist/icons/clipboard-check.d.ts +15 -0
- package/dist/icons/clock.d.ts +15 -0
- package/dist/icons/cloud-upload.d.ts +15 -0
- package/dist/icons/compass.d.ts +15 -0
- package/dist/icons/contrast.d.ts +15 -0
- package/dist/icons/copy.d.ts +15 -0
- package/dist/icons/credit-card.d.ts +15 -0
- package/dist/icons/delete.d.ts +15 -0
- package/dist/icons/download.d.ts +15 -0
- package/dist/icons/dribbble.d.ts +15 -0
- package/dist/icons/earth.d.ts +15 -0
- package/dist/icons/eye-off.d.ts +15 -0
- package/dist/icons/eye.d.ts +15 -0
- package/dist/icons/feather.d.ts +15 -0
- package/dist/icons/figma.d.ts +15 -0
- package/dist/icons/file-text.d.ts +16 -0
- package/dist/icons/flame.d.ts +15 -0
- package/dist/icons/folder-input.d.ts +15 -0
- package/dist/icons/folder-open.d.ts +15 -0
- package/dist/icons/folders.d.ts +15 -0
- package/dist/icons/github.d.ts +15 -0
- package/dist/icons/hand-coins.d.ts +15 -0
- package/dist/icons/heart.d.ts +15 -0
- package/dist/icons/history.d.ts +15 -0
- package/dist/icons/home.d.ts +15 -0
- package/dist/icons/hourglass.d.ts +15 -0
- package/dist/icons/instagram.d.ts +15 -0
- package/dist/icons/italic.d.ts +15 -0
- package/dist/icons/layout-grid.d.ts +15 -0
- package/dist/icons/link.d.ts +15 -0
- package/dist/icons/linkedin.d.ts +15 -0
- package/dist/icons/loader-circle.d.ts +15 -0
- package/dist/icons/lock-keyhole-open.d.ts +15 -0
- package/dist/icons/lock-keyhole.d.ts +15 -0
- package/dist/icons/lock.d.ts +15 -0
- package/dist/icons/logout.d.ts +15 -0
- package/dist/icons/mail-check.d.ts +15 -0
- package/dist/icons/map-pin.d.ts +15 -0
- package/dist/icons/message-circle.d.ts +15 -0
- package/dist/icons/mic.d.ts +15 -0
- package/dist/icons/monitor-check.d.ts +15 -0
- package/dist/icons/moon.d.ts +15 -0
- package/dist/icons/palette.d.ts +15 -0
- package/dist/icons/panel-left-close.d.ts +15 -0
- package/dist/icons/panel-left-open.d.ts +15 -0
- package/dist/icons/plug-zap.d.ts +15 -0
- package/dist/icons/plus.d.ts +15 -0
- package/dist/icons/radio.d.ts +15 -0
- package/dist/icons/receipt.d.ts +15 -0
- package/dist/icons/refresh-cw.d.ts +15 -0
- package/dist/icons/rotate-ccw.d.ts +15 -0
- package/dist/icons/search.d.ts +15 -0
- package/dist/icons/send.d.ts +15 -0
- package/dist/icons/settings.d.ts +15 -0
- package/dist/icons/shield-check.d.ts +15 -0
- package/dist/icons/smartphone-nfc.d.ts +15 -0
- package/dist/icons/smile.d.ts +15 -0
- package/dist/icons/sparkles.d.ts +15 -0
- package/dist/icons/square-pen.d.ts +15 -0
- package/dist/icons/sun.d.ts +15 -0
- package/dist/icons/terminal.d.ts +15 -0
- package/dist/icons/timer.d.ts +15 -0
- package/dist/icons/trending-up.d.ts +15 -0
- package/dist/icons/twitter.d.ts +15 -0
- package/dist/icons/underline.d.ts +15 -0
- package/dist/icons/undo.d.ts +15 -0
- package/dist/icons/user-check.d.ts +15 -0
- package/dist/icons/user-plus.d.ts +15 -0
- package/dist/icons/user-round-plus.d.ts +15 -0
- package/dist/icons/user.d.ts +15 -0
- package/dist/icons/users.d.ts +15 -0
- package/dist/icons/wifi.d.ts +15 -0
- package/dist/icons/workflow.d.ts +15 -0
- package/dist/icons/x.d.ts +15 -0
- package/dist/icons/zap.d.ts +15 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +472 -0
- package/dist/infinite-gallery.d.ts +1 -0
- package/dist/infinite-gallery.js +9 -0
- package/dist/integration-hub.d.ts +1 -0
- package/dist/integration-hub.js +8 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/liquid-card.d.ts +1 -0
- package/dist/liquid-card.js +10 -0
- package/dist/liquid-metal-card.d.ts +1 -0
- package/dist/liquid-metal-card.js +8 -0
- package/dist/liquid-tabs.d.ts +1 -0
- package/dist/liquid-tabs.js +14 -0
- package/dist/magnetic-button.d.ts +1 -0
- package/dist/magnetic-button.js +8 -0
- package/dist/magnetic-flow.d.ts +1 -0
- package/dist/magnetic-flow.js +8 -0
- package/dist/message-composer.d.ts +1 -0
- package/dist/message-composer.js +20 -0
- package/dist/metal-card-stack.d.ts +1 -0
- package/dist/metal-card-stack.js +8 -0
- package/dist/metric-split.d.ts +1 -0
- package/dist/metric-split.js +9 -0
- package/dist/mix-chart.d.ts +1 -0
- package/dist/mix-chart.js +9 -0
- package/dist/month-calendar.d.ts +1 -0
- package/dist/month-calendar.js +10 -0
- package/dist/morph-search.d.ts +1 -0
- package/dist/morph-search.js +10 -0
- package/dist/orbit-card.d.ts +1 -0
- package/dist/orbit-card.js +8 -0
- package/dist/otp-code.d.ts +1 -0
- package/dist/otp-code.js +17 -0
- package/dist/particle-card.d.ts +1 -0
- package/dist/particle-card.js +8 -0
- package/dist/payment-form.d.ts +1 -0
- package/dist/payment-form.js +8 -0
- package/dist/pill-tabs.d.ts +1 -0
- package/dist/pill-tabs.js +9 -0
- package/dist/pixel-blast.d.ts +1 -0
- package/dist/pixel-blast.js +8 -0
- package/dist/pixel-feature-card.d.ts +1 -0
- package/dist/pixel-feature-card.js +9 -0
- package/dist/pixel-scroll.d.ts +1 -0
- package/dist/pixel-scroll.js +8 -0
- package/dist/pricing-card.d.ts +1 -0
- package/dist/pricing-card.js +14 -0
- package/dist/prism-carousel.d.ts +1 -0
- package/dist/prism-carousel.js +8 -0
- package/dist/prism-flow.d.ts +1 -0
- package/dist/prism-flow.js +8 -0
- package/dist/privacy-banner.d.ts +1 -0
- package/dist/privacy-banner.js +8 -0
- package/dist/profile-card.d.ts +1 -0
- package/dist/profile-card.js +13 -0
- package/dist/profile-menu.d.ts +1 -0
- package/dist/profile-menu.js +21 -0
- package/dist/project-index.d.ts +1 -0
- package/dist/project-index.js +9 -0
- package/dist/prompt-input.d.ts +1 -0
- package/dist/prompt-input.js +14 -0
- package/dist/quota-gauge.d.ts +1 -0
- package/dist/quota-gauge.js +9 -0
- package/dist/range-chart.d.ts +1 -0
- package/dist/range-chart.js +8 -0
- package/dist/reaction-card.d.ts +1 -0
- package/dist/reaction-card.js +8 -0
- package/dist/recap-card.d.ts +1 -0
- package/dist/recap-card.js +15 -0
- package/dist/receipt-button.d.ts +1 -0
- package/dist/receipt-button.js +8 -0
- package/dist/ribbon-gallery.d.ts +1 -0
- package/dist/ribbon-gallery.js +8 -0
- package/dist/roadmap-card.d.ts +1 -0
- package/dist/roadmap-card.js +11 -0
- package/dist/rolling-card-stack.d.ts +1 -0
- package/dist/rolling-card-stack.js +8 -0
- package/dist/rolling-stepper.d.ts +1 -0
- package/dist/rolling-stepper.js +8 -0
- package/dist/rotating-text.d.ts +1 -0
- package/dist/rotating-text.js +9 -0
- package/dist/score-card.d.ts +1 -0
- package/dist/score-card.js +10 -0
- package/dist/search-modal.d.ts +1 -0
- package/dist/search-modal.js +16 -0
- package/dist/shimmer-text.d.ts +1 -0
- package/dist/shimmer-text.js +8 -0
- package/dist/sidebar-nav.d.ts +1 -0
- package/dist/sidebar-nav.js +19 -0
- package/dist/slide-commit.d.ts +1 -0
- package/dist/slide-commit.js +9 -0
- package/dist/spatial-gallery.d.ts +1 -0
- package/dist/spatial-gallery.js +8 -0
- package/dist/spending-meter.d.ts +1 -0
- package/dist/spending-meter.js +9 -0
- package/dist/tab-bar.d.ts +1 -0
- package/dist/tab-bar.js +18 -0
- package/dist/team-member-card.d.ts +1 -0
- package/dist/team-member-card.js +14 -0
- package/dist/team-morph.d.ts +1 -0
- package/dist/team-morph.js +11 -0
- package/dist/tilt-card.d.ts +1 -0
- package/dist/tilt-card.js +8 -0
- package/dist/tilt-carousel.d.ts +1 -0
- package/dist/tilt-carousel.js +8 -0
- package/dist/toast-stack.d.ts +1 -0
- package/dist/toast-stack.js +13 -0
- package/dist/usage-ring.d.ts +1 -0
- package/dist/usage-ring.js +9 -0
- package/dist/verify-flow.d.ts +1 -0
- package/dist/verify-flow.js +10 -0
- package/dist/voice-prompt.d.ts +1 -0
- package/dist/voice-prompt.js +14 -0
- package/dist/wallet-card.d.ts +1 -0
- package/dist/wallet-card.js +15 -0
- package/dist/wave-text.d.ts +1 -0
- package/dist/wave-text.js +8 -0
- package/package.json +111 -4
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-2TQSHVXA.js";
|
|
5
|
+
|
|
6
|
+
// src/components/gradient-card/gradient-card.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import {
|
|
9
|
+
animate,
|
|
10
|
+
motion,
|
|
11
|
+
useInView,
|
|
12
|
+
useMotionValue,
|
|
13
|
+
useMotionValueEvent,
|
|
14
|
+
useReducedMotion,
|
|
15
|
+
useSpring,
|
|
16
|
+
useTransform
|
|
17
|
+
} from "motion/react";
|
|
18
|
+
import { Minus, Plus } from "lucide-react";
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
var DEFAULT_PALETTE = {
|
|
21
|
+
// Younger: bright and playful.
|
|
22
|
+
young: ["#ff4fa3", "#ffc93c", "#8b5cf6", "#38d6c4"],
|
|
23
|
+
// Around the reference: warm orange.
|
|
24
|
+
even: ["#f07a1f", "#f3a52b", "#e98a9a", "#b9c4d4"],
|
|
25
|
+
// Older: a deep mix of reds.
|
|
26
|
+
old: ["#e3262f", "#ff5a36", "#9e1238", "#4a1621"]
|
|
27
|
+
};
|
|
28
|
+
var defaultCaption = (_, gap) => {
|
|
29
|
+
const g = Math.abs(gap);
|
|
30
|
+
const n = Number.isInteger(g) ? g.toFixed(0) : g.toFixed(1);
|
|
31
|
+
if (g < 0.05) return "Right in step with your years";
|
|
32
|
+
return `${n} ${g === 1 ? "year" : "years"} ${gap < 0 ? "ahead of the clock" : "behind the clock"}`;
|
|
33
|
+
};
|
|
34
|
+
var GLYPHS = {
|
|
35
|
+
"0": ["01110", "10001", "10011", "10101", "11001", "10001", "01110"],
|
|
36
|
+
"1": ["00100", "01100", "00100", "00100", "00100", "00100", "01110"],
|
|
37
|
+
"2": ["01110", "10001", "00001", "00010", "00100", "01000", "11111"],
|
|
38
|
+
"3": ["11110", "00001", "00001", "01110", "00001", "00001", "11110"],
|
|
39
|
+
"4": ["00010", "00110", "01010", "10010", "11111", "00010", "00010"],
|
|
40
|
+
"5": ["11111", "10000", "11110", "00001", "00001", "10001", "01110"],
|
|
41
|
+
"6": ["00110", "01000", "10000", "11110", "10001", "10001", "01110"],
|
|
42
|
+
"7": ["11111", "00001", "00010", "00100", "01000", "01000", "01000"],
|
|
43
|
+
"8": ["01110", "10001", "10001", "01110", "10001", "10001", "01110"],
|
|
44
|
+
"9": ["01110", "10001", "10001", "01111", "00001", "00010", "01100"]
|
|
45
|
+
};
|
|
46
|
+
var DOT_SPRING = { type: "spring", stiffness: 520, damping: 30 };
|
|
47
|
+
var SNAP = { type: "spring", stiffness: 260, damping: 30 };
|
|
48
|
+
var GLIDE = [0.22, 1, 0.36, 1];
|
|
49
|
+
var RADIUS = 300;
|
|
50
|
+
var STEP = 2.4;
|
|
51
|
+
var UNIT = RADIUS * STEP * Math.PI / 180;
|
|
52
|
+
function DotDigit({ ch, still }) {
|
|
53
|
+
const rows = GLYPHS[ch] ?? GLYPHS["0"];
|
|
54
|
+
return /* @__PURE__ */ jsx("span", { className: "grid grid-cols-5 gap-[3px]", "aria-hidden": true, children: rows.flatMap(
|
|
55
|
+
(row, r) => Array.from(row).map((bit, c) => {
|
|
56
|
+
const on = bit === "1";
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
motion.span,
|
|
59
|
+
{
|
|
60
|
+
className: "size-[6px] rounded-full bg-white",
|
|
61
|
+
initial: false,
|
|
62
|
+
animate: { opacity: on ? 1 : 0.1, scale: on ? 1 : 0.55 },
|
|
63
|
+
transition: still ? { duration: 0 } : { ...DOT_SPRING, delay: (r + c) * 8e-3 }
|
|
64
|
+
},
|
|
65
|
+
`${r}-${c}`
|
|
66
|
+
);
|
|
67
|
+
})
|
|
68
|
+
) });
|
|
69
|
+
}
|
|
70
|
+
function Tick({
|
|
71
|
+
i,
|
|
72
|
+
min,
|
|
73
|
+
pos
|
|
74
|
+
}) {
|
|
75
|
+
const v = min + i;
|
|
76
|
+
const major = v % 5 === 0;
|
|
77
|
+
const scaleY = useTransform(pos, (p) => {
|
|
78
|
+
const d = v - p;
|
|
79
|
+
return 1 + 0.8 * Math.exp(-(d * d) / 14);
|
|
80
|
+
});
|
|
81
|
+
const opacity = useTransform(pos, (p) => {
|
|
82
|
+
const d = Math.abs(v - p);
|
|
83
|
+
return Math.max(0.3, 0.9 - d * 0.035);
|
|
84
|
+
});
|
|
85
|
+
return (
|
|
86
|
+
// Spun to its place on the wheel; the tick hangs inward from the rim.
|
|
87
|
+
/* @__PURE__ */ jsxs(
|
|
88
|
+
"span",
|
|
89
|
+
{
|
|
90
|
+
className: "absolute left-0 top-0",
|
|
91
|
+
style: { transform: `rotate(${i * STEP}deg)` },
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
motion.span,
|
|
95
|
+
{
|
|
96
|
+
className: "absolute left-[-0.75px] w-[1.5px] origin-top rounded-full bg-white",
|
|
97
|
+
style: { top: -RADIUS, height: major ? 16 : 9, scaleY, opacity }
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
v % 10 === 0 && /* @__PURE__ */ jsx(
|
|
101
|
+
"span",
|
|
102
|
+
{
|
|
103
|
+
className: "absolute w-8 -translate-x-1/2 text-center text-xs font-medium tabular-nums text-white/75",
|
|
104
|
+
style: { top: -RADIUS + 30 },
|
|
105
|
+
children: v
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function StepButton({
|
|
114
|
+
label,
|
|
115
|
+
onPress,
|
|
116
|
+
still,
|
|
117
|
+
children
|
|
118
|
+
}) {
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
motion.button,
|
|
121
|
+
{
|
|
122
|
+
type: "button",
|
|
123
|
+
"aria-label": label,
|
|
124
|
+
onClick: onPress,
|
|
125
|
+
whileHover: still ? void 0 : { scale: 1.06 },
|
|
126
|
+
whileTap: still ? void 0 : { scale: 0.9 },
|
|
127
|
+
transition: { type: "spring", stiffness: 500, damping: 26 },
|
|
128
|
+
className: "grid size-9 shrink-0 cursor-pointer place-items-center rounded-full bg-white/20 text-white outline-none ring-1 ring-white/25 transition-colors hover:bg-white/30 focus-visible:ring-2 focus-visible:ring-white/70",
|
|
129
|
+
children
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
var GradientCard = React.forwardRef(
|
|
134
|
+
function GradientCard2({
|
|
135
|
+
label = "Body age",
|
|
136
|
+
value: initial = 25,
|
|
137
|
+
reference = 27.5,
|
|
138
|
+
min = 18,
|
|
139
|
+
max = 90,
|
|
140
|
+
caption = defaultCaption,
|
|
141
|
+
palette = DEFAULT_PALETTE,
|
|
142
|
+
speed = 1,
|
|
143
|
+
onChange,
|
|
144
|
+
className
|
|
145
|
+
}, ref) {
|
|
146
|
+
const root = React.useRef(null);
|
|
147
|
+
React.useImperativeHandle(ref, () => root.current);
|
|
148
|
+
const still = !!useReducedMotion();
|
|
149
|
+
const inView = useInView(root, { once: true, amount: 0.4 });
|
|
150
|
+
const shown = inView || still;
|
|
151
|
+
const clamp = (v) => Math.min(max, Math.max(min, v));
|
|
152
|
+
const target = clamp(Math.round(initial));
|
|
153
|
+
const pos = useMotionValue(still ? target : clamp(target - 12));
|
|
154
|
+
const [shownValue, setShownValue] = React.useState(Math.round(pos.get()));
|
|
155
|
+
useMotionValueEvent(pos, "change", (p) => {
|
|
156
|
+
const r = Math.round(clamp(p));
|
|
157
|
+
setShownValue((cur) => cur === r ? cur : r);
|
|
158
|
+
});
|
|
159
|
+
const settled = React.useRef(target);
|
|
160
|
+
const settle = (v) => {
|
|
161
|
+
if (settled.current !== v) {
|
|
162
|
+
settled.current = v;
|
|
163
|
+
onChange?.(v);
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
React.useEffect(() => {
|
|
167
|
+
if (!shown || still) return;
|
|
168
|
+
const c = animate(pos, target, {
|
|
169
|
+
duration: 1.4,
|
|
170
|
+
delay: 0.25,
|
|
171
|
+
ease: GLIDE
|
|
172
|
+
});
|
|
173
|
+
return () => c.stop();
|
|
174
|
+
}, [shown]);
|
|
175
|
+
const snapTo = (v, velocity = 0) => {
|
|
176
|
+
const to = clamp(Math.round(v));
|
|
177
|
+
animate(pos, to, still ? { duration: 0 } : { ...SNAP, velocity });
|
|
178
|
+
settle(to);
|
|
179
|
+
};
|
|
180
|
+
const drag = React.useRef(null);
|
|
181
|
+
const onDown = (e) => {
|
|
182
|
+
if (e.button !== 0) return;
|
|
183
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
184
|
+
pos.stop();
|
|
185
|
+
drag.current = { x: e.clientX, p: pos.get(), t: performance.now(), v: 0 };
|
|
186
|
+
};
|
|
187
|
+
const onMove = (e) => {
|
|
188
|
+
const g = drag.current;
|
|
189
|
+
if (!g) return;
|
|
190
|
+
const now = performance.now();
|
|
191
|
+
let next = g.p - (e.clientX - g.x) / UNIT;
|
|
192
|
+
if (next < min) next = min - (min - next) * 0.3;
|
|
193
|
+
if (next > max) next = max + (next - max) * 0.3;
|
|
194
|
+
const dt = Math.max(1, now - g.t);
|
|
195
|
+
g.v = g.v * 0.6 + (next - pos.get()) / dt * 1e3 * 0.4;
|
|
196
|
+
g.t = now;
|
|
197
|
+
pos.set(next);
|
|
198
|
+
};
|
|
199
|
+
const onUp = () => {
|
|
200
|
+
const g = drag.current;
|
|
201
|
+
if (!g) return;
|
|
202
|
+
drag.current = null;
|
|
203
|
+
snapTo(pos.get() + Math.max(-12, Math.min(12, g.v * 0.22)), g.v);
|
|
204
|
+
};
|
|
205
|
+
const wheelEnd = React.useRef(0);
|
|
206
|
+
const onWheel = (e) => {
|
|
207
|
+
const d = Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY;
|
|
208
|
+
pos.stop();
|
|
209
|
+
pos.set(clamp(pos.get() + d / UNIT / 2));
|
|
210
|
+
window.clearTimeout(wheelEnd.current);
|
|
211
|
+
wheelEnd.current = window.setTimeout(() => snapTo(pos.get()), 140);
|
|
212
|
+
};
|
|
213
|
+
const knock = useSpring(0, { stiffness: 900, damping: 18 });
|
|
214
|
+
const last = React.useRef(shownValue);
|
|
215
|
+
React.useEffect(() => {
|
|
216
|
+
if (last.current !== shownValue && !still) {
|
|
217
|
+
knock.set(shownValue > last.current ? -2 : 2);
|
|
218
|
+
window.setTimeout(() => knock.set(0), 40);
|
|
219
|
+
}
|
|
220
|
+
last.current = shownValue;
|
|
221
|
+
}, [shownValue, knock, still]);
|
|
222
|
+
const dialRotate = useTransform(pos, (p) => -(p - min) * STEP);
|
|
223
|
+
const stops = [reference - 10, reference, reference + 14];
|
|
224
|
+
const blend = (k2) => [
|
|
225
|
+
palette.young[k2],
|
|
226
|
+
palette.even[k2],
|
|
227
|
+
palette.old[k2]
|
|
228
|
+
];
|
|
229
|
+
const c0 = useTransform(pos, stops, blend(0));
|
|
230
|
+
const c1 = useTransform(pos, stops, blend(1));
|
|
231
|
+
const c2 = useTransform(pos, stops, blend(2));
|
|
232
|
+
const c3 = useTransform(pos, stops, blend(3));
|
|
233
|
+
const px = useSpring(0, { stiffness: 60, damping: 18 });
|
|
234
|
+
const py = useSpring(0, { stiffness: 60, damping: 18 });
|
|
235
|
+
const onHover = (e) => {
|
|
236
|
+
if (still) return;
|
|
237
|
+
const r = root.current.getBoundingClientRect();
|
|
238
|
+
px.set(((e.clientX - r.left) / r.width - 0.5) * 120);
|
|
239
|
+
py.set(((e.clientY - r.top) / r.height - 0.5) * 90);
|
|
240
|
+
};
|
|
241
|
+
const gap = Math.round((shownValue - reference) * 10) / 10;
|
|
242
|
+
const digits = String(shownValue).split("");
|
|
243
|
+
const k = 1 / Math.max(0.1, speed);
|
|
244
|
+
return /* @__PURE__ */ jsxs(
|
|
245
|
+
motion.div,
|
|
246
|
+
{
|
|
247
|
+
ref: root,
|
|
248
|
+
onPointerMove: onHover,
|
|
249
|
+
onPointerLeave: () => {
|
|
250
|
+
px.set(0);
|
|
251
|
+
py.set(0);
|
|
252
|
+
},
|
|
253
|
+
initial: still ? false : { opacity: 0, y: 24, scale: 0.97 },
|
|
254
|
+
animate: shown ? { opacity: 1, y: 0, scale: 1 } : void 0,
|
|
255
|
+
transition: { duration: 0.7, ease: GLIDE },
|
|
256
|
+
className: cn(
|
|
257
|
+
"relative isolate h-[300px] w-[400px] max-w-full overflow-hidden rounded-[28px] text-white shadow-[0_2px_6px_rgba(0,0,0,0.06),0_24px_48px_-24px_rgba(0,0,0,0.35)]",
|
|
258
|
+
className
|
|
259
|
+
),
|
|
260
|
+
style: { backgroundColor: c3 },
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "absolute -inset-16 -z-10", children: /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 blur-[48px]", children: [
|
|
263
|
+
/* @__PURE__ */ jsx(
|
|
264
|
+
motion.span,
|
|
265
|
+
{
|
|
266
|
+
className: "absolute left-[30%] top-[25%] size-[70%] rounded-full",
|
|
267
|
+
style: { backgroundColor: c0 },
|
|
268
|
+
animate: still ? void 0 : {
|
|
269
|
+
x: [0, 40, -20, 0],
|
|
270
|
+
y: [0, -20, 30, 0],
|
|
271
|
+
scale: [1, 1.1, 0.95, 1]
|
|
272
|
+
},
|
|
273
|
+
transition: {
|
|
274
|
+
duration: 14 * k,
|
|
275
|
+
repeat: Infinity,
|
|
276
|
+
ease: "easeInOut"
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ jsx(
|
|
281
|
+
motion.span,
|
|
282
|
+
{
|
|
283
|
+
className: "absolute left-[10%] top-[30%] size-[55%] rounded-full",
|
|
284
|
+
style: { backgroundColor: c1 },
|
|
285
|
+
animate: still ? void 0 : { x: [0, -30, 30, 0], y: [0, 30, -10, 0] },
|
|
286
|
+
transition: {
|
|
287
|
+
duration: 17 * k,
|
|
288
|
+
repeat: Infinity,
|
|
289
|
+
ease: "easeInOut"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
/* @__PURE__ */ jsx(
|
|
294
|
+
motion.span,
|
|
295
|
+
{
|
|
296
|
+
className: "absolute right-[0%] top-[0%] size-[50%] rounded-full",
|
|
297
|
+
style: { backgroundColor: c2 },
|
|
298
|
+
animate: still ? void 0 : { x: [0, -40, 10, 0], y: [0, 20, 40, 0] },
|
|
299
|
+
transition: {
|
|
300
|
+
duration: 19 * k,
|
|
301
|
+
repeat: Infinity,
|
|
302
|
+
ease: "easeInOut"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
),
|
|
306
|
+
/* @__PURE__ */ jsx(
|
|
307
|
+
motion.span,
|
|
308
|
+
{
|
|
309
|
+
className: "absolute left-[35%] top-[35%] size-[40%] rounded-full",
|
|
310
|
+
style: { backgroundColor: c0, x: px, y: py, opacity: 0.85 }
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
] }) }),
|
|
314
|
+
/* @__PURE__ */ jsx(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
"aria-hidden": true,
|
|
318
|
+
className: "pointer-events-none absolute inset-0 -z-10 opacity-[0.18] mix-blend-overlay",
|
|
319
|
+
style: {
|
|
320
|
+
backgroundImage: `url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")`
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
),
|
|
324
|
+
/* @__PURE__ */ jsx(
|
|
325
|
+
"div",
|
|
326
|
+
{
|
|
327
|
+
"aria-hidden": true,
|
|
328
|
+
className: "pointer-events-none absolute inset-0 -z-10 bg-gradient-to-b from-white/10 to-transparent"
|
|
329
|
+
}
|
|
330
|
+
),
|
|
331
|
+
/* @__PURE__ */ jsxs("div", { className: "flex h-full flex-col px-6 pt-5", children: [
|
|
332
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
333
|
+
/* @__PURE__ */ jsx("p", { className: "text-base font-medium tracking-tight text-white", children: label }),
|
|
334
|
+
/* @__PURE__ */ jsxs("span", { className: "inline-flex h-7 items-center gap-1.5 rounded-full bg-white/20 px-3 text-xs font-medium text-white ring-1 ring-white/25 backdrop-blur-md", children: [
|
|
335
|
+
/* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-white" }),
|
|
336
|
+
"Your years ",
|
|
337
|
+
reference
|
|
338
|
+
] })
|
|
339
|
+
] }),
|
|
340
|
+
/* @__PURE__ */ jsx("p", { className: "mt-6 flex gap-[10px]", "aria-hidden": true, children: digits.map((d, i) => /* @__PURE__ */ jsx(DotDigit, { ch: d, still }, digits.length - i)) }),
|
|
341
|
+
/* @__PURE__ */ jsx(
|
|
342
|
+
motion.p,
|
|
343
|
+
{
|
|
344
|
+
className: "mt-3 text-sm text-white/90",
|
|
345
|
+
initial: still ? false : { opacity: 0, y: 4, filter: "blur(2px)" },
|
|
346
|
+
animate: { opacity: 1, y: 0, filter: "blur(0px)" },
|
|
347
|
+
transition: { duration: 0.3, ease: GLIDE },
|
|
348
|
+
children: caption(shownValue, gap)
|
|
349
|
+
},
|
|
350
|
+
caption(shownValue, gap)
|
|
351
|
+
),
|
|
352
|
+
/* @__PURE__ */ jsxs("div", { className: "relative -mx-2 mb-4 mt-auto flex h-[88px] items-center gap-1 rounded-[22px] bg-white/15 px-2 ring-1 ring-white/25 backdrop-blur-md", children: [
|
|
353
|
+
/* @__PURE__ */ jsx(
|
|
354
|
+
StepButton,
|
|
355
|
+
{
|
|
356
|
+
label: "Step down",
|
|
357
|
+
onPress: () => snapTo(settled.current - 1),
|
|
358
|
+
still,
|
|
359
|
+
children: /* @__PURE__ */ jsx(Minus, { "aria-hidden": true, className: "size-4" })
|
|
360
|
+
}
|
|
361
|
+
),
|
|
362
|
+
/* @__PURE__ */ jsxs(
|
|
363
|
+
"div",
|
|
364
|
+
{
|
|
365
|
+
role: "slider",
|
|
366
|
+
tabIndex: 0,
|
|
367
|
+
"aria-label": label,
|
|
368
|
+
"aria-valuemin": min,
|
|
369
|
+
"aria-valuemax": max,
|
|
370
|
+
"aria-valuenow": shownValue,
|
|
371
|
+
"aria-valuetext": `${shownValue}, ${caption(shownValue, gap)}`,
|
|
372
|
+
onPointerDown: onDown,
|
|
373
|
+
onPointerMove: onMove,
|
|
374
|
+
onPointerUp: onUp,
|
|
375
|
+
onPointerCancel: onUp,
|
|
376
|
+
onWheel,
|
|
377
|
+
onKeyDown: (e) => {
|
|
378
|
+
const by = {
|
|
379
|
+
ArrowLeft: -1,
|
|
380
|
+
ArrowDown: -1,
|
|
381
|
+
ArrowRight: 1,
|
|
382
|
+
ArrowUp: 1,
|
|
383
|
+
PageDown: -5,
|
|
384
|
+
PageUp: 5
|
|
385
|
+
};
|
|
386
|
+
let to = null;
|
|
387
|
+
if (e.key in by) to = settled.current + by[e.key];
|
|
388
|
+
else if (e.key === "Home") to = min;
|
|
389
|
+
else if (e.key === "End") to = max;
|
|
390
|
+
if (to === null) return;
|
|
391
|
+
e.preventDefault();
|
|
392
|
+
snapTo(to);
|
|
393
|
+
},
|
|
394
|
+
className: "relative h-full min-w-0 flex-1 cursor-grab touch-none select-none overflow-hidden rounded-2xl outline-none focus-visible:ring-2 focus-visible:ring-white/70 active:cursor-grabbing",
|
|
395
|
+
style: {
|
|
396
|
+
maskImage: "linear-gradient(to right, transparent, black 26%, black 74%, transparent)",
|
|
397
|
+
WebkitMaskImage: "linear-gradient(to right, transparent, black 26%, black 74%, transparent)"
|
|
398
|
+
},
|
|
399
|
+
children: [
|
|
400
|
+
/* @__PURE__ */ jsx(
|
|
401
|
+
motion.div,
|
|
402
|
+
{
|
|
403
|
+
className: "absolute left-1/2 size-0",
|
|
404
|
+
style: { top: 16 + RADIUS, rotate: dialRotate },
|
|
405
|
+
children: Array.from({ length: max - min + 1 }, (_, i) => /* @__PURE__ */ jsx(Tick, { i, min, pos }, i))
|
|
406
|
+
}
|
|
407
|
+
),
|
|
408
|
+
/* @__PURE__ */ jsxs(
|
|
409
|
+
motion.span,
|
|
410
|
+
{
|
|
411
|
+
"aria-hidden": true,
|
|
412
|
+
className: "absolute left-1/2 top-2 flex -translate-x-1/2 flex-col items-center",
|
|
413
|
+
style: { x: knock },
|
|
414
|
+
children: [
|
|
415
|
+
/* @__PURE__ */ jsx("span", { className: "size-1.5 rounded-full bg-white" }),
|
|
416
|
+
/* @__PURE__ */ jsx("span", { className: "mt-0.5 h-6 w-[3px] rounded-full bg-white shadow-[0_0_10px_rgba(255,255,255,0.7)]" })
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
)
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
),
|
|
423
|
+
/* @__PURE__ */ jsx(
|
|
424
|
+
StepButton,
|
|
425
|
+
{
|
|
426
|
+
label: "Step up",
|
|
427
|
+
onPress: () => snapTo(settled.current + 1),
|
|
428
|
+
still,
|
|
429
|
+
children: /* @__PURE__ */ jsx(Plus, { "aria-hidden": true, className: "size-4" })
|
|
430
|
+
}
|
|
431
|
+
)
|
|
432
|
+
] })
|
|
433
|
+
] })
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
export {
|
|
441
|
+
GradientCard
|
|
442
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-2TQSHVXA.js";
|
|
5
|
+
|
|
6
|
+
// src/icons/refresh-cw.tsx
|
|
7
|
+
import { motion, useAnimation, useReducedMotion } from "motion/react";
|
|
8
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var RefreshCWIcon = forwardRef(
|
|
11
|
+
({ onMouseEnter, onMouseLeave, className, size, active, style, strokeWidth, ...props }, ref) => {
|
|
12
|
+
const controls = useAnimation();
|
|
13
|
+
const isControlledRef = useRef(false);
|
|
14
|
+
useImperativeHandle(ref, () => {
|
|
15
|
+
isControlledRef.current = true;
|
|
16
|
+
return {
|
|
17
|
+
startAnimation: () => controls.start("animate"),
|
|
18
|
+
stopAnimation: () => controls.start("normal")
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
const handleMouseEnter = useCallback(
|
|
22
|
+
(e) => {
|
|
23
|
+
if (isControlledRef.current) onMouseEnter?.(e);
|
|
24
|
+
else controls.start("animate");
|
|
25
|
+
},
|
|
26
|
+
[controls, onMouseEnter]
|
|
27
|
+
);
|
|
28
|
+
const handleMouseLeave = useCallback(
|
|
29
|
+
(e) => {
|
|
30
|
+
if (isControlledRef.current) onMouseLeave?.(e);
|
|
31
|
+
else controls.start("normal");
|
|
32
|
+
},
|
|
33
|
+
[controls, onMouseLeave]
|
|
34
|
+
);
|
|
35
|
+
const wrap = useRef(null);
|
|
36
|
+
const reduced = useReducedMotion();
|
|
37
|
+
const [hosted, setHosted] = useState(false);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const fake = {};
|
|
40
|
+
if (reduced) {
|
|
41
|
+
setHosted(true);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (active !== void 0) {
|
|
45
|
+
setHosted(true);
|
|
46
|
+
(active ? handleMouseEnter : handleMouseLeave)(fake);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
|
|
50
|
+
setHosted(!!host);
|
|
51
|
+
if (!host) return;
|
|
52
|
+
const on = () => handleMouseEnter(fake);
|
|
53
|
+
const off = () => handleMouseLeave(fake);
|
|
54
|
+
host.addEventListener("pointerenter", on);
|
|
55
|
+
host.addEventListener("pointerleave", off);
|
|
56
|
+
return () => {
|
|
57
|
+
host.removeEventListener("pointerenter", on);
|
|
58
|
+
host.removeEventListener("pointerleave", off);
|
|
59
|
+
};
|
|
60
|
+
}, [active, reduced, handleMouseEnter, handleMouseLeave]);
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
ref: wrap,
|
|
65
|
+
className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
|
|
66
|
+
style: size ? { width: size, height: size, ...style } : style,
|
|
67
|
+
onMouseEnter: hosted ? void 0 : handleMouseEnter,
|
|
68
|
+
onMouseLeave: hosted ? void 0 : handleMouseLeave,
|
|
69
|
+
...props,
|
|
70
|
+
children: /* @__PURE__ */ jsxs(
|
|
71
|
+
motion.svg,
|
|
72
|
+
{
|
|
73
|
+
animate: controls,
|
|
74
|
+
fill: "none",
|
|
75
|
+
height: size,
|
|
76
|
+
stroke: "currentColor",
|
|
77
|
+
strokeLinecap: "round",
|
|
78
|
+
strokeLinejoin: "round",
|
|
79
|
+
strokeWidth: strokeWidth ?? 2,
|
|
80
|
+
transition: { type: "spring", stiffness: 250, damping: 25 },
|
|
81
|
+
variants: {
|
|
82
|
+
normal: { rotate: "0deg" },
|
|
83
|
+
animate: { rotate: "50deg" }
|
|
84
|
+
},
|
|
85
|
+
viewBox: "0 0 24 24",
|
|
86
|
+
width: size,
|
|
87
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
90
|
+
/* @__PURE__ */ jsx("path", { d: "M21 3v5h-5" }),
|
|
91
|
+
/* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
|
|
92
|
+
/* @__PURE__ */ jsx("path", { d: "M8 16H3v5" })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
RefreshCWIcon.displayName = "RefreshCWIcon";
|
|
101
|
+
|
|
102
|
+
export {
|
|
103
|
+
RefreshCWIcon
|
|
104
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-2TQSHVXA.js";
|
|
5
|
+
|
|
6
|
+
// src/icons/bookmark.tsx
|
|
7
|
+
import { motion, useAnimation, useReducedMotion } from "motion/react";
|
|
8
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var BOOKMARK_VARIANTS = {
|
|
11
|
+
normal: { scaleY: 1, scaleX: 1 },
|
|
12
|
+
animate: {
|
|
13
|
+
scaleY: [1, 1.3, 0.9, 1.05, 1],
|
|
14
|
+
scaleX: [1, 0.9, 1.1, 0.95, 1],
|
|
15
|
+
transition: {
|
|
16
|
+
duration: 0.6,
|
|
17
|
+
ease: "easeOut"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var BookmarkIcon = forwardRef(
|
|
22
|
+
({ className, onMouseEnter, onMouseLeave, size, active, style, strokeWidth, ...props }, ref) => {
|
|
23
|
+
const controls = useAnimation();
|
|
24
|
+
const isControlledRef = useRef(false);
|
|
25
|
+
useImperativeHandle(ref, () => {
|
|
26
|
+
isControlledRef.current = true;
|
|
27
|
+
return {
|
|
28
|
+
startAnimation: () => controls.start("animate"),
|
|
29
|
+
stopAnimation: () => controls.start("normal")
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
const handleMouseEnter = useCallback(
|
|
33
|
+
(e) => {
|
|
34
|
+
if (isControlledRef.current) {
|
|
35
|
+
onMouseEnter?.(e);
|
|
36
|
+
} else {
|
|
37
|
+
controls.start("animate");
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
[controls, onMouseEnter]
|
|
41
|
+
);
|
|
42
|
+
const handleMouseLeave = useCallback(
|
|
43
|
+
(e) => {
|
|
44
|
+
if (isControlledRef.current) {
|
|
45
|
+
onMouseLeave?.(e);
|
|
46
|
+
} else {
|
|
47
|
+
controls.start("normal");
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
[controls, onMouseLeave]
|
|
51
|
+
);
|
|
52
|
+
const wrap = useRef(null);
|
|
53
|
+
const reduced = useReducedMotion();
|
|
54
|
+
const [hosted, setHosted] = useState(false);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const fake = {};
|
|
57
|
+
if (reduced) {
|
|
58
|
+
setHosted(true);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (active !== void 0) {
|
|
62
|
+
setHosted(true);
|
|
63
|
+
(active ? handleMouseEnter : handleMouseLeave)(fake);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const host = wrap.current?.parentElement?.closest("button, a, [role=button], [role=menuitem], [role=tab], [role=switch], [role=radio], label");
|
|
67
|
+
setHosted(!!host);
|
|
68
|
+
if (!host) return;
|
|
69
|
+
const on = () => handleMouseEnter(fake);
|
|
70
|
+
const off = () => handleMouseLeave(fake);
|
|
71
|
+
host.addEventListener("pointerenter", on);
|
|
72
|
+
host.addEventListener("pointerleave", off);
|
|
73
|
+
return () => {
|
|
74
|
+
host.removeEventListener("pointerenter", on);
|
|
75
|
+
host.removeEventListener("pointerleave", off);
|
|
76
|
+
};
|
|
77
|
+
}, [active, reduced, handleMouseEnter, handleMouseLeave]);
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
79
|
+
"span",
|
|
80
|
+
{
|
|
81
|
+
ref: wrap,
|
|
82
|
+
className: cn("inline-grid size-6 shrink-0 place-items-center align-middle [&>svg]:size-full", className),
|
|
83
|
+
style: size ? { width: size, height: size, ...style } : style,
|
|
84
|
+
onMouseEnter: hosted ? void 0 : handleMouseEnter,
|
|
85
|
+
onMouseLeave: hosted ? void 0 : handleMouseLeave,
|
|
86
|
+
...props,
|
|
87
|
+
children: /* @__PURE__ */ jsx(
|
|
88
|
+
"svg",
|
|
89
|
+
{
|
|
90
|
+
fill: "none",
|
|
91
|
+
height: size,
|
|
92
|
+
stroke: "currentColor",
|
|
93
|
+
strokeLinecap: "round",
|
|
94
|
+
strokeLinejoin: "round",
|
|
95
|
+
strokeWidth: strokeWidth ?? 2,
|
|
96
|
+
viewBox: "0 0 24 24",
|
|
97
|
+
width: size,
|
|
98
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
99
|
+
children: /* @__PURE__ */ jsx(
|
|
100
|
+
motion.path,
|
|
101
|
+
{
|
|
102
|
+
animate: controls,
|
|
103
|
+
d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",
|
|
104
|
+
style: { originY: 0.5, originX: 0.5 },
|
|
105
|
+
variants: BOOKMARK_VARIANTS
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
BookmarkIcon.displayName = "BookmarkIcon";
|
|
115
|
+
|
|
116
|
+
export {
|
|
117
|
+
BookmarkIcon
|
|
118
|
+
};
|