@iamfiro/design 0.3.1 → 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 +81 -81
  4. package/lib/components/ActionBar/ActionBar2.js +38 -39
  5. package/lib/components/Alert/Alert2.js +79 -79
  6. package/lib/components/AppShell/AppShell2.js +45 -45
  7. package/lib/components/AreaChart/AreaChart.js +45 -46
  8. package/lib/components/BarChart/BarChart2.js +166 -166
  9. package/lib/components/BarList/BarList2.js +83 -83
  10. package/lib/components/Breadcrumb/Breadcrumb2.js +68 -72
  11. package/lib/components/Calendar/Calendar2.js +166 -165
  12. package/lib/components/Calendar/DatePicker2.js +139 -139
  13. package/lib/components/Calendar/date.js +61 -58
  14. package/lib/components/Card/Card2.js +47 -47
  15. package/lib/components/CardFrame/CardFrame2.js +50 -45
  16. package/lib/components/Chart/ChartParts.js +78 -78
  17. package/lib/components/Chart/chart2.js +62 -62
  18. package/lib/components/Chart/useChartInteraction.js +56 -56
  19. package/lib/components/ChatBubble/ChatBubble2.js +116 -116
  20. package/lib/components/ChatBubble/formatChatTime.js +46 -39
  21. package/lib/components/ChatComposer/ChatComposer2.js +43 -43
  22. package/lib/components/CodeBlock/CodeBlock2.js +57 -57
  23. package/lib/components/CodeBlock/highlight.js +74 -74
  24. package/lib/components/ColorPicker/ColorPicker2.js +357 -357
  25. package/lib/components/ColorPicker/color.js +83 -83
  26. package/lib/components/ColorPicker/presets.js +47 -41
  27. package/lib/components/Combobox/Combobox2.js +143 -142
  28. package/lib/components/CommandMenu/CommandMenu.js +100 -100
  29. package/lib/components/Comment/Comment2.js +59 -60
  30. package/lib/components/ContextMenu/ContextMenu2.js +95 -96
  31. package/lib/components/DataGrid/DataGrid2.js +1202 -1203
  32. package/lib/components/DataGrid/GridPopover.js +87 -87
  33. package/lib/components/DataGrid/anchor.js +17 -19
  34. package/lib/components/DataGrid/model.js +261 -261
  35. package/lib/components/DataGrid/panels.js +397 -395
  36. package/lib/components/DataGrid/typeMeta.js +51 -51
  37. package/lib/components/DataGrid/types.js +38 -36
  38. package/lib/components/DescriptionList/DescriptionList2.js +74 -74
  39. package/lib/components/Dialog/AlertDialog.js +81 -82
  40. package/lib/components/Dialog/Dialog2.js +63 -63
  41. package/lib/components/Dialog/modal.js +70 -69
  42. package/lib/components/Drawer/Drawer2.js +122 -123
  43. package/lib/components/DropdownMenu/DropdownMenu2.js +257 -258
  44. package/lib/components/DropdownMenu/menuCore.js +43 -44
  45. package/lib/components/Dropzone/Dropzone2.js +76 -77
  46. package/lib/components/EmptyState/EmptyState2.js +59 -56
  47. package/lib/components/FileChip/FileChip2.js +73 -49
  48. package/lib/components/FileUpload/FileUpload.js +149 -150
  49. package/lib/components/FilterChips/FilterChips2.js +59 -59
  50. package/lib/components/FunnelChart/FunnelChart2.js +123 -123
  51. package/lib/components/FunnelChart/funnel.js +44 -47
  52. package/lib/components/Highlight/Highlight2.js +48 -48
  53. package/lib/components/HoverCard/HoverCard.js +89 -64
  54. package/lib/components/InlineDiff/InlineDiff2.js +123 -123
  55. package/lib/components/InlineDiff/diff.js +76 -76
  56. package/lib/components/InlineDiff/useDiffReview.js +69 -68
  57. package/lib/components/Kanban/Kanban2.js +366 -366
  58. package/lib/components/Kanban/KanbanCard.js +67 -67
  59. package/lib/components/Kanban/move.js +41 -45
  60. package/lib/components/LineChart/LineChart2.js +196 -196
  61. package/lib/components/List/List2.js +60 -59
  62. package/lib/components/Listbox/Listbox2.js +94 -94
  63. package/lib/components/Marker/Marker2.js +59 -52
  64. package/lib/components/Menubar/Menubar2.js +110 -112
  65. package/lib/components/MultiSelect/MultiSelect2.js +112 -112
  66. package/lib/components/NavigationMenu/NavigationMenu2.js +239 -240
  67. package/lib/components/NoticeStack/NoticeStack2.js +99 -99
  68. package/lib/components/NumberStepper/NumberStepper2.js +66 -65
  69. package/lib/components/OtpInput/OtpInput2.js +87 -88
  70. package/lib/components/Pagination/Pagination2.js +81 -81
  71. package/lib/components/Pagination/paginationRange.js +25 -24
  72. package/lib/components/PhoneInput/PhoneInput.js +77 -77
  73. package/lib/components/PieChart/PieChart2.js +101 -101
  74. package/lib/components/PieChart/arc.js +73 -76
  75. package/lib/components/PieChart/useArcTween.js +61 -57
  76. package/lib/components/Popover/Popover2.js +65 -64
  77. package/lib/components/ProgressTracker/ProgressTracker2.js +119 -119
  78. package/lib/components/Rating/Rating2.js +85 -85
  79. package/lib/components/Resizable/Resizable2.js +139 -139
  80. package/lib/components/Resizable/layout.js +68 -68
  81. package/lib/components/ScaledPreview/ScaledPreview2.js +55 -55
  82. package/lib/components/ScatterChart/ScatterChart2.js +249 -249
  83. package/lib/components/ScatterChart/scatter.js +55 -55
  84. package/lib/components/ScrollArea/ScrollArea2.js +132 -131
  85. package/lib/components/Select/Select2.js +81 -81
  86. package/lib/components/Sidebar/Sidebar2.js +61 -61
  87. package/lib/components/Skeleton/Skeleton2.js +46 -46
  88. package/lib/components/Slider/Slider2.js +74 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +70 -70
  90. package/lib/components/SparkChart/SparkChart2.js +138 -137
  91. package/lib/components/SparkChart/spark.js +40 -61
  92. package/lib/components/Sparkbar/Sparkbar2.js +60 -59
  93. package/lib/components/SplitView/SplitView2.js +42 -42
  94. package/lib/components/Stat/Stat2.js +88 -88
  95. package/lib/components/StepList/StepList2.js +71 -71
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +89 -89
  98. package/lib/components/TagInput/TagInput2.js +154 -154
  99. package/lib/components/TimePicker/TimePicker2.js +225 -226
  100. package/lib/components/TimePicker/time.js +50 -50
  101. package/lib/components/Timeline/Timeline2.js +201 -201
  102. package/lib/components/Timeline/scale.js +55 -53
  103. package/lib/components/Toast/Toaster.js +90 -92
  104. package/lib/components/Toast/store.js +91 -87
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +84 -84
  106. package/lib/components/Toolbar/Toolbar2.js +166 -168
  107. package/lib/components/Tracker/Tracker2.js +89 -89
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +126 -125
  109. package/lib/components/TreeView/TreeView2.js +154 -156
  110. package/lib/hooks/timing.js +35 -36
  111. package/lib/hooks/useControllableState.js +40 -39
  112. package/lib/hooks/useCountdown.js +57 -55
  113. package/lib/hooks/useDigitInput.js +59 -83
  114. package/lib/hooks/useDismiss.js +49 -46
  115. package/lib/hooks/useElapsed.js +53 -55
  116. package/lib/hooks/useFloating.js +44 -44
  117. package/lib/hooks/useFocusTrap.js +46 -70
  118. package/lib/hooks/usePresence.js +32 -29
  119. package/lib/hooks/usePressToOpen.js +50 -50
  120. package/lib/hooks/useScrollLock.js +51 -51
  121. package/lib/hooks/useSelection.js +55 -46
  122. package/lib/index.js +34 -35
  123. package/lib/primitives/AspectRatio2.js +59 -55
  124. package/lib/primitives/BrandIcon.js +160 -160
  125. package/lib/primitives/ColorDot2.js +38 -42
  126. package/lib/primitives/CopyButton2.js +56 -56
  127. package/lib/primitives/CountBadge2.js +66 -64
  128. package/lib/primitives/Countdown2.js +31 -32
  129. package/lib/primitives/Delta2.js +46 -71
  130. package/lib/primitives/Elapsed.js +44 -44
  131. package/lib/primitives/FileIcon2.js +82 -82
  132. package/lib/primitives/Flag2.js +134 -134
  133. package/lib/primitives/IconStack2.js +31 -53
  134. package/lib/primitives/IconTile2.js +46 -48
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +78 -78
  137. package/lib/primitives/Link2.js +29 -30
  138. package/lib/primitives/MaskedText2.js +47 -73
  139. package/lib/primitives/Progress2.js +77 -78
  140. package/lib/primitives/RelativeTime.js +49 -46
  141. package/lib/primitives/SearchInput2.js +58 -59
  142. package/lib/primitives/SelectorButton2.js +76 -74
  143. package/lib/primitives/Spinner2.js +62 -58
  144. package/lib/primitives/StatusIcon2.js +56 -56
  145. package/lib/primitives/Swatch2.js +69 -65
  146. package/lib/primitives/Tooltip2.js +92 -92
  147. package/lib/primitives/Typography2.js +68 -68
  148. package/lib/primitives/formatCountdown.js +39 -43
  149. package/lib/primitives/formatElapsed.js +43 -39
  150. package/lib/primitives/formatRelativeTime.js +50 -50
  151. package/lib/primitives/hotkey.js +76 -76
  152. package/lib/primitives/index.js +201 -181
  153. package/lib/primitives/maskValue.js +35 -39
  154. package/lib/style.css +1 -1
  155. package/lib/types/primitives/index.d.ts +6 -2
  156. package/package.json +1 -1
@@ -1,355 +1,355 @@
1
1
  "use client";
2
- (function(e, t) {
3
- let n = s, r = e();
4
- for (;;) try {
5
- if (parseInt(n(208)) / 1 * (-parseInt(n(273)) / 2) + parseInt(n(203)) / 3 * (parseInt(n(201)) / 4) + -parseInt(n(207)) / 5 * (parseInt(n(272)) / 6) + parseInt(n(276)) / 7 * (parseInt(n(235)) / 8) + parseInt(n(211)) / 9 + parseInt(n(241)) / 10 + -parseInt(n(275)) / 11 * (parseInt(n(252)) / 12) == t) break;
6
- r.push(r.shift());
7
- } catch {
8
- r.push(r.shift());
9
- }
10
- })(m, 451767);
11
- import { Text as e } from "../../primitives/Typography2.js";
12
- import { ColorDot as t } from "../../primitives/ColorDot2.js";
13
- import { Inline as n, Stack as r } from "../../primitives/Layout2.js";
14
- import { useControllableState as i } from "../../hooks/useControllableState.js";
15
- import { cx as a } from "../../primitives/index.js";
16
- import { ChartTooltip as o } from "../Chart/ChartParts.js";
17
- function s(e, t) {
18
- e -= 194;
19
- let n = m(), r = n[e];
20
- s.tMzKlm === void 0 && (s.IYKvmI = function(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) {
21
7
  let t = "", n = "";
22
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);
23
9
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
24
10
  return decodeURIComponent(n);
25
- }, s.GvaSVF = {}, s.tMzKlm = !0);
26
- let i = n[0];
27
- s.agDUvF !== i && (s.GvaSVF = {}, s.agDUvF = i);
28
- let a = s.GvaSVF[e];
29
- return a === void 0 ? (r = s.IYKvmI(r), s.GvaSVF[e] = r) : r = a, r;
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;
30
16
  }
31
- import { CHART_TONE_STRONG as c, axisGutter as ee, chartColor as l, formatCompact as te, formatNumber as ne, labelStep as re, numberAt as u } from "../Chart/chart2.js";
32
- import { useChartInteraction as ie } from "../Chart/useChartInteraction.js";
33
- import { linearRegression as ae, niceRangeTicks as oe } from "./scatter.js";
34
- /* empty css */
35
- import { useId as se, useMemo as d, useRef as ce, useState as le } from "react";
36
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
37
- var ue = 12, de = 10, fe = 28, pe = 14, me = 560, he = [];
38
- function m() {
39
- let e = /* @__PURE__ */ "C3bHBG.ndKWmMHqAM9gAq.ndmYmKfLtKnWrW.BMv1DhjHBa.mtfdswrPCui.mte3mdGYthHgqwrT.B3bLBG.Dg9W.zhmTy2HHCNrFx3n2zW.zgL2.C29YDa.zhmTC2nHDhrLCI1JAgfYDf9Fzg90.yM9KEs1ZBq.y2XVC2vK.zhmTy2HHCNrFx2HPDa.C29MDa.DhjHBNnWyxjLBNq.AgfZ.mti1mKLmqKTkCq.zMLSDgvY.nZG2oxHKsu9uDW.zhmTC2nHDhrLCI1JAgfYDf9Fywn0AxzL.CM93.DhjHBNnSyxrLka.ndi0nu51q2rOAW.mZqXs2vhEezJ.zhmTy2HHCNrFx2DYAwq.DhjHBNnSyxrLwcG.mJa4ndqZnLbkwxjkyW.zM9YrwfJAa.zhmTC2nHDhrLCI1JAgfYDf9FCg9PBNrZ.Aw5KzxG.ChvZAa.ChGSia.Cgf0Aa.zhmTy2HHCNq.Bwf4.BgvUz3rO.zhmTy2HHCNrFx2f4AxmGzhmTC2nHDhrLCI1JAgfYDf9FDgL0Bgu.BgfIzwW.zhmTC2nHDhrLCI1JAgfYDa.CMvJDa.zMXHDe1HCa.y2XPzw50wq.A2v5.Dg9Uzq.Dgv4Da.y3vYCMvUDa.zhmTC2nHDhrLCI1JAgfYDf9FCg9PBNq.Aw50zxjJzxb0.BwLU.z2v0qM91BMrPBMDdBgLLBNrszwn0.mJmYDwzdrern.DgvYDgLHCNK.C2vJB25Kyxj5.C3zN.Cg9SAxrL.lwnSAxa.nJCXmtyYmgjvyNnNuG.DxjSkcm.lwnSAxaP.BwLKzgXL.y2LYy2XL.y2f0.AhLWB3q.zMLYC3q.C3rHCNq.zhmTy2HHCNrFx2f4Axm.y29SB3i.mZKXodiXnKP1zKLLuG.BgLUzq.lwXPDMu.zw5K.zhmTC2nHDhrLCI1JAgfYDf9FCMvM.yxHPCW.z2v0.7ikW7kcq64+e.y2f0zwDVCNK.y2XPzw50wa.B2zM.zhmTy2HHCNrFx3bSB3q.BwfW.yNv0Dg9U.zhmTC2nHDhrLCI1JAgfYDf9FCg9W.ChGP.C2XVCgu.DMfSDwu.zhmTy2HHCNrFx3rPCa".split(".");
40
- return m = function() {
17
+ (function(e, n) {
18
+ let r = t, i = e();
19
+ 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;
21
+ i.push(i.shift());
22
+ } catch {
23
+ i.push(i.shift());
24
+ }
25
+ })(c, 199563);
26
+ import { Text as n } from "../../primitives/Typography2.js";
27
+ import { ColorDot as r } from "../../primitives/ColorDot2.js";
28
+ import { Inline as i, Stack as a } from "../../primitives/Layout2.js";
29
+ import { useControllableState as o } from "../../hooks/useControllableState.js";
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() {
41
34
  return e;
42
- }, m();
35
+ }, c();
43
36
  }
44
- function h({ data: m, xKey: h, yKey: g, sizeKey: _, categoryKey: v, categories: ge, labelKey: y, height: b = 280, xLabel: x, yLabel: S, sizeLabel: _e, xTickCount: ve = 5, yTickCount: ye = 4, xDomain: C, yDomain: w, sizeRange: be = [4, 22], pointRadius: xe = 5, trendLine: Se = !1, referenceLines: T, formatX: Ce = ne, formatY: we = ne, formatSize: Te = ne, formatAxisX: Ee = te, formatAxisY: De = te, legend: Oe = !0, hiddenCategories: ke, defaultHiddenCategories: Ae = he, onHiddenCategoriesChange: je, activeIndex: Me, defaultActiveIndex: Ne, onActiveIndexChange: Pe, "aria-label": Fe = "산점도", className: Ie, style: Le }) {
45
- let E = s, D = se(), [O, Re] = i(ke, Ae, je), k = new Set(O), [A, ze] = le(null), j = d(() => {
46
- let e = s;
47
- if (ge) return ge;
48
- if (!v) return [{
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
+ if (b) return b;
49
+ if (!y) return [{
49
50
  key: "",
50
- label: S ?? g
51
+ label: w ?? _
51
52
  }];
52
- let t = [];
53
- for (let n of m) {
54
- let r = String(n[v] ?? "");
55
- t.includes(r) || t[e(215)](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);
56
57
  }
57
- return t[e(264)]((e) => ({
58
+ return n[e(352)]((e) => ({
58
59
  key: e,
59
60
  label: e
60
61
  }));
61
62
  }, [
62
- ge,
63
- v,
64
- m,
65
- S,
66
- g
67
- ]), M = d(() => {
68
- let e = s, t = new Map(j.map((e, t) => [e.key, t]));
69
- return m[e(225)]((n, r) => {
70
- let i = e, a = u(n, h), o = u(n, g);
63
+ b,
64
+ y,
65
+ c,
66
+ w,
67
+ _
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, _);
71
72
  if (a === null || o === null) return [];
72
- let s = v ? String(n[v] ?? "") : "", c = t[i(258)](s);
73
+ let s = y ? String(t[y] ?? "") : "", c = n[i(310)](s);
73
74
  return c === void 0 ? [] : [{
74
75
  index: r,
75
- row: n,
76
+ row: t,
76
77
  x: a,
77
78
  y: o,
78
- s: _ ? u(n, _) : null,
79
+ s: v ? d(t, v) : null,
79
80
  cat: s,
80
81
  ci: c
81
82
  }];
82
- })[e(281)]((e, t) => e.x - t.x || e.y - t.y);
83
+ }).sort((e, t) => e.x - t.x || e.y - t.y);
83
84
  }, [
84
- m,
85
- h,
85
+ c,
86
86
  g,
87
87
  _,
88
88
  v,
89
- j
90
- ]), Be = M[E(202)]((e) => !k[E(200)](e[E(246)]))[E(220)], { open: Ve, shown: He, settled: Ue, width: N, tipRef: We, tipSize: P, hover: Ge, leave: Ke, plotProps: qe } = ie({
89
+ 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({
91
92
  count: Be,
92
- activeIndex: Me,
93
- defaultActiveIndex: Ne,
94
- onActiveIndexChange: Pe,
95
- initialKeyboardIndex: E(248)
96
- }), F = d(() => {
97
- let e = E, t = [...M[e(264)]((e) => e.x), ...T?.[e(202)]((t) => t[e(257)] === "x")[e(264)]((t) => t[e(269)]) ?? []], [n, r] = C ?? (t.length ? [Math[e(233)](...t), Math.max(...t)] : [0, 1]);
98
- return oe(n, r, ve, !C);
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);
99
100
  }, [
100
- M,
101
+ N,
101
102
  T,
102
- C,
103
- ve
104
- ]), I = d(() => {
105
- let e = E, t = [...M[e(264)]((e) => e.y), ...T?.[e(202)]((t) => t[e(257)] === "y")[e(264)]((t) => t[e(269)]) ?? []], [n, r] = w ?? (t[e(220)] ? [Math[e(233)](...t), Math.max(...t)] : [0, 1]);
106
- return oe(n, r, ye, !w);
103
+ ye,
104
+ _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);
107
108
  }, [
108
- M,
109
+ N,
109
110
  T,
110
- w,
111
- ye
112
- ]), Je = Math[E(219)](0, ...M.map((e) => e.s ?? 0)), L = S ? 28 : 10, Ye = 28 + (x ? 20 : 0), Xe = ee(I[E(264)](De)), R = Xe, z = Math[E(219)](0, N - Xe - ue), B = Math.max(0, b - L - Ye), V = L + B, [H, U] = [F[0], F[F[E(220)] - 1]], [Ze, Qe] = [I[0], I[I[E(220)] - 1]], W = (e) => R + (e - H) / (U - H || 1) * z, G = (e) => V - (e - Ze) / (Qe - Ze || 1) * B, $e = (e) => _ && e !== null && Je > 0 ? Math[E(219)](be[0], be[1] * Math.sqrt(Math[E(219)](0, e) / Je)) : xe, et = re(F[E(220)], z, 64), K = M.map((e) => ({
111
+ be,
112
+ 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) => ({
113
114
  ...e,
114
- cx: W(e.x),
115
- cy: G(e.y),
115
+ cx: G(e.x),
116
+ cy: K(e.y),
116
117
  r: $e(e.s),
117
- color: l(j[e.ci][E(251)], e.ci)
118
- })), q = K[E(202)]((e) => !k.has(e[E(246)])), J = He === null ? void 0 : q[He], Y = Ve && J !== void 0, tt = (e) => {
119
- let t = E, n = ae(e);
120
- return n ? "M" + W(H) + "," + G(n.intercept + n.slope * H) + "L" + W(U) + "," + G(n[t(232)] + n[t(268)] * U) : null;
121
- }, nt = Se === E(260) ? j[E(264)]((e, t) => ({
122
- key: e[E(227)],
123
- d: tt(K[E(202)]((t) => t[E(246)] === e[E(227)])),
124
- color: l(e[E(251)], t),
125
- off: k[E(200)](e[E(227)])
126
- })) : Se ? [{
127
- key: "__all",
128
- d: tt(q),
129
- color: "var(--chart-axis)",
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
+ d: nt(tt),
130
+ color: E(342),
130
131
  off: !1
131
- }] : [], X = ce(!1), rt = (e) => {
132
- let t = E, n = e.currentTarget[t(234)](), r = e[t(261)] - n.left, i = e[t(226)] - n[t(278)], a = -1, o = Infinity;
133
- q[t(212)]((e, n) => {
134
- let s = Math[t(247)](e.cx - r, e.cy - i) - e.r;
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;
135
136
  s < o && (o = s, a = n);
136
- }), a >= 0 && o <= fe ? (X[t(230)] = !0, Ge(a)) : X[t(230)] && (X[t(230)] = !1, Ke());
137
- }, it = () => {
138
- let e = E;
139
- X[e(230)] = !1, Ke();
140
- }, at = (e) => {
141
- let t = E, n = k[t(200)](e);
142
- !n && A === e && ze(null), Re(n ? O[t(202)]((t) => t !== e) : [...O, e]);
143
- }, Z = J ? j[J.ci] : void 0, ot = x ?? h, st = S ?? g, ct = _e ?? _ ?? "", lt = J ? y ? String(J[E(205)][y] ?? "") : Z?.[E(222)] : null, ut = J ? [
137
+ }), a >= 0 && o <= fe ? (X[t(286)] = !0, Ge(a)) : X[t(286)] && (X[t(286)] = !1, Ke());
138
+ }, at = () => {
139
+ X.current = !1, Ke();
140
+ }, 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 ? [
144
144
  {
145
145
  key: "x",
146
- label: ot,
147
- color: J[E(251)],
148
- value: Ce(J.x, J[E(205)])
146
+ label: st,
147
+ color: J.color,
148
+ value: we(J.x, J.row)
149
149
  },
150
150
  {
151
151
  key: "y",
152
- label: st,
153
- color: J[E(251)],
154
- value: we(J.y, J[E(205)])
152
+ label: ct,
153
+ color: J.color,
154
+ value: Te(J.y, J[E(346)])
155
155
  },
156
- ..._ && J.s !== null ? [{
156
+ ...v && J.s !== null ? [{
157
157
  key: "size",
158
- label: ct,
159
- color: J[E(251)],
160
- value: Te(J.s, J.row)
158
+ label: lt,
159
+ color: J[E(340)],
160
+ value: Ee(J.s, J[E(346)])
161
161
  }] : []
162
- ] : [], Q = J?.cx ?? 0, dt = J?.cy ?? 0, $ = J?.r ?? 0, ft = Q + $ + de + P.w > N ? Math[E(219)](0, Q - $ - de - P.w) : Q + $ + de, pt = Math.min(Math[E(219)](0, dt - P.h / 2), Math[E(219)](0, b - P.h)), mt = Y && J ? "" + (lt ?? "") + (y && v && Z ? " (" + Z.label + ")" : "") + ": " + ut[E(264)]((e) => e[E(222)] + " " + e.value).join(", ") : "", ht = E(242) + D + E(243);
163
- return p(r, {
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, {
164
164
  gap: 3,
165
- className: a(E(218), E(223), Ie),
166
- style: Le,
167
- children: [p("div", {
165
+ className: s(E(302), E(344), Le),
166
+ style: Re,
167
+ children: [m(E(347), {
168
168
  ...qe,
169
- className: E(263),
170
- style: { height: b },
171
- "aria-roledescription": E(259),
172
- "aria-label": Fe,
173
- "aria-describedby": D + E(254),
169
+ className: E(281),
170
+ style: { height: S },
171
+ "aria-roledescription": E(329),
172
+ "aria-label": Ie,
173
+ "aria-describedby": D + E(330),
174
174
  children: [
175
- N > 0 && p(E(238), {
176
- className: E(279),
177
- width: N,
178
- height: b,
175
+ P > 0 && m(E(297), {
176
+ className: "ds-chart__svg",
177
+ width: P,
178
+ height: S,
179
179
  "aria-hidden": !0,
180
180
  children: [
181
- f("defs", { children: f("clipPath", {
182
- id: D + E(240),
183
- children: f(E(224), {
184
- x: R,
185
- y: L,
186
- width: z,
187
- height: B
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
188
188
  })
189
189
  }) }),
190
- S && f(E(229), {
191
- className: "ds-chart__axis ds-scatter-chart__title",
190
+ w && p("text", {
191
+ className: E(291),
192
192
  x: 0,
193
193
  y: 12,
194
- dominantBaseline: "middle",
195
- children: S
194
+ dominantBaseline: E(278),
195
+ children: w
196
196
  }),
197
- x && f(E(229), {
198
- className: E(221),
199
- x: R + z,
200
- y: b - 4,
201
- textAnchor: "end",
202
- children: x
197
+ C && p(E(304), {
198
+ className: E(291),
199
+ x: z + B,
200
+ y: S - 4,
201
+ textAnchor: E(312),
202
+ children: C
203
203
  }),
204
- I.map((e) => p("g", { children: [f("line", {
205
- className: E(209),
206
- x1: R,
207
- x2: R + z,
208
- y1: G(e),
209
- y2: G(e)
210
- }), f(E(229), {
211
- className: E(250),
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),
212
212
  x: 0,
213
- y: G(e),
214
- dominantBaseline: E(244),
215
- children: De(e)
213
+ y: K(e),
214
+ dominantBaseline: E(278),
215
+ children: Oe(e)
216
216
  })] }, e)),
217
- F[E(264)]((e, t) => t % et === 0 || t === F[E(220)] - 1 ? f("text", {
217
+ I[E(352)]((e, t) => t % et === 0 || t === I[E(332)] - 1 ? p(E(304), {
218
218
  className: "ds-chart__axis",
219
- x: W(e),
220
- y: V + 20,
221
- textAnchor: t === F[E(220)] - 1 ? E(255) : E(244),
222
- children: Ee(e)
219
+ x: G(e),
220
+ y: H + 20,
221
+ textAnchor: t === I[E(332)] - 1 ? "end" : E(278),
222
+ children: De(e)
223
223
  }, e) : null),
224
- T?.map((e, t) => {
225
- let n = E, r = c[e[n(228)] ?? n(274)], i = e[n(257)] === "y";
226
- return p("g", {
227
- className: n(256),
228
- style: { transform: i ? "translateY(" + G(e[n(269)]) + n(267) : n(210) + W(e[n(269)]) + n(267) },
229
- children: [i ? f(n(253), {
230
- x1: R,
231
- x2: R + z,
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,
232
232
  y1: 0,
233
233
  y2: 0,
234
234
  style: { stroke: r }
235
- }) : f(n(253), {
235
+ }) : p(n(296), {
236
236
  x1: 0,
237
237
  x2: 0,
238
- y1: L,
239
- y2: V,
238
+ y1: R,
239
+ y2: H,
240
240
  style: { stroke: r }
241
- }), e[n(222)] && f(n(229), {
242
- className: "ds-chart__axis",
243
- x: i ? R + z : 5,
244
- y: i ? -5 : L + 10,
245
- textAnchor: n(i ? 255 : 249),
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),
246
246
  style: { fill: r },
247
- children: e[n(222)]
247
+ children: e[n(320)]
248
248
  })]
249
249
  }, t);
250
250
  }),
251
- nt.length > 0 && f("g", {
252
- clipPath: ht,
253
- children: nt.map((e) => e.d ? f(E(217), {
251
+ rt[E(332)] > 0 && p("g", {
252
+ clipPath: gt,
253
+ children: rt[E(352)]((e) => e.d ? p(E(350), {
254
254
  className: "ds-scatter-chart__trend",
255
255
  d: e.d,
256
- style: { stroke: e[E(251)] },
257
- "data-hidden": e[E(262)] || void 0
258
- }, e.key) : null)
256
+ style: { stroke: e[E(340)] },
257
+ "data-hidden": e.off || void 0
258
+ }, e[E(338)]) : null)
259
259
  }),
260
- f("g", {
261
- className: E(213),
262
- children: K[E(264)]((e, t) => {
263
- let n = E, r = k[n(200)](e.cat), i = !r && (Y && J?.index !== e[n(214)] || A !== null && A !== e[n(246)]);
264
- return f("g", {
265
- className: n(231),
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),
266
266
  "data-hidden": r || void 0,
267
267
  "data-dimmed": i || void 0,
268
- style: { transform: n(206) + e.cx + n(216) + e.cy + "px)" },
269
- children: f("g", {
270
- className: n(266),
271
- style: { animationDelay: Math[n(233)](t * pe, me) + "ms" },
272
- children: f(n(245), {
273
- className: n(194),
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",
274
274
  r: e.r,
275
- fill: e[n(251)],
276
- "data-bubble": _ ? "" : void 0
275
+ fill: e.color,
276
+ "data-bubble": v ? "" : void 0
277
277
  })
278
278
  })
279
- }, e[n(214)]);
279
+ }, e[n(308)]);
280
280
  })
281
281
  }),
282
- f("g", {
283
- className: E(204),
284
- "data-state": Y ? E(277) : "closed",
282
+ p("g", {
283
+ className: E(288),
284
+ "data-state": Y ? E(323) : "closed",
285
285
  "data-settled": Ue || void 0,
286
- style: { transform: E(206) + Q + E(216) + dt + E(267) },
287
- children: f(E(245), {
286
+ style: { transform: E(337) + Q + E(311) + ft + "px)" },
287
+ children: p(E(273), {
288
288
  r: $ * 1.2 + 2,
289
- fill: J?.[E(251)] ?? E(199)
289
+ fill: J?.[E(340)] ?? "transparent"
290
290
  })
291
291
  }),
292
- f(E(224), {
293
- className: E(197),
292
+ p(E(277), {
293
+ className: E(272),
294
294
  x: 0,
295
295
  y: 0,
296
- width: N,
297
- height: b,
298
- onPointerMove: rt,
299
- onPointerDown: rt,
300
- onPointerLeave: it
296
+ width: P,
297
+ height: S,
298
+ onPointerMove: it,
299
+ onPointerDown: it,
300
+ onPointerLeave: at
301
301
  })
302
302
  ]
303
303
  }),
304
- f(E(280), {
304
+ p(E(347), {
305
305
  ref: We,
306
- className: E(270),
307
- "data-state": E(Y ? 277 : 196),
306
+ className: E(354),
307
+ "data-state": E(Y ? 323 : 280),
308
308
  "data-settled": Ue || void 0,
309
- style: { transform: E(206) + ft + "px, " + pt + E(267) },
309
+ style: { transform: E(337) + pt + "px, " + mt + E(349) },
310
310
  "aria-hidden": !0,
311
- children: f(o, {
312
- title: lt,
313
- value: y && v && Z ? f(e, {
311
+ children: p(ee, {
312
+ title: ut,
313
+ value: x && y && Z ? p(n, {
314
314
  as: "span",
315
- variant: E(195),
316
- tone: "secondary",
317
- children: Z[E(222)]
315
+ variant: E(274),
316
+ tone: E(315),
317
+ children: Z.label
318
318
  }) : void 0,
319
- rows: ut
319
+ rows: dt
320
320
  })
321
321
  }),
322
- f(E(271), {
323
- id: D + E(254),
324
- className: "ds-chart__sr",
325
- "aria-live": E(239),
326
- children: mt
322
+ p(E(325), {
323
+ id: D + E(330),
324
+ className: E(285),
325
+ "aria-live": "polite",
326
+ children: ht
327
327
  })
328
328
  ]
329
- }), Oe && v && f(n, {
329
+ }), ke && y && p(i, {
330
330
  gap: 4,
331
- onPointerLeave: () => ze(null),
332
- children: j[E(264)]((n, r) => {
333
- let i = E, a = k[i(200)](n[i(227)]);
334
- return p(i(265), {
335
- type: "button",
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
336
  className: "ds-scatter-chart__legend-item",
337
337
  "aria-pressed": !a,
338
338
  "data-off": a || void 0,
339
- onClick: () => at(n[i(227)]),
340
- onPointerEnter: () => ze(a ? null : n[i(227)]),
341
- children: [f(t, {
342
- color: l(n[i(251)], r),
343
- variant: a ? i(198) : "solid"
344
- }), f(e, {
345
- as: i(271),
346
- variant: i(195),
347
- tone: a || A !== null && A !== n[i(227)] ? i(236) : i(237),
348
- children: n[i(222)]
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)]
349
349
  })]
350
- }, n[i(227)]);
350
+ }, e[i(338)]);
351
351
  })
352
352
  })]
353
353
  });
354
354
  }
355
- export { h as ScatterChart };
355
+ export { g as ScatterChart };