{"version":3,"file":"RotatingPromise.mUIfp2_l.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/qMcKFgR7jBdGxWnPU0lw/3S1R1l5dMbnLU22UZ4AZ/RotatingPromise.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// The rotating promise. \"Headline\" style: the hero H1 — the changing word in\n// brand pink on its own line, sliding up out of a mask that clears Poppins'\n// deep descenders, above the fixed line. \"Line\" style: the footer sentence —\n// the changing word in bold, swapping in place. Sizes follow the site's\n// breakpoints (≥1200 / 810–1199 / <810 / ≤359) and are editable here.\n// Headline sits .055em to the left: at display sizes Poppins' side bearing\n// pushes the stems of B, E and \"made\" in from the page edge, so the pull puts\n// them on the same edge as the lead and the buttons below (round C and T overhang\n// by a hair, as optical alignment wants).\nconst CSS=`\n.rp-h{margin:0 0 0 -.055em;font-family:Poppins,\"Poppins Placeholder\",sans-serif;font-weight:500;line-height:1}\n.rp-h .rp-mp{display:block;white-space:nowrap}\n.rp-rot{display:block;position:relative;height:1.32em;margin-bottom:-.126em;overflow:hidden}\n.rp-rot b{display:block;font-weight:500;line-height:1.22;padding-bottom:.1em;white-space:nowrap}\n.rp-rot b.out{position:absolute;inset:0 auto auto 0;animation:rpOut .7s cubic-bezier(.2,.7,.1,1) forwards}\n.rp-rot b.enter{animation:rpIn .7s cubic-bezier(.2,.7,.1,1) both}\n@keyframes rpOut{to{transform:translateY(-70%);opacity:0}}\n@keyframes rpIn{from{transform:translateY(70%);opacity:0}}\n.rp-l{margin:0;font-family:Poppins,\"Poppins Placeholder\",sans-serif;font-weight:400}\n.rp-l b{font-weight:500}\n`;/**\n * Rotating Promise\n *\n * @framerIntrinsicWidth 760\n * @framerIntrinsicHeight 190\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */// Round and open capitals (C, G, O, Q, S, T, A, V, W, Y…) carry little side bearing,\n// so they take back .03em of the headline's pull and overhang only by a hair.\nconst opticalReturn=word=>/^[ACGJOQSTVWXYZ]/.test(word)?\".03em\":undefined;export default function RotatingPromise(props){const{variant,words,suffix,interval,wordColor,color,boldColor}=props;const list=words&&words.length?words:[\"Brands\"];const[i,setI]=useState(0);const[prev,setPrev]=useState(null);useEffect(()=>{if(list.length<2||window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches)return;const t=window.setInterval(()=>{setI(cur=>{setPrev(cur);return(cur+1)%list.length;});},Math.max(600,interval*1e3));return()=>window.clearInterval(t);},[list.length,interval]);if(variant===\"Line\"){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsxs(\"p\",{className:\"rp-l\",style:{...props.style,fontSize:props.lineSize,color},children:[/*#__PURE__*/_jsx(\"b\",{style:{color:boldColor},children:list[i%list.length]}),\" \",suffix]})]});}const sizes=`\n.rp-h.${\"rp\"}{font-size:${props.sizeDesktop}px;letter-spacing:${props.trackDesktop}em}\n@media (max-width:1199.98px){.rp-h.rp{font-size:${props.sizeTablet}px;letter-spacing:${props.trackTablet}em}}\n@media (min-width:1200px) and (max-height:860px){.rp-h.rp{font-size:${props.sizeTablet}px}}\n@media (max-width:809.98px){.rp-h.rp{font-size:${props.sizePhone}px;letter-spacing:${props.trackPhone}em;line-height:1.02}.rp-h.rp .rp-mp{white-space:normal}}\n@media (max-width:359.98px){.rp-h.rp{font-size:${props.sizeSmall}px;letter-spacing:${props.trackSmall}em}}\n`;return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS+sizes}}),/*#__PURE__*/_jsxs(\"h1\",{className:\"rp-h rp\",style:{...props.style,color},children:[/*#__PURE__*/_jsxs(\"span\",{className:\"rp-rot\",style:{color:wordColor},children:[prev!==null&&/*#__PURE__*/_jsx(\"b\",{className:\"out\",style:{marginLeft:opticalReturn(list[prev%list.length])},children:list[prev%list.length]},\"o\"+prev+i),/*#__PURE__*/_jsx(\"b\",{className:prev!==null?\"enter\":\"\",style:{marginLeft:opticalReturn(list[i%list.length])},children:list[i%list.length]},\"i\"+i)]}),\" \",/*#__PURE__*/_jsx(\"span\",{className:\"rp-mp\",children:suffix})]})]});}RotatingPromise.defaultProps={variant:\"Headline\",words:[\"Everything\",\"Things\",\"Brands\",\"Celebrations\"],suffix:\"made presentable.\",interval:1.8,wordColor:\"#FF00BF\",color:\"#F2F2F4\",boldColor:\"#F2F2F4\",sizeDesktop:84,sizeTablet:72,sizePhone:46,sizeSmall:38,trackDesktop:-.03,trackTablet:-.029,trackPhone:-.026,trackSmall:-.024,lineSize:14};const isLine=p=>p.variant===\"Line\";const isHead=p=>p.variant!==\"Line\";addPropertyControls(RotatingPromise,{variant:{type:ControlType.Enum,title:\"Style\",options:[\"Headline\",\"Line\"],displaySegmentedControl:true},words:{type:ControlType.Array,title:\"Words\",control:{type:ControlType.String}},suffix:{type:ControlType.String,title:\"Then\"},interval:{type:ControlType.Number,title:\"Every\",min:.6,max:10,step:.1,unit:\"s\"},wordColor:{type:ControlType.Color,title:\"Word\",hidden:isLine},color:{type:ControlType.Color,title:\"Text\"},boldColor:{type:ControlType.Color,title:\"Word\",hidden:isHead},sizeDesktop:{type:ControlType.Number,title:\"Desktop\",min:12,max:200,unit:\"px\",hidden:isLine},sizeTablet:{type:ControlType.Number,title:\"Tablet\",min:12,max:200,unit:\"px\",hidden:isLine},sizePhone:{type:ControlType.Number,title:\"Phone\",min:12,max:200,unit:\"px\",hidden:isLine},sizeSmall:{type:ControlType.Number,title:\"≤359\",min:12,max:200,unit:\"px\",hidden:isLine},trackDesktop:{type:ControlType.Number,title:\"Track D\",min:-.1,max:.1,step:.001,unit:\"em\",hidden:isLine},trackTablet:{type:ControlType.Number,title:\"Track T\",min:-.1,max:.1,step:.001,unit:\"em\",hidden:isLine},trackPhone:{type:ControlType.Number,title:\"Track P\",min:-.1,max:.1,step:.001,unit:\"em\",hidden:isLine},trackSmall:{type:ControlType.Number,title:\"Track S\",min:-.1,max:.1,step:.001,unit:\"em\",hidden:isLine},lineSize:{type:ControlType.Number,title:\"Size\",min:10,max:40,unit:\"px\",hidden:isHead}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingPromise\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./RotatingPromise.map"],"mappings":"6MA6B0E,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,UAAQ,QAAM,SAAO,WAAS,YAAU,QAAM,aAAW,EAAY,EAAK,GAAO,EAAM,OAAO,EAAM,CAAC,QAAQ,EAAO,CAAC,EAAE,GAAMA,EAAS,CAAC,EAAO,CAAC,EAAK,GAASA,EAAS,IAAI,EAAuR,GAArR,MAAc,CAAC,GAAG,EAAK,OAAO,GAAG,EAAO,WAAW,kCAAkC,CAAC,CAAC,QAAQ,OAAO,IAAM,EAAE,EAAO,gBAAgB,CAAC,EAAK,IAAM,EAAQ,CAAG,GAAS,EAAI,GAAG,EAAK,OAAQ,CAAE,EAAE,KAAK,IAAI,IAAI,EAAS,GAAG,CAAC,EAAE,UAAU,EAAO,cAAc,CAAC,CAAE,EAAE,CAAC,EAAK,OAAO,CAAQ,CAAC,EAAK,IAAU,OAAQ,OAAoB,EAAMC,EAAU,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAO,CAAG,CAAC,CAAC,EAAe,EAAM,IAAI,CAAC,UAAU,OAAO,MAAM,CAAC,GAAG,EAAM,MAAM,SAAS,EAAM,SAAS,OAAK,EAAE,SAAS,CAAc,EAAK,IAAI,CAAC,MAAM,CAAC,MAAM,CAAS,EAAE,SAAS,EAAK,EAAE,EAAK,OAAO,CAAC,EAAE,IAAI,CAAM,CAAC,CAAC,CAAC,CAAC,CAAC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