diff --git a/demo/README.md b/demo/README.md
deleted file mode 100644
index 9f379d6..0000000
--- a/demo/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# <AwesomeButton /> Demo
-
-## Author
-#### Rafael Caferati
-+ Checkout my Full-Stack Web Developer Website
-+ Other open source projects @ Code Laboratory
-+ A scope of my work @ Web Portfolio
-
-## License
-
-MIT. Copyright (c) 2017 Rafael Caferati.
diff --git a/demo/components/body/body.js b/demo/components/body/body.js
deleted file mode 100644
index 871b74c..0000000
--- a/demo/components/body/body.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Styles from './body.scss';
-
-const Body = ({ children }) => (
-
-);
-
-Body.propTypes = {
- children: PropTypes.node.isRequired,
-};
-
-export default Body;
diff --git a/demo/components/body/body.scss b/demo/components/body/body.scss
deleted file mode 100644
index 0b5bced..0000000
--- a/demo/components/body/body.scss
+++ /dev/null
@@ -1,25 +0,0 @@
-.container {
- display: block;
- padding: 0 40px 60px;
- max-width: calc(100% - (500px - var(--customiser-transform)));
- width: 100%;
- height: 100vh;
- overflow-y: scroll;
- background-color: rgba(0, 0, 0, 0.005);
- transition: width .25s ease-out;
- position: relative;
- z-index: 1;
-}
-
-:root {
- --customiser-transform: 0px;
-
- @media all and (max-width: 980px) {
- --customiser-transform: 500px;
- }
-}
-
-.wrapper {
- max-width: 800px;
- margin: 0 auto;
-}
diff --git a/demo/components/borderPicker/borderPicker.js b/demo/components/borderPicker/borderPicker.js
deleted file mode 100644
index bcadbe6..0000000
--- a/demo/components/borderPicker/borderPicker.js
+++ /dev/null
@@ -1,93 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { ColorPicker } from '../index';
-import Styles from './borderPicker.scss';
-
-class CustomiseBorder extends React.Component {
- static propTypes = {
- value: PropTypes.string,
- onChange: PropTypes.func,
- setTransparency: PropTypes.func,
- inputProps: PropTypes.array,
- };
- static defaultProps = {
- value: '',
- onChange: null,
- inputProps: [],
- setTransparency: null,
- };
-
- constructor(props) {
- super(props);
- this.state = {
- color: '',
- width: 0,
- };
- }
-
- UNSAFE_componentWillReceiveProps(props) {
- if (props.value !== this.props.value) {
- this.setValue(props.value);
- }
- }
-
- onRangeChange = (event) => {
- const { value } = event.target;
- this.setState({
- width: value,
- }, this.refreshValues);
- }
-
- onColorChange = (event) => {
- const { value } = event.target;
- this.setState({
- color: value,
- }, this.refreshValues);
- }
-
- setValue(value) {
- let color = '#FFFFFF';
- let width = 0;
- if (value.match(/px/)) {
- color = value.replace(/(.*)?(#)(.*)(.*)?/, '$2$3');
- width = parseInt(value.replace(/^([0-9]{1,2})(px)(.*)$/, '$1'), 10);
- }
- this.setState({
- color,
- width,
- });
- }
-
- refreshValues = () => {
- this.props.onChange({
- target: {
- value: `${this.state.width}px solid ${this.state.color}`,
- },
- });
- }
-
- render() {
- return (
-
-
-
-
- );
- }
-}
-
-export default CustomiseBorder;
diff --git a/demo/components/borderPicker/borderPicker.scss b/demo/components/borderPicker/borderPicker.scss
deleted file mode 100644
index 6b54546..0000000
--- a/demo/components/borderPicker/borderPicker.scss
+++ /dev/null
@@ -1,5 +0,0 @@
-.input {
- &:first-child {
- margin-bottom: 12px;
- }
-}
diff --git a/demo/components/colorPicker/colorPicker.js b/demo/components/colorPicker/colorPicker.js
deleted file mode 100644
index 058c692..0000000
--- a/demo/components/colorPicker/colorPicker.js
+++ /dev/null
@@ -1,46 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Styles from './colorPicker.scss';
-
-class ColorPicker extends React.Component {
- static propTypes = {
- value: PropTypes.string,
- onChange: PropTypes.func,
- setTransparency: PropTypes.func,
- inputProps: PropTypes.array,
- };
- static defaultProps = {
- value: '',
- onChange: null,
- inputProps: [],
- setTransparency: null,
- };
-
- setTransparency = () => {
- this.props.onChange({
- target: {
- value: 'transparent',
- },
- });
- }
-
- render() {
- return (
-
-
-
-
- );
- }
-}
-
-export default ColorPicker;
diff --git a/demo/components/colorPicker/colorPicker.scss b/demo/components/colorPicker/colorPicker.scss
deleted file mode 100644
index 2023ea7..0000000
--- a/demo/components/colorPicker/colorPicker.scss
+++ /dev/null
@@ -1,42 +0,0 @@
-.container {
- display: flex;
- flex-direction: row;
-
- .input[type="color"] {
- display: inline-block;
- margin-right: 6px;
- height: 24px;
- width: 90px;
- }
-
- button {
- outline-color: 0;
- outline-style: none;
- outline-width: 0;
- border: none;
- cursor: pointer;
- width: 24px;
- height: 24px;
- display: inline-block;
- position: relative;
- border: 1px solid #afafaf;
- padding: 2px;
-
- &:before, &:after {
- content: " ";
- width: 9px;
- height: 9px;
- position: absolute;
- top: 2px;
- right: 2px;
- background-color: #999;
- }
-
- &:after {
- top: auto;
- right: auto;
- bottom: 2px;
- left: 2px;
- }
- }
-}
diff --git a/demo/components/composer/composer.js b/demo/components/composer/composer.js
deleted file mode 100644
index ac68dd2..0000000
--- a/demo/components/composer/composer.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Styles from './composer.scss';
-
-const Composer = ({ children }) => (
-
-);
-
-Composer.propTypes = {
- children: PropTypes.node.isRequired,
-};
-
-export default Composer;
diff --git a/demo/components/composer/composer.scss b/demo/components/composer/composer.scss
deleted file mode 100644
index debba87..0000000
--- a/demo/components/composer/composer.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.container {
- display: block;
-}
diff --git a/demo/components/customiser/customiser.js b/demo/components/customiser/customiser.js
deleted file mode 100644
index 26507bb..0000000
--- a/demo/components/customiser/customiser.js
+++ /dev/null
@@ -1,291 +0,0 @@
-import React from 'react';
-import styles from './customiser.scss';
-import { AwesomeButton, AwesomeButtonSocial } from '../../../src/index.ts';
-import { rgba2hex } from '../../helpers/examples';
-import { ColorPicker, BorderPicker } from '../index';
-
-function applyStyles(elements, { property, value }) {
- elements.forEach(element => {
- element.style.setProperty(property, value);
- });
-}
-
-class Customiser extends React.Component {
- constructor(props) {
- super(props);
- this.values = {};
- this.state = {
- customized: false,
- };
- }
-
- state = {
- element: null,
- };
-
- UNSAFE_componentWillMount() {
- this.updateProperties(this.props);
- }
-
- componentDidMount() {
- this.updateElement(this.props.componentClass);
- this.updateAllValues(this.props);
- }
-
- UNSAFE_componentWillReceiveProps(newProps) {
- this.values = {};
- if (this.props.theme !== newProps.theme) {
- this.updateValues = true;
- }
- }
-
- componentDidUpdate() {
- if (this.updateValues === true) {
- this.updateValues = false;
- this.updateAllValues(this.props);
- }
- }
-
- getStylesText() {
- // this.element
- const text = ['.aws-btn {
'];
- this.props.properties.forEach(section => {
- section.props.forEach(prop => {
- const name = `--${prop.name}`;
- text.push(
- `- ${name}: ${this.state[name]}${prop.suffix ||
- ''};
`
- );
- });
- });
- text.push('
}
');
- return text.join('');
- }
-
- updateAllValues(newProps) {
- const state = {
- customized: false,
- };
- if (!this.element) {
- return false;
- }
- newProps.properties.forEach(section => {
- section.props.forEach(prop => {
- const name = `--${prop.name}`;
- let style = getComputedStyle(this.element)
- .getPropertyValue(name)
- .trim();
- if (style.match(/(#)([a-z0-9]{3})($)/)) {
- style = style.replace(/(#)([a-z0-9]{3})/, '$1$2$2');
- }
- if (style.match(/(px|em|s)$/)) {
- style = style.replace(/px|em|s/gi, '');
- }
- if (style.match(/rgb/)) {
- style = rgba2hex(style);
- }
- state[name] = style;
- if (typeof window !== 'undefined') {
- applyStyles(
- document.querySelectorAll(
- `[data-role="customizable"] .${this.props.componentClass}`
- ),
- {
- property: name,
- value: style + (prop.suffix || ''),
- }
- );
- }
- });
- });
- this.setState(state);
- return true;
- }
-
- updateProperties(newProps) {
- if (newProps.properties) {
- const state = {};
- newProps.properties.forEach(section => {
- section.props.forEach(prop => {
- state[`--${prop.name}`] = null;
- });
- });
- this.setState(state);
- }
- }
-
- updateElement(className) {
- if (this.control) {
- this.element = this.control.querySelector(`.${className}`);
- }
- }
-
- resetStyles = () => {
- this.setState({
- customized: false,
- });
- this.updateAllValues(this.props);
- };
-
- exportStyles = () => {
- this.props.openPopover({ text: this.getStylesText() });
- };
-
- updatePopoverText() {
- // this.props.openPopover({ text: this.getStylesText() });
- }
-
- renderInputs(props) {
- return props.map(cssProperty => {
- const { name, type } = cssProperty;
- const buttonName = `--${name}`;
- const extraProps = {};
- extraProps.type = type;
- if (type === 'range') {
- extraProps.type = type;
- extraProps.min = cssProperty.min || 0;
- extraProps.max = cssProperty.max || 10;
- extraProps.step = cssProperty.step || 1;
- }
- const onChange = event => {
- if (this.state.customized === false) {
- this.setState({ customized: true });
- }
- const state = {};
- let { value } = event.target;
- state[buttonName] = value;
- this.setState(state, () => {
- this.updatePopoverText();
- });
- if (typeof window !== 'undefined') {
- if (cssProperty.suffix) {
- value = `${value}${cssProperty.suffix}`;
- }
- applyStyles(
- document.querySelectorAll(
- `[data-role="customizable"] .${this.props.componentClass}`
- ),
- {
- property: buttonName,
- value,
- }
- );
- }
- };
- let input = null;
- switch (type) {
- case 'color':
- input = (
-
- );
- break;
- case 'border':
- input = (
-
- );
- break;
- default:
- input = (
-
- );
- }
- const buttonValue = this.state[buttonName]
- ? `${this.state[buttonName] ||
- this.values[buttonName]}${cssProperty.suffix || ''}` || ''
- : '';
- return (
-
-
- {input}
-
- {buttonValue}
-
-
- );
- });
- }
-
- renderSection(section) {
- return (
-
- {section.name}
- {this.renderInputs(section.props)}
-
- );
- }
-
- renderSections(sections) {
- return sections.map(section => this.renderSection(section));
- }
-
- render() {
- return (
-
-
- {this.renderSections(this.props.properties)}
-
-
- );
- }
-}
-
-export default Customiser;
diff --git a/demo/components/customiser/customiser.scss b/demo/components/customiser/customiser.scss
deleted file mode 100644
index a84da02..0000000
--- a/demo/components/customiser/customiser.scss
+++ /dev/null
@@ -1,107 +0,0 @@
-.container {
- position: fixed;
- right: 0;
- top: 0;
- height: 100vh;
- width: 500px;
- padding: 50px 30px;
- background-color: #333;
- overflow-y: scroll;
- transform: translateX(var(--customiser-transform));
- transition: transform 0.25s ease-out;
- z-index: 100;
-
- footer {
- padding: 10px 0;
-
- p {
- font-size: 14px;
- }
- a {
- font-weight: bold;
- }
- }
-
- header {
- padding-top: 4px;
- margin-bottom: 20px;
- h2 {
- font-size: 24px;
- margin-bottom: 6px;
- }
- p {
- line-height: 24px;
- }
- }
-
- ul {
- list-style: none;
- margin-bottom: 18px;
- }
- h3 {
- font-size: 18px;
- margin-bottom: 4px;
- }
- li {
- display: flex;
- padding: 8px 0;
- label {
- display: block;
- flex: 0 0 220px;
- padding-right: 20px;
- align-self: flex-start;
- }
- > div {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- input {
- display: block;
- }
- input[type="range"] {
- width: 120px;
- }
- input[type="color"] {
- width: 80px;
- margin-right: 40px;
- }
- span {
- display: block;
- width: 100px;
- text-align: right;
- font-size: 14px;
- line-height: 21px;
- font-weight: bold;
- text-align: left;
- padding-left: 20px;
- }
- }
-}
-
-.export {
- padding-top: 24px;
- margin-bottom: 36px;
- position: relative;
-
- &:before {
- content: "";
- width: 60%;
- height: 1px;
- background-color: #6f6f6f;
- position: absolute;
- top: 0;
- left: 0;
- }
-}
-
-.control {
- padding-top: 16px;
-
- svg {
- margin-top: -4px;
- }
- > a, > button {
- margin-right: 10px;
- }
-}
diff --git a/demo/components/example/example.js b/demo/components/example/example.js
deleted file mode 100644
index b3ef641..0000000
--- a/demo/components/example/example.js
+++ /dev/null
@@ -1,110 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Prism from 'prismjs';
-import 'prismjs/components/prism-jsx';
-import 'prismjs/components/prism-javascript';
-import 'prismjs/components/prism-scss';
-import 'prismjs/components/prism-markup';
-import 'prismjs/themes/prism-okaidia.css';
-import Styles from './example.scss';
-
-class Example extends React.Component {
- static propTypes = {
- title: PropTypes.string.isRequired,
- component: PropTypes.object.isRequired,
- examples: PropTypes.array,
- };
- static defaultProps = {
- examples: [],
- };
-
- renderExamples(examples) {
- return examples.map((example, index) => {
- const {
- js,
- jsx,
- scss,
- component,
- description,
- command,
- title,
- } = example;
- return (
-
- {title && (
{title}
)}
- {description && (
{description}
)}
- {command && (
-
- .sh
-
-
- )}
- {js && (
-
- .js
-
-
- )}
- {jsx && (
-
- .jsx
-
-
- )}
- {scss && (
-
- .scss
-
-
- )}
- {component && (
-
- {component}
-
- )}
-
- );
- });
- }
-
- render() {
- const {
- title,
- component,
- examples,
- } = this.props;
-
- return (
-
-
- {title &&
{title}
}
-
-
- {component}
-
- {this.renderExamples(examples)}
-
- );
- }
-}
-
-export default Example;
diff --git a/demo/components/example/example.scss b/demo/components/example/example.scss
deleted file mode 100644
index 255d487..0000000
--- a/demo/components/example/example.scss
+++ /dev/null
@@ -1,98 +0,0 @@
-@import '../../helpers/base.scss';
-.container {
- h3 {
- margin-bottom: 12px;
- font-size: 16px;
- }
-}
-
-.component {
- margin-bottom: 60px;
-
- a, button {
- margin: 8px 0;
- }
-}
-
-.example {
- display: block;
- margin-bottom: 35px;
-
- h3 {
- margin-bottom: 8px;
- font-size: 16px;
- }
-
- p {
- font-size: 16px;
- margin-bottom: 8px;
- }
-
- a, button {
- margin-right: 10px;
- margin-bottom: 10px;
- }
-}
-
-.container {
- list-style: none;
- li {
- margin-bottom: $deca;
- }
- p {
- @extend %text;
- }
- code {
- padding: 12px 20px;
- background-color: rgba(0,0,0,0.05);
- border-radius: 4px;
- overflow-x: auto;
- }
- .header {
- margin-bottom: $double * 2;
- }
- pre {
- display: flex;
- flex-direction: column;
- padding: 0;
- line-height: $deca / 2;
- margin: 16px 0;
- h4 {
- @extend %h4;
- margin-bottom: $unit;
- }
- }
-}
-
-.features {
- margin-bottom: $deca;
- background-color: rgba(0,0,0,0.1);
- padding: $double * 2;
- border-radius: $unit;
- h3 {
- @extend %h3;
- margin-bottom: $double * 2;
- }
- ul {
- list-style: none;
- }
- li {
- @extend %text;
- line-height: $double * 3;
- margin-bottom: $double;
- padding-left: $double * 3;
- position: relative;
- &:before {
- content: "\F00C";
- font-family: FontAwesome;
- font-size: $double * 2;
- display: block;
- width: $half;
- height: $half;
- position: absolute;
- left: 0;
- top: calc(50% - #{$half/2} - 3px);
- z-index: -1;
- }
- }
-}
diff --git a/demo/components/footer/footer.js b/demo/components/footer/footer.js
deleted file mode 100644
index 938fceb..0000000
--- a/demo/components/footer/footer.js
+++ /dev/null
@@ -1,22 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Styles from './footer.scss';
-
-const Footer = ({ repository, article }) => (
-
-);
-
-Footer.propTypes = {
- repository: PropTypes.string.isRequired,
- article: PropTypes.string.isRequired,
-};
-
-export default Footer;
diff --git a/demo/components/footer/footer.scss b/demo/components/footer/footer.scss
deleted file mode 100644
index 2f04696..0000000
--- a/demo/components/footer/footer.scss
+++ /dev/null
@@ -1,18 +0,0 @@
-@import '../../helpers/base.scss';
-
-.container {
- display: block;
- margin-top: 80px;
- width: 100%;
- text-align: center;
- img {
- max-width: 260px;
- width: 80%;
- margin-bottom: $double;
- }
- small {
- display: block;
- font-size: $unit * 3;
- line-height: $double * 3;
- }
-}
diff --git a/demo/components/header/header.js b/demo/components/header/header.js
deleted file mode 100644
index df23ce2..0000000
--- a/demo/components/header/header.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Styles from './header.scss';
-import { Navigation, ReactLogo } from '../index';
-
-const Header = ({
- title,
- name,
- size,
- description,
- themes,
- framework,
- domain,
- theme,
-}) => (
-
-);
-
-Header.propTypes = {
- title: PropTypes.string.isRequired,
- name: PropTypes.string.isRequired,
- themes: PropTypes.array.isRequired,
- module: PropTypes.object.isRequired,
- size: PropTypes.string.isRequired,
- domain: PropTypes.string.isRequired,
- framework: PropTypes.string.isRequired,
- theme: PropTypes.string.isRequired,
- description: PropTypes.string.isRequired,
-};
-
-export default Header;
diff --git a/demo/components/header/header.scss b/demo/components/header/header.scss
deleted file mode 100644
index 02aa6e4..0000000
--- a/demo/components/header/header.scss
+++ /dev/null
@@ -1,67 +0,0 @@
-@import '../../helpers/base.scss';
-
-.support {
- height: 50px;
- margin-bottom: 20px;
-
- svg {
- margin-top: -3px;
- }
-}
-
-.container {
- display: block;
- padding: 40px 0 20px;
-
- .title {
- display: flex;
- align-items: center;
- margin-bottom: $double * 3;
- }
-
- h1 {
- @extend %h1;
- margin-left: $double;
-
- span {
- display: inline-block;
- }
- span:first-child {
- margin-right: 10px;
- color: #61dafb;
- }
- @media all and (max-width: 1125px) {
- font-size: 30px;
- }
- @media all and (max-width: 1024px) {
- font-size: 28px;
- }
- @media all and (max-width: 535px) {
- font-size: 26px;
- }
- @media all and (max-width: 460px) {
- font-size: 46px;
- span:nth-child(2) {
- display: none;
- }
- }
- }
- h2 {
- @extend %h2;
- margin-bottom: $unit;
- strong {
- display: inline-block;
- margin-bottom: $double;
- margin-right: $double;
- }
- span {
- display: inline-block;
- font-size: $double * 2;
- font-weight: 500;
- }
- }
- p {
- @extend %text;
- margin-bottom: 20px;
- }
-}
\ No newline at end of file
diff --git a/demo/components/index.js b/demo/components/index.js
deleted file mode 100644
index f3781ef..0000000
--- a/demo/components/index.js
+++ /dev/null
@@ -1,17 +0,0 @@
-export { default as Footer } from './footer/footer';
-export { default as Header } from './header/header';
-export { default as Section } from './section/section';
-export { default as Body } from './body/body';
-export { default as Composer } from './composer/composer';
-export { default as Navigation } from './navigation/navigation';
-export { default as Customiser } from './customiser/customiser';
-export { default as Example } from './example/example';
-export { default as Page } from './page/page';
-export { default as PageRibbon } from './pageRibbon/pageRibbon';
-export { default as ColorPicker } from './colorPicker/colorPicker';
-export { default as BorderPicker } from './borderPicker/borderPicker';
-export { default as Popover } from './popover/popover';
-export { default as Theme } from './theme/theme';
-export { default as ThemeTest } from './themeTest/themeTest';
-export { default as ThemeList } from './themeList/themeList';
-export { default as ReactLogo } from './react-logo/react-logo';
\ No newline at end of file
diff --git a/demo/components/navigation/navigation.js b/demo/components/navigation/navigation.js
deleted file mode 100644
index f6c9d26..0000000
--- a/demo/components/navigation/navigation.js
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { Link } from 'react-router-dom';
-import Styles from './navigation.scss';
-
-export default class Navigation extends React.Component {
- static propTypes = {
- themes: PropTypes.array.isRequired,
- theme: PropTypes.string.isRequired,
- domain: PropTypes.string.isRequired,
- };
-
- renderButtons() {
- return this.props.themes.map((theme, index) => (
-
- {theme.name}
-
- ));
- }
-
- render() {
- return (
-
- Select a theme:
-
-
- );
- }
-}
diff --git a/demo/components/navigation/navigation.scss b/demo/components/navigation/navigation.scss
deleted file mode 100644
index 438a071..0000000
--- a/demo/components/navigation/navigation.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-.container {
- span {
- display: inline-block;
- margin-right: 8px;
- margin-bottom: 8px;
- font-weight: bold;
- }
- nav {
- display: inline-block;
- }
-}
-
-.nav {
- display: block;
- padding: 0;
- text-align: left;
-
- a {
- display: inline-block;
- padding: 12px 16px;
- text-decoration: none;
- font-size: 14px;
- border-radius: 6px;
- margin-right: 2px;
- font-family: inherit;
-
- &:hover {
- background-color: rgba(0, 0, 0, 0.05);
- }
- &.selected {
- background-color: rgba(0, 0, 0, 0.1);
- color: #cfcfcf;
- }
- }
-}
diff --git a/demo/components/page/page.js b/demo/components/page/page.js
deleted file mode 100644
index 93b459e..0000000
--- a/demo/components/page/page.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from 'react';
-import { Footer, Example, Section, Popover } from '../index';
-
-const Page = ({ theme, data }) => (
-
-);
-
-export default Page;
diff --git a/demo/components/pageRibbon/pageRibbon.js b/demo/components/pageRibbon/pageRibbon.js
deleted file mode 100644
index d4bfb05..0000000
--- a/demo/components/pageRibbon/pageRibbon.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import styles from './pageRibbon.scss';
-
-class PageRibbon extends React.Component {
- static propTypes = {
- children: PropTypes.node.isRequired,
- className: PropTypes.string.isRequired,
- href: PropTypes.string.isRequired,
- title: PropTypes.string.isRequired,
- target: PropTypes.string.isRequired,
- delay: PropTypes.number.isRequired,
- };
-
- constructor(props) {
- super(props);
- this.state = {
- hidden: true,
- };
- this.timer = null;
- }
-
- componentDidMount() {
- this.timer = setTimeout(() => {
- this.setState({
- hidden: false,
- });
- }, this.props.delay);
- }
-
- componentWillUnmount() {
- clearTimeout(this.timer);
- }
-
- render() {
- const {
- children,
- href,
- title,
- target,
- } = this.props;
-
- const mainClass = [styles.container];
- if (this.state.hidden === true) {
- mainClass.push(styles.hidden);
- }
- if (this.props.className) {
- mainClass.push(this.props.className);
- }
-
- return (
-
- );
- }
-}
-
-export default PageRibbon;
diff --git a/demo/components/pageRibbon/pageRibbon.scss b/demo/components/pageRibbon/pageRibbon.scss
deleted file mode 100644
index 356dfb7..0000000
--- a/demo/components/pageRibbon/pageRibbon.scss
+++ /dev/null
@@ -1,101 +0,0 @@
-.container {
- display: block;
- position: fixed;
- right: 0;
- top: 0;
- width: 200px;
- height: 200px;
- z-index: 10;
- transform: translateX(calc(var(--customiser-transform) - 500px));
- transition: transform 0.25s ease-out;
-
- &.hidden {
- a {
- opacity: 0;
- transform: rotate(45deg) translate3d(0, -170px, 0);
- }
- }
-
- a {
- position: absolute;
- display: block;
- width: 200%;
- left: -20%;
- top: -30%;
- z-index: 901;
- cursor: pointer;
- background-color: #5c5c5c;
- color: #f0f0f0;
- padding: 0;
- line-height: inherit;
- text-decoration: none;
- text-align: center;
- font-family: montserrat, tahoma, sans-serif;
- font-weight: bold;
- font-size: 14px;
- box-shadow: -2px 3px 1px rgba(0, 0, 0, 0.23);
- opacity: 1;
- text-transform: uppercase;
- transform: translate3d(0, 0, 0) rotate(45deg);
- transform-origin: 0 0;
- height: 44px;
- line-height: 47px;
- transition:
- background-color 0.2s ease-out 0s,
- transform 0.7s cubic-bezier(.7, 0, .25, 1),
- opacity 0.2s ease-out;
-
- &:hover {
- background-color: #4b4b4b;
- color: #FFF;
- }
-
- &:after,
- &:before {
- content: " ";
- position: absolute;
- z-index: 1;
- left: 0;
- width: 100%;
- height: 1px;
- }
-
- &:before {
- top: 3px;
- }
-
- &:after {
- bottom: 3px;
- }
-
- @media all and (max-width: 1920px) {
- width: 220%;
- left: -35%;
- top: -20%;
- }
-
- @media all and (max-width: 1460px) {
- width: 200%;
- left: -10%;
- top: -32%;
- }
-
- @media all and (max-width: 1024px) {
- width: 200%;
- left: -12%;
- top: -29%;
- }
-
- @media all and (max-width: 740px) {
- width: 200%;
- left: -10%;
- top: -31%;
- }
-
- @media all and (max-width: 560px) {
- width: 200%;
- left: -4%;
- top: -37%;
- }
- }
-}
diff --git a/demo/components/popover/popover.js b/demo/components/popover/popover.js
deleted file mode 100644
index ab57cb6..0000000
--- a/demo/components/popover/popover.js
+++ /dev/null
@@ -1,82 +0,0 @@
-import React, { useRef, useEffect } from 'react';
-import styles from './popover.scss';
-import { setCssEndEvent } from '../../helpers/examples';
-import { AwesomeButton } from '../../../src/index.ts';
-import { useDemoContext } from '../../context';
-
-const Popover = () => {
- const {
- isPopoverOpened,
- popoverText,
- cssModule,
- closePopover,
- } = useDemoContext();
- const animating = useRef(false);
- const toggleTimer = useRef(null);
- const container = useRef(null);
-
- useEffect(() => {
- toggleVisibility(isPopoverOpened);
- }, [isPopoverOpened]);
-
- useEffect(() => {
- return () => {
- clearTimeout(toggleTimer.current);
- };
- }, []);
-
- const toggleVisibility = (toggle, timed) => {
- if (animating.current) {
- if (timed) {
- return;
- }
- toggleTimer.current = setTimeout(() => {
- toggleVisibility(toggle, true);
- }, 175);
- return;
- }
- animating.current = true;
- const element = container.current;
- if (toggle === true) {
- element.classList.add(styles.show);
- setCssEndEvent(element, 'animation').then(() => {
- animating.current = false;
- });
- return;
- }
- element.classList.add(styles.hide);
- setCssEndEvent(element, 'animation').then(() => {
- element.classList.remove(styles.show);
- element.classList.remove(styles.hide);
- animating.current = false;
- });
- };
-
- return (
-
- );
-};
-
-export default Popover;
diff --git a/demo/components/popover/popover.scss b/demo/components/popover/popover.scss
deleted file mode 100644
index d66222f..0000000
--- a/demo/components/popover/popover.scss
+++ /dev/null
@@ -1,117 +0,0 @@
-.container {
- position: fixed;
- top: 0;
- left: 0;
- width: calc(100% - (500px - var(--customiser-transform)));
- height: 100%;
- background-color: rgba(0, 0, 0, 0.3);
- z-index: 6001;
- display: flex;
- align-items: center;
- justify-content: center;
- opacity: 0;
- visibility: hidden;
-}
-
-.show {
- animation: popover-enter .2s ease-out forwards;
- .window {
- animation: window-enter .478s linear forwards .05s;
- }
-}
-
-.hide {
- animation: popover-exit .145s ease-out forwards;
-}
-
-.window {
- background-color: #333333;
- padding: 36px;
- width: 80%;
- max-width: 600px;
- border-radius: 8px;
- transform: scale(.75);
- opacity: 0;
- max-height: 90%;
- overflow-y: auto;
-}
-
-.body {
- padding: 24px 24px 42px;
- color: #FAFAFA;
- line-height: 23px;
- font-size: 14px;
- font-family: monospace;
-
- p {
- margin-bottom: 2px;
- b {
- color: #a6e22e;
- font-weight: 400;
- }
- }
- li {
- list-style: none;
- padding-left: 20px;
- b {
- color: #66d9ef;
- font-weight: 400;
- }
- em {
- font-style: normal;
- }
- }
-}
-
-.control {
- text-align: center;
-}
-
-@keyframes window-enter {
- 0% {
- opacity: 0;
- transform: scale(0.80);
- }
- 20% {
- transform: scale(1.10);
- }
- 40% {
- transform: scale(0.96);
- opacity: 1;
- }
- 60% {
- transform: scale(1.04);
- }
- 80% {
- transform: scale(0.98);
- }
- 100% {
- transform: scale(1);
- opacity: 1;
- }
-}
-
-@keyframes popover-enter {
- 0% {
- opacity: 0;
- visibility: visible;
- }
- 100% {
- opacity: 1;
- visibility: visible;
- }
-}
-
-@keyframes popover-exit {
- 0% {
- opacity: 1;
- visibility: visible;
- }
- 99% {
- opacity: 0;
- }
- 100% {
- opacity: 0;
- visibility: hidden;
- }
-}
diff --git a/demo/components/react-logo/react-logo.js b/demo/components/react-logo/react-logo.js
deleted file mode 100644
index 13744a2..0000000
--- a/demo/components/react-logo/react-logo.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import React from 'react';
-import styles from './react-logo.scss';
-
-const ReactLogo = () => {
- return (
-
-
-
-
-
- );
-};
-
-export default ReactLogo;
diff --git a/demo/components/react-logo/react-logo.scss b/demo/components/react-logo/react-logo.scss
deleted file mode 100644
index 0b338ac..0000000
--- a/demo/components/react-logo/react-logo.scss
+++ /dev/null
@@ -1,84 +0,0 @@
-$size: 44px;
-$ellipse: $size / 2;
-$speed: 2;
-$color-primary: #61dafb;
-$border: $size/16;
-$circle: $ellipse/10;
-$total: 3;
-$angle: 66deg;
-
-%path {
- border-radius: 50%;
- bottom: 0;
- left: 0;
- margin: auto;
- position: absolute;
- right: 0;
- top: 0;
-}
-
-.container {
- --size: #{$size};
- --ellipse: calc(var(--size) / 2);
- --circle: calc(var(--ellipse) / 10);
- --speed: #{$speed};
- --background: #{$color-primary};
- --angle: #{$angle};
-
- display: block;
- height: var(--size);
- position: relative;
- transform: rotate(180deg);
- width: var(--size);
- z-index: 1000;
-
- &:before {
- content: ' ';
- background-color: var(--background);
- border-radius: calc(var(--size) / 12);
- display: block;
- height: calc(var(--size) / 6);
- left: calc(50% - (var(--size) / 12));
- position: absolute;
- top: calc(50% - (var(--size) / 12));
- width: calc(var(--size) / 6);
- z-index: 1;
- }
-
- > span {
- @extend %path;
- width: calc(var(--ellipse) * 2);
- height: calc(var(--ellipse) * 2);
- border: $border var(--background) solid;
- transform-style: preserve-3d;
- &:before {
- @extend %path;
- content: ' ';
- width: calc(var(--circle) * 2);
- height: calc(var(--circle) * 2);
- animation: path linear infinite;
- background: var(--background);
- display: block;
- }
-
- @for $i from 1 through $total {
- &:nth-child(#{$i}) {
- transform: rotateZ($i * 180deg / $total) rotateY(var(--angle));
-
- &:before {
- animation-duration: #{$speed * $i * 0.5}s;
- }
- }
- }
- }
-}
-
-@keyframes path {
- from {
- transform: rotateZ(0) translateX($ellipse) rotateZ(0) rotateY(var(--angle));
- }
- to {
- transform: rotateZ(360deg) translateX($ellipse) rotateZ(-360deg)
- rotateY(var(--angle));
- }
-}
diff --git a/demo/components/section/section.js b/demo/components/section/section.js
deleted file mode 100644
index 422344b..0000000
--- a/demo/components/section/section.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Styles from './section.scss';
-
-const Section = ({ children }) => (
-
-);
-
-Section.propTypes = {
- children: PropTypes.node.isRequired,
-};
-
-export default Section;
diff --git a/demo/components/section/section.scss b/demo/components/section/section.scss
deleted file mode 100644
index debba87..0000000
--- a/demo/components/section/section.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.container {
- display: block;
-}
diff --git a/demo/components/theme/theme.js b/demo/components/theme/theme.js
deleted file mode 100644
index 084a398..0000000
--- a/demo/components/theme/theme.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { AwesomeButton } from '../../../src/index';
-
-export default function Theme({ theme }) {
- return (
-
-
-
- Primary
-
-
- Secondary
-
-
- Disabled
-
-
-
-
- );
-}
-
-Theme.propTypes = {
- theme: PropTypes.string.isRequired,
-};
diff --git a/demo/components/themeList/themeList.js b/demo/components/themeList/themeList.js
deleted file mode 100644
index 7ece501..0000000
--- a/demo/components/themeList/themeList.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { Theme } from '../index';
-import Modules from '../../helpers/modules';
-
-export default function List({ styles }) {
- return (
-
- {List.renderItems()}
-
- );
-}
-
-List.renderItems = () => (
- Modules.Themes.map(theme => )
-);
-
-List.propTypes = {
- styles: PropTypes.object.isRequired,
-};
diff --git a/demo/components/themeTest/themeTest.js b/demo/components/themeTest/themeTest.js
deleted file mode 100644
index 21c880c..0000000
--- a/demo/components/themeTest/themeTest.js
+++ /dev/null
@@ -1,159 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import {
- AwesomeButton,
- AwesomeButtonSocial,
- AwesomeButtonProgress,
-} from '../../../src/index.ts';
-import Modules from '../../helpers/modules';
-import styles from './themeTest.scss';
-
-class Test extends React.Component {
- static propTypes = {
- theme: PropTypes.string.isRequired,
- };
-
- constructor(props) {
- super(props);
- this.state = {
- placeholderButtonText: '',
- isDisabled: true,
- };
- }
- render() {
- const { theme } = this.props;
- const Module = Modules.Modules[theme];
-
- return (
-
-
-
- Primary
-
-
- Secondary
-
-
- Anchor
-
-
-
-
{
- setTimeout(() => {
- // debugger;
- next();
- }, 3000);
- }}>
- Primary Progress
-
-
-
-
- {this.state.placeholderButtonText}
-
-
{
- this.setState({
- placeholderButtonText: this.state.placeholderButtonText
- ? ''
- : 'Placeholder',
- });
- }}>
- ← Set Data
-
-
-
-
- Disabled
-
-
{
- this.setState({
- isDisabled: !this.state.isDisabled,
- });
- }}>
- ← Toggle
-
-
-
-
Social ready buttons with bundled icons and share actions
-
-
- Share
-
-
- Share
-
-
- Follow
-
-
- Support
-
-
- Connect
-
-
- Message
-
-
- Whatsapp
-
-
-
-
- );
- }
-}
-
-export default Test;
diff --git a/demo/components/themeTest/themeTest.scss b/demo/components/themeTest/themeTest.scss
deleted file mode 100644
index 93acc19..0000000
--- a/demo/components/themeTest/themeTest.scss
+++ /dev/null
@@ -1,35 +0,0 @@
-.container {
-}
-
-.share {
- margin-top: 24px;
-
- h4 {
- font-size: 14px;
- margin-bottom: 12px;
- }
-}
-
-.loadData {
- display: flex;
- align-items: center;
-}
-
-.section {
- position: relative;
-
- button,
- a {
- margin-right: 12px;
- }
-
- .action {
- display: block;
- padding: 8px;
- cursor: pointer;
- outline-color: 0;
- outline-style: none;
- outline-width: 0;
- user-select: none;
- }
-}
diff --git a/demo/context.js b/demo/context.js
deleted file mode 100644
index 92e85f9..0000000
--- a/demo/context.js
+++ /dev/null
@@ -1,67 +0,0 @@
-import React, { useContext, createContext, useState, useRef } from 'react';
-
-const INITIAL = {
- handlePopover: null,
- popoverOpened: null,
- popoverText: '',
-};
-
-export const DemoContext = createContext({ ...INITIAL });
-
-export const useDemoContext = () => {
- return useContext(DemoContext);
-};
-
-export const DemoProvider = ({ children }) => {
- const [state, setStateValue] = useState({ ...INITIAL });
- const stateRef = useRef({ ...INITIAL });
-
- const setPopoverText = value => {
- setState({ popoverText: value });
- };
-
- const getPopoverText = () => {
- return stateRef.current.popoverText;
- };
-
- const getPopoverState = () => {
- return stateRef.current.popoverOpened;
- };
-
- const setPopoverOpened = value => {
- setState({ popoverOpened: value });
- };
-
- const openPopover = ({ text }) => {
- setState({ popoverOpened: true, popoverText: text });
- };
-
- const closePopover = () => {
- setState({ popoverOpened: false });
- };
-
- const setState = newState => {
- stateRef.current = {
- ...stateRef.current,
- ...newState,
- };
- setStateValue(stateRef.current);
- };
-
- return (
-
- {children}
-
- );
-};
diff --git a/demo/data.json b/demo/data.json
deleted file mode 100644
index c5e86b7..0000000
--- a/demo/data.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "name": "AwesomeButton",
- "framework": "React",
- "title": "Awesome Button",
- "description": "React button component rendering 3D, progress, social and share enabled buttons. React Awesome Button is a 60fps, light weight, performant, production ready set of react UI button components.",
- "icon": "react-js",
- "size": "~6KB compressed",
- "repository": "https://github.com/rcaferati/react-awesome-button",
- "article": "//caferati.me/labs/awesome-button",
- "domain": "",
- "themes": [
- {
- "name": "Blue",
- "slug": "blue-theme"
- },
- {
- "name": "Red",
- "slug": "red-theme"
- },
- {
- "name": "Indigo",
- "slug": "indigo-theme"
- },
- {
- "name": "Cartman",
- "slug": "cartman-theme"
- },
- {
- "name": "Rick",
- "slug": "rick-theme"
- },
- {
- "name": "Morty",
- "slug": "morty-theme"
- },
- {
- "name": "Bojack",
- "slug": "bojack-theme"
- }
- ]
-}
diff --git a/demo/demo.js b/demo/demo.js
deleted file mode 100644
index 1623b0c..0000000
--- a/demo/demo.js
+++ /dev/null
@@ -1,150 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import { BrowserRouter, Route, Routes, useParams } from 'react-router-dom';
-import { StaticRouter } from 'react-router-dom/server';
-import styles from './demo.scss';
-import {
- Header,
- Customiser,
- Body,
- Composer,
- Page,
- PageRibbon,
-} from './components';
-import Data from './data.json';
-import data from './examples';
-import { DemoProvider, useDemoContext } from './context';
-
-const DEFAULT_THEME = 'blue-theme';
-
-const getRouteTheme = params => {
- if (!params?.['*']) {
- return DEFAULT_THEME;
- }
- const split = params['*'].replace(/(.*)(\/(.*))?/gim, '$1');
- return split;
-};
-
-const DemoComponent = () => {
- const params = useParams();
- const theme = getRouteTheme(params);
-
- return ;
-};
-
-DemoComponent.propTypes = {
- match: PropTypes.object.isRequired,
- handlePopover: PropTypes.func.isRequired,
- popoverOpened: PropTypes.bool.isRequired,
- popoverText: PropTypes.string.isRequired,
-};
-
-const ComposerComponent = () => {
- const params = useParams();
- const theme = getRouteTheme(params);
- const { openPopover, isPopoverOpened } = useDemoContext();
-
- return (
-
- );
-};
-
-const HeaderComponent = () => {
- const params = useParams();
- const theme = getRouteTheme(params);
-
- return (
-
- );
-};
-
-class Demo extends React.Component {
- static propTypes = {
- server: PropTypes.bool,
- location: PropTypes.string,
- };
- static defaultProps = {
- server: false,
- location: '',
- };
-
- constructor(props) {
- super(props);
- this.state = {
- popoverOpened: false,
- popoverText: '',
- };
- }
-
- handlePopover = popover => {
- this.setState(popover);
- };
-
- render() {
- const { server, location } = this.props;
- const Router = server === true ? StaticRouter : BrowserRouter;
-
- return (
-
-
-
-
- Support it on Github
-
- 🙌🏻
-
-
-
-
-
-
-
- >
- }
- />
-
-
-
-
- }
- />
-
-
-
-
-
- );
- }
-}
-
-export default Demo;
diff --git a/demo/demo.scss b/demo/demo.scss
deleted file mode 100644
index 361f8f9..0000000
--- a/demo/demo.scss
+++ /dev/null
@@ -1,50 +0,0 @@
-@import './helpers/base.scss';
-
-::selection {
- color: #FFF;
- background-color: rgba(0, 0, 0, 0.2);
-}
-
-*, *:before, *:after {
- box-sizing: inherit;
- margin: 0;
- padding: 0;
-}
-
-html {
- box-sizing: border-box;
- background-color: #2f2f2f;
- color: #6f6f6f;
-}
-
-body {
- font-family: lato, tahoma, sans-serif;
-}
-
-h1, h2, h3, h4, h5 {
- font-family: montserrat, tahoma, sans-serif;
- font-weight: 700;
-}
-
-main {
- display: block;
-}
-
-a {
- color: #8a8a8a;
-}
-
-nav a {
- --button-font-family: montserrat, tahoma, sans-serif !important;
-}
-
-.ribbon {
- span {
- &:first-child {
- margin-right: 8px;
- }
- &:nth-child(2) {
- font-size: 18px;
- }
- }
-}
diff --git a/demo/examples/common.js b/demo/examples/common.js
deleted file mode 100644
index 40283ce..0000000
--- a/demo/examples/common.js
+++ /dev/null
@@ -1,294 +0,0 @@
-import React from 'react';
-import Modules from '../helpers/modules';
-import { AwesomeButton, AwesomeButtonProgress } from '../../src/index.ts';
-
-export const properties = [
- {
- name: 'General',
- props: [
- {
- name: 'button-default-height',
- type: 'range',
- max: 100,
- min: 30,
- suffix: 'px',
- },
- {
- name: 'button-default-font-size',
- type: 'range',
- max: 25,
- min: 10,
- suffix: 'px',
- },
- {
- name: 'button-default-border-radius',
- type: 'range',
- max: 25,
- suffix: 'px',
- },
- {
- name: 'button-horizontal-padding',
- type: 'range',
- max: 50,
- suffix: 'px',
- },
- {
- name: 'button-raise-level',
- type: 'range',
- max: 10,
- suffix: 'px',
- },
- ],
- },
- {
- name: 'Animations',
- props: [
- {
- name: 'button-hover-pressure',
- type: 'range',
- max: 4,
- step: 0.5,
- },
- {
- name: 'transform-speed',
- type: 'range',
- max: 0.60,
- step: 0.025,
- suffix: 's',
- },
- ],
- },
- {
- name: 'Primary',
- props: [
- {
- name: 'button-primary-color',
- type: 'color',
- },
- {
- name: 'button-primary-color-dark',
- type: 'color',
- },
- {
- name: 'button-primary-color-light',
- type: 'color',
- },
- {
- name: 'button-primary-color-hover',
- type: 'color',
- },
- {
- name: 'button-primary-border',
- type: 'border',
- },
- ],
- },
- {
- name: 'Secondary',
- props: [
- {
- name: 'button-secondary-color',
- type: 'color',
- },
- {
- name: 'button-secondary-color-dark',
- type: 'color',
- },
- {
- name: 'button-secondary-color-light',
- type: 'color',
- },
- {
- name: 'button-secondary-color-hover',
- type: 'color',
- },
- {
- name: 'button-secondary-border',
- type: 'border',
- },
- ],
- },
- {
- name: 'Anchor',
- props: [
- {
- name: 'button-anchor-color',
- type: 'color',
- },
- {
- name: 'button-anchor-color-dark',
- type: 'color',
- },
- {
- name: 'button-anchor-color-light',
- type: 'color',
- },
- {
- name: 'button-anchor-color-hover',
- type: 'color',
- },
- {
- name: 'button-anchor-border',
- type: 'border',
- },
- ],
- },
-];
-
-export const features = [
- 'Look and feel customisable and extendable via SASS variables and lists',
- 'Use it with CSSModules or Plain CSS (NO inline-styles)',
- 'Render any tag as the component\'s child (text, icon, img, svg)',
- 'Animated progress button',
- 'OnClick bubble animation',
-];
-
-export function examples(theme) {
- return [
- {
- title: 'Installation',
- command: 'npm install --save react-awesome-button',
- },
- {
- title: 'Multiple Import',
- jsx: `
-import {
- AwesomeButton,
- AwesomeButtonProgress,
- AwesomeButtonSocial,
-} from 'react-awesome-button';
-`,
- },
- {
- title: 'Single Import',
- jsx: `
-import AwesomeButton from 'react-awesome-button/src/components/AwesomeButton';
-import AwesomeButtonProgress from 'react-awesome-button/src/components/AwesomeButtonProgress';
-import AwesomeButtonSocial from 'react-awesome-button/src/components/AwesomeButtonSocial';
-`,
- },
- {
- title: 'Primary Button',
- jsx: 'Primary',
- component: (
-
- Primary
-
- ),
- },
- {
- title: 'Secondary Progress Button',
- jsx: `
- doSomethingThenCall(next)}
->
- Primary
-`,
- component: (
- {
- setTimeout(() => {
- next();
- }, 1000);
- }}
- cssModule={Modules.Modules[theme]}
- >
- Progress
-
- ),
- },
- {
- title: 'Multiple Sizes',
- jsx: `
-
-
-
-
- Small
-
-
- Medium
-
-
- Large
-`,
- component: (
-
-
-
-
-
- Small
-
-
- Medium
-
-
- Large
-
-
- ),
- },
- {
- title: 'Styling with - CSS',
- description: 'For styling with CSS you can access all themes on the /dist folder and append it via or import into your .js or .css files.',
- jsx: 'import \'react-awesome-button/dist/themes/theme-blue.css\';',
- },
- {
- title: 'Styling with - CSS Modules',
- description: 'For styling it through CSS Modules, import the file from the themes folder inside the src. You\'ll need a .scss loader in place in order to build it.',
- jsx: `
-import AwesomeButton from 'react-awesome-button/src/components/AwesomeButton';
-import styles from 'react-awesome-button/src/styles/themes/theme-blue';
-
-...
-
-function Component() {
- return (
-
- Primary Blue Themed Button
-
- );
-}
-`,
- },
- ];
-}
diff --git a/demo/examples/index.js b/demo/examples/index.js
deleted file mode 100644
index aaa57c2..0000000
--- a/demo/examples/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import CartmanTheme from './themes/cartman-theme';
-import RickTheme from './themes/rick-theme';
-import MortyTheme from './themes/morty-theme';
-import BlueTheme from './themes/blue-theme';
-import RedTheme from './themes/red-theme';
-import IndigoTheme from './themes/indigo-theme';
-import BojackTheme from './themes/bojack-theme';
-
-const themes = {
- 'cartman-theme': CartmanTheme,
- 'rick-theme': RickTheme,
- 'red-theme': RedTheme,
- 'morty-theme': MortyTheme,
- 'blue-theme': BlueTheme,
- 'bojack-theme': BojackTheme,
- 'indigo-theme': IndigoTheme,
-};
-
-export default themes;
diff --git a/demo/examples/themes/blue-theme.js b/demo/examples/themes/blue-theme.js
deleted file mode 100644
index 9a7a85f..0000000
--- a/demo/examples/themes/blue-theme.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import React from 'react';
-import { ThemeTest } from '../../components';
-import Modules from '../../helpers/modules';
-import { features, properties, examples } from '../common';
-
-const THEME = 'theme-blue';
-
-const items = examples(THEME);
-
-const component = (
-
-);
-
-const module = Modules.Modules[THEME];
-
-const example = {
- title: 'Blue Theme',
- items,
- component,
- componentClass: Modules.Modules['theme-blue']['aws-btn'],
-};
-
-export default {
- features,
- module,
- example,
- properties,
-};
diff --git a/demo/examples/themes/bojack-theme.js b/demo/examples/themes/bojack-theme.js
deleted file mode 100644
index 14a4b9d..0000000
--- a/demo/examples/themes/bojack-theme.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import React from 'react';
-import { ThemeTest } from '../../components';
-import Modules from '../../helpers/modules';
-import { features, properties, examples } from '../common';
-
-const THEME = 'theme-bojack';
-
-const items = examples(THEME);
-
-const component = ;
-
-const module = Modules.Modules[THEME];
-
-const example = {
- title: 'Clean up your shit.',
- description: 'AwesomeButton Generic Example',
- items,
- component,
- componentClass: Modules.Modules[THEME]['aws-btn'],
-};
-
-export default {
- features,
- example,
- module,
- properties,
-};
diff --git a/demo/examples/themes/cartman-theme.js b/demo/examples/themes/cartman-theme.js
deleted file mode 100644
index 058ed53..0000000
--- a/demo/examples/themes/cartman-theme.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import React from 'react';
-import { ThemeTest } from '../../components';
-import Modules from '../../helpers/modules';
-import { features, properties, examples } from '../common';
-
-const THEME = 'theme-eric';
-
-const items = examples(THEME);
-
-const component = (
-
-);
-
-const module = Modules.Modules[THEME];
-
-const example = {
- title: 'Respect my authoritah.',
- items,
- component,
- componentClass: Modules.Modules['theme-eric']['aws-btn'],
-};
-
-export default {
- features,
- example,
- module,
- properties,
-};
diff --git a/demo/examples/themes/indigo-theme.js b/demo/examples/themes/indigo-theme.js
deleted file mode 100644
index 2e9bb1b..0000000
--- a/demo/examples/themes/indigo-theme.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import React from 'react';
-import { ThemeTest } from '../../components';
-import Modules from '../../helpers/modules';
-import { features, properties, examples } from '../common';
-
-const THEME = 'theme-indigo';
-
-const items = examples(THEME);
-
-const component = ;
-
-const module = Modules.Modules[THEME];
-
-const example = {
- title: 'Get your shit together.',
- description: 'AwesomeButton Generic Example',
- items,
- component,
- componentClass: Modules.Modules[THEME]['aws-btn'],
-};
-
-export default {
- features,
- example,
- module,
- properties,
-};
diff --git a/demo/examples/themes/morty-theme.js b/demo/examples/themes/morty-theme.js
deleted file mode 100644
index ec730e0..0000000
--- a/demo/examples/themes/morty-theme.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import React from 'react';
-import { ThemeTest } from '../../components';
-import Modules from '../../helpers/modules';
-import { features, properties, examples } from '../common';
-
-const THEME = 'theme-c137';
-
-const items = examples(THEME);
-
-const component = (
-
-);
-
-const module = Modules.Modules[THEME];
-
-const example = {
- title: 'Get your shit together.',
- description: 'AwesomeButton Generic Example',
- items,
- component,
- componentClass: Modules.Modules['theme-c137']['aws-btn'],
-};
-
-export default {
- features,
- example,
- module,
- properties,
-};
diff --git a/demo/examples/themes/red-theme.js b/demo/examples/themes/red-theme.js
deleted file mode 100644
index 29422c7..0000000
--- a/demo/examples/themes/red-theme.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react';
-import { ThemeTest } from '../../components';
-import Modules from '../../helpers/modules';
-import { features, properties, examples } from '../common';
-
-const THEME = 'theme-red';
-
-const items = examples(THEME);
-
-const component = ;
-
-const module = Modules.Modules[THEME];
-
-const example = {
- title: 'Red Theme',
- items,
- component,
- componentClass: Modules.Modules[THEME]['aws-btn'],
-};
-
-export default {
- features,
- module,
- example,
- properties,
-};
diff --git a/demo/examples/themes/rick-theme.js b/demo/examples/themes/rick-theme.js
deleted file mode 100644
index 0f4e309..0000000
--- a/demo/examples/themes/rick-theme.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import React from 'react';
-import { ThemeTest } from '../../components';
-import Modules from '../../helpers/modules';
-import { features, properties, examples } from '../common';
-
-const THEME = 'theme-rickiest';
-
-const items = examples(THEME);
-
-const component = (
-
-);
-
-const module = Modules.Modules[THEME];
-
-const example = {
- title: 'Pass the butter.',
- items,
- component,
- componentClass: Modules.Modules['theme-rickiest']['aws-btn'],
-};
-
-export default {
- features,
- example,
- module,
- properties,
-};
diff --git a/demo/helpers/base.scss b/demo/helpers/base.scss
deleted file mode 100644
index 9021185..0000000
--- a/demo/helpers/base.scss
+++ /dev/null
@@ -1,30 +0,0 @@
-$unit: 4px;
-$double: $unit * 2;
-$half: $unit * 5;
-$deca: $unit * 8;
-
-%h1 {
- font-size: $deca;
- line-height: $deca;
- color: #cfcfcf;
-}
-
-%h2 {
- font-size: $double * 3;
- line-height: $double * 3;
-}
-
-%h3 {
- font-size: $deca / 2;
- line-height: $deca / 2;
-}
-
-%h4 {
- font-size: $double * 2;
- line-height: $double * 2;
-}
-
-%text {
- font-size: $double * 2;
- line-height: $double * 7/2;
-}
diff --git a/demo/helpers/examples.js b/demo/helpers/examples.js
deleted file mode 100644
index 15b2a36..0000000
--- a/demo/helpers/examples.js
+++ /dev/null
@@ -1,64 +0,0 @@
-export function shadeRGBColor(color, percent) {
- const f = color.split(',');
- const t = percent < 0 ? 0 : 255;
- const p = percent < 0 ? percent * -1 : percent;
- const R = parseInt(f[0].slice(4), 10);
- const G = parseInt(f[1], 10);
- const B = parseInt(f[2], 10);
- return `rgb(${Math.round((t - R) * p) + R}, ${Math.round((t - G) * p) + G}, ${Math.round((t - B) * p) + B})`;
-}
-
-export function setCssEndEvent(element, type) {
- return new Promise((resolve) => {
- if (!element) {
- resolve(false);
- return;
- }
- let eventName = null;
- const capitalized = type.charAt(0).toUpperCase() + type.slice(1);
- function end(event) {
- element.removeEventListener(eventName, end);
- const target = event.srcElement || event.target;
- if (target === element) {
- resolve();
- }
- }
- if (element.style[`Webkit${capitalized}`] !== undefined) {
- eventName = `webkit${capitalized}End`;
- }
- if (element.style.OTransition !== undefined) {
- eventName = `o${type}End`;
- }
- if (element.style[type] !== undefined) {
- eventName = `${type}end`;
- }
- element.addEventListener(eventName, end);
- });
-}
-
-function hex(number) {
- if (number > 255) {
- return false;
- }
- const str = Number(number).toString(16);
- return (`0${str}`).slice(-2);
-}
-
-export function rgba2hex(rgba) {
- const regex = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?\)/;
- const parsed = regex.exec(rgba);
- if (!parsed) {
- return false;
- }
- const red = parsed[1];
- const green = parsed[2];
- const blue = parsed[3];
- const alpha = parsed[4];
- const elems = [hex(red), hex(green), hex(blue)];
- if (alpha) {
- elems.push(hex(alpha));
- }
- return `#${elems.join('')}`;
-}
-
-export default {};
diff --git a/demo/helpers/modules.js b/demo/helpers/modules.js
deleted file mode 100644
index cd37ad4..0000000
--- a/demo/helpers/modules.js
+++ /dev/null
@@ -1,25 +0,0 @@
-// TODO: create array on build.
-export const THEMES = [
- 'theme-blue',
- 'theme-red',
- 'theme-amber',
- 'theme-indigo',
- 'theme-bojack',
- 'theme-c137',
- 'theme-eric',
- 'theme-flat',
- 'theme-rickiest',
-];
-
-export const MODULES = [];
-
-THEMES.forEach(theme => {
- // eslint-disable-next-line
- const module = require(`../../src/styles/themes/${theme}/styles.module.scss`);
- MODULES[theme] = module.default;
-});
-
-export default {
- Modules: MODULES,
- Themes: THEMES,
-};
diff --git a/demo/index.js b/demo/index.js
deleted file mode 100644
index fdd7296..0000000
--- a/demo/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import * as React from "react";
-import * as ReactDOM from "react-dom";
-import Demo from './demo';
-
-ReactDOM.render(
- (
-
- ),
- document.getElementById('root'),
-);
diff --git a/demo/public/images/figma.png b/demo/public/images/figma.png
deleted file mode 100644
index b282869..0000000
Binary files a/demo/public/images/figma.png and /dev/null differ
diff --git a/demo/public/images/github.svg b/demo/public/images/github.svg
deleted file mode 100644
index 84d2065..0000000
--- a/demo/public/images/github.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
diff --git a/demo/public/images/icons.svg b/demo/public/images/icons.svg
deleted file mode 100644
index 31b3130..0000000
--- a/demo/public/images/icons.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/demo/public/images/messenger.svg b/demo/public/images/messenger.svg
deleted file mode 100644
index 24cc329..0000000
--- a/demo/public/images/messenger.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/demo/public/images/react-awesome-button-customizer.png b/demo/public/images/react-awesome-button-customizer.png
deleted file mode 100644
index 9913f25..0000000
Binary files a/demo/public/images/react-awesome-button-customizer.png and /dev/null differ
diff --git a/demo/public/images/react-awesome-button-storybook.png b/demo/public/images/react-awesome-button-storybook.png
deleted file mode 100644
index 8292903..0000000
Binary files a/demo/public/images/react-awesome-button-storybook.png and /dev/null differ
diff --git a/demo/public/images/rickiest-theme.gif b/demo/public/images/rickiest-theme.gif
deleted file mode 100644
index 3cdff1f..0000000
Binary files a/demo/public/images/rickiest-theme.gif and /dev/null differ
diff --git a/demo/public/images/support.svg b/demo/public/images/support.svg
deleted file mode 100644
index 240d0fc..0000000
--- a/demo/public/images/support.svg
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
diff --git a/demo/public/images/theme-set.gif b/demo/public/images/theme-set.gif
deleted file mode 100644
index ae6c135..0000000
Binary files a/demo/public/images/theme-set.gif and /dev/null differ
diff --git a/demo/public/index.html b/demo/public/index.html
deleted file mode 100644
index daf5214..0000000
--- a/demo/public/index.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- React Awesome Button
-
-
-
-
-
-
-
-
-
diff --git a/demo/public/website/react-awesome-button-server.js b/demo/public/website/react-awesome-button-server.js
deleted file mode 100644
index 020b949..0000000
--- a/demo/public/website/react-awesome-button-server.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["react-awesome-button"]=t():e["react-awesome-button"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){e.exports=n(23)()},function(e,t,n){"use strict";e.exports=n(18)},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,o,a,i,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(27);Object.defineProperty(t,"Footer",{enumerable:!0,get:function(){return v(r).default}});var o=n(29);Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return v(o).default}});var a=n(31);Object.defineProperty(t,"Section",{enumerable:!0,get:function(){return v(a).default}});var i=n(33);Object.defineProperty(t,"Body",{enumerable:!0,get:function(){return v(i).default}});var s=n(35);Object.defineProperty(t,"Composer",{enumerable:!0,get:function(){return v(s).default}});var l=n(37);Object.defineProperty(t,"Navigation",{enumerable:!0,get:function(){return v(l).default}});var u=n(39);Object.defineProperty(t,"Customiser",{enumerable:!0,get:function(){return v(u).default}});var c=n(46);Object.defineProperty(t,"Example",{enumerable:!0,get:function(){return v(c).default}});var p=n(55);Object.defineProperty(t,"Page",{enumerable:!0,get:function(){return v(p).default}});var f=n(56);Object.defineProperty(t,"PageRibbon",{enumerable:!0,get:function(){return v(f).default}});var d=n(58);Object.defineProperty(t,"ColorPicker",{enumerable:!0,get:function(){return v(d).default}});var h=n(60);Object.defineProperty(t,"BorderPicker",{enumerable:!0,get:function(){return v(h).default}});var b=n(62);Object.defineProperty(t,"Popover",{enumerable:!0,get:function(){return v(b).default}});var m=n(64);Object.defineProperty(t,"Theme",{enumerable:!0,get:function(){return v(m).default}});var w=n(65);Object.defineProperty(t,"ThemeTest",{enumerable:!0,get:function(){return v(w).default}});var y=n(77);Object.defineProperty(t,"ThemeList",{enumerable:!0,get:function(){return v(y).default}});var g=n(78);function v(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"ReactLogo",{enumerable:!0,get:function(){return v(g).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.THEMES=["theme-blue","theme-red","theme-amber","theme-indigo","theme-bojack","theme-c137","theme-eric","theme-flat","theme-rickiest"],o=t.MODULES=[];r.forEach((function(e){o[e]=n(66)("./"+e+"/styles.scss")})),t.default={Modules:o,Themes:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(41);Object.defineProperty(t,"AwesomeButton",{enumerable:!0,get:function(){return i(r).default}});var o=n(42);Object.defineProperty(t,"AwesomeButtonSocial",{enumerable:!0,get:function(){return i(o).default}});var a=n(45);function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"AwesomeButtonProgress",{enumerable:!0,get:function(){return i(a).default}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.features=t.properties=void 0,t.examples=function(e){return[{title:"Installation",command:"npm install --save react-awesome-button"},{title:"Multiple Import",jsx:"\nimport {\n AwesomeButton,\n AwesomeButtonProgress,\n AwesomeButtonSocial,\n} from 'react-awesome-button';\n"},{title:"Single Import",jsx:"\nimport AwesomeButton from 'react-awesome-button/src/components/AwesomeButton';\nimport AwesomeButtonProgress from 'react-awesome-button/src/components/AwesomeButtonProgress';\nimport AwesomeButtonSocial from 'react-awesome-button/src/components/AwesomeButtonSocial';\n"},{title:"Primary Button",jsx:'Primary',component:r.default.createElement(a.AwesomeButton,{cssModule:o.default.Modules[e],type:"primary"},"Primary")},{title:"Secondary Progress Button",jsx:'\n doSomethingThenCall(next)}\n>\n Primary\n',component:r.default.createElement(a.AwesomeButtonProgress,{type:"secondary",size:"medium",action:function(e,t){setTimeout((function(){t()}),1e3)},cssModule:o.default.Modules[e]},"Progress")},{title:"Multiple Sizes",jsx:'\n\n \n\n\n Small\n\n\n Medium\n\n\n Large\n',component:r.default.createElement("div",null,r.default.createElement(a.AwesomeButton,{cssModule:o.default.Modules[e],size:"icon",type:"primary"},r.default.createElement("i",{className:"fa fa-codepen","aria-hidden":!0})),r.default.createElement(a.AwesomeButton,{cssModule:o.default.Modules[e],size:"small",type:"primary"},"Small"),r.default.createElement(a.AwesomeButton,{cssModule:o.default.Modules[e],size:"medium",type:"primary"},"Medium"),r.default.createElement(a.AwesomeButton,{cssModule:o.default.Modules[e],size:"large",type:"primary"},"Large"))},{title:"Styling with - CSS",description:"For styling with CSS you can access all themes on the /dist folder and append it via or import into your .js or .css files.",jsx:"import 'react-awesome-button/dist/themes/theme-blue.css';"},{title:"Styling with - CSS Modules",description:"For styling it through CSS Modules, import the file from the themes folder inside the src. You'll need a .scss loader in place in order to build it.",jsx:"\nimport AwesomeButton from 'react-awesome-button/src/components/AwesomeButton';\nimport styles from 'react-awesome-button/src/styles/themes/theme-blue';\n\n...\n\nfunction Component() {\n return (\n \n Primary Blue Themed Button\n \n );\n}\n"}]};var r=i(n(1)),o=i(n(6)),a=n(7);function i(e){return e&&e.__esModule?e:{default:e}}t.properties=[{name:"General",props:[{name:"button-default-height",type:"range",max:100,min:30,suffix:"px"},{name:"button-default-font-size",type:"range",max:25,min:10,suffix:"px"},{name:"button-default-border-radius",type:"range",max:25,suffix:"px"},{name:"button-horizontal-padding",type:"range",max:50,suffix:"px"},{name:"button-raise-level",type:"range",max:10,suffix:"px"}]},{name:"Animations",props:[{name:"button-hover-pressure",type:"range",max:4,step:.5},{name:"transform-speed",type:"range",max:.6,step:.025,suffix:"s"}]},{name:"Primary",props:[{name:"button-primary-color",type:"color"},{name:"button-primary-color-dark",type:"color"},{name:"button-primary-color-light",type:"color"},{name:"button-primary-color-hover",type:"color"},{name:"button-primary-border",type:"border"}]},{name:"Secondary",props:[{name:"button-secondary-color",type:"color"},{name:"button-secondary-color-dark",type:"color"},{name:"button-secondary-color-light",type:"color"},{name:"button-secondary-color-hover",type:"color"},{name:"button-secondary-border",type:"border"}]},{name:"Anchor",props:[{name:"button-anchor-color",type:"color"},{name:"button-anchor-color-dark",type:"color"},{name:"button-anchor-color-light",type:"color"},{name:"button-anchor-color-hover",type:"color"},{name:"button-anchor-border",type:"border"}]}],t.features=["Look and feel customisable and extendable via SASS variables and lists","Use it with CSSModules or Plain CSS (NO inline-styles)","Render any tag as the component's child (text, icon, img, svg)","Animated progress button","OnClick bubble animation"]},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r=n(25);e.exports=d,e.exports.parse=a,e.exports.compile=function(e,t){return s(a(e,t))},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,i=0,s="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var p=n[0],f=n[1],d=n.index;if(s+=e.slice(i,d),i=d+p.length,f)s+=f[1];else{var h=e[i],b=n[2],m=n[3],w=n[4],y=n[5],g=n[6],v=n[7];s&&(r.push(s),s="");var _=null!=b&&null!=h&&h!==b,E="+"===g||"*"===g,P="?"===g||"*"===g,O=n[2]||c,k=w||y;r.push({name:m||a++,prefix:b||"",delimiter:O,optional:P,repeat:E,partial:_,asterisk:!!v,pattern:k?u(k):v?".*":"[^"+l(O)+"]+?"})}}return i1&&void 0!==arguments[1]?arguments[1]:"&";return Object.entries(e).map((function(e){var t=r(e,2);return t[0]+"="+t[1]})).join(t)},t.classToModules=a,t.getClassName=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments[1];if(t)return t[e]||e;return e},t.setCssEndEvent=i,t.toggleMoveClasses=function(e){var t=e.element,n=e.root,r=e.cssModule,i=void 0===r?null:r,s=e.state,l=void 0===s?null:s;if(!t)return!1;if(!l)return t.classList.remove(a([n+"--"+o[0]],i),a([n+"--"+o[1]],i),a([n+"--"+o[2]],i)),!1;var u=o.filter((function(e){return e!==l})),c=u.length;for(;c--;)t.classList.remove(a([n+"--"+u[c]],i));return t.classList.add(a([n+"--"+l],i)),!0},t.createBubbleEffect=function(e){var t=e.event,n=e.button,r=e.content,o=e.className,a=n.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrolltop||0,l=document.createElement("span"),u=a.width<50?3*a.width:2*a.width;l.className=o,l.style.top="-"+(u/2-(t.pageY-a.top-s))+"px",l.style.left="-"+(u/2-(t.pageX-a.left))+"px",l.style.width=u+"px",l.style.height=u+"px",i(l,"animation",(function(){window.requestAnimationFrame((function(){r.removeChild(l)}))})),window.requestAnimationFrame((function(){r.appendChild(l)}))};var o=["middle","left","right"];function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments[1];if(!t)return e.join(" ").trim();for(var n=[],r=e.length;r--;)t[e[r]]&&n.push(t[e[r]]);return n.join(" ").trim()}function i(e,t,n){if(!e)return!1;var r=t.charAt(0).toUpperCase()+t.slice(1);return void 0!==e.style["Webkit"+r]?e.addEventListener("webkit"+r+"End",n):void 0!==e.style.OTransition?e.addEventListener("o"+t+"End",n):e.addEventListener(t+"End",n)}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e,t,{tolerance:n=0,propertyName:r}={}){return new Promise(o=>{if(!e)return void o(!1);let a=null;const i=t.charAt(0).toUpperCase()+t.slice(1);let s=0;function l(t){if((t.srcElement||t.target)===e){if(s>=n){if(r&&r!==t.propertyName)return;e.removeEventListener(a,l),o(t)}s+=1}}void 0!==e.style[`Webkit${i}`]&&(a=`webkit${i}End`),void 0!==e.style.OTransition&&(a=`o${t}End`),void 0!==e.style[t]&&(a=`${t}end`),e.clearCssEndEvent&&e.clearCssEndEvent(),e.clearCssEndEvent=function(){e.removeEventListener(a,l)},e.addEventListener(a,l)})}function o(e){window&&window.requestAnimationFrame(e)}function a(e){window&&window.requestAnimationFrame(()=>{window.requestAnimationFrame(e)})}function i(e,t){!function e(t,n){window&&t&&Number.isInteger(t)&&t>0?window.requestAnimationFrame(()=>{e(t-1,n)}):n()}(e+1,t)}function s(){return new Promise(e=>{a(e)})}function l(e,t={}){return new Promise(n=>{r(e,"transition",t).then(n)})}function u(e,t={}){return new Promise(n=>{r(e,"animation",t).then(n)})}n.r(t),n.d(t,"setCssEndEvent",(function(){return r})),n.d(t,"beforeCssLayout",(function(){return o})),n.d(t,"beforeNextCssLayout",(function(){return a})),n.d(t,"beforeFutureCssLayout",(function(){return i})),n.d(t,"onceNextCssLayout",(function(){return s})),n.d(t,"onceTransitionEnd",(function(){return l})),n.d(t,"onceAnimationEnd",(function(){return u}))}])},function(e,t,n){"use strict";function r(e){return!(e>255)&&("0"+Number(e).toString(16)).slice(-2)}Object.defineProperty(t,"__esModule",{value:!0}),t.shadeRGBColor=function(e,t){var n=e.split(","),r=t<0?0:255,o=t<0?-1*t:t,a=parseInt(n[0].slice(4),10),i=parseInt(n[1],10),s=parseInt(n[2],10);return"rgb("+(Math.round((r-a)*o)+a)+", "+(Math.round((r-i)*o)+i)+", "+(Math.round((r-s)*o)+s)+")"},t.setCssEndEvent=function(e,t){return new Promise((function(n){if(e){var r=null,o=t.charAt(0).toUpperCase()+t.slice(1);void 0!==e.style["Webkit"+o]&&(r="webkit"+o+"End"),void 0!==e.style.OTransition&&(r="o"+t+"End"),void 0!==e.style[t]&&(r=t+"end"),e.addEventListener(r,(function t(o){e.removeEventListener(r,t),(o.srcElement||o.target)===e&&n()}))}else n(!1)}))},t.rgba2hex=function(e){var t=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+)\s*)?\)/.exec(e);if(!t)return!1;var n=t[1],o=t[2],a=t[3],i=t[4],s=[r(n),r(o),r(a)];i&&s.push(r(i));return"#"+s.join("")},t.default={}},function(e,t,n){"use strict";n.r(t);var r=n(9),o=n.n(r),a=n(1),i=n.n(a),s=n(0),l=n.n(s),u=n(3),c=n.n(u),p=n(2),f=n.n(p);function d(e){return"/"===e.charAt(0)}function h(e,t){for(var n=t,r=n+1,o=e.length;r1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],r=t&&t.split("/")||[],o=e&&d(e),a=t&&d(t),i=o||a;if(e&&d(e)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var s=void 0;if(r.length){var l=r[r.length-1];s="."===l||".."===l||""===l}else s=!1;for(var u=0,c=r.length;c>=0;c--){var p=r[c];"."===p?h(r,c):".."===p?(h(r,c),u++):u&&(h(r,c),u--)}if(!i)for(;u--;u)r.unshift("..");!i||""===r[0]||r[0]&&d(r[0])||r.unshift("");var f=r.join("/");return s&&"/"!==f.substr(-1)&&(f+="/"),f},m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var w=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));var r=void 0===t?"undefined":m(t);if(r!==(void 0===n?"undefined":m(n)))return!1;if("object"===r){var o=t.valueOf(),a=n.valueOf();if(o!==t||a!==n)return e(o,a);var i=Object.keys(t),s=Object.keys(n);return i.length===s.length&&i.every((function(r){return e(t[r],n[r])}))}return!1},y=function(e){return"/"===e.charAt(0)?e:"/"+e},g=function(e){return"/"===e.charAt(0)?e.substr(1):e},v=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},_=function(e,t){return v(e,t)?e.substr(t.length):e},E=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},P=function(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o},O=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};f()(S,"Browser history needs a DOM");var t=window.history,n=R(),r=!A(),o=e.forceRefresh,a=void 0!==o&&o,i=e.getUserConfirmation,s=void 0===i?T:i,l=e.keyLength,u=void 0===l?6:l,p=e.basename?E(y(e.basename)):"",d=function(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return c()(!p||v(a,p),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+p+'".'),p&&(a=_(a,p)),k(a,r,n)},h=function(){return Math.random().toString(36).substr(2,u)},b=j(),m=function(e){F(J,e),J.length=t.length,b.notifyListeners(J.location,J.action)},w=function(e){L(e)||x(d(e.state))},g=function(){x(d(z()))},O=!1,x=function(e){if(O)O=!1,m();else{b.confirmTransitionTo(e,"POP",s,(function(t){t?m({action:"POP",location:e}):B(e)}))}},B=function(e){var t=J.location,n=H.indexOf(t.key);-1===n&&(n=0);var r=H.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(O=!0,D(o))},q=d(z()),H=[q.key],$=function(e){return p+P(e)},U=function(e,r){c()(!("object"===(void 0===e?"undefined":N(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=k(e,r,h(),J.location);b.confirmTransitionTo(o,"PUSH",s,(function(e){if(e){var r=$(o),i=o.key,s=o.state;if(n)if(t.pushState({key:i,state:s},null,r),a)window.location.href=r;else{var l=H.indexOf(J.location.key),u=H.slice(0,-1===l?0:l+1);u.push(o.key),H=u,m({action:"PUSH",location:o})}else c()(void 0===s,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=r}}))},I=function(e,r){c()(!("object"===(void 0===e?"undefined":N(e))&&void 0!==e.state&&void 0!==r),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=k(e,r,h(),J.location);b.confirmTransitionTo(o,"REPLACE",s,(function(e){if(e){var r=$(o),i=o.key,s=o.state;if(n)if(t.replaceState({key:i,state:s},null,r),a)window.location.replace(r);else{var l=H.indexOf(J.location.key);-1!==l&&(H[l]=o.key),m({action:"REPLACE",location:o})}else c()(void 0===s,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(r)}}))},D=function(e){t.go(e)},W=function(){return D(-1)},V=function(){return D(1)},Y=0,G=function(e){1===(Y+=e)?(C(window,"popstate",w),r&&C(window,"hashchange",g)):0===Y&&(M(window,"popstate",w),r&&M(window,"hashchange",g))},X=!1,Q=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=b.setPrompt(e);return X||(G(1),X=!0),function(){return X&&(X=!1,G(-1)),t()}},K=function(e){var t=b.appendListener(e);return G(1),function(){G(-1),t()}},J={length:t.length,action:"POP",location:q,createHref:$,push:U,replace:I,go:D,goBack:W,goForward:V,block:Q,listen:K};return J},H=Object.assign||function(e){for(var t=1;t=0?t:0)+"#"+e)},W=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f()(S,"Hash history needs a DOM");var t=window.history,n=B(),r=e.getUserConfirmation,o=void 0===r?T:r,a=e.hashType,i=void 0===a?"slash":a,s=e.basename?E(y(e.basename)):"",l=$[i],u=l.encodePath,p=l.decodePath,d=function(){var e=p(U());return c()(!s||v(e,s),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+e+'" to begin with "'+s+'".'),s&&(e=_(e,s)),k(e)},h=j(),b=function(e){H(ee,e),ee.length=t.length,h.notifyListeners(ee.location,ee.action)},m=!1,w=null,g=function(){var e=U(),t=u(e);if(e!==t)D(t);else{var n=d(),r=ee.location;if(!m&&x(r,n))return;if(w===P(n))return;w=null,O(n)}},O=function(e){if(m)m=!1,b();else{h.confirmTransitionTo(e,"POP",o,(function(t){t?b({action:"POP",location:e}):R(e)}))}},R=function(e){var t=ee.location,n=F.lastIndexOf(P(t));-1===n&&(n=0);var r=F.lastIndexOf(P(e));-1===r&&(r=0);var o=n-r;o&&(m=!0,V(o))},A=U(),L=u(A);A!==L&&D(L);var N=d(),F=[P(N)],z=function(e){return"#"+u(s+P(e))},q=function(e,t){c()(void 0===t,"Hash history cannot push state; it is ignored");var n=k(e,void 0,void 0,ee.location);h.confirmTransitionTo(n,"PUSH",o,(function(e){if(e){var t=P(n),r=u(s+t);if(U()!==r){w=t,I(r);var o=F.lastIndexOf(P(ee.location)),a=F.slice(0,-1===o?0:o+1);a.push(t),F=a,b({action:"PUSH",location:n})}else c()(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),b()}}))},W=function(e,t){c()(void 0===t,"Hash history cannot replace state; it is ignored");var n=k(e,void 0,void 0,ee.location);h.confirmTransitionTo(n,"REPLACE",o,(function(e){if(e){var t=P(n),r=u(s+t);U()!==r&&(w=t,D(r));var o=F.indexOf(P(ee.location));-1!==o&&(F[o]=t),b({action:"REPLACE",location:n})}}))},V=function(e){c()(n,"Hash history go(n) causes a full page reload in this browser"),t.go(e)},Y=function(){return V(-1)},G=function(){return V(1)},X=0,Q=function(e){1===(X+=e)?C(window,"hashchange",g):0===X&&M(window,"hashchange",g)},K=!1,J=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=h.setPrompt(e);return K||(Q(1),K=!0),function(){return K&&(K=!1,Q(-1)),t()}},Z=function(e){var t=h.appendListener(e);return Q(1),function(){Q(-1),t()}},ee={length:t.length,action:"POP",location:N,createHref:z,push:q,replace:W,go:V,goBack:Y,goForward:G,block:J,listen:Z};return ee},V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.getUserConfirmation,n=e.initialEntries,r=void 0===n?["/"]:n,o=e.initialIndex,a=void 0===o?0:o,i=e.keyLength,s=void 0===i?6:i,l=j(),u=function(e){Y(O,e),O.length=O.entries.length,l.notifyListeners(O.location,O.action)},p=function(){return Math.random().toString(36).substr(2,s)},f=G(a,0,r.length-1),d=r.map((function(e){return k(e,void 0,"string"==typeof e?p():e.key||p())})),h=P,b=function(e,n){c()(!("object"===(void 0===e?"undefined":V(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=k(e,n,p(),O.location);l.confirmTransitionTo(r,"PUSH",t,(function(e){if(e){var t=O.index+1,n=O.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),u({action:"PUSH",location:r,index:t,entries:n})}}))},m=function(e,n){c()(!("object"===(void 0===e?"undefined":V(e))&&void 0!==e.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=k(e,n,p(),O.location);l.confirmTransitionTo(r,"REPLACE",t,(function(e){e&&(O.entries[O.index]=r,u({action:"REPLACE",location:r}))}))},w=function(e){var n=G(O.index+e,0,O.entries.length-1),r=O.entries[n];l.confirmTransitionTo(r,"POP",t,(function(e){e?u({action:"POP",location:r,index:n}):u()}))},y=function(){return w(-1)},g=function(){return w(1)},v=function(e){var t=O.index+e;return t>=0&&t0&&void 0!==arguments[0]&&arguments[0];return l.setPrompt(e)},E=function(e){return l.appendListener(e)},O={length:d.length,action:"POP",location:d[f],index:f,entries:d,createHref:h,push:b,replace:m,go:w,goBack:y,goForward:g,canGo:v,block:_,listen:E};return O},Q=n(4),K=n.n(Q),J=Object.assign||function(e){for(var t=1;t may have only one child element"),this.unlisten=r.listen((function(){e.setState({match:e.computeMatch(r.location.pathname)})}))},t.prototype.componentWillReceiveProps=function(e){K()(this.props.history===e.history,"You cannot change ")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?i.a.Children.only(e):null},t}(i.a.Component);ee.propTypes={history:l.a.object.isRequired,children:l.a.node},ee.contextTypes={router:l.a.object},ee.childContextTypes={router:l.a.object.isRequired};var te=ee,ne=te;function re(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var oe=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),i=0;i ignores the history prop. To use a custom history, use `import { Router }` instead of `import { BrowserRouter as Router }`.")},t.prototype.render=function(){return i.a.createElement(ne,{history:this.history,children:this.props.children})},t}(i.a.Component);oe.propTypes={basename:l.a.string,forceRefresh:l.a.bool,getUserConfirmation:l.a.func,keyLength:l.a.number,children:l.a.node};var ae=oe;function ie(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var se=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),i=0;i ignores the history prop. To use a custom history, use `import { Router }` instead of `import { HashRouter as Router }`.")},t.prototype.render=function(){return i.a.createElement(ne,{history:this.history,children:this.props.children})},t}(i.a.Component);se.propTypes={basename:l.a.string,getUserConfirmation:l.a.func,hashType:l.a.oneOf(["hashbang","noslash","slash"]),children:l.a.node};var le=se,ue=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["replace","to","innerRef"]);f()(this.context.router,"You should not use outside a "),f()(void 0!==t,'You must specify the "to" property');var o=this.context.router.history,a="string"==typeof t?k(t,null,null,o.location):t,s=o.createHref(a);return i.a.createElement("a",ue({},r,{onClick:this.handleClick,href:s,ref:n}))},t}(i.a.Component);fe.propTypes={onClick:l.a.func,target:l.a.string,replace:l.a.bool,to:l.a.oneOfType([l.a.string,l.a.object]).isRequired,innerRef:l.a.oneOfType([l.a.string,l.a.func])},fe.defaultProps={replace:!1},fe.contextTypes={router:l.a.shape({history:l.a.shape({push:l.a.func.isRequired,replace:l.a.func.isRequired,createHref:l.a.func.isRequired}).isRequired}).isRequired};var de=fe;function he(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var be=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),i=0;i ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},t.prototype.render=function(){return i.a.createElement(te,{history:this.history,children:this.props.children})},t}(i.a.Component);be.propTypes={initialEntries:l.a.array,initialIndex:l.a.number,getUserConfirmation:l.a.func,keyLength:l.a.number,children:l.a.node};var me=be,we=n(10),ye=n.n(we),ge={},ve=0,_e=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=ge[n]||(ge[n]={});if(r[e])return r[e];var o=[],a={re:ye()(e,o,t),keys:o};return ve<1e4&&(r[e]=a,ve++),a},Ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof t&&(t={path:t});var r=t,o=r.path,a=r.exact,i=void 0!==a&&a,s=r.strict,l=void 0!==s&&s,u=r.sensitive,c=void 0!==u&&u;if(null==o)return n;var p=_e(o,{end:i,strict:l,sensitive:c}),f=p.re,d=p.keys,h=f.exec(e);if(!h)return null;var b=h[0],m=h.slice(1),w=e===b;return i&&!w?null:{path:o,url:"/"===o&&""===b?"/":b,isExact:w,params:d.reduce((function(e,t,n){return e[t.name]=m[n],e}),{})}},Pe=Object.assign||function(e){for(var t=1;t or withRouter() outside a ");var l=t.route,u=(r||l.location).pathname;return Ee(u,{path:o,strict:a,exact:i,sensitive:s},l.match)},t.prototype.componentWillMount=function(){K()(!(this.props.component&&this.props.render),"You should not use and in the same route; will be ignored"),K()(!(this.props.component&&this.props.children&&!ke(this.props.children)),"You should not use and in the same route; will be ignored"),K()(!(this.props.render&&this.props.children&&!ke(this.props.children)),"You should not use and in the same route; will be ignored")},t.prototype.componentWillReceiveProps=function(e,t){K()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),K()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(e,t.router)})},t.prototype.render=function(){var e=this.state.match,t=this.props,n=t.children,r=t.component,o=t.render,a=this.context.router,s=a.history,l=a.route,u=a.staticContext,c={match:e,location:this.props.location||l.location,history:s,staticContext:u};return r?e?i.a.createElement(r,c):null:o?e?o(c):null:"function"==typeof n?n(c):n&&!ke(n)?i.a.Children.only(n):null},t}(i.a.Component);xe.propTypes={computedMatch:l.a.object,path:l.a.string,exact:l.a.bool,strict:l.a.bool,sensitive:l.a.bool,component:l.a.func,render:l.a.func,children:l.a.oneOfType([l.a.func,l.a.node]),location:l.a.object},xe.contextTypes={router:l.a.shape({history:l.a.object.isRequired,route:l.a.object.isRequired,staticContext:l.a.object})},xe.childContextTypes={router:l.a.object.isRequired};var je=xe,Se=je,Ce=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),d="object"===(void 0===t?"undefined":Me(t))?t.pathname:t,h=d&&d.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return i.a.createElement(Se,{path:h,exact:n,strict:r,location:o,children:function(e){var n=e.location,r=e.match,o=!!(c?c(r,n):r);return i.a.createElement(de,Ce({to:t,className:o?[s,a].filter((function(e){return e})).join(" "):s,style:o?Ce({},u,l):u,"aria-current":o&&p||null},f))}})};Te.propTypes={to:de.propTypes.to,exact:l.a.bool,strict:l.a.bool,location:l.a.object,activeClassName:l.a.string,className:l.a.string,activeStyle:l.a.object,style:l.a.object,isActive:l.a.func,"aria-current":l.a.oneOf(["page","step","location","date","time","true"])},Te.defaultProps={activeClassName:"active","aria-current":"page"};var Re=Te;var Ae=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.enable=function(e){this.unblock&&this.unblock(),this.unblock=this.context.router.history.block(e)},t.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},t.prototype.componentWillMount=function(){f()(this.context.router,"You should not use outside a "),this.props.when&&this.enable(this.props.message)},t.prototype.componentWillReceiveProps=function(e){e.when?this.props.when&&this.props.message===e.message||this.enable(e.message):this.disable()},t.prototype.componentWillUnmount=function(){this.disable()},t.prototype.render=function(){return null},t}(i.a.Component);Ae.propTypes={when:l.a.bool,message:l.a.oneOfType([l.a.func,l.a.string]).isRequired},Ae.defaultProps={when:!0},Ae.contextTypes={router:l.a.shape({history:l.a.shape({block:l.a.func.isRequired}).isRequired}).isRequired};var Be=Ae,Le={},Ne=0,Fe=function(e){var t=e,n=Le[t]||(Le[t]={});if(n[e])return n[e];var r=ye.a.compile(e);return Ne<1e4&&(n[e]=r,Ne++),r},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("/"===e)return e;var n=Fe(e);return n(t,{pretty:!0})},qe=Object.assign||function(e){for(var t=1;t outside a "),this.isStatic()&&this.perform()},t.prototype.componentDidMount=function(){this.isStatic()||this.perform()},t.prototype.componentDidUpdate=function(e){var t=k(e.to),n=k(this.props.to);x(t,n)?K()(!1,"You tried to redirect to the same route you're currently on: \""+n.pathname+n.search+'"'):this.perform()},t.prototype.computeTo=function(e){var t=e.computedMatch,n=e.to;return t?"string"==typeof n?ze(n,t.params):qe({},n,{pathname:ze(n.pathname,t.params)}):n},t.prototype.perform=function(){var e=this.context.router.history,t=this.props.push,n=this.computeTo(this.props);t?e.push(n):e.replace(n)},t.prototype.render=function(){return null},t}(i.a.Component);He.propTypes={computedMatch:l.a.object,push:l.a.bool,from:l.a.string,to:l.a.oneOfType([l.a.string,l.a.object]).isRequired},He.defaultProps={push:!1},He.contextTypes={router:l.a.shape({history:l.a.shape({push:l.a.func.isRequired,replace:l.a.func.isRequired}).isRequired,staticContext:l.a.object}).isRequired};var $e=He,Ue=Object.assign||function(e){for(var t=1;t",e)}},Xe=function(){},Qe=function(e){function t(){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var o=arguments.length,a=Array(o),i=0;i ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},t.prototype.render=function(){var e=this.props,t=e.basename,n=(e.context,e.location),r=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["basename","context","location"]),o={createHref:this.createHref,action:"POP",location:Ve(t,k(n)),push:this.handlePush,replace:this.handleReplace,go:Ge("go"),goBack:Ge("goBack"),goForward:Ge("goForward"),listen:this.handleListen,block:this.handleBlock};return i.a.createElement(te,Ue({},r,{history:o}))},t}(i.a.Component);Qe.propTypes={basename:l.a.string,context:l.a.object.isRequired,location:l.a.oneOfType([l.a.string,l.a.object])},Qe.defaultProps={basename:"",location:"/"},Qe.childContextTypes={router:l.a.object.isRequired};var Ke=Qe;var Je=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.componentWillMount=function(){f()(this.context.router,"You should not use outside a ")},t.prototype.componentWillReceiveProps=function(e){K()(!(e.location&&!this.props.location),' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),K()(!(!e.location&&this.props.location),' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},t.prototype.render=function(){var e=this.context.router.route,t=this.props.children,n=this.props.location||e.location,r=void 0,o=void 0;return i.a.Children.forEach(t,(function(t){if(null==r&&i.a.isValidElement(t)){var a=t.props,s=a.path,l=a.exact,u=a.strict,c=a.sensitive,p=a.from,f=s||p;o=t,r=Ee(n.pathname,{path:f,exact:l,strict:u,sensitive:c},e.match)}})),r?i.a.cloneElement(o,{location:n,computedMatch:r}):null},t}(i.a.Component);Je.contextTypes={router:l.a.shape({route:l.a.object.isRequired}).isRequired},Je.propTypes={children:l.a.node,location:l.a.object};var Ze=Je,et=ze,tt=Ee,nt=n(15),rt=n.n(nt),ot=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["wrappedComponentRef"]);return i.a.createElement(je,{children:function(t){return i.a.createElement(e,ot({},r,t,{ref:n}))}})};return t.displayName="withRouter("+(e.displayName||e.name)+")",t.WrappedComponent=e,t.propTypes={wrappedComponentRef:l.a.func},rt()(t,e)};n.d(t,"BrowserRouter",(function(){return ae})),n.d(t,"HashRouter",(function(){return le})),n.d(t,"Link",(function(){return de})),n.d(t,"MemoryRouter",(function(){return me})),n.d(t,"NavLink",(function(){return Re})),n.d(t,"Prompt",(function(){return Be})),n.d(t,"Redirect",(function(){return $e})),n.d(t,"Route",(function(){return Se})),n.d(t,"Router",(function(){return ne})),n.d(t,"StaticRouter",(function(){return Ke})),n.d(t,"Switch",(function(){return Ze})),n.d(t,"generatePath",(function(){return et})),n.d(t,"matchPath",(function(){return tt})),n.d(t,"withRouter",(function(){return at}))},function(e,t,n){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a=Object.defineProperty,i=Object.getOwnPropertyNames,s=Object.getOwnPropertySymbols,l=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,c=u&&u(Object);e.exports=function e(t,n,p){if("string"!=typeof n){if(c){var f=u(n);f&&f!==c&&e(t,f,p)}var d=i(n);s&&(d=d.concat(s(n)));for(var h=0;hM.length&&M.push(e)}function A(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case l:case u:a=!0}}if(a)return n(r,e,""===t?"."+B(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;i"),r.default.createElement("span",null,o)),r.default.createElement("p",null,s),r.default.createElement(i.Navigation,{domain:c,theme:p,themes:l})))};l.propTypes={title:o.default.string.isRequired,name:o.default.string.isRequired,themes:o.default.array.isRequired,module:o.default.object.isRequired,size:o.default.string.isRequired,domain:o.default.string.isRequired,framework:o.default.string.isRequired,theme:o.default.string.isRequired,description:o.default.string.isRequired},t.default=l},function(e,t,n){e.exports={container:"container--1Azt",support:"support--3hLr",title:"title---uVj"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(1)),o=i(n(0)),a=i(n(32));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=e.children;return r.default.createElement("section",{className:a.default.container},t)};s.propTypes={children:o.default.node.isRequired},t.default=s},function(e,t,n){e.exports={container:"container--2jgw"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(1)),o=i(n(0)),a=i(n(34));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=e.children;return r.default.createElement("div",{className:a.default.container},r.default.createElement("div",{className:a.default.wrapper},t))};s.propTypes={children:o.default.node.isRequired},t.default=s},function(e,t,n){e.exports={container:"container--2K0z",wrapper:"wrapper--3_NH"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(1)),o=i(n(0)),a=i(n(36));function i(e){return e&&e.__esModule?e:{default:e}}var s=function(e){var t=e.children;return r.default.createElement("section",{className:a.default.container},t)};s.propTypes={children:o.default.node.isRequired},t.default=s},function(e,t,n){e.exports={container:"container--3ml3"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n.aws-btn {"];return this.props.properties.forEach((function(n){n.props.forEach((function(n){var r="--"+n.name;t.push("- "+r+": "+e.state[r]+(n.suffix||"")+";
")}))})),t.push("
}
"),t.join("")}},{key:"updateAllValues",value:function(e){var t=this,n={customized:!1};return!!this.element&&(e.properties.forEach((function(e){e.props.forEach((function(e){var r="--"+e.name,o=getComputedStyle(t.element).getPropertyValue(r).trim();o.match(/(#)([a-z0-9]{3})($)/)&&(o=o.replace(/(#)([a-z0-9]{3})/,"$1$2$2")),o.match(/(px|em|s)$/)&&(o=o.replace(/px|em|s/gi,"")),o.match(/rgb/)&&(o=(0,u.rgba2hex)(o)),n[r]=o,"undefined"!=typeof window&&f(document.querySelectorAll('[data-role="customizable"] .'+t.props.componentClass),{property:r,value:o+(e.suffix||"")})}))})),this.setState(n),!0)}},{key:"updateProperties",value:function(e){if(e.properties){var t={};e.properties.forEach((function(e){e.props.forEach((function(e){t["--"+e.name]=null}))})),this.setState(t)}}},{key:"updateElement",value:function(e){this.control&&(this.element=this.control.querySelector("."+e))}},{key:"updatePopoverText",value:function(){this.props.handlePopover({popoverText:this.getStylesText()})}},{key:"renderInputs",value:function(e){var t=this;return e.map((function(e){var n=e.name,o=e.type,i="--"+n,s={};s.type=o,"range"===o&&(s.type=o,s.min=e.min||0,s.max=e.max||10,s.step=e.step||1);var l=function(n){!1===t.state.customized&&t.setState({customized:!0});var r={},o=n.target.value;r[i]=o,t.setState(r,(function(){t.updatePopoverText()})),"undefined"!=typeof window&&(e.suffix&&(o=""+o+e.suffix),f(document.querySelectorAll('[data-role="customizable"] .'+t.props.componentClass),{property:i,value:o}))},u=null;switch(o){case"color":u=a.default.createElement(c.ColorPicker,r({value:t.state[i]||t.values[i]||"",setTransparency:l,onChange:l},s));break;case"border":u=a.default.createElement(c.BorderPicker,r({value:t.state[i]||t.values[i]||"",onChange:l},s));break;default:u=a.default.createElement("input",r({value:t.state[i]||t.values[i]||"",onChange:l},s))}var p=t.state[i]&&""+(t.state[i]||t.values[i])+(e.suffix||"")||"";return a.default.createElement("li",{key:i},a.default.createElement("label",null,a.default.createElement("code",null,n)),a.default.createElement("div",null,u),a.default.createElement("div",null,a.default.createElement("span",null,p)))}))}},{key:"renderSection",value:function(e){return a.default.createElement("section",{key:e.name},a.default.createElement("h3",null,e.name),a.default.createElement("ul",null,this.renderInputs(e.props)))}},{key:"renderSections",value:function(e){var t=this;return e.map((function(e){return t.renderSection(e)}))}},{key:"render",value:function(){var e=this;return a.default.createElement("section",{className:s.default.container},a.default.createElement("header",null,a.default.createElement("h2",null,"Custom Properties"),a.default.createElement("p",null,"Button customization through CSS custom-properties."),a.default.createElement("div",{ref:function(t){e.control=t},className:s.default.control},a.default.createElement(l.AwesomeButton,{size:"medium",disabled:!this.state.customized,action:this.resetStyles,cssModule:this.props.module},"Reset Styles"),a.default.createElement(l.AwesomeButtonSocial,{size:"medium",href:this.props.repository,target:"_blank",type:"github",cssModule:this.props.module},"Source"))),a.default.createElement("ul",null,this.renderSections(this.props.properties)),a.default.createElement("footer",null,a.default.createElement("div",{className:s.default.export},a.default.createElement(l.AwesomeButton,{size:"medium",action:this.exportStyles,cssModule:this.props.module},"Export Styles")),a.default.createElement("p",null,"Access the source on ",a.default.createElement("a",{target:"_blank",href:this.props.repository},"github")," to check all customisable options")))}}]),t}(a.default.Component);d.propTypes={repository:i.default.string.isRequired,module:i.default.object.isRequired,handlePopover:i.default.func.isRequired,theme:i.default.string.isRequired,componentClass:i.default.string.isRequired,properties:i.default.array.isRequired},t.default=d},function(e,t,n){e.exports={container:"container--1xcs",export:"export--1m6I",control:"control--vv7O"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=t.force,r=void 0!==n&&n,o=t.leave,a=void 0!==o&&o;(0,l.toggleMoveClasses)({element:this.container,root:this.rootElement,cssModule:this.props.cssModule});var i=this.props.active&&!r?this.rootElement+"--active":null;null===i&&!1===a&&(0,s.setCssEndEvent)(this.content,"transition",{tolerance:1}).then((function(){e.props.onReleased&&e.props.onReleased(e.container)})),this.setState({pressPosition:i})}},{key:"pressIn",value:function(){!0!==this.state.disabled&&!0!==this.props.blocked&&(this.pressed=(new Date).getTime(),this.setState({pressPosition:this.rootElement+"--active"}))}},{key:"pressOut",value:function(e){var t=this;this.clearTimer&&clearTimeout(this.clearTimer);var n=(new Date).getTime()-this.pressed;if(!0===this.props.ripple&&this.createBubble(e),"undefined"!=typeof window&&this.button){var r=new Event("action");this.button.dispatchEvent(r)}this.action(),this.clearTimer=setTimeout((function(){t.clearPress()}),100-n)}},{key:"action",value:function(){var e=this.props,t=e.action,n=e.onPress;if(this.button){if(t)return void t(this.container);n&&n(this.container)}}},{key:"createBubble",value:function(e){(0,l.createBubbleEffect)({event:e,button:this.button,content:this.content,className:(0,l.getClassName)(this.rootElement+"__bubble",this.props.cssModule)})}},{key:"moveEvents",value:function(){var e=this,t={onClick:function(t){e.props.href&&e.state.disabled&&(t.preventDefault(),t.stopPropagation())},onMouseLeave:function(){e.clearPress({leave:!0})},onMouseDown:function(t){t&&1!==t.nativeEvent.which||e.pressIn()},onMouseUp:function(t){if(!0===e.state.disabled||!0===e.props.blocked)return t.preventDefault(),void t.stopPropagation();e.pressOut(t)}};return!0===this.props.moveEvents?t.onMouseMove=function(t){if(!0!==e.state.disabled){var n=e.button,r=n.getBoundingClientRect().left,o=n.offsetWidth,a=t.pageXr+.65*o?"right":"middle";(0,l.toggleMoveClasses)({element:e.container,root:e.rootElement,cssModule:e.props.cssModule,state:a})}}:t.onMouseEnter=function(){(0,l.toggleMoveClasses)({element:e.container,root:e.rootElement,cssModule:e.props.cssModule,state:"middle"})},t}},{key:"render",value:function(){var e=this,t=this.renderComponent,n=this.props,o=n.title,i=n.style,s=n.cssModule,u=n.children;return a.default.createElement(t,r({style:i,className:this.getRootClassName(),role:"button",title:o},this.extraProps,this.moveEvents()),a.default.createElement("span",{ref:function(t){e.button=t},className:(0,l.getClassName)(this.rootElement+"__wrapper",s)},a.default.createElement("span",{ref:function(t){e.content=t},className:(0,l.getClassName)(this.rootElement+"__content",s)},a.default.createElement("span",{ref:function(t){e.child=t}},u))))}}]),t}(a.default.Component);d.propTypes={action:i.default.func,onPress:i.default.func,onReleased:i.default.func,ripple:i.default.bool,children:i.default.node,disabled:i.default.bool,element:i.default.func,href:i.default.string,placeholder:i.default.bool,title:i.default.string,rootElement:i.default.string,moveEvents:i.default.bool,size:i.default.string,style:i.default.object,cssModule:i.default.object,className:i.default.string,target:i.default.string,to:i.default.string,type:i.default.string,visible:i.default.bool,active:i.default.bool,blocked:i.default.bool},d.defaultProps={action:null,onPress:null,onReleased:null,ripple:!1,blocked:!1,cssModule:null,children:null,disabled:!1,title:null,element:null,href:null,className:null,moveEvents:!0,placeholder:!1,rootElement:c,size:null,style:{},target:null,to:null,type:"primary",visible:!0,active:!1},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["children","icon","type","action","onPress","iconWidth","iconHeight","href"]);return a.default.createElement(s.AwesomeButton,r({type:o,action:this.action,href:c},p),n&&(0,u.default)({type:o,width:i,height:l,color:this.props.disabled?"rgba(255,255,255,0.35)":"#FFF"})," ",t)}}]),t}(a.default.Component);p.propTypes={action:i.default.func,onPress:i.default.func,children:i.default.node,disabled:i.default.bool,href:i.default.string,icon:i.default.bool,iconHeight:i.default.number,iconWidth:i.default.number,image:i.default.string,message:i.default.string,phone:i.default.string,type:i.default.string.isRequired,url:i.default.string,user:i.default.string},p.defaultProps={action:null,onPress:null,children:null,disabled:!1,href:null,icon:!0,iconHeight:23,iconWidth:30,image:null,message:null,phone:null,url:null,user:null},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.setState({loadingEnd:!0,loadingError:!e,errorLabel:t}),this.animationStage=1}},{key:"startLoading",value:function(){var e=this;this.loading=!0,this.setState({blocked:!0,active:!0},(function(){(0,s.beforeFutureCssLayout)(2,(function(){e.setState({loadingStart:!0})}))}))}},{key:"clearLoading",value:function(e){this.loading=!1,this.setState({loadingStart:!1,loadingEnd:!1,active:!1},e)}},{key:"moveEvents",value:function(){var e=this;return{onMouseDown:function(t){!0===e.props.disabled||!0===e.loading||!0===e.state.blocked||t&&1!==t.nativeEvent.which||(e.loading=!0)},onMouseUp:function(t){if(!0===e.props.disabled||!0===e.loading||!0===e.state.blocked)return t.preventDefault(),void t.stopPropagation();e.action()}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,o=t.size,i=t.cssModule,s=t.loadingLabel,c=t.resultLabel,p=(t.action,t.type),f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["children","size","cssModule","loadingLabel","resultLabel","action","type"]),d=this.state,h=d.active,b=d.blocked,m=d.errorLabel;return a.default.createElement(l.AwesomeButton,r({size:o,type:p,className:this.getRootClassName(),action:this.action,cssModule:i,active:h,blocked:b},this.moveEvents(),f),a.default.createElement("span",{ref:function(t){e.content=t},"data-loading":s||null,"data-status":m||c||null,className:(0,u.getClassName)(this.rootElement+"__progress",i)},a.default.createElement("span",null,n)))}}]),t}(a.default.Component);d.propTypes={action:i.default.func,onPress:i.default.func,loadingLabel:i.default.string,resultLabel:i.default.string,rootElement:i.default.node,cssModule:i.default.object,children:i.default.node,disabled:i.default.bool,size:i.default.string,type:i.default.string,fakePress:i.default.bool,releaseDelay:i.default.number},d.defaultProps={action:null,onPress:null,rootElement:null,loadingLabel:"Wait..",resultLabel:"Success!",disabled:!1,cssModule:null,fakePress:!1,children:null,size:null,type:null,releaseDelay:500},t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;ne.length)return;if(!(_ instanceof l)){if(b&&g!=t.length-1){if(f.lastIndex=v,!(j=f.exec(e)))break;for(var E=j.index+(h?j[1].length:0),P=j.index+j[0].length,O=g,k=v,x=t.length;O=(k+=t[O].length)&&(++g,v=k);if(t[g]instanceof l)continue;S=O-g,_=e.slice(v,k),j.index-=v}else{f.lastIndex=0;var j=f.exec(_),S=1}if(j){h&&(m=j[1]?j[1].length:0);P=(E=j.index+m)+(j=j[0].slice(m)).length;var C=_.slice(0,E),M=_.slice(P),T=[g,S];C&&(++g,v+=C.length,T.push(C));var R=new l(u,d?r.tokenize(j,d):j,w,j,b);if(T.push(R),M&&T.push(M),Array.prototype.splice.apply(t,T),1!=S&&r.matchGrammar(e,t,n,g,v,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t,n){var o=[e],a=t.rest;if(a){for(var i in a)t[i]=a[i];delete t.rest}return r.matchGrammar(e,o,t,0,0,!1),o},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,a=0;o=n[a++];)o(t)}}},o=r.Token=function(e,t,n,r,o){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!o};if(o.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map((function(n){return o.stringify(n,t,e)})).join("");var a={type:e.type,content:o.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var i="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(a.classes,i)}r.hooks.run("wrap",a);var s=Object.keys(a.attributes).map((function(e){return e+'="'+(a.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+(s?" "+s:"")+">"+a.content+""+a.tag+">"},!n.document)return n.addEventListener?(r.disableWorkerMessageHandler||n.addEventListener("message",(function(e){var t=JSON.parse(e.data),o=t.language,a=t.code,i=t.immediateClose;n.postMessage(r.highlight(a,r.languages[o],o)),i&&n.close()}),!1),n.Prism):n.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(r.filename=a.src,r.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),n.Prism}();e.exports&&(e.exports=r),void 0!==t&&(t.Prism=r),r.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),r.languages.xml=r.languages.markup,r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},r.languages.css.atrule.inside.rest=r.languages.css,r.languages.markup&&(r.languages.insertBefore("markup","tag",{style:{pattern:/(