@semcore/progress-bar 16.0.1-prerelease.4 → 16.0.2-prerelease.1
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/README.md +1 -31
- package/lib/cjs/ProgressBar.js +26 -26
- package/lib/cjs/ProgressBar.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/es6/ProgressBar.js +24 -23
- package/lib/es6/ProgressBar.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/esm/ProgressBar.mjs +28 -25
- package/lib/types/index.d.ts +2 -2
- 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.2] - 2025-06-13
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/flex-box` [16.0.1 ~> 16.0.2], `@semcore/base-components` [16.0.1 ~> 16.0.2]).
|
|
10
|
+
|
|
5
11
|
## [16.0.1] - 2025-05-30
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/README.md
CHANGED
|
@@ -13,40 +13,10 @@
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
npm install
|
|
16
|
+
npm install @semcore/progress-bar
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
## Usage
|
|
20
19
|
|
|
21
|
-
```jsx
|
|
22
|
-
import ProgressBar from 'intergalactic/progress-bar';
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
<details>
|
|
26
|
-
<summary>Alternative installation and use</summary>
|
|
27
|
-
|
|
28
|
-
**We do not recommend this usage path due to possible dependency and update issues.**
|
|
29
|
-
|
|
30
|
-
### Install
|
|
31
|
-
|
|
32
|
-
You can only install one package from the design system
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm install @semcore/progress-bar @semcore/core
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
`@semcore/core` - _is the basic package by which we create our components, and it contains all of the common logic
|
|
39
|
-
of the components that is discussed below. There should only be one version of the package in the project._
|
|
40
|
-
|
|
41
|
-
### Usage
|
|
42
|
-
|
|
43
|
-
You can use the package the same way but without `/ui/` in the import path.
|
|
44
|
-
|
|
45
|
-
```jsx
|
|
46
|
-
import ProgressBar from '@semcore/progress-bar';
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
</details>
|
|
50
20
|
|
|
51
21
|
## 👤 Author
|
|
52
22
|
|
package/lib/cjs/ProgressBar.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -8,43 +8,45 @@ 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 _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
|
+
var _isNativeReflectConstruct2 = _interopRequireDefault(require("@babel/runtime/helpers/isNativeReflectConstruct"));
|
|
13
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
11
14
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
13
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
16
|
var _core = require("@semcore/core");
|
|
15
|
-
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
var _flexBox = require("@semcore/flex-box");
|
|
17
17
|
var _resolveColorEnhance = _interopRequireDefault(require("@semcore/core/lib/utils/enhances/resolveColorEnhance"));
|
|
18
|
+
var _flexBox = require("@semcore/flex-box");
|
|
19
|
+
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)); }
|
|
18
21
|
/*!__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
19
|
-
var style = (
|
|
22
|
+
var style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/"@keyframes loading_h8e8y{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_h8e8y_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_h8e8y_gg_._theme_dark_h8e8y_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_h8e8y_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_h8e8y;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_h8e8y);animation-duration:var(--duration_h8e8y);transition-duration:var(--duration_h8e8y)}.___SValue_h8e8y_gg_.__theme_h8e8y_gg_{background-color:var(--colorBg_h8e8y);background-image:var(--colorBg_h8e8y)}.___SProgressBar_h8e8y_gg_._size_s_h8e8y_gg_,.___SValue_h8e8y_gg_._size_s_h8e8y_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_h8e8y_gg_._size_m_h8e8y_gg_,.___SValue_h8e8y_gg_._size_m_h8e8y_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_h8e8y_gg_._size_l_h8e8y_gg_,.___SValue_h8e8y_gg_._size_l_h8e8y_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_h8e8y_gg_._theme_invert_h8e8y_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_h8e8y_gg_.__animation_h8e8y_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_h8e8y;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_h8e8y)}.___SProgressBar_h8e8y_gg_._theme_custom_h8e8y_gg_{background-color:var(--colorBg_h8e8y);background-image:var(--colorBg_h8e8y)}@media (prefers-reduced-motion){.___SProgressBar_h8e8y_gg_.__animation_h8e8y_gg_,.___SValue_h8e8y_gg_{animation-name:none}}", /*__inner_css_end__*/"h8e8y_gg_"),
|
|
20
23
|
/*__reshadow_css_end__*/
|
|
21
24
|
{
|
|
22
|
-
"__SProgressBar": "
|
|
23
|
-
"_theme_dark": "
|
|
24
|
-
"__SValue": "
|
|
25
|
-
"--width": "--
|
|
26
|
-
"--duration": "--
|
|
27
|
-
"_theme": "
|
|
28
|
-
"--colorBg": "--
|
|
29
|
-
"_size_s": "
|
|
30
|
-
"_size_m": "
|
|
31
|
-
"_size_l": "
|
|
32
|
-
"_theme_invert": "
|
|
33
|
-
"@loading": "
|
|
34
|
-
"_animation": "
|
|
35
|
-
"_theme_custom": "
|
|
25
|
+
"__SProgressBar": "___SProgressBar_h8e8y_gg_",
|
|
26
|
+
"_theme_dark": "_theme_dark_h8e8y_gg_",
|
|
27
|
+
"__SValue": "___SValue_h8e8y_gg_",
|
|
28
|
+
"--width": "--width_h8e8y",
|
|
29
|
+
"--duration": "--duration_h8e8y",
|
|
30
|
+
"_theme": "__theme_h8e8y_gg_",
|
|
31
|
+
"--colorBg": "--colorBg_h8e8y",
|
|
32
|
+
"_size_s": "_size_s_h8e8y_gg_",
|
|
33
|
+
"_size_m": "_size_m_h8e8y_gg_",
|
|
34
|
+
"_size_l": "_size_l_h8e8y_gg_",
|
|
35
|
+
"_theme_invert": "_theme_invert_h8e8y_gg_",
|
|
36
|
+
"@loading": "loading_h8e8y",
|
|
37
|
+
"_animation": "__animation_h8e8y_gg_",
|
|
38
|
+
"_theme_custom": "_theme_custom_h8e8y_gg_"
|
|
36
39
|
});
|
|
37
40
|
function isCustomTheme(theme) {
|
|
38
41
|
return !['dark', 'invert'].includes(theme);
|
|
39
42
|
}
|
|
40
43
|
var ProgressBarRoot = /*#__PURE__*/function (_Component) {
|
|
41
|
-
(0, _inherits2["default"])(ProgressBarRoot, _Component);
|
|
42
|
-
var _super = (0, _createSuper2["default"])(ProgressBarRoot);
|
|
43
44
|
function ProgressBarRoot() {
|
|
44
45
|
(0, _classCallCheck2["default"])(this, ProgressBarRoot);
|
|
45
|
-
return
|
|
46
|
+
return _callSuper(this, ProgressBarRoot, arguments);
|
|
46
47
|
}
|
|
47
|
-
(0,
|
|
48
|
+
(0, _inherits2["default"])(ProgressBarRoot, _Component);
|
|
49
|
+
return (0, _createClass2["default"])(ProgressBarRoot, [{
|
|
48
50
|
key: "getValueProps",
|
|
49
51
|
value: function getValueProps() {
|
|
50
52
|
var _this$asProps = this.asProps,
|
|
@@ -83,7 +85,6 @@ var ProgressBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
83
85
|
}, _ref))), /*#__PURE__*/_react["default"].createElement(Children, _ref3.cn("Children", {})));
|
|
84
86
|
}
|
|
85
87
|
}]);
|
|
86
|
-
return ProgressBarRoot;
|
|
87
88
|
}(_core.Component);
|
|
88
89
|
(0, _defineProperty2["default"])(ProgressBarRoot, "displayName", 'ProgressBar');
|
|
89
90
|
(0, _defineProperty2["default"])(ProgressBarRoot, "style", style);
|
|
@@ -115,6 +116,5 @@ function Value(props) {
|
|
|
115
116
|
var ProgressBar = (0, _core.createComponent)(ProgressBarRoot, {
|
|
116
117
|
Value: Value
|
|
117
118
|
});
|
|
118
|
-
var _default = ProgressBar;
|
|
119
|
-
exports["default"] = _default;
|
|
119
|
+
var _default = exports["default"] = ProgressBar;
|
|
120
120
|
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["_core","require","
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["_core","require","_resolveColorEnhance","_interopRequireDefault","_flexBox","_react","_callSuper","t","o","e","_getPrototypeOf2","_possibleConstructorReturn2","_isNativeReflectConstruct2","Reflect","construct","constructor","apply","style","sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_classCallCheck2","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={resolveColor(theme)}\n />,\n );\n}\n\nconst ProgressBar = createComponent(ProgressBarRoot, {\n Value,\n});\n\nexport default ProgressBar;\n"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA0B,SAAAK,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,aAAAF,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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;IAAET,KAAK,GAA6BoC,KAAK,CAAvCpC,KAAK;IAAEa,QAAQ,GAAmBuB,KAAK,CAAhCvB,QAAQ;IAAEE,YAAY,GAAKqB,KAAK,CAAtBrB,YAAY;EACpD,IAAM0B,KAAK,MAAAZ,MAAA,CAAMpB,KAAK,MAAG;EAEzB,OAAA8B,KAAA,GAAO,IAAA1C,aAAO,EAAC0B,MAAM,CAAC,eACpBvC,MAAA,YAAAyC,aAAA,CAACe,MAAM,EAAAD,KAAA,CAAAb,EAAA,eAAAC,cAAA,qBAAAhD,KAAA,CAAAiD,WAAA;IAAA,aAEMa,KAAK;IAAA,mBAAAZ,MAAA,CACChB,QAAQ;IAAA,WAChBE,YAAY,CAACf,KAAK;EAAC,GAAAqC,KAAA,GAC7B,CAAC;AAEN;AAEA,IAAMH,WAAW,GAAG,IAAAQ,qBAAe,EAACxC,eAAe,EAAE;EACnDiC,KAAK,EAALA;AACF,CAAC,CAAC;AAAC,IAAAQ,QAAA,GAAAC,OAAA,cAEYV,WAAW","ignoreList":[]}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IProgressBarProps extends ProgressBarProps, UnknownProperties {}\nexport type ProgressBarProps = BoxProps & {\n /**\n * Progress bar theme\n * @default invert\n */\n theme?: 'dark' | 'invert' | string;\n /**\n * Progress bar size\n * @default m\n */\n size?: 's' | 'm' | 'l';\n /** Value as a percentage */\n value?: number;\n /** Duration of animation, ms\n * @default 1000\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IValueProps extends ValueProps, UnknownProperties {}\nexport type ValueProps = BoxProps & {\n size?: 's' | 'm' | 'l';\n value?: number;\n duration?: number;\n theme?: string;\n};\n\n/** @deprecated */\nexport interface IProgressBarCxt extends ProgressBarCxt, UnknownProperties {}\nexport type ProgressBarCxt = {\n getValueProps: PropGetterFn;\n};\n\ndeclare const ProgressBar: Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt> & {\n Value: Intergalactic.Component<'div', ValueProps>;\n};\n\nexport default ProgressBar;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IProgressBarProps extends ProgressBarProps, UnknownProperties {}\nexport type ProgressBarProps = BoxProps & {\n /**\n * Progress bar theme\n * @default invert\n */\n theme?: 'dark' | 'invert' | string;\n /**\n * Progress bar size\n * @default m\n */\n size?: 's' | 'm' | 'l';\n /** Value as a percentage */\n value?: number;\n /** Duration of animation, ms\n * @default 1000\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IValueProps extends ValueProps, UnknownProperties {}\nexport type ValueProps = BoxProps & {\n size?: 's' | 'm' | 'l';\n value?: number;\n duration?: number;\n theme?: string;\n};\n\n/** @deprecated */\nexport interface IProgressBarCxt extends ProgressBarCxt, UnknownProperties {}\nexport type ProgressBarCxt = {\n getValueProps: PropGetterFn;\n};\n\ndeclare const ProgressBar: Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt> & {\n Value: Intergalactic.Component<'div', ValueProps>;\n};\n\nexport default ProgressBar;\n"],"mappings":"","ignoreList":[]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_ProgressBar","_interopRequireDefault","require"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './ProgressBar';\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_ProgressBar","_interopRequireDefault","require"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './ProgressBar';\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA","ignoreList":[]}
|
package/lib/es6/ProgressBar.js
CHANGED
|
@@ -1,46 +1,48 @@
|
|
|
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 _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
4
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
6
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
9
|
import { sstyled as _sstyled } from "@semcore/core";
|
|
8
10
|
import { assignProps as _assignProps2 } from "@semcore/core";
|
|
9
11
|
import { assignProps as _assignProps } from "@semcore/core";
|
|
10
|
-
|
|
12
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
13
|
import { createComponent, Component, sstyled, Root } from '@semcore/core';
|
|
12
|
-
import { Box } from '@semcore/flex-box';
|
|
13
14
|
import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
|
|
15
|
+
import { Box } from '@semcore/flex-box';
|
|
16
|
+
import React from 'react';
|
|
14
17
|
/*!__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
15
|
-
var style = (
|
|
18
|
+
var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/"@keyframes loading_h8e8y{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_h8e8y_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_h8e8y_gg_._theme_dark_h8e8y_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_h8e8y_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_h8e8y;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_h8e8y);animation-duration:var(--duration_h8e8y);transition-duration:var(--duration_h8e8y)}.___SValue_h8e8y_gg_.__theme_h8e8y_gg_{background-color:var(--colorBg_h8e8y);background-image:var(--colorBg_h8e8y)}.___SProgressBar_h8e8y_gg_._size_s_h8e8y_gg_,.___SValue_h8e8y_gg_._size_s_h8e8y_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_h8e8y_gg_._size_m_h8e8y_gg_,.___SValue_h8e8y_gg_._size_m_h8e8y_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_h8e8y_gg_._size_l_h8e8y_gg_,.___SValue_h8e8y_gg_._size_l_h8e8y_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_h8e8y_gg_._theme_invert_h8e8y_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_h8e8y_gg_.__animation_h8e8y_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_h8e8y;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_h8e8y)}.___SProgressBar_h8e8y_gg_._theme_custom_h8e8y_gg_{background-color:var(--colorBg_h8e8y);background-image:var(--colorBg_h8e8y)}@media (prefers-reduced-motion){.___SProgressBar_h8e8y_gg_.__animation_h8e8y_gg_,.___SValue_h8e8y_gg_{animation-name:none}}", /*__inner_css_end__*/"h8e8y_gg_"),
|
|
16
19
|
/*__reshadow_css_end__*/
|
|
17
20
|
{
|
|
18
|
-
"__SProgressBar": "
|
|
19
|
-
"_theme_dark": "
|
|
20
|
-
"__SValue": "
|
|
21
|
-
"--width": "--
|
|
22
|
-
"--duration": "--
|
|
23
|
-
"_theme": "
|
|
24
|
-
"--colorBg": "--
|
|
25
|
-
"_size_s": "
|
|
26
|
-
"_size_m": "
|
|
27
|
-
"_size_l": "
|
|
28
|
-
"_theme_invert": "
|
|
29
|
-
"@loading": "
|
|
30
|
-
"_animation": "
|
|
31
|
-
"_theme_custom": "
|
|
21
|
+
"__SProgressBar": "___SProgressBar_h8e8y_gg_",
|
|
22
|
+
"_theme_dark": "_theme_dark_h8e8y_gg_",
|
|
23
|
+
"__SValue": "___SValue_h8e8y_gg_",
|
|
24
|
+
"--width": "--width_h8e8y",
|
|
25
|
+
"--duration": "--duration_h8e8y",
|
|
26
|
+
"_theme": "__theme_h8e8y_gg_",
|
|
27
|
+
"--colorBg": "--colorBg_h8e8y",
|
|
28
|
+
"_size_s": "_size_s_h8e8y_gg_",
|
|
29
|
+
"_size_m": "_size_m_h8e8y_gg_",
|
|
30
|
+
"_size_l": "_size_l_h8e8y_gg_",
|
|
31
|
+
"_theme_invert": "_theme_invert_h8e8y_gg_",
|
|
32
|
+
"@loading": "loading_h8e8y",
|
|
33
|
+
"_animation": "__animation_h8e8y_gg_",
|
|
34
|
+
"_theme_custom": "_theme_custom_h8e8y_gg_"
|
|
32
35
|
});
|
|
33
36
|
function isCustomTheme(theme) {
|
|
34
37
|
return !['dark', 'invert'].includes(theme);
|
|
35
38
|
}
|
|
36
39
|
var ProgressBarRoot = /*#__PURE__*/function (_Component) {
|
|
37
|
-
_inherits(ProgressBarRoot, _Component);
|
|
38
|
-
var _super = _createSuper(ProgressBarRoot);
|
|
39
40
|
function ProgressBarRoot() {
|
|
40
41
|
_classCallCheck(this, ProgressBarRoot);
|
|
41
|
-
return
|
|
42
|
+
return _callSuper(this, ProgressBarRoot, arguments);
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
_inherits(ProgressBarRoot, _Component);
|
|
45
|
+
return _createClass(ProgressBarRoot, [{
|
|
44
46
|
key: "getValueProps",
|
|
45
47
|
value: function getValueProps() {
|
|
46
48
|
var _this$asProps = this.asProps,
|
|
@@ -79,7 +81,6 @@ var ProgressBarRoot = /*#__PURE__*/function (_Component) {
|
|
|
79
81
|
}, _ref))), /*#__PURE__*/React.createElement(Children, _ref3.cn("Children", {})));
|
|
80
82
|
}
|
|
81
83
|
}]);
|
|
82
|
-
return ProgressBarRoot;
|
|
83
84
|
}(Component);
|
|
84
85
|
_defineProperty(ProgressBarRoot, "displayName", 'ProgressBar');
|
|
85
86
|
_defineProperty(ProgressBarRoot, "style", style);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["
|
|
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,sDAAsD;AACtF,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAI1B,SAASC,aAAaA,CAACC,KAAK,EAAE;EAC5B,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACD,KAAK,CAAC;AAC5C;AAAC,IAEKE,eAAe,0BAAAC,UAAA;EAAA,SAAAD,gBAAA;IAAAE,eAAA,OAAAF,eAAA;IAAA,OAAAG,UAAA,OAAAH,eAAA,EAAAI,SAAA;EAAA;EAAAC,SAAA,CAAAL,eAAA,EAAAC,UAAA;EAAA,OAAAK,YAAA,CAAAN,eAAA;IAAAO,GAAA;IAAAC,KAAA,EAWnB,SAAAC,aAAaA,CAAA,EAAG;MACd,IAAAC,aAAA,GAAgD,IAAI,CAACC,OAAO;QAApDH,KAAK,GAAAE,aAAA,CAALF,KAAK;QAAEI,QAAQ,GAAAF,aAAA,CAARE,QAAQ;QAAEC,IAAI,GAAAH,aAAA,CAAJG,IAAI;QAAEC,YAAY,GAAAJ,aAAA,CAAZI,YAAY;MAC3C,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eAAA,CAHpC5B,eAAe,kBAIG;EAAA,OAAO;IAC3BY,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,GAAG;IACTf,KAAK,EAAE,QAAQ;IACf+B,QAAQ,eAAEpC,KAAA,CAAA8B,aAAA,CAACO,WAAW,CAACC,KAAK,MAAE;EAChC,CAAC;AAAA,CAAC;AAiCJ,SAASA,KAAKA,CAACC,KAAK,EAAE;EAAA,IAAAC,KAAA,GAAAC,YAAA;IAAAC,KAAA;EACpB,IAAMC,MAAM,GAMA5C,GAAG;EALf,IAAQ6B,MAAM,GAA2CW,KAAK,CAAtDX,MAAM;IAAEb,KAAK,GAAoCwB,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/es6/index.d.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IProgressBarProps extends ProgressBarProps, UnknownProperties {}\nexport type ProgressBarProps = BoxProps & {\n /**\n * Progress bar theme\n * @default invert\n */\n theme?: 'dark' | 'invert' | string;\n /**\n * Progress bar size\n * @default m\n */\n size?: 's' | 'm' | 'l';\n /** Value as a percentage */\n value?: number;\n /** Duration of animation, ms\n * @default 1000\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IValueProps extends ValueProps, UnknownProperties {}\nexport type ValueProps = BoxProps & {\n size?: 's' | 'm' | 'l';\n value?: number;\n duration?: number;\n theme?: string;\n};\n\n/** @deprecated */\nexport interface IProgressBarCxt extends ProgressBarCxt, UnknownProperties {}\nexport type ProgressBarCxt = {\n getValueProps: PropGetterFn;\n};\n\ndeclare const ProgressBar: Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt> & {\n Value: Intergalactic.Component<'div', ValueProps>;\n};\n\nexport default ProgressBar;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport type { BoxProps } from '@semcore/flex-box';\n\n/** @deprecated */\nexport interface IProgressBarProps extends ProgressBarProps, UnknownProperties {}\nexport type ProgressBarProps = BoxProps & {\n /**\n * Progress bar theme\n * @default invert\n */\n theme?: 'dark' | 'invert' | string;\n /**\n * Progress bar size\n * @default m\n */\n size?: 's' | 'm' | 'l';\n /** Value as a percentage */\n value?: number;\n /** Duration of animation, ms\n * @default 1000\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IValueProps extends ValueProps, UnknownProperties {}\nexport type ValueProps = BoxProps & {\n size?: 's' | 'm' | 'l';\n value?: number;\n duration?: number;\n theme?: string;\n};\n\n/** @deprecated */\nexport interface IProgressBarCxt extends ProgressBarCxt, UnknownProperties {}\nexport type ProgressBarCxt = {\n getValueProps: PropGetterFn;\n};\n\ndeclare const ProgressBar: Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt> & {\n Value: Intergalactic.Component<'div', ValueProps>;\n};\n\nexport default ProgressBar;\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './ProgressBar';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './ProgressBar';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe","ignoreList":[]}
|
package/lib/esm/ProgressBar.mjs
CHANGED
|
@@ -1,50 +1,54 @@
|
|
|
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 _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _isNativeReflectConstruct from "@babel/runtime/helpers/esm/isNativeReflectConstruct";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
4
7
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
5
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
6
8
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
|
-
import {
|
|
8
|
-
import React from "react";
|
|
9
|
-
import { Box } from "@semcore/flex-box";
|
|
9
|
+
import { createComponent, sstyled, assignProps, Component } from "@semcore/core";
|
|
10
10
|
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
11
|
+
import { Box } from "@semcore/flex-box";
|
|
12
|
+
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
|
+
}
|
|
11
16
|
/*!__reshadow-styles__:"./style/progress-bar.shadow.css"*/
|
|
12
17
|
var style = (
|
|
13
18
|
/*__reshadow_css_start__*/
|
|
14
19
|
(sstyled.insert(
|
|
15
20
|
/*__inner_css_start__*/
|
|
16
|
-
"@keyframes
|
|
21
|
+
"@keyframes loading_h8e8y{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_h8e8y_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_h8e8y_gg_._theme_dark_h8e8y_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_h8e8y_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_h8e8y;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_h8e8y);animation-duration:var(--duration_h8e8y);transition-duration:var(--duration_h8e8y)}.___SValue_h8e8y_gg_.__theme_h8e8y_gg_{background-color:var(--colorBg_h8e8y);background-image:var(--colorBg_h8e8y)}.___SProgressBar_h8e8y_gg_._size_s_h8e8y_gg_,.___SValue_h8e8y_gg_._size_s_h8e8y_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_h8e8y_gg_._size_m_h8e8y_gg_,.___SValue_h8e8y_gg_._size_m_h8e8y_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_h8e8y_gg_._size_l_h8e8y_gg_,.___SValue_h8e8y_gg_._size_l_h8e8y_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_h8e8y_gg_._theme_invert_h8e8y_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_h8e8y_gg_.__animation_h8e8y_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_h8e8y;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_h8e8y)}.___SProgressBar_h8e8y_gg_._theme_custom_h8e8y_gg_{background-color:var(--colorBg_h8e8y);background-image:var(--colorBg_h8e8y)}@media (prefers-reduced-motion){.___SProgressBar_h8e8y_gg_.__animation_h8e8y_gg_,.___SValue_h8e8y_gg_{animation-name:none}}",
|
|
17
22
|
/*__inner_css_end__*/
|
|
18
|
-
"
|
|
23
|
+
"h8e8y_gg_"
|
|
19
24
|
), /*__reshadow_css_end__*/
|
|
20
25
|
{
|
|
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": "
|
|
26
|
+
"__SProgressBar": "___SProgressBar_h8e8y_gg_",
|
|
27
|
+
"_theme_dark": "_theme_dark_h8e8y_gg_",
|
|
28
|
+
"__SValue": "___SValue_h8e8y_gg_",
|
|
29
|
+
"--width": "--width_h8e8y",
|
|
30
|
+
"--duration": "--duration_h8e8y",
|
|
31
|
+
"_theme": "__theme_h8e8y_gg_",
|
|
32
|
+
"--colorBg": "--colorBg_h8e8y",
|
|
33
|
+
"_size_s": "_size_s_h8e8y_gg_",
|
|
34
|
+
"_size_m": "_size_m_h8e8y_gg_",
|
|
35
|
+
"_size_l": "_size_l_h8e8y_gg_",
|
|
36
|
+
"_theme_invert": "_theme_invert_h8e8y_gg_",
|
|
37
|
+
"@loading": "loading_h8e8y",
|
|
38
|
+
"_animation": "__animation_h8e8y_gg_",
|
|
39
|
+
"_theme_custom": "_theme_custom_h8e8y_gg_"
|
|
35
40
|
})
|
|
36
41
|
);
|
|
37
42
|
function isCustomTheme(theme) {
|
|
38
43
|
return !["dark", "invert"].includes(theme);
|
|
39
44
|
}
|
|
40
45
|
var ProgressBarRoot = /* @__PURE__ */ function(_Component) {
|
|
41
|
-
_inherits(ProgressBarRoot2, _Component);
|
|
42
|
-
var _super = _createSuper(ProgressBarRoot2);
|
|
43
46
|
function ProgressBarRoot2() {
|
|
44
47
|
_classCallCheck(this, ProgressBarRoot2);
|
|
45
|
-
return
|
|
48
|
+
return _callSuper(this, ProgressBarRoot2, arguments);
|
|
46
49
|
}
|
|
47
|
-
|
|
50
|
+
_inherits(ProgressBarRoot2, _Component);
|
|
51
|
+
return _createClass(ProgressBarRoot2, [{
|
|
48
52
|
key: "getValueProps",
|
|
49
53
|
value: function getValueProps() {
|
|
50
54
|
var _this$asProps = this.asProps, value = _this$asProps.value, duration = _this$asProps.duration, size = _this$asProps.size, resolveColor = _this$asProps.resolveColor;
|
|
@@ -72,7 +76,6 @@ var ProgressBarRoot = /* @__PURE__ */ function(_Component) {
|
|
|
72
76
|
}, _ref))), /* @__PURE__ */ React.createElement(Children, _ref3.cn("Children", {})));
|
|
73
77
|
}
|
|
74
78
|
}]);
|
|
75
|
-
return ProgressBarRoot2;
|
|
76
79
|
}(Component);
|
|
77
80
|
_defineProperty(ProgressBarRoot, "displayName", "ProgressBar");
|
|
78
81
|
_defineProperty(ProgressBarRoot, "style", style);
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
|
|
2
|
-
import { BoxProps } from '@semcore/flex-box';
|
|
1
|
+
import type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
|
|
2
|
+
import type { BoxProps } from '@semcore/flex-box';
|
|
3
3
|
|
|
4
4
|
/** @deprecated */
|
|
5
5
|
export interface IProgressBarProps extends ProgressBarProps, UnknownProperties {}
|
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.2-prerelease.1",
|
|
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.2-prerelease.1"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@semcore/base-components": "^16.0.
|
|
20
|
+
"@semcore/base-components": "^16.0.2-prerelease.1"
|
|
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
|
-
"@
|
|
28
|
+
"@semcore/core": "16.0.0",
|
|
29
29
|
"@semcore/testing-utils": "1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|