@popmenu/common-ui 0.16.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/AudioPlayer/AudioPlayer.d.ts +3 -0
- package/build/components/AudioPlayer/AudioPlayerProps.d.ts +4 -0
- package/build/components/AudioPlayer/index.d.ts +2 -0
- package/build/components/AudioPlayer/util/audioPlayerReducer.d.ts +11 -0
- package/build/components/AudioPlayer/util/formatTime.d.ts +1 -0
- package/build/components/AudioPlayer/util/index.d.ts +5 -0
- package/build/components/AudioPlayer/util/setupAudioRef.d.ts +8 -0
- package/build/components/AudioPlayer/util/types.d.ts +77 -0
- package/build/components/AudioPlayer/util/useVolumeIcon.d.ts +2 -0
- package/build/components/Box/index.d.ts +7 -2
- package/build/components/Table/TableProps.d.ts +2 -0
- package/build/components/index.d.ts +1 -0
- package/build/index.es.js +664 -1547
- package/build/index.es.js.map +1 -1
- package/build/index.js +667 -1544
- package/build/index.js.map +1 -1
- package/package.json +3 -2
package/build/index.es.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export { default as Alert } from '@material-ui/lab/Alert';
|
|
2
|
-
import { makeStyles
|
|
3
|
-
export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Breadcrumbs, ButtonBase, ClickAwayListener, Fab, GridList, Hidden, Modal, Popover, Popper, Step, StepButton, StepConnector, StepContent, StepIcon, StepLabel, Stepper, ThemeProvider, Toolbar, alpha, createTheme, darken, decomposeColor, getLuminance, hexToRgb, lighten, makeStyles, recomposeColor, rgbToHex } from '@material-ui/core';
|
|
2
|
+
import { makeStyles, Paper as Paper$1, useTheme, Box, Popper, Grow, Slider } from '@material-ui/core';
|
|
3
|
+
export { Accordion, AccordionActions, AccordionDetails, AccordionSummary, Box, Breadcrumbs, ButtonBase, ClickAwayListener, Fab, GridList, Hidden, Modal, Popover, Popper, Step, StepButton, StepConnector, StepContent, StepIcon, StepLabel, Stepper, ThemeProvider, Toolbar, alpha, createTheme, darken, decomposeColor, getLuminance, hexToRgb, lighten, makeStyles, recomposeColor, rgbToHex } from '@material-ui/core';
|
|
4
4
|
export { default as AppBar } from '@material-ui/core/AppBar';
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import React__default, {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import React__default, { createElement, forwardRef, useRef, useState, useReducer, useEffect, useMemo, Fragment } from 'react';
|
|
7
|
+
import MuiIconButton from '@material-ui/core/IconButton';
|
|
8
|
+
import MuiTypography from '@material-ui/core/Typography';
|
|
9
|
+
import { makeStyles as makeStyles$1, useTheme as useTheme$1 } from '@material-ui/core/styles';
|
|
9
10
|
export { ServerStyleSheets } from '@material-ui/core/styles';
|
|
11
|
+
import MuiAvatar from '@material-ui/core/Avatar';
|
|
10
12
|
export { default as Badge } from '@material-ui/core/Badge';
|
|
11
13
|
import MuiButton from '@material-ui/core/Button';
|
|
12
14
|
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
@@ -23,7 +25,6 @@ import FormControlLabel from '@material-ui/core/FormControlLabel';
|
|
|
23
25
|
export { default as FormControlLabel } from '@material-ui/core/FormControlLabel';
|
|
24
26
|
export { default as Chip } from '@material-ui/core/Chip';
|
|
25
27
|
import Collapse from '@material-ui/core/Collapse';
|
|
26
|
-
import MuiTypography from '@material-ui/core/Typography';
|
|
27
28
|
export { default as Dialog } from '@material-ui/core/Dialog';
|
|
28
29
|
export { default as DialogActions } from '@material-ui/core/DialogActions';
|
|
29
30
|
export { default as DialogContent } from '@material-ui/core/DialogContent';
|
|
@@ -31,7 +32,6 @@ export { default as DialogTitle } from '@material-ui/core/DialogTitle';
|
|
|
31
32
|
export { default as Drawer } from '@material-ui/core/Drawer';
|
|
32
33
|
export { default as FormControl } from '@material-ui/core/FormControl';
|
|
33
34
|
export { default as Grid } from '@material-ui/core/Grid';
|
|
34
|
-
import MuiIconButton from '@material-ui/core/IconButton';
|
|
35
35
|
export { default as InputAdornment } from '@material-ui/core/InputAdornment';
|
|
36
36
|
export { default as LinearProgress } from '@material-ui/core/LinearProgress';
|
|
37
37
|
import MuiLink from '@material-ui/core/Link';
|
|
@@ -104,1438 +104,712 @@ function __spreadArray(to, from, pack) {
|
|
|
104
104
|
return to.concat(ar || from);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
var
|
|
108
|
-
(function (LoadingStatus) {
|
|
109
|
-
LoadingStatus["ERROR"] = "ERROR";
|
|
110
|
-
LoadingStatus["LOADED"] = "LOADED";
|
|
111
|
-
LoadingStatus["PENDING"] = "PENDING";
|
|
112
|
-
})(LoadingStatus || (LoadingStatus = {}));
|
|
113
|
-
/**
|
|
114
|
-
* Hook returns [imgProps, loaded]
|
|
115
|
-
* ref: Merged default and provided imgProp object. Includes load and error events for img tag. To be passed to MuiAvatar.
|
|
116
|
-
* loaded: Indicates whether the src supplied to an img within Avatar results in loaded or error
|
|
117
|
-
*/
|
|
118
|
-
var useImgProps = function (avatarProps) {
|
|
119
|
-
var _a = React__default.useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
120
|
-
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onError: function (event) {
|
|
121
|
-
var _a, _b;
|
|
122
|
-
setLoaded(LoadingStatus.ERROR);
|
|
123
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
124
|
-
}, onLoad: function (event) {
|
|
125
|
-
var _a, _b;
|
|
126
|
-
setLoaded(LoadingStatus.LOADED);
|
|
127
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
128
|
-
} });
|
|
129
|
-
return { imgProps: imgProps, loaded: loaded };
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
var getAvatarDimensions = function (theme, props) {
|
|
133
|
-
var factors = {
|
|
134
|
-
'extra-small': 3,
|
|
135
|
-
small: 4,
|
|
136
|
-
medium: 5,
|
|
137
|
-
large: 6,
|
|
138
|
-
'extra-large': 12.5,
|
|
139
|
-
};
|
|
140
|
-
var sizeFactor = factors[props.size || 'medium'];
|
|
141
|
-
return theme.spacing(sizeFactor);
|
|
142
|
-
};
|
|
143
|
-
var getAvatarFontSize = function (props) {
|
|
144
|
-
var fontSizes = {
|
|
145
|
-
'extra-small': '0.75rem',
|
|
146
|
-
small: '1rem',
|
|
147
|
-
medium: '1rem',
|
|
148
|
-
large: '1.25rem',
|
|
149
|
-
'extra-large': '3.5rem',
|
|
150
|
-
};
|
|
151
|
-
return fontSizes[props.size || 'medium'];
|
|
152
|
-
};
|
|
153
|
-
var getAvatarBackground = function (props) {
|
|
154
|
-
var src = props.src, loaded = props.loaded;
|
|
155
|
-
var background = props.background;
|
|
156
|
-
if (src && loaded === LoadingStatus.LOADED) {
|
|
157
|
-
background = 'transparent';
|
|
158
|
-
}
|
|
159
|
-
return background;
|
|
160
|
-
};
|
|
161
|
-
var useAvatarStyles = makeStyles(function (theme) { return ({
|
|
162
|
-
root: {
|
|
163
|
-
width: function (props) { return getAvatarDimensions(theme, props); },
|
|
164
|
-
height: function (props) { return getAvatarDimensions(theme, props); },
|
|
165
|
-
fontSize: function (props) { return getAvatarFontSize(props); },
|
|
166
|
-
backgroundColor: function (props) { return getAvatarBackground(props); },
|
|
167
|
-
color: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
168
|
-
objectFit: function (props) { return props.fit; },
|
|
169
|
-
},
|
|
170
|
-
silhouette: {
|
|
171
|
-
'& path': {
|
|
172
|
-
fill: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
}); });
|
|
176
|
-
|
|
177
|
-
var _path$2;
|
|
107
|
+
var _path$3K;
|
|
178
108
|
|
|
179
|
-
function _extends$
|
|
109
|
+
function _extends$3$() { _extends$3$ = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3$.apply(this, arguments); }
|
|
180
110
|
|
|
181
|
-
function
|
|
182
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
183
|
-
viewBox: "0 0
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
111
|
+
function SvgMore(props) {
|
|
112
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3$({
|
|
113
|
+
viewBox: "0 0 16 16",
|
|
114
|
+
strokeLinecap: "round",
|
|
115
|
+
strokeLinejoin: "round",
|
|
116
|
+
stroke: "currentColor",
|
|
117
|
+
width: "1em",
|
|
118
|
+
height: "1em",
|
|
119
|
+
fill: "none"
|
|
120
|
+
}, props), _path$3K || (_path$3K = /*#__PURE__*/React.createElement("path", {
|
|
121
|
+
d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.333A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z"
|
|
189
122
|
})));
|
|
190
123
|
}
|
|
191
124
|
|
|
192
|
-
var _path$
|
|
125
|
+
var _path$2X;
|
|
193
126
|
|
|
194
|
-
function _extends$
|
|
127
|
+
function _extends$3b() { _extends$3b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3b.apply(this, arguments); }
|
|
195
128
|
|
|
196
|
-
function
|
|
197
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
198
|
-
viewBox: "0 0
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
129
|
+
function SvgChevronDown(props) {
|
|
130
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3b({
|
|
131
|
+
viewBox: "0 0 16 16",
|
|
132
|
+
strokeLinecap: "round",
|
|
133
|
+
strokeLinejoin: "round",
|
|
134
|
+
stroke: "currentColor",
|
|
135
|
+
width: "1em",
|
|
136
|
+
height: "1em",
|
|
137
|
+
fill: "none"
|
|
138
|
+
}, props), _path$2X || (_path$2X = /*#__PURE__*/React.createElement("path", {
|
|
139
|
+
d: "M4 6l4 4 4-4"
|
|
204
140
|
})));
|
|
205
141
|
}
|
|
206
142
|
|
|
207
|
-
var _path;
|
|
143
|
+
var _path$2W;
|
|
208
144
|
|
|
209
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
145
|
+
function _extends$3a() { _extends$3a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3a.apply(this, arguments); }
|
|
210
146
|
|
|
211
|
-
function
|
|
212
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
213
|
-
viewBox: "0 0
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
147
|
+
function SvgChevronUp(props) {
|
|
148
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3a({
|
|
149
|
+
viewBox: "0 0 16 16",
|
|
150
|
+
strokeLinecap: "round",
|
|
151
|
+
strokeLinejoin: "round",
|
|
152
|
+
stroke: "currentColor",
|
|
153
|
+
width: "1em",
|
|
154
|
+
height: "1em",
|
|
155
|
+
fill: "none"
|
|
156
|
+
}, props), _path$2W || (_path$2W = /*#__PURE__*/React.createElement("path", {
|
|
157
|
+
d: "M12 10L8 6l-4 4"
|
|
221
158
|
})));
|
|
222
159
|
}
|
|
223
160
|
|
|
224
|
-
var
|
|
225
|
-
female: SvgSilhouetteFemale,
|
|
226
|
-
male: SvgSilhouetteMale,
|
|
227
|
-
neutral: SvgSilhouetteNeutral,
|
|
228
|
-
};
|
|
229
|
-
var Avatar = forwardRef(function (props, ref) {
|
|
230
|
-
var children = props.children, _a = props.silhouette, silhouette = _a === void 0 ? 'neutral' : _a, muiProps = __rest(props, ["children", "silhouette"]);
|
|
231
|
-
var _b = useImgProps(props), imgProps = _b.imgProps, loaded = _b.loaded;
|
|
232
|
-
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
233
|
-
var Silhouette = silhouettes[silhouette];
|
|
234
|
-
var fallback = muiProps.src || silhouette === 'none' ? '' : React__default.createElement(Silhouette, { className: classes.silhouette });
|
|
235
|
-
return (React__default.createElement(MuiAvatar, __assign({ ref: ref, classes: { root: classes.root } }, muiProps, imgProps), children || fallback));
|
|
236
|
-
});
|
|
237
|
-
Avatar.defaultProps = {
|
|
238
|
-
size: 'medium',
|
|
239
|
-
fit: 'cover',
|
|
240
|
-
background: '#E0E0E0',
|
|
241
|
-
silhouette: 'neutral',
|
|
242
|
-
};
|
|
243
|
-
Avatar.displayName = 'Avatar';
|
|
244
|
-
|
|
245
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
246
|
-
|
|
247
|
-
var classnames = {exports: {}};
|
|
161
|
+
var _path$1f;
|
|
248
162
|
|
|
249
|
-
|
|
250
|
-
Copyright (c) 2018 Jed Watson.
|
|
251
|
-
Licensed under the MIT License (MIT), see
|
|
252
|
-
http://jedwatson.github.io/classnames
|
|
253
|
-
*/
|
|
163
|
+
function _extends$1p() { _extends$1p = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1p.apply(this, arguments); }
|
|
254
164
|
|
|
255
|
-
|
|
256
|
-
|
|
165
|
+
function SvgPause(props) {
|
|
166
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1p({
|
|
167
|
+
viewBox: "0 0 16 16",
|
|
168
|
+
strokeLinecap: "round",
|
|
169
|
+
strokeLinejoin: "round",
|
|
170
|
+
stroke: "currentColor",
|
|
171
|
+
width: "1em",
|
|
172
|
+
height: "1em",
|
|
173
|
+
fill: "none"
|
|
174
|
+
}, props), _path$1f || (_path$1f = /*#__PURE__*/React.createElement("path", {
|
|
175
|
+
d: "M6.667 2.667H4v10.666h2.667V2.667zm5.333 0H9.333v10.666H12V2.667z"
|
|
176
|
+
})));
|
|
177
|
+
}
|
|
257
178
|
|
|
258
|
-
|
|
179
|
+
var _path$1d;
|
|
259
180
|
|
|
260
|
-
|
|
181
|
+
function _extends$1n() { _extends$1n = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1n.apply(this, arguments); }
|
|
261
182
|
|
|
262
|
-
|
|
263
|
-
|
|
183
|
+
function SvgPlay(props) {
|
|
184
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1n({
|
|
185
|
+
viewBox: "0 0 16 16",
|
|
186
|
+
strokeLinecap: "round",
|
|
187
|
+
strokeLinejoin: "round",
|
|
188
|
+
stroke: "currentColor",
|
|
189
|
+
width: "1em",
|
|
190
|
+
height: "1em",
|
|
191
|
+
fill: "none"
|
|
192
|
+
}, props), _path$1d || (_path$1d = /*#__PURE__*/React.createElement("path", {
|
|
193
|
+
d: "M3.333 2l9.334 6-9.334 6V2z"
|
|
194
|
+
})));
|
|
195
|
+
}
|
|
264
196
|
|
|
265
|
-
|
|
266
|
-
var arg = arguments[i];
|
|
267
|
-
if (!arg) continue;
|
|
197
|
+
var _path$10;
|
|
268
198
|
|
|
269
|
-
|
|
199
|
+
function _extends$1a() { _extends$1a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1a.apply(this, arguments); }
|
|
270
200
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
classes.push(key);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
} else {
|
|
288
|
-
classes.push(arg.toString());
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
201
|
+
function SvgVolumeDown(props) {
|
|
202
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1a({
|
|
203
|
+
viewBox: "0 0 16 16",
|
|
204
|
+
strokeLinecap: "round",
|
|
205
|
+
strokeLinejoin: "round",
|
|
206
|
+
stroke: "currentColor",
|
|
207
|
+
width: "1em",
|
|
208
|
+
height: "1em",
|
|
209
|
+
fill: "none"
|
|
210
|
+
}, props), _path$10 || (_path$10 = /*#__PURE__*/React.createElement("path", {
|
|
211
|
+
d: "M8.999 3.333L5.665 6H3v4h2.666L9 12.667V3.333zm3.026 2.307a3.333 3.333 0 010 4.713"
|
|
212
|
+
})));
|
|
213
|
+
}
|
|
292
214
|
|
|
293
|
-
|
|
294
|
-
}
|
|
215
|
+
var _path$$;
|
|
295
216
|
|
|
296
|
-
|
|
297
|
-
classNames.default = classNames;
|
|
298
|
-
module.exports = classNames;
|
|
299
|
-
} else {
|
|
300
|
-
window.classNames = classNames;
|
|
301
|
-
}
|
|
302
|
-
}());
|
|
303
|
-
}(classnames));
|
|
217
|
+
function _extends$19() { _extends$19 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$19.apply(this, arguments); }
|
|
304
218
|
|
|
305
|
-
|
|
219
|
+
function SvgVolumeMute(props) {
|
|
220
|
+
return /*#__PURE__*/React.createElement("svg", _extends$19({
|
|
221
|
+
viewBox: "0 0 16 16",
|
|
222
|
+
strokeLinecap: "round",
|
|
223
|
+
strokeLinejoin: "round",
|
|
224
|
+
stroke: "currentColor",
|
|
225
|
+
width: "1em",
|
|
226
|
+
height: "1em",
|
|
227
|
+
fill: "none"
|
|
228
|
+
}, props), _path$$ || (_path$$ = /*#__PURE__*/React.createElement("path", {
|
|
229
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333z"
|
|
230
|
+
})));
|
|
231
|
+
}
|
|
306
232
|
|
|
307
|
-
|
|
308
|
-
if (key in obj) {
|
|
309
|
-
Object.defineProperty(obj, key, {
|
|
310
|
-
value: value,
|
|
311
|
-
enumerable: true,
|
|
312
|
-
configurable: true,
|
|
313
|
-
writable: true
|
|
314
|
-
});
|
|
315
|
-
} else {
|
|
316
|
-
obj[key] = value;
|
|
317
|
-
}
|
|
233
|
+
var _path$_;
|
|
318
234
|
|
|
319
|
-
|
|
320
|
-
}
|
|
235
|
+
function _extends$18() { _extends$18 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$18.apply(this, arguments); }
|
|
321
236
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
* LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/
|
|
336
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
337
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
338
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
|
|
339
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
|
|
340
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
341
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
342
|
-
|
|
343
|
-
var reactIs_development = {};
|
|
344
|
-
|
|
345
|
-
/** @license React v16.13.1
|
|
346
|
-
* react-is.development.js
|
|
347
|
-
*
|
|
348
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
349
|
-
*
|
|
350
|
-
* This source code is licensed under the MIT license found in the
|
|
351
|
-
* LICENSE file in the root directory of this source tree.
|
|
352
|
-
*/
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
if (process.env.NODE_ENV !== "production") {
|
|
357
|
-
(function() {
|
|
358
|
-
|
|
359
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
360
|
-
// nor polyfill, then a plain number is used for performance.
|
|
361
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
362
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
363
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
364
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
365
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
366
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
367
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
368
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
369
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
370
|
-
|
|
371
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
372
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
373
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
374
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
375
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
376
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
377
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
378
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
379
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
380
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
381
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
382
|
-
|
|
383
|
-
function isValidElementType(type) {
|
|
384
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
385
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
237
|
+
function SvgVolumeOff(props) {
|
|
238
|
+
return /*#__PURE__*/React.createElement("svg", _extends$18({
|
|
239
|
+
viewBox: "0 0 16 16",
|
|
240
|
+
strokeLinecap: "round",
|
|
241
|
+
strokeLinejoin: "round",
|
|
242
|
+
stroke: "currentColor",
|
|
243
|
+
width: "1em",
|
|
244
|
+
height: "1em",
|
|
245
|
+
fill: "none"
|
|
246
|
+
}, props), _path$_ || (_path$_ = /*#__PURE__*/React.createElement("path", {
|
|
247
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm8 2.667l-4 4m0-4l4 4"
|
|
248
|
+
})));
|
|
386
249
|
}
|
|
387
250
|
|
|
388
|
-
|
|
389
|
-
if (typeof object === 'object' && object !== null) {
|
|
390
|
-
var $$typeof = object.$$typeof;
|
|
391
|
-
|
|
392
|
-
switch ($$typeof) {
|
|
393
|
-
case REACT_ELEMENT_TYPE:
|
|
394
|
-
var type = object.type;
|
|
395
|
-
|
|
396
|
-
switch (type) {
|
|
397
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
398
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
399
|
-
case REACT_FRAGMENT_TYPE:
|
|
400
|
-
case REACT_PROFILER_TYPE:
|
|
401
|
-
case REACT_STRICT_MODE_TYPE:
|
|
402
|
-
case REACT_SUSPENSE_TYPE:
|
|
403
|
-
return type;
|
|
404
|
-
|
|
405
|
-
default:
|
|
406
|
-
var $$typeofType = type && type.$$typeof;
|
|
407
|
-
|
|
408
|
-
switch ($$typeofType) {
|
|
409
|
-
case REACT_CONTEXT_TYPE:
|
|
410
|
-
case REACT_FORWARD_REF_TYPE:
|
|
411
|
-
case REACT_LAZY_TYPE:
|
|
412
|
-
case REACT_MEMO_TYPE:
|
|
413
|
-
case REACT_PROVIDER_TYPE:
|
|
414
|
-
return $$typeofType;
|
|
415
|
-
|
|
416
|
-
default:
|
|
417
|
-
return $$typeof;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
case REACT_PORTAL_TYPE:
|
|
423
|
-
return $$typeof;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
return undefined;
|
|
428
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
429
|
-
|
|
430
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
431
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
432
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
433
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
434
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
435
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
436
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
437
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
438
|
-
var Memo = REACT_MEMO_TYPE;
|
|
439
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
440
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
441
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
442
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
443
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
444
|
-
|
|
445
|
-
function isAsyncMode(object) {
|
|
446
|
-
{
|
|
447
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
448
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
449
|
-
|
|
450
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
455
|
-
}
|
|
456
|
-
function isConcurrentMode(object) {
|
|
457
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
458
|
-
}
|
|
459
|
-
function isContextConsumer(object) {
|
|
460
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
461
|
-
}
|
|
462
|
-
function isContextProvider(object) {
|
|
463
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
464
|
-
}
|
|
465
|
-
function isElement(object) {
|
|
466
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
467
|
-
}
|
|
468
|
-
function isForwardRef(object) {
|
|
469
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
470
|
-
}
|
|
471
|
-
function isFragment(object) {
|
|
472
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
473
|
-
}
|
|
474
|
-
function isLazy(object) {
|
|
475
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
476
|
-
}
|
|
477
|
-
function isMemo(object) {
|
|
478
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
479
|
-
}
|
|
480
|
-
function isPortal(object) {
|
|
481
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
482
|
-
}
|
|
483
|
-
function isProfiler(object) {
|
|
484
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
485
|
-
}
|
|
486
|
-
function isStrictMode(object) {
|
|
487
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
488
|
-
}
|
|
489
|
-
function isSuspense(object) {
|
|
490
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
491
|
-
}
|
|
251
|
+
var _path$Z;
|
|
492
252
|
|
|
493
|
-
|
|
494
|
-
reactIs_development.ConcurrentMode = ConcurrentMode;
|
|
495
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
496
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
497
|
-
reactIs_development.Element = Element;
|
|
498
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
499
|
-
reactIs_development.Fragment = Fragment;
|
|
500
|
-
reactIs_development.Lazy = Lazy;
|
|
501
|
-
reactIs_development.Memo = Memo;
|
|
502
|
-
reactIs_development.Portal = Portal;
|
|
503
|
-
reactIs_development.Profiler = Profiler;
|
|
504
|
-
reactIs_development.StrictMode = StrictMode;
|
|
505
|
-
reactIs_development.Suspense = Suspense;
|
|
506
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
507
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
508
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
509
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
510
|
-
reactIs_development.isElement = isElement;
|
|
511
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
512
|
-
reactIs_development.isFragment = isFragment;
|
|
513
|
-
reactIs_development.isLazy = isLazy;
|
|
514
|
-
reactIs_development.isMemo = isMemo;
|
|
515
|
-
reactIs_development.isPortal = isPortal;
|
|
516
|
-
reactIs_development.isProfiler = isProfiler;
|
|
517
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
518
|
-
reactIs_development.isSuspense = isSuspense;
|
|
519
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
520
|
-
reactIs_development.typeOf = typeOf;
|
|
521
|
-
})();
|
|
522
|
-
}
|
|
253
|
+
function _extends$17() { _extends$17 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$17.apply(this, arguments); }
|
|
523
254
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
255
|
+
function SvgVolumeUp(props) {
|
|
256
|
+
return /*#__PURE__*/React.createElement("svg", _extends$17({
|
|
257
|
+
viewBox: "0 0 16 16",
|
|
258
|
+
strokeLinecap: "round",
|
|
259
|
+
strokeLinejoin: "round",
|
|
260
|
+
stroke: "currentColor",
|
|
261
|
+
width: "1em",
|
|
262
|
+
height: "1em",
|
|
263
|
+
fill: "none"
|
|
264
|
+
}, props), _path$Z || (_path$Z = /*#__PURE__*/React.createElement("path", {
|
|
265
|
+
d: "M7.333 3.333L4 6H1.333v4H4l3.333 2.667V3.333zm5.38-.046a6.667 6.667 0 010 9.426M10.36 5.64a3.333 3.333 0 010 4.713"
|
|
266
|
+
})));
|
|
528
267
|
}
|
|
529
268
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
(
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
269
|
+
var useIconStyles = makeStyles(function (_a) {
|
|
270
|
+
var spacing = _a.spacing, palette = _a.palette;
|
|
271
|
+
var getFontSize = function (_a) {
|
|
272
|
+
var size = _a.size;
|
|
273
|
+
var sizes = {
|
|
274
|
+
inherit: 'inherit',
|
|
275
|
+
small: spacing(1.5),
|
|
276
|
+
medium: spacing(2),
|
|
277
|
+
large: spacing(2.5),
|
|
278
|
+
'extra-large': spacing(3),
|
|
279
|
+
};
|
|
280
|
+
return size ? sizes[size] : 'inherit';
|
|
281
|
+
};
|
|
282
|
+
var getColor = function (props) {
|
|
283
|
+
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
284
|
+
var value = 'inherit';
|
|
285
|
+
if (props.color) {
|
|
286
|
+
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
287
|
+
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
288
|
+
value = palette[color][variant];
|
|
289
|
+
}
|
|
290
|
+
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
291
|
+
value = props.color;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
return value;
|
|
295
|
+
};
|
|
296
|
+
return {
|
|
297
|
+
root: {
|
|
298
|
+
color: getColor,
|
|
299
|
+
fontSize: getFontSize,
|
|
300
|
+
strokeWidth: '1.3px',
|
|
301
|
+
},
|
|
302
|
+
};
|
|
303
|
+
});
|
|
547
304
|
|
|
548
|
-
|
|
549
|
-
try {
|
|
550
|
-
if (!Object.assign) {
|
|
551
|
-
return false;
|
|
552
|
-
}
|
|
305
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
553
306
|
|
|
554
|
-
|
|
307
|
+
var classnames = {exports: {}};
|
|
555
308
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
}
|
|
309
|
+
/*!
|
|
310
|
+
Copyright (c) 2018 Jed Watson.
|
|
311
|
+
Licensed under the MIT License (MIT), see
|
|
312
|
+
http://jedwatson.github.io/classnames
|
|
313
|
+
*/
|
|
562
314
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
for (var i = 0; i < 10; i++) {
|
|
566
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
567
|
-
}
|
|
568
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
569
|
-
return test2[n];
|
|
570
|
-
});
|
|
571
|
-
if (order2.join('') !== '0123456789') {
|
|
572
|
-
return false;
|
|
573
|
-
}
|
|
315
|
+
(function (module) {
|
|
316
|
+
/* global define */
|
|
574
317
|
|
|
575
|
-
|
|
576
|
-
var test3 = {};
|
|
577
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
578
|
-
test3[letter] = letter;
|
|
579
|
-
});
|
|
580
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
581
|
-
'abcdefghijklmnopqrst') {
|
|
582
|
-
return false;
|
|
583
|
-
}
|
|
318
|
+
(function () {
|
|
584
319
|
|
|
585
|
-
|
|
586
|
-
} catch (err) {
|
|
587
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
320
|
+
var hasOwn = {}.hasOwnProperty;
|
|
591
321
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
var to = toObject(target);
|
|
595
|
-
var symbols;
|
|
322
|
+
function classNames() {
|
|
323
|
+
var classes = [];
|
|
596
324
|
|
|
597
|
-
|
|
598
|
-
|
|
325
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
326
|
+
var arg = arguments[i];
|
|
327
|
+
if (!arg) continue;
|
|
599
328
|
|
|
600
|
-
|
|
601
|
-
if (hasOwnProperty.call(from, key)) {
|
|
602
|
-
to[key] = from[key];
|
|
603
|
-
}
|
|
604
|
-
}
|
|
329
|
+
var argType = typeof arg;
|
|
605
330
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
if (
|
|
610
|
-
|
|
331
|
+
if (argType === 'string' || argType === 'number') {
|
|
332
|
+
classes.push(arg);
|
|
333
|
+
} else if (Array.isArray(arg)) {
|
|
334
|
+
if (arg.length) {
|
|
335
|
+
var inner = classNames.apply(null, arg);
|
|
336
|
+
if (inner) {
|
|
337
|
+
classes.push(inner);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
} else if (argType === 'object') {
|
|
341
|
+
if (arg.toString === Object.prototype.toString) {
|
|
342
|
+
for (var key in arg) {
|
|
343
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
344
|
+
classes.push(key);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
} else {
|
|
348
|
+
classes.push(arg.toString());
|
|
611
349
|
}
|
|
612
350
|
}
|
|
613
351
|
}
|
|
614
|
-
}
|
|
615
352
|
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
621
|
-
*
|
|
622
|
-
* This source code is licensed under the MIT license found in the
|
|
623
|
-
* LICENSE file in the root directory of this source tree.
|
|
624
|
-
*/
|
|
625
|
-
|
|
626
|
-
var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
627
|
-
|
|
628
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
632
|
-
*
|
|
633
|
-
* This source code is licensed under the MIT license found in the
|
|
634
|
-
* LICENSE file in the root directory of this source tree.
|
|
635
|
-
*/
|
|
636
|
-
|
|
637
|
-
var printWarning$1 = function() {};
|
|
638
|
-
|
|
639
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
640
|
-
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
641
|
-
var loggedTypeFailures = {};
|
|
642
|
-
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
643
|
-
|
|
644
|
-
printWarning$1 = function(text) {
|
|
645
|
-
var message = 'Warning: ' + text;
|
|
646
|
-
if (typeof console !== 'undefined') {
|
|
647
|
-
console.error(message);
|
|
648
|
-
}
|
|
649
|
-
try {
|
|
650
|
-
// --- Welcome to debugging React ---
|
|
651
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
652
|
-
// to find the callsite that caused this warning to fire.
|
|
653
|
-
throw new Error(message);
|
|
654
|
-
} catch (x) {}
|
|
655
|
-
};
|
|
656
|
-
}
|
|
353
|
+
return classes.join(' ');
|
|
354
|
+
}
|
|
657
355
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
* @param {?Function} getStack Returns the component stack.
|
|
667
|
-
* @private
|
|
668
|
-
*/
|
|
669
|
-
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
670
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
671
|
-
for (var typeSpecName in typeSpecs) {
|
|
672
|
-
if (has$1(typeSpecs, typeSpecName)) {
|
|
673
|
-
var error;
|
|
674
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
675
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
676
|
-
// After these have been cleaned up, we'll let them throw.
|
|
677
|
-
try {
|
|
678
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
679
|
-
// behavior as without this statement except with a better message.
|
|
680
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
681
|
-
var err = Error(
|
|
682
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
683
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
|
|
684
|
-
);
|
|
685
|
-
err.name = 'Invariant Violation';
|
|
686
|
-
throw err;
|
|
687
|
-
}
|
|
688
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
|
|
689
|
-
} catch (ex) {
|
|
690
|
-
error = ex;
|
|
691
|
-
}
|
|
692
|
-
if (error && !(error instanceof Error)) {
|
|
693
|
-
printWarning$1(
|
|
694
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
695
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
696
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
697
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
698
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
699
|
-
'shape all require an argument).'
|
|
700
|
-
);
|
|
701
|
-
}
|
|
702
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
703
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
704
|
-
// same error.
|
|
705
|
-
loggedTypeFailures[error.message] = true;
|
|
356
|
+
if (module.exports) {
|
|
357
|
+
classNames.default = classNames;
|
|
358
|
+
module.exports = classNames;
|
|
359
|
+
} else {
|
|
360
|
+
window.classNames = classNames;
|
|
361
|
+
}
|
|
362
|
+
}());
|
|
363
|
+
}(classnames));
|
|
706
364
|
|
|
707
|
-
|
|
365
|
+
var classNames = classnames.exports;
|
|
708
366
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
}
|
|
367
|
+
var iconStaticClassName = 'pop-icon';
|
|
368
|
+
var Icon = function (props) {
|
|
369
|
+
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
370
|
+
var classes = useIconStyles(props);
|
|
371
|
+
var isValid = true;
|
|
372
|
+
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
373
|
+
isValid = false;
|
|
374
|
+
}
|
|
375
|
+
return isValid
|
|
376
|
+
? createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]) }, restProps))
|
|
377
|
+
: null;
|
|
378
|
+
};
|
|
379
|
+
Icon.defaultProps = {
|
|
380
|
+
size: 'inherit',
|
|
381
|
+
color: 'inherit',
|
|
382
|
+
};
|
|
383
|
+
Icon.displayName = 'Icon';
|
|
717
384
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
725
|
-
loggedTypeFailures = {};
|
|
726
|
-
}
|
|
385
|
+
var IconButton = forwardRef(function (props, ref) {
|
|
386
|
+
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
387
|
+
});
|
|
388
|
+
IconButton.displayName = 'IconButton';
|
|
389
|
+
IconButton.defaultProps = {
|
|
390
|
+
color: 'secondary',
|
|
727
391
|
};
|
|
728
392
|
|
|
729
|
-
var
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
printWarning = function(text) {
|
|
749
|
-
var message = 'Warning: ' + text;
|
|
750
|
-
if (typeof console !== 'undefined') {
|
|
751
|
-
console.error(message);
|
|
752
|
-
}
|
|
753
|
-
try {
|
|
754
|
-
// --- Welcome to debugging React ---
|
|
755
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
756
|
-
// to find the callsite that caused this warning to fire.
|
|
757
|
-
throw new Error(message);
|
|
758
|
-
} catch (x) {}
|
|
759
|
-
};
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
function emptyFunctionThatReturnsNull() {
|
|
763
|
-
return null;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
767
|
-
/* global Symbol */
|
|
768
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
769
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* Returns the iterator method function contained on the iterable object.
|
|
773
|
-
*
|
|
774
|
-
* Be sure to invoke the function with the iterable as context:
|
|
775
|
-
*
|
|
776
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
777
|
-
* if (iteratorFn) {
|
|
778
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
779
|
-
* ...
|
|
780
|
-
* }
|
|
781
|
-
*
|
|
782
|
-
* @param {?object} maybeIterable
|
|
783
|
-
* @return {?function}
|
|
784
|
-
*/
|
|
785
|
-
function getIteratorFn(maybeIterable) {
|
|
786
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
787
|
-
if (typeof iteratorFn === 'function') {
|
|
788
|
-
return iteratorFn;
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
/**
|
|
793
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
794
|
-
* supplied to React components. Example usage:
|
|
795
|
-
*
|
|
796
|
-
* var Props = require('ReactPropTypes');
|
|
797
|
-
* var MyArticle = React.createClass({
|
|
798
|
-
* propTypes: {
|
|
799
|
-
* // An optional string prop named "description".
|
|
800
|
-
* description: Props.string,
|
|
801
|
-
*
|
|
802
|
-
* // A required enum prop named "category".
|
|
803
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
804
|
-
*
|
|
805
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
806
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
807
|
-
* },
|
|
808
|
-
* render: function() { ... }
|
|
809
|
-
* });
|
|
810
|
-
*
|
|
811
|
-
* A more formal specification of how these methods are used:
|
|
812
|
-
*
|
|
813
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
814
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
815
|
-
*
|
|
816
|
-
* Each and every declaration produces a function with the same signature. This
|
|
817
|
-
* allows the creation of custom validation functions. For example:
|
|
818
|
-
*
|
|
819
|
-
* var MyLink = React.createClass({
|
|
820
|
-
* propTypes: {
|
|
821
|
-
* // An optional string or URI prop named "href".
|
|
822
|
-
* href: function(props, propName, componentName) {
|
|
823
|
-
* var propValue = props[propName];
|
|
824
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
825
|
-
* !(propValue instanceof URI)) {
|
|
826
|
-
* return new Error(
|
|
827
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
828
|
-
* componentName
|
|
829
|
-
* );
|
|
830
|
-
* }
|
|
831
|
-
* }
|
|
832
|
-
* },
|
|
833
|
-
* render: function() {...}
|
|
834
|
-
* });
|
|
835
|
-
*
|
|
836
|
-
* @internal
|
|
837
|
-
*/
|
|
838
|
-
|
|
839
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
840
|
-
|
|
841
|
-
// Important!
|
|
842
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
843
|
-
var ReactPropTypes = {
|
|
844
|
-
array: createPrimitiveTypeChecker('array'),
|
|
845
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
846
|
-
func: createPrimitiveTypeChecker('function'),
|
|
847
|
-
number: createPrimitiveTypeChecker('number'),
|
|
848
|
-
object: createPrimitiveTypeChecker('object'),
|
|
849
|
-
string: createPrimitiveTypeChecker('string'),
|
|
850
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
851
|
-
|
|
852
|
-
any: createAnyTypeChecker(),
|
|
853
|
-
arrayOf: createArrayOfTypeChecker,
|
|
854
|
-
element: createElementTypeChecker(),
|
|
855
|
-
elementType: createElementTypeTypeChecker(),
|
|
856
|
-
instanceOf: createInstanceTypeChecker,
|
|
857
|
-
node: createNodeChecker(),
|
|
858
|
-
objectOf: createObjectOfTypeChecker,
|
|
859
|
-
oneOf: createEnumTypeChecker,
|
|
860
|
-
oneOfType: createUnionTypeChecker,
|
|
861
|
-
shape: createShapeTypeChecker,
|
|
862
|
-
exact: createStrictShapeTypeChecker,
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
867
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
868
|
-
*/
|
|
869
|
-
/*eslint-disable no-self-compare*/
|
|
870
|
-
function is(x, y) {
|
|
871
|
-
// SameValue algorithm
|
|
872
|
-
if (x === y) {
|
|
873
|
-
// Steps 1-5, 7-10
|
|
874
|
-
// Steps 6.b-6.e: +0 != -0
|
|
875
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
876
|
-
} else {
|
|
877
|
-
// Step 6.a: NaN == NaN
|
|
878
|
-
return x !== x && y !== y;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
/*eslint-enable no-self-compare*/
|
|
882
|
-
|
|
883
|
-
/**
|
|
884
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
885
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
886
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
887
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
888
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
889
|
-
*/
|
|
890
|
-
function PropTypeError(message) {
|
|
891
|
-
this.message = message;
|
|
892
|
-
this.stack = '';
|
|
893
|
-
}
|
|
894
|
-
// Make `instanceof Error` still work for returned errors.
|
|
895
|
-
PropTypeError.prototype = Error.prototype;
|
|
896
|
-
|
|
897
|
-
function createChainableTypeChecker(validate) {
|
|
898
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
899
|
-
var manualPropTypeCallCache = {};
|
|
900
|
-
var manualPropTypeWarningCount = 0;
|
|
901
|
-
}
|
|
902
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
903
|
-
componentName = componentName || ANONYMOUS;
|
|
904
|
-
propFullName = propFullName || propName;
|
|
905
|
-
|
|
906
|
-
if (secret !== ReactPropTypesSecret$1) {
|
|
907
|
-
if (throwOnDirectAccess) {
|
|
908
|
-
// New behavior only for users of `prop-types` package
|
|
909
|
-
var err = new Error(
|
|
910
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
911
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
912
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
913
|
-
);
|
|
914
|
-
err.name = 'Invariant Violation';
|
|
915
|
-
throw err;
|
|
916
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
917
|
-
// Old behavior for people using React.PropTypes
|
|
918
|
-
var cacheKey = componentName + ':' + propName;
|
|
919
|
-
if (
|
|
920
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
921
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
922
|
-
manualPropTypeWarningCount < 3
|
|
923
|
-
) {
|
|
924
|
-
printWarning(
|
|
925
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
926
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
927
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
928
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
929
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
930
|
-
);
|
|
931
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
932
|
-
manualPropTypeWarningCount++;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
if (props[propName] == null) {
|
|
937
|
-
if (isRequired) {
|
|
938
|
-
if (props[propName] === null) {
|
|
939
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
940
|
-
}
|
|
941
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
942
|
-
}
|
|
943
|
-
return null;
|
|
944
|
-
} else {
|
|
945
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
950
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
951
|
-
|
|
952
|
-
return chainedCheckType;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
956
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
957
|
-
var propValue = props[propName];
|
|
958
|
-
var propType = getPropType(propValue);
|
|
959
|
-
if (propType !== expectedType) {
|
|
960
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
961
|
-
// check, but we can offer a more precise error message here rather than
|
|
962
|
-
// 'of type `object`'.
|
|
963
|
-
var preciseType = getPreciseType(propValue);
|
|
964
|
-
|
|
965
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
|
966
|
-
}
|
|
967
|
-
return null;
|
|
968
|
-
}
|
|
969
|
-
return createChainableTypeChecker(validate);
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
function createAnyTypeChecker() {
|
|
973
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
977
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
978
|
-
if (typeof typeChecker !== 'function') {
|
|
979
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
980
|
-
}
|
|
981
|
-
var propValue = props[propName];
|
|
982
|
-
if (!Array.isArray(propValue)) {
|
|
983
|
-
var propType = getPropType(propValue);
|
|
984
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
985
|
-
}
|
|
986
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
987
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
|
|
988
|
-
if (error instanceof Error) {
|
|
989
|
-
return error;
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
return null;
|
|
993
|
-
}
|
|
994
|
-
return createChainableTypeChecker(validate);
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
function createElementTypeChecker() {
|
|
998
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
999
|
-
var propValue = props[propName];
|
|
1000
|
-
if (!isValidElement(propValue)) {
|
|
1001
|
-
var propType = getPropType(propValue);
|
|
1002
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
1003
|
-
}
|
|
1004
|
-
return null;
|
|
1005
|
-
}
|
|
1006
|
-
return createChainableTypeChecker(validate);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
function createElementTypeTypeChecker() {
|
|
1010
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1011
|
-
var propValue = props[propName];
|
|
1012
|
-
if (!ReactIs$1.isValidElementType(propValue)) {
|
|
1013
|
-
var propType = getPropType(propValue);
|
|
1014
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
1015
|
-
}
|
|
1016
|
-
return null;
|
|
1017
|
-
}
|
|
1018
|
-
return createChainableTypeChecker(validate);
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
1022
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1023
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
1024
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1025
|
-
var actualClassName = getClassName(props[propName]);
|
|
1026
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
1027
|
-
}
|
|
1028
|
-
return null;
|
|
1029
|
-
}
|
|
1030
|
-
return createChainableTypeChecker(validate);
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
function createEnumTypeChecker(expectedValues) {
|
|
1034
|
-
if (!Array.isArray(expectedValues)) {
|
|
1035
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1036
|
-
if (arguments.length > 1) {
|
|
1037
|
-
printWarning(
|
|
1038
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
1039
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
1040
|
-
);
|
|
1041
|
-
} else {
|
|
1042
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
return emptyFunctionThatReturnsNull;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1049
|
-
var propValue = props[propName];
|
|
1050
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
1051
|
-
if (is(propValue, expectedValues[i])) {
|
|
1052
|
-
return null;
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1057
|
-
var type = getPreciseType(value);
|
|
1058
|
-
if (type === 'symbol') {
|
|
1059
|
-
return String(value);
|
|
1060
|
-
}
|
|
1061
|
-
return value;
|
|
1062
|
-
});
|
|
1063
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
1064
|
-
}
|
|
1065
|
-
return createChainableTypeChecker(validate);
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
1069
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1070
|
-
if (typeof typeChecker !== 'function') {
|
|
1071
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
1072
|
-
}
|
|
1073
|
-
var propValue = props[propName];
|
|
1074
|
-
var propType = getPropType(propValue);
|
|
1075
|
-
if (propType !== 'object') {
|
|
1076
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
1077
|
-
}
|
|
1078
|
-
for (var key in propValue) {
|
|
1079
|
-
if (has(propValue, key)) {
|
|
1080
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1081
|
-
if (error instanceof Error) {
|
|
1082
|
-
return error;
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
return null;
|
|
1087
|
-
}
|
|
1088
|
-
return createChainableTypeChecker(validate);
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1092
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1093
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
1094
|
-
return emptyFunctionThatReturnsNull;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1098
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1099
|
-
if (typeof checker !== 'function') {
|
|
1100
|
-
printWarning(
|
|
1101
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
1102
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
1103
|
-
);
|
|
1104
|
-
return emptyFunctionThatReturnsNull;
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1109
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1110
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1111
|
-
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1) == null) {
|
|
1112
|
-
return null;
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
|
1117
|
-
}
|
|
1118
|
-
return createChainableTypeChecker(validate);
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
function createNodeChecker() {
|
|
1122
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1123
|
-
if (!isNode(props[propName])) {
|
|
1124
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
1125
|
-
}
|
|
1126
|
-
return null;
|
|
1127
|
-
}
|
|
1128
|
-
return createChainableTypeChecker(validate);
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
1132
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1133
|
-
var propValue = props[propName];
|
|
1134
|
-
var propType = getPropType(propValue);
|
|
1135
|
-
if (propType !== 'object') {
|
|
1136
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1137
|
-
}
|
|
1138
|
-
for (var key in shapeTypes) {
|
|
1139
|
-
var checker = shapeTypes[key];
|
|
1140
|
-
if (!checker) {
|
|
1141
|
-
continue;
|
|
1142
|
-
}
|
|
1143
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1144
|
-
if (error) {
|
|
1145
|
-
return error;
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
return null;
|
|
1149
|
-
}
|
|
1150
|
-
return createChainableTypeChecker(validate);
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1154
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1155
|
-
var propValue = props[propName];
|
|
1156
|
-
var propType = getPropType(propValue);
|
|
1157
|
-
if (propType !== 'object') {
|
|
1158
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1159
|
-
}
|
|
1160
|
-
// We need to check all keys in case some are required but missing from
|
|
1161
|
-
// props.
|
|
1162
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
1163
|
-
for (var key in allKeys) {
|
|
1164
|
-
var checker = shapeTypes[key];
|
|
1165
|
-
if (!checker) {
|
|
1166
|
-
return new PropTypeError(
|
|
1167
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1168
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1169
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1170
|
-
);
|
|
1171
|
-
}
|
|
1172
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
|
|
1173
|
-
if (error) {
|
|
1174
|
-
return error;
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
return null;
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
return createChainableTypeChecker(validate);
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
function isNode(propValue) {
|
|
1184
|
-
switch (typeof propValue) {
|
|
1185
|
-
case 'number':
|
|
1186
|
-
case 'string':
|
|
1187
|
-
case 'undefined':
|
|
1188
|
-
return true;
|
|
1189
|
-
case 'boolean':
|
|
1190
|
-
return !propValue;
|
|
1191
|
-
case 'object':
|
|
1192
|
-
if (Array.isArray(propValue)) {
|
|
1193
|
-
return propValue.every(isNode);
|
|
1194
|
-
}
|
|
1195
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1196
|
-
return true;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1200
|
-
if (iteratorFn) {
|
|
1201
|
-
var iterator = iteratorFn.call(propValue);
|
|
1202
|
-
var step;
|
|
1203
|
-
if (iteratorFn !== propValue.entries) {
|
|
1204
|
-
while (!(step = iterator.next()).done) {
|
|
1205
|
-
if (!isNode(step.value)) {
|
|
1206
|
-
return false;
|
|
1207
|
-
}
|
|
1208
|
-
}
|
|
1209
|
-
} else {
|
|
1210
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1211
|
-
while (!(step = iterator.next()).done) {
|
|
1212
|
-
var entry = step.value;
|
|
1213
|
-
if (entry) {
|
|
1214
|
-
if (!isNode(entry[1])) {
|
|
1215
|
-
return false;
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
} else {
|
|
1221
|
-
return false;
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
return true;
|
|
1225
|
-
default:
|
|
1226
|
-
return false;
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
function isSymbol(propType, propValue) {
|
|
1231
|
-
// Native Symbol.
|
|
1232
|
-
if (propType === 'symbol') {
|
|
1233
|
-
return true;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
// falsy value can't be a Symbol
|
|
1237
|
-
if (!propValue) {
|
|
1238
|
-
return false;
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1242
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1243
|
-
return true;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1247
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1248
|
-
return true;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
return false;
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1255
|
-
function getPropType(propValue) {
|
|
1256
|
-
var propType = typeof propValue;
|
|
1257
|
-
if (Array.isArray(propValue)) {
|
|
1258
|
-
return 'array';
|
|
1259
|
-
}
|
|
1260
|
-
if (propValue instanceof RegExp) {
|
|
1261
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1262
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1263
|
-
// passes PropTypes.object.
|
|
1264
|
-
return 'object';
|
|
1265
|
-
}
|
|
1266
|
-
if (isSymbol(propType, propValue)) {
|
|
1267
|
-
return 'symbol';
|
|
1268
|
-
}
|
|
1269
|
-
return propType;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
1273
|
-
// See `createPrimitiveTypeChecker`.
|
|
1274
|
-
function getPreciseType(propValue) {
|
|
1275
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1276
|
-
return '' + propValue;
|
|
1277
|
-
}
|
|
1278
|
-
var propType = getPropType(propValue);
|
|
1279
|
-
if (propType === 'object') {
|
|
1280
|
-
if (propValue instanceof Date) {
|
|
1281
|
-
return 'date';
|
|
1282
|
-
} else if (propValue instanceof RegExp) {
|
|
1283
|
-
return 'regexp';
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
return propType;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1290
|
-
// For example, "undefined" or "of type array"
|
|
1291
|
-
function getPostfixForTypeWarning(value) {
|
|
1292
|
-
var type = getPreciseType(value);
|
|
1293
|
-
switch (type) {
|
|
1294
|
-
case 'array':
|
|
1295
|
-
case 'object':
|
|
1296
|
-
return 'an ' + type;
|
|
1297
|
-
case 'boolean':
|
|
1298
|
-
case 'date':
|
|
1299
|
-
case 'regexp':
|
|
1300
|
-
return 'a ' + type;
|
|
1301
|
-
default:
|
|
1302
|
-
return type;
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
// Returns class name of the object, if any.
|
|
1307
|
-
function getClassName(propValue) {
|
|
1308
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1309
|
-
return ANONYMOUS;
|
|
1310
|
-
}
|
|
1311
|
-
return propValue.constructor.name;
|
|
1312
|
-
}
|
|
393
|
+
var useTypographyStyles = makeStyles$1(function () {
|
|
394
|
+
var _a;
|
|
395
|
+
return ({
|
|
396
|
+
root: (_a = {},
|
|
397
|
+
_a["& ." + iconStaticClassName] = {
|
|
398
|
+
position: 'relative',
|
|
399
|
+
top: '0.125em',
|
|
400
|
+
padding: '0 0.125em',
|
|
401
|
+
boxSizing: 'content-box',
|
|
402
|
+
},
|
|
403
|
+
_a),
|
|
404
|
+
caption: {
|
|
405
|
+
display: 'inline',
|
|
406
|
+
},
|
|
407
|
+
overline: {
|
|
408
|
+
display: 'inline',
|
|
409
|
+
},
|
|
410
|
+
});
|
|
411
|
+
});
|
|
1313
412
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
413
|
+
var Typography = forwardRef(function (props, ref) {
|
|
414
|
+
var classes = useTypographyStyles(props);
|
|
415
|
+
return React__default.createElement(MuiTypography, __assign({ ref: ref, classes: classes }, props));
|
|
416
|
+
});
|
|
417
|
+
Typography.displayName = 'Typography';
|
|
1317
418
|
|
|
1318
|
-
|
|
419
|
+
var useStyles$1 = makeStyles(function (_a) {
|
|
420
|
+
var spacing = _a.spacing;
|
|
421
|
+
return ({
|
|
422
|
+
root: {
|
|
423
|
+
'&:last-child': {
|
|
424
|
+
marginBottom: 0,
|
|
425
|
+
},
|
|
426
|
+
marginBottom: spacing(4),
|
|
427
|
+
padding: spacing(4),
|
|
428
|
+
},
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
var Paper = forwardRef(function (props, ref) {
|
|
432
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
433
|
+
var classes = useStyles$1(props);
|
|
434
|
+
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
435
|
+
});
|
|
436
|
+
Paper.displayName = 'Paper';
|
|
437
|
+
Paper.defaultProps = {
|
|
438
|
+
legacyStyles: false,
|
|
1319
439
|
};
|
|
1320
440
|
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
441
|
+
var AUDIO_PLAYER_EVENT_TYPES;
|
|
442
|
+
(function (AUDIO_PLAYER_EVENT_TYPES) {
|
|
443
|
+
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_PLAYBACK"] = "TOGGLE_PLAYBACK";
|
|
444
|
+
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_VOLUME_CONTROL"] = "TOGGLE_VOLUME_CONTROL";
|
|
445
|
+
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_MUTE"] = "TOGGLE_MUTE";
|
|
446
|
+
AUDIO_PLAYER_EVENT_TYPES["VOLUME_CHANGE"] = "VOLUME_CHANGE";
|
|
447
|
+
AUDIO_PLAYER_EVENT_TYPES["TIME_CHANGE"] = "TIME_CHANGE";
|
|
448
|
+
AUDIO_PLAYER_EVENT_TYPES["DURATION_CHANGE"] = "DURATION_CHANGE";
|
|
449
|
+
AUDIO_PLAYER_EVENT_TYPES["SET_TIME"] = "SET_TIME";
|
|
450
|
+
AUDIO_PLAYER_EVENT_TYPES["CAN_PLAY"] = "CAN_PLAY";
|
|
451
|
+
AUDIO_PLAYER_EVENT_TYPES["RESET"] = "RESET";
|
|
452
|
+
})(AUDIO_PLAYER_EVENT_TYPES || (AUDIO_PLAYER_EVENT_TYPES = {}));
|
|
453
|
+
var PLAYBACK_STATES;
|
|
454
|
+
(function (PLAYBACK_STATES) {
|
|
455
|
+
PLAYBACK_STATES["NONE"] = "NONE";
|
|
456
|
+
PLAYBACK_STATES["PAUSED"] = "PAUSED";
|
|
457
|
+
PLAYBACK_STATES["PLAYING"] = "PLAYING";
|
|
458
|
+
})(PLAYBACK_STATES || (PLAYBACK_STATES = {}));
|
|
459
|
+
var CONTROL_LABELS;
|
|
460
|
+
(function (CONTROL_LABELS) {
|
|
461
|
+
CONTROL_LABELS["PAUSE"] = "PAUSE";
|
|
462
|
+
CONTROL_LABELS["PLAY"] = "PLAY";
|
|
463
|
+
CONTROL_LABELS["MUTE"] = "MUTE";
|
|
464
|
+
CONTROL_LABELS["UNMUTE"] = "UNMUTE";
|
|
465
|
+
})(CONTROL_LABELS || (CONTROL_LABELS = {}));
|
|
466
|
+
var VOLUME_CONTROL_STATES;
|
|
467
|
+
(function (VOLUME_CONTROL_STATES) {
|
|
468
|
+
VOLUME_CONTROL_STATES["SHOW"] = "SHOW";
|
|
469
|
+
VOLUME_CONTROL_STATES["HIDE"] = "HIDE";
|
|
470
|
+
})(VOLUME_CONTROL_STATES || (VOLUME_CONTROL_STATES = {}));
|
|
471
|
+
|
|
472
|
+
var initialAudioPlayerState = {
|
|
473
|
+
playback: PLAYBACK_STATES.NONE,
|
|
474
|
+
volumeControls: VOLUME_CONTROL_STATES.HIDE,
|
|
475
|
+
context: {
|
|
476
|
+
volume: 100,
|
|
477
|
+
playbackButtonLabel: CONTROL_LABELS.PLAY,
|
|
478
|
+
volumeButtonLabel: CONTROL_LABELS.MUTE,
|
|
479
|
+
},
|
|
480
|
+
};
|
|
481
|
+
var getPlayback = function (_a) {
|
|
482
|
+
var audio = _a.current;
|
|
483
|
+
var playback = PLAYBACK_STATES.NONE;
|
|
484
|
+
if (audio) {
|
|
485
|
+
var paused = audio.paused, readyState = audio.readyState;
|
|
486
|
+
if (readyState === 0) {
|
|
487
|
+
playback = PLAYBACK_STATES.NONE;
|
|
488
|
+
}
|
|
489
|
+
else if (paused) {
|
|
490
|
+
playback = PLAYBACK_STATES.PAUSED;
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
playback = PLAYBACK_STATES.PLAYING;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return playback;
|
|
497
|
+
};
|
|
498
|
+
var audioPlayerReducer = function (state, event) {
|
|
499
|
+
var _a, _b;
|
|
500
|
+
var audioRef = state.context.audioRef;
|
|
501
|
+
var nextState = __assign({}, state);
|
|
502
|
+
switch (state.playback) {
|
|
503
|
+
case PLAYBACK_STATES.NONE:
|
|
504
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY) {
|
|
505
|
+
nextState.playback = getPlayback(audioRef);
|
|
506
|
+
return nextState;
|
|
507
|
+
}
|
|
508
|
+
break;
|
|
509
|
+
case PLAYBACK_STATES.PAUSED:
|
|
510
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
511
|
+
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.play();
|
|
512
|
+
nextState.playback = getPlayback(audioRef);
|
|
513
|
+
nextState.context.playbackButtonLabel = CONTROL_LABELS.PAUSE;
|
|
514
|
+
return nextState;
|
|
515
|
+
}
|
|
516
|
+
break;
|
|
517
|
+
case PLAYBACK_STATES.PLAYING:
|
|
518
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK) {
|
|
519
|
+
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.pause();
|
|
520
|
+
nextState.playback = getPlayback(audioRef);
|
|
521
|
+
nextState.context.playbackButtonLabel = CONTROL_LABELS.PLAY;
|
|
522
|
+
return nextState;
|
|
523
|
+
}
|
|
524
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE) {
|
|
525
|
+
return nextState;
|
|
526
|
+
}
|
|
527
|
+
break;
|
|
528
|
+
}
|
|
529
|
+
switch (state.volumeControls) {
|
|
530
|
+
case VOLUME_CONTROL_STATES.SHOW:
|
|
531
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
532
|
+
nextState.volumeControls = VOLUME_CONTROL_STATES.HIDE;
|
|
533
|
+
return nextState;
|
|
534
|
+
}
|
|
535
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE) {
|
|
536
|
+
if (nextState.context.volume !== event.context.volume) {
|
|
537
|
+
nextState.context.volume = event.context.volume;
|
|
538
|
+
if (audioRef.current) {
|
|
539
|
+
audioRef.current.volume = event.context.volume;
|
|
540
|
+
}
|
|
541
|
+
return nextState;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
break;
|
|
545
|
+
case VOLUME_CONTROL_STATES.HIDE:
|
|
546
|
+
if (event.type === AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL) {
|
|
547
|
+
nextState.volumeControls = VOLUME_CONTROL_STATES.SHOW;
|
|
548
|
+
return nextState;
|
|
549
|
+
}
|
|
550
|
+
break;
|
|
551
|
+
}
|
|
552
|
+
switch (event.type) {
|
|
553
|
+
case AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE:
|
|
554
|
+
if (audioRef.current) {
|
|
555
|
+
audioRef.current.muted = !audioRef.current.muted;
|
|
556
|
+
return nextState;
|
|
557
|
+
}
|
|
558
|
+
break;
|
|
559
|
+
case AUDIO_PLAYER_EVENT_TYPES.SET_TIME:
|
|
560
|
+
if (audioRef.current) {
|
|
561
|
+
audioRef.current.currentTime = event.context.time;
|
|
562
|
+
return nextState;
|
|
563
|
+
}
|
|
564
|
+
break;
|
|
565
|
+
case AUDIO_PLAYER_EVENT_TYPES.RESET:
|
|
566
|
+
if (audioRef.current) {
|
|
567
|
+
audioRef.current.currentTime = 0;
|
|
568
|
+
nextState.playback = getPlayback(audioRef);
|
|
569
|
+
return nextState;
|
|
570
|
+
}
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
return state;
|
|
1380
574
|
};
|
|
1381
575
|
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
576
|
+
var useVolumeIcon = function (state) {
|
|
577
|
+
var volumeIcon = SvgVolumeUp;
|
|
578
|
+
if (state.context.volume >= 0.5) {
|
|
579
|
+
volumeIcon = SvgVolumeUp;
|
|
580
|
+
}
|
|
581
|
+
else if (state.context.volume < 0.5 && state.context.volume > 0) {
|
|
582
|
+
volumeIcon = SvgVolumeDown;
|
|
583
|
+
}
|
|
584
|
+
else if (state.context.volume === 0) {
|
|
585
|
+
volumeIcon = SvgVolumeMute;
|
|
586
|
+
}
|
|
587
|
+
if (state.context.audioRef.current) {
|
|
588
|
+
if (state.context.audioRef.current.muted) {
|
|
589
|
+
volumeIcon = SvgVolumeOff;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
return volumeIcon;
|
|
593
|
+
};
|
|
1388
594
|
|
|
1389
|
-
|
|
1390
|
-
|
|
595
|
+
var appendZero = function (num) { return (num < 10 ? "0" + num : num); };
|
|
596
|
+
var formatTime = function (time, remaning) {
|
|
597
|
+
if (remaning === void 0) { remaning = false; }
|
|
598
|
+
var dateTime = new Date(0, 0, 0, 0, 0, time, 0);
|
|
599
|
+
var dateTimeH = appendZero(dateTime.getHours());
|
|
600
|
+
var dateTimeM = appendZero(dateTime.getMinutes());
|
|
601
|
+
var dateTimeS = appendZero(dateTime.getSeconds());
|
|
602
|
+
var minus = remaning ? '-' : '';
|
|
603
|
+
return dateTimeH > 0 ? "" + minus + dateTimeH + ":" + dateTimeM + ":" + dateTimeS : "" + minus + dateTimeM + ":" + dateTimeS;
|
|
604
|
+
};
|
|
1391
605
|
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
606
|
+
var setupAudioRef = function (config) { return function () {
|
|
607
|
+
var _a, _b, _c, _d;
|
|
608
|
+
var audioRef = config.audioRef, send = config.send;
|
|
609
|
+
var handleDurationChange = function (event) {
|
|
610
|
+
var duration = event.target.duration;
|
|
611
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.DURATION_CHANGE, context: { duration: duration } });
|
|
612
|
+
};
|
|
613
|
+
var handleTimeUpdate = function (event) {
|
|
614
|
+
var currentTime = event.target.currentTime;
|
|
615
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.TIME_CHANGE, context: { currentTime: currentTime } });
|
|
616
|
+
};
|
|
617
|
+
var handleCanPlay = function () {
|
|
618
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.CAN_PLAY });
|
|
619
|
+
};
|
|
620
|
+
var handleEnded = function () {
|
|
621
|
+
send({ type: AUDIO_PLAYER_EVENT_TYPES.RESET });
|
|
622
|
+
};
|
|
623
|
+
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener('durationchange', handleDurationChange);
|
|
624
|
+
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.addEventListener('timeupdate', handleTimeUpdate);
|
|
625
|
+
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.addEventListener('canplay', handleCanPlay);
|
|
626
|
+
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.addEventListener('ended', handleEnded);
|
|
627
|
+
return function () {
|
|
628
|
+
var _a, _b, _c, _d;
|
|
629
|
+
(_a = audioRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('durationchange', handleDurationChange);
|
|
630
|
+
(_b = audioRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('timeupdate', handleTimeUpdate);
|
|
631
|
+
(_c = audioRef.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('canplay', handleCanPlay);
|
|
632
|
+
(_d = audioRef.current) === null || _d === void 0 ? void 0 : _d.removeEventListener('ended', handleEnded);
|
|
633
|
+
};
|
|
634
|
+
}; };
|
|
635
|
+
|
|
636
|
+
var AudioPlayer = function (props) {
|
|
637
|
+
var _a, _b, _c, _d, _f;
|
|
638
|
+
var src = props.src;
|
|
639
|
+
var volumeRef = useRef(null);
|
|
640
|
+
var audioRef = useRef(null);
|
|
641
|
+
var spacing = useTheme().spacing;
|
|
642
|
+
var _g = useState(false), disableRipple = _g[0], setDisableRipple = _g[1];
|
|
643
|
+
var _h = useReducer(audioPlayerReducer, __assign(__assign({}, initialAudioPlayerState), { context: __assign(__assign({}, initialAudioPlayerState.context), { audioRef: audioRef }) })), state = _h[0], send = _h[1];
|
|
644
|
+
useEffect(setupAudioRef({ audioRef: audioRef, send: send }), [audioRef]);
|
|
645
|
+
var PlaybackIcon = state.playback !== PLAYBACK_STATES.PAUSED ? SvgPause : SvgPlay;
|
|
646
|
+
var VolumeIcon = useMemo(function () { return useVolumeIcon(state); }, [state.context.volume, (_a = state.context.audioRef.current) === null || _a === void 0 ? void 0 : _a.muted]);
|
|
647
|
+
var togglePlayback = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_PLAYBACK }); };
|
|
648
|
+
var toggleVolumeControl = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_VOLUME_CONTROL }); };
|
|
649
|
+
var toggleMute = function () { return send({ type: AUDIO_PLAYER_EVENT_TYPES.TOGGLE_MUTE }); };
|
|
650
|
+
var setTime = function (_e, time) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.SET_TIME, context: { time: time } }); };
|
|
651
|
+
var setVolume = function (_e, volume) { return send({ type: AUDIO_PLAYER_EVENT_TYPES.VOLUME_CHANGE, context: { volume: volume } }); };
|
|
652
|
+
return (React__default.createElement(Box, { display: "flex", alignItems: "center", gridGap: spacing(1) },
|
|
653
|
+
React__default.createElement("audio", { ref: audioRef, src: src }),
|
|
654
|
+
React__default.createElement(Box, null,
|
|
655
|
+
React__default.createElement(IconButton, { "aria-label": state.context.playbackButtonLabel, disabled: state.playback === PLAYBACK_STATES.NONE, onClick: togglePlayback },
|
|
656
|
+
React__default.createElement(Icon, { icon: PlaybackIcon })),
|
|
657
|
+
React__default.createElement(IconButton, { "aria-label": state.context.volumeButtonLabel, ref: volumeRef, onClick: toggleMute, onMouseEnter: toggleVolumeControl, onMouseLeave: toggleVolumeControl, disableRipple: disableRipple },
|
|
658
|
+
React__default.createElement(Icon, { icon: VolumeIcon }),
|
|
659
|
+
React__default.createElement(Popper, { onClick: function (e) { return e.stopPropagation(); }, onMouseEnter: function () { return setDisableRipple(true); }, onMouseLeave: function () { return setDisableRipple(false); }, open: state.volumeControls === VOLUME_CONTROL_STATES.SHOW, anchorEl: function () { return volumeRef.current; }, transition: true, placement: "top" }, function (_a) {
|
|
660
|
+
var TransitionProps = _a.TransitionProps;
|
|
661
|
+
return (React__default.createElement(Grow, __assign({}, TransitionProps),
|
|
662
|
+
React__default.createElement(Paper, { elevation: 1 },
|
|
663
|
+
React__default.createElement(Box, { py: 1, height: 80 },
|
|
664
|
+
React__default.createElement(Slider, { color: "secondary", orientation: "vertical", value: state.context.volume, onChange: setVolume, max: 1, step: 0.01 })))));
|
|
665
|
+
}))),
|
|
666
|
+
React__default.createElement(Box, { display: "flex", flexGrow: 1, alignItems: "center", gridGap: spacing(1) },
|
|
667
|
+
React__default.createElement(Box, { flexBasis: 60, flexShrink: 0 },
|
|
668
|
+
React__default.createElement(Typography, null, formatTime(((_b = state.context.audioRef.current) === null || _b === void 0 ? void 0 : _b.currentTime) || 0))),
|
|
669
|
+
React__default.createElement(Slider, { color: "secondary", value: ((_c = state.context.audioRef.current) === null || _c === void 0 ? void 0 : _c.currentTime) || 0, max: ((_d = state.context.audioRef.current) === null || _d === void 0 ? void 0 : _d.duration) || 1, onChange: setTime, disabled: state.playback === PLAYBACK_STATES.NONE }),
|
|
670
|
+
React__default.createElement(Box, { flexBasis: 60, flexShrink: 0, textAlign: "end" },
|
|
671
|
+
React__default.createElement(Typography, null, formatTime(((_f = state.context.audioRef.current) === null || _f === void 0 ? void 0 : _f.duration) || 0))))));
|
|
672
|
+
};
|
|
1401
673
|
|
|
1402
|
-
var
|
|
674
|
+
var LoadingStatus;
|
|
675
|
+
(function (LoadingStatus) {
|
|
676
|
+
LoadingStatus["ERROR"] = "ERROR";
|
|
677
|
+
LoadingStatus["LOADED"] = "LOADED";
|
|
678
|
+
LoadingStatus["PENDING"] = "PENDING";
|
|
679
|
+
})(LoadingStatus || (LoadingStatus = {}));
|
|
680
|
+
/**
|
|
681
|
+
* Hook returns [imgProps, loaded]
|
|
682
|
+
* ref: Merged default and provided imgProp object. Includes load and error events for img tag. To be passed to MuiAvatar.
|
|
683
|
+
* loaded: Indicates whether the src supplied to an img within Avatar results in loaded or error
|
|
684
|
+
*/
|
|
685
|
+
var useImgProps = function (avatarProps) {
|
|
686
|
+
var _a = React__default.useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
687
|
+
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onError: function (event) {
|
|
688
|
+
var _a, _b;
|
|
689
|
+
setLoaded(LoadingStatus.ERROR);
|
|
690
|
+
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
691
|
+
}, onLoad: function (event) {
|
|
692
|
+
var _a, _b;
|
|
693
|
+
setLoaded(LoadingStatus.LOADED);
|
|
694
|
+
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
695
|
+
} });
|
|
696
|
+
return { imgProps: imgProps, loaded: loaded };
|
|
697
|
+
};
|
|
1403
698
|
|
|
1404
|
-
var
|
|
699
|
+
var getAvatarDimensions = function (theme, props) {
|
|
700
|
+
var factors = {
|
|
701
|
+
'extra-small': 3,
|
|
702
|
+
small: 4,
|
|
703
|
+
medium: 5,
|
|
704
|
+
large: 6,
|
|
705
|
+
'extra-large': 12.5,
|
|
706
|
+
};
|
|
707
|
+
var sizeFactor = factors[props.size || 'medium'];
|
|
708
|
+
return theme.spacing(sizeFactor);
|
|
709
|
+
};
|
|
710
|
+
var getAvatarFontSize = function (props) {
|
|
711
|
+
var fontSizes = {
|
|
712
|
+
'extra-small': '0.75rem',
|
|
713
|
+
small: '1rem',
|
|
714
|
+
medium: '1rem',
|
|
715
|
+
large: '1.25rem',
|
|
716
|
+
'extra-large': '3.5rem',
|
|
717
|
+
};
|
|
718
|
+
return fontSizes[props.size || 'medium'];
|
|
719
|
+
};
|
|
720
|
+
var getAvatarBackground = function (props) {
|
|
721
|
+
var src = props.src, loaded = props.loaded;
|
|
722
|
+
var background = props.background;
|
|
723
|
+
if (src && loaded === LoadingStatus.LOADED) {
|
|
724
|
+
background = 'transparent';
|
|
725
|
+
}
|
|
726
|
+
return background;
|
|
727
|
+
};
|
|
728
|
+
var useAvatarStyles = makeStyles$1(function (theme) { return ({
|
|
729
|
+
root: {
|
|
730
|
+
width: function (props) { return getAvatarDimensions(theme, props); },
|
|
731
|
+
height: function (props) { return getAvatarDimensions(theme, props); },
|
|
732
|
+
fontSize: function (props) { return getAvatarFontSize(props); },
|
|
733
|
+
backgroundColor: function (props) { return getAvatarBackground(props); },
|
|
734
|
+
color: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
735
|
+
objectFit: function (props) { return props.fit; },
|
|
736
|
+
},
|
|
737
|
+
silhouette: {
|
|
738
|
+
'& path': {
|
|
739
|
+
fill: function (props) { return theme.palette.getContrastText(props.background || '#E0E0E0'); },
|
|
740
|
+
},
|
|
741
|
+
},
|
|
742
|
+
}); });
|
|
1405
743
|
|
|
1406
|
-
|
|
1407
|
-
"@babel/helpers - typeof";
|
|
744
|
+
var _path$2;
|
|
1408
745
|
|
|
1409
|
-
|
|
1410
|
-
_typeof = function _typeof(obj) {
|
|
1411
|
-
return typeof obj;
|
|
1412
|
-
};
|
|
1413
|
-
} else {
|
|
1414
|
-
_typeof = function _typeof(obj) {
|
|
1415
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1416
|
-
};
|
|
1417
|
-
}
|
|
746
|
+
function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
1418
747
|
|
|
1419
|
-
|
|
748
|
+
function SvgSilhouetteFemale(props) {
|
|
749
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
750
|
+
viewBox: "0 0 300 300",
|
|
751
|
+
fill: "none",
|
|
752
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
753
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
754
|
+
d: "M179.417 182.917a3.362 3.362 0 00-2.951 1.076 3.461 3.461 0 00-.875 3.021c1.916 10.069 8.368 23.889 28.173 32.493 2.347 1.014 5.972 1.805 10.57 2.799 17.208 3.722 45.986 9.958 53.055 36.333a3.488 3.488 0 001.622 2.11 3.491 3.491 0 002.639.345 3.488 3.488 0 002.109-1.622 3.473 3.473 0 00.345-2.639c-8.173-30.465-40.777-37.527-58.298-41.319-4.056-.882-7.563-1.639-9.278-2.389-11.903-5.167-19.59-12.833-22.924-22.819 33.07 2.458 48.042-10.716 48.702-11.313a3.469 3.469 0 001.121-2.951 3.478 3.478 0 00-1.732-2.639c-19.084-10.903-19.084-48.577-19.084-62.764 0-39.674-26.722-71.125-60.979-71.618-.326-.011-.652-.018-.979-.021h-.007c-34.757.194-63.035 31.68-63.035 70.194 0 14.188 0 51.868-19.083 62.764a3.5 3.5 0 00-1.73 2.769 3.494 3.494 0 001.313 2.988c.959.743 22.14 16.952 48.202 12.028-3.486 9.569-11.07 16.931-22.625 21.951-1.674.73-5.007 1.528-8.868 2.445-17.64 4.194-50.48 12.007-58.702 42.687a3.481 3.481 0 00.348 2.638 3.475 3.475 0 006.368-.839c7.145-26.694 36.229-33.604 53.597-37.743 4.354-1.035 7.791-1.854 10.028-2.82 19.805-8.604 26.25-22.423 28.173-32.493a3.45 3.45 0 00-1.104-3.243 3.457 3.457 0 00-3.347-.722c-18.799 5.917-36.167-2.222-43.757-6.736 18.132-15.181 18.132-50.118 18.132-65.674 0-34.7 25.18-63.076 56.389-63.263l.736.041c30.778.438 53.986 28.236 53.986 64.667 0 15.562 0 50.576 18.208 65.757-6.271 3.583-20.569 9.382-44.458 6.521z",
|
|
755
|
+
fill: "#2E3042"
|
|
756
|
+
})));
|
|
1420
757
|
}
|
|
1421
758
|
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
var values = {
|
|
1425
|
-
xs: 0,
|
|
1426
|
-
sm: 600,
|
|
1427
|
-
md: 960,
|
|
1428
|
-
lg: 1280,
|
|
1429
|
-
xl: 1920
|
|
1430
|
-
};
|
|
1431
|
-
var defaultBreakpoints = {
|
|
1432
|
-
// Sorted ASC by size. That's important.
|
|
1433
|
-
// It can't be configured as it's used statically for propTypes.
|
|
1434
|
-
keys: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
1435
|
-
up: function up(key) {
|
|
1436
|
-
return "@media (min-width:".concat(values[key], "px)");
|
|
1437
|
-
}
|
|
1438
|
-
};
|
|
1439
|
-
function handleBreakpoints(props, propValue, styleFromPropValue) {
|
|
1440
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1441
|
-
if (!props.theme) {
|
|
1442
|
-
console.error('Material-UI: You are calling a style function without a theme value.');
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
if (Array.isArray(propValue)) {
|
|
1447
|
-
var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
|
1448
|
-
return propValue.reduce(function (acc, item, index) {
|
|
1449
|
-
acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);
|
|
1450
|
-
return acc;
|
|
1451
|
-
}, {});
|
|
1452
|
-
}
|
|
1453
|
-
|
|
1454
|
-
if (_typeof(propValue) === 'object') {
|
|
1455
|
-
var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;
|
|
1456
|
-
|
|
1457
|
-
return Object.keys(propValue).reduce(function (acc, breakpoint) {
|
|
1458
|
-
acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);
|
|
1459
|
-
return acc;
|
|
1460
|
-
}, {});
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
var output = styleFromPropValue(propValue);
|
|
1464
|
-
return output;
|
|
1465
|
-
}
|
|
759
|
+
var _path$1;
|
|
1466
760
|
|
|
1467
|
-
function
|
|
1468
|
-
if (!path || typeof path !== 'string') {
|
|
1469
|
-
return null;
|
|
1470
|
-
}
|
|
761
|
+
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
1471
762
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
763
|
+
function SvgSilhouetteMale(props) {
|
|
764
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
765
|
+
viewBox: "0 0 300 300",
|
|
766
|
+
fill: "none",
|
|
767
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
768
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
769
|
+
d: "M27.594 261.886a3.513 3.513 0 004.281-2.478c7.204-26.904 36.484-33.877 53.984-38.05 4.386-1.043 7.848-1.869 10.1-2.842 19.935-8.66 26.433-22.592 28.377-32.757a3.493 3.493 0 00-.133-1.81 3.492 3.492 0 00-1.021-1.501c-10.38-8.968-19.137-22.431-24.663-37.917a3.447 3.447 0 00-.72-1.197c-7.31-7.953-11.506-16.361-11.506-23.06 0-3.914 1.475-6.539 4.798-8.52a3.5 3.5 0 001.7-2.857c1.545-35.662 26.922-63.735 58.047-63.917l.749.049c31.279.434 56.495 29.11 57.397 65.275a3.487 3.487 0 001.245 2.584c2.189 1.855 3.211 4.207 3.211 7.4 0 5.607-2.987 12.503-8.401 19.406a3.633 3.633 0 00-.587 1.106c-5.596 17.754-15.64 33.429-27.545 43.02a3.517 3.517 0 00-1.245 3.381c1.945 10.159 8.442 24.083 28.377 32.757 2.357 1.022 6.015 1.821 10.653 2.822 17.325 3.752 46.318 10.046 53.431 36.628a3.503 3.503 0 002.926 2.562 3.494 3.494 0 003.922-3.019 3.52 3.52 0 00-.091-1.363c-8.219-30.713-41.065-37.833-58.705-41.655-4.092-.889-7.625-1.652-9.345-2.408-13.01-5.657-21.026-14.275-23.859-25.658 12.08-10.383 22.187-26.401 27.965-44.365 6.134-7.981 9.505-16.2 9.505-23.221 0-4.684-1.511-8.59-4.504-11.643-1.665-39.232-29.636-70.127-64.35-70.624L150.545 38c-34.085.182-62.175 30.264-64.63 68.818-4.379 3.22-6.603 7.736-6.603 13.47 0 8.282 4.68 18.188 12.87 27.275 5.659 15.563 14.43 29.235 24.873 38.805-2.819 11.426-10.842 20.072-23.88 25.735-1.685.735-5.043 1.541-8.932 2.465-17.773 4.228-50.843 12.104-59.125 43.034a3.501 3.501 0 002.476 4.284z",
|
|
770
|
+
fill: "#2E3042"
|
|
771
|
+
})));
|
|
1475
772
|
}
|
|
1476
773
|
|
|
1477
|
-
|
|
1478
|
-
var prop = options.prop,
|
|
1479
|
-
_options$cssProperty = options.cssProperty,
|
|
1480
|
-
cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty,
|
|
1481
|
-
themeKey = options.themeKey,
|
|
1482
|
-
transform = options.transform;
|
|
1483
|
-
|
|
1484
|
-
var fn = function fn(props) {
|
|
1485
|
-
if (props[prop] == null) {
|
|
1486
|
-
return null;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
var propValue = props[prop];
|
|
1490
|
-
var theme = props.theme;
|
|
1491
|
-
var themeMapping = getPath(theme, themeKey) || {};
|
|
1492
|
-
|
|
1493
|
-
var styleFromPropValue = function styleFromPropValue(propValueFinal) {
|
|
1494
|
-
var value;
|
|
1495
|
-
|
|
1496
|
-
if (typeof themeMapping === 'function') {
|
|
1497
|
-
value = themeMapping(propValueFinal);
|
|
1498
|
-
} else if (Array.isArray(themeMapping)) {
|
|
1499
|
-
value = themeMapping[propValueFinal] || propValueFinal;
|
|
1500
|
-
} else {
|
|
1501
|
-
value = getPath(themeMapping, propValueFinal) || propValueFinal;
|
|
1502
|
-
|
|
1503
|
-
if (transform) {
|
|
1504
|
-
value = transform(value);
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
if (cssProperty === false) {
|
|
1509
|
-
return value;
|
|
1510
|
-
}
|
|
1511
|
-
|
|
1512
|
-
return _defineProperty({}, cssProperty, value);
|
|
1513
|
-
};
|
|
774
|
+
var _path;
|
|
1514
775
|
|
|
1515
|
-
|
|
1516
|
-
};
|
|
776
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
1517
777
|
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
778
|
+
function SvgSilhouetteNeutral(props) {
|
|
779
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
780
|
+
viewBox: "0 0 300 300",
|
|
781
|
+
fill: "none",
|
|
782
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
783
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
784
|
+
fillRule: "evenodd",
|
|
785
|
+
clipRule: "evenodd",
|
|
786
|
+
d: "M209 121c0 32.585-26.415 59-59 59s-59-26.415-59-59 26.415-59 59-59 59 26.415 59 59zm8 0c0 37.003-29.997 67-67 67s-67-29.997-67-67 29.997-67 67-67 67 29.997 67 67zm35 137.333V284h8v-25.667c0-13.614-5.821-26.671-16.182-36.298C233.456 212.408 219.403 207 204.75 207H94.25c-14.653 0-28.706 5.408-39.068 15.035C44.821 231.662 39 244.719 39 258.333V284h8v-25.667c0-11.295 4.824-22.257 13.628-30.437C69.45 219.698 81.537 215 94.25 215h110.5c12.714 0 24.799 4.698 33.622 12.896 8.804 8.18 13.628 19.142 13.628 30.437z",
|
|
787
|
+
fill: "#2E3042"
|
|
788
|
+
})));
|
|
1521
789
|
}
|
|
1522
790
|
|
|
1523
|
-
var
|
|
1524
|
-
|
|
1525
|
-
|
|
791
|
+
var silhouettes = {
|
|
792
|
+
female: SvgSilhouetteFemale,
|
|
793
|
+
male: SvgSilhouetteMale,
|
|
794
|
+
neutral: SvgSilhouetteNeutral,
|
|
795
|
+
};
|
|
796
|
+
var Avatar = forwardRef(function (props, ref) {
|
|
797
|
+
var children = props.children, _a = props.silhouette, silhouette = _a === void 0 ? 'neutral' : _a, muiProps = __rest(props, ["children", "silhouette"]);
|
|
798
|
+
var _b = useImgProps(props), imgProps = _b.imgProps, loaded = _b.loaded;
|
|
799
|
+
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
800
|
+
var Silhouette = silhouettes[silhouette];
|
|
801
|
+
var fallback = muiProps.src || silhouette === 'none' ? '' : React__default.createElement(Silhouette, { className: classes.silhouette });
|
|
802
|
+
return (React__default.createElement(MuiAvatar, __assign({ ref: ref, classes: { root: classes.root } }, muiProps, imgProps), children || fallback));
|
|
1526
803
|
});
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
var className = props.className; props.gap; var restProps = __rest(props, ["className", "gap"]);
|
|
1533
|
-
var root = useBoxStyles(props).root;
|
|
1534
|
-
return React__default.createElement(Box$1, __assign({ className: classNames(root, className) }, restProps));
|
|
804
|
+
Avatar.defaultProps = {
|
|
805
|
+
size: 'medium',
|
|
806
|
+
fit: 'cover',
|
|
807
|
+
background: '#E0E0E0',
|
|
808
|
+
silhouette: 'neutral',
|
|
1535
809
|
};
|
|
1536
|
-
|
|
810
|
+
Avatar.displayName = 'Avatar';
|
|
1537
811
|
|
|
1538
|
-
var useButtonStyles = makeStyles(function () { return ({
|
|
812
|
+
var useButtonStyles = makeStyles$1(function () { return ({
|
|
1539
813
|
root: {
|
|
1540
814
|
minWidth: 'unset',
|
|
1541
815
|
},
|
|
@@ -1551,7 +825,7 @@ var Button = forwardRef(function (props, ref) {
|
|
|
1551
825
|
props.textTransform; var loading = props.loading, classesOverride = props.classes, className = props.className, muiProps = __rest(props, ["textTransform", "loading", "classes", "className"]);
|
|
1552
826
|
props.classes; var styleProps = __rest(props, ["classes"]);
|
|
1553
827
|
var classes = useButtonStyles(styleProps);
|
|
1554
|
-
var typography = useTheme().typography;
|
|
828
|
+
var typography = useTheme$1().typography;
|
|
1555
829
|
var loadingIndicator = {
|
|
1556
830
|
startIcon: React__default.createElement(CircularProgress, { color: "inherit", size: typography.button.fontSize }),
|
|
1557
831
|
disabled: true,
|
|
@@ -1567,93 +841,13 @@ var Checkbox = forwardRef(function (props, ref) {
|
|
|
1567
841
|
});
|
|
1568
842
|
Checkbox.displayName = 'Checkbox';
|
|
1569
843
|
|
|
1570
|
-
var useIconStyles = makeStyles$1(function (_a) {
|
|
1571
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
1572
|
-
var getFontSize = function (_a) {
|
|
1573
|
-
var size = _a.size;
|
|
1574
|
-
var sizes = {
|
|
1575
|
-
inherit: 'inherit',
|
|
1576
|
-
small: spacing(1.5),
|
|
1577
|
-
medium: spacing(2),
|
|
1578
|
-
large: spacing(2.5),
|
|
1579
|
-
'extra-large': spacing(3),
|
|
1580
|
-
};
|
|
1581
|
-
return size ? sizes[size] : 'inherit';
|
|
1582
|
-
};
|
|
1583
|
-
var getColor = function (props) {
|
|
1584
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
1585
|
-
var value = 'inherit';
|
|
1586
|
-
if (props.color) {
|
|
1587
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
1588
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
1589
|
-
value = palette[color][variant];
|
|
1590
|
-
}
|
|
1591
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
1592
|
-
value = props.color;
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
return value;
|
|
1596
|
-
};
|
|
1597
|
-
return {
|
|
1598
|
-
root: {
|
|
1599
|
-
color: getColor,
|
|
1600
|
-
fontSize: getFontSize,
|
|
1601
|
-
strokeWidth: '1.3px',
|
|
1602
|
-
},
|
|
1603
|
-
};
|
|
1604
|
-
});
|
|
1605
|
-
|
|
1606
|
-
var iconStaticClassName = 'pop-icon';
|
|
1607
|
-
var Icon = function (props) {
|
|
1608
|
-
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
1609
|
-
var classes = useIconStyles(props);
|
|
1610
|
-
var isValid = true;
|
|
1611
|
-
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
1612
|
-
isValid = false;
|
|
1613
|
-
}
|
|
1614
|
-
return isValid
|
|
1615
|
-
? createElement(icon, __assign({ className: classNames([classes.root, iconStaticClassName, className]) }, restProps))
|
|
1616
|
-
: null;
|
|
1617
|
-
};
|
|
1618
|
-
Icon.defaultProps = {
|
|
1619
|
-
size: 'inherit',
|
|
1620
|
-
color: 'inherit',
|
|
1621
|
-
};
|
|
1622
|
-
Icon.displayName = 'Icon';
|
|
1623
|
-
|
|
1624
|
-
var useTypographyStyles = makeStyles(function () {
|
|
1625
|
-
var _a;
|
|
1626
|
-
return ({
|
|
1627
|
-
root: (_a = {},
|
|
1628
|
-
_a["& ." + iconStaticClassName] = {
|
|
1629
|
-
position: 'relative',
|
|
1630
|
-
top: '0.125em',
|
|
1631
|
-
padding: '0 0.125em',
|
|
1632
|
-
boxSizing: 'content-box',
|
|
1633
|
-
},
|
|
1634
|
-
_a),
|
|
1635
|
-
caption: {
|
|
1636
|
-
display: 'inline',
|
|
1637
|
-
},
|
|
1638
|
-
overline: {
|
|
1639
|
-
display: 'inline',
|
|
1640
|
-
},
|
|
1641
|
-
});
|
|
1642
|
-
});
|
|
1643
|
-
|
|
1644
|
-
var Typography = forwardRef(function (props, ref) {
|
|
1645
|
-
var classes = useTypographyStyles(props);
|
|
1646
|
-
return React__default.createElement(MuiTypography, __assign({ ref: ref, classes: classes }, props));
|
|
1647
|
-
});
|
|
1648
|
-
Typography.displayName = 'Typography';
|
|
1649
|
-
|
|
1650
844
|
var getFadeStop = function (_a, typographyVariant) {
|
|
1651
845
|
var typography = _a.typography;
|
|
1652
846
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
1653
847
|
? typography[typographyVariant].lineHeight + "rem"
|
|
1654
848
|
: typography[typographyVariant].lineHeight;
|
|
1655
849
|
};
|
|
1656
|
-
var useCollapsibleTextStyles = makeStyles
|
|
850
|
+
var useCollapsibleTextStyles = makeStyles(function (theme) { return ({
|
|
1657
851
|
overlay: {
|
|
1658
852
|
position: 'absolute',
|
|
1659
853
|
top: 0,
|
|
@@ -1668,7 +862,7 @@ var CollapsibleText = function (props) {
|
|
|
1668
862
|
var _a = props, text = _a.text, open = _a.open, previewLines = _a.previewLines, _b = _a.typographyVariant, typographyVariant = _b === void 0 ? 'body1' : _b, collapsible = _a.collapsible, setCollapsible = _a.setCollapsible;
|
|
1669
863
|
var classes = useCollapsibleTextStyles(props);
|
|
1670
864
|
var typographyRef = useRef(null);
|
|
1671
|
-
var typography = useTheme
|
|
865
|
+
var typography = useTheme().typography;
|
|
1672
866
|
var collapsedSize = previewLines * parseFloat(typography[typographyVariant].lineHeight);
|
|
1673
867
|
useEffect(function () {
|
|
1674
868
|
var typographyNode = typographyRef.current;
|
|
@@ -1703,7 +897,7 @@ var SemanticColors;
|
|
|
1703
897
|
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
1704
898
|
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
1705
899
|
})(SemanticColors || (SemanticColors = {}));
|
|
1706
|
-
var useStyles
|
|
900
|
+
var useStyles = makeStyles(function (theme) { return ({
|
|
1707
901
|
dividerRoot: {
|
|
1708
902
|
gap: theme.spacing(2),
|
|
1709
903
|
},
|
|
@@ -1741,7 +935,7 @@ var useStyles$1 = makeStyles$1(function (theme) { return ({
|
|
|
1741
935
|
}); });
|
|
1742
936
|
var Divider = function (props) {
|
|
1743
937
|
var className = props.className, text = props.text, textTransform = props.textTransform, TypographyProps = props.TypographyProps;
|
|
1744
|
-
var classes = useStyles
|
|
938
|
+
var classes = useStyles(props);
|
|
1745
939
|
var casingOffset = textTransform === 'lowercase' ? '.25rem' : 'unset';
|
|
1746
940
|
return (React__default.createElement(Box, { className: classNames([classes.dividerRoot, className]), display: "flex", alignItems: "center" },
|
|
1747
941
|
React__default.createElement(Box, { className: classes.dividerLine, display: "flex", flexGrow: 1, height: "1px", marginTop: casingOffset }),
|
|
@@ -1754,14 +948,6 @@ Divider.defaultProps = {
|
|
|
1754
948
|
textTransform: 'lowercase',
|
|
1755
949
|
};
|
|
1756
950
|
|
|
1757
|
-
var IconButton = forwardRef(function (props, ref) {
|
|
1758
|
-
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
1759
|
-
});
|
|
1760
|
-
IconButton.displayName = 'IconButton';
|
|
1761
|
-
IconButton.defaultProps = {
|
|
1762
|
-
color: 'secondary',
|
|
1763
|
-
};
|
|
1764
|
-
|
|
1765
951
|
var getLinkColor = function (_a, _b) {
|
|
1766
952
|
var palette = _a.palette;
|
|
1767
953
|
var _c = _b.color, color = _c === void 0 ? 'info' : _c;
|
|
@@ -1777,7 +963,7 @@ var getLinkColor = function (_a, _b) {
|
|
|
1777
963
|
}
|
|
1778
964
|
return resolved;
|
|
1779
965
|
};
|
|
1780
|
-
var useLinkStyles = makeStyles(function (theme) {
|
|
966
|
+
var useLinkStyles = makeStyles$1(function (theme) {
|
|
1781
967
|
var _a;
|
|
1782
968
|
return ({
|
|
1783
969
|
root: (_a = {
|
|
@@ -1802,28 +988,6 @@ Link.defaultProps = {
|
|
|
1802
988
|
};
|
|
1803
989
|
Link.displayName = 'Link';
|
|
1804
990
|
|
|
1805
|
-
var useStyles = makeStyles$1(function (_a) {
|
|
1806
|
-
var spacing = _a.spacing;
|
|
1807
|
-
return ({
|
|
1808
|
-
root: {
|
|
1809
|
-
'&:last-child': {
|
|
1810
|
-
marginBottom: 0,
|
|
1811
|
-
},
|
|
1812
|
-
marginBottom: spacing(4),
|
|
1813
|
-
padding: spacing(4),
|
|
1814
|
-
},
|
|
1815
|
-
});
|
|
1816
|
-
});
|
|
1817
|
-
var Paper = forwardRef(function (props, ref) {
|
|
1818
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
1819
|
-
var classes = useStyles(props);
|
|
1820
|
-
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
1821
|
-
});
|
|
1822
|
-
Paper.displayName = 'Paper';
|
|
1823
|
-
Paper.defaultProps = {
|
|
1824
|
-
legacyStyles: false,
|
|
1825
|
-
};
|
|
1826
|
-
|
|
1827
991
|
var PaperContent = function (props) {
|
|
1828
992
|
var children = props.children;
|
|
1829
993
|
return React__default.createElement(Box, { padding: 4 }, children);
|
|
@@ -1836,7 +1000,7 @@ var Radio = forwardRef(function (props, ref) {
|
|
|
1836
1000
|
});
|
|
1837
1001
|
Radio.displayName = 'Radio';
|
|
1838
1002
|
|
|
1839
|
-
var useSplitInputStyles = makeStyles(function () { return ({
|
|
1003
|
+
var useSplitInputStyles = makeStyles$1(function () { return ({
|
|
1840
1004
|
textfield: {
|
|
1841
1005
|
background: function (props) { return (props.backgroundTransparency ? '#FFFFFF44' : 'none'); },
|
|
1842
1006
|
borderTopLeftRadius: 4,
|
|
@@ -1874,7 +1038,7 @@ SplitInput.defaultProps = {
|
|
|
1874
1038
|
color: 'primary',
|
|
1875
1039
|
};
|
|
1876
1040
|
|
|
1877
|
-
var useSwitchStyles = makeStyles(function (theme) { return ({
|
|
1041
|
+
var useSwitchStyles = makeStyles$1(function (theme) { return ({
|
|
1878
1042
|
checked: {
|
|
1879
1043
|
'& $thumb': {
|
|
1880
1044
|
background: theme.palette.success.main,
|
|
@@ -6506,7 +5670,7 @@ var getWidth = function (props) {
|
|
|
6506
5670
|
}
|
|
6507
5671
|
return width;
|
|
6508
5672
|
};
|
|
6509
|
-
var useTableHeaderCellStyles = makeStyles
|
|
5673
|
+
var useTableHeaderCellStyles = makeStyles(function (theme) { return ({
|
|
6510
5674
|
root: function (props) {
|
|
6511
5675
|
var width = getWidth(props);
|
|
6512
5676
|
return {
|
|
@@ -6521,69 +5685,15 @@ var useTableHeaderCellStyles = makeStyles$1(function (theme) { return ({
|
|
|
6521
5685
|
},
|
|
6522
5686
|
}); });
|
|
6523
5687
|
|
|
6524
|
-
var _path$3K;
|
|
6525
|
-
|
|
6526
|
-
function _extends$3$() { _extends$3$ = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3$.apply(this, arguments); }
|
|
6527
|
-
|
|
6528
|
-
function SvgMore(props) {
|
|
6529
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3$({
|
|
6530
|
-
viewBox: "0 0 16 16",
|
|
6531
|
-
strokeLinecap: "round",
|
|
6532
|
-
strokeLinejoin: "round",
|
|
6533
|
-
stroke: "currentColor",
|
|
6534
|
-
width: "1em",
|
|
6535
|
-
height: "1em",
|
|
6536
|
-
fill: "none"
|
|
6537
|
-
}, props), _path$3K || (_path$3K = /*#__PURE__*/React.createElement("path", {
|
|
6538
|
-
d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.333A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z"
|
|
6539
|
-
})));
|
|
6540
|
-
}
|
|
6541
|
-
|
|
6542
|
-
var _path$2X;
|
|
6543
|
-
|
|
6544
|
-
function _extends$3b() { _extends$3b = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3b.apply(this, arguments); }
|
|
6545
|
-
|
|
6546
|
-
function SvgChevronDown(props) {
|
|
6547
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3b({
|
|
6548
|
-
viewBox: "0 0 16 16",
|
|
6549
|
-
strokeLinecap: "round",
|
|
6550
|
-
strokeLinejoin: "round",
|
|
6551
|
-
stroke: "currentColor",
|
|
6552
|
-
width: "1em",
|
|
6553
|
-
height: "1em",
|
|
6554
|
-
fill: "none"
|
|
6555
|
-
}, props), _path$2X || (_path$2X = /*#__PURE__*/React.createElement("path", {
|
|
6556
|
-
d: "M4 6l4 4 4-4"
|
|
6557
|
-
})));
|
|
6558
|
-
}
|
|
6559
|
-
|
|
6560
|
-
var _path$2W;
|
|
6561
|
-
|
|
6562
|
-
function _extends$3a() { _extends$3a = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3a.apply(this, arguments); }
|
|
6563
|
-
|
|
6564
|
-
function SvgChevronUp(props) {
|
|
6565
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3a({
|
|
6566
|
-
viewBox: "0 0 16 16",
|
|
6567
|
-
strokeLinecap: "round",
|
|
6568
|
-
strokeLinejoin: "round",
|
|
6569
|
-
stroke: "currentColor",
|
|
6570
|
-
width: "1em",
|
|
6571
|
-
height: "1em",
|
|
6572
|
-
fill: "none"
|
|
6573
|
-
}, props), _path$2W || (_path$2W = /*#__PURE__*/React.createElement("path", {
|
|
6574
|
-
d: "M12 10L8 6l-4 4"
|
|
6575
|
-
})));
|
|
6576
|
-
}
|
|
6577
|
-
|
|
6578
5688
|
var TableHeaderCell = function (props) {
|
|
6579
5689
|
var children = props.children, column = props.column; props.tableProps; var restProps = __rest(props, ["children", "column", "tableProps"]);
|
|
6580
5690
|
var root = useTableHeaderCellStyles(props).root;
|
|
6581
|
-
var
|
|
5691
|
+
var _a = useTheme(), palette = _a.palette, spacing = _a.spacing;
|
|
6582
5692
|
//@ts-expect-error @types/react-table issue
|
|
6583
5693
|
var canSort = column.canSort, isSorted = column.isSorted, isSortedDesc = column.isSortedDesc, isActionColumn = column.isActionColumn;
|
|
6584
5694
|
var showSortIndicator = canSort && !isActionColumn;
|
|
6585
5695
|
return (React__default.createElement("th", __assign({ className: root }, restProps),
|
|
6586
|
-
React__default.createElement(Box, { display: "flex", alignItems: "center",
|
|
5696
|
+
React__default.createElement(Box, { display: "flex", alignItems: "center", gridGap: spacing(1) },
|
|
6587
5697
|
children,
|
|
6588
5698
|
showSortIndicator && (React__default.createElement(Icon, { icon: isSortedDesc ? SvgChevronDown : SvgChevronUp, color: isSorted ? palette.text.primary : palette.text.disabled, size: "large" })))));
|
|
6589
5699
|
};
|
|
@@ -6593,7 +5703,7 @@ var TableHeaderRow = function (props) {
|
|
|
6593
5703
|
return React__default.createElement("tr", __assign({}, restProps), children);
|
|
6594
5704
|
};
|
|
6595
5705
|
|
|
6596
|
-
var useTableRowStyles = makeStyles
|
|
5706
|
+
var useTableRowStyles = makeStyles(function (theme) { return ({
|
|
6597
5707
|
root: function () { return ({
|
|
6598
5708
|
'&:nth-child(even)': {
|
|
6599
5709
|
backgroundColor: theme.palette.grey[100],
|
|
@@ -6612,7 +5722,7 @@ var TableBody = function (props) {
|
|
|
6612
5722
|
return React__default.createElement("tbody", __assign({}, restProps), children);
|
|
6613
5723
|
};
|
|
6614
5724
|
|
|
6615
|
-
var useTableCellStyles = makeStyles
|
|
5725
|
+
var useTableCellStyles = makeStyles(function (theme) { return ({
|
|
6616
5726
|
root: function () { return ({
|
|
6617
5727
|
padding: theme.spacing(2),
|
|
6618
5728
|
}); },
|
|
@@ -6624,7 +5734,7 @@ var TableCell = function (props) {
|
|
|
6624
5734
|
return (React__default.createElement("td", __assign({ className: root }, restProps), children));
|
|
6625
5735
|
};
|
|
6626
5736
|
|
|
6627
|
-
var useTableStyles = makeStyles
|
|
5737
|
+
var useTableStyles = makeStyles(function (_a) {
|
|
6628
5738
|
var typography = _a.typography;
|
|
6629
5739
|
return ({
|
|
6630
5740
|
root: function (_a) {
|
|
@@ -6640,14 +5750,16 @@ var useTableStyles = makeStyles$1(function (_a) {
|
|
|
6640
5750
|
},
|
|
6641
5751
|
tableWrap: function () { return ({
|
|
6642
5752
|
maxWidth: '100%',
|
|
6643
|
-
overflowX: '
|
|
5753
|
+
overflowX: 'auto',
|
|
6644
5754
|
overflowY: 'hidden',
|
|
6645
5755
|
}); },
|
|
6646
5756
|
});
|
|
6647
5757
|
});
|
|
6648
5758
|
|
|
6649
5759
|
var TableActionsCell = function (props) {
|
|
6650
|
-
var _a = props.actions, primary = _a.primary, secondary = _a.secondary,
|
|
5760
|
+
var _a = props.actions, primary = _a.primary, secondary = _a.secondary, intermediate = __rest(_a, ["primary", "secondary"]);
|
|
5761
|
+
var tertiary = intermediate.tertiary, restActions = __rest(intermediate, ["tertiary"]);
|
|
5762
|
+
var overflow = Object.keys(props.actions).length > 3;
|
|
6651
5763
|
var _b = React__default.useState(null), anchorEl = _b[0], setAnchorEl = _b[1];
|
|
6652
5764
|
var openMenu = function (event) {
|
|
6653
5765
|
setAnchorEl(event.currentTarget);
|
|
@@ -6664,10 +5776,14 @@ var TableActionsCell = function (props) {
|
|
|
6664
5776
|
React__default.createElement(Icon, { icon: primary.icon }))),
|
|
6665
5777
|
secondary && secondary.icon && (React__default.createElement(IconButton, { size: "small", onClick: function () { return secondary.action(props.cell); } },
|
|
6666
5778
|
React__default.createElement(Icon, { icon: secondary.icon }))),
|
|
6667
|
-
|
|
5779
|
+
!overflow && tertiary && tertiary.icon && (React__default.createElement(IconButton, { size: "small", onClick: function () { return tertiary.action(props.cell); } },
|
|
5780
|
+
React__default.createElement(Icon, { icon: tertiary.icon }))),
|
|
5781
|
+
overflow && restActions && (React__default.createElement(React__default.Fragment, null,
|
|
6668
5782
|
React__default.createElement(IconButton, { size: "small", onClick: openMenu },
|
|
6669
5783
|
React__default.createElement(Icon, { icon: SvgMore })),
|
|
6670
|
-
React__default.createElement(Menu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: closeMenu }, Object.values(
|
|
5784
|
+
React__default.createElement(Menu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: closeMenu }, Object.values(__assign({ tertiary: tertiary }, restActions))
|
|
5785
|
+
.filter(function (value) { return value; })
|
|
5786
|
+
.map(function (_a, i) {
|
|
6671
5787
|
var label = _a.label, action = _a.action;
|
|
6672
5788
|
return (React__default.createElement(MenuItem, { key: i, onClick: function () { return handleItemClick(action); } }, label));
|
|
6673
5789
|
}))))));
|
|
@@ -6692,7 +5808,7 @@ var makeColumns = function (config) {
|
|
|
6692
5808
|
/* eslint-disable react/jsx-key */
|
|
6693
5809
|
var Table = function (props) {
|
|
6694
5810
|
var actionColumnId = 'table-actions-column';
|
|
6695
|
-
var rawColumns = props.columns, data = props.data, actions = props.actions, sortable = props.sortable, emptyMessage = props.emptyMessage, EmptyImage = props.EmptyImage, isLoading = props.loading;
|
|
5811
|
+
var rawColumns = props.columns, data = props.data, actions = props.actions, sortable = props.sortable, emptyMessage = props.emptyMessage, EmptyImage = props.EmptyImage, isLoading = props.loading, enableMinHeight = props.enableMinHeight;
|
|
6696
5812
|
var classes = useTableStyles(props);
|
|
6697
5813
|
var columns = useMemo(function () { return makeColumns({ columns: rawColumns, actions: actions, actionColumnId: actionColumnId }); }, [rawColumns, actions]);
|
|
6698
5814
|
// @ts-expect-error @types/react-table issue
|
|
@@ -6704,8 +5820,8 @@ var Table = function (props) {
|
|
|
6704
5820
|
var handlePagination = function (_e, pageNumber) {
|
|
6705
5821
|
gotoPage(pageNumber - 1);
|
|
6706
5822
|
};
|
|
6707
|
-
return (React__default.createElement(Box, { className: classes.root, minHeight:
|
|
6708
|
-
React__default.createElement(Box, { className: classes.tableWrap },
|
|
5823
|
+
return (React__default.createElement(Box, { className: classes.root, minHeight: (isLoading || isEmpty) && enableMinHeight ? 618 : 'unset' },
|
|
5824
|
+
React__default.createElement(Box, { className: classes.tableWrap, minHeight: page.length > 0 && !isLoading && enableMinHeight ? 618 : 'unset' },
|
|
6709
5825
|
React__default.createElement("table", __assign({ className: classes.table }, getTableProps()),
|
|
6710
5826
|
React__default.createElement(TableHeader, null, headerGroups.map(function (headerGroup) { return (React__default.createElement(TableHeaderRow, __assign({}, headerGroup.getHeaderGroupProps()), headerGroup.headers.map(function (column) { return (React__default.createElement(TableHeaderCell
|
|
6711
5827
|
// @ts-expect-error @types/react-table issue
|
|
@@ -6724,9 +5840,10 @@ var Table = function (props) {
|
|
|
6724
5840
|
};
|
|
6725
5841
|
Table.defaultProps = {
|
|
6726
5842
|
emptyMessage: 'No results.',
|
|
5843
|
+
enableMinHeight: true,
|
|
6727
5844
|
};
|
|
6728
5845
|
|
|
6729
|
-
var useToggleButtonStyles = makeStyles(function (theme) { return ({
|
|
5846
|
+
var useToggleButtonStyles = makeStyles$1(function (theme) { return ({
|
|
6730
5847
|
root: {
|
|
6731
5848
|
color: theme.palette.text.primary,
|
|
6732
5849
|
},
|
|
@@ -6754,7 +5871,7 @@ ToggleButton.defaultProps = {
|
|
|
6754
5871
|
};
|
|
6755
5872
|
ToggleButton.displayName = 'ToggleButton';
|
|
6756
5873
|
|
|
6757
|
-
var useToggleButtonGroupStyles = makeStyles(function (theme) { return ({
|
|
5874
|
+
var useToggleButtonGroupStyles = makeStyles$1(function (theme) { return ({
|
|
6758
5875
|
root: {
|
|
6759
5876
|
'&&': {
|
|
6760
5877
|
backgroundColor: theme.palette.grey[300],
|
|
@@ -6775,7 +5892,7 @@ var ToggleButtonGroup = forwardRef(function (props, ref) {
|
|
|
6775
5892
|
});
|
|
6776
5893
|
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
6777
5894
|
|
|
6778
|
-
var useTooltipStyles = makeStyles(function (_a) {
|
|
5895
|
+
var useTooltipStyles = makeStyles$1(function (_a) {
|
|
6779
5896
|
var typography = _a.typography;
|
|
6780
5897
|
return ({
|
|
6781
5898
|
tooltip: {
|
|
@@ -6804,5 +5921,5 @@ var useCollapsibleText = function () {
|
|
|
6804
5921
|
};
|
|
6805
5922
|
};
|
|
6806
5923
|
|
|
6807
|
-
export {
|
|
5924
|
+
export { AudioPlayer, Avatar, Button, Checkbox, CollapsibleText, Divider, Icon, IconButton, Link, Paper, PaperContent, Radio, SplitInput, Switch, Table, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useCollapsibleText };
|
|
6808
5925
|
//# sourceMappingURL=index.es.js.map
|