@popmenu/table 0.107.0 → 0.109.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 +34 -5
- package/build/index.es.js.map +1 -1
- package/build/index.js +34 -5
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -290,6 +290,7 @@ var useIconStyles$1 = makeStyles(function (_a) {
|
|
|
290
290
|
if (props.color) {
|
|
291
291
|
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
292
292
|
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
293
|
+
// @ts-expect-error - todo.
|
|
293
294
|
value = palette[color][variant];
|
|
294
295
|
}
|
|
295
296
|
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
@@ -525,6 +526,7 @@ var getBackground$2 = function (theme) { return function (props) {
|
|
|
525
526
|
}
|
|
526
527
|
else if (severity) {
|
|
527
528
|
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
529
|
+
// @ts-expect-error - todo.
|
|
528
530
|
background = theme.palette[color][colorVariant];
|
|
529
531
|
}
|
|
530
532
|
return background;
|
|
@@ -618,14 +620,18 @@ var getCustomColor$1 = function (theme, color) {
|
|
|
618
620
|
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
619
621
|
switch (true) {
|
|
620
622
|
case isCommonColor:
|
|
623
|
+
// @ts-expect-error - todo.
|
|
621
624
|
return theme.palette.common[color];
|
|
622
625
|
case Boolean(isGreyColor):
|
|
623
626
|
var scale = color.split('.')[1];
|
|
627
|
+
// @ts-expect-error - todo.
|
|
624
628
|
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
625
629
|
case Boolean(isSemanticColor):
|
|
626
630
|
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
631
|
+
// @ts-expect-error - todo.
|
|
627
632
|
return theme.palette[paletteKey][variant];
|
|
628
633
|
case isTextColor:
|
|
634
|
+
// @ts-expect-error - todo.
|
|
629
635
|
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
630
636
|
default:
|
|
631
637
|
return undefined;
|
|
@@ -683,9 +689,12 @@ Typography$1.defaultProps = defaultTypographyProps$1;
|
|
|
683
689
|
|
|
684
690
|
var getFadeStop$1 = function (_a, typographyVariant) {
|
|
685
691
|
var typography = _a.typography;
|
|
692
|
+
// @ts-expect-error - todo.
|
|
686
693
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
687
|
-
?
|
|
688
|
-
|
|
694
|
+
? // @ts-expect-error - todo.
|
|
695
|
+
typography[typographyVariant].lineHeight + "rem"
|
|
696
|
+
: // @ts-expect-error - todo.
|
|
697
|
+
typography[typographyVariant].lineHeight;
|
|
689
698
|
};
|
|
690
699
|
makeStyles(function (theme) { return ({
|
|
691
700
|
overlay: {
|
|
@@ -716,6 +725,7 @@ makeStyles(function (theme) { return ({
|
|
|
716
725
|
var textColor = props.textColor;
|
|
717
726
|
if (Object.values(SemanticColors$1).includes(textColor)) {
|
|
718
727
|
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
728
|
+
// @ts-expect-error - todo.
|
|
719
729
|
return theme.palette[semanticColor][shade];
|
|
720
730
|
}
|
|
721
731
|
else if (textColor) {
|
|
@@ -732,6 +742,7 @@ makeStyles(function (theme) { return ({
|
|
|
732
742
|
var dividerColor = props.dividerColor;
|
|
733
743
|
if (Object.values(SemanticColors$1).includes(dividerColor)) {
|
|
734
744
|
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
745
|
+
// @ts-expect-error - todo.
|
|
735
746
|
return theme.palette[semanticColor][shade];
|
|
736
747
|
}
|
|
737
748
|
else if (dividerColor) {
|
|
@@ -1374,6 +1385,7 @@ var FilterControl = function (props) {
|
|
|
1374
1385
|
select: { multiple: false },
|
|
1375
1386
|
'multi-select': { multiple: true },
|
|
1376
1387
|
};
|
|
1388
|
+
// @ts-expect-error - todo.
|
|
1377
1389
|
return React__default.createElement("div", null, createElement(inputDictionary[input], __assign$3(__assign$3({}, columnFilter), propsDictionary[input])));
|
|
1378
1390
|
};
|
|
1379
1391
|
|
|
@@ -1611,6 +1623,7 @@ var useIconStyles = makeStyles(function (_a) {
|
|
|
1611
1623
|
if (props.color) {
|
|
1612
1624
|
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
1613
1625
|
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
1626
|
+
// @ts-expect-error - todo.
|
|
1614
1627
|
value = palette[color][variant];
|
|
1615
1628
|
}
|
|
1616
1629
|
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
@@ -1859,6 +1872,7 @@ var getBackground$1 = function (theme) { return function (props) {
|
|
|
1859
1872
|
}
|
|
1860
1873
|
else if (severity) {
|
|
1861
1874
|
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
1875
|
+
// @ts-expect-error - todo.
|
|
1862
1876
|
background = theme.palette[color][colorVariant];
|
|
1863
1877
|
}
|
|
1864
1878
|
return background;
|
|
@@ -1937,14 +1951,18 @@ var getCustomColor = function (theme, color) {
|
|
|
1937
1951
|
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
1938
1952
|
switch (true) {
|
|
1939
1953
|
case isCommonColor:
|
|
1954
|
+
// @ts-expect-error - todo.
|
|
1940
1955
|
return theme.palette.common[color];
|
|
1941
1956
|
case Boolean(isGreyColor):
|
|
1942
1957
|
var scale = color.split('.')[1];
|
|
1958
|
+
// @ts-expect-error - todo.
|
|
1943
1959
|
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
1944
1960
|
case Boolean(isSemanticColor):
|
|
1945
1961
|
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
1962
|
+
// @ts-expect-error - todo.
|
|
1946
1963
|
return theme.palette[paletteKey][variant];
|
|
1947
1964
|
case isTextColor:
|
|
1965
|
+
// @ts-expect-error - todo.
|
|
1948
1966
|
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
1949
1967
|
default:
|
|
1950
1968
|
return undefined;
|
|
@@ -2002,9 +2020,12 @@ Typography.defaultProps = defaultTypographyProps;
|
|
|
2002
2020
|
|
|
2003
2021
|
var getFadeStop = function (_a, typographyVariant) {
|
|
2004
2022
|
var typography = _a.typography;
|
|
2023
|
+
// @ts-expect-error - todo.
|
|
2005
2024
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
2006
|
-
?
|
|
2007
|
-
|
|
2025
|
+
? // @ts-expect-error - todo.
|
|
2026
|
+
typography[typographyVariant].lineHeight + "rem"
|
|
2027
|
+
: // @ts-expect-error - todo.
|
|
2028
|
+
typography[typographyVariant].lineHeight;
|
|
2008
2029
|
};
|
|
2009
2030
|
makeStyles(function (theme) { return ({
|
|
2010
2031
|
overlay: {
|
|
@@ -2035,6 +2056,7 @@ makeStyles(function (theme) { return ({
|
|
|
2035
2056
|
var textColor = props.textColor;
|
|
2036
2057
|
if (Object.values(SemanticColors).includes(textColor)) {
|
|
2037
2058
|
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
2059
|
+
// @ts-expect-error - todo.
|
|
2038
2060
|
return theme.palette[semanticColor][shade];
|
|
2039
2061
|
}
|
|
2040
2062
|
else if (textColor) {
|
|
@@ -2051,6 +2073,7 @@ makeStyles(function (theme) { return ({
|
|
|
2051
2073
|
var dividerColor = props.dividerColor;
|
|
2052
2074
|
if (Object.values(SemanticColors).includes(dividerColor)) {
|
|
2053
2075
|
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
2076
|
+
// @ts-expect-error - todo.
|
|
2054
2077
|
return theme.palette[semanticColor][shade];
|
|
2055
2078
|
}
|
|
2056
2079
|
else if (dividerColor) {
|
|
@@ -2474,7 +2497,9 @@ var Alert = forwardRef(function (props, ref) {
|
|
|
2474
2497
|
validLink && React__default.createElement(Link, __assign$1({}, validLink)),
|
|
2475
2498
|
onClose && (React__default.createElement(IconButton, { onClick: onClose },
|
|
2476
2499
|
React__default.createElement(Icon, { icon: SvgX })))));
|
|
2477
|
-
return (React__default.createElement(CommonAlert, __assign$1({ ref: ref, classes: classes,
|
|
2500
|
+
return (React__default.createElement(CommonAlert, __assign$1({ ref: ref, classes: classes,
|
|
2501
|
+
// @ts-expect-error - todo.
|
|
2502
|
+
icon: React__default.createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
|
|
2478
2503
|
});
|
|
2479
2504
|
Alert.displayName = 'Alert';
|
|
2480
2505
|
|
|
@@ -2483,6 +2508,7 @@ var getColor = function (palette, props) {
|
|
|
2483
2508
|
var variant = props.variant;
|
|
2484
2509
|
var color = 'inherit';
|
|
2485
2510
|
if (['primary', 'info', 'success', 'warning', 'error'].includes(variant)) {
|
|
2511
|
+
// @ts-expect-error - todo.
|
|
2486
2512
|
color = palette[variant].contrastText;
|
|
2487
2513
|
}
|
|
2488
2514
|
if (variant === 'secondary') {
|
|
@@ -2513,6 +2539,7 @@ var getColorHover = function (palette, props) {
|
|
|
2513
2539
|
var getBackground = function (palette, props) {
|
|
2514
2540
|
var backgroundColor = 'inherit';
|
|
2515
2541
|
if (['info', 'success', 'warning', 'error'].includes(props.variant)) {
|
|
2542
|
+
// @ts-expect-error - todo.
|
|
2516
2543
|
backgroundColor = palette[props.variant].main;
|
|
2517
2544
|
}
|
|
2518
2545
|
if (props.variant === 'primary') {
|
|
@@ -2530,6 +2557,7 @@ var getBackground = function (palette, props) {
|
|
|
2530
2557
|
var getBackgroundHover = function (palette, props) {
|
|
2531
2558
|
var backgroundHoverColor = 'inherit';
|
|
2532
2559
|
if (['primary', 'info', 'success', 'warning', 'error'].includes(props.variant)) {
|
|
2560
|
+
// @ts-expect-error - todo.
|
|
2533
2561
|
backgroundHoverColor = palette[props.variant].dark;
|
|
2534
2562
|
}
|
|
2535
2563
|
if (props.variant === 'secondary') {
|
|
@@ -2697,6 +2725,7 @@ AlertDialog.displayName = 'AlertDialog';
|
|
|
2697
2725
|
var getBorderColor = function (palette, variant) {
|
|
2698
2726
|
var borderColor = 'inherit';
|
|
2699
2727
|
if (['primary', 'secondary', 'info', 'success', 'warning', 'error'].includes(variant)) {
|
|
2728
|
+
// @ts-expect-error - todo.
|
|
2700
2729
|
borderColor = palette[variant].light;
|
|
2701
2730
|
}
|
|
2702
2731
|
return borderColor;
|