@truework/ui
Advanced tools
Comparing version 1.4.0-beta6 to 1.4.0-beta7
@@ -1,2 +0,2 @@ | ||
"use strict";var Be=Object.defineProperty,Me=Object.defineProperties;var qe=Object.getOwnPropertyDescriptors;var R=Object.getOwnPropertySymbols;var ie=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var ae=(e,r,n)=>r in e?Be(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,c=(e,r)=>{for(var n in r||(r={}))ie.call(r,n)&&ae(e,n,r[n]);if(R)for(var n of R(r))le.call(r,n)&&ae(e,n,r[n]);return e},h=(e,r)=>Me(e,qe(r));var x=(e,r)=>{var n={};for(var t in e)ie.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(e!=null&&R)for(var t of R(e))r.indexOf(t)<0&&le.call(e,t)&&(n[t]=e[t]);return n};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var I=require("react"),U=require("styled-components"),i=require("styled-system"),Ge=require("react-feather");function ge(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function be(e){if(e&&e.__esModule)return e;var r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach(function(n){if(n!=="default"){var t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,t.get?t:{enumerable:!0,get:function(){return e[n]}})}}),r.default=e,Object.freeze(r)}var s=be(I),d=ge(I),u=ge(U),Ue=be(Ge);function he(e){return s.createElement("svg",c({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s.createElement("path",{style:{stroke:"none"},fillRule:"evenodd",clipRule:"evenodd",d:"M16.7 4.6c-.6 1.1-1 2.8-1 4.7 0 1.9.4 3.5 1 4.7.6 1.2 1.3 1.5 1.7 1.5.4 0 1-.3 1.7-1.5.5-1.2 1-2.8 1-4.7 0-2-.5-3.6-1-4.7-.7-1.2-1.3-1.6-1.7-1.6-.4 0-1 .4-1.7 1.6zM4.1 7.5l10.6-3.4c-.6 1.5-1 3.2-1 5.2 0 1.9.4 3.7 1 5.1L4.1 11a1.6 1.6 0 01-1-1.6v-.2a1.6 1.6 0 011-1.7zm-.6-2l13.9-4.3a3 3 0 011-.2C20 1 21 2.3 21.8 3.7 22.6 5.2 23 7 23 9.3c0 2.1-.4 4-1.2 5.6-.7 1.4-1.8 2.6-3.4 2.6a3 3 0 01-1-.1l-5.5-1.8 1 2.7a2.8 2.8 0 01-1.6 3.6 2.8 2.8 0 01-3.7-1.6L5 13.5 3.5 13A3.6 3.6 0 011 9.3a3.6 3.6 0 012.5-3.7zm6 9.4l-2-.7 2 5.4a.8.8 0 101.4-.6l-1.3-4.1zM19 7.5a2.7 2.7 0 01-1.7 4.5 11.4 11.4 0 010-5.4c.7 0 1.3.4 1.7.9z",fill:"currentColor"}))}function me(e){return s.createElement("svg",c({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s.createElement("path",{style:{stroke:"none"},fill:"currentColor",d:"M19.9 13c-.5 3.9-3.9 7-7.9 7-4.4 0-8-3.6-8-8s3.6-8 8-8V2C6.5 2 2 6.5 2 12s4.5 10 10 10c5.2 0 9.4-3.9 9.9-9h-2z"}))}function ye(e){return s.createElement("svg",c({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s.createElement("path",{style:{stroke:"none"},fillRule:"evenodd",clipRule:"evenodd",d:"M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12z",fill:"currentColor"}),s.createElement("path",{style:{stroke:"none"},fillRule:"evenodd",clipRule:"evenodd",d:"M17.31 8.043a1 1 0 010 1.414l-6.206 6.5a1 1 0 01-1.415 0l-3-3a1 1 0 111.415-1.414l2.293 2.293 5.5-5.793a1 1 0 011.414 0z",fill:"#fff"}))}function Ye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,r){return _=Object.setPrototypeOf||function(t,o){return t.__proto__=o,t},_(e,r)}function Je(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,_(e,r)}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},D(e)}function Ke(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Qe(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function C(e,r,n){return Qe()?C=Reflect.construct:C=function(o,a,l){var p=[null];p.push.apply(p,a);var g=Function.bind.apply(o,p),b=new g;return l&&_(b,l.prototype),b},C.apply(null,arguments)}function L(e){var r=typeof Map=="function"?new Map:void 0;return L=function(t){if(t===null||!Ke(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r!="undefined"){if(r.has(t))return r.get(t);r.set(t,o)}function o(){return C(t,arguments,D(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),_(o,t)},L(e)}var j=function(e){Je(r,e);function r(n){var t;return t=e.call(this,"An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#"+n+" for more information.")||this,Ye(t)}return r}(L(Error));function H(e){return Math.round(e*255)}function Xe(e,r,n){return H(e)+","+H(r)+","+H(n)}function se(e,r,n,t){if(t===void 0&&(t=Xe),r===0)return t(n,n,n);var o=(e%360+360)%360/60,a=(1-Math.abs(2*n-1))*r,l=a*(1-Math.abs(o%2-1)),p=0,g=0,b=0;o>=0&&o<1?(p=a,g=l):o>=1&&o<2?(p=l,g=a):o>=2&&o<3?(g=a,b=l):o>=3&&o<4?(g=l,b=a):o>=4&&o<5?(p=l,b=a):o>=5&&o<6&&(p=a,b=l);var P=n-a/2,z=p+P,y=g+P,W=b+P;return t(z,y,W)}var ce={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};function Ze(e){if(typeof e!="string")return e;var r=e.toLowerCase();return ce[r]?"#"+ce[r]:e}var Ve=/^#[a-fA-F0-9]{6}$/,er=/^#[a-fA-F0-9]{8}$/,rr=/^#[a-fA-F0-9]{3}$/,tr=/^#[a-fA-F0-9]{4}$/,A=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,nr=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i,or=/^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,ar=/^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;function ir(e){if(typeof e!="string")throw new j(3);var r=Ze(e);if(r.match(Ve))return{red:parseInt(""+r[1]+r[2],16),green:parseInt(""+r[3]+r[4],16),blue:parseInt(""+r[5]+r[6],16)};if(r.match(er)){var n=parseFloat((parseInt(""+r[7]+r[8],16)/255).toFixed(2));return{red:parseInt(""+r[1]+r[2],16),green:parseInt(""+r[3]+r[4],16),blue:parseInt(""+r[5]+r[6],16),alpha:n}}if(r.match(rr))return{red:parseInt(""+r[1]+r[1],16),green:parseInt(""+r[2]+r[2],16),blue:parseInt(""+r[3]+r[3],16)};if(r.match(tr)){var t=parseFloat((parseInt(""+r[4]+r[4],16)/255).toFixed(2));return{red:parseInt(""+r[1]+r[1],16),green:parseInt(""+r[2]+r[2],16),blue:parseInt(""+r[3]+r[3],16),alpha:t}}var o=A.exec(r);if(o)return{red:parseInt(""+o[1],10),green:parseInt(""+o[2],10),blue:parseInt(""+o[3],10)};var a=nr.exec(r.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])};var l=or.exec(r);if(l){var p=parseInt(""+l[1],10),g=parseInt(""+l[2],10)/100,b=parseInt(""+l[3],10)/100,P="rgb("+se(p,g,b)+")",z=A.exec(P);if(!z)throw new j(4,r,P);return{red:parseInt(""+z[1],10),green:parseInt(""+z[2],10),blue:parseInt(""+z[3],10)}}var y=ar.exec(r.substring(0,50));if(y){var W=parseInt(""+y[1],10),Le=parseInt(""+y[2],10)/100,Ne=parseInt(""+y[3],10)/100,oe="rgb("+se(W,Le,Ne)+")",T=A.exec(oe);if(!T)throw new j(4,r,oe);return{red:parseInt(""+T[1],10),green:parseInt(""+T[2],10),blue:parseInt(""+T[3],10),alpha:parseFloat(""+y[4])}}throw new j(5)}var pe=function(r){return r.length===7&&r[1]===r[2]&&r[3]===r[4]&&r[5]===r[6]?"#"+r[1]+r[3]+r[5]:r};function E(e){var r=e.toString(16);return r.length===1?"0"+r:r}function fe(e,r,n){if(typeof e=="number"&&typeof r=="number"&&typeof n=="number")return pe("#"+E(e)+E(r)+E(n));if(typeof e=="object"&&r===void 0&&n===void 0)return pe("#"+E(e.red)+E(e.green)+E(e.blue));throw new j(6)}function lr(e,r,n,t){if(typeof e=="string"&&typeof r=="number"){var o=ir(e);return"rgba("+o.red+","+o.green+","+o.blue+","+r+")"}else{if(typeof e=="number"&&typeof r=="number"&&typeof n=="number"&&typeof t=="number")return t>=1?fe(e,r,n):"rgba("+e+","+r+","+n+","+t+")";if(typeof e=="object"&&r===void 0&&n===void 0&&t===void 0)return e.alpha>=1?fe(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")"}throw new j(7)}const m={body:"#2E3280",primary:"#5B63FE",primaryDark:"#424DFF",secondary:"#404455",placeholder:"#686D86",outline:"#CCD2DA",background:"#F8FAFC",white:"#FFFFFF",error:"#E71352",warning:"#FFA13C",warningDark:"#C75211",success:"#2ABE75",successDark:"#198651",highlight:"#57BEFF",highlightDark:"#0075DB"};["body","primary","secondary","placeholder","error","warning","success"].forEach(e=>{[.1,.2,.3,.4,.5,.6,.7,.8,.9].forEach(r=>{m[`${e}-alpha${r.toString().replace(".","")}`]=lr(m[e],r)})});const xe={roboto:'"Roboto", sans-serif',mono:'"Roboto Mono", monospace'},ve=["12px","14px","16px","18px","21px","32px"],we=["16px","20px","24px","24px","24px","40px"],ke=[100,100,200,300,400,500,600,700,800,900],Oe={xxs:"4px",xs:"8px",sm:"16px",med:"24px",lg:"32px",xl:"48px",xxl:"64px"},Se=["576px","768px","992px","1200px"],Pe=["0px","4px","6px"],ze={light:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 4px 8px rgba(0, 0, 0, 0.04)",medium:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 10px 20px rgba(0, 0, 0, 0.04)",large:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.06)",xlarge:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 24px 32px rgba(0, 0, 0, 0.04)"},Ee={xs:"450px",sm:"568px",med:"900px",lg:"1200px"},je={primary:`1px solid ${m.primary}`,outline:`1px solid ${m.outline}`,error:`1px solid ${m.error}`,success:`1px solid ${m.success}`},Ie=[0,1,2,3,4,5,6,7,8,9,10],_e={xslow:"450ms",slow:"300ms",fast:"150ms"},Te={natural:"cubic-bezier(.01,.79,.35,.99)",ease:"ease-in-out"},F={colors:m,fonts:xe,fontSizes:ve,lineHeights:we,fontWeights:ke,space:Oe,breakpoints:Se,radii:Pe,shadows:ze,sizes:Ee,borders:je,zIndices:Ie,transitionDurations:_e,transitionTimingFunctions:Te};var Re={exports:{}},sr="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",cr=sr,pr=cr;function $e(){}function Ce(){}Ce.resetWarningCache=$e;var fr=function(){function e(t,o,a,l,p,g){if(g!==pr){var b=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw b.name="Invariant Violation",b}}e.isRequired=e;function r(){return e}var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,elementType:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:Ce,resetWarningCache:$e};return n.PropTypes=n,n};Re.exports=fr();var f=Re.exports;function N(){return N=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},N.apply(this,arguments)}function dr(e,r){if(e==null)return{};var n=ur(e,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(n[t]=e[t]))}return n}function ur(e,r){if(e==null)return{};var n={},t=Object.keys(e),o,a;for(a=0;a<t.length;a++)o=t[a],!(r.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Y=I.forwardRef(function(e,r){var n=e.color,t=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,l=dr(e,["color","size"]);return d.default.createElement("svg",N({ref:r,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),d.default.createElement("circle",{cx:"12",cy:"12",r:"10"}),d.default.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),d.default.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});Y.propTypes={color:f.string,size:f.oneOfType([f.string,f.number])};Y.displayName="Info";var de=Y;function B(){return B=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},B.apply(this,arguments)}function gr(e,r){if(e==null)return{};var n=br(e,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(n[t]=e[t]))}return n}function br(e,r){if(e==null)return{};var n={},t=Object.keys(e),o,a;for(a=0;a<t.length;a++)o=t[a],!(r.indexOf(o)>=0)&&(n[o]=e[o]);return n}var J=I.forwardRef(function(e,r){var n=e.color,t=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,l=gr(e,["color","size"]);return d.default.createElement("svg",B({ref:r,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),d.default.createElement("circle",{cx:"12",cy:"12",r:"10"}),d.default.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),d.default.createElement("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))});J.propTypes={color:f.string,size:f.oneOfType([f.string,f.number])};J.displayName="AlertCircle";var hr=J;function M(){return M=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},M.apply(this,arguments)}function mr(e,r){if(e==null)return{};var n=yr(e,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(n[t]=e[t]))}return n}function yr(e,r){if(e==null)return{};var n={},t=Object.keys(e),o,a;for(a=0;a<t.length;a++)o=t[a],!(r.indexOf(o)>=0)&&(n[o]=e[o]);return n}var K=I.forwardRef(function(e,r){var n=e.color,t=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,l=mr(e,["color","size"]);return d.default.createElement("svg",M({ref:r,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),d.default.createElement("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),d.default.createElement("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),d.default.createElement("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}))});K.propTypes={color:f.string,size:f.oneOfType([f.string,f.number])};K.displayName="AlertTriangle";var xr=K;function q(){return q=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},q.apply(this,arguments)}function vr(e,r){if(e==null)return{};var n=wr(e,r),t,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)t=a[o],!(r.indexOf(t)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,t)||(n[t]=e[t]))}return n}function wr(e,r){if(e==null)return{};var n={},t=Object.keys(e),o,a;for(a=0;a<t.length;a++)o=t[a],!(r.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Q=I.forwardRef(function(e,r){var n=e.color,t=n===void 0?"currentColor":n,o=e.size,a=o===void 0?24:o,l=vr(e,["color","size"]);return d.default.createElement("svg",q({ref:r,xmlns:"http://www.w3.org/2000/svg",width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),d.default.createElement("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),d.default.createElement("polyline",{points:"22 4 12 14.01 9 11.01"}))});Q.propTypes={color:f.string,size:f.oneOfType([f.string,f.number])};Q.displayName="CheckCircle";var kr=Q;const v=u.default.div({display:"flex",alignItems:"center",justifyContent:"center",background:"body-alpha01",minWidth:"52px"},i.space);v.displayName="AlertLeft";const w=u.default.div({display:"block",fontSize:F.fontSizes[1],lineHeight:F.lineHeights[1],letterSpacing:"0.3px",fontWeight:400,width:"100%"},i.space);w.displayName="AlertRight";const Fe=u.default.div({display:"flex",color:"body",background:"white",borderRadius:"4px",boxShadow:"0px 2px 6px rgba(0, 0, 0, 0.1)",overflow:"hidden","& a":{color:"inherit","&:hover":{color:"inherit",textDecoration:"underline"}}},i.compose(i.space),i.variant({prop:"appearance",variants:{primary:{border:"1px solid"},secondary:{}}}),i.variant({prop:"type",variants:{primary:{borderColor:"primary",[v]:{bg:"primary-alpha01",color:"primary"},[w]:{color:"body"}},secondary:{[v]:{bg:"placeholder-alpha01",color:"secondary"},[w]:{color:"secondary"}},error:{borderColor:"error",[v]:{bg:"error-alpha01",color:"error"},[w]:{color:"error"}},warning:{borderColor:"warning",[v]:{bg:"warning-alpha01",color:"warning"},[w]:{color:"warningDark"}},success:{borderColor:"success",[v]:{bg:"success-alpha01",color:"success"},[w]:{color:"successDark"}}}}));Fe.displayName="AlertOuter";const Or={primary:de,secondary:de,error:hr,warning:xr,success:kr};function Sr(e){let r=e.icon||Or[e.type];return s.createElement(Fe,c({},e),s.createElement(v,{p:["xs","xs","sm"]},s.createElement(r,null)),s.createElement(w,{p:"sm"},e.children))}const Pr=u.default.a(({theme:e})=>` | ||
"use strict";var Oe=Object.defineProperty,Se=Object.defineProperties;var ke=Object.getOwnPropertyDescriptors;var S=Object.getOwnPropertySymbols;var V=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var q=(e,t,r)=>t in e?Oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,s=(e,t)=>{for(var r in t||(t={}))V.call(t,r)&&q(e,r,t[r]);if(S)for(var r of S(t))U.call(t,r)&&q(e,r,t[r]);return e},f=(e,t)=>Se(e,ke(t));var x=(e,t)=>{var r={};for(var o in e)V.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&S)for(var o of S(e))t.indexOf(o)<0&&U.call(e,o)&&(r[o]=e[o]);return r};Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var w=require("react"),ze=require("polished"),W=require("styled-components"),a=require("styled-system"),Ee=require("react-feather");function K(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}function Q(e){if(e&&e.__esModule)return e;var t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var l=Q(w),d=K(w),u=K(W),Pe=Q(Ee);function X(e){return l.createElement("svg",s({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l.createElement("path",{style:{stroke:"none"},fillRule:"evenodd",clipRule:"evenodd",d:"M16.7 4.6c-.6 1.1-1 2.8-1 4.7 0 1.9.4 3.5 1 4.7.6 1.2 1.3 1.5 1.7 1.5.4 0 1-.3 1.7-1.5.5-1.2 1-2.8 1-4.7 0-2-.5-3.6-1-4.7-.7-1.2-1.3-1.6-1.7-1.6-.4 0-1 .4-1.7 1.6zM4.1 7.5l10.6-3.4c-.6 1.5-1 3.2-1 5.2 0 1.9.4 3.7 1 5.1L4.1 11a1.6 1.6 0 01-1-1.6v-.2a1.6 1.6 0 011-1.7zm-.6-2l13.9-4.3a3 3 0 011-.2C20 1 21 2.3 21.8 3.7 22.6 5.2 23 7 23 9.3c0 2.1-.4 4-1.2 5.6-.7 1.4-1.8 2.6-3.4 2.6a3 3 0 01-1-.1l-5.5-1.8 1 2.7a2.8 2.8 0 01-1.6 3.6 2.8 2.8 0 01-3.7-1.6L5 13.5 3.5 13A3.6 3.6 0 011 9.3a3.6 3.6 0 012.5-3.7zm6 9.4l-2-.7 2 5.4a.8.8 0 101.4-.6l-1.3-4.1zM19 7.5a2.7 2.7 0 01-1.7 4.5 11.4 11.4 0 010-5.4c.7 0 1.3.4 1.7.9z",fill:"currentColor"}))}function Z(e){return l.createElement("svg",s({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l.createElement("path",{style:{stroke:"none"},fill:"currentColor",d:"M19.9 13c-.5 3.9-3.9 7-7.9 7-4.4 0-8-3.6-8-8s3.6-8 8-8V2C6.5 2 2 6.5 2 12s4.5 10 10 10c5.2 0 9.4-3.9 9.9-9h-2z"}))}function ee(e){return l.createElement("svg",s({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l.createElement("path",{style:{stroke:"none"},fillRule:"evenodd",clipRule:"evenodd",d:"M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12z",fill:"currentColor"}),l.createElement("path",{style:{stroke:"none"},fillRule:"evenodd",clipRule:"evenodd",d:"M17.31 8.043a1 1 0 010 1.414l-6.206 6.5a1 1 0 01-1.415 0l-3-3a1 1 0 111.415-1.414l2.293 2.293 5.5-5.793a1 1 0 011.414 0z",fill:"#fff"}))}const g={body:"#2E3280",primary:"#5B63FE",primaryDark:"#424DFF",secondary:"#404455",placeholder:"#686D86",outline:"#CCD2DA",background:"#F8FAFC",white:"#FFFFFF",error:"#E71352",warning:"#FFA13C",warningDark:"#C75211",success:"#2ABE75",successDark:"#198651",highlight:"#57BEFF",highlightDark:"#0075DB"};["body","primary","secondary","placeholder","error","warning","success"].forEach(e=>{[.1,.2,.3,.4,.5,.6,.7,.8,.9].forEach(t=>{g[`${e}-alpha${t.toString().replace(".","")}`]=ze.rgba(g[e],t)})});const te={roboto:'"Roboto", sans-serif',mono:'"Roboto Mono", monospace'},re=["12px","14px","16px","18px","21px","32px"],oe=["16px","20px","24px","24px","24px","40px"],ne=[100,100,200,300,400,500,600,700,800,900],ie={xxs:"4px",xs:"8px",sm:"16px",med:"24px",lg:"32px",xl:"48px",xxl:"64px"},ae=["576px","768px","992px","1200px"],le=["0px","4px","6px"],se={light:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 0px 2px rgba(0, 0, 0, 0.06), 0px 4px 8px rgba(0, 0, 0, 0.04)",medium:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 10px 20px rgba(0, 0, 0, 0.04)",large:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 2px 6px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.06)",xlarge:"0px 0px 1px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 24px 32px rgba(0, 0, 0, 0.04)"},ce={xs:"450px",sm:"568px",med:"900px",lg:"1200px"},pe={primary:`1px solid ${g.primary}`,outline:`1px solid ${g.outline}`,error:`1px solid ${g.error}`,success:`1px solid ${g.success}`},de=[0,1,2,3,4,5,6,7,8,9,10],ue={xslow:"450ms",slow:"300ms",fast:"150ms"},fe={natural:"cubic-bezier(.01,.79,.35,.99)",ease:"ease-in-out"},z={colors:g,fonts:te,fontSizes:re,lineHeights:oe,fontWeights:ne,space:ie,breakpoints:ae,radii:le,shadows:se,sizes:ce,borders:pe,zIndices:de,transitionDurations:ue,transitionTimingFunctions:fe};var ge={exports:{}},Ce="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",je=Ce,Te=je;function xe(){}function me(){}me.resetWarningCache=xe;var $e=function(){function e(o,n,i,p,O,E){if(E!==Te){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}}e.isRequired=e;function t(){return e}var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:me,resetWarningCache:xe};return r.PropTypes=r,r};ge.exports=$e();var c=ge.exports;function P(){return P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},P.apply(this,arguments)}function We(e,t){if(e==null)return{};var r=Re(e,t),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(r[o]=e[o]))}return r}function Re(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var R=w.forwardRef(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,n=e.size,i=n===void 0?24:n,p=We(e,["color","size"]);return d.default.createElement("svg",P({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),d.default.createElement("circle",{cx:"12",cy:"12",r:"10"}),d.default.createElement("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),d.default.createElement("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}))});R.propTypes={color:c.string,size:c.oneOfType([c.string,c.number])};R.displayName="Info";var Y=R;function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},C.apply(this,arguments)}function _e(e,t){if(e==null)return{};var r=De(e,t),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(r[o]=e[o]))}return r}function De(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var _=w.forwardRef(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,n=e.size,i=n===void 0?24:n,p=_e(e,["color","size"]);return d.default.createElement("svg",C({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),d.default.createElement("circle",{cx:"12",cy:"12",r:"10"}),d.default.createElement("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),d.default.createElement("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"}))});_.propTypes={color:c.string,size:c.oneOfType([c.string,c.number])};_.displayName="AlertCircle";var He=_;function j(){return j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},j.apply(this,arguments)}function Fe(e,t){if(e==null)return{};var r=Ae(e,t),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(r[o]=e[o]))}return r}function Ae(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var D=w.forwardRef(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,n=e.size,i=n===void 0?24:n,p=Fe(e,["color","size"]);return d.default.createElement("svg",j({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),d.default.createElement("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),d.default.createElement("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),d.default.createElement("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}))});D.propTypes={color:c.string,size:c.oneOfType([c.string,c.number])};D.displayName="AlertTriangle";var Le=D;function T(){return T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},T.apply(this,arguments)}function Be(e,t){if(e==null)return{};var r=Ne(e,t),o,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],!(t.indexOf(o)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,o)||(r[o]=e[o]))}return r}function Ne(e,t){if(e==null)return{};var r={},o=Object.keys(e),n,i;for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}var H=w.forwardRef(function(e,t){var r=e.color,o=r===void 0?"currentColor":r,n=e.size,i=n===void 0?24:n,p=Be(e,["color","size"]);return d.default.createElement("svg",T({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:o,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},p),d.default.createElement("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),d.default.createElement("polyline",{points:"22 4 12 14.01 9 11.01"}))});H.propTypes={color:c.string,size:c.oneOfType([c.string,c.number])};H.displayName="CheckCircle";var Ie=H;const m=u.default.div({display:"flex",alignItems:"center",justifyContent:"center",background:"body-alpha01",minWidth:"52px"},a.space);m.displayName="AlertLeft";const h=u.default.div({display:"block",fontSize:z.fontSizes[1],lineHeight:z.lineHeights[1],letterSpacing:"0.3px",fontWeight:400,width:"100%"},a.space);h.displayName="AlertRight";const he=u.default.div({display:"flex",color:"body",background:"white",borderRadius:"4px",boxShadow:"0px 2px 6px rgba(0, 0, 0, 0.1)",overflow:"hidden","& a":{color:"inherit","&:hover":{color:"inherit",textDecoration:"underline"}}},a.compose(a.space),a.variant({prop:"appearance",variants:{primary:{border:"1px solid"},secondary:{}}}),a.variant({prop:"type",variants:{primary:{borderColor:"primary",[m]:{bg:"primary-alpha01",color:"primary"},[h]:{color:"body"}},secondary:{[m]:{bg:"placeholder-alpha01",color:"secondary"},[h]:{color:"secondary"}},error:{borderColor:"error",[m]:{bg:"error-alpha01",color:"error"},[h]:{color:"error"}},warning:{borderColor:"warning",[m]:{bg:"warning-alpha01",color:"warning"},[h]:{color:"warningDark"}},success:{borderColor:"success",[m]:{bg:"success-alpha01",color:"success"},[h]:{color:"successDark"}}}}));he.displayName="AlertOuter";const Me={primary:Y,secondary:Y,error:He,warning:Le,success:Ie};function Ge(e){let t=e.icon||Me[e.type];return l.createElement(he,s({},e),l.createElement(m,{p:["xs","xs","sm"]},l.createElement(t,null)),l.createElement(h,{p:"sm"},e.children))}const qe=u.default.a(({theme:e})=>` | ||
color: ${e.colors.primary} !important; | ||
@@ -8,3 +8,3 @@ font-weight: ${e.fontWeights[5]}; | ||
} | ||
`),k=u.default.div({position:"relative"},i.compose(i.space,i.layout,i.color,i.border,i.position,i.shadow,i.flexbox,i.textAlign,i.background,i.opacity,i.typography,i.system({transform:!0,transitionProperty:!0,transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"}})));k.displayName="Box";const zr={display:"inline-block",background:"transparent",color:"inherit",border:0,padding:0,fontSize:"inherit",fontWeight:"inherit",boxSizing:"border-box",textDecoration:"none",textAlign:"center",cursor:"pointer",outline:0,transitionProperty:"color, background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-in-out",":hover, :focus, :active":{outline:0,color:"primary",textDecoration:"none"},":disabled":{pointerEvents:"none",opacity:.6}},Er=i.compose(i.space,i.layout,i.position,i.textAlign,i.color,i.border),$={border:"1px solid",borderRadius:"4px",boxShadow:"0 2px 4px 0 rgba(46, 50, 128, 0.05)"},jr=i.variant({prop:"appearance",variants:{primary:h(c({},$),{bg:"primary",color:"white",borderColor:"primaryDark",":hover, :focus, :active":{outline:0,bg:"primaryDark",color:"white",textDecoration:"none"}}),secondary:h(c({},$),{bg:"white",color:"secondary",borderColor:"outline",boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.05)",":hover, :focus, :active":{outline:0,color:"body",boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.1)",textDecoration:"none"}}),tertiary:h(c({},$),{bg:"white",color:"primary",borderColor:"primary",":hover, :focus, :active":{outline:0,bg:"background",color:"primary",textDecoration:"none"}}),error:h(c({},$),{bg:"white",color:"error",borderColor:"error",boxShadow:"0px 2px 4px rgba(236, 56, 110, 0.05)",":hover, :focus, :active":{outline:0,boxShadow:"0px 2px 4px rgba(236, 56, 110, 0.15)",bg:"background",color:"error",textDecoration:"none"}})}}),Ir=i.variant({prop:"size",variants:{small:{fontWeight:500,fontSize:0,letterSpacing:"0.3px",paddingTop:"xs",paddingBottom:"xs",paddingLeft:"sm",paddingRight:"sm"},large:{fontWeight:"bold",fontSize:1,letterSpacing:"0.6px",paddingTop:"sm",paddingBottom:"sm",paddingLeft:"med",paddingRight:"med"},smallSquare:{fontWeight:500,fontSize:0,letterSpacing:"0.3px",paddingTop:"xs",paddingBottom:"xs",paddingLeft:"xs",paddingRight:"xs",minWidth:"32px"},largeSquare:{fontWeight:500,fontSize:1,letterSpacing:"0.6px",paddingTop:"sm",paddingBottom:"sm",paddingLeft:"sm",paddingRight:"sm",minWidth:"50px"}}}),We=u.default.button(zr,Er,jr,Ir);We.displayName="Button";const _r=We;function Tr(t){var o=t,{children:e,size:r=32}=o,n=x(o,["children","size"]);return s.createElement(k,c({width:`${r}px`,height:`${r}px`,borderRadius:"100%",display:"flex",alignItems:"center",justifyContent:"center"},n),e)}function Rr(t){var o=t,{children:e,size:r="lg"}=o,n=x(o,["children","size"]);return s.createElement(k,c({mx:"auto",maxWidth:r,width:"100%"},n),e)}const $r=U.createGlobalStyle(({theme:e})=>` | ||
`),y=u.default.div({position:"relative"},a.compose(a.space,a.layout,a.color,a.border,a.position,a.shadow,a.flexbox,a.textAlign,a.background,a.opacity,a.typography,a.system({transform:!0,transitionProperty:!0,transitionDuration:{property:"transitionDuration",scale:"transitionDurations"},transitionTimingFunction:{property:"transitionTimingFunction",scale:"transitionTimingFunctions"}})));y.displayName="Box";const Ve={display:"inline-block",background:"transparent",color:"inherit",border:0,padding:0,fontSize:"inherit",fontWeight:"inherit",boxSizing:"border-box",textDecoration:"none",textAlign:"center",cursor:"pointer",outline:0,transitionProperty:"color, background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-in-out",":hover, :focus, :active":{outline:0,color:"primary",textDecoration:"none"},":disabled":{pointerEvents:"none",opacity:.6}},Ue=a.compose(a.space,a.layout,a.position,a.textAlign,a.color,a.border),k={border:"1px solid",borderRadius:"4px",boxShadow:"0 2px 4px 0 rgba(46, 50, 128, 0.05)"},Ye=a.variant({prop:"appearance",variants:{primary:f(s({},k),{bg:"primary",color:"white",borderColor:"primaryDark",":hover, :focus, :active":{outline:0,bg:"primaryDark",color:"white",textDecoration:"none"}}),secondary:f(s({},k),{bg:"white",color:"secondary",borderColor:"outline",boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.05)",":hover, :focus, :active":{outline:0,color:"body",boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.1)",textDecoration:"none"}}),tertiary:f(s({},k),{bg:"white",color:"primary",borderColor:"primary",":hover, :focus, :active":{outline:0,bg:"background",color:"primary",textDecoration:"none"}}),error:f(s({},k),{bg:"white",color:"error",borderColor:"error",boxShadow:"0px 2px 4px rgba(236, 56, 110, 0.05)",":hover, :focus, :active":{outline:0,boxShadow:"0px 2px 4px rgba(236, 56, 110, 0.15)",bg:"background",color:"error",textDecoration:"none"}})}}),Je=a.variant({prop:"size",variants:{small:{fontWeight:500,fontSize:0,letterSpacing:"0.3px",paddingTop:"xs",paddingBottom:"xs",paddingLeft:"sm",paddingRight:"sm"},large:{fontWeight:"bold",fontSize:1,letterSpacing:"0.6px",paddingTop:"sm",paddingBottom:"sm",paddingLeft:"med",paddingRight:"med"},smallSquare:{fontWeight:500,fontSize:0,letterSpacing:"0.3px",paddingTop:"xs",paddingBottom:"xs",paddingLeft:"xs",paddingRight:"xs",minWidth:"32px"},largeSquare:{fontWeight:500,fontSize:1,letterSpacing:"0.6px",paddingTop:"sm",paddingBottom:"sm",paddingLeft:"sm",paddingRight:"sm",minWidth:"50px"}}}),ye=u.default.button(Ve,Ue,Ye,Je);ye.displayName="Button";const Ke=ye;function Qe(o){var n=o,{children:e,size:t=32}=n,r=x(n,["children","size"]);return l.createElement(y,s({width:`${t}px`,height:`${t}px`,borderRadius:"100%",display:"flex",alignItems:"center",justifyContent:"center"},r),e)}function Xe(o){var n=o,{children:e,size:t="lg"}=n,r=x(n,["children","size"]);return l.createElement(y,s({mx:"auto",maxWidth:t,width:"100%"},r),e)}const Ze=W.createGlobalStyle(({theme:e})=>` | ||
*, *:before, *:after { | ||
@@ -57,3 +57,3 @@ box-sizing: border-box; | ||
} | ||
`),He=s.createContext("0");function G(e,r,n=1){return[].concat(r).map(t=>{const o=e.space[t]?e.space[t]:t,[,a,l]=o.match(/([\d.]+)([^\d]*)/)||[];return parseFloat(a)/2*n+l})}function Cr(t){var o=t,{children:e,gutter:r}=o,n=x(o,["children","gutter"]);const a=s.useContext(U.ThemeContext),l=s.useMemo(()=>r?G(a,r,-1):"",[r]),p=s.useMemo(()=>r?G(a,r):"",[r]);return s.createElement(k,c({display:"flex",mx:l},n),s.createElement(He.Provider,{value:p},e))}function Ae(n){var t=n,{children:e}=t,r=x(t,["children"]);return s.createElement(He.Consumer,null,o=>s.createElement(k,c({px:o},r),e))}Ae.defaultProps={width:"100%"};const ue={small:["med","med","lg"],normal:["med","med","xl"]};function Fr(a){var l=a,{children:e,size:r="normal",withVertical:n,sizeVertical:t}=l,o=x(l,["children","size","withVertical","sizeVertical"]);const p=ue[r],g=n?ue[t||r]:0;return s.createElement(k,c({px:p,py:g,width:"100%",position:"static"},o),e)}const Wr=h(c({},Ue),{Megaphone:he,Loading:me,CircleCheckFull:ye});function Hr({children:e,className:r=""}){return s.cloneElement(e,{className:r})}const Ar=u.default(Hr)` | ||
`),be=l.createContext("0");function $(e,t,r=1){return[].concat(t).map(o=>{const n=e.space[o]?e.space[o]:o,[,i,p]=n.match(/([\d.]+)([^\d]*)/)||[];return parseFloat(i)/2*r+p})}function et(o){var n=o,{children:e,gutter:t}=n,r=x(n,["children","gutter"]);const i=l.useContext(W.ThemeContext),p=l.useMemo(()=>t?$(i,t,-1):"",[t]),O=l.useMemo(()=>t?$(i,t):"",[t]);return l.createElement(y,s({display:"flex",mx:p},r),l.createElement(be.Provider,{value:O},e))}function ve(r){var o=r,{children:e}=o,t=x(o,["children"]);return l.createElement(be.Consumer,null,n=>l.createElement(y,s({px:n},t),e))}ve.defaultProps={width:"100%"};const J={small:["med","med","lg"],normal:["med","med","xl"]};function tt(i){var p=i,{children:e,size:t="normal",withVertical:r,sizeVertical:o}=p,n=x(p,["children","size","withVertical","sizeVertical"]);const O=J[t],E=r?J[o||t]:0;return l.createElement(y,s({px:O,py:E,width:"100%",position:"static"},n),e)}const rt=f(s({},Pe),{Megaphone:X,Loading:Z,CircleCheckFull:ee});function ot({children:e,className:t=""}){return l.cloneElement(e,{className:t})}const nt=u.default(ot)` | ||
display: block; | ||
@@ -63,6 +63,6 @@ pointer-events: none; | ||
stroke: currentColor; | ||
${i.color} | ||
${i.space} | ||
${i.layout} | ||
${i.position} | ||
`;function Dr(t){var o=t,{name:e,icon:r}=o,n=x(o,["name","icon"]);const a=r||(e?Wr[e]:null);return a?s.createElement(Ar,c({width:"16px",height:"16px"},n),s.createElement(a,null)):null}const De=u.default.span({display:"inline-block",position:"relative"},i.compose(i.color,i.border,i.shadow,i.typography,i.space,i.layout,i.position,i.flexbox));De.displayName="Span";const O={fontFamily:F.fonts.roboto,letterSpacing:"0.6px"},S=i.compose(i.space,i.layout,i.typography,i.color),X=u.default.h1(S);X.defaultProps=h(c({},O),{fontSize:5,lineHeight:5,fontWeight:9});X.displayName="H1";const Z=u.default.h2(S);Z.defaultProps=h(c({},O),{fontSize:4,lineHeight:4,fontWeight:7});Z.displayName="H2";const V=u.default.h3(S);V.defaultProps=h(c({},O),{fontSize:3,lineHeight:3,fontWeight:5});V.displayName="H3";const ee=u.default.h4(S);ee.defaultProps=h(c({},O),{fontSize:2,lineHeight:2,fontWeight:7});ee.displayName="H4";const re=u.default.h5(S);re.defaultProps=h(c({},O),{fontSize:1,lineHeight:1,fontWeight:5});re.displayName="H5";const te=u.default.h6(S);te.defaultProps=h(c({},O),{fontSize:0,lineHeight:0,letterSpacing:"0.3px",fontWeight:5});te.displayName="H6";const ne=u.default.p(S);ne.defaultProps=h(c({},O),{fontSize:2,lineHeight:2,letterSpacing:"0.3px",fontWeight:4});ne.displayName="P";const Lr={Megaphone:he,Loading:me,CircleCheckFull:ye};exports.A=Pr;exports.Alert=Sr;exports.Box=k;exports.Button=_r;exports.Circle=Tr;exports.Container=Rr;exports.GlobalStyle=$r;exports.GridItem=Ae;exports.GridRow=Cr;exports.Gutter=Fr;exports.H1=X;exports.H2=Z;exports.H3=V;exports.H4=ee;exports.H5=re;exports.H6=te;exports.Icon=Dr;exports.P=ne;exports.Span=De;exports.borders=je;exports.breakpoints=Se;exports.colors=m;exports.convertGutterValuesToPixels=G;exports.fontSizes=ve;exports.fontWeights=ke;exports.fonts=xe;exports.icons=Lr;exports.lineHeights=we;exports.radii=Pe;exports.shadows=ze;exports.sizes=Ee;exports.space=Oe;exports.theme=F;exports.transitionDurations=_e;exports.transitionTimingFunctions=Te;exports.zIndices=Ie; | ||
${a.color} | ||
${a.space} | ||
${a.layout} | ||
${a.position} | ||
`;function it(o){var n=o,{name:e,icon:t}=n,r=x(n,["name","icon"]);const i=t||(e?rt[e]:null);return i?l.createElement(nt,s({width:"16px",height:"16px"},r),l.createElement(i,null)):null}const we=u.default.span({display:"inline-block",position:"relative"},a.compose(a.color,a.border,a.shadow,a.typography,a.space,a.layout,a.position,a.flexbox));we.displayName="Span";const b={fontFamily:z.fonts.roboto,letterSpacing:"0.6px"},v=a.compose(a.space,a.layout,a.typography,a.color),F=u.default.h1(v);F.defaultProps=f(s({},b),{fontSize:5,lineHeight:5,fontWeight:9});F.displayName="H1";const A=u.default.h2(v);A.defaultProps=f(s({},b),{fontSize:4,lineHeight:4,fontWeight:7});A.displayName="H2";const L=u.default.h3(v);L.defaultProps=f(s({},b),{fontSize:3,lineHeight:3,fontWeight:5});L.displayName="H3";const B=u.default.h4(v);B.defaultProps=f(s({},b),{fontSize:2,lineHeight:2,fontWeight:7});B.displayName="H4";const N=u.default.h5(v);N.defaultProps=f(s({},b),{fontSize:1,lineHeight:1,fontWeight:5});N.displayName="H5";const I=u.default.h6(v);I.defaultProps=f(s({},b),{fontSize:0,lineHeight:0,letterSpacing:"0.3px",fontWeight:5});I.displayName="H6";const M=u.default.p(v);M.defaultProps=f(s({},b),{fontSize:2,lineHeight:2,letterSpacing:"0.3px",fontWeight:4});M.displayName="P";const at={Megaphone:X,Loading:Z,CircleCheckFull:ee};exports.A=qe;exports.Alert=Ge;exports.Box=y;exports.Button=Ke;exports.Circle=Qe;exports.Container=Xe;exports.GlobalStyle=Ze;exports.GridItem=ve;exports.GridRow=et;exports.Gutter=tt;exports.H1=F;exports.H2=A;exports.H3=L;exports.H4=B;exports.H5=N;exports.H6=I;exports.Icon=it;exports.P=M;exports.Span=we;exports.borders=pe;exports.breakpoints=ae;exports.colors=g;exports.convertGutterValuesToPixels=$;exports.fontSizes=re;exports.fontWeights=ne;exports.fonts=te;exports.icons=at;exports.lineHeights=oe;exports.radii=le;exports.shadows=se;exports.sizes=ce;exports.space=ie;exports.theme=z;exports.transitionDurations=ue;exports.transitionTimingFunctions=fe;exports.zIndices=de; |
@@ -34,2 +34,3 @@ var __defProp = Object.defineProperty; | ||
import React__default, { forwardRef } from "react"; | ||
import { rgba } from "polished"; | ||
import styled, { createGlobalStyle, ThemeContext } from "styled-components"; | ||
@@ -81,425 +82,2 @@ import { space as space$1, compose, variant, layout, color, border, position, shadow, flexbox, textAlign, background, opacity, typography, system as system$1 } from "styled-system"; | ||
} | ||
function _assertThisInitialized(self) { | ||
if (self === void 0) { | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
} | ||
return self; | ||
} | ||
function _setPrototypeOf(o, p) { | ||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) { | ||
o2.__proto__ = p2; | ||
return o2; | ||
}; | ||
return _setPrototypeOf(o, p); | ||
} | ||
function _inheritsLoose(subClass, superClass) { | ||
subClass.prototype = Object.create(superClass.prototype); | ||
subClass.prototype.constructor = subClass; | ||
_setPrototypeOf(subClass, superClass); | ||
} | ||
function _getPrototypeOf(o) { | ||
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) { | ||
return o2.__proto__ || Object.getPrototypeOf(o2); | ||
}; | ||
return _getPrototypeOf(o); | ||
} | ||
function _isNativeFunction(fn) { | ||
return Function.toString.call(fn).indexOf("[native code]") !== -1; | ||
} | ||
function _isNativeReflectConstruct() { | ||
if (typeof Reflect === "undefined" || !Reflect.construct) | ||
return false; | ||
if (Reflect.construct.sham) | ||
return false; | ||
if (typeof Proxy === "function") | ||
return true; | ||
try { | ||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { | ||
})); | ||
return true; | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
function _construct(Parent, args, Class) { | ||
if (_isNativeReflectConstruct()) { | ||
_construct = Reflect.construct; | ||
} else { | ||
_construct = function _construct2(Parent2, args2, Class2) { | ||
var a = [null]; | ||
a.push.apply(a, args2); | ||
var Constructor = Function.bind.apply(Parent2, a); | ||
var instance = new Constructor(); | ||
if (Class2) | ||
_setPrototypeOf(instance, Class2.prototype); | ||
return instance; | ||
}; | ||
} | ||
return _construct.apply(null, arguments); | ||
} | ||
function _wrapNativeSuper(Class) { | ||
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0; | ||
_wrapNativeSuper = function _wrapNativeSuper2(Class2) { | ||
if (Class2 === null || !_isNativeFunction(Class2)) | ||
return Class2; | ||
if (typeof Class2 !== "function") { | ||
throw new TypeError("Super expression must either be null or a function"); | ||
} | ||
if (typeof _cache !== "undefined") { | ||
if (_cache.has(Class2)) | ||
return _cache.get(Class2); | ||
_cache.set(Class2, Wrapper); | ||
} | ||
function Wrapper() { | ||
return _construct(Class2, arguments, _getPrototypeOf(this).constructor); | ||
} | ||
Wrapper.prototype = Object.create(Class2.prototype, { | ||
constructor: { | ||
value: Wrapper, | ||
enumerable: false, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
return _setPrototypeOf(Wrapper, Class2); | ||
}; | ||
return _wrapNativeSuper(Class); | ||
} | ||
var PolishedError = /* @__PURE__ */ function(_Error) { | ||
_inheritsLoose(PolishedError2, _Error); | ||
function PolishedError2(code) { | ||
var _this; | ||
{ | ||
_this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this; | ||
} | ||
return _assertThisInitialized(_this); | ||
} | ||
return PolishedError2; | ||
}(/* @__PURE__ */ _wrapNativeSuper(Error)); | ||
function colorToInt(color2) { | ||
return Math.round(color2 * 255); | ||
} | ||
function convertToInt(red, green, blue) { | ||
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue); | ||
} | ||
function hslToRgb(hue, saturation, lightness, convert) { | ||
if (convert === void 0) { | ||
convert = convertToInt; | ||
} | ||
if (saturation === 0) { | ||
return convert(lightness, lightness, lightness); | ||
} | ||
var huePrime = (hue % 360 + 360) % 360 / 60; | ||
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation; | ||
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1)); | ||
var red = 0; | ||
var green = 0; | ||
var blue = 0; | ||
if (huePrime >= 0 && huePrime < 1) { | ||
red = chroma; | ||
green = secondComponent; | ||
} else if (huePrime >= 1 && huePrime < 2) { | ||
red = secondComponent; | ||
green = chroma; | ||
} else if (huePrime >= 2 && huePrime < 3) { | ||
green = chroma; | ||
blue = secondComponent; | ||
} else if (huePrime >= 3 && huePrime < 4) { | ||
green = secondComponent; | ||
blue = chroma; | ||
} else if (huePrime >= 4 && huePrime < 5) { | ||
red = secondComponent; | ||
blue = chroma; | ||
} else if (huePrime >= 5 && huePrime < 6) { | ||
red = chroma; | ||
blue = secondComponent; | ||
} | ||
var lightnessModification = lightness - chroma / 2; | ||
var finalRed = red + lightnessModification; | ||
var finalGreen = green + lightnessModification; | ||
var finalBlue = blue + lightnessModification; | ||
return convert(finalRed, finalGreen, finalBlue); | ||
} | ||
var namedColorMap = { | ||
aliceblue: "f0f8ff", | ||
antiquewhite: "faebd7", | ||
aqua: "00ffff", | ||
aquamarine: "7fffd4", | ||
azure: "f0ffff", | ||
beige: "f5f5dc", | ||
bisque: "ffe4c4", | ||
black: "000", | ||
blanchedalmond: "ffebcd", | ||
blue: "0000ff", | ||
blueviolet: "8a2be2", | ||
brown: "a52a2a", | ||
burlywood: "deb887", | ||
cadetblue: "5f9ea0", | ||
chartreuse: "7fff00", | ||
chocolate: "d2691e", | ||
coral: "ff7f50", | ||
cornflowerblue: "6495ed", | ||
cornsilk: "fff8dc", | ||
crimson: "dc143c", | ||
cyan: "00ffff", | ||
darkblue: "00008b", | ||
darkcyan: "008b8b", | ||
darkgoldenrod: "b8860b", | ||
darkgray: "a9a9a9", | ||
darkgreen: "006400", | ||
darkgrey: "a9a9a9", | ||
darkkhaki: "bdb76b", | ||
darkmagenta: "8b008b", | ||
darkolivegreen: "556b2f", | ||
darkorange: "ff8c00", | ||
darkorchid: "9932cc", | ||
darkred: "8b0000", | ||
darksalmon: "e9967a", | ||
darkseagreen: "8fbc8f", | ||
darkslateblue: "483d8b", | ||
darkslategray: "2f4f4f", | ||
darkslategrey: "2f4f4f", | ||
darkturquoise: "00ced1", | ||
darkviolet: "9400d3", | ||
deeppink: "ff1493", | ||
deepskyblue: "00bfff", | ||
dimgray: "696969", | ||
dimgrey: "696969", | ||
dodgerblue: "1e90ff", | ||
firebrick: "b22222", | ||
floralwhite: "fffaf0", | ||
forestgreen: "228b22", | ||
fuchsia: "ff00ff", | ||
gainsboro: "dcdcdc", | ||
ghostwhite: "f8f8ff", | ||
gold: "ffd700", | ||
goldenrod: "daa520", | ||
gray: "808080", | ||
green: "008000", | ||
greenyellow: "adff2f", | ||
grey: "808080", | ||
honeydew: "f0fff0", | ||
hotpink: "ff69b4", | ||
indianred: "cd5c5c", | ||
indigo: "4b0082", | ||
ivory: "fffff0", | ||
khaki: "f0e68c", | ||
lavender: "e6e6fa", | ||
lavenderblush: "fff0f5", | ||
lawngreen: "7cfc00", | ||
lemonchiffon: "fffacd", | ||
lightblue: "add8e6", | ||
lightcoral: "f08080", | ||
lightcyan: "e0ffff", | ||
lightgoldenrodyellow: "fafad2", | ||
lightgray: "d3d3d3", | ||
lightgreen: "90ee90", | ||
lightgrey: "d3d3d3", | ||
lightpink: "ffb6c1", | ||
lightsalmon: "ffa07a", | ||
lightseagreen: "20b2aa", | ||
lightskyblue: "87cefa", | ||
lightslategray: "789", | ||
lightslategrey: "789", | ||
lightsteelblue: "b0c4de", | ||
lightyellow: "ffffe0", | ||
lime: "0f0", | ||
limegreen: "32cd32", | ||
linen: "faf0e6", | ||
magenta: "f0f", | ||
maroon: "800000", | ||
mediumaquamarine: "66cdaa", | ||
mediumblue: "0000cd", | ||
mediumorchid: "ba55d3", | ||
mediumpurple: "9370db", | ||
mediumseagreen: "3cb371", | ||
mediumslateblue: "7b68ee", | ||
mediumspringgreen: "00fa9a", | ||
mediumturquoise: "48d1cc", | ||
mediumvioletred: "c71585", | ||
midnightblue: "191970", | ||
mintcream: "f5fffa", | ||
mistyrose: "ffe4e1", | ||
moccasin: "ffe4b5", | ||
navajowhite: "ffdead", | ||
navy: "000080", | ||
oldlace: "fdf5e6", | ||
olive: "808000", | ||
olivedrab: "6b8e23", | ||
orange: "ffa500", | ||
orangered: "ff4500", | ||
orchid: "da70d6", | ||
palegoldenrod: "eee8aa", | ||
palegreen: "98fb98", | ||
paleturquoise: "afeeee", | ||
palevioletred: "db7093", | ||
papayawhip: "ffefd5", | ||
peachpuff: "ffdab9", | ||
peru: "cd853f", | ||
pink: "ffc0cb", | ||
plum: "dda0dd", | ||
powderblue: "b0e0e6", | ||
purple: "800080", | ||
rebeccapurple: "639", | ||
red: "f00", | ||
rosybrown: "bc8f8f", | ||
royalblue: "4169e1", | ||
saddlebrown: "8b4513", | ||
salmon: "fa8072", | ||
sandybrown: "f4a460", | ||
seagreen: "2e8b57", | ||
seashell: "fff5ee", | ||
sienna: "a0522d", | ||
silver: "c0c0c0", | ||
skyblue: "87ceeb", | ||
slateblue: "6a5acd", | ||
slategray: "708090", | ||
slategrey: "708090", | ||
snow: "fffafa", | ||
springgreen: "00ff7f", | ||
steelblue: "4682b4", | ||
tan: "d2b48c", | ||
teal: "008080", | ||
thistle: "d8bfd8", | ||
tomato: "ff6347", | ||
turquoise: "40e0d0", | ||
violet: "ee82ee", | ||
wheat: "f5deb3", | ||
white: "fff", | ||
whitesmoke: "f5f5f5", | ||
yellow: "ff0", | ||
yellowgreen: "9acd32" | ||
}; | ||
function nameToHex(color2) { | ||
if (typeof color2 !== "string") | ||
return color2; | ||
var normalizedColorName = color2.toLowerCase(); | ||
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color2; | ||
} | ||
var hexRegex = /^#[a-fA-F0-9]{6}$/; | ||
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/; | ||
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/; | ||
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/; | ||
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i; | ||
var rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i; | ||
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i; | ||
var hslaRegex = /^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i; | ||
function parseToRgb(color2) { | ||
if (typeof color2 !== "string") { | ||
throw new PolishedError(3); | ||
} | ||
var normalizedColor = nameToHex(color2); | ||
if (normalizedColor.match(hexRegex)) { | ||
return { | ||
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16), | ||
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16), | ||
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16) | ||
}; | ||
} | ||
if (normalizedColor.match(hexRgbaRegex)) { | ||
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2)); | ||
return { | ||
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16), | ||
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16), | ||
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16), | ||
alpha | ||
}; | ||
} | ||
if (normalizedColor.match(reducedHexRegex)) { | ||
return { | ||
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16), | ||
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16), | ||
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16) | ||
}; | ||
} | ||
if (normalizedColor.match(reducedRgbaHexRegex)) { | ||
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2)); | ||
return { | ||
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16), | ||
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16), | ||
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16), | ||
alpha: _alpha | ||
}; | ||
} | ||
var rgbMatched = rgbRegex.exec(normalizedColor); | ||
if (rgbMatched) { | ||
return { | ||
red: parseInt("" + rgbMatched[1], 10), | ||
green: parseInt("" + rgbMatched[2], 10), | ||
blue: parseInt("" + rgbMatched[3], 10) | ||
}; | ||
} | ||
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50)); | ||
if (rgbaMatched) { | ||
return { | ||
red: parseInt("" + rgbaMatched[1], 10), | ||
green: parseInt("" + rgbaMatched[2], 10), | ||
blue: parseInt("" + rgbaMatched[3], 10), | ||
alpha: parseFloat("" + rgbaMatched[4]) | ||
}; | ||
} | ||
var hslMatched = hslRegex.exec(normalizedColor); | ||
if (hslMatched) { | ||
var hue = parseInt("" + hslMatched[1], 10); | ||
var saturation = parseInt("" + hslMatched[2], 10) / 100; | ||
var lightness = parseInt("" + hslMatched[3], 10) / 100; | ||
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")"; | ||
var hslRgbMatched = rgbRegex.exec(rgbColorString); | ||
if (!hslRgbMatched) { | ||
throw new PolishedError(4, normalizedColor, rgbColorString); | ||
} | ||
return { | ||
red: parseInt("" + hslRgbMatched[1], 10), | ||
green: parseInt("" + hslRgbMatched[2], 10), | ||
blue: parseInt("" + hslRgbMatched[3], 10) | ||
}; | ||
} | ||
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50)); | ||
if (hslaMatched) { | ||
var _hue = parseInt("" + hslaMatched[1], 10); | ||
var _saturation = parseInt("" + hslaMatched[2], 10) / 100; | ||
var _lightness = parseInt("" + hslaMatched[3], 10) / 100; | ||
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")"; | ||
var _hslRgbMatched = rgbRegex.exec(_rgbColorString); | ||
if (!_hslRgbMatched) { | ||
throw new PolishedError(4, normalizedColor, _rgbColorString); | ||
} | ||
return { | ||
red: parseInt("" + _hslRgbMatched[1], 10), | ||
green: parseInt("" + _hslRgbMatched[2], 10), | ||
blue: parseInt("" + _hslRgbMatched[3], 10), | ||
alpha: parseFloat("" + hslaMatched[4]) | ||
}; | ||
} | ||
throw new PolishedError(5); | ||
} | ||
var reduceHexValue = function reduceHexValue2(value) { | ||
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) { | ||
return "#" + value[1] + value[3] + value[5]; | ||
} | ||
return value; | ||
}; | ||
function numberToHex(value) { | ||
var hex = value.toString(16); | ||
return hex.length === 1 ? "0" + hex : hex; | ||
} | ||
function rgb(value, green, blue) { | ||
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") { | ||
return reduceHexValue("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue)); | ||
} else if (typeof value === "object" && green === void 0 && blue === void 0) { | ||
return reduceHexValue("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue)); | ||
} | ||
throw new PolishedError(6); | ||
} | ||
function rgba(firstValue, secondValue, thirdValue, fourthValue) { | ||
if (typeof firstValue === "string" && typeof secondValue === "number") { | ||
var rgbValue = parseToRgb(firstValue); | ||
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")"; | ||
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") { | ||
return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")"; | ||
} else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) { | ||
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")"; | ||
} | ||
throw new PolishedError(7); | ||
} | ||
const colors = { | ||
@@ -506,0 +84,0 @@ body: "#2E3280", |
{ | ||
"name": "@truework/ui", | ||
"version": "1.4.0-beta6", | ||
"version": "1.4.0-beta7", | ||
"description": "", | ||
@@ -41,2 +41,3 @@ "main": "dist/ui.cjs.js", | ||
"@types/lodash": "^4.14.149", | ||
"@types/react": "16", | ||
"@types/react-router-dom": "^5.1.3", | ||
@@ -46,3 +47,7 @@ "@types/styled-components": "^5.1.25", | ||
"jest": "^24.5.0", | ||
"react": "16", | ||
"react-dom": "16", | ||
"react-feather": "^2.0.9", | ||
"styled-components": "^5.3.5", | ||
"styled-system": "^5.1.5", | ||
"ts-jest": "^24.0.0", | ||
@@ -54,2 +59,5 @@ "typescript": "4.6.4", | ||
"polished": "^3.1.0", | ||
"react-is": "16" | ||
}, | ||
"peerDependencies": { | ||
"react": "16", | ||
@@ -56,0 +64,0 @@ "react-feather": "^2.0.9", |
@@ -7,4 +7,5 @@ { | ||
"declaration": true, | ||
"declarationDir": "dist" | ||
"declarationDir": "dist", | ||
"resolveJsonModule": true | ||
} | ||
} |
import { defineConfig } from 'vite' | ||
import { resolve } from 'path' | ||
import pkg from './package.json' | ||
export default defineConfig({ | ||
@@ -13,5 +15,5 @@ build: { | ||
rollupOptions: { | ||
external: ['react', 'styled-components', 'styled-system', 'react-feather'], | ||
external: Object.keys(pkg.dependencies).concat(Object.keys(pkg.peerDependencies)), | ||
}, | ||
}, | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94263
6
16
56
2427
+ Addedreact-is@16
- Removedreact@16
- Removedreact-feather@^2.0.9
- Removedstyled-components@^5.3.5
- Removedstyled-system@^5.1.5