@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,166 +1,166 @@
1
1
  "use client";
2
- const e = g;
2
+ const e = s;
3
3
  (function(e, t) {
4
- let n = g, r = e();
4
+ let n = s, r = e();
5
5
  for (;;) try {
6
- if (parseInt(n(361)) / 1 + parseInt(n(380)) / 2 + -parseInt(n(383)) / 3 + -parseInt(n(327)) / 4 + -parseInt(n(351)) / 5 * (parseInt(n(342)) / 6) + parseInt(n(352)) / 7 * (-parseInt(n(340)) / 8) + -parseInt(n(329)) / 9 * (-parseInt(n(381)) / 10) == t) break;
6
+ if (parseInt(n(237)) / 1 + parseInt(n(224)) / 2 + parseInt(n(235)) / 3 * (parseInt(n(194)) / 4) + parseInt(n(193)) / 5 + parseInt(n(223)) / 6 + -parseInt(n(186)) / 7 + -parseInt(n(209)) / 8 == t) break;
7
7
  r.push(r.shift());
8
8
  } catch {
9
9
  r.push(r.shift());
10
10
  }
11
- })(i, 553018);
11
+ })(n, 499888);
12
12
  import { Stack as t } from "../../primitives/Layout2.js";
13
- import { useControllableState as n } from "../../hooks/useControllableState.js";
14
- import { cx as r } from "../../primitives/index.js";
15
- function i() {
16
- let e = /* @__PURE__ */ "DMfSDwu.C3bHBG.z2v0qM91BMrPBMDdBgLLBNrszwn0.zMLSDgvY.ChGSia.lwXPDMu.zhmTyMfYlwnOyxj0.C2vYAwvZ.ogTRzM9RzW.DhjHBNnSyxrLwcG.mty2nJjcr3vJB2u.yNv0Dg9U.BgvUz3rO.C29Tzq.BwfW.CMLNAhq.zhmTyMfYlwnOyxj0x19Iyw5K.zhmTyMfYlwnOyxj0x190AwnRlwXHyMvS.BgLUzq.nJbPyK9czeG.ntu1nZa0mvrhEfPksW.B3bLBG.y2XVC2vK.y2XPzw50wa.zhmTy2HHCNrFx2f4AxmGzhmTyMfYlwnOyxj0x19SywjLBa.zgL2.C3rHCNq.CMv2zxjZzq.Dgv4Da.ntm3mZGWBwfOu0Hj.zhmTyMfYlwnOyxj0x19Iyxi.icJSHkdTG53RKkGP.Bwf4.Cg9SAxrL.CMvJDa.zMXVB3i.ChGP.AgvHzgvY.y29SB3i.66Ej64YaioYWQo2kUa.zMXHDe1HCa.BwLU.CMvKDwnL.rw50zxi.zhmTy2HHCNrFx3nY.A2v5.C29YDa.C3zN.mtiWnZq4nhLcweLZuq.mte1ndaYmeDvC2LkEq.zhmTy2HHCNq.mJG5mtuWnu1RCu9psa.zw5K.zM9VDgvY.ChjLDMvUDerLzMf1Bhq.D2LKDgG.DhjHBNnSyxrLka.zhmTy2HHCNrFx3bSB3q.BgvMDa.zhmTy2HHCNrFx2HPDa.zhmTy2HHCNrFx3n2zW.BwLKzgXL.ndqYmdq4ohfHsuHcvq.BgfIzwW.mtGWuevnvNrd.Dg90ywW.zhmTyMfYlwnOyxj0x190AwnRCW".split(".");
17
- return i = function() {
13
+ function n() {
14
+ let e = /* @__PURE__ */ "zhmTyMfYlwnOyxj0x190AwnRlwXHyMvS.DMfSDwu.C29Tzq.y29SB3i.C2vYAwvZ.zhmTy2HHCNrFx2f4AxmGzhmTyMfYlwnOyxj0x19SywjLBa.BwfW.zhmTy2HHCNq.yNv0Dg9U.zM9VDgvY.C29YDa.zhmTy2HHCNrFx2HPDa.B3bLBG.zhmTy2HHCNrFx3bSB3q.mtq2otGWmJrIrLjeEKG.zhmTyMfYlwnOyxj0x190AwnRCW.Dg90ywW.zhmTyMfYlwnOyxj0x19IyxjZ.zhmTyMfYlwnOyxj0x19Iyw5K.BgfIzwW.Cgf0Aa.C3bHBG.zgL2.ChGP.DhjHBNnSyxrLwcG.zhmTy2HHCNrFx3n2zW.zhmTyMfYlwnOyxj0x190AwnR.Bwf4.ndK2nJa4nLv3CNzyDa.mtC4mJm0mfDQCujmzq.AM9PBG.y2XVC2vK.BwLU.BgvMDa.DhjHBNnSyxrLka.zhmTy2HHCNrFx2f4Axm.zMLSDgvY.zMXHDe1HCa.Dgv4Da.A2v5.nJG0uuX2s3b6.ChGSia.mtmWmZG2tvbyAxnv.z2v0qM91BMrPBMDdBgLLBNrszwn0.zhmTy2HHCNrFx3rPCa.y3vYCMvUDfrHCMDLDa.zMXVB3i.C3rHCNq.rw50zxi.zhmTy2HHCNrFx3nY.BgvUz3rO.Cg9SAxrL.66Ej64YaioYWQo2kUa.CMvJDa.zhmTyMfYlwnOyxj0.CMvKDwnL.ntaWmdi2oe5vteXowa.CMLNAhq.zw5K.B25lzxLeB3DU.BgLUzq.lwXPDMu.BwLKzgXL.mta0mZaYmfvPEeTfDa.mtC0mZjKB1n1sNK".split(".");
15
+ return n = function() {
18
16
  return e;
19
- }, i();
17
+ }, n();
20
18
  }
19
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
20
+ import { cx as i } from "../../primitives/index.js";
21
21
  import { ChartLegend as a, ChartTooltip as o } from "../Chart/ChartParts.js";
22
- import { axisGutter as s, barPath as ee, chartColor as c, formatCompact as l, formatNumber as u, labelStep as te, niceTicks as ne, numberAt as d } from "../Chart/chart2.js";
23
- import { useChartInteraction as f } from "../Chart/useChartInteraction.js";
24
- /* empty css */
25
- import { useId as p, useMemo as re, useState as ie } from "react";
26
- import { Fragment as ae, jsx as m, jsxs as h } from "react/jsx-runtime";
27
- function g(e, t) {
28
- e -= 321;
29
- let n = i(), r = n[e];
30
- g.SlSKdd === void 0 && (g.ujHjMR = function(e) {
22
+ function s(e, t) {
23
+ e -= 182;
24
+ let r = n(), i = r[e];
25
+ s.CiAhaZ === void 0 && (s.UfYYMp = function(e) {
31
26
  let t = "", n = "";
32
27
  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);
33
28
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
34
29
  return decodeURIComponent(n);
35
- }, g.TBmRrC = {}, g.SlSKdd = !0);
36
- let a = n[0];
37
- g.FOqyIX !== a && (g.TBmRrC = {}, g.FOqyIX = a);
38
- let o = g.TBmRrC[e];
39
- return o === void 0 ? (r = g.ujHjMR(r), g.TBmRrC[e] = r) : r = o, r;
30
+ }, s.SMvdlQ = {}, s.CiAhaZ = !0);
31
+ let a = r[0];
32
+ s.yzAFXX !== a && (s.SMvdlQ = {}, s.yzAFXX = a);
33
+ let o = s.SMvdlQ[e];
34
+ return o === void 0 ? (i = s.UfYYMp(i), s.SMvdlQ[e] = i) : i = o, i;
40
35
  }
41
- var _ = 8, oe = 28, se = 44, v = 8, y = 3, ce = 4;
42
- function b({ data: i, xKey: b, series: x, height: S = 240, stacked: C, segmentGap: le = 0, yTickCount: ue = 3, yMax: de, yTicks: w, yAxis: T = e(323), formatValue: E = u, formatAxisValue: fe = l, formatX: D = (e) => String(e[b] ?? ""), formatTitle: pe, xIcon: O, showTotal: me = C, totalPlacement: he = e(385), tooltipLeading: ge, tooltipSort: _e = e(339), legend: ve = !0, activeIndex: ye, defaultActiveIndex: be, onActiveIndexChange: xe, selectable: Se, selected: k, defaultSelected: Ce = null, onSelectedChange: A, "aria-label": we = e(371), className: Te, style: Ee }) {
43
- let j = e, M = i.length, { active: De, open: N, shown: P, settled: Oe, width: F, tipRef: ke, tipSize: Ae, hover: je, leave: Me, plotProps: Ne } = f({
36
+ import { axisGutter as c, barPath as ee, chartColor as l, formatCompact as u, formatNumber as te, labelStep as ne, niceTicks as d, numberAt as f } from "../Chart/chart2.js";
37
+ import { useChartInteraction as p } from "../Chart/useChartInteraction.js";
38
+ /* empty css */
39
+ import { useId as re, useMemo as ie, useState as ae } from "react";
40
+ import { Fragment as oe, jsx as m, jsxs as h } from "react/jsx-runtime";
41
+ var g = 8, se = 28, ce = 44, _ = 8, v = 3, le = 4;
42
+ function y({ data: n, xKey: y, series: b, height: x = 240, stacked: S, segmentGap: ue = 0, yTickCount: de = 3, yMax: fe, yTicks: C, yAxis: w = "left", formatValue: T = te, formatAxisValue: pe = u, formatX: E = (e) => String(e[y] ?? ""), formatTitle: me, xIcon: D, showTotal: he = S, totalPlacement: ge = e(204), tooltipLeading: _e, tooltipSort: ve = e(199), legend: ye = !0, activeIndex: be, defaultActiveIndex: xe, onActiveIndexChange: Se, selectable: Ce, selected: O, defaultSelected: k = null, onSelectedChange: A, "aria-label": we = e(182), className: Te, style: Ee }) {
43
+ let j = e, M = n.length, { active: De, open: N, shown: P, settled: Oe, width: F, tipRef: ke, tipSize: Ae, hover: je, leave: Me, plotProps: Ne } = p({
44
44
  count: M,
45
- activeIndex: ye,
46
- defaultActiveIndex: be,
47
- onActiveIndexChange: xe
48
- }), I = Se ?? (k !== void 0 || Ce !== null || A !== void 0), [L, Pe] = n(k, Ce, A), R = I && L !== null && L < M ? L : null, [z, Fe] = ie(null), Ie = p(), B = re(() => {
49
- let e = g;
50
- if (w?.[e(344)]) return w;
51
- let t = i[e(346)]((t) => x[e(346)]((n) => Math[e(364)](0, d(t, n[e(377)]) ?? 0))), n = de ?? Math[e(364)](0, ...t.map((t) => C ? t[e(374)]((e, t) => e + t, 0) : Math[e(364)](0, ...t)));
52
- return ne(n, ue);
45
+ activeIndex: be,
46
+ defaultActiveIndex: xe,
47
+ onActiveIndexChange: Se
48
+ }), I = Ce ?? (O !== void 0 || k !== null || A !== void 0), [L, Pe] = r(O, k, A), R = I && L !== null && L < M ? L : null, [z, Fe] = ae(null), Ie = re(), B = ie(() => {
49
+ let e = s;
50
+ if (C?.[e(245)]) return C;
51
+ let t = n[e(201)]((t) => b[e(201)]((n) => Math.max(0, f(t, n[e(234)]) ?? 0))), r = fe ?? Math[e(222)](0, ...t[e(201)]((t) => S ? t[e(185)]((e, t) => e + t, 0) : Math[e(222)](0, ...t)));
52
+ return d(r, de);
53
53
  }, [
54
- i,
55
- x,
54
+ n,
55
+ b,
56
+ S,
57
+ fe,
56
58
  C,
57
- de,
58
- w,
59
- ue
60
- ]), Le = Math.max(...B) || 1, Re = O ? se : oe, ze = s(B[j(346)](fe)), V = Math[j(364)](0, F - ze), H = T === j(347) ? 0 : ze, U = S - _ - Re, W = _ + U, G = M ? V / M : 0, K = (e) => H + e * G, q = (e) => Math[j(364)](0, e) / Le * U, Be = te(M, V, O ? 40 : 64), J = Math[j(373)](G * .64, C ? 48 : 24 * x[j(344)] + y * (x[j(344)] - 1)), Ve = C ? J : Math[j(364)](1, (J - y * (x[j(344)] - 1)) / Math[j(364)](1, x[j(344)])), He = i[j(372)]((e, t) => {
61
- let n = j, r = 0, i = K(t) + (G - J) / 2, a = x[n(346)]((t, n) => ({
59
+ de
60
+ ]), Le = Math.max(...B) || 1, Re = D ? ce : se, ze = c(B[j(201)](pe)), V = Math[j(222)](0, F - ze), H = w === j(187) ? 0 : ze, U = x - g - Re, W = g + U, G = M ? V / M : 0, K = (e) => H + e * G, q = (e) => Math[j(222)](0, e) / Le * U, Be = ne(M, V, D ? 40 : 64), J = Math.min(G * .64, S ? 48 : 24 * b.length + v * (b[j(245)] - 1)), Ve = S ? J : Math.max(1, (J - v * (b[j(245)] - 1)) / Math[j(222)](1, b[j(245)])), He = n[j(232)]((e, t) => {
61
+ let n = j, r = 0, i = K(t) + (G - J) / 2, a = b[n(201)]((t, r) => ({
62
62
  s: t,
63
- j: n,
64
- v: d(e, t.key)
65
- }))[n(335)]((e) => e.v !== null && e.v > 0), o = a[a.length - 1]?.j;
66
- return x[n(372)]((a, s) => {
67
- let c = n, l = d(e, a.key);
63
+ j: r,
64
+ v: f(e, t[n(234)])
65
+ }))[n(231)]((e) => e.v !== null && e.v > 0), o = a[a[n(245)] - 1]?.j;
66
+ return b[n(232)]((a, s) => {
67
+ let c = n, l = f(e, a[c(234)]);
68
68
  if (l === null || l <= 0) return [];
69
- let u = q(l), te = C ? i : i + s * (Ve + y), ne = C ? W - q(r) - u : W - u;
69
+ let u = q(l), te = S ? i : i + s * (Ve + v), ne = S ? W - q(r) - u : W - u;
70
70
  r += l;
71
- let f = !C || s === o, p = f ? 0 : Math[c(373)](le, Math[c(364)](0, u - 1));
71
+ let d = !S || s === o, p = d ? 0 : Math[c(227)](ue, Math.max(0, u - 1));
72
72
  return [{
73
- key: t + "-" + a[c(377)],
73
+ key: t + "-" + a[c(234)],
74
74
  i: t,
75
75
  s: a,
76
76
  j: s,
77
- d: ee(te, ne + p, Ve, u - p, f ? ce : 0)
77
+ d: ee(te, ne + p, Ve, u - p, d ? le : 0)
78
78
  }];
79
79
  });
80
- }), Ue = N ? P : null, We = I ? [R, Ue] : [Ue], Ge = We[j(345)]((e) => e !== null), Ke = (e) => Ge && !We.includes(e) || void 0, Y = P === null ? void 0 : i[P], X = Y ? x[j(346)]((e, t) => ({
80
+ }), Ue = N ? P : null, We = I ? [R, Ue] : [Ue], Ge = We[j(197)]((e) => e !== null), Ke = (e) => Ge && !We.includes(e) || void 0, Y = P === null ? void 0 : n[P], X = Y ? b[j(201)]((e, t) => ({
81
81
  s: e,
82
- color: c(e.color, t),
83
- value: d(Y, e.key)
84
- }))[j(335)]((e) => e[j(332)] !== null) : [];
85
- _e === j(359) ? X[j(359)]() : _e === j(332) && X[j(378)]((e, t) => t[j(332)] - e.value);
86
- let qe = X.reduce((e, t) => e + t[j(332)], 0), Je = Y && P !== null ? (pe ?? D)(Y, P) : null, Z = me ? E(qe, x[0]) : void 0, Q = P === null ? 0 : K(P), Ye = Q + G + v + Ae.w > F ? Math[j(364)](0, Q - v - Ae.w) : Q + G + v, Xe = (e) => {
87
- let t = j, n = e.currentTarget[t(334)]();
88
- return Math[t(373)](M - 1, Math[t(364)](0, Math[t(367)]((e[t(355)] - n[t(323)]) / n[t(387)] * M)));
82
+ color: l(e[j(198)], t),
83
+ value: f(Y, e[j(234)])
84
+ })).filter((e) => e.value !== null) : [];
85
+ ve === "reverse" ? X.reverse() : ve === j(196) && X[j(205)]((e, t) => t[j(196)] - e[j(196)]);
86
+ let qe = X[j(185)]((e, t) => e + t.value, 0), Je = Y && P !== null ? (me ?? E)(Y, P) : null, Z = he ? T(qe, b[0]) : void 0, Q = P === null ? 0 : K(P), Ye = Q + G + _ + Ae.w > F ? Math.max(0, Q - _ - Ae.w) : Q + G + _, Xe = (e) => {
87
+ let t = j, n = e[t(240)][t(238)]();
88
+ return Math.min(M - 1, Math.max(0, Math[t(241)]((e.clientX - n[t(228)]) / n.width * M)));
89
89
  }, Ze = (e) => je(Xe(e)), $ = (e) => {
90
90
  I && e !== R && Pe(e);
91
91
  }, Qe = (e) => {
92
92
  let t = j;
93
- I && De !== null && (e[t(377)] === t(375) || e[t(377)] === " ") ? (e[t(386)](), $(De)) : Ne.onKeyDown(e);
94
- }, $e = N && Y ? "" + (Y[b] ?? "") + (P === R ? j(363) : "") + ": " + X[j(346)]((e) => e.s.label + " " + E(e[j(332)], e.s)).join(", ") : "";
93
+ I && De !== null && (e[t(234)] === t(243) || e[t(234)] === " ") ? (e.preventDefault(), $(De)) : Ne[t(189)](e);
94
+ }, $e = N && Y ? "" + (Y[y] ?? "") + (P === R ? " (선택됨)" : "") + ": " + X[j(201)]((e) => e.s[j(214)] + " " + T(e.value, e.s))[j(225)](", ") : "";
95
95
  return h(t, {
96
96
  gap: 3,
97
- className: r(j(382), j(338), Te),
97
+ className: i(j(202), j(184), Te),
98
98
  style: Ee,
99
- children: [h(j(357), {
99
+ children: [h(j(217), {
100
100
  ...Ne,
101
101
  onKeyDown: Qe,
102
- className: j(322),
103
- style: { height: S },
104
- "aria-roledescription": j(371),
102
+ className: j(208),
103
+ style: { height: x },
104
+ "aria-roledescription": j(182),
105
105
  "aria-label": we,
106
- "aria-describedby": Ie + j(337),
106
+ "aria-describedby": Ie + j(191),
107
107
  children: [
108
- F > 0 && h(j(379), {
109
- className: j(325),
108
+ F > 0 && h("svg", {
109
+ className: j(220),
110
110
  width: F,
111
- height: S,
111
+ height: x,
112
112
  "aria-hidden": !0,
113
113
  children: [
114
- m(j(366), {
115
- className: j(348),
116
- "data-state": N ? "open" : j(354),
114
+ m(j(183), {
115
+ className: j(213),
116
+ "data-state": j(N ? 207 : 226),
117
117
  x: 0,
118
118
  y: 4,
119
119
  width: G,
120
120
  height: U + 4,
121
121
  rx: 8,
122
- style: { transform: j(341) + Q + j(368) }
122
+ style: { transform: j(219) + Q + j(218) }
123
123
  }),
124
- B[j(346)]((e) => h("g", { children: [m(j(350), {
124
+ B[j(201)]((e) => h("g", { children: [m(j(190), {
125
125
  className: "ds-chart__grid",
126
126
  x1: H,
127
127
  x2: H + V,
128
128
  y1: W - q(e),
129
129
  y2: W - q(e)
130
- }), m(j(360), {
131
- className: "ds-chart__axis",
132
- x: T === j(347) ? F : 0,
130
+ }), m(j(233), {
131
+ className: j(230),
132
+ x: w === j(187) ? F : 0,
133
133
  y: W - q(e),
134
- dominantBaseline: j(326),
135
- textAnchor: T === j(347) ? j(384) : j(358),
136
- children: fe(e)
134
+ dominantBaseline: j(192),
135
+ textAnchor: j(w === "right" ? 188 : 242),
136
+ children: pe(e)
137
137
  })] }, e)),
138
- !O && i[j(346)]((e, t) => t % Be === 0 ? m(j(360), {
139
- className: j(356),
138
+ !D && n.map((e, t) => t % Be === 0 ? m(j(233), {
139
+ className: j(200),
140
140
  "data-selected": t === R || void 0,
141
141
  x: K(t) + G / 2,
142
- y: S - 6,
143
- textAnchor: j(326),
144
- children: D(e, t)
142
+ y: x - 6,
143
+ textAnchor: j(192),
144
+ children: E(e, t)
145
145
  }, t) : null),
146
146
  m("g", {
147
- className: "ds-bar-chart__bars",
147
+ className: j(212),
148
148
  style: { transformOrigin: "0 " + W + "px" },
149
- children: He[j(346)]((e) => m("path", {
150
- className: j(362),
149
+ children: He[j(201)]((e) => m(j(215), {
150
+ className: "ds-bar-chart__bar",
151
151
  d: e.d,
152
- fill: c(e.s[j(370)], e.j),
152
+ fill: l(e.s.color, e.j),
153
153
  "data-faded": Ke(e.i),
154
- "data-dimmed": z !== null && z !== e.s[j(377)] || void 0
155
- }, e[j(377)]))
154
+ "data-dimmed": z !== null && z !== e.s[j(234)] || void 0
155
+ }, e.key))
156
156
  }),
157
- m(j(366), {
158
- className: j(324),
157
+ m("rect", {
158
+ className: j(206),
159
159
  "data-selectable": I || void 0,
160
160
  x: H,
161
161
  y: 0,
162
162
  width: V,
163
- height: S,
163
+ height: x,
164
164
  onPointerMove: Ze,
165
165
  onPointerDown: Ze,
166
166
  onPointerLeave: Me,
@@ -168,76 +168,76 @@ function b({ data: i, xKey: b, series: x, height: S = 240, stacked: C, segmentGa
168
168
  })
169
169
  ]
170
170
  }),
171
- F > 0 && O && m(j(357), {
172
- className: j(331),
171
+ F > 0 && D && m(j(217), {
172
+ className: j(210),
173
173
  style: { top: W + 6 },
174
174
  "aria-hidden": !0,
175
- children: i[j(346)]((e, t) => {
175
+ children: n[j(201)]((e, t) => {
176
176
  let n = j;
177
177
  if (t % Be !== 0 && t !== R) return null;
178
- let r = h(ae, { children: [O(e, t), m("span", {
179
- className: n(349),
180
- children: m(n(333), { children: D(e, t) })
178
+ let r = h(oe, { children: [D(e, t), m(n(216), {
179
+ className: n(195),
180
+ children: m(n(216), { children: E(e, t) })
181
181
  })] }), i = {
182
- className: "ds-bar-chart__tick",
182
+ className: n(221),
183
183
  "data-selected": t === R || void 0,
184
184
  style: { left: K(t) + G / 2 },
185
185
  onPointerEnter: () => je(t),
186
186
  onPointerLeave: Me
187
187
  };
188
- return I ? m(n(343), {
189
- type: "button",
188
+ return I ? m(n(203), {
189
+ type: n(203),
190
190
  tabIndex: -1,
191
191
  ...i,
192
192
  onClick: () => $(t),
193
193
  children: r
194
- }, t) : m(n(333), {
194
+ }, t) : m("span", {
195
195
  ...i,
196
196
  children: r
197
197
  }, t);
198
198
  })
199
199
  }),
200
- m(j(357), {
200
+ m(j(217), {
201
201
  ref: ke,
202
- className: "ds-chart__tip",
203
- "data-state": j(N ? 353 : 354),
202
+ className: j(239),
203
+ "data-state": j(N ? 207 : 226),
204
204
  "data-settled": Oe || void 0,
205
- style: { transform: j(321) + Ye + j(336) + _ + j(368) },
205
+ style: { transform: j(229) + Ye + j(236) + g + j(218) },
206
206
  "aria-hidden": !0,
207
207
  children: m(o, {
208
- leading: Y && P !== null ? ge?.(Y, P) : void 0,
208
+ leading: Y && P !== null ? _e?.(Y, P) : void 0,
209
209
  title: Je,
210
- value: he === j(369) ? Z : void 0,
211
- rows: X.map((e) => ({
212
- key: e.s[j(377)],
213
- label: e.s[j(328)],
214
- color: e[j(370)],
215
- value: E(e[j(332)], e.s)
210
+ value: ge === "header" ? Z : void 0,
211
+ rows: X[j(201)]((e) => ({
212
+ key: e.s.key,
213
+ label: e.s[j(214)],
214
+ color: e[j(198)],
215
+ value: T(e[j(196)], e.s)
216
216
  })),
217
- footer: Z !== void 0 && he === "footer" ? {
218
- key: j(330),
217
+ footer: Z !== void 0 && ge === j(204) ? {
218
+ key: j(211),
219
219
  label: "합계",
220
220
  color: "",
221
221
  value: Z
222
222
  } : void 0
223
223
  })
224
224
  }),
225
- m(j(333), {
226
- id: Ie + "-live",
227
- className: j(376),
228
- "aria-live": j(365),
225
+ m(j(216), {
226
+ id: Ie + j(191),
227
+ className: j(244),
228
+ "aria-live": j(246),
229
229
  children: $e
230
230
  })
231
231
  ]
232
- }), ve && m(a, {
233
- items: x[j(346)]((e, t) => ({
234
- key: e.key,
235
- label: e[j(328)],
236
- color: c(e.color, t)
232
+ }), ye && m(a, {
233
+ items: b[j(201)]((e, t) => ({
234
+ key: e[j(234)],
235
+ label: e[j(214)],
236
+ color: l(e[j(198)], t)
237
237
  })),
238
238
  focused: z,
239
239
  onFocusChange: Fe
240
240
  })]
241
241
  });
242
242
  }
243
- export { b as BarChart };
243
+ export { y as BarChart };