Security upgrades
This commit is contained in:
13029
node_modules/@material-ui/system/CHANGELOG.md
generated
vendored
Normal file
13029
node_modules/@material-ui/system/CHANGELOG.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
21
node_modules/@material-ui/system/LICENSE
generated
vendored
Normal file
21
node_modules/@material-ui/system/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Call-Em-All
|
||||
|
||||
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.
|
||||
19
node_modules/@material-ui/system/README.md
generated
vendored
Normal file
19
node_modules/@material-ui/system/README.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
# @material-ui/system
|
||||
|
||||
Style props functions for building powerful design systems.
|
||||
|
||||
## Installation
|
||||
|
||||
Install the package in your project directory with:
|
||||
|
||||
```sh
|
||||
// with npm
|
||||
npm install @material-ui/system
|
||||
|
||||
// with yarn
|
||||
yarn add @material-ui/system
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
[The documentation](https://material-ui.com/system/basics/)
|
||||
64
node_modules/@material-ui/system/borders.js
generated
vendored
Normal file
64
node_modules/@material-ui/system/borders.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.borderRadius = exports.borderColor = exports.borderLeft = exports.borderBottom = exports.borderRight = exports.borderTop = exports.border = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
function getBorder(value) {
|
||||
if (typeof value !== 'number') {
|
||||
return value;
|
||||
}
|
||||
|
||||
return "".concat(value, "px solid");
|
||||
}
|
||||
|
||||
var border = (0, _style.default)({
|
||||
prop: 'border',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
exports.border = border;
|
||||
var borderTop = (0, _style.default)({
|
||||
prop: 'borderTop',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
exports.borderTop = borderTop;
|
||||
var borderRight = (0, _style.default)({
|
||||
prop: 'borderRight',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
exports.borderRight = borderRight;
|
||||
var borderBottom = (0, _style.default)({
|
||||
prop: 'borderBottom',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
exports.borderBottom = borderBottom;
|
||||
var borderLeft = (0, _style.default)({
|
||||
prop: 'borderLeft',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
exports.borderLeft = borderLeft;
|
||||
var borderColor = (0, _style.default)({
|
||||
prop: 'borderColor',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
exports.borderColor = borderColor;
|
||||
var borderRadius = (0, _style.default)({
|
||||
prop: 'borderRadius',
|
||||
themeKey: 'shape'
|
||||
});
|
||||
exports.borderRadius = borderRadius;
|
||||
var borders = (0, _compose.default)(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius);
|
||||
var _default = borders;
|
||||
exports.default = _default;
|
||||
96
node_modules/@material-ui/system/breakpoints.js
generated
vendored
Normal file
96
node_modules/@material-ui/system/breakpoints.js
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.handleBreakpoints = handleBreakpoints;
|
||||
exports.default = void 0;
|
||||
|
||||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
||||
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
|
||||
var _merge = _interopRequireDefault(require("./merge"));
|
||||
|
||||
// The breakpoint **start** at this value.
|
||||
// For instance with the first breakpoint xs: [xs, sm[.
|
||||
var values = {
|
||||
xs: 0,
|
||||
sm: 600,
|
||||
md: 960,
|
||||
lg: 1280,
|
||||
xl: 1920
|
||||
};
|
||||
var defaultBreakpoints = {
|
||||
// Sorted ASC by size. That's important.
|
||||
// It can't be configured as it's used statically for propTypes.
|
||||
keys: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||
up: function up(key) {
|
||||
return "@media (min-width:".concat(values[key], "px)");
|
||||
}
|
||||
};
|
||||
|
||||
function handleBreakpoints(props, propValue, styleFromPropValue) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (!props.theme) {
|
||||
console.error('Material-UI: You are calling a style function without a theme value.');
|
||||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(propValue)) {
|
||||
var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
return propValue.reduce(function (acc, item, index) {
|
||||
acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
if ((0, _typeof2.default)(propValue) === 'object') {
|
||||
var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
|
||||
return Object.keys(propValue).reduce(function (acc, breakpoint) {
|
||||
acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
var output = styleFromPropValue(propValue);
|
||||
return output;
|
||||
}
|
||||
|
||||
function breakpoints(styleFunction) {
|
||||
var newStyleFunction = function newStyleFunction(props) {
|
||||
var base = styleFunction(props);
|
||||
var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
var extended = themeBreakpoints.keys.reduce(function (acc, key) {
|
||||
if (props[key]) {
|
||||
acc = acc || {};
|
||||
acc[themeBreakpoints.up(key)] = styleFunction((0, _extends2.default)({
|
||||
theme: props.theme
|
||||
}, props[key]));
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, null);
|
||||
return (0, _merge.default)(base, extended);
|
||||
};
|
||||
|
||||
newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? (0, _extends2.default)((0, _extends2.default)({}, styleFunction.propTypes), {}, {
|
||||
xs: _propTypes.default.object,
|
||||
sm: _propTypes.default.object,
|
||||
md: _propTypes.default.object,
|
||||
lg: _propTypes.default.object,
|
||||
xl: _propTypes.default.object
|
||||
}) : {};
|
||||
newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat((0, _toConsumableArray2.default)(styleFunction.filterProps));
|
||||
return newStyleFunction;
|
||||
}
|
||||
|
||||
var _default = breakpoints;
|
||||
exports.default = _default;
|
||||
56
node_modules/@material-ui/system/compose.js
generated
vendored
Normal file
56
node_modules/@material-ui/system/compose.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var _merge = _interopRequireDefault(require("./merge"));
|
||||
|
||||
function compose() {
|
||||
for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
styles[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
var fn = function fn(props) {
|
||||
return styles.reduce(function (acc, style) {
|
||||
var output = style(props);
|
||||
|
||||
if (output) {
|
||||
return (0, _merge.default)(acc, output);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
}; // Alternative approach that doesn't yield any performance gain.
|
||||
// const handlers = styles.reduce((acc, style) => {
|
||||
// style.filterProps.forEach(prop => {
|
||||
// acc[prop] = style;
|
||||
// });
|
||||
// return acc;
|
||||
// }, {});
|
||||
// const fn = props => {
|
||||
// return Object.keys(props).reduce((acc, prop) => {
|
||||
// if (handlers[prop]) {
|
||||
// return merge(acc, handlers[prop](props));
|
||||
// }
|
||||
// return acc;
|
||||
// }, {});
|
||||
// };
|
||||
|
||||
|
||||
fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce(function (acc, style) {
|
||||
return (0, _extends2.default)(acc, style.propTypes);
|
||||
}, {}) : {};
|
||||
fn.filterProps = styles.reduce(function (acc, style) {
|
||||
return acc.concat(style.filterProps);
|
||||
}, []);
|
||||
return fn;
|
||||
}
|
||||
|
||||
var _default = compose;
|
||||
exports.default = _default;
|
||||
49
node_modules/@material-ui/system/css.js
generated
vendored
Normal file
49
node_modules/@material-ui/system/css.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
|
||||
var _merge = _interopRequireDefault(require("./merge"));
|
||||
|
||||
function omit(input, fields) {
|
||||
var output = {};
|
||||
Object.keys(input).forEach(function (prop) {
|
||||
if (fields.indexOf(prop) === -1) {
|
||||
output[prop] = input[prop];
|
||||
}
|
||||
});
|
||||
return output;
|
||||
}
|
||||
|
||||
function css(styleFunction) {
|
||||
var newStyleFunction = function newStyleFunction(props) {
|
||||
var output = styleFunction(props);
|
||||
|
||||
if (props.css) {
|
||||
return (0, _extends2.default)((0, _extends2.default)({}, (0, _merge.default)(output, styleFunction((0, _extends2.default)({
|
||||
theme: props.theme
|
||||
}, props.css)))), omit(props.css, [styleFunction.filterProps]));
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? (0, _extends2.default)((0, _extends2.default)({}, styleFunction.propTypes), {}, {
|
||||
css: _propTypes.default.object
|
||||
}) : {};
|
||||
newStyleFunction.filterProps = ['css'].concat((0, _toConsumableArray2.default)(styleFunction.filterProps));
|
||||
return newStyleFunction;
|
||||
}
|
||||
|
||||
var _default = css;
|
||||
exports.default = _default;
|
||||
49
node_modules/@material-ui/system/display.js
generated
vendored
Normal file
49
node_modules/@material-ui/system/display.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.whiteSpace = exports.visibility = exports.textOverflow = exports.overflow = exports.displayRaw = exports.displayPrint = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
var displayPrint = (0, _style.default)({
|
||||
prop: 'displayPrint',
|
||||
cssProperty: false,
|
||||
transform: function transform(value) {
|
||||
return {
|
||||
'@media print': {
|
||||
display: value
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
exports.displayPrint = displayPrint;
|
||||
var displayRaw = (0, _style.default)({
|
||||
prop: 'display'
|
||||
});
|
||||
exports.displayRaw = displayRaw;
|
||||
var overflow = (0, _style.default)({
|
||||
prop: 'overflow'
|
||||
});
|
||||
exports.overflow = overflow;
|
||||
var textOverflow = (0, _style.default)({
|
||||
prop: 'textOverflow'
|
||||
});
|
||||
exports.textOverflow = textOverflow;
|
||||
var visibility = (0, _style.default)({
|
||||
prop: 'visibility'
|
||||
});
|
||||
exports.visibility = visibility;
|
||||
var whiteSpace = (0, _style.default)({
|
||||
prop: 'whiteSpace'
|
||||
});
|
||||
exports.whiteSpace = whiteSpace;
|
||||
|
||||
var _default = (0, _compose.default)(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);
|
||||
|
||||
exports.default = _default;
|
||||
46
node_modules/@material-ui/system/es/borders.js
generated
vendored
Normal file
46
node_modules/@material-ui/system/es/borders.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
|
||||
function getBorder(value) {
|
||||
if (typeof value !== 'number') {
|
||||
return value;
|
||||
}
|
||||
|
||||
return `${value}px solid`;
|
||||
}
|
||||
|
||||
export const border = style({
|
||||
prop: 'border',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export const borderTop = style({
|
||||
prop: 'borderTop',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export const borderRight = style({
|
||||
prop: 'borderRight',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export const borderBottom = style({
|
||||
prop: 'borderBottom',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export const borderLeft = style({
|
||||
prop: 'borderLeft',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export const borderColor = style({
|
||||
prop: 'borderColor',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
export const borderRadius = style({
|
||||
prop: 'borderRadius',
|
||||
themeKey: 'shape'
|
||||
});
|
||||
const borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius);
|
||||
export default borders;
|
||||
74
node_modules/@material-ui/system/es/breakpoints.js
generated
vendored
Normal file
74
node_modules/@material-ui/system/es/breakpoints.js
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import PropTypes from 'prop-types';
|
||||
import merge from './merge'; // The breakpoint **start** at this value.
|
||||
// For instance with the first breakpoint xs: [xs, sm[.
|
||||
|
||||
const values = {
|
||||
xs: 0,
|
||||
sm: 600,
|
||||
md: 960,
|
||||
lg: 1280,
|
||||
xl: 1920
|
||||
};
|
||||
const defaultBreakpoints = {
|
||||
// Sorted ASC by size. That's important.
|
||||
// It can't be configured as it's used statically for propTypes.
|
||||
keys: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||
up: key => `@media (min-width:${values[key]}px)`
|
||||
};
|
||||
export function handleBreakpoints(props, propValue, styleFromPropValue) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (!props.theme) {
|
||||
console.error('Material-UI: You are calling a style function without a theme value.');
|
||||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(propValue)) {
|
||||
const themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
return propValue.reduce((acc, item, index) => {
|
||||
acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
if (typeof propValue === 'object') {
|
||||
const themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
return Object.keys(propValue).reduce((acc, breakpoint) => {
|
||||
acc[themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
const output = styleFromPropValue(propValue);
|
||||
return output;
|
||||
}
|
||||
|
||||
function breakpoints(styleFunction) {
|
||||
const newStyleFunction = props => {
|
||||
const base = styleFunction(props);
|
||||
const themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
const extended = themeBreakpoints.keys.reduce((acc, key) => {
|
||||
if (props[key]) {
|
||||
acc = acc || {};
|
||||
acc[themeBreakpoints.up(key)] = styleFunction(_extends({
|
||||
theme: props.theme
|
||||
}, props[key]));
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, null);
|
||||
return merge(base, extended);
|
||||
};
|
||||
|
||||
newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends(_extends({}, styleFunction.propTypes), {}, {
|
||||
xs: PropTypes.object,
|
||||
sm: PropTypes.object,
|
||||
md: PropTypes.object,
|
||||
lg: PropTypes.object,
|
||||
xl: PropTypes.object
|
||||
}) : {};
|
||||
newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];
|
||||
return newStyleFunction;
|
||||
}
|
||||
|
||||
export default breakpoints;
|
||||
35
node_modules/@material-ui/system/es/compose.js
generated
vendored
Normal file
35
node_modules/@material-ui/system/es/compose.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import merge from './merge';
|
||||
|
||||
function compose(...styles) {
|
||||
const fn = props => styles.reduce((acc, style) => {
|
||||
const output = style(props);
|
||||
|
||||
if (output) {
|
||||
return merge(acc, output);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {}); // Alternative approach that doesn't yield any performance gain.
|
||||
// const handlers = styles.reduce((acc, style) => {
|
||||
// style.filterProps.forEach(prop => {
|
||||
// acc[prop] = style;
|
||||
// });
|
||||
// return acc;
|
||||
// }, {});
|
||||
// const fn = props => {
|
||||
// return Object.keys(props).reduce((acc, prop) => {
|
||||
// if (handlers[prop]) {
|
||||
// return merge(acc, handlers[prop](props));
|
||||
// }
|
||||
// return acc;
|
||||
// }, {});
|
||||
// };
|
||||
|
||||
|
||||
fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => _extends(acc, style.propTypes), {}) : {};
|
||||
fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);
|
||||
return fn;
|
||||
}
|
||||
|
||||
export default compose;
|
||||
35
node_modules/@material-ui/system/es/css.js
generated
vendored
Normal file
35
node_modules/@material-ui/system/es/css.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import PropTypes from 'prop-types';
|
||||
import merge from './merge';
|
||||
|
||||
function omit(input, fields) {
|
||||
const output = {};
|
||||
Object.keys(input).forEach(prop => {
|
||||
if (fields.indexOf(prop) === -1) {
|
||||
output[prop] = input[prop];
|
||||
}
|
||||
});
|
||||
return output;
|
||||
}
|
||||
|
||||
function css(styleFunction) {
|
||||
const newStyleFunction = props => {
|
||||
const output = styleFunction(props);
|
||||
|
||||
if (props.css) {
|
||||
return _extends(_extends({}, merge(output, styleFunction(_extends({
|
||||
theme: props.theme
|
||||
}, props.css)))), omit(props.css, [styleFunction.filterProps]));
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends(_extends({}, styleFunction.propTypes), {}, {
|
||||
css: PropTypes.object
|
||||
}) : {};
|
||||
newStyleFunction.filterProps = ['css', ...styleFunction.filterProps];
|
||||
return newStyleFunction;
|
||||
}
|
||||
|
||||
export default css;
|
||||
27
node_modules/@material-ui/system/es/display.js
generated
vendored
Normal file
27
node_modules/@material-ui/system/es/display.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export const displayPrint = style({
|
||||
prop: 'displayPrint',
|
||||
cssProperty: false,
|
||||
transform: value => ({
|
||||
'@media print': {
|
||||
display: value
|
||||
}
|
||||
})
|
||||
});
|
||||
export const displayRaw = style({
|
||||
prop: 'display'
|
||||
});
|
||||
export const overflow = style({
|
||||
prop: 'overflow'
|
||||
});
|
||||
export const textOverflow = style({
|
||||
prop: 'textOverflow'
|
||||
});
|
||||
export const visibility = style({
|
||||
prop: 'visibility'
|
||||
});
|
||||
export const whiteSpace = style({
|
||||
prop: 'whiteSpace'
|
||||
});
|
||||
export default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);
|
||||
43
node_modules/@material-ui/system/es/flexbox.js
generated
vendored
Normal file
43
node_modules/@material-ui/system/es/flexbox.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export const flexBasis = style({
|
||||
prop: 'flexBasis'
|
||||
});
|
||||
export const flexDirection = style({
|
||||
prop: 'flexDirection'
|
||||
});
|
||||
export const flexWrap = style({
|
||||
prop: 'flexWrap'
|
||||
});
|
||||
export const justifyContent = style({
|
||||
prop: 'justifyContent'
|
||||
});
|
||||
export const alignItems = style({
|
||||
prop: 'alignItems'
|
||||
});
|
||||
export const alignContent = style({
|
||||
prop: 'alignContent'
|
||||
});
|
||||
export const order = style({
|
||||
prop: 'order'
|
||||
});
|
||||
export const flex = style({
|
||||
prop: 'flex'
|
||||
});
|
||||
export const flexGrow = style({
|
||||
prop: 'flexGrow'
|
||||
});
|
||||
export const flexShrink = style({
|
||||
prop: 'flexShrink'
|
||||
});
|
||||
export const alignSelf = style({
|
||||
prop: 'alignSelf'
|
||||
});
|
||||
export const justifyItems = style({
|
||||
prop: 'justifyItems'
|
||||
});
|
||||
export const justifySelf = style({
|
||||
prop: 'justifySelf'
|
||||
});
|
||||
const flexbox = compose(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf);
|
||||
export default flexbox;
|
||||
40
node_modules/@material-ui/system/es/grid.js
generated
vendored
Normal file
40
node_modules/@material-ui/system/es/grid.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export const gridGap = style({
|
||||
prop: 'gridGap'
|
||||
});
|
||||
export const gridColumnGap = style({
|
||||
prop: 'gridColumnGap'
|
||||
});
|
||||
export const gridRowGap = style({
|
||||
prop: 'gridRowGap'
|
||||
});
|
||||
export const gridColumn = style({
|
||||
prop: 'gridColumn'
|
||||
});
|
||||
export const gridRow = style({
|
||||
prop: 'gridRow'
|
||||
});
|
||||
export const gridAutoFlow = style({
|
||||
prop: 'gridAutoFlow'
|
||||
});
|
||||
export const gridAutoColumns = style({
|
||||
prop: 'gridAutoColumns'
|
||||
});
|
||||
export const gridAutoRows = style({
|
||||
prop: 'gridAutoRows'
|
||||
});
|
||||
export const gridTemplateColumns = style({
|
||||
prop: 'gridTemplateColumns'
|
||||
});
|
||||
export const gridTemplateRows = style({
|
||||
prop: 'gridTemplateRows'
|
||||
});
|
||||
export const gridTemplateAreas = style({
|
||||
prop: 'gridTemplateAreas'
|
||||
});
|
||||
export const gridArea = style({
|
||||
prop: 'gridArea'
|
||||
});
|
||||
const grid = compose(gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
|
||||
export default grid;
|
||||
22
node_modules/@material-ui/system/es/index.js
generated
vendored
Normal file
22
node_modules/@material-ui/system/es/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
export { default as borders } from './borders';
|
||||
export * from './borders';
|
||||
export { default as breakpoints } from './breakpoints';
|
||||
export { default as compose } from './compose';
|
||||
export { default as css } from './css';
|
||||
export { default as display } from './display';
|
||||
export { default as flexbox } from './flexbox';
|
||||
export * from './flexbox';
|
||||
export { default as grid } from './grid';
|
||||
export * from './grid';
|
||||
export { default as palette } from './palette';
|
||||
export * from './palette';
|
||||
export { default as positions } from './positions';
|
||||
export * from './positions';
|
||||
export { default as shadows } from './shadows';
|
||||
export { default as sizing } from './sizing';
|
||||
export * from './sizing';
|
||||
export { default as spacing } from './spacing';
|
||||
export * from './spacing';
|
||||
export { default as style } from './style';
|
||||
export { default as typography } from './typography';
|
||||
export * from './typography';
|
||||
10
node_modules/@material-ui/system/es/memoize.js
generated
vendored
Normal file
10
node_modules/@material-ui/system/es/memoize.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function memoize(fn) {
|
||||
const cache = {};
|
||||
return arg => {
|
||||
if (cache[arg] === undefined) {
|
||||
cache[arg] = fn(arg);
|
||||
}
|
||||
|
||||
return cache[arg];
|
||||
};
|
||||
}
|
||||
14
node_modules/@material-ui/system/es/merge.js
generated
vendored
Normal file
14
node_modules/@material-ui/system/es/merge.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { deepmerge } from '@material-ui/utils';
|
||||
|
||||
function merge(acc, item) {
|
||||
if (!item) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
return deepmerge(acc, item, {
|
||||
clone: false // No need to clone deep, it's way faster.
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
export default merge;
|
||||
13
node_modules/@material-ui/system/es/palette.js
generated
vendored
Normal file
13
node_modules/@material-ui/system/es/palette.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export const color = style({
|
||||
prop: 'color',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
export const bgcolor = style({
|
||||
prop: 'bgcolor',
|
||||
cssProperty: 'backgroundColor',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
const palette = compose(color, bgcolor);
|
||||
export default palette;
|
||||
22
node_modules/@material-ui/system/es/positions.js
generated
vendored
Normal file
22
node_modules/@material-ui/system/es/positions.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export const position = style({
|
||||
prop: 'position'
|
||||
});
|
||||
export const zIndex = style({
|
||||
prop: 'zIndex',
|
||||
themeKey: 'zIndex'
|
||||
});
|
||||
export const top = style({
|
||||
prop: 'top'
|
||||
});
|
||||
export const right = style({
|
||||
prop: 'right'
|
||||
});
|
||||
export const bottom = style({
|
||||
prop: 'bottom'
|
||||
});
|
||||
export const left = style({
|
||||
prop: 'left'
|
||||
});
|
||||
export default compose(position, zIndex, top, right, bottom, left);
|
||||
3
node_modules/@material-ui/system/es/responsivePropType.js
generated
vendored
Normal file
3
node_modules/@material-ui/system/es/responsivePropType.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import PropTypes from 'prop-types';
|
||||
const responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
||||
export default responsivePropType;
|
||||
6
node_modules/@material-ui/system/es/shadows.js
generated
vendored
Normal file
6
node_modules/@material-ui/system/es/shadows.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import style from './style';
|
||||
const boxShadow = style({
|
||||
prop: 'boxShadow',
|
||||
themeKey: 'shadows'
|
||||
});
|
||||
export default boxShadow;
|
||||
46
node_modules/@material-ui/system/es/sizing.js
generated
vendored
Normal file
46
node_modules/@material-ui/system/es/sizing.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
|
||||
function transform(value) {
|
||||
return value <= 1 ? `${value * 100}%` : value;
|
||||
}
|
||||
|
||||
export const width = style({
|
||||
prop: 'width',
|
||||
transform
|
||||
});
|
||||
export const maxWidth = style({
|
||||
prop: 'maxWidth',
|
||||
transform
|
||||
});
|
||||
export const minWidth = style({
|
||||
prop: 'minWidth',
|
||||
transform
|
||||
});
|
||||
export const height = style({
|
||||
prop: 'height',
|
||||
transform
|
||||
});
|
||||
export const maxHeight = style({
|
||||
prop: 'maxHeight',
|
||||
transform
|
||||
});
|
||||
export const minHeight = style({
|
||||
prop: 'minHeight',
|
||||
transform
|
||||
});
|
||||
export const sizeWidth = style({
|
||||
prop: 'size',
|
||||
cssProperty: 'width',
|
||||
transform
|
||||
});
|
||||
export const sizeHeight = style({
|
||||
prop: 'size',
|
||||
cssProperty: 'height',
|
||||
transform
|
||||
});
|
||||
export const boxSizing = style({
|
||||
prop: 'boxSizing'
|
||||
});
|
||||
const sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);
|
||||
export default sizing;
|
||||
128
node_modules/@material-ui/system/es/spacing.js
generated
vendored
Normal file
128
node_modules/@material-ui/system/es/spacing.js
generated
vendored
Normal file
@@ -0,0 +1,128 @@
|
||||
import responsivePropType from './responsivePropType';
|
||||
import { handleBreakpoints } from './breakpoints';
|
||||
import merge from './merge';
|
||||
import memoize from './memoize';
|
||||
const properties = {
|
||||
m: 'margin',
|
||||
p: 'padding'
|
||||
};
|
||||
const directions = {
|
||||
t: 'Top',
|
||||
r: 'Right',
|
||||
b: 'Bottom',
|
||||
l: 'Left',
|
||||
x: ['Left', 'Right'],
|
||||
y: ['Top', 'Bottom']
|
||||
};
|
||||
const aliases = {
|
||||
marginX: 'mx',
|
||||
marginY: 'my',
|
||||
paddingX: 'px',
|
||||
paddingY: 'py'
|
||||
}; // memoize() impact:
|
||||
// From 300,000 ops/sec
|
||||
// To 350,000 ops/sec
|
||||
|
||||
const getCssProperties = memoize(prop => {
|
||||
// It's not a shorthand notation.
|
||||
if (prop.length > 2) {
|
||||
if (aliases[prop]) {
|
||||
prop = aliases[prop];
|
||||
} else {
|
||||
return [prop];
|
||||
}
|
||||
}
|
||||
|
||||
const [a, b] = prop.split('');
|
||||
const property = properties[a];
|
||||
const direction = directions[b] || '';
|
||||
return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];
|
||||
});
|
||||
const spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];
|
||||
export function createUnarySpacing(theme) {
|
||||
const themeSpacing = theme.spacing || 8;
|
||||
|
||||
if (typeof themeSpacing === 'number') {
|
||||
return abs => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (typeof abs !== 'number') {
|
||||
console.error(`Material-UI: Expected spacing argument to be a number, got ${abs}.`);
|
||||
}
|
||||
}
|
||||
|
||||
return themeSpacing * abs;
|
||||
};
|
||||
}
|
||||
|
||||
if (Array.isArray(themeSpacing)) {
|
||||
return abs => {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (abs > themeSpacing.length - 1) {
|
||||
console.error([`Material-UI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
|
||||
}
|
||||
}
|
||||
|
||||
return themeSpacing[abs];
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof themeSpacing === 'function') {
|
||||
return themeSpacing;
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.error([`Material-UI: The \`theme.spacing\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
|
||||
}
|
||||
|
||||
return () => undefined;
|
||||
}
|
||||
|
||||
function getValue(transformer, propValue) {
|
||||
if (typeof propValue === 'string') {
|
||||
return propValue;
|
||||
}
|
||||
|
||||
const abs = Math.abs(propValue);
|
||||
const transformed = transformer(abs);
|
||||
|
||||
if (propValue >= 0) {
|
||||
return transformed;
|
||||
}
|
||||
|
||||
if (typeof transformed === 'number') {
|
||||
return -transformed;
|
||||
}
|
||||
|
||||
return `-${transformed}`;
|
||||
}
|
||||
|
||||
function getStyleFromPropValue(cssProperties, transformer) {
|
||||
return propValue => cssProperties.reduce((acc, cssProperty) => {
|
||||
acc[cssProperty] = getValue(transformer, propValue);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function spacing(props) {
|
||||
const theme = props.theme;
|
||||
const transformer = createUnarySpacing(theme);
|
||||
return Object.keys(props).map(prop => {
|
||||
// Using a hash computation over an array iteration could be faster, but with only 28 items,
|
||||
// it's doesn't worth the bundle size.
|
||||
if (spacingKeys.indexOf(prop) === -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const cssProperties = getCssProperties(prop);
|
||||
const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
||||
const propValue = props[prop];
|
||||
return handleBreakpoints(props, propValue, styleFromPropValue);
|
||||
}).reduce(merge, {});
|
||||
}
|
||||
|
||||
spacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {
|
||||
obj[key] = responsivePropType;
|
||||
return obj;
|
||||
}, {}) : {};
|
||||
spacing.filterProps = spacingKeys;
|
||||
export default spacing;
|
||||
63
node_modules/@material-ui/system/es/style.js
generated
vendored
Normal file
63
node_modules/@material-ui/system/es/style.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import responsivePropType from './responsivePropType';
|
||||
import { handleBreakpoints } from './breakpoints';
|
||||
|
||||
function getPath(obj, path) {
|
||||
if (!path || typeof path !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return path.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);
|
||||
}
|
||||
|
||||
function style(options) {
|
||||
const {
|
||||
prop,
|
||||
cssProperty = options.prop,
|
||||
themeKey,
|
||||
transform
|
||||
} = options;
|
||||
|
||||
const fn = props => {
|
||||
if (props[prop] == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const propValue = props[prop];
|
||||
const theme = props.theme;
|
||||
const themeMapping = getPath(theme, themeKey) || {};
|
||||
|
||||
const styleFromPropValue = propValueFinal => {
|
||||
let value;
|
||||
|
||||
if (typeof themeMapping === 'function') {
|
||||
value = themeMapping(propValueFinal);
|
||||
} else if (Array.isArray(themeMapping)) {
|
||||
value = themeMapping[propValueFinal] || propValueFinal;
|
||||
} else {
|
||||
value = getPath(themeMapping, propValueFinal) || propValueFinal;
|
||||
|
||||
if (transform) {
|
||||
value = transform(value);
|
||||
}
|
||||
}
|
||||
|
||||
if (cssProperty === false) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
[cssProperty]: value
|
||||
};
|
||||
};
|
||||
|
||||
return handleBreakpoints(props, propValue, styleFromPropValue);
|
||||
};
|
||||
|
||||
fn.propTypes = process.env.NODE_ENV !== 'production' ? {
|
||||
[prop]: responsivePropType
|
||||
} : {};
|
||||
fn.filterProps = [prop];
|
||||
return fn;
|
||||
}
|
||||
|
||||
export default style;
|
||||
29
node_modules/@material-ui/system/es/typography.js
generated
vendored
Normal file
29
node_modules/@material-ui/system/es/typography.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export const fontFamily = style({
|
||||
prop: 'fontFamily',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export const fontSize = style({
|
||||
prop: 'fontSize',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export const fontStyle = style({
|
||||
prop: 'fontStyle',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export const fontWeight = style({
|
||||
prop: 'fontWeight',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export const letterSpacing = style({
|
||||
prop: 'letterSpacing'
|
||||
});
|
||||
export const lineHeight = style({
|
||||
prop: 'lineHeight'
|
||||
});
|
||||
export const textAlign = style({
|
||||
prop: 'textAlign'
|
||||
});
|
||||
const typography = compose(fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);
|
||||
export default typography;
|
||||
46
node_modules/@material-ui/system/esm/borders.js
generated
vendored
Normal file
46
node_modules/@material-ui/system/esm/borders.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
|
||||
function getBorder(value) {
|
||||
if (typeof value !== 'number') {
|
||||
return value;
|
||||
}
|
||||
|
||||
return "".concat(value, "px solid");
|
||||
}
|
||||
|
||||
export var border = style({
|
||||
prop: 'border',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export var borderTop = style({
|
||||
prop: 'borderTop',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export var borderRight = style({
|
||||
prop: 'borderRight',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export var borderBottom = style({
|
||||
prop: 'borderBottom',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export var borderLeft = style({
|
||||
prop: 'borderLeft',
|
||||
themeKey: 'borders',
|
||||
transform: getBorder
|
||||
});
|
||||
export var borderColor = style({
|
||||
prop: 'borderColor',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
export var borderRadius = style({
|
||||
prop: 'borderRadius',
|
||||
themeKey: 'shape'
|
||||
});
|
||||
var borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius);
|
||||
export default borders;
|
||||
79
node_modules/@material-ui/system/esm/breakpoints.js
generated
vendored
Normal file
79
node_modules/@material-ui/system/esm/breakpoints.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
||||
import PropTypes from 'prop-types';
|
||||
import merge from './merge'; // The breakpoint **start** at this value.
|
||||
// For instance with the first breakpoint xs: [xs, sm[.
|
||||
|
||||
var values = {
|
||||
xs: 0,
|
||||
sm: 600,
|
||||
md: 960,
|
||||
lg: 1280,
|
||||
xl: 1920
|
||||
};
|
||||
var defaultBreakpoints = {
|
||||
// Sorted ASC by size. That's important.
|
||||
// It can't be configured as it's used statically for propTypes.
|
||||
keys: ['xs', 'sm', 'md', 'lg', 'xl'],
|
||||
up: function up(key) {
|
||||
return "@media (min-width:".concat(values[key], "px)");
|
||||
}
|
||||
};
|
||||
export function handleBreakpoints(props, propValue, styleFromPropValue) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (!props.theme) {
|
||||
console.error('Material-UI: You are calling a style function without a theme value.');
|
||||
}
|
||||
}
|
||||
|
||||
if (Array.isArray(propValue)) {
|
||||
var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
return propValue.reduce(function (acc, item, index) {
|
||||
acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
if (_typeof(propValue) === 'object') {
|
||||
var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
|
||||
return Object.keys(propValue).reduce(function (acc, breakpoint) {
|
||||
acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);
|
||||
return acc;
|
||||
}, {});
|
||||
}
|
||||
|
||||
var output = styleFromPropValue(propValue);
|
||||
return output;
|
||||
}
|
||||
|
||||
function breakpoints(styleFunction) {
|
||||
var newStyleFunction = function newStyleFunction(props) {
|
||||
var base = styleFunction(props);
|
||||
var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
||||
var extended = themeBreakpoints.keys.reduce(function (acc, key) {
|
||||
if (props[key]) {
|
||||
acc = acc || {};
|
||||
acc[themeBreakpoints.up(key)] = styleFunction(_extends({
|
||||
theme: props.theme
|
||||
}, props[key]));
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, null);
|
||||
return merge(base, extended);
|
||||
};
|
||||
|
||||
newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends(_extends({}, styleFunction.propTypes), {}, {
|
||||
xs: PropTypes.object,
|
||||
sm: PropTypes.object,
|
||||
md: PropTypes.object,
|
||||
lg: PropTypes.object,
|
||||
xl: PropTypes.object
|
||||
}) : {};
|
||||
newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));
|
||||
return newStyleFunction;
|
||||
}
|
||||
|
||||
export default breakpoints;
|
||||
45
node_modules/@material-ui/system/esm/compose.js
generated
vendored
Normal file
45
node_modules/@material-ui/system/esm/compose.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import merge from './merge';
|
||||
|
||||
function compose() {
|
||||
for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
styles[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
var fn = function fn(props) {
|
||||
return styles.reduce(function (acc, style) {
|
||||
var output = style(props);
|
||||
|
||||
if (output) {
|
||||
return merge(acc, output);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
}; // Alternative approach that doesn't yield any performance gain.
|
||||
// const handlers = styles.reduce((acc, style) => {
|
||||
// style.filterProps.forEach(prop => {
|
||||
// acc[prop] = style;
|
||||
// });
|
||||
// return acc;
|
||||
// }, {});
|
||||
// const fn = props => {
|
||||
// return Object.keys(props).reduce((acc, prop) => {
|
||||
// if (handlers[prop]) {
|
||||
// return merge(acc, handlers[prop](props));
|
||||
// }
|
||||
// return acc;
|
||||
// }, {});
|
||||
// };
|
||||
|
||||
|
||||
fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce(function (acc, style) {
|
||||
return _extends(acc, style.propTypes);
|
||||
}, {}) : {};
|
||||
fn.filterProps = styles.reduce(function (acc, style) {
|
||||
return acc.concat(style.filterProps);
|
||||
}, []);
|
||||
return fn;
|
||||
}
|
||||
|
||||
export default compose;
|
||||
36
node_modules/@material-ui/system/esm/css.js
generated
vendored
Normal file
36
node_modules/@material-ui/system/esm/css.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
||||
import _extends from "@babel/runtime/helpers/esm/extends";
|
||||
import PropTypes from 'prop-types';
|
||||
import merge from './merge';
|
||||
|
||||
function omit(input, fields) {
|
||||
var output = {};
|
||||
Object.keys(input).forEach(function (prop) {
|
||||
if (fields.indexOf(prop) === -1) {
|
||||
output[prop] = input[prop];
|
||||
}
|
||||
});
|
||||
return output;
|
||||
}
|
||||
|
||||
function css(styleFunction) {
|
||||
var newStyleFunction = function newStyleFunction(props) {
|
||||
var output = styleFunction(props);
|
||||
|
||||
if (props.css) {
|
||||
return _extends(_extends({}, merge(output, styleFunction(_extends({
|
||||
theme: props.theme
|
||||
}, props.css)))), omit(props.css, [styleFunction.filterProps]));
|
||||
}
|
||||
|
||||
return output;
|
||||
};
|
||||
|
||||
newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends(_extends({}, styleFunction.propTypes), {}, {
|
||||
css: PropTypes.object
|
||||
}) : {};
|
||||
newStyleFunction.filterProps = ['css'].concat(_toConsumableArray(styleFunction.filterProps));
|
||||
return newStyleFunction;
|
||||
}
|
||||
|
||||
export default css;
|
||||
29
node_modules/@material-ui/system/esm/display.js
generated
vendored
Normal file
29
node_modules/@material-ui/system/esm/display.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export var displayPrint = style({
|
||||
prop: 'displayPrint',
|
||||
cssProperty: false,
|
||||
transform: function transform(value) {
|
||||
return {
|
||||
'@media print': {
|
||||
display: value
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
export var displayRaw = style({
|
||||
prop: 'display'
|
||||
});
|
||||
export var overflow = style({
|
||||
prop: 'overflow'
|
||||
});
|
||||
export var textOverflow = style({
|
||||
prop: 'textOverflow'
|
||||
});
|
||||
export var visibility = style({
|
||||
prop: 'visibility'
|
||||
});
|
||||
export var whiteSpace = style({
|
||||
prop: 'whiteSpace'
|
||||
});
|
||||
export default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);
|
||||
43
node_modules/@material-ui/system/esm/flexbox.js
generated
vendored
Normal file
43
node_modules/@material-ui/system/esm/flexbox.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export var flexBasis = style({
|
||||
prop: 'flexBasis'
|
||||
});
|
||||
export var flexDirection = style({
|
||||
prop: 'flexDirection'
|
||||
});
|
||||
export var flexWrap = style({
|
||||
prop: 'flexWrap'
|
||||
});
|
||||
export var justifyContent = style({
|
||||
prop: 'justifyContent'
|
||||
});
|
||||
export var alignItems = style({
|
||||
prop: 'alignItems'
|
||||
});
|
||||
export var alignContent = style({
|
||||
prop: 'alignContent'
|
||||
});
|
||||
export var order = style({
|
||||
prop: 'order'
|
||||
});
|
||||
export var flex = style({
|
||||
prop: 'flex'
|
||||
});
|
||||
export var flexGrow = style({
|
||||
prop: 'flexGrow'
|
||||
});
|
||||
export var flexShrink = style({
|
||||
prop: 'flexShrink'
|
||||
});
|
||||
export var alignSelf = style({
|
||||
prop: 'alignSelf'
|
||||
});
|
||||
export var justifyItems = style({
|
||||
prop: 'justifyItems'
|
||||
});
|
||||
export var justifySelf = style({
|
||||
prop: 'justifySelf'
|
||||
});
|
||||
var flexbox = compose(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf);
|
||||
export default flexbox;
|
||||
40
node_modules/@material-ui/system/esm/grid.js
generated
vendored
Normal file
40
node_modules/@material-ui/system/esm/grid.js
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export var gridGap = style({
|
||||
prop: 'gridGap'
|
||||
});
|
||||
export var gridColumnGap = style({
|
||||
prop: 'gridColumnGap'
|
||||
});
|
||||
export var gridRowGap = style({
|
||||
prop: 'gridRowGap'
|
||||
});
|
||||
export var gridColumn = style({
|
||||
prop: 'gridColumn'
|
||||
});
|
||||
export var gridRow = style({
|
||||
prop: 'gridRow'
|
||||
});
|
||||
export var gridAutoFlow = style({
|
||||
prop: 'gridAutoFlow'
|
||||
});
|
||||
export var gridAutoColumns = style({
|
||||
prop: 'gridAutoColumns'
|
||||
});
|
||||
export var gridAutoRows = style({
|
||||
prop: 'gridAutoRows'
|
||||
});
|
||||
export var gridTemplateColumns = style({
|
||||
prop: 'gridTemplateColumns'
|
||||
});
|
||||
export var gridTemplateRows = style({
|
||||
prop: 'gridTemplateRows'
|
||||
});
|
||||
export var gridTemplateAreas = style({
|
||||
prop: 'gridTemplateAreas'
|
||||
});
|
||||
export var gridArea = style({
|
||||
prop: 'gridArea'
|
||||
});
|
||||
var grid = compose(gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
|
||||
export default grid;
|
||||
27
node_modules/@material-ui/system/esm/index.js
generated
vendored
Normal file
27
node_modules/@material-ui/system/esm/index.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/** @license Material-UI v4.9.14
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
export { default as borders } from './borders';
|
||||
export * from './borders';
|
||||
export { default as breakpoints } from './breakpoints';
|
||||
export { default as compose } from './compose';
|
||||
export { default as css } from './css';
|
||||
export { default as display } from './display';
|
||||
export { default as flexbox } from './flexbox';
|
||||
export * from './flexbox';
|
||||
export { default as grid } from './grid';
|
||||
export * from './grid';
|
||||
export { default as palette } from './palette';
|
||||
export * from './palette';
|
||||
export { default as positions } from './positions';
|
||||
export * from './positions';
|
||||
export { default as shadows } from './shadows';
|
||||
export { default as sizing } from './sizing';
|
||||
export * from './sizing';
|
||||
export { default as spacing } from './spacing';
|
||||
export * from './spacing';
|
||||
export { default as style } from './style';
|
||||
export { default as typography } from './typography';
|
||||
export * from './typography';
|
||||
10
node_modules/@material-ui/system/esm/memoize.js
generated
vendored
Normal file
10
node_modules/@material-ui/system/esm/memoize.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default function memoize(fn) {
|
||||
var cache = {};
|
||||
return function (arg) {
|
||||
if (cache[arg] === undefined) {
|
||||
cache[arg] = fn(arg);
|
||||
}
|
||||
|
||||
return cache[arg];
|
||||
};
|
||||
}
|
||||
14
node_modules/@material-ui/system/esm/merge.js
generated
vendored
Normal file
14
node_modules/@material-ui/system/esm/merge.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { deepmerge } from '@material-ui/utils';
|
||||
|
||||
function merge(acc, item) {
|
||||
if (!item) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
return deepmerge(acc, item, {
|
||||
clone: false // No need to clone deep, it's way faster.
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
export default merge;
|
||||
13
node_modules/@material-ui/system/esm/palette.js
generated
vendored
Normal file
13
node_modules/@material-ui/system/esm/palette.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export var color = style({
|
||||
prop: 'color',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
export var bgcolor = style({
|
||||
prop: 'bgcolor',
|
||||
cssProperty: 'backgroundColor',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
var palette = compose(color, bgcolor);
|
||||
export default palette;
|
||||
22
node_modules/@material-ui/system/esm/positions.js
generated
vendored
Normal file
22
node_modules/@material-ui/system/esm/positions.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export var position = style({
|
||||
prop: 'position'
|
||||
});
|
||||
export var zIndex = style({
|
||||
prop: 'zIndex',
|
||||
themeKey: 'zIndex'
|
||||
});
|
||||
export var top = style({
|
||||
prop: 'top'
|
||||
});
|
||||
export var right = style({
|
||||
prop: 'right'
|
||||
});
|
||||
export var bottom = style({
|
||||
prop: 'bottom'
|
||||
});
|
||||
export var left = style({
|
||||
prop: 'left'
|
||||
});
|
||||
export default compose(position, zIndex, top, right, bottom, left);
|
||||
3
node_modules/@material-ui/system/esm/responsivePropType.js
generated
vendored
Normal file
3
node_modules/@material-ui/system/esm/responsivePropType.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import PropTypes from 'prop-types';
|
||||
var responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
||||
export default responsivePropType;
|
||||
6
node_modules/@material-ui/system/esm/shadows.js
generated
vendored
Normal file
6
node_modules/@material-ui/system/esm/shadows.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import style from './style';
|
||||
var boxShadow = style({
|
||||
prop: 'boxShadow',
|
||||
themeKey: 'shadows'
|
||||
});
|
||||
export default boxShadow;
|
||||
46
node_modules/@material-ui/system/esm/sizing.js
generated
vendored
Normal file
46
node_modules/@material-ui/system/esm/sizing.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
|
||||
function transform(value) {
|
||||
return value <= 1 ? "".concat(value * 100, "%") : value;
|
||||
}
|
||||
|
||||
export var width = style({
|
||||
prop: 'width',
|
||||
transform: transform
|
||||
});
|
||||
export var maxWidth = style({
|
||||
prop: 'maxWidth',
|
||||
transform: transform
|
||||
});
|
||||
export var minWidth = style({
|
||||
prop: 'minWidth',
|
||||
transform: transform
|
||||
});
|
||||
export var height = style({
|
||||
prop: 'height',
|
||||
transform: transform
|
||||
});
|
||||
export var maxHeight = style({
|
||||
prop: 'maxHeight',
|
||||
transform: transform
|
||||
});
|
||||
export var minHeight = style({
|
||||
prop: 'minHeight',
|
||||
transform: transform
|
||||
});
|
||||
export var sizeWidth = style({
|
||||
prop: 'size',
|
||||
cssProperty: 'width',
|
||||
transform: transform
|
||||
});
|
||||
export var sizeHeight = style({
|
||||
prop: 'size',
|
||||
cssProperty: 'height',
|
||||
transform: transform
|
||||
});
|
||||
export var boxSizing = style({
|
||||
prop: 'boxSizing'
|
||||
});
|
||||
var sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);
|
||||
export default sizing;
|
||||
139
node_modules/@material-ui/system/esm/spacing.js
generated
vendored
Normal file
139
node_modules/@material-ui/system/esm/spacing.js
generated
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
||||
import responsivePropType from './responsivePropType';
|
||||
import { handleBreakpoints } from './breakpoints';
|
||||
import merge from './merge';
|
||||
import memoize from './memoize';
|
||||
var properties = {
|
||||
m: 'margin',
|
||||
p: 'padding'
|
||||
};
|
||||
var directions = {
|
||||
t: 'Top',
|
||||
r: 'Right',
|
||||
b: 'Bottom',
|
||||
l: 'Left',
|
||||
x: ['Left', 'Right'],
|
||||
y: ['Top', 'Bottom']
|
||||
};
|
||||
var aliases = {
|
||||
marginX: 'mx',
|
||||
marginY: 'my',
|
||||
paddingX: 'px',
|
||||
paddingY: 'py'
|
||||
}; // memoize() impact:
|
||||
// From 300,000 ops/sec
|
||||
// To 350,000 ops/sec
|
||||
|
||||
var getCssProperties = memoize(function (prop) {
|
||||
// It's not a shorthand notation.
|
||||
if (prop.length > 2) {
|
||||
if (aliases[prop]) {
|
||||
prop = aliases[prop];
|
||||
} else {
|
||||
return [prop];
|
||||
}
|
||||
}
|
||||
|
||||
var _prop$split = prop.split(''),
|
||||
_prop$split2 = _slicedToArray(_prop$split, 2),
|
||||
a = _prop$split2[0],
|
||||
b = _prop$split2[1];
|
||||
|
||||
var property = properties[a];
|
||||
var direction = directions[b] || '';
|
||||
return Array.isArray(direction) ? direction.map(function (dir) {
|
||||
return property + dir;
|
||||
}) : [property + direction];
|
||||
});
|
||||
var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];
|
||||
export function createUnarySpacing(theme) {
|
||||
var themeSpacing = theme.spacing || 8;
|
||||
|
||||
if (typeof themeSpacing === 'number') {
|
||||
return function (abs) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (typeof abs !== 'number') {
|
||||
console.error("Material-UI: Expected spacing argument to be a number, got ".concat(abs, "."));
|
||||
}
|
||||
}
|
||||
|
||||
return themeSpacing * abs;
|
||||
};
|
||||
}
|
||||
|
||||
if (Array.isArray(themeSpacing)) {
|
||||
return function (abs) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (abs > themeSpacing.length - 1) {
|
||||
console.error(["Material-UI: The value provided (".concat(abs, ") overflows."), "The supported values are: ".concat(JSON.stringify(themeSpacing), "."), "".concat(abs, " > ").concat(themeSpacing.length - 1, ", you need to add the missing values.")].join('\n'));
|
||||
}
|
||||
}
|
||||
|
||||
return themeSpacing[abs];
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof themeSpacing === 'function') {
|
||||
return themeSpacing;
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.error(["Material-UI: The `theme.spacing` value (".concat(themeSpacing, ") is invalid."), 'It should be a number, an array or a function.'].join('\n'));
|
||||
}
|
||||
|
||||
return function () {
|
||||
return undefined;
|
||||
};
|
||||
}
|
||||
|
||||
function getValue(transformer, propValue) {
|
||||
if (typeof propValue === 'string') {
|
||||
return propValue;
|
||||
}
|
||||
|
||||
var abs = Math.abs(propValue);
|
||||
var transformed = transformer(abs);
|
||||
|
||||
if (propValue >= 0) {
|
||||
return transformed;
|
||||
}
|
||||
|
||||
if (typeof transformed === 'number') {
|
||||
return -transformed;
|
||||
}
|
||||
|
||||
return "-".concat(transformed);
|
||||
}
|
||||
|
||||
function getStyleFromPropValue(cssProperties, transformer) {
|
||||
return function (propValue) {
|
||||
return cssProperties.reduce(function (acc, cssProperty) {
|
||||
acc[cssProperty] = getValue(transformer, propValue);
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
}
|
||||
|
||||
function spacing(props) {
|
||||
var theme = props.theme;
|
||||
var transformer = createUnarySpacing(theme);
|
||||
return Object.keys(props).map(function (prop) {
|
||||
// Using a hash computation over an array iteration could be faster, but with only 28 items,
|
||||
// it's doesn't worth the bundle size.
|
||||
if (spacingKeys.indexOf(prop) === -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var cssProperties = getCssProperties(prop);
|
||||
var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
||||
var propValue = props[prop];
|
||||
return handleBreakpoints(props, propValue, styleFromPropValue);
|
||||
}).reduce(merge, {});
|
||||
}
|
||||
|
||||
spacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce(function (obj, key) {
|
||||
obj[key] = responsivePropType;
|
||||
return obj;
|
||||
}, {}) : {};
|
||||
spacing.filterProps = spacingKeys;
|
||||
export default spacing;
|
||||
61
node_modules/@material-ui/system/esm/style.js
generated
vendored
Normal file
61
node_modules/@material-ui/system/esm/style.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
||||
import responsivePropType from './responsivePropType';
|
||||
import { handleBreakpoints } from './breakpoints';
|
||||
|
||||
function getPath(obj, path) {
|
||||
if (!path || typeof path !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return path.split('.').reduce(function (acc, item) {
|
||||
return acc && acc[item] ? acc[item] : null;
|
||||
}, obj);
|
||||
}
|
||||
|
||||
function style(options) {
|
||||
var prop = options.prop,
|
||||
_options$cssProperty = options.cssProperty,
|
||||
cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty,
|
||||
themeKey = options.themeKey,
|
||||
transform = options.transform;
|
||||
|
||||
var fn = function fn(props) {
|
||||
if (props[prop] == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var propValue = props[prop];
|
||||
var theme = props.theme;
|
||||
var themeMapping = getPath(theme, themeKey) || {};
|
||||
|
||||
var styleFromPropValue = function styleFromPropValue(propValueFinal) {
|
||||
var value;
|
||||
|
||||
if (typeof themeMapping === 'function') {
|
||||
value = themeMapping(propValueFinal);
|
||||
} else if (Array.isArray(themeMapping)) {
|
||||
value = themeMapping[propValueFinal] || propValueFinal;
|
||||
} else {
|
||||
value = getPath(themeMapping, propValueFinal) || propValueFinal;
|
||||
|
||||
if (transform) {
|
||||
value = transform(value);
|
||||
}
|
||||
}
|
||||
|
||||
if (cssProperty === false) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return _defineProperty({}, cssProperty, value);
|
||||
};
|
||||
|
||||
return handleBreakpoints(props, propValue, styleFromPropValue);
|
||||
};
|
||||
|
||||
fn.propTypes = process.env.NODE_ENV !== 'production' ? _defineProperty({}, prop, responsivePropType) : {};
|
||||
fn.filterProps = [prop];
|
||||
return fn;
|
||||
}
|
||||
|
||||
export default style;
|
||||
29
node_modules/@material-ui/system/esm/typography.js
generated
vendored
Normal file
29
node_modules/@material-ui/system/esm/typography.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import style from './style';
|
||||
import compose from './compose';
|
||||
export var fontFamily = style({
|
||||
prop: 'fontFamily',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export var fontSize = style({
|
||||
prop: 'fontSize',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export var fontStyle = style({
|
||||
prop: 'fontStyle',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export var fontWeight = style({
|
||||
prop: 'fontWeight',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
export var letterSpacing = style({
|
||||
prop: 'letterSpacing'
|
||||
});
|
||||
export var lineHeight = style({
|
||||
prop: 'lineHeight'
|
||||
});
|
||||
export var textAlign = style({
|
||||
prop: 'textAlign'
|
||||
});
|
||||
var typography = compose(fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);
|
||||
export default typography;
|
||||
68
node_modules/@material-ui/system/flexbox.js
generated
vendored
Normal file
68
node_modules/@material-ui/system/flexbox.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.justifySelf = exports.justifyItems = exports.alignSelf = exports.flexShrink = exports.flexGrow = exports.flex = exports.order = exports.alignContent = exports.alignItems = exports.justifyContent = exports.flexWrap = exports.flexDirection = exports.flexBasis = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
var flexBasis = (0, _style.default)({
|
||||
prop: 'flexBasis'
|
||||
});
|
||||
exports.flexBasis = flexBasis;
|
||||
var flexDirection = (0, _style.default)({
|
||||
prop: 'flexDirection'
|
||||
});
|
||||
exports.flexDirection = flexDirection;
|
||||
var flexWrap = (0, _style.default)({
|
||||
prop: 'flexWrap'
|
||||
});
|
||||
exports.flexWrap = flexWrap;
|
||||
var justifyContent = (0, _style.default)({
|
||||
prop: 'justifyContent'
|
||||
});
|
||||
exports.justifyContent = justifyContent;
|
||||
var alignItems = (0, _style.default)({
|
||||
prop: 'alignItems'
|
||||
});
|
||||
exports.alignItems = alignItems;
|
||||
var alignContent = (0, _style.default)({
|
||||
prop: 'alignContent'
|
||||
});
|
||||
exports.alignContent = alignContent;
|
||||
var order = (0, _style.default)({
|
||||
prop: 'order'
|
||||
});
|
||||
exports.order = order;
|
||||
var flex = (0, _style.default)({
|
||||
prop: 'flex'
|
||||
});
|
||||
exports.flex = flex;
|
||||
var flexGrow = (0, _style.default)({
|
||||
prop: 'flexGrow'
|
||||
});
|
||||
exports.flexGrow = flexGrow;
|
||||
var flexShrink = (0, _style.default)({
|
||||
prop: 'flexShrink'
|
||||
});
|
||||
exports.flexShrink = flexShrink;
|
||||
var alignSelf = (0, _style.default)({
|
||||
prop: 'alignSelf'
|
||||
});
|
||||
exports.alignSelf = alignSelf;
|
||||
var justifyItems = (0, _style.default)({
|
||||
prop: 'justifyItems'
|
||||
});
|
||||
exports.justifyItems = justifyItems;
|
||||
var justifySelf = (0, _style.default)({
|
||||
prop: 'justifySelf'
|
||||
});
|
||||
exports.justifySelf = justifySelf;
|
||||
var flexbox = (0, _compose.default)(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf);
|
||||
var _default = flexbox;
|
||||
exports.default = _default;
|
||||
64
node_modules/@material-ui/system/grid.js
generated
vendored
Normal file
64
node_modules/@material-ui/system/grid.js
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.gridArea = exports.gridTemplateAreas = exports.gridTemplateRows = exports.gridTemplateColumns = exports.gridAutoRows = exports.gridAutoColumns = exports.gridAutoFlow = exports.gridRow = exports.gridColumn = exports.gridRowGap = exports.gridColumnGap = exports.gridGap = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
var gridGap = (0, _style.default)({
|
||||
prop: 'gridGap'
|
||||
});
|
||||
exports.gridGap = gridGap;
|
||||
var gridColumnGap = (0, _style.default)({
|
||||
prop: 'gridColumnGap'
|
||||
});
|
||||
exports.gridColumnGap = gridColumnGap;
|
||||
var gridRowGap = (0, _style.default)({
|
||||
prop: 'gridRowGap'
|
||||
});
|
||||
exports.gridRowGap = gridRowGap;
|
||||
var gridColumn = (0, _style.default)({
|
||||
prop: 'gridColumn'
|
||||
});
|
||||
exports.gridColumn = gridColumn;
|
||||
var gridRow = (0, _style.default)({
|
||||
prop: 'gridRow'
|
||||
});
|
||||
exports.gridRow = gridRow;
|
||||
var gridAutoFlow = (0, _style.default)({
|
||||
prop: 'gridAutoFlow'
|
||||
});
|
||||
exports.gridAutoFlow = gridAutoFlow;
|
||||
var gridAutoColumns = (0, _style.default)({
|
||||
prop: 'gridAutoColumns'
|
||||
});
|
||||
exports.gridAutoColumns = gridAutoColumns;
|
||||
var gridAutoRows = (0, _style.default)({
|
||||
prop: 'gridAutoRows'
|
||||
});
|
||||
exports.gridAutoRows = gridAutoRows;
|
||||
var gridTemplateColumns = (0, _style.default)({
|
||||
prop: 'gridTemplateColumns'
|
||||
});
|
||||
exports.gridTemplateColumns = gridTemplateColumns;
|
||||
var gridTemplateRows = (0, _style.default)({
|
||||
prop: 'gridTemplateRows'
|
||||
});
|
||||
exports.gridTemplateRows = gridTemplateRows;
|
||||
var gridTemplateAreas = (0, _style.default)({
|
||||
prop: 'gridTemplateAreas'
|
||||
});
|
||||
exports.gridTemplateAreas = gridTemplateAreas;
|
||||
var gridArea = (0, _style.default)({
|
||||
prop: 'gridArea'
|
||||
});
|
||||
exports.gridArea = gridArea;
|
||||
var grid = (0, _compose.default)(gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
|
||||
var _default = grid;
|
||||
exports.default = _default;
|
||||
206
node_modules/@material-ui/system/index.d.ts
generated
vendored
Normal file
206
node_modules/@material-ui/system/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
import * as CSS from 'csstype';
|
||||
|
||||
// disable automatic export
|
||||
export {};
|
||||
|
||||
export type PropsFor<SomeStyleFunction> = SomeStyleFunction extends StyleFunction<infer Props>
|
||||
? Props
|
||||
: never;
|
||||
export type StyleFunction<Props> = (props: Props) => any;
|
||||
type SimpleStyleFunction<PropKey extends keyof any> = StyleFunction<Partial<Record<PropKey, any>>>;
|
||||
|
||||
// borders.js
|
||||
export const border: SimpleStyleFunction<'border'>;
|
||||
export const borderTop: SimpleStyleFunction<'borderTop'>;
|
||||
export const borderRight: SimpleStyleFunction<'borderRight'>;
|
||||
export const borderBottom: SimpleStyleFunction<'borderBottom'>;
|
||||
export const borderLeft: SimpleStyleFunction<'borderLeft'>;
|
||||
export const borderColor: SimpleStyleFunction<'borderColor'>;
|
||||
export const borderRadius: SimpleStyleFunction<'borderRadius'>;
|
||||
export const borders: SimpleStyleFunction<
|
||||
| 'border'
|
||||
| 'borderTop'
|
||||
| 'borderRight'
|
||||
| 'borderBottom'
|
||||
| 'borderLeft'
|
||||
| 'borderColor'
|
||||
| 'borderRadius'
|
||||
>;
|
||||
export type BordersProps = PropsFor<typeof borders>;
|
||||
|
||||
// breakpoints.js
|
||||
type DefaultBreakPoints = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||
/**
|
||||
*
|
||||
* @returns An enhanced stylefunction that considers breakpoints
|
||||
*/
|
||||
export function breakpoints<Props, Breakpoints extends string = DefaultBreakPoints>(
|
||||
styleFunction: StyleFunction<Props>
|
||||
): StyleFunction<Partial<Record<Breakpoints, Props>> & Props>;
|
||||
|
||||
// compose.js
|
||||
/**
|
||||
* given a list of StyleFunction return the intersection of the props each individual
|
||||
* StyleFunction requires.
|
||||
*
|
||||
* If `firstFn` requires { color: string } and `secondFn` requires { spacing: number }
|
||||
* their composed function requires { color: string, spacing: number }
|
||||
*/
|
||||
type ComposedArg<T> = T extends Array<(arg: infer P) => any> ? P : never;
|
||||
type ComposedStyleProps<T> = ComposedArg<T>;
|
||||
export type ComposedStyleFunction<T extends Array<StyleFunction<any>>> = StyleFunction<
|
||||
ComposedStyleProps<T>
|
||||
>;
|
||||
export function compose<T extends Array<StyleFunction<any>>>(...args: T): ComposedStyleFunction<T>;
|
||||
|
||||
// css.js
|
||||
export function css<Props>(
|
||||
styleFunction: StyleFunction<Props>
|
||||
): StyleFunction<Props & { css: Omit<Props, 'theme'> }>;
|
||||
|
||||
export const display: SimpleStyleFunction<
|
||||
'display' | 'displayPrint' | 'overflow' | 'textOverflow' | 'visibility' | 'whiteSpace'
|
||||
>;
|
||||
|
||||
export type DisplayProps = PropsFor<typeof display>;
|
||||
|
||||
// flexbox.js
|
||||
export const flexbox: SimpleStyleFunction<
|
||||
| 'flexBasis'
|
||||
| 'flexDirection'
|
||||
| 'flexWrap'
|
||||
| 'justifyContent'
|
||||
| 'alignItems'
|
||||
| 'alignContent'
|
||||
| 'order'
|
||||
| 'flex'
|
||||
| 'flexGrow'
|
||||
| 'flexShrink'
|
||||
| 'alignSelf'
|
||||
| 'justifyItems'
|
||||
| 'justifySelf'
|
||||
>;
|
||||
export type FlexboxProps = PropsFor<typeof flexbox>;
|
||||
|
||||
// grid.js
|
||||
export const grid: SimpleStyleFunction<
|
||||
| 'gridGap'
|
||||
| 'gridColumnGap'
|
||||
| 'gridRowGap'
|
||||
| 'gridColumn'
|
||||
| 'gridRow'
|
||||
| 'gridAutoFlow'
|
||||
| 'gridAutoColumns'
|
||||
| 'gridAutoRows'
|
||||
| 'gridTemplateColumns'
|
||||
| 'gridTemplateRows'
|
||||
| 'gridTemplateAreas'
|
||||
| 'gridArea'
|
||||
>;
|
||||
export type GridProps = PropsFor<typeof grid>;
|
||||
|
||||
// palette.js
|
||||
export const color: SimpleStyleFunction<'color'>;
|
||||
export const bgcolor: SimpleStyleFunction<'bgcolor'>;
|
||||
export const palette: SimpleStyleFunction<'bgcolor' | 'color'>;
|
||||
export type PaletteProps = PropsFor<typeof palette>;
|
||||
|
||||
export const positions: SimpleStyleFunction<
|
||||
'zIndex' | 'position' | 'top' | 'right' | 'bottom' | 'left'
|
||||
>;
|
||||
export type PositionsProps = PropsFor<typeof positions>;
|
||||
|
||||
export const shadows: SimpleStyleFunction<'boxShadow'>;
|
||||
export type ShadowsProps = PropsFor<typeof shadows>;
|
||||
|
||||
// * sizing.js TODO
|
||||
export const width: SimpleStyleFunction<'width'>;
|
||||
export const maxWidth: SimpleStyleFunction<'maxWidth'>;
|
||||
export const minWidth: SimpleStyleFunction<'minWidth'>;
|
||||
export const height: SimpleStyleFunction<'height'>;
|
||||
export const maxHeight: SimpleStyleFunction<'maxHeight'>;
|
||||
export const minHeight: SimpleStyleFunction<'minHeight'>;
|
||||
export const sizeWidth: SimpleStyleFunction<'sizeWidth'>;
|
||||
export const sizeHeight: SimpleStyleFunction<'sizeHeight'>;
|
||||
export const boxSizing: SimpleStyleFunction<'boxSizing'>;
|
||||
export const sizing: SimpleStyleFunction<
|
||||
| 'width'
|
||||
| 'maxWidth'
|
||||
| 'minWidth'
|
||||
| 'height'
|
||||
| 'maxHeight'
|
||||
| 'minHeight'
|
||||
| 'sizeWidth'
|
||||
| 'sizeHeight'
|
||||
| 'boxSizing'
|
||||
>;
|
||||
export type SizingProps = PropsFor<typeof sizing>;
|
||||
|
||||
// spacing.js
|
||||
export const spacing: SimpleStyleFunction<
|
||||
| 'm'
|
||||
| 'mt'
|
||||
| 'mr'
|
||||
| 'mb'
|
||||
| 'ml'
|
||||
| 'mx'
|
||||
| 'my'
|
||||
| 'p'
|
||||
| 'pt'
|
||||
| 'pr'
|
||||
| 'pb'
|
||||
| 'pl'
|
||||
| 'px'
|
||||
| 'py'
|
||||
| 'margin'
|
||||
| 'marginTop'
|
||||
| 'marginRight'
|
||||
| 'marginBottom'
|
||||
| 'marginLeft'
|
||||
| 'marginX'
|
||||
| 'marginY'
|
||||
| 'padding'
|
||||
| 'paddingTop'
|
||||
| 'paddingRight'
|
||||
| 'paddingBottom'
|
||||
| 'paddingLeft'
|
||||
| 'paddingX'
|
||||
| 'paddingY'
|
||||
>;
|
||||
export type SpacingProps = PropsFor<typeof spacing>;
|
||||
|
||||
// style.js
|
||||
export interface StyleOptions<PropKey, Theme extends object> {
|
||||
cssProperty?: PropKey | keyof CSS.Properties | false;
|
||||
prop: PropKey;
|
||||
/**
|
||||
* dot access in `Theme`
|
||||
*/
|
||||
themeKey?: string;
|
||||
transform?: (cssValue: unknown) => number | string | React.CSSProperties;
|
||||
}
|
||||
export function style<PropKey extends string, Theme extends object>(
|
||||
options: StyleOptions<PropKey, Theme>
|
||||
): StyleFunction<{ [K in PropKey]?: unknown } & { theme: Theme }>;
|
||||
|
||||
// typography.js
|
||||
export const fontFamily: SimpleStyleFunction<'fontFamily'>;
|
||||
export const fontSize: SimpleStyleFunction<'fontSize'>;
|
||||
export const fontStyle: SimpleStyleFunction<'fontStyle'>;
|
||||
export const fontWeight: SimpleStyleFunction<'fontWeight'>;
|
||||
export const letterSpacing: SimpleStyleFunction<'letterSpacing'>;
|
||||
export const lineHeight: SimpleStyleFunction<'lineHeight'>;
|
||||
export const textAlign: SimpleStyleFunction<'textAlign'>;
|
||||
export const typography: SimpleStyleFunction<
|
||||
| 'fontFamily'
|
||||
| 'fontSize'
|
||||
| 'fontStyle'
|
||||
| 'fontWeight'
|
||||
| 'letterSpacing'
|
||||
| 'lineHeight'
|
||||
| 'textAlign'
|
||||
>;
|
||||
export type TypographyProps = PropsFor<typeof typography>;
|
||||
|
||||
// utils
|
||||
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
||||
230
node_modules/@material-ui/system/index.js
generated
vendored
Normal file
230
node_modules/@material-ui/system/index.js
generated
vendored
Normal file
@@ -0,0 +1,230 @@
|
||||
/** @license Material-UI v4.9.14
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
borders: true,
|
||||
breakpoints: true,
|
||||
compose: true,
|
||||
css: true,
|
||||
display: true,
|
||||
flexbox: true,
|
||||
grid: true,
|
||||
palette: true,
|
||||
positions: true,
|
||||
shadows: true,
|
||||
sizing: true,
|
||||
spacing: true,
|
||||
style: true,
|
||||
typography: true
|
||||
};
|
||||
Object.defineProperty(exports, "borders", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _borders.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "breakpoints", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _breakpoints.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "compose", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _compose.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "css", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _css.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "display", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _display.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "flexbox", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _flexbox.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "grid", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _grid.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "palette", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _palette.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "positions", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _positions.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "shadows", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _shadows.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "sizing", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _sizing.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "spacing", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _spacing.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "style", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _style.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "typography", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _typography.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _borders = _interopRequireWildcard(require("./borders"));
|
||||
|
||||
Object.keys(_borders).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _borders[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _breakpoints = _interopRequireDefault(require("./breakpoints"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
var _css = _interopRequireDefault(require("./css"));
|
||||
|
||||
var _display = _interopRequireDefault(require("./display"));
|
||||
|
||||
var _flexbox = _interopRequireWildcard(require("./flexbox"));
|
||||
|
||||
Object.keys(_flexbox).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _flexbox[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _grid = _interopRequireWildcard(require("./grid"));
|
||||
|
||||
Object.keys(_grid).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _grid[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _palette = _interopRequireWildcard(require("./palette"));
|
||||
|
||||
Object.keys(_palette).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _palette[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _positions = _interopRequireWildcard(require("./positions"));
|
||||
|
||||
Object.keys(_positions).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _positions[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _shadows = _interopRequireDefault(require("./shadows"));
|
||||
|
||||
var _sizing = _interopRequireWildcard(require("./sizing"));
|
||||
|
||||
Object.keys(_sizing).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _sizing[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _spacing = _interopRequireWildcard(require("./spacing"));
|
||||
|
||||
Object.keys(_spacing).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _spacing[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _typography = _interopRequireWildcard(require("./typography"));
|
||||
|
||||
Object.keys(_typography).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _typography[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
17
node_modules/@material-ui/system/memoize.js
generated
vendored
Normal file
17
node_modules/@material-ui/system/memoize.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = memoize;
|
||||
|
||||
function memoize(fn) {
|
||||
var cache = {};
|
||||
return function (arg) {
|
||||
if (cache[arg] === undefined) {
|
||||
cache[arg] = fn(arg);
|
||||
}
|
||||
|
||||
return cache[arg];
|
||||
};
|
||||
}
|
||||
22
node_modules/@material-ui/system/merge.js
generated
vendored
Normal file
22
node_modules/@material-ui/system/merge.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _utils = require("@material-ui/utils");
|
||||
|
||||
function merge(acc, item) {
|
||||
if (!item) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
return (0, _utils.deepmerge)(acc, item, {
|
||||
clone: false // No need to clone deep, it's way faster.
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
var _default = merge;
|
||||
exports.default = _default;
|
||||
82
node_modules/@material-ui/system/package.json
generated
vendored
Normal file
82
node_modules/@material-ui/system/package.json
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"_from": "@material-ui/system@^4.9.14",
|
||||
"_id": "@material-ui/system@4.9.14",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-oQbaqfSnNlEkXEziDcJDDIy8pbvwUmZXWNqlmIwDqr/ZdCK8FuV3f4nxikUh7hvClKV2gnQ9djh5CZFTHkZj3w==",
|
||||
"_location": "/@material-ui/system",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@material-ui/system@^4.9.14",
|
||||
"name": "@material-ui/system",
|
||||
"escapedName": "@material-ui%2fsystem",
|
||||
"scope": "@material-ui",
|
||||
"rawSpec": "^4.9.14",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^4.9.14"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@material-ui/core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@material-ui/system/-/system-4.9.14.tgz",
|
||||
"_shasum": "4b00c48b569340cefb2036d0596b93ac6c587a5f",
|
||||
"_spec": "@material-ui/system@^4.9.14",
|
||||
"_where": "D:\\WORK\\Menui\\menui_backend\\node_modules\\@material-ui\\core",
|
||||
"author": {
|
||||
"name": "Material-UI Team"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mui-org/material-ui/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.4.4",
|
||||
"@material-ui/utils": "^4.9.6",
|
||||
"csstype": "^2.5.2",
|
||||
"prop-types": "^15.7.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Material-UI System - Design system for Material-UI.",
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/material-ui"
|
||||
},
|
||||
"homepage": "https://github.com/mui-org/material-ui/tree/master/packages/material-ui-system",
|
||||
"keywords": [
|
||||
"react",
|
||||
"react-component",
|
||||
"material design",
|
||||
"material-ui",
|
||||
"system"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./index.js",
|
||||
"module": "./esm/index.js",
|
||||
"name": "@material-ui/system",
|
||||
"peerDependencies": {
|
||||
"@types/react": "^16.8.6",
|
||||
"react": "^16.8.0",
|
||||
"react-dom": "^16.8.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mui-org/material-ui.git",
|
||||
"directory": "packages/material-ui-system"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"typings": "./index.d.ts",
|
||||
"version": "4.9.14"
|
||||
}
|
||||
27
node_modules/@material-ui/system/palette.js
generated
vendored
Normal file
27
node_modules/@material-ui/system/palette.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.bgcolor = exports.color = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
var color = (0, _style.default)({
|
||||
prop: 'color',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
exports.color = color;
|
||||
var bgcolor = (0, _style.default)({
|
||||
prop: 'bgcolor',
|
||||
cssProperty: 'backgroundColor',
|
||||
themeKey: 'palette'
|
||||
});
|
||||
exports.bgcolor = bgcolor;
|
||||
var palette = (0, _compose.default)(color, bgcolor);
|
||||
var _default = palette;
|
||||
exports.default = _default;
|
||||
42
node_modules/@material-ui/system/positions.js
generated
vendored
Normal file
42
node_modules/@material-ui/system/positions.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.left = exports.bottom = exports.right = exports.top = exports.zIndex = exports.position = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
var position = (0, _style.default)({
|
||||
prop: 'position'
|
||||
});
|
||||
exports.position = position;
|
||||
var zIndex = (0, _style.default)({
|
||||
prop: 'zIndex',
|
||||
themeKey: 'zIndex'
|
||||
});
|
||||
exports.zIndex = zIndex;
|
||||
var top = (0, _style.default)({
|
||||
prop: 'top'
|
||||
});
|
||||
exports.top = top;
|
||||
var right = (0, _style.default)({
|
||||
prop: 'right'
|
||||
});
|
||||
exports.right = right;
|
||||
var bottom = (0, _style.default)({
|
||||
prop: 'bottom'
|
||||
});
|
||||
exports.bottom = bottom;
|
||||
var left = (0, _style.default)({
|
||||
prop: 'left'
|
||||
});
|
||||
exports.left = left;
|
||||
|
||||
var _default = (0, _compose.default)(position, zIndex, top, right, bottom, left);
|
||||
|
||||
exports.default = _default;
|
||||
14
node_modules/@material-ui/system/responsivePropType.js
generated
vendored
Normal file
14
node_modules/@material-ui/system/responsivePropType.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
|
||||
var responsivePropType = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.object, _propTypes.default.array]) : {};
|
||||
var _default = responsivePropType;
|
||||
exports.default = _default;
|
||||
17
node_modules/@material-ui/system/shadows.js
generated
vendored
Normal file
17
node_modules/@material-ui/system/shadows.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var boxShadow = (0, _style.default)({
|
||||
prop: 'boxShadow',
|
||||
themeKey: 'shadows'
|
||||
});
|
||||
var _default = boxShadow;
|
||||
exports.default = _default;
|
||||
66
node_modules/@material-ui/system/sizing.js
generated
vendored
Normal file
66
node_modules/@material-ui/system/sizing.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.boxSizing = exports.sizeHeight = exports.sizeWidth = exports.minHeight = exports.maxHeight = exports.height = exports.minWidth = exports.maxWidth = exports.width = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
function transform(value) {
|
||||
return value <= 1 ? "".concat(value * 100, "%") : value;
|
||||
}
|
||||
|
||||
var width = (0, _style.default)({
|
||||
prop: 'width',
|
||||
transform: transform
|
||||
});
|
||||
exports.width = width;
|
||||
var maxWidth = (0, _style.default)({
|
||||
prop: 'maxWidth',
|
||||
transform: transform
|
||||
});
|
||||
exports.maxWidth = maxWidth;
|
||||
var minWidth = (0, _style.default)({
|
||||
prop: 'minWidth',
|
||||
transform: transform
|
||||
});
|
||||
exports.minWidth = minWidth;
|
||||
var height = (0, _style.default)({
|
||||
prop: 'height',
|
||||
transform: transform
|
||||
});
|
||||
exports.height = height;
|
||||
var maxHeight = (0, _style.default)({
|
||||
prop: 'maxHeight',
|
||||
transform: transform
|
||||
});
|
||||
exports.maxHeight = maxHeight;
|
||||
var minHeight = (0, _style.default)({
|
||||
prop: 'minHeight',
|
||||
transform: transform
|
||||
});
|
||||
exports.minHeight = minHeight;
|
||||
var sizeWidth = (0, _style.default)({
|
||||
prop: 'size',
|
||||
cssProperty: 'width',
|
||||
transform: transform
|
||||
});
|
||||
exports.sizeWidth = sizeWidth;
|
||||
var sizeHeight = (0, _style.default)({
|
||||
prop: 'size',
|
||||
cssProperty: 'height',
|
||||
transform: transform
|
||||
});
|
||||
exports.sizeHeight = sizeHeight;
|
||||
var boxSizing = (0, _style.default)({
|
||||
prop: 'boxSizing'
|
||||
});
|
||||
exports.boxSizing = boxSizing;
|
||||
var sizing = (0, _compose.default)(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);
|
||||
var _default = sizing;
|
||||
exports.default = _default;
|
||||
156
node_modules/@material-ui/system/spacing.js
generated
vendored
Normal file
156
node_modules/@material-ui/system/spacing.js
generated
vendored
Normal file
@@ -0,0 +1,156 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createUnarySpacing = createUnarySpacing;
|
||||
exports.default = void 0;
|
||||
|
||||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
||||
|
||||
var _responsivePropType = _interopRequireDefault(require("./responsivePropType"));
|
||||
|
||||
var _breakpoints = require("./breakpoints");
|
||||
|
||||
var _merge = _interopRequireDefault(require("./merge"));
|
||||
|
||||
var _memoize = _interopRequireDefault(require("./memoize"));
|
||||
|
||||
var properties = {
|
||||
m: 'margin',
|
||||
p: 'padding'
|
||||
};
|
||||
var directions = {
|
||||
t: 'Top',
|
||||
r: 'Right',
|
||||
b: 'Bottom',
|
||||
l: 'Left',
|
||||
x: ['Left', 'Right'],
|
||||
y: ['Top', 'Bottom']
|
||||
};
|
||||
var aliases = {
|
||||
marginX: 'mx',
|
||||
marginY: 'my',
|
||||
paddingX: 'px',
|
||||
paddingY: 'py'
|
||||
}; // memoize() impact:
|
||||
// From 300,000 ops/sec
|
||||
// To 350,000 ops/sec
|
||||
|
||||
var getCssProperties = (0, _memoize.default)(function (prop) {
|
||||
// It's not a shorthand notation.
|
||||
if (prop.length > 2) {
|
||||
if (aliases[prop]) {
|
||||
prop = aliases[prop];
|
||||
} else {
|
||||
return [prop];
|
||||
}
|
||||
}
|
||||
|
||||
var _prop$split = prop.split(''),
|
||||
_prop$split2 = (0, _slicedToArray2.default)(_prop$split, 2),
|
||||
a = _prop$split2[0],
|
||||
b = _prop$split2[1];
|
||||
|
||||
var property = properties[a];
|
||||
var direction = directions[b] || '';
|
||||
return Array.isArray(direction) ? direction.map(function (dir) {
|
||||
return property + dir;
|
||||
}) : [property + direction];
|
||||
});
|
||||
var spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];
|
||||
|
||||
function createUnarySpacing(theme) {
|
||||
var themeSpacing = theme.spacing || 8;
|
||||
|
||||
if (typeof themeSpacing === 'number') {
|
||||
return function (abs) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (typeof abs !== 'number') {
|
||||
console.error("Material-UI: Expected spacing argument to be a number, got ".concat(abs, "."));
|
||||
}
|
||||
}
|
||||
|
||||
return themeSpacing * abs;
|
||||
};
|
||||
}
|
||||
|
||||
if (Array.isArray(themeSpacing)) {
|
||||
return function (abs) {
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (abs > themeSpacing.length - 1) {
|
||||
console.error(["Material-UI: The value provided (".concat(abs, ") overflows."), "The supported values are: ".concat(JSON.stringify(themeSpacing), "."), "".concat(abs, " > ").concat(themeSpacing.length - 1, ", you need to add the missing values.")].join('\n'));
|
||||
}
|
||||
}
|
||||
|
||||
return themeSpacing[abs];
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof themeSpacing === 'function') {
|
||||
return themeSpacing;
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.error(["Material-UI: The `theme.spacing` value (".concat(themeSpacing, ") is invalid."), 'It should be a number, an array or a function.'].join('\n'));
|
||||
}
|
||||
|
||||
return function () {
|
||||
return undefined;
|
||||
};
|
||||
}
|
||||
|
||||
function getValue(transformer, propValue) {
|
||||
if (typeof propValue === 'string') {
|
||||
return propValue;
|
||||
}
|
||||
|
||||
var abs = Math.abs(propValue);
|
||||
var transformed = transformer(abs);
|
||||
|
||||
if (propValue >= 0) {
|
||||
return transformed;
|
||||
}
|
||||
|
||||
if (typeof transformed === 'number') {
|
||||
return -transformed;
|
||||
}
|
||||
|
||||
return "-".concat(transformed);
|
||||
}
|
||||
|
||||
function getStyleFromPropValue(cssProperties, transformer) {
|
||||
return function (propValue) {
|
||||
return cssProperties.reduce(function (acc, cssProperty) {
|
||||
acc[cssProperty] = getValue(transformer, propValue);
|
||||
return acc;
|
||||
}, {});
|
||||
};
|
||||
}
|
||||
|
||||
function spacing(props) {
|
||||
var theme = props.theme;
|
||||
var transformer = createUnarySpacing(theme);
|
||||
return Object.keys(props).map(function (prop) {
|
||||
// Using a hash computation over an array iteration could be faster, but with only 28 items,
|
||||
// it's doesn't worth the bundle size.
|
||||
if (spacingKeys.indexOf(prop) === -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var cssProperties = getCssProperties(prop);
|
||||
var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
|
||||
var propValue = props[prop];
|
||||
return (0, _breakpoints.handleBreakpoints)(props, propValue, styleFromPropValue);
|
||||
}).reduce(_merge.default, {});
|
||||
}
|
||||
|
||||
spacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce(function (obj, key) {
|
||||
obj[key] = _responsivePropType.default;
|
||||
return obj;
|
||||
}, {}) : {};
|
||||
spacing.filterProps = spacingKeys;
|
||||
var _default = spacing;
|
||||
exports.default = _default;
|
||||
73
node_modules/@material-ui/system/style.js
generated
vendored
Normal file
73
node_modules/@material-ui/system/style.js
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
||||
|
||||
var _responsivePropType = _interopRequireDefault(require("./responsivePropType"));
|
||||
|
||||
var _breakpoints = require("./breakpoints");
|
||||
|
||||
function getPath(obj, path) {
|
||||
if (!path || typeof path !== 'string') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return path.split('.').reduce(function (acc, item) {
|
||||
return acc && acc[item] ? acc[item] : null;
|
||||
}, obj);
|
||||
}
|
||||
|
||||
function style(options) {
|
||||
var prop = options.prop,
|
||||
_options$cssProperty = options.cssProperty,
|
||||
cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty,
|
||||
themeKey = options.themeKey,
|
||||
transform = options.transform;
|
||||
|
||||
var fn = function fn(props) {
|
||||
if (props[prop] == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var propValue = props[prop];
|
||||
var theme = props.theme;
|
||||
var themeMapping = getPath(theme, themeKey) || {};
|
||||
|
||||
var styleFromPropValue = function styleFromPropValue(propValueFinal) {
|
||||
var value;
|
||||
|
||||
if (typeof themeMapping === 'function') {
|
||||
value = themeMapping(propValueFinal);
|
||||
} else if (Array.isArray(themeMapping)) {
|
||||
value = themeMapping[propValueFinal] || propValueFinal;
|
||||
} else {
|
||||
value = getPath(themeMapping, propValueFinal) || propValueFinal;
|
||||
|
||||
if (transform) {
|
||||
value = transform(value);
|
||||
}
|
||||
}
|
||||
|
||||
if (cssProperty === false) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return (0, _defineProperty2.default)({}, cssProperty, value);
|
||||
};
|
||||
|
||||
return (0, _breakpoints.handleBreakpoints)(props, propValue, styleFromPropValue);
|
||||
};
|
||||
|
||||
fn.propTypes = process.env.NODE_ENV !== 'production' ? (0, _defineProperty2.default)({}, prop, _responsivePropType.default) : {};
|
||||
fn.filterProps = [prop];
|
||||
return fn;
|
||||
}
|
||||
|
||||
var _default = style;
|
||||
exports.default = _default;
|
||||
48
node_modules/@material-ui/system/typography.js
generated
vendored
Normal file
48
node_modules/@material-ui/system/typography.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.textAlign = exports.lineHeight = exports.letterSpacing = exports.fontWeight = exports.fontStyle = exports.fontSize = exports.fontFamily = void 0;
|
||||
|
||||
var _style = _interopRequireDefault(require("./style"));
|
||||
|
||||
var _compose = _interopRequireDefault(require("./compose"));
|
||||
|
||||
var fontFamily = (0, _style.default)({
|
||||
prop: 'fontFamily',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
exports.fontFamily = fontFamily;
|
||||
var fontSize = (0, _style.default)({
|
||||
prop: 'fontSize',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
exports.fontSize = fontSize;
|
||||
var fontStyle = (0, _style.default)({
|
||||
prop: 'fontStyle',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
exports.fontStyle = fontStyle;
|
||||
var fontWeight = (0, _style.default)({
|
||||
prop: 'fontWeight',
|
||||
themeKey: 'typography'
|
||||
});
|
||||
exports.fontWeight = fontWeight;
|
||||
var letterSpacing = (0, _style.default)({
|
||||
prop: 'letterSpacing'
|
||||
});
|
||||
exports.letterSpacing = letterSpacing;
|
||||
var lineHeight = (0, _style.default)({
|
||||
prop: 'lineHeight'
|
||||
});
|
||||
exports.lineHeight = lineHeight;
|
||||
var textAlign = (0, _style.default)({
|
||||
prop: 'textAlign'
|
||||
});
|
||||
exports.textAlign = textAlign;
|
||||
var typography = (0, _compose.default)(fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);
|
||||
var _default = typography;
|
||||
exports.default = _default;
|
||||
Reference in New Issue
Block a user