{"version":3,"file":"FramerBiteRichText.Bhfz1YO2.mjs","names":[],"sources":["https:/framerusercontent.com/modules/cSAsSdtgUJjmXaXrFZQ9/N4ADhrEdqO1QopvQqKf8/FramerBiteRichText.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n *\n */export default function RichText(props){const Tag=props.tag;const toggle=(isSolid,value)=>{return isSolid===false?value:\"unset\";};console.log(props.fontSize);return /*#__PURE__*/_jsx(Tag,{style:{textAlign:props.alignment},children:props.add.length>0?props.add.map(item=>item.type===\"text\"?/*#__PURE__*/_jsxs(\"span\",{className:\"title\",style:{color:item.colorType&&item.color,fontFamily:item.font.fontFamily,fontWeight:item.font.fontWeight,fontSize:item.font.fontSize?item.font?.fontSize:props.fontSize+\"px\",letterSpacing:item.font.letterSpacing,lineHeight:item.font.lineHeight,textAlign:item.font.textAlign,verticalAlign:\"middle\",marginRight:props.gap+\"px\",position:\"relative\",zIndex:\"1\",WebkitBackgroundClip:toggle(item.colorType,\"text\"),WebkitTextFillColor:toggle(item.colorType,\"transparent\"),backgroundImage:!item.colorType&&`linear-gradient(${item?.linear?.angle}deg,${item?.linear?.colors?.map(color=>color)})`},children:[console.log(toggle(item.colorType,\"text\")),item?.text,item.shape&&/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",top:item.top+\"%\",bottom:item.bottom+\"%\",left:item.left+\"%\",right:item.right+\"%\",zIndex:item.zindex},children:/*#__PURE__*/_jsx(\"img\",{style:{width:item.shapeSize+\"%\"},src:item.shapeImage})})]}):/*#__PURE__*/_jsx(\"img\",{src:item?.image,alt:\"alt\",style:{width:item.width+item.unit,height:item.height+item.unit,objectFit:\"cover\",borderRadius:item.borderRadius+\"px\",display:\"inline-block\",verticalAlign:\"middle\",marginRight:props.gap+\"px\"}})):\"Add Some Text From Control\"});}addPropertyControls(RichText,{fontSize:{type:ControlType.String,defaultValue:\"18\"},add:{type:ControlType.Array,title:\"Content\",control:{type:ControlType.Object,controls:{type:{type:ControlType.Enum,defaultValue:\"text\",options:[\"text\",\"image\"],optionTitles:[\"Text\",\"Image\"]},text:{type:ControlType.String,defaultValue:\"Some Awesome Line\",hidden(props){return props.type===\"image\";}},image:{type:ControlType.Image,hidden(props){return props.type===\"text\";}},width:{type:ControlType.Number,defaultValue:100,hidden(props){return props.type===\"text\";}},height:{type:ControlType.Number,defaultValue:100,hidden(props){return props.type===\"text\";}},unit:{type:ControlType.Enum,defaultValue:\"px\",options:[\"px\",\"%\"],optionTitles:[\"Pixel\",\"Percent\"],hidden(props){return props.type===\"text\";}},borderRadius:{type:ControlType.Number,defaultValue:100,hidden(props){return props.type===\"text\";}},font:{type:ControlType.Font,controls:\"extended\",hidden(props){return props.type===\"image\";}},shape:{type:ControlType.Boolean,defaultValue:false,enabledTitle:\"Show\",disabledTitle:\"Hide\"},shapeImage:{type:ControlType.Image,hidden(props){return props.shape===false;}},top:{type:ControlType.Number,hidden(props){return props.shape===false;}},left:{type:ControlType.Number,hidden(props){return props.shape===false;}},right:{type:ControlType.Number,hidden(props){return props.shape===false;}},bottom:{type:ControlType.Number,hidden(props){return props.shape===false;}},zindex:{type:ControlType.Number,title:\"z-index\",displayStepper:true,hidden(props){return props.shape===false;}},shapeSize:{type:ControlType.Number,defaultValue:100,hidden(props){return props.shape===false;}},colorType:{type:ControlType.Boolean,enabledTitle:\"Solid\",disabledTitle:\"Linear\",defaultValue:true},color:{type:ControlType.Color,defaultValue:\"#000\",hidden(props){return!props.colorType;}},linear:{type:ControlType.Object,hidden(props){return props.colorType;},controls:{angle:{type:ControlType.Number,unit:\"\\xb0\",min:0,max:360,step:.1,displayStepper:true},colors:{type:ControlType.Array,control:{type:ControlType.Color},defaultValue:[\"#090979\",\"#00d4ff\"]}}}}}},gap:{type:ControlType.Number,defaultValue:12},tag:{type:ControlType.Enum,defaultValue:\"h1\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\",\"span\"],optionTitles:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\",\"span\"]},alignment:{type:ControlType.Enum,defaultValue:\"center\",options:[\"left\",\"center\",\"right\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RichText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FramerBiteRichText.map"],"mappings":"wOASG,SAAwB,EAAS,EAAM,CAAC,IAAM,EAAI,EAAM,IAAU,GAAQ,EAAQ,IAAgB,IAAU,GAAM,EAAM,QAAsC,OAA5B,QAAQ,IAAI,EAAM,SAAS,CAAqB,EAAK,EAAI,CAAC,MAAM,CAAC,UAAU,EAAM,UAAU,CAAC,SAAS,EAAM,IAAI,OAAO,EAAE,EAAM,IAAI,IAAI,GAAM,EAAK,OAAO,OAAoB,EAAM,OAAO,CAAC,UAAU,QAAQ,MAAM,CAAC,MAAM,EAAK,WAAW,EAAK,MAAM,WAAW,EAAK,KAAK,WAAW,WAAW,EAAK,KAAK,WAAW,SAAS,EAAK,KAAK,SAAS,EAAK,MAAM,SAAS,EAAM,SAAS,KAAK,cAAc,EAAK,KAAK,cAAc,WAAW,EAAK,KAAK,WAAW,UAAU,EAAK,KAAK,UAAU,cAAc,SAAS,YAAY,EAAM,IAAI,KAAK,SAAS,WAAW,OAAO,IAAI,qBAAqB,EAAO,EAAK,UAAU,OAAO,CAAC,oBAAoB,EAAO,EAAK,UAAU,cAAc,CAAC,gBAAgB,CAAC,EAAK,WAAW,mBAAmB,GAAM,QAAQ,MAAM,MAAM,GAAM,QAA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