@popmenu/table 0.27.0 → 0.30.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 +141 -61
- package/build/index.es.js.map +1 -1
- package/build/index.js +141 -61
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -178,21 +178,21 @@ function __rest(s, e) {
|
|
|
178
178
|
return t;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
var _path$
|
|
181
|
+
var _path$24;
|
|
182
182
|
|
|
183
|
-
function _extends$
|
|
183
|
+
function _extends$3i() { _extends$3i = 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$3i.apply(this, arguments); }
|
|
184
184
|
|
|
185
185
|
function SvgUser(props) {
|
|
186
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
186
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3i({
|
|
187
187
|
viewBox: "0 0 16 16",
|
|
188
|
+
fill: "none",
|
|
188
189
|
strokeLinecap: "round",
|
|
189
190
|
strokeLinejoin: "round",
|
|
190
|
-
stroke: "currentColor",
|
|
191
191
|
width: "1em",
|
|
192
|
-
height: "1em"
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
height: "1em"
|
|
193
|
+
}, props), _path$24 || (_path$24 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
194
|
+
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",
|
|
195
|
+
stroke: "currentColor"
|
|
196
196
|
})));
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -423,29 +423,109 @@ var Checkbox = React.forwardRef(function (props, ref) {
|
|
|
423
423
|
});
|
|
424
424
|
Checkbox.displayName = 'Checkbox';
|
|
425
425
|
|
|
426
|
-
var
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
|
|
426
|
+
var weights = {
|
|
427
|
+
regular: 400,
|
|
428
|
+
'semi-bold': 600,
|
|
429
|
+
bold: 700,
|
|
430
|
+
};
|
|
431
|
+
var getColor = function (theme, props) {
|
|
432
|
+
var color = props.color;
|
|
433
|
+
if (color === undefined) {
|
|
434
|
+
return undefined;
|
|
435
|
+
}
|
|
436
|
+
if (['white', 'black'].includes(color)) {
|
|
437
|
+
return theme.palette.common[color];
|
|
438
|
+
}
|
|
439
|
+
if (color.match(/^grey\.\d{3}/)) {
|
|
440
|
+
var scale = color.split('.')[1];
|
|
441
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
442
|
+
}
|
|
443
|
+
if ([
|
|
444
|
+
'primary.light',
|
|
445
|
+
'primary.dark',
|
|
446
|
+
'secondary.light',
|
|
447
|
+
'secondary',
|
|
448
|
+
'secondary.dark',
|
|
449
|
+
'info.light',
|
|
450
|
+
'info.dark',
|
|
451
|
+
'success.light',
|
|
452
|
+
'success.dark',
|
|
453
|
+
'error.light',
|
|
454
|
+
'error.dark',
|
|
455
|
+
'warning.light',
|
|
456
|
+
'warning.dark',
|
|
457
|
+
].includes(color)) {
|
|
458
|
+
var _a = color.split('.'), paletteKey = _a[0], variant = _a[1];
|
|
459
|
+
return theme.palette[paletteKey][variant];
|
|
460
|
+
}
|
|
461
|
+
if (['success', 'info', 'error', 'warning', 'primary', 'secondary'].includes(color)) {
|
|
462
|
+
return theme.palette[color].main;
|
|
463
|
+
}
|
|
464
|
+
if (['textPrimary', 'textSecondary'].includes(color)) {
|
|
465
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
466
|
+
}
|
|
467
|
+
return undefined;
|
|
468
|
+
};
|
|
469
|
+
var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
470
|
+
var _a;
|
|
471
|
+
return ({
|
|
472
|
+
root: (_a = {},
|
|
473
|
+
_a["& ." + iconStaticClassName] = {
|
|
474
|
+
position: 'relative',
|
|
475
|
+
top: '0.125em',
|
|
476
|
+
padding: '0 0.125em',
|
|
477
|
+
boxSizing: 'content-box',
|
|
478
|
+
},
|
|
479
|
+
_a.fontFamily = theme.typography.fontFamily,
|
|
480
|
+
_a.fontWeight = function (_a) {
|
|
481
|
+
var variant = _a.variant, weight = _a.weight;
|
|
482
|
+
return (weight ? weights[weight] : theme.typography[variant || 'body1'].fontWeight);
|
|
483
|
+
},
|
|
484
|
+
_a.fontSize = function (_a) {
|
|
485
|
+
var variant = _a.variant;
|
|
486
|
+
return theme.typography[variant || 'body1'].fontSize;
|
|
487
|
+
},
|
|
488
|
+
_a.lineHeight = function (_a) {
|
|
489
|
+
var variant = _a.variant;
|
|
490
|
+
return theme.typography[variant || 'body1'].lineHeight;
|
|
491
|
+
},
|
|
492
|
+
_a.textTransform = function (_a) {
|
|
493
|
+
var variant = _a.variant;
|
|
494
|
+
return theme.typography[variant || 'body1'].textTransform;
|
|
495
|
+
},
|
|
496
|
+
_a.color = function (props) { return getColor(theme, props); },
|
|
497
|
+
_a),
|
|
498
|
+
caption: {
|
|
499
|
+
display: 'inline',
|
|
500
|
+
},
|
|
501
|
+
overline: {
|
|
502
|
+
display: 'inline',
|
|
503
|
+
},
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
var variantMap = {
|
|
508
|
+
h1: 'h1',
|
|
509
|
+
h2: 'h2',
|
|
510
|
+
h3: 'h3',
|
|
511
|
+
h4: 'h4',
|
|
512
|
+
h5: 'h5',
|
|
513
|
+
h6: 'h6',
|
|
514
|
+
h7: 'h6',
|
|
515
|
+
body1: 'p',
|
|
516
|
+
body2: 'p',
|
|
517
|
+
subtitle1: 'h6',
|
|
518
|
+
subtitle2: 'h6',
|
|
519
|
+
caption: 'span',
|
|
520
|
+
overline: 'span',
|
|
521
|
+
};
|
|
444
522
|
|
|
445
523
|
var Typography = React.forwardRef(function (props, ref) {
|
|
446
|
-
props.weight; var restProps = __rest(props, ["weight"]);
|
|
447
|
-
var
|
|
448
|
-
|
|
524
|
+
props.weight; var _a = props.variant, variant = _a === void 0 ? 'body1' : _a; props.color; var restProps = __rest(props, ["weight", "variant", "color"]);
|
|
525
|
+
var validatedVariant = Object.keys(variantMap).includes(variant) ? variant : 'body1';
|
|
526
|
+
var classes = useTypographyStyles(__assign(__assign({}, props), { variant: validatedVariant }));
|
|
527
|
+
var component = variantMap[validatedVariant];
|
|
528
|
+
return React__default['default'].createElement(core.Typography, __assign({ component: component, ref: ref, classes: classes }, restProps, { variant: "inherit" }));
|
|
449
529
|
});
|
|
450
530
|
Typography.displayName = 'Typography';
|
|
451
531
|
|
|
@@ -715,75 +795,75 @@ var TableHeader = function (props) {
|
|
|
715
795
|
return React__default['default'].createElement("thead", __assign$1({}, restProps), children);
|
|
716
796
|
};
|
|
717
797
|
|
|
718
|
-
var _path$
|
|
798
|
+
var _path$39;
|
|
719
799
|
|
|
720
|
-
function _extends$
|
|
800
|
+
function _extends$50() { _extends$50 = 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$50.apply(this, arguments); }
|
|
721
801
|
|
|
722
802
|
function SvgChevronDown(props) {
|
|
723
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
803
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$50({
|
|
724
804
|
viewBox: "0 0 16 16",
|
|
805
|
+
fill: "none",
|
|
725
806
|
strokeLinecap: "round",
|
|
726
807
|
strokeLinejoin: "round",
|
|
727
|
-
stroke: "currentColor",
|
|
728
808
|
width: "1em",
|
|
729
|
-
height: "1em"
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
809
|
+
height: "1em"
|
|
810
|
+
}, props), _path$39 || (_path$39 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
811
|
+
d: "M4 6l4 4 4-4",
|
|
812
|
+
stroke: "currentColor"
|
|
733
813
|
})));
|
|
734
814
|
}
|
|
735
815
|
|
|
736
|
-
var _path$
|
|
816
|
+
var _path$38;
|
|
737
817
|
|
|
738
|
-
function _extends$
|
|
818
|
+
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); }
|
|
739
819
|
|
|
740
820
|
function SvgChevronUp(props) {
|
|
741
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
821
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4$({
|
|
742
822
|
viewBox: "0 0 16 16",
|
|
823
|
+
fill: "none",
|
|
743
824
|
strokeLinecap: "round",
|
|
744
825
|
strokeLinejoin: "round",
|
|
745
|
-
stroke: "currentColor",
|
|
746
826
|
width: "1em",
|
|
747
|
-
height: "1em"
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
827
|
+
height: "1em"
|
|
828
|
+
}, props), _path$38 || (_path$38 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
829
|
+
d: "M12 10L8 6l-4 4",
|
|
830
|
+
stroke: "currentColor"
|
|
751
831
|
})));
|
|
752
832
|
}
|
|
753
833
|
|
|
754
|
-
var _path$
|
|
834
|
+
var _path$2o;
|
|
755
835
|
|
|
756
|
-
function _extends$
|
|
836
|
+
function _extends$3I() { _extends$3I = 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$3I.apply(this, arguments); }
|
|
757
837
|
|
|
758
838
|
function SvgMore(props) {
|
|
759
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
839
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3I({
|
|
760
840
|
viewBox: "0 0 16 16",
|
|
841
|
+
fill: "none",
|
|
761
842
|
strokeLinecap: "round",
|
|
762
843
|
strokeLinejoin: "round",
|
|
763
|
-
stroke: "currentColor",
|
|
764
844
|
width: "1em",
|
|
765
|
-
height: "1em"
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
845
|
+
height: "1em"
|
|
846
|
+
}, props), _path$2o || (_path$2o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
847
|
+
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",
|
|
848
|
+
stroke: "currentColor"
|
|
769
849
|
})));
|
|
770
850
|
}
|
|
771
851
|
|
|
772
|
-
var _path$
|
|
852
|
+
var _path$2f;
|
|
773
853
|
|
|
774
|
-
function _extends$
|
|
854
|
+
function _extends$3y() { _extends$3y = 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$3y.apply(this, arguments); }
|
|
775
855
|
|
|
776
856
|
function SvgSearch(props) {
|
|
777
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
857
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3y({
|
|
778
858
|
viewBox: "0 0 16 16",
|
|
859
|
+
fill: "none",
|
|
779
860
|
strokeLinecap: "round",
|
|
780
861
|
strokeLinejoin: "round",
|
|
781
|
-
stroke: "currentColor",
|
|
782
862
|
width: "1em",
|
|
783
|
-
height: "1em"
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
863
|
+
height: "1em"
|
|
864
|
+
}, props), _path$2f || (_path$2f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
865
|
+
d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9",
|
|
866
|
+
stroke: "currentColor"
|
|
787
867
|
})));
|
|
788
868
|
}
|
|
789
869
|
|