@brightlocal/ui-components 2.23.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.
Files changed (90) hide show
  1. package/AI_USAGE.md +1 -1
  2. package/README.md +3 -2
  3. package/component-meta.json +116 -25
  4. package/deprecations.json +22 -0
  5. package/dist/alert.cjs +1 -1
  6. package/dist/alert.d.ts.map +1 -1
  7. package/dist/alert.js +6 -9
  8. package/dist/blocks/sidebar.cjs +1 -1
  9. package/dist/blocks/sidebar.d.ts.map +1 -1
  10. package/dist/blocks/sidebar.js +151 -156
  11. package/dist/brand-illustration-motif.cjs +1 -0
  12. package/dist/brand-illustration-motif.d.ts +55 -0
  13. package/dist/brand-illustration-motif.d.ts.map +1 -0
  14. package/dist/brand-illustration-motif.js +67 -0
  15. package/dist/chart.cjs +7 -7
  16. package/dist/chart.d.ts +287 -2
  17. package/dist/chart.d.ts.map +1 -1
  18. package/dist/chart.js +408 -152
  19. package/dist/combobox.cjs +3 -3
  20. package/dist/combobox.d.ts +14 -1
  21. package/dist/combobox.d.ts.map +1 -1
  22. package/dist/combobox.js +387 -376
  23. package/dist/data-table.cjs +1 -0
  24. package/dist/{blocks/data-table.d.ts → data-table.d.ts} +159 -4
  25. package/dist/data-table.d.ts.map +1 -0
  26. package/dist/data-table.js +721 -0
  27. package/dist/field.cjs +1 -1
  28. package/dist/field.d.ts +16 -1
  29. package/dist/field.d.ts.map +1 -1
  30. package/dist/field.js +23 -7
  31. package/dist/global-layout.cjs +1 -1
  32. package/dist/global-layout.d.ts +32 -2
  33. package/dist/global-layout.d.ts.map +1 -1
  34. package/dist/global-layout.js +179 -109
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.d.ts +2 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +526 -511
  39. package/dist/label.cjs +1 -1
  40. package/dist/label.d.ts +9 -0
  41. package/dist/label.d.ts.map +1 -1
  42. package/dist/label.js +26 -22
  43. package/dist/lib/spring-settle.cjs +1 -0
  44. package/dist/lib/spring-settle.d.ts +20 -0
  45. package/dist/lib/spring-settle.d.ts.map +1 -0
  46. package/dist/lib/spring-settle.js +4 -0
  47. package/dist/link.cjs +1 -1
  48. package/dist/link.d.ts +3 -2
  49. package/dist/link.d.ts.map +1 -1
  50. package/dist/link.js +22 -11
  51. package/dist/loading.cjs +1 -1
  52. package/dist/loading.d.ts +2 -1
  53. package/dist/loading.d.ts.map +1 -1
  54. package/dist/loading.js +106 -85
  55. package/dist/select.cjs +2 -2
  56. package/dist/select.d.ts +16 -1
  57. package/dist/select.d.ts.map +1 -1
  58. package/dist/select.js +112 -79
  59. package/dist/table.cjs +1 -1
  60. package/dist/table.d.ts +29 -0
  61. package/dist/table.d.ts.map +1 -1
  62. package/dist/table.js +2 -2
  63. package/dist/text-reveal-motion.cjs +1 -1
  64. package/dist/text-reveal-motion.d.ts.map +1 -1
  65. package/dist/text-reveal-motion.js +236 -219
  66. package/dist/typography.cjs +1 -1
  67. package/dist/typography.d.ts +20 -4
  68. package/dist/typography.d.ts.map +1 -1
  69. package/dist/typography.js +263 -228
  70. package/package.json +7 -7
  71. package/src/blocks/sidebar.tsx +11 -23
  72. package/src/components/alert.tsx +1 -4
  73. package/src/components/brand-illustration-motif.tsx +143 -0
  74. package/src/components/chart.tsx +632 -1
  75. package/src/components/combobox.tsx +47 -0
  76. package/src/{blocks → components}/data-table.tsx +270 -16
  77. package/src/components/field.tsx +31 -0
  78. package/src/components/global-layout.tsx +144 -5
  79. package/src/components/label.tsx +13 -1
  80. package/src/components/link.tsx +13 -1
  81. package/src/components/loading.tsx +71 -38
  82. package/src/components/select.tsx +82 -2
  83. package/src/components/table.tsx +31 -2
  84. package/src/components/text-reveal-motion.tsx +90 -64
  85. package/src/components/typography.tsx +74 -18
  86. package/src/index.ts +2 -1
  87. package/src/lib/spring-settle.ts +19 -0
  88. package/dist/blocks/data-table.cjs +0 -1
  89. package/dist/blocks/data-table.d.ts.map +0 -1
  90. package/dist/blocks/data-table.js +0 -654
package/dist/chart.js CHANGED
@@ -1,57 +1,57 @@
1
- import { jsx as t, jsxs as m, Fragment as R } from "react/jsx-runtime";
2
- import * as C from "react";
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 M, AreaChart as O, Bar as q, BarChart as D, CartesianGrid as E, Cell as H, Label as W, Legend as X, Tooltip as Y, Customized as J, LabelList as Q, Line as U, LineChart as V, Pie as Z, PieChart as F, PolarAngleAxis as ee, PolarGrid as re, PolarRadiusAxis as te, Radar as ne, RadarChart as ae, RadialBar as oe, RadialBarChart as se, Rectangle as le, ReferenceLine as ce, ResponsiveContainer as ie, Sector as de, XAxis as ue, YAxis as he } from "recharts";
5
- import { cn as u } from "@brightlocal/ui-components/lib/utils";
6
- const $ = C.createContext(null);
7
- function w() {
8
- const n = C.useContext($);
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 j = C.forwardRef(
13
+ const S = k.forwardRef(
14
14
  ({
15
15
  id: n,
16
- className: a,
16
+ className: r,
17
17
  children: l,
18
- config: r,
19
- dataHook: s,
20
- width: c,
18
+ config: e,
19
+ dataHook: t,
20
+ width: a,
21
21
  height: o,
22
- minWidth: i,
23
- minHeight: d,
24
- maxHeight: v,
25
- trackingEl: k,
26
- trackingLabel: _,
27
- ...p
28
- }, g) => {
29
- const x = C.useId(), h = `chart-${n || x.replace(/:/g, "")}`;
30
- return /* @__PURE__ */ t($.Provider, { value: { config: r }, children: /* @__PURE__ */ m(
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: g,
34
- className: u(
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
- a
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": h,
39
- "data-hook": s,
38
+ "data-chart": f,
39
+ "data-hook": t,
40
40
  "data-slot": "chart-container",
41
- "data-tracking-el": k,
42
- "data-tracking-label": _,
43
- ...p,
41
+ "data-tracking-el": h,
42
+ "data-tracking-label": g,
43
+ ...m,
44
44
  children: [
45
- /* @__PURE__ */ t(T, { config: r, id: h }),
46
- /* @__PURE__ */ t(
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: v,
52
- minHeight: d,
53
- minWidth: i ?? 0,
54
- width: c ?? "100%",
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
- j.displayName = "ChartContainer";
64
- function T({ id: n, config: a }) {
65
- const l = Object.entries(a).filter(
66
- ([, r]) => r.theme || r.color
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__ */ t(
68
+ return l.length ? /* @__PURE__ */ s(
69
69
  "style",
70
70
  {
71
71
  dangerouslySetInnerHTML: {
72
- __html: l.map(([r, s]) => {
73
- const c = typeof s.color == "string" ? s.color.replace(/^hsl\((.*)\)$/, "$1") : null;
74
- return c ? `
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-${r}: ${c};
76
+ --color-${e}: ${a};
77
77
  }
78
- ` : s.theme ? Object.entries(s.theme).map(
79
- ([o, i]) => `
78
+ ` : t.theme ? Object.entries(t.theme).map(
79
+ ([o, d]) => `
80
80
  .${o} [data-chart=${n}] {
81
- --color-${r}: ${i.replace(/^hsl\((.*)\)$/, "$1")};
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 A({ ...n }) {
92
- return /* @__PURE__ */ t(N.Tooltip, { ...n });
91
+ function T({ ...n }) {
92
+ return /* @__PURE__ */ s(N.Tooltip, { ...n });
93
93
  }
94
- A.displayName = "ChartTooltip";
95
- function P({
94
+ T.displayName = "ChartTooltip";
95
+ function A({
96
96
  active: n,
97
- payload: a,
97
+ payload: r,
98
98
  className: l,
99
- indicator: r = "dot",
100
- hideLabel: s = !1,
101
- hideIndicator: c = !1,
99
+ indicator: e = "dot",
100
+ hideLabel: t = !1,
101
+ hideIndicator: a = !1,
102
102
  label: o,
103
- labelFormatter: i,
104
- labelClassName: d,
105
- formatter: v,
106
- color: k,
107
- nameKey: _,
108
- labelKey: p
103
+ labelFormatter: d,
104
+ labelClassName: i,
105
+ formatter: u,
106
+ color: h,
107
+ nameKey: g,
108
+ labelKey: m
109
109
  }) {
110
- const { config: g } = w(), x = C.useMemo(() => {
111
- if (s || !a?.length)
110
+ const { config: C } = P(), v = k.useMemo(() => {
111
+ if (t || !r?.length)
112
112
  return null;
113
- const [e] = a;
114
- if (!e)
113
+ const [c] = r;
114
+ if (!c)
115
115
  return null;
116
- const L = `${p || e.dataKey || e.name || "value"}`, b = g[L], f = !p && typeof o == "string" ? g[o]?.label || o : b?.label;
117
- return i ? /* @__PURE__ */ t("div", { className: u("font-medium", d), children: i(f, a) }) : f ? /* @__PURE__ */ t("div", { className: u("font-medium", d), children: f }) : null;
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
- g,
125
- p
121
+ r,
122
+ t,
123
+ i,
124
+ C,
125
+ m
126
126
  ]);
127
- if (!n || !a?.length)
127
+ if (!n || !r?.length)
128
128
  return null;
129
- const h = a.length === 1 && r !== "dot";
130
- return /* @__PURE__ */ m(
129
+ const f = r.length === 1 && e !== "dot";
130
+ return /* @__PURE__ */ x(
131
131
  "div",
132
132
  {
133
- className: u(
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
- h ? null : x,
140
- /* @__PURE__ */ t("div", { className: "grid gap-1.5", children: a.map((e, L) => {
141
- const b = `${_ || e.name || e.dataKey || "value"}`, f = g[b], y = k || e.color || e.payload.fill || `var(--color-${b})`;
142
- return /* @__PURE__ */ t(
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: u(
145
+ className: p(
146
146
  "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2",
147
- r === "dot" && "items-center"
147
+ e === "dot" && "items-center"
148
148
  ),
149
- children: v && e?.value !== void 0 && e.name ? v(e.value, e.name, e, L, a) : /* @__PURE__ */ m(R, { children: [
150
- f?.icon && !c ? /* @__PURE__ */ t(f.icon, { size: 10 }) : !c && /* @__PURE__ */ t(
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: u("shrink-0 rounded-[2px]", {
154
- "h-2.5 w-2.5": r === "dot",
155
- "w-1": r === "line",
156
- "w-0 border-[1.5px] border-dashed bg-transparent": r === "dashed",
157
- "my-0.5": h && r === "dashed"
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: r === "dashed" ? "transparent" : y,
161
- borderColor: y
160
+ backgroundColor: e === "dashed" ? "transparent" : _,
161
+ borderColor: _
162
162
  }
163
163
  }
164
164
  ),
165
- /* @__PURE__ */ m(
165
+ /* @__PURE__ */ x(
166
166
  "div",
167
167
  {
168
- className: u(
168
+ className: p(
169
169
  "flex flex-1 justify-between leading-none",
170
- h ? "items-end" : "items-center"
170
+ f ? "items-end" : "items-center"
171
171
  ),
172
172
  children: [
173
- /* @__PURE__ */ m("div", { className: "grid gap-1.5", children: [
174
- h ? x : null,
175
- /* @__PURE__ */ t("span", { className: "text-muted-foreground", children: f?.label || e.name })
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
- e.value && /* @__PURE__ */ t("span", { className: "text-foreground font-mono font-medium tabular-nums", children: typeof e.value == "number" ? e.value.toLocaleString() : e.value })
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
- e.dataKey
183
+ c.dataKey
184
184
  );
185
185
  }) })
186
186
  ]
187
187
  }
188
188
  );
189
189
  }
190
- P.displayName = "ChartTooltipContent";
191
- function B({ ...n }) {
192
- return /* @__PURE__ */ t(N.Legend, { ...n });
190
+ A.displayName = "ChartTooltipContent";
191
+ function W({ ...n }) {
192
+ return /* @__PURE__ */ s(N.Legend, { ...n });
193
193
  }
194
- B.displayName = "ChartLegend";
195
- function S({
194
+ W.displayName = "ChartLegend";
195
+ function D({
196
196
  className: n,
197
- hideIcon: a = !1,
197
+ hideIcon: r = !1,
198
198
  payload: l,
199
- verticalAlign: r = "bottom",
200
- nameKey: s
199
+ verticalAlign: e = "bottom",
200
+ nameKey: t
201
201
  }) {
202
- const { config: c } = w();
203
- return l?.length ? /* @__PURE__ */ t(
202
+ const { config: a } = P();
203
+ return l?.length ? /* @__PURE__ */ s(
204
204
  "div",
205
205
  {
206
- className: u(
206
+ className: p(
207
207
  "flex items-center justify-center gap-4",
208
- r === "top" ? "pb-4" : "pt-4",
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 i = `${s || o.dataKey || "value"}`, d = c[i];
214
- return /* @__PURE__ */ m(
213
+ const d = `${t || o.dataKey || "value"}`, i = a[d];
214
+ return /* @__PURE__ */ x(
215
215
  "div",
216
216
  {
217
- className: u(
217
+ className: p(
218
218
  "[&>svg]:text-muted-foreground flex items-center gap-1.5"
219
219
  ),
220
220
  children: [
221
- d?.icon && !a ? /* @__PURE__ */ t(d.icon, { size: 12 }) : /* @__PURE__ */ t(
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
- d?.label || o.value
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
- S.displayName = "ChartLegendContent";
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
- M as Area,
242
- O as AreaChart,
243
- q as Bar,
244
- D as BarChart,
245
- E as CartesianGrid,
246
- H as Cell,
247
- j as ChartContainer,
248
- W as ChartLabel,
249
- B as ChartLegend,
250
- S as ChartLegendContent,
251
- T as ChartStyle,
252
- A as ChartTooltip,
253
- P as ChartTooltipContent,
254
- X as ChartsLegend,
255
- Y as ChartsTooltip,
256
- J as Customized,
257
- Q as LabelList,
258
- U as Line,
259
- V as LineChart,
260
- Z as Pie,
261
- F as PieChart,
262
- ee as PolarAngleAxis,
263
- re as PolarGrid,
264
- te as PolarRadiusAxis,
265
- ne as Radar,
266
- ae as RadarChart,
267
- oe as RadialBar,
268
- se as RadialBarChart,
269
- le as Rectangle,
270
- ce as ReferenceLine,
271
- ie as ResponsiveContainer,
272
- de as Sector,
273
- ue as XAxis,
274
- he as YAxis
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
  };