@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.es.js
CHANGED
|
@@ -137,21 +137,21 @@ function __rest(s, e) {
|
|
|
137
137
|
return t;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
var _path$
|
|
140
|
+
var _path$24;
|
|
141
141
|
|
|
142
|
-
function _extends$
|
|
142
|
+
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); }
|
|
143
143
|
|
|
144
144
|
function SvgUser(props) {
|
|
145
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
145
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3i({
|
|
146
146
|
viewBox: "0 0 16 16",
|
|
147
|
+
fill: "none",
|
|
147
148
|
strokeLinecap: "round",
|
|
148
149
|
strokeLinejoin: "round",
|
|
149
|
-
stroke: "currentColor",
|
|
150
150
|
width: "1em",
|
|
151
|
-
height: "1em"
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
height: "1em"
|
|
152
|
+
}, props), _path$24 || (_path$24 = /*#__PURE__*/React.createElement("path", {
|
|
153
|
+
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",
|
|
154
|
+
stroke: "currentColor"
|
|
155
155
|
})));
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -382,29 +382,109 @@ var Checkbox = forwardRef(function (props, ref) {
|
|
|
382
382
|
});
|
|
383
383
|
Checkbox.displayName = 'Checkbox';
|
|
384
384
|
|
|
385
|
-
var
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
}
|
|
402
|
-
|
|
385
|
+
var weights = {
|
|
386
|
+
regular: 400,
|
|
387
|
+
'semi-bold': 600,
|
|
388
|
+
bold: 700,
|
|
389
|
+
};
|
|
390
|
+
var getColor = function (theme, props) {
|
|
391
|
+
var color = props.color;
|
|
392
|
+
if (color === undefined) {
|
|
393
|
+
return undefined;
|
|
394
|
+
}
|
|
395
|
+
if (['white', 'black'].includes(color)) {
|
|
396
|
+
return theme.palette.common[color];
|
|
397
|
+
}
|
|
398
|
+
if (color.match(/^grey\.\d{3}/)) {
|
|
399
|
+
var scale = color.split('.')[1];
|
|
400
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
401
|
+
}
|
|
402
|
+
if ([
|
|
403
|
+
'primary.light',
|
|
404
|
+
'primary.dark',
|
|
405
|
+
'secondary.light',
|
|
406
|
+
'secondary',
|
|
407
|
+
'secondary.dark',
|
|
408
|
+
'info.light',
|
|
409
|
+
'info.dark',
|
|
410
|
+
'success.light',
|
|
411
|
+
'success.dark',
|
|
412
|
+
'error.light',
|
|
413
|
+
'error.dark',
|
|
414
|
+
'warning.light',
|
|
415
|
+
'warning.dark',
|
|
416
|
+
].includes(color)) {
|
|
417
|
+
var _a = color.split('.'), paletteKey = _a[0], variant = _a[1];
|
|
418
|
+
return theme.palette[paletteKey][variant];
|
|
419
|
+
}
|
|
420
|
+
if (['success', 'info', 'error', 'warning', 'primary', 'secondary'].includes(color)) {
|
|
421
|
+
return theme.palette[color].main;
|
|
422
|
+
}
|
|
423
|
+
if (['textPrimary', 'textSecondary'].includes(color)) {
|
|
424
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
425
|
+
}
|
|
426
|
+
return undefined;
|
|
427
|
+
};
|
|
428
|
+
var useTypographyStyles = makeStyles$1(function (theme) {
|
|
429
|
+
var _a;
|
|
430
|
+
return ({
|
|
431
|
+
root: (_a = {},
|
|
432
|
+
_a["& ." + iconStaticClassName] = {
|
|
433
|
+
position: 'relative',
|
|
434
|
+
top: '0.125em',
|
|
435
|
+
padding: '0 0.125em',
|
|
436
|
+
boxSizing: 'content-box',
|
|
437
|
+
},
|
|
438
|
+
_a.fontFamily = theme.typography.fontFamily,
|
|
439
|
+
_a.fontWeight = function (_a) {
|
|
440
|
+
var variant = _a.variant, weight = _a.weight;
|
|
441
|
+
return (weight ? weights[weight] : theme.typography[variant || 'body1'].fontWeight);
|
|
442
|
+
},
|
|
443
|
+
_a.fontSize = function (_a) {
|
|
444
|
+
var variant = _a.variant;
|
|
445
|
+
return theme.typography[variant || 'body1'].fontSize;
|
|
446
|
+
},
|
|
447
|
+
_a.lineHeight = function (_a) {
|
|
448
|
+
var variant = _a.variant;
|
|
449
|
+
return theme.typography[variant || 'body1'].lineHeight;
|
|
450
|
+
},
|
|
451
|
+
_a.textTransform = function (_a) {
|
|
452
|
+
var variant = _a.variant;
|
|
453
|
+
return theme.typography[variant || 'body1'].textTransform;
|
|
454
|
+
},
|
|
455
|
+
_a.color = function (props) { return getColor(theme, props); },
|
|
456
|
+
_a),
|
|
457
|
+
caption: {
|
|
458
|
+
display: 'inline',
|
|
459
|
+
},
|
|
460
|
+
overline: {
|
|
461
|
+
display: 'inline',
|
|
462
|
+
},
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
var variantMap = {
|
|
467
|
+
h1: 'h1',
|
|
468
|
+
h2: 'h2',
|
|
469
|
+
h3: 'h3',
|
|
470
|
+
h4: 'h4',
|
|
471
|
+
h5: 'h5',
|
|
472
|
+
h6: 'h6',
|
|
473
|
+
h7: 'h6',
|
|
474
|
+
body1: 'p',
|
|
475
|
+
body2: 'p',
|
|
476
|
+
subtitle1: 'h6',
|
|
477
|
+
subtitle2: 'h6',
|
|
478
|
+
caption: 'span',
|
|
479
|
+
overline: 'span',
|
|
480
|
+
};
|
|
403
481
|
|
|
404
482
|
var Typography = forwardRef(function (props, ref) {
|
|
405
|
-
props.weight; var restProps = __rest(props, ["weight"]);
|
|
406
|
-
var
|
|
407
|
-
|
|
483
|
+
props.weight; var _a = props.variant, variant = _a === void 0 ? 'body1' : _a; props.color; var restProps = __rest(props, ["weight", "variant", "color"]);
|
|
484
|
+
var validatedVariant = Object.keys(variantMap).includes(variant) ? variant : 'body1';
|
|
485
|
+
var classes = useTypographyStyles(__assign(__assign({}, props), { variant: validatedVariant }));
|
|
486
|
+
var component = variantMap[validatedVariant];
|
|
487
|
+
return React__default.createElement(Typography$1, __assign({ component: component, ref: ref, classes: classes }, restProps, { variant: "inherit" }));
|
|
408
488
|
});
|
|
409
489
|
Typography.displayName = 'Typography';
|
|
410
490
|
|
|
@@ -674,75 +754,75 @@ var TableHeader = function (props) {
|
|
|
674
754
|
return React__default.createElement("thead", __assign$1({}, restProps), children);
|
|
675
755
|
};
|
|
676
756
|
|
|
677
|
-
var _path$
|
|
757
|
+
var _path$39;
|
|
678
758
|
|
|
679
|
-
function _extends$
|
|
759
|
+
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); }
|
|
680
760
|
|
|
681
761
|
function SvgChevronDown(props) {
|
|
682
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
762
|
+
return /*#__PURE__*/React.createElement("svg", _extends$50({
|
|
683
763
|
viewBox: "0 0 16 16",
|
|
764
|
+
fill: "none",
|
|
684
765
|
strokeLinecap: "round",
|
|
685
766
|
strokeLinejoin: "round",
|
|
686
|
-
stroke: "currentColor",
|
|
687
767
|
width: "1em",
|
|
688
|
-
height: "1em"
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
768
|
+
height: "1em"
|
|
769
|
+
}, props), _path$39 || (_path$39 = /*#__PURE__*/React.createElement("path", {
|
|
770
|
+
d: "M4 6l4 4 4-4",
|
|
771
|
+
stroke: "currentColor"
|
|
692
772
|
})));
|
|
693
773
|
}
|
|
694
774
|
|
|
695
|
-
var _path$
|
|
775
|
+
var _path$38;
|
|
696
776
|
|
|
697
|
-
function _extends$
|
|
777
|
+
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); }
|
|
698
778
|
|
|
699
779
|
function SvgChevronUp(props) {
|
|
700
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
780
|
+
return /*#__PURE__*/React.createElement("svg", _extends$4$({
|
|
701
781
|
viewBox: "0 0 16 16",
|
|
782
|
+
fill: "none",
|
|
702
783
|
strokeLinecap: "round",
|
|
703
784
|
strokeLinejoin: "round",
|
|
704
|
-
stroke: "currentColor",
|
|
705
785
|
width: "1em",
|
|
706
|
-
height: "1em"
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
786
|
+
height: "1em"
|
|
787
|
+
}, props), _path$38 || (_path$38 = /*#__PURE__*/React.createElement("path", {
|
|
788
|
+
d: "M12 10L8 6l-4 4",
|
|
789
|
+
stroke: "currentColor"
|
|
710
790
|
})));
|
|
711
791
|
}
|
|
712
792
|
|
|
713
|
-
var _path$
|
|
793
|
+
var _path$2o;
|
|
714
794
|
|
|
715
|
-
function _extends$
|
|
795
|
+
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); }
|
|
716
796
|
|
|
717
797
|
function SvgMore(props) {
|
|
718
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
798
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3I({
|
|
719
799
|
viewBox: "0 0 16 16",
|
|
800
|
+
fill: "none",
|
|
720
801
|
strokeLinecap: "round",
|
|
721
802
|
strokeLinejoin: "round",
|
|
722
|
-
stroke: "currentColor",
|
|
723
803
|
width: "1em",
|
|
724
|
-
height: "1em"
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
804
|
+
height: "1em"
|
|
805
|
+
}, props), _path$2o || (_path$2o = /*#__PURE__*/React.createElement("path", {
|
|
806
|
+
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",
|
|
807
|
+
stroke: "currentColor"
|
|
728
808
|
})));
|
|
729
809
|
}
|
|
730
810
|
|
|
731
|
-
var _path$
|
|
811
|
+
var _path$2f;
|
|
732
812
|
|
|
733
|
-
function _extends$
|
|
813
|
+
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); }
|
|
734
814
|
|
|
735
815
|
function SvgSearch(props) {
|
|
736
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
816
|
+
return /*#__PURE__*/React.createElement("svg", _extends$3y({
|
|
737
817
|
viewBox: "0 0 16 16",
|
|
818
|
+
fill: "none",
|
|
738
819
|
strokeLinecap: "round",
|
|
739
820
|
strokeLinejoin: "round",
|
|
740
|
-
stroke: "currentColor",
|
|
741
821
|
width: "1em",
|
|
742
|
-
height: "1em"
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
822
|
+
height: "1em"
|
|
823
|
+
}, props), _path$2f || (_path$2f = /*#__PURE__*/React.createElement("path", {
|
|
824
|
+
d: "M7.333 12.667A5.333 5.333 0 107.333 2a5.333 5.333 0 000 10.667zM14 14l-2.9-2.9",
|
|
825
|
+
stroke: "currentColor"
|
|
746
826
|
})));
|
|
747
827
|
}
|
|
748
828
|
|