@brightlocal/ui-components 3.0.0 → 3.2.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/README.md +7 -1
- package/component-meta.json +749 -53
- package/deprecations.json +114 -4
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +36 -0
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +74 -61
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +32 -3
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +61 -58
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +58 -57
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +9 -0
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +50 -30
- package/dist/banner.cjs +1 -0
- package/dist/banner.d.ts +81 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/banner.js +176 -0
- package/dist/blocks/empty-state.cjs +1 -1
- package/dist/blocks/empty-state.d.ts +4 -3
- package/dist/blocks/empty-state.d.ts.map +1 -1
- package/dist/blocks/empty-state.js +50 -57
- package/dist/blocks/progress-state.d.ts +2 -2
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +17 -0
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +8 -2
- package/dist/brand-illustration-motif.d.ts +1 -1
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.d.ts +36 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +47 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +105 -7
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +198 -101
- package/dist/chart.cjs +3 -3
- package/dist/chart.d.ts +270 -24
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +497 -322
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +2 -1
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +38 -4
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +95 -81
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +2 -2
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +23 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +251 -225
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +201 -23
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +712 -568
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +13 -5
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +54 -53
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +8 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +79 -52
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +105 -13
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +146 -129
- package/dist/grid.d.ts +26 -3
- package/dist/grid.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.cjs +1 -1
- package/dist/hooks/use-breakpoint.d.ts +1 -1
- package/dist/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.js +1 -0
- package/dist/hooks/use-mobile.cjs +1 -0
- package/dist/hooks/use-mobile.js +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +594 -553
- package/dist/info-tooltip.cjs +1 -0
- package/dist/info-tooltip.d.ts +39 -0
- package/dist/info-tooltip.d.ts.map +1 -0
- package/dist/info-tooltip.js +41 -0
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +1 -1
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +33 -2
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +167 -54
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +45 -15
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +31 -30
- package/dist/input.cjs +1 -1
- package/dist/input.js +10 -10
- package/dist/lib/block-illustration.cjs +1 -1
- package/dist/lib/block-illustration.d.ts +4 -1
- package/dist/lib/block-illustration.d.ts.map +1 -1
- package/dist/lib/block-illustration.js +12 -11
- package/dist/lib/empty-chip.cjs +1 -0
- package/dist/lib/empty-chip.d.ts +4 -0
- package/dist/lib/empty-chip.d.ts.map +1 -0
- package/dist/lib/empty-chip.js +13 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +4 -3
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/multi-select-filter.cjs +1 -0
- package/dist/multi-select-filter.d.ts +178 -0
- package/dist/multi-select-filter.d.ts.map +1 -0
- package/dist/multi-select-filter.js +463 -0
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +3 -0
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +57 -57
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +123 -16
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +89 -75
- package/dist/rating.cjs +1 -1
- package/dist/rating.js +18 -18
- package/dist/relative-date.cjs +1 -0
- package/dist/relative-date.d.ts +65 -0
- package/dist/relative-date.d.ts.map +1 -0
- package/dist/relative-date.js +128 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +15 -6
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +38 -36
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +24 -3
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +130 -110
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +78 -2
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +192 -85
- package/dist/single-select-filter.cjs +1 -0
- package/dist/single-select-filter.d.ts +81 -0
- package/dist/single-select-filter.d.ts.map +1 -0
- package/dist/single-select-filter.js +226 -0
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +22 -22
- package/dist/split-layout.cjs +1 -1
- package/dist/split-layout.d.ts +1 -1
- package/dist/split-layout.js +13 -13
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +45 -4
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +90 -73
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +12 -1
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +148 -126
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +38 -36
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +262 -73
- package/dist/typography-heading.cjs +1 -1
- package/dist/typography-heading.d.ts +13 -0
- package/dist/typography-heading.d.ts.map +1 -1
- package/dist/typography-heading.js +32 -21
- package/dist/typography-text.cjs +1 -1
- package/dist/typography-text.d.ts +15 -2
- package/dist/typography-text.d.ts.map +1 -1
- package/dist/typography-text.js +35 -24
- package/dist/typography.d.ts +1 -1
- package/package.json +5 -6
- package/src/blocks/empty-state.tsx +17 -24
- package/src/blocks/progress-state.tsx +2 -2
- package/src/blocks/sidebar.tsx +26 -2
- package/src/components/accordion.tsx +82 -27
- package/src/components/alert-dialog.tsx +50 -5
- package/src/components/alert.tsx +16 -8
- package/src/components/badge.tsx +40 -3
- package/src/components/banner.tsx +288 -0
- package/src/components/brand-illustration-motif.tsx +1 -1
- package/src/components/button-group.tsx +112 -0
- package/src/components/button.tsx +1 -1
- package/src/components/card.tsx +249 -27
- package/src/components/chart.tsx +586 -53
- package/src/components/checkbox.tsx +1 -1
- package/src/components/chip.tsx +83 -10
- package/src/components/combobox.tsx +2 -2
- package/src/components/command.tsx +56 -4
- package/src/components/data-table.tsx +842 -199
- package/src/components/date-picker.tsx +18 -7
- package/src/components/field.tsx +81 -12
- package/src/components/global-layout.tsx +176 -38
- package/src/components/grid.tsx +34 -3
- package/src/components/info-tooltip.tsx +94 -0
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +246 -11
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +56 -22
- package/src/components/input.tsx +1 -1
- package/src/components/list.tsx +1 -1
- package/src/components/multi-select-filter.tsx +912 -0
- package/src/components/pagination.tsx +10 -3
- package/src/components/progress.tsx +190 -31
- package/src/components/rating.tsx +1 -1
- package/src/components/relative-date.tsx +230 -0
- package/src/components/scroll-area.tsx +23 -10
- package/src/components/select.tsx +65 -11
- package/src/components/sheet.tsx +240 -4
- package/src/components/single-select-filter.tsx +443 -0
- package/src/components/sonner.tsx +16 -5
- package/src/components/split-layout.tsx +2 -2
- package/src/components/table.tsx +71 -11
- package/src/components/tabs.tsx +93 -46
- package/src/components/textarea.tsx +1 -1
- package/src/components/tooltip.tsx +440 -68
- package/src/components/typography-heading.tsx +24 -0
- package/src/components/typography-text.tsx +27 -3
- package/src/components/typography.tsx +1 -1
- package/src/hooks/use-breakpoint.ts +2 -1
- package/src/index.ts +6 -0
- package/src/lib/block-illustration.tsx +5 -1
- package/src/lib/empty-chip.ts +24 -0
- package/src/lib/utils.ts +1 -0
package/dist/chart.js
CHANGED
|
@@ -1,58 +1,63 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as y, jsx as o, Fragment as T } from "react/jsx-runtime";
|
|
2
2
|
import * as k from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import { Area as
|
|
5
|
-
import {
|
|
6
|
-
|
|
3
|
+
import * as _ from "recharts";
|
|
4
|
+
import { Area as se, AreaChart as ie, Bar as ce, BarChart as de, CartesianGrid as ue, Cell as he, Label as fe, Legend as ge, Tooltip as pe, Customized as me, LabelList as Ce, Line as be, LineChart as ve, Pie as xe, PieChart as ke, PolarAngleAxis as Ne, PolarGrid as ye, PolarRadiusAxis as Le, Radar as _e, RadarChart as $e, RadialBar as we, RadialBarChart as ze, Rectangle as Re, ReferenceLine as Pe, ResponsiveContainer as Se, Sector as Ae, XAxis as Ie, YAxis as Te } from "recharts";
|
|
5
|
+
import { Slot as j, Slottable as O } from "@radix-ui/react-slot";
|
|
6
|
+
import { cva as V } from "class-variance-authority";
|
|
7
|
+
import { cn as b } from "@brightlocal/ui-components/lib/utils";
|
|
8
|
+
const w = k.createContext(null);
|
|
7
9
|
function P() {
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
10
|
+
const t = k.useContext(w);
|
|
11
|
+
if (!t)
|
|
10
12
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
11
|
-
return
|
|
13
|
+
return t;
|
|
12
14
|
}
|
|
13
|
-
|
|
15
|
+
function D() {
|
|
16
|
+
return k.useContext(w);
|
|
17
|
+
}
|
|
18
|
+
const W = k.forwardRef(
|
|
14
19
|
({
|
|
15
|
-
id:
|
|
16
|
-
className:
|
|
17
|
-
children:
|
|
20
|
+
id: t,
|
|
21
|
+
className: a,
|
|
22
|
+
children: s,
|
|
18
23
|
config: e,
|
|
19
|
-
dataHook:
|
|
20
|
-
width:
|
|
21
|
-
height:
|
|
22
|
-
minWidth:
|
|
23
|
-
minHeight:
|
|
24
|
-
maxHeight:
|
|
24
|
+
dataHook: r,
|
|
25
|
+
width: n,
|
|
26
|
+
height: i,
|
|
27
|
+
minWidth: c,
|
|
28
|
+
minHeight: l,
|
|
29
|
+
maxHeight: f,
|
|
25
30
|
trackingEl: h,
|
|
26
|
-
trackingLabel:
|
|
31
|
+
trackingLabel: p,
|
|
27
32
|
...m
|
|
28
|
-
},
|
|
29
|
-
const x = k.useId(),
|
|
30
|
-
return /* @__PURE__ */
|
|
33
|
+
}, v) => {
|
|
34
|
+
const x = k.useId(), g = `chart-${t || x.replace(/:/g, "")}`;
|
|
35
|
+
return /* @__PURE__ */ o(w.Provider, { value: { config: e }, children: /* @__PURE__ */ y(
|
|
31
36
|
"div",
|
|
32
37
|
{
|
|
33
|
-
ref:
|
|
34
|
-
className:
|
|
38
|
+
ref: v,
|
|
39
|
+
className: b(
|
|
35
40
|
"[&_.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 aspect-video 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",
|
|
36
|
-
|
|
41
|
+
a
|
|
37
42
|
),
|
|
38
|
-
"data-chart":
|
|
39
|
-
"data-hook":
|
|
43
|
+
"data-chart": g,
|
|
44
|
+
"data-hook": r,
|
|
40
45
|
"data-slot": "chart-container",
|
|
41
46
|
"data-tracking-el": h,
|
|
42
|
-
"data-tracking-label":
|
|
47
|
+
"data-tracking-label": p,
|
|
43
48
|
...m,
|
|
44
49
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
50
|
+
/* @__PURE__ */ o(G, { config: e, id: g }),
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
|
+
_.ResponsiveContainer,
|
|
48
53
|
{
|
|
49
|
-
height:
|
|
54
|
+
height: i ?? "100%",
|
|
50
55
|
initialDimension: { width: 1, height: 1 },
|
|
51
|
-
maxHeight:
|
|
52
|
-
minHeight:
|
|
53
|
-
minWidth:
|
|
54
|
-
width:
|
|
55
|
-
children:
|
|
56
|
+
maxHeight: f,
|
|
57
|
+
minHeight: l,
|
|
58
|
+
minWidth: c ?? 0,
|
|
59
|
+
width: n ?? "100%",
|
|
60
|
+
children: s
|
|
56
61
|
}
|
|
57
62
|
)
|
|
58
63
|
]
|
|
@@ -60,25 +65,25 @@ const j = k.forwardRef(
|
|
|
60
65
|
) });
|
|
61
66
|
}
|
|
62
67
|
);
|
|
63
|
-
|
|
64
|
-
function
|
|
65
|
-
const
|
|
68
|
+
W.displayName = "ChartContainer";
|
|
69
|
+
function G({ id: t, config: a }) {
|
|
70
|
+
const s = Object.entries(a).filter(
|
|
66
71
|
([, e]) => e.theme || e.color
|
|
67
72
|
);
|
|
68
|
-
return
|
|
73
|
+
return s.length ? /* @__PURE__ */ o(
|
|
69
74
|
"style",
|
|
70
75
|
{
|
|
71
76
|
dangerouslySetInnerHTML: {
|
|
72
|
-
__html:
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
-
[data-chart=${
|
|
76
|
-
--color-${e}: ${
|
|
77
|
+
__html: s.map(([e, r]) => {
|
|
78
|
+
const n = typeof r.color == "string" ? r.color.replace(/^hsl\((.*)\)$/, "$1") : null;
|
|
79
|
+
return n ? `
|
|
80
|
+
[data-chart=${t}] {
|
|
81
|
+
--color-${e}: ${n};
|
|
77
82
|
}
|
|
78
|
-
` :
|
|
79
|
-
([
|
|
80
|
-
.${
|
|
81
|
-
--color-${e}: ${
|
|
83
|
+
` : r.theme ? Object.entries(r.theme).map(
|
|
84
|
+
([i, c]) => `
|
|
85
|
+
.${i} [data-chart=${t}] {
|
|
86
|
+
--color-${e}: ${c.replace(/^hsl\((.*)\)$/, "$1")};
|
|
82
87
|
}
|
|
83
88
|
`
|
|
84
89
|
).join("") : "";
|
|
@@ -88,320 +93,488 @@ function T({ id: r, config: t }) {
|
|
|
88
93
|
}
|
|
89
94
|
) : null;
|
|
90
95
|
}
|
|
91
|
-
function
|
|
92
|
-
return
|
|
96
|
+
function R(t) {
|
|
97
|
+
return t == null || t === "" ? !1 : typeof t == "number" ? Number.isFinite(t) : !0;
|
|
93
98
|
}
|
|
94
|
-
function
|
|
95
|
-
return /* @__PURE__ */
|
|
99
|
+
function M({ ...t }) {
|
|
100
|
+
return /* @__PURE__ */ o(_.Tooltip, { ...t });
|
|
96
101
|
}
|
|
97
|
-
|
|
98
|
-
function
|
|
99
|
-
active:
|
|
100
|
-
payload:
|
|
101
|
-
className:
|
|
102
|
+
M.displayName = "ChartTooltip";
|
|
103
|
+
function E({
|
|
104
|
+
active: t,
|
|
105
|
+
payload: a,
|
|
106
|
+
className: s,
|
|
102
107
|
indicator: e = "dot",
|
|
103
|
-
hideLabel:
|
|
104
|
-
hideIndicator:
|
|
105
|
-
label:
|
|
106
|
-
labelFormatter:
|
|
107
|
-
labelClassName:
|
|
108
|
-
formatter:
|
|
108
|
+
hideLabel: r = !1,
|
|
109
|
+
hideIndicator: n = !1,
|
|
110
|
+
label: i,
|
|
111
|
+
labelFormatter: c,
|
|
112
|
+
labelClassName: l,
|
|
113
|
+
formatter: f,
|
|
109
114
|
color: h,
|
|
110
|
-
nameKey:
|
|
115
|
+
nameKey: p,
|
|
111
116
|
labelKey: m
|
|
112
117
|
}) {
|
|
113
|
-
const { config:
|
|
114
|
-
if (
|
|
118
|
+
const { config: v } = P(), x = k.useMemo(() => {
|
|
119
|
+
if (r || !a?.length)
|
|
115
120
|
return null;
|
|
116
|
-
const [
|
|
117
|
-
if (!
|
|
121
|
+
const [d] = a;
|
|
122
|
+
if (!d)
|
|
118
123
|
return null;
|
|
119
|
-
const
|
|
120
|
-
return
|
|
124
|
+
const N = `${m || d.dataKey || d.name || "value"}`, u = v[N], C = !m && typeof i == "string" ? v[i]?.label || i : u?.label;
|
|
125
|
+
return c ? /* @__PURE__ */ o("div", { className: b("font-medium", l), children: c(C, a) }) : C ? /* @__PURE__ */ o("div", { className: b("font-medium", l), children: C }) : null;
|
|
121
126
|
}, [
|
|
122
|
-
o,
|
|
123
|
-
d,
|
|
124
|
-
t,
|
|
125
|
-
n,
|
|
126
127
|
i,
|
|
127
|
-
|
|
128
|
+
c,
|
|
129
|
+
a,
|
|
130
|
+
r,
|
|
131
|
+
l,
|
|
132
|
+
v,
|
|
128
133
|
m
|
|
129
134
|
]);
|
|
130
|
-
if (!
|
|
135
|
+
if (!t || !a?.length)
|
|
131
136
|
return null;
|
|
132
|
-
const
|
|
133
|
-
return /* @__PURE__ */
|
|
137
|
+
const g = a.length === 1 && e !== "dot";
|
|
138
|
+
return /* @__PURE__ */ y(
|
|
134
139
|
"div",
|
|
135
140
|
{
|
|
136
|
-
className:
|
|
141
|
+
className: b(
|
|
137
142
|
"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",
|
|
138
|
-
|
|
143
|
+
s
|
|
139
144
|
),
|
|
140
145
|
"data-slot": "chart-tooltip-content",
|
|
141
146
|
children: [
|
|
142
|
-
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
const
|
|
145
|
-
return /* @__PURE__ */
|
|
147
|
+
g ? null : x,
|
|
148
|
+
/* @__PURE__ */ o("div", { className: "grid gap-1.5", children: a.map((d, N) => {
|
|
149
|
+
const u = `${p || d.name || d.dataKey || "value"}`, C = v[u], L = h || d.color || d.payload.fill || `var(--color-${u})`;
|
|
150
|
+
return /* @__PURE__ */ o(
|
|
146
151
|
"div",
|
|
147
152
|
{
|
|
148
|
-
className:
|
|
153
|
+
className: b(
|
|
149
154
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",
|
|
150
155
|
e === "dot" && "items-center"
|
|
151
156
|
),
|
|
152
|
-
|
|
153
|
-
|
|
157
|
+
"data-slot": "chart-tooltip-item",
|
|
158
|
+
children: f && R(d.value) && d.name ? f(d.value, d.name, d, N, a) : /* @__PURE__ */ y(T, { children: [
|
|
159
|
+
C?.icon && !n ? /* @__PURE__ */ o(C.icon, { size: 10 }) : !n && /* @__PURE__ */ o(
|
|
154
160
|
"div",
|
|
155
161
|
{
|
|
156
|
-
className:
|
|
162
|
+
className: b("shrink-0 rounded-[2px]", {
|
|
157
163
|
"h-2.5 w-2.5": e === "dot",
|
|
158
164
|
"w-1": e === "line",
|
|
159
165
|
"w-0 border-[1.5px] border-dashed bg-transparent": e === "dashed",
|
|
160
|
-
"my-0.5":
|
|
166
|
+
"my-0.5": g && e === "dashed"
|
|
161
167
|
}),
|
|
162
168
|
style: {
|
|
163
|
-
backgroundColor: e === "dashed" ? "transparent" :
|
|
164
|
-
borderColor:
|
|
169
|
+
backgroundColor: e === "dashed" ? "transparent" : L,
|
|
170
|
+
borderColor: L
|
|
165
171
|
}
|
|
166
172
|
}
|
|
167
173
|
),
|
|
168
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ y(
|
|
169
175
|
"div",
|
|
170
176
|
{
|
|
171
|
-
className:
|
|
172
|
-
"flex flex-1 justify-between leading-none",
|
|
173
|
-
|
|
177
|
+
className: b(
|
|
178
|
+
"flex flex-1 justify-between gap-2 leading-none",
|
|
179
|
+
g ? "items-end" : "items-center"
|
|
174
180
|
),
|
|
175
181
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
|
|
178
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ y("div", { className: "grid gap-1.5", children: [
|
|
183
|
+
g ? x : null,
|
|
184
|
+
/* @__PURE__ */ o(
|
|
185
|
+
"span",
|
|
186
|
+
{
|
|
187
|
+
className: "text-muted-foreground",
|
|
188
|
+
"data-slot": "chart-tooltip-item-name",
|
|
189
|
+
children: C?.label || d.name
|
|
190
|
+
}
|
|
191
|
+
)
|
|
179
192
|
] }),
|
|
180
|
-
|
|
193
|
+
R(d.value) && /* @__PURE__ */ o(
|
|
194
|
+
"span",
|
|
195
|
+
{
|
|
196
|
+
className: "text-foreground tabular-nums",
|
|
197
|
+
"data-slot": "chart-tooltip-item-value",
|
|
198
|
+
children: typeof d.value == "number" ? d.value.toLocaleString() : d.value
|
|
199
|
+
}
|
|
200
|
+
)
|
|
181
201
|
]
|
|
182
202
|
}
|
|
183
203
|
)
|
|
184
204
|
] })
|
|
185
205
|
},
|
|
186
|
-
|
|
206
|
+
d.dataKey
|
|
187
207
|
);
|
|
188
208
|
}) })
|
|
189
209
|
]
|
|
190
210
|
}
|
|
191
211
|
);
|
|
192
212
|
}
|
|
193
|
-
|
|
194
|
-
function
|
|
195
|
-
return /* @__PURE__ */
|
|
213
|
+
E.displayName = "ChartTooltipContent";
|
|
214
|
+
function Y({ ...t }) {
|
|
215
|
+
return /* @__PURE__ */ o(_.Legend, { ...t });
|
|
196
216
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
217
|
+
Y.displayName = "ChartLegend";
|
|
218
|
+
const S = k.forwardRef(
|
|
219
|
+
({
|
|
220
|
+
asChild: t = !1,
|
|
221
|
+
children: a,
|
|
222
|
+
className: s,
|
|
223
|
+
color: e,
|
|
224
|
+
dataHook: r,
|
|
225
|
+
hidden: n = !1,
|
|
226
|
+
hideIcon: i = !1,
|
|
227
|
+
muted: c = !1,
|
|
228
|
+
seriesKey: l,
|
|
229
|
+
trackingEl: f,
|
|
230
|
+
trackingLabel: h,
|
|
231
|
+
value: p,
|
|
232
|
+
...m
|
|
233
|
+
}, v) => {
|
|
234
|
+
const x = D(), g = l ? x?.config[l] : void 0, d = e ?? g?.color ?? (l ? `var(--color-${l})` : void 0), N = !!l && !e && (!x || !!x.standalone && !g?.color);
|
|
235
|
+
k.useEffect(() => {
|
|
236
|
+
process.env.NODE_ENV !== "production" && N && console.warn(
|
|
237
|
+
`ChartLegendItem: seriesKey="${l}" 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\`.`
|
|
238
|
+
);
|
|
239
|
+
}, [l, N]);
|
|
240
|
+
const u = t ? j : "div", C = a ?? g?.label ?? l;
|
|
241
|
+
return /* @__PURE__ */ y(
|
|
242
|
+
u,
|
|
243
|
+
{
|
|
244
|
+
ref: v,
|
|
245
|
+
className: b(
|
|
246
|
+
/* The focus ring is here rather than at each call site, so an
|
|
247
|
+
`asChild` button gets it without remembering to. */
|
|
248
|
+
"[&>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",
|
|
249
|
+
(c || n) && "text-muted-foreground",
|
|
250
|
+
/* text-decoration does not propagate into a nested <button>/<a>
|
|
251
|
+
(atomic inline-level boxes), so a trigger used as the label gets
|
|
252
|
+
the strike explicitly. */
|
|
253
|
+
n && "line-through [&_:is(button,a)]:line-through",
|
|
254
|
+
s
|
|
255
|
+
),
|
|
256
|
+
"data-hidden": n || void 0,
|
|
257
|
+
"data-hook": r,
|
|
258
|
+
"data-muted": c || n || void 0,
|
|
259
|
+
"data-slot": "chart-legend-item",
|
|
260
|
+
"data-tracking-el": f,
|
|
261
|
+
"data-tracking-label": h,
|
|
262
|
+
...m,
|
|
263
|
+
children: [
|
|
264
|
+
g?.icon && !i ? /* @__PURE__ */ o(g.icon, { size: 12 }) : (
|
|
265
|
+
/* A span, not a div: with `asChild` the item is often a button,
|
|
266
|
+
which only allows phrasing content. */
|
|
267
|
+
/* @__PURE__ */ o(
|
|
268
|
+
"span",
|
|
269
|
+
{
|
|
270
|
+
"aria-hidden": "true",
|
|
271
|
+
className: b(
|
|
272
|
+
"duration-fast block size-2 shrink-0 rounded-[2px] transition-opacity ease-out group-data-[size=md]/legend:size-2.5",
|
|
273
|
+
(c || n) && "opacity-40"
|
|
274
|
+
),
|
|
275
|
+
"data-slot": "chart-legend-item-swatch",
|
|
276
|
+
style: { backgroundColor: d }
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ o(O, { children: C }),
|
|
281
|
+
p != null && /* @__PURE__ */ o(
|
|
282
|
+
"span",
|
|
283
|
+
{
|
|
284
|
+
className: "ml-auto pl-0.5 tabular-nums",
|
|
285
|
+
"data-slot": "chart-legend-item-value",
|
|
286
|
+
children: /* @__PURE__ */ o("span", { className: "inline-block", children: p })
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
S.displayName = "ChartLegendItem";
|
|
295
|
+
const q = V("group/legend flex", {
|
|
296
|
+
variants: {
|
|
297
|
+
size: {
|
|
298
|
+
sm: "text-body-xs",
|
|
299
|
+
md: "text-body-sm"
|
|
300
|
+
},
|
|
301
|
+
orientation: {
|
|
302
|
+
/* Wraps: six or seven series do not fit one line on a phone, and
|
|
303
|
+
without wrapping the tail is simply clipped. */
|
|
304
|
+
horizontal: "flex-wrap items-center justify-center gap-x-4 gap-y-1",
|
|
305
|
+
/* Items stretch to the list's width so a value can sit at the far edge. */
|
|
306
|
+
vertical: "flex-col items-stretch gap-3"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
defaultVariants: {
|
|
310
|
+
orientation: "horizontal",
|
|
311
|
+
size: "sm"
|
|
312
|
+
}
|
|
313
|
+
}), A = k.forwardRef(
|
|
314
|
+
({
|
|
315
|
+
ariaLabel: t,
|
|
316
|
+
children: a,
|
|
317
|
+
className: s,
|
|
318
|
+
config: e,
|
|
319
|
+
dataHook: r,
|
|
320
|
+
orientation: n = "horizontal",
|
|
321
|
+
size: i = "sm",
|
|
322
|
+
trackingEl: c,
|
|
323
|
+
trackingLabel: l,
|
|
324
|
+
...f
|
|
325
|
+
}, h) => {
|
|
326
|
+
const p = k.useMemo(
|
|
327
|
+
() => e ? { config: e, standalone: !0 } : null,
|
|
328
|
+
[e]
|
|
329
|
+
), m = /* @__PURE__ */ o(
|
|
330
|
+
"div",
|
|
331
|
+
{
|
|
332
|
+
ref: h,
|
|
333
|
+
"aria-label": t ?? "Chart legend",
|
|
334
|
+
className: b(
|
|
335
|
+
q({ orientation: n, size: i }),
|
|
336
|
+
s
|
|
337
|
+
),
|
|
338
|
+
"data-hook": r,
|
|
339
|
+
"data-orientation": n,
|
|
340
|
+
"data-size": i,
|
|
341
|
+
"data-slot": "chart-legend-list",
|
|
342
|
+
"data-tracking-el": c,
|
|
343
|
+
"data-tracking-label": l,
|
|
344
|
+
role: "group",
|
|
345
|
+
...f,
|
|
346
|
+
children: a
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
return p ? /* @__PURE__ */ o(w.Provider, { value: p, children: m }) : m;
|
|
350
|
+
}
|
|
351
|
+
);
|
|
352
|
+
A.displayName = "ChartLegendList";
|
|
353
|
+
const F = (t) => t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
354
|
+
function H({
|
|
355
|
+
ariaLabel: t,
|
|
356
|
+
className: a,
|
|
357
|
+
dataHook: s = "chart-legend",
|
|
358
|
+
hideIcon: e = !1,
|
|
359
|
+
nameKey: r,
|
|
360
|
+
orientation: n = "horizontal",
|
|
361
|
+
payload: i,
|
|
362
|
+
renderItem: c,
|
|
363
|
+
showValue: l = !1,
|
|
364
|
+
size: f = "sm",
|
|
365
|
+
sortBy: h,
|
|
366
|
+
valueFormatter: p,
|
|
367
|
+
valueKey: m,
|
|
368
|
+
verticalAlign: v = "bottom"
|
|
204
369
|
}) {
|
|
205
|
-
const { config:
|
|
206
|
-
|
|
207
|
-
|
|
370
|
+
const { config: x } = P();
|
|
371
|
+
if (!i?.length)
|
|
372
|
+
return null;
|
|
373
|
+
const g = (u) => String(
|
|
374
|
+
u.dataKey ?? (r ? u.payload?.[r] : void 0) ?? u.value
|
|
375
|
+
), d = (u) => {
|
|
376
|
+
const C = Array.isArray(h) ? h.indexOf(g(u)) : -1;
|
|
377
|
+
return C === -1 ? Number.POSITIVE_INFINITY : C;
|
|
378
|
+
}, N = h ? [...i].sort(
|
|
379
|
+
Array.isArray(h) ? (u, C) => {
|
|
380
|
+
const L = d(u), $ = d(C);
|
|
381
|
+
return L === $ ? 0 : L - $;
|
|
382
|
+
} : h
|
|
383
|
+
) : i;
|
|
384
|
+
return /* @__PURE__ */ o(
|
|
385
|
+
A,
|
|
208
386
|
{
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
387
|
+
ariaLabel: t,
|
|
388
|
+
className: b(
|
|
389
|
+
v === "top" && "pb-4",
|
|
390
|
+
v === "bottom" && "pt-4",
|
|
391
|
+
a
|
|
213
392
|
),
|
|
214
393
|
"data-slot": "chart-legend-content",
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
394
|
+
dataHook: s,
|
|
395
|
+
orientation: n,
|
|
396
|
+
size: f,
|
|
397
|
+
children: N.map((u) => {
|
|
398
|
+
const C = g(u), L = x[C], $ = l ? p ? p(u) : u.payload?.[m ?? u.dataKey ?? "value"] : void 0, z = /* @__PURE__ */ o(
|
|
399
|
+
S,
|
|
219
400
|
{
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
{
|
|
227
|
-
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
228
|
-
style: {
|
|
229
|
-
backgroundColor: o.color
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
),
|
|
233
|
-
i?.label || o.value
|
|
234
|
-
]
|
|
401
|
+
color: u.color,
|
|
402
|
+
dataHook: `${s}-${F(C)}`,
|
|
403
|
+
hideIcon: e,
|
|
404
|
+
seriesKey: C,
|
|
405
|
+
value: $,
|
|
406
|
+
children: L?.label || u.value
|
|
235
407
|
},
|
|
236
|
-
|
|
408
|
+
u.value
|
|
237
409
|
);
|
|
410
|
+
return c ? /* @__PURE__ */ o(k.Fragment, { children: c(u, z) }, u.value) : z;
|
|
238
411
|
})
|
|
239
412
|
}
|
|
240
|
-
)
|
|
413
|
+
);
|
|
241
414
|
}
|
|
242
|
-
|
|
243
|
-
function
|
|
244
|
-
colorKey:
|
|
245
|
-
color:
|
|
246
|
-
fill:
|
|
415
|
+
H.displayName = "ChartLegendContent";
|
|
416
|
+
function I({
|
|
417
|
+
colorKey: t,
|
|
418
|
+
color: a,
|
|
419
|
+
fill: s,
|
|
247
420
|
stroke: e,
|
|
248
|
-
payload:
|
|
421
|
+
payload: r
|
|
249
422
|
}) {
|
|
250
|
-
return (
|
|
423
|
+
return (t && typeof r?.[t] == "string" ? r[t] : void 0) ?? a ?? s ?? e ?? "currentColor";
|
|
251
424
|
}
|
|
252
|
-
function
|
|
253
|
-
size:
|
|
254
|
-
custom:
|
|
255
|
-
color:
|
|
425
|
+
function X({
|
|
426
|
+
size: t = 8,
|
|
427
|
+
custom: a = !1,
|
|
428
|
+
color: s,
|
|
256
429
|
colorKey: e,
|
|
257
|
-
cx:
|
|
258
|
-
cy:
|
|
259
|
-
stroke:
|
|
260
|
-
fill:
|
|
261
|
-
payload:
|
|
430
|
+
cx: r,
|
|
431
|
+
cy: n,
|
|
432
|
+
stroke: i,
|
|
433
|
+
fill: c,
|
|
434
|
+
payload: l
|
|
262
435
|
}) {
|
|
263
|
-
if (
|
|
436
|
+
if (r == null || n == null)
|
|
264
437
|
return null;
|
|
265
|
-
const
|
|
438
|
+
const f = I({
|
|
266
439
|
colorKey: e,
|
|
267
|
-
color:
|
|
268
|
-
fill:
|
|
269
|
-
stroke:
|
|
270
|
-
payload:
|
|
440
|
+
color: s,
|
|
441
|
+
fill: c,
|
|
442
|
+
stroke: i,
|
|
443
|
+
payload: l
|
|
271
444
|
});
|
|
272
|
-
return /* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ o(
|
|
273
446
|
"circle",
|
|
274
447
|
{
|
|
275
|
-
className:
|
|
276
|
-
cx:
|
|
277
|
-
cy:
|
|
448
|
+
className: a ? "fill-background" : void 0,
|
|
449
|
+
cx: r,
|
|
450
|
+
cy: n,
|
|
278
451
|
"data-slot": "chart-dot",
|
|
279
|
-
fill:
|
|
280
|
-
r:
|
|
281
|
-
stroke:
|
|
282
|
-
strokeWidth:
|
|
452
|
+
fill: a ? void 0 : f,
|
|
453
|
+
r: t / 2,
|
|
454
|
+
stroke: a ? f : "none",
|
|
455
|
+
strokeWidth: a ? 2 : void 0
|
|
283
456
|
}
|
|
284
457
|
);
|
|
285
458
|
}
|
|
286
|
-
|
|
287
|
-
function
|
|
288
|
-
size:
|
|
289
|
-
color:
|
|
290
|
-
colorKey:
|
|
459
|
+
X.displayName = "ChartDot";
|
|
460
|
+
function J({
|
|
461
|
+
size: t = 6,
|
|
462
|
+
color: a,
|
|
463
|
+
colorKey: s,
|
|
291
464
|
cx: e,
|
|
292
|
-
cy:
|
|
293
|
-
stroke:
|
|
294
|
-
fill:
|
|
295
|
-
payload:
|
|
465
|
+
cy: r,
|
|
466
|
+
stroke: n,
|
|
467
|
+
fill: i,
|
|
468
|
+
payload: c
|
|
296
469
|
}) {
|
|
297
|
-
if (e == null ||
|
|
470
|
+
if (e == null || r == null)
|
|
298
471
|
return null;
|
|
299
|
-
const
|
|
300
|
-
colorKey:
|
|
301
|
-
color:
|
|
302
|
-
fill:
|
|
303
|
-
stroke:
|
|
304
|
-
payload:
|
|
472
|
+
const l = I({
|
|
473
|
+
colorKey: s,
|
|
474
|
+
color: a,
|
|
475
|
+
fill: i,
|
|
476
|
+
stroke: n,
|
|
477
|
+
payload: c
|
|
305
478
|
});
|
|
306
|
-
return /* @__PURE__ */
|
|
479
|
+
return /* @__PURE__ */ o(
|
|
307
480
|
"circle",
|
|
308
481
|
{
|
|
309
482
|
className: "stroke-background",
|
|
310
483
|
cx: e,
|
|
311
|
-
cy:
|
|
484
|
+
cy: r,
|
|
312
485
|
"data-slot": "chart-dot-on-stroke",
|
|
313
|
-
fill:
|
|
314
|
-
r:
|
|
486
|
+
fill: l,
|
|
487
|
+
r: t / 2,
|
|
315
488
|
strokeWidth: 2
|
|
316
489
|
}
|
|
317
490
|
);
|
|
318
491
|
}
|
|
319
|
-
|
|
320
|
-
function
|
|
321
|
-
type:
|
|
322
|
-
filled:
|
|
323
|
-
fillColor:
|
|
492
|
+
J.displayName = "ChartDotOnStroke";
|
|
493
|
+
function Q({
|
|
494
|
+
type: t = "default",
|
|
495
|
+
filled: a = !1,
|
|
496
|
+
fillColor: s = "var(--chart-teal)",
|
|
324
497
|
fillOpacity: e = 0.2,
|
|
325
|
-
boundaryOnly:
|
|
326
|
-
radialLines:
|
|
327
|
-
className:
|
|
328
|
-
...
|
|
498
|
+
boundaryOnly: r = !1,
|
|
499
|
+
radialLines: n,
|
|
500
|
+
className: i,
|
|
501
|
+
...c
|
|
329
502
|
}) {
|
|
330
|
-
const
|
|
331
|
-
return
|
|
332
|
-
|
|
503
|
+
const l = t === "circle" ? "circle" : "polygon", h = r ? `[&_.${l === "circle" ? "recharts-polar-grid-concentric-circle" : "recharts-polar-grid-concentric-polygon"}:not(:last-of-type)]:stroke-transparent` : void 0;
|
|
504
|
+
return a ? /* @__PURE__ */ o(
|
|
505
|
+
_.PolarGrid,
|
|
333
506
|
{
|
|
334
|
-
className:
|
|
335
|
-
fill:
|
|
507
|
+
className: b(h, i),
|
|
508
|
+
fill: s,
|
|
336
509
|
fillOpacity: e,
|
|
337
|
-
gridType:
|
|
338
|
-
radialLines:
|
|
510
|
+
gridType: l,
|
|
511
|
+
radialLines: n ?? !1,
|
|
339
512
|
stroke: "none",
|
|
340
|
-
...
|
|
513
|
+
...c
|
|
341
514
|
}
|
|
342
|
-
) : /* @__PURE__ */
|
|
343
|
-
|
|
515
|
+
) : /* @__PURE__ */ o(
|
|
516
|
+
_.PolarGrid,
|
|
344
517
|
{
|
|
345
|
-
className:
|
|
346
|
-
gridType:
|
|
347
|
-
radialLines:
|
|
348
|
-
...
|
|
518
|
+
className: b(h, i),
|
|
519
|
+
gridType: l,
|
|
520
|
+
radialLines: n,
|
|
521
|
+
...c
|
|
349
522
|
}
|
|
350
523
|
);
|
|
351
524
|
}
|
|
352
|
-
|
|
353
|
-
function
|
|
354
|
-
type:
|
|
355
|
-
data:
|
|
356
|
-
primaryKey:
|
|
525
|
+
Q.displayName = "ChartRadarGrid";
|
|
526
|
+
function U({
|
|
527
|
+
type: t = "default",
|
|
528
|
+
data: a,
|
|
529
|
+
primaryKey: s,
|
|
357
530
|
secondaryKey: e,
|
|
358
|
-
x:
|
|
359
|
-
y:
|
|
360
|
-
textAnchor:
|
|
361
|
-
payload:
|
|
362
|
-
index:
|
|
531
|
+
x: r,
|
|
532
|
+
y: n,
|
|
533
|
+
textAnchor: i,
|
|
534
|
+
payload: c,
|
|
535
|
+
index: l
|
|
363
536
|
}) {
|
|
364
|
-
const
|
|
365
|
-
return /* @__PURE__ */
|
|
537
|
+
const f = a != null && l != null ? a[l] : void 0, h = f && s != null ? f[s] : void 0, p = f && e != null ? f[e] : void 0, m = t === "default" && h != null ? p != null ? `${String(h)}/${String(p)}` : String(h) : null;
|
|
538
|
+
return /* @__PURE__ */ y(
|
|
366
539
|
"text",
|
|
367
540
|
{
|
|
368
541
|
className: "text-body-xs",
|
|
369
542
|
"data-slot": "chart-radar-label-wrapper",
|
|
370
|
-
textAnchor:
|
|
371
|
-
x:
|
|
372
|
-
y:
|
|
543
|
+
textAnchor: i,
|
|
544
|
+
x: r,
|
|
545
|
+
y: n,
|
|
373
546
|
children: [
|
|
374
|
-
m != null && /* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
547
|
+
m != null && /* @__PURE__ */ o("tspan", { className: "fill-card-foreground", dy: "-0.5em", x: r, children: m }),
|
|
548
|
+
/* @__PURE__ */ o(
|
|
376
549
|
"tspan",
|
|
377
550
|
{
|
|
378
551
|
className: "fill-muted-foreground",
|
|
379
552
|
dy: m != null ? "1.2em" : void 0,
|
|
380
|
-
x:
|
|
381
|
-
children:
|
|
553
|
+
x: r,
|
|
554
|
+
children: c?.value
|
|
382
555
|
}
|
|
383
556
|
)
|
|
384
557
|
]
|
|
385
558
|
}
|
|
386
559
|
);
|
|
387
560
|
}
|
|
388
|
-
|
|
389
|
-
function
|
|
390
|
-
nameKey:
|
|
391
|
-
config:
|
|
392
|
-
radiusRatio:
|
|
561
|
+
U.displayName = "ChartRadarLabelWrapper";
|
|
562
|
+
function Z({
|
|
563
|
+
nameKey: t,
|
|
564
|
+
config: a,
|
|
565
|
+
radiusRatio: s = 0.5,
|
|
393
566
|
cx: e,
|
|
394
|
-
cy:
|
|
395
|
-
midAngle:
|
|
396
|
-
innerRadius:
|
|
397
|
-
outerRadius:
|
|
398
|
-
payload:
|
|
399
|
-
name:
|
|
567
|
+
cy: r,
|
|
568
|
+
midAngle: n = 0,
|
|
569
|
+
innerRadius: i = 0,
|
|
570
|
+
outerRadius: c = 0,
|
|
571
|
+
payload: l,
|
|
572
|
+
name: f
|
|
400
573
|
}) {
|
|
401
|
-
if (e == null ||
|
|
574
|
+
if (e == null || r == null)
|
|
402
575
|
return null;
|
|
403
|
-
const h = Math.PI / 180,
|
|
404
|
-
return /* @__PURE__ */
|
|
576
|
+
const h = Math.PI / 180, p = i + (c - i) * s, m = e + p * Math.cos(-n * h), v = r + p * Math.sin(-n * h), x = t != null && l != null ? l[t] : void 0, g = x != null ? String(x) : f, d = g != null ? a?.[g]?.label ?? g : g;
|
|
577
|
+
return /* @__PURE__ */ o(
|
|
405
578
|
"text",
|
|
406
579
|
{
|
|
407
580
|
className: "fill-foreground text-body-xs",
|
|
@@ -409,123 +582,125 @@ function B({
|
|
|
409
582
|
dominantBaseline: "middle",
|
|
410
583
|
textAnchor: "middle",
|
|
411
584
|
x: m,
|
|
412
|
-
y:
|
|
413
|
-
children:
|
|
585
|
+
y: v,
|
|
586
|
+
children: d
|
|
414
587
|
}
|
|
415
588
|
);
|
|
416
589
|
}
|
|
417
|
-
|
|
418
|
-
function
|
|
419
|
-
valueKey:
|
|
420
|
-
x:
|
|
421
|
-
y:
|
|
590
|
+
Z.displayName = "ChartPieLabelList";
|
|
591
|
+
function B({
|
|
592
|
+
valueKey: t,
|
|
593
|
+
x: a,
|
|
594
|
+
y: s,
|
|
422
595
|
textAnchor: e,
|
|
423
|
-
payload:
|
|
424
|
-
value:
|
|
596
|
+
payload: r,
|
|
597
|
+
value: n
|
|
425
598
|
}) {
|
|
426
|
-
if (
|
|
599
|
+
if (a == null || s == null)
|
|
427
600
|
return null;
|
|
428
|
-
const
|
|
429
|
-
return /* @__PURE__ */
|
|
601
|
+
const i = t != null && r != null ? r[t] : n;
|
|
602
|
+
return /* @__PURE__ */ o(
|
|
430
603
|
"text",
|
|
431
604
|
{
|
|
432
605
|
className: "fill-foreground text-body-xs",
|
|
433
606
|
"data-slot": "chart-pie-label-wrapper",
|
|
434
607
|
dominantBaseline: "middle",
|
|
435
608
|
textAnchor: e,
|
|
436
|
-
x:
|
|
437
|
-
y:
|
|
438
|
-
children:
|
|
609
|
+
x: a,
|
|
610
|
+
y: s,
|
|
611
|
+
children: i
|
|
439
612
|
}
|
|
440
613
|
);
|
|
441
614
|
}
|
|
442
|
-
|
|
443
|
-
const
|
|
615
|
+
B.displayName = "ChartPieLabelWrapper";
|
|
616
|
+
const K = {
|
|
444
617
|
"2xl": "text-metric",
|
|
445
618
|
"3xl": "font-sans text-3xl font-semibold",
|
|
446
619
|
"4xl": "font-sans text-4xl font-semibold"
|
|
447
620
|
};
|
|
448
|
-
function
|
|
449
|
-
primary:
|
|
450
|
-
secondary:
|
|
451
|
-
size:
|
|
621
|
+
function ee({
|
|
622
|
+
primary: t,
|
|
623
|
+
secondary: a,
|
|
624
|
+
size: s = "3xl",
|
|
452
625
|
viewBox: e
|
|
453
626
|
}) {
|
|
454
627
|
if (e == null || typeof e != "object" || !("cx" in e) || !("cy" in e))
|
|
455
628
|
return null;
|
|
456
|
-
const { cx:
|
|
457
|
-
return /* @__PURE__ */
|
|
629
|
+
const { cx: r, cy: n } = e;
|
|
630
|
+
return /* @__PURE__ */ y(
|
|
458
631
|
"text",
|
|
459
632
|
{
|
|
460
633
|
"data-slot": "chart-center-label",
|
|
461
634
|
dominantBaseline: "middle",
|
|
462
635
|
textAnchor: "middle",
|
|
463
|
-
x:
|
|
464
|
-
y:
|
|
636
|
+
x: r,
|
|
637
|
+
y: n,
|
|
465
638
|
children: [
|
|
466
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ o(
|
|
467
640
|
"tspan",
|
|
468
641
|
{
|
|
469
|
-
className:
|
|
470
|
-
x:
|
|
471
|
-
y:
|
|
472
|
-
children:
|
|
642
|
+
className: b("fill-foreground", K[s]),
|
|
643
|
+
x: r,
|
|
644
|
+
y: n,
|
|
645
|
+
children: t
|
|
473
646
|
}
|
|
474
647
|
),
|
|
475
|
-
|
|
648
|
+
a != null && /* @__PURE__ */ o(
|
|
476
649
|
"tspan",
|
|
477
650
|
{
|
|
478
651
|
className: "fill-muted-foreground text-body-xs",
|
|
479
|
-
x:
|
|
480
|
-
y:
|
|
481
|
-
children:
|
|
652
|
+
x: r,
|
|
653
|
+
y: n + 24,
|
|
654
|
+
children: a
|
|
482
655
|
}
|
|
483
656
|
)
|
|
484
657
|
]
|
|
485
658
|
}
|
|
486
659
|
);
|
|
487
660
|
}
|
|
488
|
-
|
|
661
|
+
ee.displayName = "ChartCenterLabel";
|
|
489
662
|
export {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
663
|
+
se as Area,
|
|
664
|
+
ie as AreaChart,
|
|
665
|
+
ce as Bar,
|
|
666
|
+
de as BarChart,
|
|
667
|
+
ue as CartesianGrid,
|
|
668
|
+
he as Cell,
|
|
669
|
+
ee as ChartCenterLabel,
|
|
670
|
+
W as ChartContainer,
|
|
671
|
+
X as ChartDot,
|
|
672
|
+
J as ChartDotOnStroke,
|
|
673
|
+
fe as ChartLabel,
|
|
674
|
+
Y as ChartLegend,
|
|
675
|
+
H as ChartLegendContent,
|
|
676
|
+
S as ChartLegendItem,
|
|
677
|
+
A as ChartLegendList,
|
|
678
|
+
Z as ChartPieLabelList,
|
|
679
|
+
B as ChartPieLabelWrapper,
|
|
680
|
+
Q as ChartRadarGrid,
|
|
681
|
+
U as ChartRadarLabelWrapper,
|
|
682
|
+
G as ChartStyle,
|
|
683
|
+
M as ChartTooltip,
|
|
684
|
+
E as ChartTooltipContent,
|
|
685
|
+
ge as ChartsLegend,
|
|
686
|
+
pe as ChartsTooltip,
|
|
687
|
+
me as Customized,
|
|
688
|
+
Ce as LabelList,
|
|
689
|
+
be as Line,
|
|
690
|
+
ve as LineChart,
|
|
691
|
+
xe as Pie,
|
|
692
|
+
ke as PieChart,
|
|
693
|
+
Ne as PolarAngleAxis,
|
|
694
|
+
ye as PolarGrid,
|
|
695
|
+
Le as PolarRadiusAxis,
|
|
696
|
+
_e as Radar,
|
|
697
|
+
$e as RadarChart,
|
|
698
|
+
we as RadialBar,
|
|
699
|
+
ze as RadialBarChart,
|
|
700
|
+
Re as Rectangle,
|
|
701
|
+
Pe as ReferenceLine,
|
|
702
|
+
Se as ResponsiveContainer,
|
|
703
|
+
Ae as Sector,
|
|
704
|
+
Ie as XAxis,
|
|
705
|
+
Te as YAxis
|
|
531
706
|
};
|