@wix/site-ui 1.346.0 → 1.348.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
@@ -1,19 +1,96 @@
1
- import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.js';
2
- import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.js';
1
+ import { FloatingRootContext as FloatingRootContext_2 } from '../../floating-ui-react/index.mjs';
2
+ import { FloatingRootStore as FloatingRootStore_2 } from '../../floating-ui-react/components/FloatingRootStore.mjs';
3
3
  import type { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
4
- import { JSX as JSX_2 } from 'react/jsx-runtime';
5
4
  import { MenubarProps as MenubarProps_2 } from '@base-ui/react';
6
- import { MenuRootChangeEventReason } from '../index.js';
5
+ import { MenuRootChangeEventReason } from '../index.mjs';
7
6
  import { Padding } from '@floating-ui/react-dom';
8
7
  import * as React_2 from 'react';
9
8
  import { ReactStore } from '@base-ui/utils/store';
10
- import { Rect } from '@floating-ui/utils';
11
- import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.js';
9
+ import type { Rect } from '@floating-ui/utils';
10
+ import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.mjs';
12
11
  import type { UseFloatingReturn } from '@floating-ui/react-dom';
13
12
  import { VirtualElement } from '@floating-ui/react-dom';
14
13
 
14
+ declare type AdaptiveOriginMiddleware = {
15
+ name: string;
16
+ fn: (...args: any[]) => any;
17
+ };
18
+
15
19
  declare type Align = 'start' | 'center' | 'end';
16
20
 
21
+ /**
22
+ * Shared implementation for popup handles that coordinate detached triggers with a mounted root.
23
+ *
24
+ * Subclasses provide the component-specific imperative methods, while this base class owns the
25
+ * fallback store, root store attachment stack, subscriber notifications, and development warning for
26
+ * overlapping roots.
27
+ *
28
+ * @template HandleStore Store shape exposed to detached triggers.
29
+ * @template Store Root-owned store attached by the component root.
30
+ */
31
+ declare class BasePopupHandle<HandleStore extends PopupHandleStoreWithTriggers, Store extends HandleStore & PopupHandleStoreWithOpen> {
32
+ protected readonly fallbackStore: HandleStore;
33
+ private readonly componentName;
34
+ private readonly throwOnMissingTrigger;
35
+ /**
36
+ * Stores of every root currently using this handle, in attach order. A handle is meant to be used
37
+ * by a single mounted root, but roots can transiently overlap (e.g. during an animated route
38
+ * transition), so this stack lets `attachStore`'s cleanup restore the previous root instead of
39
+ * leaving a still-mounted root uncontrollable when a newer overlapping root detaches first.
40
+ */
41
+ private readonly attachedStores;
42
+ /**
43
+ * Store of the root that currently controls the handle: the most recently attached one still
44
+ * mounted, or `null` when no root is attached. Imperative methods are no-ops while this is `null`.
45
+ */
46
+ private attachedStoreValue;
47
+ /**
48
+ * Listeners notified when `attachedStore` changes, so detached triggers can follow the store pointer.
49
+ */
50
+ private readonly storeListeners;
51
+ /**
52
+ * Creates a handle backed by the store used while no root is attached.
53
+ *
54
+ * @param fallbackStore Inert, closed store handed to detached triggers while no root is attached,
55
+ * so they can render and register without a mounted root. Triggers register into whichever store
56
+ * `store` currently resolves to, so while detached they live in this store's trigger map and
57
+ * migrate themselves to the root's store (and back) as it attaches/detaches.
58
+ * @param componentName Component name used to prefix dev warnings, e.g. `'Menu'` produces
59
+ * `MenuHandle.open()` in warning text.
60
+ * @param throwOnMissingTrigger Whether `open(triggerId)` throws when no trigger with that id is
61
+ * registered. Anchored popups (Menu, Popover, Tooltip, PreviewCard) need a trigger to anchor to,
62
+ * so they throw; Dialog is not anchored and instead opens unassociated with a dev warning.
63
+ */
64
+ constructor(fallbackStore: HandleStore, componentName: string, throwOnMissingTrigger?: boolean);
65
+ protected get attachedStore(): Store | null;
66
+ /**
67
+ * Sets the store that currently controls the handle and notifies subscribers when it changes, so
68
+ * detached triggers re-render and migrate their registration to the new store.
69
+ */
70
+ private setActiveStore;
71
+ /**
72
+ * Opens the attached root's store and associates it with the trigger with the given id, or a
73
+ * no-op (with a dev warning) while no root is attached. Shared by every concrete handle's public
74
+ * `open()` method, which only narrows the parameter type.
75
+ *
76
+ * When a trigger id is given but no matching trigger is registered, anchored popups throw (see
77
+ * `throwOnMissingTrigger`); Dialog opens unassociated with a dev warning instead.
78
+ *
79
+ * This method should only be called in an event handler or an effect (not during rendering).
80
+ *
81
+ * @param triggerId ID of the trigger to associate with the popup, or `null`/`undefined` to open
82
+ * without associating any trigger.
83
+ */
84
+ protected openByTrigger(triggerId: string | null | undefined): void;
85
+ /**
86
+ * Closes the popup by setting the attached root's store to closed, or a no-op (with a dev warning)
87
+ * while no root is attached. Shared by every concrete handle's public `close()` method.
88
+ *
89
+ * This method should only be called in an event handler or an effect (not during rendering).
90
+ */
91
+ protected closePopup(): void;
92
+ }
93
+
17
94
  declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
18
95
  /**
19
96
  * The reason for the event.
@@ -79,17 +156,39 @@ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E &
79
156
  readonly baseUIHandlerPrevented?: boolean | undefined;
80
157
  };
81
158
 
159
+ /**
160
+ * Details of custom generic events emitted by Base UI components.
161
+ */
162
+ declare type BaseUIGenericEventDetail<Reason extends string, CustomProperties extends object> = {
163
+ /**
164
+ * The reason for the event.
165
+ */
166
+ reason: Reason;
167
+ /**
168
+ * The native event associated with the custom event.
169
+ */
170
+ event: ReasonToEvent<Reason>;
171
+ } & CustomProperties;
172
+
173
+ declare type BaseUIGenericEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIGenericEventDetail<Reason, CustomProperties> & {} : never;
174
+
175
+ /** Highlight navigation uses mouse events for hover and pointer events for leaving an item. */
176
+ declare type BaseUIHighlightEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends typeof REASONS.pointer ? {
177
+ reason: Reason;
178
+ event: MouseEvent | PointerEvent;
179
+ } & CustomProperties : BaseUIGenericEventDetails<Reason, CustomProperties>;
180
+
82
181
  declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
83
182
 
84
- declare const cancelOpen: "cancel-open";
183
+ declare const cancelOpen: 'cancel-open';
85
184
 
86
- declare const chipRemovePress: "chip-remove-press";
185
+ declare const chipRemovePress: 'chip-remove-press';
87
186
 
88
- declare const clearPress: "clear-press";
187
+ declare const clearPress: 'clear-press';
89
188
 
90
- declare const closePress: "close-press";
189
+ declare const closePress: 'close-press';
91
190
 
92
- declare const closeWatcher: "close-watcher";
191
+ declare const closeWatcher: 'close-watcher';
93
192
 
94
193
  declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
95
194
 
@@ -107,8 +206,19 @@ declare type Context = PopupStoreContext<MenuRoot.ChangeEventDetails> & {
107
206
  readonly typingRef: React_2.RefObject<boolean>;
108
207
  readonly itemDomElements: React_2.RefObject<(HTMLElement | null)[]>;
109
208
  readonly itemLabels: React_2.RefObject<(string | null)[]>;
209
+ /** Why the next `activeIndex` write happens, consumed by `onItemHighlighted` on commit. */
210
+ highlightReason: MenuRoot.HighlightEventReason;
211
+ /** The event that caused the next `activeIndex` write, reported along with `highlightReason`. */
212
+ highlightEvent: Event | undefined;
213
+ /** The item last committed as highlighted, kept in every menu so reasons compare against it. */
214
+ reportedItem: HTMLElement | undefined;
110
215
  allowMouseUpTriggerRef: React_2.RefObject<boolean>;
216
+ /** The element that holds real focus while virtual list navigation is active. */
217
+ virtualFocusRef: React_2.RefObject<HTMLElement | null> | undefined;
218
+ /** Whether a filterable menu's trigger was last pressed by a screen reader. */
219
+ virtualPress?: boolean | undefined;
111
220
  readonly triggerFocusTargetRef: React_2.RefObject<HTMLElement | null>;
221
+ readonly beforeTriggerFocusGuardRef: React_2.RefObject<HTMLElement | null>;
112
222
  readonly beforeContentFocusGuardRef: React_2.RefObject<HTMLElement | null>;
113
223
  };
114
224
 
@@ -124,7 +234,7 @@ declare interface ContextData {
124
234
  *
125
235
  * Documentation: [Base UI Context Menu](https://base-ui.com/react/components/context-menu)
126
236
  */
127
- declare function ContextMenuRoot(props: ContextMenuRoot.Props): JSX_2.Element;
237
+ declare function ContextMenuRoot(props: ContextMenuRoot.Props): React_2.JSX.Element;
128
238
 
129
239
  declare namespace ContextMenuRoot {
130
240
  type State = ContextMenuRootState;
@@ -161,11 +271,17 @@ declare interface ContextMenuRootContext {
161
271
 
162
272
  declare const ContextMenuRootContext: React_2.Context<ContextMenuRootContext | undefined>;
163
273
 
164
- declare interface ContextMenuRootProps extends Omit<Menu.Root.Props, 'modal' | 'openOnHover' | 'delay' | 'closeDelay' | 'onOpenChange'> {
274
+ declare interface ContextMenuRootProps extends Omit<Menu.Root.Props, 'handle' | 'triggerId' | 'defaultTriggerId' | 'modal' | 'openOnHover' | 'delay' | 'closeDelay' | 'closeParentOnEsc' | 'onOpenChange' | 'children'> {
165
275
  /**
166
276
  * Event handler called when the menu is opened or closed.
167
277
  */
168
278
  onOpenChange?: ((open: boolean, eventDetails: ContextMenuRoot.ChangeEventDetails) => void) | undefined;
279
+ /**
280
+ * @ignore
281
+ * @deprecated This prop has no effect on Context Menu.
282
+ */
283
+ closeParentOnEsc?: Menu.Root.Props['closeParentOnEsc'] | undefined;
284
+ children?: React_2.ReactNode | undefined;
169
285
  }
170
286
 
171
287
  declare interface ContextMenuRootState {}
@@ -175,13 +291,13 @@ declare interface ContextMenuRootState {}
175
291
  */
176
292
  declare function createMenuHandle<Payload>(): MenuHandle<Payload>;
177
293
 
178
- declare const decrementPress: "decrement-press";
294
+ declare const decrementPress: 'decrement-press';
179
295
 
180
- declare const disabled: "disabled";
296
+ declare const disabled: 'disabled';
181
297
 
182
- declare const drag: "drag";
298
+ declare const drag: 'drag';
183
299
 
184
- declare const escapeKey: "escape-key";
300
+ declare const escapeKey: 'escape-key';
185
301
 
186
302
  declare interface ExtendedElements {
187
303
  reference: ReferenceType | null;
@@ -198,6 +314,53 @@ declare interface ExtendedRefs {
198
314
  setPositionReference(node: ReferenceType | null): void;
199
315
  }
200
316
 
317
+ declare interface Filter {
318
+ /** Returns whether the item matches the query anywhere. */
319
+ contains: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
320
+ /** Returns whether the item starts with the query. */
321
+ startsWith: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
322
+ /** Returns whether the item ends with the query. */
323
+ endsWith: <Item>(item: Item, query: string, itemToString?: (item: Item) => string) => boolean;
324
+ }
325
+
326
+ declare interface FilterDropdownClearProps extends NativeButtonProps, BaseUIComponentProps<'button', FilterDropdownClearState> {
327
+ /**
328
+ * Whether the component should ignore user interaction.
329
+ * @default false
330
+ */
331
+ disabled?: boolean | undefined;
332
+ }
333
+
334
+ declare interface FilterDropdownClearState {
335
+ /**
336
+ * Whether the component should ignore user interaction.
337
+ */
338
+ disabled: boolean;
339
+ }
340
+
341
+ declare interface FilterDropdownEmptyProps extends BaseUIComponentProps<'div', FilterDropdownEmptyState> {}
342
+
343
+ declare interface FilterDropdownEmptyState {}
344
+
345
+ declare interface FilterDropdownInputProps extends BaseUIComponentProps<'input', FilterDropdownInputState> {}
346
+
347
+ declare interface FilterDropdownInputState {
348
+ /**
349
+ * Whether the input shows its focus ring.
350
+ * Cleared when keyboard navigation highlights an item.
351
+ */
352
+ highlighted: boolean;
353
+ }
354
+
355
+ declare namespace FilterDropdownRoot {
356
+ type ChangeEventReason = FilterDropdownRootChangeEventReason;
357
+ type ChangeEventDetails = FilterDropdownRootChangeEventDetails;
358
+ }
359
+
360
+ declare type FilterDropdownRootChangeEventDetails = BaseUIChangeEventDetails<FilterDropdownRootChangeEventReason>;
361
+
362
+ declare type FilterDropdownRootChangeEventReason = typeof REASONS.inputChange | typeof REASONS.inputClear | typeof REASONS.clearPress | typeof REASONS.popupClose;
363
+
201
364
  declare type FloatingContext = Omit<UseFloatingReturn<ReferenceType>, 'refs' | 'elements'> & {
202
365
  open: boolean;
203
366
  onOpenChange(open: boolean, eventDetails: BaseUIChangeEventDetails<string>): void;
@@ -222,31 +385,6 @@ declare interface FloatingNodeType {
222
385
  context?: FloatingContext | undefined;
223
386
  }
224
387
 
225
- /**
226
- * Portals the floating element into a given container element — by default,
227
- * outside of the app root and into the body.
228
- * This is necessary to ensure the floating element can appear outside any
229
- * potential parent containers that cause clipping (such as `overflow: hidden`),
230
- * while retaining its location in the React tree.
231
- * @see https://floating-ui.com/docs/FloatingPortal
232
- * @internal
233
- */
234
- declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
235
- renderGuards?: boolean | undefined;
236
- }, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
237
-
238
- declare namespace FloatingPortal {
239
- type State = FloatingPortalState;
240
- interface Props<TState> extends BaseUIComponentProps<'div', TState> {
241
- /**
242
- * A parent element to render the portal element into.
243
- */
244
- container?: UseFloatingPortalNodeProps['container'] | undefined;
245
- }
246
- }
247
-
248
- declare interface FloatingPortalState {}
249
-
250
388
  declare type FloatingRootContext = FloatingRootStore;
251
389
 
252
390
  declare interface FloatingRootState {
@@ -317,35 +455,50 @@ declare class FloatingTreeStore {
317
455
  removeNode(node: FloatingNodeType): void;
318
456
  }
319
457
 
320
- declare const focusOut: "focus-out";
458
+ declare const focusOut: 'focus-out';
459
+
460
+ declare function getFilter(options?: GetFilterParameters): Filter;
461
+
462
+ declare interface GetFilterParameters extends Intl.CollatorOptions {
463
+ /**
464
+ * The locale to use for string comparison.
465
+ * Defaults to the user's runtime locale.
466
+ */
467
+ locale?: Intl.LocalesArgument | undefined;
468
+ }
469
+
470
+ /**
471
+ * Present when any submenu within the menubar is open.
472
+ */
473
+ declare const hasSubmenuOpen = "data-has-submenu-open";
321
474
 
322
475
  declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
323
476
  ref?: React_2.Ref<T> | undefined;
324
477
  };
325
478
 
326
- declare const imperativeAction: "imperative-action";
479
+ declare const imperativeAction: 'imperative-action';
327
480
 
328
- declare const incrementPress: "increment-press";
481
+ declare const incrementPress: 'increment-press';
329
482
 
330
- declare const initial: "initial";
483
+ declare const initial: 'initial';
331
484
 
332
- declare const inputBlur: "input-blur";
485
+ declare const inputBlur: 'input-blur';
333
486
 
334
- declare const inputChange: "input-change";
487
+ declare const inputChange: 'input-change';
335
488
 
336
- declare const inputClear: "input-clear";
489
+ declare const inputClear: 'input-clear';
337
490
 
338
- declare const inputPaste: "input-paste";
491
+ declare const inputPaste: 'input-paste';
339
492
 
340
- declare const inputPress: "input-press";
493
+ declare const inputPress: 'input-press';
341
494
 
342
- declare const itemPress: "item-press";
495
+ declare const itemPress: 'item-press';
343
496
 
344
- declare const keyboard: "keyboard";
497
+ declare const keyboard: 'keyboard';
345
498
 
346
- declare const linkPress: "link-press";
499
+ declare const linkPress: 'link-press';
347
500
 
348
- declare const listNavigation: "list-navigation";
501
+ declare const listNavigation: 'list-navigation';
349
502
 
350
503
  export declare namespace Menu {
351
504
  export {
@@ -370,7 +523,13 @@ export declare namespace Menu {
370
523
  Separator,
371
524
  MenuSubmenuTrigger as SubmenuTrigger,
372
525
  MenuHandle as Handle,
373
- createMenuHandle as createHandle
526
+ createMenuHandle as createHandle,
527
+ MenuFilterProvider as FilterProvider,
528
+ MenuInput as Input,
529
+ MenuList as List,
530
+ MenuClear as Clear,
531
+ MenuEmpty as Empty,
532
+ getFilter as useFilter
374
533
  }
375
534
  }
376
535
 
@@ -452,6 +611,14 @@ declare interface MenubarContext {
452
611
 
453
612
  declare const MenubarContext: React_2.Context<MenubarContext | null>;
454
613
 
614
+ export declare namespace MenubarDataAttributes {
615
+ export {
616
+ modal,
617
+ orientation_2 as orientation,
618
+ hasSubmenuOpen
619
+ }
620
+ }
621
+
455
622
  export declare interface MenubarProps extends BaseUIComponentProps<'div', MenubarState> {
456
623
  /**
457
624
  * Whether the menubar is modal.
@@ -578,7 +745,8 @@ declare interface MenuCheckboxItemProps extends NonNativeButtonProps, BaseUIComp
578
745
  */
579
746
  disabled?: boolean | undefined;
580
747
  /**
581
- * Overrides the text label to use when the item is matched during keyboard text navigation.
748
+ * Overrides the text used for keyboard text navigation and filtering.
749
+ * Falls back to the rendered text when not provided.
582
750
  */
583
751
  label?: string | undefined;
584
752
  /**
@@ -607,6 +775,115 @@ declare interface MenuCheckboxItemState {
607
775
  checked: boolean;
608
776
  }
609
777
 
778
+ /**
779
+ * A button that clears the input text.
780
+ * Requires the menu to be wrapped in `Menu.FilterProvider`.
781
+ * Renders a `<button>` element when the input has text.
782
+ *
783
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
784
+ */
785
+ declare const MenuClear: React_2.ForwardRefExoticComponent<Omit<MenuClearProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
786
+
787
+ declare namespace MenuClear {
788
+ type State = MenuClearState;
789
+ type Props = MenuClearProps;
790
+ }
791
+
792
+ declare interface MenuClearProps extends FilterDropdownClearProps {}
793
+
794
+ declare interface MenuClearState extends FilterDropdownClearState {}
795
+
796
+ /**
797
+ * A message shown when the menu has no matching items.
798
+ * Requires the menu to be wrapped in `Menu.FilterProvider`.
799
+ * Renders a `<div>` element.
800
+ *
801
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
802
+ */
803
+ declare const MenuEmpty: React_2.ForwardRefExoticComponent<Omit<MenuEmptyProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
804
+
805
+ declare namespace MenuEmpty {
806
+ type State = MenuEmptyState;
807
+ type Props = MenuEmptyProps;
808
+ }
809
+
810
+ declare interface MenuEmptyProps extends FilterDropdownEmptyProps {}
811
+
812
+ declare interface MenuEmptyState extends FilterDropdownEmptyState {}
813
+
814
+ /**
815
+ * Enables filtering for the menu or submenu it wraps. Add `Menu.Input` to the popup and place
816
+ * its items in `Menu.List`.
817
+ * Wrap each searchable submenu in its own provider.
818
+ * Doesn't render its own HTML element.
819
+ *
820
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
821
+ */
822
+ declare function MenuFilterProvider(props: MenuFilterProvider.Props): React_2.JSX.Element;
823
+
824
+ declare namespace MenuFilterProvider {
825
+ type State = MenuFilterProviderState;
826
+ type Props = MenuFilterProviderProps;
827
+ type ChangeEventReason = MenuFilterProviderChangeEventReason;
828
+ type ChangeEventDetails = MenuFilterProviderChangeEventDetails;
829
+ }
830
+
831
+ declare type MenuFilterProviderChangeEventDetails = FilterDropdownRoot.ChangeEventDetails;
832
+
833
+ declare type MenuFilterProviderChangeEventReason = FilterDropdownRoot.ChangeEventReason;
834
+
835
+ /** The filtering props of `Menu.FilterProvider`, applied to the root directly inside it. */
836
+ declare interface MenuFilterProviderOptions {
837
+ /**
838
+ * Filter function used to match items against the query. Receives each item's `label` (or its
839
+ * rendered text) and the trimmed query, and keeps the item when it returns `true`.
840
+ * By default, items match when they contain the query, ignoring case, accents, and punctuation.
841
+ * Pass `null` when rendering filtered items yourself.
842
+ */
843
+ filter?: ((text: string, query: string) => boolean) | null | undefined;
844
+ /**
845
+ * Whether filtering highlights the first matching item automatically.
846
+ * - `true`: highlight it while the query is not empty.
847
+ * - `'always'`: highlight it even when the query is empty.
848
+ *
849
+ * Opening the menu from the keyboard highlights the first item either way, and the arrow keys
850
+ * can move the highlight to another item. With either value, the arrow keys wrap within the
851
+ * list rather than returning to the input, and with `'always'` a pointer highlight stays when
852
+ * the pointer leaves.
853
+ * @default false
854
+ */
855
+ autoHighlight?: boolean | 'always' | undefined;
856
+ /**
857
+ * The locale the default `filter` uses for string comparison.
858
+ * Defaults to the user's runtime locale.
859
+ */
860
+ locale?: Intl.LocalesArgument | undefined;
861
+ /**
862
+ * The uncontrolled filter query when the menu is initially rendered.
863
+ * To render a controlled query, use the `value` prop instead.
864
+ */
865
+ defaultValue?: string | undefined;
866
+ /**
867
+ * The filter query. Use when controlled.
868
+ * When the popup closes, `onValueChange` is called with an empty query. The controlled
869
+ * value changes only when the consumer updates this prop.
870
+ */
871
+ value?: string | undefined;
872
+ /**
873
+ * Event handler called when the filter query changes.
874
+ */
875
+ onValueChange?: ((value: string, eventDetails: MenuFilterProvider.ChangeEventDetails) => void) | undefined;
876
+ }
877
+
878
+ declare interface MenuFilterProviderProps extends MenuFilterProviderOptions {
879
+ /**
880
+ * The `<Menu.Root>` or `<Menu.SubmenuRoot>` to make filterable.
881
+ */
882
+ children?: React_2.ReactNode;
883
+ }
884
+
885
+ declare interface MenuFilterProviderState {}
886
+
610
887
  /**
611
888
  * Groups related menu items with the corresponding label.
612
889
  * Renders a `<div>` element.
@@ -646,30 +923,64 @@ declare interface MenuGroupProps extends BaseUIComponentProps<'div', MenuGroupSt
646
923
 
647
924
  declare interface MenuGroupState {}
648
925
 
649
- declare class MenuHandle<Payload> {
650
- /**
651
- * Internal store holding the menu's state.
652
- * @internal
653
- */
654
- readonly store: MenuStore<Payload>;
926
+ /**
927
+ * Controls a Menu imperatively and associates detached `Menu.Trigger` components with a `Menu.Root`.
928
+ * Create one with `Menu.createHandle()` and pass it to the `handle` prop of the root and of any
929
+ * triggers rendered outside of it.
930
+ *
931
+ * The imperative methods take effect only while a root using this handle is mounted; calls made
932
+ * before a root attaches (or after it unmounts) are ignored.
933
+ */
934
+ declare class MenuHandle<Payload> extends BasePopupHandle<MenuHandleStore<Payload>, MenuStore<Payload>> {
655
935
  constructor();
656
936
  /**
657
937
  * Opens the menu and associates it with the trigger with the given id.
658
- * The trigger must be a Menu.Trigger component with this handle passed as a prop.
659
938
  *
660
- * @param triggerId ID of the trigger to associate with the menu.
939
+ * This method should only be called in an event handler or an effect (not during rendering).
940
+ *
941
+ * @param triggerId ID of the trigger to associate with the menu. The trigger must be a matching
942
+ * `Menu.Trigger` with this handle passed as a prop.
661
943
  */
662
944
  open(triggerId: string): void;
663
945
  /**
664
946
  * Closes the menu.
947
+ *
948
+ * This method should only be called in an event handler or an effect (not during rendering).
665
949
  */
666
950
  close(): void;
667
951
  /**
668
- * Indicates whether the menu is currently open.
952
+ * Whether the menu is currently open. Returns `false` while no root is attached to the handle.
669
953
  */
670
954
  get isOpen(): boolean;
671
955
  }
672
956
 
957
+ /**
958
+ * The store view that detached handle-backed triggers read from. Both the real `MenuStore` and the
959
+ * inert fallback store satisfy it, so a trigger can read from whichever store the handle currently
960
+ * exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus `setOpen`
961
+ * (called by the focus guards) — so the exposed surface can't bypass the open-change pipeline; on
962
+ * the detached fallback store every one of these mutations is a no-op.
963
+ */
964
+ declare type MenuHandleStore<Payload> = Pick<MenuStore<Payload>, PopupTriggerStoreKeys | 'setOpen'>;
965
+
966
+ /**
967
+ * A search field that filters the menu items.
968
+ * Requires the menu to be wrapped in `Menu.FilterProvider`.
969
+ * Renders an `<input>` element.
970
+ *
971
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
972
+ */
973
+ declare const MenuInput: React_2.ForwardRefExoticComponent<Omit<MenuInputProps, "ref"> & React_2.RefAttributes<HTMLInputElement>>;
974
+
975
+ declare namespace MenuInput {
976
+ type State = MenuInputState;
977
+ type Props = MenuInputProps;
978
+ }
979
+
980
+ declare interface MenuInputProps extends FilterDropdownInputProps {}
981
+
982
+ declare interface MenuInputState extends FilterDropdownInputState {}
983
+
673
984
  /**
674
985
  * An individual interactive item in the menu.
675
986
  * Renders a `<div>` element.
@@ -694,7 +1005,8 @@ declare interface MenuItemProps extends NonNativeButtonProps, BaseUIComponentPro
694
1005
  */
695
1006
  disabled?: boolean | undefined;
696
1007
  /**
697
- * Overrides the text label to use when the item is matched during keyboard text navigation.
1008
+ * Overrides the text used for keyboard text navigation and filtering.
1009
+ * Falls back to the rendered text when not provided.
698
1010
  */
699
1011
  label?: string | undefined;
700
1012
  /**
@@ -733,9 +1045,10 @@ declare namespace MenuLinkItem {
733
1045
  type Props = MenuLinkItemProps;
734
1046
  }
735
1047
 
736
- declare interface MenuLinkItemProps extends BaseUIComponentProps<'a', MenuLinkItemState> {
1048
+ declare interface MenuLinkItemProps extends BaseUIComponentProps<'a', MenuLinkItemState, React_2.ComponentPropsWithRef<'a'>> {
737
1049
  /**
738
- * Overrides the text label to use when the item is matched during keyboard text navigation.
1050
+ * Overrides the text used for keyboard text navigation and filtering.
1051
+ * Falls back to the rendered text when not provided.
739
1052
  */
740
1053
  label?: string | undefined;
741
1054
  /**
@@ -756,6 +1069,23 @@ declare interface MenuLinkItemState {
756
1069
  highlighted: boolean;
757
1070
  }
758
1071
 
1072
+ /**
1073
+ * Groups menu items so other content, such as a filter input, can share the popup.
1074
+ * Renders a `<div>` element.
1075
+ *
1076
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1077
+ */
1078
+ declare const MenuList: React_2.ForwardRefExoticComponent<Omit<MenuListProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1079
+
1080
+ declare namespace MenuList {
1081
+ type Props = MenuListProps;
1082
+ type State = MenuListState;
1083
+ }
1084
+
1085
+ declare interface MenuListProps extends BaseUIComponentProps<'div', MenuListState> {}
1086
+
1087
+ declare interface MenuListState {}
1088
+
759
1089
  declare type MenuParent = {
760
1090
  type: 'menu';
761
1091
  store: MenuStore<unknown>;
@@ -845,12 +1175,16 @@ declare namespace MenuPortal {
845
1175
  type Props = MenuPortalProps;
846
1176
  }
847
1177
 
848
- declare interface MenuPortalProps extends FloatingPortal.Props<MenuPortalState> {
1178
+ declare interface MenuPortalProps extends BaseUIComponentProps<'div', MenuPortalState> {
849
1179
  /**
850
1180
  * Whether to keep the portal mounted in the DOM while the popup is hidden.
851
1181
  * @default false
852
1182
  */
853
1183
  keepMounted?: boolean | undefined;
1184
+ /**
1185
+ * A parent element to render the portal element into.
1186
+ */
1187
+ container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
854
1188
  }
855
1189
 
856
1190
  declare interface MenuPortalState {}
@@ -868,7 +1202,23 @@ declare namespace MenuPositioner {
868
1202
  type Props = MenuPositionerProps;
869
1203
  }
870
1204
 
871
- declare interface MenuPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<'div', MenuPositionerState> {}
1205
+ declare interface MenuPositionerProps extends Omit<UseAnchorPositioningSharedParameters, 'side' | 'align'>, BaseUIComponentProps<'div', MenuPositionerState> {
1206
+ /**
1207
+ * How to align the popup relative to the specified side.
1208
+ *
1209
+ * Submenus and menubars default to `'start'`.
1210
+ * @default 'center'
1211
+ */
1212
+ align?: UseAnchorPositioningSharedParameters['align'] | undefined;
1213
+ /**
1214
+ * Which side of the anchor element to align the popup against.
1215
+ * May automatically change to avoid collisions.
1216
+ *
1217
+ * Submenus and vertical menubars default to `'inline-end'`.
1218
+ * @default 'bottom'
1219
+ */
1220
+ side?: UseAnchorPositioningSharedParameters['side'] | undefined;
1221
+ }
872
1222
 
873
1223
  declare interface MenuPositionerState {
874
1224
  /**
@@ -1021,7 +1371,8 @@ declare interface MenuRadioItemProps extends NonNativeButtonProps, BaseUICompone
1021
1371
  */
1022
1372
  disabled?: boolean | undefined;
1023
1373
  /**
1024
- * Overrides the text label to use when the item is matched during keyboard text navigation.
1374
+ * Overrides the text used for keyboard text navigation and filtering.
1375
+ * Falls back to the rendered text when not provided.
1025
1376
  */
1026
1377
  label?: string | undefined;
1027
1378
  /**
@@ -1056,7 +1407,7 @@ declare interface MenuRadioItemState {
1056
1407
  *
1057
1408
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1058
1409
  */
1059
- declare const MenuRoot: <Payload>(props: MenuRoot.Props<Payload>) => JSX_2.Element;
1410
+ declare function MenuRoot<Payload>(props: MenuRoot.Props<Payload>): React_2.JSX.Element;
1060
1411
 
1061
1412
  declare namespace MenuRoot {
1062
1413
  type State = MenuRootState;
@@ -1064,6 +1415,8 @@ declare namespace MenuRoot {
1064
1415
  type Actions = MenuRootActions;
1065
1416
  type ChangeEventReason = MenuRootChangeEventReason_2;
1066
1417
  type ChangeEventDetails = MenuRootChangeEventDetails;
1418
+ type HighlightEventReason = MenuRootHighlightEventReason;
1419
+ type HighlightEventDetails = MenuRootHighlightEventDetails;
1067
1420
  type Orientation = MenuRootOrientation;
1068
1421
  }
1069
1422
 
@@ -1073,7 +1426,8 @@ declare interface MenuRootActions {
1073
1426
  }
1074
1427
 
1075
1428
  declare type MenuRootChangeEventDetails = BaseUIChangeEventDetails<MenuRoot.ChangeEventReason> & {
1076
- preventUnmountOnClose(): void;
1429
+ /** Prevents the popup from unmounting until the `unmount` action is called. */
1430
+ preventUnmountOnClose: () => void;
1077
1431
  };
1078
1432
 
1079
1433
  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;
@@ -1081,10 +1435,30 @@ declare type MenuRootChangeEventReason_2 = typeof REASONS.triggerHover | typeof
1081
1435
  declare interface MenuRootContext<Payload = unknown> {
1082
1436
  store: MenuStore<Payload>;
1083
1437
  parent: MenuParent;
1438
+ orientation: MenuRoot.Orientation;
1439
+ loopFocus: boolean;
1440
+ /** Whether arrow keys can step from either end of the list back to a virtual focus owner. */
1441
+ allowEscape: boolean;
1442
+ defaultFloatingId: string | undefined;
1443
+ /** Records the id the popup rendered with, when it differs from `defaultFloatingId`. */
1444
+ setRenderedFloatingId: React_2.Dispatch<React_2.SetStateAction<string | undefined>>;
1445
+ virtualFocus: boolean;
1446
+ parentVirtualFocus: boolean;
1447
+ /** Re-emits `onItemHighlighted` after the item registry settles. */
1448
+ syncHighlightedItem: () => void;
1084
1449
  }
1085
1450
 
1086
1451
  declare const MenuRootContext: React_2.Context<MenuRootContext<unknown> | undefined>;
1087
1452
 
1453
+ declare type MenuRootHighlightEventDetails = BaseUIHighlightEventDetails<MenuRoot.HighlightEventReason, {
1454
+ /**
1455
+ * The highlighted item's `label` prop, or its text content when the prop is not set.
1456
+ */
1457
+ label: string | undefined;
1458
+ }>;
1459
+
1460
+ declare type MenuRootHighlightEventReason = typeof REASONS.keyboard | typeof REASONS.pointer | typeof REASONS.none;
1461
+
1088
1462
  declare type MenuRootOrientation = 'horizontal' | 'vertical';
1089
1463
 
1090
1464
  declare interface MenuRootProps<Payload = unknown> {
@@ -1111,6 +1485,10 @@ declare interface MenuRootProps<Payload = unknown> {
1111
1485
  * Determines if the menu enters a modal state when open.
1112
1486
  * - `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.
1113
1487
  * - `false`: user interaction with the rest of the document is allowed.
1488
+ *
1489
+ * 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.
1490
+ *
1491
+ * Nested menus ignore this prop, and menus opened by hover are never modal.
1114
1492
  * @default true
1115
1493
  */
1116
1494
  modal?: boolean | undefined;
@@ -1119,9 +1497,21 @@ declare interface MenuRootProps<Payload = unknown> {
1119
1497
  */
1120
1498
  onOpenChange?: ((open: boolean, eventDetails: MenuRoot.ChangeEventDetails) => void) | undefined;
1121
1499
  /**
1122
- * Event handler called after any animations complete when the menu is closed.
1500
+ * Event handler called after any animations complete when the menu is opened or closed.
1123
1501
  */
1124
1502
  onOpenChangeComplete?: ((open: boolean) => void) | undefined;
1503
+ /**
1504
+ * Callback fired when an item is highlighted or unhighlighted.
1505
+ * Receives the highlighted item element (or `undefined` if no item is highlighted) and details
1506
+ * containing the reason for the change, the event, and the item's text label.
1507
+ * The `reason` can be:
1508
+ * - `'keyboard'`: the highlight changed due to keyboard navigation.
1509
+ * - `'pointer'`: the highlight changed due to pointer hovering. The event may be a `MouseEvent`
1510
+ * rather than a `PointerEvent`.
1511
+ * - `'none'`: the highlight changed for another reason, such as automatic highlighting while
1512
+ * filtering, the item list changing, or the popup opening or closing.
1513
+ */
1514
+ onItemHighlighted?: ((highlightedItem: HTMLElement | undefined, eventDetails: MenuRoot.HighlightEventDetails) => void) | undefined;
1125
1515
  /**
1126
1516
  * Whether the menu is currently open.
1127
1517
  */
@@ -1145,21 +1535,21 @@ declare interface MenuRootProps<Payload = unknown> {
1145
1535
  closeParentOnEsc?: boolean | undefined;
1146
1536
  /**
1147
1537
  * A ref to imperative actions.
1148
- * - `unmount`: When specified, the menu will not be unmounted when closed.
1149
- * Instead, the `unmount` function must be called to unmount the menu manually.
1150
- * Useful when the menu's animation is controlled by an external library.
1151
- * - `close`: When specified, the menu can be closed imperatively.
1538
+ * - `unmount`: Ends the closing phase of the menu after an externally controlled closing animation finishes.
1539
+ * Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the menu completes closing on its own.
1540
+ * Whether it leaves the DOM is decided by `keepMounted` on the portal.
1541
+ * - `close`: Closes the menu imperatively when called.
1152
1542
  */
1153
1543
  actionsRef?: React_2.RefObject<MenuRoot.Actions | null> | undefined;
1154
1544
  /**
1155
- * ID of the trigger that the popover is associated with.
1156
- * This is useful in conjunction with the `open` prop to create a controlled popover.
1157
- * There's no need to specify this prop when the popover is uncontrolled (that is, when the `open` prop is not set).
1545
+ * ID of the trigger that the menu is associated with.
1546
+ * This is useful in conjunction with the `open` prop to create a controlled menu.
1547
+ * There's no need to specify this prop when the menu is uncontrolled (that is, when the `open` prop is not set).
1158
1548
  */
1159
1549
  triggerId?: string | null | undefined;
1160
1550
  /**
1161
- * ID of the trigger that the popover is associated with.
1162
- * This is useful in conjunction with the `defaultOpen` prop to create an initially open popover.
1551
+ * ID of the trigger that the menu is associated with.
1552
+ * This is useful in conjunction with the `defaultOpen` prop to create an initially open menu.
1163
1553
  */
1164
1554
  defaultTriggerId?: string | null | undefined;
1165
1555
  /**
@@ -1168,7 +1558,7 @@ declare interface MenuRootProps<Payload = unknown> {
1168
1558
  */
1169
1559
  handle?: MenuHandle<Payload> | undefined;
1170
1560
  /**
1171
- * The content of the popover.
1561
+ * The content of the menu.
1172
1562
  * This can be a regular React node or a render function that receives the `payload` of the active trigger.
1173
1563
  */
1174
1564
  children?: React_2.ReactNode | PayloadChildRenderFunction<Payload>;
@@ -1176,11 +1566,18 @@ declare interface MenuRootProps<Payload = unknown> {
1176
1566
 
1177
1567
  declare interface MenuRootState {}
1178
1568
 
1179
- declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, typeof selectors_2> {
1180
- constructor(initialState?: Partial<State<Payload>>);
1569
+ declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, Selectors> {
1570
+ constructor(initialState?: Partial<State<Payload>>, floatingId?: string | undefined, nested?: boolean);
1571
+ /**
1572
+ * Propagates changes of the parent menu's shared tree state to this store's subscribers.
1573
+ * The owning `Menu.Root` calls it from an effect so the parent store subscription is released
1574
+ * when the submenu unmounts.
1575
+ * @returns A function that removes the parent store subscription.
1576
+ */
1577
+ subscribeToParentMenu(): (() => void) | undefined;
1181
1578
  setOpen(open: boolean, eventDetails: Omit<MenuRoot.ChangeEventDetails, 'preventUnmountOnClose'>): void;
1182
- static useStore<Payload>(externalStore: MenuStore<Payload> | undefined, initialState: Partial<State<Payload>>): MenuStore<Payload>;
1183
- private unsubscribeParentListener;
1579
+ setActiveIndex(activeIndex: number | null, reason: MenuRoot.HighlightEventReason, event?: Event | undefined): void;
1580
+ highlightItem(element: Element | null, reason: MenuRoot.HighlightEventReason, event?: Event | undefined): void;
1184
1581
  }
1185
1582
 
1186
1583
  /**
@@ -1189,7 +1586,7 @@ declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Co
1189
1586
  *
1190
1587
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1191
1588
  */
1192
- declare function MenuSubmenuRoot(props: MenuSubmenuRoot.Props): JSX_2.Element;
1589
+ declare function MenuSubmenuRoot(props: MenuSubmenuRoot.Props): React_2.JSX.Element;
1193
1590
 
1194
1591
  declare namespace MenuSubmenuRoot {
1195
1592
  type Props = MenuSubmenuRootProps;
@@ -1202,7 +1599,7 @@ declare type MenuSubmenuRootChangeEventDetails = MenuRoot.ChangeEventDetails;
1202
1599
 
1203
1600
  declare type MenuSubmenuRootChangeEventReason = MenuRoot.ChangeEventReason;
1204
1601
 
1205
- declare interface MenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'openOnHover' | 'onOpenChange'> {
1602
+ declare interface MenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'openOnHover' | 'onOpenChange' | 'handle' | 'triggerId' | 'defaultTriggerId' | 'children'> {
1206
1603
  /**
1207
1604
  * Event handler called when the menu is opened or closed.
1208
1605
  */
@@ -1213,6 +1610,10 @@ declare interface MenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'o
1213
1610
  * @default false
1214
1611
  */
1215
1612
  closeParentOnEsc?: boolean | undefined;
1613
+ /**
1614
+ * The content of the submenu.
1615
+ */
1616
+ children?: React_2.ReactNode;
1216
1617
  }
1217
1618
 
1218
1619
  declare interface MenuSubmenuRootState {}
@@ -1233,7 +1634,8 @@ declare namespace MenuSubmenuTrigger {
1233
1634
  declare interface MenuSubmenuTriggerProps extends NonNativeButtonProps, BaseUIComponentProps<'div', MenuSubmenuTriggerState> {
1234
1635
  onClick?: BaseUIComponentProps<'div', MenuSubmenuTriggerState>['onClick'] | undefined;
1235
1636
  /**
1236
- * Overrides the text label to use when the item is matched during keyboard text navigation.
1637
+ * Overrides the text used for keyboard text navigation and filtering.
1638
+ * Falls back to the rendered text when not provided.
1237
1639
  */
1238
1640
  label?: string | undefined;
1239
1641
  /**
@@ -1262,6 +1664,7 @@ declare interface MenuSubmenuTriggerProps extends NonNativeButtonProps, BaseUICo
1262
1664
  closeDelay?: number | undefined;
1263
1665
  /**
1264
1666
  * Whether the menu should also open when the trigger is hovered.
1667
+ * @default true
1265
1668
  */
1266
1669
  openOnHover?: boolean | undefined;
1267
1670
  }
@@ -1336,7 +1739,7 @@ declare interface MenuTriggerProps<Payload = unknown> extends NativeButtonProps,
1336
1739
 
1337
1740
  declare interface MenuTriggerState {
1338
1741
  /**
1339
- * Whether the menu is currently open.
1742
+ * Whether the menu is currently open and was opened by this trigger.
1340
1743
  */
1341
1744
  open: boolean;
1342
1745
  /**
@@ -1353,29 +1756,41 @@ declare interface MenuTriggerState {
1353
1756
  *
1354
1757
  * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1355
1758
  */
1356
- declare const MenuViewport: React_2.ForwardRefExoticComponent<Omit<MenuViewport.Props, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1759
+ declare const MenuViewport: React_2.ForwardRefExoticComponent<Omit<MenuViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1357
1760
 
1358
1761
  declare namespace MenuViewport {
1359
- interface Props extends BaseUIComponentProps<'div', State> {
1360
- /**
1361
- * The content to render inside the transition container.
1362
- */
1363
- children?: React_2.ReactNode;
1364
- }
1365
- interface State {
1366
- activationDirection: string | undefined;
1367
- /**
1368
- * Whether the viewport is currently transitioning between contents.
1369
- */
1370
- transitioning: boolean;
1371
- /**
1372
- * Present if animations should be instant.
1373
- */
1374
- instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
1375
- }
1762
+ type Props = MenuViewportProps;
1763
+ type State = MenuViewportState;
1764
+ }
1765
+
1766
+ declare interface MenuViewportProps extends BaseUIComponentProps<'div', MenuViewportState> {
1767
+ /**
1768
+ * The content to render inside the transition container.
1769
+ */
1770
+ children?: React_2.ReactNode;
1771
+ }
1772
+
1773
+ declare interface MenuViewportState {
1774
+ /**
1775
+ * The activation direction of the transitioned content.
1776
+ */
1777
+ activationDirection: string | undefined;
1778
+ /**
1779
+ * Whether the viewport is currently transitioning between contents.
1780
+ */
1781
+ transitioning: boolean;
1782
+ /**
1783
+ * Present if animations should be instant.
1784
+ */
1785
+ instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
1376
1786
  }
1377
1787
 
1378
- declare const missing: "missing";
1788
+ declare const missing: 'missing';
1789
+
1790
+ /**
1791
+ * Present when the corresponding menubar is modal.
1792
+ */
1793
+ declare const modal = "data-modal";
1379
1794
 
1380
1795
  declare type NarrowedElement<T> = T extends Element ? T : Element;
1381
1796
 
@@ -1389,7 +1804,7 @@ declare interface NativeButtonProps {
1389
1804
  nativeButton?: boolean | undefined;
1390
1805
  }
1391
1806
 
1392
- declare const none: "none";
1807
+ declare const none: 'none';
1393
1808
 
1394
1809
  declare interface NonNativeButtonProps {
1395
1810
  /**
@@ -1416,13 +1831,40 @@ declare type OffsetFunction = (data: {
1416
1831
 
1417
1832
  declare type Orientation = 'horizontal' | 'vertical';
1418
1833
 
1419
- declare const outsidePress: "outside-press";
1834
+ /**
1835
+ * Determines the orientation of the menubar.
1836
+ * @type {'horizontal' | 'vertical'}
1837
+ */
1838
+ declare const orientation_2 = "data-orientation";
1839
+
1840
+ declare const outsidePress: 'outside-press';
1420
1841
 
1421
1842
  declare type PayloadChildRenderFunction<Payload> = (arg: {
1422
1843
  payload: Payload | undefined;
1423
1844
  }) => React_2.ReactNode;
1424
1845
 
1425
- declare const pointer: "pointer";
1846
+ declare const pointer: 'pointer';
1847
+
1848
+ declare const popupClose: 'popup-close';
1849
+
1850
+ /**
1851
+ * Store shape required by `BasePopupHandle.openByTrigger`/`closePopup` to drive open/close state.
1852
+ * Only the root-owned `Store` needs this — the `HandleStore` view exposed to detached triggers may
1853
+ * omit `setOpen` entirely (as Dialog and PreviewCard's do) since it is never called while detached.
1854
+ */
1855
+ declare interface PopupHandleStoreWithOpen extends PopupHandleStoreWithTriggers {
1856
+ setOpen(open: boolean, eventDetails: BaseUIChangeEventDetails<typeof REASONS.imperativeAction>): void;
1857
+ }
1858
+
1859
+ /**
1860
+ * Store shape holding a trigger registry, required by `BasePopupHandle.openByTrigger` to resolve a
1861
+ * trigger element by id on both the attached root's store and the fallback store.
1862
+ */
1863
+ declare interface PopupHandleStoreWithTriggers {
1864
+ readonly context: {
1865
+ readonly triggerElements: PopupTriggerMap;
1866
+ };
1867
+ }
1426
1868
 
1427
1869
  declare type PopupStoreContext<ChangeEventDetails> = {
1428
1870
  /**
@@ -1487,6 +1929,13 @@ declare type PopupStoreState<Payload> = {
1487
1929
  * The currently active trigger DOM element.
1488
1930
  */
1489
1931
  activeTriggerElement: Element | null;
1932
+ /**
1933
+ * Whether the popup is open because of a request that deliberately carried no trigger, such as a
1934
+ * handle's `open(null)` or `openWithPayload()`. While set, a lone registered trigger is not
1935
+ * implicitly associated with the popup, so its trigger-owned state (such as `payload`) is not
1936
+ * forwarded. Reset by the Root once the popup is effectively closed.
1937
+ */
1938
+ openedWithoutTrigger: boolean;
1490
1939
  /**
1491
1940
  * ID of the trigger (external prop).
1492
1941
  */
@@ -1515,12 +1964,12 @@ declare type PopupStoreState<Payload> = {
1515
1964
 
1516
1965
  /**
1517
1966
  * Data structure to keep track of popup trigger elements by their IDs.
1518
- * Uses both a set of Elements and a map of IDs to Elements for efficient lookups.
1967
+ *
1968
+ * Element lookups iterate the id map rather than maintaining a parallel Set. Registration is O(1),
1969
+ * while `hasElement` and `hasMatchingElement` are linear in the number of triggers.
1519
1970
  */
1520
1971
  declare class PopupTriggerMap {
1521
- private elementsSet;
1522
1972
  private idMap;
1523
- constructor();
1524
1973
  /**
1525
1974
  * Adds a trigger element with the given ID.
1526
1975
  *
@@ -1557,6 +2006,15 @@ declare class PopupTriggerMap {
1557
2006
  get size(): number;
1558
2007
  }
1559
2008
 
2009
+ /**
2010
+ * Store members a detached handle-backed trigger reads or invokes for trigger registration and data
2011
+ * forwarding. `set`/`update` are included only for trigger-count and trigger-data bookkeeping; on a
2012
+ * detached (inert) store they are intentionally no-ops, so a write through them is not guaranteed to
2013
+ * be durable. Component handle-store views Pick these from their concrete store (preserving its
2014
+ * context and selectors) and add any component-specific trigger-invoked members such as `setOpen`.
2015
+ */
2016
+ declare type PopupTriggerStoreKeys = 'context' | 'select' | 'set' | 'state' | 'update' | 'useState';
2017
+
1560
2018
  declare namespace REASONS {
1561
2019
  export {
1562
2020
  none,
@@ -1586,6 +2044,7 @@ declare namespace REASONS {
1586
2044
  drag,
1587
2045
  wheel,
1588
2046
  scrub,
2047
+ popupClose,
1589
2048
  cancelOpen,
1590
2049
  siblingOpen,
1591
2050
  disabled,
@@ -1642,7 +2101,9 @@ declare interface ReasonToEventMap {
1642
2101
 
1643
2102
  declare type ReferenceType = Element | VirtualElement;
1644
2103
 
1645
- declare const scrub: "scrub";
2104
+ declare const scrub: 'scrub';
2105
+
2106
+ declare type Selectors = typeof selectors_2;
1646
2107
 
1647
2108
  declare const selectors: {
1648
2109
  open: (state: FloatingRootState) => boolean;
@@ -1654,25 +2115,6 @@ declare const selectors: {
1654
2115
  };
1655
2116
 
1656
2117
  declare const selectors_2: {
1657
- disabled: (state: State<unknown>) => boolean;
1658
- modal: (state: State<unknown>) => boolean;
1659
- openMethod: (state: State<unknown>) => InteractionType | null;
1660
- allowMouseEnter: (state: State<unknown>) => boolean;
1661
- stickIfOpen: (state: State<unknown>) => boolean;
1662
- parent: (state: State<unknown>) => MenuParent;
1663
- rootId: (state: State<unknown>) => string | undefined;
1664
- activeIndex: (state: State<unknown>) => number | null;
1665
- isActive: (state: State<unknown>, itemIndex: number) => boolean;
1666
- hoverEnabled: (state: State<unknown>) => boolean;
1667
- instantType: (state: State<unknown>) => "group" | "click" | "dismiss" | "trigger-change" | undefined;
1668
- lastOpenChangeReason: (state: State<unknown>) => MenuRootChangeEventReason | null;
1669
- floatingTreeRoot: (state: State<unknown>) => FloatingTreeStore;
1670
- floatingNodeId: (state: State<unknown>) => string | undefined;
1671
- floatingParentNodeId: (state: State<unknown>) => string | null;
1672
- itemProps: (state: State<unknown>) => HTMLProps;
1673
- closeDelay: (state: State<unknown>) => number;
1674
- hasViewport: (state: State<unknown>) => boolean;
1675
- keyboardEventRelay: (state: State<unknown>) => React_2.KeyboardEventHandler<any> | undefined;
1676
2118
  open: (state: {
1677
2119
  open: boolean;
1678
2120
  readonly openProp: boolean | undefined;
@@ -1685,6 +2127,7 @@ declare const selectors_2: {
1685
2127
  payload: unknown;
1686
2128
  activeTriggerId: string | null;
1687
2129
  activeTriggerElement: Element | null;
2130
+ openedWithoutTrigger: boolean;
1688
2131
  readonly triggerIdProp: string | null | undefined;
1689
2132
  popupElement: HTMLElement | null;
1690
2133
  positionerElement: HTMLElement | null;
@@ -1704,6 +2147,7 @@ declare const selectors_2: {
1704
2147
  payload: unknown;
1705
2148
  activeTriggerId: string | null;
1706
2149
  activeTriggerElement: Element | null;
2150
+ openedWithoutTrigger: boolean;
1707
2151
  readonly triggerIdProp: string | null | undefined;
1708
2152
  popupElement: HTMLElement | null;
1709
2153
  positionerElement: HTMLElement | null;
@@ -1723,6 +2167,7 @@ declare const selectors_2: {
1723
2167
  payload: unknown;
1724
2168
  activeTriggerId: string | null;
1725
2169
  activeTriggerElement: Element | null;
2170
+ openedWithoutTrigger: boolean;
1726
2171
  readonly triggerIdProp: string | null | undefined;
1727
2172
  popupElement: HTMLElement | null;
1728
2173
  positionerElement: HTMLElement | null;
@@ -1742,6 +2187,7 @@ declare const selectors_2: {
1742
2187
  payload: unknown;
1743
2188
  activeTriggerId: string | null;
1744
2189
  activeTriggerElement: Element | null;
2190
+ openedWithoutTrigger: boolean;
1745
2191
  readonly triggerIdProp: string | null | undefined;
1746
2192
  popupElement: HTMLElement | null;
1747
2193
  positionerElement: HTMLElement | null;
@@ -1761,6 +2207,7 @@ declare const selectors_2: {
1761
2207
  payload: unknown;
1762
2208
  activeTriggerId: string | null;
1763
2209
  activeTriggerElement: Element | null;
2210
+ openedWithoutTrigger: boolean;
1764
2211
  readonly triggerIdProp: string | null | undefined;
1765
2212
  popupElement: HTMLElement | null;
1766
2213
  positionerElement: HTMLElement | null;
@@ -1780,6 +2227,7 @@ declare const selectors_2: {
1780
2227
  payload: unknown;
1781
2228
  activeTriggerId: string | null;
1782
2229
  activeTriggerElement: Element | null;
2230
+ openedWithoutTrigger: boolean;
1783
2231
  readonly triggerIdProp: string | null | undefined;
1784
2232
  popupElement: HTMLElement | null;
1785
2233
  positionerElement: HTMLElement | null;
@@ -1799,6 +2247,7 @@ declare const selectors_2: {
1799
2247
  payload: unknown;
1800
2248
  activeTriggerId: string | null;
1801
2249
  activeTriggerElement: Element | null;
2250
+ openedWithoutTrigger: boolean;
1802
2251
  readonly triggerIdProp: string | null | undefined;
1803
2252
  popupElement: HTMLElement | null;
1804
2253
  positionerElement: HTMLElement | null;
@@ -1818,6 +2267,7 @@ declare const selectors_2: {
1818
2267
  payload: unknown;
1819
2268
  activeTriggerId: string | null;
1820
2269
  activeTriggerElement: Element | null;
2270
+ openedWithoutTrigger: boolean;
1821
2271
  readonly triggerIdProp: string | null | undefined;
1822
2272
  popupElement: HTMLElement | null;
1823
2273
  positionerElement: HTMLElement | null;
@@ -1837,6 +2287,7 @@ declare const selectors_2: {
1837
2287
  payload: unknown;
1838
2288
  activeTriggerId: string | null;
1839
2289
  activeTriggerElement: Element | null;
2290
+ openedWithoutTrigger: boolean;
1840
2291
  readonly triggerIdProp: string | null | undefined;
1841
2292
  popupElement: HTMLElement | null;
1842
2293
  positionerElement: HTMLElement | null;
@@ -1856,6 +2307,7 @@ declare const selectors_2: {
1856
2307
  payload: unknown;
1857
2308
  activeTriggerId: string | null;
1858
2309
  activeTriggerElement: Element | null;
2310
+ openedWithoutTrigger: boolean;
1859
2311
  readonly triggerIdProp: string | null | undefined;
1860
2312
  popupElement: HTMLElement | null;
1861
2313
  positionerElement: HTMLElement | null;
@@ -1875,6 +2327,7 @@ declare const selectors_2: {
1875
2327
  payload: unknown;
1876
2328
  activeTriggerId: string | null;
1877
2329
  activeTriggerElement: Element | null;
2330
+ openedWithoutTrigger: boolean;
1878
2331
  readonly triggerIdProp: string | null | undefined;
1879
2332
  popupElement: HTMLElement | null;
1880
2333
  positionerElement: HTMLElement | null;
@@ -1894,6 +2347,7 @@ declare const selectors_2: {
1894
2347
  payload: unknown;
1895
2348
  activeTriggerId: string | null;
1896
2349
  activeTriggerElement: Element | null;
2350
+ openedWithoutTrigger: boolean;
1897
2351
  readonly triggerIdProp: string | null | undefined;
1898
2352
  popupElement: HTMLElement | null;
1899
2353
  positionerElement: HTMLElement | null;
@@ -1913,6 +2367,7 @@ declare const selectors_2: {
1913
2367
  payload: unknown;
1914
2368
  activeTriggerId: string | null;
1915
2369
  activeTriggerElement: Element | null;
2370
+ openedWithoutTrigger: boolean;
1916
2371
  readonly triggerIdProp: string | null | undefined;
1917
2372
  popupElement: HTMLElement | null;
1918
2373
  positionerElement: HTMLElement | null;
@@ -1932,6 +2387,7 @@ declare const selectors_2: {
1932
2387
  payload: unknown;
1933
2388
  activeTriggerId: string | null;
1934
2389
  activeTriggerElement: Element | null;
2390
+ openedWithoutTrigger: boolean;
1935
2391
  readonly triggerIdProp: string | null | undefined;
1936
2392
  popupElement: HTMLElement | null;
1937
2393
  positionerElement: HTMLElement | null;
@@ -1951,6 +2407,7 @@ declare const selectors_2: {
1951
2407
  payload: unknown;
1952
2408
  activeTriggerId: string | null;
1953
2409
  activeTriggerElement: Element | null;
2410
+ openedWithoutTrigger: boolean;
1954
2411
  readonly triggerIdProp: string | null | undefined;
1955
2412
  popupElement: HTMLElement | null;
1956
2413
  positionerElement: HTMLElement | null;
@@ -1970,6 +2427,7 @@ declare const selectors_2: {
1970
2427
  payload: unknown;
1971
2428
  activeTriggerId: string | null;
1972
2429
  activeTriggerElement: Element | null;
2430
+ openedWithoutTrigger: boolean;
1973
2431
  readonly triggerIdProp: string | null | undefined;
1974
2432
  popupElement: HTMLElement | null;
1975
2433
  positionerElement: HTMLElement | null;
@@ -1989,6 +2447,7 @@ declare const selectors_2: {
1989
2447
  payload: unknown;
1990
2448
  activeTriggerId: string | null;
1991
2449
  activeTriggerElement: Element | null;
2450
+ openedWithoutTrigger: boolean;
1992
2451
  readonly triggerIdProp: string | null | undefined;
1993
2452
  popupElement: HTMLElement | null;
1994
2453
  positionerElement: HTMLElement | null;
@@ -2008,6 +2467,7 @@ declare const selectors_2: {
2008
2467
  payload: unknown;
2009
2468
  activeTriggerId: string | null;
2010
2469
  activeTriggerElement: Element | null;
2470
+ openedWithoutTrigger: boolean;
2011
2471
  readonly triggerIdProp: string | null | undefined;
2012
2472
  popupElement: HTMLElement | null;
2013
2473
  positionerElement: HTMLElement | null;
@@ -2015,6 +2475,33 @@ declare const selectors_2: {
2015
2475
  inactiveTriggerProps: HTMLProps;
2016
2476
  popupProps: HTMLProps;
2017
2477
  }) => HTMLElement | null;
2478
+ disabled: (state: State<unknown>) => boolean;
2479
+ modal: (state: State<unknown>) => boolean;
2480
+ openMethod: (state: State<unknown>) => InteractionType | null;
2481
+ keyboardOpen: (state: State<unknown>) => boolean;
2482
+ allowMouseEnter: (state: State<unknown>) => boolean;
2483
+ highlightItemOnHover: (state: State<unknown>) => boolean;
2484
+ parent: (state: State<unknown>) => MenuParent;
2485
+ rootId: (state: State<unknown>) => string | undefined;
2486
+ activeIndex: (state: State<unknown>) => number | null;
2487
+ listElement: (state: State<unknown>) => HTMLElement | null;
2488
+ /** The trigger's `aria-controls`: the list when one holds the `menu` role, else the popup. */
2489
+ triggerControlsId: (state: State<unknown>, triggerId: string | undefined) => string | undefined;
2490
+ filterTriggerProps: (state: State<unknown>) => HTMLProps;
2491
+ inputProps: (state: State<unknown>) => HTMLProps;
2492
+ webkitAriaSelected: (state: State<unknown>, highlighted: boolean) => true | undefined;
2493
+ highlightedItemId: (state: State<unknown>) => string | undefined;
2494
+ isActive: (state: State<unknown>, itemIndex: number) => boolean;
2495
+ hoverEnabled: (state: State<unknown>) => boolean;
2496
+ instantType: (state: State<unknown>) => "click" | "dismiss" | "group" | "trigger-change" | undefined;
2497
+ lastOpenChangeReason: (state: State<unknown>) => MenuRootChangeEventReason | null;
2498
+ floatingTreeRoot: (state: State<unknown>) => FloatingTreeStore;
2499
+ floatingNodeId: (state: State<unknown>) => string | undefined;
2500
+ floatingParentNodeId: (state: State<unknown>) => string | null;
2501
+ itemProps: (state: State<unknown>) => HTMLProps;
2502
+ closeDelay: (state: State<unknown>) => number;
2503
+ adaptiveOrigin: (state: State<unknown>) => AdaptiveOriginMiddleware | undefined;
2504
+ keyboardEventRelay: (state: State<unknown>) => React_2.KeyboardEventHandler<any> | undefined;
2018
2505
  };
2019
2506
 
2020
2507
  /**
@@ -2045,7 +2532,7 @@ declare interface SeparatorState {
2045
2532
  orientation: Orientation;
2046
2533
  }
2047
2534
 
2048
- declare const siblingOpen: "sibling-open";
2535
+ declare const siblingOpen: 'sibling-open';
2049
2536
 
2050
2537
  declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
2051
2538
 
@@ -2098,14 +2585,29 @@ declare interface SideShiftMode {
2098
2585
 
2099
2586
  declare type State<Payload> = PopupStoreState<Payload> & {
2100
2587
  disabled: boolean;
2101
- modal: boolean;
2588
+ modal: boolean | undefined;
2102
2589
  openMethod: InteractionType | null;
2590
+ /** Whether the popup last opened from the keyboard or an assistive-technology press. */
2591
+ keyboardOpen: boolean;
2103
2592
  allowMouseEnter: boolean;
2593
+ highlightItemOnHover: boolean;
2104
2594
  parent: MenuParent;
2105
2595
  rootId: string | undefined;
2106
2596
  activeIndex: number | null;
2597
+ /** The `Menu.List` element, which takes the `menu` role from the popup when rendered. */
2598
+ listElement: HTMLElement | null;
2599
+ /**
2600
+ * Props a filter root adds to its triggers (dialog semantics and the key relay to the input).
2601
+ * Published by the filter implementation so a plain menu never bundles them.
2602
+ */
2603
+ filterTriggerProps: HTMLProps;
2604
+ /** List navigation props for the element that holds real focus under virtual focus. */
2605
+ inputProps: HTMLProps;
2606
+ /** Whether this menu's filter input has focus. */
2607
+ inputFocused: boolean;
2608
+ /** The element at `activeIndex` once the item list settles. Only virtual focus publishes it. */
2609
+ highlightedItem: HTMLElement | undefined;
2107
2610
  hoverEnabled: boolean;
2108
- stickIfOpen: boolean;
2109
2611
  instantType: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
2110
2612
  openChangeReason: MenuRoot.ChangeEventReason | null;
2111
2613
  floatingTreeRoot: FloatingTreeStore;
@@ -2114,20 +2616,20 @@ declare type State<Payload> = PopupStoreState<Payload> & {
2114
2616
  itemProps: HTMLProps;
2115
2617
  closeDelay: number;
2116
2618
  keyboardEventRelay: ((event: React_2.KeyboardEvent<any>) => void) | undefined;
2117
- hasViewport: boolean;
2619
+ adaptiveOrigin: AdaptiveOriginMiddleware | undefined;
2118
2620
  };
2119
2621
 
2120
- declare const swipe: "swipe";
2622
+ declare const swipe: 'swipe';
2121
2623
 
2122
- declare const trackPress: "track-press";
2624
+ declare const trackPress: 'track-press';
2123
2625
 
2124
2626
  declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
2125
2627
 
2126
- declare const triggerFocus: "trigger-focus";
2628
+ declare const triggerFocus: 'trigger-focus';
2127
2629
 
2128
- declare const triggerHover: "trigger-hover";
2630
+ declare const triggerHover: 'trigger-hover';
2129
2631
 
2130
- declare const triggerPress: "trigger-press";
2632
+ declare const triggerPress: 'trigger-press';
2131
2633
 
2132
2634
  declare interface UseAnchorPositioningSharedParameters {
2133
2635
  /**
@@ -2271,33 +2773,9 @@ declare interface UseAnchorPositioningSharedParameters {
2271
2773
  collisionAvoidance?: CollisionAvoidance | undefined;
2272
2774
  }
2273
2775
 
2274
- declare interface UseFloatingPortalNodeProps {
2275
- ref?: React_2.Ref<HTMLDivElement> | undefined;
2276
- container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
2277
- componentProps?: UseRenderElementComponentProps<any> | undefined;
2278
- elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
2279
- }
2280
-
2281
- declare interface UseRenderElementComponentProps<State> {
2282
- /**
2283
- * The class name to apply to the rendered element.
2284
- * Can be a string or a function that accepts the state and returns a string.
2285
- */
2286
- className?: string | ((state: State) => string | undefined) | undefined;
2287
- /**
2288
- * The render prop or React element to override the default element.
2289
- */
2290
- render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
2291
- /**
2292
- * The style to apply to the rendered element.
2293
- * Can be a style object or a function that accepts the state and returns a style object.
2294
- */
2295
- style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
2296
- }
2297
-
2298
- declare const wheel: "wheel";
2776
+ declare const wheel: 'wheel';
2299
2777
 
2300
- declare const windowResize: "window-resize";
2778
+ declare const windowResize: 'window-resize';
2301
2779
 
2302
2780
  /**
2303
2781
  * Adds a `preventBaseUIHandler` method to all event handlers.