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