@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.
- package/esm/_internal/Icon2.js +21 -29
- package/esm/_internal/Icon2.js.map +1 -1
- package/esm/_internal/Slides.js +42 -68
- package/esm/_internal/Slides.js.map +1 -1
- package/esm/_internal/getRootClassName.js +1 -2
- package/esm/_internal/getRootClassName.js.map +1 -1
- package/esm/_internal/slideshow.js +0 -1
- package/esm/_internal/slideshow.js.map +1 -1
- package/package.json +4 -4
- package/src/components/icon/Icon.stories.tsx +55 -36
- package/src/components/icon/Icon.tsx +19 -28
- package/src/components/slideshow/Slides.tsx +5 -22
- package/src/components/slideshow/Slideshow.tsx +4 -9
- package/src/components/slideshow/SlideshowControls.stories.tsx +4 -10
- package/src/components/slideshow/SlideshowItem.tsx +2 -13
- package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +1 -3
- package/src/hooks/useSlideshowControls.ts +31 -18
- package/types.d.ts +6 -10
package/esm/_internal/Icon2.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (
|
|
83
|
-
|
|
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", {
|