{"version":3,"file":"DashedBorder.CstWnjKK.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/y8Um9zS28MBb1oXN7X4J/rxdVj10PV8cumFbaKbbR/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\":{\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DashedBorder.map"],"mappings":"0KAIG,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,cAAY,cAAY,aAAW,cAAY,eAAa,YAAU,SAAO,EAAY,EAAM,OAAO,GAAO,OAAQ,UAAU,EAAM,QAAQ,OAAO,OAAQ,GAAO,OAAQ,IAAU,EAAO,OAAO,GAAO,QAAS,UAAU,EAAM,SAAS,OAAO,OAAQ,GAAO,QAAS,IAAU,EAASA,MAAY,CAAC,IAAM,EAAE,OAAO,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