{"version":3,"file":"Currency_Input_Component.CP_nickE.mjs","names":["useState","value"],"sources":["https:/framerusercontent.com/modules/bDslkUvas5SpTsWf0S98/9oBLADMfGSlXN5Q1QC4X/Text_Component.js","https:/framerusercontent.com/modules/GeN6NtxWbenLtLeejd04/iFHRyuaLQ4zBLG9YraCQ/Currency_Input_Component.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx}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/components/auto-sizing\n *\n * @framerSupportedLayoutWidth any-prefer-fix\n * @framerSupportedLayoutHeight any-prefer-fix\n */export default function Text_Component(props){// This is a React component containing an Example component\n// Replace <Example /> with your own code\nconst{customId,text,font,fontSize,color,textAlign}=props;const parsedFontFamily=props?.font?.fontFamily?font.fontFamily.replace(/['\"]+/g,\"\"):\"Inter\";return /*#__PURE__*/_jsx(\"p\",{id:customId,style:{fontFamily:parsedFontFamily,fontWeight:font.fontWeight,color,fontSize:`${fontSize}px`,margin:0,textAlign},children:text});}addPropertyControls(Text_Component,{customId:{type:ControlType.String,title:\"ID\",description:\"Please do not change ID value!\"},text:{type:ControlType.String,title:\"Text\",defaultValue:\"$0\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{family:\"Inter\",weight:400,size:16}},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:8,max:100},textAlign:{type:ControlType.Enum,title:\"Text Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#ff0000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Text_Component\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fix\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any-prefer-fix\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Text_Component.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/components/auto-sizing\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function Currency_Input_Component(props){const[value,setValue]=useState();const{label,placeholder,type,min,font,fontSize,color,placeholderColor,opacity,fill,positionType,borderRadius,padding,border,shadow,focusEffect,customId,textAlign}=props;const parsedFontFamily=props?.font?.fontFamily?props.font.fontFamily.replace(/['\"]+/g,\"\"):\"Sofia\";const formatNumber=value=>{const cleanedValue=value.replace(/[^\\d.]/g,\"\");const parts=cleanedValue.split(\".\");parts[0]=parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g,\",\");return\"$\"+parts.join(\".\");};const handleInputChange=e=>{const inputValue=e.target.value;setValue(formatNumber(inputValue));};return /*#__PURE__*/_jsx(\"input\",{id:customId,placeholder:placeholder,type:\"text\",value:value,min:min,onChange:handleInputChange,style:{color:placeholderColor,fontFamily:parsedFontFamily,fontWeight:font.weight,fontSize:`${fontSize}px`,borderRadius:`${borderRadius}px`,padding:`${padding}px`,border:`1px ${border.style} ${border.color}`,width:\"100%\",height:\"100%\",textAlign}});}addPropertyControls(Currency_Input_Component,{placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"$0\"},textAlign:{type:ControlType.Enum,title:\"Text Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\"},min:{type:ControlType.Number,title:\"Min\",defaultValue:0,min:0},font:{type:ControlType.Font,title:\"Font\",defaultValue:{family:\"Inter\",weight:400,size:16}},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:8,max:100,unit:\"px\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#999999\"},placeholderColor:{type:ControlType.Color,title:\"Placeholder Color\",defaultValue:\"#999999\"},opacity:{type:ControlType.Number,title:\"Opacity\",defaultValue:1,min:0,max:1,step:.1},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:10,min:0,max:50},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:12,min:0,max:50},border:{type:ControlType.Object,title:\"Border\",controls:{style:{type:ControlType.Enum,options:[\"solid\",\"dashed\",\"none\"],optionTitles:[\"Solid\",\"Dashed\",\"None\"],defaultValue:\"solid\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#999999\"}}},customId:{title:\"ID\",type:ControlType.String,defaultValue:\"test-id\",description:\"Please do not change ID value!!!!\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Currency_Input_Component\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Currency_Input_Component.map"],"mappings":"kQAQG,SAAwB,EAAe,EAAM,CAEhD,GAAK,CAAC,WAAS,OAAK,OAAK,WAAS,QAAM,aAAW,EAAY,EAAiB,GAAO,MAAM,WAAW,EAAK,WAAW,QAAQ,SAAS,GAAG,CAAC,QAAQ,OAAoB,EAAK,IAAI,CAAC,GAAG,EAAS,MAAM,CAAC,WAAW,EAAiB,WAAW,EAAK,WAAW,QAAM,SAAS,GAAG,EAAS,IAAI,OAAO,EAAE,YAAU,CAAC,SAAS,EAAK,CAAC,kBARpR,IAAoD,CAQkO,EAAoB,EAAe,CAAC,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,KAAK,YAAY,iCAAiC,CAAC,KAAK,CAAC,KAAK,EAAY,OAAO,MAAM,OAAO,aAAa,KAAK,CAAC,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,OAAO,aAAa,CAAC,OAAO,QAAQ,OA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