@humain/ui 2.4.2 → 2.4.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/index194.js +6 -8
- package/dist/index194.js.map +1 -1
- package/dist/index24.js +1 -1
- package/dist/index24.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/wc/AIClarificationCard.js +1 -1
- package/dist/wc/AIContainer.js +1 -1
- package/dist/wc/AIForm.js +17 -17
- package/dist/wc/AIInput.js +1 -1
- package/dist/wc/AIMermaidDiagram.js +1 -1
- package/dist/wc/AIMessage.js +1 -1
- package/dist/wc/AIScrollButton.js +4 -4
- package/dist/wc/AIToolCall.js +5 -5
- package/dist/wc/AppSidebar.constants.js +1 -1
- package/dist/wc/AvatarFallback.js +5 -5
- package/dist/wc/CheckboxIndicator.js +7 -7
- package/dist/wc/CollapsiblePanel.js +1 -1
- package/dist/wc/DialogTrigger.js +9 -9
- package/dist/wc/DropdownMenu.js +16 -16
- package/dist/wc/MenuSubmenuTrigger.js +31 -31
- package/dist/wc/PopoverDescription.js +30 -30
- package/dist/wc/PrehydrationScript.js +1 -1
- package/dist/wc/Select.js +18 -18
- package/dist/wc/SelectSeparator.js +72 -72
- package/dist/wc/SelectSeparator.js.map +1 -1
- package/dist/wc/Tabs.js +18 -18
- package/dist/wc/TooltipProvider.js +9 -9
- package/dist/wc/chart.js +1 -1
- package/dist/wc/chunk-75Z2AOVW.js +39 -39
- package/dist/wc/chunk-OSK3NFVY.js +32 -32
- package/dist/wc/command.js +4 -4
- package/dist/wc/form-field.js +1 -1
- package/dist/wc/form-fieldset.js +5 -5
- package/dist/wc/hf-accordion-card.js +4 -4
- package/dist/wc/hf-accordion.js +6 -6
- package/dist/wc/hf-ai-feedback-bar.js +5 -5
- package/dist/wc/hf-ai-reasoning-block.js +6 -6
- package/dist/wc/hf-ai-system-message.js +1 -1
- package/dist/wc/hf-ai-tool-run.js +1 -1
- package/dist/wc/hf-area-chart.js +15 -15
- package/dist/wc/hf-autocomplete.js +36 -36
- package/dist/wc/hf-bar-chart.js +4 -4
- package/dist/wc/hf-calendar.js +4 -4
- package/dist/wc/hf-carousel.js +1 -1
- package/dist/wc/hf-context-menu.js +8 -8
- package/dist/wc/hf-donut-chart.js +10 -10
- package/dist/wc/hf-empty-state.js +87 -88
- package/dist/wc/hf-empty-state.js.map +1 -1
- package/dist/wc/hf-history.js +4 -4
- package/dist/wc/hf-horizontal-bar-chart.js +7 -7
- package/dist/wc/hf-hover-card.js +6 -6
- package/dist/wc/hf-line-chart.js +4 -4
- package/dist/wc/hf-metric-card.js +5 -5
- package/dist/wc/hf-metric-item.js +8 -8
- package/dist/wc/hf-metric-item.js.map +1 -1
- package/dist/wc/hf-nav-account-menu.js +4 -4
- package/dist/wc/hf-notification-panel.js +2 -2
- package/dist/wc/hf-pie-chart.js +17 -17
- package/dist/wc/hf-radar-chart.js +16 -16
- package/dist/wc/hf-section-header.js +6 -6
- package/dist/wc/hf-sheet.js +1 -1
- package/dist/wc/hf-sparkline-chart.js +5 -5
- package/dist/wc/hf-steps.js +6 -6
- package/dist/wc/journeyDiagram-3NMN7TZE.js +10 -10
- package/dist/wc/pieDiagram-E7YTZNPT.js +16 -16
- package/dist/wc/popupStateMapping.js +53 -53
- package/dist/wc/popupStateMapping.js.map +1 -1
- package/dist/wc/selection-group.js +1 -1
- package/dist/wc/selection-group.js.map +1 -1
- package/dist/wc/{useOpenChangeComplete.js → stateAttributesMapping.js} +21 -21
- package/dist/wc/stateAttributesMapping.js.map +1 -0
- package/dist/wc/stateDiagram-D77RDMKH.js +3 -3
- package/dist/wc/timeline-definition-24CTP7MA.js +19 -19
- package/dist/wc/useCollapsiblePanel.js +3 -3
- package/dist/wc/usePopupHandleStore.js +4 -4
- package/dist/wc/useScrollLock.js +1 -1
- package/dist/wc/vendor/recharts.js +525 -524
- package/dist/wc/vendor/recharts.js.map +1 -1
- package/dist/wc/xychartDiagram-S5SC5T6Z.js +6 -6
- package/dist/wc-react/AIClarificationCard.js +1 -1
- package/dist/wc-react/AIContainer.js +1 -1
- package/dist/wc-react/AIForm.js +17 -17
- package/dist/wc-react/AIInput.js +1 -1
- package/dist/wc-react/AIMermaidDiagram.js +1 -1
- package/dist/wc-react/AIMessage.js +1 -1
- package/dist/wc-react/AIScrollButton.js +4 -4
- package/dist/wc-react/AIToolCall.js +5 -5
- package/dist/wc-react/AppSidebar.constants.js +1 -1
- package/dist/wc-react/AvatarFallback.js +5 -5
- package/dist/wc-react/CheckboxIndicator.js +7 -7
- package/dist/wc-react/CollapsiblePanel.js +1 -1
- package/dist/wc-react/DialogTrigger.js +9 -9
- package/dist/wc-react/DropdownMenu.js +16 -16
- package/dist/wc-react/FloatingPortalLite.js +3 -3
- package/dist/wc-react/MenuSubmenuTrigger.js +31 -31
- package/dist/wc-react/PopoverDescription.js +31 -31
- package/dist/wc-react/PrehydrationScript.js +1 -1
- package/dist/wc-react/Select.js +18 -18
- package/dist/wc-react/SelectSeparator.js +71 -70
- package/dist/wc-react/SelectSeparator.js.map +1 -1
- package/dist/wc-react/Tabs.js +18 -18
- package/dist/wc-react/TooltipProvider.js +9 -9
- package/dist/wc-react/chart.js +1 -1
- package/dist/wc-react/chunk-75Z2AOVW.js +39 -39
- package/dist/wc-react/chunk-OSK3NFVY.js +32 -32
- package/dist/wc-react/command.js +4 -4
- package/dist/wc-react/form-field.js +1 -1
- package/dist/wc-react/form-fieldset.js +77 -77
- package/dist/wc-react/hf-accordion-card.js +4 -4
- package/dist/wc-react/hf-accordion.js +6 -6
- package/dist/wc-react/hf-ai-feedback-bar.js +5 -5
- package/dist/wc-react/hf-ai-reasoning-block.js +6 -6
- package/dist/wc-react/hf-ai-system-message.js +1 -1
- package/dist/wc-react/hf-ai-tool-run.js +1 -1
- package/dist/wc-react/hf-autocomplete.js +37 -37
- package/dist/wc-react/hf-calendar.js +4 -4
- package/dist/wc-react/hf-carousel.js +1 -1
- package/dist/wc-react/hf-context-menu.js +8 -8
- package/dist/wc-react/hf-data-table.js +1 -1
- package/dist/wc-react/hf-empty-state.js +87 -88
- package/dist/wc-react/hf-empty-state.js.map +1 -1
- package/dist/wc-react/hf-history.js +4 -4
- package/dist/wc-react/hf-hover-card.js +6 -6
- package/dist/wc-react/hf-metric-item.js +6 -6
- package/dist/wc-react/hf-metric-item.js.map +1 -1
- package/dist/wc-react/hf-nav-account-menu.js +4 -4
- package/dist/wc-react/hf-notification-panel.js +2 -2
- package/dist/wc-react/hf-section-header.js +6 -6
- package/dist/wc-react/hf-sheet.js +1 -1
- package/dist/wc-react/hf-steps.js +5 -5
- package/dist/wc-react/journeyDiagram-3NMN7TZE.js +10 -10
- package/dist/wc-react/pieDiagram-E7YTZNPT.js +16 -16
- package/dist/wc-react/popupStateMapping.js +54 -54
- package/dist/wc-react/popupStateMapping.js.map +1 -1
- package/dist/wc-react/selection-group.js +1 -1
- package/dist/wc-react/selection-group.js.map +1 -1
- package/dist/wc-react/{useOpenChangeComplete.js → stateAttributesMapping.js} +19 -19
- package/dist/wc-react/stateAttributesMapping.js.map +1 -0
- package/dist/wc-react/stateDiagram-D77RDMKH.js +3 -3
- package/dist/wc-react/timeline-definition-24CTP7MA.js +19 -19
- package/dist/wc-react/useCollapsiblePanel.js +3 -3
- package/dist/wc-react/usePopupHandleStore.js +3 -3
- package/dist/wc-react/useScrollLock.js +1 -1
- package/dist/wc-react/vendor/recharts.js +525 -524
- package/dist/wc-react/vendor/recharts.js.map +1 -1
- package/dist/wc-react/xychartDiagram-S5SC5T6Z.js +6 -6
- package/package.json +1 -1
- package/skills/humain-ui/SKILL.md +1 -1
- package/skills/humain-ui-wc/SKILL.md +1 -1
- package/skills/humain-ui-wc.skill +0 -0
- package/skills/humain-ui.skill +0 -0
- package/dist/wc/useOpenChangeComplete.js.map +0 -1
- package/dist/wc-react/useOpenChangeComplete.js.map +0 -1
package/dist/wc/hf-steps.js
CHANGED
|
@@ -2,9 +2,9 @@ import { a as A } from "./rolldown-runtime.js";
|
|
|
2
2
|
import { i as $, n as D, t as O } from "./vendor/react.js";
|
|
3
3
|
import { t as g } from "./dist.js";
|
|
4
4
|
import { t as L } from "./check.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { n as p, r as M } from "./utils.js";
|
|
6
|
+
import { c as q, s as z } from "./_shared.js";
|
|
7
|
+
import { t as H } from "./create-safe-context.js";
|
|
8
8
|
var o = /* @__PURE__ */ A($(), 1), s = O(), W = g("flex items-center justify-center shrink-0 size-[38px] font-medium text-lg transition-all duration-200 ease-out motion-reduce:transition-none", {
|
|
9
9
|
variants: {
|
|
10
10
|
shape: {
|
|
@@ -43,7 +43,7 @@ var o = /* @__PURE__ */ A($(), 1), s = O(), W = g("flex items-center justify-cen
|
|
|
43
43
|
incomplete: "text-secondary-foreground"
|
|
44
44
|
} },
|
|
45
45
|
defaultVariants: { status: "incomplete" }
|
|
46
|
-
}), R = g("text-sm leading-5 text-secondary-foreground"), [X, B] =
|
|
46
|
+
}), R = g("text-sm leading-5 text-secondary-foreground"), [X, B] = H("Steps"), S = o.createContext(0);
|
|
47
47
|
function G({ index: e, status: t, shape: r, bulletType: i, showIncompleteDot: a = !0 }) {
|
|
48
48
|
return i === "icon" ? t === "complete" ? /* @__PURE__ */ (0, s.jsx)(L, { className: "size-[22px] delight-check-draw" }) : t === "active" ? /* @__PURE__ */ (0, s.jsx)("div", { className: p("size-5 bg-primary", r === "rounded" ? "rounded-sm" : "rounded-full") }) : a ? /* @__PURE__ */ (0, s.jsx)("div", { className: "size-1.5 rounded-full bg-current" }) : null : e + 1;
|
|
49
49
|
}
|
|
@@ -118,7 +118,7 @@ function j({ status: e, onClick: t, showIncompleteDot: r, children: i, className
|
|
|
118
118
|
className: "flex items-center",
|
|
119
119
|
children: [N, w]
|
|
120
120
|
})]
|
|
121
|
-
}), y = o.useMemo(() =>
|
|
121
|
+
}), y = o.useMemo(() => M(h), [h]), k = d === "complete" ? ", completed" : d === "active" ? ", current" : "";
|
|
122
122
|
return /* @__PURE__ */ (0, s.jsx)("li", {
|
|
123
123
|
"data-slot": "steps-item",
|
|
124
124
|
"aria-current": d === "active" ? "step" : void 0,
|
|
@@ -230,7 +230,7 @@ var b = {
|
|
|
230
230
|
}
|
|
231
231
|
_setProp(e, t) {
|
|
232
232
|
const r = b[e] || "string";
|
|
233
|
-
this._props[e] =
|
|
233
|
+
this._props[e] = q(t, r), this._render();
|
|
234
234
|
}
|
|
235
235
|
_getProp(e) {
|
|
236
236
|
if (e in this._props) return this._props[e];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Et as rt, u as U } from "./vendor/recharts.js";
|
|
2
2
|
import { n as s } from "./chunk-Y2CYZVJY.js";
|
|
3
3
|
import { H as mt, K as xt, U as kt, a as _t, c as bt, v as vt, w as wt, x as V, y as Tt } from "./chunk-DU6HZSFF.js";
|
|
4
4
|
import { t as St } from "./chunk-5VM5RSS4.js";
|
|
@@ -165,7 +165,7 @@ var K = (function() {
|
|
|
165
165
|
}, "parseError"),
|
|
166
166
|
parse: /* @__PURE__ */ s(function(i) {
|
|
167
167
|
var a = this, o = [0], f = [], p = [null], u = [], _ = this.table, x = "", C = 0, A = 0, D = 0, dt = 2, tt = 1, ft = u.slice.call(arguments, 1), k = Object.create(this.lexer), P = { yy: {} };
|
|
168
|
-
for (var
|
|
168
|
+
for (var O in this.yy) Object.prototype.hasOwnProperty.call(this.yy, O) && (P.yy[O] = this.yy[O]);
|
|
169
169
|
k.setInput(i, P.yy), P.yy.lexer = k, P.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
|
|
170
170
|
var Y = k.yylloc;
|
|
171
171
|
u.push(Y);
|
|
@@ -705,7 +705,7 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
|
|
|
705
705
|
}, "drawLabel"), zt = /* @__PURE__ */ s(function(e, t, l) {
|
|
706
706
|
const d = e.append("g"), r = ot();
|
|
707
707
|
r.x = t.x, r.y = t.y, r.fill = t.fill, r.width = l.width * t.taskCount + l.diagramMarginX * (t.taskCount - 1), r.height = l.height, r.class = "journey-section section-type-" + t.num, r.rx = 3, r.ry = 3, Q(d, r), ut(l)(t.text, d, r.x, r.y, r.width, r.height, { class: "journey-section section-type-" + t.num }, l, t.colour);
|
|
708
|
-
}, "drawSection"), Z = -1,
|
|
708
|
+
}, "drawSection"), Z = -1, Wt = /* @__PURE__ */ s(function(e, t, l, d) {
|
|
709
709
|
const r = t.x + l.width / 2, c = e.append("g");
|
|
710
710
|
Z++, c.append("line").attr("id", d + "-task" + Z).attr("x1", r).attr("y1", t.y).attr("x2", r).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), jt(c, {
|
|
711
711
|
cx: r,
|
|
@@ -727,7 +727,7 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
|
|
|
727
727
|
};
|
|
728
728
|
ct(c, n), y += 10;
|
|
729
729
|
}), ut(l)(t.task, c, h.x, h.y, h.width, h.height, { class: "task" }, l, t.colour);
|
|
730
|
-
}, "drawTask"),
|
|
730
|
+
}, "drawTask"), Ot = /* @__PURE__ */ s(function(e, t) {
|
|
731
731
|
Mt(e, t);
|
|
732
732
|
}, "drawBackgroundRect"), ut = /* @__PURE__ */ (function() {
|
|
733
733
|
function e(r, c, h, y, g, m, n, i) {
|
|
@@ -759,8 +759,8 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
|
|
|
759
759
|
drawSection: zt,
|
|
760
760
|
drawText: ht,
|
|
761
761
|
drawLabel: Nt,
|
|
762
|
-
drawTask:
|
|
763
|
-
drawBackgroundRect:
|
|
762
|
+
drawTask: Wt,
|
|
763
|
+
drawBackgroundRect: Ot,
|
|
764
764
|
initGraphics: /* @__PURE__ */ s(function(e, t) {
|
|
765
765
|
Z = -1, e.append("defs").append("marker").attr("id", t + "-arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
|
|
766
766
|
}, "initGraphics")
|
|
@@ -768,10 +768,10 @@ var Ct = K, R = "", J = [], L = [], B = [], Pt = /* @__PURE__ */ s(function() {
|
|
|
768
768
|
Object.keys(e).forEach(function(t) {
|
|
769
769
|
S[t] = e[t];
|
|
770
770
|
});
|
|
771
|
-
}, "setConf"), M = {},
|
|
771
|
+
}, "setConf"), M = {}, W = 0;
|
|
772
772
|
function yt(e) {
|
|
773
773
|
const t = V().journey, l = t.maxLabelWidth;
|
|
774
|
-
|
|
774
|
+
W = 0;
|
|
775
775
|
let d = 60;
|
|
776
776
|
Object.keys(M).forEach((r) => {
|
|
777
777
|
const c = M[r].color, h = {
|
|
@@ -811,7 +811,7 @@ function yt(e) {
|
|
|
811
811
|
text: n,
|
|
812
812
|
textMargin: t.boxTextMargin ?? 5
|
|
813
813
|
}, o = j.drawText(e, a).node().getBoundingClientRect().width;
|
|
814
|
-
o >
|
|
814
|
+
o > W && o > t.leftMargin - o && (W = o);
|
|
815
815
|
}), d += Math.max(20, m.length * 20);
|
|
816
816
|
});
|
|
817
817
|
}
|
|
@@ -832,7 +832,7 @@ var S = V().journey, E = 0, qt = /* @__PURE__ */ s(function(e, t, l, d) {
|
|
|
832
832
|
color: S.actorColours[p % S.actorColours.length],
|
|
833
833
|
position: p
|
|
834
834
|
}, p++;
|
|
835
|
-
}), yt(i), E = S.leftMargin +
|
|
835
|
+
}), yt(i), E = S.leftMargin + W, T.insert(0, 0, E, Object.keys(M).length * 50), Xt(i, a, 0, t);
|
|
836
836
|
const u = T.getBounds();
|
|
837
837
|
o && i.append("text").text(o).attr("x", E).attr("font-size", h).attr("font-weight", "bold").attr("y", 25).attr("fill", c).attr("font-family", y);
|
|
838
838
|
const _ = u.stopy - u.starty + 2 * S.diagramMarginY, x = E + u.stopx + 2 * S.diagramMarginX;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as et,
|
|
1
|
+
import { $ as et, Ct as at, Et as N } from "./vendor/recharts.js";
|
|
2
2
|
import { n as rt } from "./mermaid-parser.core.js";
|
|
3
3
|
import { n } from "./chunk-Y2CYZVJY.js";
|
|
4
4
|
import { t as z } from "./chunk-X3CZISLH.js";
|
|
@@ -35,7 +35,7 @@ var I = ct.pie, H = {
|
|
|
35
35
|
}, "populateDb"), wt = { parse: /* @__PURE__ */ n(async (t) => {
|
|
36
36
|
const a = await rt("pie", t);
|
|
37
37
|
z.debug(a), xt(a, B);
|
|
38
|
-
}, "parse") },
|
|
38
|
+
}, "parse") }, Ct = /* @__PURE__ */ n((t) => `
|
|
39
39
|
.pieCircle{
|
|
40
40
|
stroke: ${t.pieStrokeColor};
|
|
41
41
|
stroke-width : ${t.pieStrokeWidth};
|
|
@@ -72,7 +72,7 @@ var I = ct.pie, H = {
|
|
|
72
72
|
font-family: ${t.fontFamily};
|
|
73
73
|
font-size: ${t.pieLegendTextSize};
|
|
74
74
|
}
|
|
75
|
-
`, "getStyles"),
|
|
75
|
+
`, "getStyles"), $t = /* @__PURE__ */ n((t) => {
|
|
76
76
|
const a = [...t.values()].reduce((s, l) => s + l, 0), L = [...t.entries()].map(([s, l]) => ({
|
|
77
77
|
label: s,
|
|
78
78
|
value: l
|
|
@@ -84,14 +84,14 @@ var I = ct.pie, H = {
|
|
|
84
84
|
renderer: { draw: /* @__PURE__ */ n((t, a, L, s) => {
|
|
85
85
|
z.debug(`rendering pie chart
|
|
86
86
|
` + t);
|
|
87
|
-
const l = s.db,
|
|
87
|
+
const l = s.db, W = gt(), c = ut(l.getConfig(), W.pie), U = 40, w = 18, K = 4, C = 450, $ = C, D = St(a), m = D.append("g");
|
|
88
88
|
m.attr("transform", "translate(225,225)");
|
|
89
|
-
const { themeVariables: i } =
|
|
90
|
-
let [
|
|
91
|
-
|
|
92
|
-
const V = c.legendPosition,
|
|
93
|
-
f.append("circle").attr("cx", 0).attr("cy", 0).attr("r", g +
|
|
94
|
-
const S = l.getSections(), q =
|
|
89
|
+
const { themeVariables: i } = W;
|
|
90
|
+
let [F] = mt(i.pieOuterStrokeWidth);
|
|
91
|
+
F ??= 2;
|
|
92
|
+
const V = c.legendPosition, M = c.textPosition, X = c.donutHole > 0 && c.donutHole <= 0.9 ? c.donutHole : 0, g = Math.min($, C) / 2 - U, Z = N().innerRadius(X * g).outerRadius(g), j = N().innerRadius(g * M).outerRadius(g * M), f = m.append("g");
|
|
93
|
+
f.append("circle").attr("cx", 0).attr("cy", 0).attr("r", g + F / 2).attr("class", "pieOuterCircle");
|
|
94
|
+
const S = l.getSections(), q = $t(S), J = [
|
|
95
95
|
i.pie1,
|
|
96
96
|
i.pie2,
|
|
97
97
|
i.pie3,
|
|
@@ -109,18 +109,18 @@ var I = ct.pie, H = {
|
|
|
109
109
|
S.forEach((e) => {
|
|
110
110
|
y += e;
|
|
111
111
|
});
|
|
112
|
-
const
|
|
113
|
-
f.selectAll("mySlices").data(
|
|
112
|
+
const O = q.filter((e) => (e.data.value / y * 100).toFixed(0) !== "0"), T = et(J).domain([...S.keys()]);
|
|
113
|
+
f.selectAll("mySlices").data(O).enter().append("path").attr("d", Z).attr("fill", (e) => T(e.data.label)).attr("class", (e) => {
|
|
114
114
|
let r = "pieCircle";
|
|
115
115
|
return c.highlightSlice === "hover" ? r += " highlightedOnHover" : c.highlightSlice === e.data.label && (r += " highlighted"), r;
|
|
116
|
-
}), f.selectAll("mySlices").data(
|
|
116
|
+
}), f.selectAll("mySlices").data(O).enter().append("text").text((e) => (e.data.value / y * 100).toFixed(0) + "%").attr("transform", (e) => "translate(" + j.centroid(e) + ")").style("text-anchor", "middle").attr("class", "slice");
|
|
117
117
|
const Q = m.append("text").text(l.getDiagramTitle()).attr("x", 0).attr("y", -200).attr("class", "pieTitleText"), u = [...S.entries()].map(([e, r]) => ({
|
|
118
118
|
label: e,
|
|
119
119
|
value: r
|
|
120
120
|
})), d = m.selectAll(".legend").data(u).enter().append("g").attr("class", "legend");
|
|
121
121
|
d.append("rect").attr("width", w).attr("height", w).style("fill", (e) => T(e.label)).style("stroke", (e) => T(e.label)), d.append("text").attr("x", 22).attr("y", 14).text((e) => l.getShowData() ? `${e.label} [${e.value}]` : e.label);
|
|
122
122
|
const h = Math.max(...d.selectAll("text").nodes().map((e) => e?.getBoundingClientRect().width ?? 0));
|
|
123
|
-
let v =
|
|
123
|
+
let v = C, A = 490;
|
|
124
124
|
const o = 22, b = u.length * o;
|
|
125
125
|
switch (V) {
|
|
126
126
|
case "center":
|
|
@@ -153,10 +153,10 @@ var I = ct.pie, H = {
|
|
|
153
153
|
return "translate(216," + (r * o - p) + ")";
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
const P = Q.node()?.getBoundingClientRect().width ?? 0, Y =
|
|
156
|
+
const P = Q.node()?.getBoundingClientRect().width ?? 0, Y = $ / 2 - P / 2, tt = $ / 2 + P / 2, R = Math.min(0, Y), G = Math.max(A, tt) - R;
|
|
157
157
|
D.attr("viewBox", `${R} 0 ${G} ${v}`), lt(D, v, G, c.useMaxWidth);
|
|
158
158
|
}, "draw") },
|
|
159
|
-
styles:
|
|
159
|
+
styles: Ct
|
|
160
160
|
};
|
|
161
161
|
export {
|
|
162
162
|
zt as diagram
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as Be } from "./rolldown-runtime.js";
|
|
2
2
|
import { i as vt, r as yt, t as Ct } from "./vendor/react.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Dt as Rt, Ot as It } from "./vendor/recharts.js";
|
|
4
4
|
import { a as L, c as Ot, d as z, f as Q, g as Le, m as Pt, p as de, t as Ue } from "./floating-ui.utils.dom.js";
|
|
5
5
|
import { t as G } from "./owner.js";
|
|
6
6
|
import { n as R, t as v } from "./useIsoLayoutEffect.js";
|
|
@@ -14,9 +14,9 @@ import { n as W, r as pe, t as Vt } from "./shadowDom.js";
|
|
|
14
14
|
import { i as jt, n as ge } from "./element.js";
|
|
15
15
|
import { t as T } from "./addEventListener.js";
|
|
16
16
|
import { t as Kt } from "./visuallyHidden.js";
|
|
17
|
-
import {
|
|
18
|
-
import { n as
|
|
19
|
-
var Xt = Ht, c = /* @__PURE__ */ Be(vt(), 1), Ce = /* @__PURE__ */ Be(yt(), 1),
|
|
17
|
+
import { n as ke, t as Ae } from "./useTimeout.js";
|
|
18
|
+
import { a as Wt, n as Gt, r as Yt, t as Fe } from "./stateAttributesMapping.js";
|
|
19
|
+
var Xt = Ht, c = /* @__PURE__ */ Be(vt(), 1), Ce = /* @__PURE__ */ Be(yt(), 1), B = Ct();
|
|
20
20
|
function Ee(e, t, n = !0) {
|
|
21
21
|
return e.filter((r) => r.parentId === t).flatMap((r) => [...!n || r.context?.open ? [r] : [], ...Ee(e, r.id, n)]);
|
|
22
22
|
}
|
|
@@ -28,8 +28,8 @@ function nr(e, t) {
|
|
|
28
28
|
}
|
|
29
29
|
return n;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
32
|
-
function
|
|
31
|
+
var qt = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
|
|
32
|
+
function $t(e) {
|
|
33
33
|
const t = e.assignedSlot;
|
|
34
34
|
if (t) return t;
|
|
35
35
|
if (e.parentElement) return e.parentElement;
|
|
@@ -40,27 +40,27 @@ function Se(e) {
|
|
|
40
40
|
for (const t of Array.from(e.children)) if (L(t) === "summary") return t;
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function zt(e, t) {
|
|
44
44
|
const n = Se(t);
|
|
45
45
|
return !!n && (e === n || W(n, e));
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function je(e) {
|
|
48
48
|
const t = e ? L(e) : "";
|
|
49
|
-
return e != null && e.matches(
|
|
49
|
+
return e != null && e.matches(qt) && (t !== "summary" || e.parentElement != null && L(e.parentElement) === "details" && Se(e.parentElement) === e) && (t !== "details" || Se(e) == null) && (t !== "input" || e.type !== "hidden");
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
if (!
|
|
53
|
-
for (let t = e; t; t =
|
|
51
|
+
function Ke(e) {
|
|
52
|
+
if (!je(e) || !e.isConnected || e.matches(":disabled")) return !1;
|
|
53
|
+
for (let t = e; t; t = $t(t)) {
|
|
54
54
|
const n = t !== e, r = L(t) === "slot";
|
|
55
|
-
if (t.hasAttribute("inert") || n && L(t) === "details" && !t.open && !
|
|
55
|
+
if (t.hasAttribute("inert") || n && L(t) === "details" && !t.open && !zt(e, t) || t.hasAttribute("hidden") || !r && !Jt(t, n)) return !1;
|
|
56
56
|
}
|
|
57
57
|
return !0;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function Jt(e, t) {
|
|
60
60
|
const n = Ue(e);
|
|
61
61
|
return t ? n.display !== "none" : Bt(e, n);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function We(e) {
|
|
64
64
|
const t = e.tabIndex;
|
|
65
65
|
if (t < 0) {
|
|
66
66
|
const n = L(e);
|
|
@@ -73,7 +73,7 @@ function he(e) {
|
|
|
73
73
|
const t = e;
|
|
74
74
|
return t.type === "radio" && t.name !== "" ? t : null;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Qt(e, t) {
|
|
77
77
|
const n = he(e);
|
|
78
78
|
if (!n) return !0;
|
|
79
79
|
const r = t.find((s) => {
|
|
@@ -85,47 +85,47 @@ function Zt(e, t) {
|
|
|
85
85
|
return o?.name === n.name && o.form === n.form;
|
|
86
86
|
}) === n;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ge(e) {
|
|
89
89
|
if (Q(e) && L(e) === "slot") {
|
|
90
90
|
const t = e.assignedElements({ flatten: !0 });
|
|
91
91
|
if (t.length > 0) return t;
|
|
92
92
|
}
|
|
93
93
|
return Q(e) && e.shadowRoot ? Array.from(e.shadowRoot.children) : Array.from(e.children);
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
function Ye(e, t) {
|
|
96
|
+
Ge(e).forEach((n) => {
|
|
97
|
+
je(n) && t.push(n), Ye(n, t);
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
Q(r) && r.matches(t) && n.push(r),
|
|
100
|
+
function Xe(e, t, n) {
|
|
101
|
+
Ge(e).forEach((r) => {
|
|
102
|
+
Q(r) && r.matches(t) && n.push(r), Xe(r, t, n);
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
function rr(e) {
|
|
106
|
-
return
|
|
106
|
+
return Ke(e) && We(e) >= 0;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Zt(e) {
|
|
109
109
|
const t = [];
|
|
110
|
-
return
|
|
110
|
+
return Ye(e, t), t.filter(Ke);
|
|
111
111
|
}
|
|
112
112
|
function Re(e) {
|
|
113
|
-
const t =
|
|
114
|
-
return t.filter((n) =>
|
|
113
|
+
const t = Zt(e);
|
|
114
|
+
return t.filter((n) => We(n) >= 0 && Qt(n, t));
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function qe(e, t) {
|
|
117
117
|
const n = Re(e), r = n.length;
|
|
118
118
|
if (r === 0) return;
|
|
119
119
|
const s = Vt(G(e)), o = n.indexOf(s);
|
|
120
120
|
return n[o === -1 ? t === 1 ? 0 : r - 1 : o + t];
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
return
|
|
122
|
+
function en(e) {
|
|
123
|
+
return qe(G(e).body, 1) || e;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
return
|
|
125
|
+
function tn(e) {
|
|
126
|
+
return qe(G(e).body, -1) || e;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function $e(e, t) {
|
|
129
129
|
if (!e) return null;
|
|
130
130
|
const n = Re(G(e).body), r = n.length;
|
|
131
131
|
if (r === 0) return null;
|
|
@@ -133,28 +133,28 @@ function ze(e, t) {
|
|
|
133
133
|
return s === -1 ? null : n[(s + t + r) % r];
|
|
134
134
|
}
|
|
135
135
|
function sr(e) {
|
|
136
|
-
return
|
|
136
|
+
return $e(e, 1);
|
|
137
137
|
}
|
|
138
138
|
function or(e) {
|
|
139
|
-
return
|
|
139
|
+
return $e(e, -1);
|
|
140
140
|
}
|
|
141
141
|
function me(e, t) {
|
|
142
142
|
const n = t || e.currentTarget, r = e.relatedTarget;
|
|
143
143
|
return !r || !W(n, r);
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function nn(e) {
|
|
146
146
|
Re(e).forEach((t) => {
|
|
147
147
|
t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
function De(e) {
|
|
151
151
|
const t = [];
|
|
152
|
-
|
|
152
|
+
Xe(e, "[data-tabindex]", t), t.forEach((n) => {
|
|
153
153
|
const r = n.dataset.tabindex;
|
|
154
154
|
delete n.dataset.tabindex, r ? n.setAttribute("tabindex", r) : n.removeAttribute("tabindex");
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
var be = [], Te = void 0;
|
|
157
|
+
var ze = It(), rn = Rt(), be = [], Te = void 0;
|
|
158
158
|
function sn() {
|
|
159
159
|
return Te;
|
|
160
160
|
}
|
|
@@ -196,7 +196,7 @@ function ln(e, t, n, r, s) {
|
|
|
196
196
|
r,
|
|
197
197
|
s
|
|
198
198
|
]);
|
|
199
|
-
return (0,
|
|
199
|
+
return (0, ze.useSyncExternalStore)(e.subscribe, o, o);
|
|
200
200
|
}
|
|
201
201
|
on({
|
|
202
202
|
before(e) {
|
|
@@ -218,7 +218,7 @@ on({
|
|
|
218
218
|
return () => {
|
|
219
219
|
for (const s of r) s();
|
|
220
220
|
};
|
|
221
|
-
}), (0,
|
|
221
|
+
}), (0, ze.useSyncExternalStore)(e.subscribe, e.getSnapshot, e.getSnapshot));
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
function fn(e, t, n, r, s) {
|
|
@@ -237,7 +237,7 @@ function fn(e, t, n, r, s) {
|
|
|
237
237
|
}, o.syncHooks.push(l)), l.value;
|
|
238
238
|
}
|
|
239
239
|
function dn(e, t, n, r, s) {
|
|
240
|
-
return (0,
|
|
240
|
+
return (0, rn.useSyncExternalStoreWithSelector)(e.subscribe, e.getSnapshot, e.getSnapshot, (o) => t(o, n, r, s));
|
|
241
241
|
}
|
|
242
242
|
var pn = class {
|
|
243
243
|
constructor(e) {
|
|
@@ -429,7 +429,7 @@ var pr = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
|
429
429
|
c.useEffect(() => {
|
|
430
430
|
if (!i || Y) return;
|
|
431
431
|
function x(_) {
|
|
432
|
-
i && _.relatedTarget && me(_) && (_.type === "focusin" ? M.current && (De(i), M.current = !1) : (
|
|
432
|
+
i && _.relatedTarget && me(_) && (_.type === "focusin" ? M.current && (De(i), M.current = !1) : (nn(i), M.current = !0));
|
|
433
433
|
}
|
|
434
434
|
return re(T(i, "focusin", x, !0), T(i, "focusout", x, !0));
|
|
435
435
|
}, [i, Y]), v(() => {
|
|
@@ -453,7 +453,7 @@ var pr = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
|
453
453
|
if (me(x, i)) b.current?.focus();
|
|
454
454
|
else {
|
|
455
455
|
const _ = y ? y.domReference : null;
|
|
456
|
-
|
|
456
|
+
tn(_)?.focus();
|
|
457
457
|
}
|
|
458
458
|
}
|
|
459
459
|
}),
|
|
@@ -469,7 +469,7 @@ var pr = /* @__PURE__ */ c.forwardRef(function(t, n) {
|
|
|
469
469
|
if (me(x, i)) E.current?.focus();
|
|
470
470
|
else {
|
|
471
471
|
const _ = y ? y.domReference : null;
|
|
472
|
-
|
|
472
|
+
en(_)?.focus(), y?.closeOnFocusOut && y?.onOpenChange(!1, J("focus-out", x.nativeEvent));
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
})
|
|
@@ -548,7 +548,7 @@ function Cn(e) {
|
|
|
548
548
|
};
|
|
549
549
|
}
|
|
550
550
|
function Er(e, t = {}) {
|
|
551
|
-
const { enabled: n = !0, escapeKey: r = !0, outsidePress: s = !0, outsidePressEvent: o = "sloppy", referencePress: p = yn, bubbles: l, externalTree: f } = t, i = "rootStore" in e ? e.rootStore : e, g = i.useState("open"), S = i.useState("floatingElement"), { dataRef: d } = i.context, h = rt(f), b = R(typeof s == "function" ? s : () => !1), E = typeof s == "function" ? b : s, y = E !== !1, Z = R(() => o), { escapeKey: M, outsidePress: Y } = Cn(l), A = c.useRef(!1), F = c.useRef(!1), k = c.useRef(!1), x = c.useRef(!1), _ = c.useRef(""), C = c.useRef(null), X =
|
|
551
|
+
const { enabled: n = !0, escapeKey: r = !0, outsidePress: s = !0, outsidePressEvent: o = "sloppy", referencePress: p = yn, bubbles: l, externalTree: f } = t, i = "rootStore" in e ? e.rootStore : e, g = i.useState("open"), S = i.useState("floatingElement"), { dataRef: d } = i.context, h = rt(f), b = R(typeof s == "function" ? s : () => !1), E = typeof s == "function" ? b : s, y = E !== !1, Z = R(() => o), { escapeKey: M, outsidePress: Y } = Cn(l), A = c.useRef(!1), F = c.useRef(!1), k = c.useRef(!1), x = c.useRef(!1), _ = c.useRef(""), C = c.useRef(null), X = ke(), Oe = ke(), D = R(() => {
|
|
552
552
|
Oe.clear(), d.current.insideReactTree = !1;
|
|
553
553
|
}), se = R((m) => {
|
|
554
554
|
const N = d.current.floatingContext?.nodeId;
|
|
@@ -571,7 +571,7 @@ function Er(e, t = {}) {
|
|
|
571
571
|
c.useEffect(() => {
|
|
572
572
|
if (!g || !n) return D;
|
|
573
573
|
d.current.__escapeKeyBubbles = M, d.current.__outsidePressBubbles = Y;
|
|
574
|
-
const m = new
|
|
574
|
+
const m = new Ae(), N = new Ae();
|
|
575
575
|
function H() {
|
|
576
576
|
m.clear(), x.current = !0;
|
|
577
577
|
}
|
|
@@ -968,7 +968,7 @@ function Rr(e, t = {}) {
|
|
|
968
968
|
]);
|
|
969
969
|
}
|
|
970
970
|
function Ir(e, t, n) {
|
|
971
|
-
const { mounted: r, setMounted: s, transitionStatus: o } =
|
|
971
|
+
const { mounted: r, setMounted: s, transitionStatus: o } = Wt(e), p = t.useState("preventUnmountingOnClose"), l = e ? !1 : p;
|
|
972
972
|
t.useSyncedValues({
|
|
973
973
|
mounted: r,
|
|
974
974
|
transitionStatus: o,
|
|
@@ -1041,7 +1041,7 @@ var xr = class {
|
|
|
1041
1041
|
return this.idMap.size;
|
|
1042
1042
|
}
|
|
1043
1043
|
}, _r = (function(e) {
|
|
1044
|
-
return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle =
|
|
1044
|
+
return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = Fe.startingStyle] = "startingStyle", e[e.endingStyle = Fe.endingStyle] = "endingStyle", e.anchorHidden = "data-anchor-hidden", e.side = "data-side", e.align = "data-align", e;
|
|
1045
1045
|
})({}), Nn = { "data-popup-open": "" }, Mn = {
|
|
1046
1046
|
"data-popup-open": "",
|
|
1047
1047
|
"data-pressed": ""
|
|
@@ -1058,7 +1058,7 @@ var xr = class {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
}, wr = {
|
|
1060
1060
|
...Fn,
|
|
1061
|
-
...
|
|
1061
|
+
...Gt
|
|
1062
1062
|
};
|
|
1063
1063
|
export {
|
|
1064
1064
|
Xt as $,
|
|
@@ -1068,7 +1068,7 @@ export {
|
|
|
1068
1068
|
vn as D,
|
|
1069
1069
|
rt as E,
|
|
1070
1070
|
Qe as F,
|
|
1071
|
-
|
|
1071
|
+
tn as G,
|
|
1072
1072
|
ir as H,
|
|
1073
1073
|
He as I,
|
|
1074
1074
|
me as J,
|
|
@@ -1082,9 +1082,9 @@ export {
|
|
|
1082
1082
|
gn as R,
|
|
1083
1083
|
hr as S,
|
|
1084
1084
|
Ie as T,
|
|
1085
|
-
|
|
1085
|
+
Zt as U,
|
|
1086
1086
|
an as V,
|
|
1087
|
-
|
|
1087
|
+
en as W,
|
|
1088
1088
|
Re as X,
|
|
1089
1089
|
rr as Y,
|
|
1090
1090
|
nr as Z,
|