@popmenu/admin-ui 0.19.2 → 0.21.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/components/Alert/AlertProps.d.ts +3 -0
- package/build/components/AlertDialog/AlertDialogProps.d.ts +1 -0
- package/build/components/Dialog/index.d.ts +1 -0
- package/build/components/DialogActions/DialogActions.d.ts +3 -0
- package/build/components/DialogActions/index.d.ts +2 -0
- package/build/components/DialogContent/index.d.ts +1 -0
- package/build/components/DialogTitle/index.d.ts +1 -0
- package/build/components/Toast/ToastProps.d.ts +4 -0
- package/build/components/index.d.ts +4 -0
- package/build/index.es.js +127 -172
- package/build/index.es.js.map +1 -1
- package/build/index.js +146 -171
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -25,15 +25,14 @@ var FormControlLabel = require('@material-ui/core/FormControlLabel');
|
|
|
25
25
|
require('@material-ui/core/Chip');
|
|
26
26
|
require('@material-ui/core/Collapse');
|
|
27
27
|
var Dialog = require('@material-ui/core/Dialog');
|
|
28
|
-
require('@material-ui/core/DialogActions');
|
|
29
|
-
require('@material-ui/core/DialogContent');
|
|
30
|
-
require('@material-ui/core/DialogTitle');
|
|
28
|
+
var CommonDialogActions = require('@material-ui/core/DialogActions');
|
|
29
|
+
var DialogContent = require('@material-ui/core/DialogContent');
|
|
30
|
+
var DialogTitle = require('@material-ui/core/DialogTitle');
|
|
31
31
|
require('@material-ui/core/Drawer');
|
|
32
32
|
require('@material-ui/core/FormControl');
|
|
33
33
|
require('@material-ui/core/Grid');
|
|
34
34
|
require('@material-ui/core/InputAdornment');
|
|
35
35
|
require('@material-ui/core/LinearProgress');
|
|
36
|
-
var MuiLink = require('@material-ui/core/Link');
|
|
37
36
|
require('@material-ui/core/List');
|
|
38
37
|
require('@material-ui/core/ListItem');
|
|
39
38
|
require('@material-ui/core/ListItemIcon');
|
|
@@ -93,7 +92,9 @@ var CardContent__default = /*#__PURE__*/_interopDefaultLegacy(CardContent);
|
|
|
93
92
|
var MuiCheckbox__default = /*#__PURE__*/_interopDefaultLegacy(MuiCheckbox);
|
|
94
93
|
var FormControlLabel__default = /*#__PURE__*/_interopDefaultLegacy(FormControlLabel);
|
|
95
94
|
var Dialog__default = /*#__PURE__*/_interopDefaultLegacy(Dialog);
|
|
96
|
-
var
|
|
95
|
+
var CommonDialogActions__default = /*#__PURE__*/_interopDefaultLegacy(CommonDialogActions);
|
|
96
|
+
var DialogContent__default = /*#__PURE__*/_interopDefaultLegacy(DialogContent);
|
|
97
|
+
var DialogTitle__default = /*#__PURE__*/_interopDefaultLegacy(DialogTitle);
|
|
97
98
|
var MuiRadio__default = /*#__PURE__*/_interopDefaultLegacy(MuiRadio);
|
|
98
99
|
var MuiSwitch__default = /*#__PURE__*/_interopDefaultLegacy(MuiSwitch);
|
|
99
100
|
var MuiToggleButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiToggleButton);
|
|
@@ -228,41 +229,23 @@ function __rest(s, e) {
|
|
|
228
229
|
return t;
|
|
229
230
|
}
|
|
230
231
|
|
|
231
|
-
var
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
249
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
250
|
-
value = palette[color][variant];
|
|
251
|
-
}
|
|
252
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
253
|
-
value = props.color;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return value;
|
|
257
|
-
};
|
|
258
|
-
return {
|
|
259
|
-
root: {
|
|
260
|
-
color: getColor,
|
|
261
|
-
fontSize: getFontSize,
|
|
262
|
-
strokeWidth: '1.3px',
|
|
263
|
-
},
|
|
264
|
-
};
|
|
265
|
-
});
|
|
232
|
+
var _path$3k;
|
|
233
|
+
|
|
234
|
+
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); }
|
|
235
|
+
|
|
236
|
+
function SvgUser(props) {
|
|
237
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3B({
|
|
238
|
+
viewBox: "0 0 16 16",
|
|
239
|
+
strokeLinecap: "round",
|
|
240
|
+
strokeLinejoin: "round",
|
|
241
|
+
stroke: "currentColor",
|
|
242
|
+
width: "1em",
|
|
243
|
+
height: "1em",
|
|
244
|
+
fill: "none"
|
|
245
|
+
}, props), _path$3k || (_path$3k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
246
|
+
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z"
|
|
247
|
+
})));
|
|
248
|
+
}
|
|
266
249
|
|
|
267
250
|
var classnames = {exports: {}};
|
|
268
251
|
|
|
@@ -324,6 +307,42 @@ var classnames = {exports: {}};
|
|
|
324
307
|
|
|
325
308
|
var classNames = classnames.exports;
|
|
326
309
|
|
|
310
|
+
var useIconStyles = core.makeStyles(function (_a) {
|
|
311
|
+
var spacing = _a.spacing, palette = _a.palette;
|
|
312
|
+
var getFontSize = function (_a) {
|
|
313
|
+
var size = _a.size;
|
|
314
|
+
var sizes = {
|
|
315
|
+
inherit: 'inherit',
|
|
316
|
+
small: spacing(1.5),
|
|
317
|
+
medium: spacing(2),
|
|
318
|
+
large: spacing(2.5),
|
|
319
|
+
'extra-large': spacing(3),
|
|
320
|
+
};
|
|
321
|
+
return size ? sizes[size] : 'inherit';
|
|
322
|
+
};
|
|
323
|
+
var getColor = function (props) {
|
|
324
|
+
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
325
|
+
var value = 'inherit';
|
|
326
|
+
if (props.color) {
|
|
327
|
+
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
328
|
+
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
329
|
+
value = palette[color][variant];
|
|
330
|
+
}
|
|
331
|
+
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
332
|
+
value = props.color;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return value;
|
|
336
|
+
};
|
|
337
|
+
return {
|
|
338
|
+
root: {
|
|
339
|
+
color: getColor,
|
|
340
|
+
fontSize: getFontSize,
|
|
341
|
+
strokeWidth: '1.3px',
|
|
342
|
+
},
|
|
343
|
+
};
|
|
344
|
+
});
|
|
345
|
+
|
|
327
346
|
var iconStaticClassName = 'pop-icon';
|
|
328
347
|
var Icon = function (props) {
|
|
329
348
|
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
@@ -376,7 +395,7 @@ var Typography = React.forwardRef(function (props, ref) {
|
|
|
376
395
|
});
|
|
377
396
|
Typography.displayName = 'Typography';
|
|
378
397
|
|
|
379
|
-
var useStyles$1 = core.makeStyles(function (_a) {
|
|
398
|
+
var useStyles$1$1 = core.makeStyles(function (_a) {
|
|
380
399
|
var spacing = _a.spacing;
|
|
381
400
|
return ({
|
|
382
401
|
root: {
|
|
@@ -390,7 +409,7 @@ var useStyles$1 = core.makeStyles(function (_a) {
|
|
|
390
409
|
});
|
|
391
410
|
var Paper = React.forwardRef(function (props, ref) {
|
|
392
411
|
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
393
|
-
var classes = useStyles$1(props);
|
|
412
|
+
var classes = useStyles$1$1(props);
|
|
394
413
|
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
395
414
|
});
|
|
396
415
|
Paper.displayName = 'Paper';
|
|
@@ -445,18 +464,9 @@ var LoadingStatus;
|
|
|
445
464
|
LoadingStatus["LOADED"] = "LOADED";
|
|
446
465
|
LoadingStatus["PENDING"] = "PENDING";
|
|
447
466
|
})(LoadingStatus || (LoadingStatus = {}));
|
|
448
|
-
/**
|
|
449
|
-
* Hook returns [imgProps, loaded]
|
|
450
|
-
* ref: Merged default and provided imgProp object. Includes load and error events for img tag. To be passed to MuiAvatar.
|
|
451
|
-
* loaded: Indicates whether the src supplied to an img within Avatar results in loaded or error
|
|
452
|
-
*/
|
|
453
467
|
var useImgProps = function (avatarProps) {
|
|
454
468
|
var _a = React__default['default'].useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
455
|
-
var imgProps = __assign(__assign({}, avatarProps.imgProps), {
|
|
456
|
-
var _a, _b;
|
|
457
|
-
setLoaded(LoadingStatus.ERROR);
|
|
458
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onError) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
459
|
-
}, onLoad: function (event) {
|
|
469
|
+
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onLoad: function (event) {
|
|
460
470
|
var _a, _b;
|
|
461
471
|
setLoaded(LoadingStatus.LOADED);
|
|
462
472
|
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
@@ -483,97 +493,49 @@ var getAvatarFontSize = function (props) {
|
|
|
483
493
|
large: '1.25rem',
|
|
484
494
|
'extra-large': '3.5rem',
|
|
485
495
|
};
|
|
486
|
-
return fontSizes[props.size
|
|
487
|
-
};
|
|
488
|
-
var getAvatarBackground = function (props) {
|
|
489
|
-
var src = props.src, loaded = props.loaded;
|
|
490
|
-
var background = props.background;
|
|
491
|
-
if (src && loaded === LoadingStatus.LOADED) {
|
|
492
|
-
background = 'transparent';
|
|
493
|
-
}
|
|
494
|
-
return background;
|
|
496
|
+
return fontSizes[props.size];
|
|
495
497
|
};
|
|
496
498
|
var useAvatarStyles = styles.makeStyles(function (theme) { return ({
|
|
497
|
-
root: {
|
|
498
|
-
width:
|
|
499
|
-
height:
|
|
500
|
-
fontSize:
|
|
501
|
-
backgroundColor:
|
|
502
|
-
color:
|
|
503
|
-
objectFit:
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
},
|
|
499
|
+
root: function (props) { return ({
|
|
500
|
+
width: getAvatarDimensions(theme, props),
|
|
501
|
+
height: getAvatarDimensions(theme, props),
|
|
502
|
+
fontSize: getAvatarFontSize(props),
|
|
503
|
+
backgroundColor: props.loaded === LoadingStatus.LOADED ? 'transparent' : props.background,
|
|
504
|
+
color: theme.palette.getContrastText(props.background),
|
|
505
|
+
objectFit: props.fit,
|
|
506
|
+
}); },
|
|
507
|
+
fallback: function (props) { return ({
|
|
508
|
+
fontSize: getAvatarDimensions(theme, props),
|
|
509
|
+
strokeWidth: 1,
|
|
510
|
+
}); },
|
|
510
511
|
}); });
|
|
511
512
|
|
|
512
|
-
var _path$2;
|
|
513
|
-
|
|
514
|
-
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); }
|
|
515
|
-
|
|
516
|
-
function SvgSilhouetteFemale(props) {
|
|
517
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
518
|
-
viewBox: "0 0 300 300",
|
|
519
|
-
fill: "none",
|
|
520
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
521
|
-
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
522
|
-
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",
|
|
523
|
-
fill: "#2E3042"
|
|
524
|
-
})));
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
var _path$1;
|
|
528
|
-
|
|
529
|
-
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); }
|
|
530
|
-
|
|
531
|
-
function SvgSilhouetteMale(props) {
|
|
532
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
533
|
-
viewBox: "0 0 300 300",
|
|
534
|
-
fill: "none",
|
|
535
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
536
|
-
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
537
|
-
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",
|
|
538
|
-
fill: "#2E3042"
|
|
539
|
-
})));
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
var _path;
|
|
543
|
-
|
|
544
|
-
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); }
|
|
545
|
-
|
|
546
|
-
function SvgSilhouetteNeutral(props) {
|
|
547
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
548
|
-
viewBox: "0 0 300 300",
|
|
549
|
-
fill: "none",
|
|
550
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
551
|
-
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
552
|
-
fillRule: "evenodd",
|
|
553
|
-
clipRule: "evenodd",
|
|
554
|
-
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",
|
|
555
|
-
fill: "#2E3042"
|
|
556
|
-
})));
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
var silhouettes = {
|
|
560
|
-
female: SvgSilhouetteFemale,
|
|
561
|
-
male: SvgSilhouetteMale,
|
|
562
|
-
neutral: SvgSilhouetteNeutral,
|
|
563
|
-
};
|
|
564
513
|
var Avatar = React.forwardRef(function (props, ref) {
|
|
565
|
-
var children = props.children,
|
|
566
|
-
var
|
|
514
|
+
var children = props.children, src = props.src, alt = props.alt, fallback = props.fallback, muiProps = __rest(props, ["children", "src", "alt", "fallback"]);
|
|
515
|
+
var _a = useImgProps(props), imgProps = _a.imgProps, loaded = _a.loaded;
|
|
567
516
|
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
568
|
-
var
|
|
569
|
-
var
|
|
570
|
-
|
|
517
|
+
var displayAltTextFallback = src && alt;
|
|
518
|
+
var displayNoFallback = fallback === 'none';
|
|
519
|
+
var displayCustomFallback = fallback !== 'none' && typeof fallback !== 'undefined';
|
|
520
|
+
var Fallback;
|
|
521
|
+
if (displayAltTextFallback) {
|
|
522
|
+
Fallback = null;
|
|
523
|
+
}
|
|
524
|
+
else if (displayNoFallback) {
|
|
525
|
+
Fallback = ' ';
|
|
526
|
+
}
|
|
527
|
+
else if (displayCustomFallback) {
|
|
528
|
+
Fallback = fallback;
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
Fallback = React__default['default'].createElement(Icon, { icon: SvgUser, className: classes.fallback });
|
|
532
|
+
}
|
|
533
|
+
return (React__default['default'].createElement(MuiAvatar__default['default'], __assign({ ref: ref, classes: { root: classes.root }, src: src, alt: alt }, muiProps, { imgProps: imgProps }), children || Fallback));
|
|
571
534
|
});
|
|
572
535
|
Avatar.defaultProps = {
|
|
573
536
|
size: 'medium',
|
|
574
537
|
fit: 'cover',
|
|
575
538
|
background: '#E0E0E0',
|
|
576
|
-
silhouette: 'neutral',
|
|
577
539
|
};
|
|
578
540
|
Avatar.displayName = 'Avatar';
|
|
579
541
|
|
|
@@ -672,42 +634,21 @@ core.makeStyles(function (theme) { return ({
|
|
|
672
634
|
},
|
|
673
635
|
}); });
|
|
674
636
|
|
|
675
|
-
var
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
resolved = palette.text[color.substring(4).toLowerCase()];
|
|
684
|
-
}
|
|
685
|
-
else if (color === 'inherit') {
|
|
686
|
-
resolved = color;
|
|
687
|
-
}
|
|
688
|
-
return resolved;
|
|
689
|
-
};
|
|
690
|
-
var useLinkStyles = styles.makeStyles(function (theme) {
|
|
691
|
-
var _a;
|
|
692
|
-
return ({
|
|
693
|
-
root: (_a = {
|
|
694
|
-
display: 'flex',
|
|
695
|
-
color: function (props) { return getLinkColor(theme, props); }
|
|
696
|
-
},
|
|
697
|
-
_a["& ." + iconStaticClassName] = {
|
|
698
|
-
alignSelf: 'center',
|
|
699
|
-
},
|
|
700
|
-
_a),
|
|
701
|
-
});
|
|
702
|
-
});
|
|
637
|
+
var useLinkStyles = styles.makeStyles(function (theme) { return ({
|
|
638
|
+
root: function (props) {
|
|
639
|
+
var _a;
|
|
640
|
+
return (__assign(__assign({ display: 'flex' }, (props.color === undefined && { color: theme.palette.info.main })), (_a = {}, _a["& ." + iconStaticClassName] = {
|
|
641
|
+
alignSelf: 'center',
|
|
642
|
+
}, _a)));
|
|
643
|
+
},
|
|
644
|
+
}); });
|
|
703
645
|
|
|
704
646
|
var Link = React.forwardRef(function (props, ref) {
|
|
705
|
-
var children = props.children
|
|
647
|
+
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
706
648
|
var classes = useLinkStyles(props);
|
|
707
|
-
return (React__default['default'].createElement(
|
|
649
|
+
return (React__default['default'].createElement(core.Link, __assign({ ref: ref, classes: { root: classes.root } }, muiProps), children));
|
|
708
650
|
});
|
|
709
651
|
Link.defaultProps = {
|
|
710
|
-
color: 'info',
|
|
711
652
|
variant: 'body1',
|
|
712
653
|
};
|
|
713
654
|
Link.displayName = 'Link';
|
|
@@ -951,6 +892,9 @@ var useAlertStyles = styles.makeStyles(function (theme) { return ({
|
|
|
951
892
|
borderLeft: theme.spacing(1) + "px solid",
|
|
952
893
|
color: theme.palette.text.primary,
|
|
953
894
|
},
|
|
895
|
+
icon: {
|
|
896
|
+
alignSelf: 'start',
|
|
897
|
+
},
|
|
954
898
|
}); });
|
|
955
899
|
|
|
956
900
|
var severityIcons$1 = {
|
|
@@ -965,9 +909,9 @@ var Alert = React.forwardRef(function (props, ref) {
|
|
|
965
909
|
var validLink = link && link.href && link.text && { href: link.href, children: link.text };
|
|
966
910
|
var Action = (React__default['default'].createElement(React__default['default'].Fragment, null,
|
|
967
911
|
validLink && React__default['default'].createElement(Link, __assign$1({}, validLink)),
|
|
968
|
-
React__default['default'].createElement(IconButton, { onClick: onClose },
|
|
969
|
-
React__default['default'].createElement(Icon, { icon: SvgX }))));
|
|
970
|
-
return (React__default['default'].createElement(CommonAlert__default['default'], __assign$1({ ref: ref, classes: classes, icon: React__default['default'].createElement(Icon, { icon: severityIcons$1[severity] }), action: Action, variant: variant, severity: severity }, muiProps), children));
|
|
912
|
+
onClose && (React__default['default'].createElement(IconButton, { onClick: onClose },
|
|
913
|
+
React__default['default'].createElement(Icon, { icon: SvgX })))));
|
|
914
|
+
return (React__default['default'].createElement(CommonAlert__default['default'], __assign$1({ ref: ref, classes: classes, icon: React__default['default'].createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
|
|
971
915
|
});
|
|
972
916
|
Alert.displayName = 'Alert';
|
|
973
917
|
|
|
@@ -1151,7 +1095,6 @@ var useAlertDialogStyles = styles.makeStyles(function (theme) { return ({
|
|
|
1151
1095
|
card: {
|
|
1152
1096
|
borderRadius: theme.spacing(0.75),
|
|
1153
1097
|
borderTop: function (props) { return theme.spacing(1.25) + "px solid " + theme.palette[props.severity || 'info'].main; },
|
|
1154
|
-
width: '500px',
|
|
1155
1098
|
},
|
|
1156
1099
|
cardActions: {
|
|
1157
1100
|
background: theme.palette.grey[100],
|
|
@@ -1174,7 +1117,7 @@ var severityIcons = {
|
|
|
1174
1117
|
var AlertDialog = React.forwardRef(function (props, ref) {
|
|
1175
1118
|
var children = props.children, labelId = props.labelId, descriptionId = props.descriptionId, _a = props.severity, severity = _a === void 0 ? 'info' : _a, _b = props.proceedButtonText, proceedButtonText = _b === void 0 ? 'proceed' : _b, onClose = props.onClose, onCancel = props.onCancel, onProceed = props.onProceed, DialogProps = __rest$1(props, ["children", "labelId", "descriptionId", "severity", "proceedButtonText", "onClose", "onCancel", "onProceed"]);
|
|
1176
1119
|
var classes = useAlertDialogStyles(props);
|
|
1177
|
-
return (React__default['default'].createElement(Dialog__default['default'], __assign$1({ ref: ref, classes: { paper: classes.root } }, DialogProps),
|
|
1120
|
+
return (React__default['default'].createElement(Dialog__default['default'], __assign$1({ ref: ref, classes: { paper: classes.root }, maxWidth: "sm", fullWidth: true }, DialogProps),
|
|
1178
1121
|
React__default['default'].createElement(Card__default['default'], { classes: { root: classes.card }, role: "alertdialog", "aria-modal": "true", "aria-labelledby": labelId, "aria-describedby": descriptionId },
|
|
1179
1122
|
React__default['default'].createElement(IconButton, { className: classes.cancelIcon, onClick: onClose },
|
|
1180
1123
|
React__default['default'].createElement(Icon, { icon: SvgX })),
|
|
@@ -1184,7 +1127,7 @@ var AlertDialog = React.forwardRef(function (props, ref) {
|
|
|
1184
1127
|
React__default['default'].createElement(core.Box, { pl: 2, pr: 3 }, children))),
|
|
1185
1128
|
React__default['default'].createElement(CardActions__default['default'], { classes: { root: classes.cardActions } },
|
|
1186
1129
|
React__default['default'].createElement(Button, { onClick: onCancel, variant: "ghost" }, "Cancel"),
|
|
1187
|
-
React__default['default'].createElement(Button, { onClick: onProceed, variant:
|
|
1130
|
+
React__default['default'].createElement(Button, { onClick: onProceed, variant: severity }, proceedButtonText)))));
|
|
1188
1131
|
});
|
|
1189
1132
|
AlertDialog.displayName = 'AlertDialog';
|
|
1190
1133
|
|
|
@@ -1339,14 +1282,14 @@ var StepperActionsPreviousButton = function (props) {
|
|
|
1339
1282
|
return displayPreviousButton ? (React__default['default'].createElement(Button, __assign$1({ variant: "tertiary", disabled: stepCursor === 1 }, augmentedPreviousButtonProps), previousButtonText || 'previous')) : null;
|
|
1340
1283
|
};
|
|
1341
1284
|
|
|
1342
|
-
var useStyles = styles.makeStyles({
|
|
1285
|
+
var useStyles$1 = styles.makeStyles({
|
|
1343
1286
|
root: {
|
|
1344
1287
|
fontStyle: 'italic',
|
|
1345
1288
|
},
|
|
1346
1289
|
});
|
|
1347
1290
|
var StepperActionsStatusText = function (props) {
|
|
1348
1291
|
var statusText = props.statusText;
|
|
1349
|
-
var classes = useStyles(props);
|
|
1292
|
+
var classes = useStyles$1(props);
|
|
1350
1293
|
return statusText ? (React__default['default'].createElement(Typography, { classes: { root: classes.root }, variant: "body2" }, statusText)) : null;
|
|
1351
1294
|
};
|
|
1352
1295
|
|
|
@@ -1632,6 +1575,19 @@ Toast.defaultProps = {
|
|
|
1632
1575
|
};
|
|
1633
1576
|
Toast.displayName = 'Toast';
|
|
1634
1577
|
|
|
1578
|
+
var useStyles = core.makeStyles(function (_a) {
|
|
1579
|
+
var palette = _a.palette;
|
|
1580
|
+
return ({
|
|
1581
|
+
root: {
|
|
1582
|
+
background: palette.grey['100'],
|
|
1583
|
+
},
|
|
1584
|
+
});
|
|
1585
|
+
});
|
|
1586
|
+
var DialogActions = function (props) {
|
|
1587
|
+
var classes = useStyles(props);
|
|
1588
|
+
return React__default['default'].createElement(CommonDialogActions__default['default'], __assign$1({ classes: classes }, props));
|
|
1589
|
+
};
|
|
1590
|
+
|
|
1635
1591
|
var useFullScreenStepperContext = function () { return React.useContext(FullScreenStepperContext); };
|
|
1636
1592
|
|
|
1637
1593
|
/**
|
|
@@ -1896,12 +1852,31 @@ var adminLight = createTheme__default['default'](adminLightOptions);
|
|
|
1896
1852
|
var adminDarkOptions = __assign$1(__assign$1(__assign$1(__assign$1(__assign$1({ themeName: 'Admin Dark', palette: __assign$1(__assign$1({}, basePalette), adminDarkPalette), breakpoints: adminThemeBreakpoints, typography: adminThemeTypography }, adminDarkPlaceholder), adminThemeZIndex), adminThemeStatus), adminThemeDefaultProps), adminOverrides);
|
|
1897
1853
|
var adminDark = createTheme__default['default'](adminDarkOptions);
|
|
1898
1854
|
|
|
1855
|
+
Object.defineProperty(exports, 'Dialog', {
|
|
1856
|
+
enumerable: true,
|
|
1857
|
+
get: function () {
|
|
1858
|
+
return Dialog__default['default'];
|
|
1859
|
+
}
|
|
1860
|
+
});
|
|
1861
|
+
Object.defineProperty(exports, 'DialogContent', {
|
|
1862
|
+
enumerable: true,
|
|
1863
|
+
get: function () {
|
|
1864
|
+
return DialogContent__default['default'];
|
|
1865
|
+
}
|
|
1866
|
+
});
|
|
1867
|
+
Object.defineProperty(exports, 'DialogTitle', {
|
|
1868
|
+
enumerable: true,
|
|
1869
|
+
get: function () {
|
|
1870
|
+
return DialogTitle__default['default'];
|
|
1871
|
+
}
|
|
1872
|
+
});
|
|
1899
1873
|
exports.Alert = Alert;
|
|
1900
1874
|
exports.AlertDialog = AlertDialog;
|
|
1901
1875
|
exports.AlertDialogHeader = AlertDialogHeader;
|
|
1902
1876
|
exports.AlertTitle = AlertTitle;
|
|
1903
1877
|
exports.Button = Button;
|
|
1904
1878
|
exports.ButtonGroup = ButtonGroup;
|
|
1879
|
+
exports.DialogActions = DialogActions;
|
|
1905
1880
|
exports.FeatureIntro = FeatureIntro;
|
|
1906
1881
|
exports.FullScreenStepper = FullScreenStepper;
|
|
1907
1882
|
exports.FullScreenStepperContent = FullScreenStepperContent;
|