@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,95 +1,93 @@
1
1
  "use client";
2
2
  (function(e, t) {
3
- let n = s, r = e();
3
+ let n = o, r = e();
4
4
  for (;;) try {
5
- if (parseInt(n(393)) / 1 * (-parseInt(n(382)) / 2) + parseInt(n(391)) / 3 + parseInt(n(373)) / 4 * (parseInt(n(392)) / 5) + -parseInt(n(379)) / 6 * (-parseInt(n(374)) / 7) + -parseInt(n(385)) / 8 * (parseInt(n(376)) / 9) + -parseInt(n(372)) / 10 * (parseInt(n(378)) / 11) + -parseInt(n(387)) / 12 * (-parseInt(n(384)) / 13) == t) break;
5
+ if (-parseInt(n(200)) / 1 * (parseInt(n(214)) / 2) + parseInt(n(210)) / 3 * (-parseInt(n(218)) / 4) + -parseInt(n(205)) / 5 + parseInt(n(215)) / 6 + -parseInt(n(216)) / 7 * (parseInt(n(212)) / 8) + parseInt(n(204)) / 9 * (-parseInt(n(202)) / 10) + parseInt(n(206)) / 11 == t) break;
6
6
  r.push(r.shift());
7
7
  } catch {
8
8
  r.push(r.shift());
9
9
  }
10
- })(e, 687871);
11
- function e() {
12
- let t = [
13
- "mJfsz3nyu0S",
14
- "AM9PBG",
15
- "mteXntu1B3nxzLrZ",
16
- "z2v0",
17
- "mtfotwfYv2m",
18
- "mtu4ntGZmeTWtLbeza",
19
- "A2v5",
20
- "y3vYCMvUDa",
21
- "nZm0vLbnCevI",
22
- "Dg9gAxHLza",
23
- "mtu1nJe1mKnUENnOsG",
24
- "nZi4uhLhCNLK",
25
- "BwLU",
26
- "mty4rK1nDKLm",
27
- "BwfW",
28
- "AgfZ",
29
- "y29SB3i",
30
- "mJe5oda2n3DitLrcrW",
31
- "oty5mdvcuuDmvKi",
32
- "mZe0mNHoCKzsuG",
33
- "nZK0ntC5mhzry050uq",
34
- "mte2C0riswvd"
35
- ];
36
- return e = function() {
37
- return t;
38
- }, e();
39
- }
40
- import { cubicBezier as t } from "./arc.js";
41
- import { useEffect as n, useLayoutEffect as r, useRef as i, useState as a } from "react";
42
- var o = t(.32, .72, 0, 1);
43
- function s(t, n) {
44
- t -= 372;
45
- let r = e(), i = r[t];
46
- s.cDwQPG === void 0 && (s.sJNwYK = function(e) {
10
+ })(s, 991816);
11
+ import { cubicBezier as e } from "./arc.js";
12
+ import { useEffect as t, useLayoutEffect as n, useRef as r, useState as i } from "react";
13
+ var a = e(.32, .72, 0, 1);
14
+ function o(e, t) {
15
+ e -= 199;
16
+ let n = s(), r = n[e];
17
+ o.pcCtIJ === void 0 && (o.pGzJEH = function(e) {
47
18
  let t = "", n = "";
48
19
  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);
49
20
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
50
21
  return decodeURIComponent(n);
51
- }, s.jzzkvz = {}, s.cDwQPG = !0);
52
- let a = r[0];
53
- s.wKxYWR !== a && (s.jzzkvz = {}, s.wKxYWR = a);
54
- let o = s.jzzkvz[t];
55
- return o === void 0 ? (i = s.sJNwYK(i), s.jzzkvz[t] = i) : i = o, i;
22
+ }, o.YfHxwi = {}, o.pcCtIJ = !0);
23
+ let i = n[0];
24
+ o.usfbGm !== i && (o.YfHxwi = {}, o.usfbGm = i);
25
+ let a = o.YfHxwi[e];
26
+ return a === void 0 ? (r = o.pGzJEH(r), o.YfHxwi[e] = r) : r = a, r;
27
+ }
28
+ function s() {
29
+ let e = [
30
+ "zMLSDgvY",
31
+ "mty1nZi5mhHdu1vlrq",
32
+ "Dg9gAxHLza",
33
+ "mZzOqLLrCgW",
34
+ "mJG1mdq0nvrRvgfWAG",
35
+ "nJm5mJG4ntrcEe5WEK0",
36
+ "y29SB3i",
37
+ "z2v0",
38
+ "AgfZ",
39
+ "ndK2mJmWnLLHDLPdrq",
40
+ "A2v5",
41
+ "ntm5mdq4ofbAtLHeua",
42
+ "BwfW",
43
+ "ntGYnte2Dun3zg96",
44
+ "mJKZmtqWoe5hAuPHsG",
45
+ "n2jxvM5yqG",
46
+ "AM9PBG",
47
+ "nfL2u3PQyW",
48
+ "y3vYCMvUDa",
49
+ "nNHJr0rmEG"
50
+ ];
51
+ return s = function() {
52
+ return e;
53
+ }, s();
56
54
  }
57
- function c(e, { enter: t = 900, update: c = 600 } = {}) {
58
- let l = s, [u, d] = a(() => e.map((e) => ({
55
+ function c(e, { enter: s = 900, update: c = 600 } = {}) {
56
+ let l = o, [u, d] = i(() => e.map((e) => ({
59
57
  ...e,
60
58
  a0: 0,
61
59
  a1: 0
62
- }))), f = i(u), p = i(e);
63
- r(() => {
64
- let t = s;
65
- p[t(381)] = e;
60
+ }))), f = r(u), p = r(e);
61
+ n(() => {
62
+ let t = o;
63
+ p[t(199)] = e;
66
64
  });
67
- let m = i(!1), h = e[l(388)]((e) => e[l(380)] + ":" + e.a0[l(383)](5) + ":" + e.a1[l(383)](5) + ":" + e[l(390)])[l(375)]("|");
68
- return n(() => {
69
- let e = l, n = p[e(381)], r = !m.current, i = new Map(f[e(381)][e(388)]((t) => [t[e(380)], t])), a = new Set(n.map((e) => e.key)), s = f[e(381)].filter((t) => !a[e(389)](t[e(380)]) && t.a1 - t.a0 > 1e-4)[e(388)]((e) => {
65
+ let m = r(!1), h = e[l(213)]((e) => e[l(211)] + ":" + e.a0[l(203)](5) + ":" + e.a1.toFixed(5) + ":" + e[l(207)])[l(217)]("|");
66
+ return t(() => {
67
+ let e = l, t = p[e(199)], n = !m[e(199)], r = new Map(f[e(199)][e(213)]((e) => [e.key, e])), i = new Set(t[e(213)]((t) => t[e(211)])), o = f[e(199)][e(201)]((t) => !i[e(209)](t[e(211)]) && t.a1 - t.a0 > 1e-4)[e(213)]((e) => {
70
68
  let t = (e.a0 + e.a1) / 2;
71
69
  return {
72
70
  ...e,
73
71
  a0: t,
74
72
  a1: t
75
73
  };
76
- }), u = [...n, ...s], h = u[e(388)]((t) => i[e(377)](t[e(380)]) ?? {
74
+ }), u = [...t, ...o], h = u[e(213)]((t) => r[e(208)](t[e(211)]) ?? {
77
75
  ...t,
78
76
  a1: t.a0
79
- }), g = r ? t : c, _ = 0, v = 0, y = (t) => {
77
+ }), g = n ? s : c, _ = 0, v = 0, y = (n) => {
80
78
  let r = e;
81
- v ||= t;
82
- let i = Math[r(386)](1, (t - v) / g), a = o(i), s = i < 1 ? u.map((e, t) => ({
79
+ v ||= n;
80
+ let i = Math.min(1, (n - v) / g), o = a(i), s = i < 1 ? u[r(213)]((e, t) => ({
83
81
  ...e,
84
- a0: h[t].a0 + (e.a0 - h[t].a0) * a,
85
- a1: h[t].a1 + (e.a1 - h[t].a1) * a
86
- })) : n;
87
- f[r(381)] = s, d(s), i < 1 ? _ = requestAnimationFrame(y) : m.current = !0;
82
+ a0: h[t].a0 + (e.a0 - h[t].a0) * o,
83
+ a1: h[t].a1 + (e.a1 - h[t].a1) * o
84
+ })) : t;
85
+ f[r(199)] = s, d(s), i < 1 ? _ = requestAnimationFrame(y) : m[r(199)] = !0;
88
86
  };
89
87
  return _ = requestAnimationFrame(() => _ = requestAnimationFrame(y)), () => cancelAnimationFrame(_);
90
88
  }, [
91
89
  h,
92
- t,
90
+ s,
93
91
  c
94
92
  ]), u;
95
93
  }
@@ -1,112 +1,111 @@
1
1
  "use client";
2
- function e(t, n) {
3
- t -= 388;
4
- let r = s(), i = r[t];
5
- e.vGebYd === void 0 && (e.qNjwPc = function(e) {
2
+ const e = c;
3
+ (function(e, t) {
4
+ let n = c, r = e();
5
+ for (;;) try {
6
+ if (parseInt(n(489)) / 1 + -parseInt(n(477)) / 2 + parseInt(n(493)) / 3 + parseInt(n(504)) / 4 + parseInt(n(513)) / 5 + -parseInt(n(507)) / 6 + -parseInt(n(480)) / 7 * (parseInt(n(500)) / 8) == t) break;
7
+ r.push(r.shift());
8
+ } catch {
9
+ r.push(r.shift());
10
+ }
11
+ })(m, 990844);
12
+ import { TIMING as t } from "../../hooks/timing.js";
13
+ import { usePresence as n } from "../../hooks/usePresence.js";
14
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
15
+ import { cx as i } from "../../primitives/index.js";
16
+ import { useFloating as a } from "../../hooks/useFloating.js";
17
+ import { useDismiss as o } from "../../hooks/useDismiss.js";
18
+ import { focusableIn as s } from "../../hooks/useFocusTrap.js";
19
+ /* empty css */
20
+ function c(e, t) {
21
+ e -= 477;
22
+ let n = m(), r = n[e];
23
+ c.yWUstq === void 0 && (c.jMMUEJ = function(e) {
6
24
  let t = "", n = "";
7
25
  for (let n = 0, r, i, a = 0; i = e.charAt(a++); ~i && (r = n % 4 ? r * 64 + i : i, n++ % 4) && (t += String.fromCharCode(255 & r >> (-2 * n & 6)))) i = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(i);
8
26
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
9
27
  return decodeURIComponent(n);
10
- }, e.kZBqQg = {}, e.vGebYd = !0);
11
- let a = r[0];
12
- e.WlRAzb !== a && (e.kZBqQg = {}, e.WlRAzb = a);
13
- let o = e.kZBqQg[t];
14
- return o === void 0 ? (i = e.qNjwPc(i), e.kZBqQg[t] = i) : i = o, i;
28
+ }, c.RjRSAU = {}, c.yWUstq = !0);
29
+ let i = n[0];
30
+ c.OEmOUg !== i && (c.RjRSAU = {}, c.OEmOUg = i);
31
+ let a = c.RjRSAU[e];
32
+ return a === void 0 ? (r = c.jMMUEJ(r), c.RjRSAU[e] = r) : r = a, r;
15
33
  }
16
- const t = e;
17
- (function(t, n) {
18
- let r = e, i = t();
19
- for (;;) try {
20
- if (-parseInt(r(393)) / 1 * (-parseInt(r(400)) / 2) + parseInt(r(397)) / 3 + -parseInt(r(408)) / 4 * (parseInt(r(413)) / 5) + -parseInt(r(403)) / 6 + -parseInt(r(416)) / 7 * (-parseInt(r(388)) / 8) + parseInt(r(421)) / 9 * (parseInt(r(409)) / 10) + parseInt(r(407)) / 11 * (-parseInt(r(417)) / 12) == n) break;
21
- i.push(i.shift());
22
- } catch {
23
- i.push(i.shift());
24
- }
25
- })(s, 470261);
26
- import { TIMING as n } from "../../hooks/timing.js";
27
- import { usePresence as r } from "../../hooks/usePresence.js";
28
- import { useControllableState as i } from "../../hooks/useControllableState.js";
29
- import { cx as a } from "../../primitives/index.js";
30
- import { useFloating as o } from "../../hooks/useFloating.js";
31
- function s() {
32
- let e = /* @__PURE__ */ "Cg9PBNrLCLr5Cgu.zgLHBg9N.mZu4mhz5senMuG.y29UDgfPBNm.DgfYz2v0.ntiWmw93vuXntG.mtaYodrAwejfzeK.y2XPy2S.C2v0vgLTzw91Da.Bw91C2u.ouTcBhnJrq.ywn0AxzLrwXLBwvUDa.Bw91BNrLza.Ag92zxi.zgvMyxvSDfbYzxzLBNrLza.ote4ngv3q1vJva.A2v5.CMvSyxrLzfrHCMDLDa.oMzVy3vZlxzPC2LIBgu.y2fSyYGXmdb2DYaTide2ChGP.owTey3fgqW.Ag92zxjhCMfJzq.zM9JDxm.zhmTzMXVyxrPBMCTlxbHzc0.mtKXndy1nejirw9ryW.zhmTC2nYB2XS.y2XLyxjuAw1LB3v0.mZC1mZHSyLfACw0.C3bHBG.rxnJyxbL.ndqZodmYmgvWz0vNzW.B3bLBG.zhmTzMXVyxrPBMC.C3rHCNq.mta2n0XWwwjJuG.ntiWnez5C1bksG.nty0ntiZmgLNseDiBG.y3vYCMvUDa".split(".");
33
- return s = function() {
34
+ import { useEffect as l, useRef as u } from "react";
35
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
36
+ function m() {
37
+ let e = /* @__PURE__ */ "zNvUy3rPB24.zgvMyxvSDfbYzxzLBNrLza.odu2mZe2zM1uC2ze.zhmTC2nYB2XS.Cg9PBNrLCLr5Cgu.otuZnJiZohn3uhv3wa.zgLHBg9N.ywn0AxzLrwXLBwvUDa.ChjLDMvUDerLzMf1Bhq.zgL2.y2XPy2S.mJqXntCZmgfoDez2zG.CMvSyxrLzfrHCMDLDa.Ag92zxjjBNrLBNq.nZCWmdG2D1bQrLPx.C2v0vgLTzw91Da.rxnJyxbL.mtG5s3zns2fw.y3vYCMvUDa.B3bLBG.zM9JDxm.y29UDgfPBNm.y2XLyxjuAw1LB3v0.Bwf0y2HLCW.zhmTzMXVyxrPBMCTlxbHzc0.Ag92zxjhCMfJzq.mtm3nJm1nfbTEffrzq.y2XVC2LUzW.A2v5.yM9KEq.mZi0mJiWnwP5Ag5htG.Bw91C2u.y2fSyYGXmdb2DYaTide2ChGP.C3rHCNq.Ag92zxi.y2XVC2vK.oMzVy3vZlxzPC2LIBgu.ntyWmtzrs0nXzvG.Bw91BNrLza".split(".");
38
+ return m = function() {
34
39
  return e;
35
- }, s();
40
+ }, m();
36
41
  }
37
- import { useDismiss as c } from "../../hooks/useDismiss.js";
38
- import { focusableIn as l } from "../../hooks/useFocusTrap.js";
39
- /* empty css */
40
- import { useEffect as u, useRef as d } from "react";
41
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
42
42
  import { createPortal as h } from "react-dom";
43
43
  var g = 160;
44
- function _({ trigger: e, children: s, open: _, defaultOpen: v = !1, onOpenChange: y, openOn: b = t(418), align: x = t(406), width: S, padding: C = "md", autoFocus: w = !0, className: T, "aria-label": E }) {
45
- let D = t, [O, k] = i(_, v, y), A = r(O, g), j = d(null), M = d(null), N = d(0), { style: P, side: F } = o(j, A[D(423)], {
44
+ function _({ trigger: m, children: _, open: v, defaultOpen: y = !1, onOpenChange: b, openOn: x = "click", align: S = e(496), width: C, padding: w = "md", autoFocus: T = !0, className: E, "aria-label": D }) {
45
+ let O = e, [k, A] = r(v, y, b), j = n(k, g), M = u(null), N = u(null), P = u(0), { style: F, side: I } = a(M, j[O(501)], {
46
46
  matchWidth: !1,
47
- align: x,
48
- panelRef: M,
47
+ align: S,
48
+ panelRef: N,
49
49
  maxHeight: 560
50
50
  });
51
- c(O, [j, M], () => k(!1)), u(() => () => window.clearTimeout(N[D(410)]), []), u(() => {
52
- let e = D;
53
- if (!O || b !== e(418) || !w) return;
54
- let t = requestAnimationFrame(() => {
55
- let t = e, n = M[t(410)];
56
- n && (l(n)[0] ?? n)[t(395)]({ preventScroll: !0 });
51
+ o(k, [M, N], () => A(!1)), l(() => () => window.clearTimeout(P[O(481)]), []), l(() => {
52
+ if (!k || x !== "click" || !T) return;
53
+ let e = requestAnimationFrame(() => {
54
+ let e = c, t = N[e(481)];
55
+ t && (s(t)[0] ?? t)[e(483)]({ preventScroll: !0 });
57
56
  });
58
- return () => cancelAnimationFrame(t);
57
+ return () => cancelAnimationFrame(e);
59
58
  }, [
60
- O,
61
- b,
62
- w
63
- ]), u(() => {
64
- let e = D;
65
- !O && M.current?.contains(document[e(422)]) && j[e(410)] && l(j.current)[0]?.[e(395)]({ preventScroll: !0 });
66
- }, [O]);
67
- let I = () => k(!1), L = (e) => {
68
- let t = D, n = e[t(390)];
69
- j[t(410)]?.[t(414)](n) || M[t(410)]?.[t(414)](n) || k(!1);
70
- }, R = (e) => {
71
- let t = D;
72
- e[t(389)] === t(402) && O && !e[t(425)] && (e.preventDefault(), I());
73
- }, z = b === D(424) ? {
59
+ k,
60
+ x,
61
+ T
62
+ ]), l(() => {
63
+ let e = O;
64
+ !k && N[e(481)]?.[e(484)](document[e(509)]) && M[e(481)] && s(M.current)[0]?.focus({ preventScroll: !0 });
65
+ }, [k]);
66
+ let L = () => A(!1), R = (e) => {
67
+ let t = O, n = e[t(514)];
68
+ M.current?.contains(n) || N[t(481)]?.[t(484)](n) || A(!1);
69
+ }, z = (e) => {
70
+ let t = O;
71
+ e[t(491)] === t(479) && k && !e[t(503)] && (e[t(510)](), L());
72
+ }, B = x === O(497) ? {
74
73
  onPointerEnter: (e) => {
75
- let t = D;
76
- e[t(411)] === t(420) && (window[t(399)](N[t(410)]), N[t(410)] = window[t(419)](() => k(!0), O ? 0 : n.hoverIntent));
74
+ let n = O;
75
+ e[n(506)] === n(494) && (window[n(485)](P[n(481)]), P[n(481)] = window[n(478)](() => A(!0), k ? 0 : t[n(515)]));
77
76
  },
78
77
  onPointerLeave: (e) => {
79
- let t = D;
80
- e.pointerType === "mouse" && (window[t(399)](N[t(410)]), N[t(410)] = window.setTimeout(() => k(!1), n[t(394)]));
78
+ let n = O;
79
+ e[n(506)] === n(494) && (window.clearTimeout(P[n(481)]), P.current = window[n(478)](() => A(!1), t[n(488)]));
81
80
  }
82
81
  } : {};
83
- return m(f, { children: [p(D(401), {
84
- ref: j,
85
- className: "ds-popover-anchor",
86
- onClick: b === "click" ? () => k(!O) : void 0,
87
- onFocus: b === D(424) ? (e) => e[D(415)].matches(D(391)) && k(!0) : void 0,
88
- onBlur: b === "hover" ? L : void 0,
89
- onKeyDown: R,
90
- "aria-expanded": O,
91
- ...z,
92
- children: e
93
- }), A[D(423)] && h(p("div", {
82
+ return p(d, { children: [f("span", {
94
83
  ref: M,
95
- role: D(412),
96
- "aria-label": E,
84
+ className: "ds-popover-anchor",
85
+ onClick: x === O(512) ? () => A(!k) : void 0,
86
+ onFocus: x === O(497) ? (e) => e.target[O(486)](O(499)) && A(!0) : void 0,
87
+ onBlur: x === O(497) ? R : void 0,
88
+ onKeyDown: z,
89
+ "aria-expanded": k,
90
+ ...B,
91
+ children: m
92
+ }), j[O(501)] && h(f(O(511), {
93
+ ref: N,
94
+ role: O(508),
95
+ "aria-label": D,
97
96
  tabIndex: -1,
98
- className: a(D(405), D(398), D(396) + C, T),
99
- "data-side": F,
100
- "data-state": A.closing ? "closed" : D(404),
97
+ className: i("ds-floating", O(505), O(487) + w, E),
98
+ "data-side": I,
99
+ "data-state": j[O(490)] ? O(498) : O(482),
101
100
  style: {
102
- ...P,
103
- width: S,
104
- maxWidth: D(392)
101
+ ...F,
102
+ width: C,
103
+ maxWidth: O(495)
105
104
  },
106
- onKeyDown: R,
107
- onBlur: b === D(424) ? L : void 0,
108
- ...z,
109
- children: typeof s == "function" ? s(() => I()) : s
110
- }), document.body)] });
105
+ onKeyDown: z,
106
+ onBlur: x === O(497) ? R : void 0,
107
+ ...B,
108
+ children: typeof _ === O(502) ? _(() => L()) : _
109
+ }), document[O(492)])] });
111
110
  }
112
111
  export { _ as Popover };