flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
8
VISUALIZACION/node_modules/polished/lib/mixins/between.d.ts
generated
vendored
Executable file
8
VISUALIZACION/node_modules/polished/lib/mixins/between.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
declare function between(
|
||||
fromSize: string | number,
|
||||
toSize: string | number,
|
||||
minScreen?: string,
|
||||
maxScreen?: string,
|
||||
): string;
|
||||
|
||||
export default between;
|
||||
63
VISUALIZACION/node_modules/polished/lib/mixins/between.js
generated
vendored
Executable file
63
VISUALIZACION/node_modules/polished/lib/mixins/between.js
generated
vendored
Executable file
|
|
@ -0,0 +1,63 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = between;
|
||||
var _getValueAndUnit5 = _interopRequireDefault(require("../helpers/getValueAndUnit"));
|
||||
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
/**
|
||||
* Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* fontSize: between('20px', '100px', '400px', '1000px'),
|
||||
* fontSize: between('20px', '100px')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* fontSize: ${between('20px', '100px', '400px', '1000px')};
|
||||
* fontSize: ${between('20px', '100px')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* h1: {
|
||||
* 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',
|
||||
* 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'
|
||||
* }
|
||||
*/
|
||||
function between(fromSize, toSize, minScreen, maxScreen) {
|
||||
if (minScreen === void 0) {
|
||||
minScreen = '320px';
|
||||
}
|
||||
if (maxScreen === void 0) {
|
||||
maxScreen = '1200px';
|
||||
}
|
||||
var _getValueAndUnit = (0, _getValueAndUnit5["default"])(fromSize),
|
||||
unitlessFromSize = _getValueAndUnit[0],
|
||||
fromSizeUnit = _getValueAndUnit[1];
|
||||
var _getValueAndUnit2 = (0, _getValueAndUnit5["default"])(toSize),
|
||||
unitlessToSize = _getValueAndUnit2[0],
|
||||
toSizeUnit = _getValueAndUnit2[1];
|
||||
var _getValueAndUnit3 = (0, _getValueAndUnit5["default"])(minScreen),
|
||||
unitlessMinScreen = _getValueAndUnit3[0],
|
||||
minScreenUnit = _getValueAndUnit3[1];
|
||||
var _getValueAndUnit4 = (0, _getValueAndUnit5["default"])(maxScreen),
|
||||
unitlessMaxScreen = _getValueAndUnit4[0],
|
||||
maxScreenUnit = _getValueAndUnit4[1];
|
||||
if (typeof unitlessMinScreen !== 'number' || typeof unitlessMaxScreen !== 'number' || !minScreenUnit || !maxScreenUnit || minScreenUnit !== maxScreenUnit) {
|
||||
throw new _errors["default"](47);
|
||||
}
|
||||
if (typeof unitlessFromSize !== 'number' || typeof unitlessToSize !== 'number' || fromSizeUnit !== toSizeUnit) {
|
||||
throw new _errors["default"](48);
|
||||
}
|
||||
if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {
|
||||
throw new _errors["default"](76);
|
||||
}
|
||||
var slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen);
|
||||
var base = unitlessToSize - slope * unitlessMaxScreen;
|
||||
return "calc(" + base.toFixed(2) + (fromSizeUnit || '') + " + " + (100 * slope).toFixed(2) + "vw)";
|
||||
}
|
||||
module.exports = exports.default;
|
||||
64
VISUALIZACION/node_modules/polished/lib/mixins/between.js.flow
generated
vendored
Executable file
64
VISUALIZACION/node_modules/polished/lib/mixins/between.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
// @flow
|
||||
import getValueAndUnit from '../helpers/getValueAndUnit'
|
||||
import PolishedError from '../internalHelpers/_errors'
|
||||
|
||||
/**
|
||||
* Returns a CSS calc formula for linear interpolation of a property between two values. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px').
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* fontSize: between('20px', '100px', '400px', '1000px'),
|
||||
* fontSize: between('20px', '100px')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* fontSize: ${between('20px', '100px', '400px', '1000px')};
|
||||
* fontSize: ${between('20px', '100px')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* h1: {
|
||||
* 'fontSize': 'calc(-33.33333333333334px + 13.333333333333334vw)',
|
||||
* 'fontSize': 'calc(-9.090909090909093px + 9.090909090909092vw)'
|
||||
* }
|
||||
*/
|
||||
export default function between(
|
||||
fromSize: string | number,
|
||||
toSize: string | number,
|
||||
minScreen?: string = '320px',
|
||||
maxScreen?: string = '1200px',
|
||||
): string {
|
||||
const [unitlessFromSize, fromSizeUnit] = getValueAndUnit(fromSize)
|
||||
const [unitlessToSize, toSizeUnit] = getValueAndUnit(toSize)
|
||||
const [unitlessMinScreen, minScreenUnit] = getValueAndUnit(minScreen)
|
||||
const [unitlessMaxScreen, maxScreenUnit] = getValueAndUnit(maxScreen)
|
||||
|
||||
if (
|
||||
typeof unitlessMinScreen !== 'number'
|
||||
|| typeof unitlessMaxScreen !== 'number'
|
||||
|| !minScreenUnit
|
||||
|| !maxScreenUnit
|
||||
|| minScreenUnit !== maxScreenUnit
|
||||
) {
|
||||
throw new PolishedError(47)
|
||||
}
|
||||
|
||||
if (
|
||||
typeof unitlessFromSize !== 'number'
|
||||
|| typeof unitlessToSize !== 'number'
|
||||
|| fromSizeUnit !== toSizeUnit
|
||||
) {
|
||||
throw new PolishedError(48)
|
||||
}
|
||||
|
||||
if (fromSizeUnit !== minScreenUnit || toSizeUnit !== maxScreenUnit) {
|
||||
throw new PolishedError(76)
|
||||
}
|
||||
|
||||
const slope = (unitlessFromSize - unitlessToSize) / (unitlessMinScreen - unitlessMaxScreen)
|
||||
const base = unitlessToSize - slope * unitlessMaxScreen
|
||||
return `calc(${base.toFixed(2)}${fromSizeUnit || ''} + ${(100 * slope).toFixed(2)}vw)`
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.d.ts
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function clearFix(parent?: string): Styles;
|
||||
|
||||
export default clearFix;
|
||||
39
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.js
generated
vendored
Executable file
39
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.js
generated
vendored
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = clearFix;
|
||||
/**
|
||||
* CSS to contain a float (credit to CSSMojo).
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...clearFix(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${clearFix()}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* '&::after': {
|
||||
* 'clear': 'both',
|
||||
* 'content': '""',
|
||||
* 'display': 'table'
|
||||
* }
|
||||
*/
|
||||
function clearFix(parent) {
|
||||
var _ref;
|
||||
if (parent === void 0) {
|
||||
parent = '&';
|
||||
}
|
||||
var pseudoSelector = parent + "::after";
|
||||
return _ref = {}, _ref[pseudoSelector] = {
|
||||
clear: 'both',
|
||||
content: '""',
|
||||
display: 'table'
|
||||
}, _ref;
|
||||
}
|
||||
module.exports = exports.default;
|
||||
35
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.js.flow
generated
vendored
Executable file
35
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS to contain a float (credit to CSSMojo).
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...clearFix(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${clearFix()}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* '&::after': {
|
||||
* 'clear': 'both',
|
||||
* 'content': '""',
|
||||
* 'display': 'table'
|
||||
* }
|
||||
*/
|
||||
export default function clearFix(parent?: string = '&'): Styles {
|
||||
const pseudoSelector = `${parent}::after`
|
||||
return {
|
||||
[pseudoSelector]: {
|
||||
clear: 'both',
|
||||
content: '""',
|
||||
display: 'table',
|
||||
},
|
||||
}
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/lib/mixins/cover.d.ts
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/lib/mixins/cover.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function cover(offset?: number | string): Styles;
|
||||
|
||||
export default cover;
|
||||
41
VISUALIZACION/node_modules/polished/lib/mixins/cover.js
generated
vendored
Executable file
41
VISUALIZACION/node_modules/polished/lib/mixins/cover.js
generated
vendored
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = cover;
|
||||
/**
|
||||
* CSS to fully cover an area. Can optionally be passed an offset to act as a "padding".
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...cover()
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${cover()}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'position': 'absolute',
|
||||
* 'top': '0',
|
||||
* 'right: '0',
|
||||
* 'bottom': '0',
|
||||
* 'left: '0'
|
||||
* }
|
||||
*/
|
||||
function cover(offset) {
|
||||
if (offset === void 0) {
|
||||
offset = 0;
|
||||
}
|
||||
return {
|
||||
position: 'absolute',
|
||||
top: offset,
|
||||
right: offset,
|
||||
bottom: offset,
|
||||
left: offset
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
36
VISUALIZACION/node_modules/polished/lib/mixins/cover.js.flow
generated
vendored
Executable file
36
VISUALIZACION/node_modules/polished/lib/mixins/cover.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS to fully cover an area. Can optionally be passed an offset to act as a "padding".
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...cover()
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${cover()}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'position': 'absolute',
|
||||
* 'top': '0',
|
||||
* 'right: '0',
|
||||
* 'bottom': '0',
|
||||
* 'left: '0'
|
||||
* }
|
||||
*/
|
||||
export default function cover(offset?: number | string = 0): Styles {
|
||||
return {
|
||||
position: 'absolute',
|
||||
top: offset,
|
||||
right: offset,
|
||||
bottom: offset,
|
||||
left: offset,
|
||||
}
|
||||
}
|
||||
8
VISUALIZACION/node_modules/polished/lib/mixins/ellipsis.d.ts
generated
vendored
Executable file
8
VISUALIZACION/node_modules/polished/lib/mixins/ellipsis.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function ellipsis(
|
||||
width?: null | void | string | null | void | number,
|
||||
lines?: number,
|
||||
): Styles;
|
||||
|
||||
export default ellipsis;
|
||||
50
VISUALIZACION/node_modules/polished/lib/mixins/ellipsis.js
generated
vendored
Executable file
50
VISUALIZACION/node_modules/polished/lib/mixins/ellipsis.js
generated
vendored
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = ellipsis;
|
||||
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); }
|
||||
/**
|
||||
* CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...ellipsis('250px')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${ellipsis('250px')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'display': 'inline-block',
|
||||
* 'maxWidth': '250px',
|
||||
* 'overflow': 'hidden',
|
||||
* 'textOverflow': 'ellipsis',
|
||||
* 'whiteSpace': 'nowrap',
|
||||
* 'wordWrap': 'normal'
|
||||
* }
|
||||
*/
|
||||
function ellipsis(width, lines) {
|
||||
if (lines === void 0) {
|
||||
lines = 1;
|
||||
}
|
||||
var styles = {
|
||||
display: 'inline-block',
|
||||
maxWidth: width || '100%',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
wordWrap: 'normal'
|
||||
};
|
||||
return lines > 1 ? _extends({}, styles, {
|
||||
WebkitBoxOrient: 'vertical',
|
||||
WebkitLineClamp: lines,
|
||||
display: '-webkit-box',
|
||||
whiteSpace: 'normal'
|
||||
}) : styles;
|
||||
}
|
||||
module.exports = exports.default;
|
||||
48
VISUALIZACION/node_modules/polished/lib/mixins/ellipsis.js.flow
generated
vendored
Executable file
48
VISUALIZACION/node_modules/polished/lib/mixins/ellipsis.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS to represent truncated text with an ellipsis. You can optionally pass a max-width and number of lines before truncating.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...ellipsis('250px')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${ellipsis('250px')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'display': 'inline-block',
|
||||
* 'maxWidth': '250px',
|
||||
* 'overflow': 'hidden',
|
||||
* 'textOverflow': 'ellipsis',
|
||||
* 'whiteSpace': 'nowrap',
|
||||
* 'wordWrap': 'normal'
|
||||
* }
|
||||
*/
|
||||
export default function ellipsis(width?: ?string | ?number, lines?: number = 1): Styles {
|
||||
const styles = {
|
||||
display: 'inline-block',
|
||||
maxWidth: width || '100%',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
wordWrap: 'normal',
|
||||
}
|
||||
|
||||
return lines > 1
|
||||
? {
|
||||
...styles,
|
||||
WebkitBoxOrient: 'vertical',
|
||||
WebkitLineClamp: lines,
|
||||
display: '-webkit-box',
|
||||
whiteSpace: 'normal',
|
||||
}
|
||||
: styles
|
||||
}
|
||||
10
VISUALIZACION/node_modules/polished/lib/mixins/fluidRange.d.ts
generated
vendored
Executable file
10
VISUALIZACION/node_modules/polished/lib/mixins/fluidRange.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
import { FluidRangeConfiguration } from '../types/fluidRangeConfiguration';
|
||||
import { Styles } from '../types/style';
|
||||
|
||||
declare function fluidRange(
|
||||
cssProp: Array<FluidRangeConfiguration> | FluidRangeConfiguration,
|
||||
minScreen?: string,
|
||||
maxScreen?: string,
|
||||
): Styles;
|
||||
|
||||
export default fluidRange;
|
||||
86
VISUALIZACION/node_modules/polished/lib/mixins/fluidRange.js
generated
vendored
Executable file
86
VISUALIZACION/node_modules/polished/lib/mixins/fluidRange.js
generated
vendored
Executable file
|
|
@ -0,0 +1,86 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = fluidRange;
|
||||
var _between = _interopRequireDefault(require("./between"));
|
||||
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
||||
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); }
|
||||
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
||||
/**
|
||||
* Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...fluidRange(
|
||||
* {
|
||||
* prop: 'padding',
|
||||
* fromSize: '20px',
|
||||
* toSize: '100px',
|
||||
* },
|
||||
* '400px',
|
||||
* '1000px',
|
||||
* )
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${fluidRange(
|
||||
* {
|
||||
* prop: 'padding',
|
||||
* fromSize: '20px',
|
||||
* toSize: '100px',
|
||||
* },
|
||||
* '400px',
|
||||
* '1000px',
|
||||
* )}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* "@media (min-width: 1000px)": Object {
|
||||
* "padding": "100px",
|
||||
* },
|
||||
* "@media (min-width: 400px)": Object {
|
||||
* "padding": "calc(-33.33333333333334px + 13.333333333333334vw)",
|
||||
* },
|
||||
* "padding": "20px",
|
||||
* }
|
||||
*/
|
||||
function fluidRange(cssProp, minScreen, maxScreen) {
|
||||
if (minScreen === void 0) {
|
||||
minScreen = '320px';
|
||||
}
|
||||
if (maxScreen === void 0) {
|
||||
maxScreen = '1200px';
|
||||
}
|
||||
if (!Array.isArray(cssProp) && typeof cssProp !== 'object' || cssProp === null) {
|
||||
throw new _errors["default"](49);
|
||||
}
|
||||
if (Array.isArray(cssProp)) {
|
||||
var mediaQueries = {};
|
||||
var fallbacks = {};
|
||||
for (var _iterator = _createForOfIteratorHelperLoose(cssProp), _step; !(_step = _iterator()).done;) {
|
||||
var _extends2, _extends3;
|
||||
var obj = _step.value;
|
||||
if (!obj.prop || !obj.fromSize || !obj.toSize) {
|
||||
throw new _errors["default"](50);
|
||||
}
|
||||
fallbacks[obj.prop] = obj.fromSize;
|
||||
mediaQueries["@media (min-width: " + minScreen + ")"] = _extends({}, mediaQueries["@media (min-width: " + minScreen + ")"], (_extends2 = {}, _extends2[obj.prop] = (0, _between["default"])(obj.fromSize, obj.toSize, minScreen, maxScreen), _extends2));
|
||||
mediaQueries["@media (min-width: " + maxScreen + ")"] = _extends({}, mediaQueries["@media (min-width: " + maxScreen + ")"], (_extends3 = {}, _extends3[obj.prop] = obj.toSize, _extends3));
|
||||
}
|
||||
return _extends({}, fallbacks, mediaQueries);
|
||||
} else {
|
||||
var _ref, _ref2, _ref3;
|
||||
if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {
|
||||
throw new _errors["default"](51);
|
||||
}
|
||||
return _ref3 = {}, _ref3[cssProp.prop] = cssProp.fromSize, _ref3["@media (min-width: " + minScreen + ")"] = (_ref = {}, _ref[cssProp.prop] = (0, _between["default"])(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen), _ref), _ref3["@media (min-width: " + maxScreen + ")"] = (_ref2 = {}, _ref2[cssProp.prop] = cssProp.toSize, _ref2), _ref3;
|
||||
}
|
||||
}
|
||||
module.exports = exports.default;
|
||||
97
VISUALIZACION/node_modules/polished/lib/mixins/fluidRange.js.flow
generated
vendored
Executable file
97
VISUALIZACION/node_modules/polished/lib/mixins/fluidRange.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,97 @@
|
|||
// @flow
|
||||
import between from './between'
|
||||
import PolishedError from '../internalHelpers/_errors'
|
||||
|
||||
import type { FluidRangeConfiguration } from '../types/fluidRangeConfiguration'
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* Returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize. Accepts optional minScreen (defaults to '320px') and maxScreen (defaults to '1200px') to constrain the interpolation.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...fluidRange(
|
||||
* {
|
||||
* prop: 'padding',
|
||||
* fromSize: '20px',
|
||||
* toSize: '100px',
|
||||
* },
|
||||
* '400px',
|
||||
* '1000px',
|
||||
* )
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${fluidRange(
|
||||
* {
|
||||
* prop: 'padding',
|
||||
* fromSize: '20px',
|
||||
* toSize: '100px',
|
||||
* },
|
||||
* '400px',
|
||||
* '1000px',
|
||||
* )}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* "@media (min-width: 1000px)": Object {
|
||||
* "padding": "100px",
|
||||
* },
|
||||
* "@media (min-width: 400px)": Object {
|
||||
* "padding": "calc(-33.33333333333334px + 13.333333333333334vw)",
|
||||
* },
|
||||
* "padding": "20px",
|
||||
* }
|
||||
*/
|
||||
export default function fluidRange(
|
||||
cssProp: Array<FluidRangeConfiguration> | FluidRangeConfiguration,
|
||||
minScreen?: string = '320px',
|
||||
maxScreen?: string = '1200px',
|
||||
): Styles {
|
||||
if ((!Array.isArray(cssProp) && typeof cssProp !== 'object') || cssProp === null) {
|
||||
throw new PolishedError(49)
|
||||
}
|
||||
|
||||
if (Array.isArray(cssProp)) {
|
||||
const mediaQueries = {}
|
||||
const fallbacks = {}
|
||||
for (const obj of cssProp) {
|
||||
if (!obj.prop || !obj.fromSize || !obj.toSize) {
|
||||
throw new PolishedError(50)
|
||||
}
|
||||
|
||||
fallbacks[obj.prop] = obj.fromSize
|
||||
mediaQueries[`@media (min-width: ${minScreen})`] = {
|
||||
...mediaQueries[`@media (min-width: ${minScreen})`],
|
||||
[obj.prop]: between(obj.fromSize, obj.toSize, minScreen, maxScreen),
|
||||
}
|
||||
mediaQueries[`@media (min-width: ${maxScreen})`] = {
|
||||
...mediaQueries[`@media (min-width: ${maxScreen})`],
|
||||
[obj.prop]: obj.toSize,
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
...fallbacks,
|
||||
...mediaQueries,
|
||||
}
|
||||
} else {
|
||||
if (!cssProp.prop || !cssProp.fromSize || !cssProp.toSize) {
|
||||
throw new PolishedError(51)
|
||||
}
|
||||
|
||||
return {
|
||||
[cssProp.prop]: cssProp.fromSize,
|
||||
[`@media (min-width: ${minScreen})`]: {
|
||||
[cssProp.prop]: between(cssProp.fromSize, cssProp.toSize, minScreen, maxScreen),
|
||||
},
|
||||
[`@media (min-width: ${maxScreen})`]: {
|
||||
[cssProp.prop]: cssProp.toSize,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
20
VISUALIZACION/node_modules/polished/lib/mixins/fontFace.d.ts
generated
vendored
Executable file
20
VISUALIZACION/node_modules/polished/lib/mixins/fontFace.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
import { FontFaceConfiguration } from '../types/fontFaceConfiguration';
|
||||
import { Styles } from '../types/style';
|
||||
|
||||
declare function fontFace({
|
||||
fontFamily,
|
||||
fontFilePath,
|
||||
fontStretch,
|
||||
fontStyle,
|
||||
fontVariant,
|
||||
fontWeight,
|
||||
fileFormats,
|
||||
formatHint,
|
||||
localFonts,
|
||||
unicodeRange,
|
||||
fontDisplay,
|
||||
fontVariationSettings,
|
||||
fontFeatureSettings,
|
||||
}: FontFaceConfiguration): Styles;
|
||||
|
||||
export default fontFace;
|
||||
122
VISUALIZACION/node_modules/polished/lib/mixins/fontFace.js
generated
vendored
Executable file
122
VISUALIZACION/node_modules/polished/lib/mixins/fontFace.js
generated
vendored
Executable file
|
|
@ -0,0 +1,122 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = fontFace;
|
||||
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
var dataURIRegex = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i;
|
||||
var formatHintMap = {
|
||||
woff: 'woff',
|
||||
woff2: 'woff2',
|
||||
ttf: 'truetype',
|
||||
otf: 'opentype',
|
||||
eot: 'embedded-opentype',
|
||||
svg: 'svg',
|
||||
svgz: 'svg'
|
||||
};
|
||||
function generateFormatHint(format, formatHint) {
|
||||
if (!formatHint) return '';
|
||||
return " format(\"" + formatHintMap[format] + "\")";
|
||||
}
|
||||
function isDataURI(fontFilePath) {
|
||||
return !!fontFilePath.replace(/\s+/g, ' ').match(dataURIRegex);
|
||||
}
|
||||
function generateFileReferences(fontFilePath, fileFormats, formatHint) {
|
||||
if (isDataURI(fontFilePath)) {
|
||||
return "url(\"" + fontFilePath + "\")" + generateFormatHint(fileFormats[0], formatHint);
|
||||
}
|
||||
var fileFontReferences = fileFormats.map(function (format) {
|
||||
return "url(\"" + fontFilePath + "." + format + "\")" + generateFormatHint(format, formatHint);
|
||||
});
|
||||
return fileFontReferences.join(', ');
|
||||
}
|
||||
function generateLocalReferences(localFonts) {
|
||||
var localFontReferences = localFonts.map(function (font) {
|
||||
return "local(\"" + font + "\")";
|
||||
});
|
||||
return localFontReferences.join(', ');
|
||||
}
|
||||
function generateSources(fontFilePath, localFonts, fileFormats, formatHint) {
|
||||
var fontReferences = [];
|
||||
if (localFonts) fontReferences.push(generateLocalReferences(localFonts));
|
||||
if (fontFilePath) {
|
||||
fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint));
|
||||
}
|
||||
return fontReferences.join(', ');
|
||||
}
|
||||
|
||||
/**
|
||||
* CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object basic usage
|
||||
* const styles = {
|
||||
* ...fontFace({
|
||||
* 'fontFamily': 'Sans-Pro',
|
||||
* 'fontFilePath': 'path/to/file'
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* // styled-components basic usage
|
||||
* const GlobalStyle = createGlobalStyle`${
|
||||
* fontFace({
|
||||
* 'fontFamily': 'Sans-Pro',
|
||||
* 'fontFilePath': 'path/to/file'
|
||||
* }
|
||||
* )}`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* '@font-face': {
|
||||
* 'fontFamily': 'Sans-Pro',
|
||||
* 'src': 'url("path/to/file.eot"), url("path/to/file.woff2"), url("path/to/file.woff"), url("path/to/file.ttf"), url("path/to/file.svg")',
|
||||
* }
|
||||
*/
|
||||
|
||||
function fontFace(_ref) {
|
||||
var fontFamily = _ref.fontFamily,
|
||||
fontFilePath = _ref.fontFilePath,
|
||||
fontStretch = _ref.fontStretch,
|
||||
fontStyle = _ref.fontStyle,
|
||||
fontVariant = _ref.fontVariant,
|
||||
fontWeight = _ref.fontWeight,
|
||||
_ref$fileFormats = _ref.fileFormats,
|
||||
fileFormats = _ref$fileFormats === void 0 ? ['eot', 'woff2', 'woff', 'ttf', 'svg'] : _ref$fileFormats,
|
||||
_ref$formatHint = _ref.formatHint,
|
||||
formatHint = _ref$formatHint === void 0 ? false : _ref$formatHint,
|
||||
_ref$localFonts = _ref.localFonts,
|
||||
localFonts = _ref$localFonts === void 0 ? [fontFamily] : _ref$localFonts,
|
||||
unicodeRange = _ref.unicodeRange,
|
||||
fontDisplay = _ref.fontDisplay,
|
||||
fontVariationSettings = _ref.fontVariationSettings,
|
||||
fontFeatureSettings = _ref.fontFeatureSettings;
|
||||
// Error Handling
|
||||
if (!fontFamily) throw new _errors["default"](55);
|
||||
if (!fontFilePath && !localFonts) {
|
||||
throw new _errors["default"](52);
|
||||
}
|
||||
if (localFonts && !Array.isArray(localFonts)) {
|
||||
throw new _errors["default"](53);
|
||||
}
|
||||
if (!Array.isArray(fileFormats)) {
|
||||
throw new _errors["default"](54);
|
||||
}
|
||||
var fontFaceDeclaration = {
|
||||
'@font-face': {
|
||||
fontFamily: fontFamily,
|
||||
src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),
|
||||
unicodeRange: unicodeRange,
|
||||
fontStretch: fontStretch,
|
||||
fontStyle: fontStyle,
|
||||
fontVariant: fontVariant,
|
||||
fontWeight: fontWeight,
|
||||
fontDisplay: fontDisplay,
|
||||
fontVariationSettings: fontVariationSettings,
|
||||
fontFeatureSettings: fontFeatureSettings
|
||||
}
|
||||
};
|
||||
|
||||
// Removes undefined fields for cleaner css object.
|
||||
return JSON.parse(JSON.stringify(fontFaceDeclaration));
|
||||
}
|
||||
module.exports = exports.default;
|
||||
134
VISUALIZACION/node_modules/polished/lib/mixins/fontFace.js.flow
generated
vendored
Executable file
134
VISUALIZACION/node_modules/polished/lib/mixins/fontFace.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,134 @@
|
|||
// @flow
|
||||
import PolishedError from '../internalHelpers/_errors'
|
||||
|
||||
import type { FontFaceConfiguration } from '../types/fontFaceConfiguration'
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
const dataURIRegex = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i
|
||||
|
||||
const formatHintMap = {
|
||||
woff: 'woff',
|
||||
woff2: 'woff2',
|
||||
ttf: 'truetype',
|
||||
otf: 'opentype',
|
||||
eot: 'embedded-opentype',
|
||||
svg: 'svg',
|
||||
svgz: 'svg',
|
||||
}
|
||||
|
||||
function generateFormatHint(format: string, formatHint: boolean): string {
|
||||
if (!formatHint) return ''
|
||||
return ` format("${formatHintMap[format]}")`
|
||||
}
|
||||
|
||||
function isDataURI(fontFilePath: string): boolean {
|
||||
return !!fontFilePath.replace(/\s+/g, ' ').match(dataURIRegex)
|
||||
}
|
||||
|
||||
function generateFileReferences(
|
||||
fontFilePath: string,
|
||||
fileFormats: Array<string>,
|
||||
formatHint: boolean,
|
||||
): string {
|
||||
if (isDataURI(fontFilePath)) {
|
||||
return `url("${fontFilePath}")${generateFormatHint(fileFormats[0], formatHint)}`
|
||||
}
|
||||
|
||||
const fileFontReferences = fileFormats.map(
|
||||
format => `url("${fontFilePath}.${format}")${generateFormatHint(format, formatHint)}`,
|
||||
)
|
||||
return fileFontReferences.join(', ')
|
||||
}
|
||||
|
||||
function generateLocalReferences(localFonts: Array<string>): string {
|
||||
const localFontReferences = localFonts.map(font => `local("${font}")`)
|
||||
return localFontReferences.join(', ')
|
||||
}
|
||||
|
||||
function generateSources(
|
||||
fontFilePath?: string,
|
||||
localFonts: Array<string> | null,
|
||||
fileFormats: Array<string>,
|
||||
formatHint: boolean,
|
||||
): string {
|
||||
const fontReferences = []
|
||||
if (localFonts) fontReferences.push(generateLocalReferences(localFonts))
|
||||
if (fontFilePath) {
|
||||
fontReferences.push(generateFileReferences(fontFilePath, fileFormats, formatHint))
|
||||
}
|
||||
return fontReferences.join(', ')
|
||||
}
|
||||
|
||||
/**
|
||||
* CSS for a @font-face declaration. Defaults to check for local copies of the font on the user's machine. You can disable this by passing `null` to localFonts.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object basic usage
|
||||
* const styles = {
|
||||
* ...fontFace({
|
||||
* 'fontFamily': 'Sans-Pro',
|
||||
* 'fontFilePath': 'path/to/file'
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* // styled-components basic usage
|
||||
* const GlobalStyle = createGlobalStyle`${
|
||||
* fontFace({
|
||||
* 'fontFamily': 'Sans-Pro',
|
||||
* 'fontFilePath': 'path/to/file'
|
||||
* }
|
||||
* )}`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* '@font-face': {
|
||||
* 'fontFamily': 'Sans-Pro',
|
||||
* 'src': 'url("path/to/file.eot"), url("path/to/file.woff2"), url("path/to/file.woff"), url("path/to/file.ttf"), url("path/to/file.svg")',
|
||||
* }
|
||||
*/
|
||||
|
||||
export default function fontFace({
|
||||
fontFamily,
|
||||
fontFilePath,
|
||||
fontStretch,
|
||||
fontStyle,
|
||||
fontVariant,
|
||||
fontWeight,
|
||||
fileFormats = ['eot', 'woff2', 'woff', 'ttf', 'svg'],
|
||||
formatHint = false,
|
||||
localFonts = [fontFamily],
|
||||
unicodeRange,
|
||||
fontDisplay,
|
||||
fontVariationSettings,
|
||||
fontFeatureSettings,
|
||||
}: FontFaceConfiguration): Styles {
|
||||
// Error Handling
|
||||
if (!fontFamily) throw new PolishedError(55)
|
||||
if (!fontFilePath && !localFonts) {
|
||||
throw new PolishedError(52)
|
||||
}
|
||||
if (localFonts && !Array.isArray(localFonts)) {
|
||||
throw new PolishedError(53)
|
||||
}
|
||||
if (!Array.isArray(fileFormats)) {
|
||||
throw new PolishedError(54)
|
||||
}
|
||||
|
||||
const fontFaceDeclaration = {
|
||||
'@font-face': {
|
||||
fontFamily,
|
||||
src: generateSources(fontFilePath, localFonts, fileFormats, formatHint),
|
||||
unicodeRange,
|
||||
fontStretch,
|
||||
fontStyle,
|
||||
fontVariant,
|
||||
fontWeight,
|
||||
fontDisplay,
|
||||
fontVariationSettings,
|
||||
fontFeatureSettings,
|
||||
},
|
||||
}
|
||||
|
||||
// Removes undefined fields for cleaner css object.
|
||||
return JSON.parse(JSON.stringify(fontFaceDeclaration))
|
||||
}
|
||||
3
VISUALIZACION/node_modules/polished/lib/mixins/hiDPI.d.ts
generated
vendored
Executable file
3
VISUALIZACION/node_modules/polished/lib/mixins/hiDPI.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
declare function hiDPI(ratio?: number): string;
|
||||
|
||||
export default hiDPI;
|
||||
39
VISUALIZACION/node_modules/polished/lib/mixins/hiDPI.js
generated
vendored
Executable file
39
VISUALIZACION/node_modules/polished/lib/mixins/hiDPI.js
generated
vendored
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = hiDPI;
|
||||
/**
|
||||
* Generates a media query to target HiDPI devices.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* [hiDPI(1.5)]: {
|
||||
* width: 200px;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${hiDPI(1.5)} {
|
||||
* width: 200px;
|
||||
* }
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
||||
* only screen and (min--moz-device-pixel-ratio: 1.5),
|
||||
* only screen and (-o-min-device-pixel-ratio: 1.5/1),
|
||||
* only screen and (min-resolution: 144dpi),
|
||||
* only screen and (min-resolution: 1.5dppx)': {
|
||||
* 'width': '200px',
|
||||
* }
|
||||
*/
|
||||
function hiDPI(ratio) {
|
||||
if (ratio === void 0) {
|
||||
ratio = 1.3;
|
||||
}
|
||||
return "\n @media only screen and (-webkit-min-device-pixel-ratio: " + ratio + "),\n only screen and (min--moz-device-pixel-ratio: " + ratio + "),\n only screen and (-o-min-device-pixel-ratio: " + ratio + "/1),\n only screen and (min-resolution: " + Math.round(ratio * 96) + "dpi),\n only screen and (min-resolution: " + ratio + "dppx)\n ";
|
||||
}
|
||||
module.exports = exports.default;
|
||||
40
VISUALIZACION/node_modules/polished/lib/mixins/hiDPI.js.flow
generated
vendored
Executable file
40
VISUALIZACION/node_modules/polished/lib/mixins/hiDPI.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
// @flow
|
||||
|
||||
/**
|
||||
* Generates a media query to target HiDPI devices.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* [hiDPI(1.5)]: {
|
||||
* width: 200px;
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${hiDPI(1.5)} {
|
||||
* width: 200px;
|
||||
* }
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* '@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
||||
* only screen and (min--moz-device-pixel-ratio: 1.5),
|
||||
* only screen and (-o-min-device-pixel-ratio: 1.5/1),
|
||||
* only screen and (min-resolution: 144dpi),
|
||||
* only screen and (min-resolution: 1.5dppx)': {
|
||||
* 'width': '200px',
|
||||
* }
|
||||
*/
|
||||
|
||||
export default function hiDPI(ratio?: number = 1.3): string {
|
||||
return `
|
||||
@media only screen and (-webkit-min-device-pixel-ratio: ${ratio}),
|
||||
only screen and (min--moz-device-pixel-ratio: ${ratio}),
|
||||
only screen and (-o-min-device-pixel-ratio: ${ratio}/1),
|
||||
only screen and (min-resolution: ${Math.round(ratio * 96)}dpi),
|
||||
only screen and (min-resolution: ${ratio}dppx)
|
||||
`
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/lib/mixins/hideText.d.ts
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/lib/mixins/hideText.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function hideText(): Styles;
|
||||
|
||||
export default hideText;
|
||||
37
VISUALIZACION/node_modules/polished/lib/mixins/hideText.js
generated
vendored
Executable file
37
VISUALIZACION/node_modules/polished/lib/mixins/hideText.js
generated
vendored
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = hideText;
|
||||
/**
|
||||
* CSS to hide text to show a background image in a SEO-friendly way.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* 'backgroundImage': 'url(logo.png)',
|
||||
* ...hideText(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* backgroundImage: url(logo.png);
|
||||
* ${hideText()};
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* 'div': {
|
||||
* 'backgroundImage': 'url(logo.png)',
|
||||
* 'textIndent': '101%',
|
||||
* 'overflow': 'hidden',
|
||||
* 'whiteSpace': 'nowrap',
|
||||
* }
|
||||
*/
|
||||
function hideText() {
|
||||
return {
|
||||
textIndent: '101%',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap'
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
36
VISUALIZACION/node_modules/polished/lib/mixins/hideText.js.flow
generated
vendored
Executable file
36
VISUALIZACION/node_modules/polished/lib/mixins/hideText.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS to hide text to show a background image in a SEO-friendly way.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* 'backgroundImage': 'url(logo.png)',
|
||||
* ...hideText(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* backgroundImage: url(logo.png);
|
||||
* ${hideText()};
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* 'div': {
|
||||
* 'backgroundImage': 'url(logo.png)',
|
||||
* 'textIndent': '101%',
|
||||
* 'overflow': 'hidden',
|
||||
* 'whiteSpace': 'nowrap',
|
||||
* }
|
||||
*/
|
||||
|
||||
export default function hideText(): Styles {
|
||||
return {
|
||||
textIndent: '101%',
|
||||
overflow: 'hidden',
|
||||
whiteSpace: 'nowrap',
|
||||
}
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/lib/mixins/hideVisually.d.ts
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/lib/mixins/hideVisually.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function hideVisually(): Styles;
|
||||
|
||||
export default hideVisually;
|
||||
47
VISUALIZACION/node_modules/polished/lib/mixins/hideVisually.js
generated
vendored
Executable file
47
VISUALIZACION/node_modules/polished/lib/mixins/hideVisually.js
generated
vendored
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = hideVisually;
|
||||
/**
|
||||
* CSS to hide content visually but remain accessible to screen readers.
|
||||
* from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...hideVisually(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${hideVisually()};
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* 'div': {
|
||||
* 'border': '0',
|
||||
* 'clip': 'rect(0 0 0 0)',
|
||||
* 'height': '1px',
|
||||
* 'margin': '-1px',
|
||||
* 'overflow': 'hidden',
|
||||
* 'padding': '0',
|
||||
* 'position': 'absolute',
|
||||
* 'whiteSpace': 'nowrap',
|
||||
* 'width': '1px',
|
||||
* }
|
||||
*/
|
||||
function hideVisually() {
|
||||
return {
|
||||
border: '0',
|
||||
clip: 'rect(0 0 0 0)',
|
||||
height: '1px',
|
||||
margin: '-1px',
|
||||
overflow: 'hidden',
|
||||
padding: '0',
|
||||
position: 'absolute',
|
||||
whiteSpace: 'nowrap',
|
||||
width: '1px'
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
45
VISUALIZACION/node_modules/polished/lib/mixins/hideVisually.js.flow
generated
vendored
Executable file
45
VISUALIZACION/node_modules/polished/lib/mixins/hideVisually.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS to hide content visually but remain accessible to screen readers.
|
||||
* from [HTML5 Boilerplate](https://github.com/h5bp/html5-boilerplate/blob/9a176f57af1cfe8ec70300da4621fb9b07e5fa31/src/css/main.css#L121)
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...hideVisually(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${hideVisually()};
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* 'div': {
|
||||
* 'border': '0',
|
||||
* 'clip': 'rect(0 0 0 0)',
|
||||
* 'height': '1px',
|
||||
* 'margin': '-1px',
|
||||
* 'overflow': 'hidden',
|
||||
* 'padding': '0',
|
||||
* 'position': 'absolute',
|
||||
* 'whiteSpace': 'nowrap',
|
||||
* 'width': '1px',
|
||||
* }
|
||||
*/
|
||||
export default function hideVisually(): Styles {
|
||||
return {
|
||||
border: '0',
|
||||
clip: 'rect(0 0 0 0)',
|
||||
height: '1px',
|
||||
margin: '-1px',
|
||||
overflow: 'hidden',
|
||||
padding: '0',
|
||||
position: 'absolute',
|
||||
whiteSpace: 'nowrap',
|
||||
width: '1px',
|
||||
}
|
||||
}
|
||||
10
VISUALIZACION/node_modules/polished/lib/mixins/linearGradient.d.ts
generated
vendored
Executable file
10
VISUALIZACION/node_modules/polished/lib/mixins/linearGradient.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
import { LinearGradientConfiguration } from '../types/linearGradientConfiguration';
|
||||
import { Styles } from '../types/style';
|
||||
|
||||
declare function linearGradient({
|
||||
colorStops,
|
||||
fallback,
|
||||
toDirection,
|
||||
}: LinearGradientConfiguration): Styles;
|
||||
|
||||
export default linearGradient;
|
||||
52
VISUALIZACION/node_modules/polished/lib/mixins/linearGradient.js
generated
vendored
Executable file
52
VISUALIZACION/node_modules/polished/lib/mixins/linearGradient.js
generated
vendored
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = linearGradient;
|
||||
var _constructGradientValue = _interopRequireDefault(require("../internalHelpers/_constructGradientValue"));
|
||||
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
||||
var _templateObject;
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
||||
/**
|
||||
* CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...linearGradient({
|
||||
colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
toDirection: 'to top right',
|
||||
fallback: '#FFF',
|
||||
})
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${linearGradient({
|
||||
colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
toDirection: 'to top right',
|
||||
fallback: '#FFF',
|
||||
})}
|
||||
*`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'backgroundColor': '#FFF',
|
||||
* 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',
|
||||
* }
|
||||
*/
|
||||
function linearGradient(_ref) {
|
||||
var colorStops = _ref.colorStops,
|
||||
fallback = _ref.fallback,
|
||||
_ref$toDirection = _ref.toDirection,
|
||||
toDirection = _ref$toDirection === void 0 ? '' : _ref$toDirection;
|
||||
if (!colorStops || colorStops.length < 2) {
|
||||
throw new _errors["default"](56);
|
||||
}
|
||||
return {
|
||||
backgroundColor: fallback || colorStops[0].replace(/,\s+/g, ',').split(' ')[0].replace(/,(?=\S)/g, ', '),
|
||||
backgroundImage: (0, _constructGradientValue["default"])(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["linear-gradient(", "", ")"])), toDirection, colorStops.join(', ').replace(/,(?=\S)/g, ', '))
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
56
VISUALIZACION/node_modules/polished/lib/mixins/linearGradient.js.flow
generated
vendored
Executable file
56
VISUALIZACION/node_modules/polished/lib/mixins/linearGradient.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
// @flow
|
||||
import constructGradientValue from '../internalHelpers/_constructGradientValue'
|
||||
import PolishedError from '../internalHelpers/_errors'
|
||||
|
||||
import type { LinearGradientConfiguration } from '../types/linearGradientConfiguration'
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS for declaring a linear gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...linearGradient({
|
||||
colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
toDirection: 'to top right',
|
||||
fallback: '#FFF',
|
||||
})
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${linearGradient({
|
||||
colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
toDirection: 'to top right',
|
||||
fallback: '#FFF',
|
||||
})}
|
||||
*`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'backgroundColor': '#FFF',
|
||||
* 'backgroundImage': 'linear-gradient(to top right, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',
|
||||
* }
|
||||
*/
|
||||
export default function linearGradient({
|
||||
colorStops,
|
||||
fallback,
|
||||
toDirection = '',
|
||||
}: LinearGradientConfiguration): Styles {
|
||||
if (!colorStops || colorStops.length < 2) {
|
||||
throw new PolishedError(56)
|
||||
}
|
||||
return {
|
||||
backgroundColor:
|
||||
fallback
|
||||
|| colorStops[0]
|
||||
.replace(/,\s+/g, ',')
|
||||
.split(' ')[0]
|
||||
.replace(/,(?=\S)/g, ', '),
|
||||
backgroundImage: constructGradientValue`linear-gradient(${toDirection}${colorStops
|
||||
.join(', ')
|
||||
.replace(/,(?=\S)/g, ', ')})`,
|
||||
}
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/lib/mixins/normalize.d.ts
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/lib/mixins/normalize.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function normalize(): Array<Styles>;
|
||||
|
||||
export default normalize;
|
||||
131
VISUALIZACION/node_modules/polished/lib/mixins/normalize.js
generated
vendored
Executable file
131
VISUALIZACION/node_modules/polished/lib/mixins/normalize.js
generated
vendored
Executable file
|
|
@ -0,0 +1,131 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = normalize;
|
||||
/**
|
||||
* CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...normalize(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const GlobalStyle = createGlobalStyle`${normalize()}`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* html {
|
||||
* lineHeight: 1.15,
|
||||
* textSizeAdjust: 100%,
|
||||
* } ...
|
||||
*/
|
||||
function normalize() {
|
||||
var _ref;
|
||||
return [(_ref = {
|
||||
html: {
|
||||
lineHeight: '1.15',
|
||||
textSizeAdjust: '100%'
|
||||
},
|
||||
body: {
|
||||
margin: '0'
|
||||
},
|
||||
main: {
|
||||
display: 'block'
|
||||
},
|
||||
h1: {
|
||||
fontSize: '2em',
|
||||
margin: '0.67em 0'
|
||||
},
|
||||
hr: {
|
||||
boxSizing: 'content-box',
|
||||
height: '0',
|
||||
overflow: 'visible'
|
||||
},
|
||||
pre: {
|
||||
fontFamily: 'monospace, monospace',
|
||||
fontSize: '1em'
|
||||
},
|
||||
a: {
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
'abbr[title]': {
|
||||
borderBottom: 'none',
|
||||
textDecoration: 'underline'
|
||||
}
|
||||
}, _ref["b,\n strong"] = {
|
||||
fontWeight: 'bolder'
|
||||
}, _ref["code,\n kbd,\n samp"] = {
|
||||
fontFamily: 'monospace, monospace',
|
||||
fontSize: '1em'
|
||||
}, _ref.small = {
|
||||
fontSize: '80%'
|
||||
}, _ref["sub,\n sup"] = {
|
||||
fontSize: '75%',
|
||||
lineHeight: '0',
|
||||
position: 'relative',
|
||||
verticalAlign: 'baseline'
|
||||
}, _ref.sub = {
|
||||
bottom: '-0.25em'
|
||||
}, _ref.sup = {
|
||||
top: '-0.5em'
|
||||
}, _ref.img = {
|
||||
borderStyle: 'none'
|
||||
}, _ref["button,\n input,\n optgroup,\n select,\n textarea"] = {
|
||||
fontFamily: 'inherit',
|
||||
fontSize: '100%',
|
||||
lineHeight: '1.15',
|
||||
margin: '0'
|
||||
}, _ref["button,\n input"] = {
|
||||
overflow: 'visible'
|
||||
}, _ref["button,\n select"] = {
|
||||
textTransform: 'none'
|
||||
}, _ref["button,\n html [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"]"] = {
|
||||
WebkitAppearance: 'button'
|
||||
}, _ref["button::-moz-focus-inner,\n [type=\"button\"]::-moz-focus-inner,\n [type=\"reset\"]::-moz-focus-inner,\n [type=\"submit\"]::-moz-focus-inner"] = {
|
||||
borderStyle: 'none',
|
||||
padding: '0'
|
||||
}, _ref["button:-moz-focusring,\n [type=\"button\"]:-moz-focusring,\n [type=\"reset\"]:-moz-focusring,\n [type=\"submit\"]:-moz-focusring"] = {
|
||||
outline: '1px dotted ButtonText'
|
||||
}, _ref.fieldset = {
|
||||
padding: '0.35em 0.625em 0.75em'
|
||||
}, _ref.legend = {
|
||||
boxSizing: 'border-box',
|
||||
color: 'inherit',
|
||||
display: 'table',
|
||||
maxWidth: '100%',
|
||||
padding: '0',
|
||||
whiteSpace: 'normal'
|
||||
}, _ref.progress = {
|
||||
verticalAlign: 'baseline'
|
||||
}, _ref.textarea = {
|
||||
overflow: 'auto'
|
||||
}, _ref["[type=\"checkbox\"],\n [type=\"radio\"]"] = {
|
||||
boxSizing: 'border-box',
|
||||
padding: '0'
|
||||
}, _ref["[type=\"number\"]::-webkit-inner-spin-button,\n [type=\"number\"]::-webkit-outer-spin-button"] = {
|
||||
height: 'auto'
|
||||
}, _ref['[type="search"]'] = {
|
||||
WebkitAppearance: 'textfield',
|
||||
outlineOffset: '-2px'
|
||||
}, _ref['[type="search"]::-webkit-search-decoration'] = {
|
||||
WebkitAppearance: 'none'
|
||||
}, _ref['::-webkit-file-upload-button'] = {
|
||||
WebkitAppearance: 'button',
|
||||
font: 'inherit'
|
||||
}, _ref.details = {
|
||||
display: 'block'
|
||||
}, _ref.summary = {
|
||||
display: 'list-item'
|
||||
}, _ref.template = {
|
||||
display: 'none'
|
||||
}, _ref['[hidden]'] = {
|
||||
display: 'none'
|
||||
}, _ref), {
|
||||
'abbr[title]': {
|
||||
textDecoration: 'underline dotted'
|
||||
}
|
||||
}];
|
||||
}
|
||||
module.exports = exports.default;
|
||||
211
VISUALIZACION/node_modules/polished/lib/mixins/normalize.js.flow
generated
vendored
Executable file
211
VISUALIZACION/node_modules/polished/lib/mixins/normalize.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,211 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS to normalize abnormalities across browsers (normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css)
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...normalize(),
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const GlobalStyle = createGlobalStyle`${normalize()}`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* html {
|
||||
* lineHeight: 1.15,
|
||||
* textSizeAdjust: 100%,
|
||||
* } ...
|
||||
*/
|
||||
export default function normalize(): Array<Styles> {
|
||||
return [
|
||||
{
|
||||
html: {
|
||||
lineHeight: '1.15',
|
||||
textSizeAdjust: '100%',
|
||||
},
|
||||
|
||||
body: {
|
||||
margin: '0',
|
||||
},
|
||||
|
||||
main: {
|
||||
display: 'block',
|
||||
},
|
||||
|
||||
h1: {
|
||||
fontSize: '2em',
|
||||
margin: '0.67em 0',
|
||||
},
|
||||
|
||||
hr: {
|
||||
boxSizing: 'content-box',
|
||||
height: '0',
|
||||
overflow: 'visible',
|
||||
},
|
||||
|
||||
pre: {
|
||||
fontFamily: 'monospace, monospace',
|
||||
fontSize: '1em',
|
||||
},
|
||||
|
||||
a: {
|
||||
backgroundColor: 'transparent',
|
||||
},
|
||||
|
||||
'abbr[title]': {
|
||||
borderBottom: 'none',
|
||||
textDecoration: 'underline',
|
||||
},
|
||||
|
||||
[`b,
|
||||
strong`]: {
|
||||
fontWeight: 'bolder',
|
||||
},
|
||||
|
||||
[`code,
|
||||
kbd,
|
||||
samp`]: {
|
||||
fontFamily: 'monospace, monospace',
|
||||
fontSize: '1em',
|
||||
},
|
||||
|
||||
small: {
|
||||
fontSize: '80%',
|
||||
},
|
||||
|
||||
[`sub,
|
||||
sup`]: {
|
||||
fontSize: '75%',
|
||||
lineHeight: '0',
|
||||
position: 'relative',
|
||||
verticalAlign: 'baseline',
|
||||
},
|
||||
|
||||
sub: {
|
||||
bottom: '-0.25em',
|
||||
},
|
||||
|
||||
sup: {
|
||||
top: '-0.5em',
|
||||
},
|
||||
|
||||
img: {
|
||||
borderStyle: 'none',
|
||||
},
|
||||
|
||||
[`button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea`]: {
|
||||
fontFamily: 'inherit',
|
||||
fontSize: '100%',
|
||||
lineHeight: '1.15',
|
||||
margin: '0',
|
||||
},
|
||||
|
||||
[`button,
|
||||
input`]: {
|
||||
overflow: 'visible',
|
||||
},
|
||||
|
||||
[`button,
|
||||
select`]: {
|
||||
textTransform: 'none',
|
||||
},
|
||||
|
||||
[`button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"]`]: {
|
||||
WebkitAppearance: 'button',
|
||||
},
|
||||
|
||||
[`button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner`]: {
|
||||
borderStyle: 'none',
|
||||
padding: '0',
|
||||
},
|
||||
|
||||
[`button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring`]: {
|
||||
outline: '1px dotted ButtonText',
|
||||
},
|
||||
|
||||
fieldset: {
|
||||
padding: '0.35em 0.625em 0.75em',
|
||||
},
|
||||
|
||||
legend: {
|
||||
boxSizing: 'border-box',
|
||||
color: 'inherit',
|
||||
display: 'table',
|
||||
maxWidth: '100%',
|
||||
padding: '0',
|
||||
whiteSpace: 'normal',
|
||||
},
|
||||
|
||||
progress: {
|
||||
verticalAlign: 'baseline',
|
||||
},
|
||||
|
||||
textarea: {
|
||||
overflow: 'auto',
|
||||
},
|
||||
|
||||
[`[type="checkbox"],
|
||||
[type="radio"]`]: {
|
||||
boxSizing: 'border-box',
|
||||
padding: '0',
|
||||
},
|
||||
|
||||
[`[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button`]: {
|
||||
height: 'auto',
|
||||
},
|
||||
|
||||
'[type="search"]': {
|
||||
WebkitAppearance: 'textfield',
|
||||
outlineOffset: '-2px',
|
||||
},
|
||||
|
||||
'[type="search"]::-webkit-search-decoration': {
|
||||
WebkitAppearance: 'none',
|
||||
},
|
||||
|
||||
'::-webkit-file-upload-button': {
|
||||
WebkitAppearance: 'button',
|
||||
font: 'inherit',
|
||||
},
|
||||
|
||||
details: {
|
||||
display: 'block',
|
||||
},
|
||||
|
||||
summary: {
|
||||
display: 'list-item',
|
||||
},
|
||||
|
||||
template: {
|
||||
display: 'none',
|
||||
},
|
||||
|
||||
'[hidden]': {
|
||||
display: 'none',
|
||||
},
|
||||
},
|
||||
{
|
||||
'abbr[title]': {
|
||||
textDecoration: 'underline dotted',
|
||||
},
|
||||
},
|
||||
]
|
||||
}
|
||||
12
VISUALIZACION/node_modules/polished/lib/mixins/radialGradient.d.ts
generated
vendored
Executable file
12
VISUALIZACION/node_modules/polished/lib/mixins/radialGradient.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
import { RadialGradientConfiguration } from '../types/radialGradientConfiguration';
|
||||
import { Styles } from '../types/style';
|
||||
|
||||
declare function radialGradient({
|
||||
colorStops,
|
||||
extent,
|
||||
fallback,
|
||||
position,
|
||||
shape,
|
||||
}: RadialGradientConfiguration): Styles;
|
||||
|
||||
export default radialGradient;
|
||||
58
VISUALIZACION/node_modules/polished/lib/mixins/radialGradient.js
generated
vendored
Executable file
58
VISUALIZACION/node_modules/polished/lib/mixins/radialGradient.js
generated
vendored
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = radialGradient;
|
||||
var _constructGradientValue = _interopRequireDefault(require("../internalHelpers/_constructGradientValue"));
|
||||
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
||||
var _templateObject;
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
||||
function _taggedTemplateLiteralLoose(strings, raw) { if (!raw) { raw = strings.slice(0); } strings.raw = raw; return strings; }
|
||||
/**
|
||||
* CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...radialGradient({
|
||||
* colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
* extent: 'farthest-corner at 45px 45px',
|
||||
* position: 'center',
|
||||
* shape: 'ellipse',
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${radialGradient({
|
||||
* colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
* extent: 'farthest-corner at 45px 45px',
|
||||
* position: 'center',
|
||||
* shape: 'ellipse',
|
||||
* })}
|
||||
*`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'backgroundColor': '#00FFFF',
|
||||
* 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',
|
||||
* }
|
||||
*/
|
||||
function radialGradient(_ref) {
|
||||
var colorStops = _ref.colorStops,
|
||||
_ref$extent = _ref.extent,
|
||||
extent = _ref$extent === void 0 ? '' : _ref$extent,
|
||||
fallback = _ref.fallback,
|
||||
_ref$position = _ref.position,
|
||||
position = _ref$position === void 0 ? '' : _ref$position,
|
||||
_ref$shape = _ref.shape,
|
||||
shape = _ref$shape === void 0 ? '' : _ref$shape;
|
||||
if (!colorStops || colorStops.length < 2) {
|
||||
throw new _errors["default"](57);
|
||||
}
|
||||
return {
|
||||
backgroundColor: fallback || colorStops[0].split(' ')[0],
|
||||
backgroundImage: (0, _constructGradientValue["default"])(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["radial-gradient(", "", "", "", ")"])), position, shape, extent, colorStops.join(', '))
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
55
VISUALIZACION/node_modules/polished/lib/mixins/radialGradient.js.flow
generated
vendored
Executable file
55
VISUALIZACION/node_modules/polished/lib/mixins/radialGradient.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
// @flow
|
||||
import constructGradientValue from '../internalHelpers/_constructGradientValue'
|
||||
import PolishedError from '../internalHelpers/_errors'
|
||||
|
||||
import type { RadialGradientConfiguration } from '../types/radialGradientConfiguration'
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* CSS for declaring a radial gradient, including a fallback background-color. The fallback is either the first color-stop or an explicitly passed fallback color.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...radialGradient({
|
||||
* colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
* extent: 'farthest-corner at 45px 45px',
|
||||
* position: 'center',
|
||||
* shape: 'ellipse',
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${radialGradient({
|
||||
* colorStops: ['#00FFFF 0%', 'rgba(0, 0, 255, 0) 50%', '#0000FF 95%'],
|
||||
* extent: 'farthest-corner at 45px 45px',
|
||||
* position: 'center',
|
||||
* shape: 'ellipse',
|
||||
* })}
|
||||
*`
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'backgroundColor': '#00FFFF',
|
||||
* 'backgroundImage': 'radial-gradient(center ellipse farthest-corner at 45px 45px, #00FFFF 0%, rgba(0, 0, 255, 0) 50%, #0000FF 95%)',
|
||||
* }
|
||||
*/
|
||||
export default function radialGradient({
|
||||
colorStops,
|
||||
extent = '',
|
||||
fallback,
|
||||
position = '',
|
||||
shape = '',
|
||||
}: RadialGradientConfiguration): Styles {
|
||||
if (!colorStops || colorStops.length < 2) {
|
||||
throw new PolishedError(57)
|
||||
}
|
||||
return {
|
||||
backgroundColor: fallback || colorStops[0].split(' ')[0],
|
||||
backgroundImage: constructGradientValue`radial-gradient(${position}${shape}${extent}${colorStops.join(
|
||||
', ',
|
||||
)})`,
|
||||
}
|
||||
}
|
||||
11
VISUALIZACION/node_modules/polished/lib/mixins/retinaImage.d.ts
generated
vendored
Executable file
11
VISUALIZACION/node_modules/polished/lib/mixins/retinaImage.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function retinaImage(
|
||||
filename: string,
|
||||
backgroundSize?: string,
|
||||
extension?: string,
|
||||
retinaFilename?: string,
|
||||
retinaSuffix?: string,
|
||||
): Styles;
|
||||
|
||||
export default retinaImage;
|
||||
59
VISUALIZACION/node_modules/polished/lib/mixins/retinaImage.js
generated
vendored
Executable file
59
VISUALIZACION/node_modules/polished/lib/mixins/retinaImage.js
generated
vendored
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = retinaImage;
|
||||
var _hiDPI = _interopRequireDefault(require("./hiDPI"));
|
||||
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
||||
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); }
|
||||
/**
|
||||
* A helper to generate a retina background image and non-retina
|
||||
* background image. The retina background image will output to a HiDPI media query. The mixin uses
|
||||
* a _2x.png filename suffix by default.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...retinaImage('my-img')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${retinaImage('my-img')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
* div {
|
||||
* backgroundImage: 'url(my-img.png)',
|
||||
* '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
|
||||
* only screen and (min--moz-device-pixel-ratio: 1.3),
|
||||
* only screen and (-o-min-device-pixel-ratio: 1.3/1),
|
||||
* only screen and (min-resolution: 144dpi),
|
||||
* only screen and (min-resolution: 1.5dppx)': {
|
||||
* backgroundImage: 'url(my-img_2x.png)',
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
function retinaImage(filename, backgroundSize, extension, retinaFilename, retinaSuffix) {
|
||||
var _ref;
|
||||
if (extension === void 0) {
|
||||
extension = 'png';
|
||||
}
|
||||
if (retinaSuffix === void 0) {
|
||||
retinaSuffix = '_2x';
|
||||
}
|
||||
if (!filename) {
|
||||
throw new _errors["default"](58);
|
||||
}
|
||||
// Replace the dot at the beginning of the passed extension if one exists
|
||||
var ext = extension.replace(/^\./, '');
|
||||
var rFilename = retinaFilename ? retinaFilename + "." + ext : "" + filename + retinaSuffix + "." + ext;
|
||||
return _ref = {
|
||||
backgroundImage: "url(" + filename + "." + ext + ")"
|
||||
}, _ref[(0, _hiDPI["default"])()] = _extends({
|
||||
backgroundImage: "url(" + rFilename + ")"
|
||||
}, backgroundSize ? {
|
||||
backgroundSize: backgroundSize
|
||||
} : {}), _ref;
|
||||
}
|
||||
module.exports = exports.default;
|
||||
58
VISUALIZACION/node_modules/polished/lib/mixins/retinaImage.js.flow
generated
vendored
Executable file
58
VISUALIZACION/node_modules/polished/lib/mixins/retinaImage.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
// @flow
|
||||
import hiDPI from './hiDPI'
|
||||
import PolishedError from '../internalHelpers/_errors'
|
||||
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* A helper to generate a retina background image and non-retina
|
||||
* background image. The retina background image will output to a HiDPI media query. The mixin uses
|
||||
* a _2x.png filename suffix by default.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...retinaImage('my-img')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${retinaImage('my-img')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
* div {
|
||||
* backgroundImage: 'url(my-img.png)',
|
||||
* '@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
|
||||
* only screen and (min--moz-device-pixel-ratio: 1.3),
|
||||
* only screen and (-o-min-device-pixel-ratio: 1.3/1),
|
||||
* only screen and (min-resolution: 144dpi),
|
||||
* only screen and (min-resolution: 1.5dppx)': {
|
||||
* backgroundImage: 'url(my-img_2x.png)',
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
export default function retinaImage(
|
||||
filename: string,
|
||||
backgroundSize?: string,
|
||||
extension?: string = 'png',
|
||||
retinaFilename?: string,
|
||||
retinaSuffix?: string = '_2x',
|
||||
): Styles {
|
||||
if (!filename) {
|
||||
throw new PolishedError(58)
|
||||
}
|
||||
// Replace the dot at the beginning of the passed extension if one exists
|
||||
const ext = extension.replace(/^\./, '')
|
||||
const rFilename = retinaFilename
|
||||
? `${retinaFilename}.${ext}`
|
||||
: `${filename}${retinaSuffix}.${ext}`
|
||||
|
||||
return {
|
||||
backgroundImage: `url(${filename}.${ext})`,
|
||||
[hiDPI()]: {
|
||||
backgroundImage: `url(${rFilename})`,
|
||||
...(backgroundSize ? { backgroundSize } : {}),
|
||||
},
|
||||
}
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/lib/mixins/timingFunctions.d.ts
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/lib/mixins/timingFunctions.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
import { TimingFunction } from '../types/timingFunction';
|
||||
|
||||
declare function timingFunctions(timingFunction: TimingFunction): string;
|
||||
|
||||
export default timingFunctions;
|
||||
64
VISUALIZACION/node_modules/polished/lib/mixins/timingFunctions.js
generated
vendored
Executable file
64
VISUALIZACION/node_modules/polished/lib/mixins/timingFunctions.js
generated
vendored
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = timingFunctions;
|
||||
/* eslint-disable key-spacing */
|
||||
var functionsMap = {
|
||||
easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',
|
||||
easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',
|
||||
easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',
|
||||
easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',
|
||||
easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
|
||||
easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',
|
||||
easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',
|
||||
easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',
|
||||
easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',
|
||||
easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
|
||||
easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',
|
||||
easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',
|
||||
easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
|
||||
easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',
|
||||
easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',
|
||||
easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',
|
||||
easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',
|
||||
easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',
|
||||
easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',
|
||||
easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
|
||||
easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',
|
||||
easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',
|
||||
easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)'
|
||||
};
|
||||
/* eslint-enable key-spacing */
|
||||
|
||||
function getTimingFunction(functionName) {
|
||||
return functionsMap[functionName];
|
||||
}
|
||||
|
||||
/**
|
||||
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
|
||||
*
|
||||
* @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* 'transitionTimingFunction': timingFunctions('easeInQuad')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* transitionTimingFunction: ${timingFunctions('easeInQuad')};
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* 'div': {
|
||||
* 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
|
||||
* }
|
||||
*/
|
||||
|
||||
function timingFunctions(timingFunction) {
|
||||
return getTimingFunction(timingFunction);
|
||||
}
|
||||
module.exports = exports.default;
|
||||
64
VISUALIZACION/node_modules/polished/lib/mixins/timingFunctions.js.flow
generated
vendored
Executable file
64
VISUALIZACION/node_modules/polished/lib/mixins/timingFunctions.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
// @flow
|
||||
import type { TimingFunction } from '../types/timingFunction'
|
||||
|
||||
/* eslint-disable key-spacing */
|
||||
const functionsMap = {
|
||||
easeInBack: 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',
|
||||
easeInCirc: 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',
|
||||
easeInCubic: 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',
|
||||
easeInExpo: 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',
|
||||
easeInQuad: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
|
||||
easeInQuart: 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',
|
||||
easeInQuint: 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',
|
||||
easeInSine: 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',
|
||||
|
||||
easeOutBack: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',
|
||||
easeOutCubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
|
||||
easeOutCirc: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',
|
||||
easeOutExpo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',
|
||||
easeOutQuad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
|
||||
easeOutQuart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
|
||||
easeOutQuint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',
|
||||
easeOutSine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',
|
||||
|
||||
easeInOutBack: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',
|
||||
easeInOutCirc: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',
|
||||
easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',
|
||||
easeInOutExpo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',
|
||||
easeInOutQuad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
|
||||
easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',
|
||||
easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',
|
||||
easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)',
|
||||
}
|
||||
/* eslint-enable key-spacing */
|
||||
|
||||
function getTimingFunction(functionName: string): string {
|
||||
return functionsMap[functionName]
|
||||
}
|
||||
|
||||
/**
|
||||
* String to represent common easing functions as demonstrated here: (github.com/jaukia/easie).
|
||||
*
|
||||
* @deprecated - This will be deprecated in v5 in favor of `easeIn`, `easeOut`, `easeInOut`.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* 'transitionTimingFunction': timingFunctions('easeInQuad')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* transitionTimingFunction: ${timingFunctions('easeInQuad')};
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* 'div': {
|
||||
* 'transitionTimingFunction': 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
|
||||
* }
|
||||
*/
|
||||
|
||||
export default function timingFunctions(timingFunction: TimingFunction): string {
|
||||
return getTimingFunction(timingFunction)
|
||||
}
|
||||
12
VISUALIZACION/node_modules/polished/lib/mixins/triangle.d.ts
generated
vendored
Executable file
12
VISUALIZACION/node_modules/polished/lib/mixins/triangle.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
import { TriangleConfiguration } from '../types/triangleConfiguration';
|
||||
import { Styles } from '../types/style';
|
||||
|
||||
declare function triangle({
|
||||
pointingDirection,
|
||||
height,
|
||||
width,
|
||||
foregroundColor,
|
||||
backgroundColor,
|
||||
}: TriangleConfiguration): Styles;
|
||||
|
||||
export default triangle;
|
||||
108
VISUALIZACION/node_modules/polished/lib/mixins/triangle.js
generated
vendored
Executable file
108
VISUALIZACION/node_modules/polished/lib/mixins/triangle.js
generated
vendored
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = triangle;
|
||||
var _getValueAndUnit = _interopRequireDefault(require("../helpers/getValueAndUnit"));
|
||||
var _errors = _interopRequireDefault(require("../internalHelpers/_errors"));
|
||||
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); }
|
||||
var getBorderWidth = function getBorderWidth(pointingDirection, height, width) {
|
||||
var fullWidth = "" + width[0] + (width[1] || '');
|
||||
var halfWidth = "" + width[0] / 2 + (width[1] || '');
|
||||
var fullHeight = "" + height[0] + (height[1] || '');
|
||||
var halfHeight = "" + height[0] / 2 + (height[1] || '');
|
||||
switch (pointingDirection) {
|
||||
case 'top':
|
||||
return "0 " + halfWidth + " " + fullHeight + " " + halfWidth;
|
||||
case 'topLeft':
|
||||
return fullWidth + " " + fullHeight + " 0 0";
|
||||
case 'left':
|
||||
return halfHeight + " " + fullWidth + " " + halfHeight + " 0";
|
||||
case 'bottomLeft':
|
||||
return fullWidth + " 0 0 " + fullHeight;
|
||||
case 'bottom':
|
||||
return fullHeight + " " + halfWidth + " 0 " + halfWidth;
|
||||
case 'bottomRight':
|
||||
return "0 0 " + fullWidth + " " + fullHeight;
|
||||
case 'right':
|
||||
return halfHeight + " 0 " + halfHeight + " " + fullWidth;
|
||||
case 'topRight':
|
||||
default:
|
||||
return "0 " + fullWidth + " " + fullHeight + " 0";
|
||||
}
|
||||
};
|
||||
var getBorderColor = function getBorderColor(pointingDirection, foregroundColor) {
|
||||
switch (pointingDirection) {
|
||||
case 'top':
|
||||
case 'bottomRight':
|
||||
return {
|
||||
borderBottomColor: foregroundColor
|
||||
};
|
||||
case 'right':
|
||||
case 'bottomLeft':
|
||||
return {
|
||||
borderLeftColor: foregroundColor
|
||||
};
|
||||
case 'bottom':
|
||||
case 'topLeft':
|
||||
return {
|
||||
borderTopColor: foregroundColor
|
||||
};
|
||||
case 'left':
|
||||
case 'topRight':
|
||||
return {
|
||||
borderRightColor: foregroundColor
|
||||
};
|
||||
default:
|
||||
throw new _errors["default"](59);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* CSS to represent triangle with any pointing direction with an optional background color.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
*
|
||||
* const styles = {
|
||||
* ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })
|
||||
* }
|
||||
*
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}
|
||||
*
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'borderColor': 'transparent transparent transparent red',
|
||||
* 'borderStyle': 'solid',
|
||||
* 'borderWidth': '50px 0 50px 100px',
|
||||
* 'height': '0',
|
||||
* 'width': '0',
|
||||
* }
|
||||
*/
|
||||
function triangle(_ref) {
|
||||
var pointingDirection = _ref.pointingDirection,
|
||||
height = _ref.height,
|
||||
width = _ref.width,
|
||||
foregroundColor = _ref.foregroundColor,
|
||||
_ref$backgroundColor = _ref.backgroundColor,
|
||||
backgroundColor = _ref$backgroundColor === void 0 ? 'transparent' : _ref$backgroundColor;
|
||||
var widthAndUnit = (0, _getValueAndUnit["default"])(width);
|
||||
var heightAndUnit = (0, _getValueAndUnit["default"])(height);
|
||||
if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {
|
||||
throw new _errors["default"](60);
|
||||
}
|
||||
return _extends({
|
||||
width: '0',
|
||||
height: '0',
|
||||
borderColor: backgroundColor
|
||||
}, getBorderColor(pointingDirection, foregroundColor), {
|
||||
borderStyle: 'solid',
|
||||
borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit)
|
||||
});
|
||||
}
|
||||
module.exports = exports.default;
|
||||
108
VISUALIZACION/node_modules/polished/lib/mixins/triangle.js.flow
generated
vendored
Executable file
108
VISUALIZACION/node_modules/polished/lib/mixins/triangle.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
// @flow
|
||||
import getValueAndUnit from '../helpers/getValueAndUnit'
|
||||
import PolishedError from '../internalHelpers/_errors'
|
||||
|
||||
import type { SideKeyword } from '../types/sideKeyword'
|
||||
import type { Styles } from '../types/style'
|
||||
import type { TriangleConfiguration } from '../types/triangleConfiguration'
|
||||
|
||||
const getBorderWidth = (
|
||||
pointingDirection: SideKeyword,
|
||||
height: [number, string],
|
||||
width: [number, string],
|
||||
): string => {
|
||||
const fullWidth = `${width[0]}${width[1] || ''}`
|
||||
const halfWidth = `${width[0] / 2}${width[1] || ''}`
|
||||
const fullHeight = `${height[0]}${height[1] || ''}`
|
||||
const halfHeight = `${height[0] / 2}${height[1] || ''}`
|
||||
|
||||
switch (pointingDirection) {
|
||||
case 'top':
|
||||
return `0 ${halfWidth} ${fullHeight} ${halfWidth}`
|
||||
case 'topLeft':
|
||||
return `${fullWidth} ${fullHeight} 0 0`
|
||||
case 'left':
|
||||
return `${halfHeight} ${fullWidth} ${halfHeight} 0`
|
||||
case 'bottomLeft':
|
||||
return `${fullWidth} 0 0 ${fullHeight}`
|
||||
case 'bottom':
|
||||
return `${fullHeight} ${halfWidth} 0 ${halfWidth}`
|
||||
case 'bottomRight':
|
||||
return `0 0 ${fullWidth} ${fullHeight}`
|
||||
case 'right':
|
||||
return `${halfHeight} 0 ${halfHeight} ${fullWidth}`
|
||||
case 'topRight':
|
||||
default:
|
||||
return `0 ${fullWidth} ${fullHeight} 0`
|
||||
}
|
||||
}
|
||||
|
||||
const getBorderColor = (pointingDirection: SideKeyword, foregroundColor: string): Object => {
|
||||
switch (pointingDirection) {
|
||||
case 'top':
|
||||
case 'bottomRight':
|
||||
return { borderBottomColor: foregroundColor }
|
||||
case 'right':
|
||||
case 'bottomLeft':
|
||||
return { borderLeftColor: foregroundColor }
|
||||
case 'bottom':
|
||||
case 'topLeft':
|
||||
return { borderTopColor: foregroundColor }
|
||||
case 'left':
|
||||
case 'topRight':
|
||||
return { borderRightColor: foregroundColor }
|
||||
|
||||
default:
|
||||
throw new PolishedError(59)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* CSS to represent triangle with any pointing direction with an optional background color.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
*
|
||||
* const styles = {
|
||||
* ...triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })
|
||||
* }
|
||||
*
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${triangle({ pointingDirection: 'right', width: '100px', height: '100px', foregroundColor: 'red' })}
|
||||
*
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div: {
|
||||
* 'borderColor': 'transparent transparent transparent red',
|
||||
* 'borderStyle': 'solid',
|
||||
* 'borderWidth': '50px 0 50px 100px',
|
||||
* 'height': '0',
|
||||
* 'width': '0',
|
||||
* }
|
||||
*/
|
||||
export default function triangle({
|
||||
pointingDirection,
|
||||
height,
|
||||
width,
|
||||
foregroundColor,
|
||||
backgroundColor = 'transparent',
|
||||
}: TriangleConfiguration): Styles {
|
||||
const widthAndUnit = getValueAndUnit(width)
|
||||
const heightAndUnit = getValueAndUnit(height)
|
||||
|
||||
if (isNaN(heightAndUnit[0]) || isNaN(widthAndUnit[0])) {
|
||||
throw new PolishedError(60)
|
||||
}
|
||||
|
||||
return {
|
||||
width: '0',
|
||||
height: '0',
|
||||
borderColor: backgroundColor,
|
||||
...getBorderColor(pointingDirection, foregroundColor),
|
||||
borderStyle: 'solid',
|
||||
borderWidth: getBorderWidth(pointingDirection, heightAndUnit, widthAndUnit),
|
||||
}
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.d.ts
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
import { Styles } from '../types/style';
|
||||
|
||||
declare function wordWrap(wrap?: string): Styles;
|
||||
|
||||
export default wordWrap;
|
||||
38
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.js
generated
vendored
Executable file
38
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.js
generated
vendored
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = wordWrap;
|
||||
/**
|
||||
* Provides an easy way to change the `wordWrap` property.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...wordWrap('break-word')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${wordWrap('break-word')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* const styles = {
|
||||
* overflowWrap: 'break-word',
|
||||
* wordWrap: 'break-word',
|
||||
* wordBreak: 'break-all',
|
||||
* }
|
||||
*/
|
||||
function wordWrap(wrap) {
|
||||
if (wrap === void 0) {
|
||||
wrap = 'break-word';
|
||||
}
|
||||
var wordBreak = wrap === 'break-word' ? 'break-all' : wrap;
|
||||
return {
|
||||
overflowWrap: wrap,
|
||||
wordWrap: wrap,
|
||||
wordBreak: wordBreak
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
33
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.js.flow
generated
vendored
Executable file
33
VISUALIZACION/node_modules/polished/lib/mixins/wordWrap.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* Provides an easy way to change the `wordWrap` property.
|
||||
*
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...wordWrap('break-word')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${wordWrap('break-word')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* const styles = {
|
||||
* overflowWrap: 'break-word',
|
||||
* wordWrap: 'break-word',
|
||||
* wordBreak: 'break-all',
|
||||
* }
|
||||
*/
|
||||
export default function wordWrap(wrap?: string = 'break-word'): Styles {
|
||||
const wordBreak = wrap === 'break-word' ? 'break-all' : wrap
|
||||
return {
|
||||
overflowWrap: wrap,
|
||||
wordWrap: wrap,
|
||||
wordBreak,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue