-496 Removals
+360 Additions
// bundle-import-files.js// bundle-import-package.js
!function(modules) {!function(modules) {
var installedModules = {}; var installedModules = {};
function __webpack_require__(moduleId) { function __webpack_require__(moduleId) {
if (installedModules[moduleId]) return installedModules[moduleId].exports; if (installedModules[moduleId]) return installedModules[moduleId].exports;
var module = installedModules[moduleId] = { var module = installedModules[moduleId] = {
i: moduleId, i: moduleId,
l: false, l: false,
exports: {} exports: {}
}; };
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
module.l = true; module.l = true;
return module.exports; return module.exports;
} }
__webpack_require__.m = modules; __webpack_require__.m = modules;
__webpack_require__.c = installedModules; __webpack_require__.c = installedModules;
__webpack_require__.i = function(value) { __webpack_require__.i = function(value) {
return value; return value;
}; };
__webpack_require__.d = function(exports, name, getter) { __webpack_require__.d = function(exports, name, getter) {
if (!__webpack_require__.o(exports, name)) Object.defineProperty(exports, name, { if (!__webpack_require__.o(exports, name)) Object.defineProperty(exports, name, {
configurable: false, configurable: false,
enumerable: true, enumerable: true,
get: getter get: getter
}); });
}; };
__webpack_require__.n = function(module) { __webpack_require__.n = function(module) {
var getter = module && module.__esModule ? function() { var getter = module && module.__esModule ? function() {
return module["default"]; return module["default"];
} : function() { } : function() {
return module; return module;
}; };
__webpack_require__.d(getter, "a", getter); __webpack_require__.d(getter, "a", getter);
return getter; return getter;
}; };
__webpack_require__.o = function(object, property) { __webpack_require__.o = function(object, property) {
return Object.prototype.hasOwnProperty.call(object, property); return Object.prototype.hasOwnProperty.call(object, property);
}; };
__webpack_require__.p = ""; __webpack_require__.p = "";
__webpack_require__(__webpack_require__.s = 7); __webpack_require__(__webpack_require__.s = 8);
}([ function(module, exports, __webpack_require__) {}({
"use strict"; 4: function(module, __webpack_exports__, __webpack_require__) {
Object.defineProperty(exports, "__esModule", { "use strict";
value: true __webpack_require__.d(__webpack_exports__, "a", function() {
}); return curriedOpacify;
var _hslToRgb = __webpack_require__(10); });
var _hslToRgb2 = _interopRequireDefault(_hslToRgb); __webpack_require__.d(__webpack_exports__, "b", function() {
var _nameToHex = __webpack_require__(11); return curriedTransparentize;
var _nameToHex2 = _interopRequireDefault(_nameToHex); });
function _interopRequireDefault(obj) { var _typeof = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function(obj) {
return obj && obj.__esModule ? obj : { return typeof obj;
default: obj } : function(obj) {
return obj && "function" === typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}; };
} var _extends = Object.assign || function(target) {
var hexRegex = /^#[a-fA-F0-9]{6}$/; for (var i = 1; i < arguments.length; i++) {
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/; var source = arguments[i];
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/; for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
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*\)$/; return target;
var hslaRegex = /^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;
function parseToRgb(color) {
if ("string" !== typeof color) throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");
var normalizedColor = (0, _nameToHex2.default)(color);
if (normalizedColor.match(hexRegex)) return {
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
}; };
if (normalizedColor.match(reducedHexRegex)) return { !function(strings, raw) {
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16), Object.freeze(Object.defineProperties(strings, {
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16), raw: {
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16) value: Object.freeze(raw)
}
}));
}([ "radial-gradient(", "", "", "", ")" ], [ "radial-gradient(", "", "", "", ")" ]);
function colorToInt(color) {
return Math.round(255 * color);
}
function convertToInt(red, green, blue) {
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
}
function hslToRgb(hue, saturation, lightness) {
var convert = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : convertToInt;
if (0 === saturation) return convert(lightness, lightness, lightness);
var huePrime = hue % 360 / 60;
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
var red = 0;
var green = 0;
var blue = 0;
if (huePrime >= 0 && huePrime < 1) {
red = chroma;
green = secondComponent;
} else if (huePrime >= 1 && huePrime < 2) {
red = secondComponent;
green = chroma;
} else if (huePrime >= 2 && huePrime < 3) {
green = chroma;
blue = secondComponent;
} else if (huePrime >= 3 && huePrime < 4) {
green = secondComponent;
blue = chroma;
} else if (huePrime >= 4 && huePrime < 5) {
red = secondComponent;
blue = chroma;
} else if (huePrime >= 5 && huePrime < 6) {
red = chroma;
blue = secondComponent;
}
var lightnessModification = lightness - chroma / 2;
return convert(red + lightnessModification, green + lightnessModification, blue + lightnessModification);
}
var namedColorMap = {
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "00ffff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "0000ff",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "00ffff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "ff00ff",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "639",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
}; };
var rgbMatched = rgbRegex.exec(normalizedColor); function nameToHex(color) {
if (rgbMatched) return { if ("string" !== typeof color) return color;
red: parseInt("" + rgbMatched[1], 10), var normalizedColorName = color.toLowerCase();
green: parseInt("" + rgbMatched[2], 10), return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
blue: parseInt("" + rgbMatched[3], 10) }
}; var hexRegex = /^#[a-fA-F0-9]{6}$/;
var rgbaMatched = rgbaRegex.exec(normalizedColor); var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
if (rgbaMatched) return { var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
red: parseInt("" + rgbaMatched[1], 10), var rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;
green: parseInt("" + rgbaMatched[2], 10), var hslRegex = /^hsl\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*\)$/;
blue: parseInt("" + rgbaMatched[3], 10), var hslaRegex = /^hsla\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/;
alpha: parseFloat("" + rgbaMatched[4], 10) function parseToRgb(color) {
}; if ("string" !== typeof color) throw new Error("Passed an incorrect argument to a color function, please pass a string representation of a color.");
var hslMatched = hslRegex.exec(normalizedColor); var normalizedColor = nameToHex(color);
if (hslMatched) { if (normalizedColor.match(hexRegex)) return {
var hue = parseInt("" + hslMatched[1], 10); red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
var saturation = parseInt("" + hslMatched[2], 10) / 100; green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
var lightness = parseInt("" + hslMatched[3], 10) / 100; blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
var rgbColorString = "rgb(" + (0, _hslToRgb2.default)(hue, saturation, lightness) + ")"; };
var hslRgbMatched = rgbRegex.exec(rgbColorString); if (normalizedColor.match(reducedHexRegex)) return {
return { red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
red: parseInt("" + hslRgbMatched[1], 10), green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
green: parseInt("" + hslRgbMatched[2], 10), blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
blue: parseInt("" + hslRgbMatched[3], 10)
}; };
var rgbMatched = rgbRegex.exec(normalizedColor);
if (rgbMatched) return {
red: parseInt("" + rgbMatched[1], 10),
green: parseInt("" + rgbMatched[2], 10),
blue: parseInt("" + rgbMatched[3], 10)
};
var rgbaMatched = rgbaRegex.exec(normalizedColor);
if (rgbaMatched) return {
red: parseInt("" + rgbaMatched[1], 10),
green: parseInt("" + rgbaMatched[2], 10),
blue: parseInt("" + rgbaMatched[3], 10),
alpha: parseFloat("" + rgbaMatched[4], 10)
};
var hslMatched = hslRegex.exec(normalizedColor);
if (hslMatched) {
var hue = parseInt("" + hslMatched[1], 10);
var saturation = parseInt("" + hslMatched[2], 10) / 100;
var lightness = parseInt("" + hslMatched[3], 10) / 100;
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
var hslRgbMatched = rgbRegex.exec(rgbColorString);
return {
red: parseInt("" + hslRgbMatched[1], 10),
green: parseInt("" + hslRgbMatched[2], 10),
blue: parseInt("" + hslRgbMatched[3], 10)
};
}
var hslaMatched = hslaRegex.exec(normalizedColor);
if (hslaMatched) {
var _hue = parseInt("" + hslaMatched[1], 10);
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
return {
red: parseInt("" + _hslRgbMatched[1], 10),
green: parseInt("" + _hslRgbMatched[2], 10),
blue: parseInt("" + _hslRgbMatched[3], 10),
alpha: parseFloat("" + hslaMatched[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.");
} }
var hslaMatched = hslaRegex.exec(normalizedColor); var reduceHexValue = function(value) {
if (hslaMatched) { if (7 === value.length && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) return "#" + value[1] + value[3] + value[5];
var _hue = parseInt("" + hslaMatched[1], 10); return value;
var _saturation = parseInt("" + hslaMatched[2], 10) / 100; };
var _lightness = parseInt("" + hslaMatched[3], 10) / 100; function numberToHex(value) {
var _rgbColorString = "rgb(" + (0, _hslToRgb2.default)(_hue, _saturation, _lightness) + ")"; var hex = value.toString(16);
var _hslRgbMatched = rgbRegex.exec(_rgbColorString); return 1 === hex.length ? "0" + hex : hex;
return { }
red: parseInt("" + _hslRgbMatched[1], 10), function rgb(value, green, blue) {
green: parseInt("" + _hslRgbMatched[2], 10), if ("number" === typeof value && "number" === typeof green && "number" === typeof blue) return reduceHexValue("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue)); else if ("object" === ("undefined" === typeof value ? "undefined" : _typeof(value)) && void 0 === green && void 0 === blue) return reduceHexValue("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
blue: parseInt("" + _hslRgbMatched[3], 10), 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 }).");
alpha: parseFloat("" + hslaMatched[4], 10) }
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
if ("string" === typeof firstValue && "number" === typeof secondValue) {
var rgbValue = parseToRgb(firstValue);
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
} else if ("number" === typeof firstValue && "number" === typeof secondValue && "number" === typeof thirdValue && "number" === typeof fourthValue) return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")"; else if ("object" === ("undefined" === typeof firstValue ? "undefined" : _typeof(firstValue)) && void 0 === secondValue && void 0 === thirdValue && void 0 === fourthValue) return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.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 curried(f, length, acc) {
return function() {
var combined = acc.concat(Array.prototype.slice.call(arguments));
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
}; };
} }
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 curry(f) {
} return curried(f, f.length, []);
exports.default = parseToRgb; }
module.exports = exports["default"]; function guard(lowerBoundary, upperBoundary, value) {
}, function(module, exports, __webpack_require__) { return Math.max(lowerBoundary, Math.min(upperBoundary, value));
"use strict"; }
Object.defineProperty(exports, "__esModule", { function opacify(amount, color) {
value: true var parsedColor = parseToRgb(color);
}); var alpha = "number" === typeof parsedColor.alpha ? parsedColor.alpha : 1;
var _typeof = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function(obj) { return rgba(_extends({}, parsedColor, {
return typeof obj; alpha: guard(0, 1, (100 * alpha + 100 * amount) / 100)
} : function(obj) { }));
return obj && "function" === typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var _rgb = __webpack_require__(9);
var _rgb2 = _interopRequireDefault(_rgb);
var _parseToRgb = __webpack_require__(0);
var _parseToRgb2 = _interopRequireDefault(_parseToRgb);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
if ("string" === typeof firstValue && "number" === typeof secondValue) {
var rgbValue = (0, _parseToRgb2.default)(firstValue);
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
} else if ("number" === typeof firstValue && "number" === typeof secondValue && "number" === typeof thirdValue && "number" === typeof fourthValue) return fourthValue >= 1 ? (0,
_rgb2.default)(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")"; else if ("object" === ("undefined" === typeof firstValue ? "undefined" : _typeof(firstValue)) && void 0 === secondValue && void 0 === thirdValue && void 0 === fourthValue) return firstValue.alpha >= 1 ? (0,
_rgb2.default)(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.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 }).");
}
exports.default = rgba;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = curry;
function curried(f, length, acc) {
return function() {
var combined = acc.concat(Array.prototype.slice.call(arguments));
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
};
}
function curry(f) {
return curried(f, f.length, []);
}
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function guard(lowerBoundary, upperBoundary, value) {
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
}
exports.default = guard;
module.exports = exports["default"];
}, , function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
} }
return target; var curriedOpacify = curry(opacify);
}; function transparentize(amount, color) {
var _rgba = __webpack_require__(1); var parsedColor = parseToRgb(color);
var _rgba2 = _interopRequireDefault(_rgba); var alpha = "number" === typeof parsedColor.alpha ? parsedColor.alpha : 1;
var _parseToRgb = __webpack_require__(0); return rgba(_extends({}, parsedColor, {
var _parseToRgb2 = _interopRequireDefault(_parseToRgb); alpha: guard(0, 1, (100 * alpha - 100 * amount) / 100)
var _guard = __webpack_require__(3); }));
var _guard2 = _interopRequireDefault(_guard);
var _curry = __webpack_require__(2);
var _curry2 = _interopRequireDefault(_curry);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function opacify(amount, color) {
var parsedColor = (0, _parseToRgb2.default)(color);
var alpha = "number" === typeof parsedColor.alpha ? parsedColor.alpha : 1;
var colorWithAlpha = _extends({}, parsedColor, {
alpha: (0, _guard2.default)(0, 1, (100 * alpha + 100 * amount) / 100)
});
return (0, _rgba2.default)(colorWithAlpha);
}
var curriedOpacify = (0, _curry2.default)(opacify);
exports.default = curriedOpacify;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
} }
return target; var curriedTransparentize = curry(transparentize);
}; },
var _rgba = __webpack_require__(1); 8: function(module, __webpack_exports__, __webpack_require__) {
var _rgba2 = _interopRequireDefault(_rgba); "use strict";
var _parseToRgb = __webpack_require__(0); Object.defineProperty(__webpack_exports__, "__esModule", {
var _parseToRgb2 = _interopRequireDefault(_parseToRgb); value: true
var _guard = __webpack_require__(3);
var _guard2 = _interopRequireDefault(_guard);
var _curry = __webpack_require__(2);
var _curry2 = _interopRequireDefault(_curry);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function transparentize(amount, color) {
var parsedColor = (0, _parseToRgb2.default)(color);
var alpha = "number" === typeof parsedColor.alpha ? parsedColor.alpha : 1;
var colorWithAlpha = _extends({}, parsedColor, {
alpha: (0, _guard2.default)(0, 1, (100 * alpha - 100 * amount) / 100)
}); });
return (0, _rgba2.default)(colorWithAlpha); var __WEBPACK_IMPORTED_MODULE_0_polished__ = __webpack_require__(4);
} console.log("polished", __WEBPACK_IMPORTED_MODULE_0_polished__["a"], __WEBPACK_IMPORTED_MODULE_0_polished__["b"]);
var curriedTransparentize = (0, _curry2.default)(transparentize);
exports.default = curriedTransparentize;
module.exports = exports["default"];
}, function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", {
value: true
});
var __WEBPACK_IMPORTED_MODULE_0_polished_lib_color_opacify_js__ = __webpack_require__(5);
var __WEBPACK_IMPORTED_MODULE_0_polished_lib_color_opacify_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_polished_lib_color_opacify_js__);
var __WEBPACK_IMPORTED_MODULE_1_polished_lib_color_transparentize_js__ = __webpack_require__(6);
var __WEBPACK_IMPORTED_MODULE_1_polished_lib_color_transparentize_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_polished_lib_color_transparentize_js__);
console.log("polished", __WEBPACK_IMPORTED_MODULE_0_polished_lib_color_opacify_js___default.a, __WEBPACK_IMPORTED_MODULE_1_polished_lib_color_transparentize_js___default.a);
}, , function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function(obj) {
return typeof obj;
} : function(obj) {
return obj && "function" === typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var _reduceHexValue = __webpack_require__(13);
var _reduceHexValue2 = _interopRequireDefault(_reduceHexValue);
var _numberToHex = __webpack_require__(12);
var _numberToHex2 = _interopRequireDefault(_numberToHex);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function rgb(value, green, blue) {
if ("number" === typeof value && "number" === typeof green && "number" === typeof blue) return (0,
_reduceHexValue2.default)("#" + (0, _numberToHex2.default)(value) + (0, _numberToHex2.default)(green) + (0,
_numberToHex2.default)(blue)); else if ("object" === ("undefined" === typeof value ? "undefined" : _typeof(value)) && void 0 === green && void 0 === blue) return (0,
_reduceHexValue2.default)("#" + (0, _numberToHex2.default)(value.red) + (0, _numberToHex2.default)(value.green) + (0,
_numberToHex2.default)(value.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 }).");
}
exports.default = rgb;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function colorToInt(color) {
return Math.round(255 * color);
}
function convertToInt(red, green, blue) {
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
}
function hslToRgb(hue, saturation, lightness) {
var convert = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : convertToInt;
if (0 === saturation) return convert(lightness, lightness, lightness);
var huePrime = hue % 360 / 60;
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
var red = 0;
var green = 0;
var blue = 0;
if (huePrime >= 0 && huePrime < 1) {
red = chroma;
green = secondComponent;
} else if (huePrime >= 1 && huePrime < 2) {
red = secondComponent;
green = chroma;
} else if (huePrime >= 2 && huePrime < 3) {
green = chroma;
blue = secondComponent;
} else if (huePrime >= 3 && huePrime < 4) {
green = secondComponent;
blue = chroma;
} else if (huePrime >= 4 && huePrime < 5) {
red = secondComponent;
blue = chroma;
} else if (huePrime >= 5 && huePrime < 6) {
red = chroma;
blue = secondComponent;
}
var lightnessModification = lightness - chroma / 2;
return convert(red + lightnessModification, green + lightnessModification, blue + lightnessModification);
}
exports.default = hslToRgb;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var namedColorMap = {
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "00ffff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "0000ff",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "00ffff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "ff00ff",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "639",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
};
function nameToHex(color) {
if ("string" !== typeof color) return color;
var normalizedColorName = color.toLowerCase();
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
} }
exports.default = nameToHex;});
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
function numberToHex(value) {
var hex = value.toString(16);
return 1 === hex.length ? "0" + hex : hex;
}
exports.default = numberToHex;
module.exports = exports["default"];
}, function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var reduceHexValue = function(value) {
if (7 === value.length && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) return "#" + value[1] + value[3] + value[5];
return value;
};
exports.default = reduceHexValue;
module.exports = exports["default"];
} ]);
Editor
Clear
Original Text
Changed Text