{"version":3,"file":"SC_CSS_Pattern.BIzhS3DV.mjs","names":[],"sources":["https:/framerusercontent.com/modules/9eEJxnrogaQXpXwx8xYK/kNk7TLRbBcGxkLxiIqdQ/SC_CSS_Pattern.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * © SecretoCho Design 2025 (https://secretocho.design)\n */SCCssPattern.displayName=\"SC CSS Pattern\";export default function SCCssPattern(props){const{width,height,patternType,size,color,strokeWidth,angle,triangleAngle,dotSize,spacing,isTextPattern,text,fontSize,fontWeight,textAlign}=props;const containerStyle={width:width,height:height,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:color};// getPatternStyle function remains the same\nconst getPatternStyle=()=>{const s=Math.max(size,1);const sw=Math.max(strokeWidth,.1);const ds=Math.max(dotSize,.1);const sp=Math.max(spacing,1);switch(patternType){case\"checks\":return{backgroundImage:`repeating-linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%, currentColor), repeating-linear-gradient(45deg, currentColor 25%, transparent 25%, transparent 75%, currentColor 75%, currentColor)`,backgroundPosition:`0 0, ${s}px ${s}px`,backgroundSize:`${s*2}px ${s*2}px`};case\"grid\":return{backgroundImage:`linear-gradient(currentColor ${sw}px, transparent ${sw}px), linear-gradient(to right, currentColor ${sw}px, transparent ${sw}px)`,backgroundSize:`${s}px ${s}px`};case\"dots\":return{backgroundImage:`radial-gradient(currentColor ${ds}px, transparent ${ds}px)`,backgroundSize:`${sp}px ${sp}px`};case\"cross-dots\":{const sp2=sp/2;return{backgroundImage:`radial-gradient(currentColor ${ds}px, transparent ${ds}px), radial-gradient(currentColor ${ds}px, transparent ${ds}px)`,backgroundSize:`${sp}px ${sp}px`,backgroundPosition:`0 0, ${sp2}px ${sp2}px`};}case\"vertical-lines\":return{backgroundImage:`repeating-linear-gradient(to right, currentColor, currentColor ${sw}px, transparent ${sw}px, transparent)`,backgroundSize:`${s}px ${s}px`};case\"horizontal-lines\":return{backgroundImage:`repeating-linear-gradient(0deg, currentColor, currentColor ${sw}px, transparent ${sw}px, transparent)`,backgroundSize:`${s}px ${s}px`};case\"vertical-stripes\":return{backgroundImage:`linear-gradient(90deg, transparent 50%, currentColor 50%)`,backgroundSize:`${s}px ${s}px`};case\"horizontal-stripes\":return{backgroundImage:`linear-gradient(0deg, transparent 50%, currentColor 50%)`,backgroundSize:`${s}px ${s}px`};case\"diagonal-stripes\":return{background:`repeating-linear-gradient(${angle}deg, transparent, transparent ${s}px, currentColor ${s}px, currentColor ${s+sw}px)`};case\"zigzag\":{return{background:`linear-gradient(135deg, currentColor 25%, transparent 25%) -${s}px 0, linear-gradient(225deg, currentColor 25%, transparent 25%) -${s}px 0, linear-gradient(315deg, currentColor 25%, transparent 25%), linear-gradient(45deg, currentColor 25%, transparent 25%)`,backgroundSize:`${s*2}px ${s*2}px`};}case\"triangles\":return{backgroundImage:`linear-gradient(${triangleAngle}deg, currentColor 50%, transparent 50%)`,backgroundSize:`${s}px ${s}px`};default:return{};}};const patternStyle=getPatternStyle();const patternElement=/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",...patternStyle}});if(isTextPattern){const textStyle={...patternStyle,backgroundClip:\"text\",WebkitBackgroundClip:\"text\",WebkitTextFillColor:\"transparent\",fontSize:`${fontSize}px`,fontWeight:fontWeight,textAlign:textAlign,width:\"100%\",lineHeight:1.2};return /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:/*#__PURE__*/_jsx(\"p\",{style:textStyle,children:text})});}// For non-text patterns, we just render the styled div\nreturn /*#__PURE__*/_jsx(\"div\",{style:containerStyle,children:patternElement});}// --- FIXES APPLIED HERE ---\nconst defaultProps={width:200,height:200,patternType:\"grid\",size:25,color:\"#0099FF\",strokeWidth:1,angle:45,triangleAngle:45,dotSize:2,spacing:15,isTextPattern:false,text:\"Pattern Text\",fontSize:72,fontWeight:700,textAlign:\"center\"};SCCssPattern.defaultProps=defaultProps;// Helper functions (no changes)\nconst isLinePattern=props=>[\"grid\",\"vertical-lines\",\"horizontal-lines\",\"diagonal-stripes\"].includes(props.patternType);const isAnglePattern=props=>props.patternType===\"diagonal-stripes\";const isTrianglePattern=props=>props.patternType===\"triangles\";const isDotPattern=props=>[\"dots\",\"cross-dots\"].includes(props.patternType);// The `as ComponentType<Props>` cast is good for robust typing\naddPropertyControls(SCCssPattern,{// Property Controls (no changes, but they will now use the correct defaults)\npatternType:{type:ControlType.Enum,title:\"Pattern\",options:[\"grid\",\"zigzag\",\"checks\",\"dots\",\"cross-dots\",\"triangles\",\"vertical-lines\",\"horizontal-lines\",\"vertical-stripes\",\"horizontal-stripes\",\"diagonal-stripes\"],optionTitles:[\"Grid\",\"Zigzag\",\"Checks\",\"Dots\",\"Cross Dots\",\"Triangles\",\"Vertical Lines\",\"Horizontal Lines\",\"Vertical Stripes\",\"Horizontal Stripes\",\"Diagonal Stripes\"],defaultValue:defaultProps.patternType},size:{type:ControlType.Number,title:\"Size\",defaultValue:defaultProps.size,min:1,max:300,step:1,displayStepper:true,hidden:props=>isDotPattern(props)},strokeWidth:{type:ControlType.Number,title:\"Stroke Width\",defaultValue:defaultProps.strokeWidth,min:.1,max:100,step:.1,displayStepper:true,hidden:props=>!isLinePattern(props)},angle:{type:ControlType.Number,title:\"Angle\",defaultValue:defaultProps.angle,min:-360,max:360,step:1,displayStepper:false,hidden:props=>!isAnglePattern(props)},triangleAngle:{type:ControlType.Enum,title:\"Angle\",options:[45,135,-45,-135],optionTitles:[\"45\\xb0\",\"135\\xb0\",\"-45\\xb0\",\"-135\\xb0\"],defaultValue:defaultProps.triangleAngle,hidden:props=>!isTrianglePattern(props)},dotSize:{type:ControlType.Number,title:\"Dot Size\",defaultValue:defaultProps.dotSize,min:.1,max:100,step:.1,displayStepper:true,hidden:props=>!isDotPattern(props)},spacing:{type:ControlType.Number,title:\"Dot Spacing\",defaultValue:defaultProps.spacing,min:1,max:200,step:1,displayStepper:true,hidden:props=>!isDotPattern(props)},isTextPattern:{type:ControlType.Boolean,title:\"Text Clip\",defaultValue:defaultProps.isTextPattern},text:{type:ControlType.String,title:\"Text\",defaultValue:defaultProps.text,hidden:props=>!props.isTextPattern},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:defaultProps.fontSize,min:10,max:400,step:1,hidden:props=>!props.isTextPattern},fontWeight:{type:ControlType.Number,title:\"Font Weight\",defaultValue:defaultProps.fontWeight,min:100,max:900,step:100,hidden:props=>!props.isTextPattern},textAlign:{type:ControlType.SegmentedEnum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],hidden:props=>!props.isTextPattern},color:{type:ControlType.Color,title:\"Color\",defaultValue:defaultProps.color,description:\"\\n Having Issues? [Contact Us](https://secretocho.design/help)\\n \\xa9 SecretoCho Design 2025\\n\\n More components at [SecretoCho Design](https://secretocho.design)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SCCssPattern\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SC_CSS_Pattern.map"],"mappings":"iOAK6C,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,QAAM,SAAO,cAAY,OAAK,QAAM,cAAY,QAAM,gBAAc,UAAQ,UAAQ,gBAAc,OAAK,WAAS,aAAW,YAAU,CAAC,EAAY,EAAe,CAAO,QAAa,SAAO,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAe,OAAM,EAC5V,EAAgB,IAAI,CAAC,IAAM,EAAE,KAAK,IAAI,EAAK,EAAE,CAAO,EAAG,KAAK,IAAI,EAAY,GAAG,CAAO,EAAG,KAAK,IAAI,EAAQ,GAAG,CAAO,EAAG,KAAK,IAAI,EAAQ,EAAE,CAAC,OAAO,EAAP,CAAoB,IAAI,SAAS,MAAM,CAA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