{"version":3,"file":"MeshGradientText.BDoH103D.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/caEhD4xKjLkIQHH46xzk/O61ciVFC3YSOr3RT4CU2/MeshGradientText.js"],"sourcesContent":["// Text with customizable mesh gradient fill (4-corner gradient) and font controls\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function MeshGradientText(props){const{text,topLeft,topRight,bottomLeft,bottomRight,font,tag=\"span\"}=props;const gradientId=useMemo(()=>`mesh-gradient-${Math.random().toString(36).substr(2,9)}`,[]);const isFixedWidth=props.style?.width===\"100%\";const Component=tag;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",display:\"block\",width:\"100%\"},children:[/*#__PURE__*/_jsx(\"svg\",{width:\"0\",height:\"0\",style:{position:\"absolute\"},children:/*#__PURE__*/_jsxs(\"defs\",{children:[/*#__PURE__*/_jsxs(\"linearGradient\",{id:`${gradientId}-horizontal-top`,x1:\"0%\",y1:\"0%\",x2:\"100%\",y2:\"0%\",children:[/*#__PURE__*/_jsx(\"stop\",{offset:\"0%\",stopColor:topLeft}),/*#__PURE__*/_jsx(\"stop\",{offset:\"100%\",stopColor:topRight})]}),/*#__PURE__*/_jsxs(\"linearGradient\",{id:`${gradientId}-horizontal-bottom`,x1:\"0%\",y1:\"0%\",x2:\"100%\",y2:\"0%\",children:[/*#__PURE__*/_jsx(\"stop\",{offset:\"0%\",stopColor:bottomLeft}),/*#__PURE__*/_jsx(\"stop\",{offset:\"100%\",stopColor:bottomRight})]}),/*#__PURE__*/_jsxs(\"linearGradient\",{id:`${gradientId}-mesh`,x1:\"0%\",y1:\"0%\",x2:\"0%\",y2:\"100%\",children:[/*#__PURE__*/_jsx(\"stop\",{offset:\"0%\",stopColor:\"url(#mesh-gradient-horizontal-top)\"}),/*#__PURE__*/_jsx(\"stop\",{offset:\"100%\",stopColor:\"url(#mesh-gradient-horizontal-bottom)\"})]}),/*#__PURE__*/_jsxs(\"radialGradient\",{id:gradientId,children:[/*#__PURE__*/_jsx(\"stop\",{offset:\"0%\",style:{stopColor:topLeft}}),/*#__PURE__*/_jsx(\"stop\",{offset:\"33%\",style:{stopColor:topRight}}),/*#__PURE__*/_jsx(\"stop\",{offset:\"66%\",style:{stopColor:bottomLeft}}),/*#__PURE__*/_jsx(\"stop\",{offset:\"100%\",style:{stopColor:bottomRight}})]})]})}),/*#__PURE__*/_jsx(Component,{style:{...font,margin:0,background:`\n                        radial-gradient(circle at 0% 0%, ${topLeft} 0%, transparent 50%),\n                        radial-gradient(circle at 100% 0%, ${topRight} 0%, transparent 50%),\n                        radial-gradient(circle at 0% 100%, ${bottomLeft} 0%, transparent 50%),\n                        radial-gradient(circle at 100% 100%, ${bottomRight} 0%, transparent 50%),\n                        linear-gradient(135deg, ${topLeft}, ${topRight}, ${bottomRight}, ${bottomLeft})\n                    `,WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",backgroundClip:\"text\",display:\"block\",width:\"100%\",whiteSpace:\"pre-wrap\",wordBreak:\"break-word\",overflowWrap:\"break-word\"},children:text})]});}addPropertyControls(MeshGradientText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Mesh Gradient\",displayTextArea:true},tag:{type:ControlType.Enum,title:\"HTML Tag\",options:[\"span\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\"],optionTitles:[\"Span\",\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\",\"P\"],defaultValue:\"span\",displaySegmentedControl:false},topLeft:{type:ControlType.Color,title:\"Top Left\",defaultValue:\"#FF5588\"},topRight:{type:ControlType.Color,title:\"Top Right\",defaultValue:\"#8855FF\"},bottomLeft:{type:ControlType.Color,title:\"Bottom Left\",defaultValue:\"#FFBB00\"},bottomRight:{type:ControlType.Color,title:\"Bottom Right\",defaultValue:\"#0099FF\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"40px\",variant:\"Bold\",letterSpacing:\"-0.04em\",lineHeight:\"1em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"MeshGradientText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MeshGradientText.map"],"mappings":"iLAIG,SAAwB,EAAiB,EAAM,CAAC,GAAK,CAAC,OAAK,UAAQ,WAAS,aAAW,cAAY,OAAK,MAAI,QAAQ,EAAY,EAAWA,MAAY,iBAAiB,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,EAAqB,EAAM,OAAO,MAAe,IAAM,EAAU,EAAI,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,QAAQ,QAAQ,MAAM,MAAM,EAAE,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,IAAI,OAAO,IAAI,MAAM,CAAC,SAAS,UAAU,EAAE,SAAsB,EAAM,OAAO,CAAC,SAAS,CAAc,EAAM,iBAAiB,CAAC,GAAG,GAAG,EAAW,iBAAiB,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,SAAS,CAAc,EAAK,OAAO,CAAC,OAAO,KAAK,UAAU,CAAO,CAAC,EAAe,EAAK,OAAO,CAAC,OAAO,OAAO,UAAU,CAAQ,CAAC,CAAC,CAAC,CAAC,EAAe,EAAM,iBAAiB,CAAC,GAAG,GAAG,EAAW,oBAAoB,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,SAAS,CAAc,EAAK,OAAO,CAAC,OAAO,KAAK,UAAU,C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