@popmenu/admin-ui 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.es.js CHANGED
@@ -214,6 +214,7 @@ var useIconStyles = makeStyles(function (_a) {
214
214
  if (props.color) {
215
215
  if (semanticColors.includes(props.color.split('.')[0])) {
216
216
  var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
217
+ // @ts-expect-error - todo.
217
218
  value = palette[color][variant];
218
219
  }
219
220
  else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
@@ -462,6 +463,7 @@ var getBackground$1 = function (theme) { return function (props) {
462
463
  }
463
464
  else if (severity) {
464
465
  var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
466
+ // @ts-expect-error - todo.
465
467
  background = theme.palette[color][colorVariant];
466
468
  }
467
469
  return background;
@@ -540,14 +542,18 @@ var getCustomColor = function (theme, color) {
540
542
  var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
541
543
  switch (true) {
542
544
  case isCommonColor:
545
+ // @ts-expect-error - todo.
543
546
  return theme.palette.common[color];
544
547
  case Boolean(isGreyColor):
545
548
  var scale = color.split('.')[1];
549
+ // @ts-expect-error - todo.
546
550
  return theme.palette.grey[scale] || theme.palette.grey[900];
547
551
  case Boolean(isSemanticColor):
548
552
  var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
553
+ // @ts-expect-error - todo.
549
554
  return theme.palette[paletteKey][variant];
550
555
  case isTextColor:
556
+ // @ts-expect-error - todo.
551
557
  return theme.palette.text[color.slice(4).toLowerCase()];
552
558
  default:
553
559
  return undefined;
@@ -605,9 +611,12 @@ Typography.defaultProps = defaultTypographyProps;
605
611
 
606
612
  var getFadeStop = function (_a, typographyVariant) {
607
613
  var typography = _a.typography;
614
+ // @ts-expect-error - todo.
608
615
  return !isNaN(Number(typography[typographyVariant].lineHeight))
609
- ? typography[typographyVariant].lineHeight + "rem"
610
- : typography[typographyVariant].lineHeight;
616
+ ? // @ts-expect-error - todo.
617
+ typography[typographyVariant].lineHeight + "rem"
618
+ : // @ts-expect-error - todo.
619
+ typography[typographyVariant].lineHeight;
611
620
  };
612
621
  makeStyles(function (theme) { return ({
613
622
  overlay: {
@@ -638,6 +647,7 @@ makeStyles(function (theme) { return ({
638
647
  var textColor = props.textColor;
639
648
  if (Object.values(SemanticColors).includes(textColor)) {
640
649
  var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
650
+ // @ts-expect-error - todo.
641
651
  return theme.palette[semanticColor][shade];
642
652
  }
643
653
  else if (textColor) {
@@ -654,6 +664,7 @@ makeStyles(function (theme) { return ({
654
664
  var dividerColor = props.dividerColor;
655
665
  if (Object.values(SemanticColors).includes(dividerColor)) {
656
666
  var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
667
+ // @ts-expect-error - todo.
657
668
  return theme.palette[semanticColor][shade];
658
669
  }
659
670
  else if (dividerColor) {
@@ -1102,7 +1113,9 @@ var Alert = forwardRef(function (props, ref) {
1102
1113
  validLink && React__default.createElement(Link, __assign$1({}, validLink)),
1103
1114
  onClose && (React__default.createElement(IconButton, { onClick: onClose },
1104
1115
  React__default.createElement(Icon, { icon: SvgX })))));
1105
- return (React__default.createElement(CommonAlert, __assign$1({ ref: ref, classes: classes, icon: React__default.createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
1116
+ return (React__default.createElement(CommonAlert, __assign$1({ ref: ref, classes: classes,
1117
+ // @ts-expect-error - todo.
1118
+ icon: React__default.createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
1106
1119
  });
1107
1120
  Alert.displayName = 'Alert';
1108
1121
 
@@ -1111,6 +1124,7 @@ var getColor = function (palette, props) {
1111
1124
  var variant = props.variant;
1112
1125
  var color = 'inherit';
1113
1126
  if (['primary', 'info', 'success', 'warning', 'error'].includes(variant)) {
1127
+ // @ts-expect-error - todo.
1114
1128
  color = palette[variant].contrastText;
1115
1129
  }
1116
1130
  if (variant === 'secondary') {
@@ -1141,6 +1155,7 @@ var getColorHover = function (palette, props) {
1141
1155
  var getBackground = function (palette, props) {
1142
1156
  var backgroundColor = 'inherit';
1143
1157
  if (['info', 'success', 'warning', 'error'].includes(props.variant)) {
1158
+ // @ts-expect-error - todo.
1144
1159
  backgroundColor = palette[props.variant].main;
1145
1160
  }
1146
1161
  if (props.variant === 'primary') {
@@ -1158,6 +1173,7 @@ var getBackground = function (palette, props) {
1158
1173
  var getBackgroundHover = function (palette, props) {
1159
1174
  var backgroundHoverColor = 'inherit';
1160
1175
  if (['primary', 'info', 'success', 'warning', 'error'].includes(props.variant)) {
1176
+ // @ts-expect-error - todo.
1161
1177
  backgroundHoverColor = palette[props.variant].dark;
1162
1178
  }
1163
1179
  if (props.variant === 'secondary') {
@@ -1342,6 +1358,7 @@ AlertTitle.displayName = 'AlertTitle';
1342
1358
  var getBorderColor = function (palette, variant) {
1343
1359
  var borderColor = 'inherit';
1344
1360
  if (['primary', 'secondary', 'info', 'success', 'warning', 'error'].includes(variant)) {
1361
+ // @ts-expect-error - todo.
1345
1362
  borderColor = palette[variant].light;
1346
1363
  }
1347
1364
  return borderColor;