mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
61
web/node_modules/@material-ui/core/LinearProgress/LinearProgress.d.ts
generated
vendored
Normal file
61
web/node_modules/@material-ui/core/LinearProgress/LinearProgress.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
|
||||
export interface LinearProgressProps
|
||||
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, LinearProgressClassKey, 'children'> {
|
||||
/**
|
||||
* The color of the component. It supports those theme colors that make sense for this component.
|
||||
*/
|
||||
color?: 'primary' | 'secondary';
|
||||
/**
|
||||
* The value of the progress indicator for the determinate and buffer variants.
|
||||
* Value between 0 and 100.
|
||||
*/
|
||||
value?: number;
|
||||
/**
|
||||
* The value for the buffer variant.
|
||||
* Value between 0 and 100.
|
||||
*/
|
||||
valueBuffer?: number;
|
||||
/**
|
||||
* The variant to use.
|
||||
* Use indeterminate or query when there is no progress value.
|
||||
*/
|
||||
variant?: 'determinate' | 'indeterminate' | 'buffer' | 'query';
|
||||
}
|
||||
|
||||
export type LinearProgressClassKey =
|
||||
| 'root'
|
||||
| 'colorPrimary'
|
||||
| 'colorSecondary'
|
||||
| 'determinate'
|
||||
| 'indeterminate'
|
||||
| 'buffer'
|
||||
| 'query'
|
||||
| 'dashed'
|
||||
| 'dashedColorPrimary'
|
||||
| 'dashedColorSecondary'
|
||||
| 'bar'
|
||||
| 'barColorPrimary'
|
||||
| 'barColorSecondary'
|
||||
| 'bar1Indeterminate'
|
||||
| 'bar2Indeterminate'
|
||||
| 'bar1Determinate'
|
||||
| 'bar1Buffer'
|
||||
| 'bar2Buffer';
|
||||
|
||||
/**
|
||||
* ## ARIA
|
||||
*
|
||||
* If the progress bar is describing the loading progress of a particular region of a page,
|
||||
* you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
|
||||
* attribute to `true` on that region until it has finished loading.
|
||||
* Demos:
|
||||
*
|
||||
* - [Progress](https://material-ui.com/components/progress/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [LinearProgress API](https://material-ui.com/api/linear-progress/)
|
||||
*/
|
||||
export default function LinearProgress(props: LinearProgressProps): JSX.Element;
|
325
web/node_modules/@material-ui/core/LinearProgress/LinearProgress.js
generated
vendored
Normal file
325
web/node_modules/@material-ui/core/LinearProgress/LinearProgress.js
generated
vendored
Normal file
|
@ -0,0 +1,325 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = exports.styles = void 0;
|
||||
|
||||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
||||
|
||||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
||||
|
||||
var React = _interopRequireWildcard(require("react"));
|
||||
|
||||
var _propTypes = _interopRequireDefault(require("prop-types"));
|
||||
|
||||
var _clsx = _interopRequireDefault(require("clsx"));
|
||||
|
||||
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
||||
|
||||
var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
|
||||
|
||||
var _colorManipulator = require("../styles/colorManipulator");
|
||||
|
||||
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
||||
|
||||
var TRANSITION_DURATION = 4; // seconds
|
||||
|
||||
var styles = function styles(theme) {
|
||||
var getColor = function getColor(color) {
|
||||
return theme.palette.type === 'light' ? (0, _colorManipulator.lighten)(color, 0.62) : (0, _colorManipulator.darken)(color, 0.5);
|
||||
};
|
||||
|
||||
var backgroundPrimary = getColor(theme.palette.primary.main);
|
||||
var backgroundSecondary = getColor(theme.palette.secondary.main);
|
||||
return {
|
||||
/* Styles applied to the root element. */
|
||||
root: {
|
||||
position: 'relative',
|
||||
overflow: 'hidden',
|
||||
height: 4,
|
||||
'@media print': {
|
||||
colorAdjust: 'exact'
|
||||
}
|
||||
},
|
||||
|
||||
/* Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */
|
||||
colorPrimary: {
|
||||
backgroundColor: backgroundPrimary
|
||||
},
|
||||
|
||||
/* Styles applied to the root and bar2 elements if `color="secondary"`; bar2 if `variant="buffer"`. */
|
||||
colorSecondary: {
|
||||
backgroundColor: backgroundSecondary
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `variant="determinate"`. */
|
||||
determinate: {},
|
||||
|
||||
/* Styles applied to the root element if `variant="indeterminate"`. */
|
||||
indeterminate: {},
|
||||
|
||||
/* Styles applied to the root element if `variant="buffer"`. */
|
||||
buffer: {
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
|
||||
/* Styles applied to the root element if `variant="query"`. */
|
||||
query: {
|
||||
transform: 'rotate(180deg)'
|
||||
},
|
||||
|
||||
/* Styles applied to the additional bar element if `variant="buffer"`. */
|
||||
dashed: {
|
||||
position: 'absolute',
|
||||
marginTop: 0,
|
||||
height: '100%',
|
||||
width: '100%',
|
||||
animation: '$buffer 3s infinite linear'
|
||||
},
|
||||
|
||||
/* Styles applied to the additional bar element if `variant="buffer"` and `color="primary"`. */
|
||||
dashedColorPrimary: {
|
||||
backgroundImage: "radial-gradient(".concat(backgroundPrimary, " 0%, ").concat(backgroundPrimary, " 16%, transparent 42%)"),
|
||||
backgroundSize: '10px 10px',
|
||||
backgroundPosition: '0 -23px'
|
||||
},
|
||||
|
||||
/* Styles applied to the additional bar element if `variant="buffer"` and `color="secondary"`. */
|
||||
dashedColorSecondary: {
|
||||
backgroundImage: "radial-gradient(".concat(backgroundSecondary, " 0%, ").concat(backgroundSecondary, " 16%, transparent 42%)"),
|
||||
backgroundSize: '10px 10px',
|
||||
backgroundPosition: '0 -23px'
|
||||
},
|
||||
|
||||
/* Styles applied to the layered bar1 and bar2 elements. */
|
||||
bar: {
|
||||
width: '100%',
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
top: 0,
|
||||
transition: 'transform 0.2s linear',
|
||||
transformOrigin: 'left'
|
||||
},
|
||||
|
||||
/* Styles applied to the bar elements if `color="primary"`; bar2 if `variant` not "buffer". */
|
||||
barColorPrimary: {
|
||||
backgroundColor: theme.palette.primary.main
|
||||
},
|
||||
|
||||
/* Styles applied to the bar elements if `color="secondary"`; bar2 if `variant` not "buffer". */
|
||||
barColorSecondary: {
|
||||
backgroundColor: theme.palette.secondary.main
|
||||
},
|
||||
|
||||
/* Styles applied to the bar1 element if `variant="indeterminate or query"`. */
|
||||
bar1Indeterminate: {
|
||||
width: 'auto',
|
||||
animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite'
|
||||
},
|
||||
|
||||
/* Styles applied to the bar1 element if `variant="determinate"`. */
|
||||
bar1Determinate: {
|
||||
transition: "transform .".concat(TRANSITION_DURATION, "s linear")
|
||||
},
|
||||
|
||||
/* Styles applied to the bar1 element if `variant="buffer"`. */
|
||||
bar1Buffer: {
|
||||
zIndex: 1,
|
||||
transition: "transform .".concat(TRANSITION_DURATION, "s linear")
|
||||
},
|
||||
|
||||
/* Styles applied to the bar2 element if `variant="indeterminate or query"`. */
|
||||
bar2Indeterminate: {
|
||||
width: 'auto',
|
||||
animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite'
|
||||
},
|
||||
|
||||
/* Styles applied to the bar2 element if `variant="buffer"`. */
|
||||
bar2Buffer: {
|
||||
transition: "transform .".concat(TRANSITION_DURATION, "s linear")
|
||||
},
|
||||
// Legends:
|
||||
// || represents the viewport
|
||||
// - represents a light background
|
||||
// x represents a dark background
|
||||
'@keyframes indeterminate1': {
|
||||
// |-----|---x-||-----||-----|
|
||||
'0%': {
|
||||
left: '-35%',
|
||||
right: '100%'
|
||||
},
|
||||
// |-----|-----||-----||xxxx-|
|
||||
'60%': {
|
||||
left: '100%',
|
||||
right: '-90%'
|
||||
},
|
||||
'100%': {
|
||||
left: '100%',
|
||||
right: '-90%'
|
||||
}
|
||||
},
|
||||
'@keyframes indeterminate2': {
|
||||
// |xxxxx|xxxxx||-----||-----|
|
||||
'0%': {
|
||||
left: '-200%',
|
||||
right: '100%'
|
||||
},
|
||||
// |-----|-----||-----||-x----|
|
||||
'60%': {
|
||||
left: '107%',
|
||||
right: '-8%'
|
||||
},
|
||||
'100%': {
|
||||
left: '107%',
|
||||
right: '-8%'
|
||||
}
|
||||
},
|
||||
'@keyframes buffer': {
|
||||
'0%': {
|
||||
opacity: 1,
|
||||
backgroundPosition: '0 -23px'
|
||||
},
|
||||
'50%': {
|
||||
opacity: 0,
|
||||
backgroundPosition: '0 -23px'
|
||||
},
|
||||
'100%': {
|
||||
opacity: 1,
|
||||
backgroundPosition: '-200px -23px'
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
/**
|
||||
* ## ARIA
|
||||
*
|
||||
* If the progress bar is describing the loading progress of a particular region of a page,
|
||||
* you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`
|
||||
* attribute to `true` on that region until it has finished loading.
|
||||
*/
|
||||
|
||||
|
||||
exports.styles = styles;
|
||||
var LinearProgress = /*#__PURE__*/React.forwardRef(function LinearProgress(props, ref) {
|
||||
var classes = props.classes,
|
||||
className = props.className,
|
||||
_props$color = props.color,
|
||||
color = _props$color === void 0 ? 'primary' : _props$color,
|
||||
value = props.value,
|
||||
valueBuffer = props.valueBuffer,
|
||||
_props$variant = props.variant,
|
||||
variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,
|
||||
other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "color", "value", "valueBuffer", "variant"]);
|
||||
var theme = (0, _useTheme.default)();
|
||||
var rootProps = {};
|
||||
var inlineStyles = {
|
||||
bar1: {},
|
||||
bar2: {}
|
||||
};
|
||||
|
||||
if (variant === 'determinate' || variant === 'buffer') {
|
||||
if (value !== undefined) {
|
||||
rootProps['aria-valuenow'] = Math.round(value);
|
||||
rootProps['aria-valuemin'] = 0;
|
||||
rootProps['aria-valuemax'] = 100;
|
||||
var transform = value - 100;
|
||||
|
||||
if (theme.direction === 'rtl') {
|
||||
transform = -transform;
|
||||
}
|
||||
|
||||
inlineStyles.bar1.transform = "translateX(".concat(transform, "%)");
|
||||
} else if (process.env.NODE_ENV !== 'production') {
|
||||
console.error('Material-UI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');
|
||||
}
|
||||
}
|
||||
|
||||
if (variant === 'buffer') {
|
||||
if (valueBuffer !== undefined) {
|
||||
var _transform = (valueBuffer || 0) - 100;
|
||||
|
||||
if (theme.direction === 'rtl') {
|
||||
_transform = -_transform;
|
||||
}
|
||||
|
||||
inlineStyles.bar2.transform = "translateX(".concat(_transform, "%)");
|
||||
} else if (process.env.NODE_ENV !== 'production') {
|
||||
console.error('Material-UI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');
|
||||
}
|
||||
}
|
||||
|
||||
return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
|
||||
className: (0, _clsx.default)(classes.root, classes["color".concat((0, _capitalize.default)(color))], className, {
|
||||
'determinate': classes.determinate,
|
||||
'indeterminate': classes.indeterminate,
|
||||
'buffer': classes.buffer,
|
||||
'query': classes.query
|
||||
}[variant]),
|
||||
role: "progressbar"
|
||||
}, rootProps, {
|
||||
ref: ref
|
||||
}, other), variant === 'buffer' ? /*#__PURE__*/React.createElement("div", {
|
||||
className: (0, _clsx.default)(classes.dashed, classes["dashedColor".concat((0, _capitalize.default)(color))])
|
||||
}) : null, /*#__PURE__*/React.createElement("div", {
|
||||
className: (0, _clsx.default)(classes.bar, classes["barColor".concat((0, _capitalize.default)(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, {
|
||||
'determinate': classes.bar1Determinate,
|
||||
'buffer': classes.bar1Buffer
|
||||
}[variant]),
|
||||
style: inlineStyles.bar1
|
||||
}), variant === 'determinate' ? null : /*#__PURE__*/React.createElement("div", {
|
||||
className: (0, _clsx.default)(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes["color".concat((0, _capitalize.default)(color))], classes.bar2Buffer] : classes["barColor".concat((0, _capitalize.default)(color))]),
|
||||
style: inlineStyles.bar2
|
||||
}));
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? LinearProgress.propTypes = {
|
||||
// ----------------------------- Warning --------------------------------
|
||||
// | These PropTypes are generated from the TypeScript type definitions |
|
||||
// | To update them edit the d.ts file and run "yarn proptypes" |
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Override or extend the styles applied to the component.
|
||||
* See [CSS API](#css) below for more details.
|
||||
*/
|
||||
classes: _propTypes.default.object,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes.default.string,
|
||||
|
||||
/**
|
||||
* The color of the component. It supports those theme colors that make sense for this component.
|
||||
*/
|
||||
color: _propTypes.default.oneOf(['primary', 'secondary']),
|
||||
|
||||
/**
|
||||
* The value of the progress indicator for the determinate and buffer variants.
|
||||
* Value between 0 and 100.
|
||||
*/
|
||||
value: _propTypes.default.number,
|
||||
|
||||
/**
|
||||
* The value for the buffer variant.
|
||||
* Value between 0 and 100.
|
||||
*/
|
||||
valueBuffer: _propTypes.default.number,
|
||||
|
||||
/**
|
||||
* The variant to use.
|
||||
* Use indeterminate or query when there is no progress value.
|
||||
*/
|
||||
variant: _propTypes.default.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])
|
||||
} : void 0;
|
||||
|
||||
var _default = (0, _withStyles.default)(styles, {
|
||||
name: 'MuiLinearProgress'
|
||||
})(LinearProgress);
|
||||
|
||||
exports.default = _default;
|
2
web/node_modules/@material-ui/core/LinearProgress/index.d.ts
generated
vendored
Normal file
2
web/node_modules/@material-ui/core/LinearProgress/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
export { default } from './LinearProgress';
|
||||
export * from './LinearProgress';
|
15
web/node_modules/@material-ui/core/LinearProgress/index.js
generated
vendored
Normal file
15
web/node_modules/@material-ui/core/LinearProgress/index.js
generated
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _LinearProgress.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _LinearProgress = _interopRequireDefault(require("./LinearProgress"));
|
5
web/node_modules/@material-ui/core/LinearProgress/package.json
generated
vendored
Normal file
5
web/node_modules/@material-ui/core/LinearProgress/package.json
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"sideEffects": false,
|
||||
"module": "../esm/LinearProgress/index.js",
|
||||
"typings": "./index.d.ts"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue