@bikdotai/bik-component-library 0.0.840 → 0.0.841-beta.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.
Files changed (99) hide show
  1. package/dist/cjs/components/avatar/Avatar.js +1 -1
  2. package/dist/cjs/components/avatar/Avatar.js.map +1 -1
  3. package/dist/cjs/components/avatar/Avatar.styled.js +12 -4
  4. package/dist/cjs/components/avatar/Avatar.styled.js.map +1 -1
  5. package/dist/cjs/components/card-selector/CardSelector.js +1 -1
  6. package/dist/cjs/components/card-selector/CardSelector.js.map +1 -1
  7. package/dist/cjs/components/card-selector/CardSelectorGroup.js +1 -1
  8. package/dist/cjs/components/card-selector/CardSelectorGroup.js.map +1 -1
  9. package/dist/cjs/components/carousel/carousel.js +2 -2
  10. package/dist/cjs/components/carousel/carousel.js.map +1 -1
  11. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  12. package/dist/cjs/components/checkBox/CheckBox.js.map +1 -1
  13. package/dist/cjs/components/code-block/CodeBlock.js +2 -2
  14. package/dist/cjs/components/code-block/CodeBlock.js.map +1 -1
  15. package/dist/cjs/components/colourInput/ColourInput.js +1 -1
  16. package/dist/cjs/components/colourInput/ColourInput.js.map +1 -1
  17. package/dist/cjs/components/dot-pulse/DotPulse.js +3 -3
  18. package/dist/cjs/components/dot-pulse/DotPulse.js.map +1 -1
  19. package/dist/cjs/components/dropShadow/DropShadow.js +1 -1
  20. package/dist/cjs/components/dropShadow/DropShadow.js.map +1 -1
  21. package/dist/cjs/components/dropdown/ChipInput.js +1 -1
  22. package/dist/cjs/components/dropdown/ChipInput.js.map +1 -1
  23. package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
  24. package/dist/cjs/components/dropdown/DropdownPopover/index.js.map +1 -1
  25. package/dist/cjs/components/floater/floater.js +1 -1
  26. package/dist/cjs/components/floater/floater.js.map +1 -1
  27. package/dist/cjs/components/modals/styledModal.js +2 -2
  28. package/dist/cjs/components/modals/styledModal.js.map +1 -1
  29. package/dist/cjs/components/pagination/Pagination.js +1 -1
  30. package/dist/cjs/components/pagination/Pagination.js.map +1 -1
  31. package/dist/cjs/components/progress-bar/CircularProgressBar.js +1 -1
  32. package/dist/cjs/components/progress-bar/CircularProgressBar.js.map +1 -1
  33. package/dist/cjs/components/progress-bar/ProgressBarComponent.js +2 -2
  34. package/dist/cjs/components/progress-bar/ProgressBarComponent.js.map +1 -1
  35. package/dist/cjs/components/progress-bar-v2/ProgressBarV2.js +17 -17
  36. package/dist/cjs/components/progress-bar-v2/ProgressBarV2.js.map +1 -1
  37. package/dist/cjs/components/shimmer-image/ShimmerImage.js +1 -1
  38. package/dist/cjs/components/shimmer-image/ShimmerImage.js.map +1 -1
  39. package/dist/cjs/components/spinner/Spinner.js +3 -3
  40. package/dist/cjs/components/spinner/Spinner.js.map +1 -1
  41. package/dist/cjs/components/states/StateComponent.js +1 -1
  42. package/dist/cjs/components/states/StateComponent.js.map +1 -1
  43. package/dist/cjs/components/stepper/Stepper.js +1 -1
  44. package/dist/cjs/components/stepper/Stepper.js.map +1 -1
  45. package/dist/cjs/components/testimonial-card/TestimonialCard.js +1 -1
  46. package/dist/cjs/components/testimonial-card/TestimonialCard.js.map +1 -1
  47. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
  48. package/dist/cjs/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js.map +1 -1
  49. package/dist/esm/components/avatar/Avatar.d.ts +2 -1
  50. package/dist/esm/components/avatar/Avatar.js +34 -24
  51. package/dist/esm/components/avatar/Avatar.js.map +1 -1
  52. package/dist/esm/components/avatar/Avatar.styled.d.ts +1 -0
  53. package/dist/esm/components/avatar/Avatar.styled.js +17 -8
  54. package/dist/esm/components/avatar/Avatar.styled.js.map +1 -1
  55. package/dist/esm/components/card-selector/CardSelector.js +11 -9
  56. package/dist/esm/components/card-selector/CardSelector.js.map +1 -1
  57. package/dist/esm/components/card-selector/CardSelectorGroup.js +1 -0
  58. package/dist/esm/components/card-selector/CardSelectorGroup.js.map +1 -1
  59. package/dist/esm/components/carousel/carousel.js +8 -8
  60. package/dist/esm/components/carousel/carousel.js.map +1 -1
  61. package/dist/esm/components/checkBox/CheckBox.js +8 -5
  62. package/dist/esm/components/checkBox/CheckBox.js.map +1 -1
  63. package/dist/esm/components/code-block/CodeBlock.js +14 -14
  64. package/dist/esm/components/code-block/CodeBlock.js.map +1 -1
  65. package/dist/esm/components/colourInput/ColourInput.js +11 -10
  66. package/dist/esm/components/colourInput/ColourInput.js.map +1 -1
  67. package/dist/esm/components/dot-pulse/DotPulse.js +15 -15
  68. package/dist/esm/components/dot-pulse/DotPulse.js.map +1 -1
  69. package/dist/esm/components/dropShadow/DropShadow.js +6 -6
  70. package/dist/esm/components/dropShadow/DropShadow.js.map +1 -1
  71. package/dist/esm/components/dropdown/ChipInput.js +10 -9
  72. package/dist/esm/components/dropdown/ChipInput.js.map +1 -1
  73. package/dist/esm/components/dropdown/DropdownPopover/index.js +26 -25
  74. package/dist/esm/components/dropdown/DropdownPopover/index.js.map +1 -1
  75. package/dist/esm/components/floater/floater.js +14 -13
  76. package/dist/esm/components/floater/floater.js.map +1 -1
  77. package/dist/esm/components/modals/styledModal.js +6 -5
  78. package/dist/esm/components/modals/styledModal.js.map +1 -1
  79. package/dist/esm/components/pagination/Pagination.js +7 -7
  80. package/dist/esm/components/pagination/Pagination.js.map +1 -1
  81. package/dist/esm/components/progress-bar/CircularProgressBar.js +61 -50
  82. package/dist/esm/components/progress-bar/CircularProgressBar.js.map +1 -1
  83. package/dist/esm/components/progress-bar/ProgressBarComponent.js +14 -13
  84. package/dist/esm/components/progress-bar/ProgressBarComponent.js.map +1 -1
  85. package/dist/esm/components/progress-bar-v2/ProgressBarV2.js +57 -39
  86. package/dist/esm/components/progress-bar-v2/ProgressBarV2.js.map +1 -1
  87. package/dist/esm/components/shimmer-image/ShimmerImage.js +19 -18
  88. package/dist/esm/components/shimmer-image/ShimmerImage.js.map +1 -1
  89. package/dist/esm/components/spinner/Spinner.js +19 -11
  90. package/dist/esm/components/spinner/Spinner.js.map +1 -1
  91. package/dist/esm/components/states/StateComponent.js +47 -30
  92. package/dist/esm/components/states/StateComponent.js.map +1 -1
  93. package/dist/esm/components/stepper/Stepper.js +24 -16
  94. package/dist/esm/components/stepper/Stepper.js.map +1 -1
  95. package/dist/esm/components/testimonial-card/TestimonialCard.js +5 -4
  96. package/dist/esm/components/testimonial-card/TestimonialCard.js.map +1 -1
  97. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +19 -18
  98. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js.map +1 -1
  99. package/package.json +1 -1
@@ -1,49 +1,50 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as d } from "react/jsx-runtime";
2
2
  import { useRef as g, useState as s, useEffect as O } from "react";
3
3
  const H = (f) => {
4
- const i = g(null), [c, l] = s(0), [d, o] = s(0), [h, w] = s(!1), a = (t) => {
4
+ const i = g(null), [r, o] = s(0), [c, l] = s(0), [h, a] = s(!1), w = (t) => {
5
5
  if (f.useDefaultOffsets) {
6
- o(t.left);
6
+ l(t.left);
7
7
  return;
8
8
  }
9
9
  let e = 0;
10
10
  f.leftOffset ? e = t.left + f.leftOffset : e = t.left + t.width + 30;
11
11
  const n = i?.current;
12
12
  if (!n) {
13
- o(e);
13
+ l(e);
14
14
  return;
15
15
  }
16
- e > window.innerWidth - n.offsetWidth && (e = window.innerWidth - n.offsetWidth - 50), o(e);
16
+ e > window.innerWidth - n.offsetWidth && (e = window.innerWidth - n.offsetWidth - 50), l(e);
17
17
  }, m = (t) => {
18
18
  if (f.useDefaultOffsets) {
19
- l(t.top);
19
+ o(t.top);
20
20
  return;
21
21
  }
22
22
  let e = t.top;
23
23
  f.topOffset && (e = t.top + f.topOffset);
24
24
  const n = i?.current;
25
25
  if (!n) {
26
- l(e);
26
+ o(e);
27
27
  return;
28
28
  }
29
29
  const u = window.innerHeight;
30
- t.top + n.offsetHeight > u && (e = t.top - (t.top + n.offsetHeight - u) - 10), l(e);
30
+ t.top + n.offsetHeight > u && (e = t.top - (t.top + n.offsetHeight - u) - 10), o(e);
31
31
  };
32
32
  return O(() => {
33
33
  if (f.refElement.current) {
34
34
  const t = f.refElement.current.getBoundingClientRect();
35
- a(t), m(t), w(!0);
35
+ w(t), m(t), a(!0);
36
36
  }
37
- }), h ? /* @__PURE__ */ r(
37
+ }), h ? /* @__PURE__ */ d(
38
38
  "div",
39
39
  {
40
+ "data-testid": "floater-position",
40
41
  style: {
41
- top: c,
42
- left: d,
42
+ top: r,
43
+ left: c,
43
44
  position: "fixed",
44
45
  zIndex: 1e3
45
46
  },
46
- children: /* @__PURE__ */ r("div", { ref: i, children: f.children })
47
+ children: /* @__PURE__ */ d("div", { ref: i, children: f.children })
47
48
  }
48
49
  ) : null;
49
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"floater.js","sources":["../../../../src/components/floater/floater.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nexport type FloaterProps = {\n\tchildren?: React.ReactNode;\n\trefElement: React.MutableRefObject<any>;\n\tleftOffset?: number;\n\ttopOffset?: number;\n\tuseDefaultOffsets?: boolean;\n};\n\nexport const Floater = (props: FloaterProps) => {\n\tconst childRef = useRef<HTMLDivElement | null>(null);\n\tconst [top, setTop] = useState<number>(0);\n\tconst [left, setLeft] = useState<number>(0);\n\tconst [show, setShow] = useState<boolean>(false);\n\n\tconst calculateLeft = (rect: DOMRect) => {\n\t\tif (props.useDefaultOffsets) {\n\t\t\tsetLeft(rect.left);\n\t\t\treturn;\n\t\t}\n\n\t\tlet left = 0;\n\t\tif (props.leftOffset) {\n\t\t\tleft = rect.left + props.leftOffset;\n\t\t} else {\n\t\t\tleft = rect.left + rect.width + 30;\n\t\t}\n\t\tconst childElement: any = childRef?.current;\n\t\tif (!childElement) {\n\t\t\tsetLeft(left);\n\t\t\treturn;\n\t\t}\n\t\tif (left > window.innerWidth - childElement.offsetWidth) {\n\t\t\tleft = window.innerWidth - childElement.offsetWidth - 50;\n\t\t}\n\t\tsetLeft(left);\n\t};\n\n\tconst calculateTop = (rect: DOMRect) => {\n\t\tif (props.useDefaultOffsets) {\n\t\t\tsetTop(rect.top);\n\t\t\treturn;\n\t\t}\n\t\tlet top: number = rect.top;\n\n\t\tif (props.topOffset) {\n\t\t\ttop = rect.top + props.topOffset;\n\t\t}\n\n\t\tconst childElement: any = childRef?.current;\n\t\tif (!childElement) {\n\t\t\tsetTop(top);\n\t\t\treturn;\n\t\t}\n\t\tconst windowHeight = window.innerHeight;\n\t\tif (rect.top + childElement.offsetHeight > windowHeight) {\n\t\t\ttop =\n\t\t\t\trect.top - (rect.top + childElement.offsetHeight - windowHeight) - 10;\n\t\t}\n\t\tsetTop(top);\n\t};\n\n\tuseEffect(() => {\n\t\tif (props.refElement.current) {\n\t\t\tconst rect = props.refElement.current.getBoundingClientRect();\n\t\t\tcalculateLeft(rect);\n\t\t\tcalculateTop(rect);\n\t\t\tsetShow(true);\n\t\t}\n\t});\n\n\tif (!show) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tstyle={{\n\t\t\t\ttop: top,\n\t\t\t\tleft: left,\n\t\t\t\tposition: 'fixed',\n\t\t\t\tzIndex: 1000,\n\t\t\t}}\n\t\t>\n\t\t\t<div ref={childRef}>{props.children}</div>\n\t\t</div>\n\t);\n};\n"],"names":["Floater","props","childRef","useRef","top","setTop","useState","left","setLeft","show","setShow","calculateLeft","rect","childElement","calculateTop","windowHeight","useEffect","jsx"],"mappings":";;AAUO,MAAMA,IAAU,CAACC,MAAwB;AAC/C,QAAMC,IAAWC,EAA8B,IAAI,GAC7C,CAACC,GAAKC,CAAM,IAAIC,EAAiB,CAAC,GAClC,CAACC,GAAMC,CAAO,IAAIF,EAAiB,CAAC,GACpC,CAACG,GAAMC,CAAO,IAAIJ,EAAkB,EAAK,GAEzCK,IAAgB,CAACC,MAAkB;AACxC,QAAIX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AAA,CAAS;AAAA,IAAA;AAAA,EAAA,IAZ9B;AAeT;"}
1
+ {"version":3,"file":"floater.js","sources":["../../../../src/components/floater/floater.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nexport type FloaterProps = {\n\tchildren?: React.ReactNode;\n\trefElement: React.MutableRefObject<any>;\n\tleftOffset?: number;\n\ttopOffset?: number;\n\tuseDefaultOffsets?: boolean;\n};\n\nexport const Floater = (props: FloaterProps) => {\n\tconst childRef = useRef<HTMLDivElement | null>(null);\n\tconst [top, setTop] = useState<number>(0);\n\tconst [left, setLeft] = useState<number>(0);\n\tconst [show, setShow] = useState<boolean>(false);\n\n\tconst calculateLeft = (rect: DOMRect) => {\n\t\tif (props.useDefaultOffsets) {\n\t\t\tsetLeft(rect.left);\n\t\t\treturn;\n\t\t}\n\n\t\tlet left = 0;\n\t\tif (props.leftOffset) {\n\t\t\tleft = rect.left + props.leftOffset;\n\t\t} else {\n\t\t\tleft = rect.left + rect.width + 30;\n\t\t}\n\t\tconst childElement: any = childRef?.current;\n\t\tif (!childElement) {\n\t\t\tsetLeft(left);\n\t\t\treturn;\n\t\t}\n\t\tif (left > window.innerWidth - childElement.offsetWidth) {\n\t\t\tleft = window.innerWidth - childElement.offsetWidth - 50;\n\t\t}\n\t\tsetLeft(left);\n\t};\n\n\tconst calculateTop = (rect: DOMRect) => {\n\t\tif (props.useDefaultOffsets) {\n\t\t\tsetTop(rect.top);\n\t\t\treturn;\n\t\t}\n\t\tlet top: number = rect.top;\n\n\t\tif (props.topOffset) {\n\t\t\ttop = rect.top + props.topOffset;\n\t\t}\n\n\t\tconst childElement: any = childRef?.current;\n\t\tif (!childElement) {\n\t\t\tsetTop(top);\n\t\t\treturn;\n\t\t}\n\t\tconst windowHeight = window.innerHeight;\n\t\tif (rect.top + childElement.offsetHeight > windowHeight) {\n\t\t\ttop =\n\t\t\t\trect.top - (rect.top + childElement.offsetHeight - windowHeight) - 10;\n\t\t}\n\t\tsetTop(top);\n\t};\n\n\tuseEffect(() => {\n\t\tif (props.refElement.current) {\n\t\t\tconst rect = props.refElement.current.getBoundingClientRect();\n\t\t\tcalculateLeft(rect);\n\t\t\tcalculateTop(rect);\n\t\t\tsetShow(true);\n\t\t}\n\t});\n\n\tif (!show) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tdata-testid=\"floater-position\"\n\t\t\tstyle={{\n\t\t\t\ttop: top,\n\t\t\t\tleft: left,\n\t\t\t\tposition: 'fixed',\n\t\t\t\tzIndex: 1000,\n\t\t\t}}\n\t\t>\n\t\t\t<div ref={childRef}>{props.children}</div>\n\t\t</div>\n\t);\n};\n"],"names":["Floater","props","childRef","useRef","top","setTop","useState","left","setLeft","show","setShow","calculateLeft","rect","childElement","calculateTop","windowHeight","useEffect","jsx"],"mappings":";;AAUO,MAAMA,IAAU,CAACC,MAAwB;AAC/C,QAAMC,IAAWC,EAA8B,IAAI,GAC7C,CAACC,GAAKC,CAAM,IAAIC,EAAiB,CAAC,GAClC,CAACC,GAAMC,CAAO,IAAIF,EAAiB,CAAC,GACpC,CAACG,GAAMC,CAAO,IAAIJ,EAAkB,EAAK,GAEzCK,IAAgB,CAACC,MAAkB;AACxC,QAAIX,EAAM,mBAAmB;AAC5B,MAAAO,EAAQI,EAAK,IAAI;AACjB;AAAA,IACD;AAEA,QAAIL,IAAO;AACX,IAAIN,EAAM,aACTM,IAAOK,EAAK,OAAOX,EAAM,aAEzBM,IAAOK,EAAK,OAAOA,EAAK,QAAQ;AAEjC,UAAMC,IAAoBX,GAAU;AACpC,QAAI,CAACW,GAAc;AAClB,MAAAL,EAAQD,CAAI;AACZ;AAAA,IACD;AACA,IAAIA,IAAO,OAAO,aAAaM,EAAa,gBAC3CN,IAAO,OAAO,aAAaM,EAAa,cAAc,KAEvDL,EAAQD,CAAI;AAAA,EACb,GAEMO,IAAe,CAACF,MAAkB;AACvC,QAAIX,EAAM,mBAAmB;AAC5B,MAAAI,EAAOO,EAAK,GAAG;AACf;AAAA,IACD;AACA,QAAIR,IAAcQ,EAAK;AAEvB,IAAIX,EAAM,cACTG,IAAMQ,EAAK,MAAMX,EAAM;AAGxB,UAAMY,IAAoBX,GAAU;AACpC,QAAI,CAACW,GAAc;AAClB,MAAAR,EAAOD,CAAG;AACV;AAAA,IACD;AACA,UAAMW,IAAe,OAAO;AAC5B,IAAIH,EAAK,MAAMC,EAAa,eAAeE,MAC1CX,IACCQ,EAAK,OAAOA,EAAK,MAAMC,EAAa,eAAeE,KAAgB,KAErEV,EAAOD,CAAG;AAAA,EACX;AAWA,SATAY,EAAU,MAAM;AACf,QAAIf,EAAM,WAAW,SAAS;AAC7B,YAAMW,IAAOX,EAAM,WAAW,QAAQ,sBAAA;AACtC,MAAAU,EAAcC,CAAI,GAClBE,EAAaF,CAAI,GACjBF,EAAQ,EAAI;AAAA,IACb;AAAA,EACD,CAAC,GAEID,IAKJ,gBAAAQ;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,eAAY;AAAA,MACZ,OAAO;AAAA,QACN,KAAAb;AAAA,QACA,MAAAG;AAAA,QACA,UAAU;AAAA,QACV,QAAQ;AAAA,MAAA;AAAA,MAGT,UAAA,gBAAAU,EAAC,OAAA,EAAI,KAAKf,GAAW,YAAM,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA,IAb9B;AAgBT;"}
@@ -5,7 +5,7 @@ import n from "styled-components";
5
5
  import { Modal as h } from "./Modal.js";
6
6
  import { TitleMedium as m, BodyCaption as s, BodyPrimary as u } from "../TypographyStyle.js";
7
7
  import { COLORS as d } from "../../constants/Theme.js";
8
- import { Button as o } from "../button/Button.js";
8
+ import { Button as a } from "../button/Button.js";
9
9
  const f = n.div`
10
10
  display: flex;
11
11
  flex-direction: column;
@@ -50,7 +50,7 @@ const f = n.div`
50
50
  width: 100%;
51
51
  z-index: 1;
52
52
  box-shadow: ${(e) => e.showShadow ? "inset 0 -3px 6px rgba(0, 0, 0, 0.12)" : "none"};
53
- `, S = n(o)`
53
+ `, S = n(a)`
54
54
  margin-right: 8px;
55
55
  `, j = (e) => typeof window > "u" ? null : c.createPortal(
56
56
  /* @__PURE__ */ t(
@@ -78,9 +78,10 @@ const f = n.div`
78
78
  e.onBackPress && /* @__PURE__ */ t(
79
79
  "div",
80
80
  {
81
+ "data-test": (e["data-test"] || "") + "-back-button",
81
82
  style: { cursor: "pointer" },
82
- onClick: (a) => {
83
- e.onBackPress ? e.onBackPress() : a.stopPropagation();
83
+ onClick: (o) => {
84
+ e.onBackPress ? e.onBackPress() : o.stopPropagation();
84
85
  },
85
86
  children: /* @__PURE__ */ t(r, { width: 18, height: 18 })
86
87
  }
@@ -146,7 +147,7 @@ const f = n.div`
146
147
  (e.primaryButton || e.secondaryButton || e.footerLeftCustomElement) && /* @__PURE__ */ i(C, { style: e.footerContainerStyle, children: [
147
148
  e.footerLeftCustomElement && /* @__PURE__ */ t(w, { children: e.footerLeftCustomElement }),
148
149
  e.secondaryButton && /* @__PURE__ */ t(S, { ...e.secondaryButton }),
149
- e.primaryButton && /* @__PURE__ */ t(o, { ...e.primaryButton })
150
+ e.primaryButton && /* @__PURE__ */ t(a, { ...e.primaryButton })
150
151
  ] }),
151
152
  " "
152
153
  ] })
@@ -1 +1 @@
1
- {"version":3,"file":"styledModal.js","sources":["../../../../src/components/modals/styledModal.tsx"],"sourcesContent":["import BackIcon from '@src/assets/icons/arrow_back.svg';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { Modal } from '@src/components/modals/Modal';\nimport {\n\tBodyCaption,\n\tBodyPrimary,\n\tTitleMedium,\n} from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { ButtonProps } from '../button/model';\n\nconst ModalWrapper = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1;\n\talign-items: flex-start;\n\toverflow: hidden;\n\tmax-width: 100%;\n`;\nconst ModalHeader = styled.div<{\n\ttintedHeader: boolean;\n}>`\n\tpadding: 16px 24px;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: 12px;\n\tjustify-content: center;\n\tbackground-color: ${(props) =>\n\t\tprops.tintedHeader ? COLORS.background.warning.light : 'transparent'};\n\tborder-top-left-radius: ${(props) => (props.tintedHeader ? '4px' : 'none')};\n`;\n\nconst ModalTitles = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n`;\n\nconst ModalCustomisation = styled.div`\n\tdisplay: flex;\n\tmargin-left: auto;\n\tjustify-content: flex-end;\n\talign-items: center;\n`;\n\nconst ModalSubtitle = styled(BodyPrimary)`\n\tmargin-top: 4px;\n\tcolor: ${COLORS.content.secondary} !important;\n`;\n\nconst ModalFooter = styled.div`\n\tpadding: 16px 24px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: end;\n\tmargin-top: auto;\n\twidth: 100%;\n`;\n\nconst ModalFooterRightCustomisation = styled.div`\n\tmargin-right: auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\theight: calc(100% - 32px);\n`;\n\nconst ModalBody = styled.div<{\n\tshowShadow: boolean;\n}>`\n\twidth: 100%;\n\tz-index: 1;\n\tbox-shadow: ${(props) =>\n\t\tprops.showShadow ? 'inset 0 -3px 6px rgba(0, 0, 0, 0.12)' : 'none'};\n`;\nconst SecondaryButtonWrapper = styled(Button)`\n\tmargin-right: 8px;\n`;\nexport const StyledModal: React.FC<{\n\t'data-test'?: string;\n\topen: boolean;\n\tonClose?: () => void;\n\tchildren?: React.ReactNode;\n\tcentralContainerStyles?: React.CSSProperties;\n\tcloseOnOutsideClick?: boolean;\n\tcloseOnEscapeKey?: boolean;\n\theadingTitle?: string;\n\theadingSubtitle?: string;\n\ttintedHeader?: boolean;\n\tprimaryButton?: ButtonProps;\n\tsecondaryButton?: ButtonProps;\n\tfooterShadow?: boolean;\n\tfooterLeftCustomElement?: React.ReactNode;\n\theaderLeftCustomElement?: React.ReactNode;\n\theaderRightCustomElement?: React.ReactNode;\n\tzIndex?: number;\n\thideCrossButton?: boolean;\n\twidth?: string;\n\twrapperStyle?: React.CSSProperties;\n\tonBackPress?: () => void;\n\tfooterContainerStyle?: React.CSSProperties;\n\tid?: string;\n\tmodalHeaderStyles?: React.CSSProperties;\n\tinnerModalId?: string;\n\tisBeta?: boolean;\n\tmodalBodyStyles?: React.CSSProperties;\n\tskipModalWithTimer?: boolean;\n\ttimeOut?: number;\n}> = (props) => {\n\tif (typeof window === 'undefined') return null;\n\n\treturn ReactDOM.createPortal(\n\t\t<Modal\n\t\t\tdata-test={props['data-test']}\n\t\t\tid={props.id}\n\t\t\tzIndex={props.zIndex}\n\t\t\topen={props.open}\n\t\t\tonClose={props.onClose}\n\t\t\tcloseOnOutsideClick={props.closeOnOutsideClick}\n\t\t\tcloseOnEscapeKey={props.closeOnEscapeKey}\n\t\t\tcentralContainerStyles={props.centralContainerStyles}\n\t\t\thideCrossButton={props.hideCrossButton}\n\t\t\twidth={props.width}\n\t\t\tskipModalWithTimer={props.skipModalWithTimer}\n\t\t\ttimeOut={props.timeOut}\n\t\t>\n\t\t\t<ModalWrapper style={props.wrapperStyle ?? {}} id={props.innerModalId}>\n\t\t\t\t{(props.headingTitle ||\n\t\t\t\t\tprops.headingSubtitle ||\n\t\t\t\t\tprops.headerRightCustomElement) && (\n\t\t\t\t\t<ModalHeader\n\t\t\t\t\t\tstyle={props.modalHeaderStyles ?? {}}\n\t\t\t\t\t\ttintedHeader={props.tintedHeader ?? false}\n\t\t\t\t\t>\n\t\t\t\t\t\t{props.onBackPress && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{ cursor: 'pointer' }}\n\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\tprops.onBackPress ? props.onBackPress() : e.stopPropagation();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BackIcon width={18} height={18} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<div style={{ flex: 1 }}>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tgap: '8px',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ModalTitles>\n\t\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t\t{props.headingTitle && (\n\t\t\t\t\t\t\t\t\t\t<TitleMedium>{props.headingTitle}</TitleMedium>\n\t\t\t\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t\t\t</ModalTitles>\n\t\t\t\t\t\t\t\t{props.isBeta && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tpadding: '2px 8px',\n\t\t\t\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: '#1877f2',\n\t\t\t\t\t\t\t\t\t\t\theight: 'fit-content',\n\t\t\t\t\t\t\t\t\t\t\twidth: 'fit-content',\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<BodyCaption style={{ color: COLORS.surface.standard }}>\n\t\t\t\t\t\t\t\t\t\t\tBETA\n\t\t\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{props.headerLeftCustomElement}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ModalTitles>\n\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t{props.headingSubtitle && (\n\t\t\t\t\t\t\t\t\t<ModalSubtitle>{props.headingSubtitle}</ModalSubtitle>\n\t\t\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t\t</ModalTitles>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{props.headerRightCustomElement && (\n\t\t\t\t\t\t\t<ModalCustomisation>\n\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t{props.headerRightCustomElement}{' '}\n\t\t\t\t\t\t\t</ModalCustomisation>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t</ModalHeader>\n\t\t\t\t)}\n\t\t\t\t{props.children && (\n\t\t\t\t\t<ModalBody\n\t\t\t\t\t\tstyle={props.modalBodyStyles ?? {}}\n\t\t\t\t\t\tshowShadow={props.footerShadow ?? false}\n\t\t\t\t\t>\n\t\t\t\t\t\t{props.children}{' '}\n\t\t\t\t\t</ModalBody>\n\t\t\t\t)}\n\t\t\t\t{(props.primaryButton ||\n\t\t\t\t\tprops.secondaryButton ||\n\t\t\t\t\tprops.footerLeftCustomElement) && (\n\t\t\t\t\t<ModalFooter style={props.footerContainerStyle}>\n\t\t\t\t\t\t{props.footerLeftCustomElement && (\n\t\t\t\t\t\t\t<ModalFooterRightCustomisation>\n\t\t\t\t\t\t\t\t{props.footerLeftCustomElement}\n\t\t\t\t\t\t\t</ModalFooterRightCustomisation>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{props.secondaryButton && (\n\t\t\t\t\t\t\t<SecondaryButtonWrapper {...props.secondaryButton} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{props.primaryButton && <Button {...props.primaryButton} />}\n\t\t\t\t\t</ModalFooter>\n\t\t\t\t)}{' '}\n\t\t\t</ModalWrapper>\n\t\t</Modal>,\n\t\tdocument.body,\n\t);\n};\n"],"names":["ModalWrapper","styled","ModalHeader","props","COLORS","ModalTitles","ModalCustomisation","ModalSubtitle","BodyPrimary","ModalFooter","ModalFooterRightCustomisation","ModalBody","SecondaryButtonWrapper","Button","StyledModal","ReactDOM","jsx","Modal","jsxs","e","BackIcon","TitleMedium","BodyCaption"],"mappings":";;;;;;;;AAc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,kBACAF,EAAM,mBACN,gBAAAa,EAACT,GAAA,EAAe,YAAM,iBAAgB;AAAA,kBACpC;AAAA,gBAAA,EAAA,CACJ;AAAA,cAAA,GACD;AAAA,cACCJ,EAAM,4BACN,gBAAAe,EAACZ,GAAA,EACC,UAAA;AAAA,gBAAA;AAAA,gBACAH,EAAM;AAAA,gBAA0B;AAAA,cAAA,GAClC;AAAA,cACE;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJA,EAAM,YACN,gBAAAe;AAAA,UAACP;AAAA,UAAA;AAAA,YACA,OAAOR,EAAM,mBAAmB,CAAA;AAAA,YAChC,YAAYA,EAAM,gBAAgB;AAAA,YAEjC,UAAA;AAAA,cAAAA,EAAM;AAAA,cAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,SAGjBA,EAAM,iBACPA,EAAM,mBACNA,EAAM,4BACN,gBAAAe,EAACT,GAAA,EAAY,OAAON,EAAM,sBACxB,UAAA;AAAA,UAAAA,EAAM,2BACN,gBAAAa,EAACN,GAAA,EACC,UAAAP,EAAM,yBACR;AAAA,UAEAA,EAAM,mBACN,gBAAAa,EAACJ,GAAA,EAAwB,GAAGT,EAAM,iBAAiB;AAAA,UAEnDA,EAAM,iBAAiB,gBAAAa,EAACH,GAAA,EAAQ,GAAGV,EAAM,cAAA,CAAe;AAAA,QAAA,GAC1D;AAAA,QACE;AAAA,MAAA,EAAA,CACJ;AAAA,IAAA;AAAA,EAAA;AAAA,EAED,SAAS;AAAA;"}
1
+ {"version":3,"file":"styledModal.js","sources":["../../../../src/components/modals/styledModal.tsx"],"sourcesContent":["import BackIcon from '@src/assets/icons/arrow_back.svg';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { Modal } from '@src/components/modals/Modal';\nimport {\n\tBodyCaption,\n\tBodyPrimary,\n\tTitleMedium,\n} from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport { ButtonProps } from '../button/model';\n\nconst ModalWrapper = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex: 1;\n\talign-items: flex-start;\n\toverflow: hidden;\n\tmax-width: 100%;\n`;\nconst ModalHeader = styled.div<{\n\ttintedHeader: boolean;\n}>`\n\tpadding: 16px 24px;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: 12px;\n\tjustify-content: center;\n\tbackground-color: ${(props) =>\n\t\tprops.tintedHeader ? COLORS.background.warning.light : 'transparent'};\n\tborder-top-left-radius: ${(props) => (props.tintedHeader ? '4px' : 'none')};\n`;\n\nconst ModalTitles = styled.div`\n\tdisplay: flex;\n\tflex-direction: column;\n`;\n\nconst ModalCustomisation = styled.div`\n\tdisplay: flex;\n\tmargin-left: auto;\n\tjustify-content: flex-end;\n\talign-items: center;\n`;\n\nconst ModalSubtitle = styled(BodyPrimary)`\n\tmargin-top: 4px;\n\tcolor: ${COLORS.content.secondary} !important;\n`;\n\nconst ModalFooter = styled.div`\n\tpadding: 16px 24px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: end;\n\tmargin-top: auto;\n\twidth: 100%;\n`;\n\nconst ModalFooterRightCustomisation = styled.div`\n\tmargin-right: auto;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n\theight: calc(100% - 32px);\n`;\n\nconst ModalBody = styled.div<{\n\tshowShadow: boolean;\n}>`\n\twidth: 100%;\n\tz-index: 1;\n\tbox-shadow: ${(props) =>\n\t\tprops.showShadow ? 'inset 0 -3px 6px rgba(0, 0, 0, 0.12)' : 'none'};\n`;\nconst SecondaryButtonWrapper = styled(Button)`\n\tmargin-right: 8px;\n`;\nexport const StyledModal: React.FC<{\n\t'data-test'?: string;\n\topen: boolean;\n\tonClose?: () => void;\n\tchildren?: React.ReactNode;\n\tcentralContainerStyles?: React.CSSProperties;\n\tcloseOnOutsideClick?: boolean;\n\tcloseOnEscapeKey?: boolean;\n\theadingTitle?: string;\n\theadingSubtitle?: string;\n\ttintedHeader?: boolean;\n\tprimaryButton?: ButtonProps;\n\tsecondaryButton?: ButtonProps;\n\tfooterShadow?: boolean;\n\tfooterLeftCustomElement?: React.ReactNode;\n\theaderLeftCustomElement?: React.ReactNode;\n\theaderRightCustomElement?: React.ReactNode;\n\tzIndex?: number;\n\thideCrossButton?: boolean;\n\twidth?: string;\n\twrapperStyle?: React.CSSProperties;\n\tonBackPress?: () => void;\n\tfooterContainerStyle?: React.CSSProperties;\n\tid?: string;\n\tmodalHeaderStyles?: React.CSSProperties;\n\tinnerModalId?: string;\n\tisBeta?: boolean;\n\tmodalBodyStyles?: React.CSSProperties;\n\tskipModalWithTimer?: boolean;\n\ttimeOut?: number;\n}> = (props) => {\n\tif (typeof window === 'undefined') return null;\n\n\treturn ReactDOM.createPortal(\n\t\t<Modal\n\t\t\tdata-test={props['data-test']}\n\t\t\tid={props.id}\n\t\t\tzIndex={props.zIndex}\n\t\t\topen={props.open}\n\t\t\tonClose={props.onClose}\n\t\t\tcloseOnOutsideClick={props.closeOnOutsideClick}\n\t\t\tcloseOnEscapeKey={props.closeOnEscapeKey}\n\t\t\tcentralContainerStyles={props.centralContainerStyles}\n\t\t\thideCrossButton={props.hideCrossButton}\n\t\t\twidth={props.width}\n\t\t\tskipModalWithTimer={props.skipModalWithTimer}\n\t\t\ttimeOut={props.timeOut}\n\t\t>\n\t\t\t<ModalWrapper style={props.wrapperStyle ?? {}} id={props.innerModalId}>\n\t\t\t\t{(props.headingTitle ||\n\t\t\t\t\tprops.headingSubtitle ||\n\t\t\t\t\tprops.headerRightCustomElement) && (\n\t\t\t\t\t<ModalHeader\n\t\t\t\t\t\tstyle={props.modalHeaderStyles ?? {}}\n\t\t\t\t\t\ttintedHeader={props.tintedHeader ?? false}\n\t\t\t\t\t>\n\t\t\t\t\t\t{props.onBackPress && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tdata-test={(props['data-test'] || '') + '-back-button'}\n\t\t\t\t\t\t\t\tstyle={{ cursor: 'pointer' }}\n\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\tprops.onBackPress ? props.onBackPress() : e.stopPropagation();\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BackIcon width={18} height={18} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<div style={{ flex: 1 }}>\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\tdisplay: 'flex',\n\t\t\t\t\t\t\t\t\tgap: '8px',\n\t\t\t\t\t\t\t\t\talignItems: 'center',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ModalTitles>\n\t\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t\t{props.headingTitle && (\n\t\t\t\t\t\t\t\t\t\t<TitleMedium>{props.headingTitle}</TitleMedium>\n\t\t\t\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t\t\t</ModalTitles>\n\t\t\t\t\t\t\t\t{props.isBeta && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tpadding: '2px 8px',\n\t\t\t\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: '#1877f2',\n\t\t\t\t\t\t\t\t\t\t\theight: 'fit-content',\n\t\t\t\t\t\t\t\t\t\t\twidth: 'fit-content',\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<BodyCaption style={{ color: COLORS.surface.standard }}>\n\t\t\t\t\t\t\t\t\t\t\tBETA\n\t\t\t\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t{props.headerLeftCustomElement}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<ModalTitles>\n\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t{props.headingSubtitle && (\n\t\t\t\t\t\t\t\t\t<ModalSubtitle>{props.headingSubtitle}</ModalSubtitle>\n\t\t\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t\t\t</ModalTitles>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{props.headerRightCustomElement && (\n\t\t\t\t\t\t\t<ModalCustomisation>\n\t\t\t\t\t\t\t\t{' '}\n\t\t\t\t\t\t\t\t{props.headerRightCustomElement}{' '}\n\t\t\t\t\t\t\t</ModalCustomisation>\n\t\t\t\t\t\t)}{' '}\n\t\t\t\t\t</ModalHeader>\n\t\t\t\t)}\n\t\t\t\t{props.children && (\n\t\t\t\t\t<ModalBody\n\t\t\t\t\t\tstyle={props.modalBodyStyles ?? {}}\n\t\t\t\t\t\tshowShadow={props.footerShadow ?? false}\n\t\t\t\t\t>\n\t\t\t\t\t\t{props.children}{' '}\n\t\t\t\t\t</ModalBody>\n\t\t\t\t)}\n\t\t\t\t{(props.primaryButton ||\n\t\t\t\t\tprops.secondaryButton ||\n\t\t\t\t\tprops.footerLeftCustomElement) && (\n\t\t\t\t\t<ModalFooter style={props.footerContainerStyle}>\n\t\t\t\t\t\t{props.footerLeftCustomElement && (\n\t\t\t\t\t\t\t<ModalFooterRightCustomisation>\n\t\t\t\t\t\t\t\t{props.footerLeftCustomElement}\n\t\t\t\t\t\t\t</ModalFooterRightCustomisation>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{props.secondaryButton && (\n\t\t\t\t\t\t\t<SecondaryButtonWrapper {...props.secondaryButton} />\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{props.primaryButton && <Button {...props.primaryButton} />}\n\t\t\t\t\t</ModalFooter>\n\t\t\t\t)}{' '}\n\t\t\t</ModalWrapper>\n\t\t</Modal>,\n\t\tdocument.body,\n\t);\n};\n"],"names":["ModalWrapper","styled","ModalHeader","props","COLORS","ModalTitles","ModalCustomisation","ModalSubtitle","BodyPrimary","ModalFooter","ModalFooterRightCustomisation","ModalBody","SecondaryButtonWrapper","Button","StyledModal","ReactDOM","jsx","Modal","jsxs","e","BackIcon","TitleMedium","BodyCaption"],"mappings":";;;;;;;;AAcA,MAAMA,IAAeC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQtBC,IAAcD,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBASN,CAACE,MACpBA,EAAM,eAAeC,EAAO,WAAW,QAAQ,QAAQ,aAAa;AAAA,2BAC3C,CAACD,MAAWA,EAAM,eAAe,QAAQ,MAAO;AAAA,GAGrEE,IAAcJ,EAAO;AAAA;AAAA;AAAA,GAKrBK,IAAqBL,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAO5BM,IAAgBN,EAAOO,CAAW;AAAA;AAAA,UAE9BJ,EAAO,QAAQ,SAAS;AAAA,GAG5BK,IAAcR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASrBS,IAAgCT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQvCU,IAAYV,EAAO;AAAA;AAAA;AAAA,eAKV,CAACE,MACdA,EAAM,aAAa,yCAAyC,MAAM;AAAA,GAE9DS,IAAyBX,EAAOY,CAAM;AAAA;AAAA,GAG/BC,IA8BR,CAACX,MACD,OAAO,SAAW,MAAoB,OAEnCY,EAAS;AAAA,EACf,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACA,aAAWd,EAAM,WAAW;AAAA,MAC5B,IAAIA,EAAM;AAAA,MACV,QAAQA,EAAM;AAAA,MACd,MAAMA,EAAM;AAAA,MACZ,SAASA,EAAM;AAAA,MACf,qBAAqBA,EAAM;AAAA,MAC3B,kBAAkBA,EAAM;AAAA,MACxB,wBAAwBA,EAAM;AAAA,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 @@
1
1
  import { jsx as o, Fragment as h, jsxs as n } from "react/jsx-runtime";
2
2
  import { forwardRef as g } from "react";
3
- import { BodySecondary as e, ButtonRegular as p } from "../TypographyStyle.js";
3
+ import { BodySecondary as a, ButtonRegular as p } from "../TypographyStyle.js";
4
4
  import { COLORS as i } from "../../constants/Theme.js";
5
5
  import { Pagination as t } from "./Pagination.styled.js";
6
6
  const y = g(
7
7
  ({
8
- id: a,
9
- onShowMore: c,
8
+ id: c,
9
+ onShowMore: e,
10
10
  isLoading: d,
11
11
  numberOfItemsLoaded: l,
12
12
  totalNumberOfItems: r,
13
13
  ...s
14
- }) => /* @__PURE__ */ o(t, { id: a, ...s, children: d ? (
14
+ }) => /* @__PURE__ */ o(t, { id: c, "data-testid": c, ...s, children: d ? (
15
15
  //TODO: @chinmayee replace with Spinner once done
16
16
  /* @__PURE__ */ o(h, { children: "loading..." })
17
17
  ) : /* @__PURE__ */ o("div", { children: l < r ? /* @__PURE__ */ n(t, { children: [
18
- /* @__PURE__ */ n(e, { style: { color: i.content.secondary }, children: [
18
+ /* @__PURE__ */ n(a, { style: { color: i.content.secondary }, children: [
19
19
  "Showing ",
20
20
  l,
21
21
  " out of ",
@@ -27,11 +27,11 @@ const y = g(
27
27
  p,
28
28
  {
29
29
  style: { color: i.content.brand, cursor: "pointer" },
30
- onClick: () => c && c(),
30
+ onClick: () => e && e(),
31
31
  children: "Show more"
32
32
  }
33
33
  )
34
- ] }) : /* @__PURE__ */ o(t, { children: /* @__PURE__ */ n(e, { style: { color: i.content.secondary }, children: [
34
+ ] }) : /* @__PURE__ */ o(t, { children: /* @__PURE__ */ n(a, { style: { color: i.content.secondary }, children: [
35
35
  "Showing all ",
36
36
  r,
37
37
  " results"
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sources":["../../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { BodySecondary, ButtonRegular } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport * as Sc from './Pagination.styled';\n\nexport interface PaginationProps extends React.HTMLAttributes<HTMLDivElement> {\n\tnumberOfItemsLoaded: number;\n\ttotalNumberOfItems: number;\n\tisLoading?: boolean;\n\tonShowMore?: () => void;\n\twidth?: string;\n}\n\nexport const Pagination = forwardRef<HTMLButtonElement, PaginationProps>(\n\t({\n\t\tid,\n\t\tonShowMore,\n\t\tisLoading,\n\t\tnumberOfItemsLoaded,\n\t\ttotalNumberOfItems,\n\t\t...rest\n\t}) => {\n\t\treturn (\n\t\t\t<Sc.Pagination id={id} {...rest}>\n\t\t\t\t{isLoading ? (\n\t\t\t\t\t//TODO: @chinmayee replace with Spinner once done\n\t\t\t\t\t<>loading...</>\n\t\t\t\t) : (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{numberOfItemsLoaded < totalNumberOfItems ? (\n\t\t\t\t\t\t\t<Sc.Pagination>\n\t\t\t\t\t\t\t\t<BodySecondary style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t\t\t\t\tShowing {numberOfItemsLoaded} out of {totalNumberOfItems}{' '}\n\t\t\t\t\t\t\t\t\tresults\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t<ButtonRegular\n\t\t\t\t\t\t\t\t\tstyle={{ color: COLORS.content.brand, cursor: 'pointer' }}\n\t\t\t\t\t\t\t\t\tonClick={() => onShowMore && onShowMore()}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tShow more\n\t\t\t\t\t\t\t\t</ButtonRegular>\n\t\t\t\t\t\t\t</Sc.Pagination>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Sc.Pagination>\n\t\t\t\t\t\t\t\t<BodySecondary style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t\t\t\t\tShowing all {totalNumberOfItems} results\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t</Sc.Pagination>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Sc.Pagination>\n\t\t);\n\t},\n);\n\nPagination.displayName = 'Pagination';\n"],"names":["Pagination","forwardRef","id","onShowMore","isLoading","numberOfItemsLoaded","totalNumberOfItems","rest","Sc.Pagination","jsxs","BodySecondary","COLORS","jsx","ButtonRegular"],"mappings":";;;;;AAaO,MAAMA,IAAaC;AAAA,EACzB,CAAC;AAAA,IACA,IAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,wBAGDC,GAAA,EAAc,IAAAN,GAAS,GAAGK,GACzB,UAAAH;AAAA;AAAA,2BAEE,UAAA,aAAA,CAAU;AAAA,wBAEX,OAAA,EACC,UAAAC,IAAsBC,IACtB,gBAAAG,EAACD,GAAA,EACA,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAc,OAAO,EAAE,OAAOC,EAAO,QAAQ,aAAa,UAAA;AAAA,MAAA;AAAA,MACjDN;AAAA,MAAoB;AAAA,MAASC;AAAA,MAAoB;AAAA,MAAI;AAAA,IAAA,GAE/D;AAAA,IACA,gBAAAM;AAAA,MAACC;AAAA,MAAA;AAAA,QACA,OAAO,EAAE,OAAOF,EAAO,QAAQ,OAAO,QAAQ,UAAA;AAAA,QAC9C,SAAS,MAAMR,KAAcA,EAAA;AAAA,QAC7B,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED,EAAA,CACD,IAEA,gBAAAS,EAACJ,GAAA,EACA,UAAA,gBAAAC,EAACC,GAAA,EAAc,OAAO,EAAE,OAAOC,EAAO,QAAQ,aAAa,UAAA;AAAA,IAAA;AAAA,IAC7CL;AAAA,IAAmB;AAAA,EAAA,GACjC,EAAA,CACD,GAEF,GAEF;AAGH;AAEAN,EAAW,cAAc;"}
1
+ {"version":3,"file":"Pagination.js","sources":["../../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { BodySecondary, ButtonRegular } from '@src/components/TypographyStyle';\nimport { COLORS } from '@src/constants/Theme';\nimport * as Sc from './Pagination.styled';\n\nexport interface PaginationProps extends React.HTMLAttributes<HTMLDivElement> {\n\tnumberOfItemsLoaded: number;\n\ttotalNumberOfItems: number;\n\tisLoading?: boolean;\n\tonShowMore?: () => void;\n\twidth?: string;\n}\n\nexport const Pagination = forwardRef<HTMLButtonElement, PaginationProps>(\n\t({\n\t\tid,\n\t\tonShowMore,\n\t\tisLoading,\n\t\tnumberOfItemsLoaded,\n\t\ttotalNumberOfItems,\n\t\t...rest\n\t}) => {\n\t\treturn (\n\t\t\t<Sc.Pagination id={id} data-testid={id} {...rest}>\n\t\t\t\t{isLoading ? (\n\t\t\t\t\t//TODO: @chinmayee replace with Spinner once done\n\t\t\t\t\t<>loading...</>\n\t\t\t\t) : (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{numberOfItemsLoaded < totalNumberOfItems ? (\n\t\t\t\t\t\t\t<Sc.Pagination>\n\t\t\t\t\t\t\t\t<BodySecondary style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t\t\t\t\tShowing {numberOfItemsLoaded} out of {totalNumberOfItems}{' '}\n\t\t\t\t\t\t\t\t\tresults\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t\t<ButtonRegular\n\t\t\t\t\t\t\t\t\tstyle={{ color: COLORS.content.brand, cursor: 'pointer' }}\n\t\t\t\t\t\t\t\t\tonClick={() => onShowMore && onShowMore()}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tShow more\n\t\t\t\t\t\t\t\t</ButtonRegular>\n\t\t\t\t\t\t\t</Sc.Pagination>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<Sc.Pagination>\n\t\t\t\t\t\t\t\t<BodySecondary style={{ color: COLORS.content.secondary }}>\n\t\t\t\t\t\t\t\t\tShowing all {totalNumberOfItems} results\n\t\t\t\t\t\t\t\t</BodySecondary>\n\t\t\t\t\t\t\t</Sc.Pagination>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</Sc.Pagination>\n\t\t);\n\t},\n);\n\nPagination.displayName = 'Pagination';\n"],"names":["Pagination","forwardRef","id","onShowMore","isLoading","numberOfItemsLoaded","totalNumberOfItems","rest","jsx","Sc.Pagination","jsxs","BodySecondary","COLORS","ButtonRegular"],"mappings":";;;;;AAaO,MAAMA,IAAaC;AAAA,EACzB,CAAC;AAAA,IACA,IAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MAGF,gBAAAC,EAACC,GAAA,EAAc,IAAAP,GAAQ,eAAaA,GAAK,GAAGK,GAC1C,UAAAH;AAAA;AAAA,2BAEE,UAAA,aAAA,CAAU;AAAA,wBAEX,OAAA,EACC,UAAAC,IAAsBC,IACtB,gBAAAI,EAACD,GAAA,EACA,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAc,OAAO,EAAE,OAAOC,EAAO,QAAQ,aAAa,UAAA;AAAA,MAAA;AAAA,MACjDP;AAAA,MAAoB;AAAA,MAASC;AAAA,MAAoB;AAAA,MAAI;AAAA,IAAA,GAE/D;AAAA,IACA,gBAAAE;AAAA,MAACK;AAAA,MAAA;AAAA,QACA,OAAO,EAAE,OAAOD,EAAO,QAAQ,OAAO,QAAQ,UAAA;AAAA,QAC9C,SAAS,MAAMT,KAAcA,EAAA;AAAA,QAC7B,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED,EAAA,CACD,IAEA,gBAAAK,EAACC,GAAA,EACA,UAAA,gBAAAC,EAACC,GAAA,EAAc,OAAO,EAAE,OAAOC,EAAO,QAAQ,aAAa,UAAA;AAAA,IAAA;AAAA,IAC7CN;AAAA,IAAmB;AAAA,EAAA,GACjC,EAAA,CACD,GAEF,GAEF;AAGH;AAEAN,EAAW,cAAc;"}
@@ -1,54 +1,65 @@
1
- import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
- import k from "../../assets/icons/checklistIcon.svg.js";
3
- const p = ({ percentage: s, width: r = 200, containerStyle: f }) => {
4
- const l = s < 0 ? 0 : s > 100 ? 100 : s, e = r / 2 - r / 10, t = e * Math.PI * 2, i = t - t * l / 100, n = r / 10, c = r / 3;
5
- return /* @__PURE__ */ o("div", { style: f, children: /* @__PURE__ */ a("svg", { width: r, height: r, viewBox: `0 0 ${r} ${r}`, children: [
6
- /* @__PURE__ */ o("defs", { children: /* @__PURE__ */ a("linearGradient", { id: "gradientStroke", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
7
- /* @__PURE__ */ o("stop", { offset: "0%", stopColor: "#7000FF" }),
8
- /* @__PURE__ */ o("stop", { offset: "100%", stopColor: "#AD00FF" })
9
- ] }) }),
10
- /* @__PURE__ */ o(
11
- "circle",
12
- {
13
- cx: r / 2,
14
- cy: r / 2,
15
- strokeWidth: n,
16
- r: e,
17
- strokeOpacity: 0.8,
18
- fill: "none",
19
- style: {
20
- stroke: "#ffffff"
21
- }
22
- }
23
- ),
24
- /* @__PURE__ */ o(
25
- "circle",
26
- {
27
- cx: r / 2,
28
- cy: r / 2,
29
- strokeWidth: n,
30
- r: e,
31
- style: {
32
- stroke: "url(#gradientStroke)",
33
- strokeDasharray: t,
34
- strokeDashoffset: i
35
- },
36
- transform: `rotate(-90 ${r / 2} ${r / 2})`,
37
- fill: "none",
38
- strokeLinecap: "round",
39
- strokeLinejoin: "round"
40
- }
41
- ),
42
- /* @__PURE__ */ o(
43
- k,
44
- {
45
- x: r / 2 - c / 2,
46
- width: c
47
- }
48
- )
49
- ] }) });
1
+ import { jsx as s, jsxs as n } from "react/jsx-runtime";
2
+ import d from "../../assets/icons/checklistIcon.svg.js";
3
+ const u = ({ percentage: e, width: r = 200, containerStyle: l }) => {
4
+ const i = e < 0 ? 0 : e > 100 ? 100 : e, o = r / 2 - r / 10, t = o * Math.PI * 2, f = t - t * i / 100, a = r / 10, c = r / 3;
5
+ return /* @__PURE__ */ s("div", { style: l, "data-testid": "circular-progress-container", children: /* @__PURE__ */ n(
6
+ "svg",
7
+ {
8
+ width: r,
9
+ height: r,
10
+ viewBox: `0 0 ${r} ${r}`,
11
+ "data-testid": "circular-progress-svg",
12
+ children: [
13
+ /* @__PURE__ */ s("defs", { children: /* @__PURE__ */ n("linearGradient", { id: "gradientStroke", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
14
+ /* @__PURE__ */ s("stop", { offset: "0%", stopColor: "#7000FF" }),
15
+ /* @__PURE__ */ s("stop", { offset: "100%", stopColor: "#AD00FF" })
16
+ ] }) }),
17
+ /* @__PURE__ */ s(
18
+ "circle",
19
+ {
20
+ cx: r / 2,
21
+ cy: r / 2,
22
+ strokeWidth: a,
23
+ r: o,
24
+ strokeOpacity: 0.8,
25
+ fill: "none",
26
+ style: {
27
+ stroke: "#ffffff"
28
+ },
29
+ "data-testid": "circular-progress-track"
30
+ }
31
+ ),
32
+ /* @__PURE__ */ s(
33
+ "circle",
34
+ {
35
+ cx: r / 2,
36
+ cy: r / 2,
37
+ strokeWidth: a,
38
+ r: o,
39
+ style: {
40
+ stroke: "url(#gradientStroke)",
41
+ strokeDasharray: t,
42
+ strokeDashoffset: f
43
+ },
44
+ transform: `rotate(-90 ${r / 2} ${r / 2})`,
45
+ fill: "none",
46
+ strokeLinecap: "round",
47
+ strokeLinejoin: "round",
48
+ "data-testid": "circular-progress-fill"
49
+ }
50
+ ),
51
+ /* @__PURE__ */ s(
52
+ d,
53
+ {
54
+ x: r / 2 - c / 2,
55
+ width: c
56
+ }
57
+ )
58
+ ]
59
+ }
60
+ ) });
50
61
  };
51
62
  export {
52
- p as default
63
+ u as default
53
64
  };
54
65
  //# sourceMappingURL=CircularProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CircularProgressBar.js","sources":["../../../../src/components/progress-bar/CircularProgressBar.tsx"],"sourcesContent":["import CheckListIcon from '@src/assets/icons/checklistIcon.svg';\nimport React from 'react';\n\n//TODO: Make Inner icon dynamic and support text option also\nconst CircularProgressBar: React.FC<{\n\tpercentage: number;\n\twidth?: number;\n\tcontainerStyle?: React.CSSProperties;\n}> = ({ percentage, width = 200, containerStyle }) => {\n\tconst cleanedPercentage =\n\t\tpercentage < 0 ? 0 : percentage > 100 ? 100 : percentage;\n\tconst radius = width / 2 - width / 10;\n\tconst dashArray = radius * Math.PI * 2;\n\tconst dashOffset = dashArray - (dashArray * cleanedPercentage) / 100;\n\tconst strokeWidth = width / 10;\n\tconst innerIconWidth = width / 3;\n\treturn (\n\t\t<div style={containerStyle}>\n\t\t\t<svg width={width} height={width} viewBox={`0 0 ${width} ${width}`}>\n\t\t\t\t<defs>\n\t\t\t\t\t<linearGradient id=\"gradientStroke\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n\t\t\t\t\t\t<stop offset=\"0%\" stopColor=\"#7000FF\" />\n\t\t\t\t\t\t<stop offset=\"100%\" stopColor=\"#AD00FF\" />\n\t\t\t\t\t</linearGradient>\n\t\t\t\t</defs>\n\t\t\t\t<circle\n\t\t\t\t\tcx={width / 2}\n\t\t\t\t\tcy={width / 2}\n\t\t\t\t\tstrokeWidth={strokeWidth}\n\t\t\t\t\tr={radius}\n\t\t\t\t\tstrokeOpacity={0.8}\n\t\t\t\t\tfill={'none'}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tstroke: '#ffffff',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<circle\n\t\t\t\t\tcx={width / 2}\n\t\t\t\t\tcy={width / 2}\n\t\t\t\t\tstrokeWidth={strokeWidth}\n\t\t\t\t\tr={radius}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tstroke: 'url(#gradientStroke)',\n\t\t\t\t\t\tstrokeDasharray: dashArray,\n\t\t\t\t\t\tstrokeDashoffset: dashOffset,\n\t\t\t\t\t}}\n\t\t\t\t\ttransform={`rotate(-90 ${width / 2} ${width / 2})`}\n\t\t\t\t\tfill={'none'}\n\t\t\t\t\tstrokeLinecap={'round'}\n\t\t\t\t\tstrokeLinejoin={'round'}\n\t\t\t\t/>\n\t\t\t\t<CheckListIcon\n\t\t\t\t\tx={width / 2 - innerIconWidth / 2}\n\t\t\t\t\twidth={innerIconWidth}\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</div>\n\t);\n};\n\nexport default CircularProgressBar;\n"],"names":["CircularProgressBar","percentage","width","containerStyle","cleanedPercentage","radius","dashArray","dashOffset","strokeWidth","innerIconWidth","jsx","jsxs","CheckListIcon"],"mappings":";;AAIA,MAAMA,IAID,CAAC,EAAE,YAAAC,GAAY,OAAAC,IAAQ,KAAK,gBAAAC,QAAqB;AACrD,QAAMC,IACLH,IAAa,IAAI,IAAIA,IAAa,MAAM,MAAMA,GACzCI,IAASH,IAAQ,IAAIA,IAAQ,IAC7BI,IAAYD,IAAS,KAAK,KAAK,GAC/BE,IAAaD,IAAaA,IAAYF,IAAqB,KAC3DI,IAAcN,IAAQ,IACtBO,IAAiBP,IAAQ;AAC/B,SACC,gBAAAQ,EAAC,OAAA,EAAI,OAAOP,GACX,4BAAC,OAAA,EAAI,OAAAD,GAAc,QAAQA,GAAO,SAAS,OAAOA,CAAK,IAAIA,CAAK,IAC/D,UAAA;AAAA,IAAA,gBAAAQ,EAAC,QAAA,EACA,UAAA,gBAAAC,EAAC,kBAAA,EAAe,IAAG,kBAAiB,IAAG,MAAK,IAAG,MAAK,IAAG,QAAO,IAAG,MAChE,UAAA;AAAA,MAAA,gBAAAD,EAAC,QAAA,EAAK,QAAO,MAAK,WAAU,WAAU;AAAA,MACtC,gBAAAA,EAAC,QAAA,EAAK,QAAO,QAAO,WAAU,UAAA,CAAU;AAAA,IAAA,EAAA,CACzC,EAAA,CACD;AAAA,IACA,gBAAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,IAAIR,IAAQ;AAAA,QACZ,IAAIA,IAAQ;AAAA,QACZ,aAAAM;AAAA,QACA,GAAGH;AAAA,QACH,eAAe;AAAA,QACf,MAAM;AAAA,QACN,OAAO;AAAA,UACN,QAAQ;AAAA,QAAA;AAAA,MACT;AAAA,IAAA;AAAA,IAED,gBAAAK;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,IAAIR,IAAQ;AAAA,QACZ,IAAIA,IAAQ;AAAA,QACZ,aAAAM;AAAA,QACA,GAAGH;AAAA,QACH,OAAO;AAAA,UACN,QAAQ;AAAA,UACR,iBAAiBC;AAAA,UACjB,kBAAkBC;AAAA,QAAA;AAAA,QAEnB,WAAW,cAAcL,IAAQ,CAAC,IAAIA,IAAQ,CAAC;AAAA,QAC/C,MAAM;AAAA,QACN,eAAe;AAAA,QACf,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEjB,gBAAAQ;AAAA,MAACE;AAAAA,MAAA;AAAA,QACA,GAAGV,IAAQ,IAAIO,IAAiB;AAAA,QAChC,OAAOA;AAAA,MAAA;AAAA,IAAA;AAAA,EACR,EAAA,CACD,EAAA,CACD;AAEF;"}
1
+ {"version":3,"file":"CircularProgressBar.js","sources":["../../../../src/components/progress-bar/CircularProgressBar.tsx"],"sourcesContent":["import CheckListIcon from '@src/assets/icons/checklistIcon.svg';\nimport React from 'react';\n\n//TODO: Make Inner icon dynamic and support text option also\nconst CircularProgressBar: React.FC<{\n\tpercentage: number;\n\twidth?: number;\n\tcontainerStyle?: React.CSSProperties;\n}> = ({ percentage, width = 200, containerStyle }) => {\n\tconst cleanedPercentage =\n\t\tpercentage < 0 ? 0 : percentage > 100 ? 100 : percentage;\n\tconst radius = width / 2 - width / 10;\n\tconst dashArray = radius * Math.PI * 2;\n\tconst dashOffset = dashArray - (dashArray * cleanedPercentage) / 100;\n\tconst strokeWidth = width / 10;\n\tconst innerIconWidth = width / 3;\n\treturn (\n\t\t<div style={containerStyle} data-testid=\"circular-progress-container\">\n\t\t\t<svg\n\t\t\t\twidth={width}\n\t\t\t\theight={width}\n\t\t\t\tviewBox={`0 0 ${width} ${width}`}\n\t\t\t\tdata-testid=\"circular-progress-svg\"\n\t\t\t>\n\t\t\t\t<defs>\n\t\t\t\t\t<linearGradient id=\"gradientStroke\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n\t\t\t\t\t\t<stop offset=\"0%\" stopColor=\"#7000FF\" />\n\t\t\t\t\t\t<stop offset=\"100%\" stopColor=\"#AD00FF\" />\n\t\t\t\t\t</linearGradient>\n\t\t\t\t</defs>\n\t\t\t\t<circle\n\t\t\t\t\tcx={width / 2}\n\t\t\t\t\tcy={width / 2}\n\t\t\t\t\tstrokeWidth={strokeWidth}\n\t\t\t\t\tr={radius}\n\t\t\t\t\tstrokeOpacity={0.8}\n\t\t\t\t\tfill={'none'}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tstroke: '#ffffff',\n\t\t\t\t\t}}\n\t\t\t\t\tdata-testid=\"circular-progress-track\"\n\t\t\t\t/>\n\t\t\t\t<circle\n\t\t\t\t\tcx={width / 2}\n\t\t\t\t\tcy={width / 2}\n\t\t\t\t\tstrokeWidth={strokeWidth}\n\t\t\t\t\tr={radius}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tstroke: 'url(#gradientStroke)',\n\t\t\t\t\t\tstrokeDasharray: dashArray,\n\t\t\t\t\t\tstrokeDashoffset: dashOffset,\n\t\t\t\t\t}}\n\t\t\t\t\ttransform={`rotate(-90 ${width / 2} ${width / 2})`}\n\t\t\t\t\tfill={'none'}\n\t\t\t\t\tstrokeLinecap={'round'}\n\t\t\t\t\tstrokeLinejoin={'round'}\n\t\t\t\t\tdata-testid=\"circular-progress-fill\"\n\t\t\t\t/>\n\t\t\t\t<CheckListIcon\n\t\t\t\t\tx={width / 2 - innerIconWidth / 2}\n\t\t\t\t\twidth={innerIconWidth}\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t</div>\n\t);\n};\n\nexport default CircularProgressBar;\n"],"names":["CircularProgressBar","percentage","width","containerStyle","cleanedPercentage","radius","dashArray","dashOffset","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AAAM;AAAA,YACA,GAAGH;AAAA,YACH,OAAO;AAAA,cACN,QAAQ;AAAA,cACR,iBAAiBC;AAAA,cACjB,kBAAkBC;AAAA,YAAA;AAAA,YAEnB,WAAW,cAAcL,IAAQ,CAAC,IAAIA,IAAQ,CAAC;AAAA,YAC/C,MAAM;AAAA,YACN,eAAe;AAAA,YACf,gBAAgB;AAAA,YAChB,eAAY;AAAA,UAAA;AAAA,QAAA;AAAA,QAEb,gBAAAQ;AAAA,UAACE;AAAAA,UAAA;AAAA,YACA,GAAGV,IAAQ,IAAIO,IAAiB;AAAA,YAChC,OAAOA;AAAA,UAAA;AAAA,QAAA;AAAA,MACR;AAAA,IAAA;AAAA,EAAA,GAEF;AAEF;"}
@@ -1,28 +1,29 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import { ProgressBar as e } from "react-bootstrap";
3
3
  import t from "styled-components";
4
- import { COLORS as m } from "../../constants/Theme.js";
5
- const d = (o) => /* @__PURE__ */ r(
6
- n,
4
+ import { COLORS as a } from "../../constants/Theme.js";
5
+ const c = (r) => /* @__PURE__ */ o(
6
+ i,
7
7
  {
8
- color: o.color ? o.color : m.content.brand,
9
- children: /* @__PURE__ */ r(
8
+ color: r.color ? r.color : a.content.brand,
9
+ children: /* @__PURE__ */ o(
10
10
  e,
11
11
  {
12
- animated: o.isAnimated,
13
- now: o.completed,
14
- style: { height: `${o.height ? o.height : 8}px` }
12
+ animated: r.isAnimated,
13
+ now: r.completed,
14
+ style: { height: `${r.height ? r.height : 8}px` },
15
+ "data-testid": "progress-bar-wrapper"
15
16
  }
16
17
  )
17
18
  }
18
- ), n = t.div`
19
+ ), i = t.div`
19
20
  flex: 50%;
20
21
  .progress-bar {
21
- background: ${(o) => o.color};
22
+ background: ${(r) => r.color};
22
23
  }
23
24
  `;
24
25
  export {
25
- d as ProgressBarComponent,
26
- n as ProgressCompletedBar
26
+ c as ProgressBarComponent,
27
+ i as ProgressCompletedBar
27
28
  };
28
29
  //# sourceMappingURL=ProgressBarComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBarComponent.js","sources":["../../../../src/components/progress-bar/ProgressBarComponent.tsx"],"sourcesContent":["import { ProgressBar } from 'react-bootstrap';\nimport styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport interface ProgressBarProps {\n\tcompleted: number;\n\tisAnimated: boolean;\n\tcolor?: string;\n\theight?: number;\n}\n\nexport const ProgressBarComponent = (props: ProgressBarProps) => {\n\treturn (\n\t\t<ProgressCompletedBar\n\t\t\tcolor={props.color ? props.color : COLORS.content.brand}\n\t\t>\n\t\t\t<ProgressBar\n\t\t\t\tanimated={props.isAnimated}\n\t\t\t\tnow={props.completed}\n\t\t\t\tstyle={{ height: `${props.height ? props.height : 8}px` }}\n\t\t\t/>\n\t\t</ProgressCompletedBar>\n\t);\n};\n\nexport const ProgressCompletedBar = styled.div<{ color: string }>`\n\tflex: 50%;\n\t.progress-bar {\n\t\tbackground: ${(props) => props.color};\n\t}\n`;\n"],"names":["ProgressBarComponent","props","jsx","ProgressCompletedBar","COLORS","ProgressBar","styled"],"mappings":";;;;AAWO,MAAMA,IAAuB,CAACC,MAEnC,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACA,OAAOF,EAAM,QAAQA,EAAM,QAAQG,EAAO,QAAQ;AAAA,IAElD,UAAA,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACA,UAAUJ,EAAM;AAAA,QAChB,KAAKA,EAAM;AAAA,QACX,OAAO,EAAE,QAAQ,GAAGA,EAAM,SAASA,EAAM,SAAS,CAAC,KAAA;AAAA,MAAK;AAAA,IAAA;AAAA,EACzD;AAAA,GAKUE,IAAuBG,EAAO;AAAA;AAAA;AAAA,gBAG3B,CAACL,MAAUA,EAAM,KAAK;AAAA;AAAA;"}
1
+ {"version":3,"file":"ProgressBarComponent.js","sources":["../../../../src/components/progress-bar/ProgressBarComponent.tsx"],"sourcesContent":["import { ProgressBar } from 'react-bootstrap';\nimport styled from 'styled-components';\nimport { COLORS } from '@src/constants/Theme';\n\nexport interface ProgressBarProps {\n\tcompleted: number;\n\tisAnimated: boolean;\n\tcolor?: string;\n\theight?: number;\n}\n\nexport const ProgressBarComponent = (props: ProgressBarProps) => {\n\treturn (\n\t\t<ProgressCompletedBar\n\t\t\tcolor={props.color ? props.color : COLORS.content.brand}\n\t\t>\n\t\t\t<ProgressBar\n\t\t\t\tanimated={props.isAnimated}\n\t\t\t\tnow={props.completed}\n\t\t\t\tstyle={{ height: `${props.height ? props.height : 8}px` }}\n\t\t\t\tdata-testid=\"progress-bar-wrapper\"\n\t\t\t/>\n\t\t</ProgressCompletedBar>\n\t);\n};\n\nexport const ProgressCompletedBar = styled.div<{ color: string }>`\n\tflex: 50%;\n\t.progress-bar {\n\t\tbackground: ${(props) => props.color};\n\t}\n`;\n"],"names":["ProgressBarComponent","props","jsx","ProgressCompletedBar","COLORS","ProgressBar","styled"],"mappings":";;;;AAWO,MAAMA,IAAuB,CAACC,MAEnC,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACA,OAAOF,EAAM,QAAQA,EAAM,QAAQG,EAAO,QAAQ;AAAA,IAElD,UAAA,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACA,UAAUJ,EAAM;AAAA,QAChB,KAAKA,EAAM;AAAA,QACX,OAAO,EAAE,QAAQ,GAAGA,EAAM,SAASA,EAAM,SAAS,CAAC,KAAA;AAAA,QACnD,eAAY;AAAA,MAAA;AAAA,IAAA;AAAA,EACb;AAAA,GAKUE,IAAuBG,EAAO;AAAA;AAAA;AAAA,gBAG3B,CAACL,MAAUA,EAAM,KAAK;AAAA;AAAA;"}
@@ -1,79 +1,97 @@
1
- import { jsxs as u, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
2
  import n from "styled-components";
3
- import { BodyTiny as h } from "../TypographyStyle.js";
4
- import { COLORS as t } from "../../constants/Theme.js";
5
- var b = /* @__PURE__ */ ((r) => (r.RIGHT = "right", r.LEFT = "left", r.TOP = "top", r.BOTTOM = "bottom", r))(b || {}), f = /* @__PURE__ */ ((r) => (r.CIRCLE = "circle", r.LINE = "line", r))(f || {});
3
+ import { BodyTiny as g } from "../TypographyStyle.js";
4
+ import { COLORS as o } from "../../constants/Theme.js";
5
+ var v = /* @__PURE__ */ ((r) => (r.RIGHT = "right", r.LEFT = "left", r.TOP = "top", r.BOTTOM = "bottom", r))(v || {}), f = /* @__PURE__ */ ((r) => (r.CIRCLE = "circle", r.LINE = "line", r))(f || {});
6
6
  const z = (r) => {
7
7
  const {
8
- type: g,
8
+ type: h,
9
9
  progress: i,
10
10
  progressBarThickness: a,
11
11
  size: s,
12
- color: c,
13
- text: d,
14
- textPosition: m,
12
+ color: d,
13
+ text: c,
14
+ textPosition: p,
15
15
  showProgress: l,
16
- matchParentWidth: p = !1
16
+ matchParentWidth: b = !1
17
17
  } = r;
18
- let o = m;
19
- return o || (o = "left"), /* @__PURE__ */ u($, { alignment: o, children: [
20
- l && (o === "top" || o === "left") && /* @__PURE__ */ e(
21
- h,
18
+ let t = p;
19
+ return t || (t = "left"), /* @__PURE__ */ m(u, { alignment: t, "data-testid": "progress-bar-v2", children: [
20
+ l && (t === "top" || t === "left") && /* @__PURE__ */ e(
21
+ g,
22
22
  {
23
23
  style: {
24
- marginBottom: o === "top" ? "8px" : void 0,
25
- marginRight: o === "left" ? "8px" : void 0
24
+ marginBottom: t === "top" ? "8px" : void 0,
25
+ marginRight: t === "left" ? "8px" : void 0
26
26
  },
27
- color: t.content.secondary,
28
- children: d ?? `${i}% completed...`
27
+ color: o.content.secondary,
28
+ children: c ?? `${i}% completed...`
29
29
  }
30
30
  ),
31
- g === "line" ? /* @__PURE__ */ e(
31
+ h === "line" ? /* @__PURE__ */ e(
32
32
  x,
33
33
  {
34
34
  size: s,
35
35
  progressBarThickness: a,
36
- matchParentWidth: p,
37
- children: /* @__PURE__ */ e(w, { progress: i, color: c })
36
+ matchParentWidth: b,
37
+ "data-testid": "progress-bar-v2-track",
38
+ children: /* @__PURE__ */ e(
39
+ w,
40
+ {
41
+ progress: i,
42
+ color: d,
43
+ "data-testid": "progress-bar-v2-fill"
44
+ }
45
+ )
38
46
  }
39
- ) : /* @__PURE__ */ e(v, { progress: i, color: c, size: s, children: /* @__PURE__ */ e(
40
- k,
47
+ ) : /* @__PURE__ */ e(
48
+ $,
41
49
  {
42
50
  progress: i,
51
+ color: d,
43
52
  size: s,
44
- progressBarThickness: a
53
+ "data-testid": "progress-bar-v2-track",
54
+ children: /* @__PURE__ */ e(
55
+ k,
56
+ {
57
+ progress: i,
58
+ size: s,
59
+ progressBarThickness: a,
60
+ "data-testid": "progress-bar-v2-fill"
61
+ }
62
+ )
45
63
  }
46
- ) }),
47
- l && (o === "bottom" || o === "right") && /* @__PURE__ */ e(
48
- h,
64
+ ),
65
+ l && (t === "bottom" || t === "right") && /* @__PURE__ */ e(
66
+ g,
49
67
  {
50
68
  style: {
51
- marginTop: o === "bottom" ? "8px" : void 0,
52
- marginLeft: o === "right" ? "8px" : void 0
69
+ marginTop: t === "bottom" ? "8px" : void 0,
70
+ marginLeft: t === "right" ? "8px" : void 0
53
71
  },
54
- color: t.content.secondary,
55
- children: d ?? `${i}% completed...`
72
+ color: o.content.secondary,
73
+ children: c ?? `${i}% completed...`
56
74
  }
57
75
  )
58
76
  ] });
59
- }, $ = n.div`
77
+ }, u = n.div`
60
78
  display: flex;
61
79
  flex-direction: ${(r) => r?.alignment === "top" || r?.alignment === "bottom" ? "column" : "row"};
62
80
  align-items: center;
63
81
  width: 100%;
64
- `, v = n.div`
82
+ `, $ = n.div`
65
83
  width: ${(r) => r.size ?? 32}px;
66
84
  height: ${(r) => r.size ?? 32}px;
67
85
  border-radius: 50%;
68
86
  overflow: hidden;
69
87
  background: conic-gradient(
70
- ${(r) => r.color ?? t.background.brand}
88
+ ${(r) => r.color ?? o.background.brand}
71
89
  ${(r) => r.progress * 3.6}deg,
72
- ${t.content.inactive} 0deg
90
+ ${o.content.inactive} 0deg
73
91
  );
74
92
  position: relative;
75
93
  `, k = n.div`
76
- background-color: ${t.background.inactive};
94
+ background-color: ${o.background.inactive};
77
95
  transition: width 0.3s ease-in-out;
78
96
  position: absolute;
79
97
  top: 50%;
@@ -82,22 +100,22 @@ const z = (r) => {
82
100
  width: ${(r) => r.progressBarThickness ? r.size ?? 32 - r.progressBarThickness : 20}px;
83
101
  height: ${(r) => r.progressBarThickness ? r.size ?? 32 - r.progressBarThickness : 20}px;
84
102
  border-radius: 50%;
85
- background: ${t.surface.standard};
103
+ background: ${o.surface.standard};
86
104
  `, x = n.div`
87
105
  width: ${(r) => r.matchParentWidth ? "100%" : `${r.size ?? 90}px`};
88
106
  height: ${(r) => r.progressBarThickness ?? 8}px;
89
- background-color: ${t.background.inactive};
107
+ background-color: ${o.background.inactive};
90
108
  border-radius: 4px;
91
109
  overflow: hidden;
92
110
  `, w = n.div`
93
111
  height: 100%;
94
112
  width: ${(r) => r.progress}%;
95
- background-color: ${(r) => r.color ?? t.background.brand};
113
+ background-color: ${(r) => r.color ?? o.background.brand};
96
114
  transition: width 0.3s ease-in-out;
97
115
  `;
98
116
  export {
99
117
  f as ProgressBarType,
100
118
  z as ProgressBarV2,
101
- b as TextAlignment
119
+ v as TextAlignment
102
120
  };
103
121
  //# sourceMappingURL=ProgressBarV2.js.map