0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

View file

@ -0,0 +1,25 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = MuiThemeProvider;
var React = _interopRequireWildcard(require("react"));
var _styles = require("@material-ui/styles");
/**
* @ignore - internal component.
*
* TODO v5: remove
*/
function MuiThemeProvider(props) {
if (process.env.NODE_ENV !== 'production') {
console.error(['Material-UI: You have imported a private module.', '', "Please replace the '@material-ui/core/styles/MuiThemeProvider' import with:", "`import { ThemeProvider as MuiThemeProvider } from '@material-ui/core/styles';`", '', 'See https://github.com/mui-org/material-ui/issues/17900 for more detail.'].join('\n'));
}
return /*#__PURE__*/React.createElement(_styles.ThemeProvider, props);
}

View file

@ -0,0 +1,22 @@
export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla';
export interface ColorObject {
type: ColorFormat;
values: [number, number, number] | [number, number, number, number];
}
export function hexToRgb(hex: string): string;
export function rgbToHex(color: string): string;
export function hslToRgb(color: string): string;
export function decomposeColor(color: string): ColorObject;
export function recomposeColor(color: ColorObject): string;
export function getContrastRatio(foreground: string, background: string): number;
export function getLuminance(color: string): number;
export function emphasize(color: string, coefficient?: number): string;
/**
* @deprecated
* Use `import { alpha } from '@material-ui/core/styles'` instead.
*/
export function fade(color: string, value: number): string;
export function alpha(color: string, value: number): string;
export function darken(color: string, coefficient: number): string;
export function lighten(color: string, coefficient: number): string;

View file

@ -0,0 +1,331 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.hexToRgb = hexToRgb;
exports.rgbToHex = rgbToHex;
exports.hslToRgb = hslToRgb;
exports.decomposeColor = decomposeColor;
exports.recomposeColor = recomposeColor;
exports.getContrastRatio = getContrastRatio;
exports.getLuminance = getLuminance;
exports.emphasize = emphasize;
exports.fade = fade;
exports.alpha = alpha;
exports.darken = darken;
exports.lighten = lighten;
var _utils = require("@material-ui/utils");
/* eslint-disable no-use-before-define */
/**
* Returns a number whose value is limited to the given range.
*
* @param {number} value The value to be clamped
* @param {number} min The lower boundary of the output range
* @param {number} max The upper boundary of the output range
* @returns {number} A number in the range [min, max]
*/
function clamp(value) {
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
if (process.env.NODE_ENV !== 'production') {
if (value < min || value > max) {
console.error("Material-UI: The value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "]."));
}
}
return Math.min(Math.max(min, value), max);
}
/**
* Converts a color from CSS hex format to CSS rgb format.
*
* @param {string} color - Hex color, i.e. #nnn or #nnnnnn
* @returns {string} A CSS rgb color string
*/
function hexToRgb(color) {
color = color.substr(1);
var re = new RegExp(".{1,".concat(color.length >= 6 ? 2 : 1, "}"), 'g');
var colors = color.match(re);
if (colors && colors[0].length === 1) {
colors = colors.map(function (n) {
return n + n;
});
}
return colors ? "rgb".concat(colors.length === 4 ? 'a' : '', "(").concat(colors.map(function (n, index) {
return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;
}).join(', '), ")") : '';
}
function intToHex(int) {
var hex = int.toString(16);
return hex.length === 1 ? "0".concat(hex) : hex;
}
/**
* Converts a color from CSS rgb format to CSS hex format.
*
* @param {string} color - RGB color, i.e. rgb(n, n, n)
* @returns {string} A CSS rgb color string, i.e. #nnnnnn
*/
function rgbToHex(color) {
// Idempotent
if (color.indexOf('#') === 0) {
return color;
}
var _decomposeColor = decomposeColor(color),
values = _decomposeColor.values;
return "#".concat(values.map(function (n) {
return intToHex(n);
}).join(''));
}
/**
* Converts a color from hsl format to rgb format.
*
* @param {string} color - HSL color values
* @returns {string} rgb color values
*/
function hslToRgb(color) {
color = decomposeColor(color);
var _color = color,
values = _color.values;
var h = values[0];
var s = values[1] / 100;
var l = values[2] / 100;
var a = s * Math.min(l, 1 - l);
var f = function f(n) {
var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;
return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
};
var type = 'rgb';
var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];
if (color.type === 'hsla') {
type += 'a';
rgb.push(values[3]);
}
return recomposeColor({
type: type,
values: rgb
});
}
/**
* Returns an object with the type and values of a color.
*
* Note: Does not support rgb % values.
*
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @returns {object} - A MUI color object: {type: string, values: number[]}
*/
function decomposeColor(color) {
// Idempotent
if (color.type) {
return color;
}
if (color.charAt(0) === '#') {
return decomposeColor(hexToRgb(color));
}
var marker = color.indexOf('(');
var type = color.substring(0, marker);
if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {
throw new Error(process.env.NODE_ENV !== "production" ? "Material-UI: Unsupported `".concat(color, "` color.\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().") : (0, _utils.formatMuiErrorMessage)(3, color));
}
var values = color.substring(marker + 1, color.length - 1).split(',');
values = values.map(function (value) {
return parseFloat(value);
});
return {
type: type,
values: values
};
}
/**
* Converts a color object with type and values to a string.
*
* @param {object} color - Decomposed color
* @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'
* @param {array} color.values - [n,n,n] or [n,n,n,n]
* @returns {string} A CSS color string
*/
function recomposeColor(color) {
var type = color.type;
var values = color.values;
if (type.indexOf('rgb') !== -1) {
// Only convert the first 3 values to int (i.e. not alpha)
values = values.map(function (n, i) {
return i < 3 ? parseInt(n, 10) : n;
});
} else if (type.indexOf('hsl') !== -1) {
values[1] = "".concat(values[1], "%");
values[2] = "".concat(values[2], "%");
}
return "".concat(type, "(").concat(values.join(', '), ")");
}
/**
* Calculates the contrast ratio between two colors.
*
* Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
*
* @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @returns {number} A contrast ratio value in the range 0 - 21.
*/
function getContrastRatio(foreground, background) {
var lumA = getLuminance(foreground);
var lumB = getLuminance(background);
return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
}
/**
* The relative brightness of any point in a color space,
* normalized to 0 for darkest black and 1 for lightest white.
*
* Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
*
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @returns {number} The relative brightness of the color in the range 0 - 1
*/
function getLuminance(color) {
color = decomposeColor(color);
var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;
rgb = rgb.map(function (val) {
val /= 255; // normalized
return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
}); // Truncate at 3 digits
return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));
}
/**
* Darken or lighten a color, depending on its luminance.
* Light colors are darkened, dark colors are lightened.
*
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @param {number} coefficient=0.15 - multiplier in the range 0 - 1
* @returns {string} A CSS color string. Hex input values are returned as rgb
*/
function emphasize(color) {
var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;
return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);
}
var warnedOnce = false;
/**
* Set the absolute transparency of a color.
* Any existing alpha values are overwritten.
*
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @param {number} value - value to set the alpha channel to in the range 0 -1
* @returns {string} A CSS color string. Hex input values are returned as rgb
*
* @deprecated
* Use `import { alpha } from '@material-ui/core/styles'` instead.
*/
function fade(color, value) {
if (process.env.NODE_ENV !== 'production') {
if (!warnedOnce) {
warnedOnce = true;
console.error(['Material-UI: The `fade` color utility was renamed to `alpha` to better describe its functionality.', '', "You should use `import { alpha } from '@material-ui/core/styles'`"].join('\n'));
}
}
return alpha(color, value);
}
/**
* Set the absolute transparency of a color.
* Any existing alpha value is overwritten.
*
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @param {number} value - value to set the alpha channel to in the range 0-1
* @returns {string} A CSS color string. Hex input values are returned as rgb
*/
function alpha(color, value) {
color = decomposeColor(color);
value = clamp(value);
if (color.type === 'rgb' || color.type === 'hsl') {
color.type += 'a';
}
color.values[3] = value;
return recomposeColor(color);
}
/**
* Darkens a color.
*
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @param {number} coefficient - multiplier in the range 0 - 1
* @returns {string} A CSS color string. Hex input values are returned as rgb
*/
function darken(color, coefficient) {
color = decomposeColor(color);
coefficient = clamp(coefficient);
if (color.type.indexOf('hsl') !== -1) {
color.values[2] *= 1 - coefficient;
} else if (color.type.indexOf('rgb') !== -1) {
for (var i = 0; i < 3; i += 1) {
color.values[i] *= 1 - coefficient;
}
}
return recomposeColor(color);
}
/**
* Lightens a color.
*
* @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()
* @param {number} coefficient - multiplier in the range 0 - 1
* @returns {string} A CSS color string. Hex input values are returned as rgb
*/
function lighten(color, coefficient) {
color = decomposeColor(color);
coefficient = clamp(coefficient);
if (color.type.indexOf('hsl') !== -1) {
color.values[2] += (100 - color.values[2]) * coefficient;
} else if (color.type.indexOf('rgb') !== -1) {
for (var i = 0; i < 3; i += 1) {
color.values[i] += (255 - color.values[i]) * coefficient;
}
}
return recomposeColor(color);
}

View file

@ -0,0 +1,31 @@
import { OverridableStringUnion } from '@material-ui/types';
export type BreakpointDefaults = Record<'xs' | 'sm' | 'md' | 'lg' | 'xl', true>;
export interface BreakpointOverrides {}
export type Breakpoint = OverridableStringUnion<BreakpointDefaults, BreakpointOverrides>;
export type BreakpointValues = { [key in Breakpoint]: number };
export const keys: Breakpoint[];
export interface Breakpoints {
keys: Breakpoint[];
values: BreakpointValues;
up: (key: Breakpoint | number) => string;
down: (key: Breakpoint | number) => string;
between: (start: Breakpoint | number, end: Breakpoint | number) => string;
only: (key: Breakpoint) => string;
/**
* @deprecated
* Use the `values` prop instead
*/
width: (key: Breakpoint) => number;
}
export type BreakpointsOptions = Partial<
{
unit: string;
step: number;
} & Breakpoints
>;
export default function createBreakpoints(options: BreakpointsOptions): Breakpoints;

View file

@ -0,0 +1,90 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createBreakpoints;
exports.keys = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
// Sorted ASC by size. That's important.
// It can't be configured as it's used statically for propTypes.
var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.
exports.keys = keys;
function createBreakpoints(breakpoints) {
var _breakpoints$values = breakpoints.values,
values = _breakpoints$values === void 0 ? {
xs: 0,
sm: 600,
md: 960,
lg: 1280,
xl: 1920
} : _breakpoints$values,
_breakpoints$unit = breakpoints.unit,
unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,
_breakpoints$step = breakpoints.step,
step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,
other = (0, _objectWithoutProperties2.default)(breakpoints, ["values", "unit", "step"]);
function up(key) {
var value = typeof values[key] === 'number' ? values[key] : key;
return "@media (min-width:".concat(value).concat(unit, ")");
}
function down(key) {
var endIndex = keys.indexOf(key) + 1;
var upperbound = values[keys[endIndex]];
if (endIndex === keys.length) {
// xl down applies to all sizes
return up('xs');
}
var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;
return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
}
function between(start, end) {
var endIndex = keys.indexOf(end);
if (endIndex === keys.length - 1) {
return up(start);
}
return "@media (min-width:".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, ")");
}
function only(key) {
return between(key, key);
}
var warnedOnce = false;
function width(key) {
if (process.env.NODE_ENV !== 'production') {
if (!warnedOnce) {
warnedOnce = true;
console.warn(["Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.", 'Use the `theme.breakpoints.values` instead.'].join('\n'));
}
}
return values[key];
}
return (0, _extends2.default)({
keys: keys,
values: values,
up: up,
down: down,
between: between,
only: only,
width: width
}, other);
}

View file

@ -0,0 +1,19 @@
import { Breakpoints } from './createBreakpoints';
import { Spacing } from './createSpacing';
import { CSSProperties } from './withStyles';
export interface Mixins {
gutters: (styles?: CSSProperties) => CSSProperties;
toolbar: CSSProperties;
// ... use interface declaration merging to add custom mixins
}
export interface MixinsOptions extends Partial<Mixins> {
// ... use interface declaration merging to add custom mixin options
}
export default function createMixins(
breakpoints: Breakpoints,
spacing: Spacing,
mixins: MixinsOptions
): Mixins;

View file

@ -0,0 +1,37 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createMixins;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
function createMixins(breakpoints, spacing, mixins) {
var _toolbar;
return (0, _extends3.default)({
gutters: function gutters() {
var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', "\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join('\n'));
return (0, _extends3.default)({
paddingLeft: spacing(2),
paddingRight: spacing(2)
}, styles, (0, _defineProperty2.default)({}, breakpoints.up('sm'), (0, _extends3.default)({
paddingLeft: spacing(3),
paddingRight: spacing(3)
}, styles[breakpoints.up('sm')])));
},
toolbar: (_toolbar = {
minHeight: 56
}, (0, _defineProperty2.default)(_toolbar, "".concat(breakpoints.up('xs'), " and (orientation: landscape)"), {
minHeight: 48
}), (0, _defineProperty2.default)(_toolbar, breakpoints.up('sm'), {
minHeight: 64
}), _toolbar)
}, mixins);
}

View file

@ -0,0 +1,22 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createMuiStrictModeTheme;
var _utils = require("@material-ui/utils");
var _createTheme = _interopRequireDefault(require("./createTheme"));
function createMuiStrictModeTheme(options) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return _createTheme.default.apply(void 0, [(0, _utils.deepmerge)({
unstable_strictMode: true
}, options)].concat(args));
}

View file

@ -0,0 +1,123 @@
import { Color, PaletteType } from '..';
export {};
// use standalone interface over typeof colors/commons
// to enable module augmentation
export interface CommonColors {
black: string;
white: string;
}
export type ColorPartial = Partial<Color>;
export interface TypeText {
primary: string;
secondary: string;
disabled: string;
hint: string;
}
export interface TypeAction {
active: string;
hover: string;
hoverOpacity: number;
selected: string;
selectedOpacity: number;
disabled: string;
disabledOpacity: number;
disabledBackground: string;
focus: string;
focusOpacity: number;
activatedOpacity: number;
}
export interface TypeBackground {
default: string;
paper: string;
}
export type TypeDivider = string;
export type PaletteColorOptions = SimplePaletteColorOptions | ColorPartial;
export interface SimplePaletteColorOptions {
light?: string;
main: string;
dark?: string;
contrastText?: string;
}
export interface PaletteColor {
light: string;
main: string;
dark: string;
contrastText: string;
}
export interface TypeObject {
text: TypeText;
action: TypeAction;
divider: TypeDivider;
background: TypeBackground;
}
export type PaletteTonalOffset =
| number
| {
light: number;
dark: number;
};
export const light: TypeObject;
export const dark: TypeObject;
export interface Palette {
common: CommonColors;
type: PaletteType;
contrastThreshold: number;
tonalOffset: PaletteTonalOffset;
primary: PaletteColor;
secondary: PaletteColor;
error: PaletteColor;
warning: PaletteColor;
info: PaletteColor;
success: PaletteColor;
grey: Color;
text: TypeText;
divider: TypeDivider;
action: TypeAction;
background: TypeBackground;
getContrastText: (background: string) => string;
augmentColor: {
(
color: ColorPartial,
mainShade?: number | string,
lightShade?: number | string,
darkShade?: number | string
): PaletteColor;
(color: PaletteColorOptions): PaletteColor;
};
}
export type PartialTypeObject = { [P in keyof TypeObject]?: Partial<TypeObject[P]> };
export interface PaletteOptions {
primary?: PaletteColorOptions;
secondary?: PaletteColorOptions;
error?: PaletteColorOptions;
warning?: PaletteColorOptions;
info?: PaletteColorOptions;
success?: PaletteColorOptions;
type?: PaletteType;
tonalOffset?: PaletteTonalOffset;
contrastThreshold?: number;
common?: Partial<CommonColors>;
grey?: ColorPartial;
text?: Partial<TypeText>;
divider?: string;
action?: Partial<TypeAction>;
background?: Partial<TypeBackground>;
getContrastText?: (background: string) => string;
}
export default function createPalette(palette: PaletteOptions): Palette;

View file

@ -0,0 +1,252 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createPalette;
exports.dark = exports.light = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _utils = require("@material-ui/utils");
var _common = _interopRequireDefault(require("../colors/common"));
var _grey = _interopRequireDefault(require("../colors/grey"));
var _indigo = _interopRequireDefault(require("../colors/indigo"));
var _pink = _interopRequireDefault(require("../colors/pink"));
var _red = _interopRequireDefault(require("../colors/red"));
var _orange = _interopRequireDefault(require("../colors/orange"));
var _blue = _interopRequireDefault(require("../colors/blue"));
var _green = _interopRequireDefault(require("../colors/green"));
var _colorManipulator = require("./colorManipulator");
var light = {
// The colors used to style the text.
text: {
// The most important text.
primary: 'rgba(0, 0, 0, 0.87)',
// Secondary text.
secondary: 'rgba(0, 0, 0, 0.54)',
// Disabled text have even lower visual prominence.
disabled: 'rgba(0, 0, 0, 0.38)',
// Text hints.
hint: 'rgba(0, 0, 0, 0.38)'
},
// The color used to divide different elements.
divider: 'rgba(0, 0, 0, 0.12)',
// The background colors used to style the surfaces.
// Consistency between these values is important.
background: {
paper: _common.default.white,
default: _grey.default[50]
},
// The colors used to style the action elements.
action: {
// The color of an active action like an icon button.
active: 'rgba(0, 0, 0, 0.54)',
// The color of an hovered action.
hover: 'rgba(0, 0, 0, 0.04)',
hoverOpacity: 0.04,
// The color of a selected action.
selected: 'rgba(0, 0, 0, 0.08)',
selectedOpacity: 0.08,
// The color of a disabled action.
disabled: 'rgba(0, 0, 0, 0.26)',
// The background color of a disabled action.
disabledBackground: 'rgba(0, 0, 0, 0.12)',
disabledOpacity: 0.38,
focus: 'rgba(0, 0, 0, 0.12)',
focusOpacity: 0.12,
activatedOpacity: 0.12
}
};
exports.light = light;
var dark = {
text: {
primary: _common.default.white,
secondary: 'rgba(255, 255, 255, 0.7)',
disabled: 'rgba(255, 255, 255, 0.5)',
hint: 'rgba(255, 255, 255, 0.5)',
icon: 'rgba(255, 255, 255, 0.5)'
},
divider: 'rgba(255, 255, 255, 0.12)',
background: {
paper: _grey.default[800],
default: '#303030'
},
action: {
active: _common.default.white,
hover: 'rgba(255, 255, 255, 0.08)',
hoverOpacity: 0.08,
selected: 'rgba(255, 255, 255, 0.16)',
selectedOpacity: 0.16,
disabled: 'rgba(255, 255, 255, 0.3)',
disabledBackground: 'rgba(255, 255, 255, 0.12)',
disabledOpacity: 0.38,
focus: 'rgba(255, 255, 255, 0.12)',
focusOpacity: 0.12,
activatedOpacity: 0.24
}
};
exports.dark = dark;
function addLightOrDark(intent, direction, shade, tonalOffset) {
var tonalOffsetLight = tonalOffset.light || tonalOffset;
var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;
if (!intent[direction]) {
if (intent.hasOwnProperty(shade)) {
intent[direction] = intent[shade];
} else if (direction === 'light') {
intent.light = (0, _colorManipulator.lighten)(intent.main, tonalOffsetLight);
} else if (direction === 'dark') {
intent.dark = (0, _colorManipulator.darken)(intent.main, tonalOffsetDark);
}
}
}
function createPalette(palette) {
var _palette$primary = palette.primary,
primary = _palette$primary === void 0 ? {
light: _indigo.default[300],
main: _indigo.default[500],
dark: _indigo.default[700]
} : _palette$primary,
_palette$secondary = palette.secondary,
secondary = _palette$secondary === void 0 ? {
light: _pink.default.A200,
main: _pink.default.A400,
dark: _pink.default.A700
} : _palette$secondary,
_palette$error = palette.error,
error = _palette$error === void 0 ? {
light: _red.default[300],
main: _red.default[500],
dark: _red.default[700]
} : _palette$error,
_palette$warning = palette.warning,
warning = _palette$warning === void 0 ? {
light: _orange.default[300],
main: _orange.default[500],
dark: _orange.default[700]
} : _palette$warning,
_palette$info = palette.info,
info = _palette$info === void 0 ? {
light: _blue.default[300],
main: _blue.default[500],
dark: _blue.default[700]
} : _palette$info,
_palette$success = palette.success,
success = _palette$success === void 0 ? {
light: _green.default[300],
main: _green.default[500],
dark: _green.default[700]
} : _palette$success,
_palette$type = palette.type,
type = _palette$type === void 0 ? 'light' : _palette$type,
_palette$contrastThre = palette.contrastThreshold,
contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,
_palette$tonalOffset = palette.tonalOffset,
tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,
other = (0, _objectWithoutProperties2.default)(palette, ["primary", "secondary", "error", "warning", "info", "success", "type", "contrastThreshold", "tonalOffset"]); // Use the same logic as
// Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59
// and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54
function getContrastText(background) {
var contrastText = (0, _colorManipulator.getContrastRatio)(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;
if (process.env.NODE_ENV !== 'production') {
var contrast = (0, _colorManipulator.getContrastRatio)(background, contrastText);
if (contrast < 3) {
console.error(["Material-UI: The contrast ratio of ".concat(contrast, ":1 for ").concat(contrastText, " on ").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\n'));
}
}
return contrastText;
}
var augmentColor = function augmentColor(color) {
var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;
color = (0, _extends2.default)({}, color);
if (!color.main && color[mainShade]) {
color.main = color[mainShade];
}
if (!color.main) {
throw new Error(process.env.NODE_ENV !== "production" ? "Material-UI: The color provided to augmentColor(color) is invalid.\nThe color object needs to have a `main` property or a `".concat(mainShade, "` property.") : (0, _utils.formatMuiErrorMessage)(4, mainShade));
}
if (typeof color.main !== 'string') {
throw new Error(process.env.NODE_ENV !== "production" ? "Material-UI: The color provided to augmentColor(color) is invalid.\n`color.main` should be a string, but `".concat(JSON.stringify(color.main), "` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport {\xA0green } from \"@material-ui/core/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));
}
addLightOrDark(color, 'light', lightShade, tonalOffset);
addLightOrDark(color, 'dark', darkShade, tonalOffset);
if (!color.contrastText) {
color.contrastText = getContrastText(color.main);
}
return color;
};
var types = {
dark: dark,
light: light
};
if (process.env.NODE_ENV !== 'production') {
if (!types[type]) {
console.error("Material-UI: The palette type `".concat(type, "` is not supported."));
}
}
var paletteOutput = (0, _utils.deepmerge)((0, _extends2.default)({
// A collection of common colors.
common: _common.default,
// The palette type, can be light or dark.
type: type,
// The colors used to represent primary interface elements for a user.
primary: augmentColor(primary),
// The colors used to represent secondary interface elements for a user.
secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),
// The colors used to represent interface elements that the user should be made aware of.
error: augmentColor(error),
// The colors used to represent potentially dangerous actions or important messages.
warning: augmentColor(warning),
// The colors used to present information to the user that is neutral and not necessarily important.
info: augmentColor(info),
// The colors used to indicate the successful completion of an action that user triggered.
success: augmentColor(success),
// The grey colors.
grey: _grey.default,
// Used by `getContrastText()` to maximize the contrast between
// the background and the text.
contrastThreshold: contrastThreshold,
// Takes a background color and returns the text color that maximizes the contrast.
getContrastText: getContrastText,
// Generate a rich color object.
augmentColor: augmentColor,
// Used by the functions below to shift a color's luminance by approximately
// two indexes within its tonal palette.
// E.g., shift from Red 500 to Red 300 or Red 700.
tonalOffset: tonalOffset
}, types[type]), other);
return paletteOutput;
}

View file

@ -0,0 +1,20 @@
/* tslint:disable:unified-signatures */
export type SpacingArgument = number | string;
export interface Spacing {
(): number;
(value: number): number;
(topBottom: SpacingArgument, rightLeft: SpacingArgument): string;
(top: SpacingArgument, rightLeft: SpacingArgument, bottom: SpacingArgument): string;
(
top: SpacingArgument,
right: SpacingArgument,
bottom: SpacingArgument,
left: SpacingArgument
): string;
}
export type SpacingOptions = number | ((factor: number) => string | number) | number[];
export default function createSpacing(spacing: SpacingOptions): Spacing;

View file

@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createSpacing;
var _system = require("@material-ui/system");
var warnOnce;
function createSpacing() {
var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;
// Already transformed.
if (spacingInput.mui) {
return spacingInput;
} // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.
// Smaller components, such as icons and type, can align to a 4dp grid.
// https://material.io/design/layout/understanding-layout.html#usage
var transform = (0, _system.createUnarySpacing)({
spacing: spacingInput
});
var spacing = function spacing() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (process.env.NODE_ENV !== 'production') {
if (!(args.length <= 4)) {
console.error("Material-UI: Too many arguments provided, expected between 0 and 4, got ".concat(args.length));
}
}
if (args.length === 0) {
return transform(1);
}
if (args.length === 1) {
return transform(args[0]);
}
return args.map(function (argument) {
if (typeof argument === 'string') {
return argument;
}
var output = transform(argument);
return typeof output === 'number' ? "".concat(output, "px") : output;
}).join(' ');
}; // Backward compatibility, to remove in v5.
Object.defineProperty(spacing, 'unit', {
get: function get() {
if (process.env.NODE_ENV !== 'production') {
if (!warnOnce || process.env.NODE_ENV === 'test') {
console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\n'));
}
warnOnce = true;
}
return spacingInput;
}
});
spacing.mui = true;
return spacing;
}

View file

@ -0,0 +1,3 @@
import createStyles from '@material-ui/styles/createStyles';
export default createStyles;

View file

@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createStyles;
var _styles = require("@material-ui/styles");
// let warnOnce = false;
// To remove in v5
function createStyles(styles) {
// warning(
// warnOnce,
// [
// 'Material-UI: createStyles from @material-ui/core/styles is deprecated.',
// 'Please use @material-ui/styles/createStyles',
// ].join('\n'),
// );
// warnOnce = true;
return (0, _styles.createStyles)(styles);
}

View file

@ -0,0 +1,53 @@
import { Breakpoints, BreakpointsOptions } from './createBreakpoints';
import { Mixins, MixinsOptions } from './createMixins';
import { Palette, PaletteOptions } from './createPalette';
import { Typography, TypographyOptions } from './createTypography';
import { Shadows } from './shadows';
import { Shape, ShapeOptions } from './shape';
import { Spacing, SpacingOptions } from './createSpacing';
import { Transitions, TransitionsOptions } from './transitions';
import { ZIndex, ZIndexOptions } from './zIndex';
import { Overrides } from './overrides';
import { ComponentsProps } from './props';
export type Direction = 'ltr' | 'rtl';
export interface ThemeOptions {
shape?: ShapeOptions;
breakpoints?: BreakpointsOptions;
direction?: Direction;
mixins?: MixinsOptions;
overrides?: Overrides;
palette?: PaletteOptions;
props?: ComponentsProps;
shadows?: Shadows;
spacing?: SpacingOptions;
transitions?: TransitionsOptions;
typography?: TypographyOptions | ((palette: Palette) => TypographyOptions);
zIndex?: ZIndexOptions;
unstable_strictMode?: boolean;
}
export interface Theme {
shape: Shape;
breakpoints: Breakpoints;
direction: Direction;
mixins: Mixins;
overrides?: Overrides;
palette: Palette;
props?: ComponentsProps;
shadows: Shadows;
spacing: Spacing;
transitions: Transitions;
typography: Typography;
zIndex: ZIndex;
unstable_strictMode?: boolean;
}
/**
* @deprecated
* Use `import { createTheme } from '@material-ui/core/styles'` instead.
*/
export function createMuiTheme(options?: ThemeOptions, ...args: object[]): Theme;
export default function createTheme(options?: ThemeOptions, ...args: object[]): Theme;

View file

@ -0,0 +1,122 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createMuiTheme = createMuiTheme;
exports.default = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _utils = require("@material-ui/utils");
var _createBreakpoints = _interopRequireDefault(require("./createBreakpoints"));
var _createMixins = _interopRequireDefault(require("./createMixins"));
var _createPalette = _interopRequireDefault(require("./createPalette"));
var _createTypography = _interopRequireDefault(require("./createTypography"));
var _shadows = _interopRequireDefault(require("./shadows"));
var _shape = _interopRequireDefault(require("./shape"));
var _createSpacing = _interopRequireDefault(require("./createSpacing"));
var _transitions = _interopRequireDefault(require("./transitions"));
var _zIndex = _interopRequireDefault(require("./zIndex"));
function createTheme() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _options$breakpoints = options.breakpoints,
breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,
_options$mixins = options.mixins,
mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,
_options$palette = options.palette,
paletteInput = _options$palette === void 0 ? {} : _options$palette,
spacingInput = options.spacing,
_options$typography = options.typography,
typographyInput = _options$typography === void 0 ? {} : _options$typography,
other = (0, _objectWithoutProperties2.default)(options, ["breakpoints", "mixins", "palette", "spacing", "typography"]);
var palette = (0, _createPalette.default)(paletteInput);
var breakpoints = (0, _createBreakpoints.default)(breakpointsInput);
var spacing = (0, _createSpacing.default)(spacingInput);
var muiTheme = (0, _utils.deepmerge)({
breakpoints: breakpoints,
direction: 'ltr',
mixins: (0, _createMixins.default)(breakpoints, spacing, mixinsInput),
overrides: {},
// Inject custom styles
palette: palette,
props: {},
// Provide default props
shadows: _shadows.default,
typography: (0, _createTypography.default)(palette, typographyInput),
spacing: spacing,
shape: _shape.default,
transitions: _transitions.default,
zIndex: _zIndex.default
}, other);
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
muiTheme = args.reduce(function (acc, argument) {
return (0, _utils.deepmerge)(acc, argument);
}, muiTheme);
if (process.env.NODE_ENV !== 'production') {
var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];
var traverse = function traverse(node, parentKey) {
var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax
for (key in node) {
var child = node[key];
if (depth === 1) {
if (key.indexOf('Mui') === 0 && child) {
traverse(child, key, depth + 1);
}
} else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {
if (process.env.NODE_ENV !== 'production') {
console.error(["Material-UI: The `".concat(parentKey, "` component increases ") + "the CSS specificity of the `".concat(key, "` internal state."), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({
root: (0, _defineProperty2.default)({}, "&$".concat(key), child)
}, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\n'));
} // Remove the style to prevent global conflicts.
node[key] = {};
}
}
};
traverse(muiTheme.overrides);
}
return muiTheme;
}
var warnedOnce = false;
function createMuiTheme() {
if (process.env.NODE_ENV !== 'production') {
if (!warnedOnce) {
warnedOnce = true;
console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', "You should use `import { createTheme } from '@material-ui/core/styles'`"].join('\n'));
}
}
return createTheme.apply(void 0, arguments);
}
var _default = createTheme;
exports.default = _default;

View file

@ -0,0 +1,53 @@
import { Palette } from './createPalette';
import * as React from 'react';
import { CSSProperties } from './withStyles';
export type Variant =
| 'h1'
| 'h2'
| 'h3'
| 'h4'
| 'h5'
| 'h6'
| 'subtitle1'
| 'subtitle2'
| 'body1'
| 'body2'
| 'caption'
| 'button'
| 'overline';
export interface FontStyle
extends Required<{
fontFamily: React.CSSProperties['fontFamily'];
fontSize: number;
fontWeightLight: React.CSSProperties['fontWeight'];
fontWeightRegular: React.CSSProperties['fontWeight'];
fontWeightMedium: React.CSSProperties['fontWeight'];
fontWeightBold: React.CSSProperties['fontWeight'];
}> {}
export interface FontStyleOptions extends Partial<FontStyle> {
htmlFontSize?: number;
allVariants?: React.CSSProperties;
}
// TODO: which one should actually be allowed to be subject to module augmentation?
// current type vs interface decision is kept for historical reasons until we
// made a decision
export type TypographyStyle = CSSProperties;
export interface TypographyStyleOptions extends TypographyStyle {}
export interface TypographyUtils {
pxToRem: (px: number) => string;
}
export interface Typography extends Record<Variant, TypographyStyle>, FontStyle, TypographyUtils {}
export interface TypographyOptions
extends Partial<Record<Variant, TypographyStyleOptions> & FontStyleOptions> {}
export default function createTypography(
palette: Palette,
typography: TypographyOptions | ((palette: Palette) => TypographyOptions)
): Typography;

View file

@ -0,0 +1,120 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createTypography;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _utils = require("@material-ui/utils");
function round(value) {
return Math.round(value * 1e5) / 1e5;
}
var warnedOnce = false;
function roundWithDeprecationWarning(value) {
if (process.env.NODE_ENV !== 'production') {
if (!warnedOnce) {
console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\n'));
warnedOnce = true;
}
}
return round(value);
}
var caseAllCaps = {
textTransform: 'uppercase'
};
var defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif';
/**
* @see @link{https://material.io/design/typography/the-type-system.html}
* @see @link{https://material.io/design/typography/understanding-typography.html}
*/
function createTypography(palette, typography) {
var _ref = typeof typography === 'function' ? typography(palette) : typography,
_ref$fontFamily = _ref.fontFamily,
fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,
_ref$fontSize = _ref.fontSize,
fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,
_ref$fontWeightLight = _ref.fontWeightLight,
fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,
_ref$fontWeightRegula = _ref.fontWeightRegular,
fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,
_ref$fontWeightMedium = _ref.fontWeightMedium,
fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,
_ref$fontWeightBold = _ref.fontWeightBold,
fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,
_ref$htmlFontSize = _ref.htmlFontSize,
htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,
allVariants = _ref.allVariants,
pxToRem2 = _ref.pxToRem,
other = (0, _objectWithoutProperties2.default)(_ref, ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"]);
if (process.env.NODE_ENV !== 'production') {
if (typeof fontSize !== 'number') {
console.error('Material-UI: `fontSize` is required to be a number.');
}
if (typeof htmlFontSize !== 'number') {
console.error('Material-UI: `htmlFontSize` is required to be a number.');
}
}
var coef = fontSize / 14;
var pxToRem = pxToRem2 || function (size) {
return "".concat(size / htmlFontSize * coef, "rem");
};
var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {
return (0, _extends2.default)({
fontFamily: fontFamily,
fontWeight: fontWeight,
fontSize: pxToRem(size),
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
lineHeight: lineHeight
}, fontFamily === defaultFontFamily ? {
letterSpacing: "".concat(round(letterSpacing / size), "em")
} : {}, casing, allVariants);
};
var variants = {
h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),
h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),
h3: buildVariant(fontWeightRegular, 48, 1.167, 0),
h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),
h5: buildVariant(fontWeightRegular, 24, 1.334, 0),
h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),
subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),
subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),
body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),
body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),
button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
};
return (0, _utils.deepmerge)((0, _extends2.default)({
htmlFontSize: htmlFontSize,
pxToRem: pxToRem,
round: roundWithDeprecationWarning,
// TODO v5: remove
fontFamily: fontFamily,
fontSize: fontSize,
fontWeightLight: fontWeightLight,
fontWeightRegular: fontWeightRegular,
fontWeightMedium: fontWeightMedium,
fontWeightBold: fontWeightBold
}, variants), other, {
clone: false // No need to clone deep
});
}

146
web/node_modules/@material-ui/core/styles/cssUtils.js generated vendored Normal file
View file

@ -0,0 +1,146 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isUnitless = isUnitless;
exports.getUnit = getUnit;
exports.toUnitless = toUnitless;
exports.convertLength = convertLength;
exports.alignProperty = alignProperty;
exports.fontGrid = fontGrid;
exports.responsiveProperty = responsiveProperty;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
function isUnitless(value) {
return String(parseFloat(value)).length === String(value).length;
} // Ported from Compass
// https://github.com/Compass/compass/blob/master/core/stylesheets/compass/typography/_units.scss
// Emulate the sass function "unit"
function getUnit(input) {
return String(input).match(/[\d.\-+]*\s*(.*)/)[1] || '';
} // Emulate the sass function "unitless"
function toUnitless(length) {
return parseFloat(length);
} // Convert any CSS <length> or <percentage> value to any another.
// From https://github.com/KyleAMathews/convert-css-length
function convertLength(baseFontSize) {
return function (length, toUnit) {
var fromUnit = getUnit(length); // Optimize for cases where `from` and `to` units are accidentally the same.
if (fromUnit === toUnit) {
return length;
} // Convert input length to pixels.
var pxLength = toUnitless(length);
if (fromUnit !== 'px') {
if (fromUnit === 'em') {
pxLength = toUnitless(length) * toUnitless(baseFontSize);
} else if (fromUnit === 'rem') {
pxLength = toUnitless(length) * toUnitless(baseFontSize);
return length;
}
} // Convert length in pixels to the output unit
var outputLength = pxLength;
if (toUnit !== 'px') {
if (toUnit === 'em') {
outputLength = pxLength / toUnitless(baseFontSize);
} else if (toUnit === 'rem') {
outputLength = pxLength / toUnitless(baseFontSize);
} else {
return length;
}
}
return parseFloat(outputLength.toFixed(5)) + toUnit;
};
}
function alignProperty(_ref) {
var size = _ref.size,
grid = _ref.grid;
var sizeBelow = size - size % grid;
var sizeAbove = sizeBelow + grid;
return size - sizeBelow < sizeAbove - size ? sizeBelow : sizeAbove;
} // fontGrid finds a minimal grid (in rem) for the fontSize values so that the
// lineHeight falls under a x pixels grid, 4px in the case of Material Design,
// without changing the relative line height
function fontGrid(_ref2) {
var lineHeight = _ref2.lineHeight,
pixels = _ref2.pixels,
htmlFontSize = _ref2.htmlFontSize;
return pixels / (lineHeight * htmlFontSize);
}
/**
* generate a responsive version of a given CSS property
* @example
* responsiveProperty({
* cssProperty: 'fontSize',
* min: 15,
* max: 20,
* unit: 'px',
* breakpoints: [300, 600],
* })
*
* // this returns
*
* {
* fontSize: '15px',
* '@media (min-width:300px)': {
* fontSize: '17.5px',
* },
* '@media (min-width:600px)': {
* fontSize: '20px',
* },
* }
*
* @param {Object} params
* @param {string} params.cssProperty - The CSS property to be made responsive
* @param {number} params.min - The smallest value of the CSS property
* @param {number} params.max - The largest value of the CSS property
* @param {string} [params.unit] - The unit to be used for the CSS property
* @param {Array.number} [params.breakpoints] - An array of breakpoints
* @param {number} [params.alignStep] - Round scaled value to fall under this grid
* @returns {Object} responsive styles for {params.cssProperty}
*/
function responsiveProperty(_ref3) {
var cssProperty = _ref3.cssProperty,
min = _ref3.min,
max = _ref3.max,
_ref3$unit = _ref3.unit,
unit = _ref3$unit === void 0 ? 'rem' : _ref3$unit,
_ref3$breakpoints = _ref3.breakpoints,
breakpoints = _ref3$breakpoints === void 0 ? [600, 960, 1280] : _ref3$breakpoints,
_ref3$transform = _ref3.transform,
transform = _ref3$transform === void 0 ? null : _ref3$transform;
var output = (0, _defineProperty2.default)({}, cssProperty, "".concat(min).concat(unit));
var factor = (max - min) / breakpoints[breakpoints.length - 1];
breakpoints.forEach(function (breakpoint) {
var value = min + factor * breakpoint;
if (transform !== null) {
value = transform(value);
}
output["@media (min-width:".concat(breakpoint, "px)")] = (0, _defineProperty2.default)({}, cssProperty, "".concat(Math.round(value * 10000) / 10000).concat(unit));
});
return output;
}

View 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 _createTheme = _interopRequireDefault(require("./createTheme"));
var defaultTheme = (0, _createTheme.default)();
var _default = defaultTheme;
exports.default = _default;

35
web/node_modules/@material-ui/core/styles/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,35 @@
export * from './colorManipulator';
export {
default as createTheme,
default as unstable_createMuiStrictModeTheme,
createMuiTheme,
ThemeOptions,
Theme,
Direction,
} from './createTheme';
export { PaletteColorOptions, SimplePaletteColorOptions } from './createPalette';
export { default as createStyles } from './createStyles';
export { TypographyStyle, Variant as TypographyVariant } from './createTypography';
export { default as makeStyles } from './makeStyles';
export { default as responsiveFontSizes } from './responsiveFontSizes';
export { ComponentsPropsList } from './props';
export * from './transitions';
export { default as useTheme } from './useTheme';
export {
default as withStyles,
WithStyles,
StyleRules,
StyleRulesCallback,
StyledComponentProps,
} from './withStyles';
export { default as withTheme, WithTheme } from './withTheme';
export { default as styled, ComponentCreator, StyledProps } from './styled';
export {
createGenerateClassName,
jssPreset,
ServerStyleSheets,
StylesProvider,
ThemeProvider as MuiThemeProvider,
ThemeProvider,
ThemeProviderProps,
} from '@material-ui/styles';

169
web/node_modules/@material-ui/core/styles/index.js generated vendored Normal file
View file

@ -0,0 +1,169 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
createTheme: true,
createMuiTheme: true,
unstable_createMuiStrictModeTheme: true,
createStyles: true,
makeStyles: true,
responsiveFontSizes: true,
styled: true,
useTheme: true,
withStyles: true,
withTheme: true,
createGenerateClassName: true,
jssPreset: true,
ServerStyleSheets: true,
StylesProvider: true,
MuiThemeProvider: true,
ThemeProvider: true
};
Object.defineProperty(exports, "createTheme", {
enumerable: true,
get: function get() {
return _createTheme.default;
}
});
Object.defineProperty(exports, "createMuiTheme", {
enumerable: true,
get: function get() {
return _createTheme.createMuiTheme;
}
});
Object.defineProperty(exports, "unstable_createMuiStrictModeTheme", {
enumerable: true,
get: function get() {
return _createMuiStrictModeTheme.default;
}
});
Object.defineProperty(exports, "createStyles", {
enumerable: true,
get: function get() {
return _createStyles.default;
}
});
Object.defineProperty(exports, "makeStyles", {
enumerable: true,
get: function get() {
return _makeStyles.default;
}
});
Object.defineProperty(exports, "responsiveFontSizes", {
enumerable: true,
get: function get() {
return _responsiveFontSizes.default;
}
});
Object.defineProperty(exports, "styled", {
enumerable: true,
get: function get() {
return _styled.default;
}
});
Object.defineProperty(exports, "useTheme", {
enumerable: true,
get: function get() {
return _useTheme.default;
}
});
Object.defineProperty(exports, "withStyles", {
enumerable: true,
get: function get() {
return _withStyles.default;
}
});
Object.defineProperty(exports, "withTheme", {
enumerable: true,
get: function get() {
return _withTheme.default;
}
});
Object.defineProperty(exports, "createGenerateClassName", {
enumerable: true,
get: function get() {
return _styles.createGenerateClassName;
}
});
Object.defineProperty(exports, "jssPreset", {
enumerable: true,
get: function get() {
return _styles.jssPreset;
}
});
Object.defineProperty(exports, "ServerStyleSheets", {
enumerable: true,
get: function get() {
return _styles.ServerStyleSheets;
}
});
Object.defineProperty(exports, "StylesProvider", {
enumerable: true,
get: function get() {
return _styles.StylesProvider;
}
});
Object.defineProperty(exports, "MuiThemeProvider", {
enumerable: true,
get: function get() {
return _styles.ThemeProvider;
}
});
Object.defineProperty(exports, "ThemeProvider", {
enumerable: true,
get: function get() {
return _styles.ThemeProvider;
}
});
var _colorManipulator = require("./colorManipulator");
Object.keys(_colorManipulator).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 _colorManipulator[key];
}
});
});
var _createTheme = _interopRequireWildcard(require("./createTheme"));
var _createMuiStrictModeTheme = _interopRequireDefault(require("./createMuiStrictModeTheme"));
var _createStyles = _interopRequireDefault(require("./createStyles"));
var _makeStyles = _interopRequireDefault(require("./makeStyles"));
var _responsiveFontSizes = _interopRequireDefault(require("./responsiveFontSizes"));
var _styled = _interopRequireDefault(require("./styled"));
var _transitions = require("./transitions");
Object.keys(_transitions).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 _transitions[key];
}
});
});
var _useTheme = _interopRequireDefault(require("./useTheme"));
var _withStyles = _interopRequireDefault(require("./withStyles"));
var _withTheme = _interopRequireDefault(require("./withTheme"));
var _styles = require("@material-ui/styles");

View file

@ -0,0 +1,15 @@
import { Theme as DefaultTheme } from './createTheme';
import { ClassNameMap, Styles, WithStylesOptions } from '@material-ui/styles/withStyles';
import { Omit } from '@material-ui/types';
export default function makeStyles<
Theme = DefaultTheme,
Props extends object = {},
ClassKey extends string = string
>(
styles: Styles<Theme, Props, ClassKey>,
options?: Omit<WithStylesOptions<Theme>, 'withTheme'>
): keyof Props extends never // `makeStyles` where the passed `styles` do not depend on props
? (props?: any) => ClassNameMap<ClassKey> // `makeStyles` where the passed `styles` do depend on props
: (props: Props) => ClassNameMap<ClassKey>;

View file

@ -0,0 +1,24 @@
"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 _styles = require("@material-ui/styles");
var _defaultTheme = _interopRequireDefault(require("./defaultTheme"));
function makeStyles(stylesOrCreator) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return (0, _styles.makeStyles)(stylesOrCreator, (0, _extends2.default)({
defaultTheme: _defaultTheme.default
}, options));
}
var _default = makeStyles;
exports.default = _default;

View file

@ -0,0 +1,218 @@
import { CSSProperties, StyleRules } from './withStyles';
import { AppBarClassKey } from '../AppBar';
import { AvatarClassKey } from '../Avatar';
import { BackdropClassKey } from '../Backdrop';
import { BadgeClassKey } from '../Badge';
import { BottomNavigationActionClassKey } from '../BottomNavigationAction';
import { BottomNavigationClassKey } from '../BottomNavigation';
import { BreadcrumbsClassKey } from '../Breadcrumbs';
import { ButtonBaseClassKey } from '../ButtonBase';
import { ButtonClassKey } from '../Button';
import { ButtonGroupClassKey } from '../ButtonGroup';
import { CardActionAreaClassKey } from '../CardActionArea';
import { CardActionsClassKey } from '../CardActions';
import { CardClassKey } from '../Card';
import { CardContentClassKey } from '../CardContent';
import { CardHeaderClassKey } from '../CardHeader';
import { CardMediaClassKey } from '../CardMedia';
import { CheckboxClassKey } from '../Checkbox';
import { ChipClassKey } from '../Chip';
import { CircularProgressClassKey } from '../CircularProgress';
import { CollapseClassKey } from '../Collapse';
import { ContainerClassKey } from '../Container';
import { DialogActionsClassKey } from '../DialogActions';
import { DialogClassKey } from '../Dialog';
import { DialogContentClassKey } from '../DialogContent';
import { DialogContentTextClassKey } from '../DialogContentText';
import { DialogTitleClassKey } from '../DialogTitle';
import { DividerClassKey } from '../Divider';
import { DrawerClassKey } from '../Drawer';
import { AccordionActionsClassKey } from '../AccordionActions';
import { AccordionClassKey } from '../Accordion';
import { AccordionDetailsClassKey } from '../AccordionDetails';
import { AccordionSummaryClassKey } from '../AccordionSummary';
import { ExpansionPanelActionsClassKey } from '../ExpansionPanelActions';
import { ExpansionPanelClassKey } from '../ExpansionPanel';
import { ExpansionPanelDetailsClassKey } from '../ExpansionPanelDetails';
import { ExpansionPanelSummaryClassKey } from '../ExpansionPanelSummary';
import { FabClassKey } from '../Fab';
import { FilledInputClassKey } from '../FilledInput';
import { FormControlClassKey } from '../FormControl';
import { FormControlLabelClassKey } from '../FormControlLabel';
import { FormGroupClassKey } from '../FormGroup';
import { FormHelperTextClassKey } from '../FormHelperText';
import { FormLabelClassKey } from '../FormLabel';
import { GridClassKey } from '../Grid';
import { IconButtonClassKey } from '../IconButton';
import { IconClassKey } from '../Icon';
import { ImageListClassKey } from '../ImageList';
import { ImageListItemBarClassKey } from '../ImageListItemBar';
import { ImageListItemClassKey } from '../ImageListItem';
import { InputAdornmentClassKey } from '../InputAdornment';
import { InputBaseClassKey } from '../InputBase';
import { InputClassKey } from '../Input';
import { InputLabelClassKey } from '../InputLabel';
import { LinearProgressClassKey } from '../LinearProgress';
import { LinkClassKey } from '../Link';
import { ListClassKey } from '../List';
import { ListItemAvatarClassKey } from '../ListItemAvatar';
import { ListItemClassKey } from '../ListItem';
import { ListItemIconClassKey } from '../ListItemIcon';
import { ListItemSecondaryActionClassKey } from '../ListItemSecondaryAction';
import { ListItemTextClassKey } from '../ListItemText';
import { ListSubheaderClassKey } from '../ListSubheader';
import { MenuClassKey } from '../Menu';
import { MenuItemClassKey } from '../MenuItem';
import { MobileStepperClassKey } from '../MobileStepper';
import { NativeSelectClassKey } from '../NativeSelect';
import { OutlinedInputClassKey } from '../OutlinedInput';
import { PaperClassKey } from '../Paper';
import { PopoverClassKey } from '../Popover';
import { RadioClassKey } from '../Radio';
import { ScopedCssBaselineClassKey } from '../ScopedCssBaseline';
import { SelectClassKey } from '../Select';
import { SliderClassKey } from '../Slider';
import { SnackbarClassKey } from '../Snackbar';
import { SnackbarContentClassKey } from '../SnackbarContent';
import { StepButtonClasskey } from '../StepButton';
import { StepClasskey } from '../Step';
import { StepConnectorClasskey } from '../StepConnector';
import { StepContentClasskey } from '../StepContent';
import { StepIconClasskey } from '../StepIcon';
import { StepLabelClasskey } from '../StepLabel';
import { StepperClasskey } from '../Stepper';
import { SvgIconClassKey } from '../SvgIcon';
import { SwitchClassKey } from '../Switch';
import { TabClassKey } from '../Tab';
import { TableBodyClassKey } from '../TableBody';
import { TableCellClassKey } from '../TableCell';
import { TableClassKey } from '../Table';
import { TableContainerClassKey } from '../TableContainer';
import { TableFooterClassKey } from '../TableFooter';
import { TableHeadClassKey } from '../TableHead';
import { TablePaginationClassKey } from '../TablePagination';
import { TableRowClassKey } from '../TableRow';
import { TableSortLabelClassKey } from '../TableSortLabel';
import { TabsClassKey } from '../Tabs';
import { TextFieldClassKey } from '../TextField';
import { ToolbarClassKey } from '../Toolbar';
import { TooltipClassKey } from '../Tooltip';
import { TouchRippleClassKey } from '../ButtonBase/TouchRipple';
import { TypographyClassKey } from '../Typography';
export type Overrides = {
[Name in keyof ComponentNameToClassKey]?: Partial<StyleRules<ComponentNameToClassKey[Name]>>;
} & {
MuiCssBaseline?: {
'@global'?: {
'@font-face'?: CSSProperties['@font-face'];
} & Record<string, CSSProperties['@font-face'] | CSSProperties>; // allow arbitrary selectors
};
};
export interface ComponentNameToClassKey {
MuiAppBar: AppBarClassKey;
MuiAvatar: AvatarClassKey;
MuiBackdrop: BackdropClassKey;
MuiBadge: BadgeClassKey;
MuiBottomNavigation: BottomNavigationClassKey;
MuiBottomNavigationAction: BottomNavigationActionClassKey;
MuiBreadcrumbs: BreadcrumbsClassKey;
MuiButton: ButtonClassKey;
MuiButtonBase: ButtonBaseClassKey;
MuiButtonGroup: ButtonGroupClassKey;
MuiCard: CardClassKey;
MuiCardActionArea: CardActionAreaClassKey;
MuiCardActions: CardActionsClassKey;
MuiCardContent: CardContentClassKey;
MuiCardHeader: CardHeaderClassKey;
MuiCardMedia: CardMediaClassKey;
MuiCheckbox: CheckboxClassKey;
MuiChip: ChipClassKey;
MuiCircularProgress: CircularProgressClassKey;
MuiCollapse: CollapseClassKey;
MuiContainer: ContainerClassKey;
/**
* @deprecated See CssBaseline.d.ts
*/
MuiCssBaseline: '@global';
MuiDialog: DialogClassKey;
MuiDialogActions: DialogActionsClassKey;
MuiDialogContent: DialogContentClassKey;
MuiDialogContentText: DialogContentTextClassKey;
MuiDialogTitle: DialogTitleClassKey;
MuiDivider: DividerClassKey;
MuiDrawer: DrawerClassKey;
MuiAccordion: AccordionClassKey;
MuiAccordionActions: AccordionActionsClassKey;
MuiAccordionDetails: AccordionDetailsClassKey;
MuiAccordionSummary: AccordionSummaryClassKey;
MuiExpansionPanel: ExpansionPanelClassKey;
MuiExpansionPanelActions: ExpansionPanelActionsClassKey;
MuiExpansionPanelDetails: ExpansionPanelDetailsClassKey;
MuiExpansionPanelSummary: ExpansionPanelSummaryClassKey;
MuiFab: FabClassKey;
MuiFilledInput: FilledInputClassKey;
MuiFormControl: FormControlClassKey;
MuiFormControlLabel: FormControlLabelClassKey;
MuiFormGroup: FormGroupClassKey;
MuiFormHelperText: FormHelperTextClassKey;
MuiFormLabel: FormLabelClassKey;
MuiGrid: GridClassKey;
MuiIcon: IconClassKey;
MuiIconButton: IconButtonClassKey;
MuiImageList: ImageListClassKey;
MuiImageListItem: ImageListItemClassKey;
MuiImageListItemBar: ImageListItemBarClassKey;
MuiInput: InputClassKey;
MuiInputAdornment: InputAdornmentClassKey;
MuiInputBase: InputBaseClassKey;
MuiInputLabel: InputLabelClassKey;
MuiLinearProgress: LinearProgressClassKey;
MuiLink: LinkClassKey;
MuiList: ListClassKey;
MuiListItem: ListItemClassKey;
MuiListItemAvatar: ListItemAvatarClassKey;
MuiListItemIcon: ListItemIconClassKey;
MuiListItemSecondaryAction: ListItemSecondaryActionClassKey;
MuiListItemText: ListItemTextClassKey;
MuiListSubheader: ListSubheaderClassKey;
MuiMenu: MenuClassKey;
MuiMenuItem: MenuItemClassKey;
MuiMobileStepper: MobileStepperClassKey;
MuiNativeSelect: NativeSelectClassKey;
MuiOutlinedInput: OutlinedInputClassKey;
MuiPaper: PaperClassKey;
MuiPopover: PopoverClassKey;
MuiRadio: RadioClassKey;
MuiScopedCssBaseline: ScopedCssBaselineClassKey;
MuiSelect: SelectClassKey;
MuiSlider: SliderClassKey;
MuiSnackbar: SnackbarClassKey;
MuiSnackbarContent: SnackbarContentClassKey;
MuiStep: StepClasskey;
MuiStepButton: StepButtonClasskey;
MuiStepConnector: StepConnectorClasskey;
MuiStepContent: StepContentClasskey;
MuiStepIcon: StepIconClasskey;
MuiStepLabel: StepLabelClasskey;
MuiStepper: StepperClasskey;
MuiSvgIcon: SvgIconClassKey;
MuiSwitch: SwitchClassKey;
MuiTab: TabClassKey;
MuiTable: TableClassKey;
MuiTableBody: TableBodyClassKey;
MuiTableCell: TableCellClassKey;
MuiTableContainer: TableContainerClassKey;
MuiTableFooter: TableFooterClassKey;
MuiTableHead: TableHeadClassKey;
MuiTablePagination: TablePaginationClassKey;
MuiTableRow: TableRowClassKey;
MuiTableSortLabel: TableSortLabelClassKey;
MuiTabs: TabsClassKey;
MuiTextField: TextFieldClassKey;
MuiToolbar: ToolbarClassKey;
MuiTooltip: TooltipClassKey;
MuiTouchRipple: TouchRippleClassKey;
MuiTypography: TypographyClassKey;
}

View file

@ -0,0 +1,5 @@
{
"sideEffects": false,
"module": "../esm/styles/index.js",
"typings": "./index.d.ts"
}

217
web/node_modules/@material-ui/core/styles/props.d.ts generated vendored Normal file
View file

@ -0,0 +1,217 @@
import { AppBarProps } from '../AppBar';
import { AvatarProps } from '../Avatar';
import { BackdropProps } from '../Backdrop';
import { BadgeProps } from '../Badge';
import { BottomNavigationActionProps } from '../BottomNavigationAction';
import { BottomNavigationProps } from '../BottomNavigation';
import { BreadcrumbsProps } from '../Breadcrumbs';
import { ButtonBaseProps } from '../ButtonBase';
import { ButtonGroupProps } from '../ButtonGroup';
import { ButtonProps } from '../Button';
import { CardActionAreaProps } from '../CardActionArea';
import { CardActionsProps } from '../CardActions';
import { CardContentProps } from '../CardContent';
import { CardHeaderProps } from '../CardHeader';
import { CardMediaProps } from '../CardMedia';
import { CardProps } from '../Card';
import { CheckboxProps } from '../Checkbox';
import { ChipProps } from '../Chip';
import { CircularProgressProps } from '../CircularProgress';
import { CollapseProps } from '../Collapse';
import { ContainerProps } from '../Container';
import { CssBaselineProps } from '../CssBaseline';
import { DialogActionsProps } from '../DialogActions';
import { DialogContentProps } from '../DialogContent';
import { DialogContentTextProps } from '../DialogContentText';
import { DialogProps } from '../Dialog';
import { DialogTitleProps } from '../DialogTitle';
import { DividerProps } from '../Divider';
import { DrawerProps } from '../Drawer';
import { AccordionActionsProps } from '../AccordionActions';
import { AccordionDetailsProps } from '../AccordionDetails';
import { AccordionProps } from '../Accordion';
import { AccordionSummaryProps } from '../AccordionSummary';
import { ExpansionPanelActionsProps } from '../ExpansionPanelActions';
import { ExpansionPanelDetailsProps } from '../ExpansionPanelDetails';
import { ExpansionPanelProps } from '../ExpansionPanel';
import { ExpansionPanelSummaryProps } from '../ExpansionPanelSummary';
import { FabProps } from '../Fab';
import { FilledInputProps } from '../FilledInput';
import { FormControlLabelProps } from '../FormControlLabel';
import { FormControlProps } from '../FormControl';
import { FormGroupProps } from '../FormGroup';
import { FormHelperTextProps } from '../FormHelperText';
import { FormLabelProps } from '../FormLabel';
import { GridProps } from '../Grid';
import { IconButtonProps } from '../IconButton';
import { IconProps } from '../Icon';
import { ImageListProps } from '../ImageList';
import { ImageListItemBarProps } from '../ImageListItemBar';
import { ImageListItemProps } from '../ImageListItem';
import { InputAdornmentProps } from '../InputAdornment';
import { InputBaseProps } from '../InputBase';
import { InputLabelProps } from '../InputLabel';
import { InputProps } from '../Input';
import { LinearProgressProps } from '../LinearProgress';
import { LinkProps } from '../Link';
import { ListItemAvatarProps } from '../ListItemAvatar';
import { ListItemIconProps } from '../ListItemIcon';
import { ListItemProps } from '../ListItem';
import { ListItemSecondaryActionProps } from '../ListItemSecondaryAction';
import { ListItemTextProps } from '../ListItemText';
import { ListProps } from '../List';
import { ListSubheaderProps } from '../ListSubheader';
import { MenuItemProps } from '../MenuItem';
import { MenuListProps } from '../MenuList';
import { MenuProps } from '../Menu';
import { MobileStepperProps } from '../MobileStepper';
import { ModalProps } from '../Modal';
import { NativeSelectProps } from '../NativeSelect';
import { Options as useMediaQueryOptions } from '../useMediaQuery';
import { OutlinedInputProps } from '../OutlinedInput';
import { PaperProps } from '../Paper';
import { PopoverProps } from '../Popover';
import { RadioGroupProps } from '../RadioGroup';
import { RadioProps } from '../Radio';
import { SelectProps } from '../Select';
import { SliderProps } from '../Slider';
import { SnackbarContentProps } from '../SnackbarContent';
import { SnackbarProps } from '../Snackbar';
import { StepButtonProps } from '../StepButton';
import { StepConnectorProps } from '../StepConnector';
import { StepContentProps } from '../StepContent';
import { StepIconProps } from '../StepIcon';
import { StepLabelProps } from '../StepLabel';
import { StepperProps } from '../Stepper';
import { StepProps } from '../Step';
import { SvgIconProps } from '../SvgIcon';
import { SwipeableDrawerProps } from '../SwipeableDrawer';
import { SwitchProps } from '../Switch';
import { TableBodyProps } from '../TableBody';
import { TableCellProps } from '../TableCell';
import { TableContainerProps } from '../TableContainer';
import { TableHeadProps } from '../TableHead';
import { TablePaginationProps } from '../TablePagination';
import { TableProps } from '../Table';
import { TableRowProps } from '../TableRow';
import { TableSortLabelProps } from '../TableSortLabel';
import { TabProps } from '../Tab';
import { TabsProps } from '../Tabs';
import { TextFieldProps } from '../TextField';
import { ToolbarProps } from '../Toolbar';
import { TooltipProps } from '../Tooltip';
import { TouchRippleProps } from '../ButtonBase/TouchRipple';
import { TypographyProps } from '../Typography';
import { WithWidthOptions } from '../withWidth';
export type ComponentsProps = {
[Name in keyof ComponentsPropsList]?: Partial<ComponentsPropsList[Name]>;
};
export interface ComponentsPropsList {
MuiAppBar: AppBarProps;
MuiAvatar: AvatarProps;
MuiBackdrop: BackdropProps;
MuiBadge: BadgeProps;
MuiBottomNavigation: BottomNavigationProps;
MuiBottomNavigationAction: BottomNavigationActionProps;
MuiBreadcrumbs: BreadcrumbsProps;
MuiButton: ButtonProps;
MuiButtonBase: ButtonBaseProps;
MuiButtonGroup: ButtonGroupProps;
MuiCard: CardProps;
MuiCardActionArea: CardActionAreaProps;
MuiCardActions: CardActionsProps;
MuiCardContent: CardContentProps;
MuiCardHeader: CardHeaderProps;
MuiCardMedia: CardMediaProps;
MuiCheckbox: CheckboxProps;
MuiChip: ChipProps;
MuiCircularProgress: CircularProgressProps;
MuiCollapse: CollapseProps;
MuiContainer: ContainerProps;
MuiCssBaseline: CssBaselineProps;
MuiDialog: DialogProps;
MuiDialogActions: DialogActionsProps;
MuiDialogContent: DialogContentProps;
MuiDialogContentText: DialogContentTextProps;
MuiDialogTitle: DialogTitleProps;
MuiDivider: DividerProps;
MuiDrawer: DrawerProps;
MuiAccordion: AccordionProps;
MuiAccordionActions: AccordionActionsProps;
MuiAccordionDetails: AccordionDetailsProps;
MuiAccordionSummary: AccordionSummaryProps;
MuiExpansionPanel: ExpansionPanelProps;
MuiExpansionPanelActions: ExpansionPanelActionsProps;
MuiExpansionPanelDetails: ExpansionPanelDetailsProps;
MuiExpansionPanelSummary: ExpansionPanelSummaryProps;
MuiFab: FabProps;
MuiFilledInput: FilledInputProps;
MuiFormControl: FormControlProps;
MuiFormControlLabel: FormControlLabelProps;
MuiFormGroup: FormGroupProps;
MuiFormHelperText: FormHelperTextProps;
MuiFormLabel: FormLabelProps;
MuiGrid: GridProps;
MuiIcon: IconProps;
MuiIconButton: IconButtonProps;
MuiImageList: ImageListProps;
MuiImageListItem: ImageListItemProps;
MuiImageListItemBar: ImageListItemBarProps;
MuiInput: InputProps;
MuiInputAdornment: InputAdornmentProps;
MuiInputBase: InputBaseProps;
MuiInputLabel: InputLabelProps;
MuiLinearProgress: LinearProgressProps;
MuiLink: LinkProps;
MuiList: ListProps;
MuiListItem: ListItemProps;
MuiListItemAvatar: ListItemAvatarProps;
MuiListItemIcon: ListItemIconProps;
MuiListItemSecondaryAction: ListItemSecondaryActionProps;
MuiListItemText: ListItemTextProps;
MuiListSubheader: ListSubheaderProps;
MuiMenu: MenuProps;
MuiMenuItem: MenuItemProps;
MuiMenuList: MenuListProps;
MuiMobileStepper: MobileStepperProps;
MuiModal: ModalProps;
MuiNativeSelect: NativeSelectProps;
MuiOutlinedInput: OutlinedInputProps;
MuiPaper: PaperProps;
MuiPopover: PopoverProps;
MuiRadio: RadioProps;
MuiRadioGroup: RadioGroupProps;
MuiSelect: SelectProps;
MuiSlider: SliderProps;
MuiSnackbar: SnackbarProps;
MuiSnackbarContent: SnackbarContentProps;
MuiStep: StepProps;
MuiStepButton: StepButtonProps;
MuiStepConnector: StepConnectorProps;
MuiStepContent: StepContentProps;
MuiStepIcon: StepIconProps;
MuiStepLabel: StepLabelProps;
MuiStepper: StepperProps;
MuiSvgIcon: SvgIconProps;
MuiSwipeableDrawer: SwipeableDrawerProps;
MuiSwitch: SwitchProps;
MuiTab: TabProps;
MuiTable: TableProps;
MuiTableBody: TableBodyProps;
MuiTableCell: TableCellProps;
MuiTableContainer: TableContainerProps;
MuiTableHead: TableHeadProps;
MuiTablePagination: TablePaginationProps;
MuiTableRow: TableRowProps;
MuiTableSortLabel: TableSortLabelProps;
MuiTabs: TabsProps;
MuiTextField: TextFieldProps;
MuiToolbar: ToolbarProps;
MuiTooltip: TooltipProps;
MuiTouchRipple: TouchRippleProps;
MuiTypography: TypographyProps;
MuiUseMediaQuery: useMediaQueryOptions;
MuiWithWidth: WithWidthOptions;
}

View file

@ -0,0 +1,15 @@
import { Theme } from './createTheme';
import { Breakpoint } from './createBreakpoints';
import { Variant } from './createTypography';
export interface ResponsiveFontSizesOptions {
breakpoints?: Breakpoint[];
disableAlign?: boolean;
factor?: number;
variants?: Variant[];
}
export default function responsiveFontSizes(
theme: Theme,
options?: ResponsiveFontSizesOptions
): Theme;

View file

@ -0,0 +1,81 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = responsiveFontSizes;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _utils = require("@material-ui/utils");
var _cssUtils = require("./cssUtils");
function responsiveFontSizes(themeInput) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$breakpoints = options.breakpoints,
breakpoints = _options$breakpoints === void 0 ? ['sm', 'md', 'lg'] : _options$breakpoints,
_options$disableAlign = options.disableAlign,
disableAlign = _options$disableAlign === void 0 ? false : _options$disableAlign,
_options$factor = options.factor,
factor = _options$factor === void 0 ? 2 : _options$factor,
_options$variants = options.variants,
variants = _options$variants === void 0 ? ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline'] : _options$variants;
var theme = (0, _extends2.default)({}, themeInput);
theme.typography = (0, _extends2.default)({}, theme.typography);
var typography = theme.typography; // Convert between css lengths e.g. em->px or px->rem
// Set the baseFontSize for your project. Defaults to 16px (also the browser default).
var convert = (0, _cssUtils.convertLength)(typography.htmlFontSize);
var breakpointValues = breakpoints.map(function (x) {
return theme.breakpoints.values[x];
});
variants.forEach(function (variant) {
var style = typography[variant];
var remFontSize = parseFloat(convert(style.fontSize, 'rem'));
if (remFontSize <= 1) {
return;
}
var maxFontSize = remFontSize;
var minFontSize = 1 + (maxFontSize - 1) / factor;
var lineHeight = style.lineHeight;
if (!(0, _cssUtils.isUnitless)(lineHeight) && !disableAlign) {
throw new Error(process.env.NODE_ENV !== "production" ? "Material-UI: Unsupported non-unitless line height with grid alignment.\nUse unitless line heights instead." : (0, _utils.formatMuiErrorMessage)(6));
}
if (!(0, _cssUtils.isUnitless)(lineHeight)) {
// make it unitless
lineHeight = parseFloat(convert(lineHeight, 'rem')) / parseFloat(remFontSize);
}
var transform = null;
if (!disableAlign) {
transform = function transform(value) {
return (0, _cssUtils.alignProperty)({
size: value,
grid: (0, _cssUtils.fontGrid)({
pixels: 4,
lineHeight: lineHeight,
htmlFontSize: typography.htmlFontSize
})
});
};
}
typography[variant] = (0, _extends2.default)({}, style, (0, _cssUtils.responsiveProperty)({
cssProperty: 'fontSize',
min: minFontSize,
max: maxFontSize,
unit: 'rem',
breakpoints: breakpointValues,
transform: transform
}));
});
return theme;
}

29
web/node_modules/@material-ui/core/styles/shadows.d.ts generated vendored Normal file
View file

@ -0,0 +1,29 @@
export type Shadows = [
'none',
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
];
declare const shadows: Shadows;
export default shadows;

18
web/node_modules/@material-ui/core/styles/shadows.js generated vendored Normal file
View file

@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var shadowKeyUmbraOpacity = 0.2;
var shadowKeyPenumbraOpacity = 0.14;
var shadowAmbientShadowOpacity = 0.12;
function createShadow() {
return ["".concat(arguments.length <= 0 ? undefined : arguments[0], "px ").concat(arguments.length <= 1 ? undefined : arguments[1], "px ").concat(arguments.length <= 2 ? undefined : arguments[2], "px ").concat(arguments.length <= 3 ? undefined : arguments[3], "px rgba(0,0,0,").concat(shadowKeyUmbraOpacity, ")"), "".concat(arguments.length <= 4 ? undefined : arguments[4], "px ").concat(arguments.length <= 5 ? undefined : arguments[5], "px ").concat(arguments.length <= 6 ? undefined : arguments[6], "px ").concat(arguments.length <= 7 ? undefined : arguments[7], "px rgba(0,0,0,").concat(shadowKeyPenumbraOpacity, ")"), "".concat(arguments.length <= 8 ? undefined : arguments[8], "px ").concat(arguments.length <= 9 ? undefined : arguments[9], "px ").concat(arguments.length <= 10 ? undefined : arguments[10], "px ").concat(arguments.length <= 11 ? undefined : arguments[11], "px rgba(0,0,0,").concat(shadowAmbientShadowOpacity, ")")].join(',');
} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
var shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
var _default = shadows;
exports.default = _default;

9
web/node_modules/@material-ui/core/styles/shape.d.ts generated vendored Normal file
View file

@ -0,0 +1,9 @@
export interface Shape {
borderRadius: number;
}
export type ShapeOptions = Partial<Shape>;
declare const shape: Shape;
export default shape;

11
web/node_modules/@material-ui/core/styles/shape.js generated vendored Normal file
View file

@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var shape = {
borderRadius: 4
};
var _default = shape;
exports.default = _default;

41
web/node_modules/@material-ui/core/styles/styled.d.ts generated vendored Normal file
View file

@ -0,0 +1,41 @@
import { Omit } from '@material-ui/types';
import {
CreateCSSProperties,
StyledComponentProps,
WithStylesOptions,
} from '@material-ui/styles/withStyles';
import { Theme as DefaultTheme } from './createTheme';
import * as React from 'react';
// These definitions are almost identical to the ones in @material-ui/styles/styled
// Only difference is that ComponentCreator has a default theme type
// If you need to change these types, update the ones in @material-ui/styles as well
/**
* @internal
*/
export type ComponentCreator<Component extends React.ElementType> = <
Theme = DefaultTheme,
Props extends {} = {}
>(
styles:
| CreateCSSProperties<Props>
| ((props: { theme: Theme } & Props) => CreateCSSProperties<Props>),
options?: WithStylesOptions<Theme>
) => React.ComponentType<
Omit<
JSX.LibraryManagedAttributes<Component, React.ComponentProps<Component>>,
'classes' | 'className'
> &
StyledComponentProps<'root'> & { className?: string } & (Props extends { theme: Theme }
? Omit<Props, 'theme'> & { theme?: Theme }
: Props)
>;
export interface StyledProps {
className: string;
}
export default function styled<Component extends React.ElementType>(
Component: Component
): ComponentCreator<Component>;

26
web/node_modules/@material-ui/core/styles/styled.js generated vendored Normal file
View file

@ -0,0 +1,26 @@
"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 _styles = require("@material-ui/styles");
var _defaultTheme = _interopRequireDefault(require("./defaultTheme"));
var styled = function styled(Component) {
var componentCreator = (0, _styles.styled)(Component);
return function (style, options) {
return componentCreator(style, (0, _extends2.default)({
defaultTheme: _defaultTheme.default
}, options));
};
};
var _default = styled;
exports.default = _default;

View file

@ -0,0 +1,45 @@
export interface Easing {
easeInOut: string;
easeOut: string;
easeIn: string;
sharp: string;
}
export const easing: Easing;
export interface Duration {
shortest: number;
shorter: number;
short: number;
standard: number;
complex: number;
enteringScreen: number;
leavingScreen: number;
}
export const duration: Duration;
export function formatMs(milliseconds: number): string;
export interface Transitions {
easing: Easing;
duration: Duration;
create(
props: string | string[],
options?: Partial<{ duration: number | string; easing: string; delay: number | string }>
): string;
getAutoHeightDuration(height: number): number;
}
export interface TransitionsOptions {
easing?: Partial<Easing>;
duration?: Partial<Duration>;
create?: (
props: string | string[],
options?: Partial<{ duration: number | string; easing: string; delay: number | string }>
) => string;
getAutoHeightDuration?: (height: number) => number;
}
// export type TransitionsOptions = DeepPartial<Transitions>;
declare const transitions: Transitions;
export default transitions;

View file

@ -0,0 +1,114 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.duration = exports.easing = void 0;
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves
// to learn the context in which each easing should be used.
var easing = {
// This is the most common easing curve.
easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',
// Objects enter the screen at full velocity from off-screen and
// slowly decelerate to a resting point.
easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',
// Objects leave the screen at full velocity. They do not decelerate when off-screen.
easeIn: 'cubic-bezier(0.4, 0, 1, 1)',
// The sharp curve is used by objects that may return to the screen at any time.
sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'
}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations
// to learn when use what timing
exports.easing = easing;
var duration = {
shortest: 150,
shorter: 200,
short: 250,
// most basic recommended timing
standard: 300,
// this is to be used in complex animations
complex: 375,
// recommended when something is entering screen
enteringScreen: 225,
// recommended when something is leaving screen
leavingScreen: 195
};
exports.duration = duration;
function formatMs(milliseconds) {
return "".concat(Math.round(milliseconds), "ms");
}
/**
* @param {string|Array} props
* @param {object} param
* @param {string} param.prop
* @param {number} param.duration
* @param {string} param.easing
* @param {number} param.delay
*/
var _default = {
easing: easing,
duration: duration,
create: function create() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var _options$duration = options.duration,
durationOption = _options$duration === void 0 ? duration.standard : _options$duration,
_options$easing = options.easing,
easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,
_options$delay = options.delay,
delay = _options$delay === void 0 ? 0 : _options$delay,
other = (0, _objectWithoutProperties2.default)(options, ["duration", "easing", "delay"]);
if (process.env.NODE_ENV !== 'production') {
var isString = function isString(value) {
return typeof value === 'string';
};
var isNumber = function isNumber(value) {
return !isNaN(parseFloat(value));
};
if (!isString(props) && !Array.isArray(props)) {
console.error('Material-UI: Argument "props" must be a string or Array.');
}
if (!isNumber(durationOption) && !isString(durationOption)) {
console.error("Material-UI: Argument \"duration\" must be a number or a string but found ".concat(durationOption, "."));
}
if (!isString(easingOption)) {
console.error('Material-UI: Argument "easing" must be a string.');
}
if (!isNumber(delay) && !isString(delay)) {
console.error('Material-UI: Argument "delay" must be a number or a string.');
}
if (Object.keys(other).length !== 0) {
console.error("Material-UI: Unrecognized argument(s) [".concat(Object.keys(other).join(','), "]."));
}
}
return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {
return "".concat(animatedProp, " ").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), " ").concat(easingOption, " ").concat(typeof delay === 'string' ? delay : formatMs(delay));
}).join(',');
},
getAutoHeightDuration: function getAutoHeightDuration(height) {
if (!height) {
return 0;
}
var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10
return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);
}
};
exports.default = _default;

View file

@ -0,0 +1,3 @@
import { Theme } from './createTheme';
export default function useTheme<T = Theme>(): T;

25
web/node_modules/@material-ui/core/styles/useTheme.js generated vendored Normal file
View file

@ -0,0 +1,25 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = useTheme;
var _styles = require("@material-ui/styles");
var _react = _interopRequireDefault(require("react"));
var _defaultTheme = _interopRequireDefault(require("./defaultTheme"));
function useTheme() {
var theme = (0, _styles.useTheme)() || _defaultTheme.default;
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line react-hooks/rules-of-hooks
_react.default.useDebugValue(theme);
}
return theme;
}

View file

@ -0,0 +1,52 @@
import { PropInjector } from '@material-ui/types';
import { Theme } from './createTheme';
import {
CreateCSSProperties,
CSSProperties,
ClassNameMap,
StyledComponentProps,
WithStylesOptions,
StyleRules as ActualStyleRules,
StyleRulesCallback,
Styles,
ClassKeyOfStyles,
BaseCSSProperties,
} from '@material-ui/styles/withStyles';
export {
CreateCSSProperties,
CSSProperties,
ClassNameMap,
StyledComponentProps,
Styles,
WithStylesOptions,
StyleRulesCallback,
BaseCSSProperties,
};
/**
* Adapter for `StyleRules` from `@material-ui/styles` for backwards compatibility.
* Order of generic arguments is just reversed.
*
* TODO: to normalize in v5
*/
export type StyleRules<
ClassKey extends string = string,
Props extends object = {}
> = ActualStyleRules<Props, ClassKey>;
export type WithStyles<
StylesOrClassKey extends string | Styles<any, any, any> = string,
IncludeTheme extends boolean | undefined = false
> = (IncludeTheme extends true ? { theme: Theme } : {}) & {
classes: ClassNameMap<ClassKeyOfStyles<StylesOrClassKey>>;
};
export default function withStyles<
ClassKey extends string,
Options extends WithStylesOptions<Theme> = {},
Props extends object = {}
>(
style: Styles<Theme, Props, ClassKey>,
options?: Options
): PropInjector<WithStyles<ClassKey, Options['withTheme']>, StyledComponentProps<ClassKey> & Props>;

View file

@ -0,0 +1,23 @@
"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 _styles = require("@material-ui/styles");
var _defaultTheme = _interopRequireDefault(require("./defaultTheme"));
function withStyles(stylesOrCreator, options) {
return (0, _styles.withStyles)(stylesOrCreator, (0, _extends2.default)({
defaultTheme: _defaultTheme.default
}, options));
}
var _default = withStyles;
exports.default = _default;

View file

@ -0,0 +1,20 @@
import { Theme } from './createTheme';
import { PropInjector } from '@material-ui/types';
export interface WithTheme {
theme: Theme;
}
export interface ThemedComponentProps extends Partial<WithTheme> {
/**
* Deprecated. Will be removed in v5. Refs are now automatically forwarded to
* the inner component.
* @deprecated since version 4.0
*/
innerRef?: React.Ref<any>;
ref?: React.Ref<unknown>;
}
declare const withTheme: PropInjector<WithTheme, ThemedComponentProps>;
export default withTheme;

18
web/node_modules/@material-ui/core/styles/withTheme.js generated vendored Normal file
View file

@ -0,0 +1,18 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _styles = require("@material-ui/styles");
var _defaultTheme = _interopRequireDefault(require("./defaultTheme"));
var withTheme = (0, _styles.withThemeCreator)({
defaultTheme: _defaultTheme.default
});
var _default = withTheme;
exports.default = _default;

15
web/node_modules/@material-ui/core/styles/zIndex.d.ts generated vendored Normal file
View file

@ -0,0 +1,15 @@
export interface ZIndex {
mobileStepper: number;
speedDial: number;
appBar: number;
drawer: number;
modal: number;
snackbar: number;
tooltip: number;
}
export type ZIndexOptions = Partial<ZIndex>;
declare const zIndex: ZIndex;
export default zIndex;

19
web/node_modules/@material-ui/core/styles/zIndex.js generated vendored Normal file
View file

@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
// We need to centralize the zIndex definitions as they work
// like global values in the browser.
var zIndex = {
mobileStepper: 1000,
speedDial: 1050,
appBar: 1100,
drawer: 1200,
modal: 1300,
snackbar: 1400,
tooltip: 1500
};
var _default = zIndex;
exports.default = _default;