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.1.1 to 1.1.2

23

.documentation.json

@@ -13,2 +13,7 @@ {

{
"name": "Usage",
"description": "<div class='usage'><code class='javascript'>import { lighten, modularScale } from 'polished'</code></div>",
"markdown": false
},
{
"name": "Mixins"

@@ -27,2 +32,3 @@ },

"timingFunctions",
"triangle",
"wordWrap",

@@ -82,14 +88,15 @@ {

},
"Ratio",
"RgbColor",
"RgbaColor",
"AnimationProperty",
"ButtonState",
"FontFaceConfiguration",
"HslColor",
"HslaColor",
"FontFaceConfiguration",
"InputState",
"PointingDirection",
"RadialGradientConfiguration",
"TimingFunction",
"AnimationProperty",
"ButtonState",
"InputState"
"Ratio",
"RgbaColor",
"RgbColor",
"TimingFunction"
]
}

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.polished=e.polished||{})}(this,function(e){"use strict";function r(e,r){if(!e)return r;var n=e.split("-");return n.splice(1,0,r),n.join("-")}function n(e,n){for(var t={},a=0;a<n.length;a+=1)n[a]&&(t[r(e,je[a])]=n[a]);return t}function t(e){for(var r=arguments.length,t=Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];var o=t[0],i=t[1],u=void 0===i?o:i,s=t[2],l=void 0===s?o:s,f=t[3];return n(e,[o,u,l,void 0===f?u:f])}function a(e){var r=parseFloat(e);return isNaN(r)?e:r}function o(e){var r=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&&!Oe[n])throw new Error("Please pass a number or one of the predefined scales to the modularScale helper as the ratio.");var t="string"==typeof r?a(r):r,o="string"==typeof n?Oe[n]:n;if("string"==typeof t)throw new Error('Invalid value passed as base to modularScale, expected number or em string but got "'+r+'"');return t*Math.pow(o,e)+"em"}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return Ce({},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,r){return r.map(function(r){return'url("'+e+"."+r+'")'}).join(", ")}function l(e){return e.map(function(e){return'local("'+e+'")'}).join(", ")}function f(e,r,n){var t=[];return r&&t.push(l(r)),e&&t.push(s(e,n)),t.join(", ")}function c(e){var r=e.fontFamily,n=e.fontFilePath,t=e.fontStretch,a=e.fontStyle,o=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(!r)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 d={"@font-face":{"font-family":r,src:f(n,l,s),"unicode-range":c,"font-stretch":t,"font-style":a,"font-variant":o,"font-weight":i}};return JSON.parse(JSON.stringify(d))}function d(){return{"text-indent":"101%",overflow:"hidden","white-space":"nowrap"}}function p(){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 b(e,r){var n=qe({},e);return Object.keys(r).forEach(function(e){n[e]?n[e]=qe({},n[e],r[e]):n[e]=qe({},r[e])}),n}function h(e){return e?Te:b(Te,Me)}function g(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return r={},Ce(r,n+"::-webkit-input-placeholder",qe({},e)),Ce(r,n+":-moz-placeholder",qe({},e)),Ce(r,n+"::-moz-placeholder",qe({},e)),Ce(r,n+":-ms-input-placeholder",qe({},e)),r}function m(e){return e[0].split(" ")[0]}function y(e){for(var r="",n=0;n<e.length;n+=1)r+=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]))?(r=r.slice(0,-1),r+=", "+(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])&&(r+=(arguments.length<=n+1?void 0:arguments[n+1])+" "):r+=""+(arguments.length<=n+1?void 0:arguments[n+1]);return r.trim()}function v(e){var r=e.colorStops,n=e.extent,t=e.fallback,a=e.position,o=e.shape;if(!r||r.length<2)throw new Error("radialGradient requries at least 2 color-stops to properly render.");return{"background-color":t||m(r),"background-image":y(Qe,a,o,n,r.join(", "))}}function w(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"png",t=arguments[3],a=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 o=n.replace(/^\./,""),i=t?t+"."+o:""+e+a+"."+o;return Ce({backgroundImage:"url("+e+"."+o+")"},p(),{backgroundImage:"url("+i+")",backgroundSize:r})}function k(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return r={},Ce(r,n+"::-moz-selection",qe({},e)),Ce(r,n+"::selection",qe({},e)),r}function x(e){return Re[e]}function z(){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,r,n){return I(e)+","+I(r)+","+I(n)}function E(e,r,n){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j;if(0===r)return t(n,n,n);var a=e%360/60,o=(1-Math.abs(2*n-1))*r,i=o*(1-Math.abs(a%2-1)),u=0,s=0,l=0;a>=0&&a<1?(u=o,s=i):a>=1&&a<2?(u=i,s=o):a>=2&&a<3?(s=o,l=i):a>=3&&a<4?(s=i,l=o):a>=4&&a<5?(u=i,l=o):a>=5&&a<6&&(u=o,l=i);var f=n-o/2;return t(u+f,s+f,l+f)}function S(e){if("string"!=typeof e)return e;var r=e.toLowerCase();return $e[r]?"#"+$e[r]:e}function A(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");var r=S(e);if(r.match(He))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(Be))return{red:parseInt(""+r[1]+r[1],16),green:parseInt(""+r[2]+r[2],16),blue:parseInt(""+r[3]+r[3],16)};var n=Ne.exec(r);if(n)return{red:parseInt(""+n[1],10),green:parseInt(""+n[2],10),blue:parseInt(""+n[3],10)};var t=We.exec(r);if(t)return{red:parseInt(""+t[1],10),green:parseInt(""+t[2],10),blue:parseInt(""+t[3],10),alpha:parseFloat(""+t[4],10)};var a=_e.exec(r);if(a){var o=parseInt(""+a[1],10),i=parseInt(""+a[2],10)/100,u=parseInt(""+a[3],10)/100,s="rgb("+E(o,i,u)+")",l=Ne.exec(s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var f=Ge.exec(r);if(f){var c=parseInt(""+f[1],10),d=parseInt(""+f[2],10)/100,p=parseInt(""+f[3],10)/100,b="rgb("+E(c,d,p)+")",h=Ne.exec(b);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+f[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 O(e){var r=e.red/255,n=e.green/255,t=e.blue/255,a=Math.max(r,n,t),o=Math.min(r,n,t),i=(a+o)/2;if(a===o)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=a-o,l=i>.5?s/(2-a-o):s/(a+o);switch(a){case r:u=(n-t)/s+(n<t?6:0);break;case n:u=(t-r)/s+2;break;default:u=(r-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 P(e){return O(A(e))}function F(e){var r=e.toString(16);return 1===r.length?"0"+r:r}function C(e,r,n){if("number"==typeof e&&"number"==typeof r&&"number"==typeof n)return Je("#"+F(e)+F(r)+F(n));if("object"===(void 0===e?"undefined":Fe(e))&&void 0===r&&void 0===n)return Je("#"+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 q(e,r,n,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof n&&"number"==typeof t)return t>=1?C(e,r,n):"rgba("+e+","+r+","+n+","+t+")";if("object"===(void 0===e?"undefined":Fe(e))&&void 0===r&&void 0===n&&void 0===t)return e.alpha>=1?C(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,r,n){return Je("#"+M(e)+M(r)+M(n))}function Q(e,r,n){return E(e,r,n,T)}function R(e,r,n){if("number"==typeof e&&"number"==typeof r&&"number"==typeof n)return Q(e,r,n);if("object"===(void 0===e?"undefined":Fe(e))&&void 0===r&&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,r,n,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof n&&"number"==typeof t)return t>=1?Q(e,r,n):"rgba("+E(e,r,n)+","+t+")";if("object"===(void 0===e?"undefined":Fe(e))&&void 0===r&&void 0===n&&void 0===t)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 H(e){if(Ye(e))return q(e);if(Le(e))return C(e);if(Ue(e))return $(e);if(De(e))return R(e);throw new Error("Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.")}function B(e,r,n){return function(){var t=n.concat(Array.prototype.slice.call(arguments));return t.length>=r?e.apply(this,t):B(e,r,t)}}function N(e){return B(e,e.length,[])}function W(e,r){var n=P(r);return H(qe({},n,{hue:(n.hue+e)%360}))}function _(e){var r=P(e);return H(qe({},r,{hue:(r.hue+180)%360}))}function G(e,r,n){return Math.max(e,Math.min(r,n))}function J(e,r){var n=P(r);return H(qe({},n,{lightness:G(0,1,n.lightness-e)}))}function L(e,r){var n=P(r);return H(qe({},n,{saturation:G(0,1,n.saturation-e)}))}function Y(e){return H(qe({},P(e),{saturation:0}))}function D(e){var r=A(e);return H(qe({},r,{red:255-r.red,green:255-r.green,blue:255-r.blue}))}function U(e,r){var n=P(r);return H(qe({},n,{lightness:G(0,1,n.lightness+e)}))}function V(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,r=arguments[1],n=arguments[2],t=A(r),a=qe({},t,{alpha:"number"==typeof t.alpha?t.alpha:1}),o=A(n),i=qe({},o,{alpha:"number"==typeof o.alpha?o.alpha:1}),u=a.alpha-i.alpha,s=2*e-1,l=s*u==-1?s:s+u,f=1+s*u,c=(l/f+1)/2,d=1-c;return q({red:Math.floor(a.red*c+i.red*d),green:Math.floor(a.green*c+i.green*d),blue:Math.floor(a.blue*c+i.blue*d),alpha:a.alpha+(i.alpha-a.alpha)*(e/1)})}function K(e,r){var n=A(r),t="number"==typeof n.alpha?n.alpha:1;return q(qe({},n,{alpha:G(0,1,t+e)}))}function X(e,r){var n=P(r);return H(qe({},n,{saturation:G(0,1,n.saturation+e)}))}function Z(e,r){return H(qe({},P(r),{hue:e}))}function ee(e,r){return H(qe({},P(r),{lightness:e}))}function re(e,r){return H(qe({},P(r),{saturation:e}))}function ne(e,r){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.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return er(e,r,"rgb(0, 0, 0)")}function te(e,r){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.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return er(e,r,"rgb(255, 255, 255)")}function ae(e,r){var n=A(r),t="number"==typeof n.alpha?n.alpha:1;return q(qe({},n,{alpha:G(0,1,t-e)}))}function oe(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];var t=Array.isArray(r[0]);if(!t&&r.length>8)throw new Error("The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation");return{animation:r.map(function(e){if(t&&!Array.isArray(e)||!t&&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 ie(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return{"background-image":r.join(", ")}}function ue(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return{background:r.join(", ")}}function se(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.apply(void 0,["border-color"].concat(r))}function le(e,r){if(!r||"string"!=typeof r)throw new Error("borderRadius expects a radius value as a string as the second argument.");if("top"===e||"bottom"===e){var n;return n={},Ce(n,"border-"+e+"-right-radius",r),Ce(n,"border-"+e+"-left-radius",r),n}if("left"===e||"right"===e){var t;return t={},Ce(t,"border-top-"+e+"-radius",r),Ce(t,"border-bottom-"+e+"-radius",r),t}throw new Error('borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.')}function fe(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.apply(void 0,["border-style"].concat(r))}function ce(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.apply(void 0,["border-width"].concat(r))}function de(e,r){return e(r?":"+r:"")}function pe(e,r,n){if(!r)throw new Error("You must provide a template to this method.");if(0===e.length)return de(r,null);for(var t=[],a=0;a<e.length;a+=1){if(n&&n.indexOf(e[a])<0)throw new Error("You passed an unsupported selector state to this method.");t.push(de(r,e[a]))}return t=t.join(",")}function be(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,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return pe(r,be,lr)}function ge(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.apply(void 0,["margin"].concat(r))}function me(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.apply(void 0,["padding"].concat(r))}function ye(e){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];if(fr.indexOf(e)>=0)return qe({position:e},t.apply(void 0,[""].concat(n)));var o=e;return t.apply(void 0,["",o].concat(n))}function ve(e){return{height:e,width:arguments.length>1&&void 0!==arguments[1]?arguments[1]:e}}function we(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 ke(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return pe(r,we,cr)}function xe(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return{transition:r.join(", ")}}var ze,Ie,je=["top","right","bottom","left"],Ee=function(e,r){return e.substr(-r.length)===r},Se=function(e){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"16px",t=r,o=n;if("string"==typeof r){if(!Ee(r,"px"))throw new Error('Expected a string ending in "px" or a number passed as the first argument to '+e+'(), got "'+r+'" instead.');t=a(r)}if("string"==typeof n){if(!Ee(n,"px"))throw new Error('Expected a string ending in "px" or a number passed as the second argument to '+e+'(), got "'+n+'" instead.');o=a(n)}if("string"==typeof t)throw new Error('Passed invalid pixel value ("'+r+'") to '+e+'(), please pass a value like "12px" or 12.');if("string"==typeof o)throw new Error('Passed invalid base value ("'+n+'") to '+e+'(), please pass a value like "12px" or 12.');return""+t/o+e}},Ae=Se("em"),Oe={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},Pe=Se("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},Ce=function(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e},qe=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},Me=(ze={html:{"font-family":"sans-serif"},body:{margin:"0"}},Ce(ze,"a:active,\n a:hover",{"outline-width":"0"}),Ce(ze,"button,\n input,\n optgroup,\n select,\n textarea",{"font-family":"sans-serif","font-size":"100%","line-height":"1.15"}),ze),Te=(Ie={html:{"line-height":"1.15","-ms-text-size-adjust":"100%","-webkit-text-size-adjust":"100%"}},Ce(Ie,"article,\n aside,\n footer,\n header,\n nav,\n section",{display:"block"}),Ce(Ie,"h1",{"font-size":"2em",margin:"0.67em 0"}),Ce(Ie,"figcaption,\n figure,\n main",{display:"block"}),Ce(Ie,"figure",{margin:"1em 40px"}),Ce(Ie,"hr",{"box-sizing":"content-box",height:"0",overflow:"visible"}),Ce(Ie,"pre",{"font-family":"monospace, monospace","font-size":"1em"}),Ce(Ie,"a",{"background-color":"transparent","-webkit-text-decoration-skip":"objects"}),Ce(Ie,"abbr[title]",Ce({"border-bottom":"none","text-decoration":"underline"},"text-decoration","underline dotted")),Ce(Ie,"b,\n strong",{"font-weight":"inherit"}),Ce(Ie,"code,\n kbd,\n samp",{"font-family":"monospace, monospace","font-size":"1em"}),Ce(Ie,"dfn",{"font-style":"italic"}),Ce(Ie,"mark",{"background-color":"#ff0",color:"#000"}),Ce(Ie,"small",{"font-size":"80%"}),Ce(Ie,"sub,\n sup",{"font-size":"75%","line-height":"0",position:"relative","vertical-align":"baseline"}),Ce(Ie,"sub",{bottom:"-0.25em"}),Ce(Ie,"sup",{top:"-0.5em"}),Ce(Ie,"audio,\n video",{display:"inline-block"}),Ce(Ie,"audio:not([controls])",{display:"none",height:"0"}),Ce(Ie,"img",{"border-style":"none"}),Ce(Ie,"svg:not(:root)",{overflow:"hidden"}),Ce(Ie,"button,\n input,\n optgroup,\n select,\n textarea",{margin:"0"}),Ce(Ie,"button,\n input",{overflow:"visible"}),Ce(Ie,"button,\n select",{"text-transform":"none"}),Ce(Ie,'button,\n html [type="button"],\n [type="reset"],\n [type="submit"]',{"-webkit-appearance":"button"}),Ce(Ie,'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"}),Ce(Ie,'button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring',{outline:"1px dotted ButtonText"}),Ce(Ie,"fieldset",{border:"1px solid #c0c0c0",margin:"0 2px",padding:"0.35em 0.625em 0.75em"}),Ce(Ie,"legend",{"box-sizing":"border-box",color:"inherit",display:"table","max-width":"100%",padding:"0","white-space":"normal"}),Ce(Ie,"progress",{display:"inline-block","vertical-align":"baseline"}),Ce(Ie,"textarea",{overflow:"auto"}),Ce(Ie,'[type="checkbox"],\n [type="radio"]',{"box-sizing":"border-box",padding:"0"}),Ce(Ie,'[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button',{height:"auto"}),Ce(Ie,'[type="search"]',{"-webkit-appearance":"textfield","outline-offset":"-2px"}),Ce(Ie,'[type="search"]::-webkit-search-cancel-button,\n [type="search"]::-webkit-search-decoration',{"-webkit-appearance":"none"}),Ce(Ie,"::-webkit-file-upload-button",{"-webkit-appearance":"button",font:"inherit"}),Ce(Ie,"details,\n menu",{display:"block"}),Ce(Ie,"summary",{display:"list-item"}),Ce(Ie,"canvas",{display:"inline-block"}),Ce(Ie,"template",{display:"none"}),Ce(Ie,"[hidden]",{display:"none"}),Ie),Qe=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}(["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={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"},He=/^#[a-fA-F0-9]{6}$/,Be=/^#[a-fA-F0-9]{3}$/,Ne=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,We=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,_e=/^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,Ge=/^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Je=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},Le=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.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"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},Ue=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},Ve=N(W),Ke=N(J),Xe=N(L),Ze=N(U),er=N(V),rr=N(K),nr=N(X),tr=N(Z),ar=N(ee),or=N(re),ir=N(ne),ur=N(te),sr=N(ae),lr=[void 0,null,"active","focus","hover"],fr=["absolute","fixed","relative","static","sticky"],cr=[void 0,null,"active","focus","hover"];e.adjustHue=Ve,e.animation=oe,e.backgroundImages=ie,e.backgrounds=ue,e.borderColor=se,e.borderRadius=le,e.borderStyle=fe,e.borderWidth=ce,e.buttons=he,e.clearFix=i,e.complement=_,e.darken=Ke,e.desaturate=Xe,e.directionalProperty=t,e.ellipsis=u,e.em=Ae,e.fontFace=c,e.grayscale=Y,e.invert=D,e.hideText=d,e.hiDPI=p,e.hsl=R,e.hsla=$,e.lighten=Ze,e.margin=ge,e.mix=er,e.modularScale=o,e.normalize=h,e.opacify=rr,e.padding=me,e.parseToHsl=P,e.parseToRgb=A,e.placeholder=g,e.position=ye,e.radialGradient=v,e.rem=Pe,e.retinaImage=w,e.rgb=C,e.rgba=q,e.saturate=nr,e.selection=k,e.setHue=tr,e.setLightness=ar,e.setSaturation=or,e.shade=ir,e.size=ve,e.stripUnit=a,e.textInputs=ke,e.timingFunctions=x,e.tint=ur,e.toColorString=H,e.transitions=xe,e.transparentize=sr,e.wordWrap=z,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r(e.polished=e.polished||{})}(this,function(e){"use strict";function r(e,r){if(!e)return r;var t=e.split("-");return t.splice(1,0,r),t.join("-")}function t(e,t){for(var n={},o=0;o<t.length;o+=1)t[o]&&(n[r(e,Ee[o])]=t[o]);return n}function n(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];var a=n[0],i=n[1],u=void 0===i?a:i,s=n[2],l=void 0===s?a:s,f=n[3];return t(e,[a,u,l,void 0===f?u:f])}function o(e){var r=parseFloat(e);return isNaN(r)?e:r}function a(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"1em",t=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 t&&!Pe[t])throw new Error("Please pass a number or one of the predefined scales to the modularScale helper as the ratio.");var n="string"==typeof r?o(r):r,a="string"==typeof t?Pe[t]:t;if("string"==typeof n)throw new Error('Invalid value passed as base to modularScale, expected number or em string but got "'+r+'"');return n*Math.pow(a,e)+"em"}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"&";return qe({},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,r){return r.map(function(r){return'url("'+e+"."+r+'")'}).join(", ")}function l(e){return e.map(function(e){return'local("'+e+'")'}).join(", ")}function f(e,r,t){var n=[];return r&&n.push(l(r)),e&&n.push(s(e,t)),n.join(", ")}function d(e){var r=e.fontFamily,t=e.fontFilePath,n=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,d=e.unicodeRange;if(!r)throw new Error("fontFace expects a name of a font-family.");if(!t&&!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 c={"@font-face":{"font-family":r,src:f(t,l,s),"unicode-range":d,"font-stretch":n,"font-style":o,"font-variant":a,"font-weight":i}};return JSON.parse(JSON.stringify(c))}function c(){return{"text-indent":"101%",overflow:"hidden","white-space":"nowrap"}}function p(){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 b(e,r){var t=Me({},e);return Object.keys(r).forEach(function(e){t[e]?t[e]=Me({},t[e],r[e]):t[e]=Me({},r[e])}),t}function h(e){return e?Qe:b(Qe,Te)}function g(e){var r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"&";return r={},qe(r,t+"::-webkit-input-placeholder",Me({},e)),qe(r,t+":-moz-placeholder",Me({},e)),qe(r,t+"::-moz-placeholder",Me({},e)),qe(r,t+":-ms-input-placeholder",Me({},e)),r}function m(e){return e[0].split(" ")[0]}function y(e){for(var r="",t=0;t<e.length;t+=1)r+=e[t],3===t&&(arguments.length<=t+1?void 0:arguments[t+1])&&((arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3]))?(r=r.slice(0,-1),r+=", "+(arguments.length<=t+1?void 0:arguments[t+1])):3!==t||arguments.length<=t+1||!arguments[t+1]||(arguments.length<=1?void 0:arguments[1])||(arguments.length<=2?void 0:arguments[2])||(arguments.length<=3?void 0:arguments[3])?(arguments.length<=t+1?void 0:arguments[t+1])&&(r+=(arguments.length<=t+1?void 0:arguments[t+1])+" "):r+=""+(arguments.length<=t+1?void 0:arguments[t+1]);return r.trim()}function v(e){var r=e.colorStops,t=e.extent,n=e.fallback,o=e.position,a=e.shape;if(!r||r.length<2)throw new Error("radialGradient requries at least 2 color-stops to properly render.");return{"background-color":n||m(r),"background-image":y(Ne,o,a,t,r.join(", "))}}function w(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"png",n=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=t.replace(/^\./,""),i=n?n+"."+a:""+e+o+"."+a;return qe({backgroundImage:"url("+e+"."+a+")"},p(),{backgroundImage:"url("+i+")",backgroundSize:r})}function x(e){var r,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return r={},qe(r,t+"::-moz-selection",Me({},e)),qe(r,t+"::selection",Me({},e)),r}function k(e){return Re[e]}function z(e){var r=e.pointingDirection,t=e.height,n=e.width,o=e.foregroundColor,a=e.backgroundColor,i=void 0===a?"transparent":a,u=parseFloat(t),s=parseFloat(n);if(isNaN(u)||isNaN(s))throw new Error("Passed an invalid value to `height` or `width`. Please provide a pixel based unit");return qe({"border-color":i,width:"0",height:"0","border-width":$e(r,u,s),"border-style":"solid"},"border-"+He[r]+"-color",o+" !important")}function I(){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 j(e){return Math.round(255*e)}function E(e,r,t){return j(e)+","+j(r)+","+j(t)}function S(e,r,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:E;if(0===r)return n(t,t,t);var o=e%360/60,a=(1-Math.abs(2*t-1))*r,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 f=t-a/2;return n(u+f,s+f,l+f)}function A(e){if("string"!=typeof e)return e;var r=e.toLowerCase();return Be[r]?"#"+Be[r]:e}function O(e){if("string"!=typeof e)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");var r=A(e);if(r.match(De))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(We))return{red:parseInt(""+r[1]+r[1],16),green:parseInt(""+r[2]+r[2],16),blue:parseInt(""+r[3]+r[3],16)};var t=_e.exec(r);if(t)return{red:parseInt(""+t[1],10),green:parseInt(""+t[2],10),blue:parseInt(""+t[3],10)};var n=Ge.exec(r);if(n)return{red:parseInt(""+n[1],10),green:parseInt(""+n[2],10),blue:parseInt(""+n[3],10),alpha:parseFloat(""+n[4],10)};var o=Je.exec(r);if(o){var a=parseInt(""+o[1],10),i=parseInt(""+o[2],10)/100,u=parseInt(""+o[3],10)/100,s="rgb("+S(a,i,u)+")",l=_e.exec(s);return{red:parseInt(""+l[1],10),green:parseInt(""+l[2],10),blue:parseInt(""+l[3],10)}}var f=Le.exec(r);if(f){var d=parseInt(""+f[1],10),c=parseInt(""+f[2],10)/100,p=parseInt(""+f[3],10)/100,b="rgb("+S(d,c,p)+")",h=_e.exec(b);return{red:parseInt(""+h[1],10),green:parseInt(""+h[2],10),blue:parseInt(""+h[3],10),alpha:parseFloat(""+f[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 P(e){var r=e.red/255,t=e.green/255,n=e.blue/255,o=Math.max(r,t,n),a=Math.min(r,t,n),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 r:u=(t-n)/s+(t<n?6:0);break;case t:u=(n-r)/s+2;break;default:u=(r-t)/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 F(e){return P(O(e))}function C(e){var r=e.toString(16);return 1===r.length?"0"+r:r}function q(e,r,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t)return Ye("#"+C(e)+C(r)+C(t));if("object"===(void 0===e?"undefined":Ce(e))&&void 0===r&&void 0===t)return Ye("#"+C(e.red)+C(e.green)+C(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 M(e,r,t,n){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t&&"number"==typeof n)return n>=1?q(e,r,t):"rgba("+e+","+r+","+t+","+n+")";if("object"===(void 0===e?"undefined":Ce(e))&&void 0===r&&void 0===t&&void 0===n)return e.alpha>=1?q(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 T(e){return C(Math.round(255*e))}function Q(e,r,t){return Ye("#"+T(e)+T(r)+T(t))}function N(e,r,t){return S(e,r,t,Q)}function R(e,r,t){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t)return N(e,r,t);if("object"===(void 0===e?"undefined":Ce(e))&&void 0===r&&void 0===t)return N(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,r,t,n){if("number"==typeof e&&"number"==typeof r&&"number"==typeof t&&"number"==typeof n)return n>=1?N(e,r,t):"rgba("+S(e,r,t)+","+n+")";if("object"===(void 0===e?"undefined":Ce(e))&&void 0===r&&void 0===t&&void 0===n)return e.alpha>=1?N(e.hue,e.saturation,e.lightness):"rgba("+S(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 H(e){if(Ve(e))return M(e);if(Ue(e))return q(e);if(Xe(e))return $(e);if(Ke(e))return R(e);throw new Error("Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.")}function B(e,r,t){return function(){var n=t.concat(Array.prototype.slice.call(arguments));return n.length>=r?e.apply(this,n):B(e,r,n)}}function D(e){return B(e,e.length,[])}function W(e,r){var t=F(r);return H(Me({},t,{hue:(t.hue+e)%360}))}function _(e){var r=F(e);return H(Me({},r,{hue:(r.hue+180)%360}))}function G(e,r,t){return Math.max(e,Math.min(r,t))}function J(e,r){var t=F(r);return H(Me({},t,{lightness:G(0,1,t.lightness-e)}))}function L(e,r){var t=F(r);return H(Me({},t,{saturation:G(0,1,t.saturation-e)}))}function Y(e){return H(Me({},F(e),{saturation:0}))}function U(e){var r=O(e);return H(Me({},r,{red:255-r.red,green:255-r.green,blue:255-r.blue}))}function V(e,r){var t=F(r);return H(Me({},t,{lightness:G(0,1,t.lightness+e)}))}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,r=arguments[1],t=arguments[2],n=O(r),o=Me({},n,{alpha:"number"==typeof n.alpha?n.alpha:1}),a=O(t),i=Me({},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,f=1+s*u,d=(l/f+1)/2,c=1-d;return M({red:Math.floor(o.red*d+i.red*c),green:Math.floor(o.green*d+i.green*c),blue:Math.floor(o.blue*d+i.blue*c),alpha:o.alpha+(i.alpha-o.alpha)*(e/1)})}function X(e,r){var t=O(r),n="number"==typeof t.alpha?t.alpha:1;return M(Me({},t,{alpha:G(0,1,n+e)}))}function Z(e,r){var t=F(r);return H(Me({},t,{saturation:G(0,1,t.saturation+e)}))}function ee(e,r){return H(Me({},F(r),{hue:e}))}function re(e,r){return H(Me({},F(r),{lightness:e}))}function te(e,r){return H(Me({},F(r),{saturation:e}))}function ne(e,r){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.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return nr(e,r,"rgb(0, 0, 0)")}function oe(e,r){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.");if("string"!=typeof r)throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");return nr(e,r,"rgb(255, 255, 255)")}function ae(e,r){var t=O(r),n="number"==typeof t.alpha?t.alpha:1;return M(Me({},t,{alpha:G(0,1,n-e)}))}function ie(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=Array.isArray(r[0]);if(!n&&r.length>8)throw new Error("The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation");return{animation:r.map(function(e){if(n&&!Array.isArray(e)||!n&&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 ue(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{"background-image":r.join(", ")}}function se(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{background:r.join(", ")}}function le(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return n.apply(void 0,["border-color"].concat(r))}function fe(e,r){if(!r||"string"!=typeof r)throw new Error("borderRadius expects a radius value as a string as the second argument.");if("top"===e||"bottom"===e){var t;return t={},qe(t,"border-"+e+"-right-radius",r),qe(t,"border-"+e+"-left-radius",r),t}if("left"===e||"right"===e){var n;return n={},qe(n,"border-top-"+e+"-radius",r),qe(n,"border-bottom-"+e+"-radius",r),n}throw new Error('borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.')}function de(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return n.apply(void 0,["border-style"].concat(r))}function ce(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return n.apply(void 0,["border-width"].concat(r))}function pe(e,r){return e(r?":"+r:"")}function be(e,r,t){if(!r)throw new Error("You must provide a template to this method.");if(0===e.length)return pe(r,null);for(var n=[],o=0;o<e.length;o+=1){if(t&&t.indexOf(e[o])<0)throw new Error("You passed an unsupported selector state to this method.");n.push(pe(r,e[o]))}return n=n.join(",")}function he(e){return"button"+e+',\n input[type="button"]'+e+',\n input[type="reset"]'+e+',\n input[type="submit"]'+e}function ge(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return be(r,he,cr)}function me(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return n.apply(void 0,["margin"].concat(r))}function ye(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return n.apply(void 0,["padding"].concat(r))}function ve(e){for(var r=arguments.length,t=Array(r>1?r-1:0),o=1;o<r;o++)t[o-1]=arguments[o];if(pr.indexOf(e)>=0)return Me({position:e},n.apply(void 0,[""].concat(t)));var a=e;return n.apply(void 0,["",a].concat(t))}function we(e){return{height:e,width:arguments.length>1&&void 0!==arguments[1]?arguments[1]:e}}function xe(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 ke(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return be(r,xe,br)}function ze(){for(var e=arguments.length,r=Array(e),t=0;t<e;t++)r[t]=arguments[t];return{transition:r.join(", ")}}var Ie,je,Ee=["top","right","bottom","left"],Se=function(e,r){return e.substr(-r.length)===r},Ae=function(e){return function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"16px",n=r,a=t;if("string"==typeof r){if(!Se(r,"px"))throw new Error('Expected a string ending in "px" or a number passed as the first argument to '+e+'(), got "'+r+'" instead.');n=o(r)}if("string"==typeof t){if(!Se(t,"px"))throw new Error('Expected a string ending in "px" or a number passed as the second argument to '+e+'(), got "'+t+'" instead.');a=o(t)}if("string"==typeof n)throw new Error('Passed invalid pixel value ("'+r+'") to '+e+'(), please pass a value like "12px" or 12.');if("string"==typeof a)throw new Error('Passed invalid base value ("'+t+'") to '+e+'(), please pass a value like "12px" or 12.');return""+n/a+e}},Oe=Ae("em"),Pe={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},Fe=Ae("rem"),Ce="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},qe=function(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e},Me=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Te=(Ie={html:{"font-family":"sans-serif"},body:{margin:"0"}},qe(Ie,"a:active,\n a:hover",{"outline-width":"0"}),qe(Ie,"button,\n input,\n optgroup,\n select,\n textarea",{"font-family":"sans-serif","font-size":"100%","line-height":"1.15"}),Ie),Qe=(je={html:{"line-height":"1.15","-ms-text-size-adjust":"100%","-webkit-text-size-adjust":"100%"}},qe(je,"article,\n aside,\n footer,\n header,\n nav,\n section",{display:"block"}),qe(je,"h1",{"font-size":"2em",margin:"0.67em 0"}),qe(je,"figcaption,\n figure,\n main",{display:"block"}),qe(je,"figure",{margin:"1em 40px"}),qe(je,"hr",{"box-sizing":"content-box",height:"0",overflow:"visible"}),qe(je,"pre",{"font-family":"monospace, monospace","font-size":"1em"}),qe(je,"a",{"background-color":"transparent","-webkit-text-decoration-skip":"objects"}),qe(je,"abbr[title]",qe({"border-bottom":"none","text-decoration":"underline"},"text-decoration","underline dotted")),qe(je,"b,\n strong",{"font-weight":"inherit"}),qe(je,"code,\n kbd,\n samp",{"font-family":"monospace, monospace","font-size":"1em"}),qe(je,"dfn",{"font-style":"italic"}),qe(je,"mark",{"background-color":"#ff0",color:"#000"}),qe(je,"small",{"font-size":"80%"}),qe(je,"sub,\n sup",{"font-size":"75%","line-height":"0",position:"relative","vertical-align":"baseline"}),qe(je,"sub",{bottom:"-0.25em"}),qe(je,"sup",{top:"-0.5em"}),qe(je,"audio,\n video",{display:"inline-block"}),qe(je,"audio:not([controls])",{display:"none",height:"0"}),qe(je,"img",{"border-style":"none"}),qe(je,"svg:not(:root)",{overflow:"hidden"}),qe(je,"button,\n input,\n optgroup,\n select,\n textarea",{margin:"0"}),qe(je,"button,\n input",{overflow:"visible"}),qe(je,"button,\n select",{"text-transform":"none"}),qe(je,'button,\n html [type="button"],\n [type="reset"],\n [type="submit"]',{"-webkit-appearance":"button"}),qe(je,'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"}),qe(je,'button:-moz-focusring,\n [type="button"]:-moz-focusring,\n [type="reset"]:-moz-focusring,\n [type="submit"]:-moz-focusring',{outline:"1px dotted ButtonText"}),qe(je,"fieldset",{border:"1px solid #c0c0c0",margin:"0 2px",padding:"0.35em 0.625em 0.75em"}),qe(je,"legend",{"box-sizing":"border-box",color:"inherit",display:"table","max-width":"100%",padding:"0","white-space":"normal"}),qe(je,"progress",{display:"inline-block","vertical-align":"baseline"}),qe(je,"textarea",{overflow:"auto"}),qe(je,'[type="checkbox"],\n [type="radio"]',{"box-sizing":"border-box",padding:"0"}),qe(je,'[type="number"]::-webkit-inner-spin-button,\n [type="number"]::-webkit-outer-spin-button',{height:"auto"}),qe(je,'[type="search"]',{"-webkit-appearance":"textfield","outline-offset":"-2px"}),qe(je,'[type="search"]::-webkit-search-cancel-button,\n [type="search"]::-webkit-search-decoration',{"-webkit-appearance":"none"}),qe(je,"::-webkit-file-upload-button",{"-webkit-appearance":"button",font:"inherit"}),qe(je,"details,\n menu",{display:"block"}),qe(je,"summary",{display:"list-item"}),qe(je,"canvas",{display:"inline-block"}),qe(je,"template",{display:"none"}),qe(je,"[hidden]",{display:"none"}),je),Ne=function(e,r){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}(["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=function(e,r,t){switch(e){case"top":return"0 "+t/2+"px "+r+"px "+t/2+"px";case"left":return r/2+"px "+t+"px "+r/2+"px 0";case"bottom":return r+"px "+t/2+"px 0 "+t/2+"px";case"right":return r/2+"px 0 "+r/2+"px "+t+"px";default:throw new Error("Passed invalid argument to triangle, please pass correct poitingDirection e.g. 'right'.")}},He={left:"right",right:"left",top:"bottom",bottom:"top"},Be={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"},De=/^#[a-fA-F0-9]{6}$/,We=/^#[a-fA-F0-9]{3}$/,_e=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/,Ge=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Je=/^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/,Le=/^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/,Ye=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},Ue=function(e){return"object"===(void 0===e?"undefined":Ce(e))&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"!=typeof e.alpha},Ve=function(e){return"object"===(void 0===e?"undefined":Ce(e))&&"number"==typeof e.red&&"number"==typeof e.green&&"number"==typeof e.blue&&"number"==typeof e.alpha},Ke=function(e){return"object"===(void 0===e?"undefined":Ce(e))&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"!=typeof e.alpha},Xe=function(e){return"object"===(void 0===e?"undefined":Ce(e))&&"number"==typeof e.hue&&"number"==typeof e.saturation&&"number"==typeof e.lightness&&"number"==typeof e.alpha},Ze=D(W),er=D(J),rr=D(L),tr=D(V),nr=D(K),or=D(X),ar=D(Z),ir=D(ee),ur=D(re),sr=D(te),lr=D(ne),fr=D(oe),dr=D(ae),cr=[void 0,null,"active","focus","hover"],pr=["absolute","fixed","relative","static","sticky"],br=[void 0,null,"active","focus","hover"];e.adjustHue=Ze,e.animation=ie,e.backgroundImages=ue,e.backgrounds=se,e.borderColor=le,e.borderRadius=fe,e.borderStyle=de,e.borderWidth=ce,e.buttons=ge,e.clearFix=i,e.complement=_,e.darken=er,e.desaturate=rr,e.directionalProperty=n,e.ellipsis=u,e.em=Oe,e.fontFace=d,e.grayscale=Y,e.invert=U,e.hideText=c,e.hiDPI=p,e.hsl=R,e.hsla=$,e.lighten=tr,e.margin=me,e.mix=nr,e.modularScale=a,e.normalize=h,e.opacify=or,e.padding=ye,e.parseToHsl=F,e.parseToRgb=O,e.placeholder=g,e.position=ve,e.radialGradient=v,e.rem=Fe,e.retinaImage=w,e.rgb=q,e.rgba=M,e.saturate=ar,e.selection=x,e.setHue=ir,e.setLightness=ur,e.setSaturation=sr,e.shade=lr,e.size=we,e.stripUnit=o,e.textInputs=ke,e.timingFunctions=k,e.tint=fr,e.toColorString=H,e.transitions=ze,e.transparentize=dr,e.triangle=z,e.wordWrap=I,Object.defineProperty(e,"__esModule",{value:!0})});

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

});
exports.wordWrap = exports.transparentize = exports.transitions = exports.toColorString = exports.tint = exports.timingFunctions = exports.textInputs = exports.stripUnit = exports.size = exports.shade = exports.setSaturation = exports.setLightness = exports.setHue = exports.selection = exports.saturate = exports.rgba = exports.rgb = exports.retinaImage = exports.rem = exports.radialGradient = exports.position = exports.placeholder = exports.parseToRgb = exports.parseToHsl = exports.padding = exports.opacify = exports.normalize = exports.modularScale = exports.mix = exports.margin = exports.lighten = exports.hsla = exports.hsl = exports.hiDPI = exports.hideText = exports.invert = exports.grayscale = exports.fontFace = exports.em = exports.ellipsis = exports.directionalProperty = exports.desaturate = exports.darken = exports.complement = exports.clearFix = exports.buttons = exports.borderWidth = exports.borderStyle = exports.borderRadius = exports.borderColor = exports.backgrounds = exports.backgroundImages = exports.animation = exports.adjustHue = undefined;
exports.wordWrap = exports.triangle = exports.transparentize = exports.transitions = exports.toColorString = exports.tint = exports.timingFunctions = exports.textInputs = exports.stripUnit = exports.size = exports.shade = exports.setSaturation = exports.setLightness = exports.setHue = exports.selection = exports.saturate = exports.rgba = exports.rgb = exports.retinaImage = exports.rem = exports.radialGradient = exports.position = exports.placeholder = exports.parseToRgb = exports.parseToHsl = exports.padding = exports.opacify = exports.normalize = exports.modularScale = exports.mix = exports.margin = exports.lighten = exports.hsla = exports.hsl = exports.hiDPI = exports.hideText = exports.invert = exports.grayscale = exports.fontFace = exports.em = exports.ellipsis = exports.directionalProperty = exports.desaturate = exports.darken = exports.complement = exports.clearFix = exports.buttons = exports.borderWidth = exports.borderStyle = exports.borderRadius = exports.borderColor = exports.backgrounds = exports.backgroundImages = exports.animation = exports.adjustHue = undefined;

@@ -73,2 +73,6 @@ var _directionalProperty = require('./helpers/directionalProperty');

var _triangle = require('./mixins/triangle');
var _triangle2 = _interopRequireDefault(_triangle);
var _wordWrap = require('./mixins/wordWrap');

@@ -230,3 +234,4 @@

// Helpers
// Mixins
exports.adjustHue = _adjustHue2.default;

@@ -285,2 +290,3 @@ exports.animation = _animation2.default;

exports.transparentize = _transparentize2.default;
exports.triangle = _triangle2.default;
exports.wordWrap = _wordWrap2.default;

@@ -290,3 +296,2 @@

// Mixins
// Helpers

@@ -9,7 +9,4 @@ 'use strict';

var getBorderWidth = function getBorderWidth(_ref) {
var pointingDirection = _ref.pointingDirection,
height = _ref.height,
width = _ref.width;
/** */
var getBorderWidth = function getBorderWidth(pointingDirection, height, width) {
switch (pointingDirection) {

@@ -31,6 +28,11 @@ case 'top':

// needed for border-color
var reverseDirection = {
left: 'right',
right: 'left',
top: 'bottom',
bottom: 'top'
};
/**
* CSS to represent triangle with any pointing direction.
* CSS to represent triangle with any pointing direction with an optional background color. Accepts number or px values for height and width.
*

@@ -41,3 +43,3 @@ * @example

* const styles = {
* ...triangle({ pointing: 'right', width: '100px', height: '100px', color: 'red' })
* ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })
* }

@@ -48,3 +50,3 @@ *

* const div = styled.div`
* ${triangle({ pointing: 'right', width: '100px', height: '100px', color: 'red' })}
* ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}
*

@@ -64,25 +66,26 @@ *

var reverseDirection = {
left: 'right',
right: 'left',
top: 'bottom',
bottom: 'top'
};
function triangle(_ref) {
var pointingDirection = _ref.pointingDirection,
height = _ref.height,
width = _ref.width,
foregroundColor = _ref.foregroundColor,
_ref$backgroundColor = _ref.backgroundColor,
backgroundColor = _ref$backgroundColor === undefined ? 'transparent' : _ref$backgroundColor;
var triangle = function triangle(_ref2) {
var pointingDirection = _ref2.pointingDirection,
width = _ref2.width,
height = _ref2.height,
color = _ref2.color;
var unitlessHeight = parseFloat(height);
var unitlessWidth = parseFloat(width);
if (isNaN(unitlessHeight) || isNaN(unitlessWidth)) {
throw new Error('Passed an invalid value to `height` or `width`. Please provide a pixel based unit');
}
return _defineProperty({
'border-color': 'transparent',
'border-color': backgroundColor,
'width': '0',
'height': '0',
'border-width': getBorderWidth({ height: height, width: width, pointingDirection: pointingDirection }),
'border-width': getBorderWidth(pointingDirection, unitlessHeight, unitlessWidth),
'border-style': 'solid'
}, 'border-' + reverseDirection[pointingDirection] + '-color', foregroundColor + ' !important');
}
}, 'border-' + reverseDirection[pointingDirection] + '-color', color + ' !important');
};
exports.default = triangle;
module.exports = exports['default'];

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

"dependencies": {},
"version": "1.1.1"
"version": "1.1.2"
}

@@ -19,8 +19,18 @@ <a href="https://github.com/styled-components/polished">

- **Make your app look great without stress**
- **Cross framework compatible**: No matter if you're using `styled-components`, aphrodite, radium or plain inline styles, as long as you're writing your styles in JavaScript you can use polished!
- **Cross framework compatible**: No matter if you're using `styled-components`, aphrodite, radium, or plain inline styles, as long as you're writing your styles in JavaScript you can use polished!
- **Switching from a pre-processor to styles in JS made easy**
## Usage
`✨ polished` modules are meant to be used as stand-alone imports. You should avoid importing the entire library directly:
`import { clearFix, animation } from 'polished'`
~`import * as polished from 'polished`~
~`import polished from 'polished'`~
When `✨ polished` modules are imported properly, tree shaking in [webpack 2](https://webpack.js.org/guides/tree-shaking/) and [Rollup](https://github.com/rollup/rollup#tree-shaking) can be leveraged to reduce your bundle size.
## Docs
**See the full documentation at [polished.js.org](http://polished.js.org)!**
**See the full documentation at [polished.js.org](http://polished.js.org/docs)!**

@@ -53,2 +63,3 @@ ### Babel plugin

<li><a href="http://polished.js.org/docs/#timingfunctions">timingFunctions</a></li>
<li><a href="http://polished.js.org/docs/#triangle">triangle</a></li>
<li><a href="http://polished.js.org/docs/#wordwrap">wordWrap</a></li>

@@ -116,15 +127,15 @@ </ul>

<ul>
<li><a href="http://polished.js.org/docs/#ratio">Ratio</a></li>
<li><a href="http://polished.js.org/docs/#rgbcolor">RgbColor</a></li>
<li><a href="http://polished.js.org/docs/#rgbacolor">RgbaColor</a></li>
<li><a href="http://polished.js.org/docs/#animationproperty">AnimationProperty</a></li>
<li><a href="http://polished.js.org/docs/#buttonstate">ButtonState</a></li>
<li><a href="http://polished.js.org/docs/#fontfaceconfiguration">FontFaceConfiguration</a></li>
<li><a href="http://polished.js.org/docs/#hslcolor">HslColor</a></li>
<li><a href="http://polished.js.org/docs/#hslacolor">HslaColor</a></li>
<li><a href="http://polished.js.org/docs/#fontfaceconfiguration">FontFaceConfiguration</a></li>
<li><a href="http://polished.js.org/docs/#inputstate">InputState</a></li>
<li><a href="http://polished.js.org/docs/#pointingdirection">PointingDirection</a></li>
<li><a href="http://polished.js.org/docs/#radialgradientconfiguration">RadialGradientConfiguration</a></li>
<li><a href="http://polished.js.org/docs/#ratio">Ratio</a></li>
<li><a href="http://polished.js.org/docs/#rgbacolor">RgbaColor</a></li>
<li><a href="http://polished.js.org/docs/#rgbcolor">RgbColor</a></li>
<li><a href="http://polished.js.org/docs/#timingfunction">TimingFunction</a></li>
<li><a href="http://polished.js.org/docs/#animationproperty">AnimationProperty</a></li>
<li><a href="http://polished.js.org/docs/#buttonstate">ButtonState</a></li>
<li><a href="http://polished.js.org/docs/#inputstate">InputState</a></li>
<li><a href="http://polished.js.org/docs/#tocolorstring">toColorString</a></li>
<li><a href="http://polished.js.org/docs/#pointingdirection">PointingDirection</a></li>
</ul>

@@ -131,0 +142,0 @@ </details>

@@ -9,8 +9,9 @@ # Project Roadmap

- Better error messaging in `development` and stripped out in `production`. (#4)
- Better error messaging in `development` and removed in `production`. (#4)
- Fluid Typography Mixin. (#129)
- Color Luminance and Lightness Guard. (#148)
- Adding Sass-like functionality to RGB. (#104)
## Features Being Added But Not In Development
- Color Luminance and Lightness Guard. (#148)
- Adding library-specific usage examples to documentation. (#144)

@@ -21,3 +22,2 @@

- React Native helpers for dealing with `Device` width and height. (#143)
- Adding Sass-like functionality to RGB. (#104)

@@ -24,0 +24,0 @@ ## Features That Won't Be Included

@@ -21,2 +21,3 @@ // @flow

import timingFunctions from './mixins/timingFunctions'
import triangle from './mixins/triangle'
import wordWrap from './mixins/wordWrap'

@@ -119,3 +120,4 @@

transparentize,
triangle,
wordWrap,
}

@@ -5,16 +5,24 @@ // @flow

describe('triangle', () => {
it('should pass parameters to the values of color, border-width', () => {
expect({ ...triangle({ color: 'red', pointingDirection: 'right', height: 10, width: 20 }) }).toMatchSnapshot()
it('should generate a proper triangle when passed all parameters', () => {
expect({ ...triangle({ foregroundColor: 'red', backgroundColor: 'black', pointingDirection: 'right', height: 10, width: 20 }) }).toMatchSnapshot()
})
it('should default to a transparent background when not passed a backgroundColor', () => {
expect({ ...triangle({ foregroundColor: 'red', pointingDirection: 'right', height: 10, width: 20 }) }).toMatchSnapshot()
})
it('should generate a proper triangle when passed string values for height and width', () => {
expect({ ...triangle({ foregroundColor: 'red', backgroundColor: 'black', pointingDirection: 'right', height: '10px', width: '20px' }) }).toMatchSnapshot()
})
it('should properly add rules when block has existing rules', () => {
expect({
background: 'red',
...triangle({ color: 'grey', pointingDirection: 'right', height: 10, width: 20 }),
...triangle({ foregroundColor: 'grey', pointingDirection: 'right', height: 10, width: 20 }),
}).toMatchSnapshot()
})
it('should properly render top pointing arrow with green color, width of 20px and height 20px', () => {
it('should properly render top pointing arrow with green foregroundColor, width of 20px and height 20px', () => {
expect({
...triangle({ color: 'green', pointingDirection: 'top', height: 20, width: 20 }),
...triangle({ foregroundColor: 'green', pointingDirection: 'top', height: 20, width: 20 }),
}).toMatchSnapshot()

@@ -25,15 +33,15 @@ })

expect({
...triangle({ color: 'red', pointingDirection: 'right', height: 10, width: 20 }),
...triangle({ foregroundColor: 'red', pointingDirection: 'right', height: 10, width: 20 }),
}).toMatchSnapshot()
})
it('should properly render bottom pointing arrow with red color, width of 20px and height 20px', () => {
it('should properly render bottom pointing arrow with red foregroundColor, width of 20px and height 20px', () => {
expect({
...triangle({ color: 'red', pointingDirection: 'bottom', height: 20, width: 10 }),
...triangle({ foregroundColor: 'red', pointingDirection: 'bottom', height: 20, width: 10 }),
}).toMatchSnapshot()
})
it('should properly render left pointing arrow with blue color, width of 10px and height 20px', () => {
it('should properly render left pointing arrow with blue foregroundColor, width of 10px and height 20px', () => {
expect({
...triangle({ color: 'blue', pointingDirection: 'left', height: 20, width: 10 }),
...triangle({ foregroundColor: 'blue', pointingDirection: 'left', height: 20, width: 10 }),
}).toMatchSnapshot()

@@ -47,3 +55,3 @@ })

{
color: 'blue',
foregroundColor: 'blue',
height: 20,

@@ -56,2 +64,16 @@ width: 10,

})
it('should throw an error when height or width is not a unit based value.', () => {
expect(() => {
// $FlowIgnoreNextLine since the coming is invalid code, flow complains
triangle(
{
foregroundColor: 'blue',
height: 'inherit',
width: 'inherit',
poitingDirection: false,
},
)
}).toThrow('Passed an invalid value to `height` or `width`. Please provide a pixel based unit')
})
})
// @flow
/** */
type PointingDirection = 'top' | 'right' | 'bottom' | 'left'
type TriangleArgs = {
backgroundColor?: string,
foregroundColor: string,
height: number|string,
width: number|string,
pointingDirection: PointingDirection,
}
const getBorderWidth = (pointingDirection: PointingDirection, height: number, width: number) => {
switch (pointingDirection) {
case 'top': return `0 ${width / 2}px ${height}px ${width / 2}px`
case 'left': return `${height / 2}px ${width}px ${height / 2}px 0`
case 'bottom': return `${height}px ${width / 2}px 0 ${width / 2}px`
case 'right': return `${height / 2}px 0 ${height / 2}px ${width}px`
default: throw new Error('Passed invalid argument to triangle, please pass correct poitingDirection e.g. \'right\'.')
}
}
// needed for border-color
const reverseDirection = {
left: 'right',
right: 'left',
top: 'bottom',
bottom: 'top',
}
/**
* CSS to represent triangle with any pointing direction.
* CSS to represent triangle with any pointing direction with an optional background color. Accepts number or px values for height and width.
*

@@ -11,3 +40,3 @@ * @example

* const styles = {
* ...triangle({ pointing: 'right', width: '100px', height: '100px', color: 'red' })
* ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })
* }

@@ -18,3 +47,3 @@ *

* const div = styled.div`
* ${triangle({ pointing: 'right', width: '100px', height: '100px', color: 'red' })}
* ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}
*

@@ -34,49 +63,24 @@ *

type PointingDirection = 'top' | 'right' | 'bottom' | 'left'
function triangle({ pointingDirection, height, width, foregroundColor, backgroundColor = 'transparent' } : TriangleArgs) {
const unitlessHeight = parseFloat(height)
const unitlessWidth = parseFloat(width)
if (isNaN(unitlessHeight) || isNaN(unitlessWidth)) {
throw new Error('Passed an invalid value to `height` or `width`. Please provide a pixel based unit')
}
type BorderWidthArgs = {
height: number,
width: number,
pointingDirection: PointingDirection,
}
type TriangleArgs = BorderWidthArgs & {
color: string,
}
const getBorderWidth = ({ pointingDirection, height, width } : BorderWidthArgs) => {
switch (pointingDirection) {
case 'top': return `0 ${width / 2}px ${height}px ${width / 2}px`
case 'left': return `${height / 2}px ${width}px ${height / 2}px 0`
case 'bottom': return `${height}px ${width / 2}px 0 ${width / 2}px`
case 'right': return `${height / 2}px 0 ${height / 2}px ${width}px`
default: throw new Error('Passed invalid argument to triangle, please pass correct poitingDirection e.g. \'right\'.')
return {
'border-color': backgroundColor,
'width': '0',
'height': '0',
'border-width': getBorderWidth(pointingDirection, unitlessHeight, unitlessWidth),
'border-style': 'solid',
/*
* javascript Object sorting orders 'border-color' after 'border-bottom-color'
* (bottom-b) is before (bottom-c) - !important is needed
* { border-bottom-color: 'red', border-color: 'transparent' }
*/
[`border-${reverseDirection[pointingDirection]}-color`]: `${foregroundColor} !important`,
}
}
// needed for border-color
const reverseDirection = {
left: 'right',
right: 'left',
top: 'bottom',
bottom: 'top',
}
const triangle = ({ pointingDirection, width, height, color } : TriangleArgs) => ({
'border-color': 'transparent',
'width': '0',
'height': '0',
'border-width': getBorderWidth({ height, width, pointingDirection }),
'border-style': 'solid',
/*
* javascript Object sorting orders 'border-color' after 'border-bottom-color'
* (bottom-b) is before (bottom-c) - !important is needed
* { border-bottom-color: 'red', border-color: 'transparent' }
*/
[`border-${reverseDirection[pointingDirection]}-color`]: `${color} !important`,
})
export default triangle

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 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

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