shared-design-system 1.77.0 → 1.79.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/dist/src/components/Breadcrumbs.d.ts +2 -2
- package/dist/src/components/Breadcrumbs.js +34 -29
- package/dist/src/components/Breadcrumbs.js.map +1 -1
- package/dist/src/components/LoadingSpinner.d.ts +3 -3
- package/dist/src/components/LoadingSpinner.js +26 -24
- package/dist/src/components/LoadingSpinner.js.map +1 -1
- package/dist/src/components/Progress.d.ts +3 -3
- package/dist/src/components/Progress.js +36 -28
- package/dist/src/components/Progress.js.map +1 -1
- package/dist/src/components/Radio.d.ts +5 -5
- package/dist/src/components/Radio.js +41 -34
- package/dist/src/components/Radio.js.map +1 -1
- package/dist/src/components/ReadOnlyField.d.ts +2 -2
- package/dist/src/components/ReadOnlyField.js +52 -37
- package/dist/src/components/ReadOnlyField.js.map +1 -1
- package/dist/src/components/Statistic.d.ts +1 -1
- package/dist/src/components/Statistic.js +30 -11
- package/dist/src/components/Statistic.js.map +1 -1
- package/dist/src/components/Steps.d.ts +4 -4
- package/dist/src/components/Steps.js +81 -50
- package/dist/src/components/Steps.js.map +1 -1
- package/dist/src/components/Typography.d.ts +5 -5
- package/dist/src/components/Typography.js +45 -44
- package/dist/src/components/Typography.js.map +1 -1
- package/dist/src/tokens.d.ts +2 -2
- package/dist/src/tokens.js +68 -68
- package/dist/src/tokens.js.map +1 -1
- package/dist/tailwind.preset.d.ts +1 -1
- package/dist/tailwind.preset.js +82 -77
- package/dist/tailwind.preset.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,80 +1,95 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from
|
|
3
|
-
import { tokens } from
|
|
4
|
-
export const ReadOnlyField = ({ label, value, icon, copyable = false, placeholder =
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { tokens } from "../tokens";
|
|
4
|
+
export const ReadOnlyField = ({ label, value, icon, copyable = false, placeholder = "—", hint, layout = "floating", className = "", style = {}, }) => {
|
|
5
5
|
const [copied, setCopied] = useState(false);
|
|
6
6
|
const handleCopy = () => {
|
|
7
|
-
if (value && typeof value ===
|
|
7
|
+
if (value && typeof value === "string") {
|
|
8
8
|
navigator.clipboard.writeText(value).then(() => {
|
|
9
9
|
setCopied(true);
|
|
10
10
|
setTimeout(() => setCopied(false), 1500);
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
-
if (layout ===
|
|
15
|
-
return (_jsxs("div", { style: { width:
|
|
16
|
-
fontSize: tokens.font.
|
|
14
|
+
if (layout === "stacked") {
|
|
15
|
+
return (_jsxs("div", { style: { width: "100%", ...style }, className: `ds-read-only-field ${className}`, children: [_jsx("div", { style: {
|
|
16
|
+
fontSize: tokens.font.base,
|
|
17
17
|
fontWeight: tokens.font.weightSemibold,
|
|
18
18
|
color: tokens.color.slate500,
|
|
19
|
-
textTransform:
|
|
20
|
-
letterSpacing:
|
|
21
|
-
marginBottom:
|
|
19
|
+
textTransform: "uppercase",
|
|
20
|
+
letterSpacing: "0.07em",
|
|
21
|
+
marginBottom: "6px",
|
|
22
22
|
}, children: label }), _jsx("div", { style: {
|
|
23
23
|
fontSize: tokens.font.sm,
|
|
24
24
|
fontWeight: tokens.font.weightSemibold,
|
|
25
25
|
color: tokens.color.slate800,
|
|
26
26
|
lineHeight: 1.5,
|
|
27
|
-
}, children: value || _jsx("span", { style: { color: tokens.color.textDisabled }, children: placeholder }) }), hint && (_jsx("div", { style: {
|
|
28
|
-
fontSize:
|
|
27
|
+
}, children: value || (_jsx("span", { style: { color: tokens.color.textDisabled }, children: placeholder })) }), hint && (_jsx("div", { style: {
|
|
28
|
+
fontSize: "11px",
|
|
29
29
|
color: tokens.color.textMuted,
|
|
30
|
-
marginTop:
|
|
30
|
+
marginTop: "4px",
|
|
31
31
|
fontWeight: tokens.font.weightMedium,
|
|
32
32
|
}, children: hint }))] }));
|
|
33
33
|
}
|
|
34
34
|
// Floating label layout
|
|
35
|
-
return (_jsxs("div", { style: { position:
|
|
36
|
-
position:
|
|
37
|
-
top:
|
|
38
|
-
left:
|
|
35
|
+
return (_jsxs("div", { style: { position: "relative", width: "100%", ...style }, className: `ds-read-only-field ${className}`, children: [_jsx("label", { style: {
|
|
36
|
+
position: "absolute",
|
|
37
|
+
top: "-9px",
|
|
38
|
+
left: "14px",
|
|
39
39
|
backgroundColor: tokens.color.surface,
|
|
40
|
-
padding:
|
|
41
|
-
fontSize:
|
|
40
|
+
padding: "0 5px",
|
|
41
|
+
fontSize: "10px",
|
|
42
42
|
fontWeight: tokens.font.weightBold,
|
|
43
43
|
color: tokens.color.slate400,
|
|
44
|
-
textTransform:
|
|
45
|
-
letterSpacing:
|
|
44
|
+
textTransform: "uppercase",
|
|
45
|
+
letterSpacing: "0.08em",
|
|
46
46
|
zIndex: 1,
|
|
47
47
|
lineHeight: 1,
|
|
48
|
-
whiteSpace:
|
|
48
|
+
whiteSpace: "nowrap",
|
|
49
49
|
}, children: label }), _jsxs("div", { style: {
|
|
50
50
|
fontSize: tokens.font.sm,
|
|
51
51
|
fontWeight: tokens.font.weightSemibold,
|
|
52
52
|
color: tokens.color.slate800,
|
|
53
53
|
backgroundColor: tokens.color.slate50,
|
|
54
|
-
padding:
|
|
54
|
+
padding: "12px 14px",
|
|
55
55
|
borderRadius: tokens.radius.lg,
|
|
56
56
|
border: `1.5px solid ${tokens.color.slate200}`,
|
|
57
|
-
minHeight:
|
|
58
|
-
display:
|
|
59
|
-
alignItems:
|
|
57
|
+
minHeight: "46px",
|
|
58
|
+
display: "flex",
|
|
59
|
+
alignItems: "center",
|
|
60
60
|
gap: tokens.spacing[3],
|
|
61
61
|
lineHeight: 1.5,
|
|
62
|
-
}, children: [icon && (_jsx("div", { style: {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
}, children: [icon && (_jsx("div", { style: {
|
|
63
|
+
color: tokens.color.slate400,
|
|
64
|
+
display: "flex",
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
flexShrink: 0,
|
|
67
|
+
}, children: icon })), _jsx("div", { style: {
|
|
68
|
+
flex: 1,
|
|
69
|
+
overflow: "hidden",
|
|
70
|
+
textOverflow: "ellipsis",
|
|
71
|
+
whiteSpace: "nowrap",
|
|
72
|
+
}, children: value || (_jsx("span", { style: {
|
|
73
|
+
color: tokens.color.textDisabled,
|
|
74
|
+
fontWeight: tokens.font.weightNormal,
|
|
75
|
+
}, children: placeholder })) }), copyable && value && typeof value === "string" && (_jsx("button", { type: "button", onClick: handleCopy, title: copied ? "Đã sao chép!" : "Sao chép", style: {
|
|
76
|
+
background: "none",
|
|
77
|
+
border: "none",
|
|
78
|
+
cursor: "pointer",
|
|
79
|
+
padding: "2px",
|
|
67
80
|
color: copied ? tokens.color.success : tokens.color.slate400,
|
|
68
|
-
display:
|
|
69
|
-
alignItems:
|
|
81
|
+
display: "flex",
|
|
82
|
+
alignItems: "center",
|
|
70
83
|
borderRadius: tokens.radius.sm,
|
|
71
84
|
transition: tokens.transition.fast,
|
|
72
85
|
flexShrink: 0,
|
|
73
|
-
}, onMouseEnter: (e) => (e.currentTarget.style.color = tokens.color.primary), onMouseLeave: (e) => (e.currentTarget.style.color = copied
|
|
74
|
-
|
|
86
|
+
}, onMouseEnter: (e) => (e.currentTarget.style.color = tokens.color.primary), onMouseLeave: (e) => (e.currentTarget.style.color = copied
|
|
87
|
+
? tokens.color.success
|
|
88
|
+
: tokens.color.slate400), children: copied ? (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: _jsx("polyline", { points: "20 6 9 17 4 12" }) })) : (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [_jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), _jsx("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })] })) }))] }), hint && (_jsx("div", { style: {
|
|
89
|
+
fontSize: "11px",
|
|
75
90
|
color: tokens.color.textMuted,
|
|
76
|
-
marginTop:
|
|
77
|
-
paddingLeft:
|
|
91
|
+
marginTop: "5px",
|
|
92
|
+
paddingLeft: "2px",
|
|
78
93
|
fontWeight: tokens.font.weightMedium,
|
|
79
94
|
}, children: hint }))] }));
|
|
80
95
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadOnlyField.js","sourceRoot":"","sources":["../../../src/components/ReadOnlyField.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAYnC,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,KAAK,EACL,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,GAAG,EACjB,IAAI,EACJ,MAAM,GAAG,UAAU,EACnB,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,GACX,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvC,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC7C,SAAS,CAAC,IAAI,CAAC,CAAC;gBAChB,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;IAEF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,CACL,
|
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AI,EAAC,MAAM,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,GAAG,EACzD,eAAM,CAAC,EAAC,oDAAoD,GAAG,IAC3D,CACP,GACM,CACV,IACG,EAEL,IAAI,IAAI,CACP,cACE,KAAK,EAAE;oBACL,QAAQ,EAAE,MAAM;oBAChB,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;oBAC7B,SAAS,EAAE,KAAK;oBAChB,WAAW,EAAE,KAAK;oBAClB,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY;iBACrC,YAEA,IAAI,GACD,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,25 +1,44 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { tokens } from
|
|
3
|
-
import { Text, Heading } from
|
|
4
|
-
export const Statistic = ({ title, value, prefix, suffix, trend, style = {}, className =
|
|
2
|
+
import { tokens } from "../tokens";
|
|
3
|
+
import { Text, Heading } from "./Typography";
|
|
4
|
+
export const Statistic = ({ title, value, prefix, suffix, trend, style = {}, className = "", }) => {
|
|
5
5
|
return (_jsxs("div", { style: {
|
|
6
6
|
padding: tokens.spacing[6],
|
|
7
7
|
backgroundColor: tokens.color.white,
|
|
8
8
|
borderRadius: tokens.radius.xl,
|
|
9
9
|
border: `1px solid ${tokens.color.slate100}`,
|
|
10
10
|
boxShadow: tokens.shadow.sm,
|
|
11
|
-
display:
|
|
12
|
-
flexDirection:
|
|
11
|
+
display: "flex",
|
|
12
|
+
flexDirection: "column",
|
|
13
13
|
gap: tokens.spacing[2],
|
|
14
|
-
minWidth:
|
|
14
|
+
minWidth: "200px",
|
|
15
15
|
...style,
|
|
16
|
-
}, className: `ds-statistic ${className}`, children: [_jsx(Text, { color: "muted", size: "xs", style: {
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
}, className: `ds-statistic ${className}`, children: [_jsx(Text, { color: "muted", size: "xs", style: {
|
|
17
|
+
fontWeight: tokens.font.weightBold,
|
|
18
|
+
textTransform: "uppercase",
|
|
19
|
+
letterSpacing: "0.05em",
|
|
20
|
+
}, children: title }), _jsxs("div", { style: {
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "baseline",
|
|
23
|
+
gap: tokens.spacing[1],
|
|
24
|
+
}, children: [prefix && (_jsx("span", { style: { color: tokens.color.slate400, fontSize: tokens.font.lg }, children: prefix })), _jsx(Heading, { level: 2, style: { margin: 0, fontWeight: tokens.font.weightBold }, children: value }), suffix && (_jsx("span", { style: {
|
|
25
|
+
color: tokens.color.slate400,
|
|
26
|
+
fontSize: tokens.font.sm,
|
|
27
|
+
fontWeight: tokens.font.weightMedium,
|
|
28
|
+
}, children: suffix }))] }), trend && (_jsxs("div", { style: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center",
|
|
19
31
|
gap: tokens.spacing[1],
|
|
20
32
|
color: trend.isUp ? tokens.color.success : tokens.color.danger,
|
|
21
|
-
fontSize: tokens.font.
|
|
33
|
+
fontSize: tokens.font.base,
|
|
22
34
|
fontWeight: tokens.font.weightBold,
|
|
23
|
-
}, children: [_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", style: {
|
|
35
|
+
}, children: [_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", style: {
|
|
36
|
+
transform: trend.isUp ? "rotate(0)" : "rotate(180deg)",
|
|
37
|
+
transition: tokens.transition.normal,
|
|
38
|
+
}, children: _jsx("polyline", { points: "18 15 12 9 6 15" }) }), _jsx("span", { children: trend.value }), _jsx("span", { style: {
|
|
39
|
+
color: tokens.color.slate400,
|
|
40
|
+
fontWeight: tokens.font.weightMedium,
|
|
41
|
+
marginLeft: "2px",
|
|
42
|
+
}, children: "v\u1EDBi th\u00E1ng tr\u01B0\u1EDBc" })] }))] }));
|
|
24
43
|
};
|
|
25
44
|
//# sourceMappingURL=Statistic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Statistic.js","sourceRoot":"","sources":["../../../src/components/Statistic.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAe7C,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAClD,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,KAAK,EACL,KAAK,GAAG,EAAE,EACV,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,OAAO,CACL,eACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YAC1B,eAAe,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK;YACnC,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE;YAC9B,MAAM,EAAE,aAAa,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE;YAC5C,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE;YAC3B,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,OAAO;YACjB,GAAG,KAAK;SACT,EACD,SAAS,EAAE,gBAAgB,SAAS,EAAE,aAEtC,KAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"Statistic.js","sourceRoot":"","sources":["../../../src/components/Statistic.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAe7C,MAAM,CAAC,MAAM,SAAS,GAA6B,CAAC,EAClD,KAAK,EACL,KAAK,EACL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AAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
export type StepStatus =
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type StepStatus = "finish" | "process" | "wait" | "error";
|
|
3
3
|
export interface StepItem {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
@@ -9,8 +9,8 @@ export interface StepItem {
|
|
|
9
9
|
export interface StepsProps {
|
|
10
10
|
currentStep?: number;
|
|
11
11
|
items?: StepItem[];
|
|
12
|
-
direction?:
|
|
13
|
-
size?:
|
|
12
|
+
direction?: "horizontal" | "vertical";
|
|
13
|
+
size?: "sm" | "md" | "lg";
|
|
14
14
|
className?: string;
|
|
15
15
|
style?: React.CSSProperties;
|
|
16
16
|
}
|
|
@@ -1,79 +1,108 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from
|
|
3
|
-
import { tokens } from
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { tokens } from "../tokens";
|
|
4
4
|
const getColors = (status) => {
|
|
5
5
|
switch (status) {
|
|
6
|
-
case
|
|
7
|
-
return {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
case "finish":
|
|
7
|
+
return {
|
|
8
|
+
main: tokens.color.primary,
|
|
9
|
+
bg: tokens.color.primaryLight,
|
|
10
|
+
text: tokens.color.primary,
|
|
11
|
+
line: tokens.color.primary,
|
|
12
|
+
};
|
|
13
|
+
case "process":
|
|
14
|
+
return {
|
|
15
|
+
main: tokens.color.primary,
|
|
16
|
+
bg: tokens.color.primary,
|
|
17
|
+
text: "#ffffff",
|
|
18
|
+
line: tokens.color.slate200,
|
|
19
|
+
};
|
|
20
|
+
case "error":
|
|
21
|
+
return {
|
|
22
|
+
main: tokens.color.danger,
|
|
23
|
+
bg: tokens.color.dangerBg,
|
|
24
|
+
text: tokens.color.danger,
|
|
25
|
+
line: tokens.color.slate200,
|
|
26
|
+
};
|
|
27
|
+
case "wait":
|
|
13
28
|
default:
|
|
14
|
-
return {
|
|
29
|
+
return {
|
|
30
|
+
main: tokens.color.slate300,
|
|
31
|
+
bg: tokens.color.slate50,
|
|
32
|
+
text: tokens.color.slate400,
|
|
33
|
+
line: tokens.color.slate200,
|
|
34
|
+
};
|
|
15
35
|
}
|
|
16
36
|
};
|
|
17
|
-
const ICON_SIZE = { sm:
|
|
18
|
-
const FONT_SIZE = {
|
|
19
|
-
|
|
20
|
-
|
|
37
|
+
const ICON_SIZE = { sm: "28px", md: "36px", lg: "44px" };
|
|
38
|
+
const FONT_SIZE = {
|
|
39
|
+
sm: tokens.font.base,
|
|
40
|
+
md: tokens.font.sm,
|
|
41
|
+
lg: tokens.font.base,
|
|
42
|
+
};
|
|
43
|
+
export const Steps = React.forwardRef(({ currentStep = 0, items = [], direction = "horizontal", size = "md", className = "", style = {}, }, ref) => {
|
|
44
|
+
const isVertical = direction === "vertical";
|
|
21
45
|
return (_jsx("div", { ref: ref, role: "list", style: {
|
|
22
|
-
display:
|
|
23
|
-
flexDirection: isVertical ?
|
|
46
|
+
display: "flex",
|
|
47
|
+
flexDirection: isVertical ? "column" : "row",
|
|
24
48
|
gap: 0,
|
|
25
|
-
width:
|
|
49
|
+
width: "100%",
|
|
26
50
|
...style,
|
|
27
51
|
}, className: `ds-steps ds-steps--${direction} ${className}`, children: items.map((item, index) => {
|
|
28
|
-
const status = item.status ||
|
|
52
|
+
const status = item.status ||
|
|
53
|
+
(index < currentStep
|
|
54
|
+
? "finish"
|
|
55
|
+
: index === currentStep
|
|
56
|
+
? "process"
|
|
57
|
+
: "wait");
|
|
29
58
|
return (_jsx(StepItemComponent, { index: index, status: status, title: item.title, description: item.description, icon: item.icon, direction: direction, isLast: index === items.length - 1, size: size, isCurrent: index === currentStep }, index));
|
|
30
59
|
}) }));
|
|
31
60
|
});
|
|
32
|
-
Steps.displayName =
|
|
61
|
+
Steps.displayName = "Steps";
|
|
33
62
|
const StepItemComponent = ({ index, status, title, description, icon, direction, isLast, size, isCurrent, }) => {
|
|
34
|
-
const isHorizontal = direction ===
|
|
63
|
+
const isHorizontal = direction === "horizontal";
|
|
35
64
|
const c = getColors(status);
|
|
36
65
|
const iconSize = ICON_SIZE[size] || ICON_SIZE.md;
|
|
37
66
|
const iconSizePx = parseInt(iconSize);
|
|
38
67
|
const fontSize = FONT_SIZE[size] || tokens.font.sm;
|
|
39
68
|
const CheckIcon = () => (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
40
69
|
const ErrorIcon = () => (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", children: _jsx("path", { d: "M18 6L6 18M6 6l12 12" }) }));
|
|
41
|
-
return (_jsxs("div", { role: "listitem", "aria-current": isCurrent ?
|
|
42
|
-
display:
|
|
43
|
-
flexDirection: isHorizontal ?
|
|
44
|
-
flex: isHorizontal ? (isLast ?
|
|
45
|
-
alignItems: isHorizontal ?
|
|
46
|
-
position:
|
|
70
|
+
return (_jsxs("div", { role: "listitem", "aria-current": isCurrent ? "step" : undefined, style: {
|
|
71
|
+
display: "flex",
|
|
72
|
+
flexDirection: isHorizontal ? "column" : "row",
|
|
73
|
+
flex: isHorizontal ? (isLast ? "none" : 1) : "none",
|
|
74
|
+
alignItems: isHorizontal ? "center" : "flex-start",
|
|
75
|
+
position: "relative",
|
|
47
76
|
}, children: [!isLast && (_jsx("div", { style: {
|
|
48
|
-
position:
|
|
49
|
-
backgroundColor:
|
|
77
|
+
position: "absolute",
|
|
78
|
+
backgroundColor: "transparent",
|
|
50
79
|
zIndex: 1,
|
|
51
80
|
...(isHorizontal
|
|
52
81
|
? {
|
|
53
|
-
height:
|
|
82
|
+
height: "2px",
|
|
54
83
|
top: `${iconSizePx / 2}px`,
|
|
55
84
|
left: `calc(50% + ${iconSizePx / 2 + 4}px)`,
|
|
56
85
|
right: `calc(-50% + ${iconSizePx / 2 + 4}px)`,
|
|
57
|
-
background: status ===
|
|
86
|
+
background: status === "finish"
|
|
58
87
|
? `linear-gradient(to right, ${tokens.color.primary}, ${tokens.color.primaryLight})`
|
|
59
88
|
: tokens.color.slate200,
|
|
60
89
|
}
|
|
61
90
|
: {
|
|
62
|
-
width:
|
|
91
|
+
width: "2px",
|
|
63
92
|
left: `${iconSizePx / 2 - 1}px`,
|
|
64
93
|
top: `${iconSizePx + 6}px`,
|
|
65
|
-
height:
|
|
66
|
-
background: status ===
|
|
94
|
+
height: "32px",
|
|
95
|
+
background: status === "finish"
|
|
67
96
|
? `linear-gradient(to bottom, ${tokens.color.primary}, ${tokens.color.primaryLight})`
|
|
68
97
|
: tokens.color.slate200,
|
|
69
98
|
}),
|
|
70
99
|
} })), _jsx("div", { style: {
|
|
71
100
|
width: iconSize,
|
|
72
101
|
height: iconSize,
|
|
73
|
-
borderRadius:
|
|
74
|
-
display:
|
|
75
|
-
alignItems:
|
|
76
|
-
justifyContent:
|
|
102
|
+
borderRadius: "50%",
|
|
103
|
+
display: "flex",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center",
|
|
77
106
|
border: `2px solid ${c.main}`,
|
|
78
107
|
backgroundColor: c.bg,
|
|
79
108
|
color: c.text,
|
|
@@ -82,29 +111,31 @@ const StepItemComponent = ({ index, status, title, description, icon, direction,
|
|
|
82
111
|
zIndex: 2,
|
|
83
112
|
flexShrink: 0,
|
|
84
113
|
transition: tokens.transition.normal,
|
|
85
|
-
boxShadow:
|
|
86
|
-
marginBottom: isHorizontal ? tokens.spacing[
|
|
87
|
-
marginRight: !isHorizontal ? tokens.spacing[
|
|
88
|
-
}, children: icon ? (icon) : status ===
|
|
89
|
-
textAlign: isHorizontal ?
|
|
90
|
-
paddingTop: !isHorizontal ?
|
|
91
|
-
paddingBottom: !isHorizontal && !isLast ? tokens.spacing[
|
|
114
|
+
boxShadow: "none",
|
|
115
|
+
marginBottom: isHorizontal ? tokens.spacing["2"] : 0,
|
|
116
|
+
marginRight: !isHorizontal ? tokens.spacing["3"] : 0,
|
|
117
|
+
}, children: icon ? (icon) : status === "finish" ? (_jsx(CheckIcon, {})) : status === "error" ? (_jsx(ErrorIcon, {})) : (index + 1) }), _jsxs("div", { style: {
|
|
118
|
+
textAlign: isHorizontal ? "center" : "left",
|
|
119
|
+
paddingTop: !isHorizontal ? "6px" : 0,
|
|
120
|
+
paddingBottom: !isHorizontal && !isLast ? tokens.spacing["8"] : 0,
|
|
92
121
|
}, children: [_jsx("div", { style: {
|
|
93
122
|
fontSize,
|
|
94
|
-
fontWeight: status ===
|
|
95
|
-
|
|
123
|
+
fontWeight: status === "process"
|
|
124
|
+
? tokens.font.weightBold
|
|
125
|
+
: tokens.font.weightSemibold,
|
|
126
|
+
color: status === "wait"
|
|
96
127
|
? tokens.color.textDisabled
|
|
97
|
-
: status ===
|
|
128
|
+
: status === "error"
|
|
98
129
|
? tokens.color.danger
|
|
99
|
-
: status ===
|
|
130
|
+
: status === "process"
|
|
100
131
|
? tokens.color.primary
|
|
101
132
|
: tokens.color.text,
|
|
102
133
|
lineHeight: 1.35,
|
|
103
134
|
transition: tokens.transition.fast,
|
|
104
135
|
}, children: title }), description && (_jsx("div", { style: {
|
|
105
|
-
fontSize: tokens.font.
|
|
136
|
+
fontSize: tokens.font.base,
|
|
106
137
|
color: tokens.color.textMuted,
|
|
107
|
-
marginTop:
|
|
138
|
+
marginTop: "3px",
|
|
108
139
|
fontWeight: tokens.font.weightMedium,
|
|
109
140
|
lineHeight: 1.4,
|
|
110
141
|
}, children: description }))] })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Steps.js","sourceRoot":"","sources":["../../../src/components/Steps.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B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CAAC,KAAK,CAAC,SAAS;4BAC7B,SAAS,EAAE,KAAK;4BAChB,UAAU,EAAE,MAAM,CAAC,IAAI,CAAC,YAAY;4BACpC,UAAU,EAAE,GAAG;yBAChB,YAEA,WAAW,GACR,CACP,IACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { tokens } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { tokens } from "../tokens";
|
|
3
3
|
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
4
4
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
5
|
gradient?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
8
|
-
type TextColor = keyof typeof tokens.color |
|
|
8
|
+
type TextColor = keyof typeof tokens.color | "default" | "muted" | "disabled" | "primary" | "danger" | "success" | "warning" | "info";
|
|
9
9
|
export interface TextProps extends React.HTMLAttributes<HTMLParagraphElement> {
|
|
10
10
|
size?: keyof typeof tokens.font;
|
|
11
|
-
weight?:
|
|
11
|
+
weight?: "normal" | "medium" | "semibold" | "bold";
|
|
12
12
|
color?: TextColor;
|
|
13
13
|
truncate?: boolean;
|
|
14
|
-
as?:
|
|
14
|
+
as?: "p" | "span" | "div" | "li";
|
|
15
15
|
}
|
|
16
16
|
export declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
17
17
|
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|