@danxbot/ui 7.0.1 → 7.0.3
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 +22 -15
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/provenance/ConfidenceBar.d.ts +84 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46542,25 +46542,31 @@ function Q4({
|
|
|
46542
46542
|
) });
|
|
46543
46543
|
}
|
|
46544
46544
|
const J4 = pt({
|
|
46545
|
-
|
|
46545
|
+
slots: {
|
|
46546
|
+
slot: "flex shrink-0 overflow-hidden rounded-full",
|
|
46547
|
+
fill: "h-full rounded-full"
|
|
46548
|
+
},
|
|
46546
46549
|
variants: {
|
|
46547
46550
|
size: {
|
|
46548
46551
|
/* The dense form: under a glyph, in a strip of them. */
|
|
46549
|
-
xs: "h-[3px] w-[19px]",
|
|
46552
|
+
xs: { slot: "h-[3px] w-[19px]" },
|
|
46550
46553
|
/* The stated form: on a surface someone opened to read one value. */
|
|
46551
|
-
sm: "h-[5px] w-10"
|
|
46554
|
+
sm: { slot: "h-[5px] w-10" }
|
|
46552
46555
|
},
|
|
46556
|
+
/* Each level's fill written out whole, never assembled from a template string —
|
|
46557
|
+
Tailwind finds classes by scanning source text, and a class built at runtime is
|
|
46558
|
+
simply absent from the stylesheet. */
|
|
46553
46559
|
level: {
|
|
46554
|
-
1: "bg-confidence-1",
|
|
46555
|
-
2: "bg-confidence-2",
|
|
46556
|
-
3: "bg-confidence-3",
|
|
46557
|
-
4: "bg-confidence-4",
|
|
46558
|
-
5: "bg-confidence-5",
|
|
46559
|
-
/* Not rated —
|
|
46560
|
-
own token, not a general border one: every general border token
|
|
46561
|
-
WCAG 1.4.11's 3:1 on this library's surfaces, and an empty bar
|
|
46562
|
-
the hidden state this component exists to rule out. */
|
|
46563
|
-
none: "border border-
|
|
46560
|
+
1: { fill: "w-1/5 bg-confidence-1" },
|
|
46561
|
+
2: { fill: "w-2/5 bg-confidence-2" },
|
|
46562
|
+
3: { fill: "w-3/5 bg-confidence-3" },
|
|
46563
|
+
4: { fill: "w-4/5 bg-confidence-4" },
|
|
46564
|
+
5: { fill: "w-full bg-confidence-5" },
|
|
46565
|
+
/* Not rated — a dotted outline of the whole slot, so it cannot be mistaken for any
|
|
46566
|
+
earned level. Its own token, not a general border one: every general border token
|
|
46567
|
+
measures under WCAG 1.4.11's 3:1 on this library's surfaces, and an empty bar
|
|
46568
|
+
nobody can see is the hidden state this component exists to rule out. */
|
|
46569
|
+
none: { slot: "border border-dotted border-confidence-none" }
|
|
46564
46570
|
}
|
|
46565
46571
|
},
|
|
46566
46572
|
defaultVariants: { size: "sm", level: "none" }
|
|
@@ -46572,14 +46578,15 @@ function eH({
|
|
|
46572
46578
|
size: r,
|
|
46573
46579
|
className: o
|
|
46574
46580
|
}) {
|
|
46575
|
-
const s = e === null ? null : Y4(e, t), i = s === null || e === null ? `${n} — not rated` : `${n} ${String(Math.round(e))} of ${String(Math.round(t))}
|
|
46581
|
+
const s = e === null ? null : Y4(e, t), i = s === null || e === null ? `${n} — not rated` : `${n} ${String(Math.round(e))} of ${String(Math.round(t))}`, a = J4({ size: r, level: s ?? "none" });
|
|
46576
46582
|
return /* @__PURE__ */ f(ln, { content: i, children: /* @__PURE__ */ f(
|
|
46577
46583
|
"span",
|
|
46578
46584
|
{
|
|
46579
46585
|
role: "img",
|
|
46580
46586
|
"aria-label": i,
|
|
46581
46587
|
"data-level": s ?? "none",
|
|
46582
|
-
className: W(
|
|
46588
|
+
className: W(a.slot(), o),
|
|
46589
|
+
children: s === null ? null : /* @__PURE__ */ f("span", { "aria-hidden": "true", className: a.fill() })
|
|
46583
46590
|
}
|
|
46584
46591
|
) });
|
|
46585
46592
|
}
|