@fluidattacks/design 9.5.2 → 9.5.3
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,37 +1,38 @@
|
|
|
1
|
-
import { styled as
|
|
2
|
-
import { setMargin as
|
|
3
|
-
const
|
|
1
|
+
import { styled as e } from "styled-components";
|
|
2
|
+
import { setMargin as x } from "../@core/utils.js";
|
|
3
|
+
const s = e.div`
|
|
4
4
|
${({
|
|
5
5
|
$backgroundColor: r,
|
|
6
|
-
$height:
|
|
7
|
-
$width:
|
|
8
|
-
$ml:
|
|
6
|
+
$height: i,
|
|
7
|
+
$width: o,
|
|
8
|
+
$ml: t,
|
|
9
9
|
$mr: d,
|
|
10
|
-
$mt:
|
|
11
|
-
$mb:
|
|
12
|
-
$mx:
|
|
10
|
+
$mt: m,
|
|
11
|
+
$mb: n,
|
|
12
|
+
$mx: l,
|
|
13
13
|
$my: h,
|
|
14
|
-
$margin:
|
|
14
|
+
$margin: a
|
|
15
15
|
}) => `
|
|
16
16
|
background-color: ${r};
|
|
17
17
|
border-radius: 999px;
|
|
18
18
|
display: flex;
|
|
19
|
-
height: ${
|
|
19
|
+
height: ${i};
|
|
20
20
|
overflow: hidden;
|
|
21
|
-
width: ${
|
|
22
|
-
${
|
|
21
|
+
width: ${o};
|
|
22
|
+
${x({ margin: a, mb: n, ml: t, mr: d, mt: m, mx: l, my: h })}
|
|
23
23
|
`}
|
|
24
|
-
`,
|
|
25
|
-
${({ $color: r, $showSeparator:
|
|
24
|
+
`, b = e.div`
|
|
25
|
+
${({ $color: r, $showSeparator: i, $width: o, theme: t }) => `
|
|
26
26
|
background-color: ${r};
|
|
27
27
|
box-sizing: border-box;
|
|
28
|
-
flex-shrink:
|
|
28
|
+
flex-shrink: 1;
|
|
29
29
|
height: 100%;
|
|
30
|
-
width:
|
|
31
|
-
|
|
30
|
+
min-width: max(1%, 10px);
|
|
31
|
+
width: ${o}%;
|
|
32
|
+
${i ? `border-right: 1.5px solid ${t.palette.white};` : ""}
|
|
32
33
|
`}
|
|
33
34
|
`;
|
|
34
35
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
s as StyledBarContainer,
|
|
37
|
+
b as StyledSegment
|
|
37
38
|
};
|
|
@@ -2,7 +2,7 @@ import { IDisplayModifiable, IMarginModifiable } from '../@core';
|
|
|
2
2
|
/**
|
|
3
3
|
* Segment configuration for the progress bar.
|
|
4
4
|
* @interface ISegment
|
|
5
|
-
* @property { number } value - Percentage width of the segment (0-100). A segment with 0 or less is not drawn.
|
|
5
|
+
* @property { number } value - Percentage width of the segment (0-100). A segment with 0 or less is not drawn; a visible segment is at least 1% or 10px wide, whichever is larger.
|
|
6
6
|
* @property { string } [color] - Background color of the segment. Defaults to primary[700], error[500], warning[500] in order.
|
|
7
7
|
*/
|
|
8
8
|
interface ISegment {
|
package/package.json
CHANGED