@fluidattacks/design 8.2.0 → 8.3.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,49 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useTheme as f } from "styled-components";
|
|
3
|
-
import { StyledBarContainer as w, StyledSegment as
|
|
4
|
-
const
|
|
5
|
-
segments:
|
|
6
|
-
backgroundColor:
|
|
3
|
+
import { StyledBarContainer as w, StyledSegment as S } from "./styles.js";
|
|
4
|
+
const B = ({
|
|
5
|
+
segments: t,
|
|
6
|
+
backgroundColor: m,
|
|
7
7
|
height: n = "14px",
|
|
8
8
|
width: $ = "100%",
|
|
9
9
|
margin: p,
|
|
10
10
|
mx: g,
|
|
11
|
-
my:
|
|
12
|
-
ml:
|
|
13
|
-
mr:
|
|
14
|
-
mt:
|
|
15
|
-
mb:
|
|
11
|
+
my: h,
|
|
12
|
+
ml: i,
|
|
13
|
+
mr: s,
|
|
14
|
+
mt: c,
|
|
15
|
+
mb: d
|
|
16
16
|
}) => {
|
|
17
|
-
const r = f(),
|
|
17
|
+
const r = f(), o = [
|
|
18
18
|
r.palette.primary[700],
|
|
19
19
|
r.palette.error[500],
|
|
20
20
|
r.palette.warning[500]
|
|
21
21
|
], u = r.palette.warning[200];
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ l(
|
|
23
23
|
w,
|
|
24
24
|
{
|
|
25
|
-
$backgroundColor:
|
|
25
|
+
$backgroundColor: m ?? u,
|
|
26
26
|
$height: n,
|
|
27
27
|
$margin: p,
|
|
28
|
-
$mb:
|
|
29
|
-
$ml:
|
|
30
|
-
$mr:
|
|
31
|
-
$mt:
|
|
28
|
+
$mb: d,
|
|
29
|
+
$ml: i,
|
|
30
|
+
$mr: s,
|
|
31
|
+
$mt: c,
|
|
32
32
|
$mx: g,
|
|
33
|
-
$my:
|
|
33
|
+
$my: h,
|
|
34
34
|
$width: $,
|
|
35
35
|
role: "progressbar",
|
|
36
|
-
children:
|
|
37
|
-
|
|
36
|
+
children: t.map((a, e) => /* @__PURE__ */ l(
|
|
37
|
+
S,
|
|
38
38
|
{
|
|
39
|
-
$color:
|
|
40
|
-
$
|
|
39
|
+
$color: a.color ?? o[e % o.length],
|
|
40
|
+
$showSeparator: e < t.length - 1,
|
|
41
|
+
$width: a.value
|
|
41
42
|
},
|
|
42
|
-
`segment-${
|
|
43
|
+
`segment-${e}`
|
|
43
44
|
))
|
|
44
45
|
}
|
|
45
46
|
);
|
|
46
47
|
};
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
B as SegmentedProgressBar
|
|
49
50
|
};
|
|
@@ -13,6 +13,7 @@ interface IStyledBarContainerProps {
|
|
|
13
13
|
}
|
|
14
14
|
interface IStyledSegmentProps {
|
|
15
15
|
$color: string;
|
|
16
|
+
$showSeparator: boolean;
|
|
16
17
|
$width: number;
|
|
17
18
|
}
|
|
18
19
|
declare const StyledBarContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof IStyledBarContainerProps> & IStyledBarContainerProps, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof IStyledBarContainerProps> & IStyledBarContainerProps, never>>> & string;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { styled as t } from "styled-components";
|
|
2
|
-
import { setMargin as
|
|
3
|
-
const
|
|
2
|
+
import { setMargin as a } from "../@core/utils.js";
|
|
3
|
+
const b = t.div`
|
|
4
4
|
${({
|
|
5
5
|
$backgroundColor: r,
|
|
6
6
|
$height: o,
|
|
7
7
|
$width: e,
|
|
8
8
|
$ml: i,
|
|
9
9
|
$mr: d,
|
|
10
|
-
$mt:
|
|
11
|
-
$mb:
|
|
12
|
-
$mx:
|
|
13
|
-
$my:
|
|
14
|
-
$margin:
|
|
10
|
+
$mt: l,
|
|
11
|
+
$mb: m,
|
|
12
|
+
$mx: n,
|
|
13
|
+
$my: h,
|
|
14
|
+
$margin: $
|
|
15
15
|
}) => `
|
|
16
16
|
background-color: ${r};
|
|
17
17
|
border-radius: 999px;
|
|
@@ -19,17 +19,19 @@ const c = t.div`
|
|
|
19
19
|
height: ${o};
|
|
20
20
|
overflow: hidden;
|
|
21
21
|
width: ${e};
|
|
22
|
-
${
|
|
22
|
+
${a({ margin: $, mb: m, ml: i, mr: d, mt: l, mx: n, my: h })}
|
|
23
23
|
`}
|
|
24
|
-
`,
|
|
25
|
-
${({ $color: r, $
|
|
24
|
+
`, x = t.div`
|
|
25
|
+
${({ $color: r, $showSeparator: o, $width: e, theme: i }) => `
|
|
26
26
|
background-color: ${r};
|
|
27
|
+
box-sizing: border-box;
|
|
27
28
|
flex-shrink: 0;
|
|
28
29
|
height: 100%;
|
|
29
|
-
width: ${
|
|
30
|
+
width: ${e}%;
|
|
31
|
+
${o ? `border-right: 1.5px solid ${i.palette.white};` : ""}
|
|
30
32
|
`}
|
|
31
33
|
`;
|
|
32
34
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
b as StyledBarContainer,
|
|
36
|
+
x as StyledSegment
|
|
35
37
|
};
|
package/package.json
CHANGED