motion-brew 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-5IAO5YQA.js +373 -0
- package/dist/chunk-5MP5QNFG.js +560 -0
- package/dist/chunk-62RBYLIN.js +128 -0
- package/dist/chunk-6FTC5OQF.js +384 -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-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-H2JOCJWM.js +125 -0
- package/dist/chunk-H7XKIWHA.js +135 -0
- package/dist/chunk-HHXK3NAH.js +1382 -0
- package/dist/chunk-HJINEW5T.js +3289 -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-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-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-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-SVK4MQMV.js +267 -0
- package/dist/chunk-SZAHSOSQ.js +932 -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-W46CBUFX.js +425 -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-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 +14 -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,885 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
RefreshCWIcon
|
|
4
|
+
} from "./chunk-VEC5QAOY.js";
|
|
5
|
+
import {
|
|
6
|
+
LoaderCircleIcon
|
|
7
|
+
} from "./chunk-G3XH7YT2.js";
|
|
8
|
+
import {
|
|
9
|
+
BadgeAlertIcon
|
|
10
|
+
} from "./chunk-UD5OQ2T3.js";
|
|
11
|
+
import {
|
|
12
|
+
ArrowRightIcon
|
|
13
|
+
} from "./chunk-H7XKIWHA.js";
|
|
14
|
+
import {
|
|
15
|
+
CircleCheckIcon
|
|
16
|
+
} from "./chunk-YU6B7YRO.js";
|
|
17
|
+
import {
|
|
18
|
+
SmartphoneNfcIcon
|
|
19
|
+
} from "./chunk-OS6REIBR.js";
|
|
20
|
+
import {
|
|
21
|
+
ShieldCheckIcon
|
|
22
|
+
} from "./chunk-WE7VCUOA.js";
|
|
23
|
+
import {
|
|
24
|
+
HistoryIcon
|
|
25
|
+
} from "./chunk-BPE43MTT.js";
|
|
26
|
+
import {
|
|
27
|
+
MailCheckIcon
|
|
28
|
+
} from "./chunk-CEQ56RF6.js";
|
|
29
|
+
import {
|
|
30
|
+
cn
|
|
31
|
+
} from "./chunk-2TQSHVXA.js";
|
|
32
|
+
|
|
33
|
+
// src/components/otp-code/otp-code.tsx
|
|
34
|
+
import * as React from "react";
|
|
35
|
+
import {
|
|
36
|
+
AnimatePresence,
|
|
37
|
+
motion,
|
|
38
|
+
useAnimationControls,
|
|
39
|
+
useInView,
|
|
40
|
+
useReducedMotion
|
|
41
|
+
} from "motion/react";
|
|
42
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
43
|
+
var GLIDE = [0.22, 1, 0.36, 1];
|
|
44
|
+
var INK = "#242423";
|
|
45
|
+
var GOOD = "#269a5a";
|
|
46
|
+
var BAD = "#d64545";
|
|
47
|
+
function maskEmail(v) {
|
|
48
|
+
const [user = "", domain = ""] = v.split("@");
|
|
49
|
+
return `${user.slice(0, 2)}\u2022\u2022\u2022@${domain}`;
|
|
50
|
+
}
|
|
51
|
+
function maskPhone(v) {
|
|
52
|
+
const digits = v.replace(/\D/g, "");
|
|
53
|
+
const tail = digits.slice(-4);
|
|
54
|
+
const head = v.trim().startsWith("+") ? `+${digits.slice(0, digits.length > 10 ? digits.length - 10 : 1)} ` : "";
|
|
55
|
+
return `${head}\u2022\u2022\u2022 \u2022\u2022\u2022 ${tail}`;
|
|
56
|
+
}
|
|
57
|
+
function Roll({
|
|
58
|
+
children,
|
|
59
|
+
className
|
|
60
|
+
}) {
|
|
61
|
+
const still = !!useReducedMotion();
|
|
62
|
+
return /* @__PURE__ */ jsx("span", { className: cn("relative inline-grid", className), children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx(
|
|
63
|
+
motion.span,
|
|
64
|
+
{
|
|
65
|
+
initial: still ? false : { y: "60%", opacity: 0, filter: "blur(4px)" },
|
|
66
|
+
animate: { y: "0%", opacity: 1, filter: "blur(0px)" },
|
|
67
|
+
exit: still ? void 0 : { y: "-60%", opacity: 0, filter: "blur(4px)" },
|
|
68
|
+
transition: { duration: 0.35, ease: GLIDE },
|
|
69
|
+
className: "col-start-1 row-start-1",
|
|
70
|
+
children
|
|
71
|
+
},
|
|
72
|
+
children
|
|
73
|
+
) }) });
|
|
74
|
+
}
|
|
75
|
+
function Box({
|
|
76
|
+
index,
|
|
77
|
+
char,
|
|
78
|
+
active,
|
|
79
|
+
status,
|
|
80
|
+
mask,
|
|
81
|
+
still,
|
|
82
|
+
count,
|
|
83
|
+
shown
|
|
84
|
+
}) {
|
|
85
|
+
const filled = char !== "";
|
|
86
|
+
const tone = status === "success" ? GOOD : status === "error" ? BAD : INK;
|
|
87
|
+
return /* @__PURE__ */ jsxs(
|
|
88
|
+
motion.div,
|
|
89
|
+
{
|
|
90
|
+
initial: still ? false : { opacity: 0, scale: 0.8 },
|
|
91
|
+
animate: {
|
|
92
|
+
y: status === "checking" && !still ? [0, -5, 0] : 0,
|
|
93
|
+
opacity: shown ? 1 : 0,
|
|
94
|
+
scale: shown ? 1 : 0.8
|
|
95
|
+
},
|
|
96
|
+
transition: {
|
|
97
|
+
y: status === "checking" ? {
|
|
98
|
+
duration: 0.6,
|
|
99
|
+
repeat: Infinity,
|
|
100
|
+
repeatDelay: 0.25,
|
|
101
|
+
delay: index * 0.07,
|
|
102
|
+
ease: "easeInOut"
|
|
103
|
+
} : { type: "spring", stiffness: 500, damping: 26 },
|
|
104
|
+
opacity: { duration: 0.35, delay: still ? 0 : 0.35 + index * 0.05 },
|
|
105
|
+
scale: {
|
|
106
|
+
type: "spring",
|
|
107
|
+
stiffness: 420,
|
|
108
|
+
damping: 22,
|
|
109
|
+
delay: still ? 0 : 0.35 + index * 0.05
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
className: cn(
|
|
113
|
+
"relative grid h-14 min-w-0 max-w-[52px] flex-1 place-items-center rounded-2xl text-2xl font-semibold tabular-nums transition-[background-color,box-shadow] duration-300",
|
|
114
|
+
active ? "bg-white shadow-[0_0_0_4px_rgba(36,36,35,0.08),0_0_0_1.5px_rgba(36,36,35,0.35)]" : filled ? "bg-white shadow-[0_0_0_1.5px_rgba(36,36,35,0.3)]" : "bg-[#242423]/[0.045]"
|
|
115
|
+
),
|
|
116
|
+
style: status === "success" || status === "error" ? {
|
|
117
|
+
boxShadow: `0 0 0 1.5px ${tone}`,
|
|
118
|
+
backgroundColor: status === "success" ? "rgba(38,154,90,0.06)" : "rgba(214,69,69,0.05)",
|
|
119
|
+
transitionDelay: `${index * (still ? 0 : 0.05)}s`
|
|
120
|
+
} : void 0,
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", initial: false, children: filled && /* @__PURE__ */ jsx(
|
|
123
|
+
motion.span,
|
|
124
|
+
{
|
|
125
|
+
initial: still ? false : { y: 12, scale: 0.6, opacity: 0, filter: "blur(4px)" },
|
|
126
|
+
animate: {
|
|
127
|
+
y: 0,
|
|
128
|
+
scale: 1,
|
|
129
|
+
opacity: 1,
|
|
130
|
+
filter: "blur(0px)",
|
|
131
|
+
color: tone
|
|
132
|
+
},
|
|
133
|
+
exit: still ? void 0 : {
|
|
134
|
+
y: 14,
|
|
135
|
+
opacity: 0,
|
|
136
|
+
filter: "blur(4px)",
|
|
137
|
+
transition: {
|
|
138
|
+
duration: 0.25,
|
|
139
|
+
delay: (count - 1 - index) * 0.04
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
transition: {
|
|
143
|
+
type: "spring",
|
|
144
|
+
stiffness: 520,
|
|
145
|
+
damping: 24,
|
|
146
|
+
color: { duration: 0.3, delay: index * (still ? 0 : 0.05) }
|
|
147
|
+
},
|
|
148
|
+
className: "leading-none",
|
|
149
|
+
children: mask ? /* @__PURE__ */ jsx("span", { className: "block size-2.5 rounded-full bg-current" }) : char
|
|
150
|
+
},
|
|
151
|
+
`${index}-${char}`
|
|
152
|
+
) }),
|
|
153
|
+
active && !still && /* @__PURE__ */ jsx(
|
|
154
|
+
motion.span,
|
|
155
|
+
{
|
|
156
|
+
"aria-hidden": true,
|
|
157
|
+
className: "absolute h-6 w-[2px] rounded-full bg-[#242423]",
|
|
158
|
+
animate: { opacity: [1, 1, 0, 0] },
|
|
159
|
+
transition: {
|
|
160
|
+
duration: 1,
|
|
161
|
+
repeat: Infinity,
|
|
162
|
+
times: [0, 0.5, 0.5, 1]
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
var wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
171
|
+
var RISE = {
|
|
172
|
+
hidden: { opacity: 0, y: 12, filter: "blur(4px)" },
|
|
173
|
+
shown: {
|
|
174
|
+
opacity: 1,
|
|
175
|
+
y: 0,
|
|
176
|
+
filter: "blur(0px)",
|
|
177
|
+
transition: { duration: 0.45, ease: GLIDE }
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
function Badge({ still }) {
|
|
181
|
+
return /* @__PURE__ */ jsxs("span", { className: "relative grid size-20 place-items-center", children: [
|
|
182
|
+
!still && [0, 1, 2].map((i) => /* @__PURE__ */ jsx(
|
|
183
|
+
motion.span,
|
|
184
|
+
{
|
|
185
|
+
"aria-hidden": true,
|
|
186
|
+
className: "absolute inset-0 rounded-full",
|
|
187
|
+
style: { boxShadow: `0 0 0 1.5px ${GOOD}` },
|
|
188
|
+
initial: { scale: 0.8, opacity: 0 },
|
|
189
|
+
animate: { scale: [0.8, 1.55], opacity: [0.55, 0] },
|
|
190
|
+
transition: {
|
|
191
|
+
duration: 1.6,
|
|
192
|
+
ease: "easeOut",
|
|
193
|
+
delay: 0.75 + i * 0.35,
|
|
194
|
+
repeat: 1,
|
|
195
|
+
repeatDelay: 0.6
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
i
|
|
199
|
+
)),
|
|
200
|
+
/* @__PURE__ */ jsx(
|
|
201
|
+
motion.span,
|
|
202
|
+
{
|
|
203
|
+
"aria-hidden": true,
|
|
204
|
+
className: "absolute inset-2 rounded-full bg-[#269a5a]/15",
|
|
205
|
+
initial: still ? false : { scale: 0 },
|
|
206
|
+
animate: { scale: 1 },
|
|
207
|
+
transition: {
|
|
208
|
+
type: "spring",
|
|
209
|
+
stiffness: 300,
|
|
210
|
+
damping: 18,
|
|
211
|
+
delay: still ? 0 : 0.55
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
/* @__PURE__ */ jsx(
|
|
216
|
+
motion.span,
|
|
217
|
+
{
|
|
218
|
+
className: "relative grid size-14 place-items-center rounded-full text-white shadow-[0_8px_20px_-8px_rgba(38,154,90,0.7)]",
|
|
219
|
+
style: { background: `linear-gradient(160deg, #34b06c, ${GOOD})` },
|
|
220
|
+
initial: still ? false : { scale: 0, rotate: -40 },
|
|
221
|
+
animate: { scale: 1, rotate: 0 },
|
|
222
|
+
transition: {
|
|
223
|
+
type: "spring",
|
|
224
|
+
stiffness: 380,
|
|
225
|
+
damping: 15,
|
|
226
|
+
delay: still ? 0 : 0.6
|
|
227
|
+
},
|
|
228
|
+
children: /* @__PURE__ */ jsx(ShieldCheckIcon, { className: "size-7", active: !still })
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
] });
|
|
232
|
+
}
|
|
233
|
+
function Toggle({
|
|
234
|
+
on,
|
|
235
|
+
onChange,
|
|
236
|
+
label
|
|
237
|
+
}) {
|
|
238
|
+
return /* @__PURE__ */ jsx(
|
|
239
|
+
"button",
|
|
240
|
+
{
|
|
241
|
+
type: "button",
|
|
242
|
+
role: "switch",
|
|
243
|
+
"aria-checked": on,
|
|
244
|
+
"aria-label": label,
|
|
245
|
+
onClick: onChange,
|
|
246
|
+
className: cn(
|
|
247
|
+
"relative h-6 w-10 shrink-0 cursor-pointer rounded-full outline-none transition-colors duration-300 focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2",
|
|
248
|
+
on ? "bg-[#269a5a]" : "bg-[#242423]/15"
|
|
249
|
+
),
|
|
250
|
+
children: /* @__PURE__ */ jsx(
|
|
251
|
+
motion.span,
|
|
252
|
+
{
|
|
253
|
+
className: "absolute left-0.5 top-0.5 size-5 rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,0.2)]",
|
|
254
|
+
animate: { x: on ? 16 : 0 },
|
|
255
|
+
whileTap: { scaleX: 1.2 },
|
|
256
|
+
transition: { type: "spring", stiffness: 600, damping: 30 }
|
|
257
|
+
}
|
|
258
|
+
)
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
function Confirmation({
|
|
263
|
+
channel,
|
|
264
|
+
where,
|
|
265
|
+
at,
|
|
266
|
+
continueLabel,
|
|
267
|
+
onContinue,
|
|
268
|
+
onRemember,
|
|
269
|
+
still
|
|
270
|
+
}) {
|
|
271
|
+
const id = React.useId();
|
|
272
|
+
const heading = React.useRef(null);
|
|
273
|
+
React.useEffect(() => {
|
|
274
|
+
const t = window.setTimeout(
|
|
275
|
+
() => heading.current?.focus({ preventScroll: true }),
|
|
276
|
+
still ? 0 : 500
|
|
277
|
+
);
|
|
278
|
+
return () => window.clearTimeout(t);
|
|
279
|
+
}, [still]);
|
|
280
|
+
const [hover, setHover] = React.useState(null);
|
|
281
|
+
const [remember, setRemember] = React.useState(true);
|
|
282
|
+
const [going, setGoing] = React.useState(false);
|
|
283
|
+
const Channel = channel === "email" ? MailCheckIcon : SmartphoneNfcIcon;
|
|
284
|
+
const time = (at ?? /* @__PURE__ */ new Date()).toLocaleTimeString("en-US", {
|
|
285
|
+
hour: "numeric",
|
|
286
|
+
minute: "2-digit"
|
|
287
|
+
});
|
|
288
|
+
const row = "relative flex items-center gap-3 rounded-[20px] px-3 py-3 outline-none";
|
|
289
|
+
const pill = (key) => hover === key && /* @__PURE__ */ jsx(
|
|
290
|
+
motion.span,
|
|
291
|
+
{
|
|
292
|
+
layoutId: `${id}-row`,
|
|
293
|
+
className: "absolute inset-0 rounded-[20px] bg-white shadow-[0_1px_2px_rgba(0,0,0,0.06)]",
|
|
294
|
+
transition: still ? { duration: 0 } : { type: "spring", stiffness: 500, damping: 40 }
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
return /* @__PURE__ */ jsx(
|
|
298
|
+
motion.div,
|
|
299
|
+
{
|
|
300
|
+
className: "col-start-1 row-start-1 flex flex-col p-6",
|
|
301
|
+
initial: { opacity: 0 },
|
|
302
|
+
animate: { opacity: 1 },
|
|
303
|
+
exit: { opacity: 0, transition: { duration: 0.2 } },
|
|
304
|
+
transition: { duration: 0.3, delay: still ? 0 : 0.5 },
|
|
305
|
+
children: /* @__PURE__ */ jsxs(
|
|
306
|
+
motion.div,
|
|
307
|
+
{
|
|
308
|
+
variants: still ? void 0 : {
|
|
309
|
+
hidden: {},
|
|
310
|
+
shown: {
|
|
311
|
+
transition: { staggerChildren: 0.07, delayChildren: 0.85 }
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
initial: "hidden",
|
|
315
|
+
animate: "shown",
|
|
316
|
+
className: "flex flex-col items-center text-center",
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ jsx(Badge, { still }),
|
|
319
|
+
/* @__PURE__ */ jsx(
|
|
320
|
+
motion.h3,
|
|
321
|
+
{
|
|
322
|
+
ref: heading,
|
|
323
|
+
tabIndex: -1,
|
|
324
|
+
variants: still ? void 0 : RISE,
|
|
325
|
+
className: "mt-4 text-2xl font-semibold tracking-tight outline-none",
|
|
326
|
+
children: "You're verified"
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
/* @__PURE__ */ jsxs(
|
|
330
|
+
motion.p,
|
|
331
|
+
{
|
|
332
|
+
variants: still ? void 0 : RISE,
|
|
333
|
+
className: "mt-1.5 text-sm text-zinc-500",
|
|
334
|
+
children: [
|
|
335
|
+
channel === "email" ? "Your email" : "Your number",
|
|
336
|
+
" is confirmed. You're all set."
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
/* @__PURE__ */ jsxs(
|
|
341
|
+
motion.div,
|
|
342
|
+
{
|
|
343
|
+
variants: still ? void 0 : RISE,
|
|
344
|
+
onPointerLeave: () => setHover(null),
|
|
345
|
+
className: "mt-6 w-full rounded-3xl bg-[#242423]/[0.045] p-1.5 text-left",
|
|
346
|
+
children: [
|
|
347
|
+
/* @__PURE__ */ jsxs("div", { className: row, onPointerEnter: () => setHover("dest"), children: [
|
|
348
|
+
pill("dest"),
|
|
349
|
+
/* @__PURE__ */ jsx("span", { className: "relative grid size-9 shrink-0 place-items-center rounded-full bg-white text-[#242423] shadow-[0_1px_2px_rgba(0,0,0,0.06)]", children: /* @__PURE__ */ jsx(Channel, { className: "size-[18px]", active: hover === "dest" }) }),
|
|
350
|
+
/* @__PURE__ */ jsxs("span", { className: "relative min-w-0 flex-1 leading-tight", children: [
|
|
351
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate text-sm font-medium", children: where }),
|
|
352
|
+
/* @__PURE__ */ jsxs("span", { className: "mt-0.5 block text-xs text-zinc-500", children: [
|
|
353
|
+
"Verified at ",
|
|
354
|
+
time
|
|
355
|
+
] })
|
|
356
|
+
] }),
|
|
357
|
+
/* @__PURE__ */ jsxs(
|
|
358
|
+
motion.span,
|
|
359
|
+
{
|
|
360
|
+
className: "relative flex shrink-0 items-center gap-1 rounded-full bg-[#269a5a]/10 px-2 py-1 text-xs font-medium text-[#269a5a]",
|
|
361
|
+
initial: still ? false : { scale: 0.6, opacity: 0 },
|
|
362
|
+
animate: { scale: 1, opacity: 1 },
|
|
363
|
+
transition: {
|
|
364
|
+
type: "spring",
|
|
365
|
+
stiffness: 500,
|
|
366
|
+
damping: 20,
|
|
367
|
+
delay: still ? 0 : 1.25
|
|
368
|
+
},
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-3.5", active: hover === "dest" }),
|
|
371
|
+
"Verified"
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
)
|
|
375
|
+
] }),
|
|
376
|
+
/* @__PURE__ */ jsx("div", { className: "mx-3 h-px bg-[#242423]/[0.07]", "aria-hidden": true }),
|
|
377
|
+
/* @__PURE__ */ jsxs("div", { className: row, onPointerEnter: () => setHover("trust"), children: [
|
|
378
|
+
pill("trust"),
|
|
379
|
+
/* @__PURE__ */ jsx("span", { className: "relative grid size-9 shrink-0 place-items-center rounded-full bg-white text-[#242423] shadow-[0_1px_2px_rgba(0,0,0,0.06)]", children: /* @__PURE__ */ jsx(HistoryIcon, { className: "size-[18px]", active: hover === "trust" }) }),
|
|
380
|
+
/* @__PURE__ */ jsxs("span", { className: "relative min-w-0 flex-1 leading-tight", children: [
|
|
381
|
+
/* @__PURE__ */ jsx("span", { id: `${id}-trust`, className: "block text-sm font-medium", children: "Remember this device" }),
|
|
382
|
+
/* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-xs text-zinc-500", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", initial: false, children: /* @__PURE__ */ jsx(
|
|
383
|
+
motion.span,
|
|
384
|
+
{
|
|
385
|
+
className: "inline-block",
|
|
386
|
+
initial: still ? false : { y: 6, opacity: 0 },
|
|
387
|
+
animate: { y: 0, opacity: 1 },
|
|
388
|
+
exit: still ? void 0 : { y: -6, opacity: 0 },
|
|
389
|
+
transition: { duration: 0.22, ease: GLIDE },
|
|
390
|
+
children: remember ? "No codes here for 30 days" : "Ask for a code every time"
|
|
391
|
+
},
|
|
392
|
+
remember ? "on" : "off"
|
|
393
|
+
) }) })
|
|
394
|
+
] }),
|
|
395
|
+
/* @__PURE__ */ jsx("span", { className: "relative", children: /* @__PURE__ */ jsx(
|
|
396
|
+
Toggle,
|
|
397
|
+
{
|
|
398
|
+
on: remember,
|
|
399
|
+
label: "Remember this device",
|
|
400
|
+
onChange: () => {
|
|
401
|
+
setRemember((r) => !r);
|
|
402
|
+
onRemember?.(!remember);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
) })
|
|
406
|
+
] })
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
),
|
|
410
|
+
/* @__PURE__ */ jsxs(
|
|
411
|
+
motion.button,
|
|
412
|
+
{
|
|
413
|
+
type: "button",
|
|
414
|
+
variants: still ? void 0 : RISE,
|
|
415
|
+
onPointerEnter: () => setHover("go"),
|
|
416
|
+
onPointerLeave: () => setHover(null),
|
|
417
|
+
onClick: () => {
|
|
418
|
+
setGoing(true);
|
|
419
|
+
onContinue?.();
|
|
420
|
+
window.setTimeout(() => setGoing(false), 900);
|
|
421
|
+
},
|
|
422
|
+
whileTap: still ? void 0 : { scale: 0.98 },
|
|
423
|
+
className: "mt-5 flex h-12 w-full cursor-pointer items-center justify-center gap-2 rounded-full bg-[#242423] text-sm font-medium text-white outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2",
|
|
424
|
+
children: [
|
|
425
|
+
continueLabel,
|
|
426
|
+
/* @__PURE__ */ jsx(
|
|
427
|
+
motion.span,
|
|
428
|
+
{
|
|
429
|
+
className: "grid",
|
|
430
|
+
animate: going && !still ? { x: [0, 14, -14, 0], opacity: [1, 0, 0, 1] } : { x: hover === "go" && !still ? 3 : 0 },
|
|
431
|
+
transition: going ? { duration: 0.6, times: [0, 0.45, 0.46, 1] } : { type: "spring", stiffness: 500, damping: 24 },
|
|
432
|
+
children: /* @__PURE__ */ jsx(ArrowRightIcon, { className: "size-4", active: hover === "go" })
|
|
433
|
+
}
|
|
434
|
+
)
|
|
435
|
+
]
|
|
436
|
+
}
|
|
437
|
+
)
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
}
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
var OtpCode = React.forwardRef(
|
|
445
|
+
function OtpCode2({
|
|
446
|
+
length: lengthProp = 6,
|
|
447
|
+
channel = "email",
|
|
448
|
+
destination,
|
|
449
|
+
maskDestination = true,
|
|
450
|
+
split = true,
|
|
451
|
+
mask = false,
|
|
452
|
+
resendAfter = 30,
|
|
453
|
+
verify,
|
|
454
|
+
onVerified,
|
|
455
|
+
onResend,
|
|
456
|
+
onContinue,
|
|
457
|
+
continueLabel = "Continue",
|
|
458
|
+
onRememberDevice,
|
|
459
|
+
autoFocus = false,
|
|
460
|
+
className
|
|
461
|
+
}, ref) {
|
|
462
|
+
const length = Math.max(3, Math.min(8, Math.round(lengthProp)));
|
|
463
|
+
const still = !!useReducedMotion();
|
|
464
|
+
const id = React.useId();
|
|
465
|
+
const root = React.useRef(null);
|
|
466
|
+
React.useImperativeHandle(ref, () => root.current);
|
|
467
|
+
const input = React.useRef(null);
|
|
468
|
+
const seen = useInView(root, { once: true, amount: 0.4 });
|
|
469
|
+
const [value, setValue] = React.useState("");
|
|
470
|
+
const [focused, setFocused] = React.useState(false);
|
|
471
|
+
const [status, setStatus] = React.useState("idle");
|
|
472
|
+
const [error, setError] = React.useState(null);
|
|
473
|
+
const shake = useAnimationControls();
|
|
474
|
+
const appear = seen || still;
|
|
475
|
+
const enter = (delay) => ({
|
|
476
|
+
initial: still ? false : { opacity: 0, y: 10, filter: "blur(4px)" },
|
|
477
|
+
animate: appear ? { opacity: 1, y: 0, filter: "blur(0px)" } : void 0,
|
|
478
|
+
transition: { duration: 0.45, ease: GLIDE, delay: still ? 0 : delay }
|
|
479
|
+
});
|
|
480
|
+
const stack = React.useRef(null);
|
|
481
|
+
const [height, setHeight] = React.useState("auto");
|
|
482
|
+
React.useEffect(() => {
|
|
483
|
+
const el = stack.current;
|
|
484
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
485
|
+
const ro = new ResizeObserver(() => setHeight(el.offsetHeight));
|
|
486
|
+
ro.observe(el);
|
|
487
|
+
return () => ro.disconnect();
|
|
488
|
+
}, []);
|
|
489
|
+
const entry = React.useRef(null);
|
|
490
|
+
const [verifiedAt, setVerifiedAt] = React.useState(null);
|
|
491
|
+
React.useEffect(() => {
|
|
492
|
+
if (entry.current) entry.current.inert = status === "success";
|
|
493
|
+
}, [status]);
|
|
494
|
+
React.useEffect(() => {
|
|
495
|
+
setValue("");
|
|
496
|
+
setStatus("idle");
|
|
497
|
+
setError(null);
|
|
498
|
+
}, [length]);
|
|
499
|
+
React.useEffect(() => {
|
|
500
|
+
if (seen && autoFocus) input.current?.focus({ preventScroll: true });
|
|
501
|
+
}, [seen, autoFocus]);
|
|
502
|
+
const check = React.useCallback(
|
|
503
|
+
async (code) => {
|
|
504
|
+
setStatus("checking");
|
|
505
|
+
setError(null);
|
|
506
|
+
let ok = false;
|
|
507
|
+
try {
|
|
508
|
+
if (verify) {
|
|
509
|
+
const [res] = await Promise.all([
|
|
510
|
+
verify(code),
|
|
511
|
+
wait(still ? 0 : 600)
|
|
512
|
+
]);
|
|
513
|
+
ok = res;
|
|
514
|
+
} else {
|
|
515
|
+
await wait(900);
|
|
516
|
+
ok = true;
|
|
517
|
+
}
|
|
518
|
+
} catch {
|
|
519
|
+
ok = false;
|
|
520
|
+
}
|
|
521
|
+
if (ok) {
|
|
522
|
+
setStatus("success");
|
|
523
|
+
input.current?.blur();
|
|
524
|
+
onVerified?.(code);
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
setStatus("error");
|
|
528
|
+
setError("That code didn't match. Try again.");
|
|
529
|
+
if (!still)
|
|
530
|
+
void shake.start({
|
|
531
|
+
x: [0, -9, 9, -6, 6, -3, 0],
|
|
532
|
+
transition: { duration: 0.5 }
|
|
533
|
+
});
|
|
534
|
+
await wait(still ? 300 : 1100);
|
|
535
|
+
setValue("");
|
|
536
|
+
setStatus("idle");
|
|
537
|
+
input.current?.focus({ preventScroll: true });
|
|
538
|
+
},
|
|
539
|
+
[verify, onVerified, still, shake]
|
|
540
|
+
);
|
|
541
|
+
const onChange = (raw) => {
|
|
542
|
+
if (status === "checking" || status === "success") return;
|
|
543
|
+
const next = raw.replace(/\D/g, "").slice(0, length);
|
|
544
|
+
setValue(next);
|
|
545
|
+
if (status === "error") setStatus("idle");
|
|
546
|
+
if (next.length === length) void check(next);
|
|
547
|
+
};
|
|
548
|
+
const [left, setLeft] = React.useState(resendAfter);
|
|
549
|
+
const [spin, setSpin] = React.useState(false);
|
|
550
|
+
const [sent, setSent] = React.useState(false);
|
|
551
|
+
React.useEffect(() => setLeft(resendAfter), [resendAfter]);
|
|
552
|
+
React.useEffect(() => {
|
|
553
|
+
if (!seen || left <= 0 || status === "success") return;
|
|
554
|
+
const t = window.setTimeout(() => setLeft((s) => s - 1), 1e3);
|
|
555
|
+
return () => window.clearTimeout(t);
|
|
556
|
+
}, [left, seen, status]);
|
|
557
|
+
const resend = async () => {
|
|
558
|
+
setSpin(true);
|
|
559
|
+
try {
|
|
560
|
+
if (onResend) await onResend();
|
|
561
|
+
else await wait(700);
|
|
562
|
+
setSent(true);
|
|
563
|
+
setValue("");
|
|
564
|
+
setError(null);
|
|
565
|
+
setStatus("idle");
|
|
566
|
+
setLeft(resendAfter);
|
|
567
|
+
input.current?.focus({ preventScroll: true });
|
|
568
|
+
window.setTimeout(() => setSent(false), 2200);
|
|
569
|
+
} finally {
|
|
570
|
+
setSpin(false);
|
|
571
|
+
}
|
|
572
|
+
};
|
|
573
|
+
const shown = destination ?? (channel === "email" ? "jordan@lumen.app" : "+1 415 555 0182");
|
|
574
|
+
const where = maskDestination ? channel === "email" ? maskEmail(shown) : maskPhone(shown) : shown;
|
|
575
|
+
const first = split && length >= 4 ? Math.ceil(length / 2) : length;
|
|
576
|
+
const chars = Array.from({ length }, (_, i) => value[i] ?? "");
|
|
577
|
+
const activeIndex = focused && status === "idle" ? Math.min(value.length, length - 1) : -1;
|
|
578
|
+
const title = channel === "email" ? "Check your email" : "Check your phone";
|
|
579
|
+
const sub = `We sent ${length === 8 ? "an" : "a"} ${length} digit code to`;
|
|
580
|
+
const done = status === "success";
|
|
581
|
+
const HeadIcon = channel === "email" ? MailCheckIcon : SmartphoneNfcIcon;
|
|
582
|
+
const mm = Math.floor(Math.max(0, left) / 60);
|
|
583
|
+
const ss = String(Math.max(0, left) % 60).padStart(2, "0");
|
|
584
|
+
return /* @__PURE__ */ jsx(
|
|
585
|
+
motion.div,
|
|
586
|
+
{
|
|
587
|
+
ref: root,
|
|
588
|
+
initial: still ? false : { opacity: 0, y: 20, scale: 0.98, filter: "blur(6px)" },
|
|
589
|
+
animate: seen || still ? { opacity: 1, y: 0, scale: 1, filter: "blur(0px)" } : void 0,
|
|
590
|
+
transition: { duration: 0.6, ease: GLIDE },
|
|
591
|
+
className: cn(
|
|
592
|
+
"relative w-[380px] max-w-full overflow-hidden rounded-[32px] bg-white text-[#242423] shadow-[0_1px_2px_rgba(0,0,0,0.04),0_12px_32px_-16px_rgba(0,0,0,0.18)]",
|
|
593
|
+
className
|
|
594
|
+
),
|
|
595
|
+
children: /* @__PURE__ */ jsx(
|
|
596
|
+
motion.div,
|
|
597
|
+
{
|
|
598
|
+
initial: false,
|
|
599
|
+
animate: { height },
|
|
600
|
+
transition: still ? { duration: 0 } : { duration: 0.45, ease: GLIDE },
|
|
601
|
+
children: /* @__PURE__ */ jsxs("div", { ref: stack, className: "grid", children: [
|
|
602
|
+
/* @__PURE__ */ jsxs(
|
|
603
|
+
motion.div,
|
|
604
|
+
{
|
|
605
|
+
ref: entry,
|
|
606
|
+
"aria-hidden": done || void 0,
|
|
607
|
+
animate: done ? {
|
|
608
|
+
opacity: 0,
|
|
609
|
+
scale: still ? 1 : 0.97,
|
|
610
|
+
filter: still ? "blur(0px)" : "blur(6px)"
|
|
611
|
+
} : { opacity: 1, scale: 1, filter: "blur(0px)" },
|
|
612
|
+
transition: {
|
|
613
|
+
duration: still ? 0 : 0.35,
|
|
614
|
+
ease: GLIDE,
|
|
615
|
+
delay: done && !still ? 0.45 : 0
|
|
616
|
+
},
|
|
617
|
+
className: "col-start-1 row-start-1 p-6",
|
|
618
|
+
children: [
|
|
619
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center", children: [
|
|
620
|
+
/* @__PURE__ */ jsx(
|
|
621
|
+
motion.span,
|
|
622
|
+
{
|
|
623
|
+
initial: still ? false : { scale: 0.5, opacity: 0, rotate: -12 },
|
|
624
|
+
animate: appear ? { scale: 1, opacity: 1, rotate: 0 } : void 0,
|
|
625
|
+
transition: {
|
|
626
|
+
type: "spring",
|
|
627
|
+
stiffness: 420,
|
|
628
|
+
damping: 18,
|
|
629
|
+
delay: still ? 0 : 0.1
|
|
630
|
+
},
|
|
631
|
+
className: "grid size-14 place-items-center rounded-2xl bg-[#242423]/[0.05] text-[#242423]",
|
|
632
|
+
children: /* @__PURE__ */ jsx(
|
|
633
|
+
HeadIcon,
|
|
634
|
+
{
|
|
635
|
+
className: "size-6",
|
|
636
|
+
active: seen && status === "idle" && value.length === 0
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
}
|
|
640
|
+
),
|
|
641
|
+
/* @__PURE__ */ jsx(
|
|
642
|
+
motion.h3,
|
|
643
|
+
{
|
|
644
|
+
...enter(0.18),
|
|
645
|
+
className: "mt-5 text-2xl font-semibold tracking-tight",
|
|
646
|
+
children: /* @__PURE__ */ jsx(Roll, { children: title })
|
|
647
|
+
}
|
|
648
|
+
),
|
|
649
|
+
/* @__PURE__ */ jsxs(
|
|
650
|
+
motion.p,
|
|
651
|
+
{
|
|
652
|
+
...enter(0.25),
|
|
653
|
+
id: `${id}-sub`,
|
|
654
|
+
className: "mt-1.5 text-sm leading-relaxed text-zinc-500",
|
|
655
|
+
children: [
|
|
656
|
+
/* @__PURE__ */ jsx(Roll, { children: sub }),
|
|
657
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
658
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-[#242423]", children: where })
|
|
659
|
+
]
|
|
660
|
+
}
|
|
661
|
+
)
|
|
662
|
+
] }),
|
|
663
|
+
/* @__PURE__ */ jsxs(
|
|
664
|
+
motion.div,
|
|
665
|
+
{
|
|
666
|
+
animate: shake,
|
|
667
|
+
className: "relative mt-7",
|
|
668
|
+
onPointerDown: (e) => {
|
|
669
|
+
e.preventDefault();
|
|
670
|
+
input.current?.focus();
|
|
671
|
+
},
|
|
672
|
+
children: [
|
|
673
|
+
/* @__PURE__ */ jsx(
|
|
674
|
+
"input",
|
|
675
|
+
{
|
|
676
|
+
ref: input,
|
|
677
|
+
id: `${id}-code`,
|
|
678
|
+
value,
|
|
679
|
+
onChange: (e) => onChange(e.target.value),
|
|
680
|
+
onFocus: () => setFocused(true),
|
|
681
|
+
onBlur: () => setFocused(false),
|
|
682
|
+
inputMode: "numeric",
|
|
683
|
+
autoComplete: "one-time-code",
|
|
684
|
+
pattern: "[0-9]*",
|
|
685
|
+
maxLength: length,
|
|
686
|
+
disabled: status === "success",
|
|
687
|
+
"aria-label": `${length} digit verification code`,
|
|
688
|
+
"aria-describedby": `${id}-sub${error ? ` ${id}-error` : ""}`,
|
|
689
|
+
"aria-invalid": status === "error" || void 0,
|
|
690
|
+
className: "absolute inset-0 z-10 size-full cursor-text opacity-0",
|
|
691
|
+
style: { caretColor: "transparent" }
|
|
692
|
+
}
|
|
693
|
+
),
|
|
694
|
+
/* @__PURE__ */ jsxs(
|
|
695
|
+
"div",
|
|
696
|
+
{
|
|
697
|
+
className: "flex items-center justify-center gap-2",
|
|
698
|
+
"aria-hidden": true,
|
|
699
|
+
children: [
|
|
700
|
+
chars.slice(0, first).map((c, i) => /* @__PURE__ */ jsx(
|
|
701
|
+
Box,
|
|
702
|
+
{
|
|
703
|
+
index: i,
|
|
704
|
+
char: c,
|
|
705
|
+
active: activeIndex === i,
|
|
706
|
+
status,
|
|
707
|
+
mask,
|
|
708
|
+
still,
|
|
709
|
+
count: length,
|
|
710
|
+
shown: appear
|
|
711
|
+
},
|
|
712
|
+
i
|
|
713
|
+
)),
|
|
714
|
+
first < length && /* @__PURE__ */ jsx("span", { className: "mx-1 h-[2px] w-3 shrink-0 rounded-full bg-[#242423]/20" }),
|
|
715
|
+
chars.slice(first).map((c, j) => {
|
|
716
|
+
const i = first + j;
|
|
717
|
+
return /* @__PURE__ */ jsx(
|
|
718
|
+
Box,
|
|
719
|
+
{
|
|
720
|
+
index: i,
|
|
721
|
+
char: c,
|
|
722
|
+
active: activeIndex === i,
|
|
723
|
+
status,
|
|
724
|
+
mask,
|
|
725
|
+
still,
|
|
726
|
+
count: length,
|
|
727
|
+
shown: appear
|
|
728
|
+
},
|
|
729
|
+
i
|
|
730
|
+
);
|
|
731
|
+
})
|
|
732
|
+
]
|
|
733
|
+
}
|
|
734
|
+
)
|
|
735
|
+
]
|
|
736
|
+
}
|
|
737
|
+
),
|
|
738
|
+
/* @__PURE__ */ jsx(
|
|
739
|
+
"div",
|
|
740
|
+
{
|
|
741
|
+
className: "mt-4 flex h-5 items-center justify-center text-sm",
|
|
742
|
+
"aria-live": "polite",
|
|
743
|
+
children: /* @__PURE__ */ jsxs(AnimatePresence, { mode: "popLayout", initial: false, children: [
|
|
744
|
+
status === "checking" && /* @__PURE__ */ jsxs(
|
|
745
|
+
motion.span,
|
|
746
|
+
{
|
|
747
|
+
initial: { opacity: 0, y: 6 },
|
|
748
|
+
animate: { opacity: 1, y: 0 },
|
|
749
|
+
exit: { opacity: 0, y: -6 },
|
|
750
|
+
className: "flex items-center gap-2 text-zinc-500",
|
|
751
|
+
children: [
|
|
752
|
+
/* @__PURE__ */ jsx(LoaderCircleIcon, { className: "size-4", active: true }),
|
|
753
|
+
"Checking code"
|
|
754
|
+
]
|
|
755
|
+
},
|
|
756
|
+
"checking"
|
|
757
|
+
),
|
|
758
|
+
error && status !== "checking" && /* @__PURE__ */ jsxs(
|
|
759
|
+
motion.span,
|
|
760
|
+
{
|
|
761
|
+
id: `${id}-error`,
|
|
762
|
+
initial: { opacity: 0, y: 6 },
|
|
763
|
+
animate: { opacity: 1, y: 0 },
|
|
764
|
+
exit: { opacity: 0, y: -6 },
|
|
765
|
+
className: "flex items-center gap-2",
|
|
766
|
+
style: { color: BAD },
|
|
767
|
+
children: [
|
|
768
|
+
/* @__PURE__ */ jsx(BadgeAlertIcon, { className: "size-4", active: true }),
|
|
769
|
+
error
|
|
770
|
+
]
|
|
771
|
+
},
|
|
772
|
+
"error"
|
|
773
|
+
),
|
|
774
|
+
status === "success" && /* @__PURE__ */ jsx(
|
|
775
|
+
motion.span,
|
|
776
|
+
{
|
|
777
|
+
initial: { opacity: 0, y: 6 },
|
|
778
|
+
animate: { opacity: 1, y: 0 },
|
|
779
|
+
className: "flex items-center gap-2 font-medium",
|
|
780
|
+
style: { color: GOOD },
|
|
781
|
+
children: "Code accepted"
|
|
782
|
+
},
|
|
783
|
+
"ok"
|
|
784
|
+
)
|
|
785
|
+
] })
|
|
786
|
+
}
|
|
787
|
+
),
|
|
788
|
+
/* @__PURE__ */ jsx(
|
|
789
|
+
motion.div,
|
|
790
|
+
{
|
|
791
|
+
...enter(0.35 + length * 0.05),
|
|
792
|
+
className: "-mx-6 mt-5 flex items-center justify-center border-t border-[#242423]/[0.07] px-6 pt-5 text-sm text-zinc-500",
|
|
793
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", initial: false, children: sent ? /* @__PURE__ */ jsxs(
|
|
794
|
+
motion.span,
|
|
795
|
+
{
|
|
796
|
+
initial: { opacity: 0, y: 6 },
|
|
797
|
+
animate: { opacity: 1, y: 0 },
|
|
798
|
+
exit: { opacity: 0, y: -6 },
|
|
799
|
+
className: "flex items-center gap-1.5 font-medium",
|
|
800
|
+
style: { color: GOOD },
|
|
801
|
+
children: [
|
|
802
|
+
/* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-4", active: true }),
|
|
803
|
+
"New code sent"
|
|
804
|
+
]
|
|
805
|
+
},
|
|
806
|
+
"sent"
|
|
807
|
+
) : left > 0 ? /* @__PURE__ */ jsxs(
|
|
808
|
+
motion.span,
|
|
809
|
+
{
|
|
810
|
+
initial: { opacity: 0, y: 6 },
|
|
811
|
+
animate: { opacity: 1, y: 0 },
|
|
812
|
+
exit: { opacity: 0, y: -6 },
|
|
813
|
+
children: [
|
|
814
|
+
"Didn't get it? Resend in",
|
|
815
|
+
" ",
|
|
816
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium tabular-nums text-[#242423]", children: [
|
|
817
|
+
mm,
|
|
818
|
+
":",
|
|
819
|
+
ss
|
|
820
|
+
] })
|
|
821
|
+
]
|
|
822
|
+
},
|
|
823
|
+
"wait"
|
|
824
|
+
) : /* @__PURE__ */ jsxs(
|
|
825
|
+
motion.span,
|
|
826
|
+
{
|
|
827
|
+
initial: { opacity: 0, y: 6 },
|
|
828
|
+
animate: { opacity: 1, y: 0 },
|
|
829
|
+
exit: { opacity: 0, y: -6 },
|
|
830
|
+
className: "flex items-center gap-1",
|
|
831
|
+
children: [
|
|
832
|
+
"Didn't get it?",
|
|
833
|
+
/* @__PURE__ */ jsxs(
|
|
834
|
+
motion.button,
|
|
835
|
+
{
|
|
836
|
+
type: "button",
|
|
837
|
+
onClick: resend,
|
|
838
|
+
disabled: spin,
|
|
839
|
+
whileTap: still ? void 0 : { scale: 0.95 },
|
|
840
|
+
className: "flex cursor-pointer items-center gap-1.5 rounded-full px-2 py-1 font-medium text-[#242423] outline-none transition-colors hover:bg-[#242423]/[0.05] disabled:cursor-wait focus-visible:ring-2 focus-visible:ring-zinc-400",
|
|
841
|
+
children: [
|
|
842
|
+
/* @__PURE__ */ jsx(
|
|
843
|
+
RefreshCWIcon,
|
|
844
|
+
{
|
|
845
|
+
className: "size-3.5",
|
|
846
|
+
active: spin || void 0
|
|
847
|
+
}
|
|
848
|
+
),
|
|
849
|
+
"Resend code"
|
|
850
|
+
]
|
|
851
|
+
}
|
|
852
|
+
)
|
|
853
|
+
]
|
|
854
|
+
},
|
|
855
|
+
"resend"
|
|
856
|
+
) })
|
|
857
|
+
}
|
|
858
|
+
)
|
|
859
|
+
]
|
|
860
|
+
}
|
|
861
|
+
),
|
|
862
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: done && /* @__PURE__ */ jsx(
|
|
863
|
+
Confirmation,
|
|
864
|
+
{
|
|
865
|
+
channel,
|
|
866
|
+
where,
|
|
867
|
+
at: verifiedAt,
|
|
868
|
+
continueLabel,
|
|
869
|
+
onContinue,
|
|
870
|
+
onRemember: onRememberDevice,
|
|
871
|
+
still
|
|
872
|
+
},
|
|
873
|
+
"done"
|
|
874
|
+
) })
|
|
875
|
+
] })
|
|
876
|
+
}
|
|
877
|
+
)
|
|
878
|
+
}
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
);
|
|
882
|
+
|
|
883
|
+
export {
|
|
884
|
+
OtpCode
|
|
885
|
+
};
|