@iamfiro/design 0.3.2 → 0.3.4

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 (158) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/brand-icon/AGENTS.md +1 -1
  3. package/agents/social-login-button/AGENTS.md +4 -3
  4. package/lib/components/Accordion/Accordion2.js +87 -87
  5. package/lib/components/ActionBar/ActionBar2.js +42 -44
  6. package/lib/components/Alert/Alert2.js +61 -61
  7. package/lib/components/AppShell/AppShell2.js +70 -71
  8. package/lib/components/AreaChart/AreaChart.js +38 -40
  9. package/lib/components/BarChart/BarChart2.js +126 -126
  10. package/lib/components/BarList/BarList2.js +95 -95
  11. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -66
  12. package/lib/components/Calendar/Calendar2.js +164 -164
  13. package/lib/components/Calendar/DatePicker2.js +103 -102
  14. package/lib/components/Calendar/date.js +64 -66
  15. package/lib/components/Card/Card2.js +67 -67
  16. package/lib/components/CardFrame/CardFrame2.js +43 -51
  17. package/lib/components/Chart/ChartParts.js +94 -94
  18. package/lib/components/Chart/chart2.js +52 -52
  19. package/lib/components/Chart/useChartInteraction.js +54 -54
  20. package/lib/components/ChatBubble/ChatBubble2.js +92 -92
  21. package/lib/components/ChatBubble/formatChatTime.js +35 -41
  22. package/lib/components/ChatComposer/ChatComposer2.js +63 -63
  23. package/lib/components/CodeBlock/CodeBlock2.js +61 -61
  24. package/lib/components/CodeBlock/highlight.js +84 -84
  25. package/lib/components/ColorPicker/ColorPicker2.js +387 -386
  26. package/lib/components/ColorPicker/color.js +71 -71
  27. package/lib/components/ColorPicker/presets.js +41 -46
  28. package/lib/components/Combobox/Combobox2.js +117 -118
  29. package/lib/components/CommandMenu/CommandMenu.js +127 -127
  30. package/lib/components/Comment/Comment2.js +86 -60
  31. package/lib/components/ContextMenu/ContextMenu2.js +77 -75
  32. package/lib/components/DataGrid/DataGrid2.js +1192 -1190
  33. package/lib/components/DataGrid/GridPopover.js +94 -94
  34. package/lib/components/DataGrid/anchor.js +34 -31
  35. package/lib/components/DataGrid/model.js +284 -283
  36. package/lib/components/DataGrid/panels.js +398 -399
  37. package/lib/components/DataGrid/typeMeta.js +51 -50
  38. package/lib/components/DataGrid/types.js +38 -39
  39. package/lib/components/DescriptionList/DescriptionList2.js +103 -103
  40. package/lib/components/Dialog/AlertDialog.js +79 -78
  41. package/lib/components/Dialog/Dialog2.js +59 -59
  42. package/lib/components/Dialog/modal.js +44 -46
  43. package/lib/components/Drawer/Drawer2.js +130 -129
  44. package/lib/components/DropdownMenu/DropdownMenu2.js +235 -233
  45. package/lib/components/DropdownMenu/menuCore.js +69 -42
  46. package/lib/components/Dropzone/Dropzone2.js +79 -78
  47. package/lib/components/EmptyState/EmptyState2.js +34 -35
  48. package/lib/components/FileChip/FileChip2.js +73 -73
  49. package/lib/components/FileUpload/FileUpload.js +159 -159
  50. package/lib/components/FilterChips/FilterChips2.js +61 -61
  51. package/lib/components/FunnelChart/FunnelChart2.js +161 -161
  52. package/lib/components/FunnelChart/funnel.js +48 -44
  53. package/lib/components/Highlight/Highlight2.js +43 -43
  54. package/lib/components/HoverCard/HoverCard.js +59 -84
  55. package/lib/components/InlineDiff/InlineDiff2.js +112 -112
  56. package/lib/components/InlineDiff/diff.js +90 -90
  57. package/lib/components/InlineDiff/useDiffReview.js +64 -63
  58. package/lib/components/Kanban/Kanban2.js +386 -387
  59. package/lib/components/Kanban/KanbanCard.js +70 -95
  60. package/lib/components/Kanban/move.js +50 -46
  61. package/lib/components/LineChart/LineChart2.js +211 -211
  62. package/lib/components/List/List2.js +53 -54
  63. package/lib/components/Listbox/Listbox2.js +115 -115
  64. package/lib/components/Marker/Marker2.js +56 -61
  65. package/lib/components/Menubar/Menubar2.js +144 -141
  66. package/lib/components/MultiSelect/MultiSelect2.js +108 -108
  67. package/lib/components/NavigationMenu/NavigationMenu2.js +298 -299
  68. package/lib/components/NoticeStack/NoticeStack2.js +84 -84
  69. package/lib/components/NumberStepper/NumberStepper2.js +65 -66
  70. package/lib/components/OtpInput/OtpInput2.js +70 -69
  71. package/lib/components/Pagination/Pagination2.js +106 -106
  72. package/lib/components/Pagination/paginationRange.js +37 -39
  73. package/lib/components/PhoneInput/PhoneInput.js +87 -88
  74. package/lib/components/PieChart/PieChart2.js +160 -160
  75. package/lib/components/PieChart/arc.js +65 -62
  76. package/lib/components/PieChart/useArcTween.js +53 -60
  77. package/lib/components/Popover/Popover2.js +62 -62
  78. package/lib/components/ProgressTracker/ProgressTracker2.js +121 -121
  79. package/lib/components/Rating/Rating2.js +82 -81
  80. package/lib/components/Resizable/Resizable2.js +126 -127
  81. package/lib/components/Resizable/layout.js +73 -73
  82. package/lib/components/ScaledPreview/ScaledPreview2.js +68 -67
  83. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  84. package/lib/components/ScatterChart/scatter.js +47 -49
  85. package/lib/components/ScrollArea/ScrollArea2.js +117 -118
  86. package/lib/components/Select/Select2.js +78 -79
  87. package/lib/components/Sidebar/Sidebar2.js +69 -69
  88. package/lib/components/Skeleton/Skeleton2.js +57 -57
  89. package/lib/components/Slider/Slider2.js +73 -74
  90. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -68
  91. package/lib/components/SparkChart/SparkChart2.js +145 -145
  92. package/lib/components/SparkChart/spark.js +64 -42
  93. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  94. package/lib/components/SplitView/SplitView2.js +51 -52
  95. package/lib/components/Stat/Stat2.js +90 -90
  96. package/lib/components/StepList/StepList2.js +70 -70
  97. package/lib/components/Table/Table2.js +70 -70
  98. package/lib/components/Tabs/Tabs2.js +81 -81
  99. package/lib/components/TagInput/TagInput2.js +220 -217
  100. package/lib/components/TimePicker/TimePicker2.js +187 -186
  101. package/lib/components/TimePicker/time.js +63 -62
  102. package/lib/components/Timeline/Timeline2.js +199 -199
  103. package/lib/components/Timeline/scale.js +67 -64
  104. package/lib/components/Toast/Toaster.js +100 -98
  105. package/lib/components/Toast/store.js +90 -94
  106. package/lib/components/ToggleGroup/ToggleGroup2.js +76 -76
  107. package/lib/components/Toolbar/Toolbar2.js +163 -161
  108. package/lib/components/Tracker/Tracker2.js +82 -82
  109. package/lib/components/TreeDiagram/TreeDiagram2.js +123 -124
  110. package/lib/components/TreeView/TreeView2.js +154 -152
  111. package/lib/hooks/timing.js +31 -30
  112. package/lib/hooks/useControllableState.js +37 -38
  113. package/lib/hooks/useCountdown.js +53 -56
  114. package/lib/hooks/useDigitInput.js +66 -41
  115. package/lib/hooks/useDismiss.js +55 -58
  116. package/lib/hooks/useElapsed.js +57 -55
  117. package/lib/hooks/useFloating.js +44 -44
  118. package/lib/hooks/useFocusTrap.js +70 -46
  119. package/lib/hooks/usePresence.js +23 -22
  120. package/lib/hooks/usePressToOpen.js +51 -51
  121. package/lib/hooks/useScrollLock.js +57 -58
  122. package/lib/hooks/useSelection.js +49 -52
  123. package/lib/index.js +65 -65
  124. package/lib/primitives/AspectRatio2.js +57 -57
  125. package/lib/primitives/BrandIcon.js +189 -158
  126. package/lib/primitives/ColorDot2.js +50 -45
  127. package/lib/primitives/CopyButton2.js +52 -50
  128. package/lib/primitives/CountBadge2.js +53 -55
  129. package/lib/primitives/Countdown2.js +28 -25
  130. package/lib/primitives/Delta2.js +41 -41
  131. package/lib/primitives/Elapsed.js +47 -47
  132. package/lib/primitives/FileIcon2.js +86 -86
  133. package/lib/primitives/Flag2.js +122 -122
  134. package/lib/primitives/IconStack2.js +55 -31
  135. package/lib/primitives/IconTile2.js +43 -43
  136. package/lib/primitives/Kbd2.js +55 -55
  137. package/lib/primitives/Layout2.js +78 -78
  138. package/lib/primitives/Link2.js +39 -36
  139. package/lib/primitives/MaskedText2.js +74 -52
  140. package/lib/primitives/Progress2.js +67 -66
  141. package/lib/primitives/RelativeTime.js +54 -61
  142. package/lib/primitives/SearchInput2.js +45 -45
  143. package/lib/primitives/SelectorButton2.js +72 -76
  144. package/lib/primitives/Spinner2.js +56 -56
  145. package/lib/primitives/StatusIcon2.js +63 -63
  146. package/lib/primitives/Swatch2.js +55 -61
  147. package/lib/primitives/Tooltip2.js +78 -78
  148. package/lib/primitives/Typography2.js +53 -53
  149. package/lib/primitives/formatCountdown.js +30 -29
  150. package/lib/primitives/formatElapsed.js +46 -49
  151. package/lib/primitives/formatRelativeTime.js +76 -50
  152. package/lib/primitives/hotkey.js +80 -80
  153. package/lib/primitives/index.js +169 -168
  154. package/lib/primitives/maskValue.js +55 -50
  155. package/lib/style.css +1 -1
  156. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  157. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  158. package/package.json +1 -1
@@ -1,62 +1,76 @@
1
1
  "use client";
2
- const e = _;
2
+ const e = u;
3
3
  (function(e, t) {
4
- let n = _, r = e();
4
+ let n = u, r = e();
5
5
  for (;;) try {
6
- if (parseInt(n(464)) / 1 * (-parseInt(n(465)) / 2) + -parseInt(n(504)) / 3 + -parseInt(n(454)) / 4 * (parseInt(n(528)) / 5) + -parseInt(n(523)) / 6 + parseInt(n(515)) / 7 + -parseInt(n(503)) / 8 * (parseInt(n(462)) / 9) + -parseInt(n(469)) / 10 * (-parseInt(n(531)) / 11) == t) break;
6
+ if (parseInt(n(563)) / 1 * (parseInt(n(507)) / 2) + parseInt(n(490)) / 3 + parseInt(n(557)) / 4 + parseInt(n(518)) / 5 + -parseInt(n(512)) / 6 * (parseInt(n(536)) / 7) + parseInt(n(522)) / 8 + parseInt(n(529)) / 9 * (-parseInt(n(525)) / 10) == t) break;
7
7
  r.push(r.shift());
8
8
  } catch {
9
9
  r.push(r.shift());
10
10
  }
11
- })(a, 690005);
11
+ })(g, 951405);
12
12
  import { Stack as t } from "../../primitives/Layout2.js";
13
13
  import { cx as n } from "../../primitives/index.js";
14
14
  import { ChartLegend as r, ChartTooltip as i } from "../Chart/ChartParts.js";
15
- function a() {
16
- let e = /* @__PURE__ */ "zhmTBgLUzs1JAgfYDf9FBgLUzq.DhjHB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xaP.DhjHBNnSyxrLwcG.y2XPCfbHDgG".split(".");
17
- return a = function() {
15
+ import { CHART_TONE_SOFT as a, CHART_TONE_STRONG as o, axisGutter as s, bandPath as ee, chartColor as c, formatCompact as te, formatNumber as ne, formatPercent as re, labelStep as ie, linePath as ae, niceTicks as oe, numberAt as l } from "../Chart/chart2.js";
16
+ import { useChartInteraction as se } from "../Chart/useChartInteraction.js";
17
+ /* empty css */
18
+ function u(e, t) {
19
+ e -= 479;
20
+ let n = g(), r = n[e];
21
+ u.kVzxoX === void 0 && (u.OEjtQh = function(e) {
22
+ let t = "", n = "";
23
+ 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);
24
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
25
+ return decodeURIComponent(n);
26
+ }, u.WRgXKv = {}, u.kVzxoX = !0);
27
+ let i = n[0];
28
+ u.eOSanr !== i && (u.WRgXKv = {}, u.eOSanr = i);
29
+ let a = u.WRgXKv[e];
30
+ return a === void 0 ? (r = u.OEjtQh(r), u.WRgXKv[e] = r) : r = a, r;
31
+ }
32
+ import { useId as ce, useLayoutEffect as le, useMemo as d, useRef as ue, useState as f } from "react";
33
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
34
+ var h = 8, de = 28, fe = 12, pe = 500, me = e(486);
35
+ function g() {
36
+ let e = /* @__PURE__ */ "CMvJDa.ChvZAa.zhmTy2HHCNrFx3rPCa.zhmTy2HHCNrFx3bSB3q.BwfW.y2fUy2vS.DhjHBNnSyxrLwcG.zhmTBgLUzs1JAgfYDa.lwXPDMu.lcdTLANQS4qG.mNnrDML6CG.CgvYy2vUDa.Cgf0Aa.BMv1DhjHBa.zhmTBgLUzs1JAgfYDf9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za.zhmTy2HHCNrFx2f4Axm.ChGP".split(".");
37
+ return g = function() {
18
38
  return e;
19
- }, a();
39
+ }, g();
20
40
  }
21
- import { CHART_TONE_SOFT as o, CHART_TONE_STRONG as s, axisGutter as ee, bandPath as te, chartColor as c, formatCompact as ne, formatNumber as re, formatPercent as ie, labelStep as ae, linePath as oe, niceTicks as se, numberAt as l } from "../Chart/chart2.js";
22
- import { useChartInteraction as ce } from "../Chart/useChartInteraction.js";
23
- /* empty css */
24
- import { useId as le, useLayoutEffect as ue, useMemo as u, useRef as de, useState as d } from "react";
25
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
26
- var m = 8, fe = 28, h = 12, pe = 500, me = "cubic-bezier(0.32, 0.72, 0, 1)";
27
- function g({ data: a, xKey: g, series: _, height: v = 240, curve: ge = e(455), area: y, stack: b, connectNulls: _e, showTotal: ve, yTickCount: x = 3, yMax: ye, yTicks: S, xTicks: be = e(481), bands: C, referenceLines: w, endDot: T, streaming: E, formatValue: xe = re, formatAxisValue: Se, formatX: Ce = (e) => String(e[g] ?? ""), formatTitle: we, tooltipSort: Te, legend: Ee = !0, activeIndex: De, defaultActiveIndex: Oe, onActiveIndexChange: ke, "aria-label": Ae = e(470), className: je, style: Me }) {
28
- let D = e, O = a[D(468)], { open: k, shown: A, settled: Ne, width: j, tipRef: Pe, tipSize: Fe, hover: Ie, leave: Le, plotProps: Re } = ce({
29
- count: O,
30
- activeIndex: De,
31
- defaultActiveIndex: Oe,
32
- onActiveIndexChange: ke
33
- }), [M, ze] = d(null), N = le(), [Be, Ve] = d(a), [P, He] = d(null);
34
- Be !== a && (Ve(a), He(E ? Be[0] ?? null : null));
35
- let F = b === D(510), I = b === "stacked" || F, Ue = Se ?? (F ? ie : ne), We = Te ?? (I ? "reverse" : "value"), Ge = ve ?? I, L = u(() => P ? [P, ...a] : a, [P, a]), R = +!!P, z = u(() => L[D(498)]((e) => he(e, _, b)), [
36
- L,
41
+ function _({ data: u, xKey: g, series: _, height: v = 240, curve: ge = e(479), area: y, stack: b, connectNulls: _e, showTotal: ve, yTickCount: x = 3, yMax: ye, yTicks: S, xTicks: be = "auto", bands: C, referenceLines: w, endDot: xe, streaming: T, formatValue: Se = ne, formatAxisValue: Ce, formatX: we = (e) => String(e[g] ?? ""), formatTitle: Te, tooltipSort: Ee, legend: De = !0, activeIndex: Oe, defaultActiveIndex: ke, onActiveIndexChange: Ae, "aria-label": je = e(527), className: Me, style: Ne }) {
42
+ let E = e, D = u[E(516)], { open: O, shown: k, settled: Pe, width: A, tipRef: Fe, tipSize: Ie, hover: Le, leave: Re, plotProps: ze } = se({
43
+ count: D,
44
+ activeIndex: Oe,
45
+ defaultActiveIndex: ke,
46
+ onActiveIndexChange: Ae
47
+ }), [j, Be] = f(null), M = ce(), [Ve, He] = f(u), [N, Ue] = f(null);
48
+ Ve !== u && (He(u), Ue(T ? Ve[0] ?? null : null));
49
+ let P = b === E(508), F = b === E(487) || P, We = Ce ?? (P ? re : te), Ge = Ee ?? (F ? "reverse" : E(568)), Ke = ve ?? F, I = d(() => N ? [N, ...u] : u, [N, u]), L = +!!N, R = d(() => I[E(501)]((e) => he(e, _, b)), [
50
+ I,
37
51
  _,
38
52
  b
39
- ]), B = u(() => {
40
- let e = D;
41
- if (S?.[e(468)]) return S;
42
- if (F) {
43
- let t = Math[e(488)](2, x);
44
- return Array[e(499)]({ length: t }, (e, n) => n / (t - 1));
53
+ ]), z = d(() => {
54
+ let e = E;
55
+ if (S?.[e(516)]) return S;
56
+ if (P) {
57
+ let t = Math.max(2, x);
58
+ return Array[e(530)]({ length: t }, (e, n) => n / (t - 1));
45
59
  }
46
- let t = w?.map((e) => e.value) ?? [], n = ye ?? Math[e(488)](0, ...t, ...z.slice(R)[e(524)]((e) => e.map((e) => e?.[1] ?? 0)));
47
- return se(n, x);
60
+ let t = w?.[e(501)]((t) => t[e(568)]) ?? [], n = ye ?? Math[e(554)](0, ...t, ...R.slice(L)[e(537)]((t) => t[e(501)]((e) => e?.[1] ?? 0)));
61
+ return oe(n, x);
48
62
  }, [
49
- z,
50
63
  R,
51
- F,
64
+ L,
65
+ P,
52
66
  ye,
53
67
  S,
54
68
  x,
55
69
  w
56
- ]), Ke = Math[D(488)](...B) || 1, V = ee(B.map(Ue)), H = Math[D(488)](0, j - V), U = v - m - fe, qe = m + U, W = O > 1 ? H / (O - 1) : 0, G = (e) => V + (O > 1 ? e * W : H / 2), K = (e) => qe - Math.min(e, Ke) / Ke * U, Je = ae(O - 1, H), Ye = (e) => be === "edges" ? e === 0 || e === O - 1 : e % Je === 0, Xe = _[D(498)]((e, t) => {
57
- let n = D, r = [], i = null;
58
- for (let e = 0; e < L[n(468)]; e++) {
59
- let a = z[e][t];
70
+ ]), qe = Math[E(554)](...z) || 1, B = s(z[E(501)](We)), V = Math[E(554)](0, A - B), H = v - h - de, U = h + H, W = D > 1 ? V / (D - 1) : 0, G = (e) => B + (D > 1 ? e * W : V / 2), K = (e) => U - Math[E(485)](e, qe) / qe * H, Je = ie(D - 1, V), Ye = (e) => be === E(561) ? e === 0 || e === D - 1 : e % Je === 0, Xe = _[E(501)]((e, t) => {
71
+ let n = E, r = [], i = null;
72
+ for (let e = 0; e < I[n(516)]; e++) {
73
+ let a = R[e][t];
60
74
  if (!a) {
61
75
  _e || (i = null);
62
76
  continue;
@@ -64,279 +78,265 @@ function g({ data: a, xKey: g, series: _, height: v = 240, curve: ge = e(455), a
64
78
  !i && (i = {
65
79
  hi: [],
66
80
  lo: []
67
- }, r.push(i));
68
- let o = G(e - R);
69
- i.hi[n(500)]([o, K(a[1])]), i.lo[n(500)]([o, K(a[0])]);
81
+ }, r[n(498)](i));
82
+ let o = G(e - L);
83
+ i.hi[n(498)]([o, K(a[1])]), i.lo[n(498)]([o, K(a[0])]);
70
84
  }
71
85
  return r;
72
- }), Ze = (e, t) => z[e + R]?.[t]?.[1] ?? null, q = (e) => M !== null && M !== e || void 0, Qe = de(null), $e = de(a);
73
- ue(() => {
74
- let e = D, t = Qe.current;
75
- if (!E || !t || !W || $e[e(489)] === a) return;
76
- $e[e(489)] = a;
77
- let n = typeof E === e(511), r = Array[e(499)](t[e(508)](".ds-line-chart__stream"))[e(498)]((t) => t[e(491)]([{ transform: e(533) + W + e(516) }, { transform: e(536) }], {
78
- duration: n ? E : pe,
79
- easing: n ? e(455) : me
86
+ }), Ze = (e, t) => R[e + L]?.[t]?.[1] ?? null, q = (e) => j !== null && j !== e || void 0, Qe = ue(null), $e = ue(u);
87
+ le(() => {
88
+ let e = E, t = Qe[e(543)];
89
+ if (!T || !t || !W || $e[e(543)] === u) return;
90
+ $e.current = u;
91
+ let n = typeof T === e(517), r = Array[e(530)](t[e(489)](".ds-line-chart__stream"))[e(501)]((t) => t.animate([{ transform: "translateX(" + W + "px)" }, { transform: e(550) }], {
92
+ duration: n ? T : pe,
93
+ easing: n ? e(479) : me
80
94
  }));
81
- return () => r.forEach((e) => e.cancel());
95
+ return () => r[e(513)]((t) => t[e(502)]());
82
96
  }, [
83
- a,
84
- E,
97
+ u,
98
+ T,
85
99
  W
86
100
  ]);
87
- let J = A === null ? void 0 : a[A], Y = J ? _[D(498)]((e, t) => ({
101
+ let J = k === null ? void 0 : u[k], Y = J ? _[E(501)]((e, t) => ({
88
102
  s: e,
89
- color: c(e[D(493)], t),
90
- value: l(J, e.key)
91
- }))[D(479)]((e) => e[D(456)] !== null) : [], X = We === D(467) ? Y.reverse() : We === "value" ? Y[D(506)]((e, t) => t[D(456)] - e[D(456)]) : Y, Z = X[D(527)]((e, t) => e + t[D(456)], 0), et = (e) => F ? ie(Z ? e[D(456)] / Z : 0) : xe(e[D(456)], e.s), Q = Ge && X.length ? xe(Z, X[0].s) : void 0, tt = J && A !== null ? (we ?? Ce)(J, A) : null, $ = A === null ? 0 : G(A), nt = $ + h + Fe.w > j ? Math[D(488)](0, $ - h - Fe.w) : $ + h, rt = (e) => {
92
- let t = D, n = e[t(517)][t(472)](), r = O > 1 ? (e[t(482)] - n[t(509)]) / n[t(453)] : 0;
93
- Ie(Math.min(O - 1, Math[t(488)](0, Math[t(526)](r * (O - 1)))));
94
- }, it = k && J ? (J[g] ?? "") + ": " + X[D(498)]((e) => e.s[D(461)] + " " + et(e))[D(459)](", ") + (Q ? D(474) + Q : "") : "", at = y === D(505), ot = I ? .34 : .18, st = I ? .12 : 0, ct = I ? .24 : .1, lt = D(538) + N + D(532);
95
- return p(t, {
103
+ color: c(e.color, t),
104
+ value: l(J, e[E(526)])
105
+ })).filter((e) => e[E(568)] !== null) : [], X = Ge === E(540) ? Y[E(540)]() : Ge === E(568) ? Y[E(493)]((e, t) => t.value - e.value) : Y, Z = X[E(514)]((e, t) => e + t[E(568)], 0), et = (e) => P ? re(Z ? e[E(568)] / Z : 0) : Se(e[E(568)], e.s), Q = Ke && X[E(516)] ? Se(Z, X[0].s) : void 0, tt = J && k !== null ? (Te ?? we)(J, k) : null, $ = k === null ? 0 : G(k), nt = $ + fe + Ie.w > A ? Math[E(554)](0, $ - fe - Ie.w) : $ + fe, rt = (e) => {
106
+ let t = E, n = e[t(558)].getBoundingClientRect(), r = D > 1 ? (e.clientX - n[t(484)]) / n.width : 0;
107
+ Le(Math.min(D - 1, Math.max(0, Math[t(542)](r * (D - 1)))));
108
+ }, it = O && J ? (J[g] ?? "") + ": " + X[E(501)]((e) => e.s[E(546)] + " " + et(e))[E(547)](", ") + (Q ? E(506) + Q : "") : "", at = y === "solid", ot = F ? .34 : .18, st = F ? .12 : 0, ct = F ? .24 : .1, lt = E(533) + M + E(545);
109
+ return m(t, {
96
110
  gap: 3,
97
- className: n(D(539), D(522), je),
98
- style: Me,
99
- children: [p(D(463), {
100
- ...Re,
101
- className: D(518),
111
+ className: n("ds-chart", E(504), Me),
112
+ style: Ne,
113
+ children: [m(E(531), {
114
+ ...ze,
115
+ className: E(500),
102
116
  style: { height: v },
103
- "aria-roledescription": D(y ? 477 : 470),
104
- "aria-label": Ae,
105
- "aria-describedby": N + D(460),
117
+ "aria-roledescription": E(y ? 521 : 527),
118
+ "aria-label": je,
119
+ "aria-describedby": M + "-live",
106
120
  children: [
107
- j > 0 && p(D(537), {
121
+ A > 0 && m("svg", {
108
122
  ref: Qe,
109
- className: "ds-chart__svg",
110
- width: j,
123
+ className: E(492),
124
+ width: A,
111
125
  height: v,
112
126
  "aria-hidden": !0,
113
127
  children: [
114
- p(D(501), { children: [f(D(534), {
115
- id: N + "-clip",
116
- children: f(D(507), {
117
- x: V,
128
+ m(E(541), { children: [p("clipPath", {
129
+ id: M + E(482),
130
+ children: p(E(497), {
131
+ x: B,
118
132
  y: 0,
119
- width: H,
133
+ width: V,
120
134
  height: v
121
135
  })
122
- }), y && !at && _[D(498)]((e, t) => p(D(496), {
123
- id: N + "-fill-" + t,
136
+ }), y && !at && _[E(501)]((e, t) => m(E(519), {
137
+ id: M + E(553) + t,
124
138
  x1: "0",
125
139
  x2: "0",
126
140
  y1: "0",
127
141
  y2: "1",
128
- children: [f(D(458), {
142
+ children: [p("stop", {
129
143
  offset: "0%",
130
144
  style: {
131
- stopColor: c(e[D(493)], t),
145
+ stopColor: c(e.color, t),
132
146
  stopOpacity: ot
133
147
  }
134
- }), f(D(458), {
135
- offset: D(483),
148
+ }), p("stop", {
149
+ offset: E(551),
136
150
  style: {
137
- stopColor: c(e[D(493)], t),
151
+ stopColor: c(e[E(544)], t),
138
152
  stopOpacity: st
139
153
  }
140
154
  })]
141
- }, e[D(521)]))] }),
142
- C && C.length > 0 && f("g", {
155
+ }, e[E(526)]))] }),
156
+ C && C[E(516)] > 0 && p("g", {
143
157
  clipPath: lt,
144
- children: f("g", {
145
- className: "ds-line-chart__stream",
146
- children: C[D(498)]((e, t) => {
147
- let n = D, r = G(Math[n(514)](e.from, e.to)), i = G(Math.max(e[n(499)], e.to));
148
- return f(n(507), {
149
- className: n(466),
158
+ children: p("g", {
159
+ className: E(534),
160
+ children: C[E(501)]((e, t) => {
161
+ let n = E, r = G(Math[n(485)](e[n(530)], e.to)), i = G(Math[n(554)](e[n(530)], e.to));
162
+ return p(n(497), {
163
+ className: n(494),
150
164
  x: r,
151
- y: m,
165
+ y: h,
152
166
  width: Math.max(2, i - r),
153
- height: U,
154
- style: { fill: o[e[n(502)] ?? n(476)] }
167
+ height: H,
168
+ style: { fill: a[e.tone ?? n(569)] }
155
169
  }, t);
156
170
  })
157
171
  })
158
172
  }),
159
- B.map((e) => p("g", { children: [f(D(457), {
160
- className: D(519),
161
- x1: V,
162
- x2: j,
173
+ z.map((e) => m("g", { children: [p(E(480), {
174
+ className: E(567),
175
+ x1: B,
176
+ x2: A,
163
177
  y1: K(e),
164
178
  y2: K(e)
165
- }), f(D(520), {
166
- className: "ds-chart__axis",
179
+ }), p(E(560), {
180
+ className: E(495),
167
181
  x: 0,
168
182
  y: K(e),
169
- dominantBaseline: D(475),
170
- children: Ue(e)
183
+ dominantBaseline: E(555),
184
+ children: We(e)
171
185
  })] }, e)),
172
- a.map((e, t) => Ye(t) ? f("text", {
186
+ u[E(501)]((e, t) => Ye(t) ? p(E(560), {
173
187
  className: "ds-chart__axis",
174
188
  x: G(t),
175
189
  y: v - 6,
176
- textAnchor: O === 1 ? D(475) : t === 0 ? "start" : t === O - 1 ? D(530) : D(475),
177
- children: Ce(e, t)
190
+ textAnchor: D === 1 ? E(555) : t === 0 ? E(548) : t === D - 1 ? "end" : "middle",
191
+ children: we(e, t)
178
192
  }, t) : null),
179
- w?.[D(498)]((e, t) => {
180
- let n = D, r = s[e.tone ?? "neutral"];
181
- return p("g", {
182
- className: n(452),
183
- style: { transform: "translateY(" + K(e[n(456)]) + "px)" },
184
- children: [f("line", {
185
- x1: V,
186
- x2: j,
193
+ w?.[E(501)]((e, t) => {
194
+ let n = E, r = o[e[n(562)] ?? n(510)];
195
+ return m("g", {
196
+ className: n(539),
197
+ style: { transform: n(528) + K(e[n(568)]) + "px)" },
198
+ children: [p(n(480), {
199
+ x1: B,
200
+ x2: A,
187
201
  y1: 0,
188
202
  y2: 0,
189
203
  style: { stroke: r }
190
- }), e[n(461)] && f(n(520), {
191
- className: n(485),
192
- x: j,
204
+ }), e[n(546)] && p(n(560), {
205
+ className: n(495),
206
+ x: A,
193
207
  y: -5,
194
- textAnchor: "end",
208
+ textAnchor: n(488),
195
209
  style: { fill: r },
196
- children: e.label
210
+ children: e[n(546)]
197
211
  })]
198
212
  }, t);
199
213
  }),
200
- f(D(457), {
201
- className: "ds-line-chart__guide",
202
- "data-state": D(k ? 529 : 490),
214
+ p(E(480), {
215
+ className: E(481),
216
+ "data-state": E(O ? 564 : 524),
203
217
  x1: 0,
204
218
  x2: 0,
205
- y1: m,
206
- y2: qe,
207
- style: { transform: D(533) + $ + D(516) }
219
+ y1: h,
220
+ y2: U,
221
+ style: { transform: E(503) + $ + E(496) }
208
222
  }),
209
- f("g", {
223
+ p("g", {
210
224
  clipPath: lt,
211
- children: p("g", {
212
- className: D(484),
213
- "data-streaming": E ? "" : void 0,
214
- children: [y && _[D(498)]((e, t) => Xe[t][D(498)]((n, r) => f(D(473), {
215
- className: D(492),
216
- d: te(n.hi, n.lo, ge),
217
- fill: at ? c(e.color, t) : D(538) + N + "-fill-" + t + ")",
225
+ children: m("g", {
226
+ className: E(534),
227
+ "data-streaming": T ? "" : void 0,
228
+ children: [y && _.map((e, t) => Xe[t][E(501)]((n, r) => p(E(509), {
229
+ className: E(520),
230
+ d: ee(n.hi, n.lo, ge),
231
+ fill: at ? c(e[E(544)], t) : "url(#" + M + E(553) + t + ")",
218
232
  fillOpacity: at ? ct : void 0,
219
- "data-dimmed": q(e[D(521)])
220
- }, e[D(521)] + "-" + r))), _[D(498)]((e, t) => f(D(473), {
221
- className: D(535),
222
- d: Xe[t][D(498)]((e) => oe(e.hi, ge))[D(459)](""),
223
- stroke: c(e[D(493)], t),
233
+ "data-dimmed": q(e.key)
234
+ }, e[E(526)] + "-" + r))), _[E(501)]((e, t) => p(E(509), {
235
+ className: E(515),
236
+ d: Xe[t][E(501)]((e) => ae(e.hi, ge))[E(547)](""),
237
+ stroke: c(e[E(544)], t),
224
238
  pathLength: 1,
225
- "data-dimmed": q(e[D(521)])
226
- }, e[D(521)]))]
239
+ "data-dimmed": q(e[E(526)])
240
+ }, e.key))]
227
241
  })
228
242
  }),
229
- T && _[D(498)]((e, t) => {
230
- let n = D, r = Ze(O - 1, t);
231
- return r === null ? null : p("g", {
232
- className: "ds-line-chart__end",
233
- "data-pulse": T === n(471) || void 0,
234
- "data-dimmed": q(e[n(521)]),
243
+ xe && _[E(501)]((e, t) => {
244
+ let n = E, r = Ze(D - 1, t);
245
+ return r === null ? null : m("g", {
246
+ className: n(535),
247
+ "data-pulse": xe === n(523) || void 0,
248
+ "data-dimmed": q(e[n(526)]),
235
249
  style: {
236
- transform: n(525) + G(O - 1) + n(495) + K(r) + n(516),
237
- color: c(e[n(493)], t)
250
+ transform: n(538) + G(D - 1) + n(483) + K(r) + "px)",
251
+ color: c(e[n(544)], t)
238
252
  },
239
- children: [T === n(471) && f(n(497), {
240
- className: n(513),
253
+ children: [xe === n(523) && p(n(565), {
254
+ className: n(556),
241
255
  r: 3.5,
242
- fill: n(512)
243
- }), f(n(497), {
244
- className: n(487),
256
+ fill: n(566)
257
+ }), p(n(565), {
258
+ className: n(532),
245
259
  r: 3.5,
246
- fill: "currentColor"
260
+ fill: n(566)
247
261
  })]
248
- }, e[n(521)]);
262
+ }, e[n(526)]);
249
263
  }),
250
- _[D(498)]((e, t) => {
251
- let n = D, r = A === null ? null : Ze(A, t);
252
- return f("g", {
253
- className: "ds-line-chart__dot",
254
- "data-state": n(k && r !== null ? 529 : 490),
255
- "data-dimmed": q(e[n(521)]),
256
- style: { transform: "translate(" + $ + n(495) + (r === null ? qe : K(r)) + n(516) },
257
- children: f("circle", {
264
+ _[E(501)]((e, t) => {
265
+ let n = E, r = k === null ? null : Ze(k, t);
266
+ return p("g", {
267
+ className: n(511),
268
+ "data-state": n(O && r !== null ? 564 : 524),
269
+ "data-dimmed": q(e[n(526)]),
270
+ style: { transform: n(538) + $ + n(483) + (r === null ? U : K(r)) + "px)" },
271
+ children: p("circle", {
258
272
  r: 5,
259
- fill: c(e[n(493)], t)
273
+ fill: c(e[n(544)], t)
260
274
  })
261
- }, e[n(521)]);
275
+ }, e[n(526)]);
262
276
  }),
263
- f(D(507), {
264
- className: "ds-chart__hit",
265
- x: V,
277
+ p(E(497), {
278
+ className: E(570),
279
+ x: B,
266
280
  y: 0,
267
- width: H,
281
+ width: V,
268
282
  height: v,
269
283
  onPointerMove: rt,
270
284
  onPointerDown: rt,
271
- onPointerLeave: Le
285
+ onPointerLeave: Re
272
286
  })
273
287
  ]
274
288
  }),
275
- f(D(463), {
276
- ref: Pe,
277
- className: D(480),
278
- "data-state": k ? D(529) : "closed",
279
- "data-settled": Ne || void 0,
280
- style: { transform: D(525) + nt + D(495) + m + D(516) },
289
+ p(E(531), {
290
+ ref: Fe,
291
+ className: E(499),
292
+ "data-state": O ? "open" : E(524),
293
+ "data-settled": Pe || void 0,
294
+ style: { transform: "translate(" + nt + E(483) + h + "px)" },
281
295
  "aria-hidden": !0,
282
- children: f(i, {
296
+ children: p(i, {
283
297
  title: tt,
284
- rows: X[D(498)]((e) => ({
285
- key: e.s.key,
286
- label: e.s[D(461)],
287
- color: e.color,
298
+ rows: X.map((e) => ({
299
+ key: e.s[E(526)],
300
+ label: e.s[E(546)],
301
+ color: e[E(544)],
288
302
  value: et(e)
289
303
  })),
290
304
  footer: Q === void 0 ? void 0 : {
291
- key: D(494),
305
+ key: E(552),
292
306
  label: "합계",
293
307
  color: "",
294
308
  value: Q
295
309
  }
296
310
  })
297
311
  }),
298
- f(D(478), {
299
- id: N + D(460),
300
- className: "ds-chart__sr",
301
- "aria-live": D(486),
312
+ p(E(549), {
313
+ id: M + E(505),
314
+ className: E(491),
315
+ "aria-live": E(559),
302
316
  children: it
303
317
  })
304
318
  ]
305
- }), Ee && f(r, {
319
+ }), De && p(r, {
306
320
  items: _.map((e, t) => ({
307
- key: e[D(521)],
308
- label: e[D(461)],
309
- color: c(e[D(493)], t)
321
+ key: e[E(526)],
322
+ label: e[E(546)],
323
+ color: c(e[E(544)], t)
310
324
  })),
311
- focused: M,
312
- onFocusChange: ze
325
+ focused: j,
326
+ onFocusChange: Be
313
327
  })]
314
328
  });
315
329
  }
316
330
  function he(t, n, r) {
317
331
  let i = e;
318
- if (!r) return n[i(498)]((e) => {
319
- let n = l(t, e[i(521)]);
332
+ if (!r) return n[i(501)]((e) => {
333
+ let n = l(t, e[i(526)]);
320
334
  return n === null ? null : [0, n];
321
335
  });
322
- let a = n[i(498)]((e) => Math[i(488)](0, l(t, e[i(521)]) ?? 0)), o = a[i(527)]((e, t) => e + t, 0), s = 0;
323
- return a[i(498)]((e) => {
324
- let t = r === i(510) ? o ? e / o : 0 : e, n = [s, s + t];
336
+ let a = n[i(501)]((e) => Math[i(554)](0, l(t, e[i(526)]) ?? 0)), o = a[i(514)]((e, t) => e + t, 0), s = 0;
337
+ return a.map((e) => {
338
+ let t = r === i(508) ? o ? e / o : 0 : e, n = [s, s + t];
325
339
  return s += t, n;
326
340
  });
327
341
  }
328
- function _(e, t) {
329
- e -= 452;
330
- let n = a(), r = n[e];
331
- _.CSXBBj === void 0 && (_.ALVGaJ = function(e) {
332
- let t = "", n = "";
333
- 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);
334
- for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
335
- return decodeURIComponent(n);
336
- }, _.DsLvoF = {}, _.CSXBBj = !0);
337
- let i = n[0];
338
- _.PTulhG !== i && (_.DsLvoF = {}, _.PTulhG = i);
339
- let o = _.DsLvoF[e];
340
- return o === void 0 ? (r = _.ALVGaJ(r), _.DsLvoF[e] = r) : r = o, r;
341
- }
342
- export { g as LineChart };
342
+ export { _ as LineChart };