@popmenu/table 0.40.3 → 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.es.js +93 -20
- package/build/index.es.js.map +1 -1
- package/build/index.js +93 -20
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -138,19 +138,19 @@ function __rest(s, e) {
|
|
|
138
138
|
return t;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
var _path$
|
|
141
|
+
var _path$2$1;
|
|
142
142
|
|
|
143
|
-
function _extends$
|
|
143
|
+
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); }
|
|
144
144
|
|
|
145
145
|
function SvgUser(props) {
|
|
146
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
146
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2$1({
|
|
147
147
|
viewBox: "0 0 16 16",
|
|
148
148
|
fill: "none",
|
|
149
149
|
strokeLinecap: "round",
|
|
150
150
|
strokeLinejoin: "round",
|
|
151
151
|
width: "1em",
|
|
152
152
|
height: "1em"
|
|
153
|
-
}, props), _path$
|
|
153
|
+
}, props), _path$2$1 || (_path$2$1 = /*#__PURE__*/React.createElement("path", {
|
|
154
154
|
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",
|
|
155
155
|
stroke: "currentColor"
|
|
156
156
|
})));
|
|
@@ -383,6 +383,79 @@ var Checkbox = forwardRef(function (props, ref) {
|
|
|
383
383
|
});
|
|
384
384
|
Checkbox.displayName = 'Checkbox';
|
|
385
385
|
|
|
386
|
+
var getBackground = function (theme) { return function (props) {
|
|
387
|
+
var variant = props.variant, severity = props.severity;
|
|
388
|
+
var background;
|
|
389
|
+
var backgrounds = {
|
|
390
|
+
outlined: 'none',
|
|
391
|
+
error: 'error.main',
|
|
392
|
+
warning: 'warning.main',
|
|
393
|
+
info: 'info.light',
|
|
394
|
+
success: 'success.light',
|
|
395
|
+
};
|
|
396
|
+
if (variant === 'outlined') {
|
|
397
|
+
background = backgrounds[variant];
|
|
398
|
+
}
|
|
399
|
+
else if (severity) {
|
|
400
|
+
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
401
|
+
background = theme.palette[color][colorVariant];
|
|
402
|
+
}
|
|
403
|
+
return background;
|
|
404
|
+
}; };
|
|
405
|
+
var getColor = function (theme) { return function (props) {
|
|
406
|
+
var variant = props.variant, severity = props.severity;
|
|
407
|
+
var textColor;
|
|
408
|
+
if (variant === 'outlined' && severity) {
|
|
409
|
+
var textColors = {
|
|
410
|
+
error: theme.palette.error.main,
|
|
411
|
+
info: theme.palette.info.main,
|
|
412
|
+
warning: theme.palette.warning.dark,
|
|
413
|
+
success: theme.palette.success.dark,
|
|
414
|
+
};
|
|
415
|
+
textColor = textColors[severity];
|
|
416
|
+
}
|
|
417
|
+
else if (variant === 'outlined' && !severity) {
|
|
418
|
+
textColor = theme.palette.grey[700];
|
|
419
|
+
}
|
|
420
|
+
else if ((variant === 'default' || variant === undefined) && severity) {
|
|
421
|
+
var textColors = {
|
|
422
|
+
error: theme.palette.common.white,
|
|
423
|
+
info: theme.palette.secondary.main,
|
|
424
|
+
warning: theme.palette.secondary.main,
|
|
425
|
+
success: theme.palette.secondary.main,
|
|
426
|
+
};
|
|
427
|
+
textColor = textColors[severity];
|
|
428
|
+
}
|
|
429
|
+
return textColor;
|
|
430
|
+
}; };
|
|
431
|
+
var getBorder = function (theme) { return function (props) {
|
|
432
|
+
var variant = props.variant, severity = props.severity;
|
|
433
|
+
var borderColor;
|
|
434
|
+
if (variant === 'outlined' && severity) {
|
|
435
|
+
var borderColors = {
|
|
436
|
+
error: theme.palette.error.main,
|
|
437
|
+
info: theme.palette.info.main,
|
|
438
|
+
warning: theme.palette.warning.dark,
|
|
439
|
+
success: theme.palette.success.dark,
|
|
440
|
+
};
|
|
441
|
+
borderColor = borderColors[severity];
|
|
442
|
+
}
|
|
443
|
+
return borderColor;
|
|
444
|
+
}; };
|
|
445
|
+
makeStyles$1(function (theme) { return ({
|
|
446
|
+
root: {
|
|
447
|
+
background: getBackground(theme),
|
|
448
|
+
color: getColor(theme),
|
|
449
|
+
borderColor: getBorder(theme),
|
|
450
|
+
borderRadius: theme.spacing(0.5),
|
|
451
|
+
},
|
|
452
|
+
icon: {
|
|
453
|
+
color: 'inherit',
|
|
454
|
+
height: theme.spacing(2),
|
|
455
|
+
width: theme.spacing(2),
|
|
456
|
+
},
|
|
457
|
+
}); });
|
|
458
|
+
|
|
386
459
|
var defaultTypographyProps = {
|
|
387
460
|
variant: 'body1',
|
|
388
461
|
};
|
|
@@ -729,73 +802,73 @@ var TableHeader = function (props) {
|
|
|
729
802
|
return React__default.createElement("thead", __assign$1({}, restProps), children);
|
|
730
803
|
};
|
|
731
804
|
|
|
732
|
-
var _path$
|
|
805
|
+
var _path$3;
|
|
733
806
|
|
|
734
|
-
function _extends$
|
|
807
|
+
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); }
|
|
735
808
|
|
|
736
809
|
function SvgChevronDown(props) {
|
|
737
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
810
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
|
738
811
|
viewBox: "0 0 16 16",
|
|
739
812
|
fill: "none",
|
|
740
813
|
strokeLinecap: "round",
|
|
741
814
|
strokeLinejoin: "round",
|
|
742
815
|
width: "1em",
|
|
743
816
|
height: "1em"
|
|
744
|
-
}, props), _path$
|
|
817
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
|
|
745
818
|
d: "M4 6l4 4 4-4",
|
|
746
819
|
stroke: "currentColor"
|
|
747
820
|
})));
|
|
748
821
|
}
|
|
749
822
|
|
|
750
|
-
var _path$
|
|
823
|
+
var _path$2;
|
|
751
824
|
|
|
752
|
-
function _extends$
|
|
825
|
+
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); }
|
|
753
826
|
|
|
754
827
|
function SvgChevronUp(props) {
|
|
755
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
828
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
|
756
829
|
viewBox: "0 0 16 16",
|
|
757
830
|
fill: "none",
|
|
758
831
|
strokeLinecap: "round",
|
|
759
832
|
strokeLinejoin: "round",
|
|
760
833
|
width: "1em",
|
|
761
834
|
height: "1em"
|
|
762
|
-
}, props), _path$
|
|
835
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
|
|
763
836
|
d: "M12 10L8 6l-4 4",
|
|
764
837
|
stroke: "currentColor"
|
|
765
838
|
})));
|
|
766
839
|
}
|
|
767
840
|
|
|
768
|
-
var _path$
|
|
841
|
+
var _path$1;
|
|
769
842
|
|
|
770
|
-
function _extends$
|
|
843
|
+
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); }
|
|
771
844
|
|
|
772
845
|
function SvgMore(props) {
|
|
773
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
846
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
774
847
|
viewBox: "0 0 16 16",
|
|
775
848
|
fill: "none",
|
|
776
849
|
strokeLinecap: "round",
|
|
777
850
|
strokeLinejoin: "round",
|
|
778
851
|
width: "1em",
|
|
779
852
|
height: "1em"
|
|
780
|
-
}, props), _path$
|
|
853
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
|
|
781
854
|
d: "M8 8.667a.667.667 0 100-1.334.667.667 0 000 1.334zM8 4a.667.667 0 100-1.334A.667.667 0 008 4zm0 9.333A.667.667 0 108 12a.667.667 0 000 1.333z",
|
|
782
855
|
stroke: "currentColor"
|
|
783
856
|
})));
|
|
784
857
|
}
|
|
785
858
|
|
|
786
|
-
var _path
|
|
859
|
+
var _path;
|
|
787
860
|
|
|
788
|
-
function _extends
|
|
861
|
+
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); }
|
|
789
862
|
|
|
790
863
|
function SvgSearch(props) {
|
|
791
|
-
return /*#__PURE__*/React.createElement("svg", _extends
|
|
864
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
792
865
|
viewBox: "0 0 16 16",
|
|
793
866
|
fill: "none",
|
|
794
867
|
strokeLinecap: "round",
|
|
795
868
|
strokeLinejoin: "round",
|
|
796
869
|
width: "1em",
|
|
797
870
|
height: "1em"
|
|
798
|
-
}, props), _path
|
|
871
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
799
872
|
d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9",
|
|
800
873
|
stroke: "currentColor"
|
|
801
874
|
})));
|