@iamfiro/design 0.3.1 → 0.3.4

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 (161) hide show
  1. package/agents/INDEX.md +1 -1
  2. package/agents/avatar/AGENTS.md +29 -1
  3. package/agents/brand-icon/AGENTS.md +1 -1
  4. package/agents/social-login-button/AGENTS.md +4 -3
  5. package/agents/tooltip/AGENTS.md +1 -1
  6. package/lib/components/Accordion/Accordion2.js +92 -92
  7. package/lib/components/ActionBar/ActionBar2.js +42 -45
  8. package/lib/components/Alert/Alert2.js +77 -77
  9. package/lib/components/AppShell/AppShell2.js +70 -71
  10. package/lib/components/AreaChart/AreaChart.js +32 -35
  11. package/lib/components/BarChart/BarChart2.js +155 -155
  12. package/lib/components/BarList/BarList2.js +93 -93
  13. package/lib/components/Breadcrumb/Breadcrumb2.js +62 -64
  14. package/lib/components/Calendar/Calendar2.js +183 -182
  15. package/lib/components/Calendar/DatePicker2.js +116 -115
  16. package/lib/components/Calendar/date.js +67 -66
  17. package/lib/components/Card/Card2.js +67 -67
  18. package/lib/components/CardFrame/CardFrame2.js +34 -37
  19. package/lib/components/Chart/ChartParts.js +90 -90
  20. package/lib/components/Chart/chart2.js +62 -62
  21. package/lib/components/Chart/useChartInteraction.js +51 -51
  22. package/lib/components/ChatBubble/ChatBubble2.js +117 -117
  23. package/lib/components/ChatBubble/formatChatTime.js +37 -36
  24. package/lib/components/ChatComposer/ChatComposer2.js +55 -55
  25. package/lib/components/CodeBlock/CodeBlock2.js +60 -60
  26. package/lib/components/CodeBlock/highlight.js +72 -72
  27. package/lib/components/ColorPicker/ColorPicker2.js +232 -231
  28. package/lib/components/ColorPicker/color.js +67 -67
  29. package/lib/components/ColorPicker/presets.js +25 -24
  30. package/lib/components/Combobox/Combobox2.js +140 -140
  31. package/lib/components/CommandMenu/CommandMenu.js +135 -135
  32. package/lib/components/Comment/Comment2.js +82 -57
  33. package/lib/components/ContextMenu/ContextMenu2.js +101 -100
  34. package/lib/components/DataGrid/DataGrid2.js +872 -871
  35. package/lib/components/DataGrid/GridPopover.js +98 -98
  36. package/lib/components/DataGrid/anchor.js +34 -33
  37. package/lib/components/DataGrid/model.js +291 -290
  38. package/lib/components/DataGrid/panels.js +337 -336
  39. package/lib/components/DataGrid/typeMeta.js +49 -48
  40. package/lib/components/DataGrid/types.js +34 -33
  41. package/lib/components/DescriptionList/DescriptionList2.js +109 -109
  42. package/lib/components/Dialog/AlertDialog.js +53 -53
  43. package/lib/components/Dialog/Dialog2.js +72 -72
  44. package/lib/components/Dialog/modal.js +67 -68
  45. package/lib/components/Drawer/Drawer2.js +117 -117
  46. package/lib/components/DropdownMenu/DropdownMenu2.js +267 -266
  47. package/lib/components/DropdownMenu/menuCore.js +68 -42
  48. package/lib/components/Dropzone/Dropzone2.js +78 -78
  49. package/lib/components/EmptyState/EmptyState2.js +58 -56
  50. package/lib/components/FileChip/FileChip2.js +72 -48
  51. package/lib/components/FileUpload/FileUpload.js +137 -138
  52. package/lib/components/FilterChips/FilterChips2.js +61 -61
  53. package/lib/components/FunnelChart/FunnelChart2.js +161 -161
  54. package/lib/components/FunnelChart/funnel.js +50 -49
  55. package/lib/components/Highlight/Highlight2.js +56 -56
  56. package/lib/components/HoverCard/HoverCard.js +73 -73
  57. package/lib/components/InlineDiff/InlineDiff2.js +129 -129
  58. package/lib/components/InlineDiff/diff.js +87 -87
  59. package/lib/components/InlineDiff/useDiffReview.js +54 -52
  60. package/lib/components/Kanban/Kanban2.js +383 -384
  61. package/lib/components/Kanban/KanbanCard.js +68 -93
  62. package/lib/components/Kanban/move.js +43 -43
  63. package/lib/components/LineChart/LineChart2.js +164 -164
  64. package/lib/components/List/List2.js +60 -60
  65. package/lib/components/Listbox/Listbox2.js +108 -108
  66. package/lib/components/Marker/Marker2.js +59 -57
  67. package/lib/components/Menubar/Menubar2.js +120 -119
  68. package/lib/components/MultiSelect/MultiSelect2.js +111 -111
  69. package/lib/components/NavigationMenu/NavigationMenu2.js +277 -279
  70. package/lib/components/NoticeStack/NoticeStack2.js +109 -109
  71. package/lib/components/NumberStepper/NumberStepper2.js +70 -70
  72. package/lib/components/OtpInput/OtpInput2.js +94 -94
  73. package/lib/components/Pagination/Pagination2.js +109 -109
  74. package/lib/components/Pagination/paginationRange.js +37 -38
  75. package/lib/components/PhoneInput/PhoneInput.js +83 -84
  76. package/lib/components/PieChart/PieChart2.js +157 -157
  77. package/lib/components/PieChart/arc.js +72 -72
  78. package/lib/components/PieChart/useArcTween.js +50 -53
  79. package/lib/components/Popover/Popover2.js +62 -61
  80. package/lib/components/ProgressTracker/ProgressTracker2.js +104 -104
  81. package/lib/components/Rating/Rating2.js +89 -88
  82. package/lib/components/Resizable/Resizable2.js +133 -134
  83. package/lib/components/Resizable/layout.js +56 -56
  84. package/lib/components/ScaledPreview/ScaledPreview2.js +64 -63
  85. package/lib/components/ScatterChart/ScatterChart2.js +252 -251
  86. package/lib/components/ScatterChart/scatter.js +50 -52
  87. package/lib/components/ScrollArea/ScrollArea2.js +122 -122
  88. package/lib/components/Select/Select2.js +84 -85
  89. package/lib/components/Sidebar/Sidebar2.js +79 -79
  90. package/lib/components/Skeleton/Skeleton2.js +56 -56
  91. package/lib/components/Slider/Slider2.js +63 -63
  92. package/lib/components/SocialLoginButton/SocialLoginButton.js +54 -46
  93. package/lib/components/SparkChart/SparkChart2.js +129 -128
  94. package/lib/components/SparkChart/spark.js +49 -48
  95. package/lib/components/Sparkbar/Sparkbar2.js +59 -58
  96. package/lib/components/SplitView/SplitView2.js +54 -55
  97. package/lib/components/Stat/Stat2.js +59 -59
  98. package/lib/components/StepList/StepList2.js +78 -78
  99. package/lib/components/Table/Table2.js +55 -55
  100. package/lib/components/Tabs/Tabs2.js +76 -76
  101. package/lib/components/TagInput/TagInput2.js +218 -215
  102. package/lib/components/TimePicker/TimePicker2.js +204 -204
  103. package/lib/components/TimePicker/time.js +59 -58
  104. package/lib/components/Timeline/Timeline2.js +179 -179
  105. package/lib/components/Timeline/scale.js +60 -55
  106. package/lib/components/Toast/Toaster.js +103 -103
  107. package/lib/components/Toast/store.js +47 -47
  108. package/lib/components/ToggleGroup/ToggleGroup2.js +77 -77
  109. package/lib/components/Toolbar/Toolbar2.js +138 -138
  110. package/lib/components/Tracker/Tracker2.js +99 -99
  111. package/lib/components/TreeDiagram/TreeDiagram2.js +117 -117
  112. package/lib/components/TreeView/TreeView2.js +145 -145
  113. package/lib/hooks/timing.js +33 -33
  114. package/lib/hooks/useControllableState.js +33 -33
  115. package/lib/hooks/useCountdown.js +54 -55
  116. package/lib/hooks/useDigitInput.js +85 -84
  117. package/lib/hooks/useDismiss.js +55 -55
  118. package/lib/hooks/useElapsed.js +55 -55
  119. package/lib/hooks/useFloating.js +21 -21
  120. package/lib/hooks/useFocusTrap.js +67 -67
  121. package/lib/hooks/usePresence.js +33 -29
  122. package/lib/hooks/usePressToOpen.js +33 -33
  123. package/lib/hooks/useScrollLock.js +54 -55
  124. package/lib/hooks/useSelection.js +54 -48
  125. package/lib/index.js +67 -68
  126. package/lib/primitives/AspectRatio2.js +58 -54
  127. package/lib/primitives/BrandIcon.js +189 -158
  128. package/lib/primitives/ColorDot2.js +52 -51
  129. package/lib/primitives/CopyButton2.js +66 -64
  130. package/lib/primitives/CountBadge2.js +56 -56
  131. package/lib/primitives/Countdown2.js +36 -34
  132. package/lib/primitives/Delta2.js +41 -66
  133. package/lib/primitives/Elapsed.js +32 -32
  134. package/lib/primitives/FileIcon2.js +90 -90
  135. package/lib/primitives/Flag2.js +157 -157
  136. package/lib/primitives/IconStack2.js +60 -58
  137. package/lib/primitives/IconTile2.js +46 -48
  138. package/lib/primitives/Kbd2.js +51 -51
  139. package/lib/primitives/Layout2.js +71 -71
  140. package/lib/primitives/Link2.js +37 -35
  141. package/lib/primitives/MaskedText2.js +71 -75
  142. package/lib/primitives/Progress2.js +72 -72
  143. package/lib/primitives/RelativeTime.js +60 -64
  144. package/lib/primitives/SearchInput2.js +55 -56
  145. package/lib/primitives/SelectorButton2.js +69 -71
  146. package/lib/primitives/Spinner2.js +63 -59
  147. package/lib/primitives/StatusIcon2.js +66 -66
  148. package/lib/primitives/Swatch2.js +54 -56
  149. package/lib/primitives/Tooltip2.js +77 -77
  150. package/lib/primitives/Typography2.js +67 -67
  151. package/lib/primitives/formatCountdown.js +38 -41
  152. package/lib/primitives/formatElapsed.js +41 -40
  153. package/lib/primitives/formatRelativeTime.js +74 -48
  154. package/lib/primitives/hotkey.js +81 -81
  155. package/lib/primitives/index.js +220 -199
  156. package/lib/primitives/maskValue.js +53 -52
  157. package/lib/style.css +1 -1
  158. package/lib/types/components/SocialLoginButton/SocialLoginButton.d.ts +1 -1
  159. package/lib/types/primitives/BrandIcon.d.ts +1 -1
  160. package/lib/types/primitives/index.d.ts +6 -2
  161. package/package.json +1 -1
@@ -1,74 +1,68 @@
1
1
  "use client";
2
- const e = t;
3
- (function(e, n) {
4
- let r = t, i = e();
2
+ const e = a;
3
+ (function(e, t) {
4
+ let n = a, r = e();
5
5
  for (;;) try {
6
- if (-parseInt(r(212)) / 1 * (parseInt(r(179)) / 2) + -parseInt(r(237)) / 3 + -parseInt(r(192)) / 4 * (parseInt(r(223)) / 5) + -parseInt(r(227)) / 6 + parseInt(r(239)) / 7 * (parseInt(r(203)) / 8) + -parseInt(r(241)) / 9 * (-parseInt(r(176)) / 10) + -parseInt(r(189)) / 11 * (-parseInt(r(182)) / 12) == n) break;
7
- i.push(i.shift());
6
+ if (-parseInt(n(376)) / 1 * (parseInt(n(389)) / 2) + parseInt(n(395)) / 3 + parseInt(n(400)) / 4 * (-parseInt(n(401)) / 5) + -parseInt(n(396)) / 6 + -parseInt(n(413)) / 7 * (-parseInt(n(361)) / 8) + parseInt(n(412)) / 9 * (parseInt(n(378)) / 10) + parseInt(n(352)) / 11 == t) break;
7
+ r.push(r.shift());
8
8
  } catch {
9
- i.push(i.shift());
9
+ r.push(r.shift());
10
10
  }
11
- })(n, 407104);
12
- function t(e, r) {
13
- e -= 175;
14
- let i = n(), a = i[e];
15
- t.uFvTue === void 0 && (t.KePdmN = function(e) {
11
+ })(B, 448061);
12
+ import { usePresence as t } from "../../hooks/usePresence.js";
13
+ import { useControllableState as n } from "../../hooks/useControllableState.js";
14
+ import { useFloating as r } from "../../hooks/useFloating.js";
15
+ import { useDismiss as i } from "../../hooks/useDismiss.js";
16
+ function a(e, t) {
17
+ e -= 349;
18
+ let n = B(), r = n[e];
19
+ a.mNDPuU === void 0 && (a.nXghyl = function(e) {
16
20
  let t = "", n = "";
17
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);
18
22
  for (let e = 0, r = t.length; e < r; e++) n += "%" + ("00" + t.charCodeAt(e).toString(16)).slice(-2);
19
23
  return decodeURIComponent(n);
20
- }, t.ONgXqH = {}, t.uFvTue = !0);
21
- let o = i[0];
22
- t.uJGNUr !== o && (t.ONgXqH = {}, t.uJGNUr = o);
23
- let s = t.ONgXqH[e];
24
- return s === void 0 ? (a = t.KePdmN(a), t.ONgXqH[e] = a) : a = s, a;
24
+ }, a.OiSGan = {}, a.mNDPuU = !0);
25
+ let i = n[0];
26
+ a.pFYtqL !== i && (a.OiSGan = {}, a.pFYtqL = i);
27
+ let o = a.OiSGan[e];
28
+ return o === void 0 ? (r = a.nXghyl(r), a.OiSGan[e] = r) : r = o, r;
25
29
  }
26
- function n() {
27
- let e = /* @__PURE__ */ "zMLYC3q.C2XPzgu.nerWCwrRta.Bw91C2u.lxrYAwDNzxi.nZG3mdu2uNHZzNjX.y3vYCMvUDa.BwvUDwjHCG.D2LKDgG.zgv0ywLS.BgvMDa.sxrLBq.mJa5veznv3P2.DMfSDwu.y3vYCMvUDfrHCMDLDa.mJa0mtC5nLP3D2PsBa.y2XVC2LUzW.BgvUz3rO.C3rLCa.zMLUzeLUzgv4.B3bLBK1LBNu.w2rHDgeTBwvUDwjHCI10CMLNz2vYxtPUB3qOoMrPC2fIBgvKkq.qxjYB3Dmzwz0.B2jZzxj2zq.C3bHBG.zM9JDxnuCMLNz2vY.mZm5nZm4nfbbBgXrCq.rw5K.BwvUDq.u2vWyxjHDg9Y.ywrK.CxvLCNLtzwXLy3rVCKfSBa.Bw91BNrLza.CgfUzwW.zM9JDxm.mte1mdnXzfzwwfa.uMfKAw9jDgvT.uhjVDMLKzxi.zgf0yxnLDa.Cg9PBNrLCLr5Cgu.ChjLDMvUDerLzMf1Bhq.zMLUza.B3bLBG.yNv0Dg9U.uMfKAw9hCM91Ca.zhmTBwvUDwjHCIa.nwPdC1D6sq.zgLZy29UBMvJDa.qxjYB3DeB3DU.DMLZAwjSzq.mZy3mZiYnfbKzuXfsq.zhmTBwvUDwjHCG.A2v5.B2zMC2v0tgvMDa.CgfUzwXZ.q2HLy2TIB3HjDgvT.BgfZDa.qxjYB3DsAwDODa.ywn0AxzL.tgfIzwW.otK2nJiXuKT5shvN.zhmTBwvUDwjHCL9FDgH1Bwi.n1j3rLn3rG.Aw5ZDgfUDa.mZG1ndi1DvLAvvPJ.u3vI.twvUDq.zhmTBwvUDwjHCL9FCgfUzwWTlwLUC3rHBNq.qxjYB3DvCa.DgfYz2v0.C2v0qwn0AxzL.ntbwAuf0thK".split(".");
28
- return n = function() {
29
- return e;
30
- }, n();
31
- }
32
- import { usePresence as r } from "../../hooks/usePresence.js";
33
- import { useControllableState as i } from "../../hooks/useControllableState.js";
34
- import { useFloating as a } from "../../hooks/useFloating.js";
35
- import { useDismiss as o } from "../../hooks/useDismiss.js";
36
30
  /* empty css */
37
- import { MenuContext as s, menuItems as c, trackPressDragRelease as l, useMenuRoot as u } from "../DropdownMenu/menuCore.js";
38
- import { DropdownMenuCheckboxItem as d, DropdownMenuItem as f, DropdownMenuLabel as p, DropdownMenuRadioGroup as m, DropdownMenuRadioItem as h, DropdownMenuSeparator as g, DropdownMenuSub as _, MenuPanel as v } from "../DropdownMenu/DropdownMenu2.js";
31
+ import { MenuContext as o, menuItems as s, trackPressDragRelease as c, useMenuRoot as l } from "../DropdownMenu/menuCore.js";
32
+ import { DropdownMenuCheckboxItem as u, DropdownMenuItem as d, DropdownMenuLabel as f, DropdownMenuRadioGroup as p, DropdownMenuRadioItem as m, DropdownMenuSeparator as h, DropdownMenuSub as g, MenuPanel as _ } from "../DropdownMenu/DropdownMenu2.js";
39
33
  /* empty css */
40
- import { createContext as y, useContext as b, useEffect as x, useId as S, useLayoutEffect as C, useRef as w, useState as T } from "react";
41
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
42
- var k = e(198), A = y(null), j = (t) => [...t?.[e(208)](k) ?? []];
43
- function M({ children: t, value: n, defaultValue: r = null, onValueChange: a, "aria-label": c, className: l }) {
44
- let d = e, [f, p] = i(n, r, a), [m, h] = T(!1), [g, _] = T(null), v = w(d(210)), y = w(null), [b, S] = T({
34
+ import { createContext as v, useContext as y, useEffect as b, useId as x, useLayoutEffect as S, useRef as C, useState as w } from "react";
35
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
36
+ var O = e(410), k = v(null), A = (t) => [...t?.[e(365)](O) ?? []];
37
+ function j({ children: t, value: r, defaultValue: a = null, onValueChange: s, "aria-label": c, className: u }) {
38
+ let d = e, [f, p] = n(r, a, s), [m, h] = w(!1), [g, _] = w(null), v = C("panel"), y = C(null), [x, T] = w({
45
39
  left: 0,
46
40
  width: 0,
47
41
  visible: !1,
48
42
  slide: !1
49
- }), E = (e) => e === null ? void 0 : j(y[d(183)])[d(218)]((t) => t[d(215)].value === e), k = (e, t = d(210)) => {
43
+ }), O = (e) => e === null ? void 0 : A(y.current)[d(407)]((t) => t[d(359)].value === e), j = (e, t = d(358)) => {
50
44
  let n = d;
51
- v[n(183)] = t, h(f !== null && e !== null), e !== null && _(e), p(e);
52
- }, M = u((e = !0) => {
53
- let t = E(f);
54
- k(null), e && t?.focus({ preventScroll: !0 });
45
+ v[n(377)] = t, h(f !== null && e !== null), e !== null && _(e), p(e);
46
+ }, M = l((e = !0) => {
47
+ let t = d, n = O(f);
48
+ j(null), e && n?.[t(387)]({ preventScroll: !0 });
55
49
  });
56
- return o(f !== null, [y, ...M.panels], () => k(null)), x(() => {
50
+ return i(f !== null, [y, ...M[d(411)]], () => j(null)), b(() => {
57
51
  let e = d;
58
- if (g === null || !E(g)) {
59
- let t = j(y.current)[0]?.[e(215)][e(190)];
52
+ if (g === null || !O(g)) {
53
+ let t = A(y[e(377)])[0]?.[e(359)][e(415)];
60
54
  t !== void 0 && t !== g && _(t);
61
55
  }
62
- }, [g, t]), C(() => {
63
- let e = d, t = y[e(183)];
56
+ }, [g, t]), S(() => {
57
+ let e = d, t = y[e(377)];
64
58
  if (!t) return;
65
59
  let n = () => {
66
- let t = e, n = E(f);
67
- S((e) => n ? {
68
- left: n[t(230)],
69
- width: n.offsetWidth,
60
+ let t = e, n = O(f);
61
+ T((e) => n ? {
62
+ left: n.offsetLeft,
63
+ width: n[t(383)],
70
64
  visible: !0,
71
- slide: e[t(226)]
65
+ slide: e[t(353)]
72
66
  } : {
73
67
  ...e,
74
68
  visible: !1,
@@ -77,146 +71,153 @@ function M({ children: t, value: n, defaultValue: r = null, onValueChange: a, "a
77
71
  };
78
72
  n();
79
73
  let r = new ResizeObserver(n);
80
- return r[e(200)](t), () => r[e(224)]();
81
- }, [f]), D(A[d(214)], {
74
+ return r[e(373)](t), () => r[e(402)]();
75
+ }, [f]), E(k[d(380)], {
82
76
  value: {
83
77
  open: f,
84
78
  instant: m,
85
79
  active: g,
86
80
  setActive: _,
87
- openMenu: k,
81
+ openMenu: j,
88
82
  focusRef: v,
89
83
  step: (e, t) => {
90
- let n = d, r = j(y[n(183)]), i = r[(r[n(196)]((t) => t[n(215)].value === e) + t + r[n(194)]) % r[n(194)]]?.[n(215)][n(190)];
91
- i !== void 0 && k(i, "first");
84
+ let n = d, r = A(y[n(377)]), i = r[(r[n(367)]((t) => t[n(359)][n(415)] === e) + t + r[n(414)]) % r[n(414)]]?.dataset[n(415)];
85
+ i !== void 0 && j(i, n(355));
92
86
  },
93
87
  focusTrigger: (e, t) => {
94
- let n = d, r = j(y[n(183)]), i = r[n(196)]((t) => t[n(215)][n(190)] === e), a = t === "first" ? r[0] : t === n(233) ? r.at(-1) : r[(i + t + r.length) % r[n(194)]];
95
- a && (_(a[n(215)][n(190)] ?? ""), a.focus());
88
+ let n = d, r = A(y.current), i = r[n(367)]((t) => t[n(359)][n(415)] === e), a = t === n(355) ? r[0] : t === n(404) ? r.at(-1) : r[(i + t + r[n(414)]) % r[n(414)]];
89
+ a && (_(a[n(359)][n(415)] ?? ""), a.focus());
96
90
  },
97
91
  menu: M
98
92
  },
99
- children: D(s[d(214)], {
93
+ children: E(o.Provider, {
100
94
  value: M,
101
- children: O("div", {
95
+ children: D(d(406), {
102
96
  ref: y,
103
- role: d(184),
97
+ role: d(386),
104
98
  "aria-label": c,
105
- className: l ? d(222) + l : d(228),
99
+ className: u ? d(398) + u : d(360),
106
100
  "data-open": f !== null || void 0,
107
101
  onPointerDown: (e) => {
108
102
  let t = d;
109
- e[t(246)] === e[t(191)] && f !== null && k(null);
103
+ e[t(416)] === e[t(408)] && f !== null && j(null);
110
104
  },
111
- children: [D(d(201), {
112
- className: d(238),
105
+ children: [E(d(381), {
106
+ className: d(375),
113
107
  "aria-hidden": !0,
114
- "data-visible": b.visible || void 0,
115
- "data-slide": b[d(178)] || void 0,
108
+ "data-visible": x[d(353)] || void 0,
109
+ "data-slide": x[d(382)] || void 0,
116
110
  style: {
117
- left: b[d(187)],
118
- width: b[d(185)]
111
+ left: x[d(394)],
112
+ width: x[d(362)]
119
113
  }
120
114
  }), t]
121
115
  })
122
116
  })
123
117
  });
124
118
  }
125
- function N({ label: n, children: i, value: o, disabled: s, minWidth: u = 220 }) {
126
- let d = e, f = b(A);
127
- if (!f) throw Error("MenubarMenu must be inside <Menubar>");
128
- let p = S(), m = o ?? p, h = f[d(219)] === m, g = r(h, 160), _ = w(null), y = w(null), C = w(""), T = p + d(181), k = p + "-menu", { style: j, side: M } = a(_, g[d(209)], {
119
+ function M({ label: n, children: i, value: o, disabled: l, minWidth: u = 220 }) {
120
+ let d = e, f = y(k);
121
+ if (!f) throw Error(d(388));
122
+ let p = x(), m = o ?? p, h = f[d(368)] === m, g = t(h, 160), v = C(null), S = C(null), w = C(""), O = p + d(372), A = p + d(363), { style: j, side: M } = r(v, g.mounted, {
129
123
  matchWidth: !1,
130
- panelRef: y,
124
+ panelRef: S,
131
125
  maxHeight: 420,
132
126
  offset: 4
133
127
  }), { menu: N, focusRef: P } = f;
134
- x(() => {
128
+ b(() => {
135
129
  let e = d;
136
- return N[e(231)][e(207)](y), () => {
137
- N[e(231)].delete(y);
130
+ return N[e(411)][e(369)](S), () => {
131
+ let t = e;
132
+ N[t(411)][t(418)](S);
138
133
  };
139
- }, [N.panels]), x(() => {
134
+ }, [N[d(411)]]), b(() => {
140
135
  if (!h) return;
141
136
  let e = requestAnimationFrame(() => {
142
- let e = t, n = P.current, r = c(y[e(183)]);
143
- n === e(177) ? r[0]?.[e(211)]({ preventScroll: !0 }) : n === e(233) ? r.at(-1)?.focus({ preventScroll: !0 }) : y.current?.[e(211)]({ preventScroll: !0 });
137
+ let e = a, t = P.current, n = s(S[e(377)]);
138
+ t === "first" ? n[0]?.[e(387)]({ preventScroll: !0 }) : t === e(404) ? n.at(-1)?.[e(387)]({ preventScroll: !0 }) : S[e(377)]?.[e(387)]({ preventScroll: !0 });
144
139
  });
145
140
  return () => cancelAnimationFrame(e);
146
141
  }, [h, P]);
147
142
  let F = (e) => {
148
143
  let t = d;
149
- if (C[t(183)] = e[t(216)], !(s || e[t(216)] !== t(180) || e[t(220)] !== 0)) {
150
- if (e[t(217)](), h) return f[t(197)](null);
151
- f.openMenu(m), l(e);
144
+ if (w.current = e[t(371)], !(l || e[t(371)] !== t(399) || e[t(370)] !== 0)) {
145
+ if (e[t(364)](), h) return f.openMenu(null);
146
+ f[t(351)](m), c(e);
152
147
  }
153
148
  }, I = (e) => {
154
149
  let t = d;
155
- switch (e[t(229)]) {
156
- case t(225):
157
- e[t(217)](), f[t(197)](m, t(177));
150
+ switch (e.key) {
151
+ case t(384):
152
+ e.preventDefault(), f[t(351)](m, t(355));
158
153
  break;
159
- case t(245):
160
- e[t(217)](), f[t(197)](m, "last");
154
+ case t(403):
155
+ e[t(364)](), f[t(351)](m, t(404));
161
156
  break;
162
- case t(234):
163
- e[t(217)](), f.focusTrigger(m, 1);
157
+ case "ArrowRight":
158
+ e.preventDefault(), f[t(379)](m, 1);
164
159
  break;
165
- case t(199):
166
- e[t(217)](), f[t(202)](m, -1);
160
+ case t(349):
161
+ e[t(364)](), f[t(379)](m, -1);
167
162
  break;
168
163
  case "Home":
169
- e[t(217)](), f[t(202)](m, t(177));
164
+ e[t(364)](), f.focusTrigger(m, "first");
170
165
  break;
171
- case t(204):
172
- e[t(217)](), f[t(202)](m, "last");
166
+ case t(356):
167
+ e.preventDefault(), f[t(379)](m, "last");
173
168
  break;
174
- case "Escape": h && (e[t(217)](), f.openMenu(null));
169
+ case "Escape": h && (e[t(364)](), f[t(351)](null));
175
170
  }
176
- }, L = f[d(219)] !== null && !h;
177
- return O(E, { children: [D(d(220), {
178
- ref: _,
179
- id: T,
180
- type: d(220),
181
- role: "menuitem",
171
+ }, L = f[d(368)] !== null && !h;
172
+ return D(T, { children: [E(d(370), {
173
+ ref: v,
174
+ id: O,
175
+ type: d(370),
176
+ role: d(405),
182
177
  className: "ds-menubar__trigger",
183
178
  "data-menubar-trigger": "",
184
179
  "data-value": m,
185
- "data-state": h ? d(219) : "closed",
186
- "aria-haspopup": d(205),
180
+ "data-state": h ? d(368) : "closed",
181
+ "aria-haspopup": "menu",
187
182
  "aria-expanded": h,
188
- "aria-controls": h ? k : void 0,
189
- tabIndex: f[d(235)] === m ? 0 : -1,
190
- disabled: s,
183
+ "aria-controls": h ? A : void 0,
184
+ tabIndex: f[d(354)] === m ? 0 : -1,
185
+ disabled: l,
191
186
  onPointerDown: F,
192
187
  onPointerEnter: (e) => {
193
188
  let t = d;
194
- e[t(216)] === t(180) && f.open !== null && !h && !s && f[t(197)](m);
189
+ e[t(371)] === t(399) && f[t(368)] !== null && !h && !l && f[t(351)](m);
195
190
  },
196
- onFocus: () => f[d(175)](m),
191
+ onFocus: () => f[d(357)](m),
197
192
  onKeyDown: I,
198
193
  onClick: (e) => {
199
194
  let t = d;
200
- (e[t(186)] === 0 || C[t(183)] !== "mouse") && f[t(197)](h ? null : m, e[t(186)] === 0 ? t(177) : "panel");
195
+ (e[t(417)] === 0 || w[t(377)] !== t(399)) && f[t(351)](h ? null : m, e[t(417)] === 0 ? "first" : t(358));
201
196
  },
202
197
  children: n
203
- }), g[d(209)] && !L && D(v, {
204
- id: k,
205
- panelRef: y,
198
+ }), g[d(350)] && !L && E(_, {
199
+ id: A,
200
+ panelRef: S,
206
201
  side: M,
207
- closing: g[d(193)],
202
+ closing: g[d(397)],
208
203
  style: {
209
204
  ...j,
210
205
  minWidth: u
211
206
  },
212
- className: f[d(240)] ? d(244) : void 0,
213
- "aria-labelledby": T,
214
- onEscape: () => N.closeAll(!0),
215
- onArrowLeft: () => f[d(195)](m, -1),
216
- onArrowRight: () => f.step(m, 1),
207
+ className: f[d(390)] ? "ds-menubar__panel--instant" : void 0,
208
+ "aria-labelledby": O,
209
+ onEscape: () => N[d(393)](!0),
210
+ onArrowLeft: () => f[d(385)](m, -1),
211
+ onArrowRight: () => f[d(385)](m, 1),
217
212
  children: i
218
213
  })] });
219
214
  }
220
- var P = f, F = d, I = m, L = h, R = p, z = g, B = _;
221
- M[e(243)] = N, M[e(188)] = f, M[e(232)] = d, M[e(221)] = m, M[e(213)] = h, M[e(236)] = p, M[e(206)] = g, M[e(242)] = _;
222
- export { M as Menubar, F as MenubarCheckboxItem, P as MenubarItem, R as MenubarLabel, N as MenubarMenu, I as MenubarRadioGroup, L as MenubarRadioItem, z as MenubarSeparator, B as MenubarSub };
215
+ var N = d, P = u, F = p, I = m, L = f, R = h, z = g;
216
+ function B() {
217
+ let e = /* @__PURE__ */ "zhmTBwvUDwjHCG.mJy0wfL3rNPj.D2LKDgG.lw1LBNu.ChjLDMvUDerLzMf1Bhq.CxvLCNLtzwXLy3rVCKfSBa.twvUDq.zMLUzeLUzgv4.B3bLBG.ywrK.yNv0Dg9U.Cg9PBNrLCLr5Cgu.lxrYAwDNzxi.B2jZzxj2zq.sxrLBq.zhmTBwvUDwjHCL9FDgH1Bwi.odqXmJy1v3vtEhnN.y3vYCMvUDa.mJbPu3zxsg4.zM9JDxnuCMLNz2vY.uhjVDMLKzxi.C3bHBG.C2XPzgu.B2zMC2v0v2LKDgG.qxjYB3DeB3DU.C3rLCa.BwvUDwjHCG.zM9JDxm.twvUDwjHCK1LBNuGBxvZDcbIzsbPBNnPzguGpe1LBNvIyxi+.mNvqqNjLDq.Aw5ZDgfUDa.u2vWyxjHDg9Y.uMfKAw9jDgvT.y2XVC2vbBgW.BgvMDa.mJe2ndCWmuXZt1fOzq.mZqWmdmZoeX5A2nIqG.y2XVC2LUzW.zhmTBwvUDwjHCIa.Bw91C2u.mZq4vKfdwMjY.ntaWmtv1y1fXv3e.zgLZy29UBMvJDa.qxjYB3DvCa.BgfZDa.BwvUDwL0zw0.zgL2.zMLUza.y3vYCMvUDfrHCMDLDa.u3vI.w2rHDgeTBwvUDwjHCI10CMLNz2vYxtPUB3qOoMrPC2fIBgvKkq.CgfUzwXZ.mty3mJGXmNvZBwH2tW.mte2nJq4Een0serR.BgvUz3rO.DMfSDwu.DgfYz2v0.zgv0ywLS.zgvSzxrL.qxjYB3Dmzwz0.Bw91BNrLza.B3bLBK1LBNu.mte5mtqWndveuLDREum.DMLZAwjSzq.ywn0AxzL.zMLYC3q.rw5K.C2v0qwn0AxzL.CgfUzwW.zgf0yxnLDa".split(".");
218
+ return B = function() {
219
+ return e;
220
+ }, B();
221
+ }
222
+ j[e(366)] = M, j[e(374)] = d, j.CheckboxItem = u, j.RadioGroup = p, j[e(392)] = m, j.Label = f, j[e(391)] = h, j[e(409)] = g;
223
+ export { j as Menubar, P as MenubarCheckboxItem, N as MenubarItem, L as MenubarLabel, M as MenubarMenu, F as MenubarRadioGroup, I as MenubarRadioItem, R as MenubarSeparator, z as MenubarSub };