@alfalab/core-components-circular-progress-bar 5.0.14 → 5.0.15
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.
- package/Component.js.map +1 -1
- package/consts.js.map +1 -1
- package/cssm/Component.js.map +1 -1
- package/cssm/consts.js.map +1 -1
- package/cssm/use-timer.js.map +1 -1
- package/cssm/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/cssm/utils/is-typography-color.js.map +1 -1
- package/esm/Component.js.map +1 -1
- package/esm/consts.js.map +1 -1
- package/esm/index.css +53 -53
- package/esm/index.module.css.js +1 -1
- package/esm/index.module.css.js.map +1 -1
- package/esm/use-timer.js.map +1 -1
- package/esm/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/esm/utils/is-typography-color.js.map +1 -1
- package/index.css +53 -53
- package/index.module.css.js +1 -1
- package/index.module.css.js.map +1 -1
- package/modern/Component.js +1 -1
- package/modern/Component.js.map +1 -1
- package/modern/consts.js.map +1 -1
- package/modern/index.css +53 -53
- package/modern/index.module.css.js +1 -1
- package/modern/index.module.css.js.map +1 -1
- package/modern/use-timer.js.map +1 -1
- package/modern/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/modern/utils/is-typography-color.js.map +1 -1
- package/moderncssm/Component.js +1 -1
- package/moderncssm/Component.js.map +1 -1
- package/moderncssm/consts.js.map +1 -1
- package/moderncssm/use-timer.js.map +1 -1
- package/moderncssm/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/moderncssm/utils/is-typography-color.js.map +1 -1
- package/package.json +4 -4
- package/use-timer.js.map +1 -1
- package/utils/get-circular-progress-bar-test-ids.js.map +1 -1
- package/utils/is-typography-color.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-circular-progress-bar",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@alfalab/core-components-shared": "^2.4.0",
|
|
17
|
-
"@alfalab/core-components-typography": "^6.0.
|
|
17
|
+
"@alfalab/core-components-typography": "^6.0.15",
|
|
18
18
|
"classnames": "^2.5.1",
|
|
19
19
|
"tslib": "^2.4.0"
|
|
20
20
|
},
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"access": "public",
|
|
27
27
|
"directory": "dist"
|
|
28
28
|
},
|
|
29
|
-
"themesVersion": "15.2.
|
|
30
|
-
"varsVersion": "11.
|
|
29
|
+
"themesVersion": "15.2.2",
|
|
30
|
+
"varsVersion": "11.6.1"
|
|
31
31
|
}
|
package/use-timer.js.map
CHANGED
|
@@ -1 +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\n// eslint-disable-next-line max-params\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":["useState","useEffect","noop"],"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,
|
|
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\n// eslint-disable-next-line max-params\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":["useState","useEffect","noop"],"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,EAAA,GAAA,CAAA,CAAA,MAAA,CAAI,EAAA,CAAA,MAAA,CAAG,IAAI,GAAG,EAAE,CAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAE;AACxE;AAEA;AACM,SAAU,QAAQ,CACpB,IAAY,EACZ,MAAa,EACb,QAAgC,EAChC,QAAoB,EACpB,QAAe,EACf,IAAQ,EA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ular-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":["getDataTestId"],"mappings":";;;;;;AAEM,SAAU,6BAA6B,CAAC,UAAkB,EAAA;IAC5D,OAAO;AACH,QAAA,WAAW,EAAE,UAAU;AACvB,QAAA,KAAK,EAAEA,kCAAa,CAAC,UAAU,EAAE,OAAO,CAAC;AACzC,QAAA,QAAQ,EAAEA,kCAAa,CAAC,UAAU,EAAE,UAAU,CAAC;AAC/C,QAAA,iBAAiB,EAAEA,kCAAa,CAAC,UAAU,EAAE,qBAAqB,CAAC;AACnE,QAAA,mBAAmB,EAAEA,kCAAa,CAAC,UAAU,EAAE,uBAAuB,CAAC;KAC1E;AACL
|
|
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":["getDataTestId"],"mappings":";;;;;;AAEM,SAAU,6BAA6B,CAAC,UAAkB,EAAA;IAC5D,OAAO;AACH,QAAA,WAAW,EAAE,UAAU;AACvB,QAAA,KAAK,EAAEA,kCAAa,CAAC,UAAU,EAAE,OAAO,CAAC;AACzC,QAAA,QAAQ,EAAEA,kCAAa,CAAC,UAAU,EAAE,UAAU,CAAC;AAC/C,QAAA,iBAAiB,EAAEA,kCAAa,CAAC,UAAU,EAAE,qBAAqB,CAAC;AACnE,QAAA,mBAAmB,EAAEA,kCAAa,CAAC,UAAU,EAAE,uBAAuB,CAAC;KAC1E;AACL;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-typography-color.js","sources":["../src/utils/is-typography-color.ts"],"sourcesContent":["import { TYPOGRAPHY_COLOR } from '../consts';\nimport { type TypographyColor } from '../types/typography-color';\n\nexport const isTypographyColor = (color: TypographyColor | string): color is TypographyColor =>\n TYPOGRAPHY_COLOR.includes(color);\n"],"names":["TYPOGRAPHY_COLOR"],"mappings":";;;;;;AAGO,IAAM,iBAAiB,GAAG,UAAC,KAA+B,EAAA;AAC7D,IAAA,OAAAA,uBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAAhC
|
|
1
|
+
{"version":3,"file":"is-typography-color.js","sources":["../src/utils/is-typography-color.ts"],"sourcesContent":["import { TYPOGRAPHY_COLOR } from '../consts';\nimport { type TypographyColor } from '../types/typography-color';\n\nexport const isTypographyColor = (color: TypographyColor | string): color is TypographyColor =>\n TYPOGRAPHY_COLOR.includes(color);\n"],"names":["TYPOGRAPHY_COLOR"],"mappings":";;;;;;AAGO,IAAM,iBAAiB,GAAG,UAAC,KAA+B,EAAA;AAC7D,IAAA,OAAAA,uBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC;AAAhC;;"}
|