{"version":3,"file":"CheckTick.WSymw3QC.mjs","names":["useRef","useState","__esmMin","_e","p","c","init_jsx_runtime","ce","init_npm_react_18_3_1","de","addPropertyControls","init_framer_BisrWwwE","RenderTarget","ControlType","CheckTick","ref","isStatic","on","setOn","io","e","now","at","nextSlot","delay","CSS","from","to","icon","init_CheckTick"],"sources":["https:/framerusercontent.com/modules/a4wRlEcJpax5MBh8btz3/MKZn3LaH1oeKjodtXlmJ/CheckTick.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const CSS=`\n.amxck{position:relative;width:100%;height:100%;border-radius:100%;box-sizing:border-box;border:1.5px solid rgba(10,10,10,.16);background:#fff;transition:border-color .3s ease}\n.amxck-fill{position:absolute;inset:-1.5px;border-radius:100%;opacity:0;transform:scale(.6);transition:opacity .3s ease,transform .45s cubic-bezier(.34,1.56,.64,1)}\n.amxck svg{position:absolute;inset:0;width:100%;height:100%}\n.amxck path{stroke-dasharray:24;stroke-dashoffset:24;transition:stroke-dashoffset .38s cubic-bezier(.65,0,.35,1) .14s}\n.amxck.on{border-color:transparent}\n.amxck.on .amxck-fill{opacity:1;transform:scale(1)}\n.amxck.on path{stroke-dashoffset:0}\n@media (prefers-reduced-motion: reduce){.amxck *{transition:none !important}}\n`;// Ticks that come into view together are queued so they fire one after another, like someone working down a list.\nlet nextSlot=0;/**\n * A checklist tick that fills with the brand gradient and draws its check when scrolled into view.\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function CheckTick({delay,from,to,icon,style}){const ref=useRef(null);const isStatic=RenderTarget.current()!==RenderTarget.preview;const[on,setOn]=useState(isStatic);useEffect(()=>{if(isStatic||!ref.current)return;let t;const io=new IntersectionObserver(([e])=>{if(!e.isIntersecting)return;const now=performance.now();const at=Math.max(now+500,nextSlot)// let the row's own fade-in land first\n;nextSlot=at+delay*1e3;t=setTimeout(()=>setOn(true),at-now);io.disconnect();},{threshold:1,rootMargin:\"0px 0px -12% 0px\"});io.observe(ref.current);return()=>{io.disconnect();clearTimeout(t);};},[delay,isStatic]);return /*#__PURE__*/_jsxs(\"div\",{ref:ref,className:\"amxck\"+(on?\" on\":\"\"),style:style,\"aria-hidden\":true,children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"div\",{className:\"amxck-fill\",style:{background:`linear-gradient(135deg, ${from}, ${to})`}}),/*#__PURE__*/_jsx(\"svg\",{viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"#fff\",strokeWidth:2.6,strokeLinecap:\"round\",strokeLinejoin:\"round\",children:icon===\"cross\"?/*#__PURE__*/_jsx(\"path\",{d:\"M8.6 8.6l6.8 6.8M15.4 8.6l-6.8 6.8\"}):/*#__PURE__*/_jsx(\"path\",{d:\"M7 12.5l3.2 3.2L17 9\"})})]});}CheckTick.defaultProps={delay:.32,from:\"#FF3EA5\",to:\"#FF8D29\",icon:\"check\"};addPropertyControls(CheckTick,{icon:{type:ControlType.Enum,title:\"Icon\",options:[\"check\",\"cross\"],optionTitles:[\"Tick\",\"Cross\"],defaultValue:\"check\",displaySegmentedControl:true},delay:{type:ControlType.Number,title:\"Gap\",min:0,max:2,step:.02,unit:\"s\",defaultValue:.32},from:{type:ControlType.Color,title:\"From\",defaultValue:\"#FF3EA5\"},to:{type:ControlType.Color,title:\"To\",defaultValue:\"#FF8D29\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CheckTick\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CheckTick.map"],"mappings":"A,uMAcG,SAAwBc,EAAU,CAAC,QAAM,OAAK,KAAG,OAAK,SAAO,CAA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