@iamfiro/design 0.3.4 → 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 (158) hide show
  1. package/agents/app-shell/AGENTS.md +99 -1
  2. package/lib/components/Accordion/Accordion2.js +93 -93
  3. package/lib/components/ActionBar/ActionBar2.js +44 -40
  4. package/lib/components/Alert/Alert2.js +64 -64
  5. package/lib/components/AppShell/AppShell2.js +73 -66
  6. package/lib/components/AreaChart/AreaChart.js +49 -47
  7. package/lib/components/BarChart/BarChart2.js +107 -107
  8. package/lib/components/BarList/BarList2.js +99 -99
  9. package/lib/components/Breadcrumb/Breadcrumb2.js +53 -56
  10. package/lib/components/Calendar/Calendar2.js +164 -164
  11. package/lib/components/Calendar/DatePicker2.js +76 -77
  12. package/lib/components/Calendar/date.js +49 -70
  13. package/lib/components/Card/Card2.js +104 -77
  14. package/lib/components/CardFrame/CardFrame2.js +46 -42
  15. package/lib/components/Chart/ChartParts.js +73 -73
  16. package/lib/components/Chart/chart2.js +53 -53
  17. package/lib/components/Chart/useChartInteraction.js +49 -49
  18. package/lib/components/ChatBubble/ChatBubble2.js +118 -118
  19. package/lib/components/ChatBubble/formatChatTime.js +42 -41
  20. package/lib/components/ChatComposer/ChatComposer2.js +102 -102
  21. package/lib/components/CodeBlock/CodeBlock2.js +51 -51
  22. package/lib/components/CodeBlock/highlight.js +85 -85
  23. package/lib/components/ColorPicker/ColorPicker2.js +373 -374
  24. package/lib/components/ColorPicker/color.js +94 -94
  25. package/lib/components/ColorPicker/presets.js +47 -46
  26. package/lib/components/Combobox/Combobox2.js +118 -117
  27. package/lib/components/CommandMenu/CommandMenu.js +121 -122
  28. package/lib/components/Comment/Comment2.js +56 -81
  29. package/lib/components/ContextMenu/ContextMenu2.js +91 -93
  30. package/lib/components/DataGrid/DataGrid2.js +845 -845
  31. package/lib/components/DataGrid/GridPopover.js +97 -97
  32. package/lib/components/DataGrid/anchor.js +34 -36
  33. package/lib/components/DataGrid/model.js +299 -299
  34. package/lib/components/DataGrid/panels.js +393 -393
  35. package/lib/components/DataGrid/typeMeta.js +53 -53
  36. package/lib/components/DataGrid/types.js +22 -22
  37. package/lib/components/DescriptionList/DescriptionList2.js +57 -57
  38. package/lib/components/Dialog/AlertDialog.js +56 -56
  39. package/lib/components/Dialog/Dialog2.js +68 -69
  40. package/lib/components/Dialog/modal.js +61 -57
  41. package/lib/components/Drawer/Drawer2.js +161 -161
  42. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -267
  43. package/lib/components/DropdownMenu/menuCore.js +42 -68
  44. package/lib/components/Dropzone/Dropzone2.js +81 -81
  45. package/lib/components/EmptyState/EmptyState2.js +55 -54
  46. package/lib/components/FileChip/FileChip2.js +39 -63
  47. package/lib/components/FileUpload/FileUpload.js +157 -156
  48. package/lib/components/FilterChips/FilterChips2.js +51 -51
  49. package/lib/components/FunnelChart/FunnelChart2.js +171 -171
  50. package/lib/components/FunnelChart/funnel.js +55 -57
  51. package/lib/components/Highlight/Highlight2.js +48 -48
  52. package/lib/components/HoverCard/HoverCard.js +59 -59
  53. package/lib/components/InlineDiff/InlineDiff2.js +110 -111
  54. package/lib/components/InlineDiff/diff.js +89 -89
  55. package/lib/components/InlineDiff/useDiffReview.js +63 -65
  56. package/lib/components/Kanban/Kanban2.js +424 -425
  57. package/lib/components/Kanban/KanbanCard.js +98 -73
  58. package/lib/components/Kanban/move.js +52 -49
  59. package/lib/components/LineChart/LineChart2.js +222 -222
  60. package/lib/components/List/List2.js +60 -59
  61. package/lib/components/Listbox/Listbox2.js +117 -117
  62. package/lib/components/Marker/Marker2.js +58 -59
  63. package/lib/components/Menubar/Menubar2.js +121 -123
  64. package/lib/components/MultiSelect/MultiSelect2.js +115 -115
  65. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -276
  66. package/lib/components/NoticeStack/NoticeStack2.js +98 -98
  67. package/lib/components/NumberStepper/NumberStepper2.js +67 -66
  68. package/lib/components/OtpInput/OtpInput2.js +93 -93
  69. package/lib/components/Pagination/Pagination2.js +87 -87
  70. package/lib/components/Pagination/paginationRange.js +39 -37
  71. package/lib/components/PhoneInput/PhoneInput.js +78 -78
  72. package/lib/components/PieChart/PieChart2.js +117 -117
  73. package/lib/components/PieChart/arc.js +57 -58
  74. package/lib/components/PieChart/useArcTween.js +45 -40
  75. package/lib/components/Popover/Popover2.js +73 -74
  76. package/lib/components/ProgressTracker/ProgressTracker2.js +128 -128
  77. package/lib/components/Rating/Rating2.js +95 -95
  78. package/lib/components/Resizable/Resizable2.js +86 -86
  79. package/lib/components/Resizable/layout.js +73 -73
  80. package/lib/components/ScaledPreview/ScaledPreview2.js +68 -68
  81. package/lib/components/ScatterChart/ScatterChart2.js +172 -172
  82. package/lib/components/ScatterChart/scatter.js +55 -56
  83. package/lib/components/ScrollArea/ScrollArea2.js +130 -131
  84. package/lib/components/Select/Select2.js +86 -85
  85. package/lib/components/Sidebar/Sidebar2.js +92 -86
  86. package/lib/components/Sidebar/rail.js +43 -0
  87. package/lib/components/Skeleton/Skeleton2.js +60 -61
  88. package/lib/components/Slider/Slider2.js +73 -73
  89. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -55
  90. package/lib/components/SparkChart/SparkChart2.js +140 -141
  91. package/lib/components/SparkChart/spark.js +50 -48
  92. package/lib/components/Sparkbar/Sparkbar2.js +56 -56
  93. package/lib/components/SplitView/SplitView2.js +47 -46
  94. package/lib/components/Stat/Stat2.js +61 -61
  95. package/lib/components/StepList/StepList2.js +76 -76
  96. package/lib/components/Table/Table2.js +70 -70
  97. package/lib/components/Tabs/Tabs2.js +85 -85
  98. package/lib/components/TagInput/TagInput2.js +217 -218
  99. package/lib/components/TimePicker/TimePicker2.js +217 -216
  100. package/lib/components/TimePicker/time.js +60 -58
  101. package/lib/components/Timeline/Timeline2.js +181 -181
  102. package/lib/components/Timeline/scale.js +60 -65
  103. package/lib/components/Toast/Toaster.js +146 -148
  104. package/lib/components/Toast/store.js +85 -85
  105. package/lib/components/ToggleGroup/ToggleGroup2.js +79 -79
  106. package/lib/components/Toolbar/Toolbar2.js +120 -121
  107. package/lib/components/Tracker/Tracker2.js +79 -79
  108. package/lib/components/TreeDiagram/TreeDiagram2.js +116 -116
  109. package/lib/components/TreeView/TreeView2.js +162 -163
  110. package/lib/hooks/timing.js +32 -35
  111. package/lib/hooks/useControllableState.js +35 -35
  112. package/lib/hooks/useCountdown.js +53 -52
  113. package/lib/hooks/useDigitInput.js +82 -81
  114. package/lib/hooks/useDismiss.js +48 -48
  115. package/lib/hooks/useElapsed.js +40 -43
  116. package/lib/hooks/useFloating.js +47 -47
  117. package/lib/hooks/useFocusTrap.js +45 -69
  118. package/lib/hooks/usePresence.js +49 -50
  119. package/lib/hooks/usePressToOpen.js +43 -43
  120. package/lib/hooks/useScrollLock.js +45 -43
  121. package/lib/hooks/useSelection.js +44 -46
  122. package/lib/index.js +105 -106
  123. package/lib/primitives/AspectRatio2.js +57 -56
  124. package/lib/primitives/BrandIcon.js +177 -177
  125. package/lib/primitives/ColorDot2.js +44 -48
  126. package/lib/primitives/CopyButton2.js +54 -55
  127. package/lib/primitives/CountBadge2.js +45 -48
  128. package/lib/primitives/Countdown2.js +35 -37
  129. package/lib/primitives/Delta2.js +41 -41
  130. package/lib/primitives/Elapsed.js +43 -41
  131. package/lib/primitives/FileIcon2.js +94 -94
  132. package/lib/primitives/Flag2.js +97 -97
  133. package/lib/primitives/IconStack2.js +53 -55
  134. package/lib/primitives/IconTile2.js +45 -41
  135. package/lib/primitives/Kbd2.js +57 -57
  136. package/lib/primitives/Layout2.js +66 -66
  137. package/lib/primitives/Link2.js +42 -47
  138. package/lib/primitives/MaskedText2.js +47 -69
  139. package/lib/primitives/Progress2.js +71 -71
  140. package/lib/primitives/RelativeTime.js +47 -43
  141. package/lib/primitives/SearchInput2.js +70 -66
  142. package/lib/primitives/SelectorButton2.js +70 -67
  143. package/lib/primitives/Spinner2.js +58 -59
  144. package/lib/primitives/StatusIcon2.js +70 -70
  145. package/lib/primitives/Swatch2.js +57 -55
  146. package/lib/primitives/Tooltip2.js +78 -78
  147. package/lib/primitives/Typography2.js +54 -54
  148. package/lib/primitives/formatCountdown.js +37 -38
  149. package/lib/primitives/formatElapsed.js +46 -45
  150. package/lib/primitives/formatRelativeTime.js +43 -69
  151. package/lib/primitives/hotkey.js +66 -66
  152. package/lib/primitives/index.js +152 -152
  153. package/lib/primitives/maskValue.js +30 -32
  154. package/lib/style.css +1 -1
  155. package/lib/types/components/AppShell/AppShell.d.ts +9 -2
  156. package/lib/types/components/Sidebar/rail.d.ts +4 -0
  157. package/lib/types/components/index.d.ts +1 -0
  158. package/package.json +1 -1
@@ -1,394 +1,394 @@
1
1
  "use client";
2
- const e = a;
2
+ const e = j;
3
3
  (function(e, t) {
4
- let n = a, r = e();
4
+ let n = j, r = e();
5
5
  for (;;) try {
6
- if (-parseInt(n(528)) / 1 + parseInt(n(563)) / 2 + parseInt(n(538)) / 3 + parseInt(n(561)) / 4 + -parseInt(n(517)) / 5 + parseInt(n(553)) / 6 * (-parseInt(n(581)) / 7) + parseInt(n(504)) / 8 == t) break;
6
+ if (-parseInt(n(194)) / 1 + parseInt(n(177)) / 2 + parseInt(n(226)) / 3 * (parseInt(n(169)) / 4) + -parseInt(n(196)) / 5 * (parseInt(n(195)) / 6) + parseInt(n(240)) / 7 + parseInt(n(208)) / 8 + parseInt(n(241)) / 9 * (parseInt(n(181)) / 10) == t) break;
7
7
  r.push(r.shift());
8
8
  } catch {
9
9
  r.push(r.shift());
10
10
  }
11
- })(z, 756482);
11
+ })(d, 219545);
12
12
  import { Kbd as t } from "../../primitives/Kbd2.js";
13
13
  import { TIMING as n } from "../../hooks/timing.js";
14
14
  import { usePresence as r } from "../../hooks/usePresence.js";
15
15
  import { useControllableState as i } from "../../hooks/useControllableState.js";
16
- function a(e, t) {
17
- e -= 491;
18
- let n = z(), r = n[e];
19
- a.ZpgqJx === void 0 && (a.NpnnOp = function(e) {
20
- let t = "", n = "";
21
- 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);
22
- for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
23
- return decodeURIComponent(n);
24
- }, a.zJmFmE = {}, a.ZpgqJx = !0);
25
- let i = n[0];
26
- a.HXzNXW !== i && (a.zJmFmE = {}, a.HXzNXW = i);
27
- let o = a.zJmFmE[e];
28
- return o === void 0 ? (r = a.NpnnOp(r), a.zJmFmE[e] = r) : r = o, r;
29
- }
30
- import { useFloating as o } from "../../hooks/useFloating.js";
31
- import { useDismiss as s } from "../../hooks/useDismiss.js";
16
+ import { useFloating as a } from "../../hooks/useFloating.js";
17
+ import { useDismiss as o } from "../../hooks/useDismiss.js";
32
18
  /* empty css */
33
- import { MenuContext as c, menuItems as l, trackPressDragRelease as u, useMenuRoot as d } from "./menuCore.js";
19
+ import { MenuContext as s, menuItems as c, trackPressDragRelease as l, useMenuRoot as u } from "./menuCore.js";
34
20
  /* empty css */
21
+ function d() {
22
+ let e = /* @__PURE__ */ "zML4zwq.Dgv4Da.Ag92zxjjBNrLBNq.qxjYB3DvCa.Aw5JBhvKzxm.Dg9W.C3rYAw5N.yM9KEq.CxvLCNLtzwXLy3rVCG.y2XVC2vZDa.nJK0mJK1z2jQAMne.mZy5ndv2s3HVqwK.BwvUDwL0zw1YywrPBW.qxjYB3DeB3DU.yNv0Dg9UlcbBAhjLzL0SifT0ywjPBMrLEf0.Bwv0yuTLEq.tgfIzwW.Aw5UzxjizwLNAhq.Bwf4.C2v0vgLTzw91Da.q2HLy2TIB3HjDgvT.C2v0qwLT.qxjYB3DsAwDODa.zMLUza.CMLNAhq.zhmTBwvUDv9FAwnVBG.zhmTBwvUDv9FDgv4Da.BgvMDa.y3vYCMvUD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");
23
+ return d = function() {
24
+ return e;
25
+ }, d();
26
+ }
35
27
  import { createContext as f, useContext as p, useEffect as m, useId as h, useLayoutEffect as g, useRef as _, useState as v } from "react";
36
28
  import { Check as y, ChevronRight as b } from "lucide-react";
37
29
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
38
30
  import { createPortal as w } from "react-dom";
39
- var T = 160, E = c, D = l, O = () => {
40
- let e = a, t = p(E);
41
- if (!t) throw Error(e(513));
42
- return t;
31
+ var T = 160, E = s, D = c, O = () => {
32
+ let e = p(E);
33
+ if (!e) throw Error("Menu items must be used inside <DropdownMenu>, <ContextMenu> or <MenubarMenu>");
34
+ return e;
43
35
  }, k = f({
44
36
  openSub: null,
45
37
  setOpenSub: () => {}
46
38
  });
47
- function A({ trigger: t, children: n, open: c, defaultOpen: l = !1, onOpenChange: f, align: p = e(506), minWidth: g = 200, "aria-label": v }) {
48
- let y = e, [b, x] = i(c, l, f), w = r(b, T), O = _(null), k = _(null), A = _(y(496)), M = _(""), N = h(), { style: P, side: F } = o(O, w[y(525)], {
39
+ function A({ trigger: e, children: t, open: n, defaultOpen: s = !1, onOpenChange: c, align: d = "start", minWidth: f = 200, "aria-label": p }) {
40
+ let g = j, [v, y] = i(n, s, c), b = r(v, T), x = _(null), w = _(null), O = _(g(173)), k = _(""), A = h(), { style: N, side: P } = a(x, b[g(209)], {
49
41
  matchWidth: !1,
50
- align: p,
51
- panelRef: k,
42
+ align: d,
43
+ panelRef: w,
52
44
  maxHeight: 420
53
- }), I = () => O[y(499)]?.[y(511)]("button, [href], [tabindex]")?.[y(542)]({ preventScroll: !0 }), L = (e = !0) => {
54
- x(!1), e && I();
55
- }, R = d(L);
56
- return s(b, [
57
- O,
58
- k,
59
- ...R[y(530)]
60
- ], () => x(!1)), m(() => {
61
- if (!b) return;
45
+ }), F = () => x[g(190)]?.[g(238)](g(244))?.[g(228)]({ preventScroll: !0 }), I = (e = !0) => {
46
+ y(!1), e && F();
47
+ }, L = u(I);
48
+ return o(v, [
49
+ x,
50
+ w,
51
+ ...L[g(227)]
52
+ ], () => y(!1)), m(() => {
53
+ if (!v) return;
62
54
  let e = requestAnimationFrame(() => {
63
- let e = a;
64
- A[e(499)] === e(537) ? D(k[e(499)])[0]?.[e(542)]({ preventScroll: !0 }) : k[e(499)]?.[e(542)]({ preventScroll: !0 });
55
+ let e = j;
56
+ O[e(190)] === e(214) ? D(w[e(190)])[0]?.[e(228)]({ preventScroll: !0 }) : w[e(190)]?.[e(228)]({ preventScroll: !0 });
65
57
  });
66
58
  return () => cancelAnimationFrame(e);
67
- }, [b]), C(E[y(586)], {
68
- value: R,
69
- children: [S(y(571), {
70
- ref: O,
71
- className: "ds-popover-anchor",
72
- "aria-haspopup": y(510),
73
- "aria-expanded": b,
74
- "aria-controls": b ? N : void 0,
59
+ }, [v]), C(E[g(172)], {
60
+ value: L,
61
+ children: [S(g(219), {
62
+ ref: x,
63
+ className: g(166),
64
+ "aria-haspopup": g(223),
65
+ "aria-expanded": v,
66
+ "aria-controls": v ? A : void 0,
75
67
  onPointerDown: (e) => {
76
- let t = y;
77
- if (M.current = e[t(556)], e[t(556)] === t(532) && e[t(516)] === 0) {
78
- if (e.preventDefault(), b) return L(!1);
79
- A[t(499)] = t(496), x(!0), u(e);
68
+ let t = g;
69
+ if (k.current = e[t(184)], e[t(184)] === "mouse" && e[t(197)] === 0) {
70
+ if (e[t(189)](), v) return I(!1);
71
+ O[t(190)] = t(173), y(!0), l(e);
80
72
  }
81
73
  },
82
74
  onKeyDown: (e) => {
83
- let t = y;
84
- if (e[t(521)] === t(579) && b) return e[t(534)](), L();
75
+ let t = g;
76
+ if (e.key === t(220) && v) return e[t(189)](), I();
85
77
  [
86
- "Enter",
78
+ t(191),
87
79
  " ",
88
- t(557),
89
- t(567)
90
- ][t(582)](e.key) && (e[t(534)](), A[t(499)] = "keyboard", x(!0), e[t(521)] === t(567) && requestAnimationFrame(() => D(k[t(499)]).at(-1)?.[t(542)]()));
80
+ "ArrowDown",
81
+ t(233)
82
+ ].includes(e[t(185)]) && (e[t(189)](), O[t(190)] = t(214), y(!0), e[t(185)] === t(233) && requestAnimationFrame(() => D(w.current).at(-1)?.[t(228)]()));
91
83
  },
92
84
  onClick: (e) => {
93
- let t = y;
94
- (e[t(497)] === 0 || M[t(499)] !== t(532)) && (A[t(499)] = e.detail === 0 ? t(537) : "pointer", x(!b));
85
+ let t = g;
86
+ (e.detail === 0 || k.current !== t(188)) && (O[t(190)] = e.detail === 0 ? t(214) : "pointer", y(!v));
95
87
  },
96
- children: t
97
- }), w[y(525)] && S(j, {
98
- id: N,
99
- panelRef: k,
100
- side: F,
101
- closing: w[y(543)],
88
+ children: e
89
+ }), b.mounted && S(M, {
90
+ id: A,
91
+ panelRef: w,
92
+ side: P,
93
+ closing: b.closing,
102
94
  style: {
103
- ...P,
104
- minWidth: g
95
+ ...N,
96
+ minWidth: f
105
97
  },
106
- "aria-label": v,
107
- onEscape: () => L(),
108
- children: n
98
+ "aria-label": p,
99
+ onEscape: () => I(),
100
+ children: t
109
101
  })]
110
102
  });
111
103
  }
112
- function j({ id: t, panelRef: n, side: r, closing: i, style: o, onEscape: s, onArrowLeft: c, onArrowRight: l, onPointerEnter: u, className: d, children: f, "aria-label": p, "aria-labelledby": m }) {
113
- let h = e, { closeAll: g } = O(), y = _({
104
+ function j(e, t) {
105
+ e -= 165;
106
+ let n = d(), r = n[e];
107
+ j.YrwgJl === void 0 && (j.cKQiaY = function(e) {
108
+ let t = "", n = "";
109
+ 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);
110
+ for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
111
+ return decodeURIComponent(n);
112
+ }, j.GAkzPA = {}, j.YrwgJl = !0);
113
+ let i = n[0];
114
+ j.dzChzi !== i && (j.GAkzPA = {}, j.dzChzi = i);
115
+ let a = j.GAkzPA[e];
116
+ return a === void 0 ? (r = j.cKQiaY(r), j.GAkzPA[e] = r) : r = a, r;
117
+ }
118
+ function M({ id: e, panelRef: t, side: n, closing: r, style: i, onEscape: a, onArrowLeft: o, onArrowRight: s, onPointerEnter: c, className: l, children: u, "aria-label": d, "aria-labelledby": f }) {
119
+ let p = j, { closeAll: m } = O(), h = _({
114
120
  text: "",
115
121
  at: 0
116
- }), [b, x] = v(null);
117
- return w(S(h(555), {
118
- ref: n,
119
- id: t,
120
- role: "menu",
121
- "aria-label": p,
122
- "aria-labelledby": m,
122
+ }), [g, y] = v(null);
123
+ return w(S(p(175), {
124
+ ref: t,
125
+ id: e,
126
+ role: p(223),
127
+ "aria-label": d,
128
+ "aria-labelledby": f,
123
129
  tabIndex: -1,
124
- className: d ? h(509) + d : "ds-floating ds-scroll ds-menu",
125
- "data-side": r,
126
- "data-state": h(i ? 492 : 576),
127
- style: o,
130
+ className: l ? p(266) + l : "ds-floating ds-scroll ds-menu",
131
+ "data-side": n,
132
+ "data-state": r ? p(193) : "open",
133
+ style: i,
128
134
  onKeyDown: (e) => {
129
- let t = a;
130
- if (e.target instanceof HTMLElement && e[t(568)][t(539)](t(503)) !== n[t(499)]) return;
131
- let r = D(n[t(499)]), i = r.indexOf(document[t(565)]), o = (e) => r[(e + r.length) % r[t(587)]]?.[t(542)]();
132
- switch (e.key) {
133
- case "ArrowDown":
134
- e[t(534)](), o(i + 1);
135
+ let n = j;
136
+ if (e[n(207)] instanceof HTMLElement && e[n(207)][n(239)](n(262)) !== t[n(190)]) return;
137
+ let r = D(t[n(190)]), i = r[n(168)](document.activeElement), c = (e) => r[(e + r[n(261)]) % r[n(261)]]?.[n(228)]();
138
+ switch (e[n(185)]) {
139
+ case n(243):
140
+ e[n(189)](), c(i + 1);
135
141
  break;
136
- case t(567):
137
- e[t(534)](), o(i < 0 ? -1 : i - 1);
142
+ case n(233):
143
+ e[n(189)](), c(i < 0 ? -1 : i - 1);
138
144
  break;
139
- case "Home":
140
- e[t(534)](), o(0);
145
+ case n(212):
146
+ e[n(189)](), c(0);
141
147
  break;
142
- case t(498):
143
- e[t(534)](), o(-1);
148
+ case n(186):
149
+ e[n(189)](), c(-1);
144
150
  break;
145
- case "Escape":
146
- e[t(534)](), e[t(508)](), s();
151
+ case n(220):
152
+ e[n(189)](), e[n(180)](), a();
147
153
  break;
148
154
  case "ArrowLeft":
149
- c && (e.preventDefault(), c());
155
+ o && (e[n(189)](), o());
150
156
  break;
151
- case "ArrowRight":
152
- l && (e[t(534)](), l());
157
+ case n(252):
158
+ s && (e[n(189)](), s());
153
159
  break;
154
- case t(584):
155
- e[t(534)](), g(!0);
160
+ case "Tab":
161
+ e[n(189)](), m(!0);
156
162
  break;
157
- default: if (e.key[t(587)] === 1 && !e.ctrlKey && !e[t(583)] && !e[t(569)]) {
158
- let n = Date[t(552)](), a = y.current;
159
- a[t(546)] = n - a.at > 600 ? e.key : a[t(546)] + e.key, a.at = n, [...r[t(500)](i + 1), ...r[t(500)](0, i + 1)][t(580)]((e) => e[t(572)]?.trim()[t(536)]().startsWith(a[t(546)][t(536)]()))?.[t(542)]();
163
+ default: if (e[n(185)][n(261)] === 1 && !e[n(198)] && !e[n(245)] && !e.altKey) {
164
+ let t = Date[n(202)](), a = h.current;
165
+ a[n(231)] = t - a.at > 600 ? e.key : a.text + e[n(185)], a.at = t, [...r[n(205)](i + 1), ...r[n(205)](0, i + 1)][n(253)]((e) => e.textContent?.[n(170)]().toLowerCase()[n(176)](a[n(231)][n(183)]()))?.[n(228)]();
160
166
  }
161
167
  }
162
168
  },
163
- onPointerEnter: u,
164
- onPointerDown: (e) => e[h(568)] === e[h(526)] && e[h(534)](),
165
- children: S(k[h(586)], {
169
+ onPointerEnter: c,
170
+ onPointerDown: (e) => e[p(207)] === e[p(258)] && e.preventDefault(),
171
+ children: S(k[p(172)], {
166
172
  value: {
167
- openSub: b,
168
- setOpenSub: x
173
+ openSub: g,
174
+ setOpenSub: y
169
175
  },
170
- children: f
176
+ children: u
171
177
  })
172
- }), document[h(588)]);
178
+ }), document[p(237)]);
173
179
  }
174
- function M({ role: n, checked: r, danger: i, disabled: a, icon: o, indicator: s, description: c, shortcut: l, trailing: u, children: d, onActivate: f, extra: m }) {
175
- let h = e, { isAimingAtSub: g } = O(), _ = p(k), v = m?.[h(549)] !== void 0;
176
- return C(h(555), {
177
- role: n,
180
+ function N({ role: e, checked: n, danger: r, disabled: i, icon: a, indicator: o, description: s, shortcut: c, trailing: l, children: u, onActivate: d, extra: f }) {
181
+ let m = j, { isAimingAtSub: h } = O(), g = p(k), _ = f?.[m(187)] !== void 0;
182
+ return C(m(175), {
183
+ role: e,
178
184
  tabIndex: -1,
179
185
  "data-menu-item": "",
180
- "aria-checked": r,
181
- "aria-disabled": a || void 0,
182
- "data-danger": i || void 0,
183
- className: h(524),
186
+ "aria-checked": n,
187
+ "aria-disabled": i || void 0,
188
+ "data-danger": r || void 0,
189
+ className: m(225),
184
190
  onPointerMove: (e) => {
185
- let t = h;
186
- a || e[t(526)] === document[t(565)] || g(e[t(547)], e[t(515)]) || (e.currentTarget[t(542)]({ preventScroll: !0 }), v || _[t(491)](null));
191
+ let t = m;
192
+ i || e[t(258)] === document[t(217)] || h(e[t(264)], e[t(171)]) || (e[t(258)][t(228)]({ preventScroll: !0 }), _ || g[t(259)](null));
187
193
  },
188
- onClick: () => !a && f(),
194
+ onClick: () => !i && d(),
189
195
  onKeyDown: (e) => {
190
- let t = h;
191
- e[t(521)] !== t(527) && e.key !== " " || a || (e[t(534)](), f());
196
+ let t = m;
197
+ e.key !== "Enter" && e[t(185)] !== " " || i || (e.preventDefault(), d());
192
198
  },
193
- ...m,
199
+ ...f,
194
200
  children: [
195
- s !== void 0 && S(h(571), {
196
- className: h(578),
197
- children: s
198
- }),
199
- o && S(h(571), {
200
- className: h(585),
201
+ o !== void 0 && S("span", {
202
+ className: m(179),
201
203
  children: o
202
204
  }),
203
- C(h(571), {
204
- className: h(560),
205
- children: [S(h(571), {
206
- className: h(554),
207
- children: d
208
- }), c && S(h(571), {
209
- className: "ds-menu__desc",
210
- children: c
205
+ a && S(m(219), {
206
+ className: m(255),
207
+ children: a
208
+ }),
209
+ C(m(219), {
210
+ className: m(256),
211
+ children: [S(m(219), {
212
+ className: m(174),
213
+ children: u
214
+ }), s && S(m(219), {
215
+ className: m(210),
216
+ children: s
211
217
  })]
212
218
  }),
213
- l && S(t, {
214
- keys: l,
219
+ c && S(t, {
220
+ keys: c,
215
221
  size: "sm",
216
- className: "ds-menu__shortcut"
222
+ className: m(260)
217
223
  }),
218
- u
224
+ l
219
225
  ]
220
226
  });
221
227
  }
222
- function N({ onSelect: t, danger: n, keepOpen: r, ...i }) {
223
- let a = e, { closeAll: o } = O();
224
- return S(M, {
225
- role: a(566),
226
- danger: n,
227
- ...i,
228
+ function P({ onSelect: e, danger: t, keepOpen: n, ...r }) {
229
+ let i = j, { closeAll: a } = O();
230
+ return S(N, {
231
+ role: i(200),
232
+ danger: t,
233
+ ...r,
228
234
  onActivate: () => {
229
- r || o(), t?.();
235
+ n || a(), e?.();
230
236
  }
231
237
  });
232
238
  }
233
- function P({ checked: t, onCheckedChange: n, closeOnSelect: r, ...i }) {
234
- let a = e, { closeAll: o } = O();
235
- return S(M, {
236
- role: a(522),
237
- checked: t,
239
+ function F({ checked: e, onCheckedChange: t, closeOnSelect: n, ...r }) {
240
+ let i = j, { closeAll: a } = O();
241
+ return S(N, {
242
+ role: i(221),
243
+ checked: e,
238
244
  indicator: S(y, {
239
- className: a(590),
240
- "data-on": t || void 0
245
+ className: "ds-menu__check",
246
+ "data-on": e || void 0
241
247
  }),
242
- ...i,
248
+ ...r,
243
249
  onActivate: () => {
244
- n(!t), r && o();
250
+ t(!e), n && a();
245
251
  }
246
252
  });
247
253
  }
248
- var F = f(null);
249
- function I({ value: t, onValueChange: n, label: r, children: i }) {
250
- let a = e;
251
- return S(F[a(586)], {
254
+ var I = f(null);
255
+ function L({ value: e, onValueChange: t, label: n, children: r }) {
256
+ let i = j;
257
+ return S(I[i(172)], {
252
258
  value: {
253
- value: t,
254
- onChange: n
259
+ value: e,
260
+ onChange: t
255
261
  },
256
- children: C(a(555), {
257
- role: "group",
258
- "aria-label": typeof r === a(507) ? r : void 0,
259
- children: [r && S(R, { children: r }), i]
262
+ children: C(i(175), {
263
+ role: i(204),
264
+ "aria-label": typeof n === i(236) ? n : void 0,
265
+ children: [n && S(z, { children: n }), r]
260
266
  })
261
267
  });
262
268
  }
263
- function L({ value: t, ...n }) {
264
- let r = e, i = p(F);
265
- if (!i) throw Error(r(493));
266
- let a = i[r(495)] === t;
267
- return S(M, {
268
- role: r(529),
269
- checked: a,
270
- indicator: S(r(571), {
271
- className: r(523),
272
- "data-on": a || void 0
269
+ function R({ value: e, ...t }) {
270
+ let n = j, r = p(I);
271
+ if (!r) throw Error("DropdownMenuRadioItem must be inside DropdownMenuRadioGroup");
272
+ let i = r.value === e;
273
+ return S(N, {
274
+ role: n(242),
275
+ checked: i,
276
+ indicator: S("span", {
277
+ className: n(222),
278
+ "data-on": i || void 0
273
279
  }),
274
- ...n,
275
- onActivate: () => i[r(570)](t)
280
+ ...t,
281
+ onActivate: () => r.onChange(e)
276
282
  });
277
283
  }
278
- function R({ children: t }) {
279
- let n = e;
280
- return S(n(555), {
281
- role: n(519),
282
- className: n(573),
283
- children: t
284
+ function z({ children: e }) {
285
+ let t = j;
286
+ return S(t(175), {
287
+ role: t(263),
288
+ className: t(211),
289
+ children: e
284
290
  });
285
291
  }
286
- function z() {
287
- let e = /* @__PURE__ */ "tgfIzwW.y2XLyxjuAw1LB3v0.zM9JDxm.y2XVC2LUzW.AgLKzgvU.Bwf4.Dgv4Da.y2XPzw50wa.sxrLBq.zgf0ys1ZDwiTDhjPz2DLCG.CMLNAhq.u2vWyxjHDg9Y.BM93.mJu4vMzOzwDo.zhmTBwvUDv9FBgfIz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.Dg9W.A2v5.BwvUDwL0zw1JAgvJA2jVEa.zhmTBwvUDv9Fzg90.zhmTBwvUDv9FAxrLBq.Bw91BNrLza.y3vYCMvUDfrHCMDLDa.rw50zxi.mJK3mtK5zKzgr1b4.BwvUDwL0zw1YywrPBW.CgfUzwXZ.ywrK.Bw91C2u.qxjYB3DsAwDODa.ChjLDMvUDerLzMf1Bhq.uMfKAw9hCM91Ca.Dg9mB3DLCKnHC2u.A2v5yM9HCMq.mtK0mJG5nLfks1r4Cq.y2XVC2vZDa".split(".");
288
- return z = function() {
289
- return e;
290
- }, z();
291
- }
292
292
  function B() {
293
- let t = e;
294
- return S(t(555), {
295
- role: t(501),
296
- className: t(564)
293
+ let e = j;
294
+ return S(e(175), {
295
+ role: e(182),
296
+ className: e(224)
297
297
  });
298
298
  }
299
299
  function V([e, t], [n, r], [i, a], [o, s]) {
300
300
  let c = (e, t, n, r, i, a) => (e - i) * (r - a) - (n - i) * (t - a), l = c(e, t, n, r, i, a), u = c(e, t, i, a, o, s), d = c(e, t, o, s, n, r);
301
301
  return !((l < 0 || u < 0 || d < 0) && (l > 0 || u > 0 || d > 0));
302
302
  }
303
- function H({ label: t, icon: i, disabled: o, children: s }) {
304
- let c = e, l = O(), u = p(k), d = h(), f = u.openSub === d, y = (e) => {
305
- let t = a;
306
- e ? u[t(491)](d) : u.openSub === d && u[t(491)](null);
307
- }, w = r(f, T), E = _(null), A = _(null), N = _(0), P = _(null), [F, I] = v({
308
- position: "fixed",
309
- visibility: c(544)
310
- }), [L, R] = v(c(550));
311
- m(() => () => window[c(541)](N[c(499)]), []), m(() => {
312
- let e = c;
313
- return l[e(530)][e(531)](A), () => {
303
+ function H({ label: e, icon: t, disabled: i, children: a }) {
304
+ let o = j, s = O(), c = p(k), l = h(), u = c[o(216)] === l, d = (e) => {
305
+ let t = o;
306
+ e ? c[t(259)](l) : c.openSub === l && c[t(259)](null);
307
+ }, f = r(u, T), y = _(null), w = _(null), E = _(0), A = _(null), [P, F] = v({
308
+ position: o(230),
309
+ visibility: o(167)
310
+ }), [I, L] = v(o(254));
311
+ m(() => () => window.clearTimeout(E.current), []), m(() => {
312
+ let e = o;
313
+ return s[e(227)].add(w), () => {
314
314
  let t = e;
315
- l[t(530)][t(574)](A);
315
+ s[t(227)][t(206)](w);
316
316
  };
317
- }, [l.panels]), g(() => {
318
- let e = c;
319
- if (!w[e(525)]) return;
320
- let t = E[e(499)]?.getBoundingClientRect(), n = A.current?.[e(559)] ?? 200, r = A[e(499)]?.offsetHeight ?? 0;
317
+ }, [s[o(227)]]), g(() => {
318
+ let e = o;
319
+ if (!f[e(209)]) return;
320
+ let t = y[e(190)]?.getBoundingClientRect(), n = w[e(190)]?.offsetWidth ?? 200, r = w[e(190)]?.[e(192)] ?? 0;
321
321
  if (!t) return;
322
- let i = t.right + 4 + n <= window.innerWidth - 8;
323
- R(e(i ? 550 : 575)), I({
324
- position: e(562),
325
- left: i ? t.right + 4 : t[e(575)] - 4 - n,
326
- top: Math[e(545)](8, Math.min(t[e(520)] - 6, window.innerHeight - r - 8)),
322
+ let i = t[e(254)] + 4 + n <= window[e(165)] - 8;
323
+ L(e(i ? 254 : 257)), F({
324
+ position: e(230),
325
+ left: i ? t.right + 4 : t.left - 4 - n,
326
+ top: Math[e(248)](8, Math[e(201)](t[e(235)] - 6, window[e(247)] - r - 8)),
327
327
  minWidth: 200
328
328
  });
329
- }, [w[c(525)]]), m(() => {
330
- let e = c;
331
- if (f) return l[e(518)]((t, n) => {
332
- let r = e, i = P.current, a = A[r(499)]?.[r(505)]();
329
+ }, [f[o(209)]]), m(() => {
330
+ let e = o;
331
+ if (u) return s[e(251)]((t, n) => {
332
+ let r = e, i = A[r(190)], a = w[r(190)]?.getBoundingClientRect();
333
333
  if (!i || !a) return !1;
334
- let o = L === r(550) ? a[r(575)] : a.right;
335
- return V([t, n], i, [o, a.top - 8], [o, a[r(558)] + 8]);
336
- }), () => l[e(518)](null);
334
+ let o = I === r(254) ? a.left : a[r(254)];
335
+ return V([t, n], i, [o, a[r(235)] - 8], [o, a.bottom + 8]);
336
+ }), () => s[e(251)](null);
337
337
  }, [
338
- f,
339
- L,
340
- l
338
+ u,
339
+ I,
340
+ s
341
341
  ]);
342
- let z = (e) => {
343
- let t = c;
344
- window.clearTimeout(N[t(499)]), y(!0), e && requestAnimationFrame(() => D(A[t(499)])[0]?.[t(542)]());
345
- }, B = (e) => {
346
- let t = c;
347
- window[t(541)](N[t(499)]), y(!1), P.current = null, e && E[t(499)]?.[t(542)]();
342
+ let R = (e) => {
343
+ let t = o;
344
+ window[t(218)](E[t(190)]), d(!0), e && requestAnimationFrame(() => D(w[t(190)])[0]?.focus());
345
+ }, z = (e) => {
346
+ let t = o;
347
+ window[t(218)](E[t(190)]), d(!1), A[t(190)] = null, e && y[t(190)]?.focus();
348
348
  };
349
- return C(x, { children: [S(M, {
350
- role: c(566),
351
- icon: i,
352
- disabled: o,
353
- trailing: S(b, { className: c(494) }),
354
- onActivate: () => z(!0),
349
+ return C(x, { children: [S(N, {
350
+ role: "menuitem",
351
+ icon: t,
352
+ disabled: i,
353
+ trailing: S(b, { className: o(178) }),
354
+ onActivate: () => R(!0),
355
355
  extra: {
356
- ref: E,
356
+ ref: y,
357
357
  "data-sub-trigger": "",
358
- "data-open": f || void 0,
359
- "aria-haspopup": c(510),
360
- "aria-expanded": f,
358
+ "data-open": u || void 0,
359
+ "aria-haspopup": o(223),
360
+ "aria-expanded": u,
361
361
  onPointerEnter: () => {
362
- let e = c;
363
- o || (window[e(541)](N.current), N[e(499)] = window[e(577)](() => z(!1), n[e(512)]));
362
+ let e = o;
363
+ i || (window[e(218)](E[e(190)]), E[e(190)] = window[e(249)](() => R(!1), n[e(232)]));
364
364
  },
365
365
  onPointerLeave: (e) => {
366
- let t = c;
367
- window[t(541)](N.current), f && (P.current = [e.clientX, e[t(515)]], N[t(499)] = window[t(577)](() => B(!1), n.hoverGrace));
366
+ let t = o;
367
+ window[t(218)](E[t(190)]), u && (A[t(190)] = [e[t(264)], e.clientY], E.current = window.setTimeout(() => z(!1), n[t(229)]));
368
368
  },
369
369
  onKeyDown: (e) => {
370
- let t = c;
370
+ let t = o;
371
371
  [
372
- t(533),
373
- "Enter",
372
+ t(252),
373
+ t(191),
374
374
  " "
375
- ][t(582)](e[t(521)]) && !o && (e[t(534)](), e[t(508)](), z(!0));
375
+ ][t(234)](e[t(185)]) && !i && (e[t(189)](), e[t(180)](), R(!0));
376
376
  }
377
377
  },
378
- children: t
379
- }), w[c(525)] && S(j, {
380
- panelRef: A,
381
- side: L,
382
- closing: w[c(543)],
383
- style: F,
384
- onEscape: () => B(!0),
385
- onArrowLeft: () => B(!0),
378
+ children: e
379
+ }), f[o(209)] && S(M, {
380
+ panelRef: w,
381
+ side: I,
382
+ closing: f[o(215)],
383
+ style: P,
384
+ onEscape: () => z(!0),
385
+ onArrowLeft: () => z(!0),
386
386
  onPointerEnter: () => {
387
- let e = c;
388
- window[e(541)](N[e(499)]), P[e(499)] = null;
387
+ let e = o;
388
+ window[e(218)](E[e(190)]), A[e(190)] = null;
389
389
  },
390
- children: s
390
+ children: a
391
391
  })] });
392
392
  }
393
- A[e(548)] = N, A[e(589)] = P, A[e(535)] = I, A[e(514)] = L, A[e(540)] = R, A[e(551)] = B, A[e(502)] = H;
394
- export { A as DropdownMenu, P as DropdownMenuCheckboxItem, N as DropdownMenuItem, R as DropdownMenuLabel, I as DropdownMenuRadioGroup, L as DropdownMenuRadioItem, B as DropdownMenuSeparator, H as DropdownMenuSub, j as MenuPanel };
393
+ A[e(203)] = P, A[e(250)] = F, A[e(199)] = L, A[e(213)] = R, A[e(246)] = z, A.Separator = B, A[e(265)] = H;
394
+ export { A as DropdownMenu, F as DropdownMenuCheckboxItem, P as DropdownMenuItem, z as DropdownMenuLabel, L as DropdownMenuRadioGroup, R as DropdownMenuRadioItem, B as DropdownMenuSeparator, H as DropdownMenuSub, M as MenuPanel };