@brightlocal/ui-components 2.22.0 → 2.24.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 +1 -1
- package/README.md +4 -2
- package/component-meta.json +134 -25
- package/deprecations.json +22 -0
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +32 -35
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +151 -156
- package/dist/brand-illustration-motif.cjs +1 -0
- package/dist/brand-illustration-motif.d.ts +55 -0
- package/dist/brand-illustration-motif.d.ts.map +1 -0
- package/dist/brand-illustration-motif.js +67 -0
- package/dist/chart.cjs +7 -7
- package/dist/chart.d.ts +287 -2
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +408 -152
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +14 -1
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +387 -376
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +111 -109
- package/dist/data-table.cjs +1 -0
- package/dist/{blocks/data-table.d.ts → data-table.d.ts} +159 -4
- package/dist/data-table.d.ts.map +1 -0
- package/dist/data-table.js +721 -0
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +109 -121
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +16 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +23 -7
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +32 -2
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +179 -109
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +526 -509
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +9 -0
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +26 -22
- package/dist/lib/spring-settle.cjs +1 -0
- package/dist/lib/spring-settle.d.ts +20 -0
- package/dist/lib/spring-settle.d.ts.map +1 -0
- package/dist/lib/spring-settle.js +4 -0
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +3 -2
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +22 -11
- package/dist/loading.cjs +1 -0
- package/dist/loading.d.ts +47 -0
- package/dist/loading.d.ts.map +1 -0
- package/dist/loading.js +163 -0
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +1 -1
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +97 -99
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +27 -26
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +16 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +112 -85
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +29 -0
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +2 -2
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +236 -219
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +21 -2
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +35 -32
- package/dist/typography.cjs +1 -1
- package/dist/typography.d.ts +20 -4
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +263 -228
- package/package.json +7 -7
- package/src/blocks/sidebar.tsx +11 -23
- package/src/components/alert.tsx +10 -17
- package/src/components/brand-illustration-motif.tsx +143 -0
- package/src/components/chart.tsx +632 -1
- package/src/components/combobox.tsx +47 -0
- package/src/components/context-menu.tsx +8 -3
- package/src/{blocks → components}/data-table.tsx +272 -18
- package/src/components/dropdown-menu.tsx +6 -15
- package/src/components/field.tsx +31 -0
- package/src/components/global-layout.tsx +144 -5
- package/src/components/label.tsx +13 -1
- package/src/components/link.tsx +13 -1
- package/src/components/loading.tsx +355 -0
- package/src/components/map.tsx +3 -1
- package/src/components/menubar.tsx +6 -5
- package/src/components/popover.tsx +6 -2
- package/src/components/select.tsx +87 -10
- package/src/components/table.tsx +31 -2
- package/src/components/text-reveal-motion.tsx +90 -64
- package/src/components/tooltip.tsx +28 -3
- package/src/components/typography.tsx +74 -18
- package/src/index.ts +3 -1
- package/src/lib/spring-settle.ts +19 -0
- package/dist/blocks/data-table.cjs +0 -1
- package/dist/blocks/data-table.d.ts.map +0 -1
- package/dist/blocks/data-table.js +0 -654
package/dist/chart.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as x, jsx as s, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import * as k from "react";
|
|
3
3
|
import * as N from "recharts";
|
|
4
|
-
import { Area as
|
|
5
|
-
import { cn as
|
|
6
|
-
const $ =
|
|
7
|
-
function
|
|
8
|
-
const n =
|
|
4
|
+
import { Area as J, AreaChart as Q, Bar as U, BarChart as Z, CartesianGrid as F, Cell as K, Label as ee, Legend as re, Tooltip as te, Customized as ne, LabelList as ae, Line as le, LineChart as oe, Pie as se, PieChart as ie, PolarAngleAxis as ce, PolarGrid as de, PolarRadiusAxis as ue, Radar as he, RadarChart as fe, RadialBar as pe, RadialBarChart as me, Rectangle as ge, ReferenceLine as Ce, ResponsiveContainer as xe, Sector as ve, XAxis as be, YAxis as ke } from "recharts";
|
|
5
|
+
import { cn as p } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
const $ = k.createContext(null);
|
|
7
|
+
function P() {
|
|
8
|
+
const n = k.useContext($);
|
|
9
9
|
if (!n)
|
|
10
10
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
11
11
|
return n;
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const S = k.forwardRef(
|
|
14
14
|
({
|
|
15
15
|
id: n,
|
|
16
|
-
className:
|
|
16
|
+
className: r,
|
|
17
17
|
children: l,
|
|
18
|
-
config:
|
|
19
|
-
dataHook:
|
|
20
|
-
width:
|
|
18
|
+
config: e,
|
|
19
|
+
dataHook: t,
|
|
20
|
+
width: a,
|
|
21
21
|
height: o,
|
|
22
|
-
minWidth:
|
|
23
|
-
minHeight:
|
|
24
|
-
maxHeight:
|
|
25
|
-
trackingEl:
|
|
26
|
-
trackingLabel:
|
|
27
|
-
...
|
|
28
|
-
},
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
22
|
+
minWidth: d,
|
|
23
|
+
minHeight: i,
|
|
24
|
+
maxHeight: u,
|
|
25
|
+
trackingEl: h,
|
|
26
|
+
trackingLabel: g,
|
|
27
|
+
...m
|
|
28
|
+
}, C) => {
|
|
29
|
+
const v = k.useId(), f = `chart-${n || v.replace(/:/g, "")}`;
|
|
30
|
+
return /* @__PURE__ */ s($.Provider, { value: { config: e }, children: /* @__PURE__ */ x(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
|
-
ref:
|
|
34
|
-
className:
|
|
35
|
-
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-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 flex aspect-video justify-center text-xs [&_.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
|
-
|
|
33
|
+
ref: C,
|
|
34
|
+
className: p(
|
|
35
|
+
"[&_.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 flex aspect-video justify-center text-xs [&_.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
|
+
r
|
|
37
37
|
),
|
|
38
|
-
"data-chart":
|
|
39
|
-
"data-hook":
|
|
38
|
+
"data-chart": f,
|
|
39
|
+
"data-hook": t,
|
|
40
40
|
"data-slot": "chart-container",
|
|
41
|
-
"data-tracking-el":
|
|
42
|
-
"data-tracking-label":
|
|
43
|
-
...
|
|
41
|
+
"data-tracking-el": h,
|
|
42
|
+
"data-tracking-label": g,
|
|
43
|
+
...m,
|
|
44
44
|
children: [
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ s(j, { config: e, id: f }),
|
|
46
|
+
/* @__PURE__ */ s(
|
|
47
47
|
N.ResponsiveContainer,
|
|
48
48
|
{
|
|
49
49
|
height: o ?? "100%",
|
|
50
50
|
initialDimension: { width: 1, height: 1 },
|
|
51
|
-
maxHeight:
|
|
52
|
-
minHeight:
|
|
53
|
-
minWidth:
|
|
54
|
-
width:
|
|
51
|
+
maxHeight: u,
|
|
52
|
+
minHeight: i,
|
|
53
|
+
minWidth: d ?? 0,
|
|
54
|
+
width: a ?? "100%",
|
|
55
55
|
children: l
|
|
56
56
|
}
|
|
57
57
|
)
|
|
@@ -60,25 +60,25 @@ const j = C.forwardRef(
|
|
|
60
60
|
) });
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
|
|
64
|
-
function
|
|
65
|
-
const l = Object.entries(
|
|
66
|
-
([,
|
|
63
|
+
S.displayName = "ChartContainer";
|
|
64
|
+
function j({ id: n, config: r }) {
|
|
65
|
+
const l = Object.entries(r).filter(
|
|
66
|
+
([, e]) => e.theme || e.color
|
|
67
67
|
);
|
|
68
|
-
return l.length ? /* @__PURE__ */
|
|
68
|
+
return l.length ? /* @__PURE__ */ s(
|
|
69
69
|
"style",
|
|
70
70
|
{
|
|
71
71
|
dangerouslySetInnerHTML: {
|
|
72
|
-
__html: l.map(([
|
|
73
|
-
const
|
|
74
|
-
return
|
|
72
|
+
__html: l.map(([e, t]) => {
|
|
73
|
+
const a = typeof t.color == "string" ? t.color.replace(/^hsl\((.*)\)$/, "$1") : null;
|
|
74
|
+
return a ? `
|
|
75
75
|
[data-chart=${n}] {
|
|
76
|
-
--color-${
|
|
76
|
+
--color-${e}: ${a};
|
|
77
77
|
}
|
|
78
|
-
` :
|
|
79
|
-
([o,
|
|
78
|
+
` : t.theme ? Object.entries(t.theme).map(
|
|
79
|
+
([o, d]) => `
|
|
80
80
|
.${o} [data-chart=${n}] {
|
|
81
|
-
--color-${
|
|
81
|
+
--color-${e}: ${d.replace(/^hsl\((.*)\)$/, "$1")};
|
|
82
82
|
}
|
|
83
83
|
`
|
|
84
84
|
).join("") : "";
|
|
@@ -88,137 +88,137 @@ function T({ id: n, config: a }) {
|
|
|
88
88
|
}
|
|
89
89
|
) : null;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
return /* @__PURE__ */
|
|
91
|
+
function T({ ...n }) {
|
|
92
|
+
return /* @__PURE__ */ s(N.Tooltip, { ...n });
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
function
|
|
94
|
+
T.displayName = "ChartTooltip";
|
|
95
|
+
function A({
|
|
96
96
|
active: n,
|
|
97
|
-
payload:
|
|
97
|
+
payload: r,
|
|
98
98
|
className: l,
|
|
99
|
-
indicator:
|
|
100
|
-
hideLabel:
|
|
101
|
-
hideIndicator:
|
|
99
|
+
indicator: e = "dot",
|
|
100
|
+
hideLabel: t = !1,
|
|
101
|
+
hideIndicator: a = !1,
|
|
102
102
|
label: o,
|
|
103
|
-
labelFormatter:
|
|
104
|
-
labelClassName:
|
|
105
|
-
formatter:
|
|
106
|
-
color:
|
|
107
|
-
nameKey:
|
|
108
|
-
labelKey:
|
|
103
|
+
labelFormatter: d,
|
|
104
|
+
labelClassName: i,
|
|
105
|
+
formatter: u,
|
|
106
|
+
color: h,
|
|
107
|
+
nameKey: g,
|
|
108
|
+
labelKey: m
|
|
109
109
|
}) {
|
|
110
|
-
const { config:
|
|
111
|
-
if (
|
|
110
|
+
const { config: C } = P(), v = k.useMemo(() => {
|
|
111
|
+
if (t || !r?.length)
|
|
112
112
|
return null;
|
|
113
|
-
const [
|
|
114
|
-
if (!
|
|
113
|
+
const [c] = r;
|
|
114
|
+
if (!c)
|
|
115
115
|
return null;
|
|
116
|
-
const
|
|
117
|
-
return
|
|
116
|
+
const y = `${m || c.dataKey || c.name || "value"}`, L = C[y], b = !m && typeof o == "string" ? C[o]?.label || o : L?.label;
|
|
117
|
+
return d ? /* @__PURE__ */ s("div", { className: p("font-medium", i), children: d(b, r) }) : b ? /* @__PURE__ */ s("div", { className: p("font-medium", i), children: b }) : null;
|
|
118
118
|
}, [
|
|
119
119
|
o,
|
|
120
|
-
i,
|
|
121
|
-
a,
|
|
122
|
-
s,
|
|
123
120
|
d,
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
r,
|
|
122
|
+
t,
|
|
123
|
+
i,
|
|
124
|
+
C,
|
|
125
|
+
m
|
|
126
126
|
]);
|
|
127
|
-
if (!n || !
|
|
127
|
+
if (!n || !r?.length)
|
|
128
128
|
return null;
|
|
129
|
-
const
|
|
130
|
-
return /* @__PURE__ */
|
|
129
|
+
const f = r.length === 1 && e !== "dot";
|
|
130
|
+
return /* @__PURE__ */ x(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
|
-
className:
|
|
133
|
+
className: p(
|
|
134
134
|
"border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
135
135
|
l
|
|
136
136
|
),
|
|
137
137
|
"data-slot": "chart-tooltip-content",
|
|
138
138
|
children: [
|
|
139
|
-
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
const
|
|
142
|
-
return /* @__PURE__ */
|
|
139
|
+
f ? null : v,
|
|
140
|
+
/* @__PURE__ */ s("div", { className: "grid gap-1.5", children: r.map((c, y) => {
|
|
141
|
+
const L = `${g || c.name || c.dataKey || "value"}`, b = C[L], _ = h || c.color || c.payload.fill || `var(--color-${L})`;
|
|
142
|
+
return /* @__PURE__ */ s(
|
|
143
143
|
"div",
|
|
144
144
|
{
|
|
145
|
-
className:
|
|
145
|
+
className: p(
|
|
146
146
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",
|
|
147
|
-
|
|
147
|
+
e === "dot" && "items-center"
|
|
148
148
|
),
|
|
149
|
-
children:
|
|
150
|
-
|
|
149
|
+
children: u && c?.value !== void 0 && c.name ? u(c.value, c.name, c, y, r) : /* @__PURE__ */ x(w, { children: [
|
|
150
|
+
b?.icon && !a ? /* @__PURE__ */ s(b.icon, { size: 10 }) : !a && /* @__PURE__ */ s(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
153
|
-
className:
|
|
154
|
-
"h-2.5 w-2.5":
|
|
155
|
-
"w-1":
|
|
156
|
-
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
157
|
-
"my-0.5":
|
|
153
|
+
className: p("shrink-0 rounded-[2px]", {
|
|
154
|
+
"h-2.5 w-2.5": e === "dot",
|
|
155
|
+
"w-1": e === "line",
|
|
156
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": e === "dashed",
|
|
157
|
+
"my-0.5": f && e === "dashed"
|
|
158
158
|
}),
|
|
159
159
|
style: {
|
|
160
|
-
backgroundColor:
|
|
161
|
-
borderColor:
|
|
160
|
+
backgroundColor: e === "dashed" ? "transparent" : _,
|
|
161
|
+
borderColor: _
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
),
|
|
165
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ x(
|
|
166
166
|
"div",
|
|
167
167
|
{
|
|
168
|
-
className:
|
|
168
|
+
className: p(
|
|
169
169
|
"flex flex-1 justify-between leading-none",
|
|
170
|
-
|
|
170
|
+
f ? "items-end" : "items-center"
|
|
171
171
|
),
|
|
172
172
|
children: [
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
|
|
175
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ x("div", { className: "grid gap-1.5", children: [
|
|
174
|
+
f ? v : null,
|
|
175
|
+
/* @__PURE__ */ s("span", { className: "text-muted-foreground", children: b?.label || c.name })
|
|
176
176
|
] }),
|
|
177
|
-
|
|
177
|
+
c.value && /* @__PURE__ */ s("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof c.value == "number" ? c.value.toLocaleString() : c.value })
|
|
178
178
|
]
|
|
179
179
|
}
|
|
180
180
|
)
|
|
181
181
|
] })
|
|
182
182
|
},
|
|
183
|
-
|
|
183
|
+
c.dataKey
|
|
184
184
|
);
|
|
185
185
|
}) })
|
|
186
186
|
]
|
|
187
187
|
}
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
192
|
-
return /* @__PURE__ */
|
|
190
|
+
A.displayName = "ChartTooltipContent";
|
|
191
|
+
function W({ ...n }) {
|
|
192
|
+
return /* @__PURE__ */ s(N.Legend, { ...n });
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
function
|
|
194
|
+
W.displayName = "ChartLegend";
|
|
195
|
+
function D({
|
|
196
196
|
className: n,
|
|
197
|
-
hideIcon:
|
|
197
|
+
hideIcon: r = !1,
|
|
198
198
|
payload: l,
|
|
199
|
-
verticalAlign:
|
|
200
|
-
nameKey:
|
|
199
|
+
verticalAlign: e = "bottom",
|
|
200
|
+
nameKey: t
|
|
201
201
|
}) {
|
|
202
|
-
const { config:
|
|
203
|
-
return l?.length ? /* @__PURE__ */
|
|
202
|
+
const { config: a } = P();
|
|
203
|
+
return l?.length ? /* @__PURE__ */ s(
|
|
204
204
|
"div",
|
|
205
205
|
{
|
|
206
|
-
className:
|
|
206
|
+
className: p(
|
|
207
207
|
"flex items-center justify-center gap-4",
|
|
208
|
-
|
|
208
|
+
e === "top" ? "pb-4" : "pt-4",
|
|
209
209
|
n
|
|
210
210
|
),
|
|
211
211
|
"data-slot": "chart-legend-content",
|
|
212
212
|
children: l.map((o) => {
|
|
213
|
-
const
|
|
214
|
-
return /* @__PURE__ */
|
|
213
|
+
const d = `${t || o.dataKey || "value"}`, i = a[d];
|
|
214
|
+
return /* @__PURE__ */ x(
|
|
215
215
|
"div",
|
|
216
216
|
{
|
|
217
|
-
className:
|
|
217
|
+
className: p(
|
|
218
218
|
"[&>svg]:text-muted-foreground flex items-center gap-1.5"
|
|
219
219
|
),
|
|
220
220
|
children: [
|
|
221
|
-
|
|
221
|
+
i?.icon && !r ? /* @__PURE__ */ s(i.icon, { size: 12 }) : /* @__PURE__ */ s(
|
|
222
222
|
"div",
|
|
223
223
|
{
|
|
224
224
|
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
@@ -227,7 +227,7 @@ function S({
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
),
|
|
230
|
-
|
|
230
|
+
i?.label || o.value
|
|
231
231
|
]
|
|
232
232
|
},
|
|
233
233
|
o.value
|
|
@@ -236,40 +236,296 @@ function S({
|
|
|
236
236
|
}
|
|
237
237
|
) : null;
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
D.displayName = "ChartLegendContent";
|
|
240
|
+
function R({
|
|
241
|
+
colorKey: n,
|
|
242
|
+
color: r,
|
|
243
|
+
fill: l,
|
|
244
|
+
stroke: e,
|
|
245
|
+
payload: t
|
|
246
|
+
}) {
|
|
247
|
+
return (n && typeof t?.[n] == "string" ? t[n] : void 0) ?? r ?? l ?? e ?? "currentColor";
|
|
248
|
+
}
|
|
249
|
+
function G({
|
|
250
|
+
size: n = 8,
|
|
251
|
+
custom: r = !1,
|
|
252
|
+
color: l,
|
|
253
|
+
colorKey: e,
|
|
254
|
+
cx: t,
|
|
255
|
+
cy: a,
|
|
256
|
+
stroke: o,
|
|
257
|
+
fill: d,
|
|
258
|
+
payload: i
|
|
259
|
+
}) {
|
|
260
|
+
if (t == null || a == null)
|
|
261
|
+
return null;
|
|
262
|
+
const u = R({
|
|
263
|
+
colorKey: e,
|
|
264
|
+
color: l,
|
|
265
|
+
fill: d,
|
|
266
|
+
stroke: o,
|
|
267
|
+
payload: i
|
|
268
|
+
});
|
|
269
|
+
return /* @__PURE__ */ s(
|
|
270
|
+
"circle",
|
|
271
|
+
{
|
|
272
|
+
className: r ? "fill-background" : void 0,
|
|
273
|
+
cx: t,
|
|
274
|
+
cy: a,
|
|
275
|
+
"data-slot": "chart-dot",
|
|
276
|
+
fill: r ? void 0 : u,
|
|
277
|
+
r: n / 2,
|
|
278
|
+
stroke: r ? u : "none",
|
|
279
|
+
strokeWidth: r ? 2 : void 0
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
G.displayName = "ChartDot";
|
|
284
|
+
function M({
|
|
285
|
+
size: n = 6,
|
|
286
|
+
color: r,
|
|
287
|
+
colorKey: l,
|
|
288
|
+
cx: e,
|
|
289
|
+
cy: t,
|
|
290
|
+
stroke: a,
|
|
291
|
+
fill: o,
|
|
292
|
+
payload: d
|
|
293
|
+
}) {
|
|
294
|
+
if (e == null || t == null)
|
|
295
|
+
return null;
|
|
296
|
+
const i = R({
|
|
297
|
+
colorKey: l,
|
|
298
|
+
color: r,
|
|
299
|
+
fill: o,
|
|
300
|
+
stroke: a,
|
|
301
|
+
payload: d
|
|
302
|
+
});
|
|
303
|
+
return /* @__PURE__ */ s(
|
|
304
|
+
"circle",
|
|
305
|
+
{
|
|
306
|
+
className: "stroke-background",
|
|
307
|
+
cx: e,
|
|
308
|
+
cy: t,
|
|
309
|
+
"data-slot": "chart-dot-on-stroke",
|
|
310
|
+
fill: i,
|
|
311
|
+
r: n / 2,
|
|
312
|
+
strokeWidth: 2
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
M.displayName = "ChartDotOnStroke";
|
|
317
|
+
function z({
|
|
318
|
+
type: n = "default",
|
|
319
|
+
filled: r = !1,
|
|
320
|
+
fillColor: l = "var(--chart-teal)",
|
|
321
|
+
fillOpacity: e = 0.2,
|
|
322
|
+
boundaryOnly: t = !1,
|
|
323
|
+
radialLines: a,
|
|
324
|
+
className: o,
|
|
325
|
+
...d
|
|
326
|
+
}) {
|
|
327
|
+
const i = n === "circle" ? "circle" : "polygon", h = t ? `[&_.${i === "circle" ? "recharts-polar-grid-concentric-circle" : "recharts-polar-grid-concentric-polygon"}:not(:last-of-type)]:stroke-transparent` : void 0;
|
|
328
|
+
return r ? /* @__PURE__ */ s(
|
|
329
|
+
N.PolarGrid,
|
|
330
|
+
{
|
|
331
|
+
className: p(h, o),
|
|
332
|
+
fill: l,
|
|
333
|
+
fillOpacity: e,
|
|
334
|
+
gridType: i,
|
|
335
|
+
radialLines: a ?? !1,
|
|
336
|
+
stroke: "none",
|
|
337
|
+
...d
|
|
338
|
+
}
|
|
339
|
+
) : /* @__PURE__ */ s(
|
|
340
|
+
N.PolarGrid,
|
|
341
|
+
{
|
|
342
|
+
className: p(h, o),
|
|
343
|
+
gridType: i,
|
|
344
|
+
radialLines: a,
|
|
345
|
+
...d
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
z.displayName = "ChartRadarGrid";
|
|
350
|
+
function I({
|
|
351
|
+
type: n = "default",
|
|
352
|
+
data: r,
|
|
353
|
+
primaryKey: l,
|
|
354
|
+
secondaryKey: e,
|
|
355
|
+
x: t,
|
|
356
|
+
y: a,
|
|
357
|
+
textAnchor: o,
|
|
358
|
+
payload: d,
|
|
359
|
+
index: i
|
|
360
|
+
}) {
|
|
361
|
+
const u = r != null && i != null ? r[i] : void 0, h = u && l != null ? u[l] : void 0, g = u && e != null ? u[e] : void 0, m = n === "default" && h != null ? g != null ? `${String(h)}/${String(g)}` : String(h) : null;
|
|
362
|
+
return /* @__PURE__ */ x(
|
|
363
|
+
"text",
|
|
364
|
+
{
|
|
365
|
+
className: "text-xs",
|
|
366
|
+
"data-slot": "chart-radar-label-wrapper",
|
|
367
|
+
textAnchor: o,
|
|
368
|
+
x: t,
|
|
369
|
+
y: a,
|
|
370
|
+
children: [
|
|
371
|
+
m != null && /* @__PURE__ */ s("tspan", { className: "fill-card-foreground", dy: "-0.5em", x: t, children: m }),
|
|
372
|
+
/* @__PURE__ */ s(
|
|
373
|
+
"tspan",
|
|
374
|
+
{
|
|
375
|
+
className: "fill-muted-foreground",
|
|
376
|
+
dy: m != null ? "1.2em" : void 0,
|
|
377
|
+
x: t,
|
|
378
|
+
children: d?.value
|
|
379
|
+
}
|
|
380
|
+
)
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
I.displayName = "ChartRadarLabelWrapper";
|
|
386
|
+
function O({
|
|
387
|
+
nameKey: n,
|
|
388
|
+
config: r,
|
|
389
|
+
radiusRatio: l = 0.5,
|
|
390
|
+
cx: e,
|
|
391
|
+
cy: t,
|
|
392
|
+
midAngle: a = 0,
|
|
393
|
+
innerRadius: o = 0,
|
|
394
|
+
outerRadius: d = 0,
|
|
395
|
+
payload: i,
|
|
396
|
+
name: u
|
|
397
|
+
}) {
|
|
398
|
+
if (e == null || t == null)
|
|
399
|
+
return null;
|
|
400
|
+
const h = Math.PI / 180, g = o + (d - o) * l, m = e + g * Math.cos(-a * h), C = t + g * Math.sin(-a * h), v = n != null && i != null ? i[n] : void 0, f = v != null ? String(v) : u, c = f != null ? r?.[f]?.label ?? f : f;
|
|
401
|
+
return /* @__PURE__ */ s(
|
|
402
|
+
"text",
|
|
403
|
+
{
|
|
404
|
+
className: "fill-foreground text-xs",
|
|
405
|
+
"data-slot": "chart-pie-label-list",
|
|
406
|
+
dominantBaseline: "middle",
|
|
407
|
+
textAnchor: "middle",
|
|
408
|
+
x: m,
|
|
409
|
+
y: C,
|
|
410
|
+
children: c
|
|
411
|
+
}
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
O.displayName = "ChartPieLabelList";
|
|
415
|
+
function B({
|
|
416
|
+
valueKey: n,
|
|
417
|
+
x: r,
|
|
418
|
+
y: l,
|
|
419
|
+
textAnchor: e,
|
|
420
|
+
payload: t,
|
|
421
|
+
value: a
|
|
422
|
+
}) {
|
|
423
|
+
if (r == null || l == null)
|
|
424
|
+
return null;
|
|
425
|
+
const o = n != null && t != null ? t[n] : a;
|
|
426
|
+
return /* @__PURE__ */ s(
|
|
427
|
+
"text",
|
|
428
|
+
{
|
|
429
|
+
className: "fill-foreground text-xs",
|
|
430
|
+
"data-slot": "chart-pie-label-wrapper",
|
|
431
|
+
dominantBaseline: "middle",
|
|
432
|
+
textAnchor: e,
|
|
433
|
+
x: r,
|
|
434
|
+
y: l,
|
|
435
|
+
children: o
|
|
436
|
+
}
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
B.displayName = "ChartPieLabelWrapper";
|
|
440
|
+
const V = {
|
|
441
|
+
"2xl": "text-2xl leading-8",
|
|
442
|
+
"3xl": "text-3xl",
|
|
443
|
+
"4xl": "text-4xl leading-10"
|
|
444
|
+
};
|
|
445
|
+
function q({
|
|
446
|
+
primary: n,
|
|
447
|
+
secondary: r,
|
|
448
|
+
size: l = "3xl",
|
|
449
|
+
viewBox: e
|
|
450
|
+
}) {
|
|
451
|
+
if (e == null || typeof e != "object" || !("cx" in e) || !("cy" in e))
|
|
452
|
+
return null;
|
|
453
|
+
const { cx: t, cy: a } = e;
|
|
454
|
+
return /* @__PURE__ */ x(
|
|
455
|
+
"text",
|
|
456
|
+
{
|
|
457
|
+
"data-slot": "chart-center-label",
|
|
458
|
+
dominantBaseline: "middle",
|
|
459
|
+
textAnchor: "middle",
|
|
460
|
+
x: t,
|
|
461
|
+
y: a,
|
|
462
|
+
children: [
|
|
463
|
+
/* @__PURE__ */ s(
|
|
464
|
+
"tspan",
|
|
465
|
+
{
|
|
466
|
+
className: p(
|
|
467
|
+
"fill-foreground font-sans font-bold",
|
|
468
|
+
V[l]
|
|
469
|
+
),
|
|
470
|
+
x: t,
|
|
471
|
+
y: a,
|
|
472
|
+
children: n
|
|
473
|
+
}
|
|
474
|
+
),
|
|
475
|
+
r != null && /* @__PURE__ */ s(
|
|
476
|
+
"tspan",
|
|
477
|
+
{
|
|
478
|
+
className: "fill-muted-foreground font-sans text-xs font-normal",
|
|
479
|
+
x: t,
|
|
480
|
+
y: a + 24,
|
|
481
|
+
children: r
|
|
482
|
+
}
|
|
483
|
+
)
|
|
484
|
+
]
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
q.displayName = "ChartCenterLabel";
|
|
240
489
|
export {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
490
|
+
J as Area,
|
|
491
|
+
Q as AreaChart,
|
|
492
|
+
U as Bar,
|
|
493
|
+
Z as BarChart,
|
|
494
|
+
F as CartesianGrid,
|
|
495
|
+
K as Cell,
|
|
496
|
+
q as ChartCenterLabel,
|
|
497
|
+
S as ChartContainer,
|
|
498
|
+
G as ChartDot,
|
|
499
|
+
M as ChartDotOnStroke,
|
|
500
|
+
ee as ChartLabel,
|
|
501
|
+
W as ChartLegend,
|
|
502
|
+
D as ChartLegendContent,
|
|
503
|
+
O as ChartPieLabelList,
|
|
504
|
+
B as ChartPieLabelWrapper,
|
|
505
|
+
z as ChartRadarGrid,
|
|
506
|
+
I as ChartRadarLabelWrapper,
|
|
507
|
+
j as ChartStyle,
|
|
508
|
+
T as ChartTooltip,
|
|
509
|
+
A as ChartTooltipContent,
|
|
510
|
+
re as ChartsLegend,
|
|
511
|
+
te as ChartsTooltip,
|
|
512
|
+
ne as Customized,
|
|
513
|
+
ae as LabelList,
|
|
514
|
+
le as Line,
|
|
515
|
+
oe as LineChart,
|
|
516
|
+
se as Pie,
|
|
517
|
+
ie as PieChart,
|
|
518
|
+
ce as PolarAngleAxis,
|
|
519
|
+
de as PolarGrid,
|
|
520
|
+
ue as PolarRadiusAxis,
|
|
521
|
+
he as Radar,
|
|
522
|
+
fe as RadarChart,
|
|
523
|
+
pe as RadialBar,
|
|
524
|
+
me as RadialBarChart,
|
|
525
|
+
ge as Rectangle,
|
|
526
|
+
Ce as ReferenceLine,
|
|
527
|
+
xe as ResponsiveContainer,
|
|
528
|
+
ve as Sector,
|
|
529
|
+
be as XAxis,
|
|
530
|
+
ke as YAxis
|
|
275
531
|
};
|