@brightlocal/ui-components 3.4.0 → 3.5.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/AI_USAGE.md +22 -3
- package/README.md +177 -109
- package/component-meta.json +1061 -102
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +13 -2
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +4 -3
- package/dist/banner.cjs +1 -1
- package/dist/banner.d.ts +47 -11
- package/dist/banner.d.ts.map +1 -1
- package/dist/banner.js +156 -79
- package/dist/blocks/empty-state.cjs +1 -1
- package/dist/blocks/empty-state.d.ts +40 -5
- package/dist/blocks/empty-state.d.ts.map +1 -1
- package/dist/blocks/empty-state.js +59 -52
- package/dist/blocks/input-list.d.ts +1 -0
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +12 -6
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +64 -63
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +47 -43
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +12 -0
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +115 -97
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +6 -10
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +281 -296
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +430 -343
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +23 -2
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +212 -207
- package/dist/count-indicator.cjs +1 -0
- package/dist/count-indicator.d.ts +85 -0
- package/dist/count-indicator.d.ts.map +1 -0
- package/dist/count-indicator.js +72 -0
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +101 -11
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +593 -523
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +26 -3
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +62 -47
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +8 -4
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +37 -38
- package/dist/file-upload.cjs +1 -0
- package/dist/file-upload.d.ts +546 -0
- package/dist/file-upload.d.ts.map +1 -0
- package/dist/file-upload.js +1103 -0
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +7 -2
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +52 -52
- package/dist/hooks/use-file-dropzone.cjs +1 -0
- package/dist/hooks/use-file-dropzone.d.ts +75 -0
- package/dist/hooks/use-file-dropzone.d.ts.map +1 -0
- package/dist/hooks/use-file-dropzone.js +133 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +29 -16
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.js +153 -36
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +676 -640
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +30 -1
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +131 -115
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +37 -2
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +131 -114
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +6 -6
- package/dist/lib/empty-canvas.cjs +1 -1
- package/dist/lib/empty-canvas.d.ts +27 -1
- package/dist/lib/empty-canvas.d.ts.map +1 -1
- package/dist/lib/empty-canvas.js +27 -23
- package/dist/lib/empty-chip.cjs +1 -1
- package/dist/lib/empty-chip.d.ts +19 -2
- package/dist/lib/empty-chip.d.ts.map +1 -1
- package/dist/lib/empty-chip.js +14 -9
- package/dist/lib/field-aria.cjs +1 -1
- package/dist/lib/field-aria.d.ts +4 -4
- package/dist/lib/field-aria.d.ts.map +1 -1
- package/dist/lib/field-aria.js +7 -5
- package/dist/lib/media-viewer-content.cjs +1 -1
- package/dist/lib/media-viewer-content.js +1 -1
- package/dist/lib/table-internal.cjs +1 -1
- package/dist/lib/table-internal.d.ts +19 -0
- package/dist/lib/table-internal.d.ts.map +1 -1
- package/dist/lib/table-internal.js +22 -7
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts +13 -0
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +103 -82
- package/dist/logo-mark.cjs +1 -1
- package/dist/logo-mark.d.ts +18 -2
- package/dist/logo-mark.d.ts.map +1 -1
- package/dist/logo-mark.js +159 -79
- package/dist/media-empty.cjs +1 -1
- package/dist/media-empty.d.ts +50 -7
- package/dist/media-empty.d.ts.map +1 -1
- package/dist/media-empty.js +14 -13
- package/dist/media-viewer.cjs +1 -1
- package/dist/media-viewer.js +6 -6
- package/dist/multi-select-filter.cjs +1 -1
- package/dist/multi-select-filter.d.ts.map +1 -1
- package/dist/multi-select-filter.js +92 -101
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +11 -0
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +17 -17
- package/dist/relative-date.d.ts +6 -0
- package/dist/relative-date.d.ts.map +1 -1
- package/dist/resizable.d.ts +1 -1
- package/dist/result-count.cjs +1 -1
- package/dist/result-count.d.ts +13 -16
- package/dist/result-count.d.ts.map +1 -1
- package/dist/result-count.js +24 -33
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +22 -3
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +152 -125
- package/dist/single-select-filter.cjs +1 -1
- package/dist/single-select-filter.d.ts.map +1 -1
- package/dist/single-select-filter.js +67 -76
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +77 -76
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +39 -3
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +127 -76
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts +34 -0
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.js +115 -19
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +137 -131
- package/dist/typography-text.cjs +1 -1
- package/dist/typography-text.d.ts +6 -2
- package/dist/typography-text.d.ts.map +1 -1
- package/dist/typography-text.js +14 -13
- package/package.json +3 -4
- package/src/blocks/empty-state.tsx +108 -48
- package/src/blocks/input-list.tsx +1 -0
- package/src/blocks/sidebar.tsx +39 -16
- package/src/components/alert-dialog.tsx +18 -2
- package/src/components/banner.tsx +247 -68
- package/src/components/button.tsx +27 -10
- package/src/components/card.tsx +89 -7
- package/src/components/chart.tsx +47 -67
- package/src/components/combobox.tsx +221 -12
- package/src/components/command.tsx +83 -37
- package/src/components/count-indicator.tsx +188 -0
- package/src/components/data-table.tsx +506 -159
- package/src/components/dialog.tsx +74 -5
- package/src/components/drawer.tsx +52 -32
- package/src/components/file-upload.tsx +2574 -0
- package/src/components/global-layout.tsx +18 -5
- package/src/components/hover-card.tsx +395 -65
- package/src/components/input-chip.tsx +67 -2
- package/src/components/input-group.tsx +89 -6
- package/src/components/list.tsx +40 -3
- package/src/components/logo-mark.tsx +109 -25
- package/src/components/media-empty.tsx +62 -7
- package/src/components/multi-select-filter.tsx +9 -16
- package/src/components/pagination.tsx +15 -2
- package/src/components/relative-date.tsx +6 -0
- package/src/components/result-count.tsx +27 -54
- package/src/components/sheet.tsx +86 -8
- package/src/components/single-select-filter.tsx +9 -16
- package/src/components/table.tsx +16 -1
- package/src/components/tabs.tsx +223 -41
- package/src/components/textarea.tsx +271 -4
- package/src/components/tooltip.tsx +29 -2
- package/src/components/typography-text.tsx +7 -2
- package/src/hooks/use-file-dropzone.ts +325 -0
- package/src/index.ts +3 -0
- package/src/lib/empty-canvas.tsx +47 -20
- package/src/lib/empty-chip.tsx +38 -3
- package/src/lib/field-aria.tsx +11 -6
- package/src/lib/table-internal.ts +38 -0
package/dist/chart.js
CHANGED
|
@@ -1,189 +1,174 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ChartEmpty as
|
|
2
|
+
import { ChartEmpty as ae } from "./chart-empty.js";
|
|
3
3
|
import * as b from "react";
|
|
4
4
|
import { cn as x } from "@brightlocal/ui-components/lib/utils";
|
|
5
|
-
import { Fragment as A, jsx as i, jsxs as
|
|
6
|
-
import { Slot as j, Slottable as
|
|
7
|
-
import { cva as
|
|
5
|
+
import { Fragment as A, jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
6
|
+
import { Slot as j, Slottable as D } from "@radix-ui/react-slot";
|
|
7
|
+
import { cva as O } from "class-variance-authority";
|
|
8
8
|
import * as _ from "recharts";
|
|
9
|
-
import { Area as
|
|
9
|
+
import { Area as de, AreaChart as ue, Bar as he, BarChart as fe, CartesianGrid as pe, Cell as me, Customized as ge, Label as ve, LabelList as Ce, Legend as be, Line as xe, LineChart as ye, Pie as Le, PieChart as ke, PolarAngleAxis as Ne, PolarGrid as _e, PolarRadiusAxis as we, Radar as $e, RadarChart as Se, RadialBar as ze, RadialBarChart as Ee, Rectangle as Pe, ReferenceLine as Re, ResponsiveContainer as Te, Sector as Ie, Tooltip as Ae, XAxis as je, YAxis as De } from "recharts";
|
|
10
10
|
var $ = b.createContext(null);
|
|
11
|
-
function z() {
|
|
12
|
-
const e = b.useContext($);
|
|
13
|
-
if (!e) throw new Error("useChart must be used within a <ChartContainer />");
|
|
14
|
-
return e;
|
|
15
|
-
}
|
|
16
11
|
function E() {
|
|
12
|
+
const r = b.useContext($);
|
|
13
|
+
if (!r) throw new Error("useChart must be used within a <ChartContainer />");
|
|
14
|
+
return r;
|
|
15
|
+
}
|
|
16
|
+
function P() {
|
|
17
17
|
return b.useContext($);
|
|
18
18
|
}
|
|
19
|
-
var V = b.forwardRef(({ id:
|
|
20
|
-
const y = b.useId(),
|
|
21
|
-
u.current =
|
|
22
|
-
}, [C]), c = typeof
|
|
19
|
+
var V = b.forwardRef(({ id: r, className: n, children: s, config: e, dataHook: t, width: a, height: l, minWidth: d, minHeight: o, maxHeight: h, trackingEl: f, trackingLabel: m, ...g }, C) => {
|
|
20
|
+
const y = b.useId(), v = `chart-${r || y.replace(/:/g, "")}`, u = b.useRef(null), L = b.useCallback((p) => {
|
|
21
|
+
u.current = p, typeof C == "function" ? C(p) : C && (C.current = p);
|
|
22
|
+
}, [C]), c = typeof l == "number";
|
|
23
23
|
return /* @__PURE__ */ i($.Provider, {
|
|
24
24
|
value: {
|
|
25
|
-
config:
|
|
25
|
+
config: e,
|
|
26
26
|
containerRef: u
|
|
27
27
|
},
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
ref:
|
|
30
|
-
className: x("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-polar-radius-axis-tick-value]:fill-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-pie-sector]:stroke-background text-body-xs flex justify-center [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-pie-sector]:stroke-2 [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none [&_svg_g]:outline-none [&_svg_g]:focus:outline-none", c ? "aspect-auto" : "aspect-video",
|
|
31
|
-
"data-chart":
|
|
32
|
-
"data-hook":
|
|
28
|
+
children: /* @__PURE__ */ k("div", {
|
|
29
|
+
ref: L,
|
|
30
|
+
className: x("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-polar-radius-axis-tick-value]:fill-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-pie-sector]:stroke-background text-body-xs flex justify-center [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-pie-sector]:stroke-2 [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none [&_svg_g]:outline-none [&_svg_g]:focus:outline-none", c ? "aspect-auto" : "aspect-video", n),
|
|
31
|
+
"data-chart": v,
|
|
32
|
+
"data-hook": t,
|
|
33
33
|
"data-slot": "chart-container",
|
|
34
|
-
"data-tracking-el":
|
|
35
|
-
"data-tracking-label":
|
|
36
|
-
style: c ? { height:
|
|
37
|
-
...
|
|
34
|
+
"data-tracking-el": f,
|
|
35
|
+
"data-tracking-label": m,
|
|
36
|
+
style: c ? { height: l } : void 0,
|
|
37
|
+
...g,
|
|
38
38
|
children: [/* @__PURE__ */ i(W, {
|
|
39
|
-
config:
|
|
40
|
-
id:
|
|
39
|
+
config: e,
|
|
40
|
+
id: v
|
|
41
41
|
}), /* @__PURE__ */ i(_.ResponsiveContainer, {
|
|
42
|
-
height:
|
|
42
|
+
height: l ?? "100%",
|
|
43
43
|
initialDimension: {
|
|
44
44
|
width: 1,
|
|
45
45
|
height: 1
|
|
46
46
|
},
|
|
47
47
|
maxHeight: h,
|
|
48
|
-
minHeight:
|
|
48
|
+
minHeight: o,
|
|
49
49
|
minWidth: d ?? 0,
|
|
50
|
-
width:
|
|
51
|
-
children:
|
|
50
|
+
width: a ?? "100%",
|
|
51
|
+
children: s
|
|
52
52
|
})]
|
|
53
53
|
})
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
V.displayName = "ChartContainer";
|
|
57
|
-
function W({ id:
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
const
|
|
61
|
-
return
|
|
62
|
-
[data-chart=${
|
|
63
|
-
--color-${
|
|
57
|
+
function W({ id: r, config: n }) {
|
|
58
|
+
const s = Object.entries(n).filter(([, e]) => e.theme || e.color);
|
|
59
|
+
return s.length ? /* @__PURE__ */ i("style", { dangerouslySetInnerHTML: { __html: s.map(([e, t]) => {
|
|
60
|
+
const a = typeof t.color == "string" ? t.color.replace(/^hsl\((.*)\)$/, "$1") : null;
|
|
61
|
+
return a ? `
|
|
62
|
+
[data-chart=${r}] {
|
|
63
|
+
--color-${e}: ${a};
|
|
64
64
|
}
|
|
65
|
-
` :
|
|
66
|
-
.${
|
|
67
|
-
--color-${
|
|
65
|
+
` : t.theme ? Object.entries(t.theme).map(([l, d]) => `
|
|
66
|
+
.${l} [data-chart=${r}] {
|
|
67
|
+
--color-${e}: ${d.replace(/^hsl\((.*)\)$/, "$1")};
|
|
68
68
|
}
|
|
69
69
|
`).join("") : "";
|
|
70
70
|
}).join(`
|
|
71
71
|
`) } }) : null;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
73
|
+
function z(r) {
|
|
74
|
+
return r == null || r === "" ? !1 : typeof r == "number" ? Number.isFinite(r) : !0;
|
|
75
75
|
}
|
|
76
76
|
var G = 50;
|
|
77
|
-
function M(
|
|
78
|
-
const [
|
|
77
|
+
function M(r, n) {
|
|
78
|
+
const [s, e] = b.useState(!1);
|
|
79
79
|
return b.useEffect(() => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
const t = r?.current;
|
|
81
|
+
if (!t) return;
|
|
82
|
+
let a = !1;
|
|
83
|
+
function l(f) {
|
|
84
|
+
const m = f.target, g = t.contains(m) || !!n?.contains(m);
|
|
85
|
+
a = g, e(!g);
|
|
83
86
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
document.body.removeChild(t);
|
|
87
|
-
};
|
|
88
|
-
}, [e]), a;
|
|
89
|
-
}
|
|
90
|
-
function H(e, a) {
|
|
91
|
-
b.useEffect(() => {
|
|
92
|
-
const o = e?.current;
|
|
93
|
-
if (!o) return;
|
|
94
|
-
const t = a ?? o;
|
|
95
|
-
let r = !1;
|
|
96
|
-
function n() {
|
|
97
|
-
const l = t.querySelector(".recharts-tooltip-wrapper");
|
|
98
|
-
l && (l.style.visibility = "hidden");
|
|
87
|
+
function d() {
|
|
88
|
+
a && (a = !1, e(!0));
|
|
99
89
|
}
|
|
100
|
-
function
|
|
101
|
-
|
|
102
|
-
const h = l.target;
|
|
103
|
-
!o.contains(h) && !t.contains(h) && (n(), r = !1);
|
|
90
|
+
function o(f) {
|
|
91
|
+
f.pointerType !== "touch" && e(!1);
|
|
104
92
|
}
|
|
105
|
-
function
|
|
106
|
-
|
|
93
|
+
function h() {
|
|
94
|
+
e(!1);
|
|
107
95
|
}
|
|
108
|
-
return document.addEventListener("touchstart",
|
|
96
|
+
return document.addEventListener("touchstart", l, { passive: !0 }), window.addEventListener("scroll", d, {
|
|
109
97
|
passive: !0,
|
|
110
98
|
capture: !0
|
|
111
|
-
}), () => {
|
|
112
|
-
document.removeEventListener("touchstart",
|
|
99
|
+
}), t.addEventListener("pointermove", o), t.addEventListener("pointerdown", o), t.addEventListener("keydown", h), t.addEventListener("focusin", h), () => {
|
|
100
|
+
document.removeEventListener("touchstart", l), window.removeEventListener("scroll", d, { capture: !0 }), t.removeEventListener("pointermove", o), t.removeEventListener("pointerdown", o), t.removeEventListener("keydown", h), t.removeEventListener("focusin", h);
|
|
113
101
|
};
|
|
114
|
-
}, [
|
|
102
|
+
}, [r, n]), s;
|
|
115
103
|
}
|
|
116
|
-
function
|
|
117
|
-
const
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
y: !0
|
|
122
|
-
},
|
|
123
|
-
portal: e !== void 0 ? e : n,
|
|
104
|
+
function F({ portal: r, wrapperStyle: n, active: s, ...e }) {
|
|
105
|
+
const t = M(P()?.containerRef, r ?? null);
|
|
106
|
+
return /* @__PURE__ */ i(_.Tooltip, {
|
|
107
|
+
active: s ?? (t ? !1 : void 0),
|
|
108
|
+
portal: r,
|
|
124
109
|
wrapperStyle: {
|
|
125
110
|
zIndex: G,
|
|
126
|
-
...
|
|
111
|
+
...n
|
|
127
112
|
},
|
|
128
|
-
...
|
|
113
|
+
...e
|
|
129
114
|
});
|
|
130
115
|
}
|
|
131
|
-
|
|
132
|
-
function
|
|
133
|
-
const { config: C } =
|
|
134
|
-
if (
|
|
135
|
-
const [u] =
|
|
116
|
+
F.displayName = "ChartTooltip";
|
|
117
|
+
function H({ active: r, payload: n, className: s, indicator: e = "dot", hideLabel: t = !1, hideIndicator: a = !1, label: l, labelFormatter: d, labelClassName: o, formatter: h, color: f, nameKey: m, labelKey: g }) {
|
|
118
|
+
const { config: C } = E(), y = b.useMemo(() => {
|
|
119
|
+
if (t || !n?.length) return null;
|
|
120
|
+
const [u] = n;
|
|
136
121
|
if (!u) return null;
|
|
137
|
-
const
|
|
122
|
+
const L = `${g || u.dataKey || u.name || "value"}`, c = C[L], p = !g && typeof l == "string" ? C[l]?.label || l : c?.label;
|
|
138
123
|
return d ? /* @__PURE__ */ i("div", {
|
|
139
|
-
className: x("font-medium",
|
|
140
|
-
children: d(
|
|
141
|
-
}) :
|
|
142
|
-
className: x("font-medium",
|
|
143
|
-
children:
|
|
124
|
+
className: x("font-medium", o),
|
|
125
|
+
children: d(p, n)
|
|
126
|
+
}) : p ? /* @__PURE__ */ i("div", {
|
|
127
|
+
className: x("font-medium", o),
|
|
128
|
+
children: p
|
|
144
129
|
}) : null;
|
|
145
130
|
}, [
|
|
146
|
-
s,
|
|
147
|
-
d,
|
|
148
|
-
a,
|
|
149
|
-
r,
|
|
150
131
|
l,
|
|
132
|
+
d,
|
|
133
|
+
n,
|
|
134
|
+
t,
|
|
135
|
+
o,
|
|
151
136
|
C,
|
|
152
|
-
|
|
137
|
+
g
|
|
153
138
|
]);
|
|
154
|
-
if (!
|
|
155
|
-
const
|
|
156
|
-
return /* @__PURE__ */
|
|
157
|
-
className: x("border-border/50 bg-background text-body-xs grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 shadow-xl",
|
|
139
|
+
if (!r || !n?.length) return null;
|
|
140
|
+
const v = n.length === 1 && e !== "dot";
|
|
141
|
+
return /* @__PURE__ */ k("div", {
|
|
142
|
+
className: x("border-border/50 bg-background text-body-xs grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 shadow-xl", s),
|
|
158
143
|
"data-slot": "chart-tooltip-content",
|
|
159
|
-
children: [
|
|
144
|
+
children: [v ? null : y, /* @__PURE__ */ i("div", {
|
|
160
145
|
className: "grid gap-1.5",
|
|
161
|
-
children:
|
|
162
|
-
const c = `${
|
|
146
|
+
children: n.map((u, L) => {
|
|
147
|
+
const c = `${m || u.name || u.dataKey || "value"}`, p = C[c], N = f || u.color || u.payload.fill || `var(--color-${c})`;
|
|
163
148
|
return /* @__PURE__ */ i("div", {
|
|
164
|
-
className: x("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",
|
|
149
|
+
className: x("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2", e === "dot" && "items-center"),
|
|
165
150
|
"data-slot": "chart-tooltip-item",
|
|
166
|
-
children: h &&
|
|
151
|
+
children: h && z(u.value) && u.name ? h(u.value, u.name, u, L, n) : /* @__PURE__ */ k(A, { children: [p?.icon && !a ? /* @__PURE__ */ i(p.icon, { size: 10 }) : !a && /* @__PURE__ */ i("div", {
|
|
167
152
|
className: x("shrink-0 rounded-[2px]", {
|
|
168
|
-
"h-2.5 w-2.5":
|
|
169
|
-
"w-1":
|
|
170
|
-
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
171
|
-
"my-0.5":
|
|
153
|
+
"h-2.5 w-2.5": e === "dot",
|
|
154
|
+
"w-1": e === "line",
|
|
155
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": e === "dashed",
|
|
156
|
+
"my-0.5": v && e === "dashed"
|
|
172
157
|
}),
|
|
173
158
|
style: {
|
|
174
|
-
backgroundColor:
|
|
175
|
-
borderColor:
|
|
159
|
+
backgroundColor: e === "dashed" ? "transparent" : N,
|
|
160
|
+
borderColor: N
|
|
176
161
|
}
|
|
177
|
-
}), /* @__PURE__ */
|
|
178
|
-
className: x("flex flex-1 justify-between gap-2 leading-none",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ k("div", {
|
|
163
|
+
className: x("flex flex-1 justify-between gap-2 leading-none", v ? "items-end" : "items-center"),
|
|
164
|
+
children: [/* @__PURE__ */ k("div", {
|
|
180
165
|
className: "grid gap-1.5",
|
|
181
|
-
children: [
|
|
166
|
+
children: [v ? y : null, /* @__PURE__ */ i("span", {
|
|
182
167
|
className: "text-muted-foreground",
|
|
183
168
|
"data-slot": "chart-tooltip-item-name",
|
|
184
|
-
children:
|
|
169
|
+
children: p?.label || u.name
|
|
185
170
|
})]
|
|
186
|
-
}),
|
|
171
|
+
}), z(u.value) && /* @__PURE__ */ i("span", {
|
|
187
172
|
className: "text-foreground tabular-nums",
|
|
188
173
|
"data-slot": "chart-tooltip-item-value",
|
|
189
174
|
children: typeof u.value == "number" ? u.value.toLocaleString() : u.value
|
|
@@ -194,48 +179,48 @@ function F({ active: e, payload: a, className: o, indicator: t = "dot", hideLabe
|
|
|
194
179
|
})]
|
|
195
180
|
});
|
|
196
181
|
}
|
|
197
|
-
|
|
198
|
-
function X({ ...
|
|
199
|
-
return /* @__PURE__ */ i(_.Legend, { ...
|
|
182
|
+
H.displayName = "ChartTooltipContent";
|
|
183
|
+
function X({ ...r }) {
|
|
184
|
+
return /* @__PURE__ */ i(_.Legend, { ...r });
|
|
200
185
|
}
|
|
201
186
|
X.displayName = "ChartLegend";
|
|
202
|
-
var R = b.forwardRef(({ asChild:
|
|
203
|
-
const y =
|
|
187
|
+
var R = b.forwardRef(({ asChild: r = !1, children: n, className: s, color: e, dataHook: t, hidden: a = !1, hideIcon: l = !1, muted: d = !1, seriesKey: o, trackingEl: h, trackingLabel: f, value: m, ...g }, C) => {
|
|
188
|
+
const y = P(), v = o ? y?.config[o] : void 0, u = e ?? v?.color ?? (o ? `var(--color-${o})` : void 0), L = !!o && !e && (!y || !!y.standalone && !v?.color);
|
|
204
189
|
b.useEffect(() => {
|
|
205
|
-
process.env.NODE_ENV !== "production" &&
|
|
206
|
-
}, [
|
|
207
|
-
const c =
|
|
208
|
-
return /* @__PURE__ */
|
|
190
|
+
process.env.NODE_ENV !== "production" && L && console.warn(`ChartLegendItem: seriesKey="${o}" has no colour to resolve — render it inside a ChartContainer, give the ChartLegendList config a \`color\` for this key (a \`theme\` only resolves inside a container), or set \`color\`.`);
|
|
191
|
+
}, [o, L]);
|
|
192
|
+
const c = r ? j : "div", p = n ?? v?.label ?? o;
|
|
193
|
+
return /* @__PURE__ */ k(c, {
|
|
209
194
|
ref: C,
|
|
210
|
-
className: x("[&>svg]:text-muted-foreground focus-visible:shadow-default flex items-center gap-1.5 rounded-sm outline-none group-data-[size=md]/legend:gap-2 [&>svg]:size-3 group-data-[size=md]/legend:[&>svg]:size-3.5", (d ||
|
|
211
|
-
"data-hidden":
|
|
212
|
-
"data-hook":
|
|
213
|
-
"data-muted": d ||
|
|
195
|
+
className: x("[&>svg]:text-muted-foreground focus-visible:shadow-default flex items-center gap-1.5 rounded-sm outline-none group-data-[size=md]/legend:gap-2 [&>svg]:size-3 group-data-[size=md]/legend:[&>svg]:size-3.5", (d || a) && "text-muted-foreground", a && "line-through [&_:is(button,a)]:line-through", s),
|
|
196
|
+
"data-hidden": a || void 0,
|
|
197
|
+
"data-hook": t,
|
|
198
|
+
"data-muted": d || a || void 0,
|
|
214
199
|
"data-slot": "chart-legend-item",
|
|
215
200
|
"data-tracking-el": h,
|
|
216
|
-
"data-tracking-label":
|
|
217
|
-
...
|
|
201
|
+
"data-tracking-label": f,
|
|
202
|
+
...g,
|
|
218
203
|
children: [
|
|
219
|
-
|
|
204
|
+
v?.icon && !l ? /* @__PURE__ */ i(v.icon, { size: 12 }) : /* @__PURE__ */ i("span", {
|
|
220
205
|
"aria-hidden": "true",
|
|
221
|
-
className: x("duration-fast block size-2 shrink-0 rounded-[2px] transition-opacity ease-out group-data-[size=md]/legend:size-2.5", (d ||
|
|
206
|
+
className: x("duration-fast block size-2 shrink-0 rounded-[2px] transition-opacity ease-out group-data-[size=md]/legend:size-2.5", (d || a) && "opacity-40"),
|
|
222
207
|
"data-slot": "chart-legend-item-swatch",
|
|
223
208
|
style: { backgroundColor: u }
|
|
224
209
|
}),
|
|
225
|
-
/* @__PURE__ */ i(
|
|
226
|
-
|
|
210
|
+
/* @__PURE__ */ i(D, { children: p }),
|
|
211
|
+
m != null && /* @__PURE__ */ i("span", {
|
|
227
212
|
className: "ml-auto pl-0.5 tabular-nums",
|
|
228
213
|
"data-slot": "chart-legend-item-value",
|
|
229
214
|
children: /* @__PURE__ */ i("span", {
|
|
230
215
|
className: "inline-block",
|
|
231
|
-
children:
|
|
216
|
+
children: m
|
|
232
217
|
})
|
|
233
218
|
})
|
|
234
219
|
]
|
|
235
220
|
});
|
|
236
221
|
});
|
|
237
222
|
R.displayName = "ChartLegendItem";
|
|
238
|
-
var Y =
|
|
223
|
+
var Y = O("group/legend flex", {
|
|
239
224
|
variants: {
|
|
240
225
|
size: {
|
|
241
226
|
sm: "text-body-xs",
|
|
@@ -250,251 +235,251 @@ var Y = D("group/legend flex", {
|
|
|
250
235
|
orientation: "horizontal",
|
|
251
236
|
size: "sm"
|
|
252
237
|
}
|
|
253
|
-
}), T = b.forwardRef(({ ariaLabel:
|
|
254
|
-
const
|
|
255
|
-
config:
|
|
238
|
+
}), T = b.forwardRef(({ ariaLabel: r, children: n, className: s, config: e, dataHook: t, orientation: a = "horizontal", size: l = "sm", trackingEl: d, trackingLabel: o, ...h }, f) => {
|
|
239
|
+
const m = b.useMemo(() => e ? {
|
|
240
|
+
config: e,
|
|
256
241
|
standalone: !0
|
|
257
|
-
} : null, [
|
|
258
|
-
ref:
|
|
259
|
-
"aria-label":
|
|
242
|
+
} : null, [e]), g = /* @__PURE__ */ i("div", {
|
|
243
|
+
ref: f,
|
|
244
|
+
"aria-label": r ?? "Chart legend",
|
|
260
245
|
className: x(Y({
|
|
261
|
-
orientation:
|
|
262
|
-
size:
|
|
263
|
-
}),
|
|
264
|
-
"data-hook":
|
|
265
|
-
"data-orientation":
|
|
266
|
-
"data-size":
|
|
246
|
+
orientation: a,
|
|
247
|
+
size: l
|
|
248
|
+
}), s),
|
|
249
|
+
"data-hook": t,
|
|
250
|
+
"data-orientation": a,
|
|
251
|
+
"data-size": l,
|
|
267
252
|
"data-slot": "chart-legend-list",
|
|
268
253
|
"data-tracking-el": d,
|
|
269
|
-
"data-tracking-label":
|
|
254
|
+
"data-tracking-label": o,
|
|
270
255
|
role: "group",
|
|
271
256
|
...h,
|
|
272
|
-
children:
|
|
257
|
+
children: n
|
|
273
258
|
});
|
|
274
|
-
return
|
|
275
|
-
value:
|
|
276
|
-
children:
|
|
277
|
-
}) :
|
|
259
|
+
return m ? /* @__PURE__ */ i($.Provider, {
|
|
260
|
+
value: m,
|
|
261
|
+
children: g
|
|
262
|
+
}) : g;
|
|
278
263
|
});
|
|
279
264
|
T.displayName = "ChartLegendList";
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
const { config: y } =
|
|
283
|
-
if (!
|
|
284
|
-
const
|
|
285
|
-
const
|
|
286
|
-
return String((
|
|
265
|
+
var q = (r) => r.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
266
|
+
function Z({ ariaLabel: r, className: n, dataHook: s = "chart-legend", hideIcon: e = !1, nameKey: t, orientation: a = "horizontal", payload: l, renderItem: d, showValue: o = !1, size: h = "sm", sortBy: f, valueFormatter: m, valueKey: g, verticalAlign: C = "bottom" }) {
|
|
267
|
+
const { config: y } = E();
|
|
268
|
+
if (!l?.length) return null;
|
|
269
|
+
const v = (c) => {
|
|
270
|
+
const p = c.dataKey !== void 0 && c.payload?.dataKey === c.dataKey;
|
|
271
|
+
return String((t ? c.payload?.[t] : void 0) ?? (p ? c.dataKey : c.value ?? c.dataKey));
|
|
287
272
|
}, u = (c) => {
|
|
288
|
-
const
|
|
289
|
-
return
|
|
290
|
-
},
|
|
291
|
-
const
|
|
292
|
-
return
|
|
293
|
-
} :
|
|
273
|
+
const p = Array.isArray(f) ? f.indexOf(v(c)) : -1;
|
|
274
|
+
return p === -1 ? Number.POSITIVE_INFINITY : p;
|
|
275
|
+
}, L = f ? [...l].sort(Array.isArray(f) ? (c, p) => {
|
|
276
|
+
const N = u(c), w = u(p);
|
|
277
|
+
return N === w ? 0 : N - w;
|
|
278
|
+
} : f) : l;
|
|
294
279
|
return /* @__PURE__ */ i(T, {
|
|
295
|
-
ariaLabel:
|
|
296
|
-
className: x(C === "top" && "pb-4", C === "bottom" && "pt-4",
|
|
280
|
+
ariaLabel: r,
|
|
281
|
+
className: x(C === "top" && "pb-4", C === "bottom" && "pt-4", n),
|
|
297
282
|
"data-slot": "chart-legend-content",
|
|
298
|
-
dataHook:
|
|
299
|
-
orientation:
|
|
283
|
+
dataHook: s,
|
|
284
|
+
orientation: a,
|
|
300
285
|
size: h,
|
|
301
|
-
children:
|
|
302
|
-
const
|
|
286
|
+
children: L.map((c) => {
|
|
287
|
+
const p = v(c), N = y[p], w = o ? m ? m(c) : c.payload?.[g ?? c.dataKey ?? "value"] : void 0, S = /* @__PURE__ */ i(R, {
|
|
303
288
|
color: c.color,
|
|
304
|
-
dataHook: `${
|
|
305
|
-
hideIcon:
|
|
306
|
-
seriesKey:
|
|
289
|
+
dataHook: `${s}-${q(p)}`,
|
|
290
|
+
hideIcon: e,
|
|
291
|
+
seriesKey: p,
|
|
307
292
|
value: w,
|
|
308
|
-
children:
|
|
293
|
+
children: N?.label || c.value
|
|
309
294
|
}, c.value);
|
|
310
295
|
return d ? /* @__PURE__ */ i(b.Fragment, { children: d(c, S) }, c.value) : S;
|
|
311
296
|
})
|
|
312
297
|
});
|
|
313
298
|
}
|
|
314
|
-
|
|
315
|
-
function I({ colorKey:
|
|
316
|
-
return (
|
|
299
|
+
Z.displayName = "ChartLegendContent";
|
|
300
|
+
function I({ colorKey: r, color: n, fill: s, stroke: e, payload: t }) {
|
|
301
|
+
return (r && typeof t?.[r] == "string" ? t[r] : void 0) ?? n ?? s ?? e ?? "currentColor";
|
|
317
302
|
}
|
|
318
|
-
function J({ size:
|
|
319
|
-
if (
|
|
303
|
+
function J({ size: r = 8, custom: n = !1, color: s, colorKey: e, cx: t, cy: a, stroke: l, fill: d, payload: o }) {
|
|
304
|
+
if (t == null || a == null) return null;
|
|
320
305
|
const h = I({
|
|
321
|
-
colorKey:
|
|
322
|
-
color:
|
|
306
|
+
colorKey: e,
|
|
307
|
+
color: s,
|
|
323
308
|
fill: d,
|
|
324
|
-
stroke:
|
|
325
|
-
payload:
|
|
309
|
+
stroke: l,
|
|
310
|
+
payload: o
|
|
326
311
|
});
|
|
327
312
|
return /* @__PURE__ */ i("circle", {
|
|
328
|
-
className:
|
|
329
|
-
cx:
|
|
330
|
-
cy:
|
|
313
|
+
className: n ? "fill-background" : void 0,
|
|
314
|
+
cx: t,
|
|
315
|
+
cy: a,
|
|
331
316
|
"data-slot": "chart-dot",
|
|
332
|
-
fill:
|
|
333
|
-
r:
|
|
334
|
-
stroke:
|
|
335
|
-
strokeWidth:
|
|
317
|
+
fill: n ? void 0 : h,
|
|
318
|
+
r: r / 2,
|
|
319
|
+
stroke: n ? h : "none",
|
|
320
|
+
strokeWidth: n ? 2 : void 0
|
|
336
321
|
});
|
|
337
322
|
}
|
|
338
323
|
J.displayName = "ChartDot";
|
|
339
|
-
function Q({ size:
|
|
340
|
-
if (
|
|
341
|
-
const
|
|
342
|
-
colorKey:
|
|
343
|
-
color:
|
|
344
|
-
fill:
|
|
345
|
-
stroke:
|
|
324
|
+
function Q({ size: r = 6, color: n, colorKey: s, cx: e, cy: t, stroke: a, fill: l, payload: d }) {
|
|
325
|
+
if (e == null || t == null) return null;
|
|
326
|
+
const o = I({
|
|
327
|
+
colorKey: s,
|
|
328
|
+
color: n,
|
|
329
|
+
fill: l,
|
|
330
|
+
stroke: a,
|
|
346
331
|
payload: d
|
|
347
332
|
});
|
|
348
333
|
return /* @__PURE__ */ i("circle", {
|
|
349
334
|
className: "stroke-background",
|
|
350
|
-
cx:
|
|
351
|
-
cy:
|
|
335
|
+
cx: e,
|
|
336
|
+
cy: t,
|
|
352
337
|
"data-slot": "chart-dot-on-stroke",
|
|
353
|
-
fill:
|
|
354
|
-
r:
|
|
338
|
+
fill: o,
|
|
339
|
+
r: r / 2,
|
|
355
340
|
strokeWidth: 2
|
|
356
341
|
});
|
|
357
342
|
}
|
|
358
343
|
Q.displayName = "ChartDotOnStroke";
|
|
359
|
-
function U({ type:
|
|
360
|
-
const
|
|
361
|
-
return
|
|
362
|
-
className: x(h,
|
|
363
|
-
fill:
|
|
364
|
-
fillOpacity:
|
|
365
|
-
gridType:
|
|
366
|
-
radialLines:
|
|
344
|
+
function U({ type: r = "default", filled: n = !1, fillColor: s = "var(--chart-teal)", fillOpacity: e = 0.2, boundaryOnly: t = !1, radialLines: a, className: l, ...d }) {
|
|
345
|
+
const o = r === "circle" ? "circle" : "polygon", h = t ? `[&_.${o === "circle" ? "recharts-polar-grid-concentric-circle" : "recharts-polar-grid-concentric-polygon"}:not(:last-of-type)]:stroke-transparent` : void 0;
|
|
346
|
+
return n ? /* @__PURE__ */ i(_.PolarGrid, {
|
|
347
|
+
className: x(h, l),
|
|
348
|
+
fill: s,
|
|
349
|
+
fillOpacity: e,
|
|
350
|
+
gridType: o,
|
|
351
|
+
radialLines: a ?? !1,
|
|
367
352
|
stroke: "none",
|
|
368
353
|
...d
|
|
369
354
|
}) : /* @__PURE__ */ i(_.PolarGrid, {
|
|
370
|
-
className: x(h,
|
|
371
|
-
gridType:
|
|
372
|
-
radialLines:
|
|
355
|
+
className: x(h, l),
|
|
356
|
+
gridType: o,
|
|
357
|
+
radialLines: a,
|
|
373
358
|
...d
|
|
374
359
|
});
|
|
375
360
|
}
|
|
376
361
|
U.displayName = "ChartRadarGrid";
|
|
377
|
-
function
|
|
378
|
-
const h =
|
|
379
|
-
return /* @__PURE__ */
|
|
362
|
+
function B({ type: r = "default", data: n, primaryKey: s, secondaryKey: e, x: t, y: a, textAnchor: l, payload: d, index: o }) {
|
|
363
|
+
const h = n != null && o != null ? n[o] : void 0, f = h && s != null ? h[s] : void 0, m = h && e != null ? h[e] : void 0, g = r === "default" && f != null ? m != null ? `${String(f)}/${String(m)}` : String(f) : null;
|
|
364
|
+
return /* @__PURE__ */ k("text", {
|
|
380
365
|
className: "text-body-xs",
|
|
381
366
|
"data-slot": "chart-radar-label-wrapper",
|
|
382
|
-
textAnchor:
|
|
383
|
-
x:
|
|
384
|
-
y:
|
|
385
|
-
children: [
|
|
367
|
+
textAnchor: l,
|
|
368
|
+
x: t,
|
|
369
|
+
y: a,
|
|
370
|
+
children: [g != null && /* @__PURE__ */ i("tspan", {
|
|
386
371
|
className: "fill-card-foreground",
|
|
387
372
|
dy: "-0.5em",
|
|
388
|
-
x:
|
|
389
|
-
children:
|
|
373
|
+
x: t,
|
|
374
|
+
children: g
|
|
390
375
|
}), /* @__PURE__ */ i("tspan", {
|
|
391
376
|
className: "fill-muted-foreground",
|
|
392
|
-
dy:
|
|
393
|
-
x:
|
|
377
|
+
dy: g != null ? "1.2em" : void 0,
|
|
378
|
+
x: t,
|
|
394
379
|
children: d?.value
|
|
395
380
|
})]
|
|
396
381
|
});
|
|
397
382
|
}
|
|
398
|
-
|
|
399
|
-
function
|
|
400
|
-
if (
|
|
401
|
-
const
|
|
383
|
+
B.displayName = "ChartRadarLabelWrapper";
|
|
384
|
+
function K({ nameKey: r, config: n, radiusRatio: s = 0.5, cx: e, cy: t, midAngle: a = 0, innerRadius: l = 0, outerRadius: d = 0, payload: o, name: h }) {
|
|
385
|
+
if (e == null || t == null) return null;
|
|
386
|
+
const f = Math.PI / 180, m = l + (d - l) * s, g = e + m * Math.cos(-a * f), C = t + m * Math.sin(-a * f), y = r != null && o != null ? o[r] : void 0, v = y != null ? String(y) : h, u = v != null ? n?.[v]?.label ?? v : v;
|
|
402
387
|
return /* @__PURE__ */ i("text", {
|
|
403
388
|
className: "fill-foreground text-body-xs",
|
|
404
389
|
"data-slot": "chart-pie-label-list",
|
|
405
390
|
dominantBaseline: "middle",
|
|
406
391
|
textAnchor: "middle",
|
|
407
|
-
x:
|
|
392
|
+
x: g,
|
|
408
393
|
y: C,
|
|
409
394
|
children: u
|
|
410
395
|
});
|
|
411
396
|
}
|
|
412
|
-
|
|
413
|
-
function
|
|
414
|
-
if (
|
|
415
|
-
const
|
|
397
|
+
K.displayName = "ChartPieLabelList";
|
|
398
|
+
function ee({ valueKey: r, x: n, y: s, textAnchor: e, payload: t, value: a }) {
|
|
399
|
+
if (n == null || s == null) return null;
|
|
400
|
+
const l = r != null && t != null ? t[r] : a;
|
|
416
401
|
return /* @__PURE__ */ i("text", {
|
|
417
402
|
className: "fill-foreground text-body-xs",
|
|
418
403
|
"data-slot": "chart-pie-label-wrapper",
|
|
419
404
|
dominantBaseline: "middle",
|
|
420
|
-
textAnchor:
|
|
421
|
-
x:
|
|
422
|
-
y:
|
|
423
|
-
children:
|
|
405
|
+
textAnchor: e,
|
|
406
|
+
x: n,
|
|
407
|
+
y: s,
|
|
408
|
+
children: l
|
|
424
409
|
});
|
|
425
410
|
}
|
|
426
|
-
|
|
427
|
-
var
|
|
411
|
+
ee.displayName = "ChartPieLabelWrapper";
|
|
412
|
+
var te = {
|
|
428
413
|
"2xl": "text-metric",
|
|
429
414
|
"3xl": "font-sans text-3xl font-semibold",
|
|
430
415
|
"4xl": "font-sans text-4xl font-semibold"
|
|
431
416
|
};
|
|
432
|
-
function
|
|
433
|
-
if (
|
|
434
|
-
const { cx:
|
|
435
|
-
return /* @__PURE__ */
|
|
417
|
+
function re({ primary: r, secondary: n, size: s = "3xl", viewBox: e }) {
|
|
418
|
+
if (e == null || typeof e != "object" || !("cx" in e) || !("cy" in e)) return null;
|
|
419
|
+
const { cx: t, cy: a } = e;
|
|
420
|
+
return /* @__PURE__ */ k("text", {
|
|
436
421
|
"data-slot": "chart-center-label",
|
|
437
422
|
dominantBaseline: "middle",
|
|
438
423
|
textAnchor: "middle",
|
|
439
|
-
x:
|
|
440
|
-
y:
|
|
424
|
+
x: t,
|
|
425
|
+
y: a,
|
|
441
426
|
children: [/* @__PURE__ */ i("tspan", {
|
|
442
|
-
className: x("fill-foreground",
|
|
443
|
-
x:
|
|
444
|
-
y:
|
|
445
|
-
children:
|
|
446
|
-
}),
|
|
427
|
+
className: x("fill-foreground", te[s]),
|
|
428
|
+
x: t,
|
|
429
|
+
y: a,
|
|
430
|
+
children: r
|
|
431
|
+
}), n != null && /* @__PURE__ */ i("tspan", {
|
|
447
432
|
className: "fill-muted-foreground text-body-xs",
|
|
448
|
-
x:
|
|
449
|
-
y:
|
|
450
|
-
children:
|
|
433
|
+
x: t,
|
|
434
|
+
y: a + 24,
|
|
435
|
+
children: n
|
|
451
436
|
})]
|
|
452
437
|
});
|
|
453
438
|
}
|
|
454
|
-
|
|
439
|
+
re.displayName = "ChartCenterLabel";
|
|
455
440
|
export {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
441
|
+
de as Area,
|
|
442
|
+
ue as AreaChart,
|
|
443
|
+
he as Bar,
|
|
444
|
+
fe as BarChart,
|
|
445
|
+
pe as CartesianGrid,
|
|
446
|
+
me as Cell,
|
|
447
|
+
re as ChartCenterLabel,
|
|
463
448
|
V as ChartContainer,
|
|
464
449
|
J as ChartDot,
|
|
465
450
|
Q as ChartDotOnStroke,
|
|
466
|
-
|
|
467
|
-
|
|
451
|
+
ae as ChartEmpty,
|
|
452
|
+
ve as ChartLabel,
|
|
468
453
|
X as ChartLegend,
|
|
469
|
-
|
|
454
|
+
Z as ChartLegendContent,
|
|
470
455
|
R as ChartLegendItem,
|
|
471
456
|
T as ChartLegendList,
|
|
472
|
-
|
|
473
|
-
|
|
457
|
+
K as ChartPieLabelList,
|
|
458
|
+
ee as ChartPieLabelWrapper,
|
|
474
459
|
U as ChartRadarGrid,
|
|
475
|
-
|
|
460
|
+
B as ChartRadarLabelWrapper,
|
|
476
461
|
W as ChartStyle,
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
462
|
+
F as ChartTooltip,
|
|
463
|
+
H as ChartTooltipContent,
|
|
464
|
+
be as ChartsLegend,
|
|
465
|
+
Ae as ChartsTooltip,
|
|
466
|
+
ge as Customized,
|
|
467
|
+
Ce as LabelList,
|
|
468
|
+
xe as Line,
|
|
469
|
+
ye as LineChart,
|
|
470
|
+
Le as Pie,
|
|
471
|
+
ke as PieChart,
|
|
472
|
+
Ne as PolarAngleAxis,
|
|
473
|
+
_e as PolarGrid,
|
|
474
|
+
we as PolarRadiusAxis,
|
|
475
|
+
$e as Radar,
|
|
476
|
+
Se as RadarChart,
|
|
477
|
+
ze as RadialBar,
|
|
478
|
+
Ee as RadialBarChart,
|
|
479
|
+
Pe as Rectangle,
|
|
480
|
+
Re as ReferenceLine,
|
|
481
|
+
Te as ResponsiveContainer,
|
|
482
|
+
Ie as Sector,
|
|
483
|
+
je as XAxis,
|
|
484
|
+
De as YAxis
|
|
500
485
|
};
|