@semcore/progress-bar 4.39.0 → 4.39.1-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 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
+ ## [4.39.1] - 2025-02-05
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/flex-box` [5.40.0 ~> 5.40.1], `@semcore/utils` [4.45.0 ~> 4.45.1], `@semcore/core` [2.38.0 ~> 2.38.1]).
10
+
5
11
  ## [4.39.0] - 2025-02-03
6
12
 
7
13
  ### Changed
@@ -6,33 +6,33 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports["default"] = void 0;
9
- var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
10
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
11
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
13
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createSuper"));
14
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
9
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
+ var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _index = require("@semcore/utils/lib/core/index");
16
16
  var _core = _interopRequireWildcard(require("@semcore/core"));
17
17
  var _react = _interopRequireDefault(require("react"));
18
18
  var _flexBox = require("@semcore/flex-box");
19
19
  var _resolveColorEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/resolveColorEnhance"));
20
20
  /*__reshadow-styles__:"./style/progress-bar.shadow.css"*/
21
- var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@keyframes loading_1hwyt{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1hwyt_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hwyt_gg_._theme_dark_1hwyt_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1hwyt_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_1hwyt;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1hwyt);animation-duration:var(--duration_1hwyt);transition-duration:var(--duration_1hwyt)}.___SValue_1hwyt_gg_.__theme_1hwyt_gg_{background-color:var(--colorBg_1hwyt);background-image:var(--colorBg_1hwyt)}.___SProgressBar_1hwyt_gg_._size_s_1hwyt_gg_,.___SValue_1hwyt_gg_._size_s_1hwyt_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1hwyt_gg_._size_m_1hwyt_gg_,.___SValue_1hwyt_gg_._size_m_1hwyt_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1hwyt_gg_._size_l_1hwyt_gg_,.___SValue_1hwyt_gg_._size_l_1hwyt_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1hwyt_gg_._theme_invert_1hwyt_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hwyt_gg_.__animation_1hwyt_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_1hwyt;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1hwyt)}.___SProgressBar_1hwyt_gg_._theme_custom_1hwyt_gg_{background-color:var(--colorBg_1hwyt);background-image:var(--colorBg_1hwyt)}@media (prefers-reduced-motion){.___SProgressBar_1hwyt_gg_.__animation_1hwyt_gg_,.___SValue_1hwyt_gg_{animation-name:none}}" /*__inner_css_end__*/, "1hwyt_gg_") /*__reshadow_css_end__*/, {
22
- "__SProgressBar": "___SProgressBar_1hwyt_gg_",
23
- "_theme_dark": "_theme_dark_1hwyt_gg_",
24
- "__SValue": "___SValue_1hwyt_gg_",
25
- "--width": "--width_1hwyt",
26
- "--duration": "--duration_1hwyt",
27
- "_theme": "__theme_1hwyt_gg_",
28
- "--colorBg": "--colorBg_1hwyt",
29
- "_size_s": "_size_s_1hwyt_gg_",
30
- "_size_m": "_size_m_1hwyt_gg_",
31
- "_size_l": "_size_l_1hwyt_gg_",
32
- "_theme_invert": "_theme_invert_1hwyt_gg_",
33
- "@loading": "loading_1hwyt",
34
- "_animation": "__animation_1hwyt_gg_",
35
- "_theme_custom": "_theme_custom_1hwyt_gg_"
21
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/"@keyframes loading_1rdat{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1rdat_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1rdat_gg_._theme_dark_1rdat_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1rdat_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_1rdat;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1rdat);animation-duration:var(--duration_1rdat);transition-duration:var(--duration_1rdat)}.___SValue_1rdat_gg_.__theme_1rdat_gg_{background-color:var(--colorBg_1rdat);background-image:var(--colorBg_1rdat)}.___SProgressBar_1rdat_gg_._size_s_1rdat_gg_,.___SValue_1rdat_gg_._size_s_1rdat_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1rdat_gg_._size_m_1rdat_gg_,.___SValue_1rdat_gg_._size_m_1rdat_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1rdat_gg_._size_l_1rdat_gg_,.___SValue_1rdat_gg_._size_l_1rdat_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1rdat_gg_._theme_invert_1rdat_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1rdat_gg_.__animation_1rdat_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_1rdat;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1rdat)}.___SProgressBar_1rdat_gg_._theme_custom_1rdat_gg_{background-color:var(--colorBg_1rdat);background-image:var(--colorBg_1rdat)}@media (prefers-reduced-motion){.___SProgressBar_1rdat_gg_.__animation_1rdat_gg_,.___SValue_1rdat_gg_{animation-name:none}}" /*__inner_css_end__*/, "1rdat_gg_") /*__reshadow_css_end__*/, {
22
+ "__SProgressBar": "___SProgressBar_1rdat_gg_",
23
+ "_theme_dark": "_theme_dark_1rdat_gg_",
24
+ "__SValue": "___SValue_1rdat_gg_",
25
+ "--width": "--width_1rdat",
26
+ "--duration": "--duration_1rdat",
27
+ "_theme": "__theme_1rdat_gg_",
28
+ "--colorBg": "--colorBg_1rdat",
29
+ "_size_s": "_size_s_1rdat_gg_",
30
+ "_size_m": "_size_m_1rdat_gg_",
31
+ "_size_l": "_size_l_1rdat_gg_",
32
+ "_theme_invert": "_theme_invert_1rdat_gg_",
33
+ "@loading": "loading_1rdat",
34
+ "_animation": "__animation_1rdat_gg_",
35
+ "_theme_custom": "_theme_custom_1rdat_gg_"
36
36
  });
37
37
  function isCustomTheme(theme) {
38
38
  return !['dark', 'invert'].includes(theme);
@@ -1,9 +1,9 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/esm/createClass";
4
- import _inherits from "@babel/runtime/helpers/esm/inherits";
5
- import _createSuper from "@babel/runtime/helpers/esm/createSuper";
6
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
1
+ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
+ import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _inherits from "@babel/runtime/helpers/inherits";
5
+ import _createSuper from "@babel/runtime/helpers/createSuper";
6
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  import { sstyled as _sstyled } from "@semcore/utils/lib/core/index";
8
8
  import { assignProps as _assignProps2 } from "@semcore/core";
9
9
  import { assignProps as _assignProps } from "@semcore/core";
@@ -12,21 +12,21 @@ import createComponent, { Component, sstyled, Root } from '@semcore/core';
12
12
  import { Box } from '@semcore/flex-box';
13
13
  import resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';
14
14
  /*__reshadow-styles__:"./style/progress-bar.shadow.css"*/
15
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes loading_1hwyt{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1hwyt_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hwyt_gg_._theme_dark_1hwyt_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1hwyt_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_1hwyt;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1hwyt);animation-duration:var(--duration_1hwyt);transition-duration:var(--duration_1hwyt)}.___SValue_1hwyt_gg_.__theme_1hwyt_gg_{background-color:var(--colorBg_1hwyt);background-image:var(--colorBg_1hwyt)}.___SProgressBar_1hwyt_gg_._size_s_1hwyt_gg_,.___SValue_1hwyt_gg_._size_s_1hwyt_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1hwyt_gg_._size_m_1hwyt_gg_,.___SValue_1hwyt_gg_._size_m_1hwyt_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1hwyt_gg_._size_l_1hwyt_gg_,.___SValue_1hwyt_gg_._size_l_1hwyt_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1hwyt_gg_._theme_invert_1hwyt_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1hwyt_gg_.__animation_1hwyt_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_1hwyt;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1hwyt)}.___SProgressBar_1hwyt_gg_._theme_custom_1hwyt_gg_{background-color:var(--colorBg_1hwyt);background-image:var(--colorBg_1hwyt)}@media (prefers-reduced-motion){.___SProgressBar_1hwyt_gg_.__animation_1hwyt_gg_,.___SValue_1hwyt_gg_{animation-name:none}}" /*__inner_css_end__*/, "1hwyt_gg_") /*__reshadow_css_end__*/, {
16
- "__SProgressBar": "___SProgressBar_1hwyt_gg_",
17
- "_theme_dark": "_theme_dark_1hwyt_gg_",
18
- "__SValue": "___SValue_1hwyt_gg_",
19
- "--width": "--width_1hwyt",
20
- "--duration": "--duration_1hwyt",
21
- "_theme": "__theme_1hwyt_gg_",
22
- "--colorBg": "--colorBg_1hwyt",
23
- "_size_s": "_size_s_1hwyt_gg_",
24
- "_size_m": "_size_m_1hwyt_gg_",
25
- "_size_l": "_size_l_1hwyt_gg_",
26
- "_theme_invert": "_theme_invert_1hwyt_gg_",
27
- "@loading": "loading_1hwyt",
28
- "_animation": "__animation_1hwyt_gg_",
29
- "_theme_custom": "_theme_custom_1hwyt_gg_"
15
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/"@keyframes loading_1rdat{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1rdat_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1rdat_gg_._theme_dark_1rdat_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1rdat_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_1rdat;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1rdat);animation-duration:var(--duration_1rdat);transition-duration:var(--duration_1rdat)}.___SValue_1rdat_gg_.__theme_1rdat_gg_{background-color:var(--colorBg_1rdat);background-image:var(--colorBg_1rdat)}.___SProgressBar_1rdat_gg_._size_s_1rdat_gg_,.___SValue_1rdat_gg_._size_s_1rdat_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1rdat_gg_._size_m_1rdat_gg_,.___SValue_1rdat_gg_._size_m_1rdat_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1rdat_gg_._size_l_1rdat_gg_,.___SValue_1rdat_gg_._size_l_1rdat_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1rdat_gg_._theme_invert_1rdat_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1rdat_gg_.__animation_1rdat_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_1rdat;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1rdat)}.___SProgressBar_1rdat_gg_._theme_custom_1rdat_gg_{background-color:var(--colorBg_1rdat);background-image:var(--colorBg_1rdat)}@media (prefers-reduced-motion){.___SProgressBar_1rdat_gg_.__animation_1rdat_gg_,.___SValue_1rdat_gg_{animation-name:none}}" /*__inner_css_end__*/, "1rdat_gg_") /*__reshadow_css_end__*/, {
16
+ "__SProgressBar": "___SProgressBar_1rdat_gg_",
17
+ "_theme_dark": "_theme_dark_1rdat_gg_",
18
+ "__SValue": "___SValue_1rdat_gg_",
19
+ "--width": "--width_1rdat",
20
+ "--duration": "--duration_1rdat",
21
+ "_theme": "__theme_1rdat_gg_",
22
+ "--colorBg": "--colorBg_1rdat",
23
+ "_size_s": "_size_s_1rdat_gg_",
24
+ "_size_m": "_size_m_1rdat_gg_",
25
+ "_size_l": "_size_l_1rdat_gg_",
26
+ "_theme_invert": "_theme_invert_1rdat_gg_",
27
+ "@loading": "loading_1rdat",
28
+ "_animation": "__animation_1rdat_gg_",
29
+ "_theme_custom": "_theme_custom_1rdat_gg_"
30
30
  });
31
31
  function isCustomTheme(theme) {
32
32
  return !['dark', 'invert'].includes(theme);
@@ -110,4 +110,4 @@ var ProgressBar = createComponent(ProgressBarRoot, {
110
110
  Value: Value
111
111
  });
112
112
  export default ProgressBar;
113
- //# sourceMappingURL=ProgressBar.mjs.map
113
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressBar.js","names":["React","createComponent","Component","sstyled","Root","Box","resolveColorEnhance","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_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 React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,mBAAmB,MAAM,iDAAiD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIlF,SAASC,aAAaA,CAACC,KAAK,EAAE;EAC5B,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACD,KAAK,CAAC;AAC5C;AAAC,IAEKE,eAAe,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,eAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAAK,eAAA,OAAAL,eAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,eAAA;IAAAS,GAAA;IAAAC,KAAA,EAWnB,SAAAC,cAAA,EAAgB;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,OAAO;QACLN,KAAK,EAALA,KAAK;QACLI,QAAQ,EAARA,QAAQ;QACRC,IAAI,EAAJA,IAAI;QACJC,YAA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AG;IACTjB,KAAK,EAAE,QAAQ;IACfiC,QAAQ,eAAE5C,KAAA,CAAAsC,aAAA,CAACO,WAAW,CAACC,KAAK;EAC9B,CAAC;AAAA,CAAC;AAiCJ,SAASA,KAAKA,CAACC,KAAK,EAAE;EAAA,IAAAC,KAAA,GAAAC,YAAA;IAAAC,KAAA;EACpB,IAAMC,MAAM,GAMA9C,GAAG;EALf,IAAQ+B,MAAM,GAA2CW,KAAK,CAAtDX,MAAM;IAAEb,KAAK,GAAoCwB,KAAK,CAA9CxB,KAAK;IAAEZ,KAAK,GAA6BoC,KAAK,CAAvCpC,KAAK;IAAEgB,QAAQ,GAAmBoB,KAAK,CAAhCpB,QAAQ;IAAEE,YAAY,GAAKkB,KAAK,CAAtBlB,YAAY;EACpD,IAAMuB,KAAK,MAAAV,MAAA,CAAMnB,KAAK,MAAG;EAEzB,OAAA2B,KAAA,GAAO/C,OAAO,CAACiC,MAAM,CAAC,eACpBpC,KAAA,CAAAsC,aAAA,CAACa,MAAM,EAAAD,KAAA,CAAAX,EAAA,WAAAC,aAAA,KAAAa,aAAA;IAAA,aAEMD,KAAK;IAAA,mBAAAV,MAAA,CACCf,QAAQ;IAAA,WAChBE,YAAY,CAAClB,KAAK;EAAC,GAAAqC,KAAA,IAC5B;AAEN;AAEA,IAAMH,WAAW,GAAG5C,eAAe,CAACY,eAAe,EAAE;EACnDiC,KAAK,EAALA;AACF,CAAC,CAAC;AAEF,eAAeD,WAAW"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +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,2 +1,2 @@
1
1
  export { default } from './ProgressBar';
2
- //# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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"}
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@semcore/progress-bar",
3
3
  "description": "Semrush ProgressBar Component",
4
- "version": "4.39.0",
4
+ "version": "4.39.1-prerelease.1",
5
5
  "main": "lib/cjs/index.js",
6
- "module": "lib/es6/index.mjs",
6
+ "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/flex-box": "5.40.0",
13
- "@semcore/utils": "4.45.0"
12
+ "@semcore/flex-box": "5.40.1-prerelease.1",
13
+ "@semcore/utils": "4.45.1-prerelease.1"
14
14
  },
15
15
  "peerDependencies": {
16
- "@semcore/core": "^2.17.5",
16
+ "@semcore/core": "^2.38.1-prerelease.1",
17
17
  "react": "16.8 - 18",
18
18
  "react-dom": "16.8 - 18"
19
19
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"ProgressBar.mjs","names":["React","createComponent","Component","sstyled","Root","Box","resolveColorEnhance","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_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 React from 'react';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport resolveColorEnhance from '@semcore/utils/lib/enhances/resolveColorEnhance';\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,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,mBAAmB,MAAM,iDAAiD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAIlF,SAASC,aAAaA,CAACC,KAAK,EAAE;EAC5B,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACD,KAAK,CAAC;AAC5C;AAAC,IAEKE,eAAe,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,eAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,eAAA;EAAA,SAAAA,gBAAA;IAAAK,eAAA,OAAAL,eAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,eAAA;IAAAS,GAAA;IAAAC,KAAA,EAWnB,SAAAC,cAAA,EAAgB;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,OAAO;QACLN,KAAK,EAALA,KAAK;QACLI,QAAQ,EAARA,QAAQ;QACRC,IAAI,EAAJA,IAAI;QACJC,YAAY,EAAZA;MACF,CAAC;IACH;EAAC;IAAAP,GAAA;IAAAC,KA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AAA,CAAAsC,aAAA,CAACO,WAAW,CAACC,KAAK;EAC9B,CAAC;AAAA,CAAC;AAiCJ,SAASA,KAAKA,CAACC,KAAK,EAAE;EAAA,IAAAC,KAAA,GAAAC,YAAA;IAAAC,KAAA;EACpB,IAAMC,MAAM,GAMA9C,GAAG;EALf,IAAQ+B,MAAM,GAA2CW,KAAK,CAAtDX,MAAM;IAAEb,KAAK,GAAoCwB,KAAK,CAA9CxB,KAAK;IAAEZ,KAAK,GAA6BoC,KAAK,CAAvCpC,KAAK;IAAEgB,QAAQ,GAAmBoB,KAAK,CAAhCpB,QAAQ;IAAEE,YAAY,GAAKkB,KAAK,CAAtBlB,YAAY;EACpD,IAAMuB,KAAK,MAAAV,MAAA,CAAMnB,KAAK,MAAG;EAEzB,OAAA2B,KAAA,GAAO/C,OAAO,CAACiC,MAAM,CAAC,eACpBpC,KAAA,CAAAsC,aAAA,CAACa,MAAM,EAAAD,KAAA,CAAAX,EAAA,WAAAC,aAAA,KAAAa,aAAA;IAAA,aAEMD,KAAK;IAAA,mBAAAV,MAAA,CACCf,QAAQ;IAAA,WAChBE,YAAY,CAAClB,KAAK;EAAC,GAAAqC,KAAA,IAC5B;AAEN;AAEA,IAAMH,WAAW,GAAG5C,eAAe,CAACY,eAAe,EAAE;EACnDiC,KAAK,EAALA;AACF,CAAC,CAAC;AAEF,eAAeD,WAAW"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mjs","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 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["default"],"sources":["../../src/index.js"],"sourcesContent":["export { default } from './ProgressBar';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe"}