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