{"version":3,"file":"RotatingText.CgjuGaYA.mjs","names":["useState","useId"],"sources":["https:/framerusercontent.com/modules/lJlvT3MNaEmksgKmhoXH/pSb6oSkmUz1HyEaVONyI/RotatingText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useId,useState}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";import{useReducedMotion}from\"framer-motion\";const horizontalMap={left:\"flex-start\",center:\"center\",right:\"flex-end\"};const verticalMap={top:\"flex-start\",center:\"center\",bottom:\"flex-end\"};const originMap={\"top-left\":\"0% 0%\",\"top-center\":\"50% 0%\",\"top-right\":\"100% 0%\",\"center-left\":\"0% 50%\",center:\"50% 50%\",\"center-right\":\"100% 50%\",\"bottom-left\":\"0% 100%\",\"bottom-center\":\"50% 100%\",\"bottom-right\":\"100% 100%\"};/**\n * @framerIntrinsicWidth 320\n * @framerIntrinsicHeight 120\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function RotatingText(props){const{text=\"ROTATING TEXT\",color=\"#FFFFFF\",backgroundFill=\"rgba(0, 0, 0, 0)\",padding=\"0px\",borderRadius=\"0px\",font={},rotation=-8,animate=false,duration=8,direction=\"clockwise\",pauseOnHover=true,origin=\"center\",horizontalAlignment=\"center\",verticalAlignment=\"center\",wrap=false,clip=false,ariaLabel=\"\",style}=props;const isStaticRenderer=useIsStaticRenderer();const prefersReducedMotion=useReducedMotion();const[isHovered,setIsHovered]=useState(false);const instanceId=useId().replace(/[^a-zA-Z0-9_-]/g,\"\");const animationName=`rotatingText_${instanceId}`;const directionMultiplier=direction===\"clockwise\"?1:-1;const finalRotation=rotation+360*directionMultiplier;const shouldAnimate=animate&&!isStaticRenderer&&!prefersReducedMotion;const safeDuration=Math.max(.1,duration);const keyframes=`\n        @keyframes ${animationName} {\n            from { transform: rotate(${rotation}deg); }\n            to { transform: rotate(${finalRotation}deg); }\n        }\n    `;return /*#__PURE__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:horizontalMap[horizontalAlignment],alignItems:verticalMap[verticalAlignment],overflow:\"visible\",boxSizing:\"border-box\"},onMouseEnter:()=>pauseOnHover&&setIsHovered(true),onMouseLeave:()=>pauseOnHover&&setIsHovered(false),\"aria-label\":ariaLabel||undefined,children:[shouldAnimate&&/*#__PURE__*/_jsx(\"style\",{children:keyframes}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",display:\"inline-flex\",width:wrap?\"100%\":\"max-content\",maxWidth:wrap?\"100%\":\"none\",flexShrink:0,backgroundColor:backgroundFill,padding,borderRadius,overflow:clip?\"hidden\":\"visible\",boxSizing:\"border-box\",transform:`rotate(${rotation}deg)`,transformOrigin:originMap[origin],animation:shouldAnimate?`${animationName} ${safeDuration}s linear infinite`:\"none\",animationPlayState:shouldAnimate&&pauseOnHover&&isHovered?\"paused\":\"running\",willChange:shouldAnimate?\"transform\":\"auto\",backfaceVisibility:\"hidden\"},children:/*#__PURE__*/_jsx(\"span\",{style:{...font,display:\"block\",width:wrap?\"100%\":\"max-content\",minWidth:wrap?0:\"max-content\",margin:0,color,textAlign:horizontalAlignment,whiteSpace:wrap?\"pre-wrap\":\"pre\",overflowWrap:wrap?\"anywhere\":\"normal\",WebkitFontSmoothing:\"antialiased\",textRendering:\"geometricPrecision\"},children:text})})]});}RotatingText.displayName=\"Rotating Text\";addPropertyControls(RotatingText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"ROTATING TEXT\",displayTextArea:true},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",displayTextAlignment:false,defaultValue:{variant:\"Bold\",fontSize:\"48px\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF\"},backgroundFill:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgba(0, 0, 0, 0)\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"0px\"},borderRadius:{type:ControlType.BorderRadius,title:\"Radius\",defaultValue:\"0px\"},rotation:{type:ControlType.Number,title:\"Rotation\",defaultValue:-8,min:-360,max:360,step:1,unit:\"deg\",displayStepper:true},origin:{type:ControlType.Enum,title:\"Origin\",defaultValue:\"center\",options:[\"top-left\",\"top-center\",\"top-right\",\"center-left\",\"center\",\"center-right\",\"bottom-left\",\"bottom-center\",\"bottom-right\"],optionTitles:[\"Top Left\",\"Top Center\",\"Top Right\",\"Center Left\",\"Center\",\"Center Right\",\"Bottom Left\",\"Bottom Center\",\"Bottom Right\"]},horizontalAlignment:{type:ControlType.Enum,title:\"Align\",defaultValue:\"center\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true},verticalAlignment:{type:ControlType.Enum,title:\"Vertical\",defaultValue:\"center\",options:[\"top\",\"center\",\"bottom\"],optionTitles:[\"Top\",\"Middle\",\"Bottom\"],displaySegmentedControl:true},wrap:{type:ControlType.Boolean,title:\"Wrap\",defaultValue:false},clip:{type:ControlType.Boolean,title:\"Clip\",defaultValue:false},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:false},direction:{type:ControlType.Enum,title:\"Direction\",defaultValue:\"clockwise\",options:[\"clockwise\",\"counterclockwise\"],optionTitles:[\"Clockwise\",\"Counter\"],displaySegmentedControl:true,hidden:({animate})=>!animate},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:8,min:.5,max:30,step:.5,unit:\"s\",hidden:({animate})=>!animate},pauseOnHover:{type:ControlType.Boolean,title:\"Hover Pause\",defaultValue:true,hidden:({animate})=>!animate},ariaLabel:{type:ControlType.String,title:\"ARIA Label\",defaultValue:\"\",placeholder:\"Optional accessible label\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RotatingText\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framer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