@chayns-components/core 5.0.27 → 5.0.29
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/lib/cjs/components/progress-bar/ProgressBar.js +101 -51
- package/lib/cjs/components/progress-bar/ProgressBar.js.map +1 -1
- package/lib/cjs/components/progress-bar/ProgressBar.styles.js +8 -3
- package/lib/cjs/components/progress-bar/ProgressBar.styles.js.map +1 -1
- package/lib/esm/components/progress-bar/ProgressBar.js +95 -46
- package/lib/esm/components/progress-bar/ProgressBar.js.map +1 -1
- package/lib/esm/components/progress-bar/ProgressBar.styles.js +8 -3
- package/lib/esm/components/progress-bar/ProgressBar.styles.js.map +1 -1
- package/lib/types/components/progress-bar/ProgressBar.d.ts +1 -0
- package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +6 -3
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
16
16
|
const ProgressBar = t0 => {
|
|
17
17
|
"use memo";
|
|
18
18
|
|
|
19
|
-
const $ = (0, _reactCompilerRuntime.c)(
|
|
19
|
+
const $ = (0, _reactCompilerRuntime.c)(39);
|
|
20
20
|
const {
|
|
21
21
|
percentage,
|
|
22
22
|
label,
|
|
@@ -32,7 +32,9 @@ const ProgressBar = t0 => {
|
|
|
32
32
|
const shouldShowLabelInline = t2 === undefined ? false : t2;
|
|
33
33
|
const showShine = t3 === undefined ? false : t3;
|
|
34
34
|
const uuid = (0, _uuid.useUuid)();
|
|
35
|
+
const [coordinates, setCoordinates] = (0, _react.useState)();
|
|
35
36
|
const popupRef = (0, _react.useRef)(null);
|
|
37
|
+
const [hostContainer, setHostContainer] = (0, _react.useState)(null);
|
|
36
38
|
const theme = (0, _react.useContext)(_styledComponents.ThemeContext);
|
|
37
39
|
let t4;
|
|
38
40
|
bb0: {
|
|
@@ -40,8 +42,9 @@ const ProgressBar = t0 => {
|
|
|
40
42
|
t4 = null;
|
|
41
43
|
break bb0;
|
|
42
44
|
}
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
+
const t = percentage / 100;
|
|
46
|
+
const shineCount = Math.ceil(6 * t);
|
|
47
|
+
const speed = 1 + 4 * t;
|
|
45
48
|
let t5;
|
|
46
49
|
if ($[0] !== shineCount) {
|
|
47
50
|
t5 = Array.from({
|
|
@@ -57,7 +60,7 @@ const ProgressBar = t0 => {
|
|
|
57
60
|
t6 = t5.map((_, index) => /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarShine, {
|
|
58
61
|
key: `progress-bar-shine__${shineCount}__${index}`,
|
|
59
62
|
$speed: speed,
|
|
60
|
-
$delay:
|
|
63
|
+
$delay: -(speed / shineCount) * index
|
|
61
64
|
}));
|
|
62
65
|
$[2] = shineCount;
|
|
63
66
|
$[3] = speed;
|
|
@@ -70,13 +73,50 @@ const ProgressBar = t0 => {
|
|
|
70
73
|
}
|
|
71
74
|
const shineEffect = t4;
|
|
72
75
|
let t5;
|
|
73
|
-
|
|
76
|
+
let t6;
|
|
77
|
+
if ($[6] !== hostContainer || $[7] !== thumbLabel) {
|
|
78
|
+
t5 = () => {
|
|
79
|
+
if (thumbLabel) {
|
|
80
|
+
setCoordinates(hostContainer === null || hostContainer === void 0 ? void 0 : hostContainer.getBoundingClientRect());
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
t6 = [hostContainer, thumbLabel];
|
|
84
|
+
$[6] = hostContainer;
|
|
85
|
+
$[7] = thumbLabel;
|
|
86
|
+
$[8] = t5;
|
|
87
|
+
$[9] = t6;
|
|
88
|
+
} else {
|
|
89
|
+
t5 = $[8];
|
|
90
|
+
t6 = $[9];
|
|
91
|
+
}
|
|
92
|
+
(0, _react.useEffect)(t5, t6);
|
|
93
|
+
let t7;
|
|
94
|
+
let t8;
|
|
95
|
+
if ($[10] !== coordinates) {
|
|
96
|
+
t7 = () => {
|
|
97
|
+
if (coordinates) {
|
|
98
|
+
var _popupRef$current;
|
|
99
|
+
(_popupRef$current = popupRef.current) === null || _popupRef$current === void 0 || _popupRef$current.show();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
t8 = [coordinates];
|
|
103
|
+
$[10] = coordinates;
|
|
104
|
+
$[11] = t7;
|
|
105
|
+
$[12] = t8;
|
|
106
|
+
} else {
|
|
107
|
+
t7 = $[11];
|
|
108
|
+
t8 = $[12];
|
|
109
|
+
}
|
|
110
|
+
(0, _react.useEffect)(t7, t8);
|
|
111
|
+
let t9;
|
|
112
|
+
if ($[13] !== (colors === null || colors === void 0 ? void 0 : colors.backgroundColor) || $[14] !== (colors === null || colors === void 0 ? void 0 : colors.primaryTextColor) || $[15] !== (colors === null || colors === void 0 ? void 0 : colors.progressColor) || $[16] !== (colors === null || colors === void 0 ? void 0 : colors.secondaryTextColor) || $[17] !== (colors === null || colors === void 0 ? void 0 : colors.stepColor) || $[18] !== (colors === null || colors === void 0 ? void 0 : colors.thumbLabelColor) || $[19] !== height || $[20] !== hostContainer || $[21] !== label || $[22] !== percentage || $[23] !== shineEffect || $[24] !== shouldHideProgress || $[25] !== shouldShowLabelInline || $[26] !== showShine || $[27] !== steps || $[28] !== theme || $[29] !== thumbLabel || $[30] !== uuid) {
|
|
74
113
|
colors === null || colors === void 0 || colors.backgroundColor;
|
|
75
114
|
colors === null || colors === void 0 || colors.primaryTextColor;
|
|
76
115
|
colors === null || colors === void 0 || colors.progressColor;
|
|
77
116
|
colors === null || colors === void 0 || colors.secondaryTextColor;
|
|
78
117
|
colors === null || colors === void 0 || colors.stepColor;
|
|
79
|
-
|
|
118
|
+
colors === null || colors === void 0 || colors.thumbLabelColor;
|
|
119
|
+
t9 = (() => {
|
|
80
120
|
if (shouldHideProgress) {
|
|
81
121
|
return null;
|
|
82
122
|
}
|
|
@@ -106,7 +146,12 @@ const ProgressBar = t0 => {
|
|
|
106
146
|
$color: colors === null || colors === void 0 ? void 0 : colors.backgroundColor
|
|
107
147
|
}));
|
|
108
148
|
}
|
|
109
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
149
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
ref: instance => setHostContainer(instance),
|
|
151
|
+
style: {
|
|
152
|
+
border: 0
|
|
153
|
+
}
|
|
154
|
+
}, /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarProgressWrapper, {
|
|
110
155
|
$isBig: shouldShowLabelInline,
|
|
111
156
|
$height: height
|
|
112
157
|
}, !!(steps !== null && steps !== void 0 && steps.length) && /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarStepWrapper, null, steps.map(step => /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarStep, {
|
|
@@ -114,6 +159,7 @@ const ProgressBar = t0 => {
|
|
|
114
159
|
key: `progress-step-${step}`,
|
|
115
160
|
$color: colors === null || colors === void 0 ? void 0 : colors.stepColor
|
|
116
161
|
}))), /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledMotionProgressBarProgress, {
|
|
162
|
+
$height: height,
|
|
117
163
|
$color: colors === null || colors === void 0 ? void 0 : colors.progressColor,
|
|
118
164
|
key: `progress-bar__${uuid}`,
|
|
119
165
|
initial: {
|
|
@@ -129,18 +175,18 @@ const ProgressBar = t0 => {
|
|
|
129
175
|
type: "tween"
|
|
130
176
|
},
|
|
131
177
|
onUpdate: () => {
|
|
132
|
-
var _popupRef$current;
|
|
133
|
-
return (_popupRef$current = popupRef.current) === null || _popupRef$current === void 0 ? void 0 : _popupRef$current.show();
|
|
134
|
-
},
|
|
135
|
-
onAnimationComplete: () => {
|
|
136
178
|
var _popupRef$current2;
|
|
137
179
|
return (_popupRef$current2 = popupRef.current) === null || _popupRef$current2 === void 0 ? void 0 : _popupRef$current2.show();
|
|
180
|
+
},
|
|
181
|
+
onAnimationComplete: () => {
|
|
182
|
+
var _popupRef$current3;
|
|
183
|
+
return (_popupRef$current3 = popupRef.current) === null || _popupRef$current3 === void 0 ? void 0 : _popupRef$current3.show();
|
|
138
184
|
}
|
|
139
185
|
}, showShine && shineEffect, thumbLabel && /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarThumbLabel, {
|
|
140
186
|
onClick: _temp
|
|
141
187
|
}, /*#__PURE__*/_react.default.createElement(_styledComponents.ThemeProvider, {
|
|
142
188
|
theme: {
|
|
143
|
-
"000": (colors === null || colors === void 0 ? void 0 : colors.
|
|
189
|
+
"000": (colors === null || colors === void 0 ? void 0 : colors.thumbLabelColor) ?? (theme === null || theme === void 0 ? void 0 : theme["104"]),
|
|
144
190
|
text: (colors === null || colors === void 0 ? void 0 : colors.secondaryTextColor) ?? (theme === null || theme === void 0 ? void 0 : theme["300"])
|
|
145
191
|
}
|
|
146
192
|
}, /*#__PURE__*/_react.default.createElement(_Popup.default, {
|
|
@@ -148,9 +194,11 @@ const ProgressBar = t0 => {
|
|
|
148
194
|
content: thumbLabel,
|
|
149
195
|
alignment: _popup.PopupAlignment.TopCenter,
|
|
150
196
|
onHide: () => {
|
|
151
|
-
var _popupRef$
|
|
152
|
-
return (_popupRef$
|
|
153
|
-
}
|
|
197
|
+
var _popupRef$current4;
|
|
198
|
+
return (_popupRef$current4 = popupRef.current) === null || _popupRef$current4 === void 0 ? void 0 : _popupRef$current4.show();
|
|
199
|
+
},
|
|
200
|
+
container: hostContainer ?? undefined,
|
|
201
|
+
shouldUseChildrenWidth: true
|
|
154
202
|
})))), shouldShowLabelInline && label && /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarLabel, {
|
|
155
203
|
$shouldShowLabelInline: shouldShowLabelInline,
|
|
156
204
|
$primaryColor: colors === null || colors === void 0 ? void 0 : colors.primaryTextColor,
|
|
@@ -158,52 +206,54 @@ const ProgressBar = t0 => {
|
|
|
158
206
|
$colorSplitPosition: percentage
|
|
159
207
|
}, label), /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarBackground, {
|
|
160
208
|
$color: colors === null || colors === void 0 ? void 0 : colors.backgroundColor
|
|
161
|
-
}));
|
|
209
|
+
})));
|
|
162
210
|
})();
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
211
|
+
$[13] = colors === null || colors === void 0 ? void 0 : colors.backgroundColor;
|
|
212
|
+
$[14] = colors === null || colors === void 0 ? void 0 : colors.primaryTextColor;
|
|
213
|
+
$[15] = colors === null || colors === void 0 ? void 0 : colors.progressColor;
|
|
214
|
+
$[16] = colors === null || colors === void 0 ? void 0 : colors.secondaryTextColor;
|
|
215
|
+
$[17] = colors === null || colors === void 0 ? void 0 : colors.stepColor;
|
|
216
|
+
$[18] = colors === null || colors === void 0 ? void 0 : colors.thumbLabelColor;
|
|
217
|
+
$[19] = height;
|
|
218
|
+
$[20] = hostContainer;
|
|
219
|
+
$[21] = label;
|
|
220
|
+
$[22] = percentage;
|
|
221
|
+
$[23] = shineEffect;
|
|
222
|
+
$[24] = shouldHideProgress;
|
|
223
|
+
$[25] = shouldShowLabelInline;
|
|
224
|
+
$[26] = showShine;
|
|
225
|
+
$[27] = steps;
|
|
226
|
+
$[28] = theme;
|
|
227
|
+
$[29] = thumbLabel;
|
|
228
|
+
$[30] = uuid;
|
|
229
|
+
$[31] = t9;
|
|
180
230
|
} else {
|
|
181
|
-
|
|
231
|
+
t9 = $[31];
|
|
182
232
|
}
|
|
183
|
-
const progressBar =
|
|
233
|
+
const progressBar = t9;
|
|
184
234
|
colors === null || colors === void 0 || colors.primaryTextColor;
|
|
185
|
-
let
|
|
186
|
-
if ($[
|
|
187
|
-
|
|
235
|
+
let t10;
|
|
236
|
+
if ($[32] !== (colors === null || colors === void 0 ? void 0 : colors.primaryTextColor) || $[33] !== label || $[34] !== shouldShowLabelInline) {
|
|
237
|
+
t10 = label && !shouldShowLabelInline && /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBarLabel, {
|
|
188
238
|
$primaryColor: colors === null || colors === void 0 ? void 0 : colors.primaryTextColor
|
|
189
239
|
}, label);
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
240
|
+
$[32] = colors === null || colors === void 0 ? void 0 : colors.primaryTextColor;
|
|
241
|
+
$[33] = label;
|
|
242
|
+
$[34] = shouldShowLabelInline;
|
|
243
|
+
$[35] = t10;
|
|
194
244
|
} else {
|
|
195
|
-
|
|
245
|
+
t10 = $[35];
|
|
196
246
|
}
|
|
197
|
-
let
|
|
198
|
-
if ($[
|
|
199
|
-
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
247
|
+
let t11;
|
|
248
|
+
if ($[36] !== progressBar || $[37] !== t10) {
|
|
249
|
+
t11 = /*#__PURE__*/_react.default.createElement(_ProgressBar.StyledProgressBar, null, progressBar, t10);
|
|
250
|
+
$[36] = progressBar;
|
|
251
|
+
$[37] = t10;
|
|
252
|
+
$[38] = t11;
|
|
203
253
|
} else {
|
|
204
|
-
|
|
254
|
+
t11 = $[38];
|
|
205
255
|
}
|
|
206
|
-
return
|
|
256
|
+
return t11;
|
|
207
257
|
};
|
|
208
258
|
ProgressBar.displayName = 'ProgressBar';
|
|
209
259
|
var _default = exports.default = ProgressBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["_react","_interopRequireWildcard","require","_uuid","_ProgressBar","_popup","_styledComponents","_Popup","_interopRequireDefault","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProgressBar","t0","$","_reactCompilerRuntime","c","percentage","label","shouldHideProgress","t1","shouldShowLabelInline","t2","steps","colors","thumbLabel","showShine","t3","height","undefined","uuid","useUuid","popupRef","useRef","theme","useContext","ThemeContext","t4","bb0","shineCount","Math","ceil","speed","t5","Array","from","length","t6","map","_","index","createElement","StyledProgressBarShine","key","$delay","shineEffect","backgroundColor","primaryTextColor","progressColor","secondaryTextColor","stepColor","StyledProgressBarProgressWrapper","StyledMotionProgressBarProgress","$color","initial","width","left","animate","exit","transition","type","repeat","Infinity","repeatDelay","duration","StyledProgressBarBackground","StyledProgressBarStepWrapper","step","StyledProgressBarStep","onUpdate","_popupRef$current","current","show","onAnimationComplete","_popupRef$current2","StyledProgressBarThumbLabel","onClick","_temp","ThemeProvider","text","alignment","PopupAlignment","TopCenter","onHide","_popupRef$current3","StyledProgressBarLabel","$primaryColor","$secondaryColor","progressBar","t7","StyledProgressBar","displayName","_default","exports","event","stopPropagation"],"sources":["../../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import React, { FC, useContext, useMemo, useRef } from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport {\n StyledMotionProgressBarProgress,\n StyledProgressBar,\n StyledProgressBarBackground,\n StyledProgressBarLabel,\n StyledProgressBarProgressWrapper,\n StyledProgressBarShine,\n StyledProgressBarStep,\n StyledProgressBarStepWrapper,\n StyledProgressBarThumbLabel,\n} from './ProgressBar.styles';\nimport { PopupAlignment, PopupRef } from '../../types/popup';\nimport { ThemeContext, ThemeProvider } from 'styled-components';\nimport { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport Popup from '../popup/Popup';\n\ntype Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N\n ? Acc[number]\n : Enumerate<N, [...Acc, Acc['length']]>;\n\ntype Range<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;\n\ninterface Colors {\n backgroundColor?: string;\n progressColor?: string;\n stepColor?: string;\n primaryTextColor?: string;\n secondaryTextColor?: string;\n}\n\nexport type ProgressBarProps = {\n /**\n * The colors of the ProgressBar.\n */\n colors?: Colors;\n /**\n * The label that should be displayed under the progressbar.\n */\n label?: string;\n /**\n * The percentage of the progress. Number between 0 and 100.\n */\n percentage?: Range<0, 101>;\n /**\n * Whether the progress should be hide and just display the label.\n */\n shouldHideProgress?: boolean;\n /**\n * Whether the label should be displayed inside the ProgressBar.\n */\n shouldShowLabelInline?: boolean;\n /**\n * Visual marked steps.\n */\n steps?: Range<0, 101>[];\n /**\n * The label that should be displayed on the thumb of the progress bar.\n */\n thumbLabel?: React.ReactNode;\n /**\n * Whether a shine animation should be shown on the progress bar. The amount of shine is based on the percentage value.\n */\n showShine?: boolean;\n /**\n * The height of the progress bar in pixels. If not provided, it will be 10px if shouldShowLabelInline is false and 20px if shouldShowLabelInline is true.\n */\n height?: number;\n};\n\nconst ProgressBar: FC<ProgressBarProps> = ({\n percentage,\n label,\n shouldHideProgress = false,\n shouldShowLabelInline = false,\n steps,\n colors,\n thumbLabel,\n showShine = false,\n height,\n}) => {\n 'use memo';\n\n const uuid = useUuid();\n const popupRef = useRef<PopupRef | null>(null);\n\n const theme = useContext(ThemeContext) as Theme | undefined;\n\n const shineEffect = useMemo(() => {\n if (!showShine || percentage === undefined) return null;\n const FULL_ANIMATION_LENGTH = 5;\n const MAX_SHINE_COUNT = 6;\n\n const shineCount = Math.ceil(MAX_SHINE_COUNT * (percentage / 100));\n const speed = FULL_ANIMATION_LENGTH * (percentage / 100);\n return Array.from({ length: shineCount }).map((_, index) => (\n <StyledProgressBarShine\n /* eslint-disable-next-line react/no-array-index-key */\n key={`progress-bar-shine__${shineCount}__${index}`}\n $speed={speed}\n $delay={(FULL_ANIMATION_LENGTH / shineCount) * index}\n />\n ));\n }, [percentage, showShine]);\n\n const progressBar = useMemo(() => {\n if (shouldHideProgress) {\n return null;\n }\n\n if (percentage === undefined) {\n return (\n <StyledProgressBarProgressWrapper>\n <StyledMotionProgressBarProgress\n key={`progress-bar-loop__${uuid}`}\n $color={colors?.progressColor}\n initial={{ width: '200px', left: '-200px' }}\n animate={{ width: '200px', left: '100%' }}\n exit={{ width: '200px', left: '100%' }}\n transition={{\n type: 'tween',\n repeat: Infinity,\n repeatDelay: 0,\n duration: 1,\n }}\n />\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n );\n }\n\n return (\n <StyledProgressBarProgressWrapper $isBig={shouldShowLabelInline} $height={height}>\n {!!steps?.length && (\n <StyledProgressBarStepWrapper>\n {steps.map((step) => (\n <StyledProgressBarStep\n $position={step}\n key={`progress-step-${step}`}\n $color={colors?.stepColor}\n />\n ))}\n </StyledProgressBarStepWrapper>\n )}\n <StyledMotionProgressBarProgress\n $color={colors?.progressColor}\n key={`progress-bar__${uuid}`}\n initial={{ width: '0%' }}\n animate={{ width: `${percentage}%` }}\n exit={{ width: '0%' }}\n transition={{ type: 'tween' }}\n onUpdate={() => popupRef.current?.show()}\n onAnimationComplete={() => popupRef.current?.show()}\n >\n {showShine && shineEffect}\n {thumbLabel && (\n <StyledProgressBarThumbLabel onClick={(event) => event.stopPropagation()}>\n <ThemeProvider\n theme={{\n '000': colors?.backgroundColor ?? theme?.['104'],\n text: colors?.secondaryTextColor ?? theme?.['300'],\n }}\n >\n <Popup\n ref={popupRef}\n content={thumbLabel}\n alignment={PopupAlignment.TopCenter}\n onHide={() => popupRef.current?.show()}\n >\n {}\n </Popup>\n </ThemeProvider>\n </StyledProgressBarThumbLabel>\n )}\n </StyledMotionProgressBarProgress>\n\n {shouldShowLabelInline && label && (\n <StyledProgressBarLabel\n $shouldShowLabelInline={shouldShowLabelInline}\n $primaryColor={colors?.primaryTextColor}\n $secondaryColor={colors?.secondaryTextColor}\n $colorSplitPosition={percentage}\n >\n {label}\n </StyledProgressBarLabel>\n )}\n\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n );\n }, [\n colors?.backgroundColor,\n colors?.primaryTextColor,\n colors?.progressColor,\n colors?.secondaryTextColor,\n colors?.stepColor,\n height,\n label,\n percentage,\n shineEffect,\n shouldHideProgress,\n shouldShowLabelInline,\n showShine,\n steps,\n theme,\n thumbLabel,\n uuid,\n ]);\n\n return useMemo(\n () => (\n <StyledProgressBar>\n {progressBar}\n {label && !shouldShowLabelInline && (\n <StyledProgressBarLabel $primaryColor={colors?.primaryTextColor}>\n {label}\n </StyledProgressBarLabel>\n )}\n </StyledProgressBar>\n ),\n [colors?.primaryTextColor, label, progressBar, shouldShowLabelInline],\n );\n};\n\nProgressBar.displayName = 'ProgressBar';\n\nexport default ProgressBar;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAWA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAmC,SAAAM,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,CAAAQ,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CA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,OAAA,GAEzBiB,WAAW;AA5JgB,SAAA2E,MAAAiB,KAAA;EAAA,OAsF+BA,KAAK,CAAAC,eAAgB,CAAC,CAAC;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["_react","_interopRequireWildcard","require","_uuid","_ProgressBar","_popup","_styledComponents","_Popup","_interopRequireDefault","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ProgressBar","t0","$","_reactCompilerRuntime","c","percentage","label","shouldHideProgress","t1","shouldShowLabelInline","t2","steps","colors","thumbLabel","showShine","t3","height","undefined","uuid","useUuid","coordinates","setCoordinates","useState","popupRef","useRef","hostContainer","setHostContainer","theme","useContext","ThemeContext","t4","bb0","shineCount","Math","ceil","speed","t5","Array","from","length","t6","map","_","index","createElement","StyledProgressBarShine","key","$delay","shineEffect","getBoundingClientRect","useEffect","t7","t8","_popupRef$current","current","show","t9","backgroundColor","primaryTextColor","progressColor","secondaryTextColor","stepColor","thumbLabelColor","StyledProgressBarProgressWrapper","StyledMotionProgressBarProgress","$color","initial","width","left","animate","exit","transition","type","repeat","Infinity","repeatDelay","duration","StyledProgressBarBackground","ref","instance","style","border","StyledProgressBarStepWrapper","step","StyledProgressBarStep","onUpdate","_popupRef$current2","onAnimationComplete","_popupRef$current3","StyledProgressBarThumbLabel","onClick","_temp","ThemeProvider","text","alignment","PopupAlignment","TopCenter","onHide","_popupRef$current4","container","shouldUseChildrenWidth","StyledProgressBarLabel","$primaryColor","$secondaryColor","progressBar","t10","t11","StyledProgressBar","displayName","_default","exports","event","stopPropagation"],"sources":["../../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import React, { FC, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport {\n StyledMotionProgressBarProgress,\n StyledProgressBar,\n StyledProgressBarBackground,\n StyledProgressBarLabel,\n StyledProgressBarProgressWrapper,\n StyledProgressBarShine,\n StyledProgressBarStep,\n StyledProgressBarStepWrapper,\n StyledProgressBarThumbLabel,\n} from './ProgressBar.styles';\nimport { PopupAlignment, PopupRef } from '../../types/popup';\nimport { ThemeContext, ThemeProvider } from 'styled-components';\nimport { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport Popup from '../popup/Popup';\n\ntype Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N\n ? Acc[number]\n : Enumerate<N, [...Acc, Acc['length']]>;\n\ntype Range<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;\n\ninterface Colors {\n backgroundColor?: string;\n progressColor?: string;\n stepColor?: string;\n primaryTextColor?: string;\n secondaryTextColor?: string;\n thumbLabelColor?: string;\n}\n\nexport type ProgressBarProps = {\n /**\n * The colors of the ProgressBar.\n */\n colors?: Colors;\n /**\n * The label that should be displayed under the progressbar.\n */\n label?: string;\n /**\n * The percentage of the progress. Number between 0 and 100.\n */\n percentage?: Range<0, 101>;\n /**\n * Whether the progress should be hide and just display the label.\n */\n shouldHideProgress?: boolean;\n /**\n * Whether the label should be displayed inside the ProgressBar.\n */\n shouldShowLabelInline?: boolean;\n /**\n * Visual marked steps.\n */\n steps?: Range<0, 101>[];\n /**\n * The label that should be displayed on the thumb of the progress bar.\n */\n thumbLabel?: React.ReactNode;\n /**\n * Whether a shine animation should be shown on the progress bar. The amount of shine is based on the percentage value.\n */\n showShine?: boolean;\n /**\n * The height of the progress bar in pixels. If not provided, it will be 10px if shouldShowLabelInline is false and 20px if shouldShowLabelInline is true.\n */\n height?: number;\n};\n\nconst ProgressBar: FC<ProgressBarProps> = ({\n percentage,\n label,\n shouldHideProgress = false,\n shouldShowLabelInline = false,\n steps,\n colors,\n thumbLabel,\n showShine = false,\n height,\n}) => {\n 'use memo';\n\n const uuid = useUuid();\n const [coordinates, setCoordinates] = useState<{ x: number; y: number }>();\n const popupRef = useRef<PopupRef | null>(null);\n const [hostContainer, setHostContainer] = useState<HTMLDivElement | null>(null);\n\n const theme = useContext(ThemeContext) as Theme | undefined;\n\n const shineEffect = useMemo(() => {\n if (!showShine || percentage === undefined) return null;\n const MIN_ANIMATION_LENGTH = 1;\n const MAX_ANIMATION_LENGTH = 5;\n const MAX_SHINE_COUNT = 6;\n const t = percentage / 100;\n\n const shineCount = Math.ceil(MAX_SHINE_COUNT * t);\n\n const speed = MIN_ANIMATION_LENGTH + (MAX_ANIMATION_LENGTH - MIN_ANIMATION_LENGTH) * t;\n\n return Array.from({ length: shineCount }).map((_, index) => (\n <StyledProgressBarShine\n /* eslint-disable-next-line react/no-array-index-key */\n key={`progress-bar-shine__${shineCount}__${index}`}\n $speed={speed}\n $delay={-(speed / shineCount) * index}\n />\n ));\n }, [percentage, showShine]);\n\n useEffect(() => {\n if (thumbLabel) setCoordinates(hostContainer?.getBoundingClientRect());\n }, [hostContainer, thumbLabel]);\n\n useEffect(() => {\n if (coordinates) popupRef.current?.show();\n }, [coordinates]);\n\n const progressBar = useMemo(() => {\n if (shouldHideProgress) {\n return null;\n }\n\n if (percentage === undefined) {\n return (\n <StyledProgressBarProgressWrapper>\n <StyledMotionProgressBarProgress\n key={`progress-bar-loop__${uuid}`}\n $color={colors?.progressColor}\n initial={{ width: '200px', left: '-200px' }}\n animate={{ width: '200px', left: '100%' }}\n exit={{ width: '200px', left: '100%' }}\n transition={{\n type: 'tween',\n repeat: Infinity,\n repeatDelay: 0,\n duration: 1,\n }}\n />\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n );\n }\n\n return (\n <div ref={(instance) => setHostContainer(instance)} style={{ border: 0 }}>\n <StyledProgressBarProgressWrapper $isBig={shouldShowLabelInline} $height={height}>\n {!!steps?.length && (\n <StyledProgressBarStepWrapper>\n {steps.map((step) => (\n <StyledProgressBarStep\n $position={step}\n key={`progress-step-${step}`}\n $color={colors?.stepColor}\n />\n ))}\n </StyledProgressBarStepWrapper>\n )}\n <StyledMotionProgressBarProgress\n $height={height}\n $color={colors?.progressColor}\n key={`progress-bar__${uuid}`}\n initial={{ width: '0%' }}\n animate={{ width: `${percentage}%` }}\n exit={{ width: '0%' }}\n transition={{ type: 'tween' }}\n onUpdate={() => popupRef.current?.show()}\n onAnimationComplete={() => popupRef.current?.show()}\n >\n {showShine && shineEffect}\n {thumbLabel && (\n <StyledProgressBarThumbLabel\n onClick={(event) => event.stopPropagation()}\n >\n <ThemeProvider\n theme={{\n '000': colors?.thumbLabelColor ?? theme?.['104'],\n text: colors?.secondaryTextColor ?? theme?.['300'],\n }}\n >\n <Popup\n ref={popupRef}\n content={thumbLabel}\n alignment={PopupAlignment.TopCenter}\n onHide={() => popupRef.current?.show()}\n container={hostContainer ?? undefined}\n shouldUseChildrenWidth\n >\n {}\n </Popup>\n </ThemeProvider>\n </StyledProgressBarThumbLabel>\n )}\n </StyledMotionProgressBarProgress>\n\n {shouldShowLabelInline && label && (\n <StyledProgressBarLabel\n $shouldShowLabelInline={shouldShowLabelInline}\n $primaryColor={colors?.primaryTextColor}\n $secondaryColor={colors?.secondaryTextColor}\n $colorSplitPosition={percentage}\n >\n {label}\n </StyledProgressBarLabel>\n )}\n\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n </div>\n );\n }, [\n colors?.backgroundColor,\n colors?.primaryTextColor,\n colors?.progressColor,\n colors?.secondaryTextColor,\n colors?.stepColor,\n colors?.thumbLabelColor,\n height,\n hostContainer,\n label,\n percentage,\n shineEffect,\n shouldHideProgress,\n shouldShowLabelInline,\n showShine,\n steps,\n theme,\n thumbLabel,\n uuid,\n ]);\n\n return useMemo(\n () => (\n <StyledProgressBar>\n {progressBar}\n {label && !shouldShowLabelInline && (\n <StyledProgressBarLabel $primaryColor={colors?.primaryTextColor}>\n {label}\n </StyledProgressBarLabel>\n )}\n </StyledProgressBar>\n ),\n [colors?.primaryTextColor, label, progressBar, shouldShowLabelInline],\n );\n};\n\nProgressBar.displayName = 'ProgressBar';\n\nexport default ProgressBar;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AAC;IAAAvG,CAAA,OAAAsG,WAAA;IAAAtG,CAAA,OAAAuG,GAAA;IAAAvG,CAAA,OAAAwG,GAAA;EAAA;IAAAA,GAAA,GAAAxG,CAAA;EAAA;EAAA,OAPpBwG,GAOoB;AAAA,CAI/B;AAED1G,WAAW,CAAC4G,WAAW,GAAG,aAAa;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA/H,OAAA,GAEzBiB,WAAW;AAnLgB,SAAA2F,MAAAoB,KAAA;EAAA,OAuGUA,KAAK,CAAAC,eAAgB,CAAC,CAAC;AAAA","ignoreList":[]}
|
|
@@ -29,14 +29,14 @@ const StyledProgressBarProgressWrapper = exports.StyledProgressBarProgressWrappe
|
|
|
29
29
|
border-radius: ${({
|
|
30
30
|
$height,
|
|
31
31
|
$isBig
|
|
32
|
-
}) => $
|
|
32
|
+
}) => $height || ($isBig ? 20 : 10)}px;
|
|
33
33
|
`;
|
|
34
34
|
const shineMove = (0, _styledComponents.keyframes)`
|
|
35
35
|
from {
|
|
36
|
-
transform: translateX(-
|
|
36
|
+
transform: translateX(-100%);
|
|
37
37
|
}
|
|
38
38
|
to {
|
|
39
|
-
transform: translateX(
|
|
39
|
+
transform: translateX(100%);
|
|
40
40
|
}
|
|
41
41
|
`;
|
|
42
42
|
const StyledProgressBarShine = exports.StyledProgressBarShine = _styledComponents.default.div.attrs(({
|
|
@@ -75,6 +75,10 @@ const StyledMotionProgressBarProgress = exports.StyledMotionProgressBarProgress
|
|
|
75
75
|
theme,
|
|
76
76
|
$color
|
|
77
77
|
}) => $color ?? theme.headline};
|
|
78
|
+
border-radius: ${({
|
|
79
|
+
$height,
|
|
80
|
+
$isBig
|
|
81
|
+
}) => $height || ($isBig ? 20 : 10)}px;
|
|
78
82
|
`;
|
|
79
83
|
const StyledProgressBarLabel = exports.StyledProgressBarLabel = _styledComponents.default.div`
|
|
80
84
|
font-size: 85%;
|
|
@@ -133,5 +137,6 @@ const StyledProgressBarStep = exports.StyledProgressBarStep = _styledComponents.
|
|
|
133
137
|
const StyledProgressBarThumbLabel = exports.StyledProgressBarThumbLabel = _styledComponents.default.div`
|
|
134
138
|
position: absolute;
|
|
135
139
|
right: 0;
|
|
140
|
+
height: 100%;
|
|
136
141
|
`;
|
|
137
142
|
//# sourceMappingURL=ProgressBar.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.styles.js","names":["_react","require","_styledComponents","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledProgressBar","exports","styled","div","StyledProgressBarBackground","theme","$color","StyledProgressBarProgressWrapper","$height","$isBig","shineMove","keyframes","StyledProgressBarShine","attrs","$delay","style","animationDelay","$speed","StyledMotionProgressBarProgress","motion","headline","StyledProgressBarLabel","$shouldShowLabelInline","$colorSplitPosition","$primaryColor","$secondaryColor","css","StyledProgressBarStepWrapper","StyledProgressBarStep","$position","StyledProgressBarThumbLabel"],"sources":["../../../../src/components/progress-bar/ProgressBar.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledProgressBar = styled.div`\n position: relative;\n`;\n\ntype StyledProgressBarBackgroundProps = WithTheme<{ $color?: string }>;\n\nexport const StyledProgressBarBackground = styled.div<StyledProgressBarBackgroundProps>`\n height: 100%;\n width: 100%;\n background-color: ${({ theme, $color }: StyledProgressBarBackgroundProps) =>\n $color ?? theme['104']};\n`;\n\ntype StyledProgressBarProgressWrapperProps = WithTheme<{\n $isBig?: boolean;\n $height?: number;\n}>;\n\nexport const StyledProgressBarProgressWrapper = styled.div<StyledProgressBarProgressWrapperProps>`\n overflow: hidden;\n position: relative;\n width: 100%;\n height: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n border-radius: ${({ $height, $isBig }) =>
|
|
1
|
+
{"version":3,"file":"ProgressBar.styles.js","names":["_react","require","_styledComponents","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledProgressBar","exports","styled","div","StyledProgressBarBackground","theme","$color","StyledProgressBarProgressWrapper","$height","$isBig","shineMove","keyframes","StyledProgressBarShine","attrs","$delay","style","animationDelay","$speed","StyledMotionProgressBarProgress","motion","headline","StyledProgressBarLabel","$shouldShowLabelInline","$colorSplitPosition","$primaryColor","$secondaryColor","css","StyledProgressBarStepWrapper","StyledProgressBarStep","$position","StyledProgressBarThumbLabel"],"sources":["../../../../src/components/progress-bar/ProgressBar.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledProgressBar = styled.div`\n position: relative;\n`;\n\ntype StyledProgressBarBackgroundProps = WithTheme<{ $color?: string }>;\n\nexport const StyledProgressBarBackground = styled.div<StyledProgressBarBackgroundProps>`\n height: 100%;\n width: 100%;\n background-color: ${({ theme, $color }: StyledProgressBarBackgroundProps) =>\n $color ?? theme['104']};\n`;\n\ntype StyledProgressBarProgressWrapperProps = WithTheme<{\n $isBig?: boolean;\n $height?: number;\n}>;\n\nexport const StyledProgressBarProgressWrapper = styled.div<StyledProgressBarProgressWrapperProps>`\n overflow: hidden;\n position: relative;\n width: 100%;\n height: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n border-radius: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n`;\n\nconst shineMove = keyframes`\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(100%);\n }\n`;\n\nexport const StyledProgressBarShine = styled.div.attrs<{ $speed?: number; $delay?: number }>(\n ({ $delay }) => ({\n style: { animationDelay: `${$delay ?? 0}s` },\n }),\n)`\n position: absolute;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0) 33%,\n rgba(255, 255, 255, 0.5) 50%,\n rgba(255, 255, 255, 0) 66%\n );\n transform: translateX(-150%);\n animation: ${shineMove} ${({ $speed = 5 }) => `${$speed}s`} linear infinite;\n opacity: 0.95;\n`;\n\ntype StyledProgressBarProgressProps = WithTheme<{ $color?: string }> & {\n $height?: number;\n $isBig?: boolean;\n};\n\nexport const StyledMotionProgressBarProgress = styled(motion.div)<StyledProgressBarProgressProps>`\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n z-index: 2;\n display: flex;\n align-items: center;\n padding-left: 12px;\n background-color: ${({ theme, $color }: StyledProgressBarProgressProps) =>\n $color ?? theme.headline};\n border-radius: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n`;\n\ntype StyledProgressBarLabelProps = WithTheme<{\n $shouldShowLabelInline?: boolean;\n $primaryColor?: string;\n $secondaryColor?: string;\n $colorSplitPosition?: number;\n}>;\n\nexport const StyledProgressBarLabel = styled.div<StyledProgressBarLabelProps>`\n font-size: 85%;\n color: ${({ theme, $shouldShowLabelInline }: StyledProgressBarLabelProps) =>\n $shouldShowLabelInline ? theme['100'] : theme.headline};\n white-space: nowrap;\n\n ${({ $colorSplitPosition, $primaryColor, $secondaryColor, theme }) =>\n $colorSplitPosition &&\n css`\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n\n display: flex;\n align-items: center;\n\n padding-left: 8px;\n\n font-weight: bold;\n\n -webkit-background-clip: text;\n\n color: transparent;\n background-image: linear-gradient(\n 90deg,\n ${$primaryColor ?? theme['100']} ${$colorSplitPosition}%,\n ${$secondaryColor ?? theme['300']} ${$colorSplitPosition}%\n );\n `}\n`;\n\nexport const StyledProgressBarStepWrapper = styled.div`\n height: 100%;\n width: 100%;\n position: absolute;\n`;\n\ntype StyledProgressBarStepProps = WithTheme<{\n $position: number;\n $color?: string;\n}>;\n\nexport const StyledProgressBarStep = styled.div<StyledProgressBarStepProps>`\n background-color: ${({ theme, $color }: StyledProgressBarStepProps) => $color ?? theme['102']};\n height: 100%;\n width: 2px;\n position: absolute;\n top: 0;\n left: ${({ $position }: StyledProgressBarStepProps) => $position}%;\n`;\n\nexport const StyledProgressBarThumbLabel = styled.div`\n position: absolute;\n right: 0;\n height: 100%;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA2D,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CA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M,CAACC,GAAG;AACrD;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as _c } from "react-compiler-runtime";
|
|
2
|
-
import React, { useContext, useMemo, useRef } from 'react';
|
|
2
|
+
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
3
|
import { useUuid } from '../../hooks/uuid';
|
|
4
4
|
import { StyledMotionProgressBarProgress, StyledProgressBar, StyledProgressBarBackground, StyledProgressBarLabel, StyledProgressBarProgressWrapper, StyledProgressBarShine, StyledProgressBarStep, StyledProgressBarStepWrapper, StyledProgressBarThumbLabel } from './ProgressBar.styles';
|
|
5
5
|
import { PopupAlignment } from '../../types/popup';
|
|
@@ -8,7 +8,7 @@ import Popup from '../popup/Popup';
|
|
|
8
8
|
const ProgressBar = t0 => {
|
|
9
9
|
"use memo";
|
|
10
10
|
|
|
11
|
-
const $ = _c(
|
|
11
|
+
const $ = _c(39);
|
|
12
12
|
const {
|
|
13
13
|
percentage,
|
|
14
14
|
label,
|
|
@@ -24,7 +24,9 @@ const ProgressBar = t0 => {
|
|
|
24
24
|
const shouldShowLabelInline = t2 === undefined ? false : t2;
|
|
25
25
|
const showShine = t3 === undefined ? false : t3;
|
|
26
26
|
const uuid = useUuid();
|
|
27
|
+
const [coordinates, setCoordinates] = useState();
|
|
27
28
|
const popupRef = useRef(null);
|
|
29
|
+
const [hostContainer, setHostContainer] = useState(null);
|
|
28
30
|
const theme = useContext(ThemeContext);
|
|
29
31
|
let t4;
|
|
30
32
|
bb0: {
|
|
@@ -32,8 +34,9 @@ const ProgressBar = t0 => {
|
|
|
32
34
|
t4 = null;
|
|
33
35
|
break bb0;
|
|
34
36
|
}
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
+
const t = percentage / 100;
|
|
38
|
+
const shineCount = Math.ceil(6 * t);
|
|
39
|
+
const speed = 1 + 4 * t;
|
|
37
40
|
let t5;
|
|
38
41
|
if ($[0] !== shineCount) {
|
|
39
42
|
t5 = Array.from({
|
|
@@ -49,7 +52,7 @@ const ProgressBar = t0 => {
|
|
|
49
52
|
t6 = t5.map((_, index) => /*#__PURE__*/React.createElement(StyledProgressBarShine, {
|
|
50
53
|
key: `progress-bar-shine__${shineCount}__${index}`,
|
|
51
54
|
$speed: speed,
|
|
52
|
-
$delay:
|
|
55
|
+
$delay: -(speed / shineCount) * index
|
|
53
56
|
}));
|
|
54
57
|
$[2] = shineCount;
|
|
55
58
|
$[3] = speed;
|
|
@@ -62,13 +65,49 @@ const ProgressBar = t0 => {
|
|
|
62
65
|
}
|
|
63
66
|
const shineEffect = t4;
|
|
64
67
|
let t5;
|
|
65
|
-
|
|
68
|
+
let t6;
|
|
69
|
+
if ($[6] !== hostContainer || $[7] !== thumbLabel) {
|
|
70
|
+
t5 = () => {
|
|
71
|
+
if (thumbLabel) {
|
|
72
|
+
setCoordinates(hostContainer?.getBoundingClientRect());
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
t6 = [hostContainer, thumbLabel];
|
|
76
|
+
$[6] = hostContainer;
|
|
77
|
+
$[7] = thumbLabel;
|
|
78
|
+
$[8] = t5;
|
|
79
|
+
$[9] = t6;
|
|
80
|
+
} else {
|
|
81
|
+
t5 = $[8];
|
|
82
|
+
t6 = $[9];
|
|
83
|
+
}
|
|
84
|
+
useEffect(t5, t6);
|
|
85
|
+
let t7;
|
|
86
|
+
let t8;
|
|
87
|
+
if ($[10] !== coordinates) {
|
|
88
|
+
t7 = () => {
|
|
89
|
+
if (coordinates) {
|
|
90
|
+
popupRef.current?.show();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
t8 = [coordinates];
|
|
94
|
+
$[10] = coordinates;
|
|
95
|
+
$[11] = t7;
|
|
96
|
+
$[12] = t8;
|
|
97
|
+
} else {
|
|
98
|
+
t7 = $[11];
|
|
99
|
+
t8 = $[12];
|
|
100
|
+
}
|
|
101
|
+
useEffect(t7, t8);
|
|
102
|
+
let t9;
|
|
103
|
+
if ($[13] !== colors?.backgroundColor || $[14] !== colors?.primaryTextColor || $[15] !== colors?.progressColor || $[16] !== colors?.secondaryTextColor || $[17] !== colors?.stepColor || $[18] !== colors?.thumbLabelColor || $[19] !== height || $[20] !== hostContainer || $[21] !== label || $[22] !== percentage || $[23] !== shineEffect || $[24] !== shouldHideProgress || $[25] !== shouldShowLabelInline || $[26] !== showShine || $[27] !== steps || $[28] !== theme || $[29] !== thumbLabel || $[30] !== uuid) {
|
|
66
104
|
colors?.backgroundColor;
|
|
67
105
|
colors?.primaryTextColor;
|
|
68
106
|
colors?.progressColor;
|
|
69
107
|
colors?.secondaryTextColor;
|
|
70
108
|
colors?.stepColor;
|
|
71
|
-
|
|
109
|
+
colors?.thumbLabelColor;
|
|
110
|
+
t9 = (() => {
|
|
72
111
|
if (shouldHideProgress) {
|
|
73
112
|
return null;
|
|
74
113
|
}
|
|
@@ -98,7 +137,12 @@ const ProgressBar = t0 => {
|
|
|
98
137
|
$color: colors?.backgroundColor
|
|
99
138
|
}));
|
|
100
139
|
}
|
|
101
|
-
return /*#__PURE__*/React.createElement(
|
|
140
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
ref: instance => setHostContainer(instance),
|
|
142
|
+
style: {
|
|
143
|
+
border: 0
|
|
144
|
+
}
|
|
145
|
+
}, /*#__PURE__*/React.createElement(StyledProgressBarProgressWrapper, {
|
|
102
146
|
$isBig: shouldShowLabelInline,
|
|
103
147
|
$height: height
|
|
104
148
|
}, !!steps?.length && /*#__PURE__*/React.createElement(StyledProgressBarStepWrapper, null, steps.map(step => /*#__PURE__*/React.createElement(StyledProgressBarStep, {
|
|
@@ -106,6 +150,7 @@ const ProgressBar = t0 => {
|
|
|
106
150
|
key: `progress-step-${step}`,
|
|
107
151
|
$color: colors?.stepColor
|
|
108
152
|
}))), /*#__PURE__*/React.createElement(StyledMotionProgressBarProgress, {
|
|
153
|
+
$height: height,
|
|
109
154
|
$color: colors?.progressColor,
|
|
110
155
|
key: `progress-bar__${uuid}`,
|
|
111
156
|
initial: {
|
|
@@ -126,14 +171,16 @@ const ProgressBar = t0 => {
|
|
|
126
171
|
onClick: _temp
|
|
127
172
|
}, /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
128
173
|
theme: {
|
|
129
|
-
"000": colors?.
|
|
174
|
+
"000": colors?.thumbLabelColor ?? theme?.["104"],
|
|
130
175
|
text: colors?.secondaryTextColor ?? theme?.["300"]
|
|
131
176
|
}
|
|
132
177
|
}, /*#__PURE__*/React.createElement(Popup, {
|
|
133
178
|
ref: popupRef,
|
|
134
179
|
content: thumbLabel,
|
|
135
180
|
alignment: PopupAlignment.TopCenter,
|
|
136
|
-
onHide: () => popupRef.current?.show()
|
|
181
|
+
onHide: () => popupRef.current?.show(),
|
|
182
|
+
container: hostContainer ?? undefined,
|
|
183
|
+
shouldUseChildrenWidth: true
|
|
137
184
|
})))), shouldShowLabelInline && label && /*#__PURE__*/React.createElement(StyledProgressBarLabel, {
|
|
138
185
|
$shouldShowLabelInline: shouldShowLabelInline,
|
|
139
186
|
$primaryColor: colors?.primaryTextColor,
|
|
@@ -141,52 +188,54 @@ const ProgressBar = t0 => {
|
|
|
141
188
|
$colorSplitPosition: percentage
|
|
142
189
|
}, label), /*#__PURE__*/React.createElement(StyledProgressBarBackground, {
|
|
143
190
|
$color: colors?.backgroundColor
|
|
144
|
-
}));
|
|
191
|
+
})));
|
|
145
192
|
})();
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
193
|
+
$[13] = colors?.backgroundColor;
|
|
194
|
+
$[14] = colors?.primaryTextColor;
|
|
195
|
+
$[15] = colors?.progressColor;
|
|
196
|
+
$[16] = colors?.secondaryTextColor;
|
|
197
|
+
$[17] = colors?.stepColor;
|
|
198
|
+
$[18] = colors?.thumbLabelColor;
|
|
199
|
+
$[19] = height;
|
|
200
|
+
$[20] = hostContainer;
|
|
201
|
+
$[21] = label;
|
|
202
|
+
$[22] = percentage;
|
|
203
|
+
$[23] = shineEffect;
|
|
204
|
+
$[24] = shouldHideProgress;
|
|
205
|
+
$[25] = shouldShowLabelInline;
|
|
206
|
+
$[26] = showShine;
|
|
207
|
+
$[27] = steps;
|
|
208
|
+
$[28] = theme;
|
|
209
|
+
$[29] = thumbLabel;
|
|
210
|
+
$[30] = uuid;
|
|
211
|
+
$[31] = t9;
|
|
163
212
|
} else {
|
|
164
|
-
|
|
213
|
+
t9 = $[31];
|
|
165
214
|
}
|
|
166
|
-
const progressBar =
|
|
215
|
+
const progressBar = t9;
|
|
167
216
|
colors?.primaryTextColor;
|
|
168
|
-
let
|
|
169
|
-
if ($[
|
|
170
|
-
|
|
217
|
+
let t10;
|
|
218
|
+
if ($[32] !== colors?.primaryTextColor || $[33] !== label || $[34] !== shouldShowLabelInline) {
|
|
219
|
+
t10 = label && !shouldShowLabelInline && /*#__PURE__*/React.createElement(StyledProgressBarLabel, {
|
|
171
220
|
$primaryColor: colors?.primaryTextColor
|
|
172
221
|
}, label);
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
222
|
+
$[32] = colors?.primaryTextColor;
|
|
223
|
+
$[33] = label;
|
|
224
|
+
$[34] = shouldShowLabelInline;
|
|
225
|
+
$[35] = t10;
|
|
177
226
|
} else {
|
|
178
|
-
|
|
227
|
+
t10 = $[35];
|
|
179
228
|
}
|
|
180
|
-
let
|
|
181
|
-
if ($[
|
|
182
|
-
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
229
|
+
let t11;
|
|
230
|
+
if ($[36] !== progressBar || $[37] !== t10) {
|
|
231
|
+
t11 = /*#__PURE__*/React.createElement(StyledProgressBar, null, progressBar, t10);
|
|
232
|
+
$[36] = progressBar;
|
|
233
|
+
$[37] = t10;
|
|
234
|
+
$[38] = t11;
|
|
186
235
|
} else {
|
|
187
|
-
|
|
236
|
+
t11 = $[38];
|
|
188
237
|
}
|
|
189
|
-
return
|
|
238
|
+
return t11;
|
|
190
239
|
};
|
|
191
240
|
ProgressBar.displayName = 'ProgressBar';
|
|
192
241
|
export default ProgressBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["React","useContext","useMemo","useRef","useUuid","StyledMotionProgressBarProgress","StyledProgressBar","StyledProgressBarBackground","StyledProgressBarLabel","StyledProgressBarProgressWrapper","StyledProgressBarShine","StyledProgressBarStep","StyledProgressBarStepWrapper","StyledProgressBarThumbLabel","PopupAlignment","ThemeContext","ThemeProvider","Popup","ProgressBar","t0","$","_c","percentage","label","shouldHideProgress","t1","shouldShowLabelInline","t2","steps","colors","thumbLabel","showShine","t3","height","undefined","uuid","popupRef","theme","t4","bb0","shineCount","Math","ceil","speed","t5","Array","from","length","t6","map","_","index","createElement","key","$delay","shineEffect","backgroundColor","primaryTextColor","progressColor","secondaryTextColor","stepColor","$color","initial","width","left","animate","exit","transition","type","repeat","Infinity","repeatDelay","duration","step","onUpdate","current","show","onAnimationComplete","onClick","_temp","text","alignment","TopCenter","onHide","$primaryColor","$secondaryColor","progressBar","t7","displayName","event","stopPropagation"],"sources":["../../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import React, { FC, useContext, useMemo, useRef } from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport {\n StyledMotionProgressBarProgress,\n StyledProgressBar,\n StyledProgressBarBackground,\n StyledProgressBarLabel,\n StyledProgressBarProgressWrapper,\n StyledProgressBarShine,\n StyledProgressBarStep,\n StyledProgressBarStepWrapper,\n StyledProgressBarThumbLabel,\n} from './ProgressBar.styles';\nimport { PopupAlignment, PopupRef } from '../../types/popup';\nimport { ThemeContext, ThemeProvider } from 'styled-components';\nimport { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport Popup from '../popup/Popup';\n\ntype Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N\n ? Acc[number]\n : Enumerate<N, [...Acc, Acc['length']]>;\n\ntype Range<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;\n\ninterface Colors {\n backgroundColor?: string;\n progressColor?: string;\n stepColor?: string;\n primaryTextColor?: string;\n secondaryTextColor?: string;\n}\n\nexport type ProgressBarProps = {\n /**\n * The colors of the ProgressBar.\n */\n colors?: Colors;\n /**\n * The label that should be displayed under the progressbar.\n */\n label?: string;\n /**\n * The percentage of the progress. Number between 0 and 100.\n */\n percentage?: Range<0, 101>;\n /**\n * Whether the progress should be hide and just display the label.\n */\n shouldHideProgress?: boolean;\n /**\n * Whether the label should be displayed inside the ProgressBar.\n */\n shouldShowLabelInline?: boolean;\n /**\n * Visual marked steps.\n */\n steps?: Range<0, 101>[];\n /**\n * The label that should be displayed on the thumb of the progress bar.\n */\n thumbLabel?: React.ReactNode;\n /**\n * Whether a shine animation should be shown on the progress bar. The amount of shine is based on the percentage value.\n */\n showShine?: boolean;\n /**\n * The height of the progress bar in pixels. If not provided, it will be 10px if shouldShowLabelInline is false and 20px if shouldShowLabelInline is true.\n */\n height?: number;\n};\n\nconst ProgressBar: FC<ProgressBarProps> = ({\n percentage,\n label,\n shouldHideProgress = false,\n shouldShowLabelInline = false,\n steps,\n colors,\n thumbLabel,\n showShine = false,\n height,\n}) => {\n 'use memo';\n\n const uuid = useUuid();\n const popupRef = useRef<PopupRef | null>(null);\n\n const theme = useContext(ThemeContext) as Theme | undefined;\n\n const shineEffect = useMemo(() => {\n if (!showShine || percentage === undefined) return null;\n const FULL_ANIMATION_LENGTH = 5;\n const MAX_SHINE_COUNT = 6;\n\n const shineCount = Math.ceil(MAX_SHINE_COUNT * (percentage / 100));\n const speed = FULL_ANIMATION_LENGTH * (percentage / 100);\n return Array.from({ length: shineCount }).map((_, index) => (\n <StyledProgressBarShine\n /* eslint-disable-next-line react/no-array-index-key */\n key={`progress-bar-shine__${shineCount}__${index}`}\n $speed={speed}\n $delay={(FULL_ANIMATION_LENGTH / shineCount) * index}\n />\n ));\n }, [percentage, showShine]);\n\n const progressBar = useMemo(() => {\n if (shouldHideProgress) {\n return null;\n }\n\n if (percentage === undefined) {\n return (\n <StyledProgressBarProgressWrapper>\n <StyledMotionProgressBarProgress\n key={`progress-bar-loop__${uuid}`}\n $color={colors?.progressColor}\n initial={{ width: '200px', left: '-200px' }}\n animate={{ width: '200px', left: '100%' }}\n exit={{ width: '200px', left: '100%' }}\n transition={{\n type: 'tween',\n repeat: Infinity,\n repeatDelay: 0,\n duration: 1,\n }}\n />\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n );\n }\n\n return (\n <StyledProgressBarProgressWrapper $isBig={shouldShowLabelInline} $height={height}>\n {!!steps?.length && (\n <StyledProgressBarStepWrapper>\n {steps.map((step) => (\n <StyledProgressBarStep\n $position={step}\n key={`progress-step-${step}`}\n $color={colors?.stepColor}\n />\n ))}\n </StyledProgressBarStepWrapper>\n )}\n <StyledMotionProgressBarProgress\n $color={colors?.progressColor}\n key={`progress-bar__${uuid}`}\n initial={{ width: '0%' }}\n animate={{ width: `${percentage}%` }}\n exit={{ width: '0%' }}\n transition={{ type: 'tween' }}\n onUpdate={() => popupRef.current?.show()}\n onAnimationComplete={() => popupRef.current?.show()}\n >\n {showShine && shineEffect}\n {thumbLabel && (\n <StyledProgressBarThumbLabel onClick={(event) => event.stopPropagation()}>\n <ThemeProvider\n theme={{\n '000': colors?.backgroundColor ?? theme?.['104'],\n text: colors?.secondaryTextColor ?? theme?.['300'],\n }}\n >\n <Popup\n ref={popupRef}\n content={thumbLabel}\n alignment={PopupAlignment.TopCenter}\n onHide={() => popupRef.current?.show()}\n >\n {}\n </Popup>\n </ThemeProvider>\n </StyledProgressBarThumbLabel>\n )}\n </StyledMotionProgressBarProgress>\n\n {shouldShowLabelInline && label && (\n <StyledProgressBarLabel\n $shouldShowLabelInline={shouldShowLabelInline}\n $primaryColor={colors?.primaryTextColor}\n $secondaryColor={colors?.secondaryTextColor}\n $colorSplitPosition={percentage}\n >\n {label}\n </StyledProgressBarLabel>\n )}\n\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n );\n }, [\n colors?.backgroundColor,\n colors?.primaryTextColor,\n colors?.progressColor,\n colors?.secondaryTextColor,\n colors?.stepColor,\n height,\n label,\n percentage,\n shineEffect,\n shouldHideProgress,\n shouldShowLabelInline,\n showShine,\n steps,\n theme,\n thumbLabel,\n uuid,\n ]);\n\n return useMemo(\n () => (\n <StyledProgressBar>\n {progressBar}\n {label && !shouldShowLabelInline && (\n <StyledProgressBarLabel $primaryColor={colors?.primaryTextColor}>\n {label}\n </StyledProgressBarLabel>\n )}\n </StyledProgressBar>\n ),\n [colors?.primaryTextColor, label, progressBar, shouldShowLabelInline],\n );\n};\n\nProgressBar.displayName = 'ProgressBar';\n\nexport default ProgressBar;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAQC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAC9D,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SACIC,+BAA+B,EAC/BC,iBAAiB,EACjBC,2BAA2B,EAC3BC,sBAAsB,EACtBC,gCAAgC,EAChCC,sBAAsB,EACtBC,qBAAqB,EACrBC,4BAA4B,EAC5BC,2BAA2B,QACxB,sBAAsB;AAC7B,SAASC,cAAc,QAAkB,mBAAmB;AAC5D,SAASC,YAAY,EAAEC,aAAa,QAAQ,mBAAmB;AAE/D,OAAOC,KAAK,MAAM,gBAAgB;AAuDlC,MAAMC,WAAiC,GAAGC,EAAA;EAAA;;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,UAAA;IAAAC,KAAA;IAAAC,kBAAA,EAAAC,EAAA;I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EAAA,GAAA5B,CAAA;EAAA;EAAA,IAAAmE,EAAA;EAAA,IAAAnE,CAAA,SAAAkE,WAAA,IAAAlE,CAAA,SAAA4B,EAAA;IANLuC,EAAA,gBAAAvF,KAAA,CAAAoD,aAAA,CAAC9C,iBAAiB,QACbgF,WAAW,EACXtC,EAKc,CAAC;IAAA5B,CAAA,OAAAkE,WAAA;IAAAlE,CAAA,OAAA4B,EAAA;IAAA5B,CAAA,OAAAmE,EAAA;EAAA;IAAAA,EAAA,GAAAnE,CAAA;EAAA;EAAA,OAPpBmE,EAOoB;AAAA,CAI/B;AAEDrE,WAAW,CAACsE,WAAW,GAAG,aAAa;AAEvC,eAAetE,WAAW;AA5JgB,SAAA6D,MAAAU,KAAA;EAAA,OAsF+BA,KAAK,CAAAC,eAAgB,CAAC,CAAC;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["React","useContext","useEffect","useMemo","useRef","useState","useUuid","StyledMotionProgressBarProgress","StyledProgressBar","StyledProgressBarBackground","StyledProgressBarLabel","StyledProgressBarProgressWrapper","StyledProgressBarShine","StyledProgressBarStep","StyledProgressBarStepWrapper","StyledProgressBarThumbLabel","PopupAlignment","ThemeContext","ThemeProvider","Popup","ProgressBar","t0","$","_c","percentage","label","shouldHideProgress","t1","shouldShowLabelInline","t2","steps","colors","thumbLabel","showShine","t3","height","undefined","uuid","coordinates","setCoordinates","popupRef","hostContainer","setHostContainer","theme","t4","bb0","t","shineCount","Math","ceil","speed","t5","Array","from","length","t6","map","_","index","createElement","key","$delay","shineEffect","getBoundingClientRect","t7","t8","current","show","t9","backgroundColor","primaryTextColor","progressColor","secondaryTextColor","stepColor","thumbLabelColor","$color","initial","width","left","animate","exit","transition","type","repeat","Infinity","repeatDelay","duration","ref","instance","style","border","step","onUpdate","onAnimationComplete","onClick","_temp","text","alignment","TopCenter","onHide","container","shouldUseChildrenWidth","$primaryColor","$secondaryColor","progressBar","t10","t11","displayName","event","stopPropagation"],"sources":["../../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import React, { FC, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport {\n StyledMotionProgressBarProgress,\n StyledProgressBar,\n StyledProgressBarBackground,\n StyledProgressBarLabel,\n StyledProgressBarProgressWrapper,\n StyledProgressBarShine,\n StyledProgressBarStep,\n StyledProgressBarStepWrapper,\n StyledProgressBarThumbLabel,\n} from './ProgressBar.styles';\nimport { PopupAlignment, PopupRef } from '../../types/popup';\nimport { ThemeContext, ThemeProvider } from 'styled-components';\nimport { Theme } from '../color-scheme-provider/ColorSchemeProvider';\nimport Popup from '../popup/Popup';\n\ntype Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N\n ? Acc[number]\n : Enumerate<N, [...Acc, Acc['length']]>;\n\ntype Range<F extends number, T extends number> = Exclude<Enumerate<T>, Enumerate<F>>;\n\ninterface Colors {\n backgroundColor?: string;\n progressColor?: string;\n stepColor?: string;\n primaryTextColor?: string;\n secondaryTextColor?: string;\n thumbLabelColor?: string;\n}\n\nexport type ProgressBarProps = {\n /**\n * The colors of the ProgressBar.\n */\n colors?: Colors;\n /**\n * The label that should be displayed under the progressbar.\n */\n label?: string;\n /**\n * The percentage of the progress. Number between 0 and 100.\n */\n percentage?: Range<0, 101>;\n /**\n * Whether the progress should be hide and just display the label.\n */\n shouldHideProgress?: boolean;\n /**\n * Whether the label should be displayed inside the ProgressBar.\n */\n shouldShowLabelInline?: boolean;\n /**\n * Visual marked steps.\n */\n steps?: Range<0, 101>[];\n /**\n * The label that should be displayed on the thumb of the progress bar.\n */\n thumbLabel?: React.ReactNode;\n /**\n * Whether a shine animation should be shown on the progress bar. The amount of shine is based on the percentage value.\n */\n showShine?: boolean;\n /**\n * The height of the progress bar in pixels. If not provided, it will be 10px if shouldShowLabelInline is false and 20px if shouldShowLabelInline is true.\n */\n height?: number;\n};\n\nconst ProgressBar: FC<ProgressBarProps> = ({\n percentage,\n label,\n shouldHideProgress = false,\n shouldShowLabelInline = false,\n steps,\n colors,\n thumbLabel,\n showShine = false,\n height,\n}) => {\n 'use memo';\n\n const uuid = useUuid();\n const [coordinates, setCoordinates] = useState<{ x: number; y: number }>();\n const popupRef = useRef<PopupRef | null>(null);\n const [hostContainer, setHostContainer] = useState<HTMLDivElement | null>(null);\n\n const theme = useContext(ThemeContext) as Theme | undefined;\n\n const shineEffect = useMemo(() => {\n if (!showShine || percentage === undefined) return null;\n const MIN_ANIMATION_LENGTH = 1;\n const MAX_ANIMATION_LENGTH = 5;\n const MAX_SHINE_COUNT = 6;\n const t = percentage / 100;\n\n const shineCount = Math.ceil(MAX_SHINE_COUNT * t);\n\n const speed = MIN_ANIMATION_LENGTH + (MAX_ANIMATION_LENGTH - MIN_ANIMATION_LENGTH) * t;\n\n return Array.from({ length: shineCount }).map((_, index) => (\n <StyledProgressBarShine\n /* eslint-disable-next-line react/no-array-index-key */\n key={`progress-bar-shine__${shineCount}__${index}`}\n $speed={speed}\n $delay={-(speed / shineCount) * index}\n />\n ));\n }, [percentage, showShine]);\n\n useEffect(() => {\n if (thumbLabel) setCoordinates(hostContainer?.getBoundingClientRect());\n }, [hostContainer, thumbLabel]);\n\n useEffect(() => {\n if (coordinates) popupRef.current?.show();\n }, [coordinates]);\n\n const progressBar = useMemo(() => {\n if (shouldHideProgress) {\n return null;\n }\n\n if (percentage === undefined) {\n return (\n <StyledProgressBarProgressWrapper>\n <StyledMotionProgressBarProgress\n key={`progress-bar-loop__${uuid}`}\n $color={colors?.progressColor}\n initial={{ width: '200px', left: '-200px' }}\n animate={{ width: '200px', left: '100%' }}\n exit={{ width: '200px', left: '100%' }}\n transition={{\n type: 'tween',\n repeat: Infinity,\n repeatDelay: 0,\n duration: 1,\n }}\n />\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n );\n }\n\n return (\n <div ref={(instance) => setHostContainer(instance)} style={{ border: 0 }}>\n <StyledProgressBarProgressWrapper $isBig={shouldShowLabelInline} $height={height}>\n {!!steps?.length && (\n <StyledProgressBarStepWrapper>\n {steps.map((step) => (\n <StyledProgressBarStep\n $position={step}\n key={`progress-step-${step}`}\n $color={colors?.stepColor}\n />\n ))}\n </StyledProgressBarStepWrapper>\n )}\n <StyledMotionProgressBarProgress\n $height={height}\n $color={colors?.progressColor}\n key={`progress-bar__${uuid}`}\n initial={{ width: '0%' }}\n animate={{ width: `${percentage}%` }}\n exit={{ width: '0%' }}\n transition={{ type: 'tween' }}\n onUpdate={() => popupRef.current?.show()}\n onAnimationComplete={() => popupRef.current?.show()}\n >\n {showShine && shineEffect}\n {thumbLabel && (\n <StyledProgressBarThumbLabel\n onClick={(event) => event.stopPropagation()}\n >\n <ThemeProvider\n theme={{\n '000': colors?.thumbLabelColor ?? theme?.['104'],\n text: colors?.secondaryTextColor ?? theme?.['300'],\n }}\n >\n <Popup\n ref={popupRef}\n content={thumbLabel}\n alignment={PopupAlignment.TopCenter}\n onHide={() => popupRef.current?.show()}\n container={hostContainer ?? undefined}\n shouldUseChildrenWidth\n >\n {}\n </Popup>\n </ThemeProvider>\n </StyledProgressBarThumbLabel>\n )}\n </StyledMotionProgressBarProgress>\n\n {shouldShowLabelInline && label && (\n <StyledProgressBarLabel\n $shouldShowLabelInline={shouldShowLabelInline}\n $primaryColor={colors?.primaryTextColor}\n $secondaryColor={colors?.secondaryTextColor}\n $colorSplitPosition={percentage}\n >\n {label}\n </StyledProgressBarLabel>\n )}\n\n <StyledProgressBarBackground $color={colors?.backgroundColor} />\n </StyledProgressBarProgressWrapper>\n </div>\n );\n }, [\n colors?.backgroundColor,\n colors?.primaryTextColor,\n colors?.progressColor,\n colors?.secondaryTextColor,\n colors?.stepColor,\n colors?.thumbLabelColor,\n height,\n hostContainer,\n label,\n percentage,\n shineEffect,\n shouldHideProgress,\n shouldShowLabelInline,\n showShine,\n steps,\n theme,\n thumbLabel,\n uuid,\n ]);\n\n return useMemo(\n () => (\n <StyledProgressBar>\n {progressBar}\n {label && !shouldShowLabelInline && (\n <StyledProgressBarLabel $primaryColor={colors?.primaryTextColor}>\n {label}\n </StyledProgressBarLabel>\n )}\n </StyledProgressBar>\n ),\n [colors?.primaryTextColor, label, progressBar, shouldShowLabelInline],\n );\n};\n\nProgressBar.displayName = 'ProgressBar';\n\nexport default ProgressBar;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAQC,UAAU,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACnF,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SACIC,+BAA+B,EAC/BC,iBAAiB,EACjBC,2BAA2B,EAC3BC,sBAAsB,EACtBC,gCAAgC,EAChCC,sBAAsB,EACtBC,qBAAqB,EACrBC,4BAA4B,EAC5BC,2BAA2B,QACxB,sBAAsB;AAC7B,SAASC,cAAc,QAAkB,mBAAmB;AAC5D,SAASC,YAAY,EAAEC,aAAa,QAAQ,mBAAmB;AAE/D,OAAOC,KAAK,MAAM,gBAAgB;AAwDlC,MAAMC,WAAiC,GAAGC,EAAA;EAAA;;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC,UAAA;IAAAC,KAAA;IAAAC,kBAAA,EAAAC,EAAA;IAAAC,qBAAA,EAAAC,EAAA;IAAAC,KAAA;IAAAC,MAAA;IAAAC,UAAA;IAAAC,SAAA,EAAAC,EAAA;IAAAC;EAAA,IAAAd,EAU1C;EAPG,MAAAK,kBAAA,GAAAC,EAA0B,KAA1BS,SAA0B,GAA1B,KAA0B,GAA1BT,EAA0B;EAC1B,MAAAC,qBAAA,GAAAC,EAA6B,KAA7BO,SAA6B,GAA7B,KAA6B,GAA7BP,EAA6B;EAI7B,MAAAI,SAAA,GAAAC,EAAiB,KAAjBE,SAAiB,GAAjB,KAAiB,GAAjBF,EAAiB;EAKjB,MAAAG,IAAA,GAAa/B,OAAO,CAAC,CAAC;EACtB,OAAAgC,WAAA,EAAAC,cAAA,IAAsClC,QAAQ,CAA2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ACnD,iBAAiB,QACbgG,WAAW,EACXC,GAKc,CAAC;IAAAnF,CAAA,OAAAkF,WAAA;IAAAlF,CAAA,OAAAmF,GAAA;IAAAnF,CAAA,OAAAoF,GAAA;EAAA;IAAAA,GAAA,GAAApF,CAAA;EAAA;EAAA,OAPpBoF,GAOoB;AAAA,CAI/B;AAEDtF,WAAW,CAACuF,WAAW,GAAG,aAAa;AAEvC,eAAevF,WAAW;AAnLgB,SAAA2E,MAAAa,KAAA;EAAA,OAuGUA,KAAK,CAAAC,eAAgB,CAAC,CAAC;AAAA","ignoreList":[]}
|
|
@@ -22,14 +22,14 @@ export const StyledProgressBarProgressWrapper = styled.div`
|
|
|
22
22
|
border-radius: ${({
|
|
23
23
|
$height,
|
|
24
24
|
$isBig
|
|
25
|
-
}) => $
|
|
25
|
+
}) => $height || ($isBig ? 20 : 10)}px;
|
|
26
26
|
`;
|
|
27
27
|
const shineMove = keyframes`
|
|
28
28
|
from {
|
|
29
|
-
transform: translateX(-
|
|
29
|
+
transform: translateX(-100%);
|
|
30
30
|
}
|
|
31
31
|
to {
|
|
32
|
-
transform: translateX(
|
|
32
|
+
transform: translateX(100%);
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
35
|
export const StyledProgressBarShine = styled.div.attrs(({
|
|
@@ -68,6 +68,10 @@ export const StyledMotionProgressBarProgress = styled(motion.div)`
|
|
|
68
68
|
theme,
|
|
69
69
|
$color
|
|
70
70
|
}) => $color ?? theme.headline};
|
|
71
|
+
border-radius: ${({
|
|
72
|
+
$height,
|
|
73
|
+
$isBig
|
|
74
|
+
}) => $height || ($isBig ? 20 : 10)}px;
|
|
71
75
|
`;
|
|
72
76
|
export const StyledProgressBarLabel = styled.div`
|
|
73
77
|
font-size: 85%;
|
|
@@ -126,5 +130,6 @@ export const StyledProgressBarStep = styled.div`
|
|
|
126
130
|
export const StyledProgressBarThumbLabel = styled.div`
|
|
127
131
|
position: absolute;
|
|
128
132
|
right: 0;
|
|
133
|
+
height: 100%;
|
|
129
134
|
`;
|
|
130
135
|
//# sourceMappingURL=ProgressBar.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.styles.js","names":["motion","styled","css","keyframes","StyledProgressBar","div","StyledProgressBarBackground","theme","$color","StyledProgressBarProgressWrapper","$height","$isBig","shineMove","StyledProgressBarShine","attrs","$delay","style","animationDelay","$speed","StyledMotionProgressBarProgress","headline","StyledProgressBarLabel","$shouldShowLabelInline","$colorSplitPosition","$primaryColor","$secondaryColor","StyledProgressBarStepWrapper","StyledProgressBarStep","$position","StyledProgressBarThumbLabel"],"sources":["../../../../src/components/progress-bar/ProgressBar.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledProgressBar = styled.div`\n position: relative;\n`;\n\ntype StyledProgressBarBackgroundProps = WithTheme<{ $color?: string }>;\n\nexport const StyledProgressBarBackground = styled.div<StyledProgressBarBackgroundProps>`\n height: 100%;\n width: 100%;\n background-color: ${({ theme, $color }: StyledProgressBarBackgroundProps) =>\n $color ?? theme['104']};\n`;\n\ntype StyledProgressBarProgressWrapperProps = WithTheme<{\n $isBig?: boolean;\n $height?: number;\n}>;\n\nexport const StyledProgressBarProgressWrapper = styled.div<StyledProgressBarProgressWrapperProps>`\n overflow: hidden;\n position: relative;\n width: 100%;\n height: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n border-radius: ${({ $height, $isBig }) =>
|
|
1
|
+
{"version":3,"file":"ProgressBar.styles.js","names":["motion","styled","css","keyframes","StyledProgressBar","div","StyledProgressBarBackground","theme","$color","StyledProgressBarProgressWrapper","$height","$isBig","shineMove","StyledProgressBarShine","attrs","$delay","style","animationDelay","$speed","StyledMotionProgressBarProgress","headline","StyledProgressBarLabel","$shouldShowLabelInline","$colorSplitPosition","$primaryColor","$secondaryColor","StyledProgressBarStepWrapper","StyledProgressBarStep","$position","StyledProgressBarThumbLabel"],"sources":["../../../../src/components/progress-bar/ProgressBar.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\nexport const StyledProgressBar = styled.div`\n position: relative;\n`;\n\ntype StyledProgressBarBackgroundProps = WithTheme<{ $color?: string }>;\n\nexport const StyledProgressBarBackground = styled.div<StyledProgressBarBackgroundProps>`\n height: 100%;\n width: 100%;\n background-color: ${({ theme, $color }: StyledProgressBarBackgroundProps) =>\n $color ?? theme['104']};\n`;\n\ntype StyledProgressBarProgressWrapperProps = WithTheme<{\n $isBig?: boolean;\n $height?: number;\n}>;\n\nexport const StyledProgressBarProgressWrapper = styled.div<StyledProgressBarProgressWrapperProps>`\n overflow: hidden;\n position: relative;\n width: 100%;\n height: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n border-radius: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n`;\n\nconst shineMove = keyframes`\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(100%);\n }\n`;\n\nexport const StyledProgressBarShine = styled.div.attrs<{ $speed?: number; $delay?: number }>(\n ({ $delay }) => ({\n style: { animationDelay: `${$delay ?? 0}s` },\n }),\n)`\n position: absolute;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n rgba(255, 255, 255, 0) 33%,\n rgba(255, 255, 255, 0.5) 50%,\n rgba(255, 255, 255, 0) 66%\n );\n transform: translateX(-150%);\n animation: ${shineMove} ${({ $speed = 5 }) => `${$speed}s`} linear infinite;\n opacity: 0.95;\n`;\n\ntype StyledProgressBarProgressProps = WithTheme<{ $color?: string }> & {\n $height?: number;\n $isBig?: boolean;\n};\n\nexport const StyledMotionProgressBarProgress = styled(motion.div)<StyledProgressBarProgressProps>`\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n overflow: hidden;\n z-index: 2;\n display: flex;\n align-items: center;\n padding-left: 12px;\n background-color: ${({ theme, $color }: StyledProgressBarProgressProps) =>\n $color ?? theme.headline};\n border-radius: ${({ $height, $isBig }) => $height || ($isBig ? 20 : 10)}px;\n`;\n\ntype StyledProgressBarLabelProps = WithTheme<{\n $shouldShowLabelInline?: boolean;\n $primaryColor?: string;\n $secondaryColor?: string;\n $colorSplitPosition?: number;\n}>;\n\nexport const StyledProgressBarLabel = styled.div<StyledProgressBarLabelProps>`\n font-size: 85%;\n color: ${({ theme, $shouldShowLabelInline }: StyledProgressBarLabelProps) =>\n $shouldShowLabelInline ? theme['100'] : theme.headline};\n white-space: nowrap;\n\n ${({ $colorSplitPosition, $primaryColor, $secondaryColor, theme }) =>\n $colorSplitPosition &&\n css`\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n\n display: flex;\n align-items: center;\n\n padding-left: 8px;\n\n font-weight: bold;\n\n -webkit-background-clip: text;\n\n color: transparent;\n background-image: linear-gradient(\n 90deg,\n ${$primaryColor ?? theme['100']} ${$colorSplitPosition}%,\n ${$secondaryColor ?? theme['300']} ${$colorSplitPosition}%\n );\n `}\n`;\n\nexport const StyledProgressBarStepWrapper = styled.div`\n height: 100%;\n width: 100%;\n position: absolute;\n`;\n\ntype StyledProgressBarStepProps = WithTheme<{\n $position: number;\n $color?: string;\n}>;\n\nexport const StyledProgressBarStep = styled.div<StyledProgressBarStepProps>`\n background-color: ${({ theme, $color }: StyledProgressBarStepProps) => $color ?? theme['102']};\n height: 100%;\n width: 2px;\n position: absolute;\n top: 0;\n left: ${({ $position }: StyledProgressBarStepProps) => $position}%;\n`;\n\nexport const StyledProgressBarThumbLabel = styled.div`\n position: absolute;\n right: 0;\n height: 100%;\n`;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,cAAc;AACrC,OAAOC,MAAM,IAAIC,GAAG,EAAEC,SAAS,QAAQ,mBAAmB;AAG1D,OAAO,MAAMC,iBAAiB,GAAGH,MAAM,CAACI,GAAG;AAC3C;AACA,CAAC;AAID,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AAMU,sBAAsB,GAAGpB,MAAM,CAACI,GAAgC;AAC7E;AACA,aAAa,CAAC;EAAEE,KAAK;EAAEe;AAAoD,CAAC,KACpEA,sBAAsB,GAAGf,KAAK,CAAC,KAAK,CAAC,GAAGA,KAAK,CAACa,QAAQ;AAC9D;AACA;AACA,MAAM,CAAC;EAAEG,mBAAmB;EAAEC,aAAa;EAAEC,eAAe;EAAElB;AAAM,CAAC,KAC7DgB,mBAAmB,IACnBrB,GAAG;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkBsB,aAAa,IAAIjB,KAAK,CAAC,KAAK,CAAC,IAAIgB,mBAAmB;AACtE,kBAAkBE,eAAe,IAAIlB,KAAK,CAAC,KAAK,CAAC,IAAIgB,mBAAmB;AACxE;AACA,SAAS;AACT,CAAC;AAED,OAAO,MAAMG,4BAA4B,GAAGzB,MAAM,CAACI,GAAG;AACtD;AACA;AACA;AACA,CAAC;AAOD,OAAO,MAAMsB,qBAAqB,GAAG1B,MAAM,CAACI,GAA+B;AAC3E,wBAAwB,CAAC;EAAEE,KAAK;EAAEC;AAAmC,CAAC,KAAKA,MAAM,IAAID,KAAK,CAAC,KAAK,CAAC;AACjG;AACA;AACA;AACA;AACA,YAAY,CAAC;EAAEqB;AAAsC,CAAC,KAAKA,SAAS;AACpE,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAG5B,MAAM,CAACI,GAAG;AACrD;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -9,15 +9,18 @@ type StyledProgressBarProgressWrapperProps = WithTheme<{
|
|
|
9
9
|
$height?: number;
|
|
10
10
|
}>;
|
|
11
11
|
export declare const StyledProgressBarProgressWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledProgressBarProgressWrapperProps>> & string;
|
|
12
|
-
type StyledProgressBarProgressProps = WithTheme<{
|
|
13
|
-
$color?: string;
|
|
14
|
-
}>;
|
|
15
12
|
export declare const StyledProgressBarShine: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
13
|
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
17
14
|
}>, {
|
|
18
15
|
$speed?: number;
|
|
19
16
|
$delay?: number;
|
|
20
17
|
}>, never>> & string;
|
|
18
|
+
type StyledProgressBarProgressProps = WithTheme<{
|
|
19
|
+
$color?: string;
|
|
20
|
+
}> & {
|
|
21
|
+
$height?: number;
|
|
22
|
+
$isBig?: boolean;
|
|
23
|
+
};
|
|
21
24
|
export declare const StyledMotionProgressBarProgress: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<Omit<import("motion/react").HTMLMotionProps<"div">, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
22
25
|
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
|
|
23
26
|
}, StyledProgressBarProgressProps>> & string & Omit<import("motion/react").ForwardRefComponent<HTMLDivElement, import("motion/react").HTMLMotionProps<"div">>, keyof React.Component<any, {}, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.29",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "6955eed6feaa62919964be9c1b1fc3982b7a03a1"
|
|
90
90
|
}
|