@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,49 +1,43 @@
1
1
  "use client";
2
2
  const e = t;
3
- function t(e, n) {
4
- e -= 270;
5
- let r = c(), i = r[e];
6
- t.wndfKh === void 0 && (t.IPkEYz = 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.ykZajE = {}, t.wndfKh = !0);
12
- let a = r[0];
13
- t.DzlMYd !== a && (t.ykZajE = {}, t.DzlMYd = a);
14
- let o = t.ykZajE[e];
15
- return o === void 0 ? (i = t.IPkEYz(i), t.ykZajE[e] = i) : i = o, i;
16
- }
17
3
  (function(e, n) {
18
4
  let r = t, i = e();
19
5
  for (;;) try {
20
- if (parseInt(r(314)) / 1 + parseInt(r(327)) / 2 + parseInt(r(341)) / 3 + parseInt(r(279)) / 4 * (-parseInt(r(313)) / 5) + parseInt(r(294)) / 6 + parseInt(r(290)) / 7 + -parseInt(r(356)) / 8 * (parseInt(r(270)) / 9) == n) break;
6
+ if (-parseInt(r(171)) / 1 * (-parseInt(r(168)) / 2) + -parseInt(r(182)) / 3 * (parseInt(r(180)) / 4) + -parseInt(r(165)) / 5 + parseInt(r(124)) / 6 * (parseInt(r(200)) / 7) + -parseInt(r(162)) / 8 + parseInt(r(113)) / 9 + parseInt(r(183)) / 10 * (parseInt(r(184)) / 11) == n) break;
21
7
  i.push(i.shift());
22
8
  } catch {
23
9
  i.push(i.shift());
24
10
  }
25
- })(c, 199563);
11
+ })(g, 812195);
12
+ function t(e, n) {
13
+ e -= 113;
14
+ let r = g(), i = r[e];
15
+ t.pxvRdG === void 0 && (t.goqMlC = function(e) {
16
+ let t = "", n = "";
17
+ 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);
18
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
19
+ return decodeURIComponent(n);
20
+ }, t.YIYaTi = {}, t.pxvRdG = !0);
21
+ let a = r[0];
22
+ t.mfNFRx !== a && (t.YIYaTi = {}, t.mfNFRx = a);
23
+ let o = t.YIYaTi[e];
24
+ return o === void 0 ? (i = t.goqMlC(i), t.YIYaTi[e] = i) : i = o, i;
25
+ }
26
26
  import { Text as n } from "../../primitives/Typography2.js";
27
27
  import { ColorDot as r } from "../../primitives/ColorDot2.js";
28
28
  import { Inline as i, Stack as a } from "../../primitives/Layout2.js";
29
29
  import { useControllableState as o } from "../../hooks/useControllableState.js";
30
30
  import { cx as s } from "../../primitives/index.js";
31
- function c() {
32
- let e = /* @__PURE__ */ "C2XVCgu.zMLYC3q.zhmTy2HHCNq.zMLSDgvY.Dgv4Da.zgvMCW.BwLU.C3fYDa.Aw5KzxG.Bwf4.z2v0.ChGSia.zw5K.ndaYnJbSBfjLr1K.nde0mZHIy1Dst0K.C2vJB25Kyxj5.zhmTy2HHCNrFx2f4Axm.z2v0qM91BMrPBMDdBgLLBNrszwn0.AgfZ.zM9YrwfJAa.BgfIzwW.BMv1DhjHBa.zhmTC2nHDhrLCI1JAgfYDf9FCg9W.B3bLBG.y2XPzw50wa.C3bHBG.x19HBgW.nZm1ntC0BLHJvw1m.y2f0zwDVCNK.7ikW7kcq64+e.lwXPDMu.AhLWB3q.BgvUz3rO.zhmTC2nHDhrLCI1JAgfYDf9FCg9PBNrZ.y2f0.DxjSkcm.DgvYDgLHCNK.DhjHBNnSyxrLka.A2v5.ChvZAa.y29SB3i.nZm4mZq4sNzKtLfi.DMfYkc0Ty2HHCNqTyxHPCYK.DMfSDwu.zhmTC2nHDhrLCI1JAgfYDa.lwnSAxa.CM93.zgL2.C3rHCNq.ChGP.Cgf0Aa.zhmTC2nHDhrLCI1JAgfYDf9FCg9PBNq.BwfW.lwnSAxaP.zhmTy2HHCNrFx3rPCa.yxHPCW.mteXnZe2mgD2D2ziCG.ndvOBuTRqxG.zhmTy2HHCNrFx2DYAwq.zhmTy2HHCNrFx2HPDa.y2LYy2XL.yM9KEs1ZBq.y2XPCfbHDgG.DhjHBNnSyxrLwsG.CMvJDa.BwLKzgXL.mJr0BLber1y.y2XVC2vK.zhmTy2HHCNrFx3bSB3q.Dg9Uzq.DhjHBNnSyxrLwcG.Aw5JBhvKzxm.zhmTy2HHCNrFx3nY.y3vYCMvUDa.zhmTC2nHDhrLCI1JAgfYDf9FCMvM.zhmTC2nHDhrLCI1JAgfYDf9Fywn0AxzL.zMXHDe1HCa.mteXmJq4mLbWv0jNAW.zhmTy2HHCNrFx2f4AxmGzhmTC2nHDhrLCI1JAgfYDf9FDgL0Bgu.AM9PBG.Aw50zxjJzxb0.nZKWotK4ugXOwevs.C29SAwq.BgLUzq.C3zN.Dg9W.yNv0Dg9U".split(".");
33
- return c = function() {
34
- return e;
35
- }, c();
36
- }
37
- import { ChartTooltip as ee } from "../Chart/ChartParts.js";
38
- import { CHART_TONE_STRONG as te, axisGutter as ne, chartColor as l, formatCompact as re, formatNumber as u, labelStep as ie, numberAt as d } from "../Chart/chart2.js";
31
+ import { ChartTooltip as c } from "../Chart/ChartParts.js";
32
+ import { CHART_TONE_STRONG as ee, axisGutter as te, chartColor as ne, formatCompact as re, formatNumber as l, labelStep as ie, numberAt as u } from "../Chart/chart2.js";
39
33
  import { useChartInteraction as ae } from "../Chart/useChartInteraction.js";
40
34
  import { linearRegression as oe, niceRangeTicks as se } from "./scatter.js";
41
35
  /* empty css */
42
- import { useId as ce, useMemo as f, useRef as le, useState as ue } from "react";
43
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
44
- var de = 12, h = 10, fe = 28, pe = 14, me = 560, he = [];
45
- function g({ data: c, xKey: g, yKey: _, sizeKey: v, categoryKey: y, categories: b, labelKey: x, height: S = 280, xLabel: C, yLabel: w, sizeLabel: ge, xTickCount: _e = 5, yTickCount: ve = 4, xDomain: ye, yDomain: be, sizeRange: xe = [4, 22], pointRadius: Se = 5, trendLine: Ce = !1, referenceLines: T, formatX: we = u, formatY: Te = u, formatSize: Ee = u, formatAxisX: De = re, formatAxisY: Oe = re, legend: ke = !0, hiddenCategories: Ae, defaultHiddenCategories: je = he, onHiddenCategoriesChange: Me, activeIndex: Ne, defaultActiveIndex: Pe, onActiveIndexChange: Fe, "aria-label": Ie = e(329), className: Le, style: Re }) {
46
- let E = e, D = ce(), [O, ze] = o(Ae, je, Me), k = new Set(O), [A, j] = ue(null), M = f(() => {
36
+ import { useId as ce, useMemo as d, useRef as le, useState as ue } from "react";
37
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
38
+ var de = 12, m = 10, fe = 28, pe = 14, me = 560, he = [];
39
+ function h({ data: h, xKey: g, yKey: _, sizeKey: v, categoryKey: y, categories: b, labelKey: x, height: S = 280, xLabel: C, yLabel: w, sizeLabel: ge, xTickCount: _e = 5, yTickCount: ve = 4, xDomain: T, yDomain: E, sizeRange: ye = [4, 22], pointRadius: be = 5, trendLine: xe = !1, referenceLines: D, formatX: Se = l, formatY: Ce = l, formatSize: we = l, formatAxisX: Te = re, formatAxisY: Ee = re, legend: De = !0, hiddenCategories: Oe, defaultHiddenCategories: ke = he, onHiddenCategoriesChange: Ae, activeIndex: je, defaultActiveIndex: Me, onActiveIndexChange: Ne, "aria-label": Pe = e(122), className: Fe, style: Ie }) {
40
+ let O = e, k = ce(), [A, Le] = o(Oe, ke, Ae), j = new Set(A), [M, N] = ue(null), P = d(() => {
47
41
  let e = t;
48
42
  if (b) return b;
49
43
  if (!y) return [{
@@ -51,249 +45,250 @@ function g({ data: c, xKey: g, yKey: _, sizeKey: v, categoryKey: y, categories:
51
45
  label: w ?? _
52
46
  }];
53
47
  let n = [];
54
- for (let t of c) {
48
+ for (let t of h) {
55
49
  let r = String(t[y] ?? "");
56
- n[e(284)](r) || n[e(339)](r);
50
+ n[e(167)](r) || n[e(138)](r);
57
51
  }
58
- return n[e(352)]((e) => ({
52
+ return n[e(151)]((e) => ({
59
53
  key: e,
60
54
  label: e
61
55
  }));
62
56
  }, [
63
57
  b,
64
58
  y,
65
- c,
59
+ h,
66
60
  w,
67
61
  _
68
- ]), N = f(() => {
69
- let e = t, n = new Map(M[e(352)]((t, n) => [t[e(338)], n]));
70
- return c[e(289)]((t, r) => {
71
- let i = e, a = d(t, g), o = d(t, _);
62
+ ]), F = d(() => {
63
+ let e = t, n = new Map(P[e(151)]((t, n) => [t[e(133)], n]));
64
+ return h[e(116)]((t, r) => {
65
+ let i = e, a = u(t, g), o = u(t, _);
72
66
  if (a === null || o === null) return [];
73
- let s = y ? String(t[y] ?? "") : "", c = n[i(310)](s);
67
+ let s = y ? String(t[y] ?? "") : "", c = n[i(181)](s);
74
68
  return c === void 0 ? [] : [{
75
69
  index: r,
76
70
  row: t,
77
71
  x: a,
78
72
  y: o,
79
- s: v ? d(t, v) : null,
73
+ s: v ? u(t, v) : null,
80
74
  cat: s,
81
75
  ci: c
82
76
  }];
83
- }).sort((e, t) => e.x - t.x || e.y - t.y);
77
+ })[e(120)]((e, t) => e.x - t.x || e.y - t.y);
84
78
  }, [
85
- c,
79
+ h,
86
80
  g,
87
81
  _,
88
82
  v,
89
83
  y,
90
- M
91
- ]), Be = N[E(303)]((e) => !k[E(318)](e[E(334)])).length, { open: Ve, shown: He, settled: Ue, width: P, tipRef: We, tipSize: F, hover: Ge, leave: Ke, plotProps: qe } = ae({
92
- count: Be,
93
- activeIndex: Ne,
94
- defaultActiveIndex: Pe,
95
- onActiveIndexChange: Fe,
96
- initialKeyboardIndex: E(301)
97
- }), I = f(() => {
98
- let e = E, t = [...N[e(352)]((e) => e.x), ...T?.filter((t) => t[e(355)] === "x")[e(352)]((t) => t[e(343)]) ?? []], [n, r] = ye ?? (t.length ? [Math[e(306)](...t), Math[e(309)](...t)] : [0, 1]);
99
- return se(n, r, _e, !ye);
84
+ P
85
+ ]), Re = F[O(174)]((e) => !j[O(146)](e.cat))[O(198)], { open: ze, shown: Be, settled: Ve, width: I, tipRef: He, tipSize: L, hover: Ue, leave: We, plotProps: Ge } = ae({
86
+ count: Re,
87
+ activeIndex: je,
88
+ defaultActiveIndex: Me,
89
+ onActiveIndexChange: Ne,
90
+ initialKeyboardIndex: O(158)
91
+ }), R = d(() => {
92
+ let e = O, t = [...F.map((e) => e.x), ...D?.[e(174)]((e) => e.axis === "x").map((t) => t[e(179)]) ?? []], [n, r] = T ?? (t.length ? [Math[e(117)](...t), Math.max(...t)] : [0, 1]);
93
+ return se(n, r, _e, !T);
100
94
  }, [
101
- N,
95
+ F,
96
+ D,
102
97
  T,
103
- ye,
104
98
  _e
105
- ]), L = f(() => {
106
- let e = E, t = [...N[e(352)]((e) => e.y), ...T?.[e(303)]((t) => t[e(355)] === "y")[e(352)]((t) => t[e(343)]) ?? []], [n, r] = be ?? (t[e(332)] ? [Math[e(306)](...t), Math[e(309)](...t)] : [0, 1]);
107
- return se(n, r, ve, !be);
99
+ ]), z = d(() => {
100
+ let e = O, t = [...F[e(151)]((e) => e.y), ...D?.[e(174)]((e) => e.axis === "y").map((t) => t[e(179)]) ?? []], [n, r] = E ?? (t[e(198)] ? [Math.min(...t), Math[e(164)](...t)] : [0, 1]);
101
+ return se(n, r, ve, !E);
108
102
  }, [
109
- N,
110
- T,
111
- be,
103
+ F,
104
+ D,
105
+ E,
112
106
  ve
113
- ]), Je = Math[E(309)](0, ...N[E(352)]((e) => e.s ?? 0)), R = w ? 28 : 10, Ye = 28 + (C ? 20 : 0), Xe = ne(L[E(352)](Oe)), z = Xe, B = Math[E(309)](0, P - Xe - de), V = Math[E(309)](0, S - R - Ye), H = R + V, [U, W] = [I[0], I[I[E(332)] - 1]], [Ze, Qe] = [L[0], L[L[E(332)] - 1]], G = (e) => z + (e - U) / (W - U || 1) * B, K = (e) => H - (e - Ze) / (Qe - Ze || 1) * V, $e = (e) => v && e !== null && Je > 0 ? Math[E(309)](xe[0], xe[1] * Math[E(307)](Math.max(0, e) / Je)) : Se, et = ie(I[E(332)], B, 64), q = N[E(352)]((e) => ({
107
+ ]), Ke = Math[O(164)](0, ...F[O(151)]((e) => e.s ?? 0)), B = w ? 28 : 10, qe = 28 + (C ? 20 : 0), Je = te(z.map(Ee)), V = Je, H = Math[O(164)](0, I - Je - de), U = Math[O(164)](0, S - B - qe), W = B + U, [G, Ye] = [R[0], R[R.length - 1]], [Xe, Ze] = [z[0], z[z[O(198)] - 1]], K = (e) => V + (e - G) / (Ye - G || 1) * H, q = (e) => W - (e - Xe) / (Ze - Xe || 1) * U, Qe = (e) => v && e !== null && Ke > 0 ? Math[O(164)](ye[0], ye[1] * Math.sqrt(Math.max(0, e) / Ke)) : be, $e = ie(R[O(198)], H, 64), et = F.map((e) => ({
114
108
  ...e,
115
- cx: G(e.x),
116
- cy: K(e.y),
117
- r: $e(e.s),
118
- color: l(M[e.ci][E(340)], e.ci)
119
- })), tt = q.filter((e) => !k.has(e[E(334)])), J = He === null ? void 0 : tt[He], Y = Ve && J !== void 0, nt = (e) => {
120
- let t = E, n = oe(e);
121
- return n ? "M" + G(U) + "," + K(n[t(293)] + n.slope * U) + "L" + G(W) + "," + K(n[t(293)] + n[t(300)] * W) : null;
122
- }, rt = Ce === E(328) ? M[E(352)]((e, t) => ({
123
- key: e.key,
124
- d: nt(q[E(303)]((t) => t[E(334)] === e[E(338)])),
125
- color: l(e[E(340)], t),
126
- off: k[E(318)](e[E(338)])
127
- })) : Ce ? [{
128
- key: E(326),
109
+ cx: K(e.x),
110
+ cy: q(e.y),
111
+ r: Qe(e.s),
112
+ color: ne(P[e.ci][O(139)], e.ci)
113
+ })), tt = et.filter((e) => !j[O(146)](e[O(147)])), J = Be === null ? void 0 : tt[Be], Y = ze && J !== void 0, nt = (e) => {
114
+ let t = O, n = oe(e);
115
+ return n ? "M" + K(G) + "," + q(n[t(155)] + n[t(160)] * G) + "L" + K(Ye) + "," + q(n[t(155)] + n[t(160)] * Ye) : null;
116
+ }, rt = xe === O(137) ? P[O(151)]((e, t) => ({
117
+ key: e[O(133)],
118
+ d: nt(et.filter((t) => t.cat === e[O(133)])),
119
+ color: ne(e.color, t),
120
+ off: j.has(e.key)
121
+ })) : xe ? [{
122
+ key: O(143),
129
123
  d: nt(tt),
130
- color: E(342),
124
+ color: O(134),
131
125
  off: !1
132
126
  }] : [], X = le(!1), it = (e) => {
133
- let t = E, n = e.currentTarget[t(317)](), r = e[t(324)] - n.left, i = e.clientY - n[t(298)], a = -1, o = Infinity;
134
- tt[t(319)]((e, n) => {
135
- let s = Math[t(331)](e.cx - r, e.cy - i) - e.r;
127
+ let t = O, n = e.currentTarget[t(191)](), r = e[t(125)] - n[t(141)], i = e[t(129)] - n[t(152)], a = -1, o = Infinity;
128
+ tt.forEach((e, n) => {
129
+ let s = Math[t(177)](e.cx - r, e.cy - i) - e.r;
136
130
  s < o && (o = s, a = n);
137
- }), a >= 0 && o <= fe ? (X[t(286)] = !0, Ge(a)) : X[t(286)] && (X[t(286)] = !1, Ke());
131
+ }), a >= 0 && o <= fe ? (X[t(118)] = !0, Ue(a)) : X[t(118)] && (X[t(118)] = !1, We());
138
132
  }, at = () => {
139
- X.current = !1, Ke();
133
+ let e = O;
134
+ X[e(118)] = !1, We();
140
135
  }, ot = (e) => {
141
- let t = E, n = k[t(318)](e);
142
- !n && A === e && j(null), ze(n ? O[t(303)]((t) => t !== e) : [...O, e]);
143
- }, Z = J ? M[J.ci] : void 0, st = C ?? g, ct = w ?? _, lt = ge ?? v ?? "", ut = J ? x ? String(J[E(346)][x] ?? "") : Z?.[E(320)] : null, dt = J ? [
136
+ let t = j.has(e);
137
+ !t && M === e && N(null), Le(t ? A.filter((t) => t !== e) : [...A, e]);
138
+ }, Z = J ? P[J.ci] : void 0, st = C ?? g, ct = w ?? _, lt = ge ?? v ?? "", ut = J ? x ? String(J.row[x] ?? "") : Z?.[O(128)] : null, dt = J ? [
144
139
  {
145
140
  key: "x",
146
141
  label: st,
147
- color: J.color,
148
- value: we(J.x, J.row)
142
+ color: J[O(139)],
143
+ value: Se(J.x, J[O(126)])
149
144
  },
150
145
  {
151
146
  key: "y",
152
147
  label: ct,
153
- color: J.color,
154
- value: Te(J.y, J[E(346)])
148
+ color: J[O(139)],
149
+ value: Ce(J.y, J[O(126)])
155
150
  },
156
151
  ...v && J.s !== null ? [{
157
152
  key: "size",
158
153
  label: lt,
159
- color: J[E(340)],
160
- value: Ee(J.s, J[E(346)])
154
+ color: J[O(139)],
155
+ value: we(J.s, J.row)
161
156
  }] : []
162
- ] : [], Q = J?.cx ?? 0, ft = J?.cy ?? 0, $ = J?.r ?? 0, pt = Q + $ + h + F.w > P ? Math.max(0, Q - $ - h - F.w) : Q + $ + h, mt = Math[E(306)](Math[E(309)](0, ft - F.h / 2), Math[E(309)](0, S - F.h)), ht = Y && J ? "" + (ut ?? "") + (x && y && Z ? " (" + Z[E(320)] + ")" : "") + ": " + dt.map((e) => e[E(320)] + " " + e[E(343)])[E(292)](", ") : "", gt = E(335) + D + E(353);
163
- return m(a, {
157
+ ] : [], Q = J?.cx ?? 0, ft = J?.cy ?? 0, $ = J?.r ?? 0, pt = Q + $ + m + L.w > I ? Math[O(164)](0, Q - $ - m - L.w) : Q + $ + m, mt = Math[O(117)](Math[O(164)](0, ft - L.h / 2), Math[O(164)](0, S - L.h)), ht = Y && J ? "" + (ut ?? "") + (x && y && Z ? " (" + Z[O(128)] + ")" : "") + ": " + dt[O(151)]((e) => e[O(128)] + " " + e[O(179)])[O(178)](", ") : "", gt = O(121) + k + O(153);
158
+ return p(a, {
164
159
  gap: 3,
165
- className: s(E(302), E(344), Le),
166
- style: Re,
167
- children: [m(E(347), {
168
- ...qe,
169
- className: E(281),
160
+ className: s("ds-chart", O(127), Fe),
161
+ style: Ie,
162
+ children: [p(O(154), {
163
+ ...Ge,
164
+ className: O(156),
170
165
  style: { height: S },
171
- "aria-roledescription": E(329),
172
- "aria-label": Ie,
173
- "aria-describedby": D + E(330),
166
+ "aria-roledescription": O(122),
167
+ "aria-label": Pe,
168
+ "aria-describedby": k + O(188),
174
169
  children: [
175
- P > 0 && m(E(297), {
176
- className: "ds-chart__svg",
177
- width: P,
170
+ I > 0 && p(O(130), {
171
+ className: O(195),
172
+ width: I,
178
173
  height: S,
179
174
  "aria-hidden": !0,
180
175
  children: [
181
- p(E(305), { children: p(E(275), {
182
- id: D + E(345),
183
- children: p("rect", {
184
- x: z,
185
- y: R,
186
- width: B,
187
- height: V
176
+ f("defs", { children: f(O(185), {
177
+ id: k + "-clip",
178
+ children: f(O(115), {
179
+ x: V,
180
+ y: B,
181
+ width: H,
182
+ height: U
188
183
  })
189
184
  }) }),
190
- w && p("text", {
191
- className: E(291),
185
+ w && f(O(123), {
186
+ className: O(169),
192
187
  x: 0,
193
188
  y: 12,
194
- dominantBaseline: E(278),
189
+ dominantBaseline: "middle",
195
190
  children: w
196
191
  }),
197
- C && p(E(304), {
198
- className: E(291),
199
- x: z + B,
192
+ C && f(O(123), {
193
+ className: O(169),
194
+ x: V + H,
200
195
  y: S - 4,
201
- textAnchor: E(312),
196
+ textAnchor: O(114),
202
197
  children: C
203
198
  }),
204
- L.map((e) => m("g", { children: [p(E(296), {
205
- className: E(271),
206
- x1: z,
207
- x2: z + B,
208
- y1: K(e),
209
- y2: K(e)
210
- }), p(E(304), {
211
- className: E(316),
199
+ z[O(151)]((e) => p("g", { children: [f("line", {
200
+ className: "ds-chart__grid",
201
+ x1: V,
202
+ x2: V + H,
203
+ y1: q(e),
204
+ y2: q(e)
205
+ }), f("text", {
206
+ className: O(170),
212
207
  x: 0,
213
- y: K(e),
214
- dominantBaseline: E(278),
215
- children: Oe(e)
208
+ y: q(e),
209
+ dominantBaseline: O(161),
210
+ children: Ee(e)
216
211
  })] }, e)),
217
- I[E(352)]((e, t) => t % et === 0 || t === I[E(332)] - 1 ? p(E(304), {
218
- className: "ds-chart__axis",
219
- x: G(e),
220
- y: H + 20,
221
- textAnchor: t === I[E(332)] - 1 ? "end" : E(278),
222
- children: De(e)
212
+ R[O(151)]((e, t) => t % $e === 0 || t === R.length - 1 ? f("text", {
213
+ className: O(170),
214
+ x: K(e),
215
+ y: W + 20,
216
+ textAnchor: t === R[O(198)] - 1 ? O(114) : O(161),
217
+ children: Te(e)
223
218
  }, e) : null),
224
- T?.[E(352)]((e, t) => {
225
- let n = E, r = te[e[n(282)] ?? n(321)], i = e[n(355)] === "y";
226
- return m("g", {
227
- className: n(287),
228
- style: { transform: i ? n(276) + K(e[n(343)]) + n(349) : n(283) + G(e[n(343)]) + n(349) },
229
- children: [i ? p(n(296), {
230
- x1: z,
231
- x2: z + B,
219
+ D?.[O(151)]((e, t) => {
220
+ let n = O, r = ee[e[n(159)] ?? n(194)], i = e[n(163)] === "y";
221
+ return p("g", {
222
+ className: n(186),
223
+ style: { transform: i ? n(142) + q(e[n(179)]) + n(157) : n(149) + K(e.value) + n(157) },
224
+ children: [i ? f(n(193), {
225
+ x1: V,
226
+ x2: V + H,
232
227
  y1: 0,
233
228
  y2: 0,
234
229
  style: { stroke: r }
235
- }) : p(n(296), {
230
+ }) : f(n(193), {
236
231
  x1: 0,
237
232
  x2: 0,
238
- y1: R,
239
- y2: H,
233
+ y1: B,
234
+ y2: W,
240
235
  style: { stroke: r }
241
- }), e[n(320)] && p(n(304), {
242
- className: n(316),
243
- x: i ? z + B : 5,
244
- y: i ? -5 : R + 10,
245
- textAnchor: n(i ? 312 : 348),
236
+ }), e[n(128)] && f(n(123), {
237
+ className: "ds-chart__axis",
238
+ x: i ? V + H : 5,
239
+ y: i ? -5 : B + 10,
240
+ textAnchor: i ? n(114) : "start",
246
241
  style: { fill: r },
247
- children: e[n(320)]
242
+ children: e[n(128)]
248
243
  })]
249
244
  }, t);
250
245
  }),
251
- rt[E(332)] > 0 && p("g", {
246
+ rt[O(198)] > 0 && f("g", {
252
247
  clipPath: gt,
253
- children: rt[E(352)]((e) => e.d ? p(E(350), {
254
- className: "ds-scatter-chart__trend",
248
+ children: rt[O(151)]((e) => e.d ? f("path", {
249
+ className: O(197),
255
250
  d: e.d,
256
- style: { stroke: e[E(340)] },
257
- "data-hidden": e.off || void 0
258
- }, e[E(338)]) : null)
251
+ style: { stroke: e.color },
252
+ "data-hidden": e[O(119)] || void 0
253
+ }, e[O(133)]) : null)
259
254
  }),
260
- p("g", {
261
- className: E(333),
262
- children: q[E(352)]((e, t) => {
263
- let n = E, r = k[n(318)](e[n(334)]), i = !r && (Y && J?.[n(308)] !== e[n(308)] || A !== null && A !== e[n(334)]);
264
- return p("g", {
265
- className: n(351),
255
+ f("g", {
256
+ className: O(145),
257
+ children: et[O(151)]((e, t) => {
258
+ let n = O, r = j[n(146)](e[n(147)]), i = !r && (Y && J?.[n(150)] !== e[n(150)] || M !== null && M !== e.cat);
259
+ return f("g", {
260
+ className: n(189),
266
261
  "data-hidden": r || void 0,
267
262
  "data-dimmed": i || void 0,
268
- style: { transform: n(337) + e.cx + n(311) + e.cy + n(349) },
269
- children: p("g", {
270
- className: n(322),
271
- style: { animationDelay: Math.min(t * pe, me) + "ms" },
272
- children: p("circle", {
273
- className: "ds-scatter-chart__dot",
263
+ style: { transform: n(199) + e.cx + n(131) + e.cy + n(157) },
264
+ children: f("g", {
265
+ className: "ds-scatter-chart__pop",
266
+ style: { animationDelay: Math[n(117)](t * pe, me) + "ms" },
267
+ children: f(n(148), {
268
+ className: n(190),
274
269
  r: e.r,
275
- fill: e.color,
270
+ fill: e[n(139)],
276
271
  "data-bubble": v ? "" : void 0
277
272
  })
278
273
  })
279
- }, e[n(308)]);
274
+ }, e[n(150)]);
280
275
  })
281
276
  }),
282
- p("g", {
283
- className: E(288),
284
- "data-state": Y ? E(323) : "closed",
285
- "data-settled": Ue || void 0,
286
- style: { transform: E(337) + Q + E(311) + ft + "px)" },
287
- children: p(E(273), {
277
+ f("g", {
278
+ className: O(176),
279
+ "data-state": O(Y ? 196 : 136),
280
+ "data-settled": Ve || void 0,
281
+ style: { transform: "translate(" + Q + O(131) + ft + "px)" },
282
+ children: f(O(148), {
288
283
  r: $ * 1.2 + 2,
289
- fill: J?.[E(340)] ?? "transparent"
284
+ fill: J?.[O(139)] ?? O(173)
290
285
  })
291
286
  }),
292
- p(E(277), {
293
- className: E(272),
287
+ f(O(115), {
288
+ className: O(172),
294
289
  x: 0,
295
290
  y: 0,
296
- width: P,
291
+ width: I,
297
292
  height: S,
298
293
  onPointerMove: it,
299
294
  onPointerDown: it,
@@ -301,55 +296,61 @@ function g({ data: c, xKey: g, yKey: _, sizeKey: v, categoryKey: y, categories:
301
296
  })
302
297
  ]
303
298
  }),
304
- p(E(347), {
305
- ref: We,
306
- className: E(354),
307
- "data-state": E(Y ? 323 : 280),
308
- "data-settled": Ue || void 0,
309
- style: { transform: E(337) + pt + "px, " + mt + E(349) },
299
+ f(O(154), {
300
+ ref: He,
301
+ className: O(175),
302
+ "data-state": O(Y ? 196 : 136),
303
+ "data-settled": Ve || void 0,
304
+ style: { transform: O(199) + pt + O(131) + mt + O(157) },
310
305
  "aria-hidden": !0,
311
- children: p(ee, {
306
+ children: f(c, {
312
307
  title: ut,
313
- value: x && y && Z ? p(n, {
314
- as: "span",
315
- variant: E(274),
316
- tone: E(315),
308
+ value: x && y && Z ? f(n, {
309
+ as: O(166),
310
+ variant: "body-sm",
311
+ tone: O(132),
317
312
  children: Z.label
318
313
  }) : void 0,
319
314
  rows: dt
320
315
  })
321
316
  }),
322
- p(E(325), {
323
- id: D + E(330),
324
- className: E(285),
325
- "aria-live": "polite",
317
+ f(O(166), {
318
+ id: k + O(188),
319
+ className: "ds-chart__sr",
320
+ "aria-live": O(140),
326
321
  children: ht
327
322
  })
328
323
  ]
329
- }), ke && y && p(i, {
324
+ }), De && y && f(i, {
330
325
  gap: 4,
331
- onPointerLeave: () => j(null),
332
- children: M[E(352)]((e, t) => {
333
- let i = E, a = k[i(318)](e[i(338)]);
334
- return m(i(299), {
335
- type: i(299),
326
+ onPointerLeave: () => N(null),
327
+ children: P[O(151)]((e, t) => {
328
+ let i = O, a = j[i(146)](e[i(133)]);
329
+ return p(i(135), {
330
+ type: i(135),
336
331
  className: "ds-scatter-chart__legend-item",
337
332
  "aria-pressed": !a,
338
333
  "data-off": a || void 0,
339
- onClick: () => ot(e[i(338)]),
340
- onPointerEnter: () => j(a ? null : e[i(338)]),
341
- children: [p(r, {
342
- color: l(e.color, t),
343
- variant: a ? "soft" : i(295)
344
- }), p(n, {
345
- as: i(325),
346
- variant: i(274),
347
- tone: a || A !== null && A !== e[i(338)] ? i(336) : "secondary",
348
- children: e[i(320)]
334
+ onClick: () => ot(e.key),
335
+ onPointerEnter: () => N(a ? null : e.key),
336
+ children: [f(r, {
337
+ color: ne(e[i(139)], t),
338
+ variant: i(a ? 144 : 187)
339
+ }), f(n, {
340
+ as: "span",
341
+ variant: i(192),
342
+ tone: a || M !== null && M !== e.key ? "tertiary" : i(132),
343
+ children: e.label
349
344
  })]
350
- }, e[i(338)]);
345
+ }, e.key);
351
346
  })
352
347
  })]
353
348
  });
354
349
  }
355
- export { g as ScatterChart };
350
+ function g() {
351
+ let e = /* @__PURE__ */ "BwLKzgXL.mtKWnZq4oe1Qr2ziBa.yxHPCW.Bwf4.ndu1nZvbwxjQt2W.C3bHBG.Aw5JBhvKzxm.otHyqwDyBxi.zhmTy2HHCNrFx2f4AxmGzhmTC2nHDhrLCI1JAgfYDf9FDgL0Bgu.zhmTy2HHCNrFx2f4Axm.ndKZn3nWEeziwa.zhmTy2HHCNrFx2HPDa.DhjHBNnWyxjLBNq.zMLSDgvY.zhmTy2HHCNrFx3rPCa.zhmTC2nHDhrLCI1JAgfYDf9Fywn0AxzL.AhLWB3q.AM9PBG.DMfSDwu.mJyYntGWmfvWuNrNuW.z2v0.nKzPEg1Iua.mtGXmfLoD25KzG.nZeXntL0s3v2qwu.y2XPCfbHDgG.zhmTC2nHDhrLCI1JAgfYDf9FCMvM.C29SAwq.lwXPDMu.zhmTC2nHDhrLCI1JAgfYDf9FCg9PBNq.zhmTC2nHDhrLCI1JAgfYDf9Fzg90.z2v0qM91BMrPBMDdBgLLBNrszwn0.yM9KEs1ZBq.BgLUzq.BMv1DhjHBa.zhmTy2HHCNrFx3n2zW.B3bLBG.zhmTC2nHDhrLCI1JAgfYDf9FDhjLBMq.BgvUz3rO.DhjHBNnSyxrLka.mtKYntK4wKvrqwLN.ntKXndCXmenXwfbYzq.zw5K.CMvJDa.zMXHDe1HCa.BwLU.y3vYCMvUDa.B2zM.C29YDa.DxjSkcm.7ikW7kcq64+e.Dgv4Da.nJzov0ToCvq.y2XPzw50wa.CM93.zhmTC2nHDhrLCI1JAgfYDa.BgfIzwW.y2XPzw50wq.C3zN.ChGSia.C2vJB25Kyxj5.A2v5.DMfYkc0Ty2HHCNqTyxHPCYK.yNv0Dg9U.y2XVC2vK.y2f0zwDVCNK.ChvZAa.y29SB3i.Cg9SAxrL.BgvMDa.DhjHBNnSyxrLwsG.x19HBgW.C29MDa.zhmTC2nHDhrLCI1JAgfYDf9FCg9PBNrZ.AgfZ.y2f0.y2LYy2XL.DhjHBNnSyxrLwcG.Aw5KzxG.BwfW.Dg9W.lwnSAxaP.zgL2.Aw50zxjJzxb0.zhmTy2HHCNrFx3bSB3q.ChGP.zMLYC3q.Dg9Uzq.C2XVCgu".split(".");
352
+ return g = function() {
353
+ return e;
354
+ }, g();
355
+ }
356
+ export { h as ScatterChart };