{"version":3,"file":"AdvancedStroke.5dF1sPCr.mjs","names":[],"sources":["https:/framerusercontent.com/modules/nCb6IQEl8aYwLMul0PTr/5tXjDyU2CP9dV07FBs2r/AdvancedStroke.js"],"sourcesContent":["// AdvancedStroke.tsx\n// A Framer code component that adds Figma-style stroke controls to any content:\n// dash/gap pattern, stroke weight, inside/outside/center position, and color.\n// Framer's native border control can't do any of this (solid only, no position choice),\n// so this draws the stroke itself with SVG.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";export default function AdvancedStroke({content,style=\"dashed\",strokeColor=\"#FF7A00\",strokeWeight=2,dash=6,gap=6,position=\"center\",cornerRadius=12}){// How far the stroke rect is inset from the box edge, and how much extra\n// room the wrapping SVG needs so an \"outside\" stroke isn't clipped.\nconst inset=position===\"center\"?strokeWeight/2:position===\"inside\"?strokeWeight:0// outside\n;const overflowPad=position===\"outside\"?strokeWeight:0;const dashArray=style===\"dashed\"?`${dash} ${gap}`:undefined;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",overflow:\"visible\"},children:[/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:-overflowPad/2,left:-overflowPad/2,width:`calc(100% + ${overflowPad}px)`,height:`calc(100% + ${overflowPad}px)`,overflow:\"visible\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"rect\",{x:inset+overflowPad/2,y:inset+overflowPad/2,width:`calc(100% - ${2*inset}px)`,height:`calc(100% - ${2*inset}px)`,rx:cornerRadius,ry:cornerRadius,fill:\"none\",stroke:strokeColor,strokeWidth:strokeWeight,strokeDasharray:dashArray})}),/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",borderRadius:cornerRadius,overflow:\"hidden\"},children:content})]});}addPropertyControls(AdvancedStroke,{content:{type:ControlType.ComponentInstance,title:\"Content\"},style:{type:ControlType.Enum,title:\"Style\",options:[\"solid\",\"dashed\"],optionTitles:[\"Solid\",\"Dashed\"],defaultValue:\"dashed\"},dash:{type:ControlType.Number,title:\"Dash\",defaultValue:6,min:1,max:200,step:1,hidden:props=>props.style!==\"dashed\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:6,min:1,max:200,step:1,hidden:props=>props.style!==\"dashed\"},strokeWeight:{type:ControlType.Number,title:\"Weight\",defaultValue:2,min:.5,max:40,step:.5},position:{type:ControlType.Enum,title:\"Position\",options:[\"inside\",\"outside\",\"center\"],optionTitles:[\"Inside\",\"Outside\",\"Center\"],defaultValue:\"center\"},strokeColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FF7A00\"},cornerRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:12,min:0,max:500,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AdvancedStroke\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AdvancedStroke.map"],"mappings":"oKAK6G,SAAwB,EAAe,CAAC,UAAQ,QAAM,SAAS,cAAY,UAAU,eAAa,EAAE,OAAK,EAAE,MAAI,EAAE,WAAS,SAAS,eAAa,IAAI,CAEjQ,IAAM,EAAM,IAAW,SAAS,EAAa,EAAE,IAAW,SAAS,EAAa,EACzE,EAAY,IAAW,UAAU,EAAa,EAAQ,EAAU,IAAQ,SAAS,GAAG,EAAK,GAAG,IAAM,IAAA,GAAU,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,SAAS,UAAU,CAAC,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,IAAI,CAAC,EAAY,EAAE,KAAK,CAAC,EAAY,EAAE,MAAM,eAAe,EAAY,KAAK,OAAO,eAAe,EAAY,KAAK,SAAS,UAAU,cAAc,OAAO,CAAC,SAAsB,EAAK,OAAO,CAAC,EAAE,EAAM,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