@semcore/progress-bar 4.40.0-prerelease.4 → 4.40.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.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [4.40.0] - 2025-02-27
5
+ ## [4.40.0] - 2025-03-14
6
6
 
7
- ### Changed
7
+ ### Added
8
8
 
9
- - Version minor update due to children dependencies update (`@semcore/flex-box` [5.40.1 ~> 5.41.0], `@semcore/utils` [4.45.1 ~> 4.47.1], `@semcore/core` [2.38.1 ~> 2.39.0]).
9
+ - Build for ESM.
10
10
 
11
11
  ## [4.39.1] - 2025-02-05
12
12
 
@@ -0,0 +1,96 @@
1
+ import x from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import B from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import S from "@babel/runtime/helpers/esm/createClass";
4
+ import k from "@babel/runtime/helpers/esm/inherits";
5
+ import z from "@babel/runtime/helpers/esm/createSuper";
6
+ import s from "@babel/runtime/helpers/esm/defineProperty";
7
+ import { sstyled as y } from "@semcore/utils/lib/core/index";
8
+ import C, { sstyled as v, assignProps as p, Component as V } from "@semcore/core";
9
+ import g from "react";
10
+ import { Box as h } from "@semcore/flex-box";
11
+ import w from "@semcore/utils/lib/enhances/resolveColorEnhance";
12
+ var E = (
13
+ /*__reshadow_css_start__*/
14
+ (y.insert(
15
+ /*__inner_css_start__*/
16
+ `@keyframes loading_1nxr8{0%{background-position:0 0}to{background-position:60px 0}}.___SProgressBar_1nxr8_gg_{position:relative;width:100%;overflow:hidden;background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1nxr8_gg_._theme_dark_1nxr8_gg_{background-color:var(--intergalactic-progress-bar-bg-invert, rgba(255, 255, 255, 0.2))}.___SValue_1nxr8_gg_{position:absolute;top:0;left:0;background-color:var(--intergalactic-progress-bar-value-bg, #000000);background-image:var(--intergalactic-progress-bar-value-gradient,
17
+ 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_1nxr8;animation-timing-function:linear;animation-iteration-count:infinite;transition-property:width;transition-timing-function:linear;width:var(--width_1nxr8);animation-duration:var(--duration_1nxr8);transition-duration:var(--duration_1nxr8)}.___SValue_1nxr8_gg_.__theme_1nxr8_gg_{background-color:var(--colorBg_1nxr8);background-image:var(--colorBg_1nxr8)}.___SProgressBar_1nxr8_gg_._size_s_1nxr8_gg_,.___SValue_1nxr8_gg_._size_s_1nxr8_gg_{height:4px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:8px 8px}.___SProgressBar_1nxr8_gg_._size_m_1nxr8_gg_,.___SValue_1nxr8_gg_._size_m_1nxr8_gg_{height:8px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:12px 12px}.___SProgressBar_1nxr8_gg_._size_l_1nxr8_gg_,.___SValue_1nxr8_gg_._size_l_1nxr8_gg_{height:12px;border-radius:var(--intergalactic-progress-bar-rounded, 6px);background-size:16px 16px}.___SProgressBar_1nxr8_gg_._theme_invert_1nxr8_gg_{background-color:var(--intergalactic-progress-bar-bg, #e0e1e9)}.___SProgressBar_1nxr8_gg_.__animation_1nxr8_gg_{background-color:var(--intergalactic-progress-bar-value-bg, #000000);background-image:var(--intergalactic-progress-bar-pattern-gradient,
18
+ 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_1nxr8;animation-timing-function:linear;animation-iteration-count:infinite;animation-duration:var(--duration_1nxr8)}.___SProgressBar_1nxr8_gg_._theme_custom_1nxr8_gg_{background-color:var(--colorBg_1nxr8);background-image:var(--colorBg_1nxr8)}@media (prefers-reduced-motion){.___SProgressBar_1nxr8_gg_.__animation_1nxr8_gg_,.___SValue_1nxr8_gg_{animation-name:none}}`,
19
+ "1nxr8_gg_"
20
+ ), {
21
+ __SProgressBar: "___SProgressBar_1nxr8_gg_",
22
+ _theme_dark: "_theme_dark_1nxr8_gg_",
23
+ __SValue: "___SValue_1nxr8_gg_",
24
+ "--width": "--width_1nxr8",
25
+ "--duration": "--duration_1nxr8",
26
+ _theme: "__theme_1nxr8_gg_",
27
+ "--colorBg": "--colorBg_1nxr8",
28
+ _size_s: "_size_s_1nxr8_gg_",
29
+ _size_m: "_size_m_1nxr8_gg_",
30
+ _size_l: "_size_l_1nxr8_gg_",
31
+ _theme_invert: "_theme_invert_1nxr8_gg_",
32
+ "@loading": "loading_1nxr8",
33
+ _animation: "__animation_1nxr8_gg_",
34
+ _theme_custom: "_theme_custom_1nxr8_gg_"
35
+ })
36
+ );
37
+ function R(e) {
38
+ return !["dark", "invert"].includes(e);
39
+ }
40
+ var i = /* @__PURE__ */ function(e) {
41
+ k(a, e);
42
+ var l = z(a);
43
+ function a() {
44
+ return B(this, a), l.apply(this, arguments);
45
+ }
46
+ return S(a, [{
47
+ key: "getValueProps",
48
+ value: function() {
49
+ var _ = this.asProps, n = _.value, o = _.duration, r = _.size, t = _.resolveColor;
50
+ return {
51
+ value: n,
52
+ duration: o,
53
+ size: r,
54
+ resolveColor: t
55
+ };
56
+ }
57
+ }, {
58
+ key: "render",
59
+ value: function() {
60
+ var _ = this.asProps, n, o = h, r = this.asProps, t = r.Children, c = r.styles, b = r.duration, d = r.theme, m = r.value, f = r.resolveColor, P = R(d) ? "custom" : d;
61
+ return n = v(c), /* @__PURE__ */ g.createElement(o, n.cn("SProgressBar", x({}, p({
62
+ "use:theme": P,
63
+ "use:animation": !m,
64
+ "use:duration": "".concat(b, "ms"),
65
+ colorBg: f(d),
66
+ role: "progressbar",
67
+ "aria-valuenow": m
68
+ }, _))), /* @__PURE__ */ g.createElement(t, n.cn("Children", {})));
69
+ }
70
+ }]), a;
71
+ }(V);
72
+ s(i, "displayName", "ProgressBar");
73
+ s(i, "style", E);
74
+ s(i, "enhance", [w()]);
75
+ s(i, "defaultProps", function() {
76
+ return {
77
+ duration: 1e3,
78
+ size: "m",
79
+ theme: "invert",
80
+ children: /* @__PURE__ */ g.createElement(T.Value, null)
81
+ };
82
+ });
83
+ function $(e) {
84
+ var l = arguments[0], a, u = h, _ = e.styles, n = e.value, o = e.theme, r = e.duration, t = e.resolveColor, c = "".concat(n, "%");
85
+ return a = v(_), /* @__PURE__ */ g.createElement(u, a.cn("SValue", x({}, p({
86
+ "use:width": c,
87
+ "use:duration": "".concat(r, "ms"),
88
+ colorBg: t(o)
89
+ }, l))));
90
+ }
91
+ var T = C(i, {
92
+ Value: $
93
+ });
94
+ export {
95
+ T as default
96
+ };
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./ProgressBar.mjs";
2
+ export {
3
+ o as default
4
+ };
package/package.json CHANGED
@@ -1,19 +1,24 @@
1
1
  {
2
2
  "name": "@semcore/progress-bar",
3
3
  "description": "Semrush ProgressBar Component",
4
- "version": "4.40.0-prerelease.4",
4
+ "version": "4.40.0",
5
5
  "main": "lib/cjs/index.js",
6
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
+ "exports": {
12
+ "require": "./lib/cjs/index.js",
13
+ "import": "./lib/esm/index.mjs",
14
+ "types": "./lib/types/index.d.ts"
15
+ },
11
16
  "dependencies": {
12
- "@semcore/flex-box": "5.41.0-prerelease.4",
13
- "@semcore/utils": "4.47.1-prerelease.4"
17
+ "@semcore/flex-box": "5.41.0",
18
+ "@semcore/utils": "4.48.0"
14
19
  },
15
20
  "peerDependencies": {
16
- "@semcore/core": "^2.39.0-prerelease.4",
21
+ "@semcore/core": "^2.17.5",
17
22
  "react": "16.8 - 18",
18
23
  "react-dom": "16.8 - 18"
19
24
  },
@@ -27,6 +32,6 @@
27
32
  "@semcore/testing-utils": "1.0.0"
28
33
  },
29
34
  "scripts": {
30
- "build": "pnpm semcore-builder --source=js"
35
+ "build": "pnpm semcore-builder --source=js && pnpm vite build"
31
36
  }
32
37
  }
package/vite.config.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { defineConfig, mergeConfig } from 'vite';
2
+
3
+ import viteConfig from '../../commonVite.config';
4
+
5
+ export default mergeConfig(
6
+ viteConfig,
7
+ defineConfig({
8
+ build: {
9
+ lib: {
10
+ entry: './src/index.js',
11
+ },
12
+ rollupOptions: {
13
+ external: ['react', 'react-dom', 'react/jsx-runtime', /@babel\/runtime\/*/, /@semcore\/*/],
14
+ },
15
+ },
16
+ }),
17
+ );