{"version":3,"file":"FramerDashedBorder.kFbHdvbG.mjs","names":["_Fragment","__esmMin","l","p","c","init_jsx_runtime","init_framer_DKtAEkcX","addPropertyControls","ControlType","injectKeyframes","injectedKeyframes","name","style","css","AnimatedDashedBorder","props","pattern","dash","gap","travel","dir","reverse","sideKey","top","bottom","left","right","s","keyframeName","strokeStyle","color","thickness","animate","duration","inset","allSidesEnabled","safeRadius","radius","children","init_FramerDashedBorder"],"sources":["https:/framerusercontent.com/modules/Z564L59ljvjCfxUe4Yo2/fD8iREY57mA7RNauGj75/FramerDashedBorder.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const injectedKeyframes=new Set;function injectKeyframes(name,css){if(typeof document===\"undefined\"||injectedKeyframes.has(name))return;injectedKeyframes.add(name);const style=document.createElement(\"style\");style.setAttribute(\"data-animated-dashed-border\",name);style.innerHTML=css;document.head.appendChild(style);}/**\n * Animated dashed border. Toggle each side on/off and control\n * color, dash size, gap, thickness and speed from the properties panel.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 400\n * @framerIntrinsicHeight 400\n */export default function AnimatedDashedBorder(props){const{top,bottom,left,right,radius,color,dash,gap,thickness,duration,animate,reverse,children,style}=props;const pattern=Math.max(1,dash+gap);// Travel a whole number of pattern repeats so the loop is seamless\nconst travel=pattern*Math.max(1,Math.round(200/pattern));const dir=reverse?-1:1;const sideKey=[top,bottom,left,right].map(s=>s?\"1\":\"0\").join(\"\");const keyframeName=`dashMoveStroke-${travel}-${dir>0?\"f\":\"r\"}`;injectKeyframes(keyframeName,`@keyframes ${keyframeName} {\n            from { stroke-dashoffset: 0; }\n            to { stroke-dashoffset: ${dir*-travel}; }\n        }`);const strokeStyle=sideKey===\"0000\"?{}:{stroke:color,strokeWidth:thickness,fill:\"none\",strokeDasharray:`${dash} ${gap}`,vectorEffect:\"non-scaling-stroke\",animation:animate?`${keyframeName} ${duration}s linear infinite`:\"none\"};const inset=thickness/2;const allSidesEnabled=top&&bottom&&left&&right;const safeRadius=Math.max(0,radius);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",height:\"100%\",position:\"relative\",pointerEvents:\"none\",...style,// Framer injects z-index: 1 on absolute-positioned layers;\n// keep the border overlay out of the stacking order\nzIndex:\"auto\"},children:[sideKey!==\"0000\"&&/*#__PURE__*/_jsx(\"svg\",{width:\"100%\",height:\"100%\",style:{position:\"absolute\",inset:0,overflow:\"visible\"},\"aria-hidden\":\"true\",children:allSidesEnabled?/*#__PURE__*/_jsx(\"rect\",{x:inset,y:inset,width:`calc(100% - ${thickness}px)`,height:`calc(100% - ${thickness}px)`,rx:safeRadius,ry:safeRadius,style:strokeStyle}):/*#__PURE__*/_jsxs(_Fragment,{children:[top&&/*#__PURE__*/_jsx(\"line\",{x1:inset,y1:inset,x2:`calc(100% - ${inset}px)`,y2:inset,style:strokeStyle}),bottom&&/*#__PURE__*/_jsx(\"line\",{x1:inset,y1:`calc(100% - ${inset}px)`,x2:`calc(100% - ${inset}px)`,y2:`calc(100% - ${inset}px)`,style:strokeStyle}),left&&/*#__PURE__*/_jsx(\"line\",{x1:inset,y1:inset,x2:inset,y2:`calc(100% - ${inset}px)`,style:strokeStyle}),right&&/*#__PURE__*/_jsx(\"line\",{x1:`calc(100% - ${inset}px)`,y1:inset,x2:`calc(100% - ${inset}px)`,y2:`calc(100% - ${inset}px)`,style:strokeStyle})]})}),children&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"contents\",pointerEvents:\"auto\"},children:children})]});}AnimatedDashedBorder.defaultProps={top:true,bottom:true,left:true,right:true,radius:0,color:\"#2D3041\",dash:7,gap:7,thickness:1,duration:10,animate:true,reverse:false};addPropertyControls(AnimatedDashedBorder,{top:{type:ControlType.Boolean,title:\"Top\",defaultValue:true},bottom:{type:ControlType.Boolean,title:\"Bottom\",defaultValue:true},left:{type:ControlType.Boolean,title:\"Left\",defaultValue:true},right:{type:ControlType.Boolean,title:\"Right\",defaultValue:true},radius:{type:ControlType.Number,title:\"Radius\",min:0,max:200,step:1,unit:\"px\",defaultValue:0},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#2D3041\"},dash:{type:ControlType.Number,title:\"Dash\",min:1,max:60,step:1,unit:\"px\",defaultValue:7},gap:{type:ControlType.Number,title:\"Gap\",min:0,max:60,step:1,unit:\"px\",defaultValue:7},thickness:{type:ControlType.Number,title:\"Thickness\",min:1,max:12,step:1,unit:\"px\",defaultValue:1},duration:{type:ControlType.Number,title:\"Duration\",min:.5,max:60,step:.5,unit:\"s\",defaultValue:10},animate:{type:ControlType.Boolean,title:\"Animate\",defaultValue:true},reverse:{type:ControlType.Boolean,title:\"Reverse\",defaultValue:false},children:{type:ControlType.ComponentInstance,title:\"Content\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AnimatedDashedBorder\",\"slots\":[\"children\"],\"annotations\":{\"framerIntrinsicHeight\":\"400\",\"framerSupportedLayoutHeight\":\"any\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FramerDashedBorder.map"],"mappings":"A,0KAAmK,SAASS,EAAgB,EAAK,EAAI,CAAC,GAAG,OAAO,SAAW,KAAaC,EAAkB,IAAIC,CAAI,EAAE,OAAOD,EAAkB,IAAIC,CAAI,EAAE,IAAMC,EAAM,SAAS,cAAc,OAAO,EAAEA,EAAM,aAAa,8BAA8BD,CAAI,EAAE,EAAM,UAAUE,EAAI,SAAS,KAAK,YAAYD,CAAK,CAAE,CAQ5b,SAAwBE,EAAqB,EAAM,CAAC,GAAK,CAAC,MAAI,SAAO,OAAK,QAAM,SAAO,QAAM,OAAK,MAAI,YAAU,WAAS,UAAQ,UAAQ,WAAS,SAAOC,EAAYC,EAAQ,KAAK,IAAI,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