@semcore/progress-bar 3.3.32 → 3.3.33
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/CHANGELOG.md +6 -0
- package/lib/cjs/ProgressBar.js +16 -16
- package/lib/cjs/ProgressBar.js.map +1 -1
- package/lib/cjs/style/progress-bar.shadow.css +15 -36
- package/lib/es6/ProgressBar.js +16 -16
- package/lib/es6/ProgressBar.js.map +1 -1
- package/lib/es6/style/progress-bar.shadow.css +15 -36
- package/package.json +3 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.3.33] - 2023-06-27
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/flex-box` [4.7.31 ~> 4.7.32], `@semcore/utils` [3.53.4 ~> 3.54.0]).
|
|
10
|
+
|
|
5
11
|
## [3.3.32] - 2023-06-14
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/lib/cjs/ProgressBar.js
CHANGED
|
@@ -17,21 +17,21 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
var _flexBox = require("@semcore/flex-box");
|
|
18
18
|
var _color = _interopRequireDefault(require("@semcore/utils/lib/color"));
|
|
19
19
|
/*__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
20
|
-
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes
|
|
21
|
-
"__SProgressBar": "
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
20
|
+
var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/"@keyframes loading_1cgga{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1cgga_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1cgga_gg_._theme_dark_1cgga_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1cgga_gg_{position:absolute;top:0;left:0;background-color:var(--intergalactic-progress-bar-value-bg, #000000);background-image:var(--intergalactic-progress-bar-value-gradient,\n linear-gradient(-45deg, rgba(0, 159, 129, 0.9) 25%, rgba(0, 159, 129, 1) 0%, rgba(0, 159, 129, 1) 50%, rgba(0, 159, 129, 0.9) 0%, rgba(0, 159, 129, 0.9) 75%, rgba(0, 159, 129, 1) 0%)\n );overflow:hidden;animation-name:loading_1cgga;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1cgga);animation-duration:var(--duration_1cgga)}.___SValue_1cgga_gg_.__theme_1cgga_gg_{background-color:var(--colorBg_1cgga);background-image:var(--colorBg_1cgga)}.___SProgressBar_1cgga_gg_._size_s_1cgga_gg_,.___SValue_1cgga_gg_._size_s_1cgga_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1cgga_gg_._size_m_1cgga_gg_,.___SValue_1cgga_gg_._size_m_1cgga_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1cgga_gg_._size_l_1cgga_gg_,.___SValue_1cgga_gg_._size_l_1cgga_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1cgga_gg_._theme_invert_1cgga_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1cgga_gg_.__animation_1cgga_gg_{background-color:var(--intergalactic-progress-bar-value-bg, #000000);background-image:var(--intergalactic-progress-bar-pattern-gradient,\n linear-gradient(-45deg, rgba(224, 225, 233, 0.9) 25%, rgba(224, 225, 233, 1) 0%, rgba(224, 225, 233, 1) 50%, rgba(224, 225, 233, 0.9) 0%, rgba(224, 225, 233, 0.9) 75%, rgba(224, 225, 233, 1) 0%)\n );animation-name:loading_1cgga;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1cgga)}.___SProgressBar_1cgga_gg_._theme_custom_1cgga_gg_{background-color:var(--colorBg_1cgga);background-image:var(--colorBg_1cgga)}@media (prefers-reduced-motion){.___SProgressBar_1cgga_gg_.__animation_1cgga_gg_,.___SValue_1cgga_gg_{animation-name:none}}" /*__inner_css_end__*/, "1cgga_gg_") /*__reshadow_css_end__*/, {
|
|
21
|
+
"__SProgressBar": "___SProgressBar_1cgga_gg_",
|
|
22
|
+
"_theme_dark": "_theme_dark_1cgga_gg_",
|
|
23
|
+
"__SValue": "___SValue_1cgga_gg_",
|
|
24
|
+
"--width": "--width_1cgga",
|
|
25
|
+
"--duration": "--duration_1cgga",
|
|
26
|
+
"_theme": "__theme_1cgga_gg_",
|
|
27
|
+
"--colorBg": "--colorBg_1cgga",
|
|
28
|
+
"_size_s": "_size_s_1cgga_gg_",
|
|
29
|
+
"_size_m": "_size_m_1cgga_gg_",
|
|
30
|
+
"_size_l": "_size_l_1cgga_gg_",
|
|
31
|
+
"_theme_invert": "_theme_invert_1cgga_gg_",
|
|
32
|
+
"@loading": "loading_1cgga",
|
|
33
|
+
"_animation": "__animation_1cgga_gg_",
|
|
34
|
+
"_theme_custom": "_theme_custom_1cgga_gg_"
|
|
35
35
|
});
|
|
36
36
|
function isCustomTheme(theme) {
|
|
37
37
|
return !['dark', 'invert'].includes(theme);
|
|
@@ -74,7 +74,7 @@ var ProgressBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
74
74
|
"use:animation": !value,
|
|
75
75
|
"use:duration": "".concat(duration, "ms"),
|
|
76
76
|
"colorBg": (0, _color["default"])(theme),
|
|
77
|
-
"role":
|
|
77
|
+
"role": 'progressbar',
|
|
78
78
|
"aria-valuenow": value
|
|
79
79
|
}, _ref))), /*#__PURE__*/_react["default"].createElement(Children, _ref3.cn("Children", {})));
|
|
80
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_color","style","sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","getValueProps","_this$asProps","asProps","duration","size","render","_ref","_ref3","SProgressBar","Box","_this$asProps2","Children","styles","useTheme","createElement","cn","_objectSpread2","assignProps","concat","resolveColor","Component","_defineProperty2","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","createComponent","_default","exports"],"sources":["../../src/ProgressBar.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport style from './style/progress-bar.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['dark', 'invert'].includes(theme);\n}\n\nclass ProgressBarRoot extends Component {\n static displayName = 'ProgressBar';\n static style = style;\n static defaultProps = () => ({\n duration: 1000,\n size: 'm',\n theme: 'invert',\n children: <ProgressBar.Value />,\n });\n\n getValueProps() {\n const { value, duration, size } = this.asProps;\n return {\n value,\n duration,\n size,\n };\n }\n\n render() {\n const SProgressBar = Root;\n const { Children, styles, duration, theme, value } = this.asProps;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n return sstyled(styles)(\n <SProgressBar\n render={Box}\n use:theme={useTheme}\n use:animation={!value}\n use:duration={`${duration}ms`}\n colorBg={resolveColor(theme)}\n role
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_flexBox","_color","style","sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_inherits2","_super","_createSuper2","_classCallCheck2","apply","arguments","_createClass2","key","value","getValueProps","_this$asProps","asProps","duration","size","render","_ref","_ref3","SProgressBar","Box","_this$asProps2","Children","styles","useTheme","createElement","cn","_objectSpread2","assignProps","concat","resolveColor","Component","_defineProperty2","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","createComponent","_default","exports"],"sources":["../../src/ProgressBar.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport style from './style/progress-bar.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['dark', 'invert'].includes(theme);\n}\n\nclass ProgressBarRoot extends Component {\n static displayName = 'ProgressBar';\n static style = style;\n static defaultProps = () => ({\n duration: 1000,\n size: 'm',\n theme: 'invert',\n children: <ProgressBar.Value />,\n });\n\n getValueProps() {\n const { value, duration, size } = this.asProps;\n return {\n value,\n duration,\n size,\n };\n }\n\n render() {\n const SProgressBar = Root;\n const { Children, styles, duration, theme, value } = this.asProps;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n return sstyled(styles)(\n <SProgressBar\n render={Box}\n use:theme={useTheme}\n use:animation={!value}\n use:duration={`${duration}ms`}\n colorBg={resolveColor(theme)}\n role='progressbar'\n aria-valuenow={value}\n >\n <Children />\n </SProgressBar>,\n );\n }\n}\n\nfunction Value(props) {\n const SValue = Root;\n const { styles, value, theme, duration } = props;\n const width = `${value}%`;\n\n return sstyled(styles)(\n <SValue\n render={Box}\n use:width={width}\n use:duration={`${duration}ms`}\n colorBg={resolveColor(theme)}\n />,\n );\n}\n\nconst ProgressBar = createComponent(ProgressBarRoot, {\n Value,\n});\n\nexport default ProgressBar;\n"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AADA,IAAAC,MAAA,GAAAC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,KAAK,GAAesC,KAAK,CAAzBtC,KAAK;IAAEgB,QAAQ,GAAKsB,KAAK,CAAlBtB,QAAQ;EACtC,IAAM2B,KAAK,MAAAZ,MAAA,CAAMnB,KAAK,MAAG;EAEzB,OAAA6B,KAAA,GAAO,IAAA5C,aAAO,EAAC4B,MAAM,CAAC,eACpBjC,MAAA,YAAAmC,aAAA,CAACe,MAAM,EAAAD,KAAA,CAAAb,EAAA,eAAAC,cAAA,qBAAAxC,KAAA,CAAAyC,WAAA;IAAA,aAEMa,KAAK;IAAA,mBAAAZ,MAAA,CACCf,QAAQ;IAAA,WAChB,IAAAgB,iBAAY,EAAChC,KAAK;EAAC,GAAAuC,KAAA,IAC5B;AAEN;AAEA,IAAMH,WAAW,GAAG,IAAAQ,gBAAe,EAAC1C,eAAe,EAAE;EACnDmC,KAAK,EAALA;AACF,CAAC,CAAC;AAAC,IAAAQ,QAAA,GAEYT,WAAW;AAAAU,OAAA,cAAAD,QAAA"}
|
|
@@ -2,6 +2,11 @@ SProgressBar {
|
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
overflow: hidden;
|
|
5
|
+
background-color: var(--intergalactic-progress-bar-bg, #e0e1e9);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
SProgressBar[theme='dark'] {
|
|
9
|
+
background-color: var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2));
|
|
5
10
|
}
|
|
6
11
|
|
|
7
12
|
SValue {
|
|
@@ -11,15 +16,7 @@ SValue {
|
|
|
11
16
|
background-color: var(--intergalactic-progress-bar-value-bg, #000000);
|
|
12
17
|
background-image: var(
|
|
13
18
|
--intergalactic-progress-bar-value-gradient,
|
|
14
|
-
linear-gradient(
|
|
15
|
-
-45deg,
|
|
16
|
-
rgba(0, 159, 129, 0.9) 25%,
|
|
17
|
-
rgba(0, 159, 129, 1) 0%,
|
|
18
|
-
rgba(0, 159, 129, 1) 50%,
|
|
19
|
-
rgba(0, 159, 129, 0.9) 0%,
|
|
20
|
-
rgba(0, 159, 129, 0.9) 75%,
|
|
21
|
-
rgba(0, 159, 129, 1) 0%
|
|
22
|
-
)
|
|
19
|
+
linear-gradient(-45deg, rgba(0, 159, 129, 0.9) 25%, rgba(0, 159, 129, 1) 0%, rgba(0, 159, 129, 1) 50%, rgba(0, 159, 129, 0.9) 0%, rgba(0, 159, 129, 0.9) 75%, rgba(0, 159, 129, 1) 0%)
|
|
23
20
|
);
|
|
24
21
|
overflow: hidden;
|
|
25
22
|
|
|
@@ -28,7 +25,13 @@ SValue {
|
|
|
28
25
|
animation-iteration-count: infinite;
|
|
29
26
|
transition-property: width;
|
|
30
27
|
transition-timing-function: linear;
|
|
31
|
-
|
|
28
|
+
width: var(--width);
|
|
29
|
+
animation-duration: var(--duration);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
SValue[theme] {
|
|
33
|
+
background-color: var(--colorBg);
|
|
34
|
+
background-image: var(--colorBg);
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
SProgressBar[size='s'],
|
|
@@ -52,13 +55,7 @@ SValue[size='l'] {
|
|
|
52
55
|
background-size: 16px 16px;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
|
-
SProgressBar {
|
|
56
|
-
background-color: var(--intergalactic-progress-bar-bg, #e0e1e9);
|
|
57
|
-
}
|
|
58
58
|
|
|
59
|
-
SProgressBar[theme='dark'] {
|
|
60
|
-
background-color: var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2));
|
|
61
|
-
}
|
|
62
59
|
|
|
63
60
|
SProgressBar[theme='invert'] {
|
|
64
61
|
background-color: var(--intergalactic-progress-bar-bg, #e0e1e9);
|
|
@@ -77,37 +74,19 @@ SProgressBar[animation] {
|
|
|
77
74
|
background-color: var(--intergalactic-progress-bar-value-bg, #000000);
|
|
78
75
|
background-image: var(
|
|
79
76
|
--intergalactic-progress-bar-pattern-gradient,
|
|
80
|
-
linear-gradient(
|
|
81
|
-
-45deg,
|
|
82
|
-
rgba(224, 225, 233, 0.9) 25%,
|
|
83
|
-
rgba(224, 225, 233, 1) 0%,
|
|
84
|
-
rgba(224, 225, 233, 1) 50%,
|
|
85
|
-
rgba(224, 225, 233, 0.9) 0%,
|
|
86
|
-
rgba(224, 225, 233, 0.9) 75%,
|
|
87
|
-
rgba(224, 225, 233, 1) 0%
|
|
88
|
-
)
|
|
77
|
+
linear-gradient(-45deg, rgba(224, 225, 233, 0.9) 25%, rgba(224, 225, 233, 1) 0%, rgba(224, 225, 233, 1) 50%, rgba(224, 225, 233, 0.9) 0%, rgba(224, 225, 233, 0.9) 75%, rgba(224, 225, 233, 1) 0%)
|
|
89
78
|
);
|
|
90
79
|
animation-name: loading;
|
|
91
80
|
animation-timing-function: linear;
|
|
92
81
|
animation-iteration-count: infinite;
|
|
82
|
+
animation-duration: var(--duration);
|
|
93
83
|
}
|
|
94
84
|
|
|
95
85
|
SProgressBar[theme='custom'] {
|
|
96
86
|
background-color: var(--colorBg);
|
|
97
87
|
background-image: var(--colorBg);
|
|
98
88
|
}
|
|
99
|
-
SProgressBar[animation] {
|
|
100
|
-
animation-duration: var(--duration);
|
|
101
|
-
}
|
|
102
89
|
|
|
103
|
-
SValue {
|
|
104
|
-
width: var(--width);
|
|
105
|
-
animation-duration: var(--duration);
|
|
106
|
-
}
|
|
107
|
-
SValue[theme] {
|
|
108
|
-
background-color: var(--colorBg);
|
|
109
|
-
background-image: var(--colorBg);
|
|
110
|
-
}
|
|
111
90
|
|
|
112
91
|
@media (prefers-reduced-motion) {
|
|
113
92
|
SValue {
|
package/lib/es6/ProgressBar.js
CHANGED
|
@@ -12,21 +12,21 @@ import createComponent, { Component, sstyled, Root } from '@semcore/core';
|
|
|
12
12
|
import { Box } from '@semcore/flex-box';
|
|
13
13
|
import resolveColor from '@semcore/utils/lib/color';
|
|
14
14
|
/*__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
15
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes
|
|
16
|
-
"__SProgressBar": "
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
15
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes loading_1cgga{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1cgga_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1cgga_gg_._theme_dark_1cgga_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1cgga_gg_{position:absolute;top:0;left:0;background-color:var(--intergalactic-progress-bar-value-bg, #000000);background-image:var(--intergalactic-progress-bar-value-gradient,\n linear-gradient(-45deg, rgba(0, 159, 129, 0.9) 25%, rgba(0, 159, 129, 1) 0%, rgba(0, 159, 129, 1) 50%, rgba(0, 159, 129, 0.9) 0%, rgba(0, 159, 129, 0.9) 75%, rgba(0, 159, 129, 1) 0%)\n );overflow:hidden;animation-name:loading_1cgga;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1cgga);animation-duration:var(--duration_1cgga)}.___SValue_1cgga_gg_.__theme_1cgga_gg_{background-color:var(--colorBg_1cgga);background-image:var(--colorBg_1cgga)}.___SProgressBar_1cgga_gg_._size_s_1cgga_gg_,.___SValue_1cgga_gg_._size_s_1cgga_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1cgga_gg_._size_m_1cgga_gg_,.___SValue_1cgga_gg_._size_m_1cgga_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1cgga_gg_._size_l_1cgga_gg_,.___SValue_1cgga_gg_._size_l_1cgga_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1cgga_gg_._theme_invert_1cgga_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1cgga_gg_.__animation_1cgga_gg_{background-color:var(--intergalactic-progress-bar-value-bg, #000000);background-image:var(--intergalactic-progress-bar-pattern-gradient,\n linear-gradient(-45deg, rgba(224, 225, 233, 0.9) 25%, rgba(224, 225, 233, 1) 0%, rgba(224, 225, 233, 1) 50%, rgba(224, 225, 233, 0.9) 0%, rgba(224, 225, 233, 0.9) 75%, rgba(224, 225, 233, 1) 0%)\n );animation-name:loading_1cgga;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1cgga)}.___SProgressBar_1cgga_gg_._theme_custom_1cgga_gg_{background-color:var(--colorBg_1cgga);background-image:var(--colorBg_1cgga)}@media (prefers-reduced-motion){.___SProgressBar_1cgga_gg_.__animation_1cgga_gg_,.___SValue_1cgga_gg_{animation-name:none}}" /*__inner_css_end__*/, "1cgga_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SProgressBar": "___SProgressBar_1cgga_gg_",
|
|
17
|
+
"_theme_dark": "_theme_dark_1cgga_gg_",
|
|
18
|
+
"__SValue": "___SValue_1cgga_gg_",
|
|
19
|
+
"--width": "--width_1cgga",
|
|
20
|
+
"--duration": "--duration_1cgga",
|
|
21
|
+
"_theme": "__theme_1cgga_gg_",
|
|
22
|
+
"--colorBg": "--colorBg_1cgga",
|
|
23
|
+
"_size_s": "_size_s_1cgga_gg_",
|
|
24
|
+
"_size_m": "_size_m_1cgga_gg_",
|
|
25
|
+
"_size_l": "_size_l_1cgga_gg_",
|
|
26
|
+
"_theme_invert": "_theme_invert_1cgga_gg_",
|
|
27
|
+
"@loading": "loading_1cgga",
|
|
28
|
+
"_animation": "__animation_1cgga_gg_",
|
|
29
|
+
"_theme_custom": "_theme_custom_1cgga_gg_"
|
|
30
30
|
});
|
|
31
31
|
function isCustomTheme(theme) {
|
|
32
32
|
return !['dark', 'invert'].includes(theme);
|
|
@@ -69,7 +69,7 @@ var ProgressBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
69
69
|
"use:animation": !value,
|
|
70
70
|
"use:duration": "".concat(duration, "ms"),
|
|
71
71
|
"colorBg": resolveColor(theme),
|
|
72
|
-
"role":
|
|
72
|
+
"role": 'progressbar',
|
|
73
73
|
"aria-valuenow": value
|
|
74
74
|
}, _ref))), /*#__PURE__*/React.createElement(Children, _ref3.cn("Children", {})));
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["React","createComponent","Component","sstyled","Root","Box","resolveColor","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getValueProps","_this$asProps","asProps","duration","size","render","_ref","_ref3","SProgressBar","_this$asProps2","Children","styles","useTheme","createElement","cn","_objectSpread","_assignProps","concat","_defineProperty","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","_assignProps2"],"sources":["../../src/ProgressBar.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport style from './style/progress-bar.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['dark', 'invert'].includes(theme);\n}\n\nclass ProgressBarRoot extends Component {\n static displayName = 'ProgressBar';\n static style = style;\n static defaultProps = () => ({\n duration: 1000,\n size: 'm',\n theme: 'invert',\n children: <ProgressBar.Value />,\n });\n\n getValueProps() {\n const { value, duration, size } = this.asProps;\n return {\n value,\n duration,\n size,\n };\n }\n\n render() {\n const SProgressBar = Root;\n const { Children, styles, duration, theme, value } = this.asProps;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n return sstyled(styles)(\n <SProgressBar\n render={Box}\n use:theme={useTheme}\n use:animation={!value}\n use:duration={`${duration}ms`}\n colorBg={resolveColor(theme)}\n role
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["React","createComponent","Component","sstyled","Root","Box","resolveColor","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getValueProps","_this$asProps","asProps","duration","size","render","_ref","_ref3","SProgressBar","_this$asProps2","Children","styles","useTheme","createElement","cn","_objectSpread","_assignProps","concat","_defineProperty","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","_assignProps2"],"sources":["../../src/ProgressBar.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColor from '@semcore/utils/lib/color';\n\nimport style from './style/progress-bar.shadow.css';\n\nfunction isCustomTheme(theme) {\n return !['dark', 'invert'].includes(theme);\n}\n\nclass ProgressBarRoot extends Component {\n static displayName = 'ProgressBar';\n static style = style;\n static defaultProps = () => ({\n duration: 1000,\n size: 'm',\n theme: 'invert',\n children: <ProgressBar.Value />,\n });\n\n getValueProps() {\n const { value, duration, size } = this.asProps;\n return {\n value,\n duration,\n size,\n };\n }\n\n render() {\n const SProgressBar = Root;\n const { Children, styles, duration, theme, value } = this.asProps;\n const useTheme = isCustomTheme(theme) ? 'custom' : theme;\n\n return sstyled(styles)(\n <SProgressBar\n render={Box}\n use:theme={useTheme}\n use:animation={!value}\n use:duration={`${duration}ms`}\n colorBg={resolveColor(theme)}\n role='progressbar'\n aria-valuenow={value}\n >\n <Children />\n </SProgressBar>,\n );\n }\n}\n\nfunction Value(props) {\n const SValue = Root;\n const { styles, value, theme, duration } = props;\n const width = `${value}%`;\n\n return sstyled(styles)(\n <SValue\n render={Box}\n use:width={width}\n use:duration={`${duration}ms`}\n colorBg={resolveColor(theme)}\n />,\n );\n}\n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CAAxCX,MAAM;IAAEZ,KAAK,GAAsBuB,KAAK,CAAhCvB,KAAK;IAAEZ,KAAK,GAAemC,KAAK,CAAzBnC,KAAK;IAAEgB,QAAQ,GAAKmB,KAAK,CAAlBnB,QAAQ;EACtC,IAAMwB,KAAK,MAAAV,MAAA,CAAMlB,KAAK,MAAG;EAEzB,OAAA0B,KAAA,GAAO9C,OAAO,CAACgC,MAAM,CAAC,eACpBnC,KAAA,CAAAqC,aAAA,CAACa,MAAM,EAAAD,KAAA,CAAAX,EAAA,WAAAC,aAAA,KAAAa,aAAA;IAAA,aAEMD,KAAK;IAAA,mBAAAV,MAAA,CACCd,QAAQ;IAAA,WAChBrB,YAAY,CAACK,KAAK;EAAC,GAAAoC,KAAA,IAC5B;AAEN;AAEA,IAAMH,WAAW,GAAG3C,eAAe,CAACY,eAAe,EAAE;EACnDgC,KAAK,EAALA;AACF,CAAC,CAAC;AAEF,eAAeD,WAAW"}
|
|
@@ -2,6 +2,11 @@ SProgressBar {
|
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
overflow: hidden;
|
|
5
|
+
background-color: var(--intergalactic-progress-bar-bg, #e0e1e9);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
SProgressBar[theme='dark'] {
|
|
9
|
+
background-color: var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2));
|
|
5
10
|
}
|
|
6
11
|
|
|
7
12
|
SValue {
|
|
@@ -11,15 +16,7 @@ SValue {
|
|
|
11
16
|
background-color: var(--intergalactic-progress-bar-value-bg, #000000);
|
|
12
17
|
background-image: var(
|
|
13
18
|
--intergalactic-progress-bar-value-gradient,
|
|
14
|
-
linear-gradient(
|
|
15
|
-
-45deg,
|
|
16
|
-
rgba(0, 159, 129, 0.9) 25%,
|
|
17
|
-
rgba(0, 159, 129, 1) 0%,
|
|
18
|
-
rgba(0, 159, 129, 1) 50%,
|
|
19
|
-
rgba(0, 159, 129, 0.9) 0%,
|
|
20
|
-
rgba(0, 159, 129, 0.9) 75%,
|
|
21
|
-
rgba(0, 159, 129, 1) 0%
|
|
22
|
-
)
|
|
19
|
+
linear-gradient(-45deg, rgba(0, 159, 129, 0.9) 25%, rgba(0, 159, 129, 1) 0%, rgba(0, 159, 129, 1) 50%, rgba(0, 159, 129, 0.9) 0%, rgba(0, 159, 129, 0.9) 75%, rgba(0, 159, 129, 1) 0%)
|
|
23
20
|
);
|
|
24
21
|
overflow: hidden;
|
|
25
22
|
|
|
@@ -28,7 +25,13 @@ SValue {
|
|
|
28
25
|
animation-iteration-count: infinite;
|
|
29
26
|
transition-property: width;
|
|
30
27
|
transition-timing-function: linear;
|
|
31
|
-
|
|
28
|
+
width: var(--width);
|
|
29
|
+
animation-duration: var(--duration);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
SValue[theme] {
|
|
33
|
+
background-color: var(--colorBg);
|
|
34
|
+
background-image: var(--colorBg);
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
SProgressBar[size='s'],
|
|
@@ -52,13 +55,7 @@ SValue[size='l'] {
|
|
|
52
55
|
background-size: 16px 16px;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
|
-
SProgressBar {
|
|
56
|
-
background-color: var(--intergalactic-progress-bar-bg, #e0e1e9);
|
|
57
|
-
}
|
|
58
58
|
|
|
59
|
-
SProgressBar[theme='dark'] {
|
|
60
|
-
background-color: var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2));
|
|
61
|
-
}
|
|
62
59
|
|
|
63
60
|
SProgressBar[theme='invert'] {
|
|
64
61
|
background-color: var(--intergalactic-progress-bar-bg, #e0e1e9);
|
|
@@ -77,37 +74,19 @@ SProgressBar[animation] {
|
|
|
77
74
|
background-color: var(--intergalactic-progress-bar-value-bg, #000000);
|
|
78
75
|
background-image: var(
|
|
79
76
|
--intergalactic-progress-bar-pattern-gradient,
|
|
80
|
-
linear-gradient(
|
|
81
|
-
-45deg,
|
|
82
|
-
rgba(224, 225, 233, 0.9) 25%,
|
|
83
|
-
rgba(224, 225, 233, 1) 0%,
|
|
84
|
-
rgba(224, 225, 233, 1) 50%,
|
|
85
|
-
rgba(224, 225, 233, 0.9) 0%,
|
|
86
|
-
rgba(224, 225, 233, 0.9) 75%,
|
|
87
|
-
rgba(224, 225, 233, 1) 0%
|
|
88
|
-
)
|
|
77
|
+
linear-gradient(-45deg, rgba(224, 225, 233, 0.9) 25%, rgba(224, 225, 233, 1) 0%, rgba(224, 225, 233, 1) 50%, rgba(224, 225, 233, 0.9) 0%, rgba(224, 225, 233, 0.9) 75%, rgba(224, 225, 233, 1) 0%)
|
|
89
78
|
);
|
|
90
79
|
animation-name: loading;
|
|
91
80
|
animation-timing-function: linear;
|
|
92
81
|
animation-iteration-count: infinite;
|
|
82
|
+
animation-duration: var(--duration);
|
|
93
83
|
}
|
|
94
84
|
|
|
95
85
|
SProgressBar[theme='custom'] {
|
|
96
86
|
background-color: var(--colorBg);
|
|
97
87
|
background-image: var(--colorBg);
|
|
98
88
|
}
|
|
99
|
-
SProgressBar[animation] {
|
|
100
|
-
animation-duration: var(--duration);
|
|
101
|
-
}
|
|
102
89
|
|
|
103
|
-
SValue {
|
|
104
|
-
width: var(--width);
|
|
105
|
-
animation-duration: var(--duration);
|
|
106
|
-
}
|
|
107
|
-
SValue[theme] {
|
|
108
|
-
background-color: var(--colorBg);
|
|
109
|
-
background-image: var(--colorBg);
|
|
110
|
-
}
|
|
111
90
|
|
|
112
91
|
@media (prefers-reduced-motion) {
|
|
113
92
|
SValue {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/progress-bar",
|
|
3
3
|
"description": "Semrush ProgressBar Component",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.33",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -17,9 +17,6 @@
|
|
|
17
17
|
"react": "16.8 - 18",
|
|
18
18
|
"react-dom": "16.8 - 18"
|
|
19
19
|
},
|
|
20
|
-
"jest": {
|
|
21
|
-
"preset": "@semcore/jest-preset-ui"
|
|
22
|
-
},
|
|
23
20
|
"repository": {
|
|
24
21
|
"type": "git",
|
|
25
22
|
"url": "https://github.com/semrush/intergalactic.git",
|
|
@@ -29,10 +26,9 @@
|
|
|
29
26
|
"@types/react": "18.0.21",
|
|
30
27
|
"@guidepup/playwright": "0.6.1",
|
|
31
28
|
"@playwright/test": "1.25.1",
|
|
32
|
-
"@semcore/
|
|
29
|
+
"@semcore/testing-utils": "1.0.0"
|
|
33
30
|
},
|
|
34
31
|
"scripts": {
|
|
35
|
-
"build": "pnpm semcore-builder --source=js"
|
|
36
|
-
"test": "jest"
|
|
32
|
+
"build": "pnpm semcore-builder --source=js"
|
|
37
33
|
}
|
|
38
34
|
}
|