@gears-frontx/ui-kit 0.4.0-alpha.4 → 0.4.0-alpha.6

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 (246) hide show
  1. package/README.md +1 -1
  2. package/dist/accordion.js +7 -7
  3. package/dist/alert-dialog.js +21 -21
  4. package/dist/alert.js +19 -19
  5. package/dist/attachment.js +11 -11
  6. package/dist/avatar.js +33 -33
  7. package/dist/badge.js +48 -25
  8. package/dist/badge.js.map +1 -1
  9. package/dist/bubble.js +38 -38
  10. package/dist/button-group.js +8 -8
  11. package/dist/button.js +40 -34
  12. package/dist/button.js.map +1 -1
  13. package/dist/calendar.js +30 -30
  14. package/dist/card.js +56 -33
  15. package/dist/card.js.map +1 -1
  16. package/dist/chart.js +183 -115
  17. package/dist/chart.js.map +1 -1
  18. package/dist/checkbox.js +12 -12
  19. package/dist/checkbox.js.map +1 -1
  20. package/dist/chunks/accordion.CXlSdkrc.css +1 -0
  21. package/dist/chunks/alert-dialog.C4aLtUC8.css +1 -0
  22. package/dist/chunks/alert.DsgRIXLn.css +1 -0
  23. package/dist/chunks/attachment.CZuZdlXC.css +1 -0
  24. package/dist/chunks/avatar.BMm-Z9l5.css +1 -0
  25. package/dist/chunks/badge.BCreEn3O.css +1 -0
  26. package/dist/chunks/bubble.Ccu0e3lY.css +1 -0
  27. package/dist/chunks/button-group.BB-_2uav.css +1 -0
  28. package/dist/chunks/button.DgUTlW0_.css +1 -0
  29. package/dist/chunks/calendar.Dtndav4F.css +1 -0
  30. package/dist/chunks/card.DdBl-usf.css +1 -0
  31. package/dist/chunks/checkbox.CrdIZhi1.css +1 -0
  32. package/dist/chunks/collapsible.BkLeBug_.css +1 -0
  33. package/dist/chunks/combobox.DZZ3tHP_.css +1 -0
  34. package/dist/chunks/command.BBW1Cy-M.css +1 -0
  35. package/dist/chunks/context-menu.D_HuTgqL.css +1 -0
  36. package/dist/chunks/data-table.DJJaM7bh.css +1 -0
  37. package/dist/chunks/dialog.Cpo8vChK.css +1 -0
  38. package/dist/chunks/drawer.D8l6-G8t.css +1 -0
  39. package/dist/chunks/dropdown-menu.TU3FHXbJ.css +1 -0
  40. package/dist/chunks/empty.DnAKlw2g.css +1 -0
  41. package/dist/chunks/field.CDoJmJUe.css +1 -0
  42. package/dist/chunks/hover-card.D00tbys5.css +1 -0
  43. package/dist/chunks/input-group.C7XgalVn.css +1 -0
  44. package/dist/chunks/input-otp.Dvxlngb4.css +1 -0
  45. package/dist/chunks/input.DORly3Cx.css +1 -0
  46. package/dist/chunks/{label.jrB9zD_G.css → label.s0Wrm1i-.css} +1 -1
  47. package/dist/chunks/{menubar.CxRNI9o4.css → menubar.CJcVQhPq.css} +1 -1
  48. package/dist/chunks/message.B9Rexp_f.css +1 -0
  49. package/dist/chunks/native-select.BosBdRAx.css +1 -0
  50. package/dist/chunks/navigation-menu.CuXMCPRN.css +1 -0
  51. package/dist/chunks/pagination.bFb5us_w.css +1 -0
  52. package/dist/chunks/popover.BYhwNKnZ.css +1 -0
  53. package/dist/chunks/progress.DjSEXfxh.css +1 -0
  54. package/dist/chunks/questionnaire.C-YTRjPE.css +1 -0
  55. package/dist/chunks/radio-group.CisvBT6g.css +1 -0
  56. package/dist/chunks/scroll-area.B0OVmDRX.css +1 -0
  57. package/dist/chunks/select.BFwI5rhI.css +1 -0
  58. package/dist/chunks/sheet.BWvXXyXk.css +1 -0
  59. package/dist/chunks/sidebar.DdEvMURX.css +1 -0
  60. package/dist/chunks/slider.inyNxx4y.css +1 -0
  61. package/dist/chunks/spinner.sH6x_1Uf.css +1 -0
  62. package/dist/chunks/status-dot.DWa2qGKe.css +1 -0
  63. package/dist/chunks/switch.D3_ZyuVP.css +1 -0
  64. package/dist/chunks/table.DR2nFT0x.css +1 -0
  65. package/dist/chunks/tabs.DFa0OYMo.css +1 -0
  66. package/dist/chunks/{textarea.ORRSI69B.css → textarea.DMphp0qh.css} +1 -1
  67. package/dist/chunks/toast.Dw-jW4YY.css +1 -0
  68. package/dist/chunks/toggle-group.BpWF6enM.css +1 -0
  69. package/dist/chunks/toggle.B82Id2zR.css +1 -0
  70. package/dist/chunks/tooltip.CFJyyz-O.css +1 -0
  71. package/dist/collapsible.js +7 -7
  72. package/dist/combobox.js +87 -87
  73. package/dist/command.js +28 -28
  74. package/dist/components/badge/badge.d.ts +5 -2
  75. package/dist/components/badge/badge.d.ts.map +1 -1
  76. package/dist/components/button/button.d.ts +1 -1
  77. package/dist/components/button/button.d.ts.map +1 -1
  78. package/dist/components/card/card.d.ts +10 -4
  79. package/dist/components/card/card.d.ts.map +1 -1
  80. package/dist/components/chart/chart.d.ts +7 -6
  81. package/dist/components/chart/chart.d.ts.map +1 -1
  82. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  83. package/dist/components/dropdown-menu/dropdown-menu.d.ts +9 -1
  84. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  85. package/dist/components/empty/empty.d.ts +11 -0
  86. package/dist/components/empty/empty.d.ts.map +1 -1
  87. package/dist/components/empty/public.d.ts +1 -1
  88. package/dist/components/empty/public.d.ts.map +1 -1
  89. package/dist/components/input-group/input-group.d.ts +5 -2
  90. package/dist/components/input-group/input-group.d.ts.map +1 -1
  91. package/dist/components/navigation-menu/navigation-menu.d.ts +7 -2
  92. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
  93. package/dist/components/pagination/pagination.d.ts +4 -6
  94. package/dist/components/pagination/pagination.d.ts.map +1 -1
  95. package/dist/components/popover/popover.d.ts +2 -2
  96. package/dist/components/popover/popover.d.ts.map +1 -1
  97. package/dist/components/select/select.d.ts +2 -2
  98. package/dist/components/select/select.d.ts.map +1 -1
  99. package/dist/components/spinner/spinner.d.ts +19 -3
  100. package/dist/components/spinner/spinner.d.ts.map +1 -1
  101. package/dist/components/status-dot/public.d.ts +2 -0
  102. package/dist/components/status-dot/public.d.ts.map +1 -0
  103. package/dist/components/status-dot/status-dot.d.ts +25 -0
  104. package/dist/components/status-dot/status-dot.d.ts.map +1 -0
  105. package/dist/components/table/table.d.ts +31 -5
  106. package/dist/components/table/table.d.ts.map +1 -1
  107. package/dist/components/tabs/tabs.d.ts +10 -2
  108. package/dist/components/tabs/tabs.d.ts.map +1 -1
  109. package/dist/components/toggle/toggle.d.ts +12 -2
  110. package/dist/components/toggle/toggle.d.ts.map +1 -1
  111. package/dist/components/toggle-group/toggle-group.d.ts +33 -4
  112. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
  113. package/dist/components/tooltip/tooltip.d.ts +5 -8
  114. package/dist/components/tooltip/tooltip.d.ts.map +1 -1
  115. package/dist/context-menu.js +54 -54
  116. package/dist/data-table.js +41 -41
  117. package/dist/dialog.js +39 -39
  118. package/dist/docs/alert-dialog.md +1 -1
  119. package/dist/docs/avatar.md +3 -1
  120. package/dist/docs/badge.md +42 -14
  121. package/dist/docs/button.md +3 -2
  122. package/dist/docs/card.md +6 -0
  123. package/dist/docs/chart.md +20 -14
  124. package/dist/docs/checkbox.md +6 -0
  125. package/dist/docs/command.md +4 -0
  126. package/dist/docs/data-table.md +12 -7
  127. package/dist/docs/dialog.md +3 -2
  128. package/dist/docs/dropdown-menu.md +6 -0
  129. package/dist/docs/empty.md +44 -9
  130. package/dist/docs/input-group.md +23 -3
  131. package/dist/docs/navigation-menu.md +14 -5
  132. package/dist/docs/pagination.md +18 -15
  133. package/dist/docs/popover.md +6 -0
  134. package/dist/docs/progress.md +6 -0
  135. package/dist/docs/questionnaire.md +4 -2
  136. package/dist/docs/select.md +8 -4
  137. package/dist/docs/sheet.md +8 -7
  138. package/dist/docs/spinner.md +35 -5
  139. package/dist/docs/status-dot.md +77 -0
  140. package/dist/docs/table.md +69 -25
  141. package/dist/docs/tabs.md +22 -7
  142. package/dist/docs/toggle-group.md +68 -9
  143. package/dist/docs/toggle.md +7 -1
  144. package/dist/docs/tooltip.md +5 -9
  145. package/dist/drawer.js +53 -53
  146. package/dist/dropdown-menu.js +102 -89
  147. package/dist/dropdown-menu.js.map +1 -1
  148. package/dist/empty.js +31 -21
  149. package/dist/empty.js.map +1 -1
  150. package/dist/field.js +24 -24
  151. package/dist/hover-card.js +14 -14
  152. package/dist/index.d.ts +1 -0
  153. package/dist/index.d.ts.map +1 -1
  154. package/dist/index.js +266 -261
  155. package/dist/index.js.map +1 -1
  156. package/dist/input-group.js +73 -50
  157. package/dist/input-group.js.map +1 -1
  158. package/dist/input-otp.js +3 -3
  159. package/dist/input.js +19 -19
  160. package/dist/label.js +1 -1
  161. package/dist/menubar.js +18 -18
  162. package/dist/message.js +11 -11
  163. package/dist/native-select.js +20 -20
  164. package/dist/navigation-menu.js +83 -64
  165. package/dist/navigation-menu.js.map +1 -1
  166. package/dist/pagination.js +39 -52
  167. package/dist/pagination.js.map +1 -1
  168. package/dist/popover.js +33 -31
  169. package/dist/popover.js.map +1 -1
  170. package/dist/progress.js +15 -15
  171. package/dist/questionnaire.js +72 -72
  172. package/dist/radio-group.js +7 -7
  173. package/dist/scroll-area.js +8 -8
  174. package/dist/select.js +82 -80
  175. package/dist/select.js.map +1 -1
  176. package/dist/sheet.js +46 -46
  177. package/dist/sidebar.js +130 -130
  178. package/dist/slider.js +14 -14
  179. package/dist/spinner.js +45 -13
  180. package/dist/spinner.js.map +1 -1
  181. package/dist/status-dot.d.ts +1 -0
  182. package/dist/status-dot.js +76 -0
  183. package/dist/status-dot.js.map +1 -0
  184. package/dist/switch.js +14 -14
  185. package/dist/table.js +221 -43
  186. package/dist/table.js.map +1 -1
  187. package/dist/tabs.js +44 -26
  188. package/dist/tabs.js.map +1 -1
  189. package/dist/textarea.js +5 -5
  190. package/dist/theme.css +222 -135
  191. package/dist/toast.js +26 -26
  192. package/dist/toggle-group.js +40 -25
  193. package/dist/toggle-group.js.map +1 -1
  194. package/dist/toggle.js +21 -11
  195. package/dist/toggle.js.map +1 -1
  196. package/dist/tooltip.js +37 -34
  197. package/dist/tooltip.js.map +1 -1
  198. package/llms.txt +26 -10
  199. package/package.json +1 -1
  200. package/dist/chunks/accordion.X_AK08Iv.css +0 -1
  201. package/dist/chunks/alert-dialog.B50f-Gsz.css +0 -1
  202. package/dist/chunks/alert.C5BedF7l.css +0 -1
  203. package/dist/chunks/attachment.GAZbWSyB.css +0 -1
  204. package/dist/chunks/avatar.DZUXl1ev.css +0 -1
  205. package/dist/chunks/badge.Bi22h20j.css +0 -1
  206. package/dist/chunks/bubble.DvN6QyQ1.css +0 -1
  207. package/dist/chunks/button-group.D0Ir-jbL.css +0 -1
  208. package/dist/chunks/button.DvAxXxKj.css +0 -1
  209. package/dist/chunks/calendar.Cnbv4EzY.css +0 -1
  210. package/dist/chunks/card.D3Ct_dza.css +0 -1
  211. package/dist/chunks/checkbox.CZfE_PkU.css +0 -1
  212. package/dist/chunks/collapsible.BQ-sU5sQ.css +0 -1
  213. package/dist/chunks/combobox.CtYpZAKB.css +0 -1
  214. package/dist/chunks/command.Km60IuqD.css +0 -1
  215. package/dist/chunks/context-menu.DwGCD0vN.css +0 -1
  216. package/dist/chunks/data-table.CtZdVSAU.css +0 -1
  217. package/dist/chunks/dialog.BxcZ12Gb.css +0 -1
  218. package/dist/chunks/drawer.BkS_qEHj.css +0 -1
  219. package/dist/chunks/dropdown-menu.C5TLD9JO.css +0 -1
  220. package/dist/chunks/empty.BlhsHrOz.css +0 -1
  221. package/dist/chunks/field.Ccqt897k.css +0 -1
  222. package/dist/chunks/hover-card.DmwvigMp.css +0 -1
  223. package/dist/chunks/input-group.CFIUP-Oh.css +0 -1
  224. package/dist/chunks/input-otp.XSpqyVij.css +0 -1
  225. package/dist/chunks/input.DvA_mTq8.css +0 -1
  226. package/dist/chunks/message.BhD5JDJK.css +0 -1
  227. package/dist/chunks/native-select.DF1QrNz4.css +0 -1
  228. package/dist/chunks/navigation-menu.C2JGHAKD.css +0 -1
  229. package/dist/chunks/pagination.DUiQuWla.css +0 -1
  230. package/dist/chunks/popover.fOvPrnsr.css +0 -1
  231. package/dist/chunks/progress.Bp13t8iw.css +0 -1
  232. package/dist/chunks/questionnaire.D-u_K3Co.css +0 -1
  233. package/dist/chunks/radio-group.CV3MBCsI.css +0 -1
  234. package/dist/chunks/scroll-area.C4kWMAsU.css +0 -1
  235. package/dist/chunks/select.iEwV-sfJ.css +0 -1
  236. package/dist/chunks/sheet.DALPg9vf.css +0 -1
  237. package/dist/chunks/sidebar.CGTQhfWG.css +0 -1
  238. package/dist/chunks/slider.B5nouD7J.css +0 -1
  239. package/dist/chunks/spinner.UKK4f1tu.css +0 -1
  240. package/dist/chunks/switch.CIW9Jr1x.css +0 -1
  241. package/dist/chunks/table.BpnQ6j85.css +0 -1
  242. package/dist/chunks/tabs.4MEFBvw-.css +0 -1
  243. package/dist/chunks/toast.uUtCEAiv.css +0 -1
  244. package/dist/chunks/toggle-group.Bd0cCCnV.css +0 -1
  245. package/dist/chunks/toggle.B9tvfl1n.css +0 -1
  246. package/dist/chunks/tooltip.apA3VWHJ.css +0 -1
package/dist/chart.js CHANGED
@@ -1,202 +1,270 @@
1
1
  "use client";
2
- import { jsx as i, jsxs as m, Fragment as j } from "react/jsx-runtime";
3
- import { useId as E, useMemo as V, createContext as k, useContext as A } from "react";
2
+ import { jsx as i, jsxs as g, Fragment as R } from "react/jsx-runtime";
3
+ import { useId as j, useMemo as O, createContext as V, useContext as G } from "react";
4
4
  import { cx as h } from "class-variance-authority";
5
- import * as b from "recharts";
6
- import './chunks/chart.CeyctrXQ.css';const P = "_container_2ox8r_24", F = "_tooltipContent_2ox8r_92", G = "_tooltipLabel_2ox8r_104", U = "_tooltipItems_2ox8r_108", K = "_tooltipItem_2ox8r_108", M = "_tooltipItemCentered_2ox8r_124", O = "_indicator_2ox8r_134", R = "_indicatorDot_2ox8r_139", q = "_indicatorLine_2ox8r_147", z = "_indicatorDashed_2ox8r_151", Z = "_indicatorNested_2ox8r_158", H = "_tooltipItemBody_2ox8r_163", J = "_tooltipItemBodyNested_2ox8r_169", Q = "_tooltipItemBodyInline_2ox8r_173", W = "_tooltipItemLabelGroup_2ox8r_177", X = "_tooltipItemName_2ox8r_182", Y = "_tooltipItemValue_2ox8r_186", tt = "_legendContent_2ox8r_195", ot = "_legendTop_2ox8r_202", et = "_legendBottom_2ox8r_206", nt = "_legendItem_2ox8r_210", rt = "_legendSwatch_2ox8r_224", e = {
7
- container: P,
8
- tooltipContent: F,
9
- tooltipLabel: G,
10
- tooltipItems: U,
11
- tooltipItem: K,
12
- tooltipItemCentered: M,
13
- indicator: O,
14
- indicatorDot: R,
15
- indicatorLine: q,
16
- indicatorDashed: z,
17
- indicatorNested: Z,
18
- tooltipItemBody: H,
19
- tooltipItemBodyNested: J,
20
- tooltipItemBodyInline: Q,
21
- tooltipItemLabelGroup: W,
22
- tooltipItemName: X,
23
- tooltipItemValue: Y,
24
- legendContent: tt,
25
- legendTop: ot,
26
- legendBottom: et,
27
- legendItem: nt,
28
- legendSwatch: rt
29
- }, lt = { width: 320, height: 200 }, T = k(null);
30
- function w() {
31
- const n = A(T);
32
- if (!n)
5
+ import * as B from "recharts";
6
+ import './chunks/chart.CeyctrXQ.css';const H = "_container_2ox8r_24", U = "_tooltipContent_2ox8r_92", k = "_tooltipLabel_2ox8r_104", F = "_tooltipItems_2ox8r_108", M = "_tooltipItem_2ox8r_108", q = "_tooltipItemCentered_2ox8r_124", z = "_indicator_2ox8r_134", K = "_indicatorDot_2ox8r_139", Z = "_indicatorLine_2ox8r_147", W = "_indicatorDashed_2ox8r_151", J = "_indicatorNested_2ox8r_158", Q = "_tooltipItemBody_2ox8r_163", X = "_tooltipItemBodyNested_2ox8r_169", Y = "_tooltipItemBodyInline_2ox8r_173", tt = "_tooltipItemLabelGroup_2ox8r_177", et = "_tooltipItemName_2ox8r_182", ot = "_tooltipItemValue_2ox8r_186", nt = "_legendContent_2ox8r_195", rt = "_legendTop_2ox8r_202", lt = "_legendBottom_2ox8r_206", it = "_legendItem_2ox8r_210", ct = "_legendSwatch_2ox8r_224", n = {
7
+ container: H,
8
+ tooltipContent: U,
9
+ tooltipLabel: k,
10
+ tooltipItems: F,
11
+ tooltipItem: M,
12
+ tooltipItemCentered: q,
13
+ indicator: z,
14
+ indicatorDot: K,
15
+ indicatorLine: Z,
16
+ indicatorDashed: W,
17
+ indicatorNested: J,
18
+ tooltipItemBody: Q,
19
+ tooltipItemBodyNested: X,
20
+ tooltipItemBodyInline: Y,
21
+ tooltipItemLabelGroup: tt,
22
+ tooltipItemName: et,
23
+ tooltipItemValue: ot,
24
+ legendContent: nt,
25
+ legendTop: rt,
26
+ legendBottom: lt,
27
+ legendItem: it,
28
+ legendSwatch: ct
29
+ }, at = { width: 320, height: 200 }, D = [
30
+ "var(--chart-1)",
31
+ "var(--chart-2)",
32
+ "var(--chart-3)",
33
+ "var(--chart-4)",
34
+ "var(--chart-5)"
35
+ ], $ = V(null);
36
+ function A() {
37
+ const o = G($);
38
+ if (!o)
33
39
  throw new Error("useChart must be used within a <ChartContainer />");
34
- return n;
40
+ return o;
35
41
  }
36
- const ct = /[^a-zA-Z0-9_-]/g, it = /[;{}<>\\]|\/\*|\*\//;
37
- function B(n) {
38
- return n.replace(ct, "_");
42
+ const st = /[^a-zA-Z0-9_-]/g, dt = /[;{}<>\\]|\/\*|\*\//;
43
+ function y(o) {
44
+ return o.replace(st, "_");
39
45
  }
40
- function st(n) {
41
- return !it.test(n);
46
+ function ut(o) {
47
+ return !dt.test(o);
42
48
  }
43
- function ht({
44
- id: n,
49
+ function ft({
50
+ id: o,
45
51
  className: t,
46
52
  children: r,
47
53
  config: l,
48
- initialDimension: a = lt,
54
+ initialDimension: a = at,
49
55
  ...p
50
56
  }) {
51
- const c = E(), u = B(`chart-${n ?? c}`);
52
- return /* @__PURE__ */ i(T.Provider, { value: { config: l }, children: /* @__PURE__ */ m("div", { "data-chart": u, className: h(e.container, t), ...p, children: [
53
- /* @__PURE__ */ i(at, { id: u, config: l }),
54
- /* @__PURE__ */ i(b.ResponsiveContainer, { initialDimension: a, children: r })
57
+ const d = j(), c = y(`chart-${o ?? d}`);
58
+ return /* @__PURE__ */ i($.Provider, { value: { config: l }, children: /* @__PURE__ */ g("div", { ...p, "data-chart": c, className: h(n.container, t), children: [
59
+ /* @__PURE__ */ i(_t, { id: c, config: l }),
60
+ /* @__PURE__ */ i(B.ResponsiveContainer, { initialDimension: a, children: r })
55
61
  ] }) });
56
62
  }
57
- function at({ id: n, config: t }) {
58
- const r = Object.entries(t).filter(([, _]) => _.theme ?? _.color);
63
+ function _t({ id: o, config: t }) {
64
+ const r = Object.entries(t);
59
65
  if (!r.length)
60
66
  return null;
61
- const l = B(n), a = (_) => r.map(([s, N]) => {
62
- var I;
63
- const g = ((I = N.theme) == null ? void 0 : I[_]) ?? N.color;
64
- return !g || !st(g) ? null : ` --color-${B(s)}: ${g};`;
65
- }).filter((s) => s !== null).join(`
66
- `), p = a("light"), c = a("dark"), u = `
67
+ const l = y(o), a = (m) => r.map(([_, s], L) => {
68
+ var N;
69
+ const I = ((N = s.theme) == null ? void 0 : N[m]) ?? s.color ?? D[L % D.length];
70
+ return !I || !ut(I) ? null : ` --color-${y(_)}: ${I};`;
71
+ }).filter((_) => _ !== null).join(`
72
+ `), p = a("light"), d = a("dark"), c = `
67
73
  [data-chart='${l}'] {
68
74
  ${p}
69
75
  }
70
76
 
71
77
  [data-theme='dark'] [data-chart='${l}'] {
72
- ${c}
78
+ ${d}
73
79
  }
74
80
 
75
81
  @media (prefers-color-scheme: dark) {
76
82
  :root:not([data-theme='light']) [data-chart='${l}'] {
77
- ${c}
83
+ ${d}
78
84
  }
79
85
  }
80
86
  `;
81
- return /* @__PURE__ */ i("style", { children: u });
87
+ return /* @__PURE__ */ i("style", { children: c });
82
88
  }
83
- const pt = b.Tooltip;
84
- function It({
85
- active: n,
89
+ const vt = B.Tooltip;
90
+ function P(o, t) {
91
+ return Object.fromEntries(
92
+ Object.entries(o).filter(([r]) => !/^on[A-Z]/.test(r) && !t.has(r))
93
+ );
94
+ }
95
+ const ht = /* @__PURE__ */ new Set([
96
+ "accessibilityLayer",
97
+ "activeIndex",
98
+ "allowEscapeViewBox",
99
+ "animationDuration",
100
+ "animationEasing",
101
+ "axisId",
102
+ "children",
103
+ "content",
104
+ "contentStyle",
105
+ "coordinate",
106
+ "cursor",
107
+ "dangerouslySetInnerHTML",
108
+ "defaultIndex",
109
+ "filterNull",
110
+ "includeHidden",
111
+ "isAnimationActive",
112
+ "itemSorter",
113
+ "itemStyle",
114
+ "labelStyle",
115
+ "offset",
116
+ "payloadUniqBy",
117
+ "portal",
118
+ "position",
119
+ "reverseDirection",
120
+ "separator",
121
+ "shared",
122
+ "trigger",
123
+ "useTranslate3d",
124
+ "wrapperClassName",
125
+ "wrapperStyle"
126
+ ]);
127
+ function Nt({
128
+ active: o,
86
129
  payload: t,
87
130
  className: r,
88
131
  indicator: l = "dot",
89
132
  hideLabel: a = !1,
90
133
  hideIndicator: p = !1,
91
- label: c,
92
- labelFormatter: u,
93
- labelClassName: _,
94
- formatter: s,
95
- color: N,
96
- nameKey: g,
97
- labelKey: I
134
+ label: d,
135
+ labelFormatter: c,
136
+ labelClassName: m,
137
+ formatter: _,
138
+ color: s,
139
+ nameKey: L,
140
+ labelKey: I,
141
+ ...N
98
142
  }) {
99
- const { config: x } = w(), D = V(() => {
143
+ const { config: x } = A(), E = O(() => {
100
144
  var v;
101
145
  if (a || !(t != null && t.length))
102
146
  return null;
103
- const [o] = t, L = `${I ?? (o == null ? void 0 : o.dataKey) ?? (o == null ? void 0 : o.name) ?? "value"}`, f = S(x, o, L), d = !I && typeof c == "string" ? ((v = x[c]) == null ? void 0 : v.label) ?? c : f == null ? void 0 : f.label;
104
- return u ? /* @__PURE__ */ i("div", { className: h(e.tooltipLabel, _), children: u(d, t) }) : d ? /* @__PURE__ */ i("div", { className: h(e.tooltipLabel, _), children: d }) : null;
105
- }, [c, u, t, a, _, x, I]);
106
- if (!n || !(t != null && t.length))
147
+ const [e] = t, S = `${I ?? (e == null ? void 0 : e.dataKey) ?? (e == null ? void 0 : e.name) ?? "value"}`, f = b(x, e, S), u = !I && typeof d == "string" ? ((v = x[d]) == null ? void 0 : v.label) ?? d : f == null ? void 0 : f.label;
148
+ return c ? /* @__PURE__ */ i("div", { className: h(n.tooltipLabel, m), children: c(u, t) }) : u ? /* @__PURE__ */ i("div", { className: h(n.tooltipLabel, m), children: u }) : null;
149
+ }, [d, c, t, a, m, x, I]);
150
+ if (!o || !(t != null && t.length))
107
151
  return null;
108
152
  const C = t.length === 1 && l !== "dot";
109
- return /* @__PURE__ */ m("div", { className: h(e.tooltipContent, r), children: [
110
- C ? null : D,
111
- /* @__PURE__ */ i("div", { className: e.tooltipItems, children: t.filter((o) => o.type !== "none").map((o, L) => {
112
- var $;
113
- const f = `${g ?? o.name ?? o.dataKey ?? "value"}`, d = S(x, o, f), v = N ?? (($ = o.payload) == null ? void 0 : $.fill) ?? o.color;
153
+ return /* @__PURE__ */ g("div", { ...P(N, ht), className: h(n.tooltipContent, r), children: [
154
+ C ? null : E,
155
+ /* @__PURE__ */ i("div", { className: n.tooltipItems, children: t.filter((e) => e.type !== "none").map((e, S) => {
156
+ var T;
157
+ const f = `${L ?? e.name ?? e.dataKey ?? "value"}`, u = b(x, e, f), v = s ?? ((T = e.payload) == null ? void 0 : T.fill) ?? e.color;
114
158
  return /* @__PURE__ */ i(
115
159
  "div",
116
160
  {
117
- className: h(e.tooltipItem, l === "dot" && e.tooltipItemCentered),
118
- children: s && (o == null ? void 0 : o.value) !== void 0 && o.name ? s(o.value, o.name, o, L, o.payload) : /* @__PURE__ */ m(j, { children: [
119
- d != null && d.icon ? /* @__PURE__ */ i(d.icon, {}) : !p && /* @__PURE__ */ i(
161
+ className: h(n.tooltipItem, l === "dot" && n.tooltipItemCentered),
162
+ children: _ && (e == null ? void 0 : e.value) !== void 0 && e.name ? _(e.value, e.name, e, S, e.payload) : /* @__PURE__ */ g(R, { children: [
163
+ u != null && u.icon ? /* @__PURE__ */ i(u.icon, {}) : !p && /* @__PURE__ */ i(
120
164
  "div",
121
165
  {
122
166
  className: h(
123
- e.indicator,
124
- l === "dot" && e.indicatorDot,
125
- l === "line" && e.indicatorLine,
126
- l === "dashed" && e.indicatorDashed,
127
- l === "dashed" && C && e.indicatorNested
167
+ n.indicator,
168
+ l === "dot" && n.indicatorDot,
169
+ l === "line" && n.indicatorLine,
170
+ l === "dashed" && n.indicatorDashed,
171
+ l === "dashed" && C && n.indicatorNested
128
172
  ),
129
173
  style: l === "dashed" ? { borderColor: v } : { backgroundColor: v }
130
174
  }
131
175
  ),
132
- /* @__PURE__ */ m(
176
+ /* @__PURE__ */ g(
133
177
  "div",
134
178
  {
135
179
  className: h(
136
- e.tooltipItemBody,
137
- C ? e.tooltipItemBodyNested : e.tooltipItemBodyInline
180
+ n.tooltipItemBody,
181
+ C ? n.tooltipItemBodyNested : n.tooltipItemBodyInline
138
182
  ),
139
183
  children: [
140
- /* @__PURE__ */ m("div", { className: e.tooltipItemLabelGroup, children: [
141
- C ? D : null,
142
- /* @__PURE__ */ i("span", { className: e.tooltipItemName, children: (d == null ? void 0 : d.label) ?? o.name })
184
+ /* @__PURE__ */ g("div", { className: n.tooltipItemLabelGroup, children: [
185
+ C ? E : null,
186
+ /* @__PURE__ */ i("span", { className: n.tooltipItemName, children: (u == null ? void 0 : u.label) ?? e.name })
143
187
  ] }),
144
- o.value != null && /* @__PURE__ */ i("span", { className: e.tooltipItemValue, children: typeof o.value == "number" ? o.value.toLocaleString() : String(o.value) })
188
+ e.value != null && /* @__PURE__ */ i("span", { className: n.tooltipItemValue, children: typeof e.value == "number" ? e.value.toLocaleString() : String(e.value) })
145
189
  ]
146
190
  }
147
191
  )
148
192
  ] })
149
193
  },
150
- L
194
+ S
151
195
  );
152
196
  }) })
153
197
  ] });
154
198
  }
155
- const mt = b.Legend;
156
- function gt({
157
- className: n,
199
+ const xt = B.Legend, pt = /* @__PURE__ */ new Set([
200
+ "align",
201
+ "chartHeight",
202
+ "chartWidth",
203
+ "children",
204
+ "content",
205
+ "dangerouslySetInnerHTML",
206
+ "formatter",
207
+ "height",
208
+ "iconSize",
209
+ "iconType",
210
+ "inactiveColor",
211
+ "itemSorter",
212
+ "labelStyle",
213
+ "layout",
214
+ "margin",
215
+ "offset",
216
+ "payloadUniqBy",
217
+ "portal",
218
+ "position",
219
+ "width",
220
+ "wrapperStyle"
221
+ ]);
222
+ function Ct({
223
+ className: o,
158
224
  hideIcon: t = !1,
159
225
  payload: r,
160
226
  verticalAlign: l = "bottom",
161
- nameKey: a
227
+ nameKey: a,
228
+ ...p
162
229
  }) {
163
- const { config: p } = w();
230
+ const { config: d } = A();
164
231
  return r != null && r.length ? /* @__PURE__ */ i(
165
232
  "div",
166
233
  {
234
+ ...P(p, pt),
167
235
  className: h(
168
- e.legendContent,
169
- l === "top" ? e.legendTop : e.legendBottom,
170
- n
236
+ n.legendContent,
237
+ l === "top" ? n.legendTop : n.legendBottom,
238
+ o
171
239
  ),
172
- children: r.filter((c) => c.type !== "none").map((c, u) => {
173
- const _ = `${a ?? c.dataKey ?? "value"}`, s = S(p, c, _);
174
- return /* @__PURE__ */ m("div", { className: e.legendItem, children: [
175
- s != null && s.icon && !t ? /* @__PURE__ */ i(s.icon, {}) : /* @__PURE__ */ i("div", { className: e.legendSwatch, style: { backgroundColor: c.color } }),
240
+ children: r.filter((c) => c.type !== "none").map((c, m) => {
241
+ const _ = `${a ?? c.dataKey ?? "value"}`, s = b(d, c, _);
242
+ return /* @__PURE__ */ g("div", { className: n.legendItem, children: [
243
+ s != null && s.icon && !t ? /* @__PURE__ */ i(s.icon, {}) : /* @__PURE__ */ i("div", { className: n.legendSwatch, style: { backgroundColor: c.color } }),
176
244
  s == null ? void 0 : s.label
177
- ] }, u);
245
+ ] }, m);
178
246
  })
179
247
  }
180
248
  ) : null;
181
249
  }
182
- function y(n, t) {
183
- if (!(t in n))
250
+ function w(o, t) {
251
+ if (!(t in o))
184
252
  return;
185
- const r = n[t];
253
+ const r = o[t];
186
254
  return typeof r == "string" ? r : void 0;
187
255
  }
188
- function S(n, t, r) {
256
+ function b(o, t, r) {
189
257
  if (typeof t != "object" || t === null)
190
258
  return;
191
- const l = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, a = y(t, r) ?? (l && y(l, r)) ?? r;
192
- return a in n ? n[a] : n[r];
259
+ const l = "payload" in t && typeof t.payload == "object" && t.payload !== null ? t.payload : void 0, a = w(t, r) ?? (l && w(l, r)) ?? r;
260
+ return a in o ? o[a] : o[r];
193
261
  }
194
262
  export {
195
- ht as ChartContainer,
196
- mt as ChartLegend,
197
- gt as ChartLegendContent,
198
- at as ChartStyle,
199
- pt as ChartTooltip,
200
- It as ChartTooltipContent
263
+ ft as ChartContainer,
264
+ xt as ChartLegend,
265
+ Ct as ChartLegendContent,
266
+ _t as ChartStyle,
267
+ vt as ChartTooltip,
268
+ Nt as ChartTooltipContent
201
269
  };
202
270
  //# sourceMappingURL=chart.js.map
package/dist/chart.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"chart.js","sources":["../src/components/chart/chart.tsx"],"sourcesContent":["'use client';\n\n/*\n * Upstream (apps/v4/registry/bases/base/ui/chart.tsx) wraps Recharts:\n * ChartContainer supplies the ResponsiveContainer plus a per-instance\n * runtime `<style>` tag (ChartStyle) that turns each `ChartConfig` entry\n * into a `--color-<key>` custom property scoped to that one chart instance\n * via a `data-chart` id — the hook a consumer's own Bar/Line/Area elements\n * read from (`fill=\"var(--color-desktop)\"`) to pick up branded series\n * colors without prop-drilling them through Recharts' own API. `data-chart`\n * is that scoping id, not this kit's usual `data-slot` marker — there is no\n * `data-slot` here by design, same as every other ported part.\n *\n * Two deliberate deviations from upstream, both forced by this kit's own\n * constraints rather than a style preference — see chart.md's \"Porting\n * notes\" for the consumer-facing summary:\n *\n * 1. THEMES / dark selector — upstream keys the per-theme color map by\n * `{ light: \"\", dark: \".dark\" }`, a literal Tailwind dark-mode class\n * selector. This kit has no such class (see theme.css's header): dark\n * mode is `[data-theme='dark']` plus a `prefers-color-scheme` fallback\n * guarded by `:not([data-theme='light'])`. ChartStyle below emits BOTH\n * selectors for the dark entry instead of one, mirroring theme.css's own\n * dual mechanism. The public `ChartConfig['theme']` keys stay exactly\n * `light`/`dark` regardless — that part is upstream's real API, not the\n * selector text it happens to compile to.\n * 2. No `--chart-1`..`--chart-5` palette — those tokens don't exist in\n * theme.css (frozen for this port) and were deliberately not added.\n * A consumer supplies every series color through `ChartConfig` itself\n * (`color` or `theme`) — upstream's real, load-bearing API regardless;\n * shadcn's own docs setting `--chart-1` etc. is just ONE value for that\n * same `color` field, not a requirement of the mechanism.\n */\n\nimport {\n type ComponentProps,\n type ComponentType,\n type ReactNode,\n createContext,\n useContext,\n useId,\n useMemo,\n} from 'react';\nimport { cx } from 'class-variance-authority';\nimport * as RechartsPrimitive from 'recharts';\nimport type { DefaultLegendContentProps, DefaultTooltipContentProps, TooltipValueType } from 'recharts';\n\nimport styles from './chart.module.css';\n\n// Matches Recharts' own default (used when a chart mounts with no measured\n// size yet) being {-1,-1} — upstream overrides it to a real, positive size\n// so ChartContainer's children render immediately instead of waiting for a\n// ResizeObserver entry that jsdom (and a slow first paint) may delay.\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const;\n\ntype TooltipNameType = number | string;\n\nexport type ChartConfig = Record<\n string,\n {\n label?: ReactNode;\n icon?: ComponentType;\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<'light' | 'dark', string> }\n )\n>;\n\ninterface ChartContextValue {\n config: ChartConfig;\n}\n\nconst ChartContext = createContext<ChartContextValue | null>(null);\n\nfunction useChart() {\n const context = useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nexport type ChartContainerProps = Omit<ComponentProps<'div'>, 'className' | 'children'> & {\n className?: string;\n config: ChartConfig;\n children: ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n initialDimension?: { width: number; height: number };\n};\n\n/*\n * Everything ChartStyle interpolates into its <style> tag is\n * consumer-supplied — the chart's `id`, every `ChartConfig` key, every\n * colour string — and React does not parse or validate CSS syntax within\n * it, whether the string reaches the tag as JSX children or via\n * `dangerouslySetInnerHTML`. An id of `x] { } body { display: none` would\n * end the selector and start a rule of its own; a colour of `red; } body {\n * … }` does the same one line down; either could carry a literal\n * `</style>` and try to leave CSS altogether. So the two shapes that reach\n * the stylesheet are constrained rather than trusted: identifiers are\n * reduced to a character set that cannot express any of those, and colour\n * VALUES (which have no such small alphabet — they run from `red` to\n * `color-mix(in oklab, …)`) are checked for the characters that would let\n * one escape its own declaration, and dropped whole if they carry any.\n */\nconst CSS_IDENT_UNSAFE = /[^a-zA-Z0-9_-]/g;\n\n// Anything that could close a declaration, a rule, a comment, or the\n// <style> element itself. Backslash is in the list because a CSS escape\n// sequence is another way to spell any of them.\nconst CSS_VALUE_UNSAFE = /[;{}<>\\\\]|\\/\\*|\\*\\//;\n\nfunction cssIdentifier(value: string): string {\n return value.replace(CSS_IDENT_UNSAFE, '_');\n}\n\nfunction isSafeCssValue(value: string): boolean {\n return !CSS_VALUE_UNSAFE.test(value);\n}\n\nexport function ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: ChartContainerProps) {\n const uniqueId = useId();\n // Normalized here, not just inside ChartStyle: the same string has to\n // land in the `data-chart` attribute and in the selector that targets\n // it, so they must be normalized by the same rule or they stop matching.\n const chartId = cssIdentifier(`chart-${id ?? uniqueId}`);\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div data-chart={chartId} className={cx(styles.container, className)} {...props}>\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n}\n\nexport interface ChartStyleProps {\n id: string;\n config: ChartConfig;\n}\n\n// Exported standalone (matching upstream) for a consumer building their own\n// chart shell without ChartContainer's div/ResponsiveContainer wrapper, who\n// still wants the same per-instance `--color-*` custom-property injection.\nexport function ChartStyle({ id, config }: ChartStyleProps) {\n const colorConfig = Object.entries(config).filter(([, itemConfig]) => itemConfig.theme ?? itemConfig.color);\n\n if (!colorConfig.length) {\n return null;\n }\n\n const safeId = cssIdentifier(id);\n\n const declarationsFor = (theme: 'light' | 'dark') =>\n colorConfig\n .map(([key, itemConfig]) => {\n const color = itemConfig.theme?.[theme] ?? itemConfig.color;\n // A rejected colour drops its whole declaration rather than\n // emitting a broken one: the series then paints in Recharts' own\n // default instead of taking the rest of the stylesheet with it.\n if (!color || !isSafeCssValue(color)) {\n return null;\n }\n return ` --color-${cssIdentifier(key)}: ${color};`;\n })\n .filter((declaration): declaration is string => declaration !== null)\n .join('\\n');\n\n const lightDeclarations = declarationsFor('light');\n const darkDeclarations = declarationsFor('dark');\n\n // See the file header's point 1: two dark blocks (an explicit attribute\n // selector plus a prefers-color-scheme fallback) instead of upstream's\n // single `.dark` class, mirroring theme.css's own dual mechanism. The\n // light block carries no selector prefix, same as upstream's `THEMES.light\n // === \"\"` — it is the unconditional default every chart instance starts\n // from, which the dark blocks below layer on top of.\n const css = `\n[data-chart='${safeId}'] {\n${lightDeclarations}\n}\n\n[data-theme='dark'] [data-chart='${safeId}'] {\n${darkDeclarations}\n}\n\n@media (prefers-color-scheme: dark) {\n :root:not([data-theme='light']) [data-chart='${safeId}'] {\n${darkDeclarations}\n }\n}\n`;\n\n // Per-instance, consumer-supplied colors have no other way to reach a\n // scoped CSS custom property — there is no static class this kit's build\n // could hash for an arbitrary runtime string. Passing `css` as the\n // `<style>` element's JSX children — rather than through\n // `dangerouslySetInnerHTML` — gets it React 19's own `</style`-escaping on\n // the server (so a value containing a literal `</style><script>…` cannot\n // break out of the tag in SSR output) and, on the client, lands it as a\n // single inert Text node that is never parsed as markup. Either way it\n // cannot execute as script. `isSafeCssValue`/`cssIdentifier` above still\n // matter here even though they're no longer the primary XSS defense: they\n // keep `<`/`>` out of the string entirely, which is what keeps server and\n // client output identical (a raw `</style` would escape only on the\n // server, producing a hydration mismatch).\n return <style>{css}</style>;\n}\n\nexport const ChartTooltip = RechartsPrimitive.Tooltip;\n\nexport type ChartTooltipContentProps = ComponentProps<typeof RechartsPrimitive.Tooltip> &\n Omit<ComponentProps<'div'>, 'className'> & {\n className?: string;\n hideLabel?: boolean;\n hideIndicator?: boolean;\n indicator?: 'line' | 'dot' | 'dashed';\n nameKey?: string;\n labelKey?: string;\n } & Omit<DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>;\n\nexport function ChartTooltipContent({\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n}: ChartTooltipContentProps) {\n const { config } = useChart();\n\n const tooltipLabel = useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string' ? (config[label]?.label ?? label) : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cx(styles.tooltipLabel, labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cx(styles.tooltipLabel, labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div className={cx(styles.tooltipContent, className)}>\n {!nestLabel ? tooltipLabel : null}\n <div className={styles.tooltipItems}>\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color ?? item.payload?.fill ?? item.color;\n\n return (\n <div\n key={index}\n className={cx(styles.tooltipItem, indicator === 'dot' && styles.tooltipItemCentered)}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cx(\n styles.indicator,\n indicator === 'dot' && styles.indicatorDot,\n indicator === 'line' && styles.indicatorLine,\n indicator === 'dashed' && styles.indicatorDashed,\n indicator === 'dashed' && nestLabel && styles.indicatorNested,\n )}\n // Two paint targets, not one custom-property pair like\n // upstream's Tailwind `bg-(--color-bg)`/`border-(--color-border)`\n // arbitrary-value classes: dot/line indicators are filled\n // swatches (background only — chart.module.css's `.indicator`\n // sets no border), the dashed indicator is a hollow\n // dashed-border swatch (border only — `.indicatorDashed`\n // keeps its own background transparent). Setting both\n // properties unconditionally, like upstream does via two\n // always-present custom properties, would depend on which\n // Tailwind utility wins the cascade for the dashed case;\n // branching here is unambiguous.\n style={\n indicator === 'dashed'\n ? { borderColor: indicatorColor }\n : { backgroundColor: indicatorColor }\n }\n />\n )\n )}\n <div\n className={cx(\n styles.tooltipItemBody,\n nestLabel ? styles.tooltipItemBodyNested : styles.tooltipItemBodyInline,\n )}\n >\n <div className={styles.tooltipItemLabelGroup}>\n {nestLabel ? tooltipLabel : null}\n <span className={styles.tooltipItemName}>{itemConfig?.label ?? item.name}</span>\n </div>\n {item.value != null && (\n <span className={styles.tooltipItemValue}>\n {typeof item.value === 'number' ? item.value.toLocaleString() : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport const ChartLegend = RechartsPrimitive.Legend;\n\nexport type ChartLegendContentProps = Omit<ComponentProps<'div'>, 'className'> & {\n className?: string;\n hideIcon?: boolean;\n nameKey?: string;\n} & DefaultLegendContentProps;\n\nexport function ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = 'bottom',\n nameKey,\n}: ChartLegendContentProps) {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n className={cx(\n styles.legendContent,\n verticalAlign === 'top' ? styles.legendTop : styles.legendBottom,\n className,\n )}\n >\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div key={index} className={styles.legendItem}>\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div className={styles.legendSwatch} style={{ backgroundColor: item.color }} />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n}\n\n// Guarded, single-purpose replacement for upstream's two inline\n// `payload[key as keyof typeof payload] as string` assertions: `in` proves\n// the property exists at runtime, this narrows the read value itself\n// instead of asserting the container's shape.\nfunction getStringField(source: object, key: string): string | undefined {\n if (!(key in source)) {\n return undefined;\n }\n const value = (source as Record<string, unknown>)[key];\n return typeof value === 'string' ? value : undefined;\n}\n\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string,\n): ChartConfig[string] | undefined {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null\n ? payload.payload\n : undefined;\n\n const configLabelKey =\n getStringField(payload, key) ?? (payloadPayload && getStringField(payloadPayload, key)) ?? key;\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n}\n"],"names":["INITIAL_DIMENSION","ChartContext","createContext","useChart","context","useContext","CSS_IDENT_UNSAFE","CSS_VALUE_UNSAFE","cssIdentifier","value","isSafeCssValue","ChartContainer","id","className","children","config","initialDimension","props","uniqueId","useId","chartId","jsxs","cx","styles","jsx","ChartStyle","RechartsPrimitive","colorConfig","itemConfig","safeId","declarationsFor","theme","key","color","_a","declaration","lightDeclarations","darkDeclarations","css","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","useMemo","item","getPayloadConfigFromPayload","nestLabel","index","indicatorColor","Fragment","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","getStringField","source","payloadPayload","configLabelKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDMA,KAAoB,EAAE,OAAO,KAAK,QAAQ,IAAA,GAmB1CC,IAAeC,EAAwC,IAAI;AAEjE,SAASC,IAAW;AAClB,QAAMC,IAAUC,EAAWJ,CAAY;AAEvC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,mDAAmD;AAGrE,SAAOA;AACT;AAwBA,MAAME,KAAmB,mBAKnBC,KAAmB;AAEzB,SAASC,EAAcC,GAAuB;AAC5C,SAAOA,EAAM,QAAQH,IAAkB,GAAG;AAC5C;AAEA,SAASI,GAAeD,GAAwB;AAC9C,SAAO,CAACF,GAAiB,KAAKE,CAAK;AACrC;AAEO,SAASE,GAAe;AAAA,EAC7B,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC,IAAmBhB;AAAA,EACnB,GAAGiB;AACL,GAAwB;AACtB,QAAMC,IAAWC,EAAA,GAIXC,IAAUZ,EAAc,SAASI,KAAMM,CAAQ,EAAE;AAEvD,2BACGjB,EAAa,UAAb,EAAsB,OAAO,EAAE,QAAAc,KAC9B,UAAA,gBAAAM,EAAC,SAAI,cAAYD,GAAS,WAAWE,EAAGC,EAAO,WAAWV,CAAS,GAAI,GAAGI,GACxE,UAAA;AAAA,IAAA,gBAAAO,EAACC,IAAA,EAAW,IAAIL,GAAS,QAAAL,EAAA,CAAgB;AAAA,IACzC,gBAAAS,EAACE,EAAkB,qBAAlB,EAAsC,kBAAAV,GACpC,UAAAF,EAAA,CACH;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;AAUO,SAASW,GAAW,EAAE,IAAAb,GAAI,QAAAG,KAA2B;AAC1D,QAAMY,IAAc,OAAO,QAAQZ,CAAM,EAAE,OAAO,CAAC,CAAA,EAAGa,CAAU,MAAMA,EAAW,SAASA,EAAW,KA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C;AAGF,QAAMwB,IACJ,aAAaxB,KAAW,OAAOA,EAAQ,WAAY,YAAYA,EAAQ,YAAY,OAC/EA,EAAQ,UACR,QAEAyB,IACJH,EAAetB,GAASV,CAAG,MAAMkC,KAAkBF,EAAeE,GAAgBlC,CAAG,MAAMA;AAE7F,SAAOmC,KAAkBpD,IAASA,EAAOoD,CAAc,IAAIpD,EAAOiB,CAAG;AACvE;"}
1
+ {"version":3,"file":"chart.js","sources":["../src/components/chart/chart.tsx"],"sourcesContent":["'use client';\n\n/*\n * Upstream (apps/v4/registry/bases/base/ui/chart.tsx) wraps Recharts:\n * ChartContainer supplies the ResponsiveContainer plus a per-instance\n * runtime `<style>` tag (ChartStyle) that turns each `ChartConfig` entry\n * into a `--color-<key>` custom property scoped to that one chart instance\n * via a `data-chart` id — the hook a consumer's own Bar/Line/Area elements\n * read from (`fill=\"var(--color-desktop)\"`) to pick up branded series\n * colors without prop-drilling them through Recharts' own API. `data-chart`\n * is that scoping id, not this kit's usual `data-slot` marker — there is no\n * `data-slot` here by design, same as every other ported part.\n *\n * Two deliberate deviations from upstream, both forced by this kit's own\n * constraints rather than a style preference — see chart.md's \"Porting\n * notes\" for the consumer-facing summary:\n *\n * 1. THEMES / dark selector - upstream keys the per-theme color map by\n * `{ light: \"\", dark: \".dark\" }`, a literal dark-mode class selector.\n * This kit has no such class (see theme.css's header): dark\n * mode is `[data-theme='dark']` plus a `prefers-color-scheme` fallback\n * guarded by `:not([data-theme='light'])`. ChartStyle below emits BOTH\n * selectors for the dark entry instead of one, mirroring theme.css's own\n * dual mechanism. The public `ChartConfig['theme']` keys stay exactly\n * `light`/`dark` regardless — that part is upstream's real API, not the\n * selector text it happens to compile to.\n * 2. Palette fallback - theme.css publishes `--chart-1`..`--chart-5`, and a\n * `ChartConfig` entry that names neither a `color` nor a `theme` pair\n * takes the step at its own position in the config (see CHART_PALETTE\n * below). A consumer still supplies every series colour through\n * `ChartConfig` itself when they want to, and an explicit value always\n * wins; the fallback only decides what an unbranded chart paints.\n */\n\nimport {\n type ComponentProps,\n type ComponentType,\n type DOMAttributes,\n type ReactNode,\n createContext,\n useContext,\n useId,\n useMemo,\n} from 'react';\nimport { cx } from 'class-variance-authority';\nimport * as RechartsPrimitive from 'recharts';\nimport type { DefaultLegendContentProps, DefaultTooltipContentProps, TooltipValueType } from 'recharts';\n\nimport styles from './chart.module.css';\n\n// Matches Recharts' own default (used when a chart mounts with no measured\n// size yet) being {-1,-1} — upstream overrides it to a real, positive size\n// so ChartContainer's children render immediately instead of waiting for a\n// ResizeObserver entry that jsdom (and a slow first paint) may delay.\nconst INITIAL_DIMENSION = { width: 320, height: 200 } as const;\n\n// The published series palette, in order. A ChartConfig entry naming no\n// colour of its own takes the step at ITS OWN index in the config, not at\n// its index among the uncoloured entries: a caller who brands one series\n// and leaves the rest alone then still gets distinct steps for the rest,\n// instead of a fallback landing on the same hue they just chose. Five\n// series is what the spec draws; a sixth wraps to the first, which reads\n// better than a series painting in the charting library's stock colour.\nconst CHART_PALETTE = [\n 'var(--chart-1)',\n 'var(--chart-2)',\n 'var(--chart-3)',\n 'var(--chart-4)',\n 'var(--chart-5)',\n] as const;\n\ntype TooltipNameType = number | string;\n\nexport type ChartConfig = Record<\n string,\n {\n label?: ReactNode;\n icon?: ComponentType;\n } & (\n | { color?: string; theme?: never }\n | { color?: never; theme: Record<'light' | 'dark', string> }\n )\n>;\n\ninterface ChartContextValue {\n config: ChartConfig;\n}\n\nconst ChartContext = createContext<ChartContextValue | null>(null);\n\nfunction useChart() {\n const context = useContext(ChartContext);\n\n if (!context) {\n throw new Error('useChart must be used within a <ChartContainer />');\n }\n\n return context;\n}\n\nexport type ChartContainerProps = Omit<ComponentProps<'div'>, 'className' | 'children'> & {\n className?: string;\n config: ChartConfig;\n children: ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>['children'];\n initialDimension?: { width: number; height: number };\n};\n\n/*\n * Everything ChartStyle interpolates into its <style> tag is\n * consumer-supplied — the chart's `id`, every `ChartConfig` key, every\n * colour string — and React does not parse or validate CSS syntax within\n * it, whether the string reaches the tag as JSX children or via\n * `dangerouslySetInnerHTML`. An id of `x] { } body { display: none` would\n * end the selector and start a rule of its own; a colour of `red; } body {\n * … }` does the same one line down; either could carry a literal\n * `</style>` and try to leave CSS altogether. So the two shapes that reach\n * the stylesheet are constrained rather than trusted: identifiers are\n * reduced to a character set that cannot express any of those, and colour\n * VALUES (which have no such small alphabet — they run from `red` to\n * `color-mix(in oklab, …)`) are checked for the characters that would let\n * one escape its own declaration, and dropped whole if they carry any.\n */\nconst CSS_IDENT_UNSAFE = /[^a-zA-Z0-9_-]/g;\n\n// Anything that could close a declaration, a rule, a comment, or the\n// <style> element itself. Backslash is in the list because a CSS escape\n// sequence is another way to spell any of them.\nconst CSS_VALUE_UNSAFE = /[;{}<>\\\\]|\\/\\*|\\*\\//;\n\nfunction cssIdentifier(value: string): string {\n return value.replace(CSS_IDENT_UNSAFE, '_');\n}\n\nfunction isSafeCssValue(value: string): boolean {\n return !CSS_VALUE_UNSAFE.test(value);\n}\n\nexport function ChartContainer({\n id,\n className,\n children,\n config,\n initialDimension = INITIAL_DIMENSION,\n ...props\n}: ChartContainerProps) {\n const uniqueId = useId();\n // Normalized here, not just inside ChartStyle: the same string has to\n // land in the `data-chart` attribute and in the selector that targets\n // it, so they must be normalized by the same rule or they stop matching.\n const chartId = cssIdentifier(`chart-${id ?? uniqueId}`);\n\n return (\n <ChartContext.Provider value={{ config }}>\n <div {...props} data-chart={chartId} className={cx(styles.container, className)}>\n <ChartStyle id={chartId} config={config} />\n <RechartsPrimitive.ResponsiveContainer initialDimension={initialDimension}>\n {children}\n </RechartsPrimitive.ResponsiveContainer>\n </div>\n </ChartContext.Provider>\n );\n}\n\nexport interface ChartStyleProps {\n id: string;\n config: ChartConfig;\n}\n\n// Exported standalone (matching upstream) for a consumer building their own\n// chart shell without ChartContainer's div/ResponsiveContainer wrapper, who\n// still wants the same per-instance `--color-*` custom-property injection.\nexport function ChartStyle({ id, config }: ChartStyleProps) {\n const colorConfig = Object.entries(config);\n\n if (!colorConfig.length) {\n return null;\n }\n\n const safeId = cssIdentifier(id);\n\n const declarationsFor = (theme: 'light' | 'dark') =>\n colorConfig\n .map(([key, itemConfig], index) => {\n const color =\n itemConfig.theme?.[theme] ??\n itemConfig.color ??\n CHART_PALETTE[index % CHART_PALETTE.length];\n // A rejected colour drops its whole declaration rather than\n // emitting a broken one: the series then paints in Recharts' own\n // default instead of taking the rest of the stylesheet with it.\n if (!color || !isSafeCssValue(color)) {\n return null;\n }\n return ` --color-${cssIdentifier(key)}: ${color};`;\n })\n .filter((declaration): declaration is string => declaration !== null)\n .join('\\n');\n\n const lightDeclarations = declarationsFor('light');\n const darkDeclarations = declarationsFor('dark');\n\n // See the file header's point 1: two dark blocks (an explicit attribute\n // selector plus a prefers-color-scheme fallback) instead of upstream's\n // single `.dark` class, mirroring theme.css's own dual mechanism. The\n // light block carries no selector prefix, same as upstream's `THEMES.light\n // === \"\"` — it is the unconditional default every chart instance starts\n // from, which the dark blocks below layer on top of.\n const css = `\n[data-chart='${safeId}'] {\n${lightDeclarations}\n}\n\n[data-theme='dark'] [data-chart='${safeId}'] {\n${darkDeclarations}\n}\n\n@media (prefers-color-scheme: dark) {\n :root:not([data-theme='light']) [data-chart='${safeId}'] {\n${darkDeclarations}\n }\n}\n`;\n\n // Per-instance, consumer-supplied colors have no other way to reach a\n // scoped CSS custom property — there is no static class this kit's build\n // could hash for an arbitrary runtime string. Passing `css` as the\n // `<style>` element's JSX children — rather than through\n // `dangerouslySetInnerHTML` — gets it React 19's own `</style`-escaping on\n // the server (so a value containing a literal `</style><script>…` cannot\n // break out of the tag in SSR output) and, on the client, lands it as a\n // single inert Text node that is never parsed as markup. Either way it\n // cannot execute as script. `isSafeCssValue`/`cssIdentifier` above still\n // matter here even though they're no longer the primary XSS defense: they\n // keep `<`/`>` out of the string entirely, which is what keeps server and\n // client output identical (a raw `</style` would escape only on the\n // server, producing a hydration mismatch).\n return <style>{css}</style>;\n}\n\nexport const ChartTooltip = RechartsPrimitive.Tooltip;\n\n// A content renderer's root div takes the div's attributes but none of its\n// event handlers or content props: the chart hands the renderer props of\n// its own under those names, and the renderer supplies the content itself.\ntype ContentRootAttributes = Omit<ComponentProps<'div'>, 'className' | 'content' | keyof DOMAttributes<HTMLDivElement>>;\n\n// Keeps every key a content renderer's root div must not receive off it: an\n// event handler (the chart's own are typed for its items, not for this\n// div) and whatever the chart passes in under a name of its own.\nfunction rootAttributes(props: object, rendererProps: ReadonlySet<string>): Record<string, unknown> {\n return Object.fromEntries(\n Object.entries(props).filter(([key]) => !/^on[A-Z]/.test(key) && !rendererProps.has(key)),\n );\n}\n\nexport type ChartTooltipContentProps = ComponentProps<typeof RechartsPrimitive.Tooltip> &\n ContentRootAttributes & {\n className?: string;\n hideLabel?: boolean;\n hideIndicator?: boolean;\n indicator?: 'line' | 'dot' | 'dashed';\n nameKey?: string;\n labelKey?: string;\n } & Omit<DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>;\n\n// What Recharts' Tooltip hands its content renderer besides the rows it\n// reads: the tooltip's own settings, the active index and coordinate, and\n// the accessibility-layer flag - plus the two ways of supplying content that\n// the rows replace. None of them is an attribute of the root div.\nconst TOOLTIP_RENDERER_PROPS: ReadonlySet<string> = new Set([\n 'accessibilityLayer',\n 'activeIndex',\n 'allowEscapeViewBox',\n 'animationDuration',\n 'animationEasing',\n 'axisId',\n 'children',\n 'content',\n 'contentStyle',\n 'coordinate',\n 'cursor',\n 'dangerouslySetInnerHTML',\n 'defaultIndex',\n 'filterNull',\n 'includeHidden',\n 'isAnimationActive',\n 'itemSorter',\n 'itemStyle',\n 'labelStyle',\n 'offset',\n 'payloadUniqBy',\n 'portal',\n 'position',\n 'reverseDirection',\n 'separator',\n 'shared',\n 'trigger',\n 'useTranslate3d',\n 'wrapperClassName',\n 'wrapperStyle',\n]);\n\nexport function ChartTooltipContent({\n active,\n payload,\n className,\n indicator = 'dot',\n hideLabel = false,\n hideIndicator = false,\n label,\n labelFormatter,\n labelClassName,\n formatter,\n color,\n nameKey,\n labelKey,\n ...props\n}: ChartTooltipContentProps) {\n const { config } = useChart();\n\n const tooltipLabel = useMemo(() => {\n if (hideLabel || !payload?.length) {\n return null;\n }\n\n const [item] = payload;\n const key = `${labelKey ?? item?.dataKey ?? item?.name ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const value =\n !labelKey && typeof label === 'string' ? (config[label]?.label ?? label) : itemConfig?.label;\n\n if (labelFormatter) {\n return <div className={cx(styles.tooltipLabel, labelClassName)}>{labelFormatter(value, payload)}</div>;\n }\n\n if (!value) {\n return null;\n }\n\n return <div className={cx(styles.tooltipLabel, labelClassName)}>{value}</div>;\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\n\n if (!active || !payload?.length) {\n return null;\n }\n\n const nestLabel = payload.length === 1 && indicator !== 'dot';\n\n return (\n <div {...rootAttributes(props, TOOLTIP_RENDERER_PROPS)} className={cx(styles.tooltipContent, className)}>\n {!nestLabel ? tooltipLabel : null}\n <div className={styles.tooltipItems}>\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const key = `${nameKey ?? item.name ?? item.dataKey ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n const indicatorColor = color ?? item.payload?.fill ?? item.color;\n\n return (\n <div\n key={index}\n className={cx(styles.tooltipItem, indicator === 'dot' && styles.tooltipItemCentered)}\n >\n {formatter && item?.value !== undefined && item.name ? (\n formatter(item.value, item.name, item, index, item.payload)\n ) : (\n <>\n {itemConfig?.icon ? (\n <itemConfig.icon />\n ) : (\n !hideIndicator && (\n <div\n className={cx(\n styles.indicator,\n indicator === 'dot' && styles.indicatorDot,\n indicator === 'line' && styles.indicatorLine,\n indicator === 'dashed' && styles.indicatorDashed,\n indicator === 'dashed' && nestLabel && styles.indicatorNested,\n )}\n // Two paint targets, not one custom-property pair like\n // upstream's `bg-(--color-bg)`/`border-(--color-border)`\n // arbitrary-value classes: dot/line indicators are filled\n // swatches (background only — chart.module.css's `.indicator`\n // sets no border), the dashed indicator is a hollow\n // dashed-border swatch (border only — `.indicatorDashed`\n // keeps its own background transparent). Setting both\n // properties unconditionally, like upstream does via two\n // always-present custom properties, would depend on which\n // upstream utility wins the cascade for the dashed case;\n // branching here is unambiguous.\n style={\n indicator === 'dashed'\n ? { borderColor: indicatorColor }\n : { backgroundColor: indicatorColor }\n }\n />\n )\n )}\n <div\n className={cx(\n styles.tooltipItemBody,\n nestLabel ? styles.tooltipItemBodyNested : styles.tooltipItemBodyInline,\n )}\n >\n <div className={styles.tooltipItemLabelGroup}>\n {nestLabel ? tooltipLabel : null}\n <span className={styles.tooltipItemName}>{itemConfig?.label ?? item.name}</span>\n </div>\n {item.value != null && (\n <span className={styles.tooltipItemValue}>\n {typeof item.value === 'number' ? item.value.toLocaleString() : String(item.value)}\n </span>\n )}\n </div>\n </>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport const ChartLegend = RechartsPrimitive.Legend;\n\nexport type ChartLegendContentProps = ContentRootAttributes & {\n className?: string;\n hideIcon?: boolean;\n nameKey?: string;\n} & Omit<\n DefaultLegendContentProps,\n keyof DOMAttributes<HTMLDivElement> | Extract<keyof DefaultLegendContentProps, `on${Capitalize<string>}`>\n >;\n\n// What Recharts' Legend hands its content renderer besides the payload: its\n// own layout settings and the chart's measurements - plus the two ways of\n// supplying content that the legend items replace. None of them is an\n// attribute of the root div; the legend's event handlers, which its default\n// content attaches to each item, are kept off it by rootAttributes.\nconst LEGEND_RENDERER_PROPS: ReadonlySet<string> = new Set([\n 'align',\n 'chartHeight',\n 'chartWidth',\n 'children',\n 'content',\n 'dangerouslySetInnerHTML',\n 'formatter',\n 'height',\n 'iconSize',\n 'iconType',\n 'inactiveColor',\n 'itemSorter',\n 'labelStyle',\n 'layout',\n 'margin',\n 'offset',\n 'payloadUniqBy',\n 'portal',\n 'position',\n 'width',\n 'wrapperStyle',\n]);\n\nexport function ChartLegendContent({\n className,\n hideIcon = false,\n payload,\n verticalAlign = 'bottom',\n nameKey,\n ...props\n}: ChartLegendContentProps) {\n const { config } = useChart();\n\n if (!payload?.length) {\n return null;\n }\n\n return (\n <div\n {...rootAttributes(props, LEGEND_RENDERER_PROPS)}\n className={cx(\n styles.legendContent,\n verticalAlign === 'top' ? styles.legendTop : styles.legendBottom,\n className,\n )}\n >\n {payload\n .filter((item) => item.type !== 'none')\n .map((item, index) => {\n const key = `${nameKey ?? item.dataKey ?? 'value'}`;\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n return (\n <div key={index} className={styles.legendItem}>\n {itemConfig?.icon && !hideIcon ? (\n <itemConfig.icon />\n ) : (\n <div className={styles.legendSwatch} style={{ backgroundColor: item.color }} />\n )}\n {itemConfig?.label}\n </div>\n );\n })}\n </div>\n );\n}\n\n// Guarded, single-purpose replacement for upstream's two inline\n// `payload[key as keyof typeof payload] as string` assertions: `in` proves\n// the property exists at runtime, this narrows the read value itself\n// instead of asserting the container's shape.\nfunction getStringField(source: object, key: string): string | undefined {\n if (!(key in source)) {\n return undefined;\n }\n const value = (source as Record<string, unknown>)[key];\n return typeof value === 'string' ? value : undefined;\n}\n\nfunction getPayloadConfigFromPayload(\n config: ChartConfig,\n payload: unknown,\n key: string,\n): ChartConfig[string] | undefined {\n if (typeof payload !== 'object' || payload === null) {\n return undefined;\n }\n\n const payloadPayload =\n 'payload' in payload && typeof payload.payload === 'object' && payload.payload !== null\n ? payload.payload\n : undefined;\n\n const configLabelKey =\n getStringField(payload, key) ?? (payloadPayload && getStringField(payloadPayload, key)) ?? key;\n\n return configLabelKey in config ? config[configLabelKey] : config[key];\n}\n"],"names":["INITIAL_DIMENSION","CHART_PALETTE","ChartContext","createContext","useChart","context","useContext","CSS_IDENT_UNSAFE","CSS_VALUE_UNSAFE","cssIdentifier","value","isSafeCssValue","ChartContainer","id","className","children","config","initialDimension","props","uniqueId","useId","chartId","jsxs","cx","styles","jsx","ChartStyle","RechartsPrimitive","colorConfig","safeId","declarationsFor","theme","key","itemConfig","index","color","_a","declaration","lightDeclarations","darkDeclarations","css","ChartTooltip","rootAttributes","rendererProps","TOOLTIP_RENDERER_PROPS","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","useMemo","item","getPayloadConfigFromPayload","nestLabel","indicatorColor","Fragment","ChartLegend","LEGEND_RENDERER_PROPS","ChartLegendContent","hideIcon","verticalAlign","getStringField","source","payloadPayload","configLabelKey"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDMA,KAAoB,EAAE,OAAO,KAAK,QAAQ,IAAA,GAS1CC,IAAgB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAmBMC,IAAeC,EAAwC,IAAI;AAEjE,SAASC,IAAW;AAClB,QAAMC,IAAUC,EAAWJ,CAAY;AAEvC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,mDAAmD;AAGrE,SAAOA;AACT;AAwBA,MAAME,KAAmB,mBAKnBC,KAAmB;AAEzB,SAASC,EAAcC,GAAuB;AAC5C,SAAOA,EAAM,QAAQH,IAAkB,GAAG;AAC5C;AAEA,SAASI,GAAeD,GAAwB;AAC9C,SAAO,CAACF,GAAiB,KAAKE,CAAK;AACrC;AAEO,SAASE,GAAe;AAAA,EAC7B,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,kBAAAC,IAAmBjB;AAAA,EACnB,GAAGkB;AACL,GAAwB;AACtB,QAAMC,IAAWC,EAAA,GAIXC,IAAUZ,EAAc,SAASI,KAAMM,CAAQ,EAAE;AAEvD,2BACGjB,EAAa,UAAb,EAAsB,OAAO,EAAE,QAAAc,KAC9B,UAAA,gBAAAM,EAAC,SAAK,GAAGJ,GAAO,cAAYG,GAAS,WAAWE,EAAGC,EAAO,WAAWV,C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,SAASkD,EACP5C,GACA+B,GACAf,GACiC;AACjC,MAAI,OAAOe,KAAY,YAAYA,MAAY;AAC7C;AAGF,QAAMwB,IACJ,aAAaxB,KAAW,OAAOA,EAAQ,WAAY,YAAYA,EAAQ,YAAY,OAC/EA,EAAQ,UACR,QAEAyB,IACJH,EAAetB,GAASf,CAAG,MAAMuC,KAAkBF,EAAeE,GAAgBvC,CAAG,MAAMA;AAE7F,SAAOwC,KAAkBxD,IAASA,EAAOwD,CAAc,IAAIxD,EAAOgB,CAAG;AACvE;"}
package/dist/checkbox.js CHANGED
@@ -1,18 +1,18 @@
1
- import { jsx as o, jsxs as r } from "react/jsx-runtime";
1
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
2
2
  import { Checkbox as i } from "@base-ui/react/checkbox";
3
- import { cx as n } from "class-variance-authority";
4
- import { CheckIcon as s, MinusIcon as h } from "lucide-react";
5
- import './chunks/checkbox.CZfE_PkU.css';const a = "_checkbox_1khol_6", k = "_indicator_1khol_90", m = "_icon_1khol_96", _ = "_iconIndeterminate_1khol_103", l = "_iconCheck_1khol_107", c = {
6
- checkbox: a,
7
- indicator: k,
8
- icon: m,
9
- iconIndeterminate: _,
10
- iconCheck: l
3
+ import { cx as o } from "class-variance-authority";
4
+ import { CheckIcon as s, MinusIcon as a } from "lucide-react";
5
+ import './chunks/checkbox.CrdIZhi1.css';const m = "_checkbox_19n9c_6", _ = "_indicator_19n9c_96", h = "_icon_19n9c_105", k = "_iconIndeterminate_19n9c_112", d = "_iconCheck_19n9c_116", c = {
6
+ checkbox: m,
7
+ indicator: _,
8
+ icon: h,
9
+ iconIndeterminate: k,
10
+ iconCheck: d
11
11
  };
12
12
  function I({ className: e, ...t }) {
13
- return /* @__PURE__ */ o(i.Root, { className: n(c.checkbox, e), ...t, children: /* @__PURE__ */ r(i.Indicator, { className: c.indicator, children: [
14
- /* @__PURE__ */ o(s, { className: n(c.icon, c.iconCheck) }),
15
- /* @__PURE__ */ o(h, { className: n(c.icon, c.iconIndeterminate) })
13
+ return /* @__PURE__ */ n(i.Root, { className: o(c.checkbox, e), ...t, children: /* @__PURE__ */ r(i.Indicator, { className: c.indicator, children: [
14
+ /* @__PURE__ */ n(s, { className: o(c.icon, c.iconCheck) }),
15
+ /* @__PURE__ */ n(a, { className: o(c.icon, c.iconIndeterminate) })
16
16
  ] }) });
17
17
  }
18
18
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sources":["../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';\nimport { cx } from 'class-variance-authority';\nimport { CheckIcon, MinusIcon } from 'lucide-react';\n\nimport styles from './checkbox.module.css';\n\nexport interface CheckboxProps extends Omit<CheckboxPrimitive.Root.Props, 'className'> {\n className?: string;\n}\n\nexport function Checkbox({ className, ...props }: CheckboxProps) {\n return (\n <CheckboxPrimitive.Root className={cx(styles.checkbox, className)} {...props}>\n <CheckboxPrimitive.Indicator className={styles.indicator}>\n {/* Both marks are always in the DOM; CSS swaps which one shows on the\n * indicator's data-indeterminate state. */}\n <CheckIcon className={cx(styles.icon, styles.iconCheck)} />\n <MinusIcon className={cx(styles.icon, styles.iconIndeterminate)} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n"],"names":["Checkbox","className","props","CheckboxPrimitive","cx","styles","jsxs","jsx","CheckIcon","MinusIcon"],"mappings":";;;;;;;;;;;AAUO,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAAwB;AAC/D,2BACGC,EAAkB,MAAlB,EAAuB,WAAWC,EAAGC,EAAO,UAAUJ,CAAS,GAAI,GAAGC,GACrE,UAAA,gBAAAI,EAACH,EAAkB,WAAlB,EAA4B,WAAWE,EAAO,WAG7C,UAAA;AAAA,IAAA,gBAAAE,EAACC,KAAU,WAAWJ,EAAGC,EAAO,MAAMA,EAAO,SAAS,GAAG;AAAA,IACzD,gBAAAE,EAACE,KAAU,WAAWL,EAAGC,EAAO,MAAMA,EAAO,iBAAiB,EAAA,CAAG;AAAA,EAAA,EAAA,CACnE,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"checkbox.js","sources":["../src/components/checkbox/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';\nimport { cx } from 'class-variance-authority';\nimport { CheckIcon, MinusIcon } from 'lucide-react';\n\nimport styles from './checkbox.module.css';\n\n/*\n * One control box, 16, which is what the design spec draws. There is no\n * size axis: a prop with a single value is worse than no prop, and the kit\n * is pre-1.0. The drawn 32px interaction row is wider and taller than that\n * box on purpose, so a checkbox in a dense row is no harder to hit.\n */\nexport interface CheckboxProps extends Omit<CheckboxPrimitive.Root.Props, 'className'> {\n className?: string;\n}\n\nexport function Checkbox({ className, ...props }: CheckboxProps) {\n return (\n <CheckboxPrimitive.Root className={cx(styles.checkbox, className)} {...props}>\n <CheckboxPrimitive.Indicator className={styles.indicator}>\n {/* Both marks are always in the DOM; CSS swaps which one shows on the\n * indicator's data-indeterminate state. */}\n <CheckIcon className={cx(styles.icon, styles.iconCheck)} />\n <MinusIcon className={cx(styles.icon, styles.iconIndeterminate)} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n"],"names":["Checkbox","className","props","CheckboxPrimitive","cx","styles","jsxs","jsx","CheckIcon","MinusIcon"],"mappings":";;;;;;;;;;;AAgBO,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAAwB;AAC/D,2BACGC,EAAkB,MAAlB,EAAuB,WAAWC,EAAGC,EAAO,UAAUJ,CAAS,GAAI,GAAGC,GACrE,UAAA,gBAAAI,EAACH,EAAkB,WAAlB,EAA4B,WAAWE,EAAO,WAG7C,UAAA;AAAA,IAAA,gBAAAE,EAACC,KAAU,WAAWJ,EAAGC,EAAO,MAAMA,EAAO,SAAS,GAAG;AAAA,IACzD,gBAAAE,EAACE,KAAU,WAAWL,EAAGC,EAAO,MAAMA,EAAO,iBAAiB,EAAA,CAAG;AAAA,EAAA,EAAA,CACnE,EAAA,CACF;AAEJ;"}
@@ -0,0 +1 @@
1
+ ._root_1xr64_7{display:flex;flex-direction:column;width:100%}._item_1xr64_13:not(:last-child){border-bottom:var(--border-width) solid var(--border)}._header_1xr64_27{display:flex;margin:0;font:inherit}._trigger_1xr64_22{display:flex;flex:1;align-items:center;justify-content:space-between;gap:var(--space-2);width:100%;padding-block:var(--space-4);padding-inline:0;border:var(--border-width) solid transparent;border-radius:var(--radius-md);background:none;color:inherit;text-align:left;font-size:var(--text-body-size);line-height:var(--text-body-line-height);font-weight:var(--text-label-weight);cursor:pointer;outline:none;transition:text-decoration-color .15s ease}._trigger_1xr64_22:hover{text-decoration:underline}._trigger_1xr64_22:focus-visible{border-color:var(--ring);outline:var(--border-width-focus) solid var(--ring);outline-offset:2px}@media(forced-colors:active){._trigger_1xr64_22:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._trigger_1xr64_22[data-disabled]{pointer-events:none;opacity:var(--opacity-disabled)}._triggerIcon_1xr64_95{width:var(--icon-size-sm);height:var(--icon-size-sm);flex-shrink:0;color:var(--muted-foreground);pointer-events:none;transition:transform .15s ease}@media(prefers-reduced-motion:reduce){._triggerIcon_1xr64_95{transition:none}}._trigger_1xr64_22[data-panel-open] ._triggerIcon_1xr64_95{transform:rotate(180deg)}._panel_1xr64_128{overflow:hidden;height:var(--accordion-panel-height);transition:height .15s ease}@media(prefers-reduced-motion:reduce){._panel_1xr64_128{transition:none}}._panel_1xr64_128[data-starting-style],._panel_1xr64_128[data-ending-style]{height:0}._content_1xr64_128{padding-bottom:var(--space-4);font-size:var(--text-body-size);line-height:var(--text-body-line-height)}
@@ -0,0 +1 @@
1
+ ._backdrop_1hf7j_14{position:fixed;top:0;right:0;bottom:0;left:0;isolation:isolate;z-index:50;background-color:var(--overlay-modal);transition:opacity .1s ease}._backdrop_1hf7j_14[data-starting-style],._backdrop_1hf7j_14[data-ending-style]{opacity:0}._popup_1hf7j_30{box-sizing:border-box;position:fixed;top:50%;left:50%;isolation:isolate;z-index:50;display:grid;grid-template-columns:minmax(0,1fr);width:100%;max-width:min(20rem,calc(100% - var(--space-8)));max-height:calc(100% - var(--space-8));overflow-y:auto;gap:var(--space-6);padding:0;border:var(--border-width) solid var(--popover-border);border-radius:var(--radius-xl);background-color:var(--popover);color:var(--popover-foreground);font-size:var(--text-body-size);line-height:var(--text-body-line-height);outline:none;transform:translate(-50%,-50%);box-shadow:var(--popover-shadow);transition:opacity .1s ease,transform .1s ease}@media(min-width:640px){._popup_1hf7j_30[data-size=default]{max-width:32rem}}@media(prefers-reduced-motion:reduce){._popup_1hf7j_30{transition:opacity .1s ease}}._popup_1hf7j_30[data-starting-style],._popup_1hf7j_30[data-ending-style]{opacity:0;transform:translate(-50%,-50%) scale(.95)}._popup_1hf7j_30>*{box-sizing:border-box;padding-inline:var(--space-6)}._popup_1hf7j_30>:where(*:first-child){padding-block-start:var(--space-6)}._popup_1hf7j_30>:where(*:last-child){padding-block-end:var(--space-6)}._header_1hf7j_137{position:sticky;top:0;z-index:1;display:grid;grid-template-rows:auto 1fr;place-items:center;gap:var(--space-2);text-align:center;background-color:var(--popover)}@media(min-width:640px){._popup_1hf7j_30[data-size=default] ._header_1hf7j_137{place-items:start;text-align:left}}._media_1hf7j_156{display:inline-flex;align-items:center;justify-content:center;width:4rem;height:4rem;margin-bottom:var(--space-2);border-radius:var(--radius-md);background-color:var(--muted)}._footer_1hf7j_167{position:sticky;bottom:0;z-index:1;display:flex;flex-direction:column-reverse;gap:var(--space-2);background-color:var(--popover)}@media(min-width:640px){._popup_1hf7j_30[data-size=default] ._footer_1hf7j_167{flex-direction:row;justify-content:flex-end}}._popup_1hf7j_30[data-size=sm] ._footer_1hf7j_167{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}._title_1hf7j_197{margin:0;font-size:var(--text-heading-2-size);line-height:var(--text-heading-2-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-heading-2-tracking)}._description_1hf7j_205{color:var(--muted-foreground);font-size:var(--text-body-size);line-height:var(--text-body-line-height)}
@@ -0,0 +1 @@
1
+ ._alert_rvg6q_13{display:grid;gap:var(--space-1);border-radius:var(--radius-xl);border:var(--border-width) solid var(--border);padding:var(--space-3) var(--space-4);text-align:left;font-size:var(--text-body-size);line-height:var(--text-body-line-height);font-weight:var(--text-body-weight);letter-spacing:var(--text-body-tracking)}._variantDefault_rvg6q_30{background-color:var(--card);color:var(--card-foreground)}._variantDestructive_rvg6q_35{background-color:var(--card);color:var(--danger)}._alert_rvg6q_13:has(>svg){grid-template-columns:auto 1fr;column-gap:var(--space-2)}._alert_rvg6q_13>svg{grid-row:span 2 / span 2;translate:0 2px;width:var(--icon-size-sm);height:var(--icon-size-sm)}._alert_rvg6q_13:has(>svg) ._alertTitle_rvg6q_77{grid-column-start:2}._alertTitle_rvg6q_77{font-weight:var(--text-label-weight)}._alertDescription_rvg6q_85{color:var(--muted-foreground);text-wrap:balance}@media(min-width:768px){._alertDescription_rvg6q_85{text-wrap:pretty}}._alertDescription_rvg6q_85 p:not(:last-child){margin-bottom:var(--space-4)}._alert_rvg6q_13:has(>._alertAction_rvg6q_100){position:relative;padding-right:calc(var(--space-8) + var(--space-8) + var(--space-2))}._alertAction_rvg6q_100{position:absolute;top:var(--space-3);right:var(--space-3)}
@@ -0,0 +1 @@
1
+ ._attachment_1jpm5_20{position:relative;display:flex;width:fit-content;max-width:100%;min-width:0;flex-shrink:0;flex-wrap:wrap;border:var(--border-width) solid var(--border);border-radius:var(--radius-xl);background-color:var(--card);color:var(--card-foreground);transition:background-color .15s ease,border-color .15s ease,color .15s ease}._attachment_1jpm5_20:focus-within{box-shadow:0 0 0 1px color-mix(in oklab,var(--ring) 50%,transparent)}._attachment_1jpm5_20:has(>a):hover,._attachment_1jpm5_20:has(>button):hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}._attachment_1jpm5_20[data-state=idle]{border-style:dashed}._attachment_1jpm5_20[data-state=error]{border-color:color-mix(in oklab,var(--destructive) 30%,transparent)}._sizeDefault_1jpm5_61{gap:var(--space-2);font-size:var(--text-body-size);line-height:var(--text-body-line-height)}._attachment_1jpm5_20._sizeDefault_1jpm5_61:has(>._attachmentContent_1jpm5_67){padding-inline:var(--space-3);padding-block:var(--space-2)}._sizeSm_1jpm5_75{gap:var(--space-3);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height)}._attachment_1jpm5_20._sizeSm_1jpm5_75:has(>._attachmentContent_1jpm5_67){padding-inline:var(--space-2);padding-block:var(--space-2)}._sizeXs_1jpm5_89{border-radius:var(--radius-md);gap:var(--space-2);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height)}._attachment_1jpm5_20._sizeXs_1jpm5_89:has(>._attachmentContent_1jpm5_67){padding-inline:var(--space-2);padding-block:var(--space-1)}._orientationHorizontal_1jpm5_107{min-width:10rem;align-items:center}._orientationVertical_1jpm5_114{width:6rem;flex-direction:column}._attachment_1jpm5_20._orientationVertical_1jpm5_114>._attachmentContent_1jpm5_67{width:7.5rem;padding-inline:var(--space-1)}._attachmentMedia_1jpm5_124{position:relative;display:flex;width:2.5rem;aspect-ratio:1;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:var(--radius-md);background-color:var(--muted);color:var(--foreground)}._attachmentMedia_1jpm5_124 svg{pointer-events:none;width:var(--icon-size-sm);height:var(--icon-size-sm)}._attachment_1jpm5_20._orientationVertical_1jpm5_114 ._attachmentMedia_1jpm5_124{width:100%}._attachment_1jpm5_20._orientationVertical_1jpm5_114 ._attachmentMedia_1jpm5_124 svg{width:var(--icon-size-lg);height:var(--icon-size-lg)}._attachment_1jpm5_20._sizeSm_1jpm5_75 ._attachmentMedia_1jpm5_124{width:2rem}._attachment_1jpm5_20._sizeXs_1jpm5_89 ._attachmentMedia_1jpm5_124{width:1.75rem;border-radius:var(--radius-sm)}._attachment_1jpm5_20._sizeXs_1jpm5_89 ._attachmentMedia_1jpm5_124 svg{width:var(--icon-size-xs);height:var(--icon-size-xs)}._attachment_1jpm5_20[data-state=error] ._attachmentMedia_1jpm5_124{background-color:color-mix(in oklab,var(--destructive) 10%,transparent);color:var(--danger)}._variantImage_1jpm5_191{opacity:.6}._attachment_1jpm5_20[data-state=done] ._variantImage_1jpm5_191,._attachment_1jpm5_20[data-state=idle] ._variantImage_1jpm5_191{opacity:1}._variantImage_1jpm5_191 img{aspect-ratio:1;width:100%;object-fit:cover}._attachmentContent_1jpm5_67{max-width:100%;min-width:0;flex:1 1 0%}._attachmentTitle_1jpm5_212{display:block;max-width:100%;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:var(--text-label-weight)}._attachmentDescription_1jpm5_223{display:block;max-width:100%;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);color:var(--muted-foreground)}._attachment_1jpm5_20[data-state=error] ._attachmentDescription_1jpm5_223{color:var(--danger)}._attachmentActions_1jpm5_248{position:relative;z-index:20;display:flex;flex-shrink:0;align-items:center}._attachment_1jpm5_20._orientationVertical_1jpm5_114 ._attachmentActions_1jpm5_248{position:absolute;top:var(--space-3);right:var(--space-3);gap:var(--space-1)}._attachmentTrigger_1jpm5_270{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;outline:none}._attachmentGroup_1jpm5_277{display:flex;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-inline:var(--space-1);gap:var(--space-3);padding-block:var(--space-1)}._attachmentGroup_1jpm5_277>._attachment_1jpm5_20{flex:none;scroll-snap-align:start}
@@ -0,0 +1 @@
1
+ ._avatar_gglhk_33{position:relative;display:flex;flex-shrink:0;border-radius:var(--radius-full);-webkit-user-select:none;user-select:none}._avatar_gglhk_33:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;box-shadow:inset 0 0 0 var(--border-width) var(--border);border-radius:inherit;mix-blend-mode:darken;pointer-events:none}[data-theme=dark] ._avatar_gglhk_33:after{mix-blend-mode:lighten}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) ._avatar_gglhk_33:after{mix-blend-mode:lighten}}._sizeSm_gglhk_80{width:1.5rem;height:1.5rem}._sizeDefault_gglhk_85{width:var(--space-8);height:var(--space-8)}._sizeLg_gglhk_90{width:2.5rem;height:2.5rem}._image_gglhk_24{width:100%;height:100%;aspect-ratio:1;border-radius:inherit;object-fit:cover}._fallback_gglhk_24{display:flex;width:100%;height:100%;align-items:center;justify-content:center;border-radius:inherit;background-color:var(--muted);color:var(--muted-foreground);font-size:var(--text-label-size);line-height:var(--text-label-line-height)}._sizeSm_gglhk_80 ._fallback_gglhk_24{font-size:var(--text-meta-size);line-height:var(--text-meta-line-height)}._variantSolid_gglhk_161._toneNeutral_gglhk_161{background-color:var(--muted-foreground);color:var(--muted)}._variantSolid_gglhk_161._toneAccent_gglhk_166{background-color:var(--primary);color:var(--primary-foreground)}._variantSolid_gglhk_161._toneInfo_gglhk_171{background-color:var(--info);color:var(--info-soft)}._variantSolid_gglhk_161._toneSuccess_gglhk_176{background-color:var(--success);color:var(--success-soft)}._variantSolid_gglhk_161._toneWarning_gglhk_181{background-color:var(--warning);color:var(--warning-soft)}._variantSolid_gglhk_161._toneDanger_gglhk_186{background-color:var(--danger);color:var(--danger-soft)}._variantSoft_gglhk_191._toneNeutral_gglhk_161{background-color:var(--muted);color:var(--muted-foreground)}._variantSoft_gglhk_191._toneAccent_gglhk_166{background-color:var(--accent);color:var(--accent-foreground)}._variantSoft_gglhk_191._toneInfo_gglhk_171{background-color:var(--info-soft);color:var(--info)}._variantSoft_gglhk_191._toneSuccess_gglhk_176{background-color:var(--success-soft);color:var(--success)}._variantSoft_gglhk_191._toneWarning_gglhk_181{background-color:var(--warning-soft);color:var(--warning)}._variantSoft_gglhk_191._toneDanger_gglhk_186{background-color:var(--danger-soft);color:var(--danger)}._badge_gglhk_26{position:absolute;right:0;bottom:0;z-index:10;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--radius-full);background-color:var(--primary);color:var(--primary-foreground);box-shadow:0 0 0 2px var(--background);-webkit-user-select:none;user-select:none}._sizeSm_gglhk_80 ._badge_gglhk_26{width:.5rem;height:.5rem}._sizeSm_gglhk_80 ._badge_gglhk_26 svg{display:none}._sizeDefault_gglhk_85 ._badge_gglhk_26{width:.625rem;height:.625rem}._sizeLg_gglhk_90 ._badge_gglhk_26{width:.75rem;height:.75rem}._sizeDefault_gglhk_85 ._badge_gglhk_26 svg,._sizeLg_gglhk_90 ._badge_gglhk_26 svg{width:.5rem;height:.5rem}._group_gglhk_264{display:flex}._group_gglhk_264>*+*{margin-left:calc(-1 * var(--space-2))}._group_gglhk_264>._avatar_gglhk_33{box-shadow:0 0 0 2px var(--background)}._groupCount_gglhk_276{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--space-8);height:var(--space-8);border-radius:var(--radius-full);background-color:var(--muted);color:var(--muted-foreground);font-size:var(--text-body-size);line-height:var(--text-body-line-height);box-shadow:0 0 0 2px var(--background)}._groupCount_gglhk_276 svg{width:1rem;height:1rem}._group_gglhk_264:has(>._sizeSm_gglhk_80) ._groupCount_gglhk_276{width:1.5rem;height:1.5rem}._group_gglhk_264:has(>._sizeLg_gglhk_90) ._groupCount_gglhk_276{width:2.5rem;height:2.5rem}._group_gglhk_264:has(>._sizeLg_gglhk_90) ._groupCount_gglhk_276 svg{width:1.25rem;height:1.25rem}
@@ -0,0 +1 @@
1
+ ._badge_nk3z3_37{box-sizing:border-box;display:inline-flex;width:fit-content;flex-shrink:0;align-items:center;justify-content:center;gap:var(--space-1);overflow:hidden;border-radius:var(--radius-full);font-family:inherit;white-space:nowrap;text-underline-offset:4px;transition:color .15s ease,background-color .15s ease,border-color .15s ease,box-shadow .15s ease}._badge_nk3z3_37 svg{pointer-events:none;width:var(--icon-size-xs);height:var(--icon-size-xs)}._dot_nk3z3_82{flex-shrink:0;width:6px;height:6px;border-radius:var(--radius-full);background-color:currentColor}._sizeXs_nk3z3_106{height:18px;min-width:20px;padding-block:0;padding-inline:6px;font-size:var(--text-micro-size);line-height:var(--text-micro-line-height);font-weight:600;letter-spacing:var(--text-micro-tracking)}._sizeDefault_nk3z3_121{padding-block:2px;padding-inline:var(--space-2);font-size:var(--text-meta-size);line-height:var(--text-meta-line-height);font-weight:var(--text-label-weight);letter-spacing:var(--text-meta-tracking)}._badge_nk3z3_37:focus-visible{outline:var(--border-width-focus) solid var(--ring);outline-offset:2px;box-shadow:inset 0 0 0 var(--border-width-focus) var(--ring)}@media(forced-colors:active){._badge_nk3z3_37:focus-visible{outline:2px solid Highlight;outline-offset:2px}}._badge_nk3z3_37[aria-invalid=true]{box-shadow:inset 0 0 0 var(--border-width-focus) var(--destructive)}._variantDefault_nk3z3_166{background-color:var(--primary);color:var(--primary-foreground)}a._variantDefault_nk3z3_166:hover{background-color:var(--primary-hover)}._variantSecondary_nk3z3_12{background-color:var(--secondary);color:var(--secondary-foreground)}a._variantSecondary_nk3z3_12:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}._variantDestructive_nk3z3_198{--tint: 10%;--tint-hover: 20%;background-color:color-mix(in oklab,var(--destructive) var(--tint),transparent);color:var(--destructive)}[data-theme=dark] ._variantDestructive_nk3z3_198{--tint: 20%;--tint-hover: 30%}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) ._variantDestructive_nk3z3_198{--tint: 20%;--tint-hover: 30%}}._variantDestructive_nk3z3_198:focus-visible{box-shadow:inset 0 0 0 var(--border-width-focus) var(--destructive-ring)}a._variantDestructive_nk3z3_198:hover{background-color:color-mix(in oklab,var(--destructive) var(--tint-hover),transparent)}._variantCategory_nk3z3_235{--tint: 10%;box-shadow:inset 0 0 0 var(--border-width) var(--primary);background-color:color-mix(in oklab,var(--primary) var(--tint),transparent);color:color-mix(in oklab,var(--foreground) 14%,var(--primary))}[data-theme=dark] ._variantCategory_nk3z3_235{--tint: 40%}@media(prefers-color-scheme:dark){:root:not([data-theme=light]) ._variantCategory_nk3z3_235{--tint: 40%}}._variantOutline_nk3z3_254{box-shadow:inset 0 0 0 var(--border-width) var(--border);color:var(--foreground)}a._variantOutline_nk3z3_254:hover{background-color:var(--accent);color:var(--accent-foreground)}._variantGhost_nk3z3_264{color:var(--foreground)}a._variantGhost_nk3z3_264:hover{background-color:var(--accent);color:var(--accent-foreground)}._variantLink_nk3z3_281{color:var(--link-foreground)}a._variantLink_nk3z3_281:hover{text-decoration:underline}._variantSuccess_nk3z3_314{background-color:var(--success-soft);color:var(--success)}a._variantSuccess_nk3z3_314:hover{text-decoration:underline}._variantWarning_nk3z3_323{background-color:var(--warning-soft);color:var(--warning)}a._variantWarning_nk3z3_323:hover{text-decoration:underline}._variantDanger_nk3z3_332{background-color:var(--danger-soft);color:var(--danger)}a._variantDanger_nk3z3_332:hover{text-decoration:underline}._variantInfo_nk3z3_341{background-color:var(--info-soft);color:var(--info)}a._variantInfo_nk3z3_341:hover{text-decoration:underline}._variantAccent_nk3z3_350{background-color:var(--accent);color:var(--accent-foreground)}a._variantAccent_nk3z3_350:hover{text-decoration:underline}