{"version":3,"file":"GradientBorderBox.CDsSH0D3.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/XhYnsRJ1W1v9Ojf5XsYM/eI0DSFlG3ZKFzT4yR8oQ/GradientBorderBox.js"],"sourcesContent":["// Gradient border box component with customizable border width, radius, gradient, and background\nimport{jsx as _jsx,jsxs as _jsxs}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__*/_jsxs(\"div\",{style:{...style,position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:`${borderRadius}px`},children:[/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,borderRadius:\"inherit\",backgroundColor:background,zIndex:0}}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,borderRadius:\"inherit\",padding:`${borderWidth}px`,WebkitMask:\"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)\",WebkitMaskComposite:\"xor\",mask:\"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)\",maskComposite:\"exclude\",pointerEvents:\"none\",zIndex:1,overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:`-${borderWidth}px`,background:gradient}})}),/*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",padding:borderWidth,boxSizing:\"border-box\",zIndex:2},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\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GradientBorderBox.map"],"mappings":"6KAIG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,WAAS,cAAY,eAAa,gBAAc,gBAAc,aAAW,SAAO,EAAY,EAASA,MAAY,CAAyE,IAAM,EAA5D,CAAC,GAAG,CAAa,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,QAAqC,CAAC,CAAC,IAAI,GAAM,GAAG,EAAK,MAAM,GAAG,EAAK,SAAS,EAAE,EAAE,MAAM,mBAAmB,EAAc,OAAO,EAAW,KAAK,IAAI,EAAE,EAAG,EAAE,CAAC,EAAc,CAAa,CAAC,EAAE,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,MAAM,OAAO,OAAO,OAAO,aAAa,GAAG,EAAa,GAAG,EAAE,SAAS,CAAc,EAAK,MAAM,CAAC,MAAM,CAAC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