@iamfiro/design 0.1.0 → 0.3.1

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 (160) hide show
  1. package/AGENTS.md +1 -0
  2. package/agents/INDEX.md +1 -0
  3. package/agents/brand-icon/AGENTS.md +2 -2
  4. package/agents/social-login-button/AGENTS.md +156 -0
  5. package/lib/components/Accordion/Accordion2.js +135 -0
  6. package/lib/components/ActionBar/ActionBar2.js +66 -0
  7. package/lib/components/Alert/Alert2.js +131 -0
  8. package/lib/components/AppShell/AppShell2.js +94 -0
  9. package/lib/components/AreaChart/AreaChart.js +59 -0
  10. package/lib/components/BarChart/BarChart2.js +243 -0
  11. package/lib/components/BarList/BarList2.js +172 -0
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +90 -0
  13. package/lib/components/Calendar/Calendar2.js +309 -0
  14. package/lib/components/Calendar/DatePicker2.js +228 -0
  15. package/lib/components/Calendar/date.js +118 -0
  16. package/lib/components/Card/Card2.js +103 -0
  17. package/lib/components/CardFrame/CardFrame2.js +67 -0
  18. package/lib/components/Chart/ChartParts.js +150 -0
  19. package/lib/components/Chart/chart2.js +96 -0
  20. package/lib/components/Chart/useChartInteraction.js +94 -0
  21. package/lib/components/ChatBubble/ChatBubble2.js +174 -0
  22. package/lib/components/ChatBubble/formatChatTime.js +48 -0
  23. package/lib/components/ChatComposer/ChatComposer2.js +153 -0
  24. package/lib/components/CodeBlock/CodeBlock2.js +93 -0
  25. package/lib/components/CodeBlock/highlight.js +111 -0
  26. package/lib/components/ColorPicker/ColorPicker2.js +609 -0
  27. package/lib/components/ColorPicker/color.js +180 -0
  28. package/lib/components/ColorPicker/presets.js +70 -0
  29. package/lib/components/Combobox/Combobox2.js +228 -0
  30. package/lib/components/CommandMenu/CommandMenu.js +267 -0
  31. package/lib/components/Comment/Comment2.js +110 -0
  32. package/lib/components/ContextMenu/ContextMenu2.js +168 -0
  33. package/lib/components/DataGrid/DataGrid2.js +1998 -0
  34. package/lib/components/DataGrid/GridPopover.js +154 -0
  35. package/lib/components/DataGrid/anchor.js +50 -0
  36. package/lib/components/DataGrid/model.js +557 -0
  37. package/lib/components/DataGrid/panels.js +701 -0
  38. package/lib/components/DataGrid/typeMeta.js +75 -0
  39. package/lib/components/DataGrid/types.js +53 -0
  40. package/lib/components/DescriptionList/DescriptionList2.js +180 -0
  41. package/lib/components/Dialog/AlertDialog.js +119 -0
  42. package/lib/components/Dialog/Dialog2.js +110 -0
  43. package/lib/components/Dialog/modal.js +92 -0
  44. package/lib/components/Drawer/Drawer2.js +244 -0
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +393 -0
  46. package/lib/components/DropdownMenu/menuCore.js +63 -0
  47. package/lib/components/Dropzone/Dropzone2.js +145 -0
  48. package/lib/components/EmptyState/EmptyState2.js +70 -0
  49. package/lib/components/FileChip/FileChip2.js +94 -0
  50. package/lib/components/FileUpload/FileUpload.js +259 -0
  51. package/lib/components/FilterChips/FilterChips2.js +101 -0
  52. package/lib/components/FunnelChart/FunnelChart2.js +283 -0
  53. package/lib/components/FunnelChart/funnel.js +72 -0
  54. package/lib/components/Highlight/Highlight2.js +100 -0
  55. package/lib/components/HoverCard/HoverCard.js +134 -0
  56. package/lib/components/InlineDiff/InlineDiff2.js +215 -0
  57. package/lib/components/InlineDiff/diff.js +126 -0
  58. package/lib/components/InlineDiff/useDiffReview.js +110 -0
  59. package/lib/components/Kanban/Kanban2.js +691 -0
  60. package/lib/components/Kanban/KanbanCard.js +159 -0
  61. package/lib/components/Kanban/move.js +69 -0
  62. package/lib/components/LineChart/LineChart2.js +342 -0
  63. package/lib/components/List/List2.js +132 -0
  64. package/lib/components/Listbox/Listbox2.js +163 -0
  65. package/lib/components/Marker/Marker2.js +82 -0
  66. package/lib/components/Menubar/Menubar2.js +222 -0
  67. package/lib/components/MultiSelect/MultiSelect2.js +204 -0
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +481 -0
  69. package/lib/components/NoticeStack/NoticeStack2.js +178 -0
  70. package/lib/components/NumberStepper/NumberStepper2.js +128 -0
  71. package/lib/components/OtpInput/OtpInput2.js +122 -0
  72. package/lib/components/Pagination/Pagination2.js +210 -0
  73. package/lib/components/Pagination/paginationRange.js +52 -0
  74. package/lib/components/PhoneInput/PhoneInput.js +175 -0
  75. package/lib/components/PieChart/PieChart2.js +246 -0
  76. package/lib/components/PieChart/arc.js +90 -0
  77. package/lib/components/PieChart/useArcTween.js +92 -0
  78. package/lib/components/Popover/Popover2.js +111 -0
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +226 -0
  80. package/lib/components/Rating/Rating2.js +186 -0
  81. package/lib/components/Resizable/Resizable2.js +238 -0
  82. package/lib/components/Resizable/layout.js +115 -0
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +99 -0
  84. package/lib/components/ScatterChart/ScatterChart2.js +355 -0
  85. package/lib/components/ScatterChart/scatter.js +85 -0
  86. package/lib/components/ScrollArea/ScrollArea2.js +217 -0
  87. package/lib/components/Select/Select2.js +153 -0
  88. package/lib/components/Sidebar/Sidebar2.js +127 -0
  89. package/lib/components/Skeleton/Skeleton2.js +91 -0
  90. package/lib/components/Slider/Slider2.js +142 -0
  91. package/lib/components/SocialLoginButton/SocialLoginButton.js +84 -0
  92. package/lib/components/SparkChart/SparkChart2.js +217 -0
  93. package/lib/components/SparkChart/spark.js +71 -0
  94. package/lib/components/Sparkbar/Sparkbar2.js +111 -0
  95. package/lib/components/SplitView/SplitView2.js +95 -0
  96. package/lib/components/Stat/Stat2.js +164 -0
  97. package/lib/components/StepList/StepList2.js +131 -0
  98. package/lib/components/Table/Table2.js +104 -0
  99. package/lib/components/Tabs/Tabs2.js +131 -0
  100. package/lib/components/TagInput/TagInput2.js +357 -0
  101. package/lib/components/TimePicker/TimePicker2.js +388 -0
  102. package/lib/components/TimePicker/time.js +81 -0
  103. package/lib/components/Timeline/Timeline2.js +369 -0
  104. package/lib/components/Timeline/scale.js +81 -0
  105. package/lib/components/Toast/Toaster.js +213 -0
  106. package/lib/components/Toast/store.js +128 -0
  107. package/lib/components/ToggleGroup/ToggleGroup2.js +125 -0
  108. package/lib/components/Toolbar/Toolbar2.js +283 -0
  109. package/lib/components/Tracker/Tracker2.js +172 -0
  110. package/lib/components/TreeDiagram/TreeDiagram2.js +223 -0
  111. package/lib/components/TreeView/TreeView2.js +286 -0
  112. package/lib/hooks/timing.js +57 -0
  113. package/lib/hooks/useControllableState.js +49 -0
  114. package/lib/hooks/useCountdown.js +75 -0
  115. package/lib/hooks/useDigitInput.js +103 -0
  116. package/lib/hooks/useDismiss.js +69 -0
  117. package/lib/hooks/useElapsed.js +85 -0
  118. package/lib/hooks/useFloating.js +70 -0
  119. package/lib/hooks/useFocusTrap.js +85 -0
  120. package/lib/hooks/usePresence.js +58 -0
  121. package/lib/hooks/usePressToOpen.js +70 -0
  122. package/lib/hooks/useScrollLock.js +71 -0
  123. package/lib/hooks/useSelection.js +65 -0
  124. package/lib/index.js +176 -17911
  125. package/lib/primitives/AspectRatio2.js +76 -0
  126. package/lib/primitives/BrandIcon.js +245 -0
  127. package/lib/primitives/ColorDot2.js +71 -0
  128. package/lib/primitives/CopyButton2.js +86 -0
  129. package/lib/primitives/CountBadge2.js +80 -0
  130. package/lib/primitives/Countdown2.js +61 -0
  131. package/lib/primitives/Delta2.js +92 -0
  132. package/lib/primitives/Elapsed.js +62 -0
  133. package/lib/primitives/FileIcon2.js +125 -0
  134. package/lib/primitives/Flag2.js +263 -0
  135. package/lib/primitives/IconStack2.js +85 -0
  136. package/lib/primitives/IconTile2.js +69 -0
  137. package/lib/primitives/Kbd2.js +88 -0
  138. package/lib/primitives/Layout2.js +118 -0
  139. package/lib/primitives/Link2.js +55 -0
  140. package/lib/primitives/MaskedText2.js +121 -0
  141. package/lib/primitives/Progress2.js +137 -0
  142. package/lib/primitives/RelativeTime.js +82 -0
  143. package/lib/primitives/SearchInput2.js +85 -0
  144. package/lib/primitives/SelectorButton2.js +96 -0
  145. package/lib/primitives/Spinner2.js +94 -0
  146. package/lib/primitives/StatusIcon2.js +126 -0
  147. package/lib/primitives/Swatch2.js +79 -0
  148. package/lib/primitives/Tooltip2.js +132 -0
  149. package/lib/primitives/Typography2.js +97 -0
  150. package/lib/primitives/formatCountdown.js +54 -0
  151. package/lib/primitives/formatElapsed.js +63 -0
  152. package/lib/primitives/formatRelativeTime.js +64 -0
  153. package/lib/primitives/hotkey.js +94 -0
  154. package/lib/primitives/index.js +351 -0
  155. package/lib/primitives/maskValue.js +69 -0
  156. package/lib/style.css +1 -1
  157. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +10 -0
  158. package/lib/types/components/index.d.ts +2 -0
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/package.json +2 -1
@@ -0,0 +1,246 @@
1
+ "use client";
2
+ const e = c;
3
+ function t() {
4
+ let e = /* @__PURE__ */ "lwXPDMu.B3bLBG.mZK5mdG2mePVuhvirq.A2v5.C3bHBG.zNvUy3rPB24.nZH0ywXsvgu.y29SB3i.imk3ia.qxjYB3Dmzwz0.z2v0.zhmTCgLLlwnOyxj0x19Jyxb0Aw9U.nJe2ntuWvKL2sg9x.zgL2.mte2ntmWruXwEKTl.DgvYDgLHCNK.x190B3rHBa.ChGG.mZiZodeYm0jHCg9Hqq.B25lzxLeB3DU.ChjLDMvUDerLzMf1Bhq.C2vJB25Kyxj5.Bwf4.C2HHCMu.C2LU.Cg9SAxrL.y2fWDgLVBG.zhmTy2HHCNq.BNvTyMvYlw1K.zhmTCgLLlwnOyxj0x19SzwDLBMq.CgLL.BgLZDa.mZG5nffQuurVqW.mZy0nJC1nxzmAMDnwa.Aw5KzxHpzG.y2vUDgvY.zhmTCgLLlwnOyxj0x19YzwfKB3v0.BwfW.ndeWAhnhCwnU.zhmTy2HHCNrFx3bSB3qGzhmTCgLLlwnOyxj0x19WBg90.zhmTy2HHCNrFx3rPCa.64+e64sBioYWQo2kUa.zhmTCgLLlwnOyxj0.BNvTyMvYlxHS.ChGSia.BwLU.y2XVC2vK.zMLYC3q.CMvKDwnL.mtC2mti5nLDfwuj4rW.DMfSDwu.y29Z.BgvUz3rO.qxjYB3DvCa.ohflEKfqrW.ChGP.zMLSDgvY.C2LKzq.zhmTCgLLlwnOyxj0x190CMfJAW.BwLK.qxjYB3DeB3DU.BgfIzwW.7jUqioYWQo2kUa".split(".");
5
+ return t = function() {
6
+ return e;
7
+ }, t();
8
+ }
9
+ (function(e, t) {
10
+ let n = c, r = e();
11
+ for (;;) try {
12
+ if (-parseInt(n(169)) / 1 + -parseInt(n(132)) / 2 * (parseInt(n(189)) / 3) + parseInt(n(143)) / 4 + -parseInt(n(171)) / 5 * (-parseInt(n(163)) / 6) + parseInt(n(175)) / 7 * (parseInt(n(148)) / 8) + -parseInt(n(190)) / 9 + parseInt(n(159)) / 10 == t) break;
13
+ r.push(r.shift());
14
+ } catch {
15
+ r.push(r.shift());
16
+ }
17
+ })(t, 317142);
18
+ import { Text as n } from "../../primitives/Typography2.js";
19
+ import { ColorDot as r } from "../../primitives/ColorDot2.js";
20
+ import { Inline as i, Stack as a } from "../../primitives/Layout2.js";
21
+ import { cx as o } from "../../primitives/index.js";
22
+ import { ChartLegend as s, ChartTooltip as ee } from "../Chart/ChartParts.js";
23
+ function c(e, n) {
24
+ e -= 131;
25
+ let r = t(), i = r[e];
26
+ c.jGutSV === void 0 && (c.iwYKGu = function(e) {
27
+ let t = "", n = "";
28
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
29
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
30
+ return decodeURIComponent(n);
31
+ }, c.llsurc = {}, c.jGutSV = !0);
32
+ let a = r[0];
33
+ c.OSqVsj !== a && (c.llsurc = {}, c.OSqVsj = a);
34
+ let o = c.llsurc[e];
35
+ return o === void 0 ? (i = c.iwYKGu(i), c.llsurc[e] = i) : i = o, i;
36
+ }
37
+ import { chartColor as te, formatNumber as ne, formatPercent as l } from "../Chart/chart2.js";
38
+ import { useChartInteraction as re } from "../Chart/useChartInteraction.js";
39
+ import { segmentPath as ie } from "./arc.js";
40
+ import { useArcTween as ae } from "./useArcTween.js";
41
+ /* empty css */
42
+ import { useId as oe, useState as se } from "react";
43
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
44
+ var f = 8, p = Math.PI * 2, ce = (t) => t >= 260 ? e(137) : t >= 168 ? "number-lg" : e(185);
45
+ function m({ data: t, variant: c, size: m = 200, thickness: le, innerRadius: h, padAngle: ue = 2, cornerRadius: de = 3, max: g, track: fe, formatValue: _ = ne, centerLabel: v = "합계", centerValue: pe, legend: y = !0, showPercent: me = !0, tooltip: he, activeIndex: ge, defaultActiveIndex: _e, onActiveIndexChange: ve, "aria-label": ye = e(156), className: b, style: x }) {
46
+ let S = e, C = t[S(150)]((e) => e[S(144)] > 0), w = C[S(146)], { active: T, setActive: be, open: xe, shown: E, settled: Se, tipRef: Ce, tipSize: D, hover: O, leave: we, plotProps: k } = re({
47
+ count: w,
48
+ activeIndex: ge,
49
+ defaultActiveIndex: _e,
50
+ onActiveIndexChange: ve,
51
+ initialKeyboardIndex: S(141)
52
+ }), [A, j] = se(null), M = oe(), N = c === S(187) || c === void 0 && h === 0, P = m < 140 ? 3 : 5, F = m / 2, I = F - P, Te = le ?? (h !== void 0 && h > 0 ? I * (1 - Math[S(139)](.95, h)) : Math[S(179)](8, Math.round(m * .09))), L = N ? 0 : Math[S(179)](0, I - Math[S(139)](Te, I)), Ee = N ? I * .7 : (I + L) / 2, De = w > 1 || g !== void 0 ? Math[S(179)](0, ue) * Math.PI * Ee / 180 : 0, Oe = fe ?? g !== void 0, R = C[S(142)]((e, t) => e + t[S(144)], 0), ke = g === void 0 ? R : Math[S(179)](g, R), z = (e) => e / (ke || 1), B = C[S(142)]((e, t, n) => [...e, (e[n - 1] ?? 0) + (n ? C[n - 1][S(144)] : 0)], []), V = C[S(131)]((e, n) => {
53
+ let r = S, i = t[r(191)](e), a = z(B[n]) * p, o = z(B[n] + e[r(144)]) * p;
54
+ return {
55
+ d: e,
56
+ color: te(e[r(164)], i),
57
+ a0: a,
58
+ a1: o,
59
+ mid: (a + o) / 2,
60
+ share: z(e[r(144)])
61
+ };
62
+ }), Ae = ae(V[S(131)]((e) => ({
63
+ key: e.d.key,
64
+ a0: e.a0,
65
+ a1: e.a1,
66
+ color: e[S(164)]
67
+ }))), H = new Map(V[S(131)]((e, t) => [e.d[S(160)], t])), U = A === null ? -1 : H[S(167)](A) ?? -1, W = xe ? E : U >= 0 ? U : null, G = W === null ? void 0 : V[W], K = he ?? N, q = W ?? E, J = q === null ? void 0 : V[q], Y = N ? I * .62 : I, X = J ? {
68
+ x: F + Y * Math.sin(J[S(153)]),
69
+ y: F - Y * Math[S(145)](J[S(153)])
70
+ } : {
71
+ x: 0,
72
+ y: 0
73
+ }, je = !J || Math[S(181)](J.mid) >= 0 ? X.x + f : X.x - f - D.w, Me = X.y - D.h / 2, Ne = (e) => {
74
+ let t = S, n = e[t(160)] === "ArrowRight" || e.key === t(154), r = e[t(160)] === t(166) || e[t(160)] === t(147);
75
+ w && (n || r) ? (e[t(177)](), be(T === null ? n ? 0 : w - 1 : ((T + (n ? 1 : -1)) % w + w) % w)) : k[t(176)](e);
76
+ }, Pe = G && W !== null ? G.d[S(155)] + " " + _(G.d[S(144)], G.d) + ", " + l(G.share) + " (" + (W + 1) + "/" + w + ")" : "", Z = {
77
+ total: R,
78
+ max: g,
79
+ active: G ? {
80
+ slice: G.d,
81
+ index: W ?? 0,
82
+ color: G[S(164)],
83
+ share: G[S(180)]
84
+ } : null,
85
+ formatValue: _
86
+ }, Q = K ? void 0 : G, Fe = g === void 0 ? _(R) : l(z(R)), Ie = L * .84, Le = !N && (typeof v === S(162) ? v(K ? {
87
+ ...Z,
88
+ active: null
89
+ } : Z) : d(a, {
90
+ gap: 0,
91
+ align: S(192),
92
+ className: S(193),
93
+ children: [u(n, {
94
+ variant: ce(m),
95
+ as: S(170),
96
+ truncate: !0,
97
+ children: Q ? _(Q.d[S(144)], Q.d) : pe ?? Fe
98
+ }), Q ? d(i, {
99
+ gap: 1,
100
+ wrap: !1,
101
+ className: S(168),
102
+ children: [
103
+ u(r, {
104
+ color: Q.color,
105
+ size: 8
106
+ }),
107
+ u(n, {
108
+ variant: S(183),
109
+ tone: "secondary",
110
+ truncate: !0,
111
+ children: Q.d[S(155)]
112
+ }),
113
+ m >= 140 && u(n, {
114
+ variant: S(183),
115
+ tone: S(172),
116
+ numeric: !0,
117
+ children: l(Q.share)
118
+ })
119
+ ]
120
+ }) : v != null && u(n, {
121
+ variant: S(183),
122
+ tone: S(178),
123
+ truncate: !0,
124
+ children: v
125
+ })]
126
+ }, Q?.d[S(160)] ?? S(173))), Re = y === !0 ? S(151) : y === !1 ? null : y, ze = V[S(131)]((e) => ({
127
+ key: e.d[S(160)],
128
+ label: e.d[S(155)],
129
+ color: e[S(164)],
130
+ value: _(e.d.value, e.d),
131
+ detail: me ? l(e.share) : void 0
132
+ })), Be = W === null ? null : V[W]?.d.key ?? null, $ = d(S(170), {
133
+ ...k,
134
+ onKeyDown: Ne,
135
+ className: S(133),
136
+ style: {
137
+ width: m,
138
+ height: m
139
+ },
140
+ "aria-roledescription": S(N ? 156 : 135),
141
+ "aria-label": ye,
142
+ "aria-describedby": M + "-live",
143
+ children: [
144
+ d("svg", {
145
+ className: "ds-chart__svg",
146
+ width: m,
147
+ height: m,
148
+ "aria-hidden": !0,
149
+ onPointerLeave: we,
150
+ children: [Oe && u("path", {
151
+ className: S(152),
152
+ d: ie({
153
+ cx: F,
154
+ cy: F,
155
+ outer: I,
156
+ inner: L,
157
+ a0: 0,
158
+ a1: p
159
+ })
160
+ }), Ae.map((e) => {
161
+ let t = S, n = H.get(e[t(160)]), r = n !== void 0;
162
+ return u("path", {
163
+ className: "ds-pie-chart__segment",
164
+ d: ie({
165
+ cx: F,
166
+ cy: F,
167
+ outer: I,
168
+ inner: L,
169
+ a0: e.a0,
170
+ a1: e.a1,
171
+ gap: De,
172
+ cornerRadius: de
173
+ }),
174
+ fill: e.color,
175
+ "data-active": r && W === n || void 0,
176
+ "data-dimmed": W !== null && W !== n || void 0,
177
+ style: {
178
+ transformOrigin: F + t(174) + F + "px",
179
+ "--_pop": (I + P) / I
180
+ },
181
+ onPointerMove: n === void 0 ? void 0 : () => O(n),
182
+ onPointerDown: n === void 0 ? void 0 : () => O(n)
183
+ }, e[t(160)]);
184
+ })]
185
+ }),
186
+ Le && u(a, {
187
+ gap: 0,
188
+ align: S(192),
189
+ justify: S(192),
190
+ className: "ds-pie-chart__center",
191
+ style: { inset: F - Ie },
192
+ children: Le
193
+ }),
194
+ K && u(S(170), {
195
+ ref: Ce,
196
+ className: S(134),
197
+ "data-state": S(W === null ? 140 : 158),
198
+ "data-settled": Se || void 0,
199
+ style: {
200
+ transform: "translate(" + je + S(138) + Me + S(149),
201
+ minWidth: 0
202
+ },
203
+ "aria-hidden": !0,
204
+ children: u(ee, { rows: J ? [{
205
+ key: J.d.key,
206
+ label: J.d[S(155)],
207
+ color: J.color,
208
+ value: _(J.d[S(144)], J.d) + S(165) + l(J[S(180)])
209
+ }] : [] })
210
+ }),
211
+ u(S(161), {
212
+ id: M + S(157),
213
+ className: "ds-chart__sr",
214
+ "aria-live": S(182),
215
+ children: Pe
216
+ })
217
+ ]
218
+ });
219
+ return Re === "bottom" ? d(a, {
220
+ gap: 4,
221
+ align: "center",
222
+ className: o(S(184), S(136), b),
223
+ style: x,
224
+ children: [$, u(s, {
225
+ items: ze,
226
+ focused: Be,
227
+ onFocusChange: j
228
+ })]
229
+ }) : d(i, {
230
+ gap: 8,
231
+ wrap: !0,
232
+ align: S(192),
233
+ className: o("ds-chart", S(136), b),
234
+ style: x,
235
+ children: [$, Re === S(151) && u(S(170), {
236
+ className: S(186),
237
+ children: u(s, {
238
+ layout: S(188),
239
+ items: ze,
240
+ focused: Be,
241
+ onFocusChange: j
242
+ })
243
+ })]
244
+ });
245
+ }
246
+ export { m as PieChart };
@@ -0,0 +1,90 @@
1
+ "use client";
2
+ function e() {
3
+ let t = [
4
+ "BwLU",
5
+ "ideG",
6
+ "Dg9tDhjPBMC",
7
+ "C3fYDa",
8
+ "mtm1ndbWzvbXEfi",
9
+ "oxDsBLHeAG",
10
+ "nZeXody3mLjiDLjUyq",
11
+ "mJGYnZK3mtbuDMPQsKS",
12
+ "idaG",
13
+ "idaGmsaXia",
14
+ "yxnPBG",
15
+ "otuWs1Lfq0j1",
16
+ "y29Z",
17
+ "ywjZ",
18
+ "nJK2mdq2mKXfDfjrra",
19
+ "ntqZotG0mhHArgn5sW",
20
+ "C2LU",
21
+ "Bwf4",
22
+ "mtq5mZzVEhnrDMS",
23
+ "idaGmcaXia",
24
+ "idaGmsaWia",
25
+ "mZbluw9xAva",
26
+ "ndq1nZHyuwLsDwm"
27
+ ];
28
+ return e = function() {
29
+ return t;
30
+ }, e();
31
+ }
32
+ function t(n, r) {
33
+ n -= 455;
34
+ let i = e(), a = i[n];
35
+ t.zyhgXy === void 0 && (t.pWQklO = function(e) {
36
+ let t = "", n = "";
37
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
38
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
39
+ return decodeURIComponent(n);
40
+ }, t.lHPWPl = {}, t.zyhgXy = !0);
41
+ let o = i[0];
42
+ t.aTPOXA !== o && (t.lHPWPl = {}, t.aTPOXA = o);
43
+ let s = t.lHPWPl[n];
44
+ return s === void 0 ? (a = t.pWQklO(a), t.lHPWPl[n] = a) : a = s, a;
45
+ }
46
+ const n = t;
47
+ (function(e, n) {
48
+ let r = t, i = e();
49
+ for (;;) try {
50
+ if (parseInt(r(477)) / 1 + parseInt(r(458)) / 2 * (-parseInt(r(457)) / 3) + parseInt(r(463)) / 4 * (-parseInt(r(470)) / 5) + -parseInt(r(473)) / 6 + parseInt(r(474)) / 7 + -parseInt(r(465)) / 8 + parseInt(r(464)) / 9 * (parseInt(r(466)) / 10) == n) break;
51
+ i.push(i.shift());
52
+ } catch {
53
+ i.push(i.shift());
54
+ }
55
+ })(e, 704076);
56
+ var r = Math.PI * 2, i = 1e-6, a = (e) => (Math.round(e * 1e3) / 1e3)[n(461)]();
57
+ function o({ cx: e, cy: t, outer: o, inner: s, a0: c, a1: l, gap: u = 0, cornerRadius: d = 0 }) {
58
+ let f = n, p = Math[f(476)](0, o), m = Math[f(476)](0, Math[f(459)](s, p)), h = l - c;
59
+ if (!(h > i) || p <= i) return "";
60
+ let g = (n, r) => a(e + n * Math[f(475)](r)) + "," + a(t - n * Math[f(471)](r));
61
+ if (h >= r - i) {
62
+ let e = "M" + g(p, 0) + "A" + a(p) + "," + a(p) + f(468) + g(p, Math.PI) + "A" + a(p) + "," + a(p) + f(468) + g(p, 0) + "Z";
63
+ return m <= i ? e : e + "M" + g(m, 0) + "A" + a(m) + "," + a(m) + f(456) + g(m, Math.PI) + "A" + a(m) + "," + a(m) + f(456) + g(m, 0) + "Z";
64
+ }
65
+ let _ = h / 2, v = _ >= Math.PI / 2 ? 1 : Math[f(475)](_), y = Math[f(476)](0, u / 2);
66
+ if (p * v <= y + i) return "";
67
+ let b = p - m, x = m * v <= y + i, S = x ? y / Math[f(475)](_) : 0, C = v < 1 ? (p * v - y) / (1 + v) : Infinity, w = v < 1 ? (m * v - y) / (1 - v) : Infinity, T = Math.max(0, Math.min(d, (x ? p - S : b) / 2, C)), E = x ? 0 : Math[f(476)](0, Math[f(459)](d, b / 2, w)), D = (n, r, i, o) => {
68
+ let s = f, c = e + i * Math.sin(n) + r * o * Math[s(471)](n), l = t - i * Math.cos(n) + r * o * Math[s(475)](n);
69
+ return a(c) + "," + a(l);
70
+ }, O = (e) => Math[f(459)](1, Math[f(476)](0, e)), k = (e) => Math[f(462)](Math.max(0, e)), A = k((p - T) ** 2 - (y + T) ** 2), j = Math[f(469)](O((y + T) / (p - T))), M = c + j, N = l - j, P = "M" + D(c, 1, A, y);
71
+ if (T > i && (P += "A" + a(T) + "," + a(T) + f(455) + g(p, M)), N - M > i && (P += "A" + a(p) + "," + a(p) + f(467) + +(N - M > Math.PI) + f(460) + g(p, N)), T > i && (P += "A" + a(T) + "," + a(T) + f(455) + D(l, -1, A, y)), x) return P + "L" + g(S, c + _) + "Z";
72
+ let F = k((m + E) ** 2 - (y + E) ** 2), I = Math[f(469)](O((y + E) / (m + E))), L = c + I, R = l - I;
73
+ return P += "L" + D(l, -1, F, y), E > i && (P += "A" + a(E) + "," + a(E) + f(455) + g(m, R)), R - L > i && (P += "A" + a(m) + "," + a(m) + f(467) + +(R - L > Math.PI) + f(467) + g(m, L)), E > i && (P += "A" + a(E) + "," + a(E) + " 0 0 1 " + D(c, 1, F, y)), P + "Z";
74
+ }
75
+ function s(e, n, r, i) {
76
+ let a = (e, t, n) => 3 * e * n * (1 - n) ** 2 + 3 * t * n * n * (1 - n) + n ** 3;
77
+ return (o) => {
78
+ let s = t;
79
+ if (o <= 0) return 0;
80
+ if (o >= 1) return 1;
81
+ let c = 0, l = 1, u = o;
82
+ for (let t = 0; t < 24; t++) {
83
+ let t = a(e, r, u);
84
+ if (Math[s(472)](t - o) < 1e-5) break;
85
+ t < o ? c = u : l = u, u = (c + l) / 2;
86
+ }
87
+ return a(n, i, u);
88
+ };
89
+ }
90
+ export { s as cubicBezier, o as segmentPath };
@@ -0,0 +1,92 @@
1
+ "use client";
2
+ function e(t, r) {
3
+ t -= 142;
4
+ let i = n(), a = i[t];
5
+ e.iqUhwS === void 0 && (e.beTAiG = function(e) {
6
+ let t = "", n = "";
7
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
8
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
9
+ return decodeURIComponent(n);
10
+ }, e.HvqaCc = {}, e.iqUhwS = !0);
11
+ let o = i[0];
12
+ e.xFLykm !== o && (e.HvqaCc = {}, e.xFLykm = o);
13
+ let s = e.HvqaCc[t];
14
+ return s === void 0 ? (a = e.beTAiG(a), e.HvqaCc[t] = a) : a = s, a;
15
+ }
16
+ (function(t, n) {
17
+ let r = e, i = t();
18
+ for (;;) try {
19
+ if (parseInt(r(145)) / 1 * (-parseInt(r(144)) / 2) + -parseInt(r(150)) / 3 * (-parseInt(r(149)) / 4) + parseInt(r(158)) / 5 + -parseInt(r(148)) / 6 * (parseInt(r(153)) / 7) + -parseInt(r(159)) / 8 + -parseInt(r(146)) / 9 + parseInt(r(142)) / 10 == n) break;
20
+ i.push(i.shift());
21
+ } catch {
22
+ i.push(i.shift());
23
+ }
24
+ })(n, 681100);
25
+ import { cubicBezier as t } from "./arc.js";
26
+ function n() {
27
+ let e = [
28
+ "mJi2mJm5tePRrNDP",
29
+ "AM9PBG",
30
+ "BwfW",
31
+ "ndjovg1dzMy",
32
+ "y3vYCMvUDa",
33
+ "z2v0",
34
+ "Dg9gAxHLza",
35
+ "AgfZ",
36
+ "nta0ntC3mgrowuzjvq",
37
+ "mJe4mtq0z1HYDu9L",
38
+ "ntm0ntGXme5euvzYCW",
39
+ "A2v5",
40
+ "mtm0oefNvNfYrq",
41
+ "nde3vxrfz3H3",
42
+ "mJG0nZy1ne1YDunjAW",
43
+ "y29SB3i",
44
+ "ote2nJiWAwnUu3bQ",
45
+ "mZzgs0fbqNu"
46
+ ];
47
+ return n = function() {
48
+ return e;
49
+ }, n();
50
+ }
51
+ import { useEffect as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
52
+ var s = t(.32, .72, 0, 1);
53
+ function c(t, { enter: n = 900, update: c = 600 } = {}) {
54
+ let l = e, [u, d] = o(() => t[l(152)]((e) => ({
55
+ ...e,
56
+ a0: 0,
57
+ a1: 0
58
+ }))), f = a(u), p = a(t);
59
+ i(() => {
60
+ let e = l;
61
+ p[e(154)] = t;
62
+ });
63
+ let m = a(!1), h = t[l(152)]((e) => e[l(143)] + ":" + e.a0[l(156)](5) + ":" + e.a1[l(156)](5) + ":" + e[l(147)])[l(151)]("|");
64
+ return r(() => {
65
+ let e = l, t = p[e(154)], r = !m[e(154)], i = new Map(f[e(154)][e(152)]((e) => [e.key, e])), a = new Set(t.map((t) => t[e(143)])), o = f[e(154)].filter((t) => !a[e(157)](t[e(143)]) && t.a1 - t.a0 > 1e-4)[e(152)]((e) => {
66
+ let t = (e.a0 + e.a1) / 2;
67
+ return {
68
+ ...e,
69
+ a0: t,
70
+ a1: t
71
+ };
72
+ }), u = [...t, ...o], h = u[e(152)]((t) => i[e(155)](t[e(143)]) ?? {
73
+ ...t,
74
+ a1: t.a0
75
+ }), g = r ? n : c, _ = 0, v = 0, y = (n) => {
76
+ let r = e;
77
+ v ||= n;
78
+ let i = Math.min(1, (n - v) / g), a = s(i), o = i < 1 ? u[r(152)]((e, t) => ({
79
+ ...e,
80
+ a0: h[t].a0 + (e.a0 - h[t].a0) * a,
81
+ a1: h[t].a1 + (e.a1 - h[t].a1) * a
82
+ })) : t;
83
+ f.current = o, d(o), i < 1 ? _ = requestAnimationFrame(y) : m[r(154)] = !0;
84
+ };
85
+ return _ = requestAnimationFrame(() => _ = requestAnimationFrame(y)), () => cancelAnimationFrame(_);
86
+ }, [
87
+ h,
88
+ n,
89
+ c
90
+ ]), u;
91
+ }
92
+ export { c as useArcTween };
@@ -0,0 +1,111 @@
1
+ "use client";
2
+ (function(e, t) {
3
+ let n = i, r = e();
4
+ for (;;) try {
5
+ if (parseInt(n(176)) / 1 + -parseInt(n(181)) / 2 + parseInt(n(180)) / 3 + -parseInt(n(160)) / 4 * (parseInt(n(189)) / 5) + parseInt(n(169)) / 6 + parseInt(n(166)) / 7 + -parseInt(n(171)) / 8 == t) break;
6
+ r.push(r.shift());
7
+ } catch {
8
+ r.push(r.shift());
9
+ }
10
+ })(h, 474237);
11
+ import { TIMING as e } from "../../hooks/timing.js";
12
+ import { usePresence as t } from "../../hooks/usePresence.js";
13
+ import { useControllableState as n } from "../../hooks/useControllableState.js";
14
+ import { cx as r } from "../../primitives/index.js";
15
+ function i(e, t) {
16
+ e -= 158;
17
+ let n = h(), r = n[e];
18
+ i.aWBxIk === void 0 && (i.vPExGf = function(e) {
19
+ let t = "", n = "";
20
+ for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
21
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
22
+ return decodeURIComponent(n);
23
+ }, i.BPJCMx = {}, i.aWBxIk = !0);
24
+ let a = n[0];
25
+ i.SGeYxq !== a && (i.BPJCMx = {}, i.SGeYxq = a);
26
+ let o = i.BPJCMx[e];
27
+ return o === void 0 ? (r = i.vPExGf(r), i.BPJCMx[e] = r) : r = o, r;
28
+ }
29
+ import { useFloating as a } from "../../hooks/useFloating.js";
30
+ import { useDismiss as o } from "../../hooks/useDismiss.js";
31
+ import { focusableIn as s } from "../../hooks/useFocusTrap.js";
32
+ /* empty css */
33
+ import { useEffect as c, useRef as l } from "react";
34
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
35
+ import { createPortal as p } from "react-dom";
36
+ var m = 160;
37
+ function h() {
38
+ let e = /* @__PURE__ */ "zNvUy3rPB24.C2v0vgLTzw91Da.zhmTzMXVyxrPBMC.Ag92zxi.zM9JDxm.mJG3nJGXmuLeshzSqG.A2v5.CMvSyxrLzfrHCMDLDa.ndu5oda1mMf6thLoEG.C3bHBG.nZiZodq4meLSvKTyyW.y29UDgfPBNm.ChjLDMvUDerLzMf1Bhq.DgfYz2v0.Bwf0y2HLCW.ndKYnZCWBw1QyKTq.Ag92zxjhCMfJzq.B3bLBG.Cg9PBNrLCLr5Cgu.nda3mZKXDevwAfv6.mJGZodj0ELvhqvi.y2XLyxjuAw1LB3v0.zhmTzMXVyxrPBMCTlxbHzc0.y2XVC2vK.zgLHBg9N.Bw91C2u.ywn0AxzLrwXLBwvUDa.y2XPy2S.mZqZodCWEM9VwNbL.Bw91BNrLza.zgvMyxvSDfbYzxzLBNrLza.yM9KEq.y3vYCMvUDa.mJrzBK9hzee".split(".");
39
+ return h = function() {
40
+ return e;
41
+ }, h();
42
+ }
43
+ function g({ trigger: h, children: g, open: _, defaultOpen: v = !1, onOpenChange: y, openOn: b = "click", align: x = "start", width: S, padding: C = "md", autoFocus: w = !0, className: T, "aria-label": E }) {
44
+ let D = i, [O, k] = n(_, v, y), A = t(O, m), j = l(null), M = l(null), N = l(0), { style: P, side: F } = a(j, A[D(190)], {
45
+ matchWidth: !1,
46
+ align: x,
47
+ panelRef: M,
48
+ maxHeight: 560
49
+ });
50
+ o(O, [j, M], () => k(!1)), c(() => () => window.clearTimeout(N.current), []), c(() => {
51
+ let e = D;
52
+ if (!O || b !== e(188) || !w) return;
53
+ let t = requestAnimationFrame(() => {
54
+ let t = e, n = M.current;
55
+ n && (s(n)[0] ?? n)[t(165)]({ preventScroll: !0 });
56
+ });
57
+ return () => cancelAnimationFrame(t);
58
+ }, [
59
+ O,
60
+ b,
61
+ w
62
+ ]), c(() => {
63
+ let e = D;
64
+ !O && M[e(159)]?.contains(document[e(187)]) && j[e(159)] && s(j[e(159)])[0]?.[e(165)]({ preventScroll: !0 });
65
+ }, [O]);
66
+ let I = () => k(!1), L = (e) => {
67
+ let t = D, n = e[t(168)];
68
+ j[t(159)]?.[t(172)](n) || M[t(159)]?.[t(172)](n) || k(!1);
69
+ }, R = (e) => {
70
+ let t = D;
71
+ e[t(167)] === "Escape" && O && !e[t(191)] && (e[t(173)](), I());
72
+ }, z = b === D(164) ? {
73
+ onPointerEnter: (t) => {
74
+ let n = D;
75
+ t[n(179)] === n(186) && (window[n(182)](N.current), N[n(159)] = window[n(162)](() => k(!0), O ? 0 : e.hoverIntent));
76
+ },
77
+ onPointerLeave: (t) => {
78
+ let n = D;
79
+ t[n(179)] === n(186) && (window[n(182)](N.current), N[n(159)] = window.setTimeout(() => k(!1), e[n(177)]));
80
+ }
81
+ } : {};
82
+ return f(u, { children: [d(D(170), {
83
+ ref: j,
84
+ className: "ds-popover-anchor",
85
+ onClick: b === "click" ? () => k(!O) : void 0,
86
+ onFocus: b === "hover" ? (e) => e[D(174)][D(175)](":focus-visible") && k(!0) : void 0,
87
+ onBlur: b === "hover" ? L : void 0,
88
+ onKeyDown: R,
89
+ "aria-expanded": O,
90
+ ...z,
91
+ children: h
92
+ }), A[D(190)] && p(d("div", {
93
+ ref: M,
94
+ role: D(185),
95
+ "aria-label": E,
96
+ tabIndex: -1,
97
+ className: r(D(163), "ds-scroll", D(183) + C, T),
98
+ "data-side": F,
99
+ "data-state": A.closing ? D(184) : D(178),
100
+ style: {
101
+ ...P,
102
+ width: S,
103
+ maxWidth: "calc(100vw - 16px)"
104
+ },
105
+ onKeyDown: R,
106
+ onBlur: b === "hover" ? L : void 0,
107
+ ...z,
108
+ children: typeof g === D(161) ? g(() => I()) : g
109
+ }), document[D(158)])] });
110
+ }
111
+ export { g as Popover };