@slotted/react 0.1.0-beta.6 → 0.1.0-beta.8

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 (112) hide show
  1. package/dist/{action-bar-ti3e6FK1.js → action-bar-C5zaYrEW.js} +2 -2
  2. package/dist/action-bar.js +1 -1
  3. package/dist/{action-sheet-C60BWUW8.js → action-sheet-DD477dAw.js} +1 -1
  4. package/dist/action-sheet.js +1 -1
  5. package/dist/{app-shell-nnSP44OO.js → app-shell-DNdZ5ys0.js} +1 -1
  6. package/dist/app-shell.js +1 -1
  7. package/dist/{calendar-BZ6PP7Ke.js → calendar-xcoBnHpK.js} +17 -17
  8. package/dist/calendar.js +1 -1
  9. package/dist/{color-picker-BcRCeISx.js → color-picker-amz8XfXm.js} +1 -1
  10. package/dist/color-picker.js +1 -1
  11. package/dist/{column-manager-BtkYLs5G.js → column-manager-DonEo9wp.js} +2 -2
  12. package/dist/column-manager.js +1 -1
  13. package/dist/{command-palette-DFLbSOiv.js → command-palette-Dw03scvF.js} +244 -241
  14. package/dist/command-palette.js +1 -1
  15. package/dist/{context-menu-B00UIBVC.js → context-menu-g3DMZKR3.js} +1 -1
  16. package/dist/context-menu.js +1 -1
  17. package/dist/{dashboard-grid-CoLKLvYL.js → dashboard-grid-DsovCuVC.js} +1 -1
  18. package/dist/dashboard-grid.js +1 -1
  19. package/dist/{data-grid-DX95Y7mY.js → data-grid-B93D5XsR.js} +10 -10
  20. package/dist/data-grid.js +1 -1
  21. package/dist/{data-list-CWYTPNm-.js → data-list-UtLdop-1.js} +1 -1
  22. package/dist/data-list.js +1 -1
  23. package/dist/{date-field-BxEpqAPg.js → date-field-DEauLQVL.js} +80 -80
  24. package/dist/date-field.js +1 -1
  25. package/dist/{date-picker-DRk9SZp1.js → date-picker-C22jlzUv.js} +2 -2
  26. package/dist/date-picker.js +1 -1
  27. package/dist/{date-range-picker-6Yz7avTS.js → date-range-picker-BUKoddmL.js} +2 -2
  28. package/dist/date-range-picker.js +1 -1
  29. package/dist/{datetime-field-D2f9u6im.js → datetime-field-Bptwvuip.js} +33 -33
  30. package/dist/datetime-field.js +1 -1
  31. package/dist/{datetime-picker-STqSWMkH.js → datetime-picker-BiarFWN3.js} +2 -2
  32. package/dist/datetime-picker.js +1 -1
  33. package/dist/{datetime-range-picker-DQNQwr3K.js → datetime-range-picker--JtLnGQ2.js} +2 -2
  34. package/dist/datetime-range-picker.js +1 -1
  35. package/dist/{detail-panel-z6WGleP4.js → detail-panel-ChaIgrw3.js} +2 -2
  36. package/dist/detail-panel.js +1 -1
  37. package/dist/{dialog-BHYDDj1S.js → dialog-Ds0LJWE_.js} +157 -140
  38. package/dist/dialog.js +1 -1
  39. package/dist/docs/calendar.json +1 -1
  40. package/dist/docs/menu.json +12 -0
  41. package/dist/docs/menu.md +2 -0
  42. package/dist/docs/side-navigation.json +1 -0
  43. package/dist/docs/side-navigation.md +1 -1
  44. package/dist/docs/table.examples.md +13 -17
  45. package/dist/docs/table.json +3 -3
  46. package/dist/{drawer-LXM44eso.js → drawer-DZ_29U6H.js} +5 -2
  47. package/dist/drawer.js +1 -1
  48. package/dist/{event-calendar-CiphPXdV.js → event-calendar-CPAun_ab.js} +3 -3
  49. package/dist/event-calendar.js +1 -1
  50. package/dist/{filter-bar-C_dXljI_.js → filter-bar-BKKqH0ui.js} +5 -5
  51. package/dist/filter-bar.js +1 -1
  52. package/dist/{import-export-center-BQnMJz4g.js → import-export-center-Bg1Iavoa.js} +2 -2
  53. package/dist/import-export-center.js +1 -1
  54. package/dist/index.js +40 -40
  55. package/dist/{loading-overlay-COfnckse.js → loading-overlay-RRsNK1FN.js} +1 -1
  56. package/dist/loading-overlay.js +1 -1
  57. package/dist/{menu-parts-D6v_mz6O.js → menu-parts-BpQu2s4z.js} +210 -206
  58. package/dist/menu.js +1 -1
  59. package/dist/{menubar-DApIg1eR.js → menubar-rpNcgIrw.js} +1 -1
  60. package/dist/menubar.js +1 -1
  61. package/dist/{navigation-menu-parts-D8qFAwHX.js → navigation-menu-parts-Cn-OAadu.js} +1 -1
  62. package/dist/navigation-menu.js +1 -1
  63. package/dist/{page-IiYXk1sz.js → page-QP8Zyz8-.js} +1 -1
  64. package/dist/{page-header-Bn4nIGfF.js → page-header-BP_Wt3eS.js} +1 -1
  65. package/dist/page-header.js +1 -1
  66. package/dist/page.js +1 -1
  67. package/dist/{saved-views-B3brBTD9.js → saved-views-DB2IIdhH.js} +1 -1
  68. package/dist/saved-views.js +1 -1
  69. package/dist/{side-navigation-Bm-BZma1.js → side-navigation-BnUKTrtd.js} +1 -1
  70. package/dist/side-navigation.js +1 -1
  71. package/dist/{split-button-DKRm0j5c.js → split-button-p97Bd5wM.js} +1 -1
  72. package/dist/split-button.js +1 -1
  73. package/dist/styles.css +1 -1
  74. package/dist/{table-BYEvFr4P.js → table-BTSOjlTn.js} +8 -8
  75. package/dist/table.js +1 -1
  76. package/dist/{time-field-BI9n607q.js → time-field-DeKrogZG.js} +2 -2
  77. package/dist/time-field.js +1 -1
  78. package/dist/{time-picker-D6SlQWNF.js → time-picker-C0-O0oMU.js} +1 -1
  79. package/dist/time-picker.js +1 -1
  80. package/dist/{time-range-picker-CcV3_45h.js → time-range-picker-Fdb70Zj_.js} +1 -1
  81. package/dist/time-range-picker.js +1 -1
  82. package/dist/{toast-Bf3e0AgC.js → toast-BTN_F9No.js} +1 -1
  83. package/dist/toast.js +1 -1
  84. package/dist/{toolbar-B9knmgHA.js → toolbar-U-CFEb1c.js} +1 -1
  85. package/dist/toolbar.js +1 -1
  86. package/dist/{top-navigation-DiG2PF5W.js → top-navigation-BjIRQfkK.js} +2 -2
  87. package/dist/top-navigation.js +1 -1
  88. package/dist/types/action-bar/action-bar.d.ts.map +1 -1
  89. package/dist/types/app-shell/app-shell.d.ts.map +1 -1
  90. package/dist/types/calendar/calendar.d.ts.map +1 -1
  91. package/dist/types/command-palette/command-palette.d.ts.map +1 -1
  92. package/dist/types/dialog/dialog-parts.d.ts.map +1 -1
  93. package/dist/types/dialog/dialog.d.ts.map +1 -1
  94. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  95. package/dist/types/drawer/drawer.d.ts.map +1 -1
  96. package/dist/types/loading-overlay/loading-overlay.d.ts.map +1 -1
  97. package/dist/types/menu/index.d.ts +1 -1
  98. package/dist/types/menu/index.d.ts.map +1 -1
  99. package/dist/types/menu/menu-defaults.d.ts.map +1 -1
  100. package/dist/types/menu/menu-parts.d.ts.map +1 -1
  101. package/dist/types/menu/menu.d.ts +1 -1
  102. package/dist/types/menu/menu.d.ts.map +1 -1
  103. package/dist/types/menu/menu.types.d.ts +10 -0
  104. package/dist/types/menu/menu.types.d.ts.map +1 -1
  105. package/dist/types/navigation-menu/navigation-menu-parts.d.ts.map +1 -1
  106. package/dist/types/page/page.d.ts.map +1 -1
  107. package/dist/types/table/table-parts.d.ts +4 -0
  108. package/dist/types/table/table-parts.d.ts.map +1 -1
  109. package/dist/types/toast/toast-parts.d.ts.map +1 -1
  110. package/dist/{upload-CLX5cURk.js → upload-DGmsz9Hw.js} +1 -1
  111. package/dist/upload.js +1 -1
  112. package/package.json +11 -8
@@ -11,12 +11,12 @@ import { createPortalRoot as b, setPortalContainer as x } from "@slotted/core/po
11
11
  import { createDismissableLayer as S } from "@slotted/core/dismissable-layer";
12
12
  import { createPointerIntent as C } from "@slotted/core/pointer-intent";
13
13
  import { createPositioner as w, submenuOffsets as T } from "@slotted/core/positioner";
14
- import { createTypeahead as E, isPrintable as D } from "@slotted/core/typeahead";
15
- import { createPortal as ee } from "react-dom";
16
- import { keysMessages as O } from "@slotted/core/i18n";
17
- import { canonicalKey as k, parseShortcut as A, resolveShortcut as j } from "@slotted/core/keys";
14
+ import { createTypeahead as E, isPrintable as ee } from "@slotted/core/typeahead";
15
+ import { createPortal as te } from "react-dom";
16
+ import { keysMessages as D } from "@slotted/core/i18n";
17
+ import { canonicalKey as O, parseShortcut as k, resolveShortcut as A } from "@slotted/core/keys";
18
18
  //#region src/menu/menu-defaults.tsx
19
- var M = {
19
+ var j = {
20
20
  align: "start",
21
21
  alignOffset: 0,
22
22
  closeOnEscape: !0,
@@ -38,13 +38,14 @@ var M = {
38
38
  submenuCloseDelay: 300,
39
39
  submenuOpenDelay: 150,
40
40
  typeahead: !0,
41
- typeaheadTimeout: 500
42
- }, te = s(M);
43
- function ne() {
44
- return l(te);
41
+ typeaheadTimeout: 500,
42
+ width: "content"
43
+ }, ne = s(j);
44
+ function re() {
45
+ return l(ne);
45
46
  }
46
- function N({ children: e, container: t, ...n }) {
47
- let r = ne(), i = m(null);
47
+ function M({ children: e, container: t, ...n }) {
48
+ let r = re(), i = m(null);
48
49
  u(() => {
49
50
  if (t !== void 0) return i.current = t, x(t), () => x(null);
50
51
  }, [t]);
@@ -70,59 +71,60 @@ function N({ children: e, container: t, ...n }) {
70
71
  submenuCloseDelay: n.submenuCloseDelay ?? r.submenuCloseDelay,
71
72
  submenuOpenDelay: n.submenuOpenDelay ?? r.submenuOpenDelay,
72
73
  typeahead: n.typeahead ?? r.typeahead,
73
- typeaheadTimeout: n.typeaheadTimeout ?? r.typeaheadTimeout
74
+ typeaheadTimeout: n.typeaheadTimeout ?? r.typeaheadTimeout,
75
+ width: n.width ?? r.width
74
76
  };
75
- return /* @__PURE__ */ _(te.Provider, {
77
+ return /* @__PURE__ */ _(ne.Provider, {
76
78
  value: a,
77
79
  children: e
78
80
  });
79
81
  }
80
82
  //#endregion
81
83
  //#region src/menu/menu.tsx
82
- var P = s(void 0), F = s(null), I = s(null), L = F.Provider, R = I.Provider;
83
- function z() {
84
- return l(F);
84
+ var N = s(void 0), P = s(null), F = s(null), I = P.Provider, L = F.Provider;
85
+ function R() {
86
+ return l(P);
85
87
  }
86
- function re() {
87
- return l(I);
88
+ function ie() {
89
+ return l(F);
88
90
  }
89
- function B() {
90
- let e = l(P);
91
+ function z() {
92
+ let e = l(N);
91
93
  if (e === void 0) throw Error("MenuTrigger, MenuContent and every item have to be inside a Menu.");
92
94
  return e;
93
95
  }
94
- function ie(e, t) {
96
+ function ae(e, t) {
95
97
  return e === void 0 ? null : typeof e == "string" ? t?.querySelector(e) ?? null : e instanceof Element ? e : e.current ?? null;
96
98
  }
97
- function V({ align: e, alignOffset: t, anchor: n, children: r, closeOnEscape: i, closeOnOutsidePress: a, closeOnSelect: s, collisionPadding: l, defaultOpen: u, disabled: p, finalFocus: g, flip: v, hideWhenDetached: y, loop: b, mount: x, onOpenChange: S, open: C, openOnHover: w, portal: T, ref: E, shift: D, side: ee, sideOffset: O, size: k, strategy: A, submenuCloseDelay: j, submenuOpenDelay: M, typeahead: te, typeaheadTimeout: N, value: F }) {
98
- let I = ne(), L = z(), R = re(), B = L === null && R !== null, V = d(), H = F ?? V, U = `${V}menu`, ae = `${V}trigger`, [oe, W] = h(u ?? !1), [G, K] = h(null), [q, J] = h(null), Y = p ?? I.disabled, X = (B ? R?.value === H : C ?? oe) && !Y, se = m(X);
99
- X && (se.current = !0);
100
- let ce = m("first"), Z = m({
99
+ function B({ align: e, alignOffset: t, anchor: n, children: r, closeOnEscape: i, closeOnOutsidePress: a, closeOnSelect: s, collisionPadding: l, defaultOpen: u, disabled: p, finalFocus: g, flip: v, hideWhenDetached: y, loop: b, mount: x, onOpenChange: S, open: C, openOnHover: w, portal: T, ref: E, shift: ee, side: te, sideOffset: D, size: O, strategy: k, submenuCloseDelay: A, submenuOpenDelay: j, typeahead: ne, typeaheadTimeout: M, value: P, width: F }) {
100
+ let I = re(), L = R(), z = ie(), B = L === null && z !== null, V = d(), H = P ?? V, oe = `${V}menu`, se = `${V}trigger`, [U, W] = h(u ?? !1), [G, K] = h(null), [q, J] = h(null), Y = p ?? I.disabled, X = (B ? z?.value === H : C ?? U) && !Y, Z = m(X);
101
+ X && (Z.current = !0);
102
+ let ce = m("first"), Q = m({
101
103
  contentNode: q,
102
104
  current: X,
103
105
  finalFocus: g,
104
106
  identity: H,
105
- menubar: R,
107
+ menubar: z,
106
108
  onBar: B,
107
109
  onOpenChange: S,
108
110
  open: C,
109
111
  parent: L,
110
112
  triggerNode: G
111
113
  });
112
- Z.current = {
114
+ Q.current = {
113
115
  contentNode: q,
114
116
  current: X,
115
117
  finalFocus: g,
116
118
  identity: H,
117
- menubar: R,
119
+ menubar: z,
118
120
  onBar: B,
119
121
  onOpenChange: S,
120
122
  open: C,
121
123
  parent: L,
122
124
  triggerNode: G
123
125
  };
124
- let Q = c((e, t, n) => {
125
- let r = Z.current;
126
+ let $ = c((e, t, n) => {
127
+ let r = Q.current;
126
128
  if (e === r.current) return;
127
129
  let i = !1, a = o({
128
130
  controlled: r.onBar ? void 0 : r.open,
@@ -131,14 +133,14 @@ function V({ align: e, alignOffset: t, anchor: n, children: r, closeOnEscape: i,
131
133
  i = e.cancelled, r.onOpenChange?.(e.value, e);
132
134
  }
133
135
  }).request(e, t, n);
134
- i || (r.onBar && r.menubar !== null ? e ? r.menubar.open(r.identity, t, n) : r.menubar.close(t, n) : a && W(e), !e && t !== "outsidePress" && t !== "programmatic" && (ie(r.finalFocus, r.contentNode) ?? r.triggerNode)?.focus({ preventScroll: !0 }));
136
+ i || (r.onBar && r.menubar !== null ? e ? r.menubar.open(r.identity, t, n) : r.menubar.close(t, n) : a && W(e), !e && t !== "outsidePress" && t !== "programmatic" && (ae(r.finalFocus, r.contentNode) ?? r.triggerNode)?.focus({ preventScroll: !0 }));
135
137
  }, []);
136
138
  f(E, () => ({
137
- close: () => Q(!1, "programmatic"),
138
- open: () => Q(!0, "programmatic"),
139
- focus: () => Z.current.triggerNode?.focus({ preventScroll: !0 })
140
- }), [Q]);
141
- let le = L === null ? B && R?.orientation === "vertical" ? "inline-end" : void 0 : "inline-end", ue = {
139
+ close: () => $(!1, "programmatic"),
140
+ open: () => $(!0, "programmatic"),
141
+ focus: () => Q.current.triggerNode?.focus({ preventScroll: !0 })
142
+ }), [$]);
143
+ let le = L === null ? B && z?.orientation === "vertical" ? "inline-end" : void 0 : "inline-end", ue = {
142
144
  align: e ?? (L === null ? I.align : "start"),
143
145
  alignOffset: t ?? I.alignOffset,
144
146
  anchor: n ?? null,
@@ -146,111 +148,112 @@ function V({ align: e, alignOffset: t, anchor: n, children: r, closeOnEscape: i,
146
148
  closeOnOutsidePress: a ?? I.closeOnOutsidePress,
147
149
  closeOnSelect: s ?? I.closeOnSelect,
148
150
  collisionPadding: l ?? I.collisionPadding,
149
- contentId: U,
151
+ contentId: oe,
150
152
  contentNode: q,
151
- disabled: Y || B && (R?.disabled ?? !1),
153
+ disabled: Y || B && (z?.disabled ?? !1),
152
154
  entry: ce,
153
155
  flip: v ?? I.flip,
154
156
  hideWhenDetached: y ?? I.hideWhenDetached,
155
157
  identity: H,
156
158
  loop: b ?? I.loop,
157
- menubar: R,
159
+ menubar: z,
158
160
  mount: x ?? I.mount,
159
161
  open: X,
160
162
  openOnHover: w ?? I.openOnHover,
161
163
  parent: L,
162
164
  portal: T ?? I.portal,
163
- seen: se.current,
165
+ seen: Z.current,
164
166
  setContentNode: J,
165
167
  setTriggerNode: K,
166
- shift: D ?? I.shift,
167
- side: ee ?? le ?? I.side,
168
- sideOffset: O ?? I.sideOffset,
168
+ shift: ee ?? I.shift,
169
+ side: te ?? le ?? I.side,
170
+ sideOffset: D ?? I.sideOffset,
169
171
  onBar: B,
170
- size: k ?? (B ? R?.size : void 0) ?? I.size,
171
- strategy: A ?? I.strategy,
172
- submenuCloseDelay: j ?? I.submenuCloseDelay,
173
- submenuOpenDelay: M ?? I.submenuOpenDelay,
174
- toggle: Q,
175
- triggerId: ae,
172
+ size: O ?? (B ? z?.size : void 0) ?? I.size,
173
+ strategy: k ?? I.strategy,
174
+ submenuCloseDelay: A ?? I.submenuCloseDelay,
175
+ submenuOpenDelay: j ?? I.submenuOpenDelay,
176
+ toggle: $,
177
+ triggerId: se,
176
178
  triggerNode: G,
177
- typeahead: te ?? I.typeahead,
178
- typeaheadTimeout: N ?? I.typeaheadTimeout
179
+ typeahead: ne ?? I.typeahead,
180
+ typeaheadTimeout: M ?? I.typeaheadTimeout,
181
+ width: L === null ? F ?? I.width : "content"
179
182
  };
180
- return /* @__PURE__ */ _(P.Provider, {
183
+ return /* @__PURE__ */ _(N.Provider, {
181
184
  value: ue,
182
185
  children: r
183
186
  });
184
187
  }
185
188
  //#endregion
186
189
  //#region src/menu/menu-items.tsx
187
- function H(e, t) {
190
+ function V(e, t) {
188
191
  return (n) => {
189
192
  e?.(n), n.defaultPrevented || t(n);
190
193
  };
191
194
  }
192
- var U = {
195
+ var H = {
193
196
  alt: "Alt",
194
197
  ctrl: "Control",
195
198
  meta: "Meta",
196
199
  shift: "Shift"
197
200
  };
198
- function ae(e, t) {
199
- let n = A(e);
201
+ function oe(e, t) {
202
+ let n = k(e);
200
203
  if (n.length === 1) return n[0]?.map((e) => {
201
- let n = k(e);
204
+ let n = O(e);
202
205
  if (n === "mod") return t === "mac" ? "Meta" : "Control";
203
- if (n !== void 0 && n in U) return U[n];
206
+ if (n !== void 0 && n in H) return H[n];
204
207
  let r = n ?? e;
205
208
  return r.length === 1 ? r.toUpperCase() : `${r[0]?.toUpperCase()}${r.slice(1)}`;
206
209
  }).join("+");
207
210
  }
208
- function oe(e, t, n) {
209
- let r = j(e, {
211
+ function se(e, t, n) {
212
+ let r = A(e, {
210
213
  platform: t,
211
214
  t: n
212
215
  });
213
216
  return r.steps.map((e) => e.map((e) => e.legend).join(r.separator)).join(` ${r.thenLabel} `);
214
217
  }
215
- function W({ children: e, ...t }) {
218
+ function U({ children: e, ...t }) {
216
219
  return /* @__PURE__ */ _("span", {
217
220
  ...t,
218
221
  "data-part": "icon",
219
222
  children: e
220
223
  });
221
224
  }
222
- function G({ children: e, ...t }) {
225
+ function W({ children: e, ...t }) {
223
226
  return /* @__PURE__ */ _("span", {
224
227
  ...t,
225
228
  "data-part": "label",
226
229
  children: e
227
230
  });
228
231
  }
229
- function K({ children: e, ...t }) {
232
+ function G({ children: e, ...t }) {
230
233
  return /* @__PURE__ */ _("span", {
231
234
  ...t,
232
235
  "data-part": "description",
233
236
  children: e
234
237
  });
235
238
  }
236
- function q({ children: e, ...t }) {
239
+ function K({ children: e, ...t }) {
237
240
  return /* @__PURE__ */ _("span", {
238
241
  ...t,
239
242
  "data-part": "meta",
240
243
  children: e
241
244
  });
242
245
  }
243
- function J({ children: e, keys: t, ...i }) {
244
- let a = r(void 0), o = n(O);
246
+ function q({ children: e, keys: t, ...i }) {
247
+ let a = r(void 0), o = n(D);
245
248
  return /* @__PURE__ */ _("span", {
246
249
  ...i,
247
250
  ...t === void 0 ? {} : { "aria-hidden": !0 },
248
251
  "data-part": "shortcut",
249
- children: t === void 0 ? e : oe(t, a, o)
252
+ children: t === void 0 ? e : se(t, a, o)
250
253
  });
251
254
  }
252
- function Y({ checked: e, children: t, closeOnSelect: n, closesByDefault: i, commit: a, description: o, disabled: s, icon: c, indicator: l, meta: u, onSelect: f, ref: p, render: m, role: h = "menuitem", shortcut: y, textValue: b, tone: x, ...S }) {
253
- let C = B(), w = z(), T = r(void 0), E = `${d()}description`, D = (e, t) => {
255
+ function J({ checked: e, children: t, closeOnSelect: n, closesByDefault: i, commit: a, description: o, disabled: s, icon: c, indicator: l, meta: u, onSelect: f, ref: p, render: m, role: h = "menuitem", shortcut: y, textValue: b, tone: x, ...S }) {
256
+ let C = z(), w = R(), T = r(void 0), E = `${d()}description`, ee = (e, t) => {
254
257
  if (s === !0) return;
255
258
  a?.(e, t);
256
259
  let r = !1;
@@ -264,9 +267,9 @@ function Y({ checked: e, children: t, closeOnSelect: n, closesByDefault: i, comm
264
267
  r = !0;
265
268
  }
266
269
  }), !r && (n ?? i ?? C.closeOnSelect) && w?.closeAll("select", t);
267
- }, ee = (e) => {
268
- D(e.detail === 0 ? "keyboard" : "pointer", e.nativeEvent);
269
- }, O = (e) => {
270
+ }, te = (e) => {
271
+ ee(e.detail === 0 ? "keyboard" : "pointer", e.nativeEvent);
272
+ }, D = (e) => {
270
273
  if (e.key === " " && h !== "menuitem") {
271
274
  if (e.preventDefault(), s === !0) return;
272
275
  a?.("keyboard", e.nativeEvent), f?.({
@@ -276,24 +279,24 @@ function Y({ checked: e, children: t, closeOnSelect: n, closesByDefault: i, comm
276
279
  preventDefault: () => void 0
277
280
  });
278
281
  }
279
- }, k = (e) => {
282
+ }, O = (e) => {
280
283
  let t = e.currentTarget;
281
284
  t.ownerDocument.activeElement !== t && t.focus({ preventScroll: !0 });
282
- }, A = (e) => {
285
+ }, k = (e) => {
283
286
  let t = e.currentTarget;
284
287
  t.ownerDocument.activeElement === t && w?.openItem !== t && w?.node?.focus({ preventScroll: !0 });
285
- }, j = {
288
+ }, A = {
286
289
  ...S,
287
290
  children: /* @__PURE__ */ v(g, { children: [
288
291
  l,
289
- c === void 0 ? null : /* @__PURE__ */ _(W, { children: c }),
290
- /* @__PURE__ */ _(G, { children: t }),
291
- o === void 0 ? null : /* @__PURE__ */ _(K, {
292
+ c === void 0 ? null : /* @__PURE__ */ _(U, { children: c }),
293
+ /* @__PURE__ */ _(W, { children: t }),
294
+ o === void 0 ? null : /* @__PURE__ */ _(G, {
292
295
  id: E,
293
296
  children: o
294
297
  }),
295
- u === void 0 ? null : /* @__PURE__ */ _(q, { children: u }),
296
- y === void 0 ? null : /* @__PURE__ */ _(J, { keys: y })
298
+ u === void 0 ? null : /* @__PURE__ */ _(K, { children: u }),
299
+ y === void 0 ? null : /* @__PURE__ */ _(q, { keys: y })
297
300
  ] }),
298
301
  ...e === void 0 ? {} : { "aria-checked": e },
299
302
  ...o === void 0 ? {} : { "aria-describedby": E },
@@ -302,32 +305,32 @@ function Y({ checked: e, children: t, closeOnSelect: n, closesByDefault: i, comm
302
305
  "aria-disabled": !0,
303
306
  "data-disabled": ""
304
307
  } : {},
305
- ...y === void 0 ? {} : { "aria-keyshortcuts": ae(y, T) },
308
+ ...y === void 0 ? {} : { "aria-keyshortcuts": oe(y, T) },
306
309
  ...b === void 0 ? {} : { "data-text-value": b },
307
310
  ...x === void 0 ? {} : { "data-tone": x },
308
311
  "data-part": "item",
309
- onClick: H(S.onClick, ee),
310
- onKeyDown: H(S.onKeyDown, O),
311
- onPointerLeave: H(S.onPointerLeave, A),
312
- onPointerMove: H(S.onPointerMove, k),
312
+ onClick: V(S.onClick, te),
313
+ onKeyDown: V(S.onKeyDown, D),
314
+ onPointerLeave: V(S.onPointerLeave, k),
315
+ onPointerMove: V(S.onPointerMove, O),
313
316
  role: h,
314
317
  tabIndex: -1
315
- }, M = (e) => {
318
+ }, j = (e) => {
316
319
  typeof p == "function" ? p(e) : p != null && (p.current = e);
317
320
  };
318
321
  return m === void 0 ? /* @__PURE__ */ _("button", {
319
322
  type: "button",
320
- ...j,
323
+ ...A,
321
324
  ref: p
322
325
  }) : m({
323
- ...j,
324
- ref: M
326
+ ...A,
327
+ ref: j
325
328
  });
326
329
  }
327
- function X(e) {
328
- return /* @__PURE__ */ _(Y, { ...e });
330
+ function Y(e) {
331
+ return /* @__PURE__ */ _(J, { ...e });
329
332
  }
330
- function se({ checked: e, defaultChecked: t, onCheckedChange: n, ...r }) {
333
+ function X({ checked: e, defaultChecked: t, onCheckedChange: n, ...r }) {
331
334
  let [i, a] = h(t ?? !1), s = e ?? i, c = (t, r) => {
332
335
  o({
333
336
  controlled: e,
@@ -335,22 +338,22 @@ function se({ checked: e, defaultChecked: t, onCheckedChange: n, ...r }) {
335
338
  onRequest: (e) => n?.(e.value, e)
336
339
  }).request(!s, t, r) && a(!s);
337
340
  };
338
- return /* @__PURE__ */ _(Y, {
341
+ return /* @__PURE__ */ _(J, {
339
342
  ...r,
340
343
  checked: s,
341
344
  closesByDefault: !1,
342
345
  commit: c,
343
- indicator: /* @__PURE__ */ _(ce, { glyph: "check" }),
346
+ indicator: /* @__PURE__ */ _(Z, { glyph: "check" }),
344
347
  role: "menuitemcheckbox"
345
348
  });
346
349
  }
347
- function ce({ glyph: n }) {
350
+ function Z({ glyph: n }) {
348
351
  return /* @__PURE__ */ _("span", {
349
352
  "data-part": "indicator",
350
353
  children: /* @__PURE__ */ _(t, { children: /* @__PURE__ */ _(e, { name: n }) })
351
354
  });
352
355
  }
353
- var Z = s(null);
356
+ var ce = s(null);
354
357
  function Q({ children: e, defaultValue: t, onValueChange: n, value: r, ...i }) {
355
358
  let [a, s] = h(t), l = r ?? a, u = c((e, t, i) => {
356
359
  o({
@@ -367,7 +370,7 @@ function Q({ children: e, defaultValue: t, onValueChange: n, value: r, ...i }) {
367
370
  ...i,
368
371
  "data-part": "group",
369
372
  role: "group",
370
- children: /* @__PURE__ */ _(Z.Provider, {
373
+ children: /* @__PURE__ */ _(ce.Provider, {
371
374
  value: {
372
375
  select: u,
373
376
  value: l
@@ -376,40 +379,40 @@ function Q({ children: e, defaultValue: t, onValueChange: n, value: r, ...i }) {
376
379
  })
377
380
  });
378
381
  }
379
- function le({ value: e, ...t }) {
380
- let n = l(Z);
382
+ function $({ value: e, ...t }) {
383
+ let n = l(ce);
381
384
  if (n === null) throw Error("MenuRadioItem has to be inside a MenuRadioGroup.");
382
- return /* @__PURE__ */ _(Y, {
385
+ return /* @__PURE__ */ _(J, {
383
386
  ...t,
384
387
  checked: n.value === e,
385
388
  closesByDefault: !1,
386
389
  commit: (t, r) => n.select(e, t, r),
387
- indicator: /* @__PURE__ */ _(ce, { glyph: "dot" }),
390
+ indicator: /* @__PURE__ */ _(Z, { glyph: "dot" }),
388
391
  role: "menuitemradio"
389
392
  });
390
393
  }
391
- function ue({ children: e, label: t, ...n }) {
394
+ function le({ children: e, label: t, ...n }) {
392
395
  let r = `${d()}group`;
393
396
  return /* @__PURE__ */ v("div", {
394
397
  ...n,
395
398
  ...t === void 0 ? {} : { "aria-labelledby": r },
396
399
  "data-part": "group",
397
400
  role: "group",
398
- children: [t === void 0 ? null : /* @__PURE__ */ _(de, {
401
+ children: [t === void 0 ? null : /* @__PURE__ */ _(ue, {
399
402
  id: r,
400
403
  children: t
401
404
  }), e]
402
405
  });
403
406
  }
404
- function de({ children: e, ...t }) {
407
+ function ue({ children: e, ...t }) {
405
408
  return /* @__PURE__ */ _("div", {
406
409
  ...t,
407
410
  "data-part": "group-label",
408
411
  children: e
409
412
  });
410
413
  }
411
- function fe({ children: e, id: t, ...n }) {
412
- let r = z(), i = `${d()}header`, a = t ?? i, o = r?.setHeaderId;
414
+ function de({ children: e, id: t, ...n }) {
415
+ let r = R(), i = `${d()}header`, a = t ?? i, o = r?.setHeaderId;
413
416
  return u(() => (o?.(a), () => o?.(null)), [a, o]), /* @__PURE__ */ _("div", {
414
417
  ...n,
415
418
  "data-part": "header",
@@ -417,7 +420,7 @@ function fe({ children: e, id: t, ...n }) {
417
420
  children: e
418
421
  });
419
422
  }
420
- function pe(e) {
423
+ function fe(e) {
421
424
  return /* @__PURE__ */ _("hr", {
422
425
  ...e,
423
426
  "aria-orientation": "horizontal",
@@ -425,7 +428,7 @@ function pe(e) {
425
428
  role: "separator"
426
429
  });
427
430
  }
428
- function me({ children: e, ...t }) {
431
+ function pe({ children: e, ...t }) {
429
432
  return /* @__PURE__ */ _("div", {
430
433
  ...t,
431
434
  "data-part": "empty",
@@ -434,7 +437,7 @@ function me({ children: e, ...t }) {
434
437
  }
435
438
  //#endregion
436
439
  //#region src/menu/menu-parts.tsx
437
- function $(e, t) {
440
+ function me(e, t) {
438
441
  return (n) => {
439
442
  e?.(n), n.defaultPrevented || t(n);
440
443
  };
@@ -466,7 +469,7 @@ function we(e, t) {
466
469
  (n[r + t] ?? e).focus({ preventScroll: !0 });
467
470
  }
468
471
  function Te({ children: n, icon: r, meta: i, ref: a, render: o, ...s }) {
469
- let l = B(), d = l.parent, f = l.onBar, p = l.menubar, [y, b] = h(null), x = m(void 0), S = m(null), w = m({
472
+ let l = z(), d = l.parent, f = l.onBar, p = l.menubar, [y, b] = h(null), x = m(void 0), S = m(null), w = m({
470
473
  menu: l,
471
474
  node: y
472
475
  });
@@ -489,9 +492,9 @@ function Te({ children: n, icon: r, meta: i, ref: a, render: o, ...s }) {
489
492
  ]);
490
493
  let E = (e, t, n) => {
491
494
  l.entry.current = t, l.toggle(!0, e, n);
492
- }, D = (e) => {
493
- l.disabled || l.open && d !== null || (l.entry.current = "first", l.toggle(!l.open, "pointer", e.nativeEvent));
494
495
  }, ee = (e) => {
496
+ l.disabled || l.open && d !== null || (l.entry.current = "first", l.toggle(!l.open, "pointer", e.nativeEvent));
497
+ }, te = (e) => {
495
498
  if (l.disabled) return;
496
499
  let t = Ce(y) === "rtl" ? "ArrowLeft" : "ArrowRight", n = p?.orientation === "vertical", r = d === null && (!f || !n) && e.key === "ArrowDown", i = d === null && (!f || !n) && e.key === "ArrowUp", a = e.key === t && (d !== null || f && n);
497
500
  if (r || a) {
@@ -503,7 +506,7 @@ function Te({ children: n, icon: r, meta: i, ref: a, render: o, ...s }) {
503
506
  return;
504
507
  }
505
508
  d !== null && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), E("keyboard", "first", e.nativeEvent));
506
- }, O = (e) => {
509
+ }, D = (e) => {
507
510
  if (!l.disabled) {
508
511
  if (T(), d !== null) {
509
512
  if (d.setOpenItem(y), !l.openOnHover || l.open) return;
@@ -512,7 +515,7 @@ function Te({ children: n, icon: r, meta: i, ref: a, render: o, ...s }) {
512
515
  }
513
516
  f && p !== null && p.value !== void 0 && p.value !== l.contentId && (y?.focus({ preventScroll: !0 }), E("pointer", "first", e.nativeEvent));
514
517
  }
515
- }, k = (e) => {
518
+ }, O = (e) => {
516
519
  if (x.current !== void 0 && (clearTimeout(x.current), x.current = void 0), d === null || !l.open) return;
517
520
  let t = l.contentNode;
518
521
  t !== null && (S.current?.destroy(), S.current = C({
@@ -524,20 +527,20 @@ function Te({ children: n, icon: r, meta: i, ref: a, render: o, ...s }) {
524
527
  n.node?.matches(":hover") || t.matches(":hover") || n.menu.toggle(!1, "pointer", e.nativeEvent);
525
528
  }
526
529
  }));
527
- }, A = c((e) => {
530
+ }, k = c((e) => {
528
531
  b(e), he(e, a);
529
- }, [a]), j = d === null ? n : /* @__PURE__ */ v(g, { children: [
530
- r === void 0 ? null : /* @__PURE__ */ _(W, { children: r }),
531
- /* @__PURE__ */ _(G, { children: n }),
532
- i === void 0 ? null : /* @__PURE__ */ _(q, { children: i }),
532
+ }, [a]), A = d === null ? n : /* @__PURE__ */ v(g, { children: [
533
+ r === void 0 ? null : /* @__PURE__ */ _(U, { children: r }),
534
+ /* @__PURE__ */ _(W, { children: n }),
535
+ i === void 0 ? null : /* @__PURE__ */ _(K, { children: i }),
533
536
  /* @__PURE__ */ _(t, {
534
537
  directional: !0,
535
538
  children: /* @__PURE__ */ _(e, { name: "chevron-right" })
536
539
  })
537
- ] }), M = {
540
+ ] }), j = {
538
541
  type: "button",
539
542
  ...s,
540
- children: j,
543
+ children: A,
541
544
  "aria-controls": l.open ? l.contentId : void 0,
542
545
  "aria-expanded": l.open,
543
546
  "aria-haspopup": "menu",
@@ -555,54 +558,54 @@ function Te({ children: n, icon: r, meta: i, ref: a, render: o, ...s }) {
555
558
  "data-part": "item",
556
559
  tabIndex: -1
557
560
  },
558
- onClick: $(s.onClick, D),
559
- onKeyDown: $(s.onKeyDown, ee),
560
- onPointerEnter: $(s.onPointerEnter, O),
561
- onPointerLeave: $(s.onPointerLeave, k)
561
+ onClick: me(s.onClick, ee),
562
+ onKeyDown: me(s.onKeyDown, te),
563
+ onPointerEnter: me(s.onPointerEnter, D),
564
+ onPointerLeave: me(s.onPointerLeave, O)
562
565
  };
563
566
  return o === void 0 ? /* @__PURE__ */ _("button", {
564
- ...M,
565
- ref: A
567
+ ...j,
568
+ ref: k
566
569
  }) : o({
567
- ...M,
568
- ref: A
570
+ ...j,
571
+ ref: k
569
572
  });
570
573
  }
571
574
  function Ee({ children: e, loading: t, ref: n, render: r, ...a }) {
572
- let o = B(), s = o.parent, [l, d] = h(null), [f, g] = h(null), [v, x] = h(null), [C, O] = h("unmounted"), [k, A] = h(!1), [j, M] = h(null), [te, ne] = h(null), N = m(null), P = m(null), F = m({
575
+ let o = z(), s = o.parent, [l, d] = h(null), [f, g] = h(null), [v, x] = h(null), [C, D] = h("unmounted"), [O, k] = h(!1), [A, j] = h(null), [ne, re] = h(null), M = m(null), N = m(null), P = m({
573
576
  menu: o,
574
577
  surfaceNode: f
575
578
  });
576
- F.current = {
579
+ P.current = {
577
580
  menu: o,
578
581
  surfaceNode: f
579
582
  }, u(() => {
580
583
  let e = y({
581
- present: F.current.menu.open,
582
- onStatusChange: O
584
+ present: P.current.menu.open,
585
+ onStatusChange: D
583
586
  });
584
- return N.current = e, O(e.status), () => {
585
- e.destroy(), N.current = null;
587
+ return M.current = e, D(e.status), () => {
588
+ e.destroy(), M.current = null;
586
589
  };
587
590
  }, []), u(() => {
588
- N.current?.sync(o.open);
591
+ M.current?.sync(o.open);
589
592
  }, [o.open]), u(() => {
590
- N.current?.setNode(l);
593
+ M.current?.setNode(l);
591
594
  }, [l]), u(() => {
592
595
  o.setContentNode(f);
593
596
  }, [o, f]);
594
- let I = o.mount === "eager" || o.mount === "lazy" && o.seen || o.open || C !== "unmounted";
597
+ let F = o.mount === "eager" || o.mount === "lazy" && o.seen || o.open || C !== "unmounted";
595
598
  u(() => {
596
599
  let e = o.triggerNode;
597
- if (e === null || k) return;
598
- let t = () => A(!0);
600
+ if (e === null || O) return;
601
+ let t = () => k(!0);
599
602
  return e.addEventListener("focusin", t), e.addEventListener("pointerdown", t), () => {
600
603
  e.removeEventListener("focusin", t), e.removeEventListener("pointerdown", t);
601
604
  };
602
- }, [o.triggerNode, k]);
603
- let R = I || k;
605
+ }, [o.triggerNode, O]);
606
+ let L = F || O;
604
607
  p(() => {
605
- if (!R) {
608
+ if (!L) {
606
609
  x(null);
607
610
  return;
608
611
  }
@@ -612,19 +615,19 @@ function Ee({ children: e, loading: t, ref: n, render: r, ...a }) {
612
615
  });
613
616
  return x(e.container), () => e.release();
614
617
  }, [
615
- R,
618
+ L,
616
619
  o.portal,
617
620
  o.triggerNode
618
621
  ]);
619
- let { align: z, alignOffset: re, collisionPadding: ie, flip: V, hideWhenDetached: H, shift: U, side: ae, sideOffset: oe, strategy: W } = o, G = o.anchor ?? o.triggerNode, K = m(null), q = m(0), J = c((e, t) => {
622
+ let { align: R, alignOffset: ie, collisionPadding: ae, flip: B, hideWhenDetached: V, shift: H, side: oe, sideOffset: se, strategy: U } = o, W = o.anchor ?? o.triggerNode, G = m(null), K = m(0), q = c((e, t) => {
620
623
  e.update().then(() => {
621
- if (K.current !== e || !F.current.menu.open) return;
624
+ if (G.current !== e || !P.current.menu.open) return;
622
625
  let n = t.hasAttribute("data-open");
623
626
  t.setAttribute("data-open", "");
624
627
  let r = t.ownerDocument.defaultView;
625
- n || r === null || q.current !== 0 || (q.current = r.requestAnimationFrame(() => {
626
- q.current = 0;
627
- let { menu: e, surfaceNode: t } = F.current;
628
+ n || r === null || K.current !== 0 || (K.current = r.requestAnimationFrame(() => {
629
+ K.current = 0;
630
+ let { menu: e, surfaceNode: t } = P.current;
628
631
  if (!e.open || t === null) return;
629
632
  let n = e.onBar ? e.menubar : null, r = n === null ? e.entry.current : n.entry.current;
630
633
  e.entry.current = "first", n !== null && (n.entry.current = "first"), r !== "trigger" && Se(t, r);
@@ -632,7 +635,7 @@ function Ee({ children: e, loading: t, ref: n, render: r, ...a }) {
632
635
  });
633
636
  }, []);
634
637
  p(() => {
635
- if (l === null || G === null) return;
638
+ if (l === null || W === null) return;
636
639
  let e = o.parent !== null && f !== null && o.triggerNode !== null ? T({
637
640
  parentSurface: o.parent.node,
638
641
  item: o.triggerNode,
@@ -640,49 +643,49 @@ function Ee({ children: e, loading: t, ref: n, render: r, ...a }) {
640
643
  }) : {
641
644
  sideOffset: 0,
642
645
  alignOffset: 0
643
- }, t = w(G, l, {
644
- align: z,
645
- alignOffset: re + e.alignOffset,
646
- boundaryPadding: ie,
647
- flip: V,
648
- hideWhenDetached: H,
649
- shift: U,
650
- side: ae,
651
- sideOffset: oe + e.sideOffset,
652
- strategy: W
646
+ }, t = w(W, l, {
647
+ align: R,
648
+ alignOffset: ie + e.alignOffset,
649
+ boundaryPadding: ae,
650
+ flip: B,
651
+ hideWhenDetached: V,
652
+ shift: H,
653
+ side: oe,
654
+ sideOffset: se + e.sideOffset,
655
+ strategy: U
653
656
  });
654
- return K.current = t, F.current.menu.open && J(t, l), () => {
655
- t.destroy(), K.current = null, l.removeAttribute("data-open");
657
+ return G.current = t, P.current.menu.open && q(t, l), () => {
658
+ t.destroy(), G.current = null, l.removeAttribute("data-open");
656
659
  };
657
660
  }, [
658
- z,
659
- re,
660
- G,
661
+ R,
661
662
  ie,
663
+ W,
664
+ ae,
665
+ B,
662
666
  V,
663
- H,
664
667
  l,
665
668
  o.parent,
666
669
  o.triggerNode,
667
- U,
668
- ae,
670
+ H,
669
671
  oe,
670
- W,
672
+ se,
673
+ U,
671
674
  f,
672
- J
675
+ q
673
676
  ]), p(() => {
674
- let e = K.current;
677
+ let e = G.current;
675
678
  if (e !== null && l !== null) {
676
679
  if (o.open) {
677
- J(e, l);
680
+ q(e, l);
678
681
  return;
679
682
  }
680
- l.removeAttribute("data-open"), q.current !== 0 && (l.ownerDocument.defaultView?.cancelAnimationFrame(q.current), q.current = 0);
683
+ l.removeAttribute("data-open"), K.current !== 0 && (l.ownerDocument.defaultView?.cancelAnimationFrame(K.current), K.current = 0);
681
684
  }
682
685
  }, [
683
686
  l,
684
687
  o.open,
685
- J
688
+ q
686
689
  ]), u(() => {
687
690
  if (l === null || !o.open) return;
688
691
  let e = [o.triggerNode, s?.node ?? null].filter((e) => e !== null), t = S(l, {
@@ -694,7 +697,7 @@ function Ee({ children: e, loading: t, ref: n, render: r, ...a }) {
694
697
  scrollLock: !1,
695
698
  onDismiss: (e) => {
696
699
  let t = e.reason === "escape" ? "escape" : "outsidePress";
697
- F.current.menu.toggle(!1, t, e.source), t === "outsidePress" && s?.closeAll("outsidePress", e.source);
700
+ P.current.menu.toggle(!1, t, e.source), t === "outsidePress" && s?.closeAll("outsidePress", e.source);
698
701
  }
699
702
  });
700
703
  return () => t.destroy();
@@ -711,37 +714,37 @@ function Ee({ children: e, loading: t, ref: n, render: r, ...a }) {
711
714
  focus: be,
712
715
  includeAriaDisabled: !0,
713
716
  itemSelector: ge,
714
- loop: () => F.current.menu.loop,
717
+ loop: () => P.current.menu.loop,
715
718
  orientation: () => "vertical"
716
719
  });
717
720
  return () => e.destroy();
718
721
  }, [f]), u(() => {
719
722
  if (!o.typeahead) return;
720
723
  let e = E({ timeout: o.typeaheadTimeout });
721
- return P.current = e, () => {
722
- e.destroy(), P.current = null;
724
+ return N.current = e, () => {
725
+ e.destroy(), N.current = null;
723
726
  };
724
727
  }, [o.typeahead, o.typeaheadTimeout]), u(() => {
725
- o.open || (M(null), P.current?.reset());
728
+ o.open || (j(null), N.current?.reset());
726
729
  }, [o.open]);
727
- let Y = c((e, t) => {
728
- F.current.menu.toggle(!1, e, t), s?.closeAll(e, t);
729
- }, [s]), X = {
730
+ let J = c((e, t) => {
731
+ P.current.menu.toggle(!1, e, t), s?.closeAll(e, t);
732
+ }, [s]), Y = {
730
733
  close: (e, t) => o.toggle(!1, e, t),
731
- closeAll: Y,
734
+ closeAll: J,
732
735
  depth: (s?.depth ?? -1) + 1,
733
736
  focusItem: (e) => xe(f, e),
734
737
  node: f,
735
- openItem: j,
738
+ openItem: A,
736
739
  rootTrigger: s?.rootTrigger ?? o.triggerNode,
737
- setHeaderId: ne,
738
- setOpenItem: M
739
- }, se = [a["aria-describedby"], te].filter(Boolean).join(" ") || void 0, ce = (e) => {
740
+ setHeaderId: re,
741
+ setOpenItem: j
742
+ }, X = [a["aria-describedby"], ne].filter(Boolean).join(" ") || void 0, Z = (e) => {
740
743
  let t = Ce(f), n = t === "rtl" ? "ArrowRight" : "ArrowLeft", r = t === "rtl" ? "ArrowLeft" : "ArrowRight", i = o.menubar;
741
744
  if (e.key === "Tab") {
742
745
  e.preventDefault();
743
- let t = X.rootTrigger;
744
- Y("dismiss", e.nativeEvent), i?.close("dismiss", e.nativeEvent), we(t, e.shiftKey ? -1 : 1);
746
+ let t = Y.rootTrigger;
747
+ J("dismiss", e.nativeEvent), i?.close("dismiss", e.nativeEvent), we(t, e.shiftKey ? -1 : 1);
745
748
  return;
746
749
  }
747
750
  if (e.key === n) {
@@ -758,52 +761,53 @@ function Ee({ children: e, loading: t, ref: n, render: r, ...a }) {
758
761
  }
759
762
  }
760
763
  if (e.key === r && i !== null) {
761
- e.preventDefault(), Y("keyboard", e.nativeEvent), i.step(1, {
764
+ e.preventDefault(), J("keyboard", e.nativeEvent), i.step(1, {
762
765
  open: !0,
763
766
  focus: !0
764
767
  });
765
768
  return;
766
769
  }
767
- if (!o.typeahead || P.current === null || e.ctrlKey || e.metaKey || e.altKey || !D(e.key, P.current.query.length > 0)) return;
770
+ if (!o.typeahead || N.current === null || e.ctrlKey || e.metaKey || e.altKey || !ee(e.key, N.current.query.length > 0)) return;
768
771
  e.preventDefault();
769
- let a = _e(f), c = a.findIndex((t) => t === e.target), l = P.current.match(e.key, a.map(ve), c);
772
+ let a = _e(f), c = a.findIndex((t) => t === e.target), l = N.current.match(e.key, a.map(ve), c);
770
773
  l !== -1 && xe(f, l);
771
- }, Z = c((e) => {
774
+ }, ce = c((e) => {
772
775
  d(e), he(e, n);
773
776
  }, [n]);
774
- if (!I) return null;
777
+ if (!F) return null;
775
778
  let Q = {
776
- "data-align": z,
779
+ "data-align": R,
777
780
  ...o.open ? {} : { inert: !0 },
778
781
  "data-part": "root",
779
782
  "data-size": o.size,
780
- "data-ui": "menu"
781
- }, le = /* @__PURE__ */ _("div", {
783
+ "data-ui": "menu",
784
+ "data-width": o.width
785
+ }, $ = /* @__PURE__ */ _("div", {
782
786
  ...Q,
783
- ref: Z,
787
+ ref: ce,
784
788
  children: /* @__PURE__ */ _("div", {
785
789
  ...a,
786
790
  "aria-busy": t === !0 || void 0,
787
- "aria-describedby": se,
791
+ "aria-describedby": X,
788
792
  "aria-labelledby": a["aria-label"] === void 0 ? o.triggerId : void 0,
789
793
  "data-loading": t === !0 ? "" : void 0,
790
794
  "data-part": "content",
791
795
  id: o.contentId,
792
- onKeyDown: $(a.onKeyDown, ce),
796
+ onKeyDown: me(a.onKeyDown, Z),
793
797
  ref: g,
794
798
  role: "menu",
795
799
  tabIndex: -1,
796
- children: /* @__PURE__ */ _(L, {
797
- value: X,
800
+ children: /* @__PURE__ */ _(I, {
801
+ value: Y,
798
802
  children: e
799
803
  })
800
804
  })
801
- }), ue = r === void 0 ? le : r({
805
+ }), le = r === void 0 ? $ : r({
802
806
  ...Q,
803
807
  children: e,
804
- ref: Z
808
+ ref: ce
805
809
  });
806
- return v === null ? ue : ee(ue, v);
810
+ return v === null ? le : te(le, v);
807
811
  }
808
812
  //#endregion
809
- export { M as C, re as S, ne as T, V as _, ue as a, B as b, X as c, G as d, q as f, pe as g, le as h, me as i, K as l, Q as m, Te as n, de as o, J as p, se as r, fe as s, Ee as t, W as u, L as v, N as w, z as x, R as y };
813
+ export { j as C, ie as S, re as T, B as _, le as a, z as b, Y as c, W as d, K as f, fe as g, $ as h, pe as i, G as l, Q as m, Te as n, ue as o, q as p, X as r, de as s, Ee as t, U as u, I as v, M as w, R as x, L as y };