@popmenu/table 0.107.0 → 0.108.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.js CHANGED
@@ -339,6 +339,7 @@ var useIconStyles$1 = core.makeStyles(function (_a) {
339
339
  if (props.color) {
340
340
  if (semanticColors.includes(props.color.split('.')[0])) {
341
341
  var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
342
+ // @ts-expect-error - todo.
342
343
  value = palette[color][variant];
343
344
  }
344
345
  else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
@@ -574,6 +575,7 @@ var getBackground$2 = function (theme) { return function (props) {
574
575
  }
575
576
  else if (severity) {
576
577
  var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
578
+ // @ts-expect-error - todo.
577
579
  background = theme.palette[color][colorVariant];
578
580
  }
579
581
  return background;
@@ -667,14 +669,18 @@ var getCustomColor$1 = function (theme, color) {
667
669
  var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
668
670
  switch (true) {
669
671
  case isCommonColor:
672
+ // @ts-expect-error - todo.
670
673
  return theme.palette.common[color];
671
674
  case Boolean(isGreyColor):
672
675
  var scale = color.split('.')[1];
676
+ // @ts-expect-error - todo.
673
677
  return theme.palette.grey[scale] || theme.palette.grey[900];
674
678
  case Boolean(isSemanticColor):
675
679
  var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
680
+ // @ts-expect-error - todo.
676
681
  return theme.palette[paletteKey][variant];
677
682
  case isTextColor:
683
+ // @ts-expect-error - todo.
678
684
  return theme.palette.text[color.slice(4).toLowerCase()];
679
685
  default:
680
686
  return undefined;
@@ -732,9 +738,12 @@ Typography$1.defaultProps = defaultTypographyProps$1;
732
738
 
733
739
  var getFadeStop$1 = function (_a, typographyVariant) {
734
740
  var typography = _a.typography;
741
+ // @ts-expect-error - todo.
735
742
  return !isNaN(Number(typography[typographyVariant].lineHeight))
736
- ? typography[typographyVariant].lineHeight + "rem"
737
- : typography[typographyVariant].lineHeight;
743
+ ? // @ts-expect-error - todo.
744
+ typography[typographyVariant].lineHeight + "rem"
745
+ : // @ts-expect-error - todo.
746
+ typography[typographyVariant].lineHeight;
738
747
  };
739
748
  core.makeStyles(function (theme) { return ({
740
749
  overlay: {
@@ -765,6 +774,7 @@ core.makeStyles(function (theme) { return ({
765
774
  var textColor = props.textColor;
766
775
  if (Object.values(SemanticColors$1).includes(textColor)) {
767
776
  var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
777
+ // @ts-expect-error - todo.
768
778
  return theme.palette[semanticColor][shade];
769
779
  }
770
780
  else if (textColor) {
@@ -781,6 +791,7 @@ core.makeStyles(function (theme) { return ({
781
791
  var dividerColor = props.dividerColor;
782
792
  if (Object.values(SemanticColors$1).includes(dividerColor)) {
783
793
  var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
794
+ // @ts-expect-error - todo.
784
795
  return theme.palette[semanticColor][shade];
785
796
  }
786
797
  else if (dividerColor) {
@@ -1423,6 +1434,7 @@ var FilterControl = function (props) {
1423
1434
  select: { multiple: false },
1424
1435
  'multi-select': { multiple: true },
1425
1436
  };
1437
+ // @ts-expect-error - todo.
1426
1438
  return React__default['default'].createElement("div", null, React.createElement(inputDictionary[input], __assign$3(__assign$3({}, columnFilter), propsDictionary[input])));
1427
1439
  };
1428
1440
 
@@ -1660,6 +1672,7 @@ var useIconStyles = core.makeStyles(function (_a) {
1660
1672
  if (props.color) {
1661
1673
  if (semanticColors.includes(props.color.split('.')[0])) {
1662
1674
  var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
1675
+ // @ts-expect-error - todo.
1663
1676
  value = palette[color][variant];
1664
1677
  }
1665
1678
  else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
@@ -1908,6 +1921,7 @@ var getBackground$1 = function (theme) { return function (props) {
1908
1921
  }
1909
1922
  else if (severity) {
1910
1923
  var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
1924
+ // @ts-expect-error - todo.
1911
1925
  background = theme.palette[color][colorVariant];
1912
1926
  }
1913
1927
  return background;
@@ -1986,14 +2000,18 @@ var getCustomColor = function (theme, color) {
1986
2000
  var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
1987
2001
  switch (true) {
1988
2002
  case isCommonColor:
2003
+ // @ts-expect-error - todo.
1989
2004
  return theme.palette.common[color];
1990
2005
  case Boolean(isGreyColor):
1991
2006
  var scale = color.split('.')[1];
2007
+ // @ts-expect-error - todo.
1992
2008
  return theme.palette.grey[scale] || theme.palette.grey[900];
1993
2009
  case Boolean(isSemanticColor):
1994
2010
  var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
2011
+ // @ts-expect-error - todo.
1995
2012
  return theme.palette[paletteKey][variant];
1996
2013
  case isTextColor:
2014
+ // @ts-expect-error - todo.
1997
2015
  return theme.palette.text[color.slice(4).toLowerCase()];
1998
2016
  default:
1999
2017
  return undefined;
@@ -2051,9 +2069,12 @@ Typography.defaultProps = defaultTypographyProps;
2051
2069
 
2052
2070
  var getFadeStop = function (_a, typographyVariant) {
2053
2071
  var typography = _a.typography;
2072
+ // @ts-expect-error - todo.
2054
2073
  return !isNaN(Number(typography[typographyVariant].lineHeight))
2055
- ? typography[typographyVariant].lineHeight + "rem"
2056
- : typography[typographyVariant].lineHeight;
2074
+ ? // @ts-expect-error - todo.
2075
+ typography[typographyVariant].lineHeight + "rem"
2076
+ : // @ts-expect-error - todo.
2077
+ typography[typographyVariant].lineHeight;
2057
2078
  };
2058
2079
  core.makeStyles(function (theme) { return ({
2059
2080
  overlay: {
@@ -2084,6 +2105,7 @@ core.makeStyles(function (theme) { return ({
2084
2105
  var textColor = props.textColor;
2085
2106
  if (Object.values(SemanticColors).includes(textColor)) {
2086
2107
  var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
2108
+ // @ts-expect-error - todo.
2087
2109
  return theme.palette[semanticColor][shade];
2088
2110
  }
2089
2111
  else if (textColor) {
@@ -2100,6 +2122,7 @@ core.makeStyles(function (theme) { return ({
2100
2122
  var dividerColor = props.dividerColor;
2101
2123
  if (Object.values(SemanticColors).includes(dividerColor)) {
2102
2124
  var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
2125
+ // @ts-expect-error - todo.
2103
2126
  return theme.palette[semanticColor][shade];
2104
2127
  }
2105
2128
  else if (dividerColor) {
@@ -2523,7 +2546,9 @@ var Alert = React.forwardRef(function (props, ref) {
2523
2546
  validLink && React__default['default'].createElement(Link, __assign$1({}, validLink)),
2524
2547
  onClose && (React__default['default'].createElement(IconButton, { onClick: onClose },
2525
2548
  React__default['default'].createElement(Icon, { icon: SvgX })))));
2526
- return (React__default['default'].createElement(CommonAlert__default['default'], __assign$1({ ref: ref, classes: classes, icon: React__default['default'].createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
2549
+ return (React__default['default'].createElement(CommonAlert__default['default'], __assign$1({ ref: ref, classes: classes,
2550
+ // @ts-expect-error - todo.
2551
+ icon: React__default['default'].createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
2527
2552
  });
2528
2553
  Alert.displayName = 'Alert';
2529
2554
 
@@ -2532,6 +2557,7 @@ var getColor = function (palette, props) {
2532
2557
  var variant = props.variant;
2533
2558
  var color = 'inherit';
2534
2559
  if (['primary', 'info', 'success', 'warning', 'error'].includes(variant)) {
2560
+ // @ts-expect-error - todo.
2535
2561
  color = palette[variant].contrastText;
2536
2562
  }
2537
2563
  if (variant === 'secondary') {
@@ -2562,6 +2588,7 @@ var getColorHover = function (palette, props) {
2562
2588
  var getBackground = function (palette, props) {
2563
2589
  var backgroundColor = 'inherit';
2564
2590
  if (['info', 'success', 'warning', 'error'].includes(props.variant)) {
2591
+ // @ts-expect-error - todo.
2565
2592
  backgroundColor = palette[props.variant].main;
2566
2593
  }
2567
2594
  if (props.variant === 'primary') {
@@ -2579,6 +2606,7 @@ var getBackground = function (palette, props) {
2579
2606
  var getBackgroundHover = function (palette, props) {
2580
2607
  var backgroundHoverColor = 'inherit';
2581
2608
  if (['primary', 'info', 'success', 'warning', 'error'].includes(props.variant)) {
2609
+ // @ts-expect-error - todo.
2582
2610
  backgroundHoverColor = palette[props.variant].dark;
2583
2611
  }
2584
2612
  if (props.variant === 'secondary') {
@@ -2746,6 +2774,7 @@ AlertDialog.displayName = 'AlertDialog';
2746
2774
  var getBorderColor = function (palette, variant) {
2747
2775
  var borderColor = 'inherit';
2748
2776
  if (['primary', 'secondary', 'info', 'success', 'warning', 'error'].includes(variant)) {
2777
+ // @ts-expect-error - todo.
2749
2778
  borderColor = palette[variant].light;
2750
2779
  }
2751
2780
  return borderColor;