@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.js CHANGED
@@ -265,6 +265,7 @@ var useIconStyles = core.makeStyles(function (_a) {
265
265
  if (props.color) {
266
266
  if (semanticColors.includes(props.color.split('.')[0])) {
267
267
  var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
268
+ // @ts-expect-error - todo.
268
269
  value = palette[color][variant];
269
270
  }
270
271
  else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
@@ -513,6 +514,7 @@ var getBackground$1 = function (theme) { return function (props) {
513
514
  }
514
515
  else if (severity) {
515
516
  var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
517
+ // @ts-expect-error - todo.
516
518
  background = theme.palette[color][colorVariant];
517
519
  }
518
520
  return background;
@@ -591,14 +593,18 @@ var getCustomColor = function (theme, color) {
591
593
  var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
592
594
  switch (true) {
593
595
  case isCommonColor:
596
+ // @ts-expect-error - todo.
594
597
  return theme.palette.common[color];
595
598
  case Boolean(isGreyColor):
596
599
  var scale = color.split('.')[1];
600
+ // @ts-expect-error - todo.
597
601
  return theme.palette.grey[scale] || theme.palette.grey[900];
598
602
  case Boolean(isSemanticColor):
599
603
  var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
604
+ // @ts-expect-error - todo.
600
605
  return theme.palette[paletteKey][variant];
601
606
  case isTextColor:
607
+ // @ts-expect-error - todo.
602
608
  return theme.palette.text[color.slice(4).toLowerCase()];
603
609
  default:
604
610
  return undefined;
@@ -656,9 +662,12 @@ Typography.defaultProps = defaultTypographyProps;
656
662
 
657
663
  var getFadeStop = function (_a, typographyVariant) {
658
664
  var typography = _a.typography;
665
+ // @ts-expect-error - todo.
659
666
  return !isNaN(Number(typography[typographyVariant].lineHeight))
660
- ? typography[typographyVariant].lineHeight + "rem"
661
- : typography[typographyVariant].lineHeight;
667
+ ? // @ts-expect-error - todo.
668
+ typography[typographyVariant].lineHeight + "rem"
669
+ : // @ts-expect-error - todo.
670
+ typography[typographyVariant].lineHeight;
662
671
  };
663
672
  core.makeStyles(function (theme) { return ({
664
673
  overlay: {
@@ -689,6 +698,7 @@ core.makeStyles(function (theme) { return ({
689
698
  var textColor = props.textColor;
690
699
  if (Object.values(SemanticColors).includes(textColor)) {
691
700
  var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
701
+ // @ts-expect-error - todo.
692
702
  return theme.palette[semanticColor][shade];
693
703
  }
694
704
  else if (textColor) {
@@ -705,6 +715,7 @@ core.makeStyles(function (theme) { return ({
705
715
  var dividerColor = props.dividerColor;
706
716
  if (Object.values(SemanticColors).includes(dividerColor)) {
707
717
  var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
718
+ // @ts-expect-error - todo.
708
719
  return theme.palette[semanticColor][shade];
709
720
  }
710
721
  else if (dividerColor) {
@@ -1153,7 +1164,9 @@ var Alert = React.forwardRef(function (props, ref) {
1153
1164
  validLink && React__default['default'].createElement(Link, __assign$1({}, validLink)),
1154
1165
  onClose && (React__default['default'].createElement(IconButton, { onClick: onClose },
1155
1166
  React__default['default'].createElement(Icon, { icon: SvgX })))));
1156
- 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));
1167
+ return (React__default['default'].createElement(CommonAlert__default['default'], __assign$1({ ref: ref, classes: classes,
1168
+ // @ts-expect-error - todo.
1169
+ icon: React__default['default'].createElement(Icon, { icon: severityIcons$1[severity], size: "extra-large" }), action: Action, variant: variant, severity: severity }, muiProps), children));
1157
1170
  });
1158
1171
  Alert.displayName = 'Alert';
1159
1172
 
@@ -1162,6 +1175,7 @@ var getColor = function (palette, props) {
1162
1175
  var variant = props.variant;
1163
1176
  var color = 'inherit';
1164
1177
  if (['primary', 'info', 'success', 'warning', 'error'].includes(variant)) {
1178
+ // @ts-expect-error - todo.
1165
1179
  color = palette[variant].contrastText;
1166
1180
  }
1167
1181
  if (variant === 'secondary') {
@@ -1192,6 +1206,7 @@ var getColorHover = function (palette, props) {
1192
1206
  var getBackground = function (palette, props) {
1193
1207
  var backgroundColor = 'inherit';
1194
1208
  if (['info', 'success', 'warning', 'error'].includes(props.variant)) {
1209
+ // @ts-expect-error - todo.
1195
1210
  backgroundColor = palette[props.variant].main;
1196
1211
  }
1197
1212
  if (props.variant === 'primary') {
@@ -1209,6 +1224,7 @@ var getBackground = function (palette, props) {
1209
1224
  var getBackgroundHover = function (palette, props) {
1210
1225
  var backgroundHoverColor = 'inherit';
1211
1226
  if (['primary', 'info', 'success', 'warning', 'error'].includes(props.variant)) {
1227
+ // @ts-expect-error - todo.
1212
1228
  backgroundHoverColor = palette[props.variant].dark;
1213
1229
  }
1214
1230
  if (props.variant === 'secondary') {
@@ -1393,6 +1409,7 @@ AlertTitle.displayName = 'AlertTitle';
1393
1409
  var getBorderColor = function (palette, variant) {
1394
1410
  var borderColor = 'inherit';
1395
1411
  if (['primary', 'secondary', 'info', 'success', 'warning', 'error'].includes(variant)) {
1412
+ // @ts-expect-error - todo.
1396
1413
  borderColor = palette[variant].light;
1397
1414
  }
1398
1415
  return borderColor;