@hitachivantara/uikit-react-lab 6.0.3 → 6.1.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.
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { HvButtonBase, HvAvatar } from "@hitachivantara/uikit-react-core";
|
|
3
3
|
import { Level0Good, Level3Bad, HourGlass } from "@hitachivantara/uikit-react-icons";
|
|
4
|
-
import {
|
|
4
|
+
import { getSemantic } from "../utils.js";
|
|
5
5
|
import { useClasses } from "./Step.styles.js";
|
|
6
6
|
const iconSizeObject = {
|
|
7
|
-
xs:
|
|
8
|
-
sm:
|
|
9
|
-
md:
|
|
10
|
-
lg:
|
|
11
|
-
xl:
|
|
12
|
-
};
|
|
13
|
-
const stateObject = {
|
|
14
|
-
Pending: 16,
|
|
15
|
-
Failed: 24,
|
|
16
|
-
Completed: 24
|
|
7
|
+
xs: 8,
|
|
8
|
+
sm: 16,
|
|
9
|
+
md: 24,
|
|
10
|
+
lg: 32,
|
|
11
|
+
xl: 40
|
|
17
12
|
};
|
|
18
13
|
const iconStateObject = {
|
|
19
14
|
Pending: HourGlass,
|
|
@@ -31,16 +26,6 @@ const HvStep = ({
|
|
|
31
26
|
number = 1
|
|
32
27
|
}) => {
|
|
33
28
|
const { classes, cx } = useClasses(classesProp);
|
|
34
|
-
const iconSize = iconSizeObject[size];
|
|
35
|
-
const squareL = stateObject[state];
|
|
36
|
-
const svgSize = {
|
|
37
|
-
xs: squareL - 8,
|
|
38
|
-
sm: squareL,
|
|
39
|
-
md: squareL + 8,
|
|
40
|
-
lg: squareL + 16,
|
|
41
|
-
xl: squareL + 24
|
|
42
|
-
}[size];
|
|
43
|
-
const backgroundColor = getColor(state);
|
|
44
29
|
const color = state === "Pending" ? "bgPage" : getSemantic(state);
|
|
45
30
|
const status = state === "Current" ? "textDisabled" : void 0;
|
|
46
31
|
const IconComponent = iconStateObject[state];
|
|
@@ -57,17 +42,10 @@ const HvStep = ({
|
|
|
57
42
|
HvAvatar,
|
|
58
43
|
{
|
|
59
44
|
className: cx(classes.avatar, classes[size]),
|
|
60
|
-
backgroundColor,
|
|
45
|
+
backgroundColor: getSemantic(state),
|
|
61
46
|
status,
|
|
62
47
|
size,
|
|
63
|
-
children: IconComponent ? /* @__PURE__ */ jsx(
|
|
64
|
-
IconComponent,
|
|
65
|
-
{
|
|
66
|
-
color,
|
|
67
|
-
style: { fontSize: svgSize },
|
|
68
|
-
size: iconSize
|
|
69
|
-
}
|
|
70
|
-
) : number
|
|
48
|
+
children: IconComponent ? /* @__PURE__ */ jsx(IconComponent, { color, size: iconSizeObject[size] }) : number
|
|
71
49
|
}
|
|
72
50
|
)
|
|
73
51
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-lab",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Hitachi Vantara UI Kit Team",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"@dnd-kit/core": "^6.1.0",
|
|
35
35
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
36
36
|
"@emotion/css": "^11.11.0",
|
|
37
|
-
"@hitachivantara/uikit-react-core": "^6.
|
|
37
|
+
"@hitachivantara/uikit-react-core": "^6.4.0",
|
|
38
38
|
"@hitachivantara/uikit-react-icons": "^6.0.2",
|
|
39
|
-
"@hitachivantara/uikit-react-utils": "^6.
|
|
39
|
+
"@hitachivantara/uikit-react-utils": "^6.2.0",
|
|
40
40
|
"@hitachivantara/uikit-styles": "^6.0.2",
|
|
41
41
|
"@mui/base": "5.0.0-beta.68",
|
|
42
42
|
"@types/react-grid-layout": "^1.3.5",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"access": "public",
|
|
54
54
|
"directory": "package"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "bbf0a2a94a557f91676bfef658162b41019b924b",
|
|
57
57
|
"exports": {
|
|
58
58
|
".": {
|
|
59
59
|
"types": "./dist/index.d.ts",
|