Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

polished

Package Overview
Dependencies
Maintainers
2
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polished - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

dist/polished.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.polished=e.polished||{})}(this,function(e){"use strict";function t(e,t){if(!e)return t;var n=e.split("-");return n.splice(1,0,t),n.join("-")}function n(e,n){for(var r={},o=0;o<n.length;o+=1)n[o]&&(r[t(e,Ie[o])]=n[o]);return r}function r(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=r[0],i=r[1],u=void 0===i?a:i,s=r[2],l=void 0===s?a:s,p=r[3];return n(e,[a,u,l,void 0===p?u:p])}function o(e){var t=parseFloat(e);return isNaN(t)?e:t}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"1em",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"perfectFourth";if(!e)throw new Error("Please provide a number of steps to the modularScale helper.");if("string"==typeof n&&!Ae[n])throw new Error("Please pass a number or one of the predefined scales to the modularScale helper as the ratio.");var r="string"==typeof t?o(t):t,a="string"==typeof n?Ae[n]:n;if("string"==typeof r)throw new Error('Invalid value passed as base to modularScale, expected number or em string but got "'+t+'"');return r*a*e+"em"}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return Pe({},e+"::after",{clear:"both",content:"",display:"table"})}function u(){return{display:"inline-block","max-width":arguments.length>0&&void 0!==arguments[0]?arguments[0]:"100%",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap","word-wrap":"normal"}}function s(e,t){return t.map(function(t){return'url("'+e+"."+t+'")'}).join(", ")}function l(e){return e.map(function(e){return'local("'+e+'")'}).join(", ")}function p(e,t,n){var r=[];return t&&r.push(l(t)),e&&r.push(s(e,n)),r.join(", ")}function c(e){var t=e.fontFamily,n=e.fontFilePath,r=e.fontStretch,o=e.fontStyle,a=e.fontVariant,i=e.fontWeight,u=e.fileFormats,s=void 0===u?["eot","woff2","woff","ttf","svg"]:u,l=e.localFonts,c=e.unicodeRange;if(!t)throw new Error("fontFace expects a name of a font-family.");if(!n&&!l)throw new Error("fontFace expects either the path to the font file(s) or a name of a local copy.");if(l&&!Array.isArray(l))throw new Error("fontFace expects localFonts to be an array.");if(!Array.isArray(s))throw new Error("fontFace expects fileFormats to be an array.");var f={"@font-face":{"font-family":t,src:p(n,l,s),"unicode-range":c,"font-stretch":r,"font-style":o,"font-variant":a,"font-weight":i}};return JSON.parse(JSON.stringify(f))}function f(){return{"text-indent":"101%",overflow:"hidden","white-space":"nowrap"}}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.3;return"\n @media only screen and (-webkit-min-device-pixel-ratio: "+e+"),\n only screen and (min--moz-device-pixel-ratio: "+e+"),\n only screen and (-o-min-device-pixel-ratio: "+e+"/1),\n only screen and (min-resolution: "+Math.round(96*e)+"dpi),\n only screen and (min-resolution: "+e+"dppx)\n "}function h(e,t){var n=Ce({},e);return Object.keys(t).forEach(function(e){n[e]?n[e]=Ce({},n[e],t[e]):n[e]=Ce({},t[e])}),n}function b(e){return e?Te:h(Te,Me)}function g(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return t={},Pe(t,n+"::-webkit-input-placeholder",Ce({},e)),Pe(t,n+":-moz-placeholder",Ce({},e)),Pe(t,n+"::-moz-placeholder",Ce({},e)),Pe(t,n+":-ms-input-placeholder",Ce({},e)),t}function m(e){return e[0].split(" ")[0]}function y(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],3===n&&(arguments.length<=n+1?void 0:arguments[n+1])&&((arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3]))?(t=t.slice(0,-1),t+=", "+(arguments.length<=n+1?void 0:arguments[n+1])):3!==n||arguments.length<=n+1||!arguments[n+1]||(arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3])?(arguments.length<=n+1?void 0:arguments[n+1])&&(t+=(arguments.length<=n+1?void 0:arguments[n+1])+" "):t+=""+(arguments.length<=n+1?void 0:arguments[n+1]);return t.trim()}function v(e){var t=e.colorStops,n=e.extent,r=e.fallback,o=e.position,a=e.shape;if(!t||t.length<2)throw new Error("radialGradient requries at least 2 color-stops to properly render.");return{"background-color":r||m(t),"background-image":y(Qe,o,a,n,t.join(", "))}}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"png",r=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"_2x";if(!e)throw new Error("Please supply a filename to retinaImage() as the first argument.");var a=n.replace(/^\./,""),i=r?r+"."+a:""+e+o+"."+a;return Pe({backgroundImage:"url("+e+"."+a+")"},d(),{backgroundImage:"url("+i+")",backgroundSize:t})}function x(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t={},Pe(t,n+"::-moz-selection",Ce({},e)),Pe(t,n+"::selection",Ce({},e)),t}function z(e){return Re[e]}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"break-word";return{"overflow-wrap":e,"word-wrap":e,"word-break":"break-word"===e?"break-all":e}}function I(e){return Math.round(255*e)}function j(e,t,n){return I(e)+","+I(t)+","+I(n)}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j;if(0===t)return r(n,n,n);var o=e%360/60,a=(1-Math.abs(2*n-1))*t,i=a*(1-Math.abs(o%2-1)),u=0,s=0,l=0;o>=0&&o<1?(u=a,s=i):o>=1&&o<2?(u=i,s=a):o>=2&&o<3?(s=a,l=i):o>=3&&o<4?(s=i,l=a):o>=4&&o<5?(u=i,l=a):o>=5&&o<6&&(u=a,l=i);var p=n-a/2;return r(u+p,s+p,l+p)}function S(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");if(e.match($e))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(qe))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};var t=He.exec(e);if(t)return{red:parseInt(""+t[1],10),green:parseInt(""+t[2],10),blue:parseInt(""+t[3],10)};var n=Be.exec(e);if(n)return{red:parseInt(""+n[1],10),green:parseInt(""+n[2],10),blue:parseInt(""+n[3],10),alpha:parseFloat(""+n[4],10)};var r=Ne.exec(e);if(r){var o=parseInt(""+r[1],10),a=parseInt(""+r[2],10)/100,i=parseInt(""+r[3],10)/100,u="rgb("+E(o,a,i)+")",s=He.exec(u);return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10)}}var l=We.exec(e);if(l){var p=parseInt(""+l[1],10),c=parseInt(""+l[2],10)/100,f=parseInt(""+l[3],10)/100,d="rgb("+E(p,c,f)+")",h=He.exec(d);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+l[4],10)}}throw new Error("Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.")}function A(e){var t=e.red/255,n=e.green/255,r=e.blue/255,o=Math.max(t,n,r),a=Math.min(t,n,r),i=(o+a)/2;if(o===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var u=void 0,s=o-a,l=i>.5?s/(2-o-a):s/(o+a);switch(o){case t:u=(n-r)/s+(n<r?6:0);break;case n:u=(r-t)/s+2;break;default:u=(t-n)/s+4}return u*=60,void 0!==e.alpha?{hue:u,saturation:l,lightness:i,alpha:e.alpha}:{hue:u,saturation:l,lightness:i}}function O(e){return A(S(e))}function F(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function P(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return _e("#"+F(e)+F(t)+F(n));if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n)return _e("#"+F(e.red)+F(e.green)+F(e.blue));throw new Error("Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).")}function C(e,t,n,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?P(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?P(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Error("Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).")}function M(e){return F(Math.round(255*e))}function T(e,t,n){return _e("#"+M(e)+M(t)+M(n))}function Q(e,t,n){return E(e,t,n,T)}function R(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Q(e,t,n);if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n)return Q(e.hue,e.saturation,e.lightness);throw new Error("Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).")}function $(e,t,n,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?Q(e,t,n):"rgba("+E(e,t,n)+","+r+")";if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?Q(e.hue,e.saturation,e.lightness):"rgba("+E(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Error("Passed invalid arguments to hsla, please pass multiple numbers e.g. hsl(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).")}function q(e){if(Je(e))return C(e);if(Ge(e))return P(e);if(De(e))return $(e);if(Ye(e))return R(e);throw new Error("Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.")}function H(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):H(e,t,r)}}function B(e){return H(e,e.length,[])}function N(e,t){var n=O(t);return q(Ce({},n,{hue:(n.hue+e)%360}))}function W(e){var t=O(e);return q(Ce({},t,{hue:(t.hue+180)%360}))}function _(e,t,n){return Math.max(e,Math.min(t,n))}function G(e,t){var n=O(t);return q(Ce({},n,{lightness:_(0,1,n.lightness-e)}))}function J(e,t){var n=O(t);return q(Ce({},n,{saturation:_(0,1,n.saturation-e)}))}function Y(e){return q(Ce({},O(e),{saturation:0}))}function D(e){var t=S(e);return q(Ce({},t,{red:255-t.red,green:255-t.green,blue:255-t.blue}))}function L(e,t){var n=O(t);return q(Ce({},n,{lightness:_(0,1,n.lightness+e)}))}function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,t=arguments[1],n=arguments[2],r=S(t),o=Ce({},r,{alpha:"number"==typeof r.alpha?r.alpha:1}),a=S(n),i=Ce({},a,{alpha:"number"==typeof a.alpha?a.alpha:1}),u=o.alpha-i.alpha,s=2*e-1,l=s*u==-1?s:s+u,p=1+s*u,c=(l/p+1)/2,f=1-c;return C({red:Math.floor(o.red*c+i.red*f),green:Math.floor(o.green*c+i.green*f),blue:Math.floor(o.blue*c+i.blue*f),alpha:o.alpha+(i.alpha-o.alpha)*(e/1)})}function V(e,t){var n=S(t),r="number"==typeof n.alpha?n.alpha:1;return C(Ce({},n,{alpha:_(0,1,r+e)}))}function K(e,t){var n=O(t);return q(Ce({},n,{saturation:_(0,1,n.saturation+e)}))}function X(e,t){return q(Ce({},O(t),{hue:e}))}function Z(e,t){return q(Ce({},O(t),{lightness:e}))}function ee(e,t){return q(Ce({},O(t),{saturation:e}))}function te(e,t){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to shade, please pass a percentage less than or equal to 1 and larger than or equal to -1.");return Xe(e,t,"rgb(0, 0, 0)")}function ne(e,t){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to tint, please pass a percentage less than or equal to 1 and larger than or equal to -1.");return Xe(e,t,"rgb(255, 255, 255)")}function re(e,t){var n=S(t),r="number"==typeof n.alpha?n.alpha:1;return C(Ce({},n,{alpha:_(0,1,r-e)}))}function oe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0]);if(!r&&t.length>8)throw new Error("The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation");return{animation:t.map(function(e){if(r&&!Array.isArray(e)||!r&&Array.isArray(e))throw new Error("To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')");if(Array.isArray(e)&&e.length>8)throw new Error("The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation");return Array.isArray(e)?e.join(" "):e}).join(", ")}}function ae(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{"background-image":t.join(", ")}}function ie(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{background:t.join(", ")}}function ue(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["border-color"].concat(t))}function se(e,t){if(!t||"string"!=typeof t)throw new Error("borderRadius expects a radius value as a string as the second argument.");if("top"===e||"bottom"===e){var n;return n={},Pe(n,"border-"+e+"-right-radius",t),Pe(n,"border-"+e+"-left-radius",t),n}if("left"===e||"right"===e){var r;return r={},Pe(r,"border-top-"+e+"-radius",t),Pe(r,"border-bottom-"+e+"-radius",t),r}throw new Error('borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.')}function le(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["border-style"].concat(t))}function pe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["border-width"].concat(t))}function ce(e,t){return e(t?":"+t:"")}function fe(e,t,n){if(!t)throw new Error("You must provide a template to this method.");if(0===e.length)return ce(t,null);for(var r=[],o=0;o<e.length;o+=1){if(n&&!n.includes(e[o]))throw new Error("You passed an unsupported selector state to this method.");r.push(ce(t,e[o]))}return r=r.join(",")}function de(e){return"button"+e+',\n input[type="button"]'+e+',\n input[type="reset"]'+e+',\n input[type="submit"]'+e}function he(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return fe(t,de,ut)}function be(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["margin"].concat(t))}function ge(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["padding"].concat(t))}function me(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(st.includes(e))return Ce({position:e},r.apply(void 0,[""].concat(n)));var a=e;return r.apply(void 0,["",a].concat(n))}function ye(e){return{height:e,width:arguments.length>1&&void 0!==arguments[1]?arguments[1]:e}}function ve(e){return'input[type="color"]'+e+',\n input[type="date"]'+e+',\n input[type="datetime"]'+e+',\n input[type="datetime-local"]'+e+',\n input[type="email"]'+e+',\n input[type="month"]'+e+',\n input[type="number"]'+e+',\n input[type="password"]'+e+',\n input[type="search"]'+e+',\n input[type="tel"]'+e+',\n input[type="text"]'+e+',\n input[type="time"]'+e+',\n input[type="url"]'+e+',\n input[type="week"]'+e+",\n input:not([type])"+e+",\n textarea"+e}function we(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return fe(t,ve,lt)}function xe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{transition:t.join(", ")}}var ze,ke,Ie=["top","right","bottom","left"],je=function(e,t){return e.substr(-t.length)===t},Ee=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"16px",r=t,a=n;if("string"==typeof t){if(!je(t,"px"))throw new Error('Expected a string ending in "px" or a number passed as the first argument to '+e+'(), got "'+t+'" instead.');r=o(t)}if("string"==typeof n){if(!je(n,"px"))throw new Error('Expected a string ending in "px" or a number passed as the second argument to '+e+'(), got "'+n+'" instead.');a=o(n)}if("string"==typeof r)throw new Error('Passed invalid pixel value ("'+t+'") to '+e+'(), please pass a value like "12px" or 12.');if("string"==typeof a)throw new Error('Passed invalid base value ("'+n+'") to '+e+'(), please pass a value like "12px" or 12.');return""+r/a+e}},Se=Ee("em"),Ae={minorSecond:1.067,majorSecond:1.125,minorThird:1.2,majorThird:1.25,perfectFourth:1.333,augFourth:1.414,perfectFifth:1.5,minorSixth:1.6,goldenSection:1.618,majorSixth:1.667,minorSeventh:1.778,majorSeventh:1.875,octave:2,majorTenth:2.5,majorEleventh:2.667,majorTwelfth:3,doubleOctave:4},Oe=Ee("rem"),Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me=(ze={html:{"font-family":"sans-serif"},body:{margin:"0"}},Pe(ze,"a:active,\n a:hover",{"outline-width":"0"}),Pe(ze,"button,\n input,\n optgroup,\n select,\n textarea",{"font-family":"sans-serif","font-size":"100%","line-height":"1.15"}),ze),Te=(ke={html:{"line-height":"1.15","-ms-text-size-adjust":"100%","-webkit-text-size-adjust":"100%"}},Pe(ke,"article,\n aside,\n footer,\n header,\n nav,\n section",{display:"block"}),Pe(ke,"h1",{"font-size":"2em",margin:"0.67em 0"}),Pe(ke,"figcaption,\n figure,\n main",{display:"block"}),Pe(ke,"figure",{margin:"1em 40px"}),Pe(ke,"hr",{"box-sizing":"content-box",height:"0",overflow:"visible"}),Pe(ke,"pre",{"font-family":"monospace, monospace","font-size":"1em"}),Pe(ke,"a",{"background-color":"transparent","-webkit-text-decoration-skip":"objects"}),Pe(ke,"abbr[title]",Pe({"border-bottom":"none","text-decoration":"underline"},"text-decoration","underline dotted")),Pe(ke,"b,\n strong",{"font-weight":"inherit"}),Pe(ke,"code,\n kbd,\n samp",{"font-family":"monospace, monospace","font-size":"1em"}),Pe(ke,"dfn",{"font-style":"italic"}),Pe(ke,"mark",{"background-color":"#ff0",color:"#000"}),Pe(ke,"small",{"font-size":"80%"}),Pe(ke,"sub,\n sup",{"font-size":"75%","line-height":"0",position:"relative","vertical-align":"baseline"}),Pe(ke,"sub",{bottom:"-0.25em"}),Pe(ke,"sup",{top:"-0.5em"}),Pe(ke,"audio,\n video",{display:"inline-block"}),Pe(ke,"audio:not([controls])",{display:"none",height:"0"}),Pe(ke,"img",{"border-style":"none"}),Pe(ke,"svg:not(:root)",{overflow:"hidden"}),Pe(ke,"button,\n input,\n optgroup,\n select,\n textarea",{margin:"0"}),Pe(ke,"button,\n input",{overflow:"visible"}),Pe(ke,"button,\n select",{"text-transform":"none"}),Pe(ke,'button,\n html [type="button"],\n [type="reset"],\n [type="submit"]',{"-webkit-appearance":"button"}),Pe(ke,'button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner',{"border-style":"none",padding:"0"}),Pe(ke,'button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring',{outline:"1px dotted ButtonText"}),Pe(ke,"fieldset",{border:"1px solid #c0c0c0",margin:"0 2px",padding:"0.35em 0.625em 0.75em"}),Pe(ke,"legend",{"box-sizing":"border-box",color:"inherit",display:"table","max-width":"100%",padding:"0","white-space":"normal"}),Pe(ke,"progress",{display:"inline-block","vertical-align":"baseline"}),Pe(ke,"textarea",{overflow:"auto"}),Pe(ke,'[type="checkbox"],\n [type="radio"]',{"box-sizing":"border-box",padding:"0"}),Pe(ke,'[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button',{height:"auto"}),Pe(ke,'[type="search"]',{"-webkit-appearance":"textfield","outline-offset":"-2px"}),Pe(ke,'[type="search"]::-webkit-search-cancel-button,\n [type="search"]::-webkit-search-decoration',{"-webkit-appearance":"none"}),Pe(ke,"::-webkit-file-upload-button",{"-webkit-appearance":"button",font:"inherit"}),Pe(ke,"details,\n menu",{display:"block"}),Pe(ke,"summary",{display:"list-item"}),Pe(ke,"canvas",{display:"inline-block"}),Pe(ke,"template",{display:"none"}),Pe(ke,"[hidden]",{display:"none"}),ke),Qe=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["radial-gradient(","","","",")"],["radial-gradient(","","","",")"]),Re={easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"},$e=/^#[a-fA-F0-9]{6}$/,qe=/^#[a-fA-F0-9]{3}$/,He=/^rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)$/,Be=/^rgba\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3}), ?([-+]?[0-9]*[.]?[0-9]+)\)$/,Ne=/^hsl\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%\)$/,We=/^hsla\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%, ?([-+]?[0-9]*[.]?[0-9]+)\)$/,_e=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e},Ge=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"!=typeof e.alpha},Je=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},Ye=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"!=typeof e.alpha},De=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha},Le=B(N),Ue=B(G),Ve=B(J),Ke=B(L),Xe=B(U),Ze=B(V),et=B(K),tt=B(X),nt=B(Z),rt=B(ee),ot=B(te),at=B(ne),it=B(re),ut=[void 0,null,"active","focus","hover"],st=["absolute","fixed","relative","static","sticky"],lt=[void 0,null,"active","focus","hover"];e.adjustHue=Le,e.animation=oe,e.backgroundImages=ae,e.backgrounds=ie,e.borderColor=ue,e.borderRadius=se,e.borderStyle=le,e.borderWidth=pe,e.buttons=he,e.clearFix=i,e.complement=W,e.darken=Ue,e.desaturate=Ve,e.directionalProperty=r,e.ellipsis=u,e.em=Se,e.fontFace=c,e.grayscale=Y,e.invert=D,e.hideText=f,e.hiDPI=d,e.hsl=R,e.hsla=$,e.lighten=Ke,e.margin=be,e.mix=Xe,e.modularScale=a,e.normalize=b,e.opacify=Ze,e.padding=ge,e.parseToHsl=O,e.parseToRgb=S,e.placeholder=g,e.position=me,e.radialGradient=v,e.rem=Oe,e.retinaImage=w,e.rgb=P,e.rgba=C,e.saturate=et,e.selection=x,e.setHue=tt,e.setLightness=nt,e.setSaturation=rt,e.shade=ot,e.size=ye,e.stripUnit=o,e.textInputs=we,e.timingFunctions=z,e.tint=at,e.toColorString=q,e.transitions=xe,e.transparentize=it,e.wordWrap=k,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.polished=e.polished||{})}(this,function(e){"use strict";function t(e,t){if(!e)return t;var n=e.split("-");return n.splice(1,0,t),n.join("-")}function n(e,n){for(var r={},o=0;o<n.length;o+=1)n[o]&&(r[t(e,Ie[o])]=n[o]);return r}function r(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=r[0],i=r[1],u=void 0===i?a:i,s=r[2],l=void 0===s?a:s,p=r[3];return n(e,[a,u,l,void 0===p?u:p])}function o(e){var t=parseFloat(e);return isNaN(t)?e:t}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"1em",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"perfectFourth";if("number"!=typeof e)throw new Error("Please provide a number of steps to the modularScale helper.");if("string"==typeof n&&!Ae[n])throw new Error("Please pass a number or one of the predefined scales to the modularScale helper as the ratio.");var r="string"==typeof t?o(t):t,a="string"==typeof n?Ae[n]:n;if("string"==typeof r)throw new Error('Invalid value passed as base to modularScale, expected number or em string but got "'+t+'"');return r*Math.pow(a,e)+"em"}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return Pe({},e+"::after",{clear:"both",content:"",display:"table"})}function u(){return{display:"inline-block","max-width":arguments.length>0&&void 0!==arguments[0]?arguments[0]:"100%",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap","word-wrap":"normal"}}function s(e,t){return t.map(function(t){return'url("'+e+"."+t+'")'}).join(", ")}function l(e){return e.map(function(e){return'local("'+e+'")'}).join(", ")}function p(e,t,n){var r=[];return t&&r.push(l(t)),e&&r.push(s(e,n)),r.join(", ")}function c(e){var t=e.fontFamily,n=e.fontFilePath,r=e.fontStretch,o=e.fontStyle,a=e.fontVariant,i=e.fontWeight,u=e.fileFormats,s=void 0===u?["eot","woff2","woff","ttf","svg"]:u,l=e.localFonts,c=e.unicodeRange;if(!t)throw new Error("fontFace expects a name of a font-family.");if(!n&&!l)throw new Error("fontFace expects either the path to the font file(s) or a name of a local copy.");if(l&&!Array.isArray(l))throw new Error("fontFace expects localFonts to be an array.");if(!Array.isArray(s))throw new Error("fontFace expects fileFormats to be an array.");var f={"@font-face":{"font-family":t,src:p(n,l,s),"unicode-range":c,"font-stretch":r,"font-style":o,"font-variant":a,"font-weight":i}};return JSON.parse(JSON.stringify(f))}function f(){return{"text-indent":"101%",overflow:"hidden","white-space":"nowrap"}}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.3;return"\n @media only screen and (-webkit-min-device-pixel-ratio: "+e+"),\n only screen and (min--moz-device-pixel-ratio: "+e+"),\n only screen and (-o-min-device-pixel-ratio: "+e+"/1),\n only screen and (min-resolution: "+Math.round(96*e)+"dpi),\n only screen and (min-resolution: "+e+"dppx)\n "}function h(e,t){var n=Ce({},e);return Object.keys(t).forEach(function(e){n[e]?n[e]=Ce({},n[e],t[e]):n[e]=Ce({},t[e])}),n}function b(e){return e?Te:h(Te,Me)}function g(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return t={},Pe(t,n+"::-webkit-input-placeholder",Ce({},e)),Pe(t,n+":-moz-placeholder",Ce({},e)),Pe(t,n+"::-moz-placeholder",Ce({},e)),Pe(t,n+":-ms-input-placeholder",Ce({},e)),t}function m(e){return e[0].split(" ")[0]}function y(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],3===n&&(arguments.length<=n+1?void 0:arguments[n+1])&&((arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3]))?(t=t.slice(0,-1),t+=", "+(arguments.length<=n+1?void 0:arguments[n+1])):3!==n||arguments.length<=n+1||!arguments[n+1]||(arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3])?(arguments.length<=n+1?void 0:arguments[n+1])&&(t+=(arguments.length<=n+1?void 0:arguments[n+1])+" "):t+=""+(arguments.length<=n+1?void 0:arguments[n+1]);return t.trim()}function v(e){var t=e.colorStops,n=e.extent,r=e.fallback,o=e.position,a=e.shape;if(!t||t.length<2)throw new Error("radialGradient requries at least 2 color-stops to properly render.");return{"background-color":r||m(t),"background-image":y(Qe,o,a,n,t.join(", "))}}function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"png",r=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"_2x";if(!e)throw new Error("Please supply a filename to retinaImage() as the first argument.");var a=n.replace(/^\./,""),i=r?r+"."+a:""+e+o+"."+a;return Pe({backgroundImage:"url("+e+"."+a+")"},d(),{backgroundImage:"url("+i+")",backgroundSize:t})}function x(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t={},Pe(t,n+"::-moz-selection",Ce({},e)),Pe(t,n+"::selection",Ce({},e)),t}function z(e){return Re[e]}function k(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"break-word";return{"overflow-wrap":e,"word-wrap":e,"word-break":"break-word"===e?"break-all":e}}function I(e){return Math.round(255*e)}function j(e,t,n){return I(e)+","+I(t)+","+I(n)}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j;if(0===t)return r(n,n,n);var o=e%360/60,a=(1-Math.abs(2*n-1))*t,i=a*(1-Math.abs(o%2-1)),u=0,s=0,l=0;o>=0&&o<1?(u=a,s=i):o>=1&&o<2?(u=i,s=a):o>=2&&o<3?(s=a,l=i):o>=3&&o<4?(s=i,l=a):o>=4&&o<5?(u=i,l=a):o>=5&&o<6&&(u=a,l=i);var p=n-a/2;return r(u+p,s+p,l+p)}function S(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");if(e.match($e))return{red:parseInt(""+e[1]+e[2],16),green:parseInt(""+e[3]+e[4],16),blue:parseInt(""+e[5]+e[6],16)};if(e.match(qe))return{red:parseInt(""+e[1]+e[1],16),green:parseInt(""+e[2]+e[2],16),blue:parseInt(""+e[3]+e[3],16)};var t=He.exec(e);if(t)return{red:parseInt(""+t[1],10),green:parseInt(""+t[2],10),blue:parseInt(""+t[3],10)};var n=Be.exec(e);if(n)return{red:parseInt(""+n[1],10),green:parseInt(""+n[2],10),blue:parseInt(""+n[3],10),alpha:parseFloat(""+n[4],10)};var r=Ne.exec(e);if(r){var o=parseInt(""+r[1],10),a=parseInt(""+r[2],10)/100,i=parseInt(""+r[3],10)/100,u="rgb("+E(o,a,i)+")",s=He.exec(u);return{red:parseInt(""+s[1],10),green:parseInt(""+s[2],10),blue:parseInt(""+s[3],10)}}var l=We.exec(e);if(l){var p=parseInt(""+l[1],10),c=parseInt(""+l[2],10)/100,f=parseInt(""+l[3],10)/100,d="rgb("+E(p,c,f)+")",h=He.exec(d);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+l[4],10)}}throw new Error("Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.")}function A(e){var t=e.red/255,n=e.green/255,r=e.blue/255,o=Math.max(t,n,r),a=Math.min(t,n,r),i=(o+a)/2;if(o===a)return void 0!==e.alpha?{hue:0,saturation:0,lightness:i,alpha:e.alpha}:{hue:0,saturation:0,lightness:i};var u=void 0,s=o-a,l=i>.5?s/(2-o-a):s/(o+a);switch(o){case t:u=(n-r)/s+(n<r?6:0);break;case n:u=(r-t)/s+2;break;default:u=(t-n)/s+4}return u*=60,void 0!==e.alpha?{hue:u,saturation:l,lightness:i,alpha:e.alpha}:{hue:u,saturation:l,lightness:i}}function O(e){return A(S(e))}function F(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function P(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return _e("#"+F(e)+F(t)+F(n));if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n)return _e("#"+F(e.red)+F(e.green)+F(e.blue));throw new Error("Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).")}function C(e,t,n,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?P(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?P(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new Error("Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).")}function M(e){return F(Math.round(255*e))}function T(e,t,n){return _e("#"+M(e)+M(t)+M(n))}function Q(e,t,n){return E(e,t,n,T)}function R(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Q(e,t,n);if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n)return Q(e.hue,e.saturation,e.lightness);throw new Error("Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).")}function $(e,t,n,r){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?Q(e,t,n):"rgba("+E(e,t,n)+","+r+")";if("object"===(void 0===e?"undefined":Fe(e))&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?Q(e.hue,e.saturation,e.lightness):"rgba("+E(e.hue,e.saturation,e.lightness)+","+e.alpha+")";throw new Error("Passed invalid arguments to hsla, please pass multiple numbers e.g. hsl(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).")}function q(e){if(Je(e))return C(e);if(Ge(e))return P(e);if(De(e))return $(e);if(Ye(e))return R(e);throw new Error("Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.")}function H(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):H(e,t,r)}}function B(e){return H(e,e.length,[])}function N(e,t){var n=O(t);return q(Ce({},n,{hue:(n.hue+e)%360}))}function W(e){var t=O(e);return q(Ce({},t,{hue:(t.hue+180)%360}))}function _(e,t,n){return Math.max(e,Math.min(t,n))}function G(e,t){var n=O(t);return q(Ce({},n,{lightness:_(0,1,n.lightness-e)}))}function J(e,t){var n=O(t);return q(Ce({},n,{saturation:_(0,1,n.saturation-e)}))}function Y(e){return q(Ce({},O(e),{saturation:0}))}function D(e){var t=S(e);return q(Ce({},t,{red:255-t.red,green:255-t.green,blue:255-t.blue}))}function L(e,t){var n=O(t);return q(Ce({},n,{lightness:_(0,1,n.lightness+e)}))}function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,t=arguments[1],n=arguments[2],r=S(t),o=Ce({},r,{alpha:"number"==typeof r.alpha?r.alpha:1}),a=S(n),i=Ce({},a,{alpha:"number"==typeof a.alpha?a.alpha:1}),u=o.alpha-i.alpha,s=2*e-1,l=s*u==-1?s:s+u,p=1+s*u,c=(l/p+1)/2,f=1-c;return C({red:Math.floor(o.red*c+i.red*f),green:Math.floor(o.green*c+i.green*f),blue:Math.floor(o.blue*c+i.blue*f),alpha:o.alpha+(i.alpha-o.alpha)*(e/1)})}function V(e,t){var n=S(t),r="number"==typeof n.alpha?n.alpha:1;return C(Ce({},n,{alpha:_(0,1,r+e)}))}function K(e,t){var n=O(t);return q(Ce({},n,{saturation:_(0,1,n.saturation+e)}))}function X(e,t){return q(Ce({},O(t),{hue:e}))}function Z(e,t){return q(Ce({},O(t),{lightness:e}))}function ee(e,t){return q(Ce({},O(t),{saturation:e}))}function te(e,t){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to shade, please pass a percentage less than or equal to 1 and larger than or equal to -1.");return Xe(e,t,"rgb(0, 0, 0)")}function ne(e,t){if("number"!=typeof e||e>1||e<-1)throw new Error("Passed an incorrect argument to tint, please pass a percentage less than or equal to 1 and larger than or equal to -1.");return Xe(e,t,"rgb(255, 255, 255)")}function re(e,t){var n=S(t),r="number"==typeof n.alpha?n.alpha:1;return C(Ce({},n,{alpha:_(0,1,r-e)}))}function oe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Array.isArray(t[0]);if(!r&&t.length>8)throw new Error("The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation");return{animation:t.map(function(e){if(r&&!Array.isArray(e)||!r&&Array.isArray(e))throw new Error("To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')");if(Array.isArray(e)&&e.length>8)throw new Error("The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation");return Array.isArray(e)?e.join(" "):e}).join(", ")}}function ae(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{"background-image":t.join(", ")}}function ie(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{background:t.join(", ")}}function ue(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["border-color"].concat(t))}function se(e,t){if(!t||"string"!=typeof t)throw new Error("borderRadius expects a radius value as a string as the second argument.");if("top"===e||"bottom"===e){var n;return n={},Pe(n,"border-"+e+"-right-radius",t),Pe(n,"border-"+e+"-left-radius",t),n}if("left"===e||"right"===e){var r;return r={},Pe(r,"border-top-"+e+"-radius",t),Pe(r,"border-bottom-"+e+"-radius",t),r}throw new Error('borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.')}function le(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["border-style"].concat(t))}function pe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["border-width"].concat(t))}function ce(e,t){return e(t?":"+t:"")}function fe(e,t,n){if(!t)throw new Error("You must provide a template to this method.");if(0===e.length)return ce(t,null);for(var r=[],o=0;o<e.length;o+=1){if(n&&!n.includes(e[o]))throw new Error("You passed an unsupported selector state to this method.");r.push(ce(t,e[o]))}return r=r.join(",")}function de(e){return"button"+e+',\n input[type="button"]'+e+',\n input[type="reset"]'+e+',\n input[type="submit"]'+e}function he(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return fe(t,de,ut)}function be(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["margin"].concat(t))}function ge(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(void 0,["padding"].concat(t))}function me(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];if(st.includes(e))return Ce({position:e},r.apply(void 0,[""].concat(n)));var a=e;return r.apply(void 0,["",a].concat(n))}function ye(e){return{height:e,width:arguments.length>1&&void 0!==arguments[1]?arguments[1]:e}}function ve(e){return'input[type="color"]'+e+',\n input[type="date"]'+e+',\n input[type="datetime"]'+e+',\n input[type="datetime-local"]'+e+',\n input[type="email"]'+e+',\n input[type="month"]'+e+',\n input[type="number"]'+e+',\n input[type="password"]'+e+',\n input[type="search"]'+e+',\n input[type="tel"]'+e+',\n input[type="text"]'+e+',\n input[type="time"]'+e+',\n input[type="url"]'+e+',\n input[type="week"]'+e+",\n input:not([type])"+e+",\n textarea"+e}function we(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return fe(t,ve,lt)}function xe(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return{transition:t.join(", ")}}var ze,ke,Ie=["top","right","bottom","left"],je=function(e,t){return e.substr(-t.length)===t},Ee=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"16px",r=t,a=n;if("string"==typeof t){if(!je(t,"px"))throw new Error('Expected a string ending in "px" or a number passed as the first argument to '+e+'(), got "'+t+'" instead.');r=o(t)}if("string"==typeof n){if(!je(n,"px"))throw new Error('Expected a string ending in "px" or a number passed as the second argument to '+e+'(), got "'+n+'" instead.');a=o(n)}if("string"==typeof r)throw new Error('Passed invalid pixel value ("'+t+'") to '+e+'(), please pass a value like "12px" or 12.');if("string"==typeof a)throw new Error('Passed invalid base value ("'+n+'") to '+e+'(), please pass a value like "12px" or 12.');return""+r/a+e}},Se=Ee("em"),Ae={minorSecond:1.067,majorSecond:1.125,minorThird:1.2,majorThird:1.25,perfectFourth:1.333,augFourth:1.414,perfectFifth:1.5,minorSixth:1.6,goldenSection:1.618,majorSixth:1.667,minorSeventh:1.778,majorSeventh:1.875,octave:2,majorTenth:2.5,majorEleventh:2.667,majorTwelfth:3,doubleOctave:4},Oe=Ee("rem"),Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me=(ze={html:{"font-family":"sans-serif"},body:{margin:"0"}},Pe(ze,"a:active,\n a:hover",{"outline-width":"0"}),Pe(ze,"button,\n input,\n optgroup,\n select,\n textarea",{"font-family":"sans-serif","font-size":"100%","line-height":"1.15"}),ze),Te=(ke={html:{"line-height":"1.15","-ms-text-size-adjust":"100%","-webkit-text-size-adjust":"100%"}},Pe(ke,"article,\n aside,\n footer,\n header,\n nav,\n section",{display:"block"}),Pe(ke,"h1",{"font-size":"2em",margin:"0.67em 0"}),Pe(ke,"figcaption,\n figure,\n main",{display:"block"}),Pe(ke,"figure",{margin:"1em 40px"}),Pe(ke,"hr",{"box-sizing":"content-box",height:"0",overflow:"visible"}),Pe(ke,"pre",{"font-family":"monospace, monospace","font-size":"1em"}),Pe(ke,"a",{"background-color":"transparent","-webkit-text-decoration-skip":"objects"}),Pe(ke,"abbr[title]",Pe({"border-bottom":"none","text-decoration":"underline"},"text-decoration","underline dotted")),Pe(ke,"b,\n strong",{"font-weight":"inherit"}),Pe(ke,"code,\n kbd,\n samp",{"font-family":"monospace, monospace","font-size":"1em"}),Pe(ke,"dfn",{"font-style":"italic"}),Pe(ke,"mark",{"background-color":"#ff0",color:"#000"}),Pe(ke,"small",{"font-size":"80%"}),Pe(ke,"sub,\n sup",{"font-size":"75%","line-height":"0",position:"relative","vertical-align":"baseline"}),Pe(ke,"sub",{bottom:"-0.25em"}),Pe(ke,"sup",{top:"-0.5em"}),Pe(ke,"audio,\n video",{display:"inline-block"}),Pe(ke,"audio:not([controls])",{display:"none",height:"0"}),Pe(ke,"img",{"border-style":"none"}),Pe(ke,"svg:not(:root)",{overflow:"hidden"}),Pe(ke,"button,\n input,\n optgroup,\n select,\n textarea",{margin:"0"}),Pe(ke,"button,\n input",{overflow:"visible"}),Pe(ke,"button,\n select",{"text-transform":"none"}),Pe(ke,'button,\n html [type="button"],\n [type="reset"],\n [type="submit"]',{"-webkit-appearance":"button"}),Pe(ke,'button::-moz-focus-inner,\n [type="button"]::-moz-focus-inner,\n [type="reset"]::-moz-focus-inner,\n [type="submit"]::-moz-focus-inner',{"border-style":"none",padding:"0"}),Pe(ke,'button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring',{outline:"1px dotted ButtonText"}),Pe(ke,"fieldset",{border:"1px solid #c0c0c0",margin:"0 2px",padding:"0.35em 0.625em 0.75em"}),Pe(ke,"legend",{"box-sizing":"border-box",color:"inherit",display:"table","max-width":"100%",padding:"0","white-space":"normal"}),Pe(ke,"progress",{display:"inline-block","vertical-align":"baseline"}),Pe(ke,"textarea",{overflow:"auto"}),Pe(ke,'[type="checkbox"],\n [type="radio"]',{"box-sizing":"border-box",padding:"0"}),Pe(ke,'[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button',{height:"auto"}),Pe(ke,'[type="search"]',{"-webkit-appearance":"textfield","outline-offset":"-2px"}),Pe(ke,'[type="search"]::-webkit-search-cancel-button,\n [type="search"]::-webkit-search-decoration',{"-webkit-appearance":"none"}),Pe(ke,"::-webkit-file-upload-button",{"-webkit-appearance":"button",font:"inherit"}),Pe(ke,"details,\n menu",{display:"block"}),Pe(ke,"summary",{display:"list-item"}),Pe(ke,"canvas",{display:"inline-block"}),Pe(ke,"template",{display:"none"}),Pe(ke,"[hidden]",{display:"none"}),ke),Qe=function(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["radial-gradient(","","","",")"],["radial-gradient(","","","",")"]),Re={easeInBack:"cubic-bezier(0.600, -0.280, 0.735, 0.045)",easeInCirc:"cubic-bezier(0.600, 0.040, 0.980, 0.335)",easeInCubic:"cubic-bezier(0.550, 0.055, 0.675, 0.190)",easeInExpo:"cubic-bezier(0.950, 0.050, 0.795, 0.035)",easeInQuad:"cubic-bezier(0.550, 0.085, 0.680, 0.530)",easeInQuart:"cubic-bezier(0.895, 0.030, 0.685, 0.220)",easeInQuint:"cubic-bezier(0.755, 0.050, 0.855, 0.060)",easeInSine:"cubic-bezier(0.470, 0.000, 0.745, 0.715)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.320, 1.275)",easeOutCubic:"cubic-bezier(0.215, 0.610, 0.355, 1.000)",easeOutCirc:"cubic-bezier(0.075, 0.820, 0.165, 1.000)",easeOutExpo:"cubic-bezier(0.190, 1.000, 0.220, 1.000)",easeOutQuad:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",easeOutQuart:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",easeOutQuint:"cubic-bezier(0.230, 1.000, 0.320, 1.000)",easeOutSine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeInOutBack:"cubic-bezier(0.680, -0.550, 0.265, 1.550)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.150, 0.860)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1.000)",easeInOutExpo:"cubic-bezier(1.000, 0.000, 0.000, 1.000)",easeInOutQuad:"cubic-bezier(0.455, 0.030, 0.515, 0.955)",easeInOutQuart:"cubic-bezier(0.770, 0.000, 0.175, 1.000)",easeInOutQuint:"cubic-bezier(0.860, 0.000, 0.070, 1.000)",easeInOutSine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"},$e=/^#[a-fA-F0-9]{6}$/,qe=/^#[a-fA-F0-9]{3}$/,He=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,Be=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Ne=/^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,We=/^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,_e=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e},Ge=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"!=typeof e.alpha},Je=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},Ye=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"!=typeof e.alpha},De=function(e){return"object"===(void 0===e?"undefined":Fe(e))&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha},Le=B(N),Ue=B(G),Ve=B(J),Ke=B(L),Xe=B(U),Ze=B(V),et=B(K),tt=B(X),nt=B(Z),rt=B(ee),ot=B(te),at=B(ne),it=B(re),ut=[void 0,null,"active","focus","hover"],st=["absolute","fixed","relative","static","sticky"],lt=[void 0,null,"active","focus","hover"];e.adjustHue=Le,e.animation=oe,e.backgroundImages=ae,e.backgrounds=ie,e.borderColor=ue,e.borderRadius=se,e.borderStyle=le,e.borderWidth=pe,e.buttons=he,e.clearFix=i,e.complement=W,e.darken=Ue,e.desaturate=Ve,e.directionalProperty=r,e.ellipsis=u,e.em=Se,e.fontFace=c,e.grayscale=Y,e.invert=D,e.hideText=f,e.hiDPI=d,e.hsl=R,e.hsla=$,e.lighten=Ke,e.margin=be,e.mix=Xe,e.modularScale=a,e.normalize=b,e.opacify=Ze,e.padding=ge,e.parseToHsl=O,e.parseToRgb=S,e.placeholder=g,e.position=me,e.radialGradient=v,e.rem=Oe,e.retinaImage=w,e.rgb=P,e.rgba=C,e.saturate=et,e.selection=x,e.setHue=tt,e.setLightness=nt,e.setSaturation=rt,e.shade=ot,e.size=ye,e.stripUnit=o,e.textInputs=we,e.timingFunctions=z,e.tint=at,e.toColorString=q,e.transitions=xe,e.transparentize=it,e.wordWrap=k,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -34,3 +34,3 @@ 'use strict';

* const styles = {
* background: opacify(0.1, '#fff');
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),

@@ -42,3 +42,3 @@ * background: opacify(0.5, 'rgba(255, 0, 0, 0.2)'),

* const div = styled.div`
* background: ${opacify(0.1, '#fff')};
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},

@@ -45,0 +45,0 @@ * background: ${opacify(0.5, 'rgba(255, 0, 0, 0.2)')},

@@ -16,6 +16,6 @@ 'use strict';

var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
var rgbRegex = /^rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)$/;
var rgbaRegex = /^rgba\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3}), ?([-+]?[0-9]*[.]?[0-9]+)\)$/;
var hslRegex = /^hsl\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%\)$/;
var hslaRegex = /^hsla\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%, ?([-+]?[0-9]*[.]?[0-9]+)\)$/;
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
var rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;
var hslRegex = /^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/;
var hslaRegex = /^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;

@@ -22,0 +22,0 @@ /**

@@ -62,3 +62,3 @@ 'use strict';

if (!steps) {
if (typeof steps !== 'number') {
throw new Error('Please provide a number of steps to the modularScale helper.');

@@ -77,3 +77,3 @@ }

return realBase * realRatio * steps + 'em';
return realBase * Math.pow(realRatio, steps) + 'em';
}

@@ -80,0 +80,0 @@

@@ -106,3 +106,3 @@ {

"dependencies": {},
"version": "1.0.2"
"version": "1.0.3"
}

@@ -14,3 +14,3 @@ // @flow

* const styles = {
* background: opacify(0.1, '#fff');
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),

@@ -22,3 +22,3 @@ * background: opacify(0.5, 'rgba(255, 0, 0, 0.2)'),

* const div = styled.div`
* background: ${opacify(0.1, '#fff')};
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},

@@ -25,0 +25,0 @@ * background: ${opacify(0.5, 'rgba(255, 0, 0, 0.2)')},

@@ -8,6 +8,6 @@ // @flow

const reducedHexRegex = /^#[a-fA-F0-9]{3}$/
const rgbRegex = /^rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)$/
const rgbaRegex = /^rgba\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3}), ?([-+]?[0-9]*[.]?[0-9]+)\)$/
const hslRegex = /^hsl\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%\)$/
const hslaRegex = /^hsla\((\d{1,3}), ?(\d{1,3})%, ?(\d{1,3})%, ?([-+]?[0-9]*[.]?[0-9]+)\)$/
const rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/
const rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/
const hslRegex = /^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/
const hslaRegex = /^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/

@@ -14,0 +14,0 @@ /**

@@ -14,2 +14,3 @@ import parseToRgb from '../parseToRgb'

expect(parseToRgb('rgba(174,67,255,0.6)')).toMatchSnapshot()
expect(parseToRgb('rgba( 174 , 67 , 255 , 0.6 )')).toMatchSnapshot()
})

@@ -19,2 +20,3 @@

expect(parseToRgb('rgb(174,67,255)')).toMatchSnapshot()
expect(parseToRgb('rgb( 174 , 67 , 255 )')).toMatchSnapshot()
})

@@ -24,2 +26,3 @@

expect(parseToRgb('hsl(210,10%,4%)')).toMatchSnapshot()
expect(parseToRgb('hsl( 210 , 10% , 4% )')).toMatchSnapshot()
})

@@ -29,2 +32,3 @@

expect(parseToRgb('hsla(210,10%,40%,0.75)')).toMatchSnapshot()
expect(parseToRgb('hsla( 210 , 10% , 40% , 0.75 )')).toMatchSnapshot()
})

@@ -31,0 +35,0 @@

@@ -68,3 +68,3 @@ // @flow

function modularScale(steps: number, base?: number|string = '1em', ratio?: Ratio = 'perfectFourth') {
if (!steps) {
if (typeof steps !== 'number') {
throw new Error('Please provide a number of steps to the modularScale helper.')

@@ -83,3 +83,3 @@ }

return `${realBase * realRatio * steps}em`
return `${realBase * (realRatio ** steps)}em`
}

@@ -86,0 +86,0 @@

@@ -12,2 +12,4 @@ // @flow

expect({ 'font-size': modularScale(1) }).toMatchSnapshot()
expect({ 'font-size': modularScale(2) }).toMatchSnapshot()
expect({ 'font-size': modularScale(0) }).toMatchSnapshot()
})

@@ -14,0 +16,0 @@

@@ -299,2 +299,1 @@ // @flow

export default normalize

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc