@iamfiro/design 0.3.1 → 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 (161) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/avatar/AGENTS.md +29 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/agents/tooltip/AGENTS.md +1 -1
  6. package/lib/components/Accordion/Accordion2.js +92 -92
  7. package/lib/components/ActionBar/ActionBar2.js +42 -45
  8. package/lib/components/Alert/Alert2.js +77 -77
  9. package/lib/components/AppShell/AppShell2.js +70 -71
  10. package/lib/components/AreaChart/AreaChart.js +32 -35
  11. package/lib/components/BarChart/BarChart2.js +155 -155
  12. package/lib/components/BarList/BarList2.js +93 -93
  13. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -64
  14. package/lib/components/Calendar/Calendar2.js +183 -182
  15. package/lib/components/Calendar/DatePicker2.js +116 -115
  16. package/lib/components/Calendar/date.js +67 -66
  17. package/lib/components/Card/Card2.js +67 -67
  18. package/lib/components/CardFrame/CardFrame2.js +34 -37
  19. package/lib/components/Chart/ChartParts.js +90 -90
  20. package/lib/components/Chart/chart2.js +62 -62
  21. package/lib/components/Chart/useChartInteraction.js +51 -51
  22. package/lib/components/ChatBubble/ChatBubble2.js +117 -117
  23. package/lib/components/ChatBubble/formatChatTime.js +37 -36
  24. package/lib/components/ChatComposer/ChatComposer2.js +55 -55
  25. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  26. package/lib/components/CodeBlock/highlight.js +72 -72
  27. package/lib/components/ColorPicker/ColorPicker2.js +232 -231
  28. package/lib/components/ColorPicker/color.js +67 -67
  29. package/lib/components/ColorPicker/presets.js +25 -24
  30. package/lib/components/Combobox/Combobox2.js +140 -140
  31. package/lib/components/CommandMenu/CommandMenu.js +135 -135
  32. package/lib/components/Comment/Comment2.js +82 -57
  33. package/lib/components/ContextMenu/ContextMenu2.js +101 -100
  34. package/lib/components/DataGrid/DataGrid2.js +872 -871
  35. package/lib/components/DataGrid/GridPopover.js +98 -98
  36. package/lib/components/DataGrid/anchor.js +34 -33
  37. package/lib/components/DataGrid/model.js +291 -290
  38. package/lib/components/DataGrid/panels.js +337 -336
  39. package/lib/components/DataGrid/typeMeta.js +49 -48
  40. package/lib/components/DataGrid/types.js +34 -33
  41. package/lib/components/DescriptionList/DescriptionList2.js +109 -109
  42. package/lib/components/Dialog/AlertDialog.js +53 -53
  43. package/lib/components/Dialog/Dialog2.js +72 -72
  44. package/lib/components/Dialog/modal.js +67 -68
  45. package/lib/components/Drawer/Drawer2.js +117 -117
  46. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -266
  47. package/lib/components/DropdownMenu/menuCore.js +68 -42
  48. package/lib/components/Dropzone/Dropzone2.js +78 -78
  49. package/lib/components/EmptyState/EmptyState2.js +58 -56
  50. package/lib/components/FileChip/FileChip2.js +72 -48
  51. package/lib/components/FileUpload/FileUpload.js +137 -138
  52. package/lib/components/FilterChips/FilterChips2.js +61 -61
  53. package/lib/components/FunnelChart/FunnelChart2.js +161 -161
  54. package/lib/components/FunnelChart/funnel.js +50 -49
  55. package/lib/components/Highlight/Highlight2.js +56 -56
  56. package/lib/components/HoverCard/HoverCard.js +73 -73
  57. package/lib/components/InlineDiff/InlineDiff2.js +129 -129
  58. package/lib/components/InlineDiff/diff.js +87 -87
  59. package/lib/components/InlineDiff/useDiffReview.js +54 -52
  60. package/lib/components/Kanban/Kanban2.js +383 -384
  61. package/lib/components/Kanban/KanbanCard.js +68 -93
  62. package/lib/components/Kanban/move.js +43 -43
  63. package/lib/components/LineChart/LineChart2.js +164 -164
  64. package/lib/components/List/List2.js +60 -60
  65. package/lib/components/Listbox/Listbox2.js +108 -108
  66. package/lib/components/Marker/Marker2.js +59 -57
  67. package/lib/components/Menubar/Menubar2.js +120 -119
  68. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  69. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -279
  70. package/lib/components/NoticeStack/NoticeStack2.js +109 -109
  71. package/lib/components/NumberStepper/NumberStepper2.js +70 -70
  72. package/lib/components/OtpInput/OtpInput2.js +94 -94
  73. package/lib/components/Pagination/Pagination2.js +109 -109
  74. package/lib/components/Pagination/paginationRange.js +37 -38
  75. package/lib/components/PhoneInput/PhoneInput.js +83 -84
  76. package/lib/components/PieChart/PieChart2.js +157 -157
  77. package/lib/components/PieChart/arc.js +72 -72
  78. package/lib/components/PieChart/useArcTween.js +50 -53
  79. package/lib/components/Popover/Popover2.js +62 -61
  80. package/lib/components/ProgressTracker/ProgressTracker2.js +104 -104
  81. package/lib/components/Rating/Rating2.js +89 -88
  82. package/lib/components/Resizable/Resizable2.js +133 -134
  83. package/lib/components/Resizable/layout.js +56 -56
  84. package/lib/components/ScaledPreview/ScaledPreview2.js +64 -63
  85. package/lib/components/ScatterChart/ScatterChart2.js +252 -251
  86. package/lib/components/ScatterChart/scatter.js +50 -52
  87. package/lib/components/ScrollArea/ScrollArea2.js +122 -122
  88. package/lib/components/Select/Select2.js +84 -85
  89. package/lib/components/Sidebar/Sidebar2.js +79 -79
  90. package/lib/components/Skeleton/Skeleton2.js +56 -56
  91. package/lib/components/Slider/Slider2.js +63 -63
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -46
  93. package/lib/components/SparkChart/SparkChart2.js +129 -128
  94. package/lib/components/SparkChart/spark.js +49 -48
  95. package/lib/components/Sparkbar/Sparkbar2.js +59 -58
  96. package/lib/components/SplitView/SplitView2.js +54 -55
  97. package/lib/components/Stat/Stat2.js +59 -59
  98. package/lib/components/StepList/StepList2.js +78 -78
  99. package/lib/components/Table/Table2.js +55 -55
  100. package/lib/components/Tabs/Tabs2.js +76 -76
  101. package/lib/components/TagInput/TagInput2.js +218 -215
  102. package/lib/components/TimePicker/TimePicker2.js +204 -204
  103. package/lib/components/TimePicker/time.js +59 -58
  104. package/lib/components/Timeline/Timeline2.js +179 -179
  105. package/lib/components/Timeline/scale.js +60 -55
  106. package/lib/components/Toast/Toaster.js +103 -103
  107. package/lib/components/Toast/store.js +47 -47
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +77 -77
  109. package/lib/components/Toolbar/Toolbar2.js +138 -138
  110. package/lib/components/Tracker/Tracker2.js +99 -99
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +117 -117
  112. package/lib/components/TreeView/TreeView2.js +145 -145
  113. package/lib/hooks/timing.js +33 -33
  114. package/lib/hooks/useControllableState.js +33 -33
  115. package/lib/hooks/useCountdown.js +54 -55
  116. package/lib/hooks/useDigitInput.js +85 -84
  117. package/lib/hooks/useDismiss.js +55 -55
  118. package/lib/hooks/useElapsed.js +55 -55
  119. package/lib/hooks/useFloating.js +21 -21
  120. package/lib/hooks/useFocusTrap.js +67 -67
  121. package/lib/hooks/usePresence.js +33 -29
  122. package/lib/hooks/usePressToOpen.js +33 -33
  123. package/lib/hooks/useScrollLock.js +54 -55
  124. package/lib/hooks/useSelection.js +54 -48
  125. package/lib/index.js +67 -68
  126. package/lib/primitives/AspectRatio2.js +58 -54
  127. package/lib/primitives/BrandIcon.js +189 -158
  128. package/lib/primitives/ColorDot2.js +52 -51
  129. package/lib/primitives/CopyButton2.js +66 -64
  130. package/lib/primitives/CountBadge2.js +56 -56
  131. package/lib/primitives/Countdown2.js +36 -34
  132. package/lib/primitives/Delta2.js +41 -66
  133. package/lib/primitives/Elapsed.js +32 -32
  134. package/lib/primitives/FileIcon2.js +90 -90
  135. package/lib/primitives/Flag2.js +157 -157
  136. package/lib/primitives/IconStack2.js +60 -58
  137. package/lib/primitives/IconTile2.js +46 -48
  138. package/lib/primitives/Kbd2.js +51 -51
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +37 -35
  141. package/lib/primitives/MaskedText2.js +71 -75
  142. package/lib/primitives/Progress2.js +72 -72
  143. package/lib/primitives/RelativeTime.js +60 -64
  144. package/lib/primitives/SearchInput2.js +55 -56
  145. package/lib/primitives/SelectorButton2.js +69 -71
  146. package/lib/primitives/Spinner2.js +63 -59
  147. package/lib/primitives/StatusIcon2.js +66 -66
  148. package/lib/primitives/Swatch2.js +54 -56
  149. package/lib/primitives/Tooltip2.js +77 -77
  150. package/lib/primitives/Typography2.js +67 -67
  151. package/lib/primitives/formatCountdown.js +38 -41
  152. package/lib/primitives/formatElapsed.js +41 -40
  153. package/lib/primitives/formatRelativeTime.js +74 -48
  154. package/lib/primitives/hotkey.js +81 -81
  155. package/lib/primitives/index.js +220 -199
  156. package/lib/primitives/maskValue.js +53 -52
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/lib/types/primitives/index.d.ts +6 -2
  161. package/package.json +1 -1
@@ -1,57 +1,63 @@
1
1
  "use client";
2
- const e = h;
2
+ const e = u;
3
3
  (function(e, t) {
4
- let n = h, r = e();
4
+ let n = u, r = e();
5
5
  for (;;) try {
6
- if (parseInt(n(378)) / 1 * (parseInt(n(365)) / 2) + -parseInt(n(331)) / 3 * (-parseInt(n(328)) / 4) + -parseInt(n(405)) / 5 * (-parseInt(n(376)) / 6) + -parseInt(n(342)) / 7 * (parseInt(n(386)) / 8) + parseInt(n(406)) / 9 * (-parseInt(n(394)) / 10) + parseInt(n(371)) / 11 + parseInt(n(377)) / 12 == 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
- })(_, 738005);
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
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
16
  import { useChartInteraction as se } from "../Chart/useChartInteraction.js";
17
17
  /* empty css */
18
- import { useId as ce, useLayoutEffect as le, useMemo as u, useRef as ue, useState as d } from "react";
19
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
20
- var m = 8, de = 28, fe = 12, pe = 500, me = e(374);
21
- function h(e, t) {
22
- e -= 321;
23
- let n = _(), r = n[e];
24
- h.Fvayju === void 0 && (h.CBWthx = function(e) {
18
+ function u(e, t) {
19
+ e -= 479;
20
+ let n = g(), r = n[e];
21
+ u.kVzxoX === void 0 && (u.OEjtQh = function(e) {
25
22
  let t = "", n = "";
26
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);
27
24
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
28
25
  return decodeURIComponent(n);
29
- }, h.QMgajY = {}, h.Fvayju = !0);
26
+ }, u.WRgXKv = {}, u.kVzxoX = !0);
30
27
  let i = n[0];
31
- h.uwhgys !== i && (h.QMgajY = {}, h.uwhgys = i);
32
- let a = h.QMgajY[e];
33
- return a === void 0 ? (r = h.CBWthx(r), h.QMgajY[e] = r) : r = a, r;
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;
34
31
  }
35
- function g({ data: h, xKey: g, series: _, height: v = 240, curve: ge = e(349), 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 = "선 차트", className: Me, style: Ne }) {
36
- let E = e, D = h[E(366)], { open: O, shown: k, settled: Pe, width: A, tipRef: Fe, tipSize: Ie, hover: Le, leave: Re, plotProps: ze } = se({
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.zhmTBgLUzs1JAgfYDf9Fzg90.mtjpD1rAEvy.zM9YrwfJAa.CMvKDwnL.zhmTBgLUzs1JAgfYDf9FBgLUzq.BgvUz3rO.BNvTyMvY.nZCYmdq4nxHYruTKuq.BgLUzwfYr3jHzgLLBNq.zhmTBgLUzs1JAgfYDf9FyxjLyq.7jIb7jETioYWQo2kUa.mtmXmJe2mefJCMvJCW.ChvSC2u.y2XVC2vK.nJC5mgT6ALLjvW.A2v5.7isGioYWQo2kUa.DhjHBNnSyxrLwsG.ndiZmtHLzxjzwhO.zNjVBq.zgL2.zhmTBgLUzs1JAgfYDf9Fzw5KlwrVDa.DxjSkcm.zhmTBgLUzs1JAgfYDf9FC3rYzwfT.zhmTBgLUzs1JAgfYDf9Fzw5K.mtiWmdK4m1n2rgDxrG.zMXHDe1HCa.DhjHBNnSyxrLka.zhmTBgLUzs1JAgfYDf9FCMvM.CMv2zxjZzq.zgvMCW.CM91BMq.y3vYCMvUDa.y29SB3i.lwnSAxaP.BgfIzwW.AM9PBG.C3rHCNq.C3bHBG.DhjHBNnSyxrLwcGWkq.mtaWjq.Dg90ywW.lwzPBgWT.Bwf4.BwLKzgXL.zhmTBgLUzs1JAgfYDf9Fzw5KlxjPBMC.ntKXotKZmLvswfHJsa.y3vYCMvUDfrHCMDLDa.Cg9SAxrL.Dgv4Da.zwrNzxm.Dg9Uzq.ntC1mJC5zM5wtKjp.B3bLBG.y2LYy2XL.y3vYCMvUDenVBg9Y.zhmTy2HHCNrFx2DYAwq.DMfSDwu.D2fYBMLUzW.zhmTy2HHCNrFx2HPDa.BgLUzwfY.BgLUzq.zhmTBgLUzs1JAgfYDf9Fz3vPzgu.lwnSAxa.ChGSia.BgvMDa.BwLU.y3vIAwmTyMv6AwvYkdaUmZiSidaUnZiSidaSideP.C3rHy2TLza.zw5K.CxvLCNLtzwXLy3rVCKfSBa.mJe3mtq2nNDMB3rZzq.zhmTy2HHCNrFx3nY.zhmTy2HHCNrFx3n2zW.C29YDa.zhmTBgLUzs1JAgfYDf9FyMfUza.zhmTy2HHCNrFx2f4Axm.ChGP".split(".");
37
+ return g = function() {
38
+ return e;
39
+ }, g();
40
+ }
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({
37
43
  count: D,
38
44
  activeIndex: Oe,
39
45
  defaultActiveIndex: ke,
40
46
  onActiveIndexChange: Ae
41
- }), [j, Be] = d(null), M = ce(), [Ve, He] = d(h), [N, Ue] = d(null);
42
- Ve !== h && (He(h), Ue(T ? Ve[0] ?? null : null));
43
- let P = b === E(385), F = b === E(344) || P, We = Ce ?? (P ? re : te), Ge = Ee ?? (F ? E(353) : "value"), Ke = ve ?? F, I = u(() => N ? [N, ...h] : h, [N, h]), L = +!!N, R = u(() => I[E(336)]((e) => he(e, _, b)), [
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)), [
44
50
  I,
45
51
  _,
46
52
  b
47
- ]), z = u(() => {
53
+ ]), z = d(() => {
48
54
  let e = E;
49
- if (S?.[e(366)]) return S;
55
+ if (S?.[e(516)]) return S;
50
56
  if (P) {
51
- let t = Math[e(335)](2, x);
52
- return Array[e(334)]({ length: t }, (e, n) => n / (t - 1));
57
+ let t = Math.max(2, x);
58
+ return Array[e(530)]({ length: t }, (e, n) => n / (t - 1));
53
59
  }
54
- let t = w?.[e(336)]((t) => t[e(384)]) ?? [], n = ye ?? Math.max(0, ...t, ...R[e(392)](L)[e(364)]((t) => t[e(336)]((e) => e?.[1] ?? 0)));
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)));
55
61
  return oe(n, x);
56
62
  }, [
57
63
  R,
@@ -61,9 +67,9 @@ function g({ data: h, xKey: g, series: _, height: v = 240, curve: ge = e(349), a
61
67
  S,
62
68
  x,
63
69
  w
64
- ]), qe = Math[E(335)](...z) || 1, B = s(z[E(336)](We)), V = Math[E(335)](0, A - B), H = v - m - de, U = m + H, W = D > 1 ? V / (D - 1) : 0, G = (e) => B + (D > 1 ? e * W : V / 2), K = (e) => U - Math[E(391)](e, qe) / qe * H, Je = ie(D - 1, V), Ye = (e) => be === E(332) ? e === 0 || e === D - 1 : e % Je === 0, Xe = _[E(336)]((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) => {
65
71
  let n = E, r = [], i = null;
66
- for (let e = 0; e < I[n(366)]; e++) {
72
+ for (let e = 0; e < I[n(516)]; e++) {
67
73
  let a = R[e][t];
68
74
  if (!a) {
69
75
  _e || (i = null);
@@ -72,204 +78,204 @@ function g({ data: h, xKey: g, series: _, height: v = 240, curve: ge = e(349), a
72
78
  !i && (i = {
73
79
  hi: [],
74
80
  lo: []
75
- }, r.push(i));
81
+ }, r[n(498)](i));
76
82
  let o = G(e - L);
77
- i.hi[n(352)]([o, K(a[1])]), i.lo[n(352)]([o, K(a[0])]);
83
+ i.hi[n(498)]([o, K(a[1])]), i.lo[n(498)]([o, K(a[0])]);
78
84
  }
79
85
  return r;
80
- }), Ze = (e, t) => R[e + L]?.[t]?.[1] ?? null, q = (e) => j !== null && j !== e || void 0, Qe = ue(null), $e = ue(h);
86
+ }), Ze = (e, t) => R[e + L]?.[t]?.[1] ?? null, q = (e) => j !== null && j !== e || void 0, Qe = ue(null), $e = ue(u);
81
87
  le(() => {
82
- let e = E, t = Qe[e(369)];
83
- if (!T || !t || !W || $e[e(369)] === h) return;
84
- $e.current = h;
85
- let n = typeof T == "number", r = Array[e(334)](t[e(408)](e(379)))[e(336)]((t) => t[e(414)]([{ transform: "translateX(" + W + "px)" }, { transform: e(387) }], {
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) }], {
86
92
  duration: n ? T : pe,
87
- easing: n ? e(349) : me
93
+ easing: n ? e(479) : me
88
94
  }));
89
- return () => r.forEach((t) => t[e(398)]());
95
+ return () => r[e(513)]((t) => t[e(502)]());
90
96
  }, [
91
- h,
97
+ u,
92
98
  T,
93
99
  W
94
100
  ]);
95
- let J = k === null ? void 0 : h[k], Y = J ? _[E(336)]((e, t) => ({
101
+ let J = k === null ? void 0 : u[k], Y = J ? _[E(501)]((e, t) => ({
96
102
  s: e,
97
- color: c(e[E(346)], t),
98
- value: l(J, e[E(337)])
99
- }))[E(389)]((e) => e[E(384)] !== null) : [], X = Ge === E(353) ? Y[E(353)]() : Ge === E(384) ? Y[E(343)]((e, t) => t.value - e[E(384)]) : Y, Z = X[E(367)]((e, t) => e + t[E(384)], 0), et = (e) => P ? re(Z ? e.value / Z : 0) : Se(e[E(384)], e.s), Q = Ke && X[E(366)] ? 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(335)](0, $ - fe - Ie.w) : $ + fe, rt = (e) => {
100
- let t = E, n = e[t(399)][t(321)](), r = D > 1 ? (e[t(359)] - n[t(361)]) / n[t(324)] : 0;
101
- Le(Math[t(391)](D - 1, Math[t(335)](0, Math[t(338)](r * (D - 1)))));
102
- }, it = O && J ? (J[g] ?? "") + ": " + X[E(336)]((e) => e.s[E(397)] + " " + et(e)).join(", ") + (Q ? ", 합계 " + Q : "") : "", at = y === E(360), ot = F ? .34 : .18, st = F ? .12 : 0, ct = F ? .24 : .1, lt = E(345) + M + "-clip)";
103
- 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, {
104
110
  gap: 3,
105
- className: n(E(356), E(341), Me),
111
+ className: n("ds-chart", E(504), Me),
106
112
  style: Ne,
107
- children: [p(E(409), {
113
+ children: [m(E(531), {
108
114
  ...ze,
109
- className: E(347),
115
+ className: E(500),
110
116
  style: { height: v },
111
- "aria-roledescription": E(y ? 402 : 357),
117
+ "aria-roledescription": E(y ? 521 : 527),
112
118
  "aria-label": je,
113
- "aria-describedby": M + E(393),
119
+ "aria-describedby": M + "-live",
114
120
  children: [
115
- A > 0 && p(E(368), {
121
+ A > 0 && m("svg", {
116
122
  ref: Qe,
117
- className: "ds-chart__svg",
123
+ className: E(492),
118
124
  width: A,
119
125
  height: v,
120
126
  "aria-hidden": !0,
121
127
  children: [
122
- p("defs", { children: [f(E(339), {
123
- id: M + E(396),
124
- children: f(E(390), {
128
+ m(E(541), { children: [p("clipPath", {
129
+ id: M + E(482),
130
+ children: p(E(497), {
125
131
  x: B,
126
132
  y: 0,
127
133
  width: V,
128
134
  height: v
129
135
  })
130
- }), y && !at && _[E(336)]((e, t) => p(E(351), {
131
- id: M + "-fill-" + t,
136
+ }), y && !at && _[E(501)]((e, t) => m(E(519), {
137
+ id: M + E(553) + t,
132
138
  x1: "0",
133
139
  x2: "0",
134
140
  y1: "0",
135
141
  y2: "1",
136
- children: [f("stop", {
142
+ children: [p("stop", {
137
143
  offset: "0%",
138
144
  style: {
139
- stopColor: c(e[E(346)], t),
145
+ stopColor: c(e.color, t),
140
146
  stopOpacity: ot
141
147
  }
142
- }), f(E(407), {
143
- offset: E(400),
148
+ }), p("stop", {
149
+ offset: E(551),
144
150
  style: {
145
- stopColor: c(e.color, t),
151
+ stopColor: c(e[E(544)], t),
146
152
  stopOpacity: st
147
153
  }
148
154
  })]
149
- }, e[E(337)]))] }),
150
- C && C.length > 0 && f("g", {
155
+ }, e[E(526)]))] }),
156
+ C && C[E(516)] > 0 && p("g", {
151
157
  clipPath: lt,
152
- children: f("g", {
153
- className: "ds-line-chart__stream",
154
- children: C.map((e, t) => {
155
- let n = E, r = G(Math[n(391)](e[n(334)], e.to)), i = G(Math[n(335)](e[n(334)], e.to));
156
- return f(n(390), {
157
- className: n(348),
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),
158
164
  x: r,
159
- y: m,
160
- width: Math[n(335)](2, i - r),
165
+ y: h,
166
+ width: Math.max(2, i - r),
161
167
  height: H,
162
- style: { fill: a[e[n(354)] ?? "warning"] }
168
+ style: { fill: a[e.tone ?? n(569)] }
163
169
  }, t);
164
170
  })
165
171
  })
166
172
  }),
167
- z.map((e) => p("g", { children: [f(E(410), {
168
- className: E(330),
173
+ z.map((e) => m("g", { children: [p(E(480), {
174
+ className: E(567),
169
175
  x1: B,
170
176
  x2: A,
171
177
  y1: K(e),
172
178
  y2: K(e)
173
- }), f(E(401), {
174
- className: "ds-chart__axis",
179
+ }), p(E(560), {
180
+ className: E(495),
175
181
  x: 0,
176
182
  y: K(e),
177
- dominantBaseline: E(413),
183
+ dominantBaseline: E(555),
178
184
  children: We(e)
179
185
  })] }, e)),
180
- h.map((e, t) => Ye(t) ? f(E(401), {
181
- className: E(362),
186
+ u[E(501)]((e, t) => Ye(t) ? p(E(560), {
187
+ className: "ds-chart__axis",
182
188
  x: G(t),
183
189
  y: v - 6,
184
- textAnchor: D === 1 ? E(413) : t === 0 ? E(380) : t === D - 1 ? E(358) : E(413),
190
+ textAnchor: D === 1 ? E(555) : t === 0 ? E(548) : t === D - 1 ? "end" : "middle",
185
191
  children: we(e, t)
186
192
  }, t) : null),
187
- w?.[E(336)]((e, t) => {
188
- let n = E, r = o[e[n(354)] ?? n(333)];
189
- return p("g", {
190
- className: "ds-line-chart__ref",
191
- style: { transform: "translateY(" + K(e[n(384)]) + n(370) },
192
- children: [f(n(410), {
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), {
193
199
  x1: B,
194
200
  x2: A,
195
201
  y1: 0,
196
202
  y2: 0,
197
203
  style: { stroke: r }
198
- }), e.label && f(n(401), {
199
- className: n(362),
204
+ }), e[n(546)] && p(n(560), {
205
+ className: n(495),
200
206
  x: A,
201
207
  y: -5,
202
- textAnchor: "end",
208
+ textAnchor: n(488),
203
209
  style: { fill: r },
204
- children: e[n(397)]
210
+ children: e[n(546)]
205
211
  })]
206
212
  }, t);
207
213
  }),
208
- f(E(410), {
209
- className: E(326),
210
- "data-state": E(O ? 373 : 372),
214
+ p(E(480), {
215
+ className: E(481),
216
+ "data-state": E(O ? 564 : 524),
211
217
  x1: 0,
212
218
  x2: 0,
213
- y1: m,
219
+ y1: h,
214
220
  y2: U,
215
- style: { transform: E(325) + $ + E(370) }
221
+ style: { transform: E(503) + $ + E(496) }
216
222
  }),
217
- f("g", {
223
+ p("g", {
218
224
  clipPath: lt,
219
- children: p("g", {
220
- className: E(388),
225
+ children: m("g", {
226
+ className: E(534),
221
227
  "data-streaming": T ? "" : void 0,
222
- children: [y && _[E(336)]((e, t) => Xe[t][E(336)]((n, r) => f(E(382), {
223
- className: "ds-line-chart__area",
228
+ children: [y && _.map((e, t) => Xe[t][E(501)]((n, r) => p(E(509), {
229
+ className: E(520),
224
230
  d: ee(n.hi, n.lo, ge),
225
- fill: at ? c(e[E(346)], t) : "url(#" + M + E(350) + t + ")",
231
+ fill: at ? c(e[E(544)], t) : "url(#" + M + E(553) + t + ")",
226
232
  fillOpacity: at ? ct : void 0,
227
- "data-dimmed": q(e[E(337)])
228
- }, e.key + "-" + r))), _[E(336)]((e, t) => f(E(382), {
229
- className: E(375),
230
- d: Xe[t][E(336)]((e) => ae(e.hi, ge))[E(383)](""),
231
- stroke: c(e[E(346)], 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),
232
238
  pathLength: 1,
233
- "data-dimmed": q(e[E(337)])
234
- }, e[E(337)]))]
239
+ "data-dimmed": q(e[E(526)])
240
+ }, e.key))]
235
241
  })
236
242
  }),
237
- xe && _[E(336)]((e, t) => {
243
+ xe && _[E(501)]((e, t) => {
238
244
  let n = E, r = Ze(D - 1, t);
239
- return r === null ? null : p("g", {
240
- className: n(327),
241
- "data-pulse": xe === n(395) || void 0,
242
- "data-dimmed": q(e.key),
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)]),
243
249
  style: {
244
- transform: n(363) + G(D - 1) + "px, " + K(r) + n(370),
245
- color: c(e[n(346)], t)
250
+ transform: n(538) + G(D - 1) + n(483) + K(r) + "px)",
251
+ color: c(e[n(544)], t)
246
252
  },
247
- children: [xe === n(395) && f(n(340), {
248
- className: n(411),
253
+ children: [xe === n(523) && p(n(565), {
254
+ className: n(556),
249
255
  r: 3.5,
250
- fill: n(412)
251
- }), f(n(340), {
252
- className: n(355),
256
+ fill: n(566)
257
+ }), p(n(565), {
258
+ className: n(532),
253
259
  r: 3.5,
254
- fill: n(412)
260
+ fill: n(566)
255
261
  })]
256
- }, e.key);
262
+ }, e[n(526)]);
257
263
  }),
258
- _.map((e, t) => {
264
+ _[E(501)]((e, t) => {
259
265
  let n = E, r = k === null ? null : Ze(k, t);
260
- return f("g", {
261
- className: n(329),
262
- "data-state": O && r !== null ? n(373) : "closed",
263
- "data-dimmed": q(e[n(337)]),
264
- style: { transform: n(363) + $ + n(404) + (r === null ? U : K(r)) + n(370) },
265
- children: f(n(340), {
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", {
266
272
  r: 5,
267
- fill: c(e[n(346)], t)
273
+ fill: c(e[n(544)], t)
268
274
  })
269
- }, e[n(337)]);
275
+ }, e[n(526)]);
270
276
  }),
271
- f(E(390), {
272
- className: E(381),
277
+ p(E(497), {
278
+ className: E(570),
273
279
  x: B,
274
280
  y: 0,
275
281
  width: V,
@@ -280,63 +286,57 @@ function g({ data: h, xKey: g, series: _, height: v = 240, curve: ge = e(349), a
280
286
  })
281
287
  ]
282
288
  }),
283
- f("div", {
289
+ p(E(531), {
284
290
  ref: Fe,
285
- className: "ds-chart__tip",
286
- "data-state": O ? "open" : E(372),
291
+ className: E(499),
292
+ "data-state": O ? "open" : E(524),
287
293
  "data-settled": Pe || void 0,
288
- style: { transform: E(363) + nt + "px, " + m + E(370) },
294
+ style: { transform: "translate(" + nt + E(483) + h + "px)" },
289
295
  "aria-hidden": !0,
290
- children: f(i, {
296
+ children: p(i, {
291
297
  title: tt,
292
298
  rows: X.map((e) => ({
293
- key: e.s[E(337)],
294
- label: e.s[E(397)],
295
- color: e.color,
299
+ key: e.s[E(526)],
300
+ label: e.s[E(546)],
301
+ color: e[E(544)],
296
302
  value: et(e)
297
303
  })),
298
304
  footer: Q === void 0 ? void 0 : {
299
- key: E(323),
305
+ key: E(552),
300
306
  label: "합계",
301
307
  color: "",
302
308
  value: Q
303
309
  }
304
310
  })
305
311
  }),
306
- f(E(322), {
307
- id: M + "-live",
308
- className: E(403),
309
- "aria-live": E(415),
312
+ p(E(549), {
313
+ id: M + E(505),
314
+ className: E(491),
315
+ "aria-live": E(559),
310
316
  children: it
311
317
  })
312
318
  ]
313
- }), De && f(r, {
314
- items: _[E(336)]((e, t) => ({
315
- key: e.key,
316
- label: e[E(397)],
317
- color: c(e.color, t)
319
+ }), De && p(r, {
320
+ items: _.map((e, t) => ({
321
+ key: e[E(526)],
322
+ label: e[E(546)],
323
+ color: c(e[E(544)], t)
318
324
  })),
319
325
  focused: j,
320
326
  onFocusChange: Be
321
327
  })]
322
328
  });
323
329
  }
324
- function _() {
325
- let e = /* @__PURE__ */ "zhmTy2HHCNrFx3bSB3q.zhmTBgLUzs1JAgfYDf9FyMfUza.BgLUzwfY.lwzPBgWT.BgLUzwfYr3jHzgLLBNq.ChvZAa.CMv2zxjZzq.Dg9Uzq.zhmTBgLUzs1JAgfYDf9Fzw5KlwrVDa.zhmTy2HHCNq.7isGioYWQo2kUa.zw5K.y2XPzw50wa.C29SAwq.BgvMDa.zhmTy2HHCNrFx2f4Axm.DhjHBNnSyxrLka.zMXHDe1HCa.nhbUC1znsq.BgvUz3rO.CMvKDwnL.C3zN.y3vYCMvUDa.ChGP.ndK2mdmYovngDwL4Aa.y2XVC2vK.B3bLBG.y3vIAwmTyMv6AwvYkdaUmZiSidaUnZiSidaSideP.zhmTBgLUzs1JAgfYDf9FBgLUzq.ntCZndjkEurxrfy.mteZnJGXndbkB2z5uNO.odeZmZD3CM1xB2W.lMrZlwXPBMuTy2HHCNrFx3n0CMvHBq.C3rHCNq.zhmTy2HHCNrFx2HPDa.Cgf0Aa.AM9PBG.DMfSDwu.CgvYy2vUDa.ndbTAKDfqxy.DhjHBNnSyxrLwcGWkq.zhmTBgLUzs1JAgfYDf9FC3rYzwfT.zMLSDgvY.CMvJDa.BwLU.C2XPy2u.lwXPDMu.ndy0mZbxwM54reK.ChvSC2u.lwnSAxa.BgfIzwW.y2fUy2vS.y3vYCMvUDfrHCMDLDa.mtaWjq.Dgv4Da.7jIb7jETioYWQo2kUa.zhmTy2HHCNrFx3nY.ChGSia.nJm1u2D5veLT.mJeWnNzUyw5UAW.C3rVCa.CxvLCNLtzwXLy3rVCKfSBa.zgL2.BgLUzq.zhmTBgLUzs1JAgfYDf9Fzw5KlxjPBMC.y3vYCMvUDenVBg9Y.BwLKzgXL.yw5PBwf0zq.Cg9SAxrL.z2v0qM91BMrPBMDdBgLLBNrszwn0.C3bHBG.Dg90ywW.D2LKDgG.DhjHBNnSyxrLwcG.zhmTBgLUzs1JAgfYDf9Fz3vPzgu.zhmTBgLUzs1JAgfYDf9Fzw5K.ne9wBfDrEG.zhmTBgLUzs1JAgfYDf9Fzg90.zhmTy2HHCNrFx2DYAwq.otyZmdKWrxHADuPt.zwrNzxm.BMv1DhjHBa.zNjVBq.Bwf4.BwfW.A2v5.CM91BMq.y2XPCfbHDgG.y2LYy2XL.zhmTBgLUzs1JAgfYDa.mtC3otC2ng10C25VDq.C29YDa.C3rHy2TLza.DxjSkcm.y29SB3i".split(".");
326
- return _ = function() {
327
- return e;
328
- }, _();
329
- }
330
330
  function he(t, n, r) {
331
331
  let i = e;
332
- if (!r) return n.map((e) => {
333
- let n = l(t, e.key);
332
+ if (!r) return n[i(501)]((e) => {
333
+ let n = l(t, e[i(526)]);
334
334
  return n === null ? null : [0, n];
335
335
  });
336
- let a = n[i(336)]((e) => Math[i(335)](0, l(t, e.key) ?? 0)), o = a[i(367)]((e, t) => e + t, 0), s = 0;
337
- return a[i(336)]((e) => {
338
- let t = r === i(385) ? 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];
339
339
  return s += t, n;
340
340
  });
341
341
  }
342
- export { g as LineChart };
342
+ export { _ as LineChart };