Added Statistics calculation
Statistics now show calculated values
This commit is contained in:
parent
fe87374e47
commit
fc0f69dacb
2147 changed files with 141321 additions and 39 deletions
37
node_modules/mui/.npmignore
generated
vendored
Normal file
37
node_modules/mui/.npmignore
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules
|
||||
jspm_packages
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
21
node_modules/mui/LICENSE
generated
vendored
Normal file
21
node_modules/mui/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017 VERTEX SYSTEMS
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
2
node_modules/mui/README.md
generated
vendored
Normal file
2
node_modules/mui/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# mui
|
||||
Material user interface library
|
||||
26
node_modules/mui/package.json
generated
vendored
Normal file
26
node_modules/mui/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "mui",
|
||||
"version": "0.0.1",
|
||||
"description": "Material user interface library",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vertexsystems/mui.git"
|
||||
},
|
||||
"keywords": [
|
||||
"component",
|
||||
"components",
|
||||
"material",
|
||||
"ui",
|
||||
"ux"
|
||||
],
|
||||
"author": "Chedwick Montoril <chedwick@vertex.systems> (http://vertex.systems)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/vertexsystems/mui/issues"
|
||||
},
|
||||
"homepage": "https://github.com/vertexsystems/mui#readme"
|
||||
}
|
||||
96
node_modules/mui/source/elements/Paper/Paper.js
generated
vendored
Normal file
96
node_modules/mui/source/elements/Paper/Paper.js
generated
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
import React, {Component} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import propTypes from '../utils/propTypes';
|
||||
import transitions from '../styles/transitions';
|
||||
|
||||
function getStyles(props, context) {
|
||||
const {
|
||||
rounded,
|
||||
circle,
|
||||
transitionEnabled,
|
||||
zDepth,
|
||||
} = props;
|
||||
|
||||
const {
|
||||
baseTheme,
|
||||
paper,
|
||||
borderRadius,
|
||||
} = context.muiTheme;
|
||||
|
||||
return {
|
||||
root: {
|
||||
color: paper.color,
|
||||
backgroundColor: paper.backgroundColor,
|
||||
transition: transitionEnabled && transitions.easeOut(),
|
||||
boxSizing: 'border-box',
|
||||
fontFamily: baseTheme.fontFamily,
|
||||
WebkitTapHighlightColor: 'rgba(0,0,0,0)', // Remove mobile color flashing (deprecated)
|
||||
boxShadow: paper.zDepthShadows[zDepth - 1], // No shadow for 0 depth papers
|
||||
borderRadius: circle ? '50%' : rounded ? borderRadius : '0px',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
class Paper extends Component {
|
||||
static propTypes = {
|
||||
/**
|
||||
* Children passed into the paper element.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Set to true to generate a circlular paper container.
|
||||
*/
|
||||
circle: PropTypes.bool,
|
||||
/**
|
||||
* By default, the paper container will have a border radius.
|
||||
* Set this to false to generate a container with sharp corners.
|
||||
*/
|
||||
rounded: PropTypes.bool,
|
||||
/**
|
||||
* Override the inline-styles of the root element.
|
||||
*/
|
||||
style: PropTypes.object,
|
||||
/**
|
||||
* Set to false to disable CSS transitions for the paper element.
|
||||
*/
|
||||
transitionEnabled: PropTypes.bool,
|
||||
/**
|
||||
* This number represents the zDepth of the paper shadow.
|
||||
*/
|
||||
zDepth: propTypes.zDepth,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
circle: false,
|
||||
rounded: true,
|
||||
transitionEnabled: true,
|
||||
zDepth: 1,
|
||||
};
|
||||
|
||||
static contextTypes = {
|
||||
muiTheme: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
circle, // eslint-disable-line no-unused-vars
|
||||
rounded, // eslint-disable-line no-unused-vars
|
||||
style,
|
||||
transitionEnabled, // eslint-disable-line no-unused-vars
|
||||
zDepth, // eslint-disable-line no-unused-vars
|
||||
...other
|
||||
} = this.props;
|
||||
|
||||
const {prepareStyles} = this.context.muiTheme;
|
||||
const styles = getStyles(this.props, this.context);
|
||||
|
||||
return (
|
||||
<div {...other} style={prepareStyles(Object.assign(styles.root, style))}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Paper;
|
||||
90
node_modules/mui/source/elements/Paper/Paper.spec.js
generated
vendored
Normal file
90
node_modules/mui/source/elements/Paper/Paper.spec.js
generated
vendored
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/* eslint-env mocha */
|
||||
import React from 'react';
|
||||
import {shallow} from 'enzyme';
|
||||
import {assert} from 'chai';
|
||||
import Paper from './Paper';
|
||||
import getMuiTheme from '../styles/getMuiTheme';
|
||||
|
||||
describe('<Paper />', () => {
|
||||
const muiTheme = getMuiTheme();
|
||||
const shallowWithContext = (node) => shallow(node, {context: {muiTheme}});
|
||||
const testChildren = <div className="unique">Hello World</div>;
|
||||
|
||||
it('renders children by default', () => {
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
});
|
||||
|
||||
it('renders children and have borderRadius by default', () => {
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
assert.strictEqual(wrapper.prop('style').borderRadius, 2, 'should have round corner');
|
||||
});
|
||||
|
||||
it('renders children and should be a circle', () => {
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper circle={true}>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
assert.strictEqual(wrapper.prop('style').borderRadius, '50%', 'should be a circle');
|
||||
});
|
||||
|
||||
it('renders children and does not have rounded corners', () => {
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper rounded={false}>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
assert.strictEqual(wrapper.prop('style').borderRadius, '0px', 'should not have borderRadius');
|
||||
});
|
||||
|
||||
it('renders children and overwrite styles', () => {
|
||||
const style = {
|
||||
backgroundColor: 'red',
|
||||
borderRadius: '70px',
|
||||
};
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper style={style}>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
assert.strictEqual(wrapper.prop('style').backgroundColor, 'red', 'should have red backgroundColor');
|
||||
assert.strictEqual(wrapper.prop('style').borderRadius, '70px', 'should have borderRadius');
|
||||
});
|
||||
|
||||
it('renders children and has css transitions by default', () => {
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
assert.ok(wrapper.prop('style').transition, 'should have css transitions');
|
||||
});
|
||||
|
||||
it('renders children and disable css transitions', () => {
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper transitionEnabled={false}>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
assert.isNotOk(wrapper.prop('style').transition, 'should not have css transitions');
|
||||
});
|
||||
|
||||
it('renders children and change zDepth', () => {
|
||||
const zDepth = 3;
|
||||
const wrapper = shallowWithContext(
|
||||
<Paper zDepth={zDepth}>{testChildren}</Paper>
|
||||
);
|
||||
|
||||
assert.ok(wrapper.contains(testChildren), 'should contain the children');
|
||||
assert.strictEqual(wrapper.prop('style').boxShadow, muiTheme.paper.zDepthShadows[zDepth - 1],
|
||||
'should have good zDepthShadows');
|
||||
});
|
||||
});
|
||||
1
node_modules/mui/source/elements/Paper/index.js
generated
vendored
Normal file
1
node_modules/mui/source/elements/Paper/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export default from './Paper';
|
||||
1
node_modules/mui/source/index.js
generated
vendored
Normal file
1
node_modules/mui/source/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export Paper from './elements/Paper';
|
||||
27
node_modules/mui/source/styles/MuiThemeProvider.js
generated
vendored
Normal file
27
node_modules/mui/source/styles/MuiThemeProvider.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import {Component} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import getMuiTheme from './getMuiTheme';
|
||||
|
||||
class MuiThemeProvider extends Component {
|
||||
|
||||
static propTypes = {
|
||||
children: PropTypes.element,
|
||||
muiTheme: PropTypes.object,
|
||||
};
|
||||
|
||||
static childContextTypes = {
|
||||
muiTheme: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
getChildContext() {
|
||||
return {
|
||||
muiTheme: this.props.muiTheme || getMuiTheme(),
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return this.props.children;
|
||||
}
|
||||
}
|
||||
|
||||
export default MuiThemeProvider;
|
||||
30
node_modules/mui/source/styles/baseThemes/darkBaseTheme.js
generated
vendored
Normal file
30
node_modules/mui/source/styles/baseThemes/darkBaseTheme.js
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import {
|
||||
cyan700,
|
||||
grey600,
|
||||
pinkA100, pinkA200, pinkA400,
|
||||
fullWhite,
|
||||
} from '../colors';
|
||||
import {fade} from '../../utils/colorManipulator';
|
||||
import spacing from '../spacing';
|
||||
|
||||
export default {
|
||||
spacing: spacing,
|
||||
fontFamily: 'Roboto, sans-serif',
|
||||
borderRadius: 2,
|
||||
palette: {
|
||||
primary1Color: cyan700,
|
||||
primary2Color: cyan700,
|
||||
primary3Color: grey600,
|
||||
accent1Color: pinkA200,
|
||||
accent2Color: pinkA400,
|
||||
accent3Color: pinkA100,
|
||||
textColor: fullWhite,
|
||||
secondaryTextColor: fade(fullWhite, 0.7),
|
||||
alternateTextColor: '#303030',
|
||||
canvasColor: '#303030',
|
||||
borderColor: fade(fullWhite, 0.3),
|
||||
disabledColor: fade(fullWhite, 0.3),
|
||||
pickerHeaderColor: fade(fullWhite, 0.12),
|
||||
clockCircleColor: fade(fullWhite, 0.12),
|
||||
},
|
||||
};
|
||||
40
node_modules/mui/source/styles/baseThemes/lightBaseTheme.js
generated
vendored
Normal file
40
node_modules/mui/source/styles/baseThemes/lightBaseTheme.js
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* NB: If you update this file, please also update `docs/src/app/customization/Themes.js`
|
||||
*/
|
||||
|
||||
import {
|
||||
cyan500, cyan700,
|
||||
pinkA200,
|
||||
grey100, grey300, grey400, grey500,
|
||||
white, darkBlack, fullBlack,
|
||||
} from '../colors';
|
||||
import {fade} from '../../utils/colorManipulator';
|
||||
import spacing from '../spacing';
|
||||
|
||||
/**
|
||||
* Light Theme is the default theme used in material-ui. It is guaranteed to
|
||||
* have all theme variables needed for every component. Variables not defined
|
||||
* in a custom theme will default to these values.
|
||||
*/
|
||||
export default {
|
||||
spacing: spacing,
|
||||
fontFamily: 'Roboto, sans-serif',
|
||||
borderRadius: 2,
|
||||
palette: {
|
||||
primary1Color: cyan500,
|
||||
primary2Color: cyan700,
|
||||
primary3Color: grey400,
|
||||
accent1Color: pinkA200,
|
||||
accent2Color: grey100,
|
||||
accent3Color: grey500,
|
||||
textColor: darkBlack,
|
||||
secondaryTextColor: fade(darkBlack, 0.54),
|
||||
alternateTextColor: white,
|
||||
canvasColor: white,
|
||||
borderColor: grey300,
|
||||
disabledColor: fade(darkBlack, 0.3),
|
||||
pickerHeaderColor: cyan500,
|
||||
clockCircleColor: fade(darkBlack, 0.07),
|
||||
shadowColor: fullBlack,
|
||||
},
|
||||
};
|
||||
285
node_modules/mui/source/styles/colors.js
generated
vendored
Normal file
285
node_modules/mui/source/styles/colors.js
generated
vendored
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
export const red50 = '#ffebee';
|
||||
export const red100 = '#ffcdd2';
|
||||
export const red200 = '#ef9a9a';
|
||||
export const red300 = '#e57373';
|
||||
export const red400 = '#ef5350';
|
||||
export const red500 = '#f44336';
|
||||
export const red600 = '#e53935';
|
||||
export const red700 = '#d32f2f';
|
||||
export const red800 = '#c62828';
|
||||
export const red900 = '#b71c1c';
|
||||
export const redA100 = '#ff8a80';
|
||||
export const redA200 = '#ff5252';
|
||||
export const redA400 = '#ff1744';
|
||||
export const redA700 = '#d50000';
|
||||
|
||||
export const pink50 = '#fce4ec';
|
||||
export const pink100 = '#f8bbd0';
|
||||
export const pink200 = '#f48fb1';
|
||||
export const pink300 = '#f06292';
|
||||
export const pink400 = '#ec407a';
|
||||
export const pink500 = '#e91e63';
|
||||
export const pink600 = '#d81b60';
|
||||
export const pink700 = '#c2185b';
|
||||
export const pink800 = '#ad1457';
|
||||
export const pink900 = '#880e4f';
|
||||
export const pinkA100 = '#ff80ab';
|
||||
export const pinkA200 = '#ff4081';
|
||||
export const pinkA400 = '#f50057';
|
||||
export const pinkA700 = '#c51162';
|
||||
|
||||
export const purple50 = '#f3e5f5';
|
||||
export const purple100 = '#e1bee7';
|
||||
export const purple200 = '#ce93d8';
|
||||
export const purple300 = '#ba68c8';
|
||||
export const purple400 = '#ab47bc';
|
||||
export const purple500 = '#9c27b0';
|
||||
export const purple600 = '#8e24aa';
|
||||
export const purple700 = '#7b1fa2';
|
||||
export const purple800 = '#6a1b9a';
|
||||
export const purple900 = '#4a148c';
|
||||
export const purpleA100 = '#ea80fc';
|
||||
export const purpleA200 = '#e040fb';
|
||||
export const purpleA400 = '#d500f9';
|
||||
export const purpleA700 = '#aa00ff';
|
||||
|
||||
export const deepPurple50 = '#ede7f6';
|
||||
export const deepPurple100 = '#d1c4e9';
|
||||
export const deepPurple200 = '#b39ddb';
|
||||
export const deepPurple300 = '#9575cd';
|
||||
export const deepPurple400 = '#7e57c2';
|
||||
export const deepPurple500 = '#673ab7';
|
||||
export const deepPurple600 = '#5e35b1';
|
||||
export const deepPurple700 = '#512da8';
|
||||
export const deepPurple800 = '#4527a0';
|
||||
export const deepPurple900 = '#311b92';
|
||||
export const deepPurpleA100 = '#b388ff';
|
||||
export const deepPurpleA200 = '#7c4dff';
|
||||
export const deepPurpleA400 = '#651fff';
|
||||
export const deepPurpleA700 = '#6200ea';
|
||||
|
||||
export const indigo50 = '#e8eaf6';
|
||||
export const indigo100 = '#c5cae9';
|
||||
export const indigo200 = '#9fa8da';
|
||||
export const indigo300 = '#7986cb';
|
||||
export const indigo400 = '#5c6bc0';
|
||||
export const indigo500 = '#3f51b5';
|
||||
export const indigo600 = '#3949ab';
|
||||
export const indigo700 = '#303f9f';
|
||||
export const indigo800 = '#283593';
|
||||
export const indigo900 = '#1a237e';
|
||||
export const indigoA100 = '#8c9eff';
|
||||
export const indigoA200 = '#536dfe';
|
||||
export const indigoA400 = '#3d5afe';
|
||||
export const indigoA700 = '#304ffe';
|
||||
|
||||
export const blue50 = '#e3f2fd';
|
||||
export const blue100 = '#bbdefb';
|
||||
export const blue200 = '#90caf9';
|
||||
export const blue300 = '#64b5f6';
|
||||
export const blue400 = '#42a5f5';
|
||||
export const blue500 = '#2196f3';
|
||||
export const blue600 = '#1e88e5';
|
||||
export const blue700 = '#1976d2';
|
||||
export const blue800 = '#1565c0';
|
||||
export const blue900 = '#0d47a1';
|
||||
export const blueA100 = '#82b1ff';
|
||||
export const blueA200 = '#448aff';
|
||||
export const blueA400 = '#2979ff';
|
||||
export const blueA700 = '#2962ff';
|
||||
|
||||
export const lightBlue50 = '#e1f5fe';
|
||||
export const lightBlue100 = '#b3e5fc';
|
||||
export const lightBlue200 = '#81d4fa';
|
||||
export const lightBlue300 = '#4fc3f7';
|
||||
export const lightBlue400 = '#29b6f6';
|
||||
export const lightBlue500 = '#03a9f4';
|
||||
export const lightBlue600 = '#039be5';
|
||||
export const lightBlue700 = '#0288d1';
|
||||
export const lightBlue800 = '#0277bd';
|
||||
export const lightBlue900 = '#01579b';
|
||||
export const lightBlueA100 = '#80d8ff';
|
||||
export const lightBlueA200 = '#40c4ff';
|
||||
export const lightBlueA400 = '#00b0ff';
|
||||
export const lightBlueA700 = '#0091ea';
|
||||
|
||||
export const cyan50 = '#e0f7fa';
|
||||
export const cyan100 = '#b2ebf2';
|
||||
export const cyan200 = '#80deea';
|
||||
export const cyan300 = '#4dd0e1';
|
||||
export const cyan400 = '#26c6da';
|
||||
export const cyan500 = '#00bcd4';
|
||||
export const cyan600 = '#00acc1';
|
||||
export const cyan700 = '#0097a7';
|
||||
export const cyan800 = '#00838f';
|
||||
export const cyan900 = '#006064';
|
||||
export const cyanA100 = '#84ffff';
|
||||
export const cyanA200 = '#18ffff';
|
||||
export const cyanA400 = '#00e5ff';
|
||||
export const cyanA700 = '#00b8d4';
|
||||
|
||||
export const teal50 = '#e0f2f1';
|
||||
export const teal100 = '#b2dfdb';
|
||||
export const teal200 = '#80cbc4';
|
||||
export const teal300 = '#4db6ac';
|
||||
export const teal400 = '#26a69a';
|
||||
export const teal500 = '#009688';
|
||||
export const teal600 = '#00897b';
|
||||
export const teal700 = '#00796b';
|
||||
export const teal800 = '#00695c';
|
||||
export const teal900 = '#004d40';
|
||||
export const tealA100 = '#a7ffeb';
|
||||
export const tealA200 = '#64ffda';
|
||||
export const tealA400 = '#1de9b6';
|
||||
export const tealA700 = '#00bfa5';
|
||||
|
||||
export const green50 = '#e8f5e9';
|
||||
export const green100 = '#c8e6c9';
|
||||
export const green200 = '#a5d6a7';
|
||||
export const green300 = '#81c784';
|
||||
export const green400 = '#66bb6a';
|
||||
export const green500 = '#4caf50';
|
||||
export const green600 = '#43a047';
|
||||
export const green700 = '#388e3c';
|
||||
export const green800 = '#2e7d32';
|
||||
export const green900 = '#1b5e20';
|
||||
export const greenA100 = '#b9f6ca';
|
||||
export const greenA200 = '#69f0ae';
|
||||
export const greenA400 = '#00e676';
|
||||
export const greenA700 = '#00c853';
|
||||
|
||||
export const lightGreen50 = '#f1f8e9';
|
||||
export const lightGreen100 = '#dcedc8';
|
||||
export const lightGreen200 = '#c5e1a5';
|
||||
export const lightGreen300 = '#aed581';
|
||||
export const lightGreen400 = '#9ccc65';
|
||||
export const lightGreen500 = '#8bc34a';
|
||||
export const lightGreen600 = '#7cb342';
|
||||
export const lightGreen700 = '#689f38';
|
||||
export const lightGreen800 = '#558b2f';
|
||||
export const lightGreen900 = '#33691e';
|
||||
export const lightGreenA100 = '#ccff90';
|
||||
export const lightGreenA200 = '#b2ff59';
|
||||
export const lightGreenA400 = '#76ff03';
|
||||
export const lightGreenA700 = '#64dd17';
|
||||
|
||||
export const lime50 = '#f9fbe7';
|
||||
export const lime100 = '#f0f4c3';
|
||||
export const lime200 = '#e6ee9c';
|
||||
export const lime300 = '#dce775';
|
||||
export const lime400 = '#d4e157';
|
||||
export const lime500 = '#cddc39';
|
||||
export const lime600 = '#c0ca33';
|
||||
export const lime700 = '#afb42b';
|
||||
export const lime800 = '#9e9d24';
|
||||
export const lime900 = '#827717';
|
||||
export const limeA100 = '#f4ff81';
|
||||
export const limeA200 = '#eeff41';
|
||||
export const limeA400 = '#c6ff00';
|
||||
export const limeA700 = '#aeea00';
|
||||
|
||||
export const yellow50 = '#fffde7';
|
||||
export const yellow100 = '#fff9c4';
|
||||
export const yellow200 = '#fff59d';
|
||||
export const yellow300 = '#fff176';
|
||||
export const yellow400 = '#ffee58';
|
||||
export const yellow500 = '#ffeb3b';
|
||||
export const yellow600 = '#fdd835';
|
||||
export const yellow700 = '#fbc02d';
|
||||
export const yellow800 = '#f9a825';
|
||||
export const yellow900 = '#f57f17';
|
||||
export const yellowA100 = '#ffff8d';
|
||||
export const yellowA200 = '#ffff00';
|
||||
export const yellowA400 = '#ffea00';
|
||||
export const yellowA700 = '#ffd600';
|
||||
|
||||
export const amber50 = '#fff8e1';
|
||||
export const amber100 = '#ffecb3';
|
||||
export const amber200 = '#ffe082';
|
||||
export const amber300 = '#ffd54f';
|
||||
export const amber400 = '#ffca28';
|
||||
export const amber500 = '#ffc107';
|
||||
export const amber600 = '#ffb300';
|
||||
export const amber700 = '#ffa000';
|
||||
export const amber800 = '#ff8f00';
|
||||
export const amber900 = '#ff6f00';
|
||||
export const amberA100 = '#ffe57f';
|
||||
export const amberA200 = '#ffd740';
|
||||
export const amberA400 = '#ffc400';
|
||||
export const amberA700 = '#ffab00';
|
||||
|
||||
export const orange50 = '#fff3e0';
|
||||
export const orange100 = '#ffe0b2';
|
||||
export const orange200 = '#ffcc80';
|
||||
export const orange300 = '#ffb74d';
|
||||
export const orange400 = '#ffa726';
|
||||
export const orange500 = '#ff9800';
|
||||
export const orange600 = '#fb8c00';
|
||||
export const orange700 = '#f57c00';
|
||||
export const orange800 = '#ef6c00';
|
||||
export const orange900 = '#e65100';
|
||||
export const orangeA100 = '#ffd180';
|
||||
export const orangeA200 = '#ffab40';
|
||||
export const orangeA400 = '#ff9100';
|
||||
export const orangeA700 = '#ff6d00';
|
||||
|
||||
export const deepOrange50 = '#fbe9e7';
|
||||
export const deepOrange100 = '#ffccbc';
|
||||
export const deepOrange200 = '#ffab91';
|
||||
export const deepOrange300 = '#ff8a65';
|
||||
export const deepOrange400 = '#ff7043';
|
||||
export const deepOrange500 = '#ff5722';
|
||||
export const deepOrange600 = '#f4511e';
|
||||
export const deepOrange700 = '#e64a19';
|
||||
export const deepOrange800 = '#d84315';
|
||||
export const deepOrange900 = '#bf360c';
|
||||
export const deepOrangeA100 = '#ff9e80';
|
||||
export const deepOrangeA200 = '#ff6e40';
|
||||
export const deepOrangeA400 = '#ff3d00';
|
||||
export const deepOrangeA700 = '#dd2c00';
|
||||
|
||||
export const brown50 = '#efebe9';
|
||||
export const brown100 = '#d7ccc8';
|
||||
export const brown200 = '#bcaaa4';
|
||||
export const brown300 = '#a1887f';
|
||||
export const brown400 = '#8d6e63';
|
||||
export const brown500 = '#795548';
|
||||
export const brown600 = '#6d4c41';
|
||||
export const brown700 = '#5d4037';
|
||||
export const brown800 = '#4e342e';
|
||||
export const brown900 = '#3e2723';
|
||||
|
||||
export const blueGrey50 = '#eceff1';
|
||||
export const blueGrey100 = '#cfd8dc';
|
||||
export const blueGrey200 = '#b0bec5';
|
||||
export const blueGrey300 = '#90a4ae';
|
||||
export const blueGrey400 = '#78909c';
|
||||
export const blueGrey500 = '#607d8b';
|
||||
export const blueGrey600 = '#546e7a';
|
||||
export const blueGrey700 = '#455a64';
|
||||
export const blueGrey800 = '#37474f';
|
||||
export const blueGrey900 = '#263238';
|
||||
|
||||
export const grey50 = '#fafafa';
|
||||
export const grey100 = '#f5f5f5';
|
||||
export const grey200 = '#eeeeee';
|
||||
export const grey300 = '#e0e0e0';
|
||||
export const grey400 = '#bdbdbd';
|
||||
export const grey500 = '#9e9e9e';
|
||||
export const grey600 = '#757575';
|
||||
export const grey700 = '#616161';
|
||||
export const grey800 = '#424242';
|
||||
export const grey900 = '#212121';
|
||||
|
||||
export const black = '#000000';
|
||||
export const white = '#ffffff';
|
||||
|
||||
export const transparent = 'rgba(0, 0, 0, 0)';
|
||||
export const fullBlack = 'rgba(0, 0, 0, 1)';
|
||||
export const darkBlack = 'rgba(0, 0, 0, 0.87)';
|
||||
export const lightBlack = 'rgba(0, 0, 0, 0.54)';
|
||||
export const minBlack = 'rgba(0, 0, 0, 0.26)';
|
||||
export const faintBlack = 'rgba(0, 0, 0, 0.12)';
|
||||
export const fullWhite = 'rgba(255, 255, 255, 1)';
|
||||
export const darkWhite = 'rgba(255, 255, 255, 0.87)';
|
||||
export const lightWhite = 'rgba(255, 255, 255, 0.54)';
|
||||
342
node_modules/mui/source/styles/getMuiTheme.js
generated
vendored
Normal file
342
node_modules/mui/source/styles/getMuiTheme.js
generated
vendored
Normal file
|
|
@ -0,0 +1,342 @@
|
|||
import merge from 'lodash.merge';
|
||||
import {darken, fade, emphasize, lighten} from '../utils/colorManipulator';
|
||||
import lightBaseTheme from './baseThemes/lightBaseTheme';
|
||||
import zIndex from './zIndex';
|
||||
import autoprefixer from '../utils/autoprefixer';
|
||||
import callOnce from '../utils/callOnce';
|
||||
import rtl from '../utils/rtl';
|
||||
import compose from 'recompose/compose';
|
||||
import typography from './typography';
|
||||
import {
|
||||
red500, grey400, grey500, grey600, grey700,
|
||||
transparent, lightWhite, white, darkWhite, lightBlack, black,
|
||||
} from './colors';
|
||||
|
||||
/**
|
||||
* Get the MUI theme corresponding to a base theme.
|
||||
* It's possible to override the computed theme values
|
||||
* by providing a second argument. The calculated
|
||||
* theme will be deeply merged with the second argument.
|
||||
*/
|
||||
export default function getMuiTheme(muiTheme, ...more) {
|
||||
muiTheme = merge({
|
||||
zIndex,
|
||||
isRtl: false,
|
||||
userAgent: undefined,
|
||||
}, lightBaseTheme, muiTheme, ...more);
|
||||
|
||||
const {spacing, fontFamily, palette} = muiTheme;
|
||||
const baseTheme = {spacing, fontFamily, palette};
|
||||
|
||||
muiTheme = merge({
|
||||
appBar: {
|
||||
color: palette.primary1Color,
|
||||
textColor: palette.alternateTextColor,
|
||||
height: spacing.desktopKeylineIncrement,
|
||||
titleFontWeight: typography.fontWeightNormal,
|
||||
padding: spacing.desktopGutter,
|
||||
},
|
||||
avatar: {
|
||||
color: palette.canvasColor,
|
||||
backgroundColor: emphasize(palette.canvasColor, 0.26),
|
||||
},
|
||||
badge: {
|
||||
color: palette.alternateTextColor,
|
||||
textColor: palette.textColor,
|
||||
primaryColor: palette.primary1Color,
|
||||
primaryTextColor: palette.alternateTextColor,
|
||||
secondaryColor: palette.accent1Color,
|
||||
secondaryTextColor: palette.alternateTextColor,
|
||||
fontWeight: typography.fontWeightMedium,
|
||||
},
|
||||
bottomNavigation: {
|
||||
backgroundColor: palette.canvasColor,
|
||||
unselectedColor: fade(palette.textColor, 0.54),
|
||||
selectedColor: palette.primary1Color,
|
||||
height: 56,
|
||||
unselectedFontSize: 12,
|
||||
selectedFontSize: 14,
|
||||
},
|
||||
button: {
|
||||
height: 36,
|
||||
minWidth: 88,
|
||||
iconButtonSize: spacing.iconSize * 2,
|
||||
},
|
||||
card: {
|
||||
titleColor: fade(palette.textColor, 0.87),
|
||||
subtitleColor: fade(palette.textColor, 0.54),
|
||||
fontWeight: typography.fontWeightMedium,
|
||||
},
|
||||
cardMedia: {
|
||||
color: darkWhite,
|
||||
overlayContentBackground: lightBlack,
|
||||
titleColor: darkWhite,
|
||||
subtitleColor: lightWhite,
|
||||
},
|
||||
cardText: {
|
||||
textColor: palette.textColor,
|
||||
},
|
||||
checkbox: {
|
||||
boxColor: palette.textColor,
|
||||
checkedColor: palette.primary1Color,
|
||||
requiredColor: palette.primary1Color,
|
||||
disabledColor: palette.disabledColor,
|
||||
labelColor: palette.textColor,
|
||||
labelDisabledColor: palette.disabledColor,
|
||||
},
|
||||
chip: {
|
||||
backgroundColor: emphasize(palette.canvasColor, 0.12),
|
||||
deleteIconColor: fade(palette.textColor, 0.26),
|
||||
textColor: fade(palette.textColor, 0.87),
|
||||
fontSize: 14,
|
||||
fontWeight: typography.fontWeightNormal,
|
||||
shadow: `0 1px 6px ${fade(palette.shadowColor, 0.12)},
|
||||
0 1px 4px ${fade(palette.shadowColor, 0.12)}`,
|
||||
},
|
||||
datePicker: {
|
||||
color: palette.primary1Color,
|
||||
textColor: palette.alternateTextColor,
|
||||
calendarTextColor: palette.textColor,
|
||||
selectColor: palette.primary2Color,
|
||||
selectTextColor: palette.alternateTextColor,
|
||||
calendarYearBackgroundColor: palette.canvasColor,
|
||||
},
|
||||
dialog: {
|
||||
titleFontSize: 22,
|
||||
bodyFontSize: 16,
|
||||
bodyColor: fade(palette.textColor, 0.6),
|
||||
},
|
||||
dropDownMenu: {
|
||||
accentColor: palette.borderColor,
|
||||
},
|
||||
enhancedButton: {
|
||||
tapHighlightColor: transparent,
|
||||
},
|
||||
flatButton: {
|
||||
color: transparent,
|
||||
buttonFilterColor: '#999999',
|
||||
disabledTextColor: fade(palette.textColor, 0.3),
|
||||
textColor: palette.textColor,
|
||||
primaryTextColor: palette.primary1Color,
|
||||
secondaryTextColor: palette.accent1Color,
|
||||
fontSize: typography.fontStyleButtonFontSize,
|
||||
fontWeight: typography.fontWeightMedium,
|
||||
},
|
||||
floatingActionButton: {
|
||||
buttonSize: 56,
|
||||
miniSize: 40,
|
||||
color: palette.primary1Color,
|
||||
iconColor: palette.alternateTextColor,
|
||||
secondaryColor: palette.accent1Color,
|
||||
secondaryIconColor: palette.alternateTextColor,
|
||||
disabledTextColor: palette.disabledColor,
|
||||
disabledColor: emphasize(palette.canvasColor, 0.12),
|
||||
},
|
||||
gridTile: {
|
||||
textColor: white,
|
||||
},
|
||||
icon: {
|
||||
color: palette.canvasColor,
|
||||
backgroundColor: palette.primary1Color,
|
||||
},
|
||||
inkBar: {
|
||||
backgroundColor: palette.accent1Color,
|
||||
},
|
||||
drawer: {
|
||||
width: spacing.desktopKeylineIncrement * 4,
|
||||
color: palette.canvasColor,
|
||||
},
|
||||
listItem: {
|
||||
nestedLevelDepth: 18,
|
||||
secondaryTextColor: palette.secondaryTextColor,
|
||||
leftIconColor: grey600,
|
||||
rightIconColor: grey600,
|
||||
},
|
||||
menu: {
|
||||
backgroundColor: palette.canvasColor,
|
||||
containerBackgroundColor: palette.canvasColor,
|
||||
},
|
||||
menuItem: {
|
||||
dataHeight: 32,
|
||||
height: 48,
|
||||
hoverColor: fade(palette.textColor, 0.1),
|
||||
padding: spacing.desktopGutter,
|
||||
selectedTextColor: palette.accent1Color,
|
||||
rightIconDesktopFill: grey600,
|
||||
},
|
||||
menuSubheader: {
|
||||
padding: spacing.desktopGutter,
|
||||
borderColor: palette.borderColor,
|
||||
textColor: palette.primary1Color,
|
||||
},
|
||||
overlay: {
|
||||
backgroundColor: lightBlack,
|
||||
},
|
||||
paper: {
|
||||
color: palette.textColor,
|
||||
backgroundColor: palette.canvasColor,
|
||||
zDepthShadows: [
|
||||
[1, 6, 0.12, 1, 4, 0.12],
|
||||
[3, 10, 0.16, 3, 10, 0.23],
|
||||
[10, 30, 0.19, 6, 10, 0.23],
|
||||
[14, 45, 0.25, 10, 18, 0.22],
|
||||
[19, 60, 0.30, 15, 20, 0.22],
|
||||
].map((d) => (
|
||||
`0 ${d[0]}px ${d[1]}px ${fade(palette.shadowColor, d[2])},
|
||||
0 ${d[3]}px ${d[4]}px ${fade(palette.shadowColor, d[5])}`
|
||||
)),
|
||||
},
|
||||
radioButton: {
|
||||
borderColor: palette.textColor,
|
||||
backgroundColor: palette.alternateTextColor,
|
||||
checkedColor: palette.primary1Color,
|
||||
requiredColor: palette.primary1Color,
|
||||
disabledColor: palette.disabledColor,
|
||||
size: 24,
|
||||
labelColor: palette.textColor,
|
||||
labelDisabledColor: palette.disabledColor,
|
||||
},
|
||||
raisedButton: {
|
||||
color: palette.alternateTextColor,
|
||||
textColor: palette.textColor,
|
||||
primaryColor: palette.primary1Color,
|
||||
primaryTextColor: palette.alternateTextColor,
|
||||
secondaryColor: palette.accent1Color,
|
||||
secondaryTextColor: palette.alternateTextColor,
|
||||
disabledColor: darken(palette.alternateTextColor, 0.1),
|
||||
disabledTextColor: fade(palette.textColor, 0.3),
|
||||
fontSize: typography.fontStyleButtonFontSize,
|
||||
fontWeight: typography.fontWeightMedium,
|
||||
},
|
||||
refreshIndicator: {
|
||||
strokeColor: palette.borderColor,
|
||||
loadingStrokeColor: palette.primary1Color,
|
||||
},
|
||||
ripple: {
|
||||
color: fade(palette.textColor, 0.87),
|
||||
},
|
||||
slider: {
|
||||
trackSize: 2,
|
||||
trackColor: palette.primary3Color,
|
||||
trackColorSelected: palette.accent3Color,
|
||||
handleSize: 12,
|
||||
handleSizeDisabled: 8,
|
||||
handleSizeActive: 18,
|
||||
handleColorZero: palette.primary3Color,
|
||||
handleFillColor: palette.alternateTextColor,
|
||||
selectionColor: palette.primary1Color,
|
||||
rippleColor: palette.primary1Color,
|
||||
},
|
||||
snackbar: {
|
||||
textColor: palette.alternateTextColor,
|
||||
backgroundColor: palette.textColor,
|
||||
actionColor: palette.accent1Color,
|
||||
},
|
||||
subheader: {
|
||||
color: fade(palette.textColor, 0.54),
|
||||
fontWeight: typography.fontWeightMedium,
|
||||
},
|
||||
stepper: {
|
||||
backgroundColor: 'transparent',
|
||||
hoverBackgroundColor: fade(black, 0.06),
|
||||
iconColor: palette.primary1Color,
|
||||
hoveredIconColor: grey700,
|
||||
inactiveIconColor: grey500,
|
||||
textColor: fade(black, 0.87),
|
||||
disabledTextColor: fade(black, 0.26),
|
||||
connectorLineColor: grey400,
|
||||
},
|
||||
svgIcon: {
|
||||
color: palette.textColor,
|
||||
},
|
||||
table: {
|
||||
backgroundColor: palette.canvasColor,
|
||||
},
|
||||
tableFooter: {
|
||||
borderColor: palette.borderColor,
|
||||
textColor: palette.accent3Color,
|
||||
},
|
||||
tableHeader: {
|
||||
borderColor: palette.borderColor,
|
||||
},
|
||||
tableHeaderColumn: {
|
||||
textColor: palette.accent3Color,
|
||||
height: 56,
|
||||
spacing: 24,
|
||||
},
|
||||
tableRow: {
|
||||
hoverColor: palette.accent2Color,
|
||||
stripeColor: fade(lighten(palette.primary1Color, 0.5), 0.4),
|
||||
selectedColor: palette.borderColor,
|
||||
textColor: palette.textColor,
|
||||
borderColor: palette.borderColor,
|
||||
height: 48,
|
||||
},
|
||||
tableRowColumn: {
|
||||
height: 48,
|
||||
spacing: 24,
|
||||
},
|
||||
tabs: {
|
||||
backgroundColor: palette.primary1Color,
|
||||
textColor: fade(palette.alternateTextColor, 0.7),
|
||||
selectedTextColor: palette.alternateTextColor,
|
||||
},
|
||||
textField: {
|
||||
textColor: palette.textColor,
|
||||
hintColor: palette.disabledColor,
|
||||
floatingLabelColor: palette.disabledColor,
|
||||
disabledTextColor: palette.disabledColor,
|
||||
errorColor: red500,
|
||||
focusColor: palette.primary1Color,
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: palette.borderColor,
|
||||
},
|
||||
timePicker: {
|
||||
color: palette.alternateTextColor,
|
||||
textColor: palette.alternateTextColor,
|
||||
accentColor: palette.primary1Color,
|
||||
clockColor: palette.textColor,
|
||||
clockCircleColor: palette.clockCircleColor,
|
||||
headerColor: palette.pickerHeaderColor || palette.primary1Color,
|
||||
selectColor: palette.primary2Color,
|
||||
selectTextColor: palette.alternateTextColor,
|
||||
},
|
||||
toggle: {
|
||||
thumbOnColor: palette.primary1Color,
|
||||
thumbOffColor: palette.accent2Color,
|
||||
thumbDisabledColor: palette.borderColor,
|
||||
thumbRequiredColor: palette.primary1Color,
|
||||
trackOnColor: fade(palette.primary1Color, 0.5),
|
||||
trackOffColor: palette.primary3Color,
|
||||
trackDisabledColor: palette.primary3Color,
|
||||
labelColor: palette.textColor,
|
||||
labelDisabledColor: palette.disabledColor,
|
||||
trackRequiredColor: fade(palette.primary1Color, 0.5),
|
||||
},
|
||||
toolbar: {
|
||||
color: fade(palette.textColor, 0.54),
|
||||
hoverColor: fade(palette.textColor, 0.87),
|
||||
backgroundColor: darken(palette.accent2Color, 0.05),
|
||||
height: 56,
|
||||
titleFontSize: 20,
|
||||
iconColor: fade(palette.textColor, 0.4),
|
||||
separatorColor: fade(palette.textColor, 0.175),
|
||||
menuHoverColor: fade(palette.textColor, 0.1),
|
||||
},
|
||||
tooltip: {
|
||||
color: white,
|
||||
rippleBackgroundColor: grey700,
|
||||
},
|
||||
}, muiTheme, {
|
||||
baseTheme, // To provide backward compatibility.
|
||||
rawTheme: baseTheme, // To provide backward compatibility.
|
||||
});
|
||||
|
||||
const transformers = [autoprefixer, rtl, callOnce]
|
||||
.map((t) => t(muiTheme))
|
||||
.filter((t) => t);
|
||||
|
||||
muiTheme.prepareStyles = compose(...transformers);
|
||||
|
||||
return muiTheme;
|
||||
}
|
||||
81
node_modules/mui/source/styles/getMuiTheme.spec.js
generated
vendored
Normal file
81
node_modules/mui/source/styles/getMuiTheme.spec.js
generated
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/* eslint-env mocha */
|
||||
|
||||
import {expect} from 'chai';
|
||||
import getMuiTheme from './getMuiTheme';
|
||||
|
||||
describe('./styles/getMuiTheme', () => {
|
||||
// Test backward compatibility
|
||||
it('should work when we use two parameters', () => {
|
||||
const muiTheme = getMuiTheme({
|
||||
palette: {
|
||||
accent1Color: 'Colors.deepOrange500',
|
||||
},
|
||||
}, {
|
||||
userAgent: 'all',
|
||||
appBar: {
|
||||
height: 56,
|
||||
},
|
||||
});
|
||||
|
||||
expect(muiTheme.userAgent).to.equal('all');
|
||||
expect(muiTheme.palette.accent1Color).to.equal('Colors.deepOrange500');
|
||||
expect(muiTheme.appBar.height).to.equal(56);
|
||||
});
|
||||
|
||||
it('should work when we use one parameter', () => {
|
||||
const muiTheme = getMuiTheme({
|
||||
palette: {
|
||||
accent1Color: 'Colors.deepOrange500',
|
||||
},
|
||||
userAgent: 'all',
|
||||
appBar: {
|
||||
height: 56,
|
||||
},
|
||||
});
|
||||
|
||||
expect(muiTheme.userAgent).to.equal('all');
|
||||
expect(muiTheme.palette.accent1Color).to.equal('Colors.deepOrange500');
|
||||
expect(muiTheme.appBar.height).to.equal(56);
|
||||
});
|
||||
|
||||
it('should work when we mutate the muiTheme', () => {
|
||||
const muiTheme1 = getMuiTheme({
|
||||
palette: {
|
||||
accent1Color: 'Colors.deepOrange500',
|
||||
},
|
||||
userAgent: 'all',
|
||||
});
|
||||
|
||||
const muiTheme2 = getMuiTheme(muiTheme1, {
|
||||
palette: {
|
||||
accent1Color: 'Colors.deepOrange600',
|
||||
},
|
||||
appBar: {
|
||||
height: 56,
|
||||
},
|
||||
});
|
||||
|
||||
expect(muiTheme2.userAgent).to.equal('all');
|
||||
expect(muiTheme2.palette.accent1Color).to.equal('Colors.deepOrange600');
|
||||
expect(muiTheme2.appBar.height).to.equal(56);
|
||||
});
|
||||
|
||||
describe('prepareStyles', () => {
|
||||
describe('rtl', () => {
|
||||
it('should revert the rules when isRtl is true', () => {
|
||||
const muiTheme = getMuiTheme({}, {
|
||||
isRtl: true,
|
||||
});
|
||||
|
||||
const stylePrepared = muiTheme.prepareStyles({
|
||||
right: 10,
|
||||
});
|
||||
|
||||
expect(stylePrepared).to.deep.equal({
|
||||
left: 10,
|
||||
muiPrepared: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
12
node_modules/mui/source/styles/index.js
generated
vendored
Normal file
12
node_modules/mui/source/styles/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export MuiThemeProvider from './MuiThemeProvider';
|
||||
export * as colors from './colors';
|
||||
export darkBaseTheme from './baseThemes/darkBaseTheme';
|
||||
export DarkRawTheme from './baseThemes/darkBaseTheme';
|
||||
export lightBaseTheme from './baseThemes/lightBaseTheme';
|
||||
export LightRawTheme from './baseThemes/lightBaseTheme';
|
||||
export getMuiTheme from './getMuiTheme';
|
||||
export muiThemeable from './muiThemeable';
|
||||
export spacing from './spacing';
|
||||
export transitions from './transitions';
|
||||
export typography from './typography';
|
||||
export zIndex from './zIndex';
|
||||
28
node_modules/mui/source/styles/muiThemeable.js
generated
vendored
Normal file
28
node_modules/mui/source/styles/muiThemeable.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import getMuiTheme from './getMuiTheme';
|
||||
|
||||
let DEFAULT_THEME;
|
||||
|
||||
function getDefaultTheme() {
|
||||
if (!DEFAULT_THEME) {
|
||||
DEFAULT_THEME = getMuiTheme();
|
||||
}
|
||||
return DEFAULT_THEME;
|
||||
}
|
||||
|
||||
export default function muiThemeable() {
|
||||
return (Component) => {
|
||||
const MuiComponent = (props, context) => {
|
||||
const {muiTheme = getDefaultTheme()} = context;
|
||||
|
||||
return <Component muiTheme={muiTheme} {...props} />;
|
||||
};
|
||||
|
||||
MuiComponent.contextTypes = {
|
||||
muiTheme: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
return MuiComponent;
|
||||
};
|
||||
}
|
||||
14
node_modules/mui/source/styles/spacing.js
generated
vendored
Normal file
14
node_modules/mui/source/styles/spacing.js
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
export default {
|
||||
iconSize: 24,
|
||||
|
||||
desktopGutter: 24,
|
||||
desktopGutterMore: 32,
|
||||
desktopGutterLess: 16,
|
||||
desktopGutterMini: 8,
|
||||
desktopKeylineIncrement: 64,
|
||||
desktopDropDownMenuItemHeight: 32,
|
||||
desktopDropDownMenuFontSize: 15,
|
||||
desktopDrawerMenuItemHeight: 48,
|
||||
desktopSubheaderHeight: 48,
|
||||
desktopToolbarHeight: 56,
|
||||
};
|
||||
30
node_modules/mui/source/styles/transitions.js
generated
vendored
Normal file
30
node_modules/mui/source/styles/transitions.js
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
export default {
|
||||
|
||||
easeOutFunction: 'cubic-bezier(0.23, 1, 0.32, 1)',
|
||||
easeInOutFunction: 'cubic-bezier(0.445, 0.05, 0.55, 0.95)',
|
||||
|
||||
easeOut(duration, property, delay, easeFunction) {
|
||||
easeFunction = easeFunction || this.easeOutFunction;
|
||||
|
||||
if (property && Object.prototype.toString.call(property) === '[object Array]') {
|
||||
let transitions = '';
|
||||
for (let i = 0; i < property.length; i++) {
|
||||
if (transitions) transitions += ',';
|
||||
transitions += this.create(duration, property[i], delay, easeFunction);
|
||||
}
|
||||
|
||||
return transitions;
|
||||
} else {
|
||||
return this.create(duration, property, delay, easeFunction);
|
||||
}
|
||||
},
|
||||
|
||||
create(duration, property, delay, easeFunction) {
|
||||
duration = duration || '450ms';
|
||||
property = property || 'all';
|
||||
delay = delay || '0ms';
|
||||
easeFunction = easeFunction || 'linear';
|
||||
|
||||
return `${property} ${duration} ${easeFunction} ${delay}`;
|
||||
},
|
||||
};
|
||||
32
node_modules/mui/source/styles/typography.js
generated
vendored
Normal file
32
node_modules/mui/source/styles/typography.js
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import {
|
||||
fullBlack,
|
||||
darkBlack,
|
||||
lightBlack,
|
||||
minBlack,
|
||||
fullWhite,
|
||||
darkWhite,
|
||||
lightWhite,
|
||||
} from './colors';
|
||||
|
||||
class Typography {
|
||||
|
||||
constructor() {
|
||||
// text colors
|
||||
this.textFullBlack = fullBlack;
|
||||
this.textDarkBlack = darkBlack;
|
||||
this.textLightBlack = lightBlack;
|
||||
this.textMinBlack = minBlack;
|
||||
this.textFullWhite = fullWhite;
|
||||
this.textDarkWhite = darkWhite;
|
||||
this.textLightWhite = lightWhite;
|
||||
|
||||
// font weight
|
||||
this.fontWeightLight = 300;
|
||||
this.fontWeightNormal = 400;
|
||||
this.fontWeightMedium = 500;
|
||||
|
||||
this.fontStyleButtonFontSize = 14;
|
||||
}
|
||||
}
|
||||
|
||||
export default new Typography();
|
||||
12
node_modules/mui/source/styles/zIndex.js
generated
vendored
Normal file
12
node_modules/mui/source/styles/zIndex.js
generated
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export default {
|
||||
menu: 1000,
|
||||
appBar: 1100,
|
||||
drawerOverlay: 1200,
|
||||
drawer: 1300,
|
||||
dialogOverlay: 1400,
|
||||
dialog: 1500,
|
||||
layer: 2000,
|
||||
popover: 2100,
|
||||
snackbar: 2900,
|
||||
tooltip: 3000,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue