@kashifd/jwero-components 0.7.23 → 0.7.24
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/dist/index.es.js +29 -18
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -58239,36 +58239,41 @@ const uz = ({ name: e, data: t, labels: r }) => {
|
|
|
58239
58239
|
width: "100%"
|
|
58240
58240
|
}
|
|
58241
58241
|
);
|
|
58242
|
-
}, dz = (e) => {
|
|
58242
|
+
}, dz = (e, t) => {
|
|
58243
|
+
if (t) {
|
|
58244
|
+
const r = e.toFixed(2);
|
|
58245
|
+
return r.endsWith(".00") ? `${Math.floor(e)}%` : `${r}%`;
|
|
58246
|
+
}
|
|
58243
58247
|
if (e >= 1e9) {
|
|
58244
|
-
const
|
|
58245
|
-
return
|
|
58248
|
+
const r = (e / 1e9).toFixed(2);
|
|
58249
|
+
return r.endsWith(".00") ? `${Math.floor(e / 1e9)}B` : r + "B";
|
|
58246
58250
|
}
|
|
58247
58251
|
if (e >= 1e6) {
|
|
58248
|
-
const
|
|
58249
|
-
return
|
|
58252
|
+
const r = (e / 1e6).toFixed(2);
|
|
58253
|
+
return r.endsWith(".00") ? `${Math.floor(e / 1e6)}M` : r + "M";
|
|
58250
58254
|
}
|
|
58251
58255
|
if (e >= 1e3) {
|
|
58252
|
-
const
|
|
58253
|
-
return
|
|
58256
|
+
const r = (e / 1e3).toFixed(2);
|
|
58257
|
+
return r.endsWith(".00") ? `${Math.floor(e / 1e3)}k` : r + "k";
|
|
58254
58258
|
}
|
|
58255
58259
|
return e.toString();
|
|
58256
58260
|
}, fz = ({
|
|
58257
58261
|
value: e,
|
|
58258
58262
|
duration: t = 1500,
|
|
58259
|
-
styles: r
|
|
58263
|
+
styles: r,
|
|
58264
|
+
isPercentage: a = !1
|
|
58260
58265
|
}) => {
|
|
58261
|
-
const [
|
|
58266
|
+
const [s, c] = _r("0"), d = ui(null), g = ui();
|
|
58262
58267
|
return Si(() => {
|
|
58263
|
-
const
|
|
58264
|
-
|
|
58265
|
-
const
|
|
58266
|
-
|
|
58268
|
+
const v = e - 0, w = (T) => {
|
|
58269
|
+
d.current || (d.current = T);
|
|
58270
|
+
const O = T - d.current, P = Math.min(O / t, 1), I = Math.floor(0 + v * P);
|
|
58271
|
+
c(dz(I, a)), P < 1 && (g.current = requestAnimationFrame(w));
|
|
58267
58272
|
};
|
|
58268
|
-
return
|
|
58269
|
-
cancelAnimationFrame(
|
|
58273
|
+
return g.current = requestAnimationFrame(w), () => {
|
|
58274
|
+
cancelAnimationFrame(g.current), d.current = null;
|
|
58270
58275
|
};
|
|
58271
|
-
}, [e, t]), /* @__PURE__ */ b.jsx(
|
|
58276
|
+
}, [e, t, a]), /* @__PURE__ */ b.jsx(
|
|
58272
58277
|
"span",
|
|
58273
58278
|
{
|
|
58274
58279
|
style: {
|
|
@@ -58278,7 +58283,7 @@ const uz = ({ name: e, data: t, labels: r }) => {
|
|
|
58278
58283
|
transition: "transform 0.3s ease-out",
|
|
58279
58284
|
...r
|
|
58280
58285
|
},
|
|
58281
|
-
children:
|
|
58286
|
+
children: s
|
|
58282
58287
|
}
|
|
58283
58288
|
);
|
|
58284
58289
|
}, hz = (e, t, r) => {
|
|
@@ -58340,7 +58345,13 @@ const uz = ({ name: e, data: t, labels: r }) => {
|
|
|
58340
58345
|
alignItems: "flex-start"
|
|
58341
58346
|
},
|
|
58342
58347
|
children: [
|
|
58343
|
-
v != null && v.flag ? /* @__PURE__ */ b.jsx(
|
|
58348
|
+
v != null && v.flag ? /* @__PURE__ */ b.jsx(
|
|
58349
|
+
fz,
|
|
58350
|
+
{
|
|
58351
|
+
value: Number(e == null ? void 0 : e.total_number),
|
|
58352
|
+
isPercentage: e == null ? void 0 : e.is_percentage
|
|
58353
|
+
}
|
|
58354
|
+
) : /* @__PURE__ */ b.jsx(vt, { variant: "xxlSemibold", ...c, children: e == null ? void 0 : e.total_number }),
|
|
58344
58355
|
(t || a && (e == null ? void 0 : e.subData)) && /* @__PURE__ */ b.jsxs(Ye, { sx: { gap: "0.75rem", width: "100%" }, children: [
|
|
58345
58356
|
t && /* @__PURE__ */ b.jsx(
|
|
58346
58357
|
lo,
|