@popmenu/admin-ui 0.40.5 → 0.42.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.js CHANGED
@@ -228,19 +228,19 @@ function __rest(s, e) {
228
228
  return t;
229
229
  }
230
230
 
231
- var _path$I;
231
+ var _path$2$1;
232
232
 
233
- function _extends$1m() { _extends$1m = 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$1m.apply(this, arguments); }
233
+ function _extends$2$1() { _extends$2$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$2$1.apply(this, arguments); }
234
234
 
235
235
  function SvgUser(props) {
236
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1m({
236
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2$1({
237
237
  viewBox: "0 0 16 16",
238
238
  fill: "none",
239
239
  strokeLinecap: "round",
240
240
  strokeLinejoin: "round",
241
241
  width: "1em",
242
242
  height: "1em"
243
- }, props), _path$I || (_path$I = /*#__PURE__*/React__namespace.createElement("path", {
243
+ }, props), _path$2$1 || (_path$2$1 = /*#__PURE__*/React__namespace.createElement("path", {
244
244
  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",
245
245
  stroke: "currentColor"
246
246
  })));
@@ -473,6 +473,79 @@ var Checkbox = React.forwardRef(function (props, ref) {
473
473
  });
474
474
  Checkbox.displayName = 'Checkbox';
475
475
 
476
+ var getBackground$1 = function (theme) { return function (props) {
477
+ var variant = props.variant, severity = props.severity;
478
+ var background;
479
+ var backgrounds = {
480
+ outlined: 'none',
481
+ error: 'error.main',
482
+ warning: 'warning.main',
483
+ info: 'info.light',
484
+ success: 'success.light',
485
+ };
486
+ if (variant === 'outlined') {
487
+ background = backgrounds[variant];
488
+ }
489
+ else if (severity) {
490
+ var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
491
+ background = theme.palette[color][colorVariant];
492
+ }
493
+ return background;
494
+ }; };
495
+ var getColor$1 = function (theme) { return function (props) {
496
+ var variant = props.variant, severity = props.severity;
497
+ var textColor;
498
+ if (variant === 'outlined' && severity) {
499
+ var textColors = {
500
+ error: theme.palette.error.main,
501
+ info: theme.palette.info.main,
502
+ warning: theme.palette.warning.dark,
503
+ success: theme.palette.success.dark,
504
+ };
505
+ textColor = textColors[severity];
506
+ }
507
+ else if (variant === 'outlined' && !severity) {
508
+ textColor = theme.palette.grey[700];
509
+ }
510
+ else if ((variant === 'default' || variant === undefined) && severity) {
511
+ var textColors = {
512
+ error: theme.palette.common.white,
513
+ info: theme.palette.secondary.main,
514
+ warning: theme.palette.secondary.main,
515
+ success: theme.palette.secondary.main,
516
+ };
517
+ textColor = textColors[severity];
518
+ }
519
+ return textColor;
520
+ }; };
521
+ var getBorder = function (theme) { return function (props) {
522
+ var variant = props.variant, severity = props.severity;
523
+ var borderColor;
524
+ if (variant === 'outlined' && severity) {
525
+ var borderColors = {
526
+ error: theme.palette.error.main,
527
+ info: theme.palette.info.main,
528
+ warning: theme.palette.warning.dark,
529
+ success: theme.palette.success.dark,
530
+ };
531
+ borderColor = borderColors[severity];
532
+ }
533
+ return borderColor;
534
+ }; };
535
+ styles.makeStyles(function (theme) { return ({
536
+ root: {
537
+ background: getBackground$1(theme),
538
+ color: getColor$1(theme),
539
+ borderColor: getBorder(theme),
540
+ borderRadius: theme.spacing(0.5),
541
+ },
542
+ icon: {
543
+ color: 'inherit',
544
+ height: theme.spacing(2),
545
+ width: theme.spacing(2),
546
+ },
547
+ }); });
548
+
476
549
  var defaultTypographyProps = {
477
550
  variant: 'body1',
478
551
  };
@@ -810,19 +883,19 @@ core.makeStyles(function (theme) { return ({
810
883
  },
811
884
  }); });
812
885
 
813
- var _g$S;
886
+ var _g$1;
814
887
 
815
- 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); }
888
+ function _extends$6() { _extends$6 = 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$6.apply(this, arguments); }
816
889
 
817
890
  function SvgCheckCircle(props) {
818
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1$({
891
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
819
892
  viewBox: "0 0 16 16",
820
893
  fill: "none",
821
894
  strokeLinecap: "round",
822
895
  strokeLinejoin: "round",
823
896
  width: "1em",
824
897
  height: "1em"
825
- }, props), _g$S || (_g$S = /*#__PURE__*/React__namespace.createElement("g", {
898
+ }, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
826
899
  stroke: "currentColor"
827
900
  }, /*#__PURE__*/React__namespace.createElement("path", {
828
901
  d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
@@ -831,37 +904,37 @@ function SvgCheckCircle(props) {
831
904
  }))));
832
905
  }
833
906
 
834
- var _path$17;
907
+ var _path$4;
835
908
 
836
- function _extends$1Z() { _extends$1Z = 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$1Z.apply(this, arguments); }
909
+ function _extends$5() { _extends$5 = 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$5.apply(this, arguments); }
837
910
 
838
911
  function SvgX(props) {
839
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1Z({
912
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
840
913
  viewBox: "0 0 16 16",
841
914
  fill: "none",
842
915
  strokeLinecap: "round",
843
916
  strokeLinejoin: "round",
844
917
  width: "1em",
845
918
  height: "1em"
846
- }, props), _path$17 || (_path$17 = /*#__PURE__*/React__namespace.createElement("path", {
919
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
847
920
  d: "M12 4l-8 8m0-8l8 8",
848
921
  stroke: "currentColor"
849
922
  })));
850
923
  }
851
924
 
852
- var _g$N;
925
+ var _g;
853
926
 
854
- 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); }
927
+ function _extends$4() { _extends$4 = 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$4.apply(this, arguments); }
855
928
 
856
929
  function SvgHelp(props) {
857
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1P({
930
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
858
931
  viewBox: "0 0 16 16",
859
932
  fill: "none",
860
933
  strokeLinecap: "round",
861
934
  strokeLinejoin: "round",
862
935
  width: "1em",
863
936
  height: "1em"
864
- }, props), _g$N || (_g$N = /*#__PURE__*/React__namespace.createElement("g", {
937
+ }, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
865
938
  stroke: "currentColor"
866
939
  }, /*#__PURE__*/React__namespace.createElement("path", {
867
940
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
@@ -870,73 +943,73 @@ function SvgHelp(props) {
870
943
  }))));
871
944
  }
872
945
 
873
- var _path$10;
946
+ var _path$3;
874
947
 
875
- 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); }
948
+ 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); }
876
949
 
877
950
  function SvgInfo(props) {
878
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1N({
951
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
879
952
  viewBox: "0 0 16 16",
880
953
  fill: "none",
881
954
  strokeLinecap: "round",
882
955
  strokeLinejoin: "round",
883
956
  width: "1em",
884
957
  height: "1em"
885
- }, props), _path$10 || (_path$10 = /*#__PURE__*/React__namespace.createElement("path", {
958
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
886
959
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007",
887
960
  stroke: "currentColor"
888
961
  })));
889
962
  }
890
963
 
891
- var _path$F;
964
+ var _path$2;
892
965
 
893
- function _extends$1i() { _extends$1i = 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$1i.apply(this, arguments); }
966
+ 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); }
894
967
 
895
968
  function SvgError(props) {
896
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1i({
969
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
897
970
  viewBox: "0 0 16 16",
898
971
  fill: "none",
899
972
  strokeLinecap: "round",
900
973
  strokeLinejoin: "round",
901
974
  width: "1em",
902
975
  height: "1em"
903
- }, props), _path$F || (_path$F = /*#__PURE__*/React__namespace.createElement("path", {
976
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
904
977
  d: "M5.24 1.333h5.52l3.907 3.907v5.52l-3.907 3.907H5.24L1.333 10.76V5.24L5.24 1.333zm2.76 4V8m0 2.666h.008",
905
978
  stroke: "currentColor"
906
979
  })));
907
980
  }
908
981
 
909
- var _path$E;
982
+ var _path$1;
910
983
 
911
- function _extends$1h() { _extends$1h = 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$1h.apply(this, arguments); }
984
+ 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); }
912
985
 
913
986
  function SvgWarning(props) {
914
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1h({
987
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
915
988
  viewBox: "0 0 16 16",
916
989
  fill: "none",
917
990
  strokeLinecap: "round",
918
991
  strokeLinejoin: "round",
919
992
  width: "1em",
920
993
  height: "1em"
921
- }, props), _path$E || (_path$E = /*#__PURE__*/React__namespace.createElement("path", {
994
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
922
995
  d: "M6.86 2.573L1.213 12a1.334 1.334 0 001.14 2h11.294a1.332 1.332 0 001.14-2L9.14 2.573a1.333 1.333 0 00-2.28 0v0zM8 6v2.667m0 2.667h.007",
923
996
  stroke: "currentColor"
924
997
  })));
925
998
  }
926
999
 
927
- var _path$e;
1000
+ var _path;
928
1001
 
929
- function _extends$B() { _extends$B = 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$B.apply(this, arguments); }
1002
+ 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); }
930
1003
 
931
1004
  function SvgCircle(props) {
932
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
1005
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
933
1006
  viewBox: "0 0 16 16",
934
1007
  fill: "none",
935
1008
  strokeLinecap: "round",
936
1009
  strokeLinejoin: "round",
937
1010
  width: "1em",
938
1011
  height: "1em"
939
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
1012
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
940
1013
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z",
941
1014
  stroke: "currentColor"
942
1015
  })));