@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 m } from "react/jsx-runtime";
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 y } from "./styles.js";
4
- const x = ({
5
- segments: a,
6
- backgroundColor: l,
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: i,
12
- ml: s,
13
- mr: c,
14
- mt: d,
15
- mb: h
11
+ my: h,
12
+ ml: i,
13
+ mr: s,
14
+ mt: c,
15
+ mb: d
16
16
  }) => {
17
- const r = f(), e = [
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__ */ m(
22
+ return /* @__PURE__ */ l(
23
23
  w,
24
24
  {
25
- $backgroundColor: l ?? u,
25
+ $backgroundColor: m ?? u,
26
26
  $height: n,
27
27
  $margin: p,
28
- $mb: h,
29
- $ml: s,
30
- $mr: c,
31
- $mt: d,
28
+ $mb: d,
29
+ $ml: i,
30
+ $mr: s,
31
+ $mt: c,
32
32
  $mx: g,
33
- $my: i,
33
+ $my: h,
34
34
  $width: $,
35
35
  role: "progressbar",
36
- children: a.map((t, o) => /* @__PURE__ */ m(
37
- y,
36
+ children: t.map((a, e) => /* @__PURE__ */ l(
37
+ S,
38
38
  {
39
- $color: t.color ?? e[o % e.length],
40
- $width: t.value
39
+ $color: a.color ?? o[e % o.length],
40
+ $showSeparator: e < t.length - 1,
41
+ $width: a.value
41
42
  },
42
- `segment-${o}`
43
+ `segment-${e}`
43
44
  ))
44
45
  }
45
46
  );
46
47
  };
47
48
  export {
48
- x as SegmentedProgressBar
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 $ } from "../@core/utils.js";
3
- const c = t.div`
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: m,
11
- $mb: n,
12
- $mx: l,
13
- $my: a,
14
- $margin: h
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
- ${$({ margin: h, mb: n, ml: i, mr: d, mt: m, mx: l, my: a })}
22
+ ${a({ margin: $, mb: m, ml: i, mr: d, mt: l, mx: n, my: h })}
23
23
  `}
24
- `, f = t.div`
25
- ${({ $color: r, $width: o }) => `
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: ${o}%;
30
+ width: ${e}%;
31
+ ${o ? `border-right: 1.5px solid ${i.palette.white};` : ""}
30
32
  `}
31
33
  `;
32
34
  export {
33
- c as StyledBarContainer,
34
- f as StyledSegment
35
+ b as StyledBarContainer,
36
+ x as StyledSegment
35
37
  };
package/package.json CHANGED
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "8.2.0"
138
+ "version": "8.3.0"
139
139
  }