shared-design-system 1.80.0 → 1.81.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,13 +1,13 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
export interface TimelineItem {
|
|
3
3
|
label?: React.ReactNode;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
dot?: React.ReactNode;
|
|
6
|
-
color?:
|
|
6
|
+
color?: "primary" | "success" | "warning" | "danger" | "info" | "gray";
|
|
7
7
|
}
|
|
8
8
|
export interface TimelineProps {
|
|
9
9
|
items: TimelineItem[];
|
|
10
|
-
mode?:
|
|
10
|
+
mode?: "left" | "alternate";
|
|
11
11
|
}
|
|
12
12
|
export declare const Timeline: any;
|
|
13
13
|
export declare const TimelineItem: React.FC<TimelineItem>;
|
|
@@ -1,35 +1,44 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React from
|
|
3
|
-
import { tokens } from
|
|
4
|
-
export const Timeline = React.forwardRef(({ items, mode =
|
|
5
|
-
return (_jsx("div", { ref: ref, style: { display:
|
|
6
|
-
display:
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { tokens } from "../tokens";
|
|
4
|
+
export const Timeline = React.forwardRef(({ items, mode = "left" }, ref) => {
|
|
5
|
+
return (_jsx("div", { ref: ref, style: { display: "flex", flexDirection: "column" }, className: "ds-timeline", children: items.map((item, index) => (_jsxs("div", { style: {
|
|
6
|
+
display: "flex",
|
|
7
7
|
gap: tokens.spacing[4],
|
|
8
|
-
position:
|
|
9
|
-
paddingBottom: index === items.length - 1 ? 0 : tokens.spacing[8],
|
|
8
|
+
position: "relative",
|
|
9
|
+
// paddingBottom: index === items.length - 1 ? 0 : tokens.spacing[8],
|
|
10
10
|
}, children: [item.label && (_jsx("div", { style: {
|
|
11
|
-
width:
|
|
12
|
-
textAlign:
|
|
13
|
-
fontSize:
|
|
11
|
+
width: "100px",
|
|
12
|
+
textAlign: "right",
|
|
13
|
+
fontSize: "12px",
|
|
14
14
|
color: tokens.color.slate400,
|
|
15
|
-
paddingTop:
|
|
16
|
-
}, children: item.label })), _jsxs("div", { style: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
paddingTop: "2px",
|
|
16
|
+
}, children: item.label })), _jsxs("div", { style: {
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
position: "relative",
|
|
21
|
+
}, children: [_jsx("div", { style: {
|
|
22
|
+
width: "12px",
|
|
23
|
+
height: "12px",
|
|
24
|
+
borderRadius: "50%",
|
|
25
|
+
border: `2px solid ${tokens.color[item.color || "primary"] ||
|
|
26
|
+
tokens.color.primary}`,
|
|
21
27
|
backgroundColor: tokens.color.white,
|
|
22
28
|
zIndex: 1,
|
|
23
|
-
marginTop:
|
|
29
|
+
marginTop: "4px",
|
|
24
30
|
}, children: item.dot }), index < items.length - 1 && (_jsx("div", { style: {
|
|
25
|
-
position:
|
|
26
|
-
top:
|
|
27
|
-
bottom:
|
|
28
|
-
width:
|
|
31
|
+
position: "absolute",
|
|
32
|
+
top: "16px",
|
|
33
|
+
bottom: "-2px",
|
|
34
|
+
width: "2px",
|
|
29
35
|
backgroundColor: tokens.color.slate100,
|
|
30
|
-
} }))] }), _jsx("div", { style: { flex: 1, paddingTop:
|
|
36
|
+
} }))] }), _jsx("div", { style: { flex: 1, paddingTop: "1px" }, children: _jsx("div", { style: {
|
|
37
|
+
fontSize: tokens.font.sm,
|
|
38
|
+
color: tokens.color.slate700,
|
|
39
|
+
}, children: item.children }) })] }, index))) }));
|
|
31
40
|
});
|
|
32
|
-
Timeline.displayName =
|
|
33
|
-
export const TimelineItem = ({ children }) => _jsx(_Fragment, { children: children });
|
|
41
|
+
Timeline.displayName = "Timeline";
|
|
42
|
+
export const TimelineItem = ({ children }) => (_jsx(_Fragment, { children: children }));
|
|
34
43
|
Timeline.Item = TimelineItem;
|
|
35
44
|
//# sourceMappingURL=Timeline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../../../src/components/Timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAcnC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE;IAChC,OAAO,CACL,
|
|
1
|
+
{"version":3,"file":"Timeline.js","sourceRoot":"","sources":["../../../src/components/Timeline.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAcnC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE;IAChC,OAAO,CACL,cACE,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,EACnD,SAAS,EAAC,aAAa,YAEtB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,eAEE,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;gBACtB,QAAQ,EAAE,UAAU;gBACpB,qEAAqE;aACtE,aAGA,IAAI,CAAC,KAAK,IAAI,CACb,cACE,KAAK,EAAE;wBACL,KAAK,EAAE,OAAO;wBACd,SAAS,EAAE,OAAO;wBAClB,QAAQ,EAAE,MAAM;wBAChB,KA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