flow like the river

This commit is contained in:
root 2025-11-07 00:06:12 +01:00
commit 013fe673f3
42435 changed files with 5764238 additions and 0 deletions

10
VISUALIZACION/node_modules/polished/lib/color/adjustHue.d.ts generated vendored Executable file
View file

@ -0,0 +1,10 @@
declare function curriedAdjustHueWith1(color: string): string;
declare function curriedAdjustHue(
degree: number | string,
): typeof curriedAdjustHueWith1;
declare function curriedAdjustHue(
degree: number | string,
color: string,
): string;
export default curriedAdjustHue;

45
VISUALIZACION/node_modules/polished/lib/color/adjustHue.js generated vendored Executable file
View file

@ -0,0 +1,45 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Changes the hue of the color. Hue is a number between 0 to 360. The first
* argument for adjustHue is the amount of degrees the color is rotated around
* the color wheel, always producing a positive hue value.
*
* @example
* // Styles as object usage
* const styles = {
* background: adjustHue(180, '#448'),
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${adjustHue(180, '#448')};
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#888844";
* background: "rgba(136,136,68,0.7)";
* }
*/
function adjustHue(degree, color) {
if (color === 'transparent') return color;
var hslColor = (0, _parseToHsl["default"])(color);
return (0, _toColorString["default"])(_extends({}, hslColor, {
hue: hslColor.hue + parseFloat(degree)
}));
}
// prettier-ignore
var curriedAdjustHue = (0, _curry["default"] /* ::<number | string, string, string> */)(adjustHue);
var _default = exports["default"] = curriedAdjustHue;
module.exports = exports.default;

View file

@ -0,0 +1,41 @@
// @flow
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
import curry from '../internalHelpers/_curry'
/**
* Changes the hue of the color. Hue is a number between 0 to 360. The first
* argument for adjustHue is the amount of degrees the color is rotated around
* the color wheel, always producing a positive hue value.
*
* @example
* // Styles as object usage
* const styles = {
* background: adjustHue(180, '#448'),
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${adjustHue(180, '#448')};
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#888844";
* background: "rgba(136,136,68,0.7)";
* }
*/
function adjustHue(degree: number | string, color: string): string {
if (color === 'transparent') return color
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
hue: hslColor.hue + parseFloat(degree),
})
}
// prettier-ignore
const curriedAdjustHue = curry/* ::<number | string, string, string> */(adjustHue)
export default curriedAdjustHue

View file

@ -0,0 +1,3 @@
declare function complement(color: string): string;
export default complement;

38
VISUALIZACION/node_modules/polished/lib/color/complement.js generated vendored Executable file
View file

@ -0,0 +1,38 @@
"use strict";
exports.__esModule = true;
exports["default"] = complement;
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Returns the complement of the provided color. This is identical to adjustHue(180, <color>).
*
* @example
* // Styles as object usage
* const styles = {
* background: complement('#448'),
* background: complement('rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${complement('#448')};
* background: ${complement('rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#884";
* background: "rgba(153,153,153,0.7)";
* }
*/
function complement(color) {
if (color === 'transparent') return color;
var hslColor = (0, _parseToHsl["default"])(color);
return (0, _toColorString["default"])(_extends({}, hslColor, {
hue: (hslColor.hue + 180) % 360
}));
}
module.exports = exports.default;

View file

@ -0,0 +1,34 @@
// @flow
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Returns the complement of the provided color. This is identical to adjustHue(180, <color>).
*
* @example
* // Styles as object usage
* const styles = {
* background: complement('#448'),
* background: complement('rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${complement('#448')};
* background: ${complement('rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#884";
* background: "rgba(153,153,153,0.7)";
* }
*/
export default function complement(color: string): string {
if (color === 'transparent') return color
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
hue: (hslColor.hue + 180) % 360,
})
}

7
VISUALIZACION/node_modules/polished/lib/color/darken.d.ts generated vendored Executable file
View file

@ -0,0 +1,7 @@
declare function curriedDarkenWith1(color: string): string;
declare function curriedDarken(
amount: number | string,
): typeof curriedDarkenWith1;
declare function curriedDarken(amount: number | string, color: string): string;
export default curriedDarken;

45
VISUALIZACION/node_modules/polished/lib/color/darken.js generated vendored Executable file
View file

@ -0,0 +1,45 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _guard = _interopRequireDefault(require("../internalHelpers/_guard"));
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Returns a string value for the darkened color.
*
* @example
* // Styles as object usage
* const styles = {
* background: darken(0.2, '#FFCD64'),
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${darken(0.2, '#FFCD64')};
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#ffbd31";
* background: "rgba(255,189,49,0.7)";
* }
*/
function darken(amount, color) {
if (color === 'transparent') return color;
var hslColor = (0, _parseToHsl["default"])(color);
return (0, _toColorString["default"])(_extends({}, hslColor, {
lightness: (0, _guard["default"])(0, 1, hslColor.lightness - parseFloat(amount))
}));
}
// prettier-ignore
var curriedDarken = (0, _curry["default"] /* ::<number | string, string, string> */)(darken);
var _default = exports["default"] = curriedDarken;
module.exports = exports.default;

41
VISUALIZACION/node_modules/polished/lib/color/darken.js.flow generated vendored Executable file
View file

@ -0,0 +1,41 @@
// @flow
import curry from '../internalHelpers/_curry'
import guard from '../internalHelpers/_guard'
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Returns a string value for the darkened color.
*
* @example
* // Styles as object usage
* const styles = {
* background: darken(0.2, '#FFCD64'),
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${darken(0.2, '#FFCD64')};
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#ffbd31";
* background: "rgba(255,189,49,0.7)";
* }
*/
function darken(amount: number | string, color: string): string {
if (color === 'transparent') return color
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
lightness: guard(0, 1, hslColor.lightness - parseFloat(amount)),
})
}
// prettier-ignore
const curriedDarken = curry/* ::<number | string, string, string> */(darken)
export default curriedDarken

View file

@ -0,0 +1,10 @@
declare function curriedDesaturateWith1(color: string): string;
declare function curriedDesaturate(
amount: number | string,
): typeof curriedDesaturateWith1;
declare function curriedDesaturate(
amount: number | string,
color: string,
): string;
export default curriedDesaturate;

46
VISUALIZACION/node_modules/polished/lib/color/desaturate.js generated vendored Executable file
View file

@ -0,0 +1,46 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _guard = _interopRequireDefault(require("../internalHelpers/_guard"));
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Decreases the intensity of a color. Its range is between 0 to 1. The first
* argument of the desaturate function is the amount by how much the color
* intensity should be decreased.
*
* @example
* // Styles as object usage
* const styles = {
* background: desaturate(0.2, '#CCCD64'),
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${desaturate(0.2, '#CCCD64')};
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#b8b979";
* background: "rgba(184,185,121,0.7)";
* }
*/
function desaturate(amount, color) {
if (color === 'transparent') return color;
var hslColor = (0, _parseToHsl["default"])(color);
return (0, _toColorString["default"])(_extends({}, hslColor, {
saturation: (0, _guard["default"])(0, 1, hslColor.saturation - parseFloat(amount))
}));
}
// prettier-ignore
var curriedDesaturate = (0, _curry["default"] /* ::<number | string, string, string> */)(desaturate);
var _default = exports["default"] = curriedDesaturate;
module.exports = exports.default;

View file

@ -0,0 +1,42 @@
// @flow
import curry from '../internalHelpers/_curry'
import guard from '../internalHelpers/_guard'
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Decreases the intensity of a color. Its range is between 0 to 1. The first
* argument of the desaturate function is the amount by how much the color
* intensity should be decreased.
*
* @example
* // Styles as object usage
* const styles = {
* background: desaturate(0.2, '#CCCD64'),
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${desaturate(0.2, '#CCCD64')};
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#b8b979";
* background: "rgba(184,185,121,0.7)";
* }
*/
function desaturate(amount: number | string, color: string): string {
if (color === 'transparent') return color
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
saturation: guard(0, 1, hslColor.saturation - parseFloat(amount)),
})
}
// prettier-ignore
const curriedDesaturate = curry/* ::<number | string, string, string> */(desaturate)
export default curriedDesaturate

View file

@ -0,0 +1,3 @@
declare function getContrast(color1: string, color2: string): number;
export default getContrast;

19
VISUALIZACION/node_modules/polished/lib/color/getContrast.js generated vendored Executable file
View file

@ -0,0 +1,19 @@
"use strict";
exports.__esModule = true;
exports["default"] = getContrast;
var _getLuminance = _interopRequireDefault(require("./getLuminance"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Returns the contrast ratio between two colors based on
* [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).
*
* @example
* const contrastRatio = getContrast('#444', '#fff');
*/
function getContrast(color1, color2) {
var luminance1 = (0, _getLuminance["default"])(color1);
var luminance2 = (0, _getLuminance["default"])(color2);
return parseFloat((luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05)).toFixed(2));
}
module.exports = exports.default;

View file

@ -0,0 +1,20 @@
// @flow
import getLuminance from './getLuminance'
/**
* Returns the contrast ratio between two colors based on
* [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).
*
* @example
* const contrastRatio = getContrast('#444', '#fff');
*/
export default function getContrast(color1: string, color2: string): number {
const luminance1 = getLuminance(color1)
const luminance2 = getLuminance(color2)
return parseFloat(
(luminance1 > luminance2
? (luminance1 + 0.05) / (luminance2 + 0.05)
: (luminance2 + 0.05) / (luminance1 + 0.05)
).toFixed(2),
)
}

View file

@ -0,0 +1,3 @@
declare function getLuminance(color: string): number;
export default getLuminance;

View file

@ -0,0 +1,45 @@
"use strict";
exports.__esModule = true;
exports["default"] = getLuminance;
var _parseToRgb = _interopRequireDefault(require("./parseToRgb"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Returns a number (float) representing the luminance of a color.
*
* @example
* // Styles as object usage
* const styles = {
* background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',
* background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?
* 'rgba(58, 133, 255, 1)' :
* 'rgba(255, 57, 149, 1)',
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};
* background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?
* 'rgba(58, 133, 255, 1)' :
* 'rgba(255, 57, 149, 1)'};
*
* // CSS in JS Output
*
* div {
* background: "#CCCD64";
* background: "rgba(58, 133, 255, 1)";
* }
*/
function getLuminance(color) {
if (color === 'transparent') return 0;
var rgbColor = (0, _parseToRgb["default"])(color);
var _Object$keys$map = Object.keys(rgbColor).map(function (key) {
var channel = rgbColor[key] / 255;
return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
}),
r = _Object$keys$map[0],
g = _Object$keys$map[1],
b = _Object$keys$map[2];
return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3));
}
module.exports = exports.default;

View file

@ -0,0 +1,38 @@
// @flow
import parseToRgb from './parseToRgb'
/**
* Returns a number (float) representing the luminance of a color.
*
* @example
* // Styles as object usage
* const styles = {
* background: getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff',
* background: getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?
* 'rgba(58, 133, 255, 1)' :
* 'rgba(255, 57, 149, 1)',
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${getLuminance('#CCCD64') >= getLuminance('#0000ff') ? '#CCCD64' : '#0000ff'};
* background: ${getLuminance('rgba(58, 133, 255, 1)') >= getLuminance('rgba(255, 57, 149, 1)') ?
* 'rgba(58, 133, 255, 1)' :
* 'rgba(255, 57, 149, 1)'};
*
* // CSS in JS Output
*
* div {
* background: "#CCCD64";
* background: "rgba(58, 133, 255, 1)";
* }
*/
export default function getLuminance(color: string): number {
if (color === 'transparent') return 0
const rgbColor: { [string]: number } = parseToRgb(color)
const [r, g, b] = Object.keys(rgbColor).map(key => {
const channel = rgbColor[key] / 255
return channel <= 0.03928 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4
})
return parseFloat((0.2126 * r + 0.7152 * g + 0.0722 * b).toFixed(3))
}

View file

@ -0,0 +1,3 @@
declare function grayscale(color: string): string;
export default grayscale;

37
VISUALIZACION/node_modules/polished/lib/color/grayscale.js generated vendored Executable file
View file

@ -0,0 +1,37 @@
"use strict";
exports.__esModule = true;
exports["default"] = grayscale;
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Converts the color to a grayscale, by reducing its saturation to 0.
*
* @example
* // Styles as object usage
* const styles = {
* background: grayscale('#CCCD64'),
* background: grayscale('rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${grayscale('#CCCD64')};
* background: ${grayscale('rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#999";
* background: "rgba(153,153,153,0.7)";
* }
*/
function grayscale(color) {
if (color === 'transparent') return color;
return (0, _toColorString["default"])(_extends({}, (0, _parseToHsl["default"])(color), {
saturation: 0
}));
}
module.exports = exports.default;

View file

@ -0,0 +1,33 @@
// @flow
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Converts the color to a grayscale, by reducing its saturation to 0.
*
* @example
* // Styles as object usage
* const styles = {
* background: grayscale('#CCCD64'),
* background: grayscale('rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${grayscale('#CCCD64')};
* background: ${grayscale('rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#999";
* background: "rgba(153,153,153,0.7)";
* }
*/
export default function grayscale(color: string): string {
if (color === 'transparent') return color
return toColorString({
...parseToHsl(color),
saturation: 0,
})
}

9
VISUALIZACION/node_modules/polished/lib/color/hsl.d.ts generated vendored Executable file
View file

@ -0,0 +1,9 @@
import { HslColor } from '../types/color';
declare function hsl(
value: HslColor | number,
saturation?: number,
lightness?: number,
): string;
export default hsl;

39
VISUALIZACION/node_modules/polished/lib/color/hsl.js generated vendored Executable file
View file

@ -0,0 +1,39 @@
"use strict";
exports.__esModule = true;
exports["default"] = hsl;
var _hslToHex = _interopRequireDefault(require("../internalHelpers/_hslToHex"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Returns a string value for the color. The returned result is the smallest possible hex notation.
*
* @example
* // Styles as object usage
* const styles = {
* background: hsl(359, 0.75, 0.4),
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${hsl(359, 0.75, 0.4)};
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
* `
*
* // CSS in JS Output
*
* element {
* background: "#b3191c";
* background: "#b3191c";
* }
*/
function hsl(value, saturation, lightness) {
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number') {
return (0, _hslToHex["default"])(value, saturation, lightness);
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
return (0, _hslToHex["default"])(value.hue, value.saturation, value.lightness);
}
throw new _errors["default"](1);
}
module.exports = exports.default;

46
VISUALIZACION/node_modules/polished/lib/color/hsl.js.flow generated vendored Executable file
View file

@ -0,0 +1,46 @@
// @flow
import hslToHex from '../internalHelpers/_hslToHex'
import PolishedError from '../internalHelpers/_errors'
import type { HslColor } from '../types/color'
/**
* Returns a string value for the color. The returned result is the smallest possible hex notation.
*
* @example
* // Styles as object usage
* const styles = {
* background: hsl(359, 0.75, 0.4),
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${hsl(359, 0.75, 0.4)};
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
* `
*
* // CSS in JS Output
*
* element {
* background: "#b3191c";
* background: "#b3191c";
* }
*/
export default function hsl(
value: HslColor | number,
saturation?: number,
lightness?: number,
): string {
if (
typeof value === 'number'
&& typeof saturation === 'number'
&& typeof lightness === 'number'
) {
return hslToHex(value, saturation, lightness)
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined) {
return hslToHex(value.hue, value.saturation, value.lightness)
}
throw new PolishedError(1)
}

View file

@ -0,0 +1,6 @@
import { HslColor } from '../types/color';
import { HslaColor } from '../types/color';
declare function hslToColorString(color: HslColor | HslaColor | number): string;
export default hslToColorString;

View file

@ -0,0 +1,51 @@
"use strict";
exports.__esModule = true;
exports["default"] = hslToColorString;
var _hsl = _interopRequireDefault(require("./hsl"));
var _hsla = _interopRequireDefault(require("./hsla"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Converts a HslColor or HslaColor object to a color string.
* This util is useful in case you only know on runtime which color object is
* used. Otherwise we recommend to rely on `hsl` or `hsla`.
*
* @example
* // Styles as object usage
* const styles = {
* background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
* background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
* background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
* `
*
* // CSS in JS Output
* element {
* background: "#00f";
* background: "rgba(179,25,25,0.72)";
* }
*/
function hslToColorString(color) {
if (typeof color === 'object' && typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number') {
if (color.alpha && typeof color.alpha === 'number') {
return (0, _hsla["default"])({
hue: color.hue,
saturation: color.saturation,
lightness: color.lightness,
alpha: color.alpha
});
}
return (0, _hsl["default"])({
hue: color.hue,
saturation: color.saturation,
lightness: color.lightness
});
}
throw new _errors["default"](45);
}
module.exports = exports.default;

View file

@ -0,0 +1,56 @@
// @flow
import hsl from './hsl'
import hsla from './hsla'
import PolishedError from '../internalHelpers/_errors'
import type { HslColor, HslaColor } from '../types/color'
/**
* Converts a HslColor or HslaColor object to a color string.
* This util is useful in case you only know on runtime which color object is
* used. Otherwise we recommend to rely on `hsl` or `hsla`.
*
* @example
* // Styles as object usage
* const styles = {
* background: hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
* background: hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${hslToColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
* background: ${hslToColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
* `
*
* // CSS in JS Output
* element {
* background: "#00f";
* background: "rgba(179,25,25,0.72)";
* }
*/
export default function hslToColorString(color: HslColor | HslaColor | number): string {
if (
typeof color === 'object'
&& typeof color.hue === 'number'
&& typeof color.saturation === 'number'
&& typeof color.lightness === 'number'
) {
if (color.alpha && typeof color.alpha === 'number') {
return hsla({
hue: color.hue,
saturation: color.saturation,
lightness: color.lightness,
alpha: color.alpha,
})
}
return hsl({
hue: color.hue,
saturation: color.saturation,
lightness: color.lightness,
})
}
throw new PolishedError(45)
}

10
VISUALIZACION/node_modules/polished/lib/color/hsla.d.ts generated vendored Executable file
View file

@ -0,0 +1,10 @@
import { HslaColor } from '../types/color';
declare function hsla(
value: HslaColor | number,
saturation?: number,
lightness?: number,
alpha?: number,
): string;
export default hsla;

43
VISUALIZACION/node_modules/polished/lib/color/hsla.js generated vendored Executable file
View file

@ -0,0 +1,43 @@
"use strict";
exports.__esModule = true;
exports["default"] = hsla;
var _hslToHex = _interopRequireDefault(require("../internalHelpers/_hslToHex"));
var _hslToRgb = _interopRequireDefault(require("../internalHelpers/_hslToRgb"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
*
* @example
* // Styles as object usage
* const styles = {
* background: hsla(359, 0.75, 0.4, 0.7),
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
* background: hsla(359, 0.75, 0.4, 1),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${hsla(359, 0.75, 0.4, 0.7)};
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
* background: ${hsla(359, 0.75, 0.4, 1)};
* `
*
* // CSS in JS Output
*
* element {
* background: "rgba(179,25,28,0.7)";
* background: "rgba(179,25,28,0.7)";
* background: "#b3191c";
* }
*/
function hsla(value, saturation, lightness, alpha) {
if (typeof value === 'number' && typeof saturation === 'number' && typeof lightness === 'number' && typeof alpha === 'number') {
return alpha >= 1 ? (0, _hslToHex["default"])(value, saturation, lightness) : "rgba(" + (0, _hslToRgb["default"])(value, saturation, lightness) + "," + alpha + ")";
} else if (typeof value === 'object' && saturation === undefined && lightness === undefined && alpha === undefined) {
return value.alpha >= 1 ? (0, _hslToHex["default"])(value.hue, value.saturation, value.lightness) : "rgba(" + (0, _hslToRgb["default"])(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
}
throw new _errors["default"](2);
}
module.exports = exports.default;

61
VISUALIZACION/node_modules/polished/lib/color/hsla.js.flow generated vendored Executable file
View file

@ -0,0 +1,61 @@
// @flow
import hslToHex from '../internalHelpers/_hslToHex'
import hslToRgb from '../internalHelpers/_hslToRgb'
import PolishedError from '../internalHelpers/_errors'
import type { HslaColor } from '../types/color'
/**
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
*
* @example
* // Styles as object usage
* const styles = {
* background: hsla(359, 0.75, 0.4, 0.7),
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
* background: hsla(359, 0.75, 0.4, 1),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${hsla(359, 0.75, 0.4, 0.7)};
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
* background: ${hsla(359, 0.75, 0.4, 1)};
* `
*
* // CSS in JS Output
*
* element {
* background: "rgba(179,25,28,0.7)";
* background: "rgba(179,25,28,0.7)";
* background: "#b3191c";
* }
*/
export default function hsla(
value: HslaColor | number,
saturation?: number,
lightness?: number,
alpha?: number,
): string {
if (
typeof value === 'number'
&& typeof saturation === 'number'
&& typeof lightness === 'number'
&& typeof alpha === 'number'
) {
return alpha >= 1
? hslToHex(value, saturation, lightness)
: `rgba(${hslToRgb(value, saturation, lightness)},${alpha})`
} else if (
typeof value === 'object'
&& saturation === undefined
&& lightness === undefined
&& alpha === undefined
) {
return value.alpha >= 1
? hslToHex(value.hue, value.saturation, value.lightness)
: `rgba(${hslToRgb(value.hue, value.saturation, value.lightness)},${value.alpha})`
}
throw new PolishedError(2)
}

3
VISUALIZACION/node_modules/polished/lib/color/invert.d.ts generated vendored Executable file
View file

@ -0,0 +1,3 @@
declare function invert(color: string): string;
export default invert;

42
VISUALIZACION/node_modules/polished/lib/color/invert.js generated vendored Executable file
View file

@ -0,0 +1,42 @@
"use strict";
exports.__esModule = true;
exports["default"] = invert;
var _parseToRgb = _interopRequireDefault(require("./parseToRgb"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Inverts the red, green and blue values of a color.
*
* @example
* // Styles as object usage
* const styles = {
* background: invert('#CCCD64'),
* background: invert('rgba(101,100,205,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${invert('#CCCD64')};
* background: ${invert('rgba(101,100,205,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#33329b";
* background: "rgba(154,155,50,0.7)";
* }
*/
function invert(color) {
if (color === 'transparent') return color;
// parse color string to rgb
var value = (0, _parseToRgb["default"])(color);
return (0, _toColorString["default"])(_extends({}, value, {
red: 255 - value.red,
green: 255 - value.green,
blue: 255 - value.blue
}));
}
module.exports = exports.default;

38
VISUALIZACION/node_modules/polished/lib/color/invert.js.flow generated vendored Executable file
View file

@ -0,0 +1,38 @@
// @flow
import parseToRgb from './parseToRgb'
import toColorString from './toColorString'
/**
* Inverts the red, green and blue values of a color.
*
* @example
* // Styles as object usage
* const styles = {
* background: invert('#CCCD64'),
* background: invert('rgba(101,100,205,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${invert('#CCCD64')};
* background: ${invert('rgba(101,100,205,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#33329b";
* background: "rgba(154,155,50,0.7)";
* }
*/
export default function invert(color: string): string {
if (color === 'transparent') return color
// parse color string to rgb
const value = parseToRgb(color)
return toColorString({
...value,
red: 255 - value.red,
green: 255 - value.green,
blue: 255 - value.blue,
})
}

7
VISUALIZACION/node_modules/polished/lib/color/lighten.d.ts generated vendored Executable file
View file

@ -0,0 +1,7 @@
declare function curriedLightenWith1(color: string): string;
declare function curriedLighten(
amount: number | string,
): typeof curriedLightenWith1;
declare function curriedLighten(amount: number | string, color: string): string;
export default curriedLighten;

45
VISUALIZACION/node_modules/polished/lib/color/lighten.js generated vendored Executable file
View file

@ -0,0 +1,45 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _guard = _interopRequireDefault(require("../internalHelpers/_guard"));
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Returns a string value for the lightened color.
*
* @example
* // Styles as object usage
* const styles = {
* background: lighten(0.2, '#CCCD64'),
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${lighten(0.2, '#FFCD64')};
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#e5e6b1";
* background: "rgba(229,230,177,0.7)";
* }
*/
function lighten(amount, color) {
if (color === 'transparent') return color;
var hslColor = (0, _parseToHsl["default"])(color);
return (0, _toColorString["default"])(_extends({}, hslColor, {
lightness: (0, _guard["default"])(0, 1, hslColor.lightness + parseFloat(amount))
}));
}
// prettier-ignore
var curriedLighten = (0, _curry["default"] /* ::<number | string, string, string> */)(lighten);
var _default = exports["default"] = curriedLighten;
module.exports = exports.default;

View file

@ -0,0 +1,41 @@
// @flow
import curry from '../internalHelpers/_curry'
import guard from '../internalHelpers/_guard'
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Returns a string value for the lightened color.
*
* @example
* // Styles as object usage
* const styles = {
* background: lighten(0.2, '#CCCD64'),
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${lighten(0.2, '#FFCD64')};
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#e5e6b1";
* background: "rgba(229,230,177,0.7)";
* }
*/
function lighten(amount: number | string, color: string): string {
if (color === 'transparent') return color
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
lightness: guard(0, 1, hslColor.lightness + parseFloat(amount)),
})
}
// prettier-ignore
const curriedLighten = curry/* ::<number | string, string, string> */(lighten)
export default curriedLighten

View file

@ -0,0 +1,8 @@
import { ContrastScores } from '../types/color';
declare function meetsContrastGuidelines(
color1: string,
color2: string,
): ContrastScores;
export default meetsContrastGuidelines;

View file

@ -0,0 +1,23 @@
"use strict";
exports.__esModule = true;
exports["default"] = meetsContrastGuidelines;
var _getContrast = _interopRequireDefault(require("./getContrast"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Determines which contrast guidelines have been met for two colors.
* Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).
*
* @example
* const scores = meetsContrastGuidelines('#444', '#fff');
*/
function meetsContrastGuidelines(color1, color2) {
var contrastRatio = (0, _getContrast["default"])(color1, color2);
return {
AA: contrastRatio >= 4.5,
AALarge: contrastRatio >= 3,
AAA: contrastRatio >= 7,
AAALarge: contrastRatio >= 4.5
};
}
module.exports = exports.default;

View file

@ -0,0 +1,21 @@
// @flow
import getContrast from './getContrast'
import type { ContrastScores } from '../types/color'
/**
* Determines which contrast guidelines have been met for two colors.
* Based on the [contrast calculations recommended by W3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html).
*
* @example
* const scores = meetsContrastGuidelines('#444', '#fff');
*/
export default function meetsContrastGuidelines(color1: string, color2: string): ContrastScores {
const contrastRatio = getContrast(color1, color2)
return {
AA: contrastRatio >= 4.5,
AALarge: contrastRatio >= 3,
AAA: contrastRatio >= 7,
AAALarge: contrastRatio >= 4.5,
}
}

15
VISUALIZACION/node_modules/polished/lib/color/mix.d.ts generated vendored Executable file
View file

@ -0,0 +1,15 @@
declare function curriedMixWith2(otherColor: string): string;
declare function curriedMixWith1(color: string): typeof curriedMixWith2;
declare function curriedMixWith1(color: string, otherColor: string): string;
declare function curriedMix(weight: number | string): typeof curriedMixWith1;
declare function curriedMix(
weight: number | string,
color: string,
): typeof curriedMixWith2;
declare function curriedMix(
weight: number | string,
color: string,
otherColor: string,
): string;
export default curriedMix;

69
VISUALIZACION/node_modules/polished/lib/color/mix.js generated vendored Executable file
View file

@ -0,0 +1,69 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _rgba = _interopRequireDefault(require("./rgba"));
var _parseToRgb = _interopRequireDefault(require("./parseToRgb"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
*
* @example
* // Styles as object usage
* const styles = {
* background: mix(0.5, '#f00', '#00f')
* background: mix(0.25, '#f00', '#00f')
* background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${mix(0.5, '#f00', '#00f')};
* background: ${mix(0.25, '#f00', '#00f')};
* background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#7f007f";
* background: "#3f00bf";
* background: "rgba(63, 0, 191, 0.75)";
* }
*/
function mix(weight, color, otherColor) {
if (color === 'transparent') return otherColor;
if (otherColor === 'transparent') return color;
if (weight === 0) return otherColor;
var parsedColor1 = (0, _parseToRgb["default"])(color);
var color1 = _extends({}, parsedColor1, {
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
});
var parsedColor2 = (0, _parseToRgb["default"])(otherColor);
var color2 = _extends({}, parsedColor2, {
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
});
// The formula is copied from the original Sass implementation:
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
var alphaDelta = color1.alpha - color2.alpha;
var x = parseFloat(weight) * 2 - 1;
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
var z = 1 + x * alphaDelta;
var weight1 = (y / z + 1) / 2.0;
var weight2 = 1 - weight1;
var mixedColor = {
red: Math.floor(color1.red * weight1 + color2.red * weight2),
green: Math.floor(color1.green * weight1 + color2.green * weight2),
blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
};
return (0, _rgba["default"])(mixedColor);
}
// prettier-ignore
var curriedMix = (0, _curry["default"] /* ::<number | string, string, string, string> */)(mix);
var _default = exports["default"] = curriedMix;
module.exports = exports.default;

70
VISUALIZACION/node_modules/polished/lib/color/mix.js.flow generated vendored Executable file
View file

@ -0,0 +1,70 @@
// @flow
import curry from '../internalHelpers/_curry'
import rgba from './rgba'
import parseToRgb from './parseToRgb'
/**
* Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
*
* @example
* // Styles as object usage
* const styles = {
* background: mix(0.5, '#f00', '#00f')
* background: mix(0.25, '#f00', '#00f')
* background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${mix(0.5, '#f00', '#00f')};
* background: ${mix(0.25, '#f00', '#00f')};
* background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#7f007f";
* background: "#3f00bf";
* background: "rgba(63, 0, 191, 0.75)";
* }
*/
function mix(weight: number | string, color: string, otherColor: string): string {
if (color === 'transparent') return otherColor
if (otherColor === 'transparent') return color
if (weight === 0) return otherColor
const parsedColor1 = parseToRgb(color)
const color1 = {
...parsedColor1,
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1,
}
const parsedColor2 = parseToRgb(otherColor)
const color2 = {
...parsedColor2,
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1,
}
// The formula is copied from the original Sass implementation:
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
const alphaDelta = color1.alpha - color2.alpha
const x = parseFloat(weight) * 2 - 1
const y = x * alphaDelta === -1 ? x : x + alphaDelta
const z = 1 + x * alphaDelta
const weight1 = (y / z + 1) / 2.0
const weight2 = 1 - weight1
const mixedColor = {
red: Math.floor(color1.red * weight1 + color2.red * weight2),
green: Math.floor(color1.green * weight1 + color2.green * weight2),
blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
alpha:
color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight)),
}
return rgba(mixedColor)
}
// prettier-ignore
const curriedMix = curry/* ::<number | string, string, string, string> */(mix)
export default curriedMix

7
VISUALIZACION/node_modules/polished/lib/color/opacify.d.ts generated vendored Executable file
View file

@ -0,0 +1,7 @@
declare function curriedOpacifyWith1(color: string): string;
declare function curriedOpacify(
amount: number | string,
): typeof curriedOpacifyWith1;
declare function curriedOpacify(amount: number | string, color: string): string;
export default curriedOpacify;

51
VISUALIZACION/node_modules/polished/lib/color/opacify.js generated vendored Executable file
View file

@ -0,0 +1,51 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _guard = _interopRequireDefault(require("../internalHelpers/_guard"));
var _rgba = _interopRequireDefault(require("./rgba"));
var _parseToRgb = _interopRequireDefault(require("./parseToRgb"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
*
*
* @example
* // Styles as object usage
* const styles = {
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
* `
*
* // CSS in JS Output
*
* element {
* background: "#fff";
* background: "rgba(255,255,255,0.7)";
* background: "rgba(255,0,0,0.7)";
* }
*/
function opacify(amount, color) {
if (color === 'transparent') return color;
var parsedColor = (0, _parseToRgb["default"])(color);
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
var colorWithAlpha = _extends({}, parsedColor, {
alpha: (0, _guard["default"])(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
});
return (0, _rgba["default"])(colorWithAlpha);
}
// prettier-ignore
var curriedOpacify = (0, _curry["default"] /* ::<number | string, string, string> */)(opacify);
var _default = exports["default"] = curriedOpacify;
module.exports = exports.default;

View file

@ -0,0 +1,47 @@
// @flow
import curry from '../internalHelpers/_curry'
import guard from '../internalHelpers/_guard'
import rgba from './rgba'
import parseToRgb from './parseToRgb'
/**
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
*
*
* @example
* // Styles as object usage
* const styles = {
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
* `
*
* // CSS in JS Output
*
* element {
* background: "#fff";
* background: "rgba(255,255,255,0.7)";
* background: "rgba(255,0,0,0.7)";
* }
*/
function opacify(amount: number | string, color: string): string {
if (color === 'transparent') return color
const parsedColor = parseToRgb(color)
const alpha: number = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1
const colorWithAlpha = {
...parsedColor,
alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100),
}
return rgba(colorWithAlpha)
}
// prettier-ignore
const curriedOpacify = curry/* ::<number | string, string, string> */(opacify)
export default curriedOpacify

View file

@ -0,0 +1,6 @@
import { HslColor } from '../types/color';
import { HslaColor } from '../types/color';
declare function parseToHsl(color: string): HslColor | HslaColor;
export default parseToHsl;

24
VISUALIZACION/node_modules/polished/lib/color/parseToHsl.js generated vendored Executable file
View file

@ -0,0 +1,24 @@
"use strict";
exports.__esModule = true;
exports["default"] = parseToHsl;
var _parseToRgb = _interopRequireDefault(require("./parseToRgb"));
var _rgbToHsl = _interopRequireDefault(require("../internalHelpers/_rgbToHsl"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Returns an HslColor or HslaColor object. This utility function is only useful
* if want to extract a color component. With the color util `toColorString` you
* can convert a HslColor or HslaColor object back to a string.
*
* @example
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
* const color1 = parseToHsl('rgb(255, 0, 0)');
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
*/
function parseToHsl(color) {
// Note: At a later stage we can optimize this function as right now a hsl
// color would be parsed converted to rgb values and converted back to hsl.
return (0, _rgbToHsl["default"])((0, _parseToRgb["default"])(color));
}
module.exports = exports.default;

View file

@ -0,0 +1,22 @@
// @flow
import parseToRgb from './parseToRgb'
import rgbToHsl from '../internalHelpers/_rgbToHsl'
import type { HslColor, HslaColor } from '../types/color'
/**
* Returns an HslColor or HslaColor object. This utility function is only useful
* if want to extract a color component. With the color util `toColorString` you
* can convert a HslColor or HslaColor object back to a string.
*
* @example
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
* const color1 = parseToHsl('rgb(255, 0, 0)');
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
*/
export default function parseToHsl(color: string): HslColor | HslaColor {
// Note: At a later stage we can optimize this function as right now a hsl
// color would be parsed converted to rgb values and converted back to hsl.
return rgbToHsl(parseToRgb(color))
}

View file

@ -0,0 +1,6 @@
import { RgbColor } from '../types/color';
import { RgbaColor } from '../types/color';
declare function parseToRgb(color: string): RgbColor | RgbaColor;
export default parseToRgb;

118
VISUALIZACION/node_modules/polished/lib/color/parseToRgb.js generated vendored Executable file
View file

@ -0,0 +1,118 @@
"use strict";
exports.__esModule = true;
exports["default"] = parseToRgb;
var _hslToRgb = _interopRequireDefault(require("../internalHelpers/_hslToRgb"));
var _nameToHex = _interopRequireDefault(require("../internalHelpers/_nameToHex"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var hexRegex = /^#[a-fA-F0-9]{6}$/;
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
/**
* Returns an RgbColor or RgbaColor object. This utility function is only useful
* if want to extract a color component. With the color util `toColorString` you
* can convert a RgbColor or RgbaColor object back to a string.
*
* @example
* // Assigns `{ red: 255, green: 0, blue: 0 }` to color1
* const color1 = parseToRgb('rgb(255, 0, 0)');
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
*/
function parseToRgb(color) {
if (typeof color !== 'string') {
throw new _errors["default"](3);
}
var normalizedColor = (0, _nameToHex["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(hexRgbaRegex)) {
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
return {
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
alpha: alpha
};
}
if (normalizedColor.match(reducedHexRegex)) {
return {
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
};
}
if (normalizedColor.match(reducedRgbaHexRegex)) {
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
return {
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
alpha: _alpha
};
}
var rgbMatched = rgbRegex.exec(normalizedColor);
if (rgbMatched) {
return {
red: parseInt("" + rgbMatched[1], 10),
green: parseInt("" + rgbMatched[2], 10),
blue: parseInt("" + rgbMatched[3], 10)
};
}
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
if (rgbaMatched) {
return {
red: parseInt("" + rgbaMatched[1], 10),
green: parseInt("" + rgbaMatched[2], 10),
blue: parseInt("" + rgbaMatched[3], 10),
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
};
}
var hslMatched = hslRegex.exec(normalizedColor);
if (hslMatched) {
var hue = parseInt("" + hslMatched[1], 10);
var saturation = parseInt("" + hslMatched[2], 10) / 100;
var lightness = parseInt("" + hslMatched[3], 10) / 100;
var rgbColorString = "rgb(" + (0, _hslToRgb["default"])(hue, saturation, lightness) + ")";
var hslRgbMatched = rgbRegex.exec(rgbColorString);
if (!hslRgbMatched) {
throw new _errors["default"](4, normalizedColor, rgbColorString);
}
return {
red: parseInt("" + hslRgbMatched[1], 10),
green: parseInt("" + hslRgbMatched[2], 10),
blue: parseInt("" + hslRgbMatched[3], 10)
};
}
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
if (hslaMatched) {
var _hue = parseInt("" + hslaMatched[1], 10);
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
var _rgbColorString = "rgb(" + (0, _hslToRgb["default"])(_hue, _saturation, _lightness) + ")";
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
if (!_hslRgbMatched) {
throw new _errors["default"](4, normalizedColor, _rgbColorString);
}
return {
red: parseInt("" + _hslRgbMatched[1], 10),
green: parseInt("" + _hslRgbMatched[2], 10),
blue: parseInt("" + _hslRgbMatched[3], 10),
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
};
}
throw new _errors["default"](5);
}
module.exports = exports.default;

View file

@ -0,0 +1,126 @@
// @flow
import hslToRgb from '../internalHelpers/_hslToRgb'
import nameToHex from '../internalHelpers/_nameToHex'
import PolishedError from '../internalHelpers/_errors'
import type { RgbColor, RgbaColor } from '../types/color'
const hexRegex = /^#[a-fA-F0-9]{6}$/
const hexRgbaRegex = /^#[a-fA-F0-9]{8}$/
const reducedHexRegex = /^#[a-fA-F0-9]{3}$/
const reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/
const rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i
const rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i
const hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i
const hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i
/**
* Returns an RgbColor or RgbaColor object. This utility function is only useful
* if want to extract a color component. With the color util `toColorString` you
* can convert a RgbColor or RgbaColor object back to a string.
*
* @example
* // Assigns `{ red: 255, green: 0, blue: 0 }` to color1
* const color1 = parseToRgb('rgb(255, 0, 0)');
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
*/
export default function parseToRgb(color: string): RgbColor | RgbaColor {
if (typeof color !== 'string') {
throw new PolishedError(3)
}
const normalizedColor = nameToHex(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(hexRgbaRegex)) {
const alpha = parseFloat(
(parseInt(`${normalizedColor[7]}${normalizedColor[8]}`, 16) / 255).toFixed(2),
)
return {
red: parseInt(`${normalizedColor[1]}${normalizedColor[2]}`, 16),
green: parseInt(`${normalizedColor[3]}${normalizedColor[4]}`, 16),
blue: parseInt(`${normalizedColor[5]}${normalizedColor[6]}`, 16),
alpha,
}
}
if (normalizedColor.match(reducedHexRegex)) {
return {
red: parseInt(`${normalizedColor[1]}${normalizedColor[1]}`, 16),
green: parseInt(`${normalizedColor[2]}${normalizedColor[2]}`, 16),
blue: parseInt(`${normalizedColor[3]}${normalizedColor[3]}`, 16),
}
}
if (normalizedColor.match(reducedRgbaHexRegex)) {
const alpha = parseFloat(
(parseInt(`${normalizedColor[4]}${normalizedColor[4]}`, 16) / 255).toFixed(2),
)
return {
red: parseInt(`${normalizedColor[1]}${normalizedColor[1]}`, 16),
green: parseInt(`${normalizedColor[2]}${normalizedColor[2]}`, 16),
blue: parseInt(`${normalizedColor[3]}${normalizedColor[3]}`, 16),
alpha,
}
}
const rgbMatched = rgbRegex.exec(normalizedColor)
if (rgbMatched) {
return {
red: parseInt(`${rgbMatched[1]}`, 10),
green: parseInt(`${rgbMatched[2]}`, 10),
blue: parseInt(`${rgbMatched[3]}`, 10),
}
}
const rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50))
if (rgbaMatched) {
return {
red: parseInt(`${rgbaMatched[1]}`, 10),
green: parseInt(`${rgbaMatched[2]}`, 10),
blue: parseInt(`${rgbaMatched[3]}`, 10),
alpha:
parseFloat(`${rgbaMatched[4]}`) > 1
? parseFloat(`${rgbaMatched[4]}`) / 100
: parseFloat(`${rgbaMatched[4]}`),
}
}
const hslMatched = hslRegex.exec(normalizedColor)
if (hslMatched) {
const hue = parseInt(`${hslMatched[1]}`, 10)
const saturation = parseInt(`${hslMatched[2]}`, 10) / 100
const lightness = parseInt(`${hslMatched[3]}`, 10) / 100
const rgbColorString = `rgb(${hslToRgb(hue, saturation, lightness)})`
const hslRgbMatched = rgbRegex.exec(rgbColorString)
if (!hslRgbMatched) {
throw new PolishedError(4, normalizedColor, rgbColorString)
}
return {
red: parseInt(`${hslRgbMatched[1]}`, 10),
green: parseInt(`${hslRgbMatched[2]}`, 10),
blue: parseInt(`${hslRgbMatched[3]}`, 10),
}
}
const hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50))
if (hslaMatched) {
const hue = parseInt(`${hslaMatched[1]}`, 10)
const saturation = parseInt(`${hslaMatched[2]}`, 10) / 100
const lightness = parseInt(`${hslaMatched[3]}`, 10) / 100
const rgbColorString = `rgb(${hslToRgb(hue, saturation, lightness)})`
const hslRgbMatched = rgbRegex.exec(rgbColorString)
if (!hslRgbMatched) {
throw new PolishedError(4, normalizedColor, rgbColorString)
}
return {
red: parseInt(`${hslRgbMatched[1]}`, 10),
green: parseInt(`${hslRgbMatched[2]}`, 10),
blue: parseInt(`${hslRgbMatched[3]}`, 10),
alpha:
parseFloat(`${hslaMatched[4]}`) > 1
? parseFloat(`${hslaMatched[4]}`) / 100
: parseFloat(`${hslaMatched[4]}`),
}
}
throw new PolishedError(5)
}

View file

@ -0,0 +1,8 @@
declare function readableColor(
color: string,
returnIfLightColor?: string,
returnIfDarkColor?: string,
strict?: boolean,
): string;
export default readableColor;

View file

@ -0,0 +1,63 @@
"use strict";
exports.__esModule = true;
exports["default"] = readableColor;
var _getContrast = _interopRequireDefault(require("./getContrast"));
var _getLuminance = _interopRequireDefault(require("./getLuminance"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var defaultReturnIfLightColor = '#000';
var defaultReturnIfDarkColor = '#fff';
/**
* Returns black or white (or optional passed colors) for best
* contrast depending on the luminosity of the given color.
* When passing custom return colors, strict mode ensures that the
* return color always meets or exceeds WCAG level AA or greater. If this test
* fails, the default return color (black or white) is returned in place of the
* custom return color. You can optionally turn off strict mode.
*
* Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).
*
* @example
* // Styles as object usage
* const styles = {
* color: readableColor('#000'),
* color: readableColor('black', '#001', '#ff8'),
* color: readableColor('white', '#001', '#ff8'),
* color: readableColor('red', '#333', '#ddd', true)
* }
*
* // styled-components usage
* const div = styled.div`
* color: ${readableColor('#000')};
* color: ${readableColor('black', '#001', '#ff8')};
* color: ${readableColor('white', '#001', '#ff8')};
* color: ${readableColor('red', '#333', '#ddd', true)};
* `
*
* // CSS in JS Output
* element {
* color: "#fff";
* color: "#ff8";
* color: "#001";
* color: "#000";
* }
*/
function readableColor(color, returnIfLightColor, returnIfDarkColor, strict) {
if (returnIfLightColor === void 0) {
returnIfLightColor = defaultReturnIfLightColor;
}
if (returnIfDarkColor === void 0) {
returnIfDarkColor = defaultReturnIfDarkColor;
}
if (strict === void 0) {
strict = true;
}
var isColorLight = (0, _getLuminance["default"])(color) > 0.179;
var preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor;
if (!strict || (0, _getContrast["default"])(color, preferredReturnColor) >= 4.5) {
return preferredReturnColor;
}
return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor;
}
module.exports = exports.default;

View file

@ -0,0 +1,56 @@
// @flow
import getContrast from './getContrast'
import getLuminance from './getLuminance'
const defaultReturnIfLightColor = '#000'
const defaultReturnIfDarkColor = '#fff'
/**
* Returns black or white (or optional passed colors) for best
* contrast depending on the luminosity of the given color.
* When passing custom return colors, strict mode ensures that the
* return color always meets or exceeds WCAG level AA or greater. If this test
* fails, the default return color (black or white) is returned in place of the
* custom return color. You can optionally turn off strict mode.
*
* Follows [W3C specs for readability](https://www.w3.org/TR/WCAG20-TECHS/G18.html).
*
* @example
* // Styles as object usage
* const styles = {
* color: readableColor('#000'),
* color: readableColor('black', '#001', '#ff8'),
* color: readableColor('white', '#001', '#ff8'),
* color: readableColor('red', '#333', '#ddd', true)
* }
*
* // styled-components usage
* const div = styled.div`
* color: ${readableColor('#000')};
* color: ${readableColor('black', '#001', '#ff8')};
* color: ${readableColor('white', '#001', '#ff8')};
* color: ${readableColor('red', '#333', '#ddd', true)};
* `
*
* // CSS in JS Output
* element {
* color: "#fff";
* color: "#ff8";
* color: "#001";
* color: "#000";
* }
*/
export default function readableColor(
color: string,
returnIfLightColor?: string = defaultReturnIfLightColor,
returnIfDarkColor?: string = defaultReturnIfDarkColor,
strict?: boolean = true,
): string {
const isColorLight = getLuminance(color) > 0.179
const preferredReturnColor = isColorLight ? returnIfLightColor : returnIfDarkColor
if (!strict || getContrast(color, preferredReturnColor) >= 4.5) {
return preferredReturnColor
}
return isColorLight ? defaultReturnIfLightColor : defaultReturnIfDarkColor
}

9
VISUALIZACION/node_modules/polished/lib/color/rgb.d.ts generated vendored Executable file
View file

@ -0,0 +1,9 @@
import { RgbColor } from '../types/color';
declare function rgb(
value: RgbColor | number,
green?: number,
blue?: number,
): string;
export default rgb;

40
VISUALIZACION/node_modules/polished/lib/color/rgb.js generated vendored Executable file
View file

@ -0,0 +1,40 @@
"use strict";
exports.__esModule = true;
exports["default"] = rgb;
var _reduceHexValue = _interopRequireDefault(require("../internalHelpers/_reduceHexValue"));
var _numberToHex = _interopRequireDefault(require("../internalHelpers/_numberToHex"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Returns a string value for the color. The returned result is the smallest possible hex notation.
*
* @example
* // Styles as object usage
* const styles = {
* background: rgb(255, 205, 100),
* background: rgb({ red: 255, green: 205, blue: 100 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${rgb(255, 205, 100)};
* background: ${rgb({ red: 255, green: 205, blue: 100 })};
* `
*
* // CSS in JS Output
*
* element {
* background: "#ffcd64";
* background: "#ffcd64";
* }
*/
function rgb(value, green, blue) {
if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {
return (0, _reduceHexValue["default"])("#" + (0, _numberToHex["default"])(value) + (0, _numberToHex["default"])(green) + (0, _numberToHex["default"])(blue));
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
return (0, _reduceHexValue["default"])("#" + (0, _numberToHex["default"])(value.red) + (0, _numberToHex["default"])(value.green) + (0, _numberToHex["default"])(value.blue));
}
throw new _errors["default"](6);
}
module.exports = exports.default;

39
VISUALIZACION/node_modules/polished/lib/color/rgb.js.flow generated vendored Executable file
View file

@ -0,0 +1,39 @@
// @flow
import reduceHexValue from '../internalHelpers/_reduceHexValue'
import toHex from '../internalHelpers/_numberToHex'
import PolishedError from '../internalHelpers/_errors'
import type { RgbColor } from '../types/color'
/**
* Returns a string value for the color. The returned result is the smallest possible hex notation.
*
* @example
* // Styles as object usage
* const styles = {
* background: rgb(255, 205, 100),
* background: rgb({ red: 255, green: 205, blue: 100 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${rgb(255, 205, 100)};
* background: ${rgb({ red: 255, green: 205, blue: 100 })};
* `
*
* // CSS in JS Output
*
* element {
* background: "#ffcd64";
* background: "#ffcd64";
* }
*/
export default function rgb(value: RgbColor | number, green?: number, blue?: number): string {
if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {
return reduceHexValue(`#${toHex(value)}${toHex(green)}${toHex(blue)}`)
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
return reduceHexValue(`#${toHex(value.red)}${toHex(value.green)}${toHex(value.blue)}`)
}
throw new PolishedError(6)
}

View file

@ -0,0 +1,6 @@
import { RgbColor } from '../types/color';
import { RgbaColor } from '../types/color';
declare function rgbToColorString(color: RgbColor | RgbaColor): string;
export default rgbToColorString;

View file

@ -0,0 +1,51 @@
"use strict";
exports.__esModule = true;
exports["default"] = rgbToColorString;
var _rgb = _interopRequireDefault(require("./rgb"));
var _rgba = _interopRequireDefault(require("./rgba"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Converts a RgbColor or RgbaColor object to a color string.
* This util is useful in case you only know on runtime which color object is
* used. Otherwise we recommend to rely on `rgb` or `rgba`.
*
* @example
* // Styles as object usage
* const styles = {
* background: rgbToColorString({ red: 255, green: 205, blue: 100 }),
* background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};
* background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
* `
*
* // CSS in JS Output
* element {
* background: "#ffcd64";
* background: "rgba(255,205,100,0.72)";
* }
*/
function rgbToColorString(color) {
if (typeof color === 'object' && typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number') {
if (typeof color.alpha === 'number') {
return (0, _rgba["default"])({
red: color.red,
green: color.green,
blue: color.blue,
alpha: color.alpha
});
}
return (0, _rgb["default"])({
red: color.red,
green: color.green,
blue: color.blue
});
}
throw new _errors["default"](46);
}
module.exports = exports.default;

View file

@ -0,0 +1,52 @@
// @flow
import rgb from './rgb'
import rgba from './rgba'
import PolishedError from '../internalHelpers/_errors'
import type { RgbColor, RgbaColor } from '../types/color'
/**
* Converts a RgbColor or RgbaColor object to a color string.
* This util is useful in case you only know on runtime which color object is
* used. Otherwise we recommend to rely on `rgb` or `rgba`.
*
* @example
* // Styles as object usage
* const styles = {
* background: rgbToColorString({ red: 255, green: 205, blue: 100 }),
* background: rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${rgbToColorString({ red: 255, green: 205, blue: 100 })};
* background: ${rgbToColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
* `
*
* // CSS in JS Output
* element {
* background: "#ffcd64";
* background: "rgba(255,205,100,0.72)";
* }
*/
export default function rgbToColorString(color: RgbColor | RgbaColor): string {
if (
typeof color === 'object'
&& typeof color.red === 'number'
&& typeof color.green === 'number'
&& typeof color.blue === 'number'
) {
if (typeof color.alpha === 'number') {
return rgba({
red: color.red,
green: color.green,
blue: color.blue,
alpha: color.alpha,
})
}
return rgb({ red: color.red, green: color.green, blue: color.blue })
}
throw new PolishedError(46)
}

10
VISUALIZACION/node_modules/polished/lib/color/rgba.d.ts generated vendored Executable file
View file

@ -0,0 +1,10 @@
import { RgbaColor } from '../types/color';
declare function rgba(
firstValue: RgbaColor | number | string,
secondValue?: number,
thirdValue?: number,
fourthValue?: number,
): string;
export default rgba;

54
VISUALIZACION/node_modules/polished/lib/color/rgba.js generated vendored Executable file
View file

@ -0,0 +1,54 @@
"use strict";
exports.__esModule = true;
exports["default"] = rgba;
var _parseToRgb = _interopRequireDefault(require("./parseToRgb"));
var _rgb = _interopRequireDefault(require("./rgb"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
*
* Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.
*
* @example
* // Styles as object usage
* const styles = {
* background: rgba(255, 205, 100, 0.7),
* background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),
* background: rgba(255, 205, 100, 1),
* background: rgba('#ffffff', 0.4),
* background: rgba('black', 0.7),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${rgba(255, 205, 100, 0.7)};
* background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};
* background: ${rgba(255, 205, 100, 1)};
* background: ${rgba('#ffffff', 0.4)};
* background: ${rgba('black', 0.7)};
* `
*
* // CSS in JS Output
*
* element {
* background: "rgba(255,205,100,0.7)";
* background: "rgba(255,205,100,0.7)";
* background: "#ffcd64";
* background: "rgba(255,255,255,0.4)";
* background: "rgba(0,0,0,0.7)";
* }
*/
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
if (typeof firstValue === 'string' && typeof secondValue === 'number') {
var rgbValue = (0, _parseToRgb["default"])(firstValue);
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
} else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {
return fourthValue >= 1 ? (0, _rgb["default"])(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
return firstValue.alpha >= 1 ? (0, _rgb["default"])(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
}
throw new _errors["default"](7);
}
module.exports = exports.default;

72
VISUALIZACION/node_modules/polished/lib/color/rgba.js.flow generated vendored Executable file
View file

@ -0,0 +1,72 @@
// @flow
import parseToRGB from './parseToRgb'
import rgb from './rgb'
import PolishedError from '../internalHelpers/_errors'
import type { RgbaColor } from '../types/color'
/**
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
*
* Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.
*
* @example
* // Styles as object usage
* const styles = {
* background: rgba(255, 205, 100, 0.7),
* background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),
* background: rgba(255, 205, 100, 1),
* background: rgba('#ffffff', 0.4),
* background: rgba('black', 0.7),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${rgba(255, 205, 100, 0.7)};
* background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};
* background: ${rgba(255, 205, 100, 1)};
* background: ${rgba('#ffffff', 0.4)};
* background: ${rgba('black', 0.7)};
* `
*
* // CSS in JS Output
*
* element {
* background: "rgba(255,205,100,0.7)";
* background: "rgba(255,205,100,0.7)";
* background: "#ffcd64";
* background: "rgba(255,255,255,0.4)";
* background: "rgba(0,0,0,0.7)";
* }
*/
export default function rgba(
firstValue: RgbaColor | number | string,
secondValue?: number,
thirdValue?: number,
fourthValue?: number,
): string {
if (typeof firstValue === 'string' && typeof secondValue === 'number') {
const rgbValue = parseToRGB(firstValue)
return `rgba(${rgbValue.red},${rgbValue.green},${rgbValue.blue},${secondValue})`
} else if (
typeof firstValue === 'number'
&& typeof secondValue === 'number'
&& typeof thirdValue === 'number'
&& typeof fourthValue === 'number'
) {
return fourthValue >= 1
? rgb(firstValue, secondValue, thirdValue)
: `rgba(${firstValue},${secondValue},${thirdValue},${fourthValue})`
} else if (
typeof firstValue === 'object'
&& secondValue === undefined
&& thirdValue === undefined
&& fourthValue === undefined
) {
return firstValue.alpha >= 1
? rgb(firstValue.red, firstValue.green, firstValue.blue)
: `rgba(${firstValue.red},${firstValue.green},${firstValue.blue},${firstValue.alpha})`
}
throw new PolishedError(7)
}

10
VISUALIZACION/node_modules/polished/lib/color/saturate.d.ts generated vendored Executable file
View file

@ -0,0 +1,10 @@
declare function curriedSaturateWith1(color: string): string;
declare function curriedSaturate(
amount: number | string,
): typeof curriedSaturateWith1;
declare function curriedSaturate(
amount: number | string,
color: string,
): string;
export default curriedSaturate;

47
VISUALIZACION/node_modules/polished/lib/color/saturate.js generated vendored Executable file
View file

@ -0,0 +1,47 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _guard = _interopRequireDefault(require("../internalHelpers/_guard"));
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Increases the intensity of a color. Its range is between 0 to 1. The first
* argument of the saturate function is the amount by how much the color
* intensity should be increased.
*
* @example
* // Styles as object usage
* const styles = {
* background: saturate(0.2, '#CCCD64'),
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${saturate(0.2, '#FFCD64')};
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#e0e250";
* background: "rgba(224,226,80,0.7)";
* }
*/
function saturate(amount, color) {
if (color === 'transparent') return color;
var hslColor = (0, _parseToHsl["default"])(color);
return (0, _toColorString["default"])(_extends({}, hslColor, {
saturation: (0, _guard["default"])(0, 1, hslColor.saturation + parseFloat(amount))
}));
}
// prettier-ignore
var curriedSaturate = (0, _curry["default"] /* ::<number | string, string, string> */)(saturate);
var _default = exports["default"] = curriedSaturate;
module.exports = exports.default;

View file

@ -0,0 +1,43 @@
// @flow
import curry from '../internalHelpers/_curry'
import guard from '../internalHelpers/_guard'
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Increases the intensity of a color. Its range is between 0 to 1. The first
* argument of the saturate function is the amount by how much the color
* intensity should be increased.
*
* @example
* // Styles as object usage
* const styles = {
* background: saturate(0.2, '#CCCD64'),
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${saturate(0.2, '#FFCD64')};
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#e0e250";
* background: "rgba(224,226,80,0.7)";
* }
*/
function saturate(amount: number | string, color: string): string {
if (color === 'transparent') return color
const hslColor = parseToHsl(color)
return toColorString({
...hslColor,
saturation: guard(0, 1, hslColor.saturation + parseFloat(amount)),
})
}
// prettier-ignore
const curriedSaturate = curry/* ::<number | string, string, string> */(saturate)
export default curriedSaturate

5
VISUALIZACION/node_modules/polished/lib/color/setHue.d.ts generated vendored Executable file
View file

@ -0,0 +1,5 @@
declare function curriedSetHueWith1(color: string): string;
declare function curriedSetHue(hue: number | string): typeof curriedSetHueWith1;
declare function curriedSetHue(hue: number | string, color: string): string;
export default curriedSetHue;

43
VISUALIZACION/node_modules/polished/lib/color/setHue.js generated vendored Executable file
View file

@ -0,0 +1,43 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Sets the hue of a color to the provided value. The hue range can be
* from 0 and 359.
*
* @example
* // Styles as object usage
* const styles = {
* background: setHue(42, '#CCCD64'),
* background: setHue('244', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${setHue(42, '#CCCD64')};
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#cdae64";
* background: "rgba(107,100,205,0.7)";
* }
*/
function setHue(hue, color) {
if (color === 'transparent') return color;
return (0, _toColorString["default"])(_extends({}, (0, _parseToHsl["default"])(color), {
hue: parseFloat(hue)
}));
}
// prettier-ignore
var curriedSetHue = (0, _curry["default"] /* ::<number | string, string, string> */)(setHue);
var _default = exports["default"] = curriedSetHue;
module.exports = exports.default;

39
VISUALIZACION/node_modules/polished/lib/color/setHue.js.flow generated vendored Executable file
View file

@ -0,0 +1,39 @@
// @flow
import curry from '../internalHelpers/_curry'
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Sets the hue of a color to the provided value. The hue range can be
* from 0 and 359.
*
* @example
* // Styles as object usage
* const styles = {
* background: setHue(42, '#CCCD64'),
* background: setHue('244', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${setHue(42, '#CCCD64')};
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#cdae64";
* background: "rgba(107,100,205,0.7)";
* }
*/
function setHue(hue: number | string, color: string): string {
if (color === 'transparent') return color
return toColorString({
...parseToHsl(color),
hue: parseFloat(hue),
})
}
// prettier-ignore
const curriedSetHue = curry/* ::<number | string, string, string> */(setHue)
export default curriedSetHue

View file

@ -0,0 +1,10 @@
declare function curriedSetLightnessWith1(color: string): string;
declare function curriedSetLightness(
lightness: number | string,
): typeof curriedSetLightnessWith1;
declare function curriedSetLightness(
lightness: number | string,
color: string,
): string;
export default curriedSetLightness;

View file

@ -0,0 +1,43 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Sets the lightness of a color to the provided value. The lightness range can be
* from 0 and 1.
*
* @example
* // Styles as object usage
* const styles = {
* background: setLightness(0.2, '#CCCD64'),
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${setLightness(0.2, '#CCCD64')};
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#4d4d19";
* background: "rgba(223,224,159,0.7)";
* }
*/
function setLightness(lightness, color) {
if (color === 'transparent') return color;
return (0, _toColorString["default"])(_extends({}, (0, _parseToHsl["default"])(color), {
lightness: parseFloat(lightness)
}));
}
// prettier-ignore
var curriedSetLightness = (0, _curry["default"] /* ::<number | string, string, string> */)(setLightness);
var _default = exports["default"] = curriedSetLightness;
module.exports = exports.default;

View file

@ -0,0 +1,39 @@
// @flow
import curry from '../internalHelpers/_curry'
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Sets the lightness of a color to the provided value. The lightness range can be
* from 0 and 1.
*
* @example
* // Styles as object usage
* const styles = {
* background: setLightness(0.2, '#CCCD64'),
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${setLightness(0.2, '#CCCD64')};
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#4d4d19";
* background: "rgba(223,224,159,0.7)";
* }
*/
function setLightness(lightness: number | string, color: string): string {
if (color === 'transparent') return color
return toColorString({
...parseToHsl(color),
lightness: parseFloat(lightness),
})
}
// prettier-ignore
const curriedSetLightness = curry/* ::<number | string, string, string> */(setLightness)
export default curriedSetLightness

View file

@ -0,0 +1,10 @@
declare function curriedSetSaturationWith1(color: string): string;
declare function curriedSetSaturation(
saturation: number | string,
): typeof curriedSetSaturationWith1;
declare function curriedSetSaturation(
saturation: number | string,
color: string,
): string;
export default curriedSetSaturation;

View file

@ -0,0 +1,43 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _parseToHsl = _interopRequireDefault(require("./parseToHsl"));
var _toColorString = _interopRequireDefault(require("./toColorString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Sets the saturation of a color to the provided value. The saturation range can be
* from 0 and 1.
*
* @example
* // Styles as object usage
* const styles = {
* background: setSaturation(0.2, '#CCCD64'),
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${setSaturation(0.2, '#CCCD64')};
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#adad84";
* background: "rgba(228,229,76,0.7)";
* }
*/
function setSaturation(saturation, color) {
if (color === 'transparent') return color;
return (0, _toColorString["default"])(_extends({}, (0, _parseToHsl["default"])(color), {
saturation: parseFloat(saturation)
}));
}
// prettier-ignore
var curriedSetSaturation = (0, _curry["default"] /* ::<number | string, string, string> */)(setSaturation);
var _default = exports["default"] = curriedSetSaturation;
module.exports = exports.default;

View file

@ -0,0 +1,39 @@
// @flow
import curry from '../internalHelpers/_curry'
import parseToHsl from './parseToHsl'
import toColorString from './toColorString'
/**
* Sets the saturation of a color to the provided value. The saturation range can be
* from 0 and 1.
*
* @example
* // Styles as object usage
* const styles = {
* background: setSaturation(0.2, '#CCCD64'),
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${setSaturation(0.2, '#CCCD64')};
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
* `
*
* // CSS in JS Output
* element {
* background: "#adad84";
* background: "rgba(228,229,76,0.7)";
* }
*/
function setSaturation(saturation: number | string, color: string): string {
if (color === 'transparent') return color
return toColorString({
...parseToHsl(color),
saturation: parseFloat(saturation),
})
}
// prettier-ignore
const curriedSetSaturation = curry/* ::<number | string, string, string> */(setSaturation)
export default curriedSetSaturation

10
VISUALIZACION/node_modules/polished/lib/color/shade.d.ts generated vendored Executable file
View file

@ -0,0 +1,10 @@
declare function curriedShadeWith1(color: string): string;
declare function curriedShade(
percentage: number | string,
): typeof curriedShadeWith1;
declare function curriedShade(
percentage: number | string,
color: string,
): string;
export default curriedShade;

38
VISUALIZACION/node_modules/polished/lib/color/shade.js generated vendored Executable file
View file

@ -0,0 +1,38 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _mix = _interopRequireDefault(require("./mix"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Shades a color by mixing it with black. `shade` can produce
* hue shifts, where as `darken` manipulates the luminance channel and therefore
* doesn't produce hue shifts.
*
* @example
* // Styles as object usage
* const styles = {
* background: shade(0.25, '#00f')
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${shade(0.25, '#00f')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#00003f";
* }
*/
function shade(percentage, color) {
if (color === 'transparent') return color;
return (0, _mix["default"])(parseFloat(percentage), 'rgb(0, 0, 0)', color);
}
// prettier-ignore
var curriedShade = (0, _curry["default"] /* ::<number | string, string, string> */)(shade);
var _default = exports["default"] = curriedShade;
module.exports = exports.default;

35
VISUALIZACION/node_modules/polished/lib/color/shade.js.flow generated vendored Executable file
View file

@ -0,0 +1,35 @@
// @flow
import curry from '../internalHelpers/_curry'
import mix from './mix'
/**
* Shades a color by mixing it with black. `shade` can produce
* hue shifts, where as `darken` manipulates the luminance channel and therefore
* doesn't produce hue shifts.
*
* @example
* // Styles as object usage
* const styles = {
* background: shade(0.25, '#00f')
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${shade(0.25, '#00f')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#00003f";
* }
*/
function shade(percentage: number | string, color: string): string {
if (color === 'transparent') return color
return mix(parseFloat(percentage), 'rgb(0, 0, 0)', color)
}
// prettier-ignore
const curriedShade = curry/* ::<number | string, string, string> */(shade)
export default curriedShade

10
VISUALIZACION/node_modules/polished/lib/color/tint.d.ts generated vendored Executable file
View file

@ -0,0 +1,10 @@
declare function curriedTintWith1(color: string): string;
declare function curriedTint(
percentage: number | string,
): typeof curriedTintWith1;
declare function curriedTint(
percentage: number | string,
color: string,
): string;
export default curriedTint;

38
VISUALIZACION/node_modules/polished/lib/color/tint.js generated vendored Executable file
View file

@ -0,0 +1,38 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _mix = _interopRequireDefault(require("./mix"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/**
* Tints a color by mixing it with white. `tint` can produce
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
* doesn't produce hue shifts.
*
* @example
* // Styles as object usage
* const styles = {
* background: tint(0.25, '#00f')
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${tint(0.25, '#00f')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#bfbfff";
* }
*/
function tint(percentage, color) {
if (color === 'transparent') return color;
return (0, _mix["default"])(parseFloat(percentage), 'rgb(255, 255, 255)', color);
}
// prettier-ignore
var curriedTint = (0, _curry["default"] /* ::<number | string, string, string> */)(tint);
var _default = exports["default"] = curriedTint;
module.exports = exports.default;

35
VISUALIZACION/node_modules/polished/lib/color/tint.js.flow generated vendored Executable file
View file

@ -0,0 +1,35 @@
// @flow
import curry from '../internalHelpers/_curry'
import mix from './mix'
/**
* Tints a color by mixing it with white. `tint` can produce
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
* doesn't produce hue shifts.
*
* @example
* // Styles as object usage
* const styles = {
* background: tint(0.25, '#00f')
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${tint(0.25, '#00f')};
* `
*
* // CSS in JS Output
*
* element {
* background: "#bfbfff";
* }
*/
function tint(percentage: number | string, color: string): string {
if (color === 'transparent') return color
return mix(parseFloat(percentage), 'rgb(255, 255, 255)', color)
}
// prettier-ignore
const curriedTint = curry/* ::<number | string, string, string> */(tint)
export default curriedTint

View file

@ -0,0 +1,3 @@
declare function toColorString(color: Object): string;
export default toColorString;

View file

@ -0,0 +1,63 @@
"use strict";
exports.__esModule = true;
exports["default"] = toColorString;
var _hsl = _interopRequireDefault(require("./hsl"));
var _hsla = _interopRequireDefault(require("./hsla"));
var _rgb = _interopRequireDefault(require("./rgb"));
var _rgba = _interopRequireDefault(require("./rgba"));
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var isRgb = function isRgb(color) {
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
};
var isRgba = function isRgba(color) {
return typeof color.red === 'number' && typeof color.green === 'number' && typeof color.blue === 'number' && typeof color.alpha === 'number';
};
var isHsl = function isHsl(color) {
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined');
};
var isHsla = function isHsla(color) {
return typeof color.hue === 'number' && typeof color.saturation === 'number' && typeof color.lightness === 'number' && typeof color.alpha === 'number';
};
/**
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
* This util is useful in case you only know on runtime which color object is
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
*
* @example
* // Styles as object usage
* const styles = {
* background: toColorString({ red: 255, green: 205, blue: 100 }),
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
* `
*
* // CSS in JS Output
* element {
* background: "#ffcd64";
* background: "rgba(255,205,100,0.72)";
* background: "#00f";
* background: "rgba(179,25,25,0.72)";
* }
*/
function toColorString(color) {
if (typeof color !== 'object') throw new _errors["default"](8);
if (isRgba(color)) return (0, _rgba["default"])(color);
if (isRgb(color)) return (0, _rgb["default"])(color);
if (isHsla(color)) return (0, _hsla["default"])(color);
if (isHsl(color)) return (0, _hsl["default"])(color);
throw new _errors["default"](8);
}
module.exports = exports.default;

View file

@ -0,0 +1,67 @@
// @flow
import hsl from './hsl'
import hsla from './hsla'
import rgb from './rgb'
import rgba from './rgba'
import PolishedError from '../internalHelpers/_errors'
const isRgb = (color: Object): boolean => typeof color.red === 'number'
&& typeof color.green === 'number'
&& typeof color.blue === 'number'
&& (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined')
const isRgba = (color: Object): boolean => typeof color.red === 'number'
&& typeof color.green === 'number'
&& typeof color.blue === 'number'
&& typeof color.alpha === 'number'
const isHsl = (color: Object): boolean => typeof color.hue === 'number'
&& typeof color.saturation === 'number'
&& typeof color.lightness === 'number'
&& (typeof color.alpha !== 'number' || typeof color.alpha === 'undefined')
const isHsla = (color: Object): boolean => typeof color.hue === 'number'
&& typeof color.saturation === 'number'
&& typeof color.lightness === 'number'
&& typeof color.alpha === 'number'
/**
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
* This util is useful in case you only know on runtime which color object is
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
*
* @example
* // Styles as object usage
* const styles = {
* background: toColorString({ red: 255, green: 205, blue: 100 }),
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
* `
*
* // CSS in JS Output
* element {
* background: "#ffcd64";
* background: "rgba(255,205,100,0.72)";
* background: "#00f";
* background: "rgba(179,25,25,0.72)";
* }
*/
export default function toColorString(color: Object): string {
if (typeof color !== 'object') throw new PolishedError(8)
if (isRgba(color)) return rgba(color)
if (isRgb(color)) return rgb(color)
if (isHsla(color)) return hsla(color)
if (isHsl(color)) return hsl(color)
throw new PolishedError(8)
}

View file

@ -0,0 +1,10 @@
declare function curriedTransparentizeWith1(color: string): string;
declare function curriedTransparentize(
amount: number | string,
): typeof curriedTransparentizeWith1;
declare function curriedTransparentize(
amount: number | string,
color: string,
): string;
export default curriedTransparentize;

View file

@ -0,0 +1,51 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _curry = _interopRequireDefault(require("../internalHelpers/_curry"));
var _guard = _interopRequireDefault(require("../internalHelpers/_guard"));
var _rgba = _interopRequireDefault(require("./rgba"));
var _parseToRgb = _interopRequireDefault(require("./parseToRgb"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
/**
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
*
*
* @example
* // Styles as object usage
* const styles = {
* background: transparentize(0.1, '#fff'),
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${transparentize(0.1, '#fff')};
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "rgba(255,255,255,0.9)";
* background: "rgba(255,255,255,0.8)";
* background: "rgba(255,0,0,0.3)";
* }
*/
function transparentize(amount, color) {
if (color === 'transparent') return color;
var parsedColor = (0, _parseToRgb["default"])(color);
var alpha = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1;
var colorWithAlpha = _extends({}, parsedColor, {
alpha: (0, _guard["default"])(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
});
return (0, _rgba["default"])(colorWithAlpha);
}
// prettier-ignore
var curriedTransparentize = (0, _curry["default"] /* ::<number | string, string, string> */)(transparentize);
var _default = exports["default"] = curriedTransparentize;
module.exports = exports.default;

View file

@ -0,0 +1,49 @@
// @flow
import curry from '../internalHelpers/_curry'
import guard from '../internalHelpers/_guard'
import rgba from './rgba'
import parseToRgb from './parseToRgb'
/**
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
*
*
* @example
* // Styles as object usage
* const styles = {
* background: transparentize(0.1, '#fff'),
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${transparentize(0.1, '#fff')};
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
* `
*
* // CSS in JS Output
*
* element {
* background: "rgba(255,255,255,0.9)";
* background: "rgba(255,255,255,0.8)";
* background: "rgba(255,0,0,0.3)";
* }
*/
function transparentize(amount: number | string, color: string): string {
if (color === 'transparent') return color
const parsedColor = parseToRgb(color)
const alpha: number = typeof parsedColor.alpha === 'number' ? parsedColor.alpha : 1
const colorWithAlpha = {
...parsedColor,
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100),
}
return rgba(colorWithAlpha)
}
// prettier-ignore
const curriedTransparentize = curry/* ::<number | string, string, string> */(
transparentize,
)
export default curriedTransparentize

View file

@ -0,0 +1,5 @@
import { TimingFunction } from '../types/timingFunction';
declare function easeIn(functionName: string): TimingFunction;
export default easeIn;

39
VISUALIZACION/node_modules/polished/lib/easings/easeIn.js generated vendored Executable file
View file

@ -0,0 +1,39 @@
"use strict";
exports.__esModule = true;
exports["default"] = easeIn;
var functionsMap = {
back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',
circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',
cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',
expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',
quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',
quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',
sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)'
};
/**
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
*
* @example
* // Styles as object usage
* const styles = {
* 'transitionTimingFunction': easeIn('quad')
* }
*
* // styled-components usage
* const div = styled.div`
* transitionTimingFunction: ${easeIn('quad')};
* `
*
* // CSS as JS Output
*
* 'div': {
* 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
* }
*/
function easeIn(functionName) {
return functionsMap[functionName.toLowerCase().trim()];
}
module.exports = exports.default;

View file

@ -0,0 +1,37 @@
// @flow
import type { TimingFunction } from '../types/timingFunction'
const functionsMap = {
back: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',
circ: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',
cubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',
expo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',
quad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
quart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',
quint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',
sine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',
}
/**
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
*
* @example
* // Styles as object usage
* const styles = {
* 'transitionTimingFunction': easeIn('quad')
* }
*
* // styled-components usage
* const div = styled.div`
* transitionTimingFunction: ${easeIn('quad')};
* `
*
* // CSS as JS Output
*
* 'div': {
* 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
* }
*/
export default function easeIn(functionName: string): TimingFunction {
return functionsMap[functionName.toLowerCase().trim()]
}

View file

@ -0,0 +1,5 @@
import { TimingFunction } from '../types/timingFunction';
declare function easeInOut(functionName: string): TimingFunction;
export default easeInOut;

39
VISUALIZACION/node_modules/polished/lib/easings/easeInOut.js generated vendored Executable file
View file

@ -0,0 +1,39 @@
"use strict";
exports.__esModule = true;
exports["default"] = easeInOut;
var functionsMap = {
back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',
circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',
cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',
expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',
quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',
quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',
sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'
};
/**
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
*
* @example
* // Styles as object usage
* const styles = {
* 'transitionTimingFunction': easeInOut('quad')
* }
*
* // styled-components usage
* const div = styled.div`
* transitionTimingFunction: ${easeInOut('quad')};
* `
*
* // CSS as JS Output
*
* 'div': {
* 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
* }
*/
function easeInOut(functionName) {
return functionsMap[functionName.toLowerCase().trim()];
}
module.exports = exports.default;

View file

@ -0,0 +1,37 @@
// @flow
import type { TimingFunction } from '../types/timingFunction'
const functionsMap = {
back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',
circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',
cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',
expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',
quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',
quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',
sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)',
}
/**
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
*
* @example
* // Styles as object usage
* const styles = {
* 'transitionTimingFunction': easeInOut('quad')
* }
*
* // styled-components usage
* const div = styled.div`
* transitionTimingFunction: ${easeInOut('quad')};
* `
*
* // CSS as JS Output
*
* 'div': {
* 'transitionTimingFunction': 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
* }
*/
export default function easeInOut(functionName: string): TimingFunction {
return functionsMap[functionName.toLowerCase().trim()]
}

View file

@ -0,0 +1,5 @@
import { TimingFunction } from '../types/timingFunction';
declare function easeOut(functionName: string): TimingFunction;
export default easeOut;

39
VISUALIZACION/node_modules/polished/lib/easings/easeOut.js generated vendored Executable file
View file

@ -0,0 +1,39 @@
"use strict";
exports.__esModule = true;
exports["default"] = easeOut;
var functionsMap = {
back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',
cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',
expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',
quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',
sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)'
};
/**
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
*
* @example
* // Styles as object usage
* const styles = {
* 'transitionTimingFunction': easeOut('quad')
* }
*
* // styled-components usage
* const div = styled.div`
* transitionTimingFunction: ${easeOut('quad')};
* `
*
* // CSS as JS Output
*
* 'div': {
* 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
* }
*/
function easeOut(functionName) {
return functionsMap[functionName.toLowerCase().trim()];
}
module.exports = exports.default;

View file

@ -0,0 +1,37 @@
// @flow
import type { TimingFunction } from '../types/timingFunction'
const functionsMap = {
back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',
cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',
expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',
quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',
sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',
}
/**
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
*
* @example
* // Styles as object usage
* const styles = {
* 'transitionTimingFunction': easeOut('quad')
* }
*
* // styled-components usage
* const div = styled.div`
* transitionTimingFunction: ${easeOut('quad')};
* `
*
* // CSS as JS Output
*
* 'div': {
* 'transitionTimingFunction': 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
* }
*/
export default function easeOut(functionName: string): TimingFunction {
return functionsMap[functionName.toLowerCase().trim()]
}

View file

@ -0,0 +1,6 @@
declare function cssVar(
cssVariable: string,
defaultValue?: string | number,
): string | number;
export default cssVar;

49
VISUALIZACION/node_modules/polished/lib/helpers/cssVar.js generated vendored Executable file
View file

@ -0,0 +1,49 @@
"use strict";
exports.__esModule = true;
exports["default"] = cssVar;
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var cssVariableRegex = /--[\S]*/g;
/**
* Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.
*
* @example
* // Styles as object usage
* const styles = {
* 'background': cssVar('--background-color'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${cssVar('--background-color')};
* `
*
* // CSS in JS Output
*
* element {
* 'background': 'red'
* }
*/
function cssVar(cssVariable, defaultValue) {
if (!cssVariable || !cssVariable.match(cssVariableRegex)) {
throw new _errors["default"](73);
}
var variableValue;
/* eslint-disable */
/* istanbul ignore next */
if (typeof document !== 'undefined' && document.documentElement !== null) {
variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable);
}
/* eslint-enable */
if (variableValue) {
return variableValue.trim();
} else if (defaultValue) {
return defaultValue;
}
throw new _errors["default"](74);
}
module.exports = exports.default;

View file

@ -0,0 +1,50 @@
// @flow
import PolishedError from '../internalHelpers/_errors'
const cssVariableRegex = /--[\S]*/g
/**
* Fetches the value of a passed CSS Variable in the :root scope, or otherwise returns a defaultValue if provided.
*
* @example
* // Styles as object usage
* const styles = {
* 'background': cssVar('--background-color'),
* }
*
* // styled-components usage
* const div = styled.div`
* background: ${cssVar('--background-color')};
* `
*
* // CSS in JS Output
*
* element {
* 'background': 'red'
* }
*/
export default function cssVar(
cssVariable: string,
defaultValue?: string | number,
): string | number {
if (!cssVariable || !cssVariable.match(cssVariableRegex)) {
throw new PolishedError(73)
}
let variableValue
/* eslint-disable */
/* istanbul ignore next */
if (typeof document !== 'undefined' && document.documentElement !== null) {
variableValue = getComputedStyle(document.documentElement).getPropertyValue(cssVariable)
}
/* eslint-enable */
if (variableValue) {
return variableValue.trim()
} else if (defaultValue) {
return defaultValue
}
throw new PolishedError(74)
}

View file

@ -0,0 +1,8 @@
import { Styles } from '../types/style';
declare function directionalProperty(
property: string,
...values: Array<null | void | string | null | void | number>
): Styles;
export default directionalProperty;

Some files were not shown because too many files have changed in this diff Show more