@popmenu/common-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
|
@@ -376,6 +376,7 @@ var useIconStyles = core.makeStyles(function (_a) {
|
|
|
376
376
|
if (props.color) {
|
|
377
377
|
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
378
378
|
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
379
|
+
// @ts-expect-error - todo.
|
|
379
380
|
value = palette[color][variant];
|
|
380
381
|
}
|
|
381
382
|
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
@@ -636,6 +637,7 @@ var getBackground = function (theme) { return function (props) {
|
|
|
636
637
|
}
|
|
637
638
|
else if (severity) {
|
|
638
639
|
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
640
|
+
// @ts-expect-error - todo.
|
|
639
641
|
background = theme.palette[color][colorVariant];
|
|
640
642
|
}
|
|
641
643
|
return background;
|
|
@@ -729,14 +731,18 @@ var getCustomColor = function (theme, color) {
|
|
|
729
731
|
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
730
732
|
switch (true) {
|
|
731
733
|
case isCommonColor:
|
|
734
|
+
// @ts-expect-error - todo.
|
|
732
735
|
return theme.palette.common[color];
|
|
733
736
|
case Boolean(isGreyColor):
|
|
734
737
|
var scale = color.split('.')[1];
|
|
738
|
+
// @ts-expect-error - todo.
|
|
735
739
|
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
736
740
|
case Boolean(isSemanticColor):
|
|
737
741
|
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
742
|
+
// @ts-expect-error - todo.
|
|
738
743
|
return theme.palette[paletteKey][variant];
|
|
739
744
|
case isTextColor:
|
|
745
|
+
// @ts-expect-error - todo.
|
|
740
746
|
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
741
747
|
default:
|
|
742
748
|
return undefined;
|
|
@@ -794,9 +800,12 @@ Typography.defaultProps = defaultTypographyProps;
|
|
|
794
800
|
|
|
795
801
|
var getFadeStop = function (_a, typographyVariant) {
|
|
796
802
|
var typography = _a.typography;
|
|
803
|
+
// @ts-expect-error - todo.
|
|
797
804
|
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
798
|
-
?
|
|
799
|
-
|
|
805
|
+
? // @ts-expect-error - todo.
|
|
806
|
+
typography[typographyVariant].lineHeight + "rem"
|
|
807
|
+
: // @ts-expect-error - todo.
|
|
808
|
+
typography[typographyVariant].lineHeight;
|
|
800
809
|
};
|
|
801
810
|
var useCollapsibleTextStyles = core.makeStyles(function (theme) { return ({
|
|
802
811
|
overlay: {
|
|
@@ -859,6 +868,7 @@ var useStyles$5 = core.makeStyles(function (theme) { return ({
|
|
|
859
868
|
var textColor = props.textColor;
|
|
860
869
|
if (Object.values(SemanticColors).includes(textColor)) {
|
|
861
870
|
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
871
|
+
// @ts-expect-error - todo.
|
|
862
872
|
return theme.palette[semanticColor][shade];
|
|
863
873
|
}
|
|
864
874
|
else if (textColor) {
|
|
@@ -875,6 +885,7 @@ var useStyles$5 = core.makeStyles(function (theme) { return ({
|
|
|
875
885
|
var dividerColor = props.dividerColor;
|
|
876
886
|
if (Object.values(SemanticColors).includes(dividerColor)) {
|
|
877
887
|
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
888
|
+
// @ts-expect-error - todo.
|
|
878
889
|
return theme.palette[semanticColor][shade];
|
|
879
890
|
}
|
|
880
891
|
else if (dividerColor) {
|