flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
4
VISUALIZACION/node_modules/polished/.husky/post-commit
generated
vendored
Executable file
4
VISUALIZACION/node_modules/polished/.husky/post-commit
generated
vendored
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
validate-commit-msg
|
||||
4
VISUALIZACION/node_modules/polished/.husky/pre-commit
generated
vendored
Executable file
4
VISUALIZACION/node_modules/polished/.husky/pre-commit
generated
vendored
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
lint-staged --debug
|
||||
5
VISUALIZACION/node_modules/polished/.yarnrc
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/.yarnrc
generated
vendored
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
yarn-path ".yarn/releases/yarn-1.22.5.cjs"
|
||||
21
VISUALIZACION/node_modules/polished/LICENSE.md
generated
vendored
Executable file
21
VISUALIZACION/node_modules/polished/LICENSE.md
generated
vendored
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2016-Present Brian Hough and Maximilian Stoiber
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
129
VISUALIZACION/node_modules/polished/README.md
generated
vendored
Executable file
129
VISUALIZACION/node_modules/polished/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,129 @@
|
|||
<a href="https://github.com/styled-components/polished">
|
||||
<img alt="polished" src="https://raw.githubusercontent.com/styled-components/brand/master/polished.png" height="150px" />
|
||||
</a>
|
||||
<br />
|
||||
|
||||
A lightweight toolset for writing styles in JavaScript. ✨
|
||||
|
||||

|
||||
[](https://codecov.io/gh/styled-components/polished)
|
||||
[](https://npmcharts.com/compare/polished)
|
||||
|
||||
```sh
|
||||
npm install --save polished
|
||||
# or if you're using yarn
|
||||
yarn add polished
|
||||
```
|
||||
|
||||
Want to write styles in JavaScript, but also want Sass-style helper functions and mixins? Need a consistent color palette throughout your app? `✨ polished` is for you!
|
||||
|
||||
- **Make your app look great without stress**
|
||||
- **Cross framework compatible**: No matter if you're using [`styled-components`](https://github.com/styled-components/styled-components), emotion, jss, aphrodite, radium, or plain inline styles, as long as you're writing your styles in JavaScript you can use polished!
|
||||
- **Switching from a pre-processor to styles in JS made easy**
|
||||
|
||||
## Docs
|
||||
|
||||
**See the full documentation at [polished.js.org](http://polished.js.org/docs)!**
|
||||
|
||||
## Usage
|
||||
|
||||
`✨ polished` modules are meant to be used as stand-alone imports. You should avoid importing the entire library directly:
|
||||
|
||||
`import { clearFix, animation } from 'polished'`
|
||||
~`import * as polished from 'polished`~
|
||||
~`import polished from 'polished'`~
|
||||
|
||||
When `✨ polished` modules are imported properly, tree shaking in [webpack](https://webpack.js.org/guides/tree-shaking/) and [Rollup](https://github.com/rollup/rollup#tree-shaking) can be leveraged to reduce your bundle size.
|
||||
|
||||
## Browser Support
|
||||
All Evergreen Browsers + IE11
|
||||
|
||||
As of v3.6.X we support `>0.5%, not dead, ie >= 11, not op_mini all` for all our builds.
|
||||
|
||||
## Flow Type Definitions
|
||||
|
||||
`✨ polished` has first-class [Flow](https://flow.org/) support with zero configuration to assist you in finding type errors while using our modules.
|
||||
|
||||
### Ignore ✨ polished source
|
||||
|
||||
Flow frequently updates and it is possible that the version you are running may cause you to run into errors coming from the `polished` package in your `node_modules` directory. You can add the following lines to your `.flowconfig` to ignore `polished` in those cases:
|
||||
|
||||
```bash
|
||||
[ignore]
|
||||
.*/node_modules/polished/.*
|
||||
```
|
||||
|
||||
## TypeScript Definitions
|
||||
|
||||
`✨ polished` has [TypeScript](https://www.typescriptlang.org/) definitions to allow the library to be used in any TypeScript project. You will need to set `moduleResolution` to `node` in your `tsconfig.json` in order to use `✨ polished` with TypeScript.
|
||||
|
||||
### Babel plugin
|
||||
|
||||
You can optionally also use [`babel-plugin-polished`](https://github.com/styled-components/babel-plugin-polished) to compile the static function calls out and remove the (already tiny) runtime performance impact of using `✨ polished`.
|
||||
|
||||
### Object Spread Properties
|
||||
|
||||
In the documentation you will see examples using [object spread properties](https://github.com/tc39/proposal-object-rest-spread) (`{ ...other }`). To enable this syntax in your project add the [`transform-object-rest-spread` plugin](https://www.npmjs.com/package/babel-plugin-transform-object-rest-spread) (or the [`stage-3` preset](https://babeljs.io/docs/plugins/preset-stage-3/) to enable all stage three features) to your Babel configuration.
|
||||
|
||||
## Why?
|
||||
|
||||
When writing styles in JavaScript, many people need Sass-style helper functions to be productive. `✨ polished` brings them to you in a nice, lightweight package tailor-made for styles in JavaScript.
|
||||
|
||||
The main difference with Sass is that it's written in a functional style and all color functions are curried. This means you can compose them together into your own reusable helpers with a `compose` function of your choice:
|
||||
|
||||
```JS
|
||||
import { compose } from 'ramda' // Replace with any compose() function of your choice
|
||||
import { lighten, desaturate } from 'polished'
|
||||
|
||||
// Create tone() helper
|
||||
const tone = compose(lighten(0.1), desaturate(0.1))
|
||||
```
|
||||
|
||||
### Why not `package-xyz`?
|
||||
|
||||
First of all, we didn't find another library that had everything we needed, and we don't care about installing a dozen packages separately.
|
||||
|
||||
Specifically most other packages that provide color functions do so in an object-oriented style, often with a fluent API that's very different from the Sass-style helpers. This means people that aren't very familiar with JavaScript might shy away from using them.
|
||||
|
||||
`✨ polished` was made as a standard library for everybody, no matter if they know JS inside out or not.
|
||||
|
||||
## Compatibility
|
||||
|
||||
✨ polished is **compatible with any library that accepts styles as JS objects**. This includes, but is by far not limited to, `styled-components`, radium, aphrodite, glamor, glamorous, jss and many more!
|
||||
|
||||
No matter if you're using [inline styles or CSS-in-JS](http://mxstbr.blog/2016/11/inline-styles-vs-css-in-js/), polished is for you.
|
||||
|
||||
## Contributors
|
||||
|
||||
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
|
||||
<a href="https://github.com/styled-components/polished/graphs/contributors"><img src="https://opencollective.com/polished/contributors.svg?width=890&button=false" /></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/polished#backer)]
|
||||
|
||||
<a href="https://opencollective.com/polished#backers" target="_blank"><img src="https://opencollective.com/polished/backers.svg?width=890"></a>
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/polished#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/polished/sponsor/0/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/1/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/2/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/3/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/4/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/5/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/6/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/7/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/8/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/polished/sponsor/9/website" target="_blank"><img src="https://opencollective.com/polished/sponsor/9/avatar.svg"></a>
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2016-2021 Brian Hough, Maximilian Stoiber, & Nik Graf. Licensed under the MIT License, see [LICENSE.md](LICENSE.md) for more information!
|
||||
|
||||
<img src="https://static.scarf.sh/a.png?x-pxid=121e67af-0b5f-4132-a6e7-6ae63ebeedac" />
|
||||
4040
VISUALIZACION/node_modules/polished/dist/polished.cjs.js
generated
vendored
Executable file
4040
VISUALIZACION/node_modules/polished/dist/polished.cjs.js
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
3956
VISUALIZACION/node_modules/polished/dist/polished.esm.js
generated
vendored
Executable file
3956
VISUALIZACION/node_modules/polished/dist/polished.esm.js
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
4038
VISUALIZACION/node_modules/polished/dist/polished.js
generated
vendored
Executable file
4038
VISUALIZACION/node_modules/polished/dist/polished.js
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
1
VISUALIZACION/node_modules/polished/dist/polished.min.js
generated
vendored
Executable file
1
VISUALIZACION/node_modules/polished/dist/polished.min.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
BIN
VISUALIZACION/node_modules/polished/docs/assets/GitHub-Mark-Light-64px.png
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/GitHub-Mark-Light-64px.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
197
VISUALIZACION/node_modules/polished/docs/assets/anchor.js
generated
vendored
Executable file
197
VISUALIZACION/node_modules/polished/docs/assets/anchor.js
generated
vendored
Executable file
|
|
@ -0,0 +1,197 @@
|
|||
/*!
|
||||
* AnchorJS - v1.2.1 - 2015-07-02
|
||||
* https://github.com/bryanbraun/anchorjs
|
||||
* Copyright (c) 2015 Bryan Braun; Licensed MIT
|
||||
*/
|
||||
|
||||
function AnchorJS(options) {
|
||||
'use strict';
|
||||
|
||||
this.options = options || {};
|
||||
|
||||
this._applyRemainingDefaultOptions = function(opts) {
|
||||
this.options.icon = this.options.hasOwnProperty('icon') ? opts.icon : '\ue9cb'; // Accepts characters (and also URLs?), like '#', '¶', '❡', or '§'.
|
||||
this.options.visible = this.options.hasOwnProperty('visible') ? opts.visible : 'hover'; // Also accepts 'always'
|
||||
this.options.placement = this.options.hasOwnProperty('placement') ? opts.placement : 'right'; // Also accepts 'left'
|
||||
this.options.class = this.options.hasOwnProperty('class') ? opts.class : ''; // Accepts any class name.
|
||||
};
|
||||
|
||||
this._applyRemainingDefaultOptions(options);
|
||||
|
||||
this.add = function(selector) {
|
||||
var elements,
|
||||
elsWithIds,
|
||||
idList,
|
||||
elementID,
|
||||
i,
|
||||
roughText,
|
||||
tidyText,
|
||||
index,
|
||||
count,
|
||||
newTidyText,
|
||||
readableID,
|
||||
anchor;
|
||||
|
||||
this._applyRemainingDefaultOptions(this.options);
|
||||
|
||||
// Provide a sensible default selector, if none is given.
|
||||
if (!selector) {
|
||||
selector = 'h1, h2, h3, h4, h5, h6';
|
||||
} else if (typeof selector !== 'string') {
|
||||
throw new Error('The selector provided to AnchorJS was invalid.');
|
||||
}
|
||||
|
||||
elements = document.querySelectorAll(selector);
|
||||
if (elements.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this._addBaselineStyles();
|
||||
|
||||
// We produce a list of existing IDs so we don't generate a duplicate.
|
||||
elsWithIds = document.querySelectorAll('[id]');
|
||||
idList = [].map.call(elsWithIds, function assign(el) {
|
||||
return el.id;
|
||||
});
|
||||
|
||||
for (i = 0; i < elements.length; i++) {
|
||||
|
||||
if (elements[i].hasAttribute('id')) {
|
||||
elementID = elements[i].getAttribute('id');
|
||||
} else {
|
||||
roughText = elements[i].textContent;
|
||||
|
||||
// Refine it so it makes a good ID. Strip out non-safe characters, replace
|
||||
// spaces with hyphens, truncate to 32 characters, and make toLowerCase.
|
||||
//
|
||||
// Example string: // '⚡⚡⚡ Unicode icons are cool--but they definitely don't belong in a URL fragment.'
|
||||
tidyText = roughText.replace(/[^\w\s-]/gi, '') // ' Unicode icons are cool--but they definitely dont belong in a URL fragment'
|
||||
.replace(/\s+/g, '-') // '-Unicode-icons-are-cool--but-they-definitely-dont-belong-in-a-URL-fragment'
|
||||
.replace(/-{2,}/g, '-') // '-Unicode-icons-are-cool-but-they-definitely-dont-belong-in-a-URL-fragment'
|
||||
.substring(0, 64) // '-Unicode-icons-are-cool-but-they-definitely-dont-belong-in-a-URL'
|
||||
.replace(/^-+|-+$/gm, '') // 'Unicode-icons-are-cool-but-they-definitely-dont-belong-in-a-URL'
|
||||
.toLowerCase(); // 'unicode-icons-are-cool-but-they-definitely-dont-belong-in-a-url'
|
||||
|
||||
// Compare our generated ID to existing IDs (and increment it if needed)
|
||||
// before we add it to the page.
|
||||
newTidyText = tidyText;
|
||||
count = 0;
|
||||
do {
|
||||
if (index !== undefined) {
|
||||
newTidyText = tidyText + '-' + count;
|
||||
}
|
||||
// .indexOf is supported in IE9+.
|
||||
index = idList.indexOf(newTidyText);
|
||||
count += 1;
|
||||
} while (index !== -1);
|
||||
index = undefined;
|
||||
idList.push(newTidyText);
|
||||
|
||||
// Assign it to our element.
|
||||
// Currently the setAttribute element is only supported in IE9 and above.
|
||||
elements[i].setAttribute('id', newTidyText);
|
||||
|
||||
elementID = newTidyText;
|
||||
}
|
||||
|
||||
readableID = elementID.replace(/-/g, ' ');
|
||||
|
||||
// The following code builds the following DOM structure in a more effiecient (albeit opaque) way.
|
||||
// '<a class="anchorjs-link ' + this.options.class + '" href="#' + elementID + '" aria-label="Anchor link for: ' + readableID + '" data-anchorjs-icon="' + this.options.icon + '"></a>';
|
||||
anchor = document.createElement('a');
|
||||
anchor.className = 'anchorjs-link ' + this.options.class;
|
||||
anchor.href = '#' + elementID;
|
||||
anchor.setAttribute('aria-label', 'Anchor link for: ' + readableID);
|
||||
anchor.setAttribute('data-anchorjs-icon', this.options.icon);
|
||||
|
||||
if (this.options.visible === 'always') {
|
||||
anchor.style.opacity = '1';
|
||||
}
|
||||
|
||||
if (this.options.icon === '\ue9cb') {
|
||||
anchor.style.fontFamily = 'anchorjs-icons';
|
||||
anchor.style.fontStyle = 'normal';
|
||||
anchor.style.fontVariant = 'normal';
|
||||
anchor.style.fontWeight = 'normal';
|
||||
anchor.style.lineHeight = 1;
|
||||
}
|
||||
|
||||
if (this.options.placement === 'left') {
|
||||
anchor.style.position = 'absolute';
|
||||
anchor.style.marginLeft = '-1em';
|
||||
anchor.style.paddingRight = '0.5em';
|
||||
elements[i].insertBefore(anchor, elements[i].firstChild);
|
||||
} else { // if the option provided is `right` (or anything else).
|
||||
anchor.style.paddingLeft = '0.375em';
|
||||
elements[i].appendChild(anchor);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
this.remove = function(selector) {
|
||||
var domAnchor,
|
||||
elements = document.querySelectorAll(selector);
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
domAnchor = elements[i].querySelector('.anchorjs-link');
|
||||
if (domAnchor) {
|
||||
elements[i].removeChild(domAnchor);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
this._addBaselineStyles = function() {
|
||||
// We don't want to add global baseline styles if they've been added before.
|
||||
if (document.head.querySelector('style.anchorjs') !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
var style = document.createElement('style'),
|
||||
linkRule =
|
||||
' .anchorjs-link {' +
|
||||
' opacity: 0;' +
|
||||
' text-decoration: none;' +
|
||||
' -webkit-font-smoothing: antialiased;' +
|
||||
' -moz-osx-font-smoothing: grayscale;' +
|
||||
' }',
|
||||
hoverRule =
|
||||
' *:hover > .anchorjs-link,' +
|
||||
' .anchorjs-link:focus {' +
|
||||
' opacity: 1;' +
|
||||
' }',
|
||||
anchorjsLinkFontFace =
|
||||
' @font-face {' +
|
||||
' font-family: "anchorjs-icons";' +
|
||||
' font-style: normal;' +
|
||||
' font-weight: normal;' + // Icon from icomoon; 10px wide & 10px tall; 2 empty below & 4 above
|
||||
' src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBTUAAAC8AAAAYGNtYXAWi9QdAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zgq29TcAAAF4AAABNGhlYWQEZM3pAAACrAAAADZoaGVhBhUDxgAAAuQAAAAkaG10eASAADEAAAMIAAAAFGxvY2EAKACuAAADHAAAAAxtYXhwAAgAVwAAAygAAAAgbmFtZQ5yJ3cAAANIAAAB2nBvc3QAAwAAAAAFJAAAACAAAwJAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpywPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6cv//f//AAAAAAAg6cv//f//AAH/4xY5AAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAACADEARAJTAsAAKwBUAAABIiYnJjQ/AT4BMzIWFxYUDwEGIicmND8BNjQnLgEjIgYPAQYUFxYUBw4BIwciJicmND8BNjIXFhQPAQYUFx4BMzI2PwE2NCcmNDc2MhcWFA8BDgEjARQGDAUtLXoWOR8fORYtLTgKGwoKCjgaGg0gEhIgDXoaGgkJBQwHdR85Fi0tOAobCgoKOBoaDSASEiANehoaCQkKGwotLXoWOR8BMwUFLYEuehYXFxYugC44CQkKGwo4GkoaDQ0NDXoaShoKGwoFBe8XFi6ALjgJCQobCjgaShoNDQ0NehpKGgobCgoKLYEuehYXAAEAAAABAACiToc1Xw889QALBAAAAAAA0XnFFgAAAADRecUWAAAAAAJTAsAAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAAlMAAQAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAACAAAAAoAAMQAAAAAACgAUAB4AmgABAAAABQBVAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIABwCfAAEAAAAAAAMADgBLAAEAAAAAAAQADgC0AAEAAAAAAAUACwAqAAEAAAAAAAYADgB1AAEAAAAAAAoAGgDeAAMAAQQJAAEAHAAOAAMAAQQJAAIADgCmAAMAAQQJAAMAHABZAAMAAQQJAAQAHADCAAMAAQQJAAUAFgA1AAMAAQQJAAYAHACDAAMAAQQJAAoANAD4YW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzUmVndWxhcgBSAGUAZwB1AGwAYQByYW5jaG9yanMtaWNvbnMAYQBuAGMAaABvAHIAagBzAC0AaQBjAG8AbgBzRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("truetype");' +
|
||||
' }',
|
||||
pseudoElContent =
|
||||
' [data-anchorjs-icon]::after {' +
|
||||
' content: attr(data-anchorjs-icon);' +
|
||||
' }',
|
||||
firstStyleEl;
|
||||
|
||||
style.className = 'anchorjs';
|
||||
style.appendChild(document.createTextNode('')); // Necessary for Webkit.
|
||||
|
||||
// We place it in the head with the other style tags, if possible, so as to
|
||||
// not look out of place. We insert before the others so these styles can be
|
||||
// overridden if necessary.
|
||||
firstStyleEl = document.head.querySelector('[rel="stylesheet"], style');
|
||||
if (firstStyleEl === undefined) {
|
||||
document.head.appendChild(style);
|
||||
} else {
|
||||
document.head.insertBefore(style, firstStyleEl);
|
||||
}
|
||||
|
||||
style.sheet.insertRule(linkRule, style.sheet.cssRules.length);
|
||||
style.sheet.insertRule(hoverRule, style.sheet.cssRules.length);
|
||||
style.sheet.insertRule(pseudoElContent, style.sheet.cssRules.length);
|
||||
style.sheet.insertRule(anchorjsLinkFontFace, style.sheet.cssRules.length);
|
||||
};
|
||||
}
|
||||
|
||||
var anchors = new AnchorJS();
|
||||
12
VISUALIZACION/node_modules/polished/docs/assets/bass-addons.css
generated
vendored
Executable file
12
VISUALIZACION/node_modules/polished/docs/assets/bass-addons.css
generated
vendored
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
.input {
|
||||
font-family: inherit;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 2rem;
|
||||
padding: .5rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid #ccc;
|
||||
font-size: .875rem;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
543
VISUALIZACION/node_modules/polished/docs/assets/bass.css
generated
vendored
Executable file
543
VISUALIZACION/node_modules/polished/docs/assets/bass.css
generated
vendored
Executable file
|
|
@ -0,0 +1,543 @@
|
|||
/*! Basscss | http://basscss.com | MIT License */
|
||||
|
||||
.h1{ font-size: 2rem }
|
||||
.h2{ font-size: 1.5rem }
|
||||
.h3{ font-size: 1.25rem }
|
||||
.h4{ font-size: 1rem }
|
||||
.h5{ font-size: .875rem }
|
||||
.h6{ font-size: .75rem }
|
||||
|
||||
.font-family-inherit{ font-family:inherit }
|
||||
.font-size-inherit{ font-size:inherit }
|
||||
.text-decoration-none{ text-decoration:none }
|
||||
|
||||
.bold{ font-weight: bold; font-weight: bold }
|
||||
.regular{ font-weight:normal }
|
||||
.italic{ font-style:italic }
|
||||
.caps{ text-transform:uppercase; letter-spacing: .2em; }
|
||||
|
||||
.left-align{ text-align:left }
|
||||
.center{ text-align:center }
|
||||
.right-align{ text-align:right }
|
||||
.justify{ text-align:justify }
|
||||
|
||||
.nowrap{ white-space:nowrap }
|
||||
.break-word{ word-wrap:break-word }
|
||||
|
||||
.line-height-1{ line-height: 1 }
|
||||
.line-height-2{ line-height: 1.125 }
|
||||
.line-height-3{ line-height: 1.25 }
|
||||
.line-height-4{ line-height: 1.5 }
|
||||
|
||||
.list-style-none{ list-style:none }
|
||||
.underline{ text-decoration:underline }
|
||||
|
||||
.truncate{
|
||||
max-width:100%;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
.list-reset{
|
||||
list-style:none;
|
||||
padding-left:0;
|
||||
}
|
||||
|
||||
.inline{ display:inline }
|
||||
.block{ display:block }
|
||||
.inline-block{ display:inline-block }
|
||||
.table{ display:table }
|
||||
.table-cell{ display:table-cell }
|
||||
|
||||
.overflow-hidden{ overflow:hidden }
|
||||
.overflow-scroll{ overflow:scroll }
|
||||
.overflow-auto{ overflow:auto }
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after{
|
||||
content:" ";
|
||||
display:table
|
||||
}
|
||||
.clearfix:after{ clear:both }
|
||||
|
||||
.left{ float:left }
|
||||
.right{ float:right }
|
||||
|
||||
.fit{ max-width:100% }
|
||||
|
||||
.max-width-1{ max-width: 24rem }
|
||||
.max-width-2{ max-width: 32rem }
|
||||
.max-width-3{ max-width: 48rem }
|
||||
.max-width-4{ max-width: 64rem }
|
||||
|
||||
.border-box{ box-sizing:border-box }
|
||||
|
||||
.align-baseline{ vertical-align:baseline }
|
||||
.align-top{ vertical-align:top }
|
||||
.align-middle{ vertical-align:middle }
|
||||
.align-bottom{ vertical-align:bottom }
|
||||
|
||||
.m0{ margin:0 }
|
||||
.mt0{ margin-top:0 }
|
||||
.mr0{ margin-right:0 }
|
||||
.mb0{ margin-bottom:0 }
|
||||
.ml0{ margin-left:0 }
|
||||
.mx0{ margin-left:0; margin-right:0 }
|
||||
.my0{ margin-top:0; margin-bottom:0 }
|
||||
|
||||
.m1{ margin: .5rem }
|
||||
.mt1{ margin-top: .5rem }
|
||||
.mr1{ margin-right: .5rem }
|
||||
.mb1{ margin-bottom: .5rem }
|
||||
.ml1{ margin-left: .5rem }
|
||||
.mx1{ margin-left: .5rem; margin-right: .5rem }
|
||||
.my1{ margin-top: .5rem; margin-bottom: .5rem }
|
||||
|
||||
.m2{ margin: 1rem }
|
||||
.mt2{ margin-top: 1rem }
|
||||
.mr2{ margin-right: 1rem }
|
||||
.mb2{ margin-bottom: 1rem }
|
||||
.ml2{ margin-left: 1rem }
|
||||
.mx2{ margin-left: 1rem; margin-right: 1rem }
|
||||
.my2{ margin-top: 1rem; margin-bottom: 1rem }
|
||||
|
||||
.m3{ margin: 2rem }
|
||||
.mt3{ margin-top: 2rem }
|
||||
.mr3{ margin-right: 2rem }
|
||||
.mb3{ margin-bottom: 2rem }
|
||||
.ml3{ margin-left: 2rem }
|
||||
.mx3{ margin-left: 2rem; margin-right: 2rem }
|
||||
.my3{ margin-top: 2rem; margin-bottom: 2rem }
|
||||
|
||||
.m4{ margin: 4rem }
|
||||
.mt4{ margin-top: 4rem }
|
||||
.mr4{ margin-right: 4rem }
|
||||
.mb4{ margin-bottom: 4rem }
|
||||
.ml4{ margin-left: 4rem }
|
||||
.mx4{ margin-left: 4rem; margin-right: 4rem }
|
||||
.my4{ margin-top: 4rem; margin-bottom: 4rem }
|
||||
|
||||
.mxn1{ margin-left: -.5rem; margin-right: -.5rem; }
|
||||
.mxn2{ margin-left: -1rem; margin-right: -1rem; }
|
||||
.mxn3{ margin-left: -2rem; margin-right: -2rem; }
|
||||
.mxn4{ margin-left: -4rem; margin-right: -4rem; }
|
||||
|
||||
.ml-auto{ margin-left:auto }
|
||||
.mr-auto{ margin-right:auto }
|
||||
.mx-auto{ margin-left:auto; margin-right:auto; }
|
||||
|
||||
.p0{ padding:0 }
|
||||
.pt0{ padding-top:0 }
|
||||
.pr0{ padding-right:0 }
|
||||
.pb0{ padding-bottom:0 }
|
||||
.pl0{ padding-left:0 }
|
||||
.px0{ padding-left:0; padding-right:0 }
|
||||
.py0{ padding-top:0; padding-bottom:0 }
|
||||
|
||||
.p1{ padding: .5rem }
|
||||
.pt1{ padding-top: .5rem }
|
||||
.pr1{ padding-right: .5rem }
|
||||
.pb1{ padding-bottom: .5rem }
|
||||
.pl1{ padding-left: .5rem }
|
||||
.py1{ padding-top: .5rem; padding-bottom: .5rem }
|
||||
.px1{ padding-left: .5rem; padding-right: .5rem }
|
||||
|
||||
.p2{ padding: 1rem }
|
||||
.pt2{ padding-top: 1rem }
|
||||
.pr2{ padding-right: 1rem }
|
||||
.pb2{ padding-bottom: 1rem }
|
||||
.pl2{ padding-left: 1rem }
|
||||
.py2{ padding-top: 1rem; padding-bottom: 1rem }
|
||||
.px2{ padding-left: 1rem; padding-right: 1rem }
|
||||
|
||||
.p3{ padding: 2rem }
|
||||
.pt3{ padding-top: 2rem }
|
||||
.pr3{ padding-right: 2rem }
|
||||
.pb3{ padding-bottom: 2rem }
|
||||
.pl3{ padding-left: 2rem }
|
||||
.py3{ padding-top: 2rem; padding-bottom: 2rem }
|
||||
.px3{ padding-left: 2rem; padding-right: 2rem }
|
||||
|
||||
.p4{ padding: 4rem }
|
||||
.pt4{ padding-top: 4rem }
|
||||
.pr4{ padding-right: 4rem }
|
||||
.pb4{ padding-bottom: 4rem }
|
||||
.pl4{ padding-left: 4rem }
|
||||
.py4{ padding-top: 4rem; padding-bottom: 4rem }
|
||||
.px4{ padding-left: 4rem; padding-right: 4rem }
|
||||
|
||||
.col{
|
||||
float:left;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.col-right{
|
||||
float:right;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.col-1{
|
||||
width:8.33333%;
|
||||
}
|
||||
|
||||
.col-2{
|
||||
width:16.66667%;
|
||||
}
|
||||
|
||||
.col-3{
|
||||
width:25%;
|
||||
}
|
||||
|
||||
.col-4{
|
||||
width:33.33333%;
|
||||
}
|
||||
|
||||
.col-5{
|
||||
width:41.66667%;
|
||||
}
|
||||
|
||||
.col-6{
|
||||
width:50%;
|
||||
}
|
||||
|
||||
.col-7{
|
||||
width:58.33333%;
|
||||
}
|
||||
|
||||
.col-8{
|
||||
width:66.66667%;
|
||||
}
|
||||
|
||||
.col-9{
|
||||
width:75%;
|
||||
}
|
||||
|
||||
.col-10{
|
||||
width:83.33333%;
|
||||
}
|
||||
|
||||
.col-11{
|
||||
width:91.66667%;
|
||||
}
|
||||
|
||||
.col-12{
|
||||
width:100%;
|
||||
}
|
||||
@media (min-width: 40em){
|
||||
|
||||
.sm-col{
|
||||
float:left;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.sm-col-right{
|
||||
float:right;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.sm-col-1{
|
||||
width:8.33333%;
|
||||
}
|
||||
|
||||
.sm-col-2{
|
||||
width:16.66667%;
|
||||
}
|
||||
|
||||
.sm-col-3{
|
||||
width:25%;
|
||||
}
|
||||
|
||||
.sm-col-4{
|
||||
width:33.33333%;
|
||||
}
|
||||
|
||||
.sm-col-5{
|
||||
width:41.66667%;
|
||||
}
|
||||
|
||||
.sm-col-6{
|
||||
width:50%;
|
||||
}
|
||||
|
||||
.sm-col-7{
|
||||
width:58.33333%;
|
||||
}
|
||||
|
||||
.sm-col-8{
|
||||
width:66.66667%;
|
||||
}
|
||||
|
||||
.sm-col-9{
|
||||
width:75%;
|
||||
}
|
||||
|
||||
.sm-col-10{
|
||||
width:83.33333%;
|
||||
}
|
||||
|
||||
.sm-col-11{
|
||||
width:91.66667%;
|
||||
}
|
||||
|
||||
.sm-col-12{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
}
|
||||
@media (min-width: 52em){
|
||||
|
||||
.md-col{
|
||||
float:left;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.md-col-right{
|
||||
float:right;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.md-col-1{
|
||||
width:8.33333%;
|
||||
}
|
||||
|
||||
.md-col-2{
|
||||
width:16.66667%;
|
||||
}
|
||||
|
||||
.md-col-3{
|
||||
width:25%;
|
||||
}
|
||||
|
||||
.md-col-4{
|
||||
width:33.33333%;
|
||||
}
|
||||
|
||||
.md-col-5{
|
||||
width:41.66667%;
|
||||
}
|
||||
|
||||
.md-col-6{
|
||||
width:50%;
|
||||
}
|
||||
|
||||
.md-col-7{
|
||||
width:58.33333%;
|
||||
}
|
||||
|
||||
.md-col-8{
|
||||
width:66.66667%;
|
||||
}
|
||||
|
||||
.md-col-9{
|
||||
width:75%;
|
||||
}
|
||||
|
||||
.md-col-10{
|
||||
width:83.33333%;
|
||||
}
|
||||
|
||||
.md-col-11{
|
||||
width:91.66667%;
|
||||
}
|
||||
|
||||
.md-col-12{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
}
|
||||
@media (min-width: 64em){
|
||||
|
||||
.lg-col{
|
||||
float:left;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.lg-col-right{
|
||||
float:right;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.lg-col-1{
|
||||
width:8.33333%;
|
||||
}
|
||||
|
||||
.lg-col-2{
|
||||
width:16.66667%;
|
||||
}
|
||||
|
||||
.lg-col-3{
|
||||
width:25%;
|
||||
}
|
||||
|
||||
.lg-col-4{
|
||||
width:33.33333%;
|
||||
}
|
||||
|
||||
.lg-col-5{
|
||||
width:41.66667%;
|
||||
}
|
||||
|
||||
.lg-col-6{
|
||||
width:50%;
|
||||
}
|
||||
|
||||
.lg-col-7{
|
||||
width:58.33333%;
|
||||
}
|
||||
|
||||
.lg-col-8{
|
||||
width:66.66667%;
|
||||
}
|
||||
|
||||
.lg-col-9{
|
||||
width:75%;
|
||||
}
|
||||
|
||||
.lg-col-10{
|
||||
width:83.33333%;
|
||||
}
|
||||
|
||||
.lg-col-11{
|
||||
width:91.66667%;
|
||||
}
|
||||
|
||||
.lg-col-12{
|
||||
width:100%;
|
||||
}
|
||||
|
||||
}
|
||||
.flex{ display:-webkit-box; display:-webkit-flex; display:-ms-flexbox; display:flex }
|
||||
|
||||
@media (min-width: 40em){
|
||||
.sm-flex{ display:-webkit-box; display:-webkit-flex; display:-ms-flexbox; display:flex }
|
||||
}
|
||||
|
||||
@media (min-width: 52em){
|
||||
.md-flex{ display:-webkit-box; display:-webkit-flex; display:-ms-flexbox; display:flex }
|
||||
}
|
||||
|
||||
@media (min-width: 64em){
|
||||
.lg-flex{ display:-webkit-box; display:-webkit-flex; display:-ms-flexbox; display:flex }
|
||||
}
|
||||
|
||||
.flex-column{ -webkit-box-orient:vertical; -webkit-box-direction:normal; -webkit-flex-direction:column; -ms-flex-direction:column; flex-direction:column }
|
||||
.flex-wrap{ -webkit-flex-wrap:wrap; -ms-flex-wrap:wrap; flex-wrap:wrap }
|
||||
|
||||
.items-start{ -webkit-box-align:start; -webkit-align-items:flex-start; -ms-flex-align:start; -ms-grid-row-align:flex-start; align-items:flex-start }
|
||||
.items-end{ -webkit-box-align:end; -webkit-align-items:flex-end; -ms-flex-align:end; -ms-grid-row-align:flex-end; align-items:flex-end }
|
||||
.items-center{ -webkit-box-align:center; -webkit-align-items:center; -ms-flex-align:center; -ms-grid-row-align:center; align-items:center }
|
||||
.items-baseline{ -webkit-box-align:baseline; -webkit-align-items:baseline; -ms-flex-align:baseline; -ms-grid-row-align:baseline; align-items:baseline }
|
||||
.items-stretch{ -webkit-box-align:stretch; -webkit-align-items:stretch; -ms-flex-align:stretch; -ms-grid-row-align:stretch; align-items:stretch }
|
||||
|
||||
.self-start{ -webkit-align-self:flex-start; -ms-flex-item-align:start; align-self:flex-start }
|
||||
.self-end{ -webkit-align-self:flex-end; -ms-flex-item-align:end; align-self:flex-end }
|
||||
.self-center{ -webkit-align-self:center; -ms-flex-item-align:center; align-self:center }
|
||||
.self-baseline{ -webkit-align-self:baseline; -ms-flex-item-align:baseline; align-self:baseline }
|
||||
.self-stretch{ -webkit-align-self:stretch; -ms-flex-item-align:stretch; align-self:stretch }
|
||||
|
||||
.justify-start{ -webkit-box-pack:start; -webkit-justify-content:flex-start; -ms-flex-pack:start; justify-content:flex-start }
|
||||
.justify-end{ -webkit-box-pack:end; -webkit-justify-content:flex-end; -ms-flex-pack:end; justify-content:flex-end }
|
||||
.justify-center{ -webkit-box-pack:center; -webkit-justify-content:center; -ms-flex-pack:center; justify-content:center }
|
||||
.justify-between{ -webkit-box-pack:justify; -webkit-justify-content:space-between; -ms-flex-pack:justify; justify-content:space-between }
|
||||
.justify-around{ -webkit-justify-content:space-around; -ms-flex-pack:distribute; justify-content:space-around }
|
||||
|
||||
.content-start{ -webkit-align-content:flex-start; -ms-flex-line-pack:start; align-content:flex-start }
|
||||
.content-end{ -webkit-align-content:flex-end; -ms-flex-line-pack:end; align-content:flex-end }
|
||||
.content-center{ -webkit-align-content:center; -ms-flex-line-pack:center; align-content:center }
|
||||
.content-between{ -webkit-align-content:space-between; -ms-flex-line-pack:justify; align-content:space-between }
|
||||
.content-around{ -webkit-align-content:space-around; -ms-flex-line-pack:distribute; align-content:space-around }
|
||||
.content-stretch{ -webkit-align-content:stretch; -ms-flex-line-pack:stretch; align-content:stretch }
|
||||
.flex-auto{
|
||||
-webkit-box-flex:1;
|
||||
-webkit-flex:1 1 auto;
|
||||
-ms-flex:1 1 auto;
|
||||
flex:1 1 auto;
|
||||
min-width:0;
|
||||
min-height:0;
|
||||
}
|
||||
.flex-none{ -webkit-box-flex:0; -webkit-flex:none; -ms-flex:none; flex:none }
|
||||
|
||||
.order-0{ -webkit-box-ordinal-group:1; -webkit-order:0; -ms-flex-order:0; order:0 }
|
||||
.order-1{ -webkit-box-ordinal-group:2; -webkit-order:1; -ms-flex-order:1; order:1 }
|
||||
.order-2{ -webkit-box-ordinal-group:3; -webkit-order:2; -ms-flex-order:2; order:2 }
|
||||
.order-3{ -webkit-box-ordinal-group:4; -webkit-order:3; -ms-flex-order:3; order:3 }
|
||||
.order-last{ -webkit-box-ordinal-group:100000; -webkit-order:99999; -ms-flex-order:99999; order:99999 }
|
||||
|
||||
.relative{ position:relative }
|
||||
.absolute{ position:absolute }
|
||||
.fixed{ position:fixed }
|
||||
|
||||
.top-0{ top:0 }
|
||||
.right-0{ right:0 }
|
||||
.bottom-0{ bottom:0 }
|
||||
.left-0{ left:0 }
|
||||
|
||||
.z1{ z-index: 1 }
|
||||
.z2{ z-index: 2 }
|
||||
.z3{ z-index: 3 }
|
||||
.z4{ z-index: 4 }
|
||||
|
||||
.border{
|
||||
border-style:solid;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.border-top{
|
||||
border-top-style:solid;
|
||||
border-top-width: 1px;
|
||||
}
|
||||
|
||||
.border-right{
|
||||
border-right-style:solid;
|
||||
border-right-width: 1px;
|
||||
}
|
||||
|
||||
.border-bottom{
|
||||
border-bottom-style:solid;
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
.border-left{
|
||||
border-left-style:solid;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
.border-none{ border:0 }
|
||||
|
||||
.rounded{ border-radius: 3px }
|
||||
.circle{ border-radius:50% }
|
||||
|
||||
.rounded-top{ border-radius: 3px 3px 0 0 }
|
||||
.rounded-right{ border-radius: 0 3px 3px 0 }
|
||||
.rounded-bottom{ border-radius: 0 0 3px 3px }
|
||||
.rounded-left{ border-radius: 3px 0 0 3px }
|
||||
|
||||
.not-rounded{ border-radius:0 }
|
||||
|
||||
.hide{
|
||||
position:absolute !important;
|
||||
height:1px;
|
||||
width:1px;
|
||||
overflow:hidden;
|
||||
clip:rect(1px, 1px, 1px, 1px);
|
||||
}
|
||||
|
||||
@media (max-width: 40em){
|
||||
.xs-hide{ display:none !important }
|
||||
}
|
||||
|
||||
@media (min-width: 40em) and (max-width: 52em){
|
||||
.sm-hide{ display:none !important }
|
||||
}
|
||||
|
||||
@media (min-width: 52em) and (max-width: 64em){
|
||||
.md-hide{ display:none !important }
|
||||
}
|
||||
|
||||
@media (min-width: 64em){
|
||||
.lg-hide{ display:none !important }
|
||||
}
|
||||
|
||||
.display-none{ display:none !important }
|
||||
|
||||
108
VISUALIZACION/node_modules/polished/docs/assets/docs.js
generated
vendored
Executable file
108
VISUALIZACION/node_modules/polished/docs/assets/docs.js
generated
vendored
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
/* global anchors */
|
||||
|
||||
// add anchor links to headers
|
||||
anchors.options.placement = 'left';
|
||||
anchors.add('h3');
|
||||
|
||||
// Filter UI
|
||||
var tocElements = document.getElementById('toc')
|
||||
.getElementsByTagName('li');
|
||||
|
||||
document.getElementById('filter-input')
|
||||
.addEventListener('keyup', function (e) {
|
||||
|
||||
var i, element, children;
|
||||
|
||||
// enter key
|
||||
if (e.keyCode === 13) {
|
||||
// go to the first displayed item in the toc
|
||||
for (i = 0; i < tocElements.length; i++) {
|
||||
element = tocElements[i];
|
||||
if (!element.classList.contains('display-none')) {
|
||||
location.replace(element.firstChild.href);
|
||||
return e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var match = function () {
|
||||
return true;
|
||||
};
|
||||
|
||||
var value = this.value.toLowerCase();
|
||||
|
||||
if (!value.match(/^\s*$/)) {
|
||||
match = function (element) {
|
||||
return element.firstChild.innerHTML.toLowerCase().indexOf(value) !== -1;
|
||||
};
|
||||
}
|
||||
|
||||
for (i = 0; i < tocElements.length; i++) {
|
||||
element = tocElements[i];
|
||||
children = Array.from(element.getElementsByTagName('li'));
|
||||
if (match(element) || children.some(match)) {
|
||||
element.classList.remove('display-none');
|
||||
} else {
|
||||
element.classList.add('display-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var toggles = document.getElementsByClassName('toggle-step-sibling');
|
||||
for (var i = 0; i < toggles.length; i++) {
|
||||
toggles[i].addEventListener('click', toggleStepSibling);
|
||||
}
|
||||
|
||||
function toggleStepSibling() {
|
||||
var stepSibling = this.parentNode.parentNode.parentNode.getElementsByClassName('toggle-target')[0];
|
||||
var klass = 'display-none';
|
||||
if (stepSibling.classList.contains(klass)) {
|
||||
stepSibling.classList.remove(klass);
|
||||
stepSibling.innerHTML = '▾';
|
||||
} else {
|
||||
stepSibling.classList.add(klass);
|
||||
stepSibling.innerHTML = '▸';
|
||||
}
|
||||
}
|
||||
|
||||
var items = document.getElementsByClassName('toggle-sibling');
|
||||
for (var j = 0; j < items.length; j++) {
|
||||
items[j].addEventListener('click', toggleSibling);
|
||||
}
|
||||
|
||||
function toggleSibling() {
|
||||
var stepSibling = this.parentNode.getElementsByClassName('toggle-target')[0];
|
||||
var icon = this.getElementsByClassName('icon')[0];
|
||||
var klass = 'display-none';
|
||||
if (stepSibling.classList.contains(klass)) {
|
||||
stepSibling.classList.remove(klass);
|
||||
icon.innerHTML = '▾';
|
||||
} else {
|
||||
stepSibling.classList.add(klass);
|
||||
icon.innerHTML = '▸';
|
||||
}
|
||||
}
|
||||
|
||||
function showHashTarget(targetId) {
|
||||
var hashTarget = document.getElementById(targetId);
|
||||
// new target is hidden
|
||||
if (hashTarget && hashTarget.offsetHeight === 0 &&
|
||||
hashTarget.parentNode.parentNode.classList.contains('display-none')) {
|
||||
hashTarget.parentNode.parentNode.classList.remove('display-none');
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('hashchange', function() {
|
||||
showHashTarget(location.hash.substring(1));
|
||||
});
|
||||
|
||||
showHashTarget(location.hash.substring(1));
|
||||
|
||||
var toclinks = document.getElementsByClassName('pre-open');
|
||||
for (var k = 0; k < toclinks.length; k++) {
|
||||
toclinks[k].addEventListener('mousedown', preOpen, false);
|
||||
}
|
||||
|
||||
function preOpen() {
|
||||
showHashTarget(this.hash.substring(1));
|
||||
}
|
||||
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/EOT/SourceCodePro-Bold.eot
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/EOT/SourceCodePro-Bold.eot
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/EOT/SourceCodePro-Regular.eot
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/EOT/SourceCodePro-Regular.eot
generated
vendored
Executable file
Binary file not shown.
93
VISUALIZACION/node_modules/polished/docs/assets/fonts/LICENSE.txt
generated
vendored
Executable file
93
VISUALIZACION/node_modules/polished/docs/assets/fonts/LICENSE.txt
generated
vendored
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/OTF/SourceCodePro-Bold.otf
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/OTF/SourceCodePro-Bold.otf
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/OTF/SourceCodePro-Regular.otf
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/OTF/SourceCodePro-Regular.otf
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/TTF/SourceCodePro-Bold.ttf
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/TTF/SourceCodePro-Bold.ttf
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/TTF/SourceCodePro-Regular.ttf
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/TTF/SourceCodePro-Regular.ttf
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/OTF/SourceCodePro-Bold.otf.woff
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/OTF/SourceCodePro-Bold.otf.woff
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/OTF/SourceCodePro-Regular.otf.woff
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/OTF/SourceCodePro-Regular.otf.woff
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/TTF/SourceCodePro-Bold.ttf.woff
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/TTF/SourceCodePro-Bold.ttf.woff
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/TTF/SourceCodePro-Regular.ttf.woff
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF/TTF/SourceCodePro-Regular.ttf.woff
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Bold.otf.woff2
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Bold.otf.woff2
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Regular.otf.woff2
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/OTF/SourceCodePro-Regular.otf.woff2
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Bold.ttf.woff2
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Bold.ttf.woff2
generated
vendored
Executable file
Binary file not shown.
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Regular.ttf.woff2
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/fonts/WOFF2/TTF/SourceCodePro-Regular.ttf.woff2
generated
vendored
Executable file
Binary file not shown.
23
VISUALIZACION/node_modules/polished/docs/assets/fonts/source-code-pro.css
generated
vendored
Executable file
23
VISUALIZACION/node_modules/polished/docs/assets/fonts/source-code-pro.css
generated
vendored
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
@font-face{
|
||||
font-family: 'Source Code Pro';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-stretch: normal;
|
||||
src: url('EOT/SourceCodePro-Regular.eot') format('embedded-opentype'),
|
||||
url('WOFF2/TTF/SourceCodePro-Regular.ttf.woff2') format('woff2'),
|
||||
url('WOFF/OTF/SourceCodePro-Regular.otf.woff') format('woff'),
|
||||
url('OTF/SourceCodePro-Regular.otf') format('opentype'),
|
||||
url('TTF/SourceCodePro-Regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face{
|
||||
font-family: 'Source Code Pro';
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-stretch: normal;
|
||||
src: url('EOT/SourceCodePro-Bold.eot') format('embedded-opentype'),
|
||||
url('WOFF2/TTF/SourceCodePro-Bold.ttf.woff2') format('woff2'),
|
||||
url('WOFF/OTF/SourceCodePro-Bold.otf.woff') format('woff'),
|
||||
url('OTF/SourceCodePro-Bold.otf') format('opentype'),
|
||||
url('TTF/SourceCodePro-Bold.ttf') format('truetype');
|
||||
}
|
||||
91
VISUALIZACION/node_modules/polished/docs/assets/github.css
generated
vendored
Executable file
91
VISUALIZACION/node_modules/polished/docs/assets/github.css
generated
vendored
Executable file
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
grayscale style (c) MY Sun <simonmysun@gmail.com>
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #777;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-subst {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-doctag,
|
||||
.hljs-formula,
|
||||
.hljs-number,
|
||||
.hljs-literal {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-selector-id {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-type,
|
||||
.hljs-name {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hljs-regexp {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-link {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
5
VISUALIZACION/node_modules/polished/docs/assets/highlight.pack.js
generated
vendored
Executable file
5
VISUALIZACION/node_modules/polished/docs/assets/highlight.pack.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
VISUALIZACION/node_modules/polished/docs/assets/logo.svg
generated
vendored
Executable file
1
VISUALIZACION/node_modules/polished/docs/assets/logo.svg
generated
vendored
Executable file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="318" height="318" viewBox="0 0 318 318"><title>polished</title><defs><path id="a" d="M0 0h318v318H0z"/><mask id="b" width="318" height="318" x="0" y="0" fill="#fff"><use xlink:href="#a"/></mask></defs><g fill="none" fill-rule="evenodd"><use stroke="#4A4A4A" stroke-width="8" mask="url(#b)" xlink:href="#a"/><text fill="#4A4A4A" font-family="FiraSans-Medium, Fira Sans" font-size="36" font-weight="400"><tspan x="34" y="280">polished</tspan></text><text fill="#4A4A4A" font-family="FiraCode-Light, Fira Code" font-size="80" font-weight="300" letter-spacing=".4" transform="translate(33 46)"><tspan x="0" y="81">${</tspan></text><text fill="#4A4A4A" font-family="FiraCode-Light, Fira Code" font-size="80" font-weight="300" letter-spacing=".4" transform="translate(33 46)"><tspan x="206" y="81">}</tspan></text><text fill="#000" font-family="AppleColorEmoji, Apple Color Emoji" font-size="100" letter-spacing=".5" transform="translate(33 46)"><tspan x="108" y="100">✨</tspan></text></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
VISUALIZACION/node_modules/polished/docs/assets/meta.png
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/assets/meta.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
4038
VISUALIZACION/node_modules/polished/docs/assets/polished.js
generated
vendored
Executable file
4038
VISUALIZACION/node_modules/polished/docs/assets/polished.js
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
3
VISUALIZACION/node_modules/polished/docs/assets/script.js
generated
vendored
Executable file
3
VISUALIZACION/node_modules/polished/docs/assets/script.js
generated
vendored
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
Object.assign(window, polished)
|
||||
console.log('> console.log(polished)')
|
||||
console.log(polished)
|
||||
287
VISUALIZACION/node_modules/polished/docs/assets/style.css
generated
vendored
Executable file
287
VISUALIZACION/node_modules/polished/docs/assets/style.css
generated
vendored
Executable file
|
|
@ -0,0 +1,287 @@
|
|||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
||||
color: #222;
|
||||
line-height: 1.5;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.documentation {
|
||||
background: #65daa2;
|
||||
}
|
||||
|
||||
.home {
|
||||
background: #65daa2;
|
||||
color: #fff!important;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-top: 5em;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 10em;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.home h2,
|
||||
.home h3 {
|
||||
text-shadow: 0 1px 1px #3a9b6d;
|
||||
text-shadow: 0 1px 1px rgba(58, 155, 109, 0.37);
|
||||
}
|
||||
|
||||
.home a {
|
||||
color: #fff!important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.home h2 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.home h3 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.installation {
|
||||
margin-bottom: 1.5em;
|
||||
margin-top: 1.5em;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.command, .javascript {
|
||||
background-color: #3a9b6d;
|
||||
color: #d6f5e6;
|
||||
border-radius: 4px;
|
||||
padding: 0.5em 1.5em;
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
#installation ~ .installation, #usage ~ .usage {
|
||||
text-align: center;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.command:before {
|
||||
content: "$";
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.button {
|
||||
background-color: #ff583f;
|
||||
border-bottom: 4px solid #D7493A;
|
||||
border-radius: 4px;
|
||||
padding: 1em 2em;
|
||||
color: #fff!important;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
display: inline-block;
|
||||
text-decoration: none!important;
|
||||
}
|
||||
|
||||
.button img {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
transform: translateY(0.1em);
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
text-decoration: none;
|
||||
border-bottom: 5px solid #D7493A;
|
||||
transform: translateY(-1px);
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.button:active {
|
||||
text-decoration: none;
|
||||
border-bottom: 3px solid #D7493A;
|
||||
transform: translateY(1px);
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.main {
|
||||
text-align: center;
|
||||
max-width: 35em;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
text-shadow: 0 1px 1px #3a9b6d;
|
||||
text-shadow: 0 1px 1px rgba(58, 155, 109, 0.37);
|
||||
}
|
||||
|
||||
.repl {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 35em;
|
||||
height: 10em;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin: 2em auto;
|
||||
background: #48be85;
|
||||
padding: 1em;
|
||||
border-radius: 4px;
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.repl__input,
|
||||
.repl__output {
|
||||
position: relative;
|
||||
text-align: left;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 50%;
|
||||
overflow: scroll;
|
||||
color: #1e7b4f;
|
||||
}
|
||||
|
||||
.repl__arg {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.repl__func {
|
||||
color: #0a291a;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 1px #3a9b6d;
|
||||
text-shadow: 0 1px 1px rgba(58, 155, 109, 0.37);
|
||||
}
|
||||
|
||||
.bg-white {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 20px 0 10px 0;
|
||||
}
|
||||
|
||||
.documentation h3 {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-color: #ddd;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0D3523;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.section__heading {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
text-shadow: 0 1px 1px #3a9b6d;
|
||||
text-shadow: 0 1px 1px rgba(58, 155, 109, 0.37);
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.documentation a[href]:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.py1-ul li {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.max-height-100 {
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
section:target h3 {
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.documentation td,
|
||||
.documentation th {
|
||||
padding: .25rem .25rem;
|
||||
}
|
||||
|
||||
h1:hover .anchorjs-link,
|
||||
h2:hover .anchorjs-link,
|
||||
h3:hover .anchorjs-link,
|
||||
h4:hover .anchorjs-link {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fix-3 {
|
||||
width: 25%;
|
||||
max-width: 244px;
|
||||
}
|
||||
|
||||
.fix-3 {
|
||||
width: 25%;
|
||||
max-width: 244px;
|
||||
}
|
||||
|
||||
@media (min-width: 52em) {
|
||||
.fix-margin-3 {
|
||||
margin-left: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
.pre, pre, code, .code {
|
||||
font-family: Source Code Pro,Menlo,Consolas,Liberation Mono,monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.fill-light {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.width2 {
|
||||
width: 1rem;
|
||||
}
|
||||
|
||||
.input {
|
||||
font-family: inherit;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 2rem;
|
||||
padding: .5rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid #ccc;
|
||||
font-size: .875rem;
|
||||
border-radius: 3px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.prose table th,
|
||||
.prose table td {
|
||||
text-align: left;
|
||||
padding:8px;
|
||||
border:1px solid #ddd;
|
||||
}
|
||||
|
||||
.prose table th:nth-child(1) { border-right: none; }
|
||||
.prose table th:nth-child(2) { border-left: none; }
|
||||
|
||||
.prose table {
|
||||
border:1px solid #ddd;
|
||||
}
|
||||
|
||||
.prose-big {
|
||||
font-size: 18px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.quiet {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.minishadow {
|
||||
box-shadow: 2px 2px 10px #f3f3f3;
|
||||
}
|
||||
11311
VISUALIZACION/node_modules/polished/docs/docs/index.html
generated
vendored
Executable file
11311
VISUALIZACION/node_modules/polished/docs/docs/index.html
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
BIN
VISUALIZACION/node_modules/polished/docs/favicon.png
generated
vendored
Executable file
BIN
VISUALIZACION/node_modules/polished/docs/favicon.png
generated
vendored
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
75
VISUALIZACION/node_modules/polished/docs/index.html
generated
vendored
Executable file
75
VISUALIZACION/node_modules/polished/docs/index.html
generated
vendored
Executable file
|
|
@ -0,0 +1,75 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='utf-8' />
|
||||
<title>polished | A lightweight toolset for writing styles in JavaScript</title>
|
||||
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||
<meta name="description" content="A lightweight toolset for writing styles in JavaScript." />
|
||||
|
||||
<!-- Twitter Card data -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@b_hough">
|
||||
<meta name="twitter:title" content="✨ polished | A lightweight toolset for writing styles in JavaScript">
|
||||
<meta name="twitter:description" content="A lightweight toolset for writing styles in JavaScript.">
|
||||
<meta name="twitter:creator" content="@b_hough">
|
||||
<meta name="twitter:image" content="/assets/meta.png">
|
||||
|
||||
<!-- Open Graph data -->
|
||||
<meta property="og:title" content="✨ polished | A lightweight toolset for writing styles in JavaScript" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="https://styled-components.com/color-schemer/" />
|
||||
<meta property="og:image" content="/assets/meta.png" />
|
||||
<meta property="og:description" content="A lightweight toolset for writing styles in JavaScript." />
|
||||
<meta property="og:site_name" content="✨ polished" />
|
||||
|
||||
<link href='/assets/bass.css' type='text/css' rel='stylesheet' />
|
||||
<link href='/assets/github.css' type='text/css' rel='stylesheet' />
|
||||
<link href='/assets/style.css' type='text/css' rel='stylesheet' />
|
||||
<link rel="shortcut icon" href="/favicon.png" />
|
||||
</head>
|
||||
<body class='home'>
|
||||
|
||||
<header class="header">
|
||||
<img src="/assets/logo.svg" alt="polished" class="logo" />
|
||||
<h2 class="subtitle">A lightweight toolset for writing styles in JavaScript</h2>
|
||||
<a class="button" href="https://github.com/styled-components/polished"><img src="/assets/GitHub-Mark-Light-64px.png" />View on GitHub</a>
|
||||
<a class="button" href="/docs/">Docs</a>
|
||||
<h3>Installation</h3>
|
||||
<div class="installation">
|
||||
<code class="command">npm install --save polished</code>
|
||||
</div>
|
||||
<h3>Usage</h3>
|
||||
<div class="usage">
|
||||
<code class="javascript">import { lighten, modularScale } from 'polished'</code>
|
||||
</div>
|
||||
<h3>Open the console and play around with it!</h3>
|
||||
<div class="repl">
|
||||
<pre class="repl__input"><code>const styles = {
|
||||
color: <span class="repl__func">lighten(0.2, '#000')</span>,
|
||||
"font-size": <span class="repl__func">modularScale(1)</span>,
|
||||
[<span class="repl__func">hiDPI(1.5)</span>]: {
|
||||
"font-size": <span class="repl__func">modularScale(1.25)</span>
|
||||
}
|
||||
}</code></pre>
|
||||
<pre class="repl__output"><code>const styles = {
|
||||
color: <span class="repl__func">'#333'</span>,
|
||||
"font-size": <span class="repl__func">'1.33em'</span>,
|
||||
<span class="repl__func">'@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)'</span>: {
|
||||
"font-size": <span class="repl__func">'1.66625em'</span>,
|
||||
}
|
||||
}</code></pre>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<footer class="footer">
|
||||
<p>Made by <a href="https://github.com/bhough">@bhough</a>, <a href="https://github.com/mxstbr">@mxstbr</a>, <a href="https://github.com/nikgraf">@nikgraf</a> and our <a href="https://github.com/styled-components/polished/graphs/contributors">awesome contributors</a>.</p>
|
||||
</footer>
|
||||
|
||||
|
||||
|
||||
|
||||
<script defer src="/assets/polished.js"></script>
|
||||
<script defer src="/assets/script.js"></script>
|
||||
<img src="https://static.scarf.sh/a.png?x-pxid=8ab52548-9fc9-4161-9e8f-d122cdb6c880" />
|
||||
</body>
|
||||
</html>
|
||||
10
VISUALIZACION/node_modules/polished/lib/color/adjustHue.d.ts
generated
vendored
Executable file
10
VISUALIZACION/node_modules/polished/lib/color/adjustHue.d.ts
generated
vendored
Executable 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
45
VISUALIZACION/node_modules/polished/lib/color/adjustHue.js
generated
vendored
Executable 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;
|
||||
41
VISUALIZACION/node_modules/polished/lib/color/adjustHue.js.flow
generated
vendored
Executable file
41
VISUALIZACION/node_modules/polished/lib/color/adjustHue.js.flow
generated
vendored
Executable 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
|
||||
3
VISUALIZACION/node_modules/polished/lib/color/complement.d.ts
generated
vendored
Executable file
3
VISUALIZACION/node_modules/polished/lib/color/complement.d.ts
generated
vendored
Executable 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
38
VISUALIZACION/node_modules/polished/lib/color/complement.js
generated
vendored
Executable 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;
|
||||
34
VISUALIZACION/node_modules/polished/lib/color/complement.js.flow
generated
vendored
Executable file
34
VISUALIZACION/node_modules/polished/lib/color/complement.js.flow
generated
vendored
Executable 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
7
VISUALIZACION/node_modules/polished/lib/color/darken.d.ts
generated
vendored
Executable 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
45
VISUALIZACION/node_modules/polished/lib/color/darken.js
generated
vendored
Executable 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
41
VISUALIZACION/node_modules/polished/lib/color/darken.js.flow
generated
vendored
Executable 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
|
||||
10
VISUALIZACION/node_modules/polished/lib/color/desaturate.d.ts
generated
vendored
Executable file
10
VISUALIZACION/node_modules/polished/lib/color/desaturate.d.ts
generated
vendored
Executable 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
46
VISUALIZACION/node_modules/polished/lib/color/desaturate.js
generated
vendored
Executable 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;
|
||||
42
VISUALIZACION/node_modules/polished/lib/color/desaturate.js.flow
generated
vendored
Executable file
42
VISUALIZACION/node_modules/polished/lib/color/desaturate.js.flow
generated
vendored
Executable 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
|
||||
3
VISUALIZACION/node_modules/polished/lib/color/getContrast.d.ts
generated
vendored
Executable file
3
VISUALIZACION/node_modules/polished/lib/color/getContrast.d.ts
generated
vendored
Executable 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
19
VISUALIZACION/node_modules/polished/lib/color/getContrast.js
generated
vendored
Executable 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;
|
||||
20
VISUALIZACION/node_modules/polished/lib/color/getContrast.js.flow
generated
vendored
Executable file
20
VISUALIZACION/node_modules/polished/lib/color/getContrast.js.flow
generated
vendored
Executable 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),
|
||||
)
|
||||
}
|
||||
3
VISUALIZACION/node_modules/polished/lib/color/getLuminance.d.ts
generated
vendored
Executable file
3
VISUALIZACION/node_modules/polished/lib/color/getLuminance.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
declare function getLuminance(color: string): number;
|
||||
|
||||
export default getLuminance;
|
||||
45
VISUALIZACION/node_modules/polished/lib/color/getLuminance.js
generated
vendored
Executable file
45
VISUALIZACION/node_modules/polished/lib/color/getLuminance.js
generated
vendored
Executable 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;
|
||||
38
VISUALIZACION/node_modules/polished/lib/color/getLuminance.js.flow
generated
vendored
Executable file
38
VISUALIZACION/node_modules/polished/lib/color/getLuminance.js.flow
generated
vendored
Executable 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))
|
||||
}
|
||||
3
VISUALIZACION/node_modules/polished/lib/color/grayscale.d.ts
generated
vendored
Executable file
3
VISUALIZACION/node_modules/polished/lib/color/grayscale.d.ts
generated
vendored
Executable 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
37
VISUALIZACION/node_modules/polished/lib/color/grayscale.js
generated
vendored
Executable 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;
|
||||
33
VISUALIZACION/node_modules/polished/lib/color/grayscale.js.flow
generated
vendored
Executable file
33
VISUALIZACION/node_modules/polished/lib/color/grayscale.js.flow
generated
vendored
Executable 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
9
VISUALIZACION/node_modules/polished/lib/color/hsl.d.ts
generated
vendored
Executable 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
39
VISUALIZACION/node_modules/polished/lib/color/hsl.js
generated
vendored
Executable 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
46
VISUALIZACION/node_modules/polished/lib/color/hsl.js.flow
generated
vendored
Executable 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)
|
||||
}
|
||||
6
VISUALIZACION/node_modules/polished/lib/color/hslToColorString.d.ts
generated
vendored
Executable file
6
VISUALIZACION/node_modules/polished/lib/color/hslToColorString.d.ts
generated
vendored
Executable 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;
|
||||
51
VISUALIZACION/node_modules/polished/lib/color/hslToColorString.js
generated
vendored
Executable file
51
VISUALIZACION/node_modules/polished/lib/color/hslToColorString.js
generated
vendored
Executable 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;
|
||||
56
VISUALIZACION/node_modules/polished/lib/color/hslToColorString.js.flow
generated
vendored
Executable file
56
VISUALIZACION/node_modules/polished/lib/color/hslToColorString.js.flow
generated
vendored
Executable 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
10
VISUALIZACION/node_modules/polished/lib/color/hsla.d.ts
generated
vendored
Executable 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
43
VISUALIZACION/node_modules/polished/lib/color/hsla.js
generated
vendored
Executable 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
61
VISUALIZACION/node_modules/polished/lib/color/hsla.js.flow
generated
vendored
Executable 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
3
VISUALIZACION/node_modules/polished/lib/color/invert.d.ts
generated
vendored
Executable 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
42
VISUALIZACION/node_modules/polished/lib/color/invert.js
generated
vendored
Executable 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
38
VISUALIZACION/node_modules/polished/lib/color/invert.js.flow
generated
vendored
Executable 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
7
VISUALIZACION/node_modules/polished/lib/color/lighten.d.ts
generated
vendored
Executable 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
45
VISUALIZACION/node_modules/polished/lib/color/lighten.js
generated
vendored
Executable 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;
|
||||
41
VISUALIZACION/node_modules/polished/lib/color/lighten.js.flow
generated
vendored
Executable file
41
VISUALIZACION/node_modules/polished/lib/color/lighten.js.flow
generated
vendored
Executable 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
|
||||
8
VISUALIZACION/node_modules/polished/lib/color/meetsContrastGuidelines.d.ts
generated
vendored
Executable file
8
VISUALIZACION/node_modules/polished/lib/color/meetsContrastGuidelines.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
import { ContrastScores } from '../types/color';
|
||||
|
||||
declare function meetsContrastGuidelines(
|
||||
color1: string,
|
||||
color2: string,
|
||||
): ContrastScores;
|
||||
|
||||
export default meetsContrastGuidelines;
|
||||
23
VISUALIZACION/node_modules/polished/lib/color/meetsContrastGuidelines.js
generated
vendored
Executable file
23
VISUALIZACION/node_modules/polished/lib/color/meetsContrastGuidelines.js
generated
vendored
Executable 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;
|
||||
21
VISUALIZACION/node_modules/polished/lib/color/meetsContrastGuidelines.js.flow
generated
vendored
Executable file
21
VISUALIZACION/node_modules/polished/lib/color/meetsContrastGuidelines.js.flow
generated
vendored
Executable 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
15
VISUALIZACION/node_modules/polished/lib/color/mix.d.ts
generated
vendored
Executable 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
69
VISUALIZACION/node_modules/polished/lib/color/mix.js
generated
vendored
Executable 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
70
VISUALIZACION/node_modules/polished/lib/color/mix.js.flow
generated
vendored
Executable 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
7
VISUALIZACION/node_modules/polished/lib/color/opacify.d.ts
generated
vendored
Executable 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
51
VISUALIZACION/node_modules/polished/lib/color/opacify.js
generated
vendored
Executable 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;
|
||||
47
VISUALIZACION/node_modules/polished/lib/color/opacify.js.flow
generated
vendored
Executable file
47
VISUALIZACION/node_modules/polished/lib/color/opacify.js.flow
generated
vendored
Executable 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
|
||||
6
VISUALIZACION/node_modules/polished/lib/color/parseToHsl.d.ts
generated
vendored
Executable file
6
VISUALIZACION/node_modules/polished/lib/color/parseToHsl.d.ts
generated
vendored
Executable 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
24
VISUALIZACION/node_modules/polished/lib/color/parseToHsl.js
generated
vendored
Executable 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;
|
||||
22
VISUALIZACION/node_modules/polished/lib/color/parseToHsl.js.flow
generated
vendored
Executable file
22
VISUALIZACION/node_modules/polished/lib/color/parseToHsl.js.flow
generated
vendored
Executable 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))
|
||||
}
|
||||
6
VISUALIZACION/node_modules/polished/lib/color/parseToRgb.d.ts
generated
vendored
Executable file
6
VISUALIZACION/node_modules/polished/lib/color/parseToRgb.d.ts
generated
vendored
Executable 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
118
VISUALIZACION/node_modules/polished/lib/color/parseToRgb.js
generated
vendored
Executable 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;
|
||||
126
VISUALIZACION/node_modules/polished/lib/color/parseToRgb.js.flow
generated
vendored
Executable file
126
VISUALIZACION/node_modules/polished/lib/color/parseToRgb.js.flow
generated
vendored
Executable 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)
|
||||
}
|
||||
8
VISUALIZACION/node_modules/polished/lib/color/readableColor.d.ts
generated
vendored
Executable file
8
VISUALIZACION/node_modules/polished/lib/color/readableColor.d.ts
generated
vendored
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
declare function readableColor(
|
||||
color: string,
|
||||
returnIfLightColor?: string,
|
||||
returnIfDarkColor?: string,
|
||||
strict?: boolean,
|
||||
): string;
|
||||
|
||||
export default readableColor;
|
||||
63
VISUALIZACION/node_modules/polished/lib/color/readableColor.js
generated
vendored
Executable file
63
VISUALIZACION/node_modules/polished/lib/color/readableColor.js
generated
vendored
Executable 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;
|
||||
56
VISUALIZACION/node_modules/polished/lib/color/readableColor.js.flow
generated
vendored
Executable file
56
VISUALIZACION/node_modules/polished/lib/color/readableColor.js.flow
generated
vendored
Executable 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
9
VISUALIZACION/node_modules/polished/lib/color/rgb.d.ts
generated
vendored
Executable 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
40
VISUALIZACION/node_modules/polished/lib/color/rgb.js
generated
vendored
Executable 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
39
VISUALIZACION/node_modules/polished/lib/color/rgb.js.flow
generated
vendored
Executable 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)
|
||||
}
|
||||
6
VISUALIZACION/node_modules/polished/lib/color/rgbToColorString.d.ts
generated
vendored
Executable file
6
VISUALIZACION/node_modules/polished/lib/color/rgbToColorString.d.ts
generated
vendored
Executable 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;
|
||||
51
VISUALIZACION/node_modules/polished/lib/color/rgbToColorString.js
generated
vendored
Executable file
51
VISUALIZACION/node_modules/polished/lib/color/rgbToColorString.js
generated
vendored
Executable 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;
|
||||
52
VISUALIZACION/node_modules/polished/lib/color/rgbToColorString.js.flow
generated
vendored
Executable file
52
VISUALIZACION/node_modules/polished/lib/color/rgbToColorString.js.flow
generated
vendored
Executable 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)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue