@popmenu/dashboard 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 +13 -2
- package/build/index.es.js.map +1 -1
- package/build/index.js +13 -2
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -204,6 +204,7 @@ var useIconStyles = core.makeStyles(function (_a) {
|
|
|
204
204
|
if (props.color) {
|
|
205
205
|
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
206
206
|
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
207
|
+
// @ts-expect-error - todo.
|
|
207
208
|
value = palette[color][variant];
|
|
208
209
|
}
|
|
209
210
|
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
@@ -439,6 +440,7 @@ var getBackground = function (theme) { return function (props) {
|
|
|
439
440
|
}
|
|
440
441
|
else if (severity) {
|
|
441
442
|
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
443
|
+
// @ts-expect-error - todo.
|
|
442
444
|
background = theme.palette[color][colorVariant];
|
|
443
445
|
}
|
|
444
446
|
return background;
|
|
@@ -517,14 +519,18 @@ var getCustomColor = function (theme, color) {
|
|
|
517
519
|
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
518
520
|
switch (true) {
|
|
519
521
|
case isCommonColor:
|
|
522
|
+
// @ts-expect-error - todo.
|
|
520
523
|
return theme.palette.common[color];
|
|
521
524
|
case Boolean(isGreyColor):
|
|
522
525
|
var scale = color.split('.')[1];
|
|
526
|
+
// @ts-expect-error - todo.
|
|
523
527
|
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
524
528
|
case Boolean(isSemanticColor):
|
|
525
529
|
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
530
|
+
// @ts-expect-error - todo.
|
|
526
531
|
return theme.palette[paletteKey][variant];
|
|
527
532
|
case isTextColor:
|
|
533
|
+
// @ts-expect-error - todo.
|
|
528
534
|
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
529
535
|
default:
|
|
530
536
|
return undefined;
|
|
@@ -582,9 +588,12 @@ Typography.defaultProps = defaultTypographyProps;
|
|
|
582
588
|
|
|
583
589
|
var getFadeStop = function (_a, typographyVariant) {
|
|
584
590
|
var typography = _a.typography;
|
|
591
|
+
// @ts-expect-error - todo.
|
|
585
592
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
586
|
-
?
|
|
587
|
-
|
|
593
|
+
? // @ts-expect-error - todo.
|
|
594
|
+
typography[typographyVariant].lineHeight + "rem"
|
|
595
|
+
: // @ts-expect-error - todo.
|
|
596
|
+
typography[typographyVariant].lineHeight;
|
|
588
597
|
};
|
|
589
598
|
core.makeStyles(function (theme) { return ({
|
|
590
599
|
overlay: {
|
|
@@ -615,6 +624,7 @@ core.makeStyles(function (theme) { return ({
|
|
|
615
624
|
var textColor = props.textColor;
|
|
616
625
|
if (Object.values(SemanticColors).includes(textColor)) {
|
|
617
626
|
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
627
|
+
// @ts-expect-error - todo.
|
|
618
628
|
return theme.palette[semanticColor][shade];
|
|
619
629
|
}
|
|
620
630
|
else if (textColor) {
|
|
@@ -631,6 +641,7 @@ core.makeStyles(function (theme) { return ({
|
|
|
631
641
|
var dividerColor = props.dividerColor;
|
|
632
642
|
if (Object.values(SemanticColors).includes(dividerColor)) {
|
|
633
643
|
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
644
|
+
// @ts-expect-error - todo.
|
|
634
645
|
return theme.palette[semanticColor][shade];
|
|
635
646
|
}
|
|
636
647
|
else if (dividerColor) {
|