{"version":3,"file":"GradientBorderBox.7TYd5Hk7.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/fAO9uYMhbFbWDmTWzsq8/C4ycU1Xv9bNF1zZ7O0QB/GradientBorderBox.js"],"sourcesContent":["// Gradient border box component with customizable border width, radius, gradient, and background\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function GradientBorderBox(props){const{children,borderWidth,borderRadius,gradientStops,gradientAngle,background,style}=props;const gradient=useMemo(()=>{const sortedStops=[...gradientStops].sort((a,b)=>a.position-b.position);const colorStops=sortedStops.map(stop=>`${stop.color} ${stop.position}%`);return`linear-gradient(${gradientAngle}deg, ${colorStops.join(\", \")})`;},[gradientStops,gradientAngle]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",background:gradient,borderRadius:borderRadius,padding:borderWidth,width:\"100%\",height:\"100%\",boxSizing:\"border-box\"},children:/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",background:background,borderRadius:Math.max(0,borderRadius-borderWidth),display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\"},children:children})});}addPropertyControls(GradientBorderBox,{borderWidth:{type:ControlType.Number,title:\"Border Width\",defaultValue:4,min:1,max:20,step:1,unit:\"px\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:12,min:0,max:9999,step:1,unit:\"px\"},gradientStops:{type:ControlType.Array,title:\"Gradient Stops\",control:{type:ControlType.Object,controls:{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#ff6b6b\"},position:{type:ControlType.Number,title:\"Position\",defaultValue:0,min:0,max:100,step:1,unit:\"%\"}}},defaultValue:[{color:\"#ff6b6b\",position:0},{color:\"#4ecdc4\",position:50},{color:\"#45b7d1\",position:100}]},gradientAngle:{type:ControlType.Number,title:\"Gradient Angle\",defaultValue:45,min:0,max:360,step:1,unit:\"deg\"},background:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GradientBorderBox\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientBorderBox.map"],"mappings":"2KAIG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,WAAS,cAAY,eAAa,gBAAc,gBAAc,aAAW,SAAO,EAAY,EAASA,MAAqK,mBAAmB,EAAc,OAAvK,CAAC,GAAG,EAAc,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,CAA8B,IAAI,GAAM,GAAG,EAAK,MAAM,GAAG,EAAK,SAAS,GAAG,CAA0D,KAAK,KAAK,CAAC,GAAK,CAAC,EAAc,EAAc,CAAC,CAAC,OAAoB,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,WAAW,EAAsB,eAAa,QAAQ,EAAY,MAAM,OAAO,OAAO,OAAO,UAAU,aAAa,CAAC,SAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,MAAM,OAAO,OAAO,OAAkB,aAAW,aAAa,KAAK,IAAI,EAAE,EAAa,EAAY,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,SAAS,SAAS,CAAU,WAAS,CAAC,CAAC,CAAC,kBAHnyB,IAAoD,IAA2B,CAGstB,EAAoB,EAAkB,CAAC,YAAY,CAAC,KAAK,EAAY,OAAO,MAAM,eAAe,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,KAAK,EAAE,KAAK,KAAK,CAAC,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,GAAG,IAAI,EAAE,IAAI,KAAK,KAAK,EAAE,KAAK,KAAK,CAAC,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