@hh.ru/magritte-ui-progress-bar 5.0.17 → 5.0.19
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/ProgressBar.js +1 -1
- package/ProgressBar.js.map +1 -1
- package/SegmentedProgressBar.js +1 -1
- package/SegmentedProgressBar.js.map +1 -1
- package/SingleProgressBar.js +1 -1
- package/SingleProgressBar.js.map +1 -1
- package/Skeleton.js +1 -1
- package/Skeleton.js.map +1 -1
- package/index.css +52 -52
- package/index.js +1 -1
- package/index.mock.js.map +1 -1
- package/package.json +5 -5
- package/progress-bar-CcK4BYMw.js +5 -0
- package/progress-bar-CcK4BYMw.js.map +1 -0
- package/types.js.map +1 -1
- package/progress-bar-D13Gahfd.js +0 -5
- package/progress-bar-D13Gahfd.js.map +0 -1
package/ProgressBar.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ProgressBarSkeleton } from './Skeleton.js';
|
|
|
6
6
|
import { enrichWithSkeleton } from '@hh.ru/magritte-ui-skeleton';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'classnames';
|
|
9
|
-
import './progress-bar-
|
|
9
|
+
import './progress-bar-CcK4BYMw.js';
|
|
10
10
|
|
|
11
11
|
const ProgressBarComponent = (props) => {
|
|
12
12
|
const isSegmented = props.segments !== undefined;
|
package/ProgressBar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sources":["
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["src/ProgressBar.tsx"],"sourcesContent":["import { FC } from 'react';\n\nimport { SegmentedProgressBar } from '@hh.ru/magritte-ui-progress-bar/SegmentedProgressBar';\nimport { SingleProgressBar } from '@hh.ru/magritte-ui-progress-bar/SingleProgressBar';\nimport { ProgressBarSkeleton } from '@hh.ru/magritte-ui-progress-bar/Skeleton';\nimport { ProgressBarProps } from '@hh.ru/magritte-ui-progress-bar/types';\nimport { enrichWithSkeleton } from '@hh.ru/magritte-ui-skeleton';\n\nconst ProgressBarComponent: FC<ProgressBarProps> & { isProgressBar: true } = (props) => {\n const isSegmented = props.segments !== undefined;\n return isSegmented ? <SegmentedProgressBar {...props} /> : <SingleProgressBar {...props} />;\n};\nProgressBarComponent.isProgressBar = true;\n\nexport const ProgressBar = enrichWithSkeleton(ProgressBarComponent, ProgressBarSkeleton);\n"],"names":["_jsx"],"mappings":";;;;;;;;;AAQA,MAAM,oBAAoB,GAAmD,CAAC,KAAK,KAAI;AACnF,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC;AACjD,IAAA,OAAO,WAAW,GAAGA,GAAA,CAAC,oBAAoB,EAAK,EAAA,GAAA,KAAK,EAAI,CAAA,GAAGA,GAAA,CAAC,iBAAiB,EAAK,EAAA,GAAA,KAAK,GAAI,CAAC;AAChG,CAAC,CAAC;AACF,oBAAoB,CAAC,aAAa,GAAG,IAAI,CAAC;AAE7B,MAAA,WAAW,GAAG,kBAAkB,CAAC,oBAAoB,EAAE,mBAAmB;;;;"}
|
package/SegmentedProgressBar.js
CHANGED
|
@@ -2,7 +2,7 @@ import './index.css';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect, useLayoutEffect } from 'react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import { s as styles } from './progress-bar-
|
|
5
|
+
import { s as styles } from './progress-bar-CcK4BYMw.js';
|
|
6
6
|
|
|
7
7
|
const STYLE_TO_CSS = {
|
|
8
8
|
accent: styles.segmentedContainerStyleAccent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedProgressBar.js","sources":["
|
|
1
|
+
{"version":3,"file":"SegmentedProgressBar.js","sources":["src/SegmentedProgressBar.tsx"],"sourcesContent":["import { FC, useRef, useEffect, useLayoutEffect, useState } from 'react';\nimport classnames from 'classnames';\n\nimport { ProgressBarSegmentedProps } from '@hh.ru/magritte-ui-progress-bar/types';\n\nimport styles from './progress-bar.less';\n\nconst STYLE_TO_CSS = {\n accent: styles.segmentedContainerStyleAccent,\n positive: styles.segmentedContainerStylePositive,\n special: styles.segmentedContainerStyleSpecial,\n warning: styles.segmentedContainerStyleWarning,\n negative: styles.segmentedContainerStyleNegative,\n};\nexport const SegmentedProgressBar: FC<ProgressBarSegmentedProps> = ({\n segments,\n progress,\n style = 'accent',\n 'data-qa': dataQA = 'progress',\n 'aria-label': ariaLabel,\n}) => {\n const prevProgress = useRef(progress);\n const [animationTimeout, setAnimationTimeout] = useState(0);\n useEffect(() => {\n prevProgress.current = progress;\n }, [progress]);\n\n useLayoutEffect(() => {\n const animationTimeoutElement = document.createElement('div');\n animationTimeoutElement.classList.add(styles.progressAnimationTimeout);\n document.body.appendChild(animationTimeoutElement);\n const style = window.getComputedStyle(animationTimeoutElement);\n const animationTimeout = parseInt(style.getPropertyValue(`--animation-duration`), 10);\n if (Number.isInteger(animationTimeout)) {\n setAnimationTimeout(animationTimeout);\n }\n document.body.removeChild(animationTimeoutElement);\n }, []);\n\n return (\n <div\n className={classnames(styles.segmentedContainer, STYLE_TO_CSS[style])}\n data-qa={dataQA}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={segments}\n aria-valuenow={progress}\n aria-label={ariaLabel}\n >\n {[...Array(segments).keys()].map((_, i) => {\n let delay = 0;\n const direction = progress - prevProgress.current >= 0 ? 0 : -1;\n const startSelection = prevProgress.current + direction;\n if (i === startSelection) {\n delay = 0;\n } else {\n delay = Math.abs(i - startSelection) * animationTimeout;\n }\n return (\n <div\n key={i}\n className={classnames(styles.segment, {\n [styles.filled]: i < progress,\n })}\n style={{ transitionDelay: `${delay}ms` }}\n data-qa=\"progress-segment\"\n />\n );\n })}\n </div>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;AAOA,MAAM,YAAY,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC,6BAA6B;IAC5C,QAAQ,EAAE,MAAM,CAAC,+BAA+B;IAChD,OAAO,EAAE,MAAM,CAAC,8BAA8B;IAC9C,OAAO,EAAE,MAAM,CAAC,8BAA8B;IAC9C,QAAQ,EAAE,MAAM,CAAC,+BAA+B;CACnD,CAAC;AACW,MAAA,oBAAoB,GAAkC,CAAC,EAChE,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,QAAQ,EAChB,SAAS,EAAE,MAAM,GAAG,UAAU,EAC9B,YAAY,EAAE,SAAS,GAC1B,KAAI;AACD,IAAA,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACtC,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC5D,SAAS,CAAC,MAAK;AACX,QAAA,YAAY,CAAC,OAAO,GAAG,QAAQ,CAAC;AACpC,KAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,eAAe,CAAC,MAAK;QACjB,MAAM,uBAAuB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC9D,uBAAuB,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;AACvE,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;QACnD,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;AAC/D,QAAA,MAAM,gBAAgB,GAAG,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAsB,oBAAA,CAAA,CAAC,EAAE,EAAE,CAAC,CAAC;AACtF,QAAA,IAAI,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE;YACpC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;SACzC;AACD,QAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;KACtD,EAAE,EAAE,CAAC,CAAC;IAEP,QACIA,aACI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,kBAAkB,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,EAC5D,SAAA,EAAA,MAAM,EACf,IAAI,EAAC,aAAa,EAAA,eAAA,EACH,CAAC,EAAA,eAAA,EACD,QAAQ,EACR,eAAA,EAAA,QAAQ,gBACX,SAAS,EAAA,QAAA,EAEpB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;YACtC,IAAI,KAAK,GAAG,CAAC,CAAC;AACd,YAAA,MAAM,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAChE,YAAA,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;AACxD,YAAA,IAAI,CAAC,KAAK,cAAc,EAAE;gBACtB,KAAK,GAAG,CAAC,CAAC;aACb;iBAAM;gBACH,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG,gBAAgB,CAAC;aAC3D;YACD,QACIA,aAEI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE;AAClC,oBAAA,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ;AAChC,iBAAA,CAAC,EACF,KAAK,EAAE,EAAE,eAAe,EAAE,CAAG,EAAA,KAAK,CAAI,EAAA,CAAA,EAAE,aAChC,kBAAkB,EAAA,EALrB,CAAC,CAMR,EACJ;SACL,CAAC,EACA,CAAA,EACR;AACN;;;;"}
|
package/SingleProgressBar.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { s as styles } from './progress-bar-
|
|
4
|
+
import { s as styles } from './progress-bar-CcK4BYMw.js';
|
|
5
5
|
|
|
6
6
|
const STYLE_TO_CSS = {
|
|
7
7
|
accent: styles.progressStyleAccent,
|
package/SingleProgressBar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleProgressBar.js","sources":["
|
|
1
|
+
{"version":3,"file":"SingleProgressBar.js","sources":["src/SingleProgressBar.tsx"],"sourcesContent":["import { FC } from 'react';\nimport classnames from 'classnames';\n\nimport { ProgressBarSingleProps } from '@hh.ru/magritte-ui-progress-bar/types';\n\nimport styles from './progress-bar.less';\n\nconst STYLE_TO_CSS = {\n accent: styles.progressStyleAccent,\n positive: styles.progressStylePositive,\n special: styles.progressStyleSpecial,\n warning: styles.progressStyleWarning,\n negative: styles.progressStyleNegative,\n};\n\nexport const SingleProgressBar: FC<ProgressBarSingleProps> = ({\n max = 100,\n progress,\n style = 'accent',\n 'data-qa': dataQA = 'progress',\n 'aria-label': ariaLabel,\n}) => {\n const width = (progress / max) * 100;\n return (\n <div\n className={classnames(styles.progress, STYLE_TO_CSS[style])}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={progress}\n aria-label={ariaLabel}\n data-qa={dataQA}\n >\n <div className={styles.progressValue} data-qa=\"progress-value\" style={{ width: `${width}%` }} />\n </div>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;AAOA,MAAM,YAAY,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC,qBAAqB;IACtC,OAAO,EAAE,MAAM,CAAC,oBAAoB;IACpC,OAAO,EAAE,MAAM,CAAC,oBAAoB;IACpC,QAAQ,EAAE,MAAM,CAAC,qBAAqB;CACzC,CAAC;AAEW,MAAA,iBAAiB,GAA+B,CAAC,EAC1D,GAAG,GAAG,GAAG,EACT,QAAQ,EACR,KAAK,GAAG,QAAQ,EAChB,SAAS,EAAE,MAAM,GAAG,UAAU,EAC9B,YAAY,EAAE,SAAS,GAC1B,KAAI;IACD,MAAM,KAAK,GAAG,CAAC,QAAQ,GAAG,GAAG,IAAI,GAAG,CAAC;IACrC,QACIA,aACI,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,EAC3D,IAAI,EAAC,aAAa,EACH,eAAA,EAAA,CAAC,EACD,eAAA,EAAA,GAAG,EACH,eAAA,EAAA,QAAQ,gBACX,SAAS,EAAA,SAAA,EACZ,MAAM,EAAA,QAAA,EAEfA,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,aAAa,EAAA,SAAA,EAAU,gBAAgB,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAG,EAAA,KAAK,GAAG,EAAE,EAAA,CAAI,EAC9F,CAAA,EACR;AACN;;;;"}
|
package/Skeleton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Skeleton } from '@hh.ru/magritte-ui-skeleton';
|
|
4
|
-
import { s as styles } from './progress-bar-
|
|
4
|
+
import { s as styles } from './progress-bar-CcK4BYMw.js';
|
|
5
5
|
|
|
6
6
|
const ProgressBarSkeleton = ({ Component: ProgressBar,
|
|
7
7
|
// skeleton props
|
package/Skeleton.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","sources":["
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sources":["src/Skeleton.tsx"],"sourcesContent":["import { ProgressBarProps } from '@hh.ru/magritte-ui-progress-bar/types';\nimport { IncompleteSkeletonComponent, Skeleton } from '@hh.ru/magritte-ui-skeleton';\n\nimport styles from './progress-bar.less';\n\nexport const ProgressBarSkeleton: IncompleteSkeletonComponent<ProgressBarProps> = ({\n Component: ProgressBar,\n\n // skeleton props\n width,\n height,\n borderRadius,\n inline,\n additionalClass,\n loading,\n\n ...progressBarProps\n}) => (\n <Skeleton loading={loading} additionalClass={styles.progressSkeleton}>\n <ProgressBar {...progressBarProps} />\n </Skeleton>\n);\n"],"names":["_jsx"],"mappings":";;;;MAKa,mBAAmB,GAAkD,CAAC,EAC/E,SAAS,EAAE,WAAW;AAEtB;AACA,KAAK,EACL,MAAM,EACN,YAAY,EACZ,MAAM,EACN,eAAe,EACf,OAAO,EAEP,GAAG,gBAAgB,EACtB,MACGA,GAAA,CAAC,QAAQ,EAAA,EAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,CAAC,gBAAgB,EAAA,QAAA,EAChEA,IAAC,WAAW,EAAA,EAAA,GAAK,gBAAgB,EAAI,CAAA,EAAA,CAC9B;;;;"}
|
package/index.css
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
:root{
|
|
2
|
-
--magritte-color-component-progress-bar-background-content-v24-4-
|
|
3
|
-
--magritte-color-component-progress-bar-foreground-accent-v24-4-
|
|
4
|
-
--magritte-color-component-progress-bar-foreground-positive-v24-4-
|
|
5
|
-
--magritte-color-component-progress-bar-foreground-special-v24-4-
|
|
6
|
-
--magritte-color-component-progress-bar-foreground-warning-v24-4-
|
|
7
|
-
--magritte-color-component-progress-bar-foreground-negative-v24-4-
|
|
2
|
+
--magritte-color-component-progress-bar-background-content-v24-4-2:#DCE3EB;
|
|
3
|
+
--magritte-color-component-progress-bar-foreground-accent-v24-4-2:#0070ff;
|
|
4
|
+
--magritte-color-component-progress-bar-foreground-positive-v24-4-2:#0dc267;
|
|
5
|
+
--magritte-color-component-progress-bar-foreground-special-v24-4-2:#883be9;
|
|
6
|
+
--magritte-color-component-progress-bar-foreground-warning-v24-4-2:#ff9900;
|
|
7
|
+
--magritte-color-component-progress-bar-foreground-negative-v24-4-2:#ff4d3a;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
:root{
|
|
11
|
-
--magritte-semantic-animation-ease-in-out-100-timing-function-v24-4-
|
|
12
|
-
--magritte-semantic-animation-ease-in-out-100-duration-v24-4-
|
|
11
|
+
--magritte-semantic-animation-ease-in-out-100-timing-function-v24-4-2:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
12
|
+
--magritte-semantic-animation-ease-in-out-100-duration-v24-4-2:100ms;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.magritte-night-theme{
|
|
16
|
-
--magritte-color-component-progress-bar-background-content-v24-4-
|
|
17
|
-
--magritte-color-component-progress-bar-foreground-accent-v24-4-
|
|
18
|
-
--magritte-color-component-progress-bar-foreground-positive-v24-4-
|
|
19
|
-
--magritte-color-component-progress-bar-foreground-special-v24-4-
|
|
20
|
-
--magritte-color-component-progress-bar-foreground-warning-v24-4-
|
|
21
|
-
--magritte-color-component-progress-bar-foreground-negative-v24-4-
|
|
16
|
+
--magritte-color-component-progress-bar-background-content-v24-4-2:#262626;
|
|
17
|
+
--magritte-color-component-progress-bar-foreground-accent-v24-4-2:#0058cc;
|
|
18
|
+
--magritte-color-component-progress-bar-foreground-positive-v24-4-2:#026d36;
|
|
19
|
+
--magritte-color-component-progress-bar-foreground-special-v24-4-2:#6a2eb7;
|
|
20
|
+
--magritte-color-component-progress-bar-foreground-warning-v24-4-2:#ac6600;
|
|
21
|
+
--magritte-color-component-progress-bar-foreground-negative-v24-4-2:#ac3225;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.magritte-zp-day-theme{
|
|
25
|
-
--magritte-color-component-progress-bar-foreground-accent-v24-4-
|
|
25
|
+
--magritte-color-component-progress-bar-foreground-accent-v24-4-2:#7195AF;
|
|
26
26
|
}
|
|
27
|
-
.magritte-progress___pKPf-_5-0-
|
|
28
|
-
.magritte-segment___uKhLD_5-0-
|
|
29
|
-
.magritte-progress-animation-timeout___BeyxU_5-0-
|
|
27
|
+
.magritte-progress___pKPf-_5-0-19,
|
|
28
|
+
.magritte-segment___uKhLD_5-0-19,
|
|
29
|
+
.magritte-progress-animation-timeout___BeyxU_5-0-19{
|
|
30
30
|
--animation-duration:0;
|
|
31
31
|
}
|
|
32
32
|
@media (prefers-reduced-motion: no-preference){
|
|
33
|
-
.magritte-progress___pKPf-_5-0-
|
|
34
|
-
.magritte-segment___uKhLD_5-0-
|
|
35
|
-
.magritte-progress-animation-timeout___BeyxU_5-0-
|
|
36
|
-
--animation-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v24-4-
|
|
33
|
+
.magritte-progress___pKPf-_5-0-19,
|
|
34
|
+
.magritte-segment___uKhLD_5-0-19,
|
|
35
|
+
.magritte-progress-animation-timeout___BeyxU_5-0-19{
|
|
36
|
+
--animation-duration:var(--magritte-semantic-animation-ease-in-out-100-duration-v24-4-2);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
.magritte-progress___pKPf-_5-0-
|
|
39
|
+
.magritte-progress___pKPf-_5-0-19{
|
|
40
40
|
position:relative;
|
|
41
41
|
width:100%;
|
|
42
42
|
border-radius:50vh;
|
|
43
43
|
height:var(--magritte-ui-progress-height-override, 8px);
|
|
44
|
-
--magritte-ui-progress-background-color:var(--magritte-ui-progress-background-color-override, var(--magritte-color-component-progress-bar-background-content-v24-4-
|
|
44
|
+
--magritte-ui-progress-background-color:var(--magritte-ui-progress-background-color-override, var(--magritte-color-component-progress-bar-background-content-v24-4-2));
|
|
45
45
|
background-color:var(--magritte-ui-progress-background-color);
|
|
46
46
|
user-select:none;
|
|
47
47
|
overflow:hidden;
|
|
48
48
|
}
|
|
49
|
-
.magritte-progress-skeleton___cGz4D_5-0-
|
|
49
|
+
.magritte-progress-skeleton___cGz4D_5-0-19{
|
|
50
50
|
height:var(--magritte-ui-progress-height-override, 8px);
|
|
51
51
|
border-radius:50vh;
|
|
52
52
|
}
|
|
53
|
-
.magritte-progress-value___ffPrp_5-0-
|
|
53
|
+
.magritte-progress-value___ffPrp_5-0-19{
|
|
54
54
|
position:absolute;
|
|
55
55
|
height:var(--magritte-ui-progress-height-override, 8px);
|
|
56
56
|
left:0;
|
|
@@ -59,56 +59,56 @@
|
|
|
59
59
|
background:var(--magritte-ui-progress-value-color);
|
|
60
60
|
transition-property:width;
|
|
61
61
|
transition-duration:var(--animation-duration);
|
|
62
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-4-
|
|
62
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-4-2);
|
|
63
63
|
}
|
|
64
|
-
.magritte-segmented-container___O5xuJ_5-0-
|
|
64
|
+
.magritte-segmented-container___O5xuJ_5-0-19{
|
|
65
65
|
display:flex;
|
|
66
66
|
gap:var(--magritte-ui-progress-segments-margin-override, 4px);
|
|
67
67
|
user-select:none;
|
|
68
68
|
}
|
|
69
|
-
.magritte-segment___uKhLD_5-0-
|
|
69
|
+
.magritte-segment___uKhLD_5-0-19{
|
|
70
70
|
flex:1 1 auto;
|
|
71
71
|
height:var(--magritte-ui-progress-height-override, 8px);
|
|
72
72
|
border-radius:50vh;
|
|
73
73
|
transition-property:background-position;
|
|
74
74
|
transition-duration:var(--animation-duration);
|
|
75
|
-
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-4-
|
|
76
|
-
--magritte-ui-progress-background-color:var(--magritte-ui-progress-background-color-override, var(--magritte-color-component-progress-bar-background-content-v24-4-
|
|
75
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-100-timing-function-v24-4-2);
|
|
76
|
+
--magritte-ui-progress-background-color:var(--magritte-ui-progress-background-color-override, var(--magritte-color-component-progress-bar-background-content-v24-4-2));
|
|
77
77
|
background:linear-gradient(to right, var(--magritte-ui-progress-value-color) 50%, var(--magritte-ui-progress-background-color) 50%);
|
|
78
78
|
background-size:calc(200% + 1px) 100%;
|
|
79
79
|
background-position:right bottom;
|
|
80
80
|
background-repeat:no-repeat;
|
|
81
81
|
}
|
|
82
|
-
.magritte-filled___QH18N_5-0-
|
|
82
|
+
.magritte-filled___QH18N_5-0-19{
|
|
83
83
|
background-position:left bottom;
|
|
84
84
|
}
|
|
85
|
-
.magritte-segmented-container_style-accent___MRcsm_5-0-
|
|
86
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-accent-v24-4-
|
|
85
|
+
.magritte-segmented-container_style-accent___MRcsm_5-0-19 .magritte-segment___uKhLD_5-0-19{
|
|
86
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-accent-v24-4-2));
|
|
87
87
|
}
|
|
88
|
-
.magritte-progress_style-accent___0qJEN_5-0-
|
|
89
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-accent-v24-4-
|
|
88
|
+
.magritte-progress_style-accent___0qJEN_5-0-19{
|
|
89
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-accent-v24-4-2));
|
|
90
90
|
}
|
|
91
|
-
.magritte-segmented-container_style-positive___ItaIH_5-0-
|
|
92
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-positive-v24-4-
|
|
91
|
+
.magritte-segmented-container_style-positive___ItaIH_5-0-19 .magritte-segment___uKhLD_5-0-19{
|
|
92
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-positive-v24-4-2));
|
|
93
93
|
}
|
|
94
|
-
.magritte-progress_style-positive___EAtvB_5-0-
|
|
95
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-positive-v24-4-
|
|
94
|
+
.magritte-progress_style-positive___EAtvB_5-0-19{
|
|
95
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-positive-v24-4-2));
|
|
96
96
|
}
|
|
97
|
-
.magritte-segmented-container_style-special___m0PxE_5-0-
|
|
98
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-special-v24-4-
|
|
97
|
+
.magritte-segmented-container_style-special___m0PxE_5-0-19 .magritte-segment___uKhLD_5-0-19{
|
|
98
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-special-v24-4-2));
|
|
99
99
|
}
|
|
100
|
-
.magritte-progress_style-special___v8LNJ_5-0-
|
|
101
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-special-v24-4-
|
|
100
|
+
.magritte-progress_style-special___v8LNJ_5-0-19{
|
|
101
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-special-v24-4-2));
|
|
102
102
|
}
|
|
103
|
-
.magritte-segmented-container_style-warning___Dfq4v_5-0-
|
|
104
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-warning-v24-4-
|
|
103
|
+
.magritte-segmented-container_style-warning___Dfq4v_5-0-19 .magritte-segment___uKhLD_5-0-19{
|
|
104
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-warning-v24-4-2));
|
|
105
105
|
}
|
|
106
|
-
.magritte-progress_style-warning___8D5-R_5-0-
|
|
107
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-warning-v24-4-
|
|
106
|
+
.magritte-progress_style-warning___8D5-R_5-0-19{
|
|
107
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-warning-v24-4-2));
|
|
108
108
|
}
|
|
109
|
-
.magritte-segmented-container_style-negative___ESqFP_5-0-
|
|
110
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-negative-v24-4-
|
|
109
|
+
.magritte-segmented-container_style-negative___ESqFP_5-0-19 .magritte-segment___uKhLD_5-0-19{
|
|
110
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-negative-v24-4-2));
|
|
111
111
|
}
|
|
112
|
-
.magritte-progress_style-negative___QDl5g_5-0-
|
|
113
|
-
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-negative-v24-4-
|
|
112
|
+
.magritte-progress_style-negative___QDl5g_5-0-19{
|
|
113
|
+
--magritte-ui-progress-value-color:var(--magritte-ui-progress-value-color-override, var(--magritte-color-component-progress-bar-foreground-negative-v24-4-2));
|
|
114
114
|
}
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import 'react/jsx-runtime';
|
|
|
5
5
|
import './SegmentedProgressBar.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'classnames';
|
|
8
|
-
import './progress-bar-
|
|
8
|
+
import './progress-bar-CcK4BYMw.js';
|
|
9
9
|
import './SingleProgressBar.js';
|
|
10
10
|
import './Skeleton.js';
|
|
11
11
|
import '@hh.ru/magritte-ui-skeleton';
|
package/index.mock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mock.js","sources":["
|
|
1
|
+
{"version":3,"file":"index.mock.js","sources":["src/index.mock.ts"],"sourcesContent":["import { ForwardRefExoticComponent } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport { type ProgressBarProps, type ProgressBarStyle } from '@hh.ru/magritte-ui-progress-bar/types';\n\nexport const ProgressBar: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent('ProgressBar');\n"],"names":[],"mappings":";;MAMa,WAAW,GAAuD,aAAa,CAAC,aAAa;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-progress-bar",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.19",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"watch": "yarn root:watch $(pwd)"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@hh.ru/magritte-design-tokens": "24.4.
|
|
23
|
-
"@hh.ru/magritte-ui-mock-component": "1.1.
|
|
24
|
-
"@hh.ru/magritte-ui-skeleton": "3.0.
|
|
22
|
+
"@hh.ru/magritte-design-tokens": "24.4.2",
|
|
23
|
+
"@hh.ru/magritte-ui-mock-component": "1.1.7",
|
|
24
|
+
"@hh.ru/magritte-ui-skeleton": "3.0.18"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"classnames": ">=2.3.2",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "773d4352b733cf17fd5c2e1a5eb0a047d63fd8a0"
|
|
34
34
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
var styles = {"progress":"magritte-progress___pKPf-_5-0-19","segment":"magritte-segment___uKhLD_5-0-19","progress-animation-timeout":"magritte-progress-animation-timeout___BeyxU_5-0-19","progressAnimationTimeout":"magritte-progress-animation-timeout___BeyxU_5-0-19","progress-skeleton":"magritte-progress-skeleton___cGz4D_5-0-19","progressSkeleton":"magritte-progress-skeleton___cGz4D_5-0-19","progress-value":"magritte-progress-value___ffPrp_5-0-19","progressValue":"magritte-progress-value___ffPrp_5-0-19","segmented-container":"magritte-segmented-container___O5xuJ_5-0-19","segmentedContainer":"magritte-segmented-container___O5xuJ_5-0-19","filled":"magritte-filled___QH18N_5-0-19","segmented-container_style-accent":"magritte-segmented-container_style-accent___MRcsm_5-0-19","segmentedContainerStyleAccent":"magritte-segmented-container_style-accent___MRcsm_5-0-19","progress_style-accent":"magritte-progress_style-accent___0qJEN_5-0-19","progressStyleAccent":"magritte-progress_style-accent___0qJEN_5-0-19","segmented-container_style-positive":"magritte-segmented-container_style-positive___ItaIH_5-0-19","segmentedContainerStylePositive":"magritte-segmented-container_style-positive___ItaIH_5-0-19","progress_style-positive":"magritte-progress_style-positive___EAtvB_5-0-19","progressStylePositive":"magritte-progress_style-positive___EAtvB_5-0-19","segmented-container_style-special":"magritte-segmented-container_style-special___m0PxE_5-0-19","segmentedContainerStyleSpecial":"magritte-segmented-container_style-special___m0PxE_5-0-19","progress_style-special":"magritte-progress_style-special___v8LNJ_5-0-19","progressStyleSpecial":"magritte-progress_style-special___v8LNJ_5-0-19","segmented-container_style-warning":"magritte-segmented-container_style-warning___Dfq4v_5-0-19","segmentedContainerStyleWarning":"magritte-segmented-container_style-warning___Dfq4v_5-0-19","progress_style-warning":"magritte-progress_style-warning___8D5-R_5-0-19","progressStyleWarning":"magritte-progress_style-warning___8D5-R_5-0-19","segmented-container_style-negative":"magritte-segmented-container_style-negative___ESqFP_5-0-19","segmentedContainerStyleNegative":"magritte-segmented-container_style-negative___ESqFP_5-0-19","progress_style-negative":"magritte-progress_style-negative___QDl5g_5-0-19","progressStyleNegative":"magritte-progress_style-negative___QDl5g_5-0-19"};
|
|
3
|
+
|
|
4
|
+
export { styles as s };
|
|
5
|
+
//# sourceMappingURL=progress-bar-CcK4BYMw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-bar-CcK4BYMw.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["
|
|
1
|
+
{"version":3,"file":"types.js","sources":["src/types.ts"],"sourcesContent":["import { isValidElement, ReactNode, ReactElement } from 'react';\n\nexport type ProgressBarStyle = 'accent' | 'positive' | 'special' | 'warning' | 'negative';\n\ntype ProgressBarCommonProps = {\n /** Текущее значение прогресса */\n progress: number;\n /** Cтиль прогресс-бара */\n style?: ProgressBarStyle;\n 'aria-label'?: string;\n 'data-qa'?: string;\n};\n\nexport type ProgressBarSingleProps = ProgressBarCommonProps & {\n /** Максимальное значение прогресс-бара */\n max?: number;\n segments?: never;\n};\n\nexport type ProgressBarSegmentedProps = ProgressBarCommonProps & {\n max?: never;\n /** Общее кол-во сегментов */\n segments: number;\n};\n\nexport type ProgressBarProps = ProgressBarSingleProps | ProgressBarSegmentedProps;\n\nexport const isProgressBarComponent = (component: ReactNode): component is ReactElement<ProgressBarProps> => {\n return (\n isValidElement(component) &&\n typeof component.type === 'function' &&\n 'isProgressBar' in (component?.type as object)\n );\n};\n"],"names":[],"mappings":";;AA2Ba,MAAA,sBAAsB,GAAG,CAAC,SAAoB,KAAiD;AACxG,IAAA,QACI,cAAc,CAAC,SAAS,CAAC;AACzB,QAAA,OAAO,SAAS,CAAC,IAAI,KAAK,UAAU;AACpC,QAAA,eAAe,IAAK,SAAS,EAAE,IAAe,EAChD;AACN;;;;"}
|
package/progress-bar-D13Gahfd.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import './index.css';
|
|
2
|
-
var styles = {"progress":"magritte-progress___pKPf-_5-0-17","segment":"magritte-segment___uKhLD_5-0-17","progress-animation-timeout":"magritte-progress-animation-timeout___BeyxU_5-0-17","progressAnimationTimeout":"magritte-progress-animation-timeout___BeyxU_5-0-17","progress-skeleton":"magritte-progress-skeleton___cGz4D_5-0-17","progressSkeleton":"magritte-progress-skeleton___cGz4D_5-0-17","progress-value":"magritte-progress-value___ffPrp_5-0-17","progressValue":"magritte-progress-value___ffPrp_5-0-17","segmented-container":"magritte-segmented-container___O5xuJ_5-0-17","segmentedContainer":"magritte-segmented-container___O5xuJ_5-0-17","filled":"magritte-filled___QH18N_5-0-17","segmented-container_style-accent":"magritte-segmented-container_style-accent___MRcsm_5-0-17","segmentedContainerStyleAccent":"magritte-segmented-container_style-accent___MRcsm_5-0-17","progress_style-accent":"magritte-progress_style-accent___0qJEN_5-0-17","progressStyleAccent":"magritte-progress_style-accent___0qJEN_5-0-17","segmented-container_style-positive":"magritte-segmented-container_style-positive___ItaIH_5-0-17","segmentedContainerStylePositive":"magritte-segmented-container_style-positive___ItaIH_5-0-17","progress_style-positive":"magritte-progress_style-positive___EAtvB_5-0-17","progressStylePositive":"magritte-progress_style-positive___EAtvB_5-0-17","segmented-container_style-special":"magritte-segmented-container_style-special___m0PxE_5-0-17","segmentedContainerStyleSpecial":"magritte-segmented-container_style-special___m0PxE_5-0-17","progress_style-special":"magritte-progress_style-special___v8LNJ_5-0-17","progressStyleSpecial":"magritte-progress_style-special___v8LNJ_5-0-17","segmented-container_style-warning":"magritte-segmented-container_style-warning___Dfq4v_5-0-17","segmentedContainerStyleWarning":"magritte-segmented-container_style-warning___Dfq4v_5-0-17","progress_style-warning":"magritte-progress_style-warning___8D5-R_5-0-17","progressStyleWarning":"magritte-progress_style-warning___8D5-R_5-0-17","segmented-container_style-negative":"magritte-segmented-container_style-negative___ESqFP_5-0-17","segmentedContainerStyleNegative":"magritte-segmented-container_style-negative___ESqFP_5-0-17","progress_style-negative":"magritte-progress_style-negative___QDl5g_5-0-17","progressStyleNegative":"magritte-progress_style-negative___QDl5g_5-0-17"};
|
|
3
|
-
|
|
4
|
-
export { styles as s };
|
|
5
|
-
//# sourceMappingURL=progress-bar-D13Gahfd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar-D13Gahfd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|