@popmenu/admin-ui 0.40.5 → 0.43.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 CHANGED
@@ -176,19 +176,19 @@ function __rest(s, e) {
176
176
  return t;
177
177
  }
178
178
 
179
- var _path$I;
179
+ var _path$F;
180
180
 
181
- 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); }
181
+ function _extends$1s() { _extends$1s = 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$1s.apply(this, arguments); }
182
182
 
183
183
  function SvgUser(props) {
184
- return /*#__PURE__*/React.createElement("svg", _extends$1m({
184
+ return /*#__PURE__*/React.createElement("svg", _extends$1s({
185
185
  viewBox: "0 0 16 16",
186
186
  fill: "none",
187
187
  strokeLinecap: "round",
188
188
  strokeLinejoin: "round",
189
189
  width: "1em",
190
190
  height: "1em"
191
- }, props), _path$I || (_path$I = /*#__PURE__*/React.createElement("path", {
191
+ }, props), _path$F || (_path$F = /*#__PURE__*/React.createElement("path", {
192
192
  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",
193
193
  stroke: "currentColor"
194
194
  })));
@@ -421,6 +421,79 @@ var Checkbox = forwardRef(function (props, ref) {
421
421
  });
422
422
  Checkbox.displayName = 'Checkbox';
423
423
 
424
+ var getBackground$1 = function (theme) { return function (props) {
425
+ var variant = props.variant, severity = props.severity;
426
+ var background;
427
+ var backgrounds = {
428
+ outlined: 'none',
429
+ error: 'error.main',
430
+ warning: 'warning.main',
431
+ info: 'info.light',
432
+ success: 'success.light',
433
+ };
434
+ if (variant === 'outlined') {
435
+ background = backgrounds[variant];
436
+ }
437
+ else if (severity) {
438
+ var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
439
+ background = theme.palette[color][colorVariant];
440
+ }
441
+ return background;
442
+ }; };
443
+ var getColor$1 = function (theme) { return function (props) {
444
+ var variant = props.variant, severity = props.severity;
445
+ var textColor;
446
+ if (variant === 'outlined' && severity) {
447
+ var textColors = {
448
+ error: theme.palette.error.main,
449
+ info: theme.palette.info.main,
450
+ warning: theme.palette.warning.dark,
451
+ success: theme.palette.success.dark,
452
+ };
453
+ textColor = textColors[severity];
454
+ }
455
+ else if (variant === 'outlined' && !severity) {
456
+ textColor = theme.palette.grey[700];
457
+ }
458
+ else if ((variant === 'default' || variant === undefined) && severity) {
459
+ var textColors = {
460
+ error: theme.palette.common.white,
461
+ info: theme.palette.secondary.main,
462
+ warning: theme.palette.secondary.main,
463
+ success: theme.palette.secondary.main,
464
+ };
465
+ textColor = textColors[severity];
466
+ }
467
+ return textColor;
468
+ }; };
469
+ var getBorder = function (theme) { return function (props) {
470
+ var variant = props.variant, severity = props.severity;
471
+ var borderColor;
472
+ if (variant === 'outlined' && severity) {
473
+ var borderColors = {
474
+ error: theme.palette.error.main,
475
+ info: theme.palette.info.main,
476
+ warning: theme.palette.warning.dark,
477
+ success: theme.palette.success.dark,
478
+ };
479
+ borderColor = borderColors[severity];
480
+ }
481
+ return borderColor;
482
+ }; };
483
+ makeStyles$1(function (theme) { return ({
484
+ root: {
485
+ background: getBackground$1(theme),
486
+ color: getColor$1(theme),
487
+ borderColor: getBorder(theme),
488
+ borderRadius: theme.spacing(0.5),
489
+ },
490
+ icon: {
491
+ color: 'inherit',
492
+ height: theme.spacing(2),
493
+ width: theme.spacing(2),
494
+ },
495
+ }); });
496
+
424
497
  var defaultTypographyProps = {
425
498
  variant: 'body1',
426
499
  };
@@ -758,136 +831,169 @@ makeStyles(function (theme) { return ({
758
831
  },
759
832
  }); });
760
833
 
761
- var _g$S;
834
+ var _g$17, _defs$I;
762
835
 
763
- 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); }
836
+ function _extends$25() { _extends$25 = 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$25.apply(this, arguments); }
764
837
 
765
838
  function SvgCheckCircle(props) {
766
- return /*#__PURE__*/React.createElement("svg", _extends$1$({
839
+ return /*#__PURE__*/React.createElement("svg", _extends$25({
767
840
  viewBox: "0 0 16 16",
768
841
  fill: "none",
769
842
  strokeLinecap: "round",
770
843
  strokeLinejoin: "round",
771
844
  width: "1em",
772
845
  height: "1em"
773
- }, props), _g$S || (_g$S = /*#__PURE__*/React.createElement("g", {
846
+ }, props), _g$17 || (_g$17 = /*#__PURE__*/React.createElement("g", {
847
+ clipPath: "url(#check-circle_svg__clip0_8_5831)",
774
848
  stroke: "currentColor"
775
849
  }, /*#__PURE__*/React.createElement("path", {
776
850
  d: "M14.667 7.387V8a6.667 6.667 0 11-3.954-6.093"
777
851
  }), /*#__PURE__*/React.createElement("path", {
778
852
  d: "M14.667 2.667L8 9.34l-2-2"
779
- }))));
853
+ }))), _defs$I || (_defs$I = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
854
+ id: "check-circle_svg__clip0_8_5831"
855
+ }, /*#__PURE__*/React.createElement("path", {
856
+ fill: "currentColor",
857
+ d: "M0 0h16v16H0z"
858
+ })))));
780
859
  }
781
860
 
782
- var _path$17;
861
+ var _path$W;
783
862
 
784
- 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); }
863
+ function _extends$23() { _extends$23 = 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$23.apply(this, arguments); }
785
864
 
786
865
  function SvgX(props) {
787
- return /*#__PURE__*/React.createElement("svg", _extends$1Z({
866
+ return /*#__PURE__*/React.createElement("svg", _extends$23({
788
867
  viewBox: "0 0 16 16",
789
868
  fill: "none",
790
869
  strokeLinecap: "round",
791
870
  strokeLinejoin: "round",
792
871
  width: "1em",
793
872
  height: "1em"
794
- }, props), _path$17 || (_path$17 = /*#__PURE__*/React.createElement("path", {
873
+ }, props), _path$W || (_path$W = /*#__PURE__*/React.createElement("path", {
795
874
  d: "M12 4l-8 8m0-8l8 8",
796
875
  stroke: "currentColor"
797
876
  })));
798
877
  }
799
878
 
800
- var _g$N;
879
+ var _g$$, _defs$B;
801
880
 
802
- 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); }
881
+ function _extends$1V() { _extends$1V = 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$1V.apply(this, arguments); }
803
882
 
804
883
  function SvgHelp(props) {
805
- return /*#__PURE__*/React.createElement("svg", _extends$1P({
884
+ return /*#__PURE__*/React.createElement("svg", _extends$1V({
806
885
  viewBox: "0 0 16 16",
807
886
  fill: "none",
808
887
  strokeLinecap: "round",
809
888
  strokeLinejoin: "round",
810
889
  width: "1em",
811
890
  height: "1em"
812
- }, props), _g$N || (_g$N = /*#__PURE__*/React.createElement("g", {
891
+ }, props), _g$$ || (_g$$ = /*#__PURE__*/React.createElement("g", {
892
+ clipPath: "url(#help_svg__clip0_8_5446)",
813
893
  stroke: "currentColor"
814
894
  }, /*#__PURE__*/React.createElement("path", {
815
895
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
816
896
  }), /*#__PURE__*/React.createElement("path", {
817
897
  d: "M6.06 6a2 2 0 013.887.667c0 1.333-2 2-2 2M8 11.334h.007"
818
- }))));
898
+ }))), _defs$B || (_defs$B = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
899
+ id: "help_svg__clip0_8_5446"
900
+ }, /*#__PURE__*/React.createElement("path", {
901
+ fill: "currentColor",
902
+ d: "M0 0h16v16H0z"
903
+ })))));
819
904
  }
820
905
 
821
- var _path$10;
906
+ var _g$Z, _defs$A;
822
907
 
823
- 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); }
908
+ function _extends$1T() { _extends$1T = 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$1T.apply(this, arguments); }
824
909
 
825
910
  function SvgInfo(props) {
826
- return /*#__PURE__*/React.createElement("svg", _extends$1N({
911
+ return /*#__PURE__*/React.createElement("svg", _extends$1T({
827
912
  viewBox: "0 0 16 16",
828
913
  fill: "none",
829
914
  strokeLinecap: "round",
830
915
  strokeLinejoin: "round",
831
916
  width: "1em",
832
917
  height: "1em"
833
- }, props), _path$10 || (_path$10 = /*#__PURE__*/React.createElement("path", {
834
- d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007",
918
+ }, props), _g$Z || (_g$Z = /*#__PURE__*/React.createElement("g", {
919
+ clipPath: "url(#info_svg__clip0_8_5377)",
835
920
  stroke: "currentColor"
836
- })));
921
+ }, /*#__PURE__*/React.createElement("path", {
922
+ d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-4V8m0-2.667h.007"
923
+ }))), _defs$A || (_defs$A = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
924
+ id: "info_svg__clip0_8_5377"
925
+ }, /*#__PURE__*/React.createElement("path", {
926
+ fill: "currentColor",
927
+ d: "M0 0h16v16H0z"
928
+ })))));
837
929
  }
838
930
 
839
- var _path$F;
931
+ var _g$K, _defs$r;
840
932
 
841
- 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); }
933
+ function _extends$1o() { _extends$1o = 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$1o.apply(this, arguments); }
842
934
 
843
935
  function SvgError(props) {
844
- return /*#__PURE__*/React.createElement("svg", _extends$1i({
936
+ return /*#__PURE__*/React.createElement("svg", _extends$1o({
845
937
  viewBox: "0 0 16 16",
846
938
  fill: "none",
847
939
  strokeLinecap: "round",
848
940
  strokeLinejoin: "round",
849
941
  width: "1em",
850
942
  height: "1em"
851
- }, props), _path$F || (_path$F = /*#__PURE__*/React.createElement("path", {
852
- 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",
943
+ }, props), _g$K || (_g$K = /*#__PURE__*/React.createElement("g", {
944
+ clipPath: "url(#error_svg__clip0_8_5411)",
853
945
  stroke: "currentColor"
854
- })));
946
+ }, /*#__PURE__*/React.createElement("path", {
947
+ 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"
948
+ }))), _defs$r || (_defs$r = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
949
+ id: "error_svg__clip0_8_5411"
950
+ }, /*#__PURE__*/React.createElement("path", {
951
+ fill: "currentColor",
952
+ d: "M0 0h16v16H0z"
953
+ })))));
855
954
  }
856
955
 
857
- var _path$E;
956
+ var _path$C;
858
957
 
859
- 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); }
958
+ 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); }
860
959
 
861
960
  function SvgWarning(props) {
862
- return /*#__PURE__*/React.createElement("svg", _extends$1h({
961
+ return /*#__PURE__*/React.createElement("svg", _extends$1n({
863
962
  viewBox: "0 0 16 16",
864
963
  fill: "none",
865
964
  strokeLinecap: "round",
866
965
  strokeLinejoin: "round",
867
966
  width: "1em",
868
967
  height: "1em"
869
- }, props), _path$E || (_path$E = /*#__PURE__*/React.createElement("path", {
968
+ }, props), _path$C || (_path$C = /*#__PURE__*/React.createElement("path", {
870
969
  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",
871
970
  stroke: "currentColor"
872
971
  })));
873
972
  }
874
973
 
875
- var _path$e;
974
+ var _g$q, _defs$k;
876
975
 
877
- 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); }
976
+ function _extends$H() { _extends$H = 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$H.apply(this, arguments); }
878
977
 
879
978
  function SvgCircle(props) {
880
- return /*#__PURE__*/React.createElement("svg", _extends$B({
979
+ return /*#__PURE__*/React.createElement("svg", _extends$H({
881
980
  viewBox: "0 0 16 16",
882
981
  fill: "none",
883
982
  strokeLinecap: "round",
884
983
  strokeLinejoin: "round",
885
984
  width: "1em",
886
985
  height: "1em"
887
- }, props), _path$e || (_path$e = /*#__PURE__*/React.createElement("path", {
986
+ }, props), _g$q || (_g$q = /*#__PURE__*/React.createElement("g", {
987
+ clipPath: "url(#circle_svg__clip0_8_2293)"
988
+ }, /*#__PURE__*/React.createElement("path", {
888
989
  d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z",
889
990
  stroke: "currentColor"
890
- })));
991
+ }))), _defs$k || (_defs$k = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
992
+ id: "circle_svg__clip0_8_2293"
993
+ }, /*#__PURE__*/React.createElement("path", {
994
+ fill: "currentColor",
995
+ d: "M0 0h16v16H0z"
996
+ })))));
891
997
  }
892
998
 
893
999
  var useAlertStyles = makeStyles$1(function (theme) { return ({