@semcore/progress-bar 16.0.9 → 16.0.10-prerelease.3
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 +17 -20
- package/lib/cjs/ProgressBar.js.map +1 -1
- package/lib/es6/ProgressBar.js +16 -19
- package/lib/es6/ProgressBar.js.map +1 -1
- package/lib/esm/ProgressBar.mjs +17 -22
- package/package.json +4 -4
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
|
+
## [16.0.10] - 2025-10-06
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/flex-box` [16.0.9 ~> 16.0.10], `@semcore/base-components` [16.2.3 ~> 16.4.0]).
|
|
10
|
+
|
|
5
11
|
## [16.0.9] - 2025-09-17
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/lib/cjs/ProgressBar.js
CHANGED
|
@@ -8,34 +8,31 @@ exports["default"] = void 0;
|
|
|
8
8
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var
|
|
12
|
-
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
11
|
+
var _callSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/callSuper"));
|
|
14
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
14
|
var _core = require("@semcore/core");
|
|
17
15
|
var _resolveColorEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/resolveColorEnhance"));
|
|
18
16
|
var _flexBox = require("@semcore/flex-box");
|
|
19
17
|
var _react = _interopRequireDefault(require("react"));
|
|
20
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, (0, _isNativeReflectConstruct2["default"])() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
21
18
|
/*!__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
22
|
-
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
19
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes loading_1hrd6{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1hrd6_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hrd6_gg_._theme_dark_1hrd6_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1hrd6_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%));overflow:hidden;animation-name:loading_1hrd6;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1hrd6);animation-duration:var(--duration_1hrd6);transition-duration:var(--duration_1hrd6)}.___SValue_1hrd6_gg_.__theme_1hrd6_gg_{background-color:var(--colorBg_1hrd6);background-image:var(--colorBg_1hrd6)}.___SProgressBar_1hrd6_gg_._size_s_1hrd6_gg_,.___SValue_1hrd6_gg_._size_s_1hrd6_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1hrd6_gg_._size_m_1hrd6_gg_,.___SValue_1hrd6_gg_._size_m_1hrd6_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1hrd6_gg_._size_l_1hrd6_gg_,.___SValue_1hrd6_gg_._size_l_1hrd6_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1hrd6_gg_._theme_invert_1hrd6_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hrd6_gg_.__animation_1hrd6_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%));animation-name:loading_1hrd6;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1hrd6)}.___SProgressBar_1hrd6_gg_._theme_custom_1hrd6_gg_{background-color:var(--colorBg_1hrd6);background-image:var(--colorBg_1hrd6)}@media (prefers-reduced-motion){.___SProgressBar_1hrd6_gg_.__animation_1hrd6_gg_,.___SValue_1hrd6_gg_{animation-name:none}}", /*__inner_css_end__*/"1hrd6_gg_"),
|
|
23
20
|
/*__reshadow_css_end__*/
|
|
24
21
|
{
|
|
25
|
-
"__SProgressBar": "
|
|
26
|
-
"_theme_dark": "
|
|
27
|
-
"__SValue": "
|
|
28
|
-
"--width": "--
|
|
29
|
-
"--duration": "--
|
|
30
|
-
"_theme": "
|
|
31
|
-
"--colorBg": "--
|
|
32
|
-
"_size_s": "
|
|
33
|
-
"_size_m": "
|
|
34
|
-
"_size_l": "
|
|
35
|
-
"_theme_invert": "
|
|
36
|
-
"@loading": "
|
|
37
|
-
"_animation": "
|
|
38
|
-
"_theme_custom": "
|
|
22
|
+
"__SProgressBar": "___SProgressBar_1hrd6_gg_",
|
|
23
|
+
"_theme_dark": "_theme_dark_1hrd6_gg_",
|
|
24
|
+
"__SValue": "___SValue_1hrd6_gg_",
|
|
25
|
+
"--width": "--width_1hrd6",
|
|
26
|
+
"--duration": "--duration_1hrd6",
|
|
27
|
+
"_theme": "__theme_1hrd6_gg_",
|
|
28
|
+
"--colorBg": "--colorBg_1hrd6",
|
|
29
|
+
"_size_s": "_size_s_1hrd6_gg_",
|
|
30
|
+
"_size_m": "_size_m_1hrd6_gg_",
|
|
31
|
+
"_size_l": "_size_l_1hrd6_gg_",
|
|
32
|
+
"_theme_invert": "_theme_invert_1hrd6_gg_",
|
|
33
|
+
"@loading": "loading_1hrd6",
|
|
34
|
+
"_animation": "__animation_1hrd6_gg_",
|
|
35
|
+
"_theme_custom": "_theme_custom_1hrd6_gg_"
|
|
39
36
|
});
|
|
40
37
|
function isCustomTheme(theme) {
|
|
41
38
|
return !['dark', 'invert'].includes(theme);
|
|
@@ -43,7 +40,7 @@ function isCustomTheme(theme) {
|
|
|
43
40
|
var ProgressBarRoot = /*#__PURE__*/function (_Component) {
|
|
44
41
|
function ProgressBarRoot() {
|
|
45
42
|
(0, _classCallCheck2["default"])(this, ProgressBarRoot);
|
|
46
|
-
return
|
|
43
|
+
return (0, _callSuper2["default"])(this, ProgressBarRoot, arguments);
|
|
47
44
|
}
|
|
48
45
|
(0, _inherits2["default"])(ProgressBarRoot, _Component);
|
|
49
46
|
return (0, _createClass2["default"])(ProgressBarRoot, [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["_core","require","_resolveColorEnhance","_interopRequireDefault","_flexBox","_react","
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["_core","require","_resolveColorEnhance","_interopRequireDefault","_flexBox","_react","style","sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_classCallCheck2","_callSuper2","arguments","_inherits2","_createClass2","key","value","getValueProps","_this$asProps","asProps","duration","size","resolveColor","render","_ref","_ref3","SProgressBar","Box","_this$asProps2","Children","styles","useTheme","createElement","cn","_objectSpread2","assignProps","concat","Component","_defineProperty2","resolveColorEnhance","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","createComponent","_default","exports"],"sources":["../../src/ProgressBar.jsx"],"sourcesContent":["import { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport { Box } from '@semcore/flex-box';\nimport React from 'react';\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 enhance = [resolveColorEnhance()];\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, resolveColor } = this.asProps;\n return {\n value,\n duration,\n size,\n resolveColor,\n };\n }\n\n render() {\n const SProgressBar = Root;\n const { Children, styles, duration, theme, value, resolveColor } = 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, resolveColor } = 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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QAAQ;IACfkC,QAAQ,eAAEvC,MAAA,YAAA+B,aAAA,CAACS,WAAW,CAACC,KAAK,MAAE;EAChC,CAAC;AAAA,CAAC;AAiCJ,SAASA,KAAKA,CAACC,KAAK,EAAE;EAAA,IAAAC,KAAA,GAAAC,YAAA;IAAAC,KAAA;EACpB,IAAMC,MAAM,GAMApB,YAAG;EALf,IAAQG,MAAM,GAA2Ca,KAAK,CAAtDb,MAAM;IAAEd,KAAK,GAAoC2B,KAAK,CAA9C3B,KAAK;IAAEV,KAAK,GAA6BqC,KAAK,CAAvCrC,KAAK;IAAEc,QAAQ,GAAmBuB,KAAK,CAAhCvB,QAAQ;IAAEE,YAAY,GAAKqB,KAAK,CAAtBrB,YAAY;EACpD,IAAM0B,KAAK,MAAAZ,MAAA,CAAMpB,KAAK,MAAG;EAEzB,OAAA8B,KAAA,GAAO,IAAA3C,aAAO,EAAC2B,MAAM,CAAC,eACpB7B,MAAA,YAAA+B,aAAA,CAACe,MAAM,EAAAD,KAAA,CAAAb,EAAA,eAAAC,cAAA,qBAAAtC,KAAA,CAAAuC,WAAA;IAAA,aAEMa,KAAK;IAAA,mBAAAZ,MAAA,CACChB,QAAQ;IAAA,WAChBE,YAAY,CAAChB,KAAK;EAAC,GAAAsC,KAAA,GAC7B,CAAC;AAEN;AAEA,IAAMH,WAAW,GAAG,IAAAQ,qBAAe,EAACzC,eAAe,EAAE;EACnDkC,KAAK,EAALA;AACF,CAAC,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,cAEYV,WAAW","ignoreList":[]}
|
package/lib/es6/ProgressBar.js
CHANGED
|
@@ -1,37 +1,34 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import
|
|
5
|
-
import _isNativeReflectConstruct from "@babel/runtime/helpers/isNativeReflectConstruct";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
4
|
+
import _callSuper from "@babel/runtime/helpers/callSuper";
|
|
7
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
7
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
10
8
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
11
9
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
12
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
10
|
import { createComponent, Component, sstyled, Root } from '@semcore/core';
|
|
14
11
|
import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
|
|
15
12
|
import { Box } from '@semcore/flex-box';
|
|
16
13
|
import React from 'react';
|
|
17
14
|
/*!__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
18
|
-
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes
|
|
15
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes loading_1hrd6{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1hrd6_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hrd6_gg_._theme_dark_1hrd6_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1hrd6_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%));overflow:hidden;animation-name:loading_1hrd6;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1hrd6);animation-duration:var(--duration_1hrd6);transition-duration:var(--duration_1hrd6)}.___SValue_1hrd6_gg_.__theme_1hrd6_gg_{background-color:var(--colorBg_1hrd6);background-image:var(--colorBg_1hrd6)}.___SProgressBar_1hrd6_gg_._size_s_1hrd6_gg_,.___SValue_1hrd6_gg_._size_s_1hrd6_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1hrd6_gg_._size_m_1hrd6_gg_,.___SValue_1hrd6_gg_._size_m_1hrd6_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1hrd6_gg_._size_l_1hrd6_gg_,.___SValue_1hrd6_gg_._size_l_1hrd6_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1hrd6_gg_._theme_invert_1hrd6_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hrd6_gg_.__animation_1hrd6_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%));animation-name:loading_1hrd6;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1hrd6)}.___SProgressBar_1hrd6_gg_._theme_custom_1hrd6_gg_{background-color:var(--colorBg_1hrd6);background-image:var(--colorBg_1hrd6)}@media (prefers-reduced-motion){.___SProgressBar_1hrd6_gg_.__animation_1hrd6_gg_,.___SValue_1hrd6_gg_{animation-name:none}}", /*__inner_css_end__*/"1hrd6_gg_"),
|
|
19
16
|
/*__reshadow_css_end__*/
|
|
20
17
|
{
|
|
21
|
-
"__SProgressBar": "
|
|
22
|
-
"_theme_dark": "
|
|
23
|
-
"__SValue": "
|
|
24
|
-
"--width": "--
|
|
25
|
-
"--duration": "--
|
|
26
|
-
"_theme": "
|
|
27
|
-
"--colorBg": "--
|
|
28
|
-
"_size_s": "
|
|
29
|
-
"_size_m": "
|
|
30
|
-
"_size_l": "
|
|
31
|
-
"_theme_invert": "
|
|
32
|
-
"@loading": "
|
|
33
|
-
"_animation": "
|
|
34
|
-
"_theme_custom": "
|
|
18
|
+
"__SProgressBar": "___SProgressBar_1hrd6_gg_",
|
|
19
|
+
"_theme_dark": "_theme_dark_1hrd6_gg_",
|
|
20
|
+
"__SValue": "___SValue_1hrd6_gg_",
|
|
21
|
+
"--width": "--width_1hrd6",
|
|
22
|
+
"--duration": "--duration_1hrd6",
|
|
23
|
+
"_theme": "__theme_1hrd6_gg_",
|
|
24
|
+
"--colorBg": "--colorBg_1hrd6",
|
|
25
|
+
"_size_s": "_size_s_1hrd6_gg_",
|
|
26
|
+
"_size_m": "_size_m_1hrd6_gg_",
|
|
27
|
+
"_size_l": "_size_l_1hrd6_gg_",
|
|
28
|
+
"_theme_invert": "_theme_invert_1hrd6_gg_",
|
|
29
|
+
"@loading": "loading_1hrd6",
|
|
30
|
+
"_animation": "__animation_1hrd6_gg_",
|
|
31
|
+
"_theme_custom": "_theme_custom_1hrd6_gg_"
|
|
35
32
|
});
|
|
36
33
|
function isCustomTheme(theme) {
|
|
37
34
|
return !['dark', 'invert'].includes(theme);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["createComponent","Component","sstyled","Root","resolveColorEnhance","Box","React","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","getValueProps","_this$asProps","asProps","duration","size","resolveColor","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 { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport { Box } from '@semcore/flex-box';\nimport React from 'react';\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 enhance = [resolveColorEnhance()];\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, resolveColor } = this.asProps;\n return {\n value,\n duration,\n size,\n resolveColor,\n };\n }\n\n render() {\n const SProgressBar = Root;\n const { Children, styles, duration, theme, value, resolveColor } = 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, resolveColor } = 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":"
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["createComponent","Component","sstyled","Root","resolveColorEnhance","Box","React","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","getValueProps","_this$asProps","asProps","duration","size","resolveColor","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 { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport { Box } from '@semcore/flex-box';\nimport React from 'react';\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 enhance = [resolveColorEnhance()];\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, resolveColor } = this.asProps;\n return {\n value,\n duration,\n size,\n resolveColor,\n };\n }\n\n render() {\n const SProgressBar = Root;\n const { Children, styles, duration, theme, value, resolveColor } = 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, resolveColor } = 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":";;;;;;;;;AAAA,SAASA,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,mBAAmB,MAAM,sDAAs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KAAK,CAA9CxB,KAAK;IAAEV,KAAK,GAA6BkC,KAAK,CAAvClC,KAAK;IAAEc,QAAQ,GAAmBoB,KAAK,CAAhCpB,QAAQ;IAAEE,YAAY,GAAKkB,KAAK,CAAtBlB,YAAY;EACpD,IAAMuB,KAAK,MAAAV,MAAA,CAAMnB,KAAK,MAAG;EAEzB,OAAA2B,KAAA,GAAO9C,OAAO,CAACgC,MAAM,CAAC,eACpB5B,KAAA,CAAA8B,aAAA,CAACa,MAAM,EAAAD,KAAA,CAAAX,EAAA,WAAAC,aAAA,KAAAa,aAAA;IAAA,aAEMD,KAAK;IAAA,mBAAAV,MAAA,CACCf,QAAQ;IAAA,WAChBE,YAAY,CAAChB,KAAK;EAAC,GAAAmC,KAAA,GAC7B,CAAC;AAEN;AAEA,IAAMH,WAAW,GAAG3C,eAAe,CAACa,eAAe,EAAE;EACnD+B,KAAK,EAALA;AACF,CAAC,CAAC;AAEF,eAAeD,WAAW","ignoreList":[]}
|
package/lib/esm/ProgressBar.mjs
CHANGED
|
@@ -1,42 +1,37 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import
|
|
5
|
-
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
4
|
+
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
7
5
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
6
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
7
|
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
10
8
|
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
11
9
|
import { Box } from "@semcore/flex-box";
|
|
12
10
|
import React from "react";
|
|
13
|
-
function _callSuper(t, o, e) {
|
|
14
|
-
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
|
15
|
-
}
|
|
16
11
|
/*!__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
17
12
|
var style = (
|
|
18
13
|
/*__reshadow_css_start__*/
|
|
19
14
|
(sstyled.insert(
|
|
20
15
|
/*__inner_css_start__*/
|
|
21
|
-
"@keyframes
|
|
16
|
+
"@keyframes loading_1hrd6{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1hrd6_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hrd6_gg_._theme_dark_1hrd6_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1hrd6_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%));overflow:hidden;animation-name:loading_1hrd6;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1hrd6);animation-duration:var(--duration_1hrd6);transition-duration:var(--duration_1hrd6)}.___SValue_1hrd6_gg_.__theme_1hrd6_gg_{background-color:var(--colorBg_1hrd6);background-image:var(--colorBg_1hrd6)}.___SProgressBar_1hrd6_gg_._size_s_1hrd6_gg_,.___SValue_1hrd6_gg_._size_s_1hrd6_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1hrd6_gg_._size_m_1hrd6_gg_,.___SValue_1hrd6_gg_._size_m_1hrd6_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1hrd6_gg_._size_l_1hrd6_gg_,.___SValue_1hrd6_gg_._size_l_1hrd6_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1hrd6_gg_._theme_invert_1hrd6_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hrd6_gg_.__animation_1hrd6_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%));animation-name:loading_1hrd6;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1hrd6)}.___SProgressBar_1hrd6_gg_._theme_custom_1hrd6_gg_{background-color:var(--colorBg_1hrd6);background-image:var(--colorBg_1hrd6)}@media (prefers-reduced-motion){.___SProgressBar_1hrd6_gg_.__animation_1hrd6_gg_,.___SValue_1hrd6_gg_{animation-name:none}}",
|
|
22
17
|
/*__inner_css_end__*/
|
|
23
|
-
"
|
|
18
|
+
"1hrd6_gg_"
|
|
24
19
|
), /*__reshadow_css_end__*/
|
|
25
20
|
{
|
|
26
|
-
"__SProgressBar": "
|
|
27
|
-
"_theme_dark": "
|
|
28
|
-
"__SValue": "
|
|
29
|
-
"--width": "--
|
|
30
|
-
"--duration": "--
|
|
31
|
-
"_theme": "
|
|
32
|
-
"--colorBg": "--
|
|
33
|
-
"_size_s": "
|
|
34
|
-
"_size_m": "
|
|
35
|
-
"_size_l": "
|
|
36
|
-
"_theme_invert": "
|
|
37
|
-
"@loading": "
|
|
38
|
-
"_animation": "
|
|
39
|
-
"_theme_custom": "
|
|
21
|
+
"__SProgressBar": "___SProgressBar_1hrd6_gg_",
|
|
22
|
+
"_theme_dark": "_theme_dark_1hrd6_gg_",
|
|
23
|
+
"__SValue": "___SValue_1hrd6_gg_",
|
|
24
|
+
"--width": "--width_1hrd6",
|
|
25
|
+
"--duration": "--duration_1hrd6",
|
|
26
|
+
"_theme": "__theme_1hrd6_gg_",
|
|
27
|
+
"--colorBg": "--colorBg_1hrd6",
|
|
28
|
+
"_size_s": "_size_s_1hrd6_gg_",
|
|
29
|
+
"_size_m": "_size_m_1hrd6_gg_",
|
|
30
|
+
"_size_l": "_size_l_1hrd6_gg_",
|
|
31
|
+
"_theme_invert": "_theme_invert_1hrd6_gg_",
|
|
32
|
+
"@loading": "loading_1hrd6",
|
|
33
|
+
"_animation": "__animation_1hrd6_gg_",
|
|
34
|
+
"_theme_custom": "_theme_custom_1hrd6_gg_"
|
|
40
35
|
})
|
|
41
36
|
);
|
|
42
37
|
function isCustomTheme(theme) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/progress-bar",
|
|
3
3
|
"description": "Semrush ProgressBar Component",
|
|
4
|
-
"version": "16.0.
|
|
4
|
+
"version": "16.0.10-prerelease.3",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "16.0.
|
|
17
|
+
"@semcore/flex-box": "16.0.10-prerelease.3"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@semcore/base-components": "^16.0.
|
|
20
|
+
"@semcore/base-components": "^16.4.0-prerelease.3"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "semcore/progress-bar"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@semcore/core": "16.
|
|
28
|
+
"@semcore/core": "16.5.0-prerelease.3",
|
|
29
29
|
"@semcore/testing-utils": "1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|