@iamfiro/design 0.3.2 → 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 (163) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/app-shell/AGENTS.md +99 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/lib/components/Accordion/Accordion2.js +74 -74
  6. package/lib/components/ActionBar/ActionBar2.js +44 -42
  7. package/lib/components/Alert/Alert2.js +67 -67
  8. package/lib/components/AppShell/AppShell2.js +72 -66
  9. package/lib/components/AreaChart/AreaChart.js +45 -45
  10. package/lib/components/BarChart/BarChart2.js +128 -128
  11. package/lib/components/BarList/BarList2.js +105 -105
  12. package/lib/components/Breadcrumb/Breadcrumb2.js +63 -64
  13. package/lib/components/Calendar/Calendar2.js +197 -197
  14. package/lib/components/Calendar/DatePicker2.js +100 -100
  15. package/lib/components/Calendar/date.js +47 -70
  16. package/lib/components/Card/Card2.js +101 -74
  17. package/lib/components/CardFrame/CardFrame2.js +52 -56
  18. package/lib/components/Chart/ChartParts.js +88 -88
  19. package/lib/components/Chart/chart2.js +63 -63
  20. package/lib/components/Chart/useChartInteraction.js +43 -43
  21. package/lib/components/ChatBubble/ChatBubble2.js +111 -111
  22. package/lib/components/ChatBubble/formatChatTime.js +38 -43
  23. package/lib/components/ChatComposer/ChatComposer2.js +96 -96
  24. package/lib/components/CodeBlock/CodeBlock2.js +65 -65
  25. package/lib/components/CodeBlock/highlight.js +84 -84
  26. package/lib/components/ColorPicker/ColorPicker2.js +263 -263
  27. package/lib/components/ColorPicker/color.js +92 -92
  28. package/lib/components/ColorPicker/presets.js +35 -39
  29. package/lib/components/Combobox/Combobox2.js +134 -134
  30. package/lib/components/CommandMenu/CommandMenu.js +130 -131
  31. package/lib/components/Comment/Comment2.js +64 -63
  32. package/lib/components/ContextMenu/ContextMenu2.js +84 -84
  33. package/lib/components/DataGrid/DataGrid2.js +1182 -1180
  34. package/lib/components/DataGrid/GridPopover.js +84 -84
  35. package/lib/components/DataGrid/anchor.js +29 -28
  36. package/lib/components/DataGrid/model.js +308 -307
  37. package/lib/components/DataGrid/panels.js +398 -399
  38. package/lib/components/DataGrid/typeMeta.js +41 -40
  39. package/lib/components/DataGrid/types.js +39 -40
  40. package/lib/components/DescriptionList/DescriptionList2.js +105 -105
  41. package/lib/components/Dialog/AlertDialog.js +90 -89
  42. package/lib/components/Dialog/Dialog2.js +71 -72
  43. package/lib/components/Dialog/modal.js +62 -60
  44. package/lib/components/Drawer/Drawer2.js +167 -166
  45. package/lib/components/DropdownMenu/DropdownMenu2.js +260 -258
  46. package/lib/components/DropdownMenu/menuCore.js +29 -28
  47. package/lib/components/Dropzone/Dropzone2.js +78 -77
  48. package/lib/components/EmptyState/EmptyState2.js +57 -57
  49. package/lib/components/FileChip/FileChip2.js +53 -77
  50. package/lib/components/FileUpload/FileUpload.js +168 -167
  51. package/lib/components/FilterChips/FilterChips2.js +60 -60
  52. package/lib/components/FunnelChart/FunnelChart2.js +174 -174
  53. package/lib/components/FunnelChart/funnel.js +44 -42
  54. package/lib/components/Highlight/Highlight2.js +55 -55
  55. package/lib/components/HoverCard/HoverCard.js +71 -96
  56. package/lib/components/InlineDiff/InlineDiff2.js +128 -129
  57. package/lib/components/InlineDiff/diff.js +79 -79
  58. package/lib/components/InlineDiff/useDiffReview.js +61 -62
  59. package/lib/components/Kanban/Kanban2.js +387 -389
  60. package/lib/components/Kanban/KanbanCard.js +84 -84
  61. package/lib/components/Kanban/move.js +32 -25
  62. package/lib/components/LineChart/LineChart2.js +228 -228
  63. package/lib/components/List/List2.js +62 -62
  64. package/lib/components/Listbox/Listbox2.js +92 -92
  65. package/lib/components/Marker/Marker2.js +50 -56
  66. package/lib/components/Menubar/Menubar2.js +117 -116
  67. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  68. package/lib/components/NavigationMenu/NavigationMenu2.js +231 -231
  69. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  70. package/lib/components/NumberStepper/NumberStepper2.js +60 -60
  71. package/lib/components/OtpInput/OtpInput2.js +90 -89
  72. package/lib/components/Pagination/Pagination2.js +105 -105
  73. package/lib/components/Pagination/paginationRange.js +37 -37
  74. package/lib/components/PhoneInput/PhoneInput.js +75 -76
  75. package/lib/components/PieChart/PieChart2.js +166 -166
  76. package/lib/components/PieChart/arc.js +71 -69
  77. package/lib/components/PieChart/useArcTween.js +60 -62
  78. package/lib/components/Popover/Popover2.js +85 -86
  79. package/lib/components/ProgressTracker/ProgressTracker2.js +134 -134
  80. package/lib/components/Rating/Rating2.js +90 -89
  81. package/lib/components/Resizable/Resizable2.js +128 -129
  82. package/lib/components/Resizable/layout.js +51 -51
  83. package/lib/components/ScaledPreview/ScaledPreview2.js +49 -48
  84. package/lib/components/ScatterChart/ScatterChart2.js +214 -213
  85. package/lib/components/ScatterChart/scatter.js +49 -52
  86. package/lib/components/ScrollArea/ScrollArea2.js +115 -117
  87. package/lib/components/Select/Select2.js +82 -82
  88. package/lib/components/Sidebar/Sidebar2.js +91 -85
  89. package/lib/components/Sidebar/rail.js +43 -0
  90. package/lib/components/Skeleton/Skeleton2.js +63 -64
  91. package/lib/components/Slider/Slider2.js +65 -66
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +76 -69
  93. package/lib/components/SparkChart/SparkChart2.js +126 -127
  94. package/lib/components/SparkChart/spark.js +66 -42
  95. package/lib/components/Sparkbar/Sparkbar2.js +60 -60
  96. package/lib/components/SplitView/SplitView2.js +51 -51
  97. package/lib/components/Stat/Stat2.js +79 -79
  98. package/lib/components/StepList/StepList2.js +75 -75
  99. package/lib/components/Table/Table2.js +71 -71
  100. package/lib/components/Tabs/Tabs2.js +74 -74
  101. package/lib/components/TagInput/TagInput2.js +223 -221
  102. package/lib/components/TimePicker/TimePicker2.js +197 -195
  103. package/lib/components/TimePicker/time.js +59 -56
  104. package/lib/components/Timeline/Timeline2.js +195 -195
  105. package/lib/components/Timeline/scale.js +64 -66
  106. package/lib/components/Toast/Toaster.js +139 -139
  107. package/lib/components/Toast/store.js +72 -76
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  109. package/lib/components/Toolbar/Toolbar2.js +165 -164
  110. package/lib/components/Tracker/Tracker2.js +72 -72
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +96 -97
  112. package/lib/components/TreeView/TreeView2.js +152 -151
  113. package/lib/hooks/timing.js +34 -36
  114. package/lib/hooks/useControllableState.js +29 -30
  115. package/lib/hooks/useCountdown.js +51 -53
  116. package/lib/hooks/useDigitInput.js +81 -55
  117. package/lib/hooks/useDismiss.js +53 -56
  118. package/lib/hooks/useElapsed.js +48 -49
  119. package/lib/hooks/useFloating.js +36 -36
  120. package/lib/hooks/useFocusTrap.js +32 -32
  121. package/lib/hooks/usePresence.js +49 -49
  122. package/lib/hooks/usePressToOpen.js +40 -40
  123. package/lib/hooks/useScrollLock.js +50 -49
  124. package/lib/hooks/useSelection.js +42 -47
  125. package/lib/index.js +138 -139
  126. package/lib/primitives/AspectRatio2.js +58 -57
  127. package/lib/primitives/BrandIcon.js +210 -179
  128. package/lib/primitives/ColorDot2.js +42 -41
  129. package/lib/primitives/CopyButton2.js +59 -58
  130. package/lib/primitives/CountBadge2.js +58 -63
  131. package/lib/primitives/Countdown2.js +38 -37
  132. package/lib/primitives/Delta2.js +37 -37
  133. package/lib/primitives/Elapsed.js +42 -40
  134. package/lib/primitives/FileIcon2.js +102 -102
  135. package/lib/primitives/Flag2.js +124 -124
  136. package/lib/primitives/IconStack2.js +45 -23
  137. package/lib/primitives/IconTile2.js +45 -41
  138. package/lib/primitives/Kbd2.js +48 -48
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +40 -42
  141. package/lib/primitives/MaskedText2.js +50 -50
  142. package/lib/primitives/Progress2.js +78 -77
  143. package/lib/primitives/RelativeTime.js +55 -58
  144. package/lib/primitives/SearchInput2.js +72 -68
  145. package/lib/primitives/SelectorButton2.js +60 -61
  146. package/lib/primitives/Spinner2.js +48 -49
  147. package/lib/primitives/StatusIcon2.js +69 -69
  148. package/lib/primitives/Swatch2.js +65 -69
  149. package/lib/primitives/Tooltip2.js +92 -92
  150. package/lib/primitives/Typography2.js +37 -37
  151. package/lib/primitives/formatCountdown.js +38 -38
  152. package/lib/primitives/formatElapsed.js +43 -45
  153. package/lib/primitives/formatRelativeTime.js +54 -54
  154. package/lib/primitives/hotkey.js +77 -77
  155. package/lib/primitives/index.js +162 -161
  156. package/lib/primitives/maskValue.js +54 -51
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  159. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  160. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  161. package/lib/types/components/index.d.ts +1 -0
  162. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  163. package/package.json +1 -1
@@ -1,62 +1,76 @@
1
1
  "use client";
2
- const e = _;
3
- (function(e, t) {
4
- let n = _, r = 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) {
7
+ let t = "", n = "";
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);
9
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
10
+ return decodeURIComponent(n);
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;
16
+ }
17
+ (function(e, n) {
18
+ let r = t, i = e();
5
19
  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;
7
- r.push(r.shift());
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());
8
22
  } catch {
9
- r.push(r.shift());
23
+ i.push(i.shift());
10
24
  }
11
- })(a, 690005);
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
- function a() {
16
- let e = /* @__PURE__ */ "zhmTBgLUzs1JAgfYDf9FBgLUzq.DhjHBNnSyxrLwcGWkq.C3zN.DxjSkcm.zhmTy2HHCNq.zhmTBgLUzs1JAgfYDf9FCMvM.D2LKDgG.nhjVufPOwq.BgLUzwfY.DMfSDwu.BgLUzq.C3rVCa.AM9PBG.lwXPDMu.BgfIzwW.ovr4txf0yG.zgL2.nJfmv0DmCMu.mteXnhnICfbqCG.zhmTBgLUzs1JAgfYDf9FyMfUza.CMv2zxjZzq.BgvUz3rO.mtu4mJe0odbuA0D5EeC.7isGioYWQo2kUa.ChvSC2u.z2v0qM91BMrPBMDdBgLLBNrszwn0.Cgf0Aa.lcdTLANQS4qG.BwLKzgXL.D2fYBMLUzW.7jIb7jETioYWQo2kUa.C3bHBG.zMLSDgvY.zhmTy2HHCNrFx3rPCa.yxv0BW.y2XPzw50wa.mtaWjq.zhmTBgLUzs1JAgfYDf9FC3rYzwfT.zhmTy2HHCNrFx2f4Axm.Cg9SAxrL.zhmTBgLUzs1JAgfYDf9Fzw5KlwrVDa.Bwf4.y3vYCMvUDa.y2XVC2vK.yw5PBwf0zq.zhmTBgLUzs1JAgfYDf9FyxjLyq.y29SB3i.Dg90ywW.ChGSia.BgLUzwfYr3jHzgLLBNq.y2LYy2XL.BwfW.zNjVBq.ChvZAa.zgvMCW.Dg9Uzq.odm1ntu0ne9XB2riEG.mtuWmZm4n0fuz1rXDG.C29SAwq.C29YDa.CMvJDa.CxvLCNLtzwXLy3rVCKfSBa.BgvMDa.CgvYy2vUDa.BNvTyMvY.y3vYCMvUDenVBg9Y.zhmTBgLUzs1JAgfYDf9Fzw5KlxjPBMC.BwLU.odqXmdi5vujluxvj.ChGP.y3vYCMvUDfrHCMDLDa.zhmTy2HHCNrFx3bSB3q.zhmTy2HHCNrFx2DYAwq.Dgv4Da.A2v5.zhmTBgLUzs1JAgfYDa.mJqWndK5ogH5D2vdEG.zMXHDe1HCa.DhjHBNnSyxrLka.CM91BMq.CMvKDwnL.mZa3mdi4mfHbCgvyrG.B3bLBG.zw5K.mJjtDeL6uLC.lwnSAxaP.DhjHBNnSyxrLwcG.y2XPCfbHDgG".split(".");
17
- return a = function() {
18
- return e;
19
- }, a();
20
- }
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";
21
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";
22
30
  import { useChartInteraction as ce } from "../Chart/useChartInteraction.js";
23
31
  /* 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,
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() {
35
+ return e;
36
+ }, u();
37
+ }
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,
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
+ ]), 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));
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)));
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)));
47
61
  return se(n, x);
48
62
  }, [
49
- z,
50
- R,
51
- F,
63
+ L,
64
+ I,
65
+ N,
52
66
  ye,
53
67
  S,
54
68
  x,
55
- 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];
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];
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(300)](i));
82
+ let o = W(e - I);
83
+ i.hi.push([o, G(a[1])]), i.lo[n(300)]([o, G(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);
86
+ }), Qe = (e, t) => L[e + I]?.[t]?.[1] ?? null, K = (e) => A !== null && A !== e || void 0, $e = de(null), et = de(t);
73
87
  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
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
80
94
  }));
81
- return () => r.forEach((e) => e.cancel());
95
+ return () => i[e(277)]((t) => t[e(333)]());
82
96
  }, [
83
- a,
84
- E,
85
- W
97
+ t,
98
+ w,
99
+ U
86
100
  ]);
87
- let J = A === null ? void 0 : a[A], Y = J ? _[D(498)]((e, t) => ({
101
+ let q = O === null ? void 0 : t[O], J = q ? _[T(351)]((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[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, {
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: r("ds-chart", T(302), Ne),
112
+ style: Pe,
113
+ children: [m(T(328), {
114
+ ...Be,
115
+ className: T(289),
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": y ? T(324) : "선 차트",
118
+ "aria-label": Me,
119
+ "aria-describedby": j + "-live",
106
120
  children: [
107
- j > 0 && p(D(537), {
108
- ref: Qe,
121
+ k > 0 && m(T(314), {
122
+ ref: $e,
109
123
  className: "ds-chart__svg",
110
- width: j,
124
+ width: k,
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(T(353), { children: [p(T(334), {
129
+ id: j + T(322),
130
+ children: p(T(291), {
131
+ x: z,
118
132
  y: 0,
119
- width: H,
133
+ width: B,
120
134
  height: v
121
135
  })
122
- }), y && !at && _[D(498)]((e, t) => p(D(496), {
123
- id: N + "-fill-" + t,
136
+ }), y && !$ && _[T(351)]((e, t) => m(T(312), {
137
+ id: j + T(346) + 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(T(290), {
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: T(316),
136
150
  style: {
137
- stopColor: c(e[D(493)], t),
151
+ stopColor: c(e[T(280)], t),
138
152
  stopOpacity: st
139
153
  }
140
154
  })]
141
- }, e[D(521)]))] }),
142
- C && C.length > 0 && f("g", {
155
+ }, e[T(335)]))] }),
156
+ C && C[T(294)] > 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: 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),
150
164
  x: r,
151
- y: m,
152
- width: Math.max(2, i - r),
153
- height: U,
154
- style: { fill: o[e[n(502)] ?? n(476)] }
165
+ y: h,
166
+ width: Math[n(366)](2, i - r),
167
+ height: V,
168
+ style: { fill: o[e[n(282)] ?? n(292)] }
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,
163
- y1: K(e),
164
- y2: K(e)
165
- }), f(D(520), {
166
- className: "ds-chart__axis",
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),
167
181
  x: 0,
168
- y: K(e),
169
- dominantBaseline: D(475),
170
- children: Ue(e)
182
+ y: G(e),
183
+ dominantBaseline: T(319),
184
+ children: Ge(e)
171
185
  })] }, e)),
172
- a.map((e, t) => Ye(t) ? f("text", {
173
- className: "ds-chart__axis",
174
- x: G(t),
186
+ t[T(351)]((e, t) => Xe(t) ? p(T(340), {
187
+ className: T(313),
188
+ x: W(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: E === 1 ? T(319) : t === 0 ? T(293) : t === E - 1 ? T(308) : T(319),
191
+ children: Te(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
+ xe?.[T(351)]((e, t) => {
194
+ let n = T, r = s[e[n(282)] ?? n(301)];
195
+ return m("g", {
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,
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.label && p(n(340), {
205
+ className: "ds-chart__axis",
206
+ x: k,
193
207
  y: -5,
194
- textAnchor: "end",
208
+ textAnchor: n(308),
195
209
  style: { fill: r },
196
- children: e.label
210
+ children: e[n(296)]
197
211
  })]
198
212
  }, t);
199
213
  }),
200
- f(D(457), {
214
+ p(T(325), {
201
215
  className: "ds-line-chart__guide",
202
- "data-state": D(k ? 529 : 490),
216
+ "data-state": T(D ? 295 : 344),
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: H,
221
+ style: { transform: T(283) + Q + T(307) }
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),
225
+ children: m("g", {
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),
216
230
  d: te(n.hi, n.lo, ge),
217
- fill: at ? c(e.color, t) : D(538) + N + "-fill-" + t + ")",
218
- 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),
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),
224
238
  pathLength: 1,
225
- "data-dimmed": q(e[D(521)])
226
- }, e[D(521)]))]
239
+ "data-dimmed": K(e[T(335)])
240
+ }, e[T(335)]))]
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
+ Se && _[T(351)]((e, t) => {
244
+ let n = T, r = Qe(E - 1, t);
245
+ return r === null ? null : m("g", {
246
+ className: n(356),
247
+ "data-pulse": Se === n(350) || void 0,
248
+ "data-dimmed": K(e.key),
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(359) + W(E - 1) + n(365) + G(r) + n(307),
251
+ color: c(e[n(280)], t)
238
252
  },
239
- children: [T === n(471) && f(n(497), {
240
- className: n(513),
253
+ children: [Se === n(350) && p(n(320), {
254
+ className: n(326),
241
255
  r: 3.5,
242
- fill: n(512)
243
- }), f(n(497), {
244
- className: n(487),
256
+ fill: n(329)
257
+ }), p(n(320), {
258
+ className: n(276),
245
259
  r: 3.5,
246
- fill: "currentColor"
260
+ fill: n(329)
247
261
  })]
248
- }, e[n(521)]);
262
+ }, e[n(335)]);
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
+ _.map((e, t) => {
265
+ let n = T, r = O === null ? null : Qe(O, t);
266
+ return p("g", {
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), {
258
272
  r: 5,
259
- fill: c(e[n(493)], t)
273
+ fill: c(e[n(280)], t)
260
274
  })
261
- }, e[n(521)]);
275
+ }, e[n(335)]);
262
276
  }),
263
- f(D(507), {
264
- className: "ds-chart__hit",
265
- x: V,
277
+ p(T(291), {
278
+ className: T(309),
279
+ x: z,
266
280
  y: 0,
267
- width: H,
281
+ width: B,
268
282
  height: v,
269
- onPointerMove: rt,
270
- onPointerDown: rt,
271
- onPointerLeave: Le
283
+ onPointerMove: it,
284
+ onPointerDown: it,
285
+ onPointerLeave: ze
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(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) },
281
295
  "aria-hidden": !0,
282
- children: f(i, {
283
- title: tt,
284
- rows: X[D(498)]((e) => ({
296
+ children: p(a, {
297
+ title: nt,
298
+ rows: Y[T(351)]((e) => ({
285
299
  key: e.s.key,
286
- label: e.s[D(461)],
287
- color: e.color,
288
- value: et(e)
300
+ label: e.s[T(296)],
301
+ color: e[T(280)],
302
+ value: tt(e)
289
303
  })),
290
- footer: Q === void 0 ? void 0 : {
291
- key: D(494),
304
+ footer: Z === void 0 ? void 0 : {
305
+ key: T(345),
292
306
  label: "합계",
293
307
  color: "",
294
- value: Q
308
+ value: Z
295
309
  }
296
310
  })
297
311
  }),
298
- f(D(478), {
299
- id: N + D(460),
312
+ p(T(332), {
313
+ id: j + T(341),
300
314
  className: "ds-chart__sr",
301
- "aria-live": D(486),
302
- children: it
315
+ "aria-live": T(306),
316
+ children: at
303
317
  })
304
318
  ]
305
- }), Ee && f(r, {
306
- items: _.map((e, t) => ({
307
- key: e[D(521)],
308
- label: e[D(461)],
309
- color: c(e[D(493)], 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)
310
324
  })),
311
- focused: M,
312
- onFocusChange: ze
325
+ focused: A,
326
+ onFocusChange: Ve
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(351)]((e) => {
333
+ let n = l(t, e.key);
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(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];
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 };