{"version":3,"file":"ScalableVector.CLqUD_oj.mjs","names":[],"sources":["https:/framerusercontent.com/modules/rlDuNx3lCYpJ20DY3YAC/JFTnrOIuqanBfAnhhc79/ScalableVector.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * ScalableVector Component\n *\n * Update: Implementovaný \"Figma štýl\" prepínania mierky (Fit vs Fill)\n */export default function ScalableVector({svgCode,fillColor,strokeColor,strokeWidth,useClip,scaleMode}){let processedSvg=svgCode;// \"fit\" zachováva pomer (Square), \"fill\" roztiahne vektor (Freeform)\nconst aspectRatioValue=scaleMode===\"fill\"?\"none\":\"xMidYMid meet\";// Vyčistenie rozmerov\nprocessedSvg=processedSvg.replace(/width=\"[^\"]*\"/g,'width=\"100%\"');processedSvg=processedSvg.replace(/height=\"[^\"]*\"/g,'height=\"100%\"');// Úprava farieb a hrúbky\nprocessedSvg=processedSvg.replace(/fill=\"[^\"]*\"/g,`fill=\"${fillColor}\"`);processedSvg=processedSvg.replace(/stroke=\"[^\"]*\"/g,`stroke=\"${strokeColor}\"`);processedSvg=processedSvg.replace(/stroke-width=\"[^\"]*\"/g,`stroke-width=\"${strokeWidth}\"`);// Inline štýly\nprocessedSvg=processedSvg.replace(/fill:[^;\"']*/g,`fill:${fillColor}`);processedSvg=processedSvg.replace(/stroke:[^;\"']*/g,`stroke:${strokeColor}`);processedSvg=processedSvg.replace(/stroke-width:[^;\"']*/g,`stroke-width:${strokeWidth}`);if(!useClip){processedSvg=processedSvg.replace(/clip-path=\"[^\"]*\"/g,\"\");}// Aplikácia preserveAspectRatio\nif(processedSvg.includes(\"viewBox\")){processedSvg=processedSvg.replace(\"<svg\",`<svg preserveAspectRatio=\"${aspectRatioValue}\"`);}else{const widthMatch=svgCode.match(/width=\"([^\"]*)\"/);const heightMatch=svgCode.match(/height=\"([^\"]*)\"/);if(widthMatch&&heightMatch){const w=parseFloat(widthMatch[1]);const h=parseFloat(heightMatch[1]);processedSvg=processedSvg.replace(\"<svg\",`<svg viewBox=\"0 0 ${w} ${h}\" preserveAspectRatio=\"${aspectRatioValue}\"`);}}return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\"},dangerouslySetInnerHTML:{__html:processedSvg}});}ScalableVector.defaultProps={fillColor:\"#FFFFFF\",strokeColor:\"#FFFFFF\",strokeWidth:2,useClip:true,scaleMode:\"fit\",svgCode:`<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15.399\" height=\"14.813\" viewBox=\"0 0 15.399 14.813\"><path d=\"M 15.185 6.281 L 11.578 9.392 L 12.68 14.043 C 12.74 14.288 12.646 14.544 12.443 14.693 C 12.24 14.841 11.968 14.853 11.753 14.722 L 7.699 12.229 L 3.646 14.722 C 3.431 14.852 3.158 14.84 2.955 14.692 C 2.752 14.543 2.659 14.287 2.718 14.042 L 3.821 9.391 L 0.213 6.28 C 0.025 6.115 -0.047 5.854 0.031 5.616 C 0.108 5.378 0.319 5.209 0.568 5.185 L 5.302 4.8 L 7.126 0.385 C 7.221 0.152 7.448 0 7.699 0 C 7.951 0 8.177 0.152 8.273 0.385 L 10.096 4.8 L 14.83 5.185 C 15.08 5.208 15.292 5.378 15.369 5.616 C 15.446 5.854 15.374 6.116 15.185 6.281 Z\" fill=\"currentColor\"/></svg>`};addPropertyControls(ScalableVector,{svgCode:{type:ControlType.String,title:\"SVG Code\",displayTextArea:true,defaultValue:ScalableVector.defaultProps.svgCode},scaleMode:{type:ControlType.Enum,title:\"Scale Mode\",options:[\"fit\",\"fill\"],optionTitles:[\"Fit\",\"Fill (Stretch)\"],defaultValue:\"fit\"},fillColor:{type:ControlType.Color,title:\"Fill\",defaultValue:\"#FFFFFF\"},strokeColor:{type:ControlType.Color,title:\"Outline Color\",defaultValue:\"#FFFFFF\"},strokeWidth:{type:ControlType.Number,title:\"Outline Width\",defaultValue:2,min:0,max:20,step:.5,displayStepper:true},useClip:{type:ControlType.Boolean,title:\"Clip\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ScalableVector\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ScalableVector.map"],"mappings":"6JAIG,SAAwB,EAAe,CAAC,UAAQ,YAAU,cAAY,cAAY,UAAQ,aAAW,CAAC,IAAI,EAAa,EACpH,EAAiB,IAAY,OAAO,OAAO,gBAIjD,GAHA,EAAa,EAAa,QAAQ,iBAAiB,eAAe,CAAC,EAAa,EAAa,QAAQ,kBAAkB,gBAAgB,CACvI,EAAa,EAAa,QAAQ,gBAAgB,SAAS,EAAU,GAAG,CAAC,EAAa,EAAa,QAAQ,kBAAkB,WAAW,EAAY,GAAG,CAAC,EAAa,EAAa,QAAQ,wBAAwB,iBAAiB,EAAY,GAAG,CAClP,EAAa,EAAa,QAAQ,gBAAgB,QAAQ,IAAY,CAAC,EAAa,EAAa,QAAQ,kBAAkB,UAAU,IAAc,CAAC,EAAa,EAAa,QAAQ,wBAAwB,gBAAgB,IAAc,CAAK,IAAS,EAAa,EAAa,QAAQ,qBAAqB,GAAG,EACjT,EAAa,SAAS,UAAU,CAAE,EAAa,EAAa,QAAQ,OAAO,6BAA6B,EAAiB,GAAG,KAAM,CAAC,IAAM,EAAW,EAAQ,MAAM,kBAAkB,CAAO,EAAY,EAAQ,MAAM,mBAAmB,CAAC,GAAG,GAAY,EAAY,CAAC,IAAM,EAAE,WAAW,EAAW,GAAG,CAAO,EAAE,WAAW,EAAY,GAAG,CAAC,EAAa,EAAa,QAAQ,OAAO,qBAAqB,EAAE,GAAG,EAAE,yBAAyB,EAAiB,GAAG,EAAG,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,SAAS,SAAS,CAAC,wBAAwB,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