@popmenu/admin-ui 0.26.0 → 0.27.0
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/index.es.js +95 -136
- package/build/index.es.js.map +1 -1
- package/build/index.js +95 -136
- package/build/index.js.map +1 -1
- package/package.json +3 -2
- package/CHANGELOG.md +0 -426
package/build/index.es.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { createElement, forwardRef, createContext, useState, useContext } from 'react';
|
|
3
3
|
import CommonAlert from '@material-ui/lab/Alert';
|
|
4
|
-
import { makeStyles, Typography as Typography$1,
|
|
4
|
+
import { makeStyles, Typography as Typography$1, Link as Link$1, Paper as Paper$1, Box } from '@material-ui/core';
|
|
5
5
|
import '@material-ui/core/AppBar';
|
|
6
|
-
import MuiIconButton from '@material-ui/core/IconButton';
|
|
7
|
-
import { makeStyles as makeStyles$1, useTheme, lighten } from '@material-ui/core/styles';
|
|
8
6
|
import MuiAvatar from '@material-ui/core/Avatar';
|
|
7
|
+
import { makeStyles as makeStyles$1, useTheme, lighten } from '@material-ui/core/styles';
|
|
9
8
|
import '@material-ui/core/Badge';
|
|
10
9
|
import MuiButton from '@material-ui/core/Button';
|
|
11
10
|
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
@@ -28,6 +27,7 @@ export { default as DialogTitle } from '@material-ui/core/DialogTitle';
|
|
|
28
27
|
import '@material-ui/core/Drawer';
|
|
29
28
|
import '@material-ui/core/FormControl';
|
|
30
29
|
import '@material-ui/core/Grid';
|
|
30
|
+
import MuiIconButton from '@material-ui/core/IconButton';
|
|
31
31
|
import '@material-ui/core/InputAdornment';
|
|
32
32
|
import '@material-ui/core/LinearProgress';
|
|
33
33
|
import '@material-ui/core/List';
|
|
@@ -193,6 +193,42 @@ function SvgUser(props) {
|
|
|
193
193
|
})));
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
var useIconStyles = makeStyles(function (_a) {
|
|
197
|
+
var spacing = _a.spacing, palette = _a.palette;
|
|
198
|
+
var getFontSize = function (_a) {
|
|
199
|
+
var size = _a.size;
|
|
200
|
+
var sizes = {
|
|
201
|
+
inherit: 'inherit',
|
|
202
|
+
small: spacing(1.5),
|
|
203
|
+
medium: spacing(2),
|
|
204
|
+
large: spacing(2.5),
|
|
205
|
+
'extra-large': spacing(3),
|
|
206
|
+
};
|
|
207
|
+
return size ? sizes[size] : 'inherit';
|
|
208
|
+
};
|
|
209
|
+
var getColor = function (props) {
|
|
210
|
+
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
211
|
+
var value = 'inherit';
|
|
212
|
+
if (props.color) {
|
|
213
|
+
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
214
|
+
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
215
|
+
value = palette[color][variant];
|
|
216
|
+
}
|
|
217
|
+
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
218
|
+
value = props.color;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return value;
|
|
222
|
+
};
|
|
223
|
+
return {
|
|
224
|
+
root: {
|
|
225
|
+
color: getColor,
|
|
226
|
+
fontSize: getFontSize,
|
|
227
|
+
strokeWidth: '1.3px',
|
|
228
|
+
},
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
|
|
196
232
|
var classnames = {exports: {}};
|
|
197
233
|
|
|
198
234
|
/*!
|
|
@@ -253,42 +289,6 @@ var classnames = {exports: {}};
|
|
|
253
289
|
|
|
254
290
|
var classNames = classnames.exports;
|
|
255
291
|
|
|
256
|
-
var useIconStyles = makeStyles(function (_a) {
|
|
257
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
258
|
-
var getFontSize = function (_a) {
|
|
259
|
-
var size = _a.size;
|
|
260
|
-
var sizes = {
|
|
261
|
-
inherit: 'inherit',
|
|
262
|
-
small: spacing(1.5),
|
|
263
|
-
medium: spacing(2),
|
|
264
|
-
large: spacing(2.5),
|
|
265
|
-
'extra-large': spacing(3),
|
|
266
|
-
};
|
|
267
|
-
return size ? sizes[size] : 'inherit';
|
|
268
|
-
};
|
|
269
|
-
var getColor = function (props) {
|
|
270
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
271
|
-
var value = 'inherit';
|
|
272
|
-
if (props.color) {
|
|
273
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
274
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
275
|
-
value = palette[color][variant];
|
|
276
|
-
}
|
|
277
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
278
|
-
value = props.color;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return value;
|
|
282
|
-
};
|
|
283
|
-
return {
|
|
284
|
-
root: {
|
|
285
|
-
color: getColor,
|
|
286
|
-
fontSize: getFontSize,
|
|
287
|
-
strokeWidth: '1.3px',
|
|
288
|
-
},
|
|
289
|
-
};
|
|
290
|
-
});
|
|
291
|
-
|
|
292
292
|
var iconStaticClassName = 'pop-icon';
|
|
293
293
|
var Icon = function (props) {
|
|
294
294
|
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
@@ -307,103 +307,6 @@ Icon.defaultProps = {
|
|
|
307
307
|
};
|
|
308
308
|
Icon.displayName = 'Icon';
|
|
309
309
|
|
|
310
|
-
var IconButton = forwardRef(function (props, ref) {
|
|
311
|
-
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
312
|
-
});
|
|
313
|
-
IconButton.displayName = 'IconButton';
|
|
314
|
-
IconButton.defaultProps = {
|
|
315
|
-
color: 'secondary',
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
var useTypographyStyles = makeStyles$1(function () { return ({
|
|
319
|
-
root: function (_a) {
|
|
320
|
-
var _b;
|
|
321
|
-
var weight = _a.weight;
|
|
322
|
-
return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
|
|
323
|
-
position: 'relative',
|
|
324
|
-
top: '0.125em',
|
|
325
|
-
padding: '0 0.125em',
|
|
326
|
-
boxSizing: 'content-box',
|
|
327
|
-
}, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
|
|
328
|
-
},
|
|
329
|
-
caption: {
|
|
330
|
-
display: 'inline',
|
|
331
|
-
},
|
|
332
|
-
overline: {
|
|
333
|
-
display: 'inline',
|
|
334
|
-
},
|
|
335
|
-
}); });
|
|
336
|
-
|
|
337
|
-
var Typography = forwardRef(function (props, ref) {
|
|
338
|
-
props.weight; var restProps = __rest(props, ["weight"]);
|
|
339
|
-
var classes = useTypographyStyles(props);
|
|
340
|
-
return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes }, restProps));
|
|
341
|
-
});
|
|
342
|
-
Typography.displayName = 'Typography';
|
|
343
|
-
|
|
344
|
-
var useStyles$1$1 = makeStyles(function (_a) {
|
|
345
|
-
var spacing = _a.spacing;
|
|
346
|
-
return ({
|
|
347
|
-
root: {
|
|
348
|
-
'&:last-child': {
|
|
349
|
-
marginBottom: 0,
|
|
350
|
-
},
|
|
351
|
-
marginBottom: spacing(4),
|
|
352
|
-
padding: spacing(4),
|
|
353
|
-
},
|
|
354
|
-
});
|
|
355
|
-
});
|
|
356
|
-
var Paper = forwardRef(function (props, ref) {
|
|
357
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
358
|
-
var classes = useStyles$1$1(props);
|
|
359
|
-
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
360
|
-
});
|
|
361
|
-
Paper.displayName = 'Paper';
|
|
362
|
-
Paper.defaultProps = {
|
|
363
|
-
legacyStyles: false,
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
var AUDIO_PLAYER_EVENT_TYPES;
|
|
367
|
-
(function (AUDIO_PLAYER_EVENT_TYPES) {
|
|
368
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_PLAYBACK"] = "TOGGLE_PLAYBACK";
|
|
369
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_VOLUME_CONTROL"] = "TOGGLE_VOLUME_CONTROL";
|
|
370
|
-
AUDIO_PLAYER_EVENT_TYPES["TOGGLE_MUTE"] = "TOGGLE_MUTE";
|
|
371
|
-
AUDIO_PLAYER_EVENT_TYPES["VOLUME_CHANGE"] = "VOLUME_CHANGE";
|
|
372
|
-
AUDIO_PLAYER_EVENT_TYPES["TIME_CHANGE"] = "TIME_CHANGE";
|
|
373
|
-
AUDIO_PLAYER_EVENT_TYPES["DURATION_CHANGE"] = "DURATION_CHANGE";
|
|
374
|
-
AUDIO_PLAYER_EVENT_TYPES["SET_TIME"] = "SET_TIME";
|
|
375
|
-
AUDIO_PLAYER_EVENT_TYPES["CAN_PLAY"] = "CAN_PLAY";
|
|
376
|
-
AUDIO_PLAYER_EVENT_TYPES["RESET"] = "RESET";
|
|
377
|
-
})(AUDIO_PLAYER_EVENT_TYPES || (AUDIO_PLAYER_EVENT_TYPES = {}));
|
|
378
|
-
var PLAYBACK_STATES;
|
|
379
|
-
(function (PLAYBACK_STATES) {
|
|
380
|
-
PLAYBACK_STATES["NONE"] = "NONE";
|
|
381
|
-
PLAYBACK_STATES["PAUSED"] = "PAUSED";
|
|
382
|
-
PLAYBACK_STATES["PLAYING"] = "PLAYING";
|
|
383
|
-
})(PLAYBACK_STATES || (PLAYBACK_STATES = {}));
|
|
384
|
-
var CONTROL_LABELS;
|
|
385
|
-
(function (CONTROL_LABELS) {
|
|
386
|
-
CONTROL_LABELS["PAUSE"] = "PAUSE";
|
|
387
|
-
CONTROL_LABELS["PLAY"] = "PLAY";
|
|
388
|
-
CONTROL_LABELS["MUTE"] = "MUTE";
|
|
389
|
-
CONTROL_LABELS["UNMUTE"] = "UNMUTE";
|
|
390
|
-
})(CONTROL_LABELS || (CONTROL_LABELS = {}));
|
|
391
|
-
var VOLUME_CONTROL_STATES;
|
|
392
|
-
(function (VOLUME_CONTROL_STATES) {
|
|
393
|
-
VOLUME_CONTROL_STATES["SHOW"] = "SHOW";
|
|
394
|
-
VOLUME_CONTROL_STATES["HIDE"] = "HIDE";
|
|
395
|
-
})(VOLUME_CONTROL_STATES || (VOLUME_CONTROL_STATES = {}));
|
|
396
|
-
|
|
397
|
-
({
|
|
398
|
-
playback: PLAYBACK_STATES.NONE,
|
|
399
|
-
volumeControls: VOLUME_CONTROL_STATES.HIDE,
|
|
400
|
-
context: {
|
|
401
|
-
volume: 100,
|
|
402
|
-
playbackButtonLabel: CONTROL_LABELS.PLAY,
|
|
403
|
-
volumeButtonLabel: CONTROL_LABELS.MUTE,
|
|
404
|
-
},
|
|
405
|
-
});
|
|
406
|
-
|
|
407
310
|
var LoadingStatus;
|
|
408
311
|
(function (LoadingStatus) {
|
|
409
312
|
LoadingStatus["ERROR"] = "ERROR";
|
|
@@ -517,6 +420,32 @@ var Checkbox = forwardRef(function (props, ref) {
|
|
|
517
420
|
});
|
|
518
421
|
Checkbox.displayName = 'Checkbox';
|
|
519
422
|
|
|
423
|
+
var useTypographyStyles = makeStyles$1(function () { return ({
|
|
424
|
+
root: function (_a) {
|
|
425
|
+
var _b;
|
|
426
|
+
var weight = _a.weight;
|
|
427
|
+
return (__assign((_b = {}, _b["& ." + iconStaticClassName] = {
|
|
428
|
+
position: 'relative',
|
|
429
|
+
top: '0.125em',
|
|
430
|
+
padding: '0 0.125em',
|
|
431
|
+
boxSizing: 'content-box',
|
|
432
|
+
}, _b), (weight && { fontWeight: (weight === 'semi-bold' && 600) || (weight === 'bold' && 700) || 400 })));
|
|
433
|
+
},
|
|
434
|
+
caption: {
|
|
435
|
+
display: 'inline',
|
|
436
|
+
},
|
|
437
|
+
overline: {
|
|
438
|
+
display: 'inline',
|
|
439
|
+
},
|
|
440
|
+
}); });
|
|
441
|
+
|
|
442
|
+
var Typography = forwardRef(function (props, ref) {
|
|
443
|
+
props.weight; var restProps = __rest(props, ["weight"]);
|
|
444
|
+
var classes = useTypographyStyles(props);
|
|
445
|
+
return React__default.createElement(Typography$1, __assign({ ref: ref, classes: classes }, restProps));
|
|
446
|
+
});
|
|
447
|
+
Typography.displayName = 'Typography';
|
|
448
|
+
|
|
520
449
|
var getFadeStop = function (_a, typographyVariant) {
|
|
521
450
|
var typography = _a.typography;
|
|
522
451
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
@@ -580,6 +509,14 @@ makeStyles(function (theme) { return ({
|
|
|
580
509
|
},
|
|
581
510
|
}); });
|
|
582
511
|
|
|
512
|
+
var IconButton = forwardRef(function (props, ref) {
|
|
513
|
+
return React__default.createElement(MuiIconButton, __assign({ ref: ref }, props));
|
|
514
|
+
});
|
|
515
|
+
IconButton.displayName = 'IconButton';
|
|
516
|
+
IconButton.defaultProps = {
|
|
517
|
+
color: 'secondary',
|
|
518
|
+
};
|
|
519
|
+
|
|
583
520
|
var useLinkStyles = makeStyles$1(function (theme) { return ({
|
|
584
521
|
root: function (props) {
|
|
585
522
|
var _a;
|
|
@@ -599,6 +536,28 @@ Link.defaultProps = {
|
|
|
599
536
|
};
|
|
600
537
|
Link.displayName = 'Link';
|
|
601
538
|
|
|
539
|
+
var useStyles$2 = makeStyles(function (_a) {
|
|
540
|
+
var spacing = _a.spacing;
|
|
541
|
+
return ({
|
|
542
|
+
root: {
|
|
543
|
+
'&:last-child': {
|
|
544
|
+
marginBottom: 0,
|
|
545
|
+
},
|
|
546
|
+
marginBottom: spacing(4),
|
|
547
|
+
padding: spacing(4),
|
|
548
|
+
},
|
|
549
|
+
});
|
|
550
|
+
});
|
|
551
|
+
var Paper = forwardRef(function (props, ref) {
|
|
552
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
553
|
+
var classes = useStyles$2(props);
|
|
554
|
+
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
555
|
+
});
|
|
556
|
+
Paper.displayName = 'Paper';
|
|
557
|
+
Paper.defaultProps = {
|
|
558
|
+
legacyStyles: false,
|
|
559
|
+
};
|
|
560
|
+
|
|
602
561
|
var Radio = forwardRef(function (props, ref) {
|
|
603
562
|
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
604
563
|
var control = React__default.createElement(MuiRadio, __assign({ disabled: label ? undefined : disabled }, muiProps));
|