@iamfiro/design 0.3.4 → 0.3.5

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