@snack-uikit/progress-bar 0.1.12 → 1.0.1-preview-fe85442f.0

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.
@@ -24,12 +24,11 @@ const constants_1 = require("../constants");
24
24
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
25
25
  /** Компонент индикатор загрузки */
26
26
  function ProgressBar(_a) {
27
- var {
28
- progress,
29
- size,
30
- className,
31
- appearance = constants_1.APPEARANCE.Primary
32
- } = _a,
27
+ var progress = _a.progress,
28
+ size = _a.size,
29
+ className = _a.className,
30
+ _a$appearance = _a.appearance,
31
+ appearance = _a$appearance === void 0 ? constants_1.APPEARANCE.Primary : _a$appearance,
33
32
  rest = __rest(_a, ["progress", "size", "className", "appearance"]);
34
33
  const roundedProgress = Math.max(Math.min(progress, 100), 0);
35
34
  return (0, jsx_runtime_1.jsx)("div", Object.assign({
@@ -41,7 +40,7 @@ function ProgressBar(_a) {
41
40
  "data-test-id": 'progress-bar-filler',
42
41
  "data-appearance": appearance,
43
42
  style: {
44
- '--progress': `${roundedProgress}%`
43
+ '--progress': "".concat(roundedProgress, "%")
45
44
  }
46
45
  })
47
46
  }));
@@ -24,24 +24,23 @@ const utils_1 = require("@snack-uikit/utils");
24
24
  const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
25
25
  /** Компонент индикатор загрузки страницы */
26
26
  function ProgressBarPage(_a) {
27
- var {
28
- animationDuration = 200,
29
- incrementDuration = 800,
30
- inProgress,
31
- minimum,
32
- className
33
- } = _a,
27
+ var _a$animationDuration = _a.animationDuration,
28
+ animationDuration = _a$animationDuration === void 0 ? 200 : _a$animationDuration,
29
+ _a$incrementDuration = _a.incrementDuration,
30
+ incrementDuration = _a$incrementDuration === void 0 ? 800 : _a$incrementDuration,
31
+ inProgress = _a.inProgress,
32
+ minimum = _a.minimum,
33
+ className = _a.className,
34
34
  rest = __rest(_a, ["animationDuration", "incrementDuration", "inProgress", "minimum", "className"]);
35
- const {
36
- progress,
37
- isFinished,
38
- animationDuration: animation
39
- } = (0, react_nprogress_1.useNProgress)({
40
- animationDuration,
41
- incrementDuration,
42
- isAnimating: inProgress,
43
- minimum
44
- });
35
+ const _ref = (0, react_nprogress_1.useNProgress)({
36
+ animationDuration,
37
+ incrementDuration,
38
+ isAnimating: inProgress,
39
+ minimum
40
+ }),
41
+ progress = _ref.progress,
42
+ isFinished = _ref.isFinished,
43
+ animation = _ref.animationDuration;
45
44
  if (isFinished) {
46
45
  return null;
47
46
  }
@@ -52,7 +51,7 @@ function ProgressBarPage(_a) {
52
51
  className: styles_module_scss_1.default.progressBarPageFiller,
53
52
  style: {
54
53
  '--progress': progress,
55
- '--animation-duration': `${animation}ms`
54
+ '--animation-duration': "".concat(animation, "ms")
56
55
  }
57
56
  })
58
57
  }));
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "Progress Bar",
7
- "version": "0.1.12",
7
+ "version": "1.0.1-preview-fe85442f.0",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -34,11 +34,10 @@
34
34
  "./LICENSE"
35
35
  ],
36
36
  "license": "Apache-2.0",
37
- "scripts": {},
38
37
  "dependencies": {
39
- "@snack-uikit/utils": "4.0.2",
40
- "@tanem/react-nprogress": "5.0.35",
41
- "classnames": "2.5.1"
38
+ "@tanem/react-nprogress": "^5.0.35",
39
+ "classnames": "^2.5.1",
40
+ "@snack-uikit/utils": "4.0.3-preview-fe85442f.0"
42
41
  },
43
- "gitHead": "a9f6571146845d828e00206abdedb160980cff97"
44
- }
42
+ "scripts": {}
43
+ }