@wix/site-ui 1.347.0 → 1.349.0

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 (226) hide show
  1. package/dist/{6706.js → 1093.js} +3 -3
  2. package/dist/{8724.js → 1219.js} +2 -2
  3. package/dist/{7373.js → 1288.js} +8 -2
  4. package/dist/{5299.js → 1381.js} +98 -127
  5. package/dist/{3056.js → 1607.js} +32 -34
  6. package/dist/1629.js +2 -0
  7. package/dist/1669.js +75 -0
  8. package/dist/1718.js +26 -0
  9. package/dist/{1477.js → 201.js} +17 -26
  10. package/dist/2221.js +9 -0
  11. package/dist/{2445.js → 226.js} +12 -48
  12. package/dist/2387.js +7 -0
  13. package/dist/2580.js +6 -0
  14. package/dist/{1500.js → 2859.js} +10 -34
  15. package/dist/3014.js +178 -0
  16. package/dist/{6247.js → 3054.js} +3 -3
  17. package/dist/{7642.js → 3093.js} +1 -1
  18. package/dist/3189.js +5 -0
  19. package/dist/{7564.js → 331.js} +2 -2
  20. package/dist/3357.js +7 -0
  21. package/dist/{487.js → 3398.js} +38 -39
  22. package/dist/3502.js +224 -0
  23. package/dist/3695.js +50 -0
  24. package/dist/3829.js +1 -1
  25. package/dist/{6588.js → 3859.js} +115 -92
  26. package/dist/{3670.js → 3910.js} +28 -21
  27. package/dist/392.js +7 -0
  28. package/dist/{4549.js → 4155.js} +11 -3
  29. package/dist/4226.js +7 -0
  30. package/dist/{6329.js → 4229.js} +1 -1
  31. package/dist/4293.js +3 -0
  32. package/dist/4346.js +853 -2
  33. package/dist/{285.js → 4472.js} +3 -3
  34. package/dist/4605.js +207 -0
  35. package/dist/{7366.js → 488.js} +60 -7
  36. package/dist/{8750.js → 497.js} +190 -375
  37. package/dist/4989.js +35 -0
  38. package/dist/{6270.js → 510.js} +157 -196
  39. package/dist/5258.js +26 -0
  40. package/dist/{5036.js → 5275.js} +0 -3
  41. package/dist/{8171.js → 5298.js} +90 -102
  42. package/dist/5473.js +11 -0
  43. package/dist/{4745.js → 5490.js} +3 -1
  44. package/dist/{6089.js → 5561.js} +869 -786
  45. package/dist/{8996.js → 5595.js} +4 -3
  46. package/dist/5890.js +25 -0
  47. package/dist/{6046.js → 5969.js} +1 -1
  48. package/dist/5984.js +38 -0
  49. package/dist/{8527.js → 6006.js} +3 -3
  50. package/dist/6040.js +97 -0
  51. package/dist/{8758.js → 6137.js} +10 -8
  52. package/dist/{4281.js → 6140.js} +18 -10
  53. package/dist/{8960.js → 6191.js} +2 -2
  54. package/dist/6240.js +121 -0
  55. package/dist/{4490.js → 6373.js} +7 -5
  56. package/dist/{904.js → 6487.js} +19 -17
  57. package/dist/{9635.js → 6498.js} +1 -1
  58. package/dist/6499.js +4 -7
  59. package/dist/6508.js +7 -0
  60. package/dist/{8225.js → 6540.js} +1 -0
  61. package/dist/6551.js +46 -0
  62. package/dist/{9369.js → 6620.js} +35 -34
  63. package/dist/{4143.js → 6838.js} +19 -10
  64. package/dist/6902.js +48 -0
  65. package/dist/6904.js +51 -0
  66. package/dist/70.js +24 -0
  67. package/dist/7024.js +39 -0
  68. package/dist/{6882.js → 721.js} +737 -362
  69. package/dist/{951.js → 7270.js} +4 -4
  70. package/dist/{3485.js → 7323.js} +143 -111
  71. package/dist/{7541.js → 7488.js} +2 -2
  72. package/dist/{4863.js → 7542.js} +7 -6
  73. package/dist/7551.js +28 -0
  74. package/dist/{7021.js → 7640.js} +1 -1
  75. package/dist/{353.js → 7692.js} +3 -7
  76. package/dist/{4707.js → 7930.js} +2 -2
  77. package/dist/{8052.js → 8.js} +80 -64
  78. package/dist/{6914.js → 8129.js} +3 -15
  79. package/dist/{3319.js → 8358.js} +62 -63
  80. package/dist/{5864.js → 8407.js} +13 -13
  81. package/dist/8488.js +15 -0
  82. package/dist/{4768.js → 8495.js} +1 -1
  83. package/dist/8734.js +171 -0
  84. package/dist/{1763.js → 9018.js} +205 -331
  85. package/dist/9053.js +29 -0
  86. package/dist/9067.js +41 -0
  87. package/dist/{2861.js → 9120.js} +2 -2
  88. package/dist/{42.js → 9197.js} +2 -2
  89. package/dist/{9189.js → 9248.js} +36 -17
  90. package/dist/{2801.js → 9252.js} +4 -9
  91. package/dist/9295.js +7 -0
  92. package/dist/9303.js +8 -0
  93. package/dist/{167.js → 9374.js} +1 -1
  94. package/dist/{9352.js → 9540.js} +17 -47
  95. package/dist/9576.js +51 -0
  96. package/dist/{8272.js → 9591.js} +36 -46
  97. package/dist/{6107.js → 9770.js} +2 -2
  98. package/dist/{5085.js → 9880.js} +6 -3
  99. package/dist/Accordion/index.d.ts +207 -41
  100. package/dist/Accordion/index.js +75 -177
  101. package/dist/AlertDialog/index.d.ts +440 -140
  102. package/dist/AlertDialog/index.js +3 -13
  103. package/dist/Autocomplete/index.d.ts +722 -150
  104. package/dist/Autocomplete/index.js +16 -29
  105. package/dist/Avatar/index.d.ts +38 -3
  106. package/dist/Avatar/index.js +82 -28
  107. package/dist/Breadcrumbs/index.d.ts +63 -91
  108. package/dist/Breadcrumbs/index.js +1 -1
  109. package/dist/Button/index.d.ts +11 -0
  110. package/dist/Button/index.js +2 -2
  111. package/dist/Checkbox/index.d.ts +206 -36
  112. package/dist/Checkbox/index.js +293 -8
  113. package/dist/CheckboxField/index.css +1 -1
  114. package/dist/CheckboxField/index.d.ts +40 -36
  115. package/dist/CheckboxGroup/index.d.ts +50 -36
  116. package/dist/CheckboxGroup/index.js +87 -58
  117. package/dist/CheckboxGroupField/index.css +1 -1
  118. package/dist/Collapsible/index.d.ts +128 -36
  119. package/dist/Collapsible/index.js +21 -25
  120. package/dist/Combobox/index.d.ts +801 -158
  121. package/dist/Combobox/index.js +70 -114
  122. package/dist/ContextMenu/index.d.ts +1162 -195
  123. package/dist/ContextMenu/index.js +46 -36
  124. package/dist/Dialog/index.d.ts +425 -133
  125. package/dist/Dialog/index.js +8 -4
  126. package/dist/Drawer/index.d.ts +589 -144
  127. package/dist/Drawer/index.js +482 -562
  128. package/dist/Field/index.css +1 -1
  129. package/dist/Field/index.d.ts +341 -42
  130. package/dist/Field/index.js +123 -273
  131. package/dist/Fieldset/index.d.ts +11 -0
  132. package/dist/Fieldset/index.js +10 -17
  133. package/dist/Form/index.d.ts +43 -39
  134. package/dist/Form/index.js +58 -50
  135. package/dist/Input/index.css +1 -1
  136. package/dist/Input/index.d.ts +94 -42
  137. package/dist/Input/index.js +1 -1
  138. package/dist/Menu/index.d.ts +1140 -175
  139. package/dist/Menu/index.js +51 -67
  140. package/dist/Menubar/index.d.ts +651 -173
  141. package/dist/Menubar/index.js +12 -16
  142. package/dist/Meter/index.js +21 -18
  143. package/dist/NavigationMenu/index.d.ts +370 -86
  144. package/dist/NavigationMenu/index.js +144 -178
  145. package/dist/NumberField/index.css +1 -1
  146. package/dist/NumberField/index.d.ts +507 -47
  147. package/dist/NumberField/index.js +434 -718
  148. package/dist/Popover/index.d.ts +561 -142
  149. package/dist/Popover/index.js +181 -252
  150. package/dist/PreviewCard/index.d.ts +507 -143
  151. package/dist/PreviewCard/index.js +97 -151
  152. package/dist/Progress/index.d.ts +117 -3
  153. package/dist/Progress/index.js +37 -36
  154. package/dist/Radio/index.d.ts +177 -7
  155. package/dist/Radio/index.js +54 -70
  156. package/dist/RadioField/index.css +1 -1
  157. package/dist/RadioField/index.d.ts +23 -7
  158. package/dist/RadioGroup/index.d.ts +51 -37
  159. package/dist/RadioGroup/index.js +60 -51
  160. package/dist/RadioGroupField/index.css +1 -1
  161. package/dist/RadioGroupField/index.d.ts +40 -37
  162. package/dist/ScrollArea/index.d.ts +295 -1
  163. package/dist/ScrollArea/index.js +256 -324
  164. package/dist/Select/index.d.ts +516 -123
  165. package/dist/Select/index.js +513 -635
  166. package/dist/SelectField/index.css +1 -1
  167. package/dist/SelectField/index.d.ts +109 -134
  168. package/dist/SelectField/index.js +5 -1
  169. package/dist/Separator/index.d.ts +12 -0
  170. package/dist/Separator/index.js +1 -1
  171. package/dist/Slider/index.d.ts +383 -64
  172. package/dist/Slider/index.js +298 -374
  173. package/dist/Switch/index.d.ts +184 -37
  174. package/dist/Switch/index.js +44 -58
  175. package/dist/Tabs/index.d.ts +220 -35
  176. package/dist/Tabs/index.js +199 -193
  177. package/dist/Toast/index.d.ts +280 -64
  178. package/dist/Toast/index.js +299 -374
  179. package/dist/Toggle/index.d.ts +55 -35
  180. package/dist/Toggle/index.js +19 -13
  181. package/dist/ToggleGroup/index.d.ts +62 -35
  182. package/dist/ToggleGroup/index.js +13 -31
  183. package/dist/Toolbar/index.d.ts +117 -2
  184. package/dist/Toolbar/index.js +31 -43
  185. package/dist/Tooltip/index.d.ts +507 -150
  186. package/dist/Tooltip/index.js +163 -213
  187. package/dist/index.d.ts +12912 -5382
  188. package/package.json +3 -3
  189. package/dist/2205.js +0 -26
  190. package/dist/2274.js +0 -34
  191. package/dist/2287.js +0 -17
  192. package/dist/3020.js +0 -7
  193. package/dist/3021.js +0 -72
  194. package/dist/3140.js +0 -4
  195. package/dist/3248.js +0 -307
  196. package/dist/4026.js +0 -12
  197. package/dist/4922.js +0 -15
  198. package/dist/5659.js +0 -4
  199. package/dist/5992.js +0 -447
  200. package/dist/6330.js +0 -30
  201. package/dist/6535.js +0 -72
  202. package/dist/6917.js +0 -55
  203. package/dist/7725.js +0 -10
  204. package/dist/7871.js +0 -38
  205. package/dist/8106.js +0 -239
  206. package/dist/8685.js +0 -102
  207. package/dist/8935.js +0 -8
  208. package/dist/8971.js +0 -40
  209. package/dist/8979.js +0 -10
  210. package/dist/9048.js +0 -52
  211. package/dist/9087.js +0 -256
  212. package/dist/9255.js +0 -136
  213. /package/dist/{1457.js → 1068.js} +0 -0
  214. /package/dist/{6003.js → 1234.js} +0 -0
  215. /package/dist/{4723.js → 1282.js} +0 -0
  216. /package/dist/{6825.js → 1876.js} +0 -0
  217. /package/dist/{5778.js → 1885.js} +0 -0
  218. /package/dist/{2445.js.LICENSE.txt → 226.js.LICENSE.txt} +0 -0
  219. /package/dist/{1279.js → 3278.js} +0 -0
  220. /package/dist/{3296.js → 5568.js} +0 -0
  221. /package/dist/{8685.css → 6240.css} +0 -0
  222. /package/dist/{9829.js → 6488.js} +0 -0
  223. /package/dist/{9863.js → 6534.js} +0 -0
  224. /package/dist/{4495.js → 7718.js} +0 -0
  225. /package/dist/{3395.js → 8866.js} +0 -0
  226. /package/dist/{2418.js → 9837.js} +0 -0
@@ -14,22 +14,146 @@ import { ContextMenuRadioItemIndicatorProps as ContextMenuRadioItemIndicatorProp
14
14
  import { ContextMenuRadioItemProps as ContextMenuRadioItemProps_2 } from '@base-ui/react';
15
15
  import { ContextMenuSubmenuTriggerProps as ContextMenuSubmenuTriggerProps_2 } from '@base-ui/react';
16
16
  import { ContextMenuTriggerProps as ContextMenuTriggerProps_2 } from '@base-ui/react';
17
- import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.js';
18
- import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.js';
17
+ import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.mjs';
18
+ import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.mjs';
19
19
  import type { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
20
- import { JSX as JSX_2 } from 'react/jsx-runtime';
21
- import { MenuRootChangeEventReason } from '../index.js';
20
+ import { MenuRootChangeEventReason } from '../index.mjs';
22
21
  import { Padding } from '@floating-ui/react-dom';
23
22
  import * as React_2 from 'react';
24
23
  import { ReactStore } from '@base-ui/utils/store';
25
- import { Rect } from '@floating-ui/utils';
24
+ import type { Rect } from '@floating-ui/utils';
26
25
  import { SeparatorProps } from '@base-ui/react';
27
- import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.js';
26
+ import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.mjs';
28
27
  import type { UseFloatingReturn } from '@floating-ui/react-dom';
29
28
  import { VirtualElement } from '@floating-ui/react-dom';
30
29
 
30
+ declare type AdaptiveOriginMiddleware = {
31
+ name: string;
32
+ fn: (...args: any[]) => any;
33
+ };
34
+
31
35
  declare type Align = 'start' | 'center' | 'end';
32
36
 
37
+ /**
38
+ * Indicates how the popup is aligned relative to the specified side.
39
+ * @type {'start' | 'center' | 'end'}
40
+ */
41
+ declare const align = "data-align";
42
+
43
+ /**
44
+ * Indicates how the popup is aligned relative to specified side.
45
+ * @type {'start' | 'center' | 'end'}
46
+ */
47
+ declare const align_2 = "data-align";
48
+
49
+ /**
50
+ * Indicates how the popup is aligned relative to specified side.
51
+ * @type {'start' | 'center' | 'end'}
52
+ */
53
+ declare const align_3 = "data-align";
54
+
55
+ /**
56
+ * The anchor's height.
57
+ * @type {number}
58
+ */
59
+ declare const anchorHeight = "--anchor-height";
60
+
61
+ /**
62
+ * Present when the anchor is hidden.
63
+ */
64
+ declare const anchorHidden = "data-anchor-hidden";
65
+
66
+ /**
67
+ * The anchor's width.
68
+ * @type {number}
69
+ */
70
+ declare const anchorWidth = "--anchor-width";
71
+
72
+ /**
73
+ * The available height between the anchor and the edge of the viewport.
74
+ * @type {number}
75
+ */
76
+ declare const availableHeight = "--available-height";
77
+
78
+ /**
79
+ * The available width between the anchor and the edge of the viewport.
80
+ * @type {number}
81
+ */
82
+ declare const availableWidth = "--available-width";
83
+
84
+ /**
85
+ * Shared implementation for popup handles that coordinate detached triggers with a mounted root.
86
+ *
87
+ * Subclasses provide the component-specific imperative methods, while this base class owns the
88
+ * fallback store, root store attachment stack, subscriber notifications, and development warning for
89
+ * overlapping roots.
90
+ *
91
+ * @template HandleStore Store shape exposed to detached triggers.
92
+ * @template Store Root-owned store attached by the component root.
93
+ */
94
+ declare class BasePopupHandle<HandleStore extends PopupHandleStoreWithTriggers, Store extends HandleStore & PopupHandleStoreWithOpen> {
95
+ protected readonly fallbackStore: HandleStore;
96
+ private readonly componentName;
97
+ private readonly throwOnMissingTrigger;
98
+ /**
99
+ * Stores of every root currently using this handle, in attach order. A handle is meant to be used
100
+ * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
101
+ * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
102
+ * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
103
+ */
104
+ private readonly attachedStores;
105
+ /**
106
+ * Store of the root that currently controls the handle: the most recently attached one still
107
+ * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
108
+ */
109
+ private attachedStoreValue;
110
+ /**
111
+ * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
112
+ */
113
+ private readonly storeListeners;
114
+ /**
115
+ * Creates a handle backed by the store used while no root is attached.
116
+ *
117
+ * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
118
+ * so they can render and register without a mounted root. Triggers register into whichever store
119
+ * `store` currently resolves to, so while detached they live in this store's trigger map and
120
+ * migrate themselves to the root's store (and back) as it attaches/detaches.
121
+ * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
122
+ * `MenuHandle.open()` in warning text.
123
+ * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
124
+ * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
125
+ * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
126
+ */
127
+ constructor(fallbackStore: HandleStore, componentName: string, throwOnMissingTrigger?: boolean);
128
+ protected get attachedStore(): Store | null;
129
+ /**
130
+ * Sets the store that currently controls the handle and notifies subscribers when it changes, so
131
+ * detached triggers re-render and migrate their registration to the new store.
132
+ */
133
+ private setActiveStore;
134
+ /**
135
+ * Opens the attached root's store and associates it with the trigger with the given id, or a
136
+ * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
137
+ * `open()` method, which only narrows the parameter type.
138
+ *
139
+ * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
140
+ * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
141
+ *
142
+ * This method should only be called in an event handler or an effect (not during rendering).
143
+ *
144
+ * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
145
+ * without associating any trigger.
146
+ */
147
+ protected openByTrigger(triggerId: string | null | undefined): void;
148
+ /**
149
+ * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
150
+ * while no root is attached. Shared by every concrete handle's public `close()` method.
151
+ *
152
+ * This method should only be called in an event handler or an effect (not during rendering).
153
+ */
154
+ protected closePopup(): void;
155
+ }
156
+
33
157
  declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
34
158
  /**
35
159
  * The reason for the event.
@@ -95,17 +219,79 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
95
219
  readonly baseUIHandlerPrevented?: boolean | undefined;
96
220
  };
97
221
 
222
+ /**
223
+ * Details of custom generic events emitted by Base UI components.
224
+ */
225
+ declare type BaseUIGenericEventDetail<Reason extends string, CustomProperties extends object> = {
226
+ /**
227
+ * The reason for the event.
228
+ */
229
+ reason: Reason;
230
+ /**
231
+ * The native event associated with the custom event.
232
+ */
233
+ event: ReasonToEvent<Reason>;
234
+ } & CustomProperties;
235
+
236
+ declare type BaseUIGenericEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIGenericEventDetail<Reason, CustomProperties> & {} : never;
237
+
238
+ /** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */
239
+ declare type BaseUIHighlightEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends typeof REASONS.pointer ? {
240
+ reason: Reason;
241
+ event: MouseEvent | PointerEvent;
242
+ } & CustomProperties : BaseUIGenericEventDetails<Reason, CustomProperties>;
243
+
98
244
  declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
99
245
 
100
- declare const cancelOpen: "cancel-open";
246
+ declare const cancelOpen: 'cancel-open';
247
+
248
+ /**
249
+ * Present when the menu checkbox item is checked.
250
+ */
251
+ declare const checked = "data-checked";
101
252
 
102
- declare const chipRemovePress: "chip-remove-press";
253
+ /**
254
+ * Present when the menu checkbox item is checked.
255
+ */
256
+ declare const checked_2 = "data-checked";
103
257
 
104
- declare const clearPress: "clear-press";
258
+ /**
259
+ * Present when the menu radio item is selected.
260
+ */
261
+ declare const checked_3 = "data-checked";
105
262
 
106
- declare const closePress: "close-press";
263
+ /**
264
+ * Present when the menu radio item is selected.
265
+ */
266
+ declare const checked_4 = "data-checked";
267
+
268
+ declare const chipRemovePress: 'chip-remove-press';
107
269
 
108
- declare const closeWatcher: "close-watcher";
270
+ declare const clearPress: 'clear-press';
271
+
272
+ /**
273
+ * Present when the menu is closed.
274
+ */
275
+ declare const closed_2 = "data-closed";
276
+
277
+ /**
278
+ * Present when the menu popup is closed.
279
+ */
280
+ declare const closed_3 = "data-closed";
281
+
282
+ /**
283
+ * Present when the menu is closed.
284
+ */
285
+ declare const closed_4 = "data-closed";
286
+
287
+ /**
288
+ * Present when the menu popup is closed.
289
+ */
290
+ declare const closed_5 = "data-closed";
291
+
292
+ declare const closePress: 'close-press';
293
+
294
+ declare const closeWatcher: 'close-watcher';
109
295
 
110
296
  declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
111
297
 
@@ -123,8 +309,19 @@ declare type Context = PopupStoreContext<MenuRoot.ChangeEventDetails> & {
123
309
  readonly typingRef: React_2.RefObject<boolean>;
124
310
  readonly itemDomElements: React_2.RefObject<(HTMLElement | null)[]>;
125
311
  readonly itemLabels: React_2.RefObject<(string | null)[]>;
312
+ /** Why the next `activeIndex` write happens, consumed by `onItemHighlighted` on commit. */
313
+ highlightReason: MenuRoot.HighlightEventReason;
314
+ /** The event that caused the next `activeIndex` write, reported along with `highlightReason`. */
315
+ highlightEvent: Event | undefined;
316
+ /** The item last committed as highlighted, kept in every menu so reasons compare against it. */
317
+ reportedItem: HTMLElement | undefined;
126
318
  allowMouseUpTriggerRef: React_2.RefObject<boolean>;
319
+ /** The element that holds real focus while virtual list navigation is active. */
320
+ virtualFocusRef: React_2.RefObject<HTMLElement | null> | undefined;
321
+ /** Whether a filterable menu's trigger was last pressed by a screen reader. */
322
+ virtualPress?: boolean | undefined;
127
323
  readonly triggerFocusTargetRef: React_2.RefObject<HTMLElement | null>;
324
+ readonly beforeTriggerFocusGuardRef: React_2.RefObject<HTMLElement | null>;
128
325
  readonly beforeContentFocusGuardRef: React_2.RefObject<HTMLElement | null>;
129
326
  };
130
327
 
@@ -141,7 +338,7 @@ export declare const ContextMenu: {
141
338
  Backdrop: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ContextMenuBackdropProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
142
339
  className?: string;
143
340
  } & React_2.RefAttributes<HTMLDivElement>>;
144
- Positioner: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ContextMenuPositionerProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
341
+ Positioner: React_2.ForwardRefExoticComponent<Omit<Omit<ContextMenuPositionerProps_2 & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
145
342
  className?: string;
146
343
  } & React_2.RefAttributes<HTMLDivElement>>;
147
344
  Popup: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<ContextMenuPopupProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
@@ -194,7 +391,7 @@ export declare namespace ContextMenu_2 {
194
391
  ContextMenuTrigger as Trigger,
195
392
  MenuBackdrop as Backdrop,
196
393
  MenuPortal as Portal,
197
- MenuPositioner as Positioner,
394
+ ContextMenuPositioner as Positioner,
198
395
  MenuPopup as Popup,
199
396
  MenuArrow as Arrow,
200
397
  MenuGroup as Group,
@@ -212,6 +409,16 @@ export declare namespace ContextMenu_2 {
212
409
  }
213
410
  }
214
411
 
412
+ export declare namespace ContextMenuArrowDataAttributes {
413
+ export {
414
+ open_5 as open,
415
+ closed_5 as closed,
416
+ side_3 as side,
417
+ align_3 as align,
418
+ uncentered
419
+ }
420
+ }
421
+
215
422
  export declare interface ContextMenuArrowProps extends BaseUIComponentProps<'div', ContextMenuArrowState> {}
216
423
 
217
424
  export declare interface ContextMenuArrowState {
@@ -233,6 +440,15 @@ export declare interface ContextMenuArrowState {
233
440
  uncentered: boolean;
234
441
  }
235
442
 
443
+ export declare namespace ContextMenuBackdropDataAttributes {
444
+ export {
445
+ open_2 as open,
446
+ closed_2 as closed,
447
+ startingStyle,
448
+ endingStyle
449
+ }
450
+ }
451
+
236
452
  export declare interface ContextMenuBackdropProps extends BaseUIComponentProps<'div', ContextMenuBackdropState> {}
237
453
 
238
454
  export declare interface ContextMenuBackdropState {
@@ -246,6 +462,25 @@ export declare interface ContextMenuBackdropState {
246
462
  transitionStatus: TransitionStatus;
247
463
  }
248
464
 
465
+ export declare namespace ContextMenuCheckboxItemDataAttributes {
466
+ export {
467
+ checked,
468
+ unchecked,
469
+ disabled_3 as disabled,
470
+ highlighted_2 as highlighted
471
+ }
472
+ }
473
+
474
+ export declare namespace ContextMenuCheckboxItemIndicatorDataAttributes {
475
+ export {
476
+ checked_2 as checked,
477
+ unchecked_2 as unchecked,
478
+ disabled_4 as disabled,
479
+ startingStyle_3 as startingStyle,
480
+ endingStyle_3 as endingStyle
481
+ }
482
+ }
483
+
249
484
  export declare interface ContextMenuCheckboxItemIndicatorProps extends BaseUIComponentProps<'span', ContextMenuCheckboxItemIndicatorState> {
250
485
  /**
251
486
  * Whether to keep the HTML element in the DOM when the checkbox item is not checked.
@@ -301,7 +536,8 @@ export declare interface ContextMenuCheckboxItemProps extends NonNativeButtonPro
301
536
  */
302
537
  disabled?: boolean | undefined;
303
538
  /**
304
- * Overrides the text label to use when the item is matched during keyboard text navigation.
539
+ * Overrides the text used for keyboard text navigation and filtering.
540
+ * Falls back to the rendered text when not provided.
305
541
  */
306
542
  label?: string | undefined;
307
543
  /**
@@ -343,6 +579,13 @@ export declare interface ContextMenuGroupProps extends BaseUIComponentProps<'div
343
579
 
344
580
  export declare interface ContextMenuGroupState {}
345
581
 
582
+ export declare namespace ContextMenuItemDataAttributes {
583
+ export {
584
+ highlighted,
585
+ disabled_2 as disabled
586
+ }
587
+ }
588
+
346
589
  export declare interface ContextMenuItemProps extends NonNativeButtonProps, BaseUIComponentProps<'div', ContextMenuItemState> {
347
590
  /**
348
591
  * The click handler for the menu item.
@@ -354,7 +597,8 @@ export declare interface ContextMenuItemProps extends NonNativeButtonProps, Base
354
597
  */
355
598
  disabled?: boolean | undefined;
356
599
  /**
357
- * Overrides the text label to use when the item is matched during keyboard text navigation.
600
+ * Overrides the text used for keyboard text navigation and filtering.
601
+ * Falls back to the rendered text when not provided.
358
602
  */
359
603
  label?: string | undefined;
360
604
  /**
@@ -380,9 +624,16 @@ export declare interface ContextMenuItemState {
380
624
  highlighted: boolean;
381
625
  }
382
626
 
383
- export declare interface ContextMenuLinkItemProps extends BaseUIComponentProps<'a', ContextMenuLinkItemState> {
627
+ export declare namespace ContextMenuLinkItemDataAttributes {
628
+ export {
629
+ highlighted_3 as highlighted
630
+ }
631
+ }
632
+
633
+ export declare interface ContextMenuLinkItemProps extends BaseUIComponentProps<'a', ContextMenuLinkItemState, React_2.ComponentPropsWithRef<'a'>> {
384
634
  /**
385
- * Overrides the text label to use when the item is matched during keyboard text navigation.
635
+ * Overrides the text used for keyboard text navigation and filtering.
636
+ * Falls back to the rendered text when not provided.
386
637
  */
387
638
  label?: string | undefined;
388
639
  /**
@@ -403,6 +654,18 @@ export declare interface ContextMenuLinkItemState {
403
654
  highlighted: boolean;
404
655
  }
405
656
 
657
+ export declare namespace ContextMenuPopupDataAttributes {
658
+ export {
659
+ open_4 as open,
660
+ closed_4 as closed,
661
+ startingStyle_2 as startingStyle,
662
+ endingStyle_2 as endingStyle,
663
+ side_2 as side,
664
+ align_2 as align,
665
+ instant
666
+ }
667
+ }
668
+
406
669
  export declare interface ContextMenuPopupProps extends BaseUIComponentProps<'div', ContextMenuPopupState> {
407
670
  children?: React_2.ReactNode;
408
671
  /**
@@ -448,45 +711,138 @@ export declare interface ContextMenuPopupState {
448
711
  instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
449
712
  }
450
713
 
451
- export declare interface ContextMenuPortalProps extends FloatingPortal.Props<ContextMenuPortalState> {
714
+ export declare interface ContextMenuPortalProps extends BaseUIComponentProps<'div', ContextMenuPortalState> {
452
715
  /**
453
716
  * Whether to keep the portal mounted in the DOM while the popup is hidden.
454
717
  * @default false
455
718
  */
456
719
  keepMounted?: boolean | undefined;
720
+ /**
721
+ * A parent element to render the portal element into.
722
+ */
723
+ container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
457
724
  }
458
725
 
459
726
  export declare interface ContextMenuPortalState {}
460
727
 
461
- export declare interface ContextMenuPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<'div', ContextMenuPositionerState> {}
728
+ /**
729
+ * Positions the context menu popup against the pointer or a custom anchor.
730
+ * Renders a `<div>` element.
731
+ *
732
+ * Documentation: [Base UI Context Menu](https://base-ui.com/react/components/context-menu)
733
+ */
734
+ export declare const ContextMenuPositioner: React_2.ForwardRefExoticComponent<ContextMenuPositionerProps & React_2.RefAttributes<HTMLDivElement>>;
735
+
736
+ export declare namespace ContextMenuPositioner {
737
+ export type Props = ContextMenuPositionerProps;
738
+ export type State = ContextMenuPositionerState;
739
+ }
462
740
 
463
- export declare interface ContextMenuPositionerState {
741
+ export declare namespace ContextMenuPositionerCssVariables {
742
+ export {
743
+ availableWidth,
744
+ availableHeight,
745
+ anchorWidth,
746
+ anchorHeight,
747
+ transformOrigin,
748
+ positionerWidth,
749
+ positionerHeight
750
+ }
751
+ }
752
+
753
+ export declare namespace ContextMenuPositionerDataAttributes {
754
+ export {
755
+ open_3 as open,
756
+ closed_3 as closed,
757
+ anchorHidden,
758
+ side,
759
+ align
760
+ }
761
+ }
762
+
763
+ export declare interface ContextMenuPositionerProps extends Omit<MenuPositionerProps, keyof BaseUIComponentProps<'div', ContextMenuPositionerState> | 'anchor' | 'positionMethod' | 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'arrowPadding'>, BaseUIComponentProps<'div', ContextMenuPositionerState> {
464
764
  /**
465
- * Whether the menu is currently open.
765
+ * An element to position the popup against.
766
+ * By default, root context menus are positioned at the pointer, and submenus are positioned
767
+ * against their trigger.
466
768
  */
467
- open: boolean;
769
+ anchor?: MenuPositionerProps['anchor'] | undefined;
468
770
  /**
469
- * The side of the anchor the component is placed on.
771
+ * @ignore
772
+ * @deprecated This prop has no effect on Context Menu.
470
773
  */
471
- side: Side;
774
+ positionMethod?: MenuPositionerProps['positionMethod'] | undefined;
472
775
  /**
473
- * The alignment of the component relative to the anchor.
776
+ * Which side of the anchor element to align the popup against.
777
+ * May automatically change to avoid collisions.
778
+ *
779
+ * Submenus default to `'inline-end'`.
780
+ * @default 'bottom'
474
781
  */
475
- align: Align;
782
+ side?: MenuPositionerProps['side'] | undefined;
476
783
  /**
477
- * Whether the anchor element is hidden.
784
+ * Distance between the anchor and the popup in pixels.
785
+ * Also accepts a function that returns the distance to read the dimensions of the anchor
786
+ * and positioner elements, along with its side and alignment.
787
+ *
788
+ * The function takes a `data` object parameter with the following properties:
789
+ * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
790
+ * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
791
+ * - `data.side`: which side of the anchor element the positioner is aligned against.
792
+ * - `data.align`: how the positioner is aligned relative to the specified side.
793
+ *
794
+ * Defaults to `-5` for root context menus when `side` is not specified and `align` is not
795
+ * `'center'`. Otherwise, it defaults to `0`.
796
+ *
797
+ * @example
798
+ * ```jsx
799
+ * <ContextMenu.Positioner
800
+ * sideOffset={({ side, anchor }) => {
801
+ * return side === 'top' || side === 'bottom' ? anchor.height : anchor.width;
802
+ * }}
803
+ * />
804
+ * ```
478
805
  */
479
- anchorHidden: boolean;
806
+ sideOffset?: MenuPositionerProps['sideOffset'] | undefined;
480
807
  /**
481
- * Whether the component is nested.
808
+ * How to align the popup relative to the specified side.
809
+ * @default 'start'
482
810
  */
483
- nested: boolean;
811
+ align?: MenuPositionerProps['align'] | undefined;
484
812
  /**
485
- * Whether CSS transitions should be disabled.
813
+ * Additional offset along the alignment axis in pixels.
814
+ * Also accepts a function that returns the offset to read the dimensions of the anchor
815
+ * and positioner elements, along with its side and alignment.
816
+ *
817
+ * The function takes a `data` object parameter with the following properties:
818
+ * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
819
+ * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
820
+ * - `data.side`: which side of the anchor element the positioner is aligned against.
821
+ * - `data.align`: how the positioner is aligned relative to the specified side.
822
+ *
823
+ * Defaults to `2` for root context menus when `side` is not specified and `align` is not
824
+ * `'center'`. Otherwise, it defaults to `0`.
825
+ *
826
+ * @example
827
+ * ```jsx
828
+ * <ContextMenu.Positioner
829
+ * alignOffset={({ side, anchor }) => {
830
+ * return side === 'top' || side === 'bottom' ? anchor.width : anchor.height;
831
+ * }}
832
+ * />
833
+ * ```
486
834
  */
487
- instant: string | undefined;
835
+ alignOffset?: MenuPositionerProps['alignOffset'] | undefined;
836
+ /**
837
+ * Minimum distance to maintain between the arrow and the edges of the popup.
838
+ *
839
+ * Root context menus always use `0`. Submenus default to `5`.
840
+ */
841
+ arrowPadding?: MenuPositionerProps['arrowPadding'] | undefined;
488
842
  }
489
843
 
844
+ export declare interface ContextMenuPositionerState extends MenuPositionerState {}
845
+
490
846
  export declare interface ContextMenuRadioGroupProps extends BaseUIComponentProps<'div', ContextMenuRadioGroupState> {
491
847
  /**
492
848
  * The content of the component.
@@ -523,6 +879,25 @@ export declare interface ContextMenuRadioGroupState {
523
879
  disabled: boolean;
524
880
  }
525
881
 
882
+ export declare namespace ContextMenuRadioItemDataAttributes {
883
+ export {
884
+ checked_3 as checked,
885
+ unchecked_3 as unchecked,
886
+ disabled_5 as disabled,
887
+ highlighted_4 as highlighted
888
+ }
889
+ }
890
+
891
+ export declare namespace ContextMenuRadioItemIndicatorDataAttributes {
892
+ export {
893
+ checked_4 as checked,
894
+ unchecked_4 as unchecked,
895
+ disabled_6 as disabled,
896
+ startingStyle_4 as startingStyle,
897
+ endingStyle_4 as endingStyle
898
+ }
899
+ }
900
+
526
901
  export declare interface ContextMenuRadioItemIndicatorProps extends BaseUIComponentProps<'span', ContextMenuRadioItemIndicatorState> {
527
902
  /**
528
903
  * Whether to keep the HTML element in the DOM when the radio item is inactive.
@@ -566,7 +941,8 @@ export declare interface ContextMenuRadioItemProps extends NonNativeButtonProps,
566
941
  */
567
942
  disabled?: boolean | undefined;
568
943
  /**
569
- * Overrides the text label to use when the item is matched during keyboard text navigation.
944
+ * Overrides the text used for keyboard text navigation and filtering.
945
+ * Falls back to the rendered text when not provided.
570
946
  */
571
947
  label?: string | undefined;
572
948
  /**
@@ -601,7 +977,7 @@ export declare interface ContextMenuRadioItemState {
601
977
  *
602
978
  * Documentation: [Base UI Context Menu](https://base-ui.com/react/components/context-menu)
603
979
  */
604
- export declare function ContextMenuRoot(props: ContextMenuRoot.Props): JSX_2.Element;
980
+ export declare function ContextMenuRoot(props: ContextMenuRoot.Props): React_2.JSX.Element;
605
981
 
606
982
  export declare namespace ContextMenuRoot {
607
983
  export type State = ContextMenuRootState;
@@ -638,16 +1014,28 @@ declare interface ContextMenuRootContext {
638
1014
 
639
1015
  declare const ContextMenuRootContext: React_2.Context<ContextMenuRootContext | undefined>;
640
1016
 
641
- export declare interface ContextMenuRootProps extends Omit<Menu.Root.Props, 'modal' | 'openOnHover' | 'delay' | 'closeDelay' | 'onOpenChange'> {
1017
+ export declare interface ContextMenuRootProps extends Omit<Menu.Root.Props, 'handle' | 'triggerId' | 'defaultTriggerId' | 'modal' | 'openOnHover' | 'delay' | 'closeDelay' | 'closeParentOnEsc' | 'onOpenChange' | 'children'> {
642
1018
  /**
643
1019
  * Event handler called when the menu is opened or closed.
644
1020
  */
645
1021
  onOpenChange?: ((open: boolean, eventDetails: ContextMenuRoot.ChangeEventDetails) => void) | undefined;
1022
+ /**
1023
+ * @ignore
1024
+ * @deprecated This prop has no effect on Context Menu.
1025
+ */
1026
+ closeParentOnEsc?: Menu.Root.Props['closeParentOnEsc'] | undefined;
1027
+ children?: React_2.ReactNode | undefined;
646
1028
  }
647
1029
 
648
1030
  export declare interface ContextMenuRootState {}
649
1031
 
650
- export declare interface ContextMenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'openOnHover' | 'onOpenChange'> {
1032
+ export declare namespace ContextMenuSeparatorDataAttributes {
1033
+ export {
1034
+ orientation_2 as orientation
1035
+ }
1036
+ }
1037
+
1038
+ export declare interface ContextMenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'openOnHover' | 'onOpenChange' | 'handle' | 'triggerId' | 'defaultTriggerId' | 'children'> {
651
1039
  /**
652
1040
  * Event handler called when the menu is opened or closed.
653
1041
  */
@@ -658,14 +1046,27 @@ export declare interface ContextMenuSubmenuRootProps extends Omit<MenuRoot.Props
658
1046
  * @default false
659
1047
  */
660
1048
  closeParentOnEsc?: boolean | undefined;
1049
+ /**
1050
+ * The content of the submenu.
1051
+ */
1052
+ children?: React_2.ReactNode;
661
1053
  }
662
1054
 
663
1055
  export declare interface ContextMenuSubmenuRootState {}
664
1056
 
1057
+ export declare namespace ContextMenuSubmenuTriggerDataAttributes {
1058
+ export {
1059
+ popupOpen_2 as popupOpen,
1060
+ highlighted_5 as highlighted,
1061
+ disabled_7 as disabled
1062
+ }
1063
+ }
1064
+
665
1065
  export declare interface ContextMenuSubmenuTriggerProps extends NonNativeButtonProps, BaseUIComponentProps<'div', ContextMenuSubmenuTriggerState> {
666
1066
  onClick?: BaseUIComponentProps<'div', ContextMenuSubmenuTriggerState>['onClick'] | undefined;
667
1067
  /**
668
- * Overrides the text label to use when the item is matched during keyboard text navigation.
1068
+ * Overrides the text used for keyboard text navigation and filtering.
1069
+ * Falls back to the rendered text when not provided.
669
1070
  */
670
1071
  label?: string | undefined;
671
1072
  /**
@@ -694,6 +1095,7 @@ export declare interface ContextMenuSubmenuTriggerProps extends NonNativeButtonP
694
1095
  closeDelay?: number | undefined;
695
1096
  /**
696
1097
  * Whether the menu should also open when the trigger is hovered.
1098
+ * @default true
697
1099
  */
698
1100
  openOnHover?: boolean | undefined;
699
1101
  }
@@ -726,6 +1128,13 @@ export declare namespace ContextMenuTrigger {
726
1128
  export type Props = ContextMenuTriggerProps;
727
1129
  }
728
1130
 
1131
+ export declare namespace ContextMenuTriggerDataAttributes {
1132
+ export {
1133
+ popupOpen,
1134
+ pressed
1135
+ }
1136
+ }
1137
+
729
1138
  export declare interface ContextMenuTriggerProps extends BaseUIComponentProps<'div', ContextMenuTriggerState> {}
730
1139
 
731
1140
  export declare interface ContextMenuTriggerState {
@@ -740,13 +1149,63 @@ export declare interface ContextMenuTriggerState {
740
1149
  */
741
1150
  declare function createMenuHandle<Payload>(): MenuHandle<Payload>;
742
1151
 
743
- declare const decrementPress: "decrement-press";
1152
+ declare const decrementPress: 'decrement-press';
744
1153
 
745
- declare const disabled: "disabled";
1154
+ declare const disabled: 'disabled';
746
1155
 
747
- declare const drag: "drag";
1156
+ /**
1157
+ * Present when the menu item is disabled.
1158
+ */
1159
+ declare const disabled_2 = "data-disabled";
748
1160
 
749
- declare const escapeKey: "escape-key";
1161
+ /**
1162
+ * Present when the menu checkbox item is disabled.
1163
+ */
1164
+ declare const disabled_3 = "data-disabled";
1165
+
1166
+ /**
1167
+ * Present when the menu checkbox item is disabled.
1168
+ */
1169
+ declare const disabled_4 = "data-disabled";
1170
+
1171
+ /**
1172
+ * Present when the menu radio item is disabled.
1173
+ */
1174
+ declare const disabled_5 = "data-disabled";
1175
+
1176
+ /**
1177
+ * Present when the menu radio item is disabled.
1178
+ */
1179
+ declare const disabled_6 = "data-disabled";
1180
+
1181
+ /**
1182
+ * Present when the submenu trigger is disabled.
1183
+ */
1184
+ declare const disabled_7 = "data-disabled";
1185
+
1186
+ declare const drag: 'drag';
1187
+
1188
+ /**
1189
+ * Present when the menu is animating out.
1190
+ */
1191
+ declare const endingStyle = "data-ending-style";
1192
+
1193
+ /**
1194
+ * Present when the menu is animating out.
1195
+ */
1196
+ declare const endingStyle_2 = "data-ending-style";
1197
+
1198
+ /**
1199
+ * Present when the indicator is animating out.
1200
+ */
1201
+ declare const endingStyle_3 = "data-ending-style";
1202
+
1203
+ /**
1204
+ * Present when the radio indicator is animating out.
1205
+ */
1206
+ declare const endingStyle_4 = "data-ending-style";
1207
+
1208
+ declare const escapeKey: 'escape-key';
750
1209
 
751
1210
  declare interface ExtendedElements {
752
1211
  reference: ReferenceType | null;
@@ -763,6 +1222,53 @@ declare interface ExtendedRefs {
763
1222
  setPositionReference(node: ReferenceType | null): void;
764
1223
  }
765
1224
 
1225
+ declare interface Filter {
1226
+ /** Returns whether the item matches the query anywhere. */
1227
+ contains: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
1228
+ /** Returns whether the item starts with the query. */
1229
+ startsWith: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
1230
+ /** Returns whether the item ends with the query. */
1231
+ endsWith: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
1232
+ }
1233
+
1234
+ declare interface FilterDropdownClearProps extends NativeButtonProps, BaseUIComponentProps<'button', FilterDropdownClearState> {
1235
+ /**
1236
+ * Whether the component should ignore user interaction.
1237
+ * @default false
1238
+ */
1239
+ disabled?: boolean | undefined;
1240
+ }
1241
+
1242
+ declare interface FilterDropdownClearState {
1243
+ /**
1244
+ * Whether the component should ignore user interaction.
1245
+ */
1246
+ disabled: boolean;
1247
+ }
1248
+
1249
+ declare interface FilterDropdownEmptyProps extends BaseUIComponentProps<'div', FilterDropdownEmptyState> {}
1250
+
1251
+ declare interface FilterDropdownEmptyState {}
1252
+
1253
+ declare interface FilterDropdownInputProps extends BaseUIComponentProps<'input', FilterDropdownInputState> {}
1254
+
1255
+ declare interface FilterDropdownInputState {
1256
+ /**
1257
+ * Whether the input shows its focus ring.
1258
+ * Cleared when keyboard navigation highlights an item.
1259
+ */
1260
+ highlighted: boolean;
1261
+ }
1262
+
1263
+ declare namespace FilterDropdownRoot {
1264
+ type ChangeEventReason = FilterDropdownRootChangeEventReason;
1265
+ type ChangeEventDetails = FilterDropdownRootChangeEventDetails;
1266
+ }
1267
+
1268
+ declare type FilterDropdownRootChangeEventDetails = BaseUIChangeEventDetails<FilterDropdownRootChangeEventReason>;
1269
+
1270
+ declare type FilterDropdownRootChangeEventReason = typeof REASONS.inputChange | typeof REASONS.inputClear | typeof REASONS.clearPress | typeof REASONS.popupClose;
1271
+
766
1272
  declare type FloatingContext = Omit<UseFloatingReturn<ReferenceType>, 'refs' | 'elements'> & {
767
1273
  open: boolean;
768
1274
  onOpenChange(open: boolean, eventDetails: BaseUIChangeEventDetails<string>): void;
@@ -787,31 +1293,6 @@ declare interface FloatingNodeType {
787
1293
  context?: FloatingContext | undefined;
788
1294
  }
789
1295
 
790
- /**
791
- * Portals the floating element into a given container element — by default,
792
- * outside of the app root and into the body.
793
- * This is necessary to ensure the floating element can appear outside any
794
- * potential parent containers that cause clipping (such as `overflow: hidden`),
795
- * while retaining its location in the React tree.
796
- * @see https://floating-ui.com/docs/FloatingPortal
797
- * @internal
798
- */
799
- declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
800
- renderGuards?: boolean | undefined;
801
- }, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
802
-
803
- declare namespace FloatingPortal {
804
- type State = FloatingPortalState;
805
- interface Props<TState> extends BaseUIComponentProps<'div', TState> {
806
- /**
807
- * A parent element to render the portal element into.
808
- */
809
- container?: UseFloatingPortalNodeProps['container'] | undefined;
810
- }
811
- }
812
-
813
- declare interface FloatingPortalState {}
814
-
815
1296
  declare type FloatingRootContext = FloatingRootStore;
816
1297
 
817
1298
  declare interface FloatingRootState {
@@ -882,35 +1363,76 @@ declare class FloatingTreeStore {
882
1363
  removeNode(node: FloatingNodeType): void;
883
1364
  }
884
1365
 
885
- declare const focusOut: "focus-out";
1366
+ declare const focusOut: 'focus-out';
1367
+
1368
+ declare function getFilter(options?: GetFilterParameters): Filter;
1369
+
1370
+ declare interface GetFilterParameters extends Intl.CollatorOptions {
1371
+ /**
1372
+ * The locale to use for string comparison.
1373
+ * Defaults to the user's runtime locale.
1374
+ */
1375
+ locale?: Intl.LocalesArgument | undefined;
1376
+ }
1377
+
1378
+ /**
1379
+ * Present when the menu item is highlighted.
1380
+ */
1381
+ declare const highlighted = "data-highlighted";
1382
+
1383
+ /**
1384
+ * Present when the menu checkbox item is highlighted.
1385
+ */
1386
+ declare const highlighted_2 = "data-highlighted";
1387
+
1388
+ /**
1389
+ * Present when the link is highlighted.
1390
+ */
1391
+ declare const highlighted_3 = "data-highlighted";
1392
+
1393
+ /**
1394
+ * Present when the menu radio item is highlighted.
1395
+ */
1396
+ declare const highlighted_4 = "data-highlighted";
1397
+
1398
+ /**
1399
+ * Present when the submenu trigger is highlighted.
1400
+ */
1401
+ declare const highlighted_5 = "data-highlighted";
886
1402
 
887
1403
  declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
888
1404
  ref?: React_2.Ref<T> | undefined;
889
1405
  };
890
1406
 
891
- declare const imperativeAction: "imperative-action";
1407
+ declare const imperativeAction: 'imperative-action';
892
1408
 
893
- declare const incrementPress: "increment-press";
1409
+ declare const incrementPress: 'increment-press';
894
1410
 
895
- declare const initial: "initial";
1411
+ declare const initial: 'initial';
896
1412
 
897
- declare const inputBlur: "input-blur";
1413
+ declare const inputBlur: 'input-blur';
898
1414
 
899
- declare const inputChange: "input-change";
1415
+ declare const inputChange: 'input-change';
900
1416
 
901
- declare const inputClear: "input-clear";
1417
+ declare const inputClear: 'input-clear';
902
1418
 
903
- declare const inputPaste: "input-paste";
1419
+ declare const inputPaste: 'input-paste';
904
1420
 
905
- declare const inputPress: "input-press";
1421
+ declare const inputPress: 'input-press';
906
1422
 
907
- declare const itemPress: "item-press";
1423
+ /**
1424
+ * Present if animations should be instant.
1425
+ * @type {'click' | 'dismiss' | 'group' | 'trigger-change'}
1426
+ */
1427
+ declare const instant = "data-instant";
908
1428
 
909
- declare const keyboard: "keyboard";
1429
+ declare const itemPress: 'item-press';
910
1430
 
911
- declare const linkPress: "link-press";
1431
+ declare const keyboard: 'keyboard';
912
1432
 
913
- declare const listNavigation: "list-navigation";
1433
+ declare const linkPress: 'link-press';
1434
+
1435
+ declare const listNavigation: 'list-navigation';
914
1436
 
915
1437
  export declare namespace Menu {
916
1438
  export {
@@ -935,7 +1457,13 @@ export declare namespace Menu {
935
1457
  Separator,
936
1458
  MenuSubmenuTrigger as SubmenuTrigger,
937
1459
  MenuHandle as Handle,
938
- createMenuHandle as createHandle
1460
+ createMenuHandle as createHandle,
1461
+ MenuFilterProvider as FilterProvider,
1462
+ MenuInput as Input,
1463
+ MenuList as List,
1464
+ MenuClear as Clear,
1465
+ MenuEmpty as Empty,
1466
+ getFilter as useFilter
939
1467
  }
940
1468
  }
941
1469
 
@@ -1004,13 +1532,122 @@ declare type MenuCheckboxItemChangeEventReason = MenuRoot.ChangeEventReason;
1004
1532
  *
1005
1533
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1006
1534
  */
1007
- declare const MenuCheckboxItemIndicator: React_2.ForwardRefExoticComponent<Omit<ContextMenuCheckboxItemIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
1535
+ declare const MenuCheckboxItemIndicator: React_2.ForwardRefExoticComponent<Omit<ContextMenuCheckboxItemIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
1536
+
1537
+ declare namespace MenuCheckboxItemIndicator {
1538
+ type Props = ContextMenuCheckboxItemIndicatorProps;
1539
+ type State = ContextMenuCheckboxItemIndicatorState;
1540
+ }
1541
+
1542
+ /**
1543
+ * A button that clears the input text.
1544
+ * Requires the menu to be wrapped in `Menu.FilterProvider`.
1545
+ * Renders a `<button>` element when the input has text.
1546
+ *
1547
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1548
+ */
1549
+ declare const MenuClear: React_2.ForwardRefExoticComponent<Omit<MenuClearProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
1550
+
1551
+ declare namespace MenuClear {
1552
+ type State = MenuClearState;
1553
+ type Props = MenuClearProps;
1554
+ }
1555
+
1556
+ declare interface MenuClearProps extends FilterDropdownClearProps {}
1557
+
1558
+ declare interface MenuClearState extends FilterDropdownClearState {}
1559
+
1560
+ /**
1561
+ * A message shown when the menu has no matching items.
1562
+ * Requires the menu to be wrapped in `Menu.FilterProvider`.
1563
+ * Renders a `<div>` element.
1564
+ *
1565
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1566
+ */
1567
+ declare const MenuEmpty: React_2.ForwardRefExoticComponent<Omit<MenuEmptyProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1568
+
1569
+ declare namespace MenuEmpty {
1570
+ type State = MenuEmptyState;
1571
+ type Props = MenuEmptyProps;
1572
+ }
1573
+
1574
+ declare interface MenuEmptyProps extends FilterDropdownEmptyProps {}
1575
+
1576
+ declare interface MenuEmptyState extends FilterDropdownEmptyState {}
1577
+
1578
+ /**
1579
+ * Enables filtering for the menu or submenu it wraps. Add `Menu.Input` to the popup and place
1580
+ * its items in `Menu.List`.
1581
+ * Wrap each searchable submenu in its own provider.
1582
+ * Doesn't render its own HTML element.
1583
+ *
1584
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1585
+ */
1586
+ declare function MenuFilterProvider(props: MenuFilterProvider.Props): React_2.JSX.Element;
1008
1587
 
1009
- declare namespace MenuCheckboxItemIndicator {
1010
- type Props = ContextMenuCheckboxItemIndicatorProps;
1011
- type State = ContextMenuCheckboxItemIndicatorState;
1588
+ declare namespace MenuFilterProvider {
1589
+ type State = MenuFilterProviderState;
1590
+ type Props = MenuFilterProviderProps;
1591
+ type ChangeEventReason = MenuFilterProviderChangeEventReason;
1592
+ type ChangeEventDetails = MenuFilterProviderChangeEventDetails;
1593
+ }
1594
+
1595
+ declare type MenuFilterProviderChangeEventDetails = FilterDropdownRoot.ChangeEventDetails;
1596
+
1597
+ declare type MenuFilterProviderChangeEventReason = FilterDropdownRoot.ChangeEventReason;
1598
+
1599
+ /** The filtering props of `Menu.FilterProvider`, applied to the root directly inside it. */
1600
+ declare interface MenuFilterProviderOptions {
1601
+ /**
1602
+ * Filter function used to match items against the query. Receives each item's `label` (or its
1603
+ * rendered text) and the trimmed query, and keeps the item when it returns `true`.
1604
+ * By default, items match when they contain the query, ignoring case, accents, and punctuation.
1605
+ * Pass `null` when rendering filtered items yourself.
1606
+ */
1607
+ filter?: ((text: string, query: string) => boolean) | null | undefined;
1608
+ /**
1609
+ * Whether filtering highlights the first matching item automatically.
1610
+ * - `true`: highlight it while the query is not empty.
1611
+ * - `'always'`: highlight it even when the query is empty.
1612
+ *
1613
+ * Opening the menu from the keyboard highlights the first item either way, and the arrow keys
1614
+ * can move the highlight to another item. With either value, the arrow keys wrap within the
1615
+ * list rather than returning to the input, and with `'always'` a pointer highlight stays when
1616
+ * the pointer leaves.
1617
+ * @default false
1618
+ */
1619
+ autoHighlight?: boolean | 'always' | undefined;
1620
+ /**
1621
+ * The locale the default `filter` uses for string comparison.
1622
+ * Defaults to the user's runtime locale.
1623
+ */
1624
+ locale?: Intl.LocalesArgument | undefined;
1625
+ /**
1626
+ * The uncontrolled filter query when the menu is initially rendered.
1627
+ * To render a controlled query, use the `value` prop instead.
1628
+ */
1629
+ defaultValue?: string | undefined;
1630
+ /**
1631
+ * The filter query. Use when controlled.
1632
+ * When the popup closes, `onValueChange` is called with an empty query. The controlled
1633
+ * value changes only when the consumer updates this prop.
1634
+ */
1635
+ value?: string | undefined;
1636
+ /**
1637
+ * Event handler called when the filter query changes.
1638
+ */
1639
+ onValueChange?: ((value: string, eventDetails: MenuFilterProvider.ChangeEventDetails) => void) | undefined;
1640
+ }
1641
+
1642
+ declare interface MenuFilterProviderProps extends MenuFilterProviderOptions {
1643
+ /**
1644
+ * The `<Menu.Root>` or `<Menu.SubmenuRoot>` to make filterable.
1645
+ */
1646
+ children?: React_2.ReactNode;
1012
1647
  }
1013
1648
 
1649
+ declare interface MenuFilterProviderState {}
1650
+
1014
1651
  /**
1015
1652
  * Groups related menu items with the corresponding label.
1016
1653
  * Renders a `<div>` element.
@@ -1037,30 +1674,64 @@ declare namespace MenuGroupLabel {
1037
1674
  type State = ContextMenuGroupLabelState;
1038
1675
  }
1039
1676
 
1040
- declare class MenuHandle<Payload> {
1041
- /**
1042
- * Internal store holding the menu's state.
1043
- * @internal
1044
- */
1045
- readonly store: MenuStore<Payload>;
1677
+ /**
1678
+ * Controls a Menu imperatively and associates detached `Menu.Trigger` components with a `Menu.Root`.
1679
+ * Create one with `Menu.createHandle()` and pass it to the `handle` prop of the root and of any
1680
+ * triggers rendered outside of it.
1681
+ *
1682
+ * The imperative methods take effect only while a root using this handle is mounted; calls made
1683
+ * before a root attaches (or after it unmounts) are ignored.
1684
+ */
1685
+ declare class MenuHandle<Payload> extends BasePopupHandle<MenuHandleStore<Payload>, MenuStore<Payload>> {
1046
1686
  constructor();
1047
1687
  /**
1048
1688
  * Opens the menu and associates it with the trigger with the given id.
1049
- * The trigger must be a Menu.Trigger component with this handle passed as a prop.
1050
1689
  *
1051
- * @param triggerId ID of the trigger to associate with the menu.
1690
+ * This method should only be called in an event handler or an effect (not during rendering).
1691
+ *
1692
+ * @param triggerId ID of the trigger to associate with the menu. The trigger must be a matching
1693
+ * `Menu.Trigger` with this handle passed as a prop.
1052
1694
  */
1053
1695
  open(triggerId: string): void;
1054
1696
  /**
1055
1697
  * Closes the menu.
1698
+ *
1699
+ * This method should only be called in an event handler or an effect (not during rendering).
1056
1700
  */
1057
1701
  close(): void;
1058
1702
  /**
1059
- * Indicates whether the menu is currently open.
1703
+ * Whether the menu is currently open. Returns `false` while no root is attached to the handle.
1060
1704
  */
1061
1705
  get isOpen(): boolean;
1062
1706
  }
1063
1707
 
1708
+ /**
1709
+ * The store view that detached handle-backed triggers read from. Both the real `MenuStore` and the
1710
+ * inert fallback store satisfy it, so a trigger can read from whichever store the handle currently
1711
+ * exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus `setOpen`
1712
+ * (called by the focus guards) — so the exposed surface can't bypass the open-change pipeline; on
1713
+ * the detached fallback store every one of these mutations is a no-op.
1714
+ */
1715
+ declare type MenuHandleStore<Payload> = Pick<MenuStore<Payload>, PopupTriggerStoreKeys | 'setOpen'>;
1716
+
1717
+ /**
1718
+ * A search field that filters the menu items.
1719
+ * Requires the menu to be wrapped in `Menu.FilterProvider`.
1720
+ * Renders an `<input>` element.
1721
+ *
1722
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1723
+ */
1724
+ declare const MenuInput: React_2.ForwardRefExoticComponent<Omit<MenuInputProps, "ref"> & React_2.RefAttributes<HTMLInputElement>>;
1725
+
1726
+ declare namespace MenuInput {
1727
+ type State = MenuInputState;
1728
+ type Props = MenuInputProps;
1729
+ }
1730
+
1731
+ declare interface MenuInputProps extends FilterDropdownInputProps {}
1732
+
1733
+ declare interface MenuInputState extends FilterDropdownInputState {}
1734
+
1064
1735
  /**
1065
1736
  * An individual interactive item in the menu.
1066
1737
  * Renders a `<div>` element.
@@ -1087,6 +1758,23 @@ declare namespace MenuLinkItem {
1087
1758
  type Props = ContextMenuLinkItemProps;
1088
1759
  }
1089
1760
 
1761
+ /**
1762
+ * Groups menu items so other content, such as a filter input, can share the popup.
1763
+ * Renders a `<div>` element.
1764
+ *
1765
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1766
+ */
1767
+ declare const MenuList: React_2.ForwardRefExoticComponent<Omit<MenuListProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1768
+
1769
+ declare namespace MenuList {
1770
+ type Props = MenuListProps;
1771
+ type State = MenuListState;
1772
+ }
1773
+
1774
+ declare interface MenuListProps extends BaseUIComponentProps<'div', MenuListState> {}
1775
+
1776
+ declare interface MenuListState {}
1777
+
1090
1778
  declare type MenuParent = {
1091
1779
  type: 'menu';
1092
1780
  store: MenuStore<unknown>;
@@ -1137,11 +1825,56 @@ declare namespace MenuPortal {
1137
1825
  *
1138
1826
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1139
1827
  */
1140
- declare const MenuPositioner: React_2.ForwardRefExoticComponent<Omit<ContextMenuPositionerProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1828
+ declare const MenuPositioner: React_2.ForwardRefExoticComponent<Omit<MenuPositionerProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1141
1829
 
1142
1830
  declare namespace MenuPositioner {
1143
- type State = ContextMenuPositionerState;
1144
- type Props = ContextMenuPositionerProps;
1831
+ type State = MenuPositionerState;
1832
+ type Props = MenuPositionerProps;
1833
+ }
1834
+
1835
+ declare interface MenuPositionerProps extends Omit<UseAnchorPositioningSharedParameters, 'side' | 'align'>, BaseUIComponentProps<'div', MenuPositionerState> {
1836
+ /**
1837
+ * How to align the popup relative to the specified side.
1838
+ *
1839
+ * Submenus and menubars default to `'start'`.
1840
+ * @default 'center'
1841
+ */
1842
+ align?: UseAnchorPositioningSharedParameters['align'] | undefined;
1843
+ /**
1844
+ * Which side of the anchor element to align the popup against.
1845
+ * May automatically change to avoid collisions.
1846
+ *
1847
+ * Submenus and vertical menubars default to `'inline-end'`.
1848
+ * @default 'bottom'
1849
+ */
1850
+ side?: UseAnchorPositioningSharedParameters['side'] | undefined;
1851
+ }
1852
+
1853
+ declare interface MenuPositionerState {
1854
+ /**
1855
+ * Whether the menu is currently open.
1856
+ */
1857
+ open: boolean;
1858
+ /**
1859
+ * The side of the anchor the component is placed on.
1860
+ */
1861
+ side: Side;
1862
+ /**
1863
+ * The alignment of the component relative to the anchor.
1864
+ */
1865
+ align: Align;
1866
+ /**
1867
+ * Whether the anchor element is hidden.
1868
+ */
1869
+ anchorHidden: boolean;
1870
+ /**
1871
+ * Whether the component is nested.
1872
+ */
1873
+ nested: boolean;
1874
+ /**
1875
+ * Whether CSS transitions should be disabled.
1876
+ */
1877
+ instant: string | undefined;
1145
1878
  }
1146
1879
 
1147
1880
  /**
@@ -1195,7 +1928,7 @@ declare namespace MenuRadioItemIndicator {
1195
1928
  *
1196
1929
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1197
1930
  */
1198
- declare const MenuRoot: <Payload>(props: MenuRoot.Props<Payload>) => JSX_2.Element;
1931
+ declare function MenuRoot<Payload>(props: MenuRoot.Props<Payload>): React_2.JSX.Element;
1199
1932
 
1200
1933
  declare namespace MenuRoot {
1201
1934
  type State = MenuRootState;
@@ -1203,6 +1936,8 @@ declare namespace MenuRoot {
1203
1936
  type Actions = MenuRootActions;
1204
1937
  type ChangeEventReason = MenuRootChangeEventReason_2;
1205
1938
  type ChangeEventDetails = MenuRootChangeEventDetails;
1939
+ type HighlightEventReason = MenuRootHighlightEventReason;
1940
+ type HighlightEventDetails = MenuRootHighlightEventDetails;
1206
1941
  type Orientation = MenuRootOrientation;
1207
1942
  }
1208
1943
 
@@ -1212,7 +1947,8 @@ declare interface MenuRootActions {
1212
1947
  }
1213
1948
 
1214
1949
  declare type MenuRootChangeEventDetails = BaseUIChangeEventDetails<MenuRoot.ChangeEventReason> & {
1215
- preventUnmountOnClose(): void;
1950
+ /** Prevents the popup from unmounting until the `unmount` action is called. */
1951
+ preventUnmountOnClose: () => void;
1216
1952
  };
1217
1953
 
1218
1954
  declare type MenuRootChangeEventReason_2 = typeof REASONS.triggerHover | typeof REASONS.triggerFocus | typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.focusOut | typeof REASONS.listNavigation | typeof REASONS.escapeKey | typeof REASONS.itemPress | typeof REASONS.closePress | typeof REASONS.siblingOpen | typeof REASONS.cancelOpen | typeof REASONS.imperativeAction | typeof REASONS.none;
@@ -1220,10 +1956,30 @@ declare type MenuRootChangeEventReason_2 = typeof REASONS.triggerHover | typeof
1220
1956
  declare interface MenuRootContext<Payload = unknown> {
1221
1957
  store: MenuStore<Payload>;
1222
1958
  parent: MenuParent;
1959
+ orientation: MenuRoot.Orientation;
1960
+ loopFocus: boolean;
1961
+ /** Whether arrow keys can step from either end of the list back to a virtual focus owner. */
1962
+ allowEscape: boolean;
1963
+ defaultFloatingId: string | undefined;
1964
+ /** Records the id the popup rendered with, when it differs from `defaultFloatingId`. */
1965
+ setRenderedFloatingId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
1966
+ virtualFocus: boolean;
1967
+ parentVirtualFocus: boolean;
1968
+ /** Re-emits `onItemHighlighted` after the item registry settles. */
1969
+ syncHighlightedItem: () => void;
1223
1970
  }
1224
1971
 
1225
1972
  declare const MenuRootContext: React_2.Context<MenuRootContext<unknown> | undefined>;
1226
1973
 
1974
+ declare type MenuRootHighlightEventDetails = BaseUIHighlightEventDetails<MenuRoot.HighlightEventReason, {
1975
+ /**
1976
+ * The highlighted item's `label` prop, or its text content when the prop is not set.
1977
+ */
1978
+ label: string | undefined;
1979
+ }>;
1980
+
1981
+ declare type MenuRootHighlightEventReason = typeof REASONS.keyboard | typeof REASONS.pointer | typeof REASONS.none;
1982
+
1227
1983
  declare type MenuRootOrientation = 'horizontal' | 'vertical';
1228
1984
 
1229
1985
  declare interface MenuRootProps<Payload = unknown> {
@@ -1250,6 +2006,10 @@ declare interface MenuRootProps<Payload = unknown> {
1250
2006
  * Determines if the menu enters a modal state when open.
1251
2007
  * - `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.
1252
2008
  * - `false`: user interaction with the rest of the document is allowed.
2009
+ *
2010
+ * On touch devices, a `true` modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.
2011
+ *
2012
+ * Nested menus ignore this prop, and menus opened by hover are never modal.
1253
2013
  * @default true
1254
2014
  */
1255
2015
  modal?: boolean | undefined;
@@ -1258,9 +2018,21 @@ declare interface MenuRootProps<Payload = unknown> {
1258
2018
  */
1259
2019
  onOpenChange?: ((open: boolean, eventDetails: MenuRoot.ChangeEventDetails) => void) | undefined;
1260
2020
  /**
1261
- * Event handler called after any animations complete when the menu is closed.
2021
+ * Event handler called after any animations complete when the menu is opened or closed.
1262
2022
  */
1263
2023
  onOpenChangeComplete?: ((open: boolean) => void) | undefined;
2024
+ /**
2025
+ * Callback fired when an item is highlighted or unhighlighted.
2026
+ * Receives the highlighted item element (or `undefined` if no item is highlighted) and details
2027
+ * containing the reason for the change, the event, and the item's text label.
2028
+ * The `reason` can be:
2029
+ * - `'keyboard'`: the highlight changed due to keyboard navigation.
2030
+ * - `'pointer'`: the highlight changed due to pointer hovering. The event may be a `MouseEvent`
2031
+ * rather than a `PointerEvent`.
2032
+ * - `'none'`: the highlight changed for another reason, such as automatic highlighting while
2033
+ * filtering, the item list changing, or the popup opening or closing.
2034
+ */
2035
+ onItemHighlighted?: ((highlightedItem: HTMLElement | undefined, eventDetails: MenuRoot.HighlightEventDetails) => void) | undefined;
1264
2036
  /**
1265
2037
  * Whether the menu is currently open.
1266
2038
  */
@@ -1284,21 +2056,21 @@ declare interface MenuRootProps<Payload = unknown> {
1284
2056
  closeParentOnEsc?: boolean | undefined;
1285
2057
  /**
1286
2058
  * A ref to imperative actions.
1287
- * - `unmount`: When specified, the menu will not be unmounted when closed.
1288
- * Instead, the `unmount` function must be called to unmount the menu manually.
1289
- * Useful when the menu's animation is controlled by an external library.
1290
- * - `close`: When specified, the menu can be closed imperatively.
2059
+ * - `unmount`: Ends the closing phase of the menu after an externally controlled closing animation finishes.
2060
+ * Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the menu completes closing on its own.
2061
+ * Whether it leaves the DOM is decided by `keepMounted` on the portal.
2062
+ * - `close`: Closes the menu imperatively when called.
1291
2063
  */
1292
2064
  actionsRef?: React_2.RefObject<MenuRoot.Actions | null> | undefined;
1293
2065
  /**
1294
- * ID of the trigger that the popover is associated with.
1295
- * This is useful in conjunction with the `open` prop to create a controlled popover.
1296
- * There's no need to specify this prop when the popover is uncontrolled (that is, when the `open` prop is not set).
2066
+ * ID of the trigger that the menu is associated with.
2067
+ * This is useful in conjunction with the `open` prop to create a controlled menu.
2068
+ * There's no need to specify this prop when the menu is uncontrolled (that is, when the `open` prop is not set).
1297
2069
  */
1298
2070
  triggerId?: string | null | undefined;
1299
2071
  /**
1300
- * ID of the trigger that the popover is associated with.
1301
- * This is useful in conjunction with the `defaultOpen` prop to create an initially open popover.
2072
+ * ID of the trigger that the menu is associated with.
2073
+ * This is useful in conjunction with the `defaultOpen` prop to create an initially open menu.
1302
2074
  */
1303
2075
  defaultTriggerId?: string | null | undefined;
1304
2076
  /**
@@ -1307,7 +2079,7 @@ declare interface MenuRootProps<Payload = unknown> {
1307
2079
  */
1308
2080
  handle?: MenuHandle<Payload> | undefined;
1309
2081
  /**
1310
- * The content of the popover.
2082
+ * The content of the menu.
1311
2083
  * This can be a regular React node or a render function that receives the `payload` of the active trigger.
1312
2084
  */
1313
2085
  children?: React_2.ReactNode | PayloadChildRenderFunction<Payload>;
@@ -1315,11 +2087,18 @@ declare interface MenuRootProps<Payload = unknown> {
1315
2087
 
1316
2088
  declare interface MenuRootState {}
1317
2089
 
1318
- declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, typeof selectors_2> {
1319
- constructor(initialState?: Partial<State<Payload>>);
2090
+ declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, Selectors> {
2091
+ constructor(initialState?: Partial<State<Payload>>, floatingId?: string | undefined, nested?: boolean);
2092
+ /**
2093
+ * Propagates changes of the parent menu's shared tree state to this store's subscribers.
2094
+ * The owning `Menu.Root` calls it from an effect so the parent store subscription is released
2095
+ * when the submenu unmounts.
2096
+ * @returns A function that removes the parent store subscription.
2097
+ */
2098
+ subscribeToParentMenu(): (() => void) | undefined;
1320
2099
  setOpen(open: boolean, eventDetails: Omit<MenuRoot.ChangeEventDetails, 'preventUnmountOnClose'>): void;
1321
- static useStore<Payload>(externalStore: MenuStore<Payload> | undefined, initialState: Partial<State<Payload>>): MenuStore<Payload>;
1322
- private unsubscribeParentListener;
2100
+ setActiveIndex(activeIndex: number | null, reason: MenuRoot.HighlightEventReason, event?: Event | undefined): void;
2101
+ highlightItem(element: Element | null, reason: MenuRoot.HighlightEventReason, event?: Event | undefined): void;
1323
2102
  }
1324
2103
 
1325
2104
  /**
@@ -1328,7 +2107,7 @@ declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Co
1328
2107
  *
1329
2108
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1330
2109
  */
1331
- declare function MenuSubmenuRoot(props: MenuSubmenuRoot.Props): JSX_2.Element;
2110
+ declare function MenuSubmenuRoot(props: MenuSubmenuRoot.Props): React_2.JSX.Element;
1332
2111
 
1333
2112
  declare namespace MenuSubmenuRoot {
1334
2113
  type Props = ContextMenuSubmenuRootProps;
@@ -1409,7 +2188,7 @@ declare interface MenuTriggerProps<Payload = unknown> extends NativeButtonProps,
1409
2188
 
1410
2189
  declare interface MenuTriggerState {
1411
2190
  /**
1412
- * Whether the menu is currently open.
2191
+ * Whether the menu is currently open and was opened by this trigger.
1413
2192
  */
1414
2193
  open: boolean;
1415
2194
  /**
@@ -1426,29 +2205,36 @@ declare interface MenuTriggerState {
1426
2205
  *
1427
2206
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1428
2207
  */
1429
- declare const MenuViewport: React_2.ForwardRefExoticComponent<Omit<MenuViewport.Props, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
2208
+ declare const MenuViewport: React_2.ForwardRefExoticComponent<Omit<MenuViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1430
2209
 
1431
2210
  declare namespace MenuViewport {
1432
- interface Props extends BaseUIComponentProps<'div', State> {
1433
- /**
1434
- * The content to render inside the transition container.
1435
- */
1436
- children?: React_2.ReactNode;
1437
- }
1438
- interface State {
1439
- activationDirection: string | undefined;
1440
- /**
1441
- * Whether the viewport is currently transitioning between contents.
1442
- */
1443
- transitioning: boolean;
1444
- /**
1445
- * Present if animations should be instant.
1446
- */
1447
- instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
1448
- }
2211
+ type Props = MenuViewportProps;
2212
+ type State = MenuViewportState;
2213
+ }
2214
+
2215
+ declare interface MenuViewportProps extends BaseUIComponentProps<'div', MenuViewportState> {
2216
+ /**
2217
+ * The content to render inside the transition container.
2218
+ */
2219
+ children?: React_2.ReactNode;
2220
+ }
2221
+
2222
+ declare interface MenuViewportState {
2223
+ /**
2224
+ * The activation direction of the transitioned content.
2225
+ */
2226
+ activationDirection: string | undefined;
2227
+ /**
2228
+ * Whether the viewport is currently transitioning between contents.
2229
+ */
2230
+ transitioning: boolean;
2231
+ /**
2232
+ * Present if animations should be instant.
2233
+ */
2234
+ instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
1449
2235
  }
1450
2236
 
1451
- declare const missing: "missing";
2237
+ declare const missing: 'missing';
1452
2238
 
1453
2239
  declare type NarrowedElement<T> = T extends Element ? T : Element;
1454
2240
 
@@ -1462,7 +2248,7 @@ declare interface NativeButtonProps {
1462
2248
  nativeButton?: boolean | undefined;
1463
2249
  }
1464
2250
 
1465
- declare const none: "none";
2251
+ declare const none: 'none';
1466
2252
 
1467
2253
  declare interface NonNativeButtonProps {
1468
2254
  /**
@@ -1487,15 +2273,72 @@ declare type OffsetFunction = (data: {
1487
2273
  };
1488
2274
  }) => number;
1489
2275
 
2276
+ /**
2277
+ * Present when the menu is open.
2278
+ */
2279
+ declare const open_2 = "data-open";
2280
+
2281
+ /**
2282
+ * Present when the menu popup is open.
2283
+ */
2284
+ declare const open_3 = "data-open";
2285
+
2286
+ /**
2287
+ * Present when the menu is open.
2288
+ */
2289
+ declare const open_4 = "data-open";
2290
+
2291
+ /**
2292
+ * Present when the menu popup is open.
2293
+ */
2294
+ declare const open_5 = "data-open";
2295
+
1490
2296
  declare type Orientation = 'horizontal' | 'vertical';
1491
2297
 
1492
- declare const outsidePress: "outside-press";
2298
+ /**
2299
+ * Indicates the orientation of the separator.
2300
+ * @type {'horizontal' | 'vertical'}
2301
+ */
2302
+ declare const orientation_2 = "data-orientation";
2303
+
2304
+ declare const outsidePress: 'outside-press';
1493
2305
 
1494
2306
  declare type PayloadChildRenderFunction<Payload> = (arg: {
1495
2307
  payload: Payload | undefined;
1496
2308
  }) => React_2.ReactNode;
1497
2309
 
1498
- declare const pointer: "pointer";
2310
+ declare const pointer: 'pointer';
2311
+
2312
+ declare const popupClose: 'popup-close';
2313
+
2314
+ /**
2315
+ * Store shape required by `BasePopupHandle.openByTrigger`/`closePopup` to drive open/close state.
2316
+ * Only the root-owned `Store` needs this — the `HandleStore` view exposed to detached triggers may
2317
+ * omit `setOpen` entirely (as Dialog and PreviewCard's do) since it is never called while detached.
2318
+ */
2319
+ declare interface PopupHandleStoreWithOpen extends PopupHandleStoreWithTriggers {
2320
+ setOpen(open: boolean, eventDetails: BaseUIChangeEventDetails<typeof REASONS.imperativeAction>): void;
2321
+ }
2322
+
2323
+ /**
2324
+ * Store shape holding a trigger registry, required by `BasePopupHandle.openByTrigger` to resolve a
2325
+ * trigger element by id on both the attached root's store and the fallback store.
2326
+ */
2327
+ declare interface PopupHandleStoreWithTriggers {
2328
+ readonly context: {
2329
+ readonly triggerElements: PopupTriggerMap;
2330
+ };
2331
+ }
2332
+
2333
+ /**
2334
+ * Present when the corresponding context menu is open.
2335
+ */
2336
+ declare const popupOpen = "data-popup-open";
2337
+
2338
+ /**
2339
+ * Present when the corresponding submenu is open.
2340
+ */
2341
+ declare const popupOpen_2 = "data-popup-open";
1499
2342
 
1500
2343
  declare type PopupStoreContext<ChangeEventDetails> = {
1501
2344
  /**
@@ -1560,6 +2403,13 @@ declare type PopupStoreState<Payload> = {
1560
2403
  * The currently active trigger DOM element.
1561
2404
  */
1562
2405
  activeTriggerElement: Element | null;
2406
+ /**
2407
+ * Whether the popup is open because of a request that deliberately carried no trigger, such as a
2408
+ * handle's `open(null)` or `openWithPayload()`. While set, a lone registered trigger is not
2409
+ * implicitly associated with the popup, so its trigger-owned state (such as `payload`) is not
2410
+ * forwarded. Reset by the Root once the popup is effectively closed.
2411
+ */
2412
+ openedWithoutTrigger: boolean;
1563
2413
  /**
1564
2414
  * ID of the trigger (external prop).
1565
2415
  */
@@ -1588,12 +2438,12 @@ declare type PopupStoreState<Payload> = {
1588
2438
 
1589
2439
  /**
1590
2440
  * Data structure to keep track of popup trigger elements by their IDs.
1591
- * Uses both a set of Elements and a map of IDs to Elements for efficient lookups.
2441
+ *
2442
+ * Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
2443
+ * while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
1592
2444
  */
1593
2445
  declare class PopupTriggerMap {
1594
- private elementsSet;
1595
2446
  private idMap;
1596
- constructor();
1597
2447
  /**
1598
2448
  * Adds a trigger element with the given ID.
1599
2449
  *
@@ -1630,6 +2480,34 @@ declare class PopupTriggerMap {
1630
2480
  get size(): number;
1631
2481
  }
1632
2482
 
2483
+ /**
2484
+ * Store members a detached handle-backed trigger reads or invokes for trigger registration and data
2485
+ * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
2486
+ * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
2487
+ * be durable. Component handle-store views Pick these from their concrete store (preserving its
2488
+ * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
2489
+ */
2490
+ declare type PopupTriggerStoreKeys = 'context' | 'select' | 'set' | 'state' | 'update' | 'useState';
2491
+
2492
+ /**
2493
+ * The height of the menu's positioner.
2494
+ * It is important to set `height` to this value when using CSS to animate size changes.
2495
+ * @type {number}
2496
+ */
2497
+ declare const positionerHeight = "--positioner-height";
2498
+
2499
+ /**
2500
+ * The width of the menu's positioner.
2501
+ * It is important to set `width` to this value when using CSS to animate size changes.
2502
+ * @type {number}
2503
+ */
2504
+ declare const positionerWidth = "--positioner-width";
2505
+
2506
+ /**
2507
+ * Present when the corresponding context menu is open.
2508
+ */
2509
+ declare const pressed = "data-pressed";
2510
+
1633
2511
  declare namespace REASONS {
1634
2512
  export {
1635
2513
  none,
@@ -1659,6 +2537,7 @@ declare namespace REASONS {
1659
2537
  drag,
1660
2538
  wheel,
1661
2539
  scrub,
2540
+ popupClose,
1662
2541
  cancelOpen,
1663
2542
  siblingOpen,
1664
2543
  disabled,
@@ -1715,7 +2594,9 @@ declare interface ReasonToEventMap {
1715
2594
 
1716
2595
  declare type ReferenceType = Element | VirtualElement;
1717
2596
 
1718
- declare const scrub: "scrub";
2597
+ declare const scrub: 'scrub';
2598
+
2599
+ declare type Selectors = typeof selectors_2;
1719
2600
 
1720
2601
  declare const selectors: {
1721
2602
  open: (state: FloatingRootState) => boolean;
@@ -1727,25 +2608,6 @@ declare const selectors: {
1727
2608
  };
1728
2609
 
1729
2610
  declare const selectors_2: {
1730
- disabled: (state: State<unknown>) => boolean;
1731
- modal: (state: State<unknown>) => boolean;
1732
- openMethod: (state: State<unknown>) => InteractionType | null;
1733
- allowMouseEnter: (state: State<unknown>) => boolean;
1734
- stickIfOpen: (state: State<unknown>) => boolean;
1735
- parent: (state: State<unknown>) => MenuParent;
1736
- rootId: (state: State<unknown>) => string | undefined;
1737
- activeIndex: (state: State<unknown>) => number | null;
1738
- isActive: (state: State<unknown>, itemIndex: number) => boolean;
1739
- hoverEnabled: (state: State<unknown>) => boolean;
1740
- instantType: (state: State<unknown>) => "group" | "click" | "dismiss" | "trigger-change" | undefined;
1741
- lastOpenChangeReason: (state: State<unknown>) => MenuRootChangeEventReason | null;
1742
- floatingTreeRoot: (state: State<unknown>) => FloatingTreeStore;
1743
- floatingNodeId: (state: State<unknown>) => string | undefined;
1744
- floatingParentNodeId: (state: State<unknown>) => string | null;
1745
- itemProps: (state: State<unknown>) => HTMLProps;
1746
- closeDelay: (state: State<unknown>) => number;
1747
- hasViewport: (state: State<unknown>) => boolean;
1748
- keyboardEventRelay: (state: State<unknown>) => React_2.KeyboardEventHandler<any> | undefined;
1749
2611
  open: (state: {
1750
2612
  open: boolean;
1751
2613
  readonly openProp: boolean | undefined;
@@ -1758,6 +2620,7 @@ declare const selectors_2: {
1758
2620
  payload: unknown;
1759
2621
  activeTriggerId: string | null;
1760
2622
  activeTriggerElement: Element | null;
2623
+ openedWithoutTrigger: boolean;
1761
2624
  readonly triggerIdProp: string | null | undefined;
1762
2625
  popupElement: HTMLElement | null;
1763
2626
  positionerElement: HTMLElement | null;
@@ -1777,6 +2640,7 @@ declare const selectors_2: {
1777
2640
  payload: unknown;
1778
2641
  activeTriggerId: string | null;
1779
2642
  activeTriggerElement: Element | null;
2643
+ openedWithoutTrigger: boolean;
1780
2644
  readonly triggerIdProp: string | null | undefined;
1781
2645
  popupElement: HTMLElement | null;
1782
2646
  positionerElement: HTMLElement | null;
@@ -1796,6 +2660,7 @@ declare const selectors_2: {
1796
2660
  payload: unknown;
1797
2661
  activeTriggerId: string | null;
1798
2662
  activeTriggerElement: Element | null;
2663
+ openedWithoutTrigger: boolean;
1799
2664
  readonly triggerIdProp: string | null | undefined;
1800
2665
  popupElement: HTMLElement | null;
1801
2666
  positionerElement: HTMLElement | null;
@@ -1815,6 +2680,7 @@ declare const selectors_2: {
1815
2680
  payload: unknown;
1816
2681
  activeTriggerId: string | null;
1817
2682
  activeTriggerElement: Element | null;
2683
+ openedWithoutTrigger: boolean;
1818
2684
  readonly triggerIdProp: string | null | undefined;
1819
2685
  popupElement: HTMLElement | null;
1820
2686
  positionerElement: HTMLElement | null;
@@ -1834,6 +2700,7 @@ declare const selectors_2: {
1834
2700
  payload: unknown;
1835
2701
  activeTriggerId: string | null;
1836
2702
  activeTriggerElement: Element | null;
2703
+ openedWithoutTrigger: boolean;
1837
2704
  readonly triggerIdProp: string | null | undefined;
1838
2705
  popupElement: HTMLElement | null;
1839
2706
  positionerElement: HTMLElement | null;
@@ -1853,6 +2720,7 @@ declare const selectors_2: {
1853
2720
  payload: unknown;
1854
2721
  activeTriggerId: string | null;
1855
2722
  activeTriggerElement: Element | null;
2723
+ openedWithoutTrigger: boolean;
1856
2724
  readonly triggerIdProp: string | null | undefined;
1857
2725
  popupElement: HTMLElement | null;
1858
2726
  positionerElement: HTMLElement | null;
@@ -1872,6 +2740,7 @@ declare const selectors_2: {
1872
2740
  payload: unknown;
1873
2741
  activeTriggerId: string | null;
1874
2742
  activeTriggerElement: Element | null;
2743
+ openedWithoutTrigger: boolean;
1875
2744
  readonly triggerIdProp: string | null | undefined;
1876
2745
  popupElement: HTMLElement | null;
1877
2746
  positionerElement: HTMLElement | null;
@@ -1891,6 +2760,7 @@ declare const selectors_2: {
1891
2760
  payload: unknown;
1892
2761
  activeTriggerId: string | null;
1893
2762
  activeTriggerElement: Element | null;
2763
+ openedWithoutTrigger: boolean;
1894
2764
  readonly triggerIdProp: string | null | undefined;
1895
2765
  popupElement: HTMLElement | null;
1896
2766
  positionerElement: HTMLElement | null;
@@ -1910,6 +2780,7 @@ declare const selectors_2: {
1910
2780
  payload: unknown;
1911
2781
  activeTriggerId: string | null;
1912
2782
  activeTriggerElement: Element | null;
2783
+ openedWithoutTrigger: boolean;
1913
2784
  readonly triggerIdProp: string | null | undefined;
1914
2785
  popupElement: HTMLElement | null;
1915
2786
  positionerElement: HTMLElement | null;
@@ -1929,6 +2800,7 @@ declare const selectors_2: {
1929
2800
  payload: unknown;
1930
2801
  activeTriggerId: string | null;
1931
2802
  activeTriggerElement: Element | null;
2803
+ openedWithoutTrigger: boolean;
1932
2804
  readonly triggerIdProp: string | null | undefined;
1933
2805
  popupElement: HTMLElement | null;
1934
2806
  positionerElement: HTMLElement | null;
@@ -1948,6 +2820,7 @@ declare const selectors_2: {
1948
2820
  payload: unknown;
1949
2821
  activeTriggerId: string | null;
1950
2822
  activeTriggerElement: Element | null;
2823
+ openedWithoutTrigger: boolean;
1951
2824
  readonly triggerIdProp: string | null | undefined;
1952
2825
  popupElement: HTMLElement | null;
1953
2826
  positionerElement: HTMLElement | null;
@@ -1967,6 +2840,7 @@ declare const selectors_2: {
1967
2840
  payload: unknown;
1968
2841
  activeTriggerId: string | null;
1969
2842
  activeTriggerElement: Element | null;
2843
+ openedWithoutTrigger: boolean;
1970
2844
  readonly triggerIdProp: string | null | undefined;
1971
2845
  popupElement: HTMLElement | null;
1972
2846
  positionerElement: HTMLElement | null;
@@ -1986,6 +2860,7 @@ declare const selectors_2: {
1986
2860
  payload: unknown;
1987
2861
  activeTriggerId: string | null;
1988
2862
  activeTriggerElement: Element | null;
2863
+ openedWithoutTrigger: boolean;
1989
2864
  readonly triggerIdProp: string | null | undefined;
1990
2865
  popupElement: HTMLElement | null;
1991
2866
  positionerElement: HTMLElement | null;
@@ -2005,6 +2880,7 @@ declare const selectors_2: {
2005
2880
  payload: unknown;
2006
2881
  activeTriggerId: string | null;
2007
2882
  activeTriggerElement: Element | null;
2883
+ openedWithoutTrigger: boolean;
2008
2884
  readonly triggerIdProp: string | null | undefined;
2009
2885
  popupElement: HTMLElement | null;
2010
2886
  positionerElement: HTMLElement | null;
@@ -2024,6 +2900,7 @@ declare const selectors_2: {
2024
2900
  payload: unknown;
2025
2901
  activeTriggerId: string | null;
2026
2902
  activeTriggerElement: Element | null;
2903
+ openedWithoutTrigger: boolean;
2027
2904
  readonly triggerIdProp: string | null | undefined;
2028
2905
  popupElement: HTMLElement | null;
2029
2906
  positionerElement: HTMLElement | null;
@@ -2043,6 +2920,7 @@ declare const selectors_2: {
2043
2920
  payload: unknown;
2044
2921
  activeTriggerId: string | null;
2045
2922
  activeTriggerElement: Element | null;
2923
+ openedWithoutTrigger: boolean;
2046
2924
  readonly triggerIdProp: string | null | undefined;
2047
2925
  popupElement: HTMLElement | null;
2048
2926
  positionerElement: HTMLElement | null;
@@ -2062,6 +2940,7 @@ declare const selectors_2: {
2062
2940
  payload: unknown;
2063
2941
  activeTriggerId: string | null;
2064
2942
  activeTriggerElement: Element | null;
2943
+ openedWithoutTrigger: boolean;
2065
2944
  readonly triggerIdProp: string | null | undefined;
2066
2945
  popupElement: HTMLElement | null;
2067
2946
  positionerElement: HTMLElement | null;
@@ -2081,6 +2960,7 @@ declare const selectors_2: {
2081
2960
  payload: unknown;
2082
2961
  activeTriggerId: string | null;
2083
2962
  activeTriggerElement: Element | null;
2963
+ openedWithoutTrigger: boolean;
2084
2964
  readonly triggerIdProp: string | null | undefined;
2085
2965
  popupElement: HTMLElement | null;
2086
2966
  positionerElement: HTMLElement | null;
@@ -2088,6 +2968,33 @@ declare const selectors_2: {
2088
2968
  inactiveTriggerProps: HTMLProps;
2089
2969
  popupProps: HTMLProps;
2090
2970
  }) => HTMLElement | null;
2971
+ disabled: (state: State<unknown>) => boolean;
2972
+ modal: (state: State<unknown>) => boolean;
2973
+ openMethod: (state: State<unknown>) => InteractionType | null;
2974
+ keyboardOpen: (state: State<unknown>) => boolean;
2975
+ allowMouseEnter: (state: State<unknown>) => boolean;
2976
+ highlightItemOnHover: (state: State<unknown>) => boolean;
2977
+ parent: (state: State<unknown>) => MenuParent;
2978
+ rootId: (state: State<unknown>) => string | undefined;
2979
+ activeIndex: (state: State<unknown>) => number | null;
2980
+ listElement: (state: State<unknown>) => HTMLElement | null;
2981
+ /** The trigger's `aria-controls`: the list when one holds the `menu` role, else the popup. */
2982
+ triggerControlsId: (state: State<unknown>, triggerId: string | undefined) => string | undefined;
2983
+ filterTriggerProps: (state: State<unknown>) => HTMLProps;
2984
+ inputProps: (state: State<unknown>) => HTMLProps;
2985
+ webkitAriaSelected: (state: State<unknown>, highlighted: boolean) => true | undefined;
2986
+ highlightedItemId: (state: State<unknown>) => string | undefined;
2987
+ isActive: (state: State<unknown>, itemIndex: number) => boolean;
2988
+ hoverEnabled: (state: State<unknown>) => boolean;
2989
+ instantType: (state: State<unknown>) => "click" | "dismiss" | "group" | "trigger-change" | undefined;
2990
+ lastOpenChangeReason: (state: State<unknown>) => MenuRootChangeEventReason | null;
2991
+ floatingTreeRoot: (state: State<unknown>) => FloatingTreeStore;
2992
+ floatingNodeId: (state: State<unknown>) => string | undefined;
2993
+ floatingParentNodeId: (state: State<unknown>) => string | null;
2994
+ itemProps: (state: State<unknown>) => HTMLProps;
2995
+ closeDelay: (state: State<unknown>) => number;
2996
+ adaptiveOrigin: (state: State<unknown>) => AdaptiveOriginMiddleware | undefined;
2997
+ keyboardEventRelay: (state: State<unknown>) => React_2.KeyboardEventHandler<any> | undefined;
2091
2998
  };
2092
2999
 
2093
3000
  /**
@@ -2118,10 +3025,28 @@ declare interface SeparatorState {
2118
3025
  orientation: Orientation;
2119
3026
  }
2120
3027
 
2121
- declare const siblingOpen: "sibling-open";
3028
+ declare const siblingOpen: 'sibling-open';
2122
3029
 
2123
3030
  declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
2124
3031
 
3032
+ /**
3033
+ * Indicates which side the popup is positioned relative to the anchor.
3034
+ * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
3035
+ */
3036
+ declare const side = "data-side";
3037
+
3038
+ /**
3039
+ * Indicates which side the popup is positioned relative to the anchor.
3040
+ * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
3041
+ */
3042
+ declare const side_2 = "data-side";
3043
+
3044
+ /**
3045
+ * Indicates which side the popup is positioned relative to the anchor.
3046
+ * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}
3047
+ */
3048
+ declare const side_3 = "data-side";
3049
+
2125
3050
  declare interface SideFlipMode {
2126
3051
  /**
2127
3052
  * How to avoid collisions on the side axis.
@@ -2169,16 +3094,51 @@ declare interface SideShiftMode {
2169
3094
  fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
2170
3095
  }
2171
3096
 
3097
+ /**
3098
+ * Present when the menu begins animating in.
3099
+ */
3100
+ declare const startingStyle = "data-starting-style";
3101
+
3102
+ /**
3103
+ * Present when the menu begins animating in.
3104
+ */
3105
+ declare const startingStyle_2 = "data-starting-style";
3106
+
3107
+ /**
3108
+ * Present when the indicator begins animating in.
3109
+ */
3110
+ declare const startingStyle_3 = "data-starting-style";
3111
+
3112
+ /**
3113
+ * Present when the radio indicator begins animating in.
3114
+ */
3115
+ declare const startingStyle_4 = "data-starting-style";
3116
+
2172
3117
  declare type State<Payload> = PopupStoreState<Payload> & {
2173
3118
  disabled: boolean;
2174
- modal: boolean;
3119
+ modal: boolean | undefined;
2175
3120
  openMethod: InteractionType | null;
3121
+ /** Whether the popup last opened from the keyboard or an assistive-technology press. */
3122
+ keyboardOpen: boolean;
2176
3123
  allowMouseEnter: boolean;
3124
+ highlightItemOnHover: boolean;
2177
3125
  parent: MenuParent;
2178
3126
  rootId: string | undefined;
2179
3127
  activeIndex: number | null;
3128
+ /** The `Menu.List` element, which takes the `menu` role from the popup when rendered. */
3129
+ listElement: HTMLElement | null;
3130
+ /**
3131
+ * Props a filter root adds to its triggers (dialog semantics and the key relay to the input).
3132
+ * Published by the filter implementation so a plain menu never bundles them.
3133
+ */
3134
+ filterTriggerProps: HTMLProps;
3135
+ /** List navigation props for the element that holds real focus under virtual focus. */
3136
+ inputProps: HTMLProps;
3137
+ /** Whether this menu's filter input has focus. */
3138
+ inputFocused: boolean;
3139
+ /** The element at `activeIndex` once the item list settles. Only virtual focus publishes it. */
3140
+ highlightedItem: HTMLElement | undefined;
2180
3141
  hoverEnabled: boolean;
2181
- stickIfOpen: boolean;
2182
3142
  instantType: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
2183
3143
  openChangeReason: MenuRoot.ChangeEventReason | null;
2184
3144
  floatingTreeRoot: FloatingTreeStore;
@@ -2187,20 +3147,51 @@ declare type State<Payload> = PopupStoreState<Payload> & {
2187
3147
  itemProps: HTMLProps;
2188
3148
  closeDelay: number;
2189
3149
  keyboardEventRelay: ((event: React_2.KeyboardEvent<any>) => void) | undefined;
2190
- hasViewport: boolean;
3150
+ adaptiveOrigin: AdaptiveOriginMiddleware | undefined;
2191
3151
  };
2192
3152
 
2193
- declare const swipe: "swipe";
3153
+ declare const swipe: 'swipe';
2194
3154
 
2195
- declare const trackPress: "track-press";
3155
+ declare const trackPress: 'track-press';
3156
+
3157
+ /**
3158
+ * The coordinates that this element is anchored to. Used for animations and transitions.
3159
+ * @type {string}
3160
+ */
3161
+ declare const transformOrigin = "--transform-origin";
2196
3162
 
2197
3163
  declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
2198
3164
 
2199
- declare const triggerFocus: "trigger-focus";
3165
+ declare const triggerFocus: 'trigger-focus';
3166
+
3167
+ declare const triggerHover: 'trigger-hover';
3168
+
3169
+ declare const triggerPress: 'trigger-press';
3170
+
3171
+ /**
3172
+ * Present when the menu arrow is uncentered.
3173
+ */
3174
+ declare const uncentered = "data-uncentered";
3175
+
3176
+ /**
3177
+ * Present when the menu checkbox item is not checked.
3178
+ */
3179
+ declare const unchecked = "data-unchecked";
3180
+
3181
+ /**
3182
+ * Present when the menu checkbox item is not checked.
3183
+ */
3184
+ declare const unchecked_2 = "data-unchecked";
2200
3185
 
2201
- declare const triggerHover: "trigger-hover";
3186
+ /**
3187
+ * Present when the menu radio item is not selected.
3188
+ */
3189
+ declare const unchecked_3 = "data-unchecked";
2202
3190
 
2203
- declare const triggerPress: "trigger-press";
3191
+ /**
3192
+ * Present when the menu radio item is not selected.
3193
+ */
3194
+ declare const unchecked_4 = "data-unchecked";
2204
3195
 
2205
3196
  declare interface UseAnchorPositioningSharedParameters {
2206
3197
  /**
@@ -2344,33 +3335,9 @@ declare interface UseAnchorPositioningSharedParameters {
2344
3335
  collisionAvoidance?: CollisionAvoidance | undefined;
2345
3336
  }
2346
3337
 
2347
- declare interface UseFloatingPortalNodeProps {
2348
- ref?: React_2.Ref<HTMLDivElement> | undefined;
2349
- container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
2350
- componentProps?: UseRenderElementComponentProps<any> | undefined;
2351
- elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
2352
- }
2353
-
2354
- declare interface UseRenderElementComponentProps<State> {
2355
- /**
2356
- * The class name to apply to the rendered element.
2357
- * Can be a string or a function that accepts the state and returns a string.
2358
- */
2359
- className?: string | ((state: State) => string | undefined) | undefined;
2360
- /**
2361
- * The render prop or React element to override the default element.
2362
- */
2363
- render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
2364
- /**
2365
- * The style to apply to the rendered element.
2366
- * Can be a style object or a function that accepts the state and returns a style object.
2367
- */
2368
- style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
2369
- }
2370
-
2371
- declare const wheel: "wheel";
3338
+ declare const wheel: 'wheel';
2372
3339
 
2373
- declare const windowResize: "window-resize";
3340
+ declare const windowResize: 'window-resize';
2374
3341
 
2375
3342
  /**
2376
3343
  * Adds a `preventBaseUIHandler` method to all event handlers.