@iamfiro/design 0.3.0 → 0.3.1

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