{"version":3,"file":"DashedBorder.BUP87opd.mjs","names":["useMemo","__esmMin","pe","init_npm_react_18_3_1","c","init_jsx_runtime","addPropertyControls","init_framer_BWFVvmND","ControlType","DashedBorder","props","width","style","height","pathData","w","h","offset","borderWidth","shapeType","cornerRadius","borderColor","dashLength","dashSpacing","init_DashedBorder"],"sources":["https:/framerusercontent.com/modules/NEwPEpJKoWx7XYCMR21K/X1KJJVrfbVl1qnUwWCgC/DashedBorder.js"],"sourcesContent":["// Dashed border SVG with controllable spacing and flexible shape (rounded/straight)\nimport{jsx as _jsx}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 DashedBorder(props){const{borderColor,borderWidth,dashLength,dashSpacing,cornerRadius,shapeType,style}=props;const width=typeof style?.width===\"string\"&&style.width===\"100%\"?\"100%\":(style?.width)||200;const height=typeof style?.height===\"string\"&&style.height===\"100%\"?\"100%\":(style?.height)||200;const pathData=useMemo(()=>{const w=typeof width===\"number\"?width:200;const h=typeof height===\"number\"?height:200;const offset=borderWidth/2;const r=shapeType===\"rounded\"?Math.min(cornerRadius,Math.min(w,h)/2):0;if(r===0){return`M ${offset} ${offset} \n                    L ${w-offset} ${offset} \n                    L ${w-offset} ${h-offset} \n                    L ${offset} ${h-offset} \n                    Z`;}return`M ${offset+r} ${offset}\n                L ${w-offset-r} ${offset}\n                A ${r} ${r} 0 0 1 ${w-offset} ${offset+r}\n                L ${w-offset} ${h-offset-r}\n                A ${r} ${r} 0 0 1 ${w-offset-r} ${h-offset}\n                L ${offset+r} ${h-offset}\n                A ${r} ${r} 0 0 1 ${offset} ${h-offset-r}\n                L ${offset} ${offset+r}\n                A ${r} ${r} 0 0 1 ${offset+r} ${offset}\n                Z`;},[width,height,borderWidth,cornerRadius,shapeType]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"visible\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"100%\",height:\"100%\",viewBox:`0 0 ${typeof width===\"number\"?width:200} ${typeof height===\"number\"?height:200}`,preserveAspectRatio:\"none\",style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"path\",{d:pathData,fill:\"none\",stroke:borderColor,strokeWidth:borderWidth,strokeDasharray:`${dashLength} ${dashSpacing}`,strokeLinecap:\"round\",vectorEffect:\"non-scaling-stroke\"})})});}addPropertyControls(DashedBorder,{shapeType:{type:ControlType.Enum,title:\"Shape\",options:[\"rounded\",\"straight\"],optionTitles:[\"Rounded\",\"Straight\"],defaultValue:\"rounded\",displaySegmentedControl:true},cornerRadius:{type:ControlType.Number,title:\"Corner Radius\",defaultValue:16,min:0,max:100,step:1,unit:\"px\",hidden:({shapeType})=>shapeType===\"straight\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#000000\"},borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:2,min:1,max:20,step:1,unit:\"px\"},dashLength:{type:ControlType.Number,title:\"Dash Length\",defaultValue:10,min:1,max:50,step:1,unit:\"px\"},dashSpacing:{type:ControlType.Number,title:\"Dash Spacing\",defaultValue:10,min:1,max:50,step:1,unit:\"px\",description:\"Component Built and [Designed by Zaid](https://x.com/zaidkhan3419).\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DashedBorder\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DashedBorder.map"],"mappings":"A,0KAIG,SAAwBS,EAAa,EAAM,CAAC,GAAK,CAAC,cAAY,cAAY,aAAW,cAAY,eAAa,YAAU,SAAOC,EAAYC,EAAM,OAAOC,GAAO,OAA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