@iamfiro/design 0.3.0 → 0.3.2

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