@danxbot/ui 15.12.3 → 15.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +27 -18
- package/dist/index.js.map +1 -1
- package/dist/types/components/Progress.d.ts +27 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30982,7 +30982,10 @@ function PB({
|
|
|
30982
30982
|
}
|
|
30983
30983
|
)
|
|
30984
30984
|
] }),
|
|
30985
|
-
!i && o && /* @__PURE__ */
|
|
30985
|
+
!i && o && /* @__PURE__ */ T("span", { className: "absolute flex items-baseline font-mono text-xs font-semibold tabular-nums text-primary", children: [
|
|
30986
|
+
Math.round(e),
|
|
30987
|
+
/* @__PURE__ */ d("span", { className: "text-2xs font-medium", children: "%" })
|
|
30988
|
+
] })
|
|
30986
30989
|
]
|
|
30987
30990
|
}
|
|
30988
30991
|
);
|
|
@@ -30994,26 +30997,27 @@ function OB({
|
|
|
30994
30997
|
size: r,
|
|
30995
30998
|
remainderLabel: o = "Remaining",
|
|
30996
30999
|
showValue: s = !0,
|
|
30997
|
-
|
|
31000
|
+
centerValue: i,
|
|
31001
|
+
className: a
|
|
30998
31002
|
}) {
|
|
30999
|
-
const { arcs:
|
|
31000
|
-
|
|
31001
|
-
const
|
|
31003
|
+
const { arcs: l, used: c, overflow: u } = MB(e, t), p = Ul(c, t), f = i ?? p, h = t - c, m = e.filter((x) => x.value > 0).map((x) => `${x.label} ${Ul(x.value, t)}%`);
|
|
31004
|
+
h > 0 && m.push(`${o} ${Ul(h, t)}%`);
|
|
31005
|
+
const g = u > 0 ? `${m.join(", ")} — over the total by ${Ul(u, t)}%` : m.join(", "), b = `dx-ring-${_t()}`;
|
|
31002
31006
|
return /* @__PURE__ */ T(
|
|
31003
31007
|
"div",
|
|
31004
31008
|
{
|
|
31005
|
-
className: U(lN({ size: r }),
|
|
31009
|
+
className: U(lN({ size: r }), a),
|
|
31006
31010
|
role: "progressbar",
|
|
31007
|
-
"aria-valuenow": Math.min(100,
|
|
31011
|
+
"aria-valuenow": Math.max(0, Math.min(100, Math.round(f))),
|
|
31008
31012
|
"aria-valuemin": 0,
|
|
31009
31013
|
"aria-valuemax": 100,
|
|
31010
31014
|
"aria-label": n,
|
|
31011
|
-
"aria-describedby":
|
|
31012
|
-
"data-overflow":
|
|
31015
|
+
"aria-describedby": b,
|
|
31016
|
+
"data-overflow": u > 0 ? "true" : void 0,
|
|
31013
31017
|
children: [
|
|
31014
31018
|
/* @__PURE__ */ T("svg", { viewBox: "0 0 24 24", className: "size-full -rotate-90", children: [
|
|
31015
31019
|
/* @__PURE__ */ d("circle", { cx: "12", cy: "12", r: "10", fill: "none", strokeWidth: "2.5", className: "stroke-surface-inset" }),
|
|
31016
|
-
|
|
31020
|
+
l.map((x, w) => /* @__PURE__ */ d(
|
|
31017
31021
|
"circle",
|
|
31018
31022
|
{
|
|
31019
31023
|
cx: "12",
|
|
@@ -31023,21 +31027,26 @@ function OB({
|
|
|
31023
31027
|
strokeWidth: "2.5",
|
|
31024
31028
|
strokeLinecap: "butt",
|
|
31025
31029
|
pathLength: "1",
|
|
31026
|
-
strokeDasharray: `${
|
|
31027
|
-
strokeDashoffset: -
|
|
31030
|
+
strokeDasharray: `${x.length} 1`,
|
|
31031
|
+
strokeDashoffset: -x.start,
|
|
31028
31032
|
className: U(
|
|
31029
31033
|
"transition-[var(--tx-colors),stroke-dasharray,stroke-dashoffset] duration-(--dur-slow) ease-emphasis",
|
|
31030
|
-
cN[
|
|
31034
|
+
cN[x.tone]
|
|
31031
31035
|
),
|
|
31032
31036
|
stroke: "currentColor"
|
|
31033
31037
|
},
|
|
31034
|
-
`${
|
|
31038
|
+
`${x.label}-${w}`
|
|
31035
31039
|
))
|
|
31036
31040
|
] }),
|
|
31037
|
-
s && /* NOT clamped. A ring that is full and a ring that is
|
|
31038
|
-
again are the same picture, and this number is the
|
|
31039
|
-
|
|
31040
|
-
|
|
31041
|
+
s && /* NOT clamped (rounded only). A ring that is full and a ring that is
|
|
31042
|
+
half as full again are the same picture, and this number is the
|
|
31043
|
+
difference — true of an over-sum `total`/`segments` pair and
|
|
31044
|
+
equally true of a `centerValue` the caller hands in past 100. */
|
|
31045
|
+
/* @__PURE__ */ T("span", { className: "absolute flex items-baseline font-mono text-xs font-semibold tabular-nums text-primary", children: [
|
|
31046
|
+
Math.round(f),
|
|
31047
|
+
/* @__PURE__ */ d("span", { className: "text-2xs font-medium", children: "%" })
|
|
31048
|
+
] }),
|
|
31049
|
+
/* @__PURE__ */ d("span", { id: b, className: "sr-only", children: g })
|
|
31041
31050
|
]
|
|
31042
31051
|
}
|
|
31043
31052
|
);
|