@alfalab/core-components-circular-progress-bar 3.8.3 → 3.9.0-snapshot-1393ffa

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 (182) hide show
  1. package/Component.js +21 -22
  2. package/Component.js.map +1 -0
  3. package/consts.js +1 -0
  4. package/consts.js.map +1 -0
  5. package/cssm/Component.js +14 -13
  6. package/cssm/Component.js.map +1 -0
  7. package/cssm/consts.js +1 -0
  8. package/cssm/consts.js.map +1 -0
  9. package/cssm/index.js +1 -0
  10. package/cssm/index.js.map +1 -0
  11. package/cssm/index.module.css +4 -29
  12. package/cssm/shared/index.js +3 -2
  13. package/cssm/shared/index.js.map +1 -0
  14. package/{Component.d.ts → cssm/src/Component.d.ts} +9 -8
  15. package/{esm → cssm/src}/consts.d.ts +9 -10
  16. package/cssm/src/index.d.ts +2 -0
  17. package/cssm/src/shared/index.d.ts +1 -0
  18. package/cssm/src/types/component-size.d.ts +1 -0
  19. package/cssm/src/types/typography-color.d.ts +1 -0
  20. package/cssm/src/use-timer.d.ts +1 -0
  21. package/cssm/{utils → src/utils}/get-circular-progress-bar-test-ids.d.ts +1 -2
  22. package/cssm/src/utils/is-typography-color.d.ts +2 -0
  23. package/cssm/types/component-size.js +1 -0
  24. package/cssm/types/component-size.js.map +1 -0
  25. package/cssm/types/typography-color.js +1 -0
  26. package/cssm/types/typography-color.js.map +1 -0
  27. package/cssm/use-timer.js +8 -4
  28. package/cssm/use-timer.js.map +1 -0
  29. package/cssm/utils/get-circular-progress-bar-test-ids.js +6 -5
  30. package/cssm/utils/get-circular-progress-bar-test-ids.js.map +1 -0
  31. package/cssm/utils/is-typography-color.js +1 -0
  32. package/cssm/utils/is-typography-color.js.map +1 -0
  33. package/esm/Component.js +7 -8
  34. package/esm/Component.js.map +1 -0
  35. package/esm/consts.js +1 -0
  36. package/esm/consts.js.map +1 -0
  37. package/esm/index.css +56 -82
  38. package/esm/index.js +1 -0
  39. package/esm/index.js.map +1 -0
  40. package/esm/index.module.css.js +6 -0
  41. package/esm/index.module.css.js.map +1 -0
  42. package/esm/shared/index.js +1 -0
  43. package/esm/shared/index.js.map +1 -0
  44. package/esm/{Component.d.ts → src/Component.d.ts} +9 -8
  45. package/{consts.d.ts → esm/src/consts.d.ts} +9 -10
  46. package/esm/src/index.d.ts +2 -0
  47. package/esm/src/shared/index.d.ts +1 -0
  48. package/esm/src/types/component-size.d.ts +1 -0
  49. package/esm/src/types/typography-color.d.ts +1 -0
  50. package/esm/src/use-timer.d.ts +1 -0
  51. package/esm/{utils → src/utils}/get-circular-progress-bar-test-ids.d.ts +1 -2
  52. package/esm/src/utils/is-typography-color.d.ts +2 -0
  53. package/esm/types/component-size.js +1 -0
  54. package/esm/types/component-size.js.map +1 -0
  55. package/esm/types/typography-color.js +1 -0
  56. package/esm/types/typography-color.js.map +1 -0
  57. package/esm/use-timer.js +6 -2
  58. package/esm/use-timer.js.map +1 -0
  59. package/esm/utils/get-circular-progress-bar-test-ids.js +1 -0
  60. package/esm/utils/get-circular-progress-bar-test-ids.js.map +1 -0
  61. package/esm/utils/is-typography-color.js +1 -0
  62. package/esm/utils/is-typography-color.js.map +1 -0
  63. package/index.css +56 -82
  64. package/index.js +1 -0
  65. package/index.js.map +1 -0
  66. package/index.module.css.js +8 -0
  67. package/index.module.css.js.map +1 -0
  68. package/modern/Component.js +7 -8
  69. package/modern/Component.js.map +1 -0
  70. package/modern/consts.js +1 -0
  71. package/modern/consts.js.map +1 -0
  72. package/modern/index.css +56 -82
  73. package/modern/index.js +1 -0
  74. package/modern/index.js.map +1 -0
  75. package/modern/index.module.css.js +6 -0
  76. package/modern/index.module.css.js.map +1 -0
  77. package/modern/shared/index.js +1 -0
  78. package/modern/shared/index.js.map +1 -0
  79. package/{cssm → modern/src}/Component.d.ts +9 -8
  80. package/modern/{consts.d.ts → src/consts.d.ts} +9 -10
  81. package/modern/src/index.d.ts +2 -0
  82. package/modern/src/shared/index.d.ts +1 -0
  83. package/modern/src/types/component-size.d.ts +1 -0
  84. package/modern/src/types/typography-color.d.ts +1 -0
  85. package/modern/src/use-timer.d.ts +1 -0
  86. package/modern/{utils → src/utils}/get-circular-progress-bar-test-ids.d.ts +1 -2
  87. package/modern/src/utils/is-typography-color.d.ts +2 -0
  88. package/modern/types/component-size.js +1 -0
  89. package/modern/types/component-size.js.map +1 -0
  90. package/modern/types/typography-color.js +1 -0
  91. package/modern/types/typography-color.js.map +1 -0
  92. package/modern/use-timer.js +6 -2
  93. package/modern/use-timer.js.map +1 -0
  94. package/modern/utils/get-circular-progress-bar-test-ids.js +1 -0
  95. package/modern/utils/get-circular-progress-bar-test-ids.js.map +1 -0
  96. package/modern/utils/is-typography-color.js +1 -0
  97. package/modern/utils/is-typography-color.js.map +1 -0
  98. package/moderncssm/Component.js +6 -5
  99. package/moderncssm/Component.js.map +1 -0
  100. package/moderncssm/consts.js +1 -0
  101. package/moderncssm/consts.js.map +1 -0
  102. package/moderncssm/index.js +1 -0
  103. package/moderncssm/index.js.map +1 -0
  104. package/moderncssm/index.module.css +0 -9
  105. package/moderncssm/shared/index.js +1 -0
  106. package/moderncssm/shared/index.js.map +1 -0
  107. package/{modern → moderncssm/src}/Component.d.ts +9 -8
  108. package/{cssm → moderncssm/src}/consts.d.ts +9 -10
  109. package/moderncssm/src/index.d.ts +2 -0
  110. package/moderncssm/src/shared/index.d.ts +1 -0
  111. package/moderncssm/src/types/component-size.d.ts +1 -0
  112. package/moderncssm/src/types/typography-color.d.ts +1 -0
  113. package/moderncssm/src/use-timer.d.ts +1 -0
  114. package/moderncssm/{utils → src/utils}/get-circular-progress-bar-test-ids.d.ts +1 -2
  115. package/moderncssm/src/utils/is-typography-color.d.ts +2 -0
  116. package/moderncssm/types/component-size.js +1 -0
  117. package/moderncssm/types/component-size.js.map +1 -0
  118. package/moderncssm/types/typography-color.js +1 -0
  119. package/moderncssm/types/typography-color.js.map +1 -0
  120. package/moderncssm/use-timer.js +6 -2
  121. package/moderncssm/use-timer.js.map +1 -0
  122. package/moderncssm/utils/get-circular-progress-bar-test-ids.js +1 -0
  123. package/moderncssm/utils/get-circular-progress-bar-test-ids.js.map +1 -0
  124. package/moderncssm/utils/is-typography-color.js +1 -0
  125. package/moderncssm/utils/is-typography-color.js.map +1 -0
  126. package/package.json +5 -5
  127. package/shared/index.js +3 -2
  128. package/shared/index.js.map +1 -0
  129. package/src/Component.d.ts +143 -0
  130. package/src/Component.tsx +6 -1
  131. package/src/consts.d.ts +79 -0
  132. package/src/index.d.ts +2 -0
  133. package/src/shared/index.d.ts +1 -0
  134. package/src/types/component-size.d.ts +1 -0
  135. package/src/types/typography-color.d.ts +1 -0
  136. package/src/use-timer.d.ts +1 -0
  137. package/src/use-timer.ts +6 -1
  138. package/src/utils/get-circular-progress-bar-test-ids.d.ts +7 -0
  139. package/src/utils/is-typography-color.d.ts +2 -0
  140. package/types/component-size.js +1 -0
  141. package/types/component-size.js.map +1 -0
  142. package/types/typography-color.js +1 -0
  143. package/types/typography-color.js.map +1 -0
  144. package/use-timer.js +6 -2
  145. package/use-timer.js.map +1 -0
  146. package/utils/get-circular-progress-bar-test-ids.js +1 -0
  147. package/utils/get-circular-progress-bar-test-ids.js.map +1 -0
  148. package/utils/is-typography-color.js +1 -0
  149. package/utils/is-typography-color.js.map +1 -0
  150. package/cssm/index.d.ts +0 -2
  151. package/cssm/shared/index.d.ts +0 -1
  152. package/cssm/types/component-size.d.ts +0 -2
  153. package/cssm/types/typography-color.d.ts +0 -2
  154. package/cssm/use-timer.d.ts +0 -2
  155. package/cssm/utils/is-typography-color.d.ts +0 -3
  156. package/esm/index.d.ts +0 -2
  157. package/esm/shared/index.d.ts +0 -1
  158. package/esm/types/component-size.d.ts +0 -2
  159. package/esm/types/typography-color.d.ts +0 -2
  160. package/esm/use-timer.d.ts +0 -2
  161. package/esm/utils/is-typography-color.d.ts +0 -3
  162. package/index.d.ts +0 -2
  163. package/modern/index.d.ts +0 -2
  164. package/modern/shared/index.d.ts +0 -1
  165. package/modern/types/component-size.d.ts +0 -2
  166. package/modern/types/typography-color.d.ts +0 -2
  167. package/modern/use-timer.d.ts +0 -2
  168. package/modern/utils/is-typography-color.d.ts +0 -3
  169. package/moderncssm/Component.d.ts +0 -142
  170. package/moderncssm/consts.d.ts +0 -80
  171. package/moderncssm/index.d.ts +0 -2
  172. package/moderncssm/shared/index.d.ts +0 -1
  173. package/moderncssm/types/component-size.d.ts +0 -2
  174. package/moderncssm/types/typography-color.d.ts +0 -2
  175. package/moderncssm/use-timer.d.ts +0 -2
  176. package/moderncssm/utils/is-typography-color.d.ts +0 -3
  177. package/shared/index.d.ts +0 -1
  178. package/types/component-size.d.ts +0 -2
  179. package/types/typography-color.d.ts +0 -2
  180. package/use-timer.d.ts +0 -2
  181. package/utils/get-circular-progress-bar-test-ids.d.ts +0 -8
  182. package/utils/is-typography-color.d.ts +0 -3
@@ -0,0 +1 @@
1
+ export { getCircularProgressBarTestIds } from '../utils/get-circular-progress-bar-test-ids';
@@ -0,0 +1 @@
1
+ export declare type ComponentSize = 'xxl' | 'xl' | 'l' | 'm' | 's' | 'xs' | 24 | 48 | 64 | 80 | 128 | 144;
@@ -0,0 +1 @@
1
+ export declare type TypographyColor = 'primary' | 'secondary' | 'tertiary' | 'positive' | 'negative';
@@ -0,0 +1 @@
1
+ export declare function useTimer(time: number, active: boolean | undefined, counting: 'forward' | 'backward', onFinish: () => void, interval?: number, step?: number): [value: number, title: string];
@@ -1,8 +1,7 @@
1
- declare function getCircularProgressBarTestIds(dataTestId: string): {
1
+ export declare function getCircularProgressBarTestIds(dataTestId: string): {
2
2
  progressBar: string;
3
3
  title: string;
4
4
  subtitle: string;
5
5
  circleProgressBar: string;
6
6
  circleProgressValue: string;
7
7
  };
8
- export { getCircularProgressBarTestIds };
@@ -0,0 +1,2 @@
1
+ import { TypographyColor } from '../types/typography-color';
2
+ export declare const isTypographyColor: (color: TypographyColor | string) => color is TypographyColor;
@@ -1 +1,2 @@
1
1
 
2
+ //# sourceMappingURL=component-size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-size.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
1
 
2
+ //# sourceMappingURL=typography-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography-color.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/esm/use-timer.js CHANGED
@@ -5,7 +5,7 @@ var MAX_PERSENT_VALUE = 100;
5
5
  function makeTitle(time) {
6
6
  return "".concat(Math.trunc(time / 60), ":").concat("".concat(time % 60).padStart(2, '0'));
7
7
  }
8
- function useTimer(time, active, counting, interval, step) {
8
+ function useTimer(time, active, counting, onFinish, interval, step) {
9
9
  if (active === void 0) { active = true; }
10
10
  if (interval === void 0) { interval = 1000; }
11
11
  if (step === void 0) { step = 1; }
@@ -14,14 +14,18 @@ function useTimer(time, active, counting, interval, step) {
14
14
  var persentValue = Math.trunc((passedTime / time) * MAX_PERSENT_VALUE);
15
15
  useEffect(function () {
16
16
  if (!active || isCompleted) {
17
+ if (isCompleted) {
18
+ onFinish();
19
+ }
17
20
  return noop;
18
21
  }
19
22
  var timer = setInterval(function () {
20
23
  setPassedTime(function (prevPassed) { return prevPassed + step; });
21
24
  }, interval);
22
25
  return function () { return clearInterval(timer); };
23
- }, [interval, isCompleted, active, step]);
26
+ }, [interval, isCompleted, active, step, onFinish]);
24
27
  return [persentValue, makeTitle(counting === 'backward' ? time - passedTime : passedTime)];
25
28
  }
26
29
 
27
30
  export { useTimer };
31
+ //# sourceMappingURL=use-timer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-timer.js","sources":["../../src/use-timer.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport { noop } from '@alfalab/core-components-shared';\n\nconst MAX_PERSENT_VALUE = 100;\n\nfunction makeTitle(time: number) {\n return `${Math.trunc(time / 60)}:${`${time % 60}`.padStart(2, '0')}`;\n}\n\nexport function useTimer(\n time: number,\n active = true,\n counting: 'forward' | 'backward',\n onFinish: () => void,\n interval = 1000,\n step = 1,\n): [value: number, title: string] {\n const [passedTime, setPassedTime] = useState(0);\n const isCompleted = passedTime === time;\n const persentValue = Math.trunc((passedTime / time) * MAX_PERSENT_VALUE);\n\n useEffect(() => {\n if (!active || isCompleted) {\n if (isCompleted) {\n onFinish();\n }\n\n return noop;\n }\n\n const timer = setInterval(() => {\n setPassedTime((prevPassed) => prevPassed + step);\n }, interval);\n\n return () => clearInterval(timer);\n }, [interval, isCompleted, active, step, onFinish]);\n\n return [persentValue, makeTitle(counting === 'backward' ? time - passedTime : passedTime)];\n}\n"],"names":[],"mappings":";;;AAIA,IAAM,iBAAiB,GAAG,GAAG;AAE7B,SAAS,SAAS,CAAC,IAAY,EAAA;IAC3B,OAAO,EAAA,CAAA,MAAA,CAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,EAAI,GAAA,CAAA,CAAA,MAAA,CAAA,EAAA,CAAA,MAAA,CAAG,IAAI,GAAG,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAE;AACxE;AAEgB,SAAA,QAAQ,CACpB,IAAY,EACZ,MAAa,EACb,QAAgC,EAChC,QAAoB,EACpB,QAAe,EACf,IAAQ,EAAA;AAJR,IAAA,IAAA,MAAA,KAAA,MAAA,EAAA,EAAA,MAAa,GAAA,IAAA,CAAA;AAGb,IAAA,IAAA,QAAA,KAAA,MAAA,EAAA,EAAA,QAAe,GAAA,IAAA,CAAA;AACf,IAAA,IAAA,IAAA,KAAA,MAAA,EAAA,EAAA,IAAQ,GAAA,CAAA,CAAA;IAEF,IAAA,EAAA,GAA8B,QAAQ,CAAC,CAAC,CAAC,EAAxC,UAAU,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,aAAa,GAAA,EAAA,CAAA,CAAA,CAAe;AAC/C,IAAA,IAAM,WAAW,GAAG,UAAU,KAAK,IAAI;AACvC,IAAA,IAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,IAAI,IAAI,iBAAiB,CAAC;AAExE,IAAA,SAAS,CAAC,YAAA;AACN,QAAA,IAAI,CAAC,MAAM,IAAI,WAAW,EAAE;AACxB,YAAA,IAAI,WAAW,EAAE;AACb,gBAAA,QAAQ,EAAE;AACb;AAED,YAAA,OAAO,IAAI;AACd;QAED,IAAM,KAAK,GAAG,WAAW,CAAC,YAAA;YACtB,aAAa,CAAC,UAAC,UAAU,EAAK,EAAA,OAAA,UAAU,GAAG,IAAI,CAAA,EAAA,CAAC;SACnD,EAAE,QAAQ,CAAC;QAEZ,OAAO,YAAA,EAAM,OAAA,aAAa,CAAC,KAAK,CAAC,CAAA,EAAA;AACrC,KAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEnD,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,QAAQ,KAAK,UAAU,GAAG,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAC9F;;;;"}
@@ -11,3 +11,4 @@ function getCircularProgressBarTestIds(dataTestId) {
11
11
  }
12
12
 
13
13
  export { getCircularProgressBarTestIds };
14
+ //# sourceMappingURL=get-circular-progress-bar-test-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-circular-progress-bar-test-ids.js","sources":["../../../src/utils/get-circular-progress-bar-test-ids.ts"],"sourcesContent":["import { getDataTestId } from '@alfalab/core-components-shared';\n\nexport function getCircularProgressBarTestIds(dataTestId: string) {\n return {\n progressBar: dataTestId,\n title: getDataTestId(dataTestId, 'title'),\n subtitle: getDataTestId(dataTestId, 'subtitle'),\n circleProgressBar: getDataTestId(dataTestId, 'circle-progress-bar'),\n circleProgressValue: getDataTestId(dataTestId, 'circle-progress-value'),\n };\n}\n"],"names":[],"mappings":";;AAEM,SAAU,6BAA6B,CAAC,UAAkB,EAAA;IAC5D,OAAO;AACH,QAAA,WAAW,EAAE,UAAU;AACvB,QAAA,KAAK,EAAE,aAAa,CAAC,UAAU,EAAE,OAAO,CAAC;AACzC,QAAA,QAAQ,EAAE,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC;AAC/C,QAAA,iBAAiB,EAAE,aAAa,CAAC,UAAU,EAAE,qBAAqB,CAAC;AACnE,QAAA,mBAAmB,EAAE,aAAa,CAAC,UAAU,EAAE,uBAAuB,CAAC;KAC1E;AACL;;;;"}
@@ -5,3 +5,4 @@ var isTypographyColor = function (color) {
5
5
  };
6
6
 
7
7
  export { isTypographyColor };
8
+ //# sourceMappingURL=is-typography-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-typography-color.js","sources":["../../../src/utils/is-typography-color.ts"],"sourcesContent":["import { TYPOGRAPHY_COLOR } from '../consts';\nimport { TypographyColor } from '../types/typography-color';\n\nexport const isTypographyColor = (color: TypographyColor | string): color is TypographyColor =>\n TYPOGRAPHY_COLOR.includes(color);\n"],"names":[],"mappings":";;AAGO,IAAM,iBAAiB,GAAG,UAAC,KAA+B,EAAA;AAC7D,IAAA,OAAA,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAAhC;;;;"}
package/index.css CHANGED
@@ -1,189 +1,163 @@
1
- /* hash: 1q6en */
2
- :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
3
- } /* deprecated */ :root {
1
+ :root {
4
2
  --color-light-neutral-500: #babbc2;
5
3
  --color-light-neutral-700: #898991;
6
4
  --color-light-neutral-translucent-1300: rgba(3, 3, 6, 0.88);
7
5
  --color-light-neutral-translucent-1300-inverted: rgba(255, 255, 255, 0.94);
8
6
  --color-light-neutral-translucent-300: rgba(15, 25, 55, 0.1);
9
7
  --color-light-status-negative: #ff4837;
10
- --color-light-status-positive: #0cc44d; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
11
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
12
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
8
+ --color-light-status-positive: #0cc44d;
13
9
  } :root {
14
-
15
- /* Hard */
16
-
17
- /* Up */
18
-
19
- /* Hard up */
20
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
21
10
  --border-radius-pill: 99px;
22
-
23
- /* новые значения, используйте их */
24
- } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
25
-
26
- /* новые значения, используйте их */
27
-
28
- /* no-unit может приводить к проблемам в calc (#1559) */
29
- /* stylelint-disable-next-line length-zero-no-unit */
11
+ } :root {
30
12
  --gap-0: 0px;
31
13
  } :root {
32
14
  --font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
33
15
  sans-serif;
34
- } /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ /* @deprecated */ :root {
35
- } /* сбрасывает синюю подсветку при нажатии */ :root {
36
- /* stroke */
16
+ } :root {
37
17
  --circular-progress-bar-stroke-color: var(--color-light-neutral-translucent-300);
38
-
39
- /* positive */
40
18
  --circular-progress-bar-positive-color: var(--color-light-status-positive);
41
-
42
- /* negative */
43
19
  --circular-progress-bar-negative-color: var(--color-light-status-negative);
44
-
45
- /* theme */
46
20
  --circular-progress-bar-font-family: var(--font-family-system);
47
21
  --circular-progress-bar-font-weight: 600;
48
- } .circular-progress-bar__component_29ydx {
22
+ } .circular-progress-bar__component_1x0hu {
49
23
  position: relative;
50
24
  display: flex;
51
25
  justify-content: center;
52
26
  align-items: center;
53
27
  border-radius: var(--border-radius-pill)
54
- } .circular-progress-bar__component_29ydx.circular-progress-bar__bg-positive_29ydx {
28
+ } .circular-progress-bar__component_1x0hu.circular-progress-bar__bg-positive_1x0hu {
55
29
  background: var(--circular-progress-bar-positive-color);
56
- } .circular-progress-bar__component_29ydx.circular-progress-bar__bg-negative_29ydx {
30
+ } .circular-progress-bar__component_1x0hu.circular-progress-bar__bg-negative_1x0hu {
57
31
  background: var(--circular-progress-bar-negative-color);
58
- } .circular-progress-bar__svg_29ydx {
32
+ } .circular-progress-bar__svg_1x0hu {
59
33
  display: block;
60
34
  width: 100%;
61
- } .circular-progress-bar__title_29ydx,
62
- .circular-progress-bar__subtitle_29ydx {
35
+ } .circular-progress-bar__title_1x0hu,
36
+ .circular-progress-bar__subtitle_1x0hu {
63
37
  overflow: hidden;
64
38
  word-break: break-word;
65
39
  white-space: nowrap;
66
40
  text-overflow: ellipsis;
67
41
  margin: var(--gap-0) 6px;
68
- } .circular-progress-bar__subtitle_29ydx {
42
+ } .circular-progress-bar__subtitle_1x0hu {
69
43
  max-height: 40px;
70
- } .circular-progress-bar__labelWrapper_29ydx {
44
+ } .circular-progress-bar__labelWrapper_1x0hu {
71
45
  text-align: center;
72
46
  position: absolute;
73
47
  top: 50%;
74
48
  left: 50%;
75
49
  width: 100%;
76
50
  transform: translate(-50%, -50%)
77
- } .circular-progress-bar__labelWrapper_29ydx.circular-progress-bar__label_29ydx {
51
+ } .circular-progress-bar__labelWrapper_1x0hu.circular-progress-bar__label_1x0hu {
78
52
  display: flex;
79
53
  align-items: center;
80
54
  justify-content: center;
81
- } .circular-progress-bar__typography_29ydx {
55
+ } .circular-progress-bar__typography_1x0hu {
82
56
  font-feature-settings: 'ss01';
83
57
  font-weight: var(--circular-progress-bar-font-weight);
84
58
  font-family: var(--circular-progress-bar-font-family);
85
- } .circular-progress-bar__size-144_29ydx {
59
+ } .circular-progress-bar__size-144_1x0hu {
86
60
  width: 144px;
87
61
  height: 144px
88
- } .circular-progress-bar__size-144_29ydx .circular-progress-bar__labelWrapper_29ydx {
62
+ } .circular-progress-bar__size-144_1x0hu .circular-progress-bar__labelWrapper_1x0hu {
89
63
  max-width: 128px;
90
- } .circular-progress-bar__size-144_29ydx .circular-progress-bar__title_29ydx {
64
+ } .circular-progress-bar__size-144_1x0hu .circular-progress-bar__title_1x0hu {
91
65
  max-height: 32px;
92
- } .circular-progress-bar__size-128_29ydx {
66
+ } .circular-progress-bar__size-128_1x0hu {
93
67
  width: 128px;
94
68
  height: 128px
95
- } .circular-progress-bar__size-128_29ydx .circular-progress-bar__labelWrapper_29ydx {
69
+ } .circular-progress-bar__size-128_1x0hu .circular-progress-bar__labelWrapper_1x0hu {
96
70
  max-width: 108px;
97
- } .circular-progress-bar__size-128_29ydx .circular-progress-bar__title_29ydx {
71
+ } .circular-progress-bar__size-128_1x0hu .circular-progress-bar__title_1x0hu {
98
72
  max-height: 32px;
99
- } .circular-progress-bar__size-96_29ydx {
73
+ } .circular-progress-bar__size-96_1x0hu {
100
74
  width: 96px;
101
75
  height: 96px
102
- } .circular-progress-bar__size-96_29ydx .circular-progress-bar__labelWrapper_29ydx {
76
+ } .circular-progress-bar__size-96_1x0hu .circular-progress-bar__labelWrapper_1x0hu {
103
77
  max-width: 64px;
104
- } .circular-progress-bar__size-96_29ydx .circular-progress-bar__title_29ydx {
78
+ } .circular-progress-bar__size-96_1x0hu .circular-progress-bar__title_1x0hu {
105
79
  max-height: 20px;
106
- } .circular-progress-bar__size-80_29ydx {
80
+ } .circular-progress-bar__size-80_1x0hu {
107
81
  width: 80px;
108
82
  height: 80px
109
- } .circular-progress-bar__size-80_29ydx .circular-progress-bar__labelWrapper_29ydx {
83
+ } .circular-progress-bar__size-80_1x0hu .circular-progress-bar__labelWrapper_1x0hu {
110
84
  max-width: 64px;
111
- } .circular-progress-bar__size-80_29ydx .circular-progress-bar__title_29ydx {
85
+ } .circular-progress-bar__size-80_1x0hu .circular-progress-bar__title_1x0hu {
112
86
  max-height: 24px;
113
- } .circular-progress-bar__size-64_29ydx {
87
+ } .circular-progress-bar__size-64_1x0hu {
114
88
  width: 64px;
115
89
  height: 64px
116
- } .circular-progress-bar__size-64_29ydx .circular-progress-bar__labelWrapper_29ydx {
90
+ } .circular-progress-bar__size-64_1x0hu .circular-progress-bar__labelWrapper_1x0hu {
117
91
  max-width: 48px;
118
- } .circular-progress-bar__size-64_29ydx .circular-progress-bar__title_29ydx {
92
+ } .circular-progress-bar__size-64_1x0hu .circular-progress-bar__title_1x0hu {
119
93
  max-height: 16px;
120
94
  margin: var(--gap-0);
121
- } .circular-progress-bar__size-48_29ydx {
95
+ } .circular-progress-bar__size-48_1x0hu {
122
96
  width: 48px;
123
97
  height: 48px
124
- } .circular-progress-bar__size-48_29ydx .circular-progress-bar__labelWrapper_29ydx {
98
+ } .circular-progress-bar__size-48_1x0hu .circular-progress-bar__labelWrapper_1x0hu {
125
99
  max-width: 40px;
126
- } .circular-progress-bar__size-48_29ydx .circular-progress-bar__title_29ydx {
100
+ } .circular-progress-bar__size-48_1x0hu .circular-progress-bar__title_1x0hu {
127
101
  max-height: 16px;
128
102
  margin: var(--gap-0);
129
- } .circular-progress-bar__size-24_29ydx {
103
+ } .circular-progress-bar__size-24_1x0hu {
130
104
  width: 24px;
131
105
  height: 24px
132
- } .circular-progress-bar__size-24_29ydx .circular-progress-bar__labelWrapper_29ydx {
106
+ } .circular-progress-bar__size-24_1x0hu .circular-progress-bar__labelWrapper_1x0hu {
133
107
  max-width: 24px;
134
- } .circular-progress-bar__backgroundCircle_29ydx,
135
- .circular-progress-bar__progressCircle_29ydx {
108
+ } .circular-progress-bar__backgroundCircle_1x0hu,
109
+ .circular-progress-bar__progressCircle_1x0hu {
136
110
  width: 100%;
137
111
  height: 100%;
138
112
  fill: transparent;
139
- } .circular-progress-bar__positive_29ydx {
113
+ } .circular-progress-bar__positive_1x0hu {
140
114
  stroke: var(--circular-progress-bar-positive-color);
141
- } .circular-progress-bar__negative_29ydx {
115
+ } .circular-progress-bar__negative_1x0hu {
142
116
  stroke: var(--circular-progress-bar-negative-color);
143
- } .circular-progress-bar__backgroundCircle_29ydx {
117
+ } .circular-progress-bar__backgroundCircle_1x0hu {
144
118
  stroke: var(--circular-progress-bar-stroke-color)
145
- } .circular-progress-bar__backgroundCircle_29ydx.circular-progress-bar__stroke_29ydx {
119
+ } .circular-progress-bar__backgroundCircle_1x0hu.circular-progress-bar__stroke_1x0hu {
146
120
  stroke: transparent;
147
- } .circular-progress-bar__progressCircle_29ydx {
121
+ } .circular-progress-bar__progressCircle_1x0hu {
148
122
  stroke-linecap: round;
149
- } .circular-progress-bar__iconWrapper_29ydx {
123
+ } .circular-progress-bar__iconWrapper_1x0hu {
150
124
  display: flex;
151
125
  align-items: center;
152
126
  justify-content: center
153
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__size-144_29ydx {
127
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__size-144_1x0hu {
154
128
  max-width: 64px;
155
129
  max-height: 64px;
156
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__size-128_29ydx {
130
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__size-128_1x0hu {
157
131
  max-width: 64px;
158
132
  max-height: 64px;
159
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__size-96_29ydx {
133
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__size-96_1x0hu {
160
134
  max-width: 48px;
161
135
  max-height: 48px;
162
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__size-80_29ydx {
136
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__size-80_1x0hu {
163
137
  max-width: 48px;
164
138
  max-height: 48px;
165
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__size-64_29ydx {
139
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__size-64_1x0hu {
166
140
  max-width: 36px;
167
141
  max-height: 36px;
168
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__size-48_29ydx {
142
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__size-48_1x0hu {
169
143
  max-width: 24px;
170
144
  max-height: 24px;
171
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__size-24_29ydx {
145
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__size-24_1x0hu {
172
146
  max-width: 16px;
173
147
  max-height: 16px;
174
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__icon-tertiary_29ydx {
148
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__icon-tertiary_1x0hu {
175
149
  color: var(--color-light-neutral-500);
176
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__icon-positive_29ydx {
150
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__icon-positive_1x0hu {
177
151
  color: var(--color-light-status-positive);
178
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__icon-negative_29ydx {
152
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__icon-negative_1x0hu {
179
153
  color: var(--color-light-status-negative);
180
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__icon-primary-inverted_29ydx {
154
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__icon-primary-inverted_1x0hu {
181
155
  color: var(--color-light-neutral-translucent-1300-inverted);
182
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__icon-primary_29ydx {
156
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__icon-primary_1x0hu {
183
157
  color: var(--color-light-neutral-translucent-1300);
184
- } .circular-progress-bar__iconWrapper_29ydx.circular-progress-bar__icon-secondary_29ydx {
158
+ } .circular-progress-bar__iconWrapper_1x0hu.circular-progress-bar__icon-secondary_1x0hu {
185
159
  color: var(--color-light-neutral-700);
186
- } .circular-progress-bar__icon_29ydx {
160
+ } .circular-progress-bar__icon_1x0hu {
187
161
  width: 100%;
188
162
  height: 100%;
189
163
  }
package/index.js CHANGED
@@ -7,3 +7,4 @@ var Component = require('./Component.js');
7
7
 
8
8
 
9
9
  exports.CircularProgressBar = Component.CircularProgressBar;
10
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ require('./index.css');
4
+
5
+ var styles = {"component":"circular-progress-bar__component_1x0hu","bg-positive":"circular-progress-bar__bg-positive_1x0hu","bg-negative":"circular-progress-bar__bg-negative_1x0hu","svg":"circular-progress-bar__svg_1x0hu","title":"circular-progress-bar__title_1x0hu","subtitle":"circular-progress-bar__subtitle_1x0hu","labelWrapper":"circular-progress-bar__labelWrapper_1x0hu","label":"circular-progress-bar__label_1x0hu","typography":"circular-progress-bar__typography_1x0hu","size-144":"circular-progress-bar__size-144_1x0hu","size-128":"circular-progress-bar__size-128_1x0hu","size-96":"circular-progress-bar__size-96_1x0hu","size-80":"circular-progress-bar__size-80_1x0hu","size-64":"circular-progress-bar__size-64_1x0hu","size-48":"circular-progress-bar__size-48_1x0hu","size-24":"circular-progress-bar__size-24_1x0hu","backgroundCircle":"circular-progress-bar__backgroundCircle_1x0hu","progressCircle":"circular-progress-bar__progressCircle_1x0hu","positive":"circular-progress-bar__positive_1x0hu","negative":"circular-progress-bar__negative_1x0hu","stroke":"circular-progress-bar__stroke_1x0hu","iconWrapper":"circular-progress-bar__iconWrapper_1x0hu","icon-tertiary":"circular-progress-bar__icon-tertiary_1x0hu","icon-positive":"circular-progress-bar__icon-positive_1x0hu","icon-negative":"circular-progress-bar__icon-negative_1x0hu","icon-primary-inverted":"circular-progress-bar__icon-primary-inverted_1x0hu","icon-primary":"circular-progress-bar__icon-primary_1x0hu","icon-secondary":"circular-progress-bar__icon-secondary_1x0hu","icon":"circular-progress-bar__icon_1x0hu"};
6
+
7
+ module.exports = styles;
8
+ //# sourceMappingURL=index.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.module.css.js","sources":["src/index.module.css"],"sourcesContent":["@import '../../vars/src/index.css';\n\n:root {\n /* stroke */\n --circular-progress-bar-stroke-color: var(--color-light-neutral-translucent-300);\n\n /* positive */\n --circular-progress-bar-positive-color: var(--color-light-status-positive);\n\n /* negative */\n --circular-progress-bar-negative-color: var(--color-light-status-negative);\n\n /* theme */\n --circular-progress-bar-font-family: var(--font-family-system);\n --circular-progress-bar-font-weight: 600;\n}\n\n.component {\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: var(--border-radius-pill);\n\n &.bg-positive {\n background: var(--circular-progress-bar-positive-color);\n }\n\n &.bg-negative {\n background: var(--circular-progress-bar-negative-color);\n }\n}\n\n.svg {\n display: block;\n width: 100%;\n}\n\n.title,\n.subtitle {\n overflow: hidden;\n word-break: break-word;\n white-space: nowrap;\n text-overflow: ellipsis;\n margin: var(--gap-0) 6px;\n}\n\n.subtitle {\n max-height: 40px;\n}\n\n.labelWrapper {\n text-align: center;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n transform: translate(-50%, -50%);\n\n &.label {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n.typography {\n font-feature-settings: 'ss01';\n font-weight: var(--circular-progress-bar-font-weight);\n font-family: var(--circular-progress-bar-font-family);\n}\n\n.size-144 {\n width: 144px;\n height: 144px;\n\n & .labelWrapper {\n max-width: 128px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-128 {\n width: 128px;\n height: 128px;\n\n & .labelWrapper {\n max-width: 108px;\n }\n\n & .title {\n max-height: 32px;\n }\n}\n\n.size-96 {\n width: 96px;\n height: 96px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 20px;\n }\n}\n\n.size-80 {\n width: 80px;\n height: 80px;\n\n & .labelWrapper {\n max-width: 64px;\n }\n\n & .title {\n max-height: 24px;\n }\n}\n\n.size-64 {\n width: 64px;\n height: 64px;\n\n & .labelWrapper {\n max-width: 48px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-48 {\n width: 48px;\n height: 48px;\n\n & .labelWrapper {\n max-width: 40px;\n }\n\n & .title {\n max-height: 16px;\n margin: var(--gap-0);\n }\n}\n\n.size-24 {\n width: 24px;\n height: 24px;\n\n & .labelWrapper {\n max-width: 24px;\n }\n}\n\n.backgroundCircle,\n.progressCircle {\n width: 100%;\n height: 100%;\n fill: transparent;\n}\n\n.positive {\n stroke: var(--circular-progress-bar-positive-color);\n}\n\n.negative {\n stroke: var(--circular-progress-bar-negative-color);\n}\n\n.backgroundCircle {\n stroke: var(--circular-progress-bar-stroke-color);\n\n &.stroke {\n stroke: transparent;\n }\n}\n\n.progressCircle {\n stroke-linecap: round;\n}\n\n.iconWrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.size-144 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-128 {\n max-width: 64px;\n max-height: 64px;\n }\n\n &.size-96 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-80 {\n max-width: 48px;\n max-height: 48px;\n }\n\n &.size-64 {\n max-width: 36px;\n max-height: 36px;\n }\n\n &.size-48 {\n max-width: 24px;\n max-height: 24px;\n }\n\n &.size-24 {\n max-width: 16px;\n max-height: 16px;\n }\n\n &.icon-tertiary {\n color: var(--color-light-neutral-500);\n }\n\n &.icon-positive {\n color: var(--color-light-status-positive);\n }\n\n &.icon-negative {\n color: var(--color-light-status-negative);\n }\n\n &.icon-primary-inverted {\n color: var(--color-light-neutral-translucent-1300-inverted);\n }\n\n &.icon-primary {\n color: var(--color-light-neutral-translucent-1300);\n }\n\n &.icon-secondary {\n color: var(--color-light-neutral-700);\n }\n}\n\n.icon {\n width: 100%;\n height: 100%;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wCAAwC,CAAC,aAAa,CAAC,0CAA0C,CAAC,aAAa,CAAC,0CAA0C,CAAC,KAAK,CAAC,kCAAkC,CAAC,OAAO,CAAC,oCAAoC,CAAC,UAAU,CAAC,uCAAuC,CAAC,cAAc,CAAC,2CAA2C,CAAC,OAAO,CAAC,oCAAoC,CAAC,YAAY,CAAC,yCAAyC,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,SAAS,CAAC,sCAAsC,CAAC,kBAAkB,CAAC,+CAA+C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,UAAU,CAAC,uCAAuC,CAAC,UAAU,CAAC,uCAAuC,CAAC,QAAQ,CAAC,qCAAqC,CAAC,aAAa,CAAC,0CAA0C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,eAAe,CAAC,4CAA4C,CAAC,uBAAuB,CAAC,oDAAoD,CAAC,cAAc,CAAC,2CAA2C,CAAC,gBAAgB,CAAC,6CAA6C,CAAC,MAAM,CAAC,mCAAmC,CAAC;;;;"}
@@ -1,13 +1,11 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import cn from 'classnames';
3
- import { isObject, getDataTestId } from '@alfalab/core-components-shared/modern';
4
- import { Text, TitleMobile } from '@alfalab/core-components-typography/modern';
3
+ import { isObject, noop, getDataTestId } from '@alfalab/core-components-shared/modern';
4
+ import { TitleMobile, Text } from '@alfalab/core-components-typography/modern';
5
5
  import { isTypographyColor } from './utils/is-typography-color.js';
6
- import { MIN_TIMER_VALUE, MAX_TIMER_VALUE, STROKE, SIZES, TYPOGRAPHY_COLOR, SIZE_TO_CLASSNAME_MAP, MAX_PROGRESS_VALUE, VIEW_TITLE, VIEW_TEXT } from './consts.js';
6
+ import { MIN_TIMER_VALUE, MAX_TIMER_VALUE, STROKE, SIZES, TYPOGRAPHY_COLOR, SIZE_TO_CLASSNAME_MAP, VIEW_TITLE, VIEW_TEXT, MAX_PROGRESS_VALUE } from './consts.js';
7
7
  import { useTimer } from './use-timer.js';
8
-
9
- const styles = {"component":"circular-progress-bar__component_29ydx","bg-positive":"circular-progress-bar__bg-positive_29ydx","bg-negative":"circular-progress-bar__bg-negative_29ydx","svg":"circular-progress-bar__svg_29ydx","title":"circular-progress-bar__title_29ydx","subtitle":"circular-progress-bar__subtitle_29ydx","labelWrapper":"circular-progress-bar__labelWrapper_29ydx","label":"circular-progress-bar__label_29ydx","typography":"circular-progress-bar__typography_29ydx","size-144":"circular-progress-bar__size-144_29ydx","size-128":"circular-progress-bar__size-128_29ydx","size-96":"circular-progress-bar__size-96_29ydx","size-80":"circular-progress-bar__size-80_29ydx","size-64":"circular-progress-bar__size-64_29ydx","size-48":"circular-progress-bar__size-48_29ydx","size-24":"circular-progress-bar__size-24_29ydx","backgroundCircle":"circular-progress-bar__backgroundCircle_29ydx","progressCircle":"circular-progress-bar__progressCircle_29ydx","positive":"circular-progress-bar__positive_29ydx","negative":"circular-progress-bar__negative_29ydx","stroke":"circular-progress-bar__stroke_29ydx","iconWrapper":"circular-progress-bar__iconWrapper_29ydx","icon-tertiary":"circular-progress-bar__icon-tertiary_29ydx","icon-positive":"circular-progress-bar__icon-positive_29ydx","icon-negative":"circular-progress-bar__icon-negative_29ydx","icon-primary-inverted":"circular-progress-bar__icon-primary-inverted_29ydx","icon-primary":"circular-progress-bar__icon-primary_29ydx","icon-secondary":"circular-progress-bar__icon-secondary_29ydx","icon":"circular-progress-bar__icon_29ydx"};
10
- require('./index.css')
8
+ import styles from './index.module.css.js';
11
9
 
12
10
  /* eslint-disable complexity */
13
11
  /**
@@ -15,7 +13,7 @@ require('./index.css')
15
13
  */
16
14
  const CircularProgressBar = ({ value: valueFromProps, view = 'positive', size = 64, className, dataTestId, title: titleFromProps = isObject(valueFromProps) ? null : `${valueFromProps}`, titleComplete, subtitle, contentColor = 'secondary', subtitleComplete, stroke = true, fillComplete, icon: Icon, iconComplete: IconComplete, completeTextColor, completeIconColor = 'tertiary', direction = 'clockwise', height, children, progressStrokeColor, circleColor, strokeColor, directionType = 'asc', titleColor, subtitleColor, }) => {
17
15
  const isTimer = isObject(valueFromProps);
18
- const [timerValue, timerTitle] = useTimer(isTimer ? Math.min(Math.max(valueFromProps.timer, MIN_TIMER_VALUE), MAX_TIMER_VALUE) : -1, isTimer, isTimer ? valueFromProps.counting ?? 'backward' : 'backward');
16
+ const [timerValue, timerTitle] = useTimer(isTimer ? Math.min(Math.max(valueFromProps.timer, MIN_TIMER_VALUE), MAX_TIMER_VALUE) : -1, isTimer, isTimer ? valueFromProps.counting ?? 'backward' : 'backward', isTimer ? valueFromProps.onFinish ?? noop : noop);
19
17
  let value;
20
18
  let title;
21
19
  if (isTimer) {
@@ -107,10 +105,11 @@ const CircularProgressBar = ({ value: valueFromProps, view = 'positive', size =
107
105
  ...(progressStrokeColor && { stroke: progressStrokeColor }),
108
106
  }, cx: memorized.center, cy: memorized.center, r: memorized.radius, strokeWidth: STROKE[size], strokeDasharray: memorized.strokeDasharray, strokeDashoffset: direction === 'counter-clockwise'
109
107
  ? -memorized.strokeDashoffset
110
- : memorized.strokeDashoffset, transform: `rotate(${-90} ${memorized.center} ${memorized.center})`, "data-test-id": getDataTestId(dataTestId, 'circle-progress-value') })),
108
+ : memorized.strokeDashoffset, transform: `rotate(${ -90} ${memorized.center} ${memorized.center})`, "data-test-id": getDataTestId(dataTestId, 'circle-progress-value') })),
111
109
  React.createElement("div", { className: cn(styles.labelWrapper, {
112
110
  [styles.label]: Icon || IconComplete,
113
111
  }) }, children || renderContent())));
114
112
  };
115
113
 
116
114
  export { CircularProgressBar };
115
+ //# sourceMappingURL=Component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Component.js","sources":["../../src/Component.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React, { ElementType, ReactNode, useMemo } from 'react';\nimport cn from 'classnames';\n\nimport { getDataTestId, isObject, noop } from '@alfalab/core-components-shared';\nimport { Text, TitleMobile } from '@alfalab/core-components-typography';\n\nimport { ComponentSize } from './types/component-size';\nimport { TypographyColor } from './types/typography-color';\nimport { isTypographyColor } from './utils/is-typography-color';\nimport {\n MAX_PROGRESS_VALUE,\n MAX_TIMER_VALUE,\n MIN_TIMER_VALUE,\n SIZE_TO_CLASSNAME_MAP,\n SIZES,\n STROKE,\n TYPOGRAPHY_COLOR,\n VIEW_TEXT,\n VIEW_TITLE,\n} from './consts';\nimport { useTimer } from './use-timer';\n\nimport styles from './index.module.css';\n\nexport type CircularProgressBarProps = {\n /**\n * Уровень прогресса, %\n */\n\n value:\n | number\n | {\n /**\n * Время таймера в секундах\n * Минимальное значение 0\n * Максимальное значение 3600\n */\n timer: number;\n /**\n * Направлние отсчета таймера\n * forward: считаем от 0 до указанного значения\n * backward: считаем от указанного значения до 0\n * @default backward\n */\n counting?: 'forward' | 'backward';\n /**\n * Обработчик завершения таймера\n */\n onFinish?: () => void;\n };\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Основной текст\n */\n title?: ReactNode;\n\n /**\n * Цвет контента\n */\n contentColor?: TypographyColor | string;\n\n /**\n * Цвет заголовка\n * Приоритет выше чем у `contentColor`\n */\n titleColor?: TypographyColor | string;\n\n /**\n * Цвет подзаголовка\n * Приоритет выше чем у `contentColor`\n */\n subtitleColor?: TypographyColor | string;\n\n /**\n * Дополнительный текст\n */\n subtitle?: ReactNode;\n\n /**\n * Основной текст при 100%\n */\n titleComplete?: ReactNode;\n\n /**\n * Дополнительный текст при 100%\n */\n subtitleComplete?: ReactNode;\n\n /**\n * Цвет заполнения\n */\n view?: 'positive' | 'negative';\n\n /**\n * Размер (xxl — 144×144px, xl — 128×128px, l — 80×80px, m — 64×64px, s — 48×48px, xs — 24×24px)\n * @description xs, s, m, l, xl, xxl deprecated, используйте вместо них 24, 48, 64, 80, 128, 144 соответственно\n * @default 64\n */\n size?: ComponentSize;\n\n /**\n * Наличие желоба\n */\n stroke?: boolean;\n\n /**\n * Заливка при 100%\n */\n fillComplete?: boolean;\n\n /**\n * Цвет текста при 100%\n */\n completeTextColor?: 'primary' | 'primary-inverted' | 'positive' | 'negative';\n\n /**\n * Цвет иконки при 100%\n */\n completeIconColor?: 'primary-inverted' | 'positive' | 'negative' | 'tertiary';\n\n /**\n * Компонент иконки\n */\n icon?: ElementType<{ className?: string }>;\n\n /**\n * Компонент иконки при 100%\n */\n iconComplete?: ElementType<{ className?: string }>;\n\n /**\n * Направление прогресса (clockwise - по часовой стрелке, counter-clockwise - против часовой стрелки)\n */\n direction?: 'clockwise' | 'counter-clockwise';\n\n /**\n * Высота компонента, min = 24; max = 144\n * использовать совместно с size :\n * xxl от 144\n * xl от 128 до 143\n * l от 80 до 127\n * m от 64 до 79\n * s от 48 до 63\n * xs от 24 до 47\n */\n height?: number;\n\n /**\n * Id компонента для тестов\n */\n dataTestId?: string;\n\n /**\n * Дочерние элементы\n */\n children?: ReactNode;\n\n /**\n * Цвет прогресса\n */\n progressStrokeColor?: string;\n\n /**\n * Цвет заливки внутри круга\n */\n circleColor?: string;\n\n /**\n * Цвет желоба\n */\n strokeColor?: string;\n\n /**\n * Направление заполнения круга\n * @default desc\n */\n directionType?: 'asc' | 'desc';\n};\n\n/**\n * Компонент круглого прогресс бара.\n */\nexport const CircularProgressBar: React.FC<CircularProgressBarProps> = ({\n value: valueFromProps,\n view = 'positive',\n size = 64,\n className,\n dataTestId,\n title: titleFromProps = isObject(valueFromProps) ? null : `${valueFromProps}`,\n titleComplete,\n subtitle,\n contentColor = 'secondary',\n subtitleComplete,\n stroke = true,\n fillComplete,\n icon: Icon,\n iconComplete: IconComplete,\n completeTextColor,\n completeIconColor = 'tertiary',\n direction = 'clockwise',\n height,\n children,\n progressStrokeColor,\n circleColor,\n strokeColor,\n directionType = 'asc',\n titleColor,\n subtitleColor,\n}) => {\n const isTimer = isObject(valueFromProps);\n const [timerValue, timerTitle] = useTimer(\n isTimer ? Math.min(Math.max(valueFromProps.timer, MIN_TIMER_VALUE), MAX_TIMER_VALUE) : -1,\n isTimer,\n isTimer ? valueFromProps.counting ?? 'backward' : 'backward',\n isTimer ? valueFromProps.onFinish ?? noop : noop,\n );\n let value: number;\n let title: React.ReactNode;\n\n if (isTimer) {\n value = timerValue;\n title = timerTitle;\n } else {\n value = valueFromProps;\n title = titleFromProps;\n }\n\n value = directionType === 'desc' ? MAX_PROGRESS_VALUE - value : value;\n\n const memorized = useMemo(() => {\n const strokeWidth = STROKE[size];\n const maxProgress = 100;\n const minProgress = 0;\n const widthSVG = SIZES[size];\n const heightSVG = SIZES[size];\n const center = widthSVG / 2;\n const radius = center - strokeWidth / 2;\n const circumference = Math.PI * radius * 2;\n const progress = Math.min(Math.max(value, minProgress), maxProgress);\n const strokeDasharray = circumference.toFixed(3);\n const strokeDashoffset = (((100 - progress) / 100) * circumference).toFixed(3);\n\n return {\n widthSVG,\n heightSVG,\n center,\n radius,\n strokeDasharray,\n strokeDashoffset,\n };\n }, [size, value]);\n\n const isComplete = value === 100;\n const isCompleteTextColor = isComplete && completeTextColor;\n const titleContent = titleComplete && isComplete ? titleComplete : title;\n const subtitleContent = subtitleComplete && isComplete ? subtitleComplete : subtitle;\n const IconComponent = IconComplete && isComplete ? IconComplete : Icon;\n\n const typographyContentColor = TYPOGRAPHY_COLOR.includes(contentColor)\n ? (contentColor as TypographyColor)\n : undefined;\n\n const getTextColor = (color?: TypographyColor | string) => {\n if (isCompleteTextColor) {\n return completeTextColor;\n }\n\n if (color) {\n return isTypographyColor(color) ? color : undefined;\n }\n\n return typographyContentColor;\n };\n\n const getTextStyleColor = (color?: TypographyColor | string) => {\n if (color) {\n if (!isTypographyColor(color)) {\n return { color };\n }\n\n return {};\n }\n\n return {\n ...(!typographyContentColor && { color: contentColor }),\n };\n };\n\n const renderTitleString = () =>\n SIZES[size] > 64 ? (\n <TitleMobile\n className={cn(styles.typography, styles.title)}\n color={getTextColor(titleColor)}\n tag='div'\n font='system'\n view={VIEW_TITLE[size]}\n style={{\n ...getTextStyleColor(titleColor),\n }}\n dataTestId={getDataTestId(dataTestId, 'title')}\n >\n {titleContent}\n </TitleMobile>\n ) : (\n <Text\n className={styles.title}\n color={getTextColor(titleColor)}\n tag='div'\n weight='bold'\n view={VIEW_TEXT[size]}\n style={{\n ...getTextStyleColor(titleColor),\n }}\n dataTestId={getDataTestId(dataTestId, 'title')}\n >\n {titleContent}\n </Text>\n );\n\n const renderTitle = () => (typeof title === 'string' ? renderTitleString() : titleContent);\n\n const renderSubTitle = () =>\n typeof subtitle === 'string' ? (\n <Text\n tag='div'\n className={styles.subtitle}\n color={getTextColor(subtitleColor)}\n view='primary-small'\n dataTestId={getDataTestId(dataTestId, 'subtitle')}\n style={{\n ...getTextStyleColor(subtitleColor),\n }}\n >\n {subtitleContent}\n </Text>\n ) : (\n subtitleContent\n );\n\n const renderIcon = () => (\n <span\n className={cn(\n styles.iconWrapper,\n styles[SIZE_TO_CLASSNAME_MAP[size]],\n styles.tertiary,\n styles[`icon-${contentColor}`],\n {\n [styles[`icon-${completeIconColor}`]]: completeIconColor,\n },\n )}\n >\n {IconComponent && <IconComponent className={styles.icon} />}\n </span>\n );\n\n const renderContent = () =>\n Icon || (IconComplete && isComplete) ? (\n renderIcon()\n ) : (\n <React.Fragment>\n {SIZES[size] > 24 && renderTitle()}\n {SIZES[size] > 64 && renderSubTitle()}\n </React.Fragment>\n );\n\n return (\n <div\n className={cn(styles.component, styles[SIZE_TO_CLASSNAME_MAP[size]], className, {\n [styles[`bg-${view}`]]: fillComplete && isComplete,\n })}\n style={{\n ...(height && { height, width: height }),\n ...(circleColor && { backgroundColor: circleColor }),\n }}\n data-test-id={dataTestId}\n >\n <svg\n viewBox={`0 0 ${memorized.widthSVG} ${memorized.heightSVG}`}\n className={styles.svg}\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle\n className={cn(styles.backgroundCircle, styles[SIZE_TO_CLASSNAME_MAP[size]], {\n [styles.stroke]: !stroke,\n })}\n style={{\n ...(strokeColor && stroke && { stroke: strokeColor }),\n }}\n cx={memorized.center}\n cy={memorized.center}\n r={memorized.radius}\n strokeWidth={STROKE[size]}\n data-test-id={getDataTestId(dataTestId, 'circle-progress-bar')}\n />\n <circle\n className={cn(\n styles.progressCircle,\n styles[view],\n styles[SIZE_TO_CLASSNAME_MAP[size]],\n )}\n style={{\n ...(progressStrokeColor && { stroke: progressStrokeColor }),\n }}\n cx={memorized.center}\n cy={memorized.center}\n r={memorized.radius}\n strokeWidth={STROKE[size]}\n strokeDasharray={memorized.strokeDasharray}\n strokeDashoffset={\n direction === 'counter-clockwise'\n ? -memorized.strokeDashoffset\n : memorized.strokeDashoffset\n }\n transform={`rotate(${-90} ${memorized.center} ${memorized.center})`}\n data-test-id={getDataTestId(dataTestId, 'circle-progress-value')}\n />\n </svg>\n <div\n className={cn(styles.labelWrapper, {\n [styles.label]: Icon || IconComplete,\n })}\n >\n {children || renderContent()}\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAyLA;;AAEG;MACU,mBAAmB,GAAuC,CAAC,EACpE,KAAK,EAAE,cAAc,EACrB,IAAI,GAAG,UAAU,EACjB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SIZES, SIZE_TO_CLASSNAME_MAP, STROKE, TYPOGRAPHY_COLOR, VIEW_TEXT, VIEW_TITLE };
82
+ //# sourceMappingURL=consts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sources":["../../src/consts.ts"],"sourcesContent":["export const SIZES = {\n xs: 24,\n s: 48,\n m: 64,\n l: 80,\n xl: 128,\n xxl: 144,\n 24: 24,\n 48: 48,\n 64: 64,\n 80: 80,\n 96: 96,\n 128: 128,\n 144: 144,\n};\n\nexport const STROKE = {\n xs: 4,\n s: 4,\n m: 6,\n l: 8,\n xl: 10,\n xxl: 12,\n 24: 4,\n 48: 4,\n 64: 6,\n 80: 8,\n 96: 8,\n 128: 10,\n 144: 12,\n};\n\nexport const VIEW_TITLE = {\n xs: 'small',\n s: 'small',\n m: 'small',\n l: 'xsmall',\n xl: 'medium',\n xxl: 'medium',\n 24: 'small',\n 48: 'small',\n 64: 'small',\n 80: 'xsmall',\n 96: 'xsmall',\n 128: 'medium',\n 144: 'medium',\n} as const;\n\nexport const VIEW_TEXT = {\n xs: 'secondary-small',\n s: 'secondary-small',\n m: 'secondary-large',\n l: 'secondary-large',\n xl: 'secondary-large',\n xxl: 'secondary-large',\n 24: 'secondary-small',\n 48: 'secondary-small',\n 64: 'secondary-large',\n 80: 'secondary-large',\n 96: 'secondary-large',\n 128: 'secondary-large',\n 144: 'secondary-large',\n} as const;\n\nexport const TYPOGRAPHY_COLOR = ['primary', 'secondary', 'tertiary', 'positive', 'negative'];\n\nexport const SIZE_TO_CLASSNAME_MAP = {\n xs: 'size-24',\n s: 'size-48',\n m: 'size-64',\n l: 'size-80',\n xl: 'size-128',\n xxl: 'size-144',\n 24: 'size-24',\n 48: 'size-48',\n 64: 'size-64',\n 80: 'size-80',\n 96: 'size-96',\n 128: 'size-128',\n 144: 'size-144',\n};\n\nexport const MAX_PROGRESS_VALUE = 100;\n\nexport const MIN_TIMER_VALUE = 0;\nexport const MAX_TIMER_VALUE = 3599;\n"],"names":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