bordex
Version:
A simple React component library for addding styled borders to your elements.
12 lines (11 loc) • 21.9 kB
JavaScript
import r,{forwardRef as e}from"react";var o=function(){return o=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},o.apply(this,arguments)};function t(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(r);n<t.length;n++)e.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(r,t[n])&&(o[t[n]]=r[t[n]])}return o}"function"==typeof SuppressedError&&SuppressedError;var n,i={exports:{}},a={};var l,d,c={};
/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/function s(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function e(r){if(null==r)return null;if("function"==typeof r)return r.$$typeof===z?null:r.displayName||r.name||null;if("string"==typeof r)return r;switch(r){case N:return"Fragment";case k:return"Portal";case W:return"Profiler";case w:return"StrictMode";case T:return"Suspense";case E:return"SuspenseList"}if("object"==typeof r)switch("number"==typeof r.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case R:return(r.displayName||"Context")+".Provider";case O:return(r._context.displayName||"Context")+".Consumer";case _:var o=r.render;return(r=r.displayName)||(r=""!==(r=o.displayName||o.name||"")?"ForwardRef("+r+")":"ForwardRef"),r;case $:return null!==(o=r.displayName||null)?o:e(r.type)||"Memo";case P:o=r._payload,r=r._init;try{return e(r(o))}catch(r){}}return null}function o(r){return""+r}function t(r){try{o(r);var e=!1}catch(r){e=!0}if(e){var t=(e=console).error,n="function"==typeof Symbol&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return t.call(e,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),o(r)}}function n(){}function i(r){if(void 0===H)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);H=e&&e[1]||"",J=-1<r.stack.indexOf("\n at")?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+r+J}function a(r,e){if(!r||K)return"";var o=V.get(r);if(void 0!==o)return o;K=!0,o=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var t;t=F.H,F.H=null,function(){if(0===U){y=console.log,m=console.info,h=console.warn,v=console.error,g=console.group,S=console.groupCollapsed,j=console.groupEnd;var r={configurable:!0,enumerable:!0,value:n,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}U++}();try{var a={DetermineComponentFrameRoot:function(){try{if(e){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(r){var t=r}Reflect.construct(r,[],o)}else{try{o.call()}catch(r){t=r}r.call(o.prototype)}}else{try{throw Error()}catch(r){t=r}(o=r())&&"function"==typeof o.catch&&o.catch((function(){}))}}catch(r){if(r&&t&&"string"==typeof r.stack)return[r.stack,t.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=a.DetermineComponentFrameRoot(),c=d[0],s=d[1];if(c&&s){var b=c.split("\n"),p=s.split("\n");for(d=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;d<p.length&&!p[d].includes("DetermineComponentFrameRoot");)d++;if(l===b.length||d===p.length)for(l=b.length-1,d=p.length-1;1<=l&&0<=d&&b[l]!==p[d];)d--;for(;1<=l&&0<=d;l--,d--)if(b[l]!==p[d]){if(1!==l||1!==d)do{if(l--,0>--d||b[l]!==p[d]){var f="\n"+b[l].replace(" at new "," at ");return r.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",r.displayName)),"function"==typeof r&&V.set(r,f),f}}while(1<=l&&0<=d);break}}}finally{K=!1,F.H=t,function(){if(0==--U){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:I({},r,{value:y}),info:I({},r,{value:m}),warn:I({},r,{value:h}),error:I({},r,{value:v}),group:I({},r,{value:g}),groupCollapsed:I({},r,{value:S}),groupEnd:I({},r,{value:j})})}0>U&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}return b=(b=r?r.displayName||r.name:"")?i(b):"","function"==typeof r&&V.set(r,b),b}function l(r){if(null==r)return"";if("function"==typeof r){var e=r.prototype;return a(r,!(!e||!e.isReactComponent))}if("string"==typeof r)return i(r);switch(r){case T:return i("Suspense");case E:return i("SuspenseList")}if("object"==typeof r)switch(r.$$typeof){case _:return r=a(r.render,!1);case $:return l(r.type);case P:e=r._payload,r=r._init;try{return l(r(e))}catch(r){}}return""}function d(){var r=F.A;return null===r?null:r.getOwner()}function s(){var r=e(this.type);return q[r]||(q[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(r=this.props.ref)?r:null}function b(r,o,n,i,a,l){if("string"==typeof r||"function"==typeof r||r===N||r===W||r===w||r===T||r===E||r===B||"object"==typeof r&&null!==r&&(r.$$typeof===P||r.$$typeof===$||r.$$typeof===R||r.$$typeof===O||r.$$typeof===_||r.$$typeof===A||void 0!==r.getModuleId)){var c=o.children;if(void 0!==c)if(i)if(M(c)){for(i=0;i<c.length;i++)p(c[i],r);Object.freeze&&Object.freeze(c)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else p(c,r)}else c="",(void 0===r||"object"==typeof r&&null!==r&&0===Object.keys(r).length)&&(c+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),null===r?i="null":M(r)?i="array":void 0!==r&&r.$$typeof===C?(i="<"+(e(r.type)||"Unknown")+" />",c=" Did you accidentally export a JSX literal instead of a component?"):i=typeof r,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",i,c);if(L.call(o,"key")){c=e(r);var b=Object.keys(o).filter((function(r){return"key"!==r}));i=0<b.length?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}",G[c+i]||(b=0<b.length?"{"+b.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,c,b,c),G[c+i]=!0)}if(c=null,void 0!==n&&(t(n),c=""+n),function(r){if(L.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==r.key}(o)&&(t(o.key),c=""+o.key),"key"in o)for(var f in n={},o)"key"!==f&&(n[f]=o[f]);else n=o;return c&&function(r,e){function o(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",e))}o.isReactWarning=!0,Object.defineProperty(r,"key",{get:o,configurable:!0})}(n,"function"==typeof r?r.displayName||r.name||"Unknown":r),function(r,e,o,t,n,i){return o=i.ref,r={$$typeof:C,type:r,key:e,props:i,_owner:n},null!==(void 0!==o?o:null)?Object.defineProperty(r,"ref",{enumerable:!1,get:s}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}(r,c,l,0,d(),n)}function p(r,e){if("object"==typeof r&&r&&r.$$typeof!==Y)if(M(r))for(var o=0;o<r.length;o++){var t=r[o];f(t)&&u(t,e)}else if(f(r))r._store&&(r._store.validated=1);else if(null===r||"object"!=typeof r?o=null:o="function"==typeof(o=D&&r[D]||r["@@iterator"])?o:null,"function"==typeof o&&o!==r.entries&&(o=o.call(r))!==r)for(;!(r=o.next()).done;)f(r.value)&&u(r.value,e)}function f(r){return"object"==typeof r&&null!==r&&r.$$typeof===C}function u(r,o){if(r._store&&!r._store.validated&&null==r.key&&(r._store.validated=1,o=function(r){var o="",t=d();return t&&(t=e(t.type))&&(o="\n\nCheck the render method of `"+t+"`."),o||(r=e(r))&&(o="\n\nCheck the top-level render call using <"+r+">."),o}(o),!Q[o])){Q[o]=!0;var t="";r&&null!=r._owner&&r._owner!==d()&&(t=null,"number"==typeof r._owner.tag?t=e(r._owner.type):"string"==typeof r._owner.name&&(t=r._owner.name),t=" It was passed a child from "+t+".");var n=F.getCurrentStack;F.getCurrentStack=function(){var e=l(r.type);return n&&(e+=n()||""),e},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',o,t),F.getCurrentStack=n}}var y,m,h,v,g,S,j,x=r,C=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),R=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),D=Symbol.iterator,z=Symbol.for("react.client.reference"),F=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,I=Object.assign,A=Symbol.for("react.client.reference"),M=Array.isArray,U=0;n.__reactDisabledLog=!0;var H,J,X,K=!1,V=new("function"==typeof WeakMap?WeakMap:Map),Y=Symbol.for("react.client.reference"),q={},G={},Q={};c.Fragment=N,c.jsx=function(r,e,o,t,n){return b(r,e,o,!1,0,n)},c.jsxs=function(r,e,o,t,n){return b(r,e,o,!0,0,n)}}()),c}var b=(d||(d=1,"production"===process.env.NODE_ENV?i.exports=function(){if(n)return a;n=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function o(e,o,t){var n=null;if(void 0!==t&&(n=""+t),void 0!==o.key&&(n=""+o.key),"key"in o)for(var i in t={},o)"key"!==i&&(t[i]=o[i]);else t=o;return o=t.ref,{$$typeof:r,type:e,key:n,ref:void 0!==o?o:null,props:t}}return a.Fragment=e,a.jsx=o,a.jsxs=o,a}():i.exports=s()),i.exports),p="#960096",f="#BFF000",u="5px",y="10px";function m(r,e){void 0===e&&(e={});var o=e.insertAt;if(r&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r))}}m("/* blur border css file */");var h={borderBlur:"10px",borderWidth:y,borderColor:p},v=e((function(r,e){var n=r.children,i=r.borderColor,a=void 0===i?h.borderColor:i,l=r.borderWidth,d=void 0===l?h.borderWidth:l,c=r.borderBlur,s=void 0===c?h.borderBlur:c,p=r.style,f=t(r,["children","borderColor","borderWidth","borderBlur","style"]);return b.jsx("div",o({style:o({boxShadow:"0px 0px ".concat(s," ").concat(d," ").concat(a)},p)},f,{ref:e,children:n}))}));m(".corner-border-parent-position {\r\n position: relative;\r\n}\r\n\r\n.corner-borders {\r\n height: 40%;\r\n width: 20%;\r\n position: absolute;\r\n}\r\n\r\n.top-left-corner-border {\r\n top: 0;\r\n left: 0;\r\n border-right: none !important;\r\n border-bottom: none !important;\r\n}\r\n\r\n.top-right-corner-border {\r\n top: 0;\r\n right: 0;\r\n border-left: none !important;\r\n border-bottom: none !important;\r\n}\r\n\r\n.bottom-left-corner-border {\r\n bottom: 0;\r\n left: 0;\r\n border-right: none !important;\r\n border-top: none !important;\r\n}\r\n\r\n.bottom-right-corner-border {\r\n bottom: 0;\r\n right: 0;\r\n border-left: none !important;\r\n border-top: none !important;\r\n}\r\n");var g={borderWidth:u,borderStyle:"solid",borderColor:p},S=e((function(r,e){var n=r.children,i=r.borderWidth,a=void 0===i?g.borderWidth:i,l=r.borderStyle,d=void 0===l?g.borderStyle:l,c=r.borderColor,s=void 0===c?g.borderColor:c,p=r.className,f=t(r,["children","borderWidth","borderStyle","borderColor","className"]),u={borderWidth:a,borderStyle:d,borderColor:s};return b.jsxs("div",o({className:"corner-border-parent-position ".concat(p)},f,{ref:e,children:[b.jsx("div",{style:u,className:"corner-borders top-left-corner-border"}),b.jsx("div",{style:u,className:"corner-borders top-right-corner-border"}),b.jsx("div",{style:u,className:"corner-borders bottom-left-corner-border"}),b.jsx("div",{style:u,className:"corner-borders bottom-right-corner-border"}),n]}))}));m(".disjointed-parent-initial-design {\r\n color: white;\r\n background-color: black;\r\n position: relative;\r\n}\r\n\r\n.disjointed-border {\r\n position: absolute;\r\n}\r\n");var j={angle:"45deg",borderColor:p},x=e((function(r,e){var n=r.angle,i=void 0===n?j.angle:n,a=r.borderColor,l=void 0===a?j.borderColor:a,d=r.className,c=r.children,s=t(r,["angle","borderColor","className","children"]),p={inset:"".concat("-0.1rem"),borderRadius:"inherit",background:"linear-gradient(".concat(i,",#00000000 1%, ").concat(l,",#00000000 99%)"),zIndex:"-1"};return b.jsxs("div",o({className:"disjointed-parent-initial-design ".concat(d)},s,{ref:e,children:[b.jsx("div",{style:p,className:"disjointed-border"}),c]}))}));m(".fancy-border-parent-position {\r\n position: relative;\r\n}\r\n\r\n.fancy-corner-borders {\r\n --corner-border-size: 10px;\r\n height: var(--corner-border-size);\r\n width: var(--corner-border-size);\r\n border: inherit;\r\n background: transparent;\r\n position: absolute;\r\n}\r\n\r\n.fancy-outside-border {\r\n background-color: transparent;\r\n position: absolute;\r\n border: inherit;\r\n z-index: -2;\r\n}\r\n\r\n.fancy-top-left-corner-border {\r\n top: 0;\r\n left: 0;\r\n border-left: none !important;\r\n border-top: none !important;\r\n}\r\n\r\n.fancy-top-right-corner-border {\r\n top: 0;\r\n right: 0;\r\n border-right: none !important;\r\n border-top: none !important;\r\n}\r\n\r\n.fancy-bottom-left-corner-border {\r\n bottom: 0;\r\n left: 0;\r\n border-left: none !important;\r\n border-bottom: none !important;\r\n}\r\n\r\n.fancy-bottom-right-corner-border {\r\n bottom: 0;\r\n right: 0;\r\n border-right: none !important;\r\n border-bottom: none !important;\r\n}\r\n");var C={borderWidth:u,borderStyle:"solid",borderColor:p},k=e((function(r,e){var n=r.borderWidth,i=void 0===n?C.borderWidth:n,a=r.borderStyle,l=void 0===a?C.borderStyle:a,d=r.borderColor,c=void 0===d?C.borderColor:d,s=r.style,p=r.className,f=r.children,u=t(r,["borderWidth","borderStyle","borderColor","style","className","children"]),y={borderWidth:i,borderStyle:l,borderColor:c};return b.jsxs("div",o({style:o(o({},y),s),className:"fancy-border-parent-position ".concat(p)},u,{ref:e,children:[b.jsx("div",{className:"fancy-outside-border",style:{inset:"calc(0px - (10px + ".concat(i,"))")}}),b.jsx("div",{className:"fancy-corner-borders fancy-top-left-corner-border"}),b.jsx("div",{className:"fancy-corner-borders fancy-top-right-corner-border"}),b.jsx("div",{className:"fancy-corner-borders fancy-bottom-left-corner-border"}),b.jsx("div",{className:"fancy-corner-borders fancy-bottom-right-corner-border"}),f]}))}));m(".gradient-border-parent-position {\r\n color: white;\r\n background-color: black;\r\n position: relative;\r\n}\r\n\r\n.gradient-border {\r\n position: absolute;\r\n z-index: -1;\r\n}\r\n");var N={angle:"45deg",colors:[p,f],borderWidth:u},w=e((function(r,e){var n=r.angle,i=void 0===n?N.angle:n,a=r.colors,l=void 0===a?N.colors:a,d=r.borderWidth,c=void 0===d?N.borderWidth:d,s=r.children,p=r.className,f=t(r,["angle","colors","borderWidth","children","className"]),u={background:"linear-gradient(".concat(i,", ").concat(null==l?void 0:l.join(","),")"),inset:"-".concat(c)};return b.jsxs("div",o({className:"gradient-border-parent-position ".concat(p)},f,{ref:e,children:[b.jsx("div",{style:u,className:"gradient-border"}),s]}))}));m(".glowing-gradient-border {\r\n --glowing-gradient-blur: 10px;\r\n filter: blur(var(--glowing-gradient-blur));\r\n position: absolute;\r\n z-index: -2;\r\n}\r\n");var W={angle:"45deg",colors:[p,f],borderWidth:u},O=e((function(r,e){var n=r.angle,i=void 0===n?W.angle:n,a=r.colors,l=void 0===a?W.colors:a,d=r.borderWidth,c=void 0===d?W.borderWidth:d,s=r.children,p=t(r,["angle","colors","borderWidth","children"]),f={inset:"-".concat(c),background:"linear-gradient(".concat(i,",").concat(l.join(","),")")};return b.jsxs(w,o({angle:i,colors:l,borderWidth:c},p,{ref:e,children:[b.jsx("div",{style:f,className:"glowing-gradient-border"}),s]}))}));m("/* normal border css file */\r\n");var R={border:"".concat(u," solid ").concat(p),borderWidth:u,borderStyle:"solid",borderColor:p},_=e((function(r,e){var n=r.border,i=void 0===n?R.border:n,a=r.borderWidth,l=void 0===a?R.borderWidth:a,d=r.borderStyle,c=void 0===d?R.borderStyle:d,s=r.borderColor,p=void 0===s?R.borderColor:s,f=r.borderTop,u=void 0===f?i:f,y=r.borderTopWidth,m=void 0===y?l:y,h=r.borderTopStyle,v=void 0===h?c:h,g=r.borderTopColor,S=void 0===g?p:g,j=r.borderRight,x=void 0===j?i:j,C=r.borderRightWidth,k=void 0===C?l:C,N=r.borderRightStyle,w=void 0===N?c:N,W=r.borderRightColor,O=void 0===W?p:W,_=r.borderBottom,T=void 0===_?i:_,E=r.borderBottomWidth,$=void 0===E?l:E,P=r.borderBottomStyle,B=void 0===P?c:P,D=r.borderBottomColor,z=void 0===D?p:D,F=r.borderLeft,L=void 0===F?i:F,I=r.borderLeftWidth,A=void 0===I?l:I,M=r.borderLeftStyle,U=void 0===M?c:M,H=r.borderLeftColor,J=void 0===H?p:H,X=r.children,K=r.style,V=t(r,["border","borderWidth","borderStyle","borderColor","borderTop","borderTopWidth","borderTopStyle","borderTopColor","borderRight","borderRightWidth","borderRightStyle","borderRightColor","borderBottom","borderBottomWidth","borderBottomStyle","borderBottomColor","borderLeft","borderLeftWidth","borderLeftStyle","borderLeftColor","children","style"]),Y={border:i,borderWidth:l,borderStyle:c,borderColor:p,borderTop:u,borderTopWidth:m,borderTopStyle:v,borderTopColor:S,borderRight:x,borderRightWidth:k,borderRightStyle:w,borderRightColor:O,borderBottom:T,borderBottomWidth:$,borderBottomStyle:B,borderBottomColor:z,borderLeft:L,borderLeftWidth:A,borderLeftStyle:U,borderLeftColor:J};return b.jsx("div",o({style:o(o({},Y),K)},V,{ref:e,children:X}))}));m(".overlap-border-parent-position {\r\n position: relative;\r\n}\r\n\r\n.offset-border {\r\n border: inherit;\r\n position: absolute;\r\n z-index: -2;\r\n}\r\n");var T={borderWidth:u,borderStyle:"solid",borderColor:p},E=e((function(r,e){var n=r.children,i=r.borderWidth,a=void 0===i?T.borderWidth:i,l=r.borderStyle,d=void 0===l?T.borderStyle:l,c=r.borderColor,s=void 0===c?T.borderColor:c,p=r.className,f=r.style,u=t(r,["children","borderWidth","borderStyle","borderColor","className","style"]),y={borderWidth:a,borderStyle:d,borderColor:s},m="40px";return b.jsxs("div",o({style:o(o({},y),f),className:"overlap-border-parent-position ".concat(p)},u,{ref:e,children:[b.jsx("div",{style:{inset:"calc(0px - (".concat(m," + ").concat(a,")) calc(").concat(m," - ").concat(a,")")},className:"offset-border"}),n]}))}));m(".stripe-border-parent-position {\r\n position: relative;\r\n background: black;\r\n color: white;\r\n}\r\n\r\n.stripe-border {\r\n position: absolute;\r\n z-index: -2;\r\n}\r\n");var $={angle:"45deg",stripeWidth:10,colors:[p,f],borderWidth:u},P=e((function(r,e){var n=r.children,i=r.borderWidth,a=void 0===i?$.borderWidth:i,l=r.angle,d=void 0===l?$.angle:l,c=r.stripeWidth,s=void 0===c?$.stripeWidth:c,p=r.colors,f=void 0===p?$.colors:p,u=r.className,y=t(r,["children","borderWidth","angle","stripeWidth","colors","className"]),m=function(r,e){for(var o=0,t=[],n=0;n<r.length;n++){var i=e*(n+1),a=r[n];t.push("".concat(a," ").concat(o,"%,").concat(a," ").concat(i,"%")),o=i}return t.join(",")}(f,s),h={inset:"-".concat(a),backgroundColor:"green",backgroundImage:"repeating-linear-gradient(".concat(d,",").concat(m,")")};return b.jsxs("div",o({className:"stripe-border-parent-position ".concat(u)},y,{ref:e,children:[b.jsx("div",{style:h,className:"stripe-border"}),n]}))}));m(".thin-border-parent-position {\r\n position: relative;\r\n}\r\n\r\n.thin-border {\r\n inset: 0;\r\n position: absolute;\r\n z-index: -2;\r\n}\r\n");var B={side:"vertical",borderColor:f},D=e((function(r,e){var n=r.side,i=void 0===n?B.side:n,a=r.borderColor,l=void 0===a?B.borderColor:a,d=r.children,c=r.className,s=t(r,["side","borderColor","children","className"]),p="1.5px",f=function(r){switch(r){case"top":return"100% 0 0 0";case"left":default:return"0 0 0 100%";case"bottom":return"0 0 100% 0";case"right":return"0 100% 0 0";case"horizontal":return"0 100% 0 100%";case"vertical":return"100% 0 100% 0"}}(i),u=function(r){return"top"===r||"bottom"===r||"vertical"===r?"to left":"to bottom"}(i),y={borderImageSource:"linear-gradient(".concat(u,", rgba(0,0,0,0) 1%, ").concat(l," 50%, rgba(0,0,0,0) 99%)"),borderImageWidth:p,borderImageOutset:p,borderImageSlice:f};return b.jsxs("div",o({className:"thin-border-parent-position ".concat(c)},s,{ref:e,children:[b.jsx("div",{style:y,className:"thin-border"}),d]}))}));export{v as BlurBorder,S as CornerBorder,x as DisjointedBorder,k as FancyBorder,O as GlowingGradientBorder,w as GradientBorder,_ as NormalBorder,E as OverlapBorder,P as StripeBorder,D as ThinBorder};
//# sourceMappingURL=index.js.map