@semcore/progress-bar 17.0.0-prerelease.34 → 17.0.0-prerelease.36
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 +5 -1
- package/lib/cjs/ProgressBar.js +1 -0
- package/lib/cjs/ProgressBar.js.map +1 -1
- package/lib/cjs/ProgressBar.type.js +2 -0
- package/lib/cjs/ProgressBar.type.js.map +1 -0
- package/lib/cjs/index.js +13 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/es6/ProgressBar.js +1 -0
- package/lib/es6/ProgressBar.js.map +1 -1
- package/lib/es6/ProgressBar.type.js +2 -0
- package/lib/es6/ProgressBar.type.js.map +1 -0
- package/lib/es6/index.js +1 -0
- package/lib/es6/index.js.map +1 -1
- package/lib/esm/ProgressBar.mjs +1 -0
- package/lib/types/ProgressBar.d.ts +3 -0
- package/lib/types/ProgressBar.type.d.ts +38 -0
- package/lib/types/index.d.ts +2 -42
- package/package.json +4 -4
- package/vite.config.ts +1 -1
- package/lib/cjs/index.d.js +0 -2
- package/lib/cjs/index.d.js.map +0 -1
- package/lib/es6/index.d.js +0 -2
- package/lib/es6/index.d.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [17.0.0] - 2026-04-
|
|
5
|
+
## [17.0.0] - 2026-04-10
|
|
6
6
|
|
|
7
7
|
### BREAK
|
|
8
8
|
|
|
9
9
|
- **ellipsis**: New major version.
|
|
10
10
|
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Rewrite component to TS.
|
|
14
|
+
|
|
11
15
|
## [16.0.11] - 2025-10-29
|
|
12
16
|
|
|
13
17
|
### Changed
|
package/lib/cjs/ProgressBar.js
CHANGED
|
@@ -30,6 +30,7 @@ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_star
|
|
|
30
30
|
"_theme_custom": "_theme_custom_u2ua8_gg_"
|
|
31
31
|
});
|
|
32
32
|
function isCustomTheme(theme) {
|
|
33
|
+
if (!theme) return false;
|
|
33
34
|
return !['dark', 'invert'].includes(theme);
|
|
34
35
|
}
|
|
35
36
|
class ProgressBarRoot extends _core.Component {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["_core","require","_baseComponents","_resolveColorEnhance","_interopRequireDefault","_react","style","sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","Component","getValueProps","value","duration","size","resolveColor","asProps","render","_ref","_ref3","SProgressBar","Box","Children","styles","useTheme","default","createElement","cn","assignProps","_defineProperty2","resolveColorEnhance","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","createComponent","_default","exports"],"sources":["../../src/ProgressBar.
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["_core","require","_baseComponents","_resolveColorEnhance","_interopRequireDefault","_react","style","sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","Component","getValueProps","value","duration","size","resolveColor","asProps","render","_ref","_ref3","SProgressBar","Box","Children","styles","useTheme","default","createElement","cn","assignProps","_defineProperty2","resolveColorEnhance","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","createComponent","_default","exports"],"sources":["../../src/ProgressBar.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport React from 'react';\n\nimport type { ProgressBarRootComponent, ProgressBarComponent, ProgressBarValueComponent } from './ProgressBar.type';\nimport style from './style/progress-bar.shadow.css';\n\nfunction isCustomTheme(theme?: string) {\n if (!theme) return false;\n\n return !['dark', 'invert'].includes(theme);\n}\n\nclass ProgressBarRoot extends Component<\n Intergalactic.InternalTypings.InferComponentProps<ProgressBarRootComponent>,\n typeof ProgressBarRoot.enhance\n> {\n static displayName = 'ProgressBar';\n static style = style;\n static enhance = [resolveColorEnhance()] as const;\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(\n props: Intergalactic.InternalTypings.InferChildComponentProps<\n ProgressBarValueComponent,\n typeof ProgressBarRoot,\n 'Value'\n >,\n) {\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}) as ProgressBarComponent;\n\nexport default ProgressBar;\n"],"mappings":";;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAFA,IAAAC,eAAA,GAAAD,OAAA;AAGA,IAAAE,oBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAA0B;AAAA,MAAAK,KAAA,8BAAAN,KAAA,CAAAO,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAK1B,SAASC,aAAaA,CAACC,KAAc,EAAE;EAC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A,EAJ9BhB,eAAe,WAKJN,KAAK;AAAA,IAAA0B,gBAAA,CAAAJ,OAAA,EALhBhB,eAAe,aAMF,CAAC,IAAAqB,4BAAmB,EAAC,CAAC,CAAC;AAAA,IAAAD,gBAAA,CAAAJ,OAAA,EANpChB,eAAe,kBAOG,OAAO;EAC3BI,QAAQ,EAAE,IAAI;EACdC,IAAI,EAAE,GAAG;EACTP,KAAK,EAAE,QAAQ;EACfwB,QAAQ,eAAE7B,MAAA,CAAAuB,OAAA,CAAAC,aAAA,CAACM,WAAW,CAACC,KAAK,MAAE;AAChC,CAAC,CAAC;AAiCJ,SAASA,KAAKA,CACZC,KAIC,EACD;EAAA,IAAAC,KAAA,GAAAC,YAAA;IAAAC,KAAA;EACA,MAAMC,MAAM,GAMAjB,mBAAG;EALf,MAAM;IAAEE,MAAM;IAAEX,KAAK;IAAEL,KAAK;IAAEM,QAAQ;IAAEE;EAAa,CAAC,GAAGmB,KAAK;EAC9D,MAAMK,KAAK,GAAG,GAAG3B,KAAK,GAAG;EAEzB,OAAAyB,KAAA,GAAO,IAAAjC,aAAO,EAACmB,MAAM,CAAC,eACpBrB,MAAA,CAAAuB,OAAA,CAAAC,aAAA,CAACY,MAAM,EAAAD,KAAA,CAAAV,EAAA;IAAA,OAAA9B,KAAA,CAAA+B,WAAA;MAAA,aAEMW,KAAK;MAAA,gBACF,GAAG1B,QAAQ,IAAI;MAAA,WACpBE,YAAY,CAACR,KAAK;IAAC,GAAA4B,KAAA;EAAA,EAC7B,CAAC;AAEN;AAEA,MAAMH,WAAW,GAAG,IAAAQ,qBAAe,EAAC/B,eAAe,EAAE;EACnDwB;AACF,CAAC,CAAyB;AAAC,IAAAQ,QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAEZO,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.type.js","names":[],"sources":["../../src/ProgressBar.type.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\n\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\nexport type ValueProps = BoxProps & {\n /** Controls the size of the value bar */\n size?: 's' | 'm' | 'l';\n /** Progress value */\n value?: number;\n /** Animation diration in milliseconds for transitions */\n duration?: number;\n /** Color theme */\n theme?: string;\n};\n\nexport type ProgressBarCxt = {\n getValueProps: PropGetterFn;\n};\n\nexport type ProgressBarRootComponent = Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt>;\nexport type ProgressBarValueComponent = Intergalactic.Component<'div', ValueProps>;\n\nexport type ProgressBarComponent = ProgressBarRootComponent & {\n Value: ProgressBarValueComponent;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/cjs/index.js
CHANGED
|
@@ -4,6 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
var _exportNames = {};
|
|
7
8
|
Object.defineProperty(exports, "default", {
|
|
8
9
|
enumerable: true,
|
|
9
10
|
get: function () {
|
|
@@ -11,4 +12,16 @@ Object.defineProperty(exports, "default", {
|
|
|
11
12
|
}
|
|
12
13
|
});
|
|
13
14
|
var _ProgressBar = _interopRequireDefault(require("./ProgressBar"));
|
|
15
|
+
var _ProgressBar2 = require("./ProgressBar.type");
|
|
16
|
+
Object.keys(_ProgressBar2).forEach(function (key) {
|
|
17
|
+
if (key === "default" || key === "__esModule") return;
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
19
|
+
if (key in exports && exports[key] === _ProgressBar2[key]) return;
|
|
20
|
+
Object.defineProperty(exports, key, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () {
|
|
23
|
+
return _ProgressBar2[key];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
14
27
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_ProgressBar","_interopRequireDefault","require"],"sources":["../../src/index.
|
|
1
|
+
{"version":3,"file":"index.js","names":["_ProgressBar","_interopRequireDefault","require","_ProgressBar2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"sources":["../../src/index.ts"],"sourcesContent":["export { default } from './ProgressBar';\nexport * from './ProgressBar.type';\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,aAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,aAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,aAAA,CAAAI,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
package/lib/es6/ProgressBar.js
CHANGED
|
@@ -26,6 +26,7 @@ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/
|
|
|
26
26
|
"_theme_custom": "_theme_custom_u2ua8_gg_"
|
|
27
27
|
});
|
|
28
28
|
function isCustomTheme(theme) {
|
|
29
|
+
if (!theme) return false;
|
|
29
30
|
return !['dark', 'invert'].includes(theme);
|
|
30
31
|
}
|
|
31
32
|
class ProgressBarRoot extends Component {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["Box","createComponent","Component","sstyled","Root","resolveColorEnhance","React","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","getValueProps","value","duration","size","resolveColor","asProps","render","_ref","_ref3","SProgressBar","Children","styles","useTheme","createElement","cn","_assignProps","_defineProperty","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","_assignProps2"],"sources":["../../src/ProgressBar.
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["Box","createComponent","Component","sstyled","Root","resolveColorEnhance","React","style","_sstyled","insert","isCustomTheme","theme","includes","ProgressBarRoot","getValueProps","value","duration","size","resolveColor","asProps","render","_ref","_ref3","SProgressBar","Children","styles","useTheme","createElement","cn","_assignProps","_defineProperty","children","ProgressBar","Value","props","_ref2","arguments[0]","_ref4","SValue","width","_assignProps2"],"sources":["../../src/ProgressBar.tsx"],"sourcesContent":["import { Box } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport { createComponent, Component, sstyled, Root } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport React from 'react';\n\nimport type { ProgressBarRootComponent, ProgressBarComponent, ProgressBarValueComponent } from './ProgressBar.type';\nimport style from './style/progress-bar.shadow.css';\n\nfunction isCustomTheme(theme?: string) {\n if (!theme) return false;\n\n return !['dark', 'invert'].includes(theme);\n}\n\nclass ProgressBarRoot extends Component<\n Intergalactic.InternalTypings.InferComponentProps<ProgressBarRootComponent>,\n typeof ProgressBarRoot.enhance\n> {\n static displayName = 'ProgressBar';\n static style = style;\n static enhance = [resolveColorEnhance()] as const;\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(\n props: Intergalactic.InternalTypings.InferChildComponentProps<\n ProgressBarValueComponent,\n typeof ProgressBarRoot,\n 'Value'\n >,\n) {\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}) as ProgressBarComponent;\n\nexport default ProgressBar;\n"],"mappings":";;;;AAAA,SAASA,GAAG,QAAQ,0BAA0B;AAE9C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,mBAAmB,MAAM,sDAAsD;AACtF,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAK1B,SAASC,aAAaA,CAACC,KAAc,EAAE;EACrC,IAAI,CAACA,KAAK,EAAE,OAAO,KAAK;EAExB,OAAO,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACD,KAAK,CAAC;AAC5C;AAEA,MAAME,eAAe,SAASX,SAAS,CAGrC;EAWAY,aAAaA,CAAA,EAAG;IACd,MAAM;MAAEC,KAAK;MAAEC,QAAQ;MAAEC,IAAI;M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,EACD;EAAA,IAAAC,KAAA,GAAAC,YAAA;IAAAC,KAAA;EACA,MAAMC,MAAM,GAMAtC,GAAG;EALf,MAAM;IAAEyB,MAAM;IAAEV,KAAK;IAAEJ,KAAK;IAAEK,QAAQ;IAAEE;EAAa,CAAC,GAAGgB,KAAK;EAC9D,MAAMK,KAAK,GAAG,GAAGxB,KAAK,GAAG;EAEzB,OAAAsB,KAAA,GAAOlC,OAAO,CAACsB,MAAM,CAAC,eACpBnB,KAAA,CAAAqB,aAAA,CAACW,MAAM,EAAAD,KAAA,CAAAT,EAAA;IAAA,GAAAY,aAAA;MAAA,aAEMD,KAAK;MAAA,gBACF,GAAGvB,QAAQ,IAAI;MAAA,WACpBE,YAAY,CAACP,KAAK;IAAC,GAAAwB,KAAA;EAAA,EAC7B,CAAC;AAEN;AAEA,MAAMH,WAAW,GAAG/B,eAAe,CAACY,eAAe,EAAE;EACnDoB;AACF,CAAC,CAAyB;AAE1B,eAAeD,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.type.js","names":[],"sources":["../../src/ProgressBar.type.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\n\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\nexport type ValueProps = BoxProps & {\n /** Controls the size of the value bar */\n size?: 's' | 'm' | 'l';\n /** Progress value */\n value?: number;\n /** Animation diration in milliseconds for transitions */\n duration?: number;\n /** Color theme */\n theme?: string;\n};\n\nexport type ProgressBarCxt = {\n getValueProps: PropGetterFn;\n};\n\nexport type ProgressBarRootComponent = Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt>;\nexport type ProgressBarValueComponent = Intergalactic.Component<'div', ValueProps>;\n\nexport type ProgressBarComponent = ProgressBarRootComponent & {\n Value: ProgressBarValueComponent;\n};\n"],"mappings":"","ignoreList":[]}
|
package/lib/es6/index.js
CHANGED
package/lib/es6/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../src/index.
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../src/index.ts"],"sourcesContent":["export { default } from './ProgressBar';\nexport * from './ProgressBar.type';\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe;AACvC,cAAc,oBAAoB","ignoreList":[]}
|
package/lib/esm/ProgressBar.mjs
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { BoxProps } from '@semcore/base-components';
|
|
2
|
+
import type { PropGetterFn, Intergalactic } from '@semcore/core';
|
|
3
|
+
export type ProgressBarProps = BoxProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Progress bar theme
|
|
6
|
+
* @default invert
|
|
7
|
+
*/
|
|
8
|
+
theme?: 'dark' | 'invert' | string;
|
|
9
|
+
/**
|
|
10
|
+
* Progress bar size
|
|
11
|
+
* @default m
|
|
12
|
+
*/
|
|
13
|
+
size?: 's' | 'm' | 'l';
|
|
14
|
+
/** Value as a percentage */
|
|
15
|
+
value?: number;
|
|
16
|
+
/** Duration of animation, ms
|
|
17
|
+
* @default 1000
|
|
18
|
+
*/
|
|
19
|
+
duration?: number;
|
|
20
|
+
};
|
|
21
|
+
export type ValueProps = BoxProps & {
|
|
22
|
+
/** Controls the size of the value bar */
|
|
23
|
+
size?: 's' | 'm' | 'l';
|
|
24
|
+
/** Progress value */
|
|
25
|
+
value?: number;
|
|
26
|
+
/** Animation diration in milliseconds for transitions */
|
|
27
|
+
duration?: number;
|
|
28
|
+
/** Color theme */
|
|
29
|
+
theme?: string;
|
|
30
|
+
};
|
|
31
|
+
export type ProgressBarCxt = {
|
|
32
|
+
getValueProps: PropGetterFn;
|
|
33
|
+
};
|
|
34
|
+
export type ProgressBarRootComponent = Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt>;
|
|
35
|
+
export type ProgressBarValueComponent = Intergalactic.Component<'div', ValueProps>;
|
|
36
|
+
export type ProgressBarComponent = ProgressBarRootComponent & {
|
|
37
|
+
Value: ProgressBarValueComponent;
|
|
38
|
+
};
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,42 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export type ProgressBarProps = BoxProps & {
|
|
5
|
-
/**
|
|
6
|
-
* Progress bar theme
|
|
7
|
-
* @default invert
|
|
8
|
-
*/
|
|
9
|
-
theme?: 'dark' | 'invert' | string;
|
|
10
|
-
/**
|
|
11
|
-
* Progress bar size
|
|
12
|
-
* @default m
|
|
13
|
-
*/
|
|
14
|
-
size?: 's' | 'm' | 'l';
|
|
15
|
-
/** Value as a percentage */
|
|
16
|
-
value?: number;
|
|
17
|
-
/** Duration of animation, ms
|
|
18
|
-
* @default 1000
|
|
19
|
-
*/
|
|
20
|
-
duration?: number;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export type ValueProps = BoxProps & {
|
|
24
|
-
/** Controls the size of the value bar */
|
|
25
|
-
size?: 's' | 'm' | 'l';
|
|
26
|
-
/** Progress value */
|
|
27
|
-
value?: number;
|
|
28
|
-
/** Animation diration in milliseconds for transitions */
|
|
29
|
-
duration?: number;
|
|
30
|
-
/** Color theme */
|
|
31
|
-
theme?: string;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type ProgressBarCxt = {
|
|
35
|
-
getValueProps: PropGetterFn;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
declare const ProgressBar: Intergalactic.Component<'div', ProgressBarProps, ProgressBarCxt> & {
|
|
39
|
-
Value: Intergalactic.Component<'div', ValueProps>;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default ProgressBar;
|
|
1
|
+
export { default } from './ProgressBar';
|
|
2
|
+
export * from './ProgressBar.type';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/progress-bar",
|
|
3
3
|
"description": "Semrush ProgressBar Component",
|
|
4
|
-
"version": "17.0.0-prerelease.
|
|
4
|
+
"version": "17.0.0-prerelease.36",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"directory": "semcore/progress-bar"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@semcore/core": "17.0.0-prerelease.
|
|
26
|
-
"@semcore/base-components": "17.0.0-prerelease.
|
|
25
|
+
"@semcore/core": "17.0.0-prerelease.36",
|
|
26
|
+
"@semcore/base-components": "17.0.0-prerelease.36",
|
|
27
27
|
"@semcore/testing-utils": "1.0.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "pnpm semcore-builder
|
|
30
|
+
"build": "pnpm semcore-builder && pnpm vite build"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/vite.config.ts
CHANGED
package/lib/cjs/index.d.js
DELETED
package/lib/cjs/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\n\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\nexport type ValueProps = BoxProps & {\n /** Controls the size of the value bar */\n size?: 's' | 'm' | 'l';\n /** Progress value */\n value?: number;\n /** Animation diration in milliseconds for transitions */\n duration?: number;\n /** Color theme */\n theme?: string;\n};\n\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.d.js
DELETED
package/lib/es6/index.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\n\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\nexport type ValueProps = BoxProps & {\n /** Controls the size of the value bar */\n size?: 's' | 'm' | 'l';\n /** Progress value */\n value?: number;\n /** Animation diration in milliseconds for transitions */\n duration?: number;\n /** Color theme */\n theme?: string;\n};\n\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":[]}
|