@lumx/react 2.2.10 → 2.2.12-alpha.2

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.
@@ -56,39 +56,30 @@ var Icon = forwardRef(function (props, ref) {
56
56
  size = props.size,
57
57
  theme = props.theme,
58
58
  alt = props.alt,
59
- forwardedProps = _objectWithoutProperties(props, ["className", "color", "colorVariant", "hasShape", "icon", "size", "theme", "alt"]);
59
+ forwardedProps = _objectWithoutProperties(props, ["className", "color", "colorVariant", "hasShape", "icon", "size", "theme", "alt"]); // Color
60
60
 
61
- var iconColor;
62
- var iconColorVariant;
63
61
 
64
- if (color) {
65
- iconColor = color;
66
- iconColorVariant = colorVariant;
67
- } else if (theme) {
68
- iconColor = theme === Theme.light ? ColorPalette.dark : ColorPalette.light;
62
+ var iconColor = color;
69
63
 
70
- if (colorVariant) {
71
- iconColorVariant = colorVariant;
72
- } else {
73
- iconColorVariant = Theme.light ? 'L1' : 'N';
74
- }
75
- } else if (hasShape) {
76
- iconColor = ColorPalette.dark;
77
- }
64
+ if (!iconColor && (hasShape || theme)) {
65
+ iconColor = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;
66
+ } // Color variant
67
+
68
+
69
+ var iconColorVariant = colorVariant;
70
+
71
+ if (!iconColorVariant && hasShape && iconColor === ColorPalette.dark) {
72
+ iconColorVariant = 'L2';
73
+ } // Size
74
+
75
+
76
+ var iconSize = size;
78
77
 
79
- var iconSize;
80
-
81
- if (size) {
82
- if (hasShape) {
83
- if (size === Size.xxs || size === Size.xs) {
84
- iconSize = Size.s;
85
- } else if (size === Size.xxl) {
86
- iconSize = Size.xl;
87
- } else {
88
- iconSize = size;
89
- }
90
- } else {
91
- iconSize = size;
78
+ if (size && hasShape) {
79
+ if (size === Size.xxs || size === Size.xs) {
80
+ iconSize = Size.s;
81
+ } else if (size === Size.xxl) {
82
+ iconSize = Size.xl;
92
83
  }
93
84
  } else if (hasShape) {
94
85
  iconSize = Size.m;
@@ -102,6 +93,7 @@ var Icon = forwardRef(function (props, ref) {
102
93
  colorVariant: iconColorVariant,
103
94
  hasShape: hasShape,
104
95
  prefix: CLASSNAME,
96
+ theme: theme,
105
97
  size: iconSize
106
98
  }), !hasShape && "".concat(CLASSNAME, "--no-shape"), !hasShape && iconColor === ColorPalette.yellow && icon === mdiAlertCircle && "".concat(CLASSNAME, "--has-dark-layer"), "".concat(CLASSNAME, "--path"))
107
99
  }), React.createElement("svg", {