@devalok/shilp-sutra 0.22.2 → 0.23.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 (79) hide show
  1. package/dist/_chunks/tree-view.js +26 -26
  2. package/dist/_chunks/use-calendar.js +106 -106
  3. package/dist/composed/activity-feed.js +10 -10
  4. package/dist/composed/avatar-group.js +74 -75
  5. package/dist/composed/command-palette.js +8 -8
  6. package/dist/composed/content-card.js +10 -10
  7. package/dist/composed/empty-state.js +6 -6
  8. package/dist/composed/error-boundary.js +2 -2
  9. package/dist/composed/loading-skeleton.js +83 -83
  10. package/dist/composed/member-picker.js +6 -6
  11. package/dist/composed/page-skeletons.js +5 -5
  12. package/dist/composed/rich-text-editor.js +63 -63
  13. package/dist/composed/schedule-view.js +26 -26
  14. package/dist/composed/status-badge.js +8 -8
  15. package/dist/shell/bottom-navbar.js +4 -4
  16. package/dist/shell/notification-center.js +29 -29
  17. package/dist/shell/notification-preferences.js +2 -2
  18. package/dist/shell/sidebar.js +6 -6
  19. package/dist/shell/top-bar.js +71 -71
  20. package/dist/tailwind/index.cjs +33 -11
  21. package/dist/tailwind/preset.d.ts.map +1 -1
  22. package/dist/tailwind/preset.js +33 -11
  23. package/dist/tokens/primitives.css +2 -0
  24. package/dist/tokens/semantic.css +83 -14
  25. package/dist/tokens/typography.css +1 -1
  26. package/dist/ui/accordion.js +1 -1
  27. package/dist/ui/alert-dialog.js +32 -32
  28. package/dist/ui/alert.js +12 -12
  29. package/dist/ui/autocomplete.js +16 -16
  30. package/dist/ui/avatar.d.ts.map +1 -1
  31. package/dist/ui/avatar.js +81 -74
  32. package/dist/ui/badge.js +2 -2
  33. package/dist/ui/banner.js +1 -1
  34. package/dist/ui/button.js +8 -8
  35. package/dist/ui/card.d.ts +1 -1
  36. package/dist/ui/card.js +10 -10
  37. package/dist/ui/charts/index.js +312 -312
  38. package/dist/ui/checkbox.js +3 -3
  39. package/dist/ui/chip.js +4 -4
  40. package/dist/ui/code.js +2 -2
  41. package/dist/ui/color-input.js +1 -1
  42. package/dist/ui/combobox.js +37 -37
  43. package/dist/ui/context-menu.js +6 -6
  44. package/dist/ui/data-table-toolbar.js +18 -18
  45. package/dist/ui/data-table.js +132 -132
  46. package/dist/ui/dialog.js +12 -12
  47. package/dist/ui/dropdown-menu.js +67 -67
  48. package/dist/ui/file-upload.js +3 -3
  49. package/dist/ui/hover-card.js +13 -13
  50. package/dist/ui/input-otp.js +9 -9
  51. package/dist/ui/input.js +10 -10
  52. package/dist/ui/menubar.js +33 -33
  53. package/dist/ui/navigation-menu.js +52 -52
  54. package/dist/ui/number-input.js +14 -14
  55. package/dist/ui/pagination.js +25 -25
  56. package/dist/ui/popover.js +17 -17
  57. package/dist/ui/progress.js +1 -1
  58. package/dist/ui/radio.js +2 -2
  59. package/dist/ui/search-input.js +3 -3
  60. package/dist/ui/segmented-control.d.ts +1 -1
  61. package/dist/ui/segmented-control.js +16 -16
  62. package/dist/ui/select.js +17 -17
  63. package/dist/ui/sheet.js +21 -21
  64. package/dist/ui/sidebar.js +13 -13
  65. package/dist/ui/slider.js +2 -2
  66. package/dist/ui/stat-card.js +52 -52
  67. package/dist/ui/stepper.js +1 -1
  68. package/dist/ui/switch.js +11 -11
  69. package/dist/ui/table.js +19 -19
  70. package/dist/ui/tabs.js +2 -2
  71. package/dist/ui/textarea.js +6 -6
  72. package/dist/ui/toast.js +3 -3
  73. package/dist/ui/toggle.js +7 -7
  74. package/dist/ui/tooltip.js +17 -17
  75. package/docs/components/composed/avatar-group.md +5 -0
  76. package/docs/components/ui/avatar.md +4 -0
  77. package/llms-full.txt +10 -1
  78. package/llms.txt +66 -5
  79. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as g, Fragment as et } from "react/jsx-runtime";
3
- import * as nt from "react";
4
- import { useRef as yt, useState as mt, useEffect as xt, useCallback as kt } from "react";
2
+ import { jsx as e, jsxs as g, Fragment as te } from "react/jsx-runtime";
3
+ import * as ne from "react";
4
+ import { useRef as ye, useState as me, useEffect as xe, useCallback as ke } from "react";
5
5
  import { cn as H } from "../lib/utils.js";
6
- import { scaleBand as St, scaleLinear as ot, scalePoint as Ct } from "d3-scale";
7
- import { tweens as st, motionProps as it } from "../lib/motion.js";
8
- import { axisLeft as Xt, axisBottom as Dt, axisRight as Pt, axisTop as zt } from "d3-axis";
9
- import { select as Bt } from "d3-selection";
10
- import { u as Vt } from "../../_chunks/motion-provider.js";
11
- import { m as rt } from "../../_chunks/framer.js";
12
- import { line as ft, curveMonotoneX as dt, curveLinear as At, stack as _t, stackOrderNone as jt, stackOffsetNone as Tt, area as Nt, pie as Yt, arc as vt, lineRadial as Ot, curveLinearClosed as Wt } from "d3-shape";
13
- const It = {
6
+ import { scaleBand as Se, scaleLinear as oe, scalePoint as Ce } from "d3-scale";
7
+ import { tweens as se, motionProps as ie } from "../lib/motion.js";
8
+ import { axisLeft as Xe, axisBottom as De, axisRight as Pe, axisTop as ze } from "d3-axis";
9
+ import { select as Be } from "d3-selection";
10
+ import { u as Ve } from "../../_chunks/motion-provider.js";
11
+ import { m as re } from "../../_chunks/framer.js";
12
+ import { line as he, curveMonotoneX as de, curveLinear as Ae, stack as _e, stackOrderNone as je, stackOffsetNone as Te, area as Ne, pie as Ye, arc as ve, lineRadial as Oe, curveLinearClosed as We } from "d3-shape";
13
+ const Ie = {
14
14
  top: 20,
15
15
  right: 20,
16
16
  bottom: 40,
17
17
  left: 50
18
- }, bt = nt.forwardRef(
18
+ }, be = ne.forwardRef(
19
19
  ({
20
- height: e = 300,
20
+ height: t = 300,
21
21
  margin: o,
22
22
  className: a,
23
23
  children: y,
24
- ...h
24
+ ...f
25
25
  }, x) => {
26
- const i = yt(null), [M, B] = mt(0), N = { ...It, ...o };
27
- xt(() => {
26
+ const i = ye(null), [M, B] = me(0), N = { ...Ie, ...o };
27
+ xe(() => {
28
28
  if (!i.current) return;
29
29
  const T = new ResizeObserver((D) => {
30
30
  const R = D[0];
@@ -32,44 +32,44 @@ const It = {
32
32
  });
33
33
  return T.observe(i.current), () => T.disconnect();
34
34
  }, []);
35
- const A = Math.max(0, M - N.left - N.right), k = Math.max(0, e - N.top - N.bottom);
36
- return /* @__PURE__ */ t(
35
+ const A = Math.max(0, M - N.left - N.right), k = Math.max(0, t - N.top - N.bottom);
36
+ return /* @__PURE__ */ e(
37
37
  "div",
38
38
  {
39
39
  ref: (T) => {
40
40
  i.current = T, typeof x == "function" ? x(T) : x && (x.current = T);
41
41
  },
42
42
  className: H("relative w-full", a),
43
- ...h,
44
- children: M > 0 && /* @__PURE__ */ t("svg", { width: M, height: e, role: "img", "aria-label": "Chart", children: /* @__PURE__ */ t("g", { transform: `translate(${N.left},${N.top})`, children: y({ width: A, height: k, margin: N }) }) })
43
+ ...f,
44
+ children: M > 0 && /* @__PURE__ */ e("svg", { width: M, height: t, role: "img", "aria-label": "Chart", children: /* @__PURE__ */ e("g", { transform: `translate(${N.left},${N.top})`, children: y({ width: A, height: k, margin: N }) }) })
45
45
  }
46
46
  );
47
47
  }
48
48
  );
49
- bt.displayName = "ChartContainer";
50
- function tt({
51
- scale: e,
49
+ be.displayName = "ChartContainer";
50
+ function ee({
51
+ scale: t,
52
52
  orientation: o,
53
53
  transform: a,
54
54
  tickCount: y,
55
- tickFormat: h,
55
+ tickFormat: f,
56
56
  label: x,
57
57
  className: i
58
58
  }) {
59
- const M = yt(null);
60
- return xt(() => {
59
+ const M = ye(null);
60
+ return xe(() => {
61
61
  if (!M.current) return;
62
62
  const N = {
63
- top: zt,
64
- right: Pt,
65
- bottom: Dt,
66
- left: Xt
63
+ top: ze,
64
+ right: Pe,
65
+ bottom: De,
66
+ left: Xe
67
67
  }[o];
68
- let A = N(e);
69
- y && (A = A.ticks(y)), h && (A = A.tickFormat(h));
70
- const k = Bt(M.current);
68
+ let A = N(t);
69
+ y && (A = A.ticks(y)), f && (A = A.tickFormat(f));
70
+ const k = Be(M.current);
71
71
  k.call(A), k.selectAll(".tick line").attr("stroke", "var(--color-surface-border)"), k.selectAll(".tick text").attr("fill", "var(--color-surface-fg-muted)").attr("font-size", "var(--font-size-xs)"), k.selectAll(".domain").attr("stroke", "var(--color-surface-border-strong)");
72
- }, [e, o, y, h]), /* @__PURE__ */ t("g", { ref: M, transform: a, className: i, children: x && /* @__PURE__ */ t(
72
+ }, [t, o, y, f]), /* @__PURE__ */ e("g", { ref: M, transform: a, className: i, children: x && /* @__PURE__ */ e(
73
73
  "text",
74
74
  {
75
75
  textAnchor: "middle",
@@ -80,21 +80,21 @@ function tt({
80
80
  }
81
81
  ) });
82
82
  }
83
- tt.displayName = "Axis";
84
- function ht({
85
- width: e,
83
+ ee.displayName = "Axis";
84
+ function fe({
85
+ width: t,
86
86
  height: o,
87
87
  xScale: a,
88
88
  yScale: y,
89
- horizontal: h = !0,
89
+ horizontal: f = !0,
90
90
  vertical: x = !1
91
91
  }) {
92
92
  return /* @__PURE__ */ g("g", { className: "grid-lines", children: [
93
- h && (y == null ? void 0 : y.ticks) && y.ticks().map((i, M) => /* @__PURE__ */ t(
93
+ f && (y == null ? void 0 : y.ticks) && y.ticks().map((i, M) => /* @__PURE__ */ e(
94
94
  "line",
95
95
  {
96
96
  x1: 0,
97
- x2: e,
97
+ x2: t,
98
98
  y1: y(i),
99
99
  y2: y(i),
100
100
  stroke: "var(--color-surface-border)",
@@ -103,7 +103,7 @@ function ht({
103
103
  },
104
104
  `h-${M}`
105
105
  )),
106
- x && (a == null ? void 0 : a.ticks) && a.ticks().map((i, M) => /* @__PURE__ */ t(
106
+ x && (a == null ? void 0 : a.ticks) && a.ticks().map((i, M) => /* @__PURE__ */ e(
107
107
  "line",
108
108
  {
109
109
  x1: a(i),
@@ -118,9 +118,9 @@ function ht({
118
118
  ))
119
119
  ] });
120
120
  }
121
- ht.displayName = "GridLines";
122
- function ct({ items: e, position: o = "bottom", className: a }) {
123
- return /* @__PURE__ */ t(
121
+ fe.displayName = "GridLines";
122
+ function ce({ items: t, position: o = "bottom", className: a }) {
123
+ return /* @__PURE__ */ e(
124
124
  "div",
125
125
  {
126
126
  className: H(
@@ -128,52 +128,52 @@ function ct({ items: e, position: o = "bottom", className: a }) {
128
128
  o === "left" || o === "right" ? "flex-col" : "flex-row flex-wrap justify-center",
129
129
  a
130
130
  ),
131
- children: e.map((h) => /* @__PURE__ */ g("div", { className: "flex items-center gap-ds-02", children: [
132
- /* @__PURE__ */ t(
131
+ children: t.map((f) => /* @__PURE__ */ g("div", { className: "flex items-center gap-ds-02", children: [
132
+ /* @__PURE__ */ e(
133
133
  "span",
134
134
  {
135
135
  className: "inline-block h-3 w-3 shrink-0 rounded-ds-sm",
136
- style: { backgroundColor: h.color }
136
+ style: { backgroundColor: f.color }
137
137
  }
138
138
  ),
139
- /* @__PURE__ */ t("span", { children: h.label })
140
- ] }, h.label))
139
+ /* @__PURE__ */ e("span", { children: f.label })
140
+ ] }, f.label))
141
141
  }
142
142
  );
143
143
  }
144
- ct.displayName = "Legend";
145
- function ut({ state: e, className: o }) {
146
- return e.visible ? /* @__PURE__ */ t(
144
+ ce.displayName = "Legend";
145
+ function ue({ state: t, className: o }) {
146
+ return t.visible ? /* @__PURE__ */ e(
147
147
  "div",
148
148
  {
149
149
  className: H(
150
150
  "pointer-events-none absolute z-tooltip",
151
151
  "rounded-ds-md border border-surface-border-strong",
152
- "bg-surface-1 px-ds-03 py-ds-02",
153
- "shadow-02",
152
+ "bg-surface-overlay px-ds-03 py-ds-02",
153
+ "shadow-raised-hover",
154
154
  "text-ds-sm text-surface-fg",
155
155
  o
156
156
  ),
157
- style: { left: e.x + 12, top: e.y - 12 },
158
- children: e.content
157
+ style: { left: t.x + 12, top: t.y - 12 },
158
+ children: t.content
159
159
  }
160
160
  ) : null;
161
161
  }
162
- ut.displayName = "ChartTooltip";
163
- function pt() {
164
- const [e, o] = mt({
162
+ ue.displayName = "ChartTooltip";
163
+ function pe() {
164
+ const [t, o] = me({
165
165
  visible: !1,
166
166
  x: 0,
167
167
  y: 0,
168
168
  content: null
169
- }), a = kt((h, x, i) => {
170
- o({ visible: !0, x: h, y: x, content: i });
171
- }, []), y = kt(() => {
172
- o((h) => ({ ...h, visible: !1 }));
169
+ }), a = ke((f, x, i) => {
170
+ o({ visible: !0, x: f, y: x, content: i });
171
+ }, []), y = ke(() => {
172
+ o((f) => ({ ...f, visible: !1 }));
173
173
  }, []);
174
- return { tooltip: e, show: a, hide: y };
174
+ return { tooltip: t, show: a, hide: y };
175
175
  }
176
- const Mt = [
176
+ const Me = [
177
177
  "chart-1",
178
178
  "chart-2",
179
179
  "chart-3",
@@ -183,26 +183,26 @@ const Mt = [
183
183
  "chart-7",
184
184
  "chart-8"
185
185
  ];
186
- function Rt(e) {
187
- return `var(--${e})`;
186
+ function Re(t) {
187
+ return `var(--${t})`;
188
188
  }
189
- function at(e, o = 0) {
190
- return e ? Mt.includes(e) ? Rt(e) : e : Rt(Mt[o % Mt.length]);
189
+ function ae(t, o = 0) {
190
+ return t ? Me.includes(t) ? Re(t) : t : Re(Me[o % Me.length]);
191
191
  }
192
- function lt() {
193
- const { reducedMotion: e } = Vt();
194
- return e;
192
+ function le() {
193
+ const { reducedMotion: t } = Ve();
194
+ return t;
195
195
  }
196
- function Ft(e, o = 300) {
197
- return e ? 0 : o;
196
+ function Fe(t, o = 300) {
197
+ return t ? 0 : o;
198
198
  }
199
- const Et = nt.forwardRef(
199
+ const Ee = ne.forwardRef(
200
200
  ({
201
- data: e,
201
+ data: t,
202
202
  xKey: o,
203
203
  yKey: a,
204
204
  orientation: y = "vertical",
205
- stacked: h = !1,
205
+ stacked: f = !1,
206
206
  grouped: x = !1,
207
207
  color: i,
208
208
  height: M = 300,
@@ -217,55 +217,55 @@ const Et = nt.forwardRef(
217
217
  className: Z,
218
218
  ...E
219
219
  }, q) => {
220
- const { tooltip: U, show: O, hide: _ } = pt(), Q = lt(), f = y === "vertical", X = k && !Q, b = Array.isArray(a) ? a : [a], c = b.length > 1, j = c ? b.map(
221
- ($, L) => at(
220
+ const { tooltip: U, show: O, hide: _ } = pe(), Q = le(), h = y === "vertical", X = k && !Q, b = Array.isArray(a) ? a : [a], c = b.length > 1, j = c ? b.map(
221
+ ($, L) => ae(
222
222
  Array.isArray(i) ? i[L] : typeof i == "string" ? i : void 0,
223
223
  L
224
224
  )
225
225
  ) : [
226
- at(
226
+ ae(
227
227
  typeof i == "string" ? i : Array.isArray(i) ? i[0] : void 0,
228
228
  0
229
229
  )
230
230
  ];
231
231
  return /* @__PURE__ */ g(
232
- rt.div,
232
+ re.div,
233
233
  {
234
234
  ref: q,
235
235
  className: H("relative", Z),
236
- ...X ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: st.fade } : {},
237
- ...it(E),
236
+ ...X ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: se.fade } : {},
237
+ ...ie(E),
238
238
  children: [
239
- /* @__PURE__ */ t(bt, { height: M, children: ({ width: $, height: L, margin: u }) => {
240
- const s = e.map((G) => String(G[o]));
239
+ /* @__PURE__ */ e(be, { height: M, children: ({ width: $, height: L, margin: u }) => {
240
+ const s = t.map((G) => String(G[o]));
241
241
  let l;
242
- h ? l = Math.max(
243
- ...e.map(
242
+ f ? l = Math.max(
243
+ ...t.map(
244
244
  (G) => b.reduce((S, C) => S + (Number(G[C]) || 0), 0)
245
245
  )
246
246
  ) : l = Math.max(
247
- ...e.flatMap((G) => b.map((S) => Number(G[S]) || 0))
247
+ ...t.flatMap((G) => b.map((S) => Number(G[S]) || 0))
248
248
  );
249
- const p = St().domain(s).range(f ? [0, $] : [0, L]).padding(0.2), n = ot().domain([0, l * 1.1]).range(f ? [L, 0] : [0, $]).nice(), r = p.bandwidth(), d = c && x ? r / b.length : r;
250
- return /* @__PURE__ */ g(et, { children: [
251
- B && /* @__PURE__ */ t(
252
- ht,
249
+ const p = Se().domain(s).range(h ? [0, $] : [0, L]).padding(0.2), n = oe().domain([0, l * 1.1]).range(h ? [L, 0] : [0, $]).nice(), r = p.bandwidth(), d = c && x ? r / b.length : r;
250
+ return /* @__PURE__ */ g(te, { children: [
251
+ B && /* @__PURE__ */ e(
252
+ fe,
253
253
  {
254
254
  width: $,
255
255
  height: L,
256
- yScale: f ? n : void 0,
257
- xScale: f ? void 0 : n,
258
- horizontal: f,
259
- vertical: !f
256
+ yScale: h ? n : void 0,
257
+ xScale: h ? void 0 : n,
258
+ horizontal: h,
259
+ vertical: !h
260
260
  }
261
261
  ),
262
- e.map((G) => {
262
+ t.map((G) => {
263
263
  const S = String(G[o]);
264
264
  let C = 0;
265
265
  return b.map((W, m) => {
266
266
  const v = Number(G[W]) || 0, P = j[m] || j[0];
267
267
  let I, V, J, z;
268
- return f ? (I = (p(S) ?? 0) + (x && c ? m * d : 0), V = n(h ? C + v : v), J = d, z = h ? n(C) - n(C + v) : L - n(v)) : (I = h ? n(C) : 0, V = (p(S) ?? 0) + (x && c ? m * d : 0), J = h ? n(C + v) - n(C) : n(v), z = d), h && (C += v), /* @__PURE__ */ t(
268
+ return h ? (I = (p(S) ?? 0) + (x && c ? m * d : 0), V = n(f ? C + v : v), J = d, z = f ? n(C) - n(C + v) : L - n(v)) : (I = f ? n(C) : 0, V = (p(S) ?? 0) + (x && c ? m * d : 0), J = f ? n(C + v) - n(C) : n(v), z = d), f && (C += v), /* @__PURE__ */ e(
269
269
  "rect",
270
270
  {
271
271
  x: I,
@@ -283,9 +283,9 @@ const Et = nt.forwardRef(
283
283
  F.clientX - ((K == null ? void 0 : K.left) ?? 0),
284
284
  F.clientY - ((K == null ? void 0 : K.top) ?? 0),
285
285
  /* @__PURE__ */ g("div", { children: [
286
- /* @__PURE__ */ t("div", { className: "font-medium", children: S }),
287
- c && /* @__PURE__ */ t("div", { className: "text-surface-fg-muted", children: (w == null ? void 0 : w[m]) ?? W }),
288
- /* @__PURE__ */ t("div", { children: v.toLocaleString() })
286
+ /* @__PURE__ */ e("div", { className: "font-medium", children: S }),
287
+ c && /* @__PURE__ */ e("div", { className: "text-surface-fg-muted", children: (w == null ? void 0 : w[m]) ?? W }),
288
+ /* @__PURE__ */ e("div", { children: v.toLocaleString() })
289
289
  ] })
290
290
  );
291
291
  }
@@ -296,9 +296,9 @@ const Et = nt.forwardRef(
296
296
  );
297
297
  });
298
298
  }),
299
- f ? /* @__PURE__ */ g(et, { children: [
300
- /* @__PURE__ */ t(
301
- tt,
299
+ h ? /* @__PURE__ */ g(te, { children: [
300
+ /* @__PURE__ */ e(
301
+ ee,
302
302
  {
303
303
  scale: p,
304
304
  orientation: "bottom",
@@ -306,10 +306,10 @@ const Et = nt.forwardRef(
306
306
  label: D
307
307
  }
308
308
  ),
309
- /* @__PURE__ */ t(tt, { scale: n, orientation: "left", label: R })
310
- ] }) : /* @__PURE__ */ g(et, { children: [
311
- /* @__PURE__ */ t(
312
- tt,
309
+ /* @__PURE__ */ e(ee, { scale: n, orientation: "left", label: R })
310
+ ] }) : /* @__PURE__ */ g(te, { children: [
311
+ /* @__PURE__ */ e(
312
+ ee,
313
313
  {
314
314
  scale: n,
315
315
  orientation: "bottom",
@@ -317,8 +317,8 @@ const Et = nt.forwardRef(
317
317
  label: D
318
318
  }
319
319
  ),
320
- /* @__PURE__ */ t(
321
- tt,
320
+ /* @__PURE__ */ e(
321
+ ee,
322
322
  {
323
323
  scale: p,
324
324
  orientation: "left",
@@ -328,9 +328,9 @@ const Et = nt.forwardRef(
328
328
  ] })
329
329
  ] });
330
330
  } }),
331
- N && /* @__PURE__ */ t(ut, { state: U }),
332
- A && c && /* @__PURE__ */ t(
333
- ct,
331
+ N && /* @__PURE__ */ e(ue, { state: U }),
332
+ A && c && /* @__PURE__ */ e(
333
+ ce,
334
334
  {
335
335
  items: b.map(($, L) => ({
336
336
  label: (w == null ? void 0 : w[L]) ?? $,
@@ -344,14 +344,14 @@ const Et = nt.forwardRef(
344
344
  );
345
345
  }
346
346
  );
347
- Et.displayName = "BarChart";
348
- const Ut = nt.forwardRef(
347
+ Ee.displayName = "BarChart";
348
+ const Ue = ne.forwardRef(
349
349
  ({
350
- data: e,
350
+ data: t,
351
351
  xKey: o,
352
352
  series: a,
353
353
  curved: y = !1,
354
- showDots: h = !1,
354
+ showDots: f = !1,
355
355
  dotSize: x = 4,
356
356
  strokeWidth: i = 2,
357
357
  height: M = 300,
@@ -364,42 +364,42 @@ const Ut = nt.forwardRef(
364
364
  className: R,
365
365
  ...w
366
366
  }, Z) => {
367
- const { tooltip: E, show: q, hide: U } = pt(), O = lt(), _ = k && !O, Q = a.map((f, X) => at(f.color, X));
367
+ const { tooltip: E, show: q, hide: U } = pe(), O = le(), _ = k && !O, Q = a.map((h, X) => ae(h.color, X));
368
368
  return /* @__PURE__ */ g(
369
- rt.div,
369
+ re.div,
370
370
  {
371
371
  ref: Z,
372
372
  className: H("relative", R),
373
- ..._ ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: st.fade } : {},
374
- ...it(w),
373
+ ..._ ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: se.fade } : {},
374
+ ...ie(w),
375
375
  children: [
376
- /* @__PURE__ */ t(bt, { height: M, children: ({ width: f, height: X, margin: b }) => {
377
- const c = e.map((r) => r[o]), j = c.every((r) => typeof r == "number");
376
+ /* @__PURE__ */ e(be, { height: M, children: ({ width: h, height: X, margin: b }) => {
377
+ const c = t.map((r) => r[o]), j = c.every((r) => typeof r == "number");
378
378
  let $, L;
379
379
  if (j) {
380
- const r = c, d = Math.min(...r), G = Math.max(...r), S = ot().domain([d, G]).range([0, f]);
380
+ const r = c, d = Math.min(...r), G = Math.max(...r), S = oe().domain([d, G]).range([0, h]);
381
381
  $ = S, L = (C) => S(Number(C[o]));
382
382
  } else {
383
- const r = c.map(String), d = Ct().domain(r).range([0, f]).padding(0.5);
383
+ const r = c.map(String), d = Ce().domain(r).range([0, h]).padding(0.5);
384
384
  $ = d, L = (G) => d(String(G[o])) ?? 0;
385
385
  }
386
- const u = e.flatMap(
386
+ const u = t.flatMap(
387
387
  (r) => a.map((d) => Number(r[d.key]) || 0)
388
- ), s = Math.max(...u), l = ot().domain([0, s * 1.1]).range([X, 0]).nice(), p = y ? dt : At, n = ft().curve(p).defined((r) => r != null);
389
- return /* @__PURE__ */ g(et, { children: [
390
- B && /* @__PURE__ */ t(
391
- ht,
388
+ ), s = Math.max(...u), l = oe().domain([0, s * 1.1]).range([X, 0]).nice(), p = y ? de : Ae, n = he().curve(p).defined((r) => r != null);
389
+ return /* @__PURE__ */ g(te, { children: [
390
+ B && /* @__PURE__ */ e(
391
+ fe,
392
392
  {
393
- width: f,
393
+ width: h,
394
394
  height: X,
395
395
  yScale: l,
396
396
  horizontal: !0
397
397
  }
398
398
  ),
399
399
  a.map((r, d) => {
400
- const S = n.x((C) => L(C)).y((C) => l(Number(C[r.key]) || 0))(e) ?? "";
400
+ const S = n.x((C) => L(C)).y((C) => l(Number(C[r.key]) || 0))(t) ?? "";
401
401
  return /* @__PURE__ */ g("g", { children: [
402
- /* @__PURE__ */ t(
402
+ /* @__PURE__ */ e(
403
403
  "path",
404
404
  {
405
405
  d: S,
@@ -410,9 +410,9 @@ const Ut = nt.forwardRef(
410
410
  strokeLinecap: "round"
411
411
  }
412
412
  ),
413
- h && e.map((C, W) => {
413
+ f && t.map((C, W) => {
414
414
  const m = L(C), v = l(Number(C[r.key]) || 0);
415
- return /* @__PURE__ */ t(
415
+ return /* @__PURE__ */ e(
416
416
  "circle",
417
417
  {
418
418
  cx: m,
@@ -426,9 +426,9 @@ const Ut = nt.forwardRef(
426
426
  })
427
427
  ] }, r.key);
428
428
  }),
429
- N && e.map((r, d) => {
430
- const G = L(r), S = f / Math.max(e.length - 1, 1);
431
- return /* @__PURE__ */ t(
429
+ N && t.map((r, d) => {
430
+ const G = L(r), S = h / Math.max(t.length - 1, 1);
431
+ return /* @__PURE__ */ e(
432
432
  "rect",
433
433
  {
434
434
  x: G - S / 2,
@@ -443,13 +443,13 @@ const Ut = nt.forwardRef(
443
443
  C.clientX - ((W == null ? void 0 : W.left) ?? 0),
444
444
  C.clientY - ((W == null ? void 0 : W.top) ?? 0),
445
445
  /* @__PURE__ */ g("div", { children: [
446
- /* @__PURE__ */ t("div", { className: "font-medium", children: String(r[o]) }),
446
+ /* @__PURE__ */ e("div", { className: "font-medium", children: String(r[o]) }),
447
447
  a.map((v, P) => /* @__PURE__ */ g(
448
448
  "div",
449
449
  {
450
450
  className: "flex items-center gap-ds-02",
451
451
  children: [
452
- /* @__PURE__ */ t(
452
+ /* @__PURE__ */ e(
453
453
  "span",
454
454
  {
455
455
  className: "inline-block h-2 w-2 rounded-ds-full",
@@ -474,8 +474,8 @@ const Ut = nt.forwardRef(
474
474
  `hover-${d}`
475
475
  );
476
476
  }),
477
- /* @__PURE__ */ t(
478
- tt,
477
+ /* @__PURE__ */ e(
478
+ ee,
479
479
  {
480
480
  scale: $,
481
481
  orientation: "bottom",
@@ -483,15 +483,15 @@ const Ut = nt.forwardRef(
483
483
  label: T
484
484
  }
485
485
  ),
486
- /* @__PURE__ */ t(tt, { scale: l, orientation: "left", label: D })
486
+ /* @__PURE__ */ e(ee, { scale: l, orientation: "left", label: D })
487
487
  ] });
488
488
  } }),
489
- N && /* @__PURE__ */ t(ut, { state: E }),
490
- A && a.length > 1 && /* @__PURE__ */ t(
491
- ct,
489
+ N && /* @__PURE__ */ e(ue, { state: E }),
490
+ A && a.length > 1 && /* @__PURE__ */ e(
491
+ ce,
492
492
  {
493
- items: a.map((f, X) => ({
494
- label: f.label,
493
+ items: a.map((h, X) => ({
494
+ label: h.label,
495
495
  color: Q[X]
496
496
  })),
497
497
  className: "mt-ds-04"
@@ -502,14 +502,14 @@ const Ut = nt.forwardRef(
502
502
  );
503
503
  }
504
504
  );
505
- Ut.displayName = "LineChart";
506
- const Zt = nt.forwardRef(
505
+ Ue.displayName = "LineChart";
506
+ const Ze = ne.forwardRef(
507
507
  ({
508
- data: e,
508
+ data: t,
509
509
  xKey: o,
510
510
  series: a,
511
511
  curved: y = !1,
512
- stacked: h = !1,
512
+ stacked: f = !1,
513
513
  fillOpacity: x = 0.3,
514
514
  gradient: i = !1,
515
515
  strokeWidth: M = 2,
@@ -523,38 +523,38 @@ const Zt = nt.forwardRef(
523
523
  className: w,
524
524
  ...Z
525
525
  }, E) => {
526
- const { tooltip: q, show: U, hide: O } = pt(), _ = lt(), Q = T && !_, f = a.map((b, c) => at(b.color, c)), X = nt.useId();
526
+ const { tooltip: q, show: U, hide: O } = pe(), _ = le(), Q = T && !_, h = a.map((b, c) => ae(b.color, c)), X = ne.useId();
527
527
  return /* @__PURE__ */ g(
528
- rt.div,
528
+ re.div,
529
529
  {
530
530
  ref: E,
531
531
  className: H("relative", w),
532
- ...Q ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: st.fade } : {},
533
- ...it(Z),
532
+ ...Q ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: se.fade } : {},
533
+ ...ie(Z),
534
534
  children: [
535
- /* @__PURE__ */ t(bt, { height: B, children: ({ width: b, height: c, margin: j }) => {
536
- const $ = e.map((m) => m[o]), L = $.every((m) => typeof m == "number");
535
+ /* @__PURE__ */ e(be, { height: B, children: ({ width: b, height: c, margin: j }) => {
536
+ const $ = t.map((m) => m[o]), L = $.every((m) => typeof m == "number");
537
537
  let u, s, l;
538
538
  if (L) {
539
- const m = $, v = Math.min(...m), P = Math.max(...m), I = ot().domain([v, P]).range([0, b]);
540
- u = I, s = (V) => I(Number(V[o])), l = (V) => I(Number(e[V][o]));
539
+ const m = $, v = Math.min(...m), P = Math.max(...m), I = oe().domain([v, P]).range([0, b]);
540
+ u = I, s = (V) => I(Number(V[o])), l = (V) => I(Number(t[V][o]));
541
541
  } else {
542
- const m = $.map(String), v = Ct().domain(m).range([0, b]).padding(0.5);
543
- u = v, s = (P) => v(String(P[o])) ?? 0, l = (P) => v(String(e[P][o])) ?? 0;
542
+ const m = $.map(String), v = Ce().domain(m).range([0, b]).padding(0.5);
543
+ u = v, s = (P) => v(String(P[o])) ?? 0, l = (P) => v(String(t[P][o])) ?? 0;
544
544
  }
545
545
  let p;
546
- h ? p = Math.max(
547
- ...e.map(
546
+ f ? p = Math.max(
547
+ ...t.map(
548
548
  (m) => a.reduce((v, P) => v + (Number(m[P.key]) || 0), 0)
549
549
  )
550
550
  ) : p = Math.max(
551
- ...e.flatMap(
551
+ ...t.flatMap(
552
552
  (m) => a.map((v) => Number(m[v.key]) || 0)
553
553
  )
554
554
  );
555
- const n = ot().domain([0, p * 1.1]).range([c, 0]).nice(), r = y ? dt : At, d = () => e.map((m, v) => {
556
- const P = s(m), I = b / Math.max(e.length - 1, 1);
557
- return /* @__PURE__ */ t(
555
+ const n = oe().domain([0, p * 1.1]).range([c, 0]).nice(), r = y ? de : Ae, d = () => t.map((m, v) => {
556
+ const P = s(m), I = b / Math.max(t.length - 1, 1);
557
+ return /* @__PURE__ */ e(
558
558
  "rect",
559
559
  {
560
560
  x: P - I / 2,
@@ -569,17 +569,17 @@ const Zt = nt.forwardRef(
569
569
  V.clientX - ((J == null ? void 0 : J.left) ?? 0),
570
570
  V.clientY - ((J == null ? void 0 : J.top) ?? 0),
571
571
  /* @__PURE__ */ g("div", { children: [
572
- /* @__PURE__ */ t("div", { className: "font-medium", children: String(m[o]) }),
572
+ /* @__PURE__ */ e("div", { className: "font-medium", children: String(m[o]) }),
573
573
  a.map((F, Y) => /* @__PURE__ */ g(
574
574
  "div",
575
575
  {
576
576
  className: "flex items-center gap-ds-02",
577
577
  children: [
578
- /* @__PURE__ */ t(
578
+ /* @__PURE__ */ e(
579
579
  "span",
580
580
  {
581
581
  className: "inline-block h-2 w-2 rounded-ds-full",
582
- style: { backgroundColor: f[Y] }
582
+ style: { backgroundColor: h[Y] }
583
583
  }
584
584
  ),
585
585
  /* @__PURE__ */ g("span", { className: "text-surface-fg-muted", children: [
@@ -599,7 +599,7 @@ const Zt = nt.forwardRef(
599
599
  },
600
600
  `hover-${v}`
601
601
  );
602
- }), G = () => i ? /* @__PURE__ */ t("defs", { children: a.map((m, v) => /* @__PURE__ */ g(
602
+ }), G = () => i ? /* @__PURE__ */ e("defs", { children: a.map((m, v) => /* @__PURE__ */ g(
603
603
  "linearGradient",
604
604
  {
605
605
  id: `${X}-gradient-${v}`,
@@ -608,28 +608,28 @@ const Zt = nt.forwardRef(
608
608
  x2: "0",
609
609
  y2: "1",
610
610
  children: [
611
- /* @__PURE__ */ t(
611
+ /* @__PURE__ */ e(
612
612
  "stop",
613
613
  {
614
614
  offset: "0%",
615
- stopColor: f[v],
615
+ stopColor: h[v],
616
616
  stopOpacity: x
617
617
  }
618
618
  ),
619
- /* @__PURE__ */ t(
619
+ /* @__PURE__ */ e(
620
620
  "stop",
621
621
  {
622
622
  offset: "100%",
623
- stopColor: f[v],
623
+ stopColor: h[v],
624
624
  stopOpacity: 0.05
625
625
  }
626
626
  )
627
627
  ]
628
628
  },
629
629
  `grad-${v}`
630
- )) }) : null, S = () => /* @__PURE__ */ g(et, { children: [
631
- /* @__PURE__ */ t(
632
- tt,
630
+ )) }) : null, S = () => /* @__PURE__ */ g(te, { children: [
631
+ /* @__PURE__ */ e(
632
+ ee,
633
633
  {
634
634
  scale: u,
635
635
  orientation: "bottom",
@@ -637,19 +637,19 @@ const Zt = nt.forwardRef(
637
637
  label: D
638
638
  }
639
639
  ),
640
- /* @__PURE__ */ t(tt, { scale: n, orientation: "left", label: R })
640
+ /* @__PURE__ */ e(ee, { scale: n, orientation: "left", label: R })
641
641
  ] });
642
- if (h) {
643
- const m = a.map((z) => z.key), v = _t().keys(m).order(jt).offset(Tt), P = e.map((z) => {
642
+ if (f) {
643
+ const m = a.map((z) => z.key), v = _e().keys(m).order(je).offset(Te), P = t.map((z) => {
644
644
  const F = { [o]: String(z[o]) };
645
645
  for (const Y of a)
646
646
  F[Y.key] = Number(z[Y.key]) || 0;
647
647
  return F;
648
- }), I = v(P), V = Nt().curve(r).x((z, F) => l(F)).y0((z) => n(z[0])).y1((z) => n(z[1])), J = ft().curve(r).x((z, F) => l(F)).y((z) => n(z[1]));
649
- return /* @__PURE__ */ g(et, { children: [
648
+ }), I = v(P), V = Ne().curve(r).x((z, F) => l(F)).y0((z) => n(z[0])).y1((z) => n(z[1])), J = he().curve(r).x((z, F) => l(F)).y((z) => n(z[1]));
649
+ return /* @__PURE__ */ g(te, { children: [
650
650
  G(),
651
- N && /* @__PURE__ */ t(
652
- ht,
651
+ N && /* @__PURE__ */ e(
652
+ fe,
653
653
  {
654
654
  width: b,
655
655
  height: c,
@@ -658,22 +658,22 @@ const Zt = nt.forwardRef(
658
658
  }
659
659
  ),
660
660
  [...I].reverse().map((z, F) => {
661
- const Y = I.length - 1 - F, K = z, wt = V(K) ?? "", Lt = J(K) ?? "", Gt = i ? `url(#${X}-gradient-${Y})` : f[Y];
661
+ const Y = I.length - 1 - F, K = z, we = V(K) ?? "", Le = J(K) ?? "", Ge = i ? `url(#${X}-gradient-${Y})` : h[Y];
662
662
  return /* @__PURE__ */ g("g", { children: [
663
- /* @__PURE__ */ t(
663
+ /* @__PURE__ */ e(
664
664
  "path",
665
665
  {
666
- d: wt,
667
- fill: Gt,
666
+ d: we,
667
+ fill: Ge,
668
668
  opacity: i ? 1 : x
669
669
  }
670
670
  ),
671
- /* @__PURE__ */ t(
671
+ /* @__PURE__ */ e(
672
672
  "path",
673
673
  {
674
- d: Lt,
674
+ d: Le,
675
675
  fill: "none",
676
- stroke: f[Y],
676
+ stroke: h[Y],
677
677
  strokeWidth: M,
678
678
  strokeLinejoin: "round",
679
679
  strokeLinecap: "round"
@@ -685,11 +685,11 @@ const Zt = nt.forwardRef(
685
685
  S()
686
686
  ] });
687
687
  }
688
- const C = Nt().curve(r).defined((m) => m != null), W = ft().curve(r).defined((m) => m != null);
689
- return /* @__PURE__ */ g(et, { children: [
688
+ const C = Ne().curve(r).defined((m) => m != null), W = he().curve(r).defined((m) => m != null);
689
+ return /* @__PURE__ */ g(te, { children: [
690
690
  G(),
691
- N && /* @__PURE__ */ t(
692
- ht,
691
+ N && /* @__PURE__ */ e(
692
+ fe,
693
693
  {
694
694
  width: b,
695
695
  height: c,
@@ -698,9 +698,9 @@ const Zt = nt.forwardRef(
698
698
  }
699
699
  ),
700
700
  [...a].reverse().map((m, v) => {
701
- const P = a.length - 1 - v, I = C.x((Y) => s(Y)).y0(c).y1((Y) => n(Number(Y[m.key]) || 0)), V = W.x((Y) => s(Y)).y((Y) => n(Number(Y[m.key]) || 0)), J = I(e) ?? "", z = V(e) ?? "", F = i ? `url(#${X}-gradient-${P})` : f[P];
701
+ const P = a.length - 1 - v, I = C.x((Y) => s(Y)).y0(c).y1((Y) => n(Number(Y[m.key]) || 0)), V = W.x((Y) => s(Y)).y((Y) => n(Number(Y[m.key]) || 0)), J = I(t) ?? "", z = V(t) ?? "", F = i ? `url(#${X}-gradient-${P})` : h[P];
702
702
  return /* @__PURE__ */ g("g", { children: [
703
- /* @__PURE__ */ t(
703
+ /* @__PURE__ */ e(
704
704
  "path",
705
705
  {
706
706
  d: J,
@@ -708,12 +708,12 @@ const Zt = nt.forwardRef(
708
708
  opacity: i ? 1 : x
709
709
  }
710
710
  ),
711
- /* @__PURE__ */ t(
711
+ /* @__PURE__ */ e(
712
712
  "path",
713
713
  {
714
714
  d: z,
715
715
  fill: "none",
716
- stroke: f[P],
716
+ stroke: h[P],
717
717
  strokeWidth: M,
718
718
  strokeLinejoin: "round",
719
719
  strokeLinecap: "round"
@@ -725,13 +725,13 @@ const Zt = nt.forwardRef(
725
725
  S()
726
726
  ] });
727
727
  } }),
728
- A && /* @__PURE__ */ t(ut, { state: q }),
729
- k && a.length > 1 && /* @__PURE__ */ t(
730
- ct,
728
+ A && /* @__PURE__ */ e(ue, { state: q }),
729
+ k && a.length > 1 && /* @__PURE__ */ e(
730
+ ce,
731
731
  {
732
732
  items: a.map((b, c) => ({
733
733
  label: b.label,
734
- color: f[c]
734
+ color: h[c]
735
735
  })),
736
736
  className: "mt-ds-04"
737
737
  }
@@ -741,14 +741,14 @@ const Zt = nt.forwardRef(
741
741
  );
742
742
  }
743
743
  );
744
- Zt.displayName = "AreaChart";
745
- const qt = nt.forwardRef(
744
+ Ze.displayName = "AreaChart";
745
+ const qe = ne.forwardRef(
746
746
  ({
747
- data: e,
747
+ data: t,
748
748
  variant: o = "pie",
749
749
  innerRadius: a = 0.6,
750
750
  padAngle: y = 0,
751
- cornerRadius: h = 0,
751
+ cornerRadius: f = 0,
752
752
  height: x = 300,
753
753
  showTooltip: i = !0,
754
754
  showLegend: M = !1,
@@ -758,8 +758,8 @@ const qt = nt.forwardRef(
758
758
  centerLabel: k,
759
759
  ...T
760
760
  }, D) => {
761
- const R = yt(null), [w, Z] = mt(0), [E, q] = mt(null), { tooltip: U, show: O, hide: _ } = pt(), Q = lt(), f = N && !Q;
762
- xt(() => {
761
+ const R = ye(null), [w, Z] = me(0), [E, q] = me(null), { tooltip: U, show: O, hide: _ } = pe(), Q = le(), h = N && !Q;
762
+ xe(() => {
763
763
  if (!R.current) return;
764
764
  const n = new ResizeObserver((r) => {
765
765
  const d = r[0];
@@ -767,19 +767,19 @@ const qt = nt.forwardRef(
767
767
  });
768
768
  return n.observe(R.current), () => n.disconnect();
769
769
  }, []);
770
- const b = (w > 0 ? Math.min(w, x) : x) / 2, c = o === "donut" ? b * a : 0, j = e.map((n, r) => at(n.color, r)), $ = e.reduce((n, r) => n + r.value, 0), u = Yt().value((n) => n.value).padAngle(y).sort(null)(e), s = vt().innerRadius(c).outerRadius(b - 2).cornerRadius(h), l = c + (b - 2 - c) * 0.7, p = vt().innerRadius(l).outerRadius(l);
770
+ const b = (w > 0 ? Math.min(w, x) : x) / 2, c = o === "donut" ? b * a : 0, j = t.map((n, r) => ae(n.color, r)), $ = t.reduce((n, r) => n + r.value, 0), u = Ye().value((n) => n.value).padAngle(y).sort(null)(t), s = ve().innerRadius(c).outerRadius(b - 2).cornerRadius(f), l = c + (b - 2 - c) * 0.7, p = ve().innerRadius(l).outerRadius(l);
771
771
  return /* @__PURE__ */ g(
772
- rt.div,
772
+ re.div,
773
773
  {
774
774
  ref: (n) => {
775
775
  R.current = n, typeof D == "function" ? D(n) : D && (D.current = n);
776
776
  },
777
777
  className: H("relative w-full", A),
778
- ...f ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: st.fade } : {},
779
- ...it(T),
778
+ ...h ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: se.fade } : {},
779
+ ...ie(T),
780
780
  children: [
781
- w > 0 && /* @__PURE__ */ g(et, { children: [
782
- /* @__PURE__ */ t(
781
+ w > 0 && /* @__PURE__ */ g(te, { children: [
782
+ /* @__PURE__ */ e(
783
783
  "svg",
784
784
  {
785
785
  width: w,
@@ -791,7 +791,7 @@ const qt = nt.forwardRef(
791
791
  const d = s(n);
792
792
  if (!d) return null;
793
793
  const [G, S] = s.centroid(n), C = Math.atan2(S, G), W = Math.cos(C) * 4, m = Math.sin(C) * 4, v = E === r;
794
- return /* @__PURE__ */ t(
794
+ return /* @__PURE__ */ e(
795
795
  "path",
796
796
  {
797
797
  d,
@@ -809,7 +809,7 @@ const qt = nt.forwardRef(
809
809
  P.clientX - ((V == null ? void 0 : V.left) ?? 0),
810
810
  P.clientY - ((V == null ? void 0 : V.top) ?? 0),
811
811
  /* @__PURE__ */ g("div", { children: [
812
- /* @__PURE__ */ t("div", { className: "font-medium", children: n.data.label }),
812
+ /* @__PURE__ */ e("div", { className: "font-medium", children: n.data.label }),
813
813
  /* @__PURE__ */ g("div", { children: [
814
814
  n.data.value.toLocaleString(),
815
815
  " (",
@@ -845,25 +845,25 @@ const qt = nt.forwardRef(
845
845
  `label-${n.data.label}-${r}`
846
846
  );
847
847
  }),
848
- o === "donut" && k && c > 0 && /* @__PURE__ */ t(
848
+ o === "donut" && k && c > 0 && /* @__PURE__ */ e(
849
849
  "foreignObject",
850
850
  {
851
851
  x: -c * 0.7,
852
852
  y: -c * 0.7,
853
853
  width: c * 1.4,
854
854
  height: c * 1.4,
855
- children: /* @__PURE__ */ t("div", { className: "flex h-full w-full items-center justify-center text-center text-surface-fg", children: k })
855
+ children: /* @__PURE__ */ e("div", { className: "flex h-full w-full items-center justify-center text-center text-surface-fg", children: k })
856
856
  }
857
857
  )
858
858
  ] })
859
859
  }
860
860
  ),
861
- i && /* @__PURE__ */ t(ut, { state: U })
861
+ i && /* @__PURE__ */ e(ue, { state: U })
862
862
  ] }),
863
- M && /* @__PURE__ */ t(
864
- ct,
863
+ M && /* @__PURE__ */ e(
864
+ ce,
865
865
  {
866
- items: e.map((n, r) => ({
866
+ items: t.map((n, r) => ({
867
867
  label: n.label,
868
868
  color: j[r]
869
869
  })),
@@ -875,29 +875,29 @@ const qt = nt.forwardRef(
875
875
  );
876
876
  }
877
877
  );
878
- qt.displayName = "PieChart";
879
- const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
878
+ qe.displayName = "PieChart";
879
+ const $e = { duration: 1, ease: "easeOut" }, Je = ne.forwardRef(
880
880
  ({
881
- data: e,
881
+ data: t,
882
882
  variant: o = "line",
883
883
  width: a = 120,
884
884
  height: y = 32,
885
- color: h,
885
+ color: f,
886
886
  showLastDot: x = !1,
887
887
  strokeWidth: i = 1.5,
888
888
  animate: M = !0,
889
889
  className: B,
890
890
  ...N
891
891
  }, A) => {
892
- const k = at(h, 0), T = lt(), D = M && !T;
893
- if (!e.length) return null;
894
- const R = o === "bar" ? 1 : i, w = a - R * 2, Z = y - R * 2, E = ot().domain([0, Math.max(e.length - 1, 1)]).range([R, R + w]), q = Math.min(...e), U = Math.max(...e), O = q === U ? [q - 1, U + 1] : [q, U], _ = ot().domain(O).range([R + Z, R]);
892
+ const k = ae(f, 0), T = le(), D = M && !T;
893
+ if (!t.length) return null;
894
+ const R = o === "bar" ? 1 : i, w = a - R * 2, Z = y - R * 2, E = oe().domain([0, Math.max(t.length - 1, 1)]).range([R, R + w]), q = Math.min(...t), U = Math.max(...t), O = q === U ? [q - 1, U + 1] : [q, U], _ = oe().domain(O).range([R + Z, R]);
895
895
  if (o === "bar") {
896
896
  const j = Math.max(
897
897
  1,
898
- (w - 1 * (e.length - 1)) / e.length
898
+ (w - 1 * (t.length - 1)) / t.length
899
899
  ), $ = R + Z;
900
- return /* @__PURE__ */ t(
900
+ return /* @__PURE__ */ e(
901
901
  "svg",
902
902
  {
903
903
  ref: A,
@@ -907,9 +907,9 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
907
907
  "aria-label": "Sparkline bar chart",
908
908
  className: H("inline-block align-middle", B),
909
909
  ...N,
910
- children: e.map((L, u) => {
910
+ children: t.map((L, u) => {
911
911
  const s = R + u * (j + 1), l = _(L), p = Math.max(1, $ - l);
912
- return /* @__PURE__ */ t(
912
+ return /* @__PURE__ */ e(
913
913
  "rect",
914
914
  {
915
915
  x: s,
@@ -926,7 +926,7 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
926
926
  );
927
927
  }
928
928
  if (o === "area") {
929
- const c = Nt().curve(dt).x((l, p) => E(p)).y0(R + Z).y1((l) => _(l)), j = ft().curve(dt).x((l, p) => E(p)).y((l) => _(l)), $ = c(e) ?? "", L = j(e) ?? "", u = E(e.length - 1), s = _(e[e.length - 1]);
929
+ const c = Ne().curve(de).x((l, p) => E(p)).y0(R + Z).y1((l) => _(l)), j = he().curve(de).x((l, p) => E(p)).y((l) => _(l)), $ = c(t) ?? "", L = j(t) ?? "", u = E(t.length - 1), s = _(t[t.length - 1]);
930
930
  return /* @__PURE__ */ g(
931
931
  "svg",
932
932
  {
@@ -938,9 +938,9 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
938
938
  className: H("inline-block align-middle", B),
939
939
  ...N,
940
940
  children: [
941
- /* @__PURE__ */ t("path", { d: $, fill: k, opacity: 0.2 }),
942
- D ? /* @__PURE__ */ t(
943
- rt.path,
941
+ /* @__PURE__ */ e("path", { d: $, fill: k, opacity: 0.2 }),
942
+ D ? /* @__PURE__ */ e(
943
+ re.path,
944
944
  {
945
945
  d: L,
946
946
  fill: "none",
@@ -950,9 +950,9 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
950
950
  strokeLinecap: "round",
951
951
  initial: { pathLength: 0 },
952
952
  animate: { pathLength: 1 },
953
- transition: $t
953
+ transition: $e
954
954
  }
955
- ) : /* @__PURE__ */ t(
955
+ ) : /* @__PURE__ */ e(
956
956
  "path",
957
957
  {
958
958
  d: L,
@@ -963,7 +963,7 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
963
963
  strokeLinecap: "round"
964
964
  }
965
965
  ),
966
- x && /* @__PURE__ */ t(
966
+ x && /* @__PURE__ */ e(
967
967
  "circle",
968
968
  {
969
969
  cx: u,
@@ -976,7 +976,7 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
976
976
  }
977
977
  );
978
978
  }
979
- const f = ft().curve(dt).x((c, j) => E(j)).y((c) => _(c))(e) ?? "", X = E(e.length - 1), b = _(e[e.length - 1]);
979
+ const h = he().curve(de).x((c, j) => E(j)).y((c) => _(c))(t) ?? "", X = E(t.length - 1), b = _(t[t.length - 1]);
980
980
  return /* @__PURE__ */ g(
981
981
  "svg",
982
982
  {
@@ -988,10 +988,10 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
988
988
  className: H("inline-block align-middle", B),
989
989
  ...N,
990
990
  children: [
991
- D ? /* @__PURE__ */ t(
992
- rt.path,
991
+ D ? /* @__PURE__ */ e(
992
+ re.path,
993
993
  {
994
- d: f,
994
+ d: h,
995
995
  fill: "none",
996
996
  stroke: k,
997
997
  strokeWidth: i,
@@ -999,12 +999,12 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
999
999
  strokeLinecap: "round",
1000
1000
  initial: { pathLength: 0 },
1001
1001
  animate: { pathLength: 1 },
1002
- transition: $t
1002
+ transition: $e
1003
1003
  }
1004
- ) : /* @__PURE__ */ t(
1004
+ ) : /* @__PURE__ */ e(
1005
1005
  "path",
1006
1006
  {
1007
- d: f,
1007
+ d: h,
1008
1008
  fill: "none",
1009
1009
  stroke: k,
1010
1010
  strokeWidth: i,
@@ -1012,7 +1012,7 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
1012
1012
  strokeLinecap: "round"
1013
1013
  }
1014
1014
  ),
1015
- x && /* @__PURE__ */ t(
1015
+ x && /* @__PURE__ */ e(
1016
1016
  "circle",
1017
1017
  {
1018
1018
  cx: X,
@@ -1026,14 +1026,14 @@ const $t = { duration: 1, ease: "easeOut" }, Jt = nt.forwardRef(
1026
1026
  );
1027
1027
  }
1028
1028
  );
1029
- Jt.displayName = "Sparkline";
1030
- const gt = (e) => e * Math.PI / 180, Qt = nt.forwardRef(
1029
+ Je.displayName = "Sparkline";
1030
+ const ge = (t) => t * Math.PI / 180, Qe = ne.forwardRef(
1031
1031
  ({
1032
- value: e,
1032
+ value: t,
1033
1033
  max: o = 100,
1034
1034
  min: a = 0,
1035
1035
  label: y,
1036
- valueLabel: h,
1036
+ valueLabel: f,
1037
1037
  color: x,
1038
1038
  trackColor: i = "var(--color-surface-border)",
1039
1039
  height: M = 200,
@@ -1044,22 +1044,22 @@ const gt = (e) => e * Math.PI / 180, Qt = nt.forwardRef(
1044
1044
  className: T,
1045
1045
  ...D
1046
1046
  }, R) => {
1047
- const w = lt(), Z = Ft(w, k ? 600 : 0), E = k && !w, q = at(x, 0), U = M, O = U / 2, _ = Math.min(Math.max(e, a), o), Q = o === a ? 0 : (_ - a) / (o - a), f = B + (N - B) * Q, X = typeof h == "function" ? h(_) : typeof h == "string" ? h : String(_), b = vt().innerRadius(O - A).outerRadius(O).startAngle(gt(B)).endAngle(gt(N)).cornerRadius(A / 2), c = vt().innerRadius(O - A).outerRadius(O).startAngle(gt(B)).endAngle(gt(f)).cornerRadius(A / 2), j = b(null) ?? "", $ = c(null) ?? "";
1048
- return /* @__PURE__ */ t(
1049
- rt.div,
1047
+ const w = le(), Z = Fe(w, k ? 600 : 0), E = k && !w, q = ae(x, 0), U = M, O = U / 2, _ = Math.min(Math.max(t, a), o), Q = o === a ? 0 : (_ - a) / (o - a), h = B + (N - B) * Q, X = typeof f == "function" ? f(_) : typeof f == "string" ? f : String(_), b = ve().innerRadius(O - A).outerRadius(O).startAngle(ge(B)).endAngle(ge(N)).cornerRadius(A / 2), c = ve().innerRadius(O - A).outerRadius(O).startAngle(ge(B)).endAngle(ge(h)).cornerRadius(A / 2), j = b(null) ?? "", $ = c(null) ?? "";
1048
+ return /* @__PURE__ */ e(
1049
+ re.div,
1050
1050
  {
1051
1051
  ref: R,
1052
1052
  className: H("inline-flex flex-col items-center", T),
1053
- ...E ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: st.fade } : {},
1054
- ...it(D),
1053
+ ...E ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: se.fade } : {},
1054
+ ...ie(D),
1055
1055
  role: "meter",
1056
1056
  "aria-valuenow": _,
1057
1057
  "aria-valuemin": a,
1058
1058
  "aria-valuemax": o,
1059
1059
  "aria-label": y ?? "Gauge chart",
1060
- children: /* @__PURE__ */ t("svg", { width: U, height: U, role: "img", "aria-hidden": "true", children: /* @__PURE__ */ g("g", { transform: `translate(${O},${O})`, children: [
1061
- /* @__PURE__ */ t("path", { d: j, fill: i }),
1062
- /* @__PURE__ */ t(
1060
+ children: /* @__PURE__ */ e("svg", { width: U, height: U, role: "img", "aria-hidden": "true", children: /* @__PURE__ */ g("g", { transform: `translate(${O},${O})`, children: [
1061
+ /* @__PURE__ */ e("path", { d: j, fill: i }),
1062
+ /* @__PURE__ */ e(
1063
1063
  "path",
1064
1064
  {
1065
1065
  d: $,
@@ -1067,7 +1067,7 @@ const gt = (e) => e * Math.PI / 180, Qt = nt.forwardRef(
1067
1067
  style: Z > 0 ? { transition: `d ${Z}ms ease-out` } : void 0
1068
1068
  }
1069
1069
  ),
1070
- /* @__PURE__ */ t(
1070
+ /* @__PURE__ */ e(
1071
1071
  "text",
1072
1072
  {
1073
1073
  x: 0,
@@ -1078,7 +1078,7 @@ const gt = (e) => e * Math.PI / 180, Qt = nt.forwardRef(
1078
1078
  children: X
1079
1079
  }
1080
1080
  ),
1081
- y && /* @__PURE__ */ t(
1081
+ y && /* @__PURE__ */ e(
1082
1082
  "text",
1083
1083
  {
1084
1084
  x: 0,
@@ -1094,14 +1094,14 @@ const gt = (e) => e * Math.PI / 180, Qt = nt.forwardRef(
1094
1094
  );
1095
1095
  }
1096
1096
  );
1097
- Qt.displayName = "GaugeChart";
1098
- const Ht = nt.forwardRef(
1097
+ Qe.displayName = "GaugeChart";
1098
+ const He = ne.forwardRef(
1099
1099
  ({
1100
- data: e,
1100
+ data: t,
1101
1101
  axes: o,
1102
1102
  series: a,
1103
1103
  maxValue: y,
1104
- levels: h = 5,
1104
+ levels: f = 5,
1105
1105
  fillOpacity: x = 0.25,
1106
1106
  showDots: i = !1,
1107
1107
  height: M = 300,
@@ -1111,8 +1111,8 @@ const Ht = nt.forwardRef(
1111
1111
  className: k,
1112
1112
  ...T
1113
1113
  }, D) => {
1114
- const R = yt(null), [w, Z] = mt(0), { tooltip: E, show: q, hide: U } = pt(), O = lt(), _ = A && !O;
1115
- xt(() => {
1114
+ const R = ye(null), [w, Z] = me(0), { tooltip: E, show: q, hide: U } = pe(), O = le(), _ = A && !O;
1115
+ xe(() => {
1116
1116
  if (!R.current) return;
1117
1117
  const u = new ResizeObserver((s) => {
1118
1118
  const l = s[0];
@@ -1120,31 +1120,31 @@ const Ht = nt.forwardRef(
1120
1120
  });
1121
1121
  return u.observe(R.current), () => u.disconnect();
1122
1122
  }, []);
1123
- const f = (w > 0 ? Math.min(w, M) : M) / 2 - 40, X = a.map((u, s) => at(u.color, s)), b = y ?? Math.max(
1124
- ...e.flatMap((u) => a.map((s) => Number(u[s.key]) || 0)),
1123
+ const h = (w > 0 ? Math.min(w, M) : M) / 2 - 40, X = a.map((u, s) => ae(u.color, s)), b = y ?? Math.max(
1124
+ ...t.flatMap((u) => a.map((s) => Number(u[s.key]) || 0)),
1125
1125
  1
1126
- ), c = 2 * Math.PI / o.length, j = Ot().radius((u) => f * u / b).angle((u, s) => s * c).curve(Wt), $ = (u) => o.map((s, l) => {
1126
+ ), c = 2 * Math.PI / o.length, j = Oe().radius((u) => h * u / b).angle((u, s) => s * c).curve(We), $ = (u) => o.map((s, l) => {
1127
1127
  var p;
1128
- return Number((p = e[l]) == null ? void 0 : p[u]) || 0;
1128
+ return Number((p = t[l]) == null ? void 0 : p[u]) || 0;
1129
1129
  }), L = (u, s) => {
1130
- const l = c * u - Math.PI / 2, p = f * s / b;
1130
+ const l = c * u - Math.PI / 2, p = h * s / b;
1131
1131
  return {
1132
1132
  x: p * Math.cos(l),
1133
1133
  y: p * Math.sin(l)
1134
1134
  };
1135
1135
  };
1136
1136
  return /* @__PURE__ */ g(
1137
- rt.div,
1137
+ re.div,
1138
1138
  {
1139
1139
  ref: (u) => {
1140
1140
  R.current = u, typeof D == "function" ? D(u) : D && (D.current = u);
1141
1141
  },
1142
1142
  className: H("relative w-full", k),
1143
- ..._ ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: st.fade } : {},
1144
- ...it(T),
1143
+ ..._ ? { initial: { opacity: 0, scale: 0.96 }, animate: { opacity: 1, scale: 1 }, transition: se.fade } : {},
1144
+ ...ie(T),
1145
1145
  children: [
1146
- w > 0 && /* @__PURE__ */ g(et, { children: [
1147
- /* @__PURE__ */ t(
1146
+ w > 0 && /* @__PURE__ */ g(te, { children: [
1147
+ /* @__PURE__ */ e(
1148
1148
  "svg",
1149
1149
  {
1150
1150
  width: w,
@@ -1152,12 +1152,12 @@ const Ht = nt.forwardRef(
1152
1152
  role: "img",
1153
1153
  "aria-label": "Radar chart",
1154
1154
  children: /* @__PURE__ */ g("g", { transform: `translate(${w / 2},${M / 2})`, children: [
1155
- Array.from({ length: h }, (u, s) => {
1156
- const l = f / h * (s + 1), p = o.map((n, r) => {
1155
+ Array.from({ length: f }, (u, s) => {
1156
+ const l = h / f * (s + 1), p = o.map((n, r) => {
1157
1157
  const d = c * r - Math.PI / 2;
1158
1158
  return `${l * Math.cos(d)},${l * Math.sin(d)}`;
1159
1159
  }).join(" ");
1160
- return /* @__PURE__ */ t(
1160
+ return /* @__PURE__ */ e(
1161
1161
  "polygon",
1162
1162
  {
1163
1163
  points: p,
@@ -1170,8 +1170,8 @@ const Ht = nt.forwardRef(
1170
1170
  );
1171
1171
  }),
1172
1172
  o.map((u, s) => {
1173
- const l = c * s - Math.PI / 2, p = f * Math.cos(l), n = f * Math.sin(l);
1174
- return /* @__PURE__ */ t(
1173
+ const l = c * s - Math.PI / 2, p = h * Math.cos(l), n = h * Math.sin(l);
1174
+ return /* @__PURE__ */ e(
1175
1175
  "line",
1176
1176
  {
1177
1177
  x1: 0,
@@ -1185,9 +1185,9 @@ const Ht = nt.forwardRef(
1185
1185
  );
1186
1186
  }),
1187
1187
  o.map((u, s) => {
1188
- const l = c * s - Math.PI / 2, p = f + 18, n = p * Math.cos(l), r = p * Math.sin(l);
1188
+ const l = c * s - Math.PI / 2, p = h + 18, n = p * Math.cos(l), r = p * Math.sin(l);
1189
1189
  let d = "middle";
1190
- return Math.abs(Math.cos(l)) > 0.1 && (d = Math.cos(l) > 0 ? "start" : "end"), /* @__PURE__ */ t(
1190
+ return Math.abs(Math.cos(l)) > 0.1 && (d = Math.cos(l) > 0 ? "start" : "end"), /* @__PURE__ */ e(
1191
1191
  "text",
1192
1192
  {
1193
1193
  x: n,
@@ -1200,9 +1200,9 @@ const Ht = nt.forwardRef(
1200
1200
  `label-${s}`
1201
1201
  );
1202
1202
  }),
1203
- Array.from({ length: h }, (u, s) => {
1204
- const l = Math.round(b / h * (s + 1)), p = f / h * (s + 1), n = -Math.PI / 2, r = p * Math.cos(n) + 4, d = p * Math.sin(n);
1205
- return /* @__PURE__ */ t(
1203
+ Array.from({ length: f }, (u, s) => {
1204
+ const l = Math.round(b / f * (s + 1)), p = h / f * (s + 1), n = -Math.PI / 2, r = p * Math.cos(n) + 4, d = p * Math.sin(n);
1205
+ return /* @__PURE__ */ e(
1206
1206
  "text",
1207
1207
  {
1208
1208
  x: r,
@@ -1218,7 +1218,7 @@ const Ht = nt.forwardRef(
1218
1218
  a.map((u, s) => {
1219
1219
  const l = $(u.key), p = j(l);
1220
1220
  return p ? /* @__PURE__ */ g("g", { children: [
1221
- /* @__PURE__ */ t(
1221
+ /* @__PURE__ */ e(
1222
1222
  "path",
1223
1223
  {
1224
1224
  d: p,
@@ -1231,14 +1231,14 @@ const Ht = nt.forwardRef(
1231
1231
  ),
1232
1232
  i && l.map((n, r) => {
1233
1233
  const { x: d, y: G } = L(r, n);
1234
- return /* @__PURE__ */ t(
1234
+ return /* @__PURE__ */ e(
1235
1235
  "circle",
1236
1236
  {
1237
1237
  cx: d,
1238
1238
  cy: G,
1239
1239
  r: 4,
1240
1240
  fill: X[s],
1241
- stroke: "var(--color-surface-1)",
1241
+ stroke: "var(--color-surface-base)",
1242
1242
  strokeWidth: 2,
1243
1243
  className: "transition-opacity"
1244
1244
  },
@@ -1248,8 +1248,8 @@ const Ht = nt.forwardRef(
1248
1248
  ] }, u.key) : null;
1249
1249
  }),
1250
1250
  B && o.map((u, s) => {
1251
- const l = c * s - Math.PI / 2, p = f * Math.cos(l), n = f * Math.sin(l);
1252
- return /* @__PURE__ */ t(
1251
+ const l = c * s - Math.PI / 2, p = h * Math.cos(l), n = h * Math.sin(l);
1252
+ return /* @__PURE__ */ e(
1253
1253
  "circle",
1254
1254
  {
1255
1255
  cx: p,
@@ -1264,16 +1264,16 @@ const Ht = nt.forwardRef(
1264
1264
  r.clientX - ((d == null ? void 0 : d.left) ?? 0),
1265
1265
  r.clientY - ((d == null ? void 0 : d.top) ?? 0),
1266
1266
  /* @__PURE__ */ g("div", { children: [
1267
- /* @__PURE__ */ t("div", { className: "font-medium", children: u }),
1267
+ /* @__PURE__ */ e("div", { className: "font-medium", children: u }),
1268
1268
  a.map((S, C) => {
1269
1269
  var m;
1270
- const W = Number((m = e[s]) == null ? void 0 : m[S.key]) || 0;
1270
+ const W = Number((m = t[s]) == null ? void 0 : m[S.key]) || 0;
1271
1271
  return /* @__PURE__ */ g(
1272
1272
  "div",
1273
1273
  {
1274
1274
  className: "flex items-center gap-ds-02",
1275
1275
  children: [
1276
- /* @__PURE__ */ t(
1276
+ /* @__PURE__ */ e(
1277
1277
  "span",
1278
1278
  {
1279
1279
  className: "inline-block h-2 w-2 rounded-ds-full",
@@ -1302,10 +1302,10 @@ const Ht = nt.forwardRef(
1302
1302
  ] })
1303
1303
  }
1304
1304
  ),
1305
- B && /* @__PURE__ */ t(ut, { state: E })
1305
+ B && /* @__PURE__ */ e(ue, { state: E })
1306
1306
  ] }),
1307
- N && /* @__PURE__ */ t(
1308
- ct,
1307
+ N && /* @__PURE__ */ e(
1308
+ ce,
1309
1309
  {
1310
1310
  items: a.map((u, s) => ({
1311
1311
  label: u.label,
@@ -1319,15 +1319,15 @@ const Ht = nt.forwardRef(
1319
1319
  );
1320
1320
  }
1321
1321
  );
1322
- Ht.displayName = "RadarChart";
1322
+ He.displayName = "RadarChart";
1323
1323
  export {
1324
- Zt as AreaChart,
1325
- Et as BarChart,
1326
- bt as ChartContainer,
1327
- Qt as GaugeChart,
1328
- ct as Legend,
1329
- Ut as LineChart,
1330
- qt as PieChart,
1331
- Ht as RadarChart,
1332
- Jt as Sparkline
1324
+ Ze as AreaChart,
1325
+ Ee as BarChart,
1326
+ be as ChartContainer,
1327
+ Qe as GaugeChart,
1328
+ ce as Legend,
1329
+ Ue as LineChart,
1330
+ qe as PieChart,
1331
+ He as RadarChart,
1332
+ Je as Sparkline
1333
1333
  };