@wix/site-ui 1.29.0 → 1.31.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 (177) hide show
  1. package/dist/1268.js +99 -0
  2. package/dist/1279.js +7 -0
  3. package/dist/1457.js +10 -0
  4. package/dist/1477.js +106 -0
  5. package/dist/1500.js +111 -0
  6. package/dist/167.js +6 -0
  7. package/dist/2274.js +34 -0
  8. package/dist/2287.js +17 -0
  9. package/dist/2418.js +31 -0
  10. package/dist/2801.js +20 -0
  11. package/dist/285.js +86 -0
  12. package/dist/2861.js +6 -0
  13. package/dist/3020.js +7 -0
  14. package/dist/3021.js +72 -0
  15. package/dist/3056.js +229 -0
  16. package/dist/3140.js +4 -0
  17. package/dist/3248.js +307 -0
  18. package/dist/3296.js +4 -0
  19. package/dist/3319.js +400 -0
  20. package/dist/3395.js +4 -0
  21. package/dist/3485.js +854 -0
  22. package/dist/353.js +14 -0
  23. package/dist/3670.js +418 -0
  24. package/dist/3829.js +113 -0
  25. package/dist/4026.js +12 -0
  26. package/dist/4143.js +46 -0
  27. package/dist/42.js +32 -0
  28. package/dist/4281.js +30 -0
  29. package/dist/4346.js +2 -0
  30. package/dist/4388.js +418 -0
  31. package/dist/4490.js +32 -0
  32. package/dist/4495.js +9 -0
  33. package/dist/4549.js +24 -0
  34. package/dist/4586.js +41 -0
  35. package/dist/4586.js.LICENSE.txt +19 -0
  36. package/dist/4707.js +19 -0
  37. package/dist/4723.js +7 -0
  38. package/dist/4745.js +7 -0
  39. package/dist/4768.js +35 -0
  40. package/dist/4922.js +15 -0
  41. package/dist/5036.js +17 -0
  42. package/dist/5085.js +20 -0
  43. package/dist/5299.js +597 -0
  44. package/dist/5659.js +4 -0
  45. package/dist/5778.js +10 -0
  46. package/dist/5864.js +86 -0
  47. package/dist/5992.js +913 -0
  48. package/dist/5992.js.LICENSE.txt +19 -0
  49. package/dist/6003.js +10 -0
  50. package/dist/6046.js +29 -0
  51. package/dist/6089.js +2355 -0
  52. package/dist/6107.js +10 -0
  53. package/dist/6247.js +20 -0
  54. package/dist/6270.js +487 -0
  55. package/dist/6329.js +32 -0
  56. package/dist/6330.js +30 -0
  57. package/dist/6499.js +7 -0
  58. package/dist/6535.js +71 -0
  59. package/dist/6588.js +382 -0
  60. package/dist/6706.js +16 -0
  61. package/dist/6825.js +7 -0
  62. package/dist/6882.js +1562 -0
  63. package/dist/6914.js +30 -0
  64. package/dist/7021.js +13 -0
  65. package/dist/7366.js +83 -0
  66. package/dist/7373.js +25 -0
  67. package/dist/7541.js +25 -0
  68. package/dist/7564.js +10 -0
  69. package/dist/7642.js +20 -0
  70. package/dist/7725.js +10 -0
  71. package/dist/7871.js +38 -0
  72. package/dist/8052.js +352 -0
  73. package/dist/8106.js +238 -0
  74. package/dist/8171.js +346 -0
  75. package/dist/8225.js +21 -0
  76. package/dist/8272.js +333 -0
  77. package/dist/8527.js +58 -0
  78. package/dist/8724.js +10 -0
  79. package/dist/8750.js +1920 -0
  80. package/dist/8758.js +43 -0
  81. package/dist/880.js +149 -0
  82. package/dist/8935.js +8 -0
  83. package/dist/8960.js +22 -0
  84. package/dist/8971.js +40 -0
  85. package/dist/8979.js +10 -0
  86. package/dist/8996.js +71 -0
  87. package/dist/904.js +121 -0
  88. package/dist/9048.js +52 -0
  89. package/dist/9087.js +256 -0
  90. package/dist/9189.js +158 -0
  91. package/dist/9255.js +136 -0
  92. package/dist/9352.js +148 -0
  93. package/dist/951.js +22 -0
  94. package/dist/9635.js +22 -0
  95. package/dist/9829.js +4 -0
  96. package/dist/9863.js +8 -0
  97. package/dist/Accordion/index.d.ts +569 -12
  98. package/dist/Accordion/index.js +423 -8
  99. package/dist/AlertDialog/index.d.ts +1417 -18
  100. package/dist/AlertDialog/index.js +34 -14
  101. package/dist/Autocomplete/index.d.ts +1861 -38
  102. package/dist/Autocomplete/index.js +98 -24
  103. package/dist/Avatar/index.d.ts +129 -7
  104. package/dist/Avatar/index.js +149 -6
  105. package/dist/Badge/index.css +44 -0
  106. package/dist/Badge/index.d.ts +22 -0
  107. package/dist/Badge/index.js +23 -0
  108. package/dist/Breadcrumbs/index.d.ts +960 -7
  109. package/dist/Breadcrumbs/index.js +5 -5
  110. package/dist/Button/index.d.ts +88 -6
  111. package/dist/Button/index.js +27 -3
  112. package/dist/Checkbox/index.d.ts +425 -5
  113. package/dist/Checkbox/index.js +45 -5
  114. package/dist/CheckboxGroup/index.d.ts +318 -3
  115. package/dist/CheckboxGroup/index.js +166 -3
  116. package/dist/Collapsible/index.d.ts +377 -7
  117. package/dist/Collapsible/index.js +160 -6
  118. package/dist/Combobox/index.d.ts +1984 -48
  119. package/dist/Combobox/index.js +352 -29
  120. package/dist/ContextMenu/index.d.ts +2340 -36
  121. package/dist/ContextMenu/index.js +197 -22
  122. package/dist/Dialog/index.d.ts +1355 -18
  123. package/dist/Dialog/index.js +16 -14
  124. package/dist/Drawer/index.d.ts +1653 -18
  125. package/dist/Drawer/index.js +2797 -20
  126. package/dist/Field/index.d.ts +655 -15
  127. package/dist/Field/index.js +677 -10
  128. package/dist/Fieldset/index.d.ts +94 -5
  129. package/dist/Fieldset/index.js +68 -5
  130. package/dist/Form/index.d.ts +331 -2
  131. package/dist/Form/index.js +106 -3
  132. package/dist/Input/index.d.ts +692 -3
  133. package/dist/Input/index.js +10 -3
  134. package/dist/Menu/index.d.ts +2301 -36
  135. package/dist/Menu/index.js +365 -26
  136. package/dist/Menubar/index.d.ts +2301 -3
  137. package/dist/Menubar/index.js +105 -3
  138. package/dist/Meter/index.d.ts +175 -11
  139. package/dist/Meter/index.js +129 -9
  140. package/dist/NavigationMenu/index.d.ts +978 -28
  141. package/dist/NavigationMenu/index.js +1034 -17
  142. package/dist/NumberField/index.d.ts +612 -15
  143. package/dist/NumberField/index.js +1409 -11
  144. package/dist/Popover/index.d.ts +1655 -20
  145. package/dist/Popover/index.js +792 -17
  146. package/dist/PreviewCard/index.d.ts +1523 -14
  147. package/dist/PreviewCard/index.js +679 -14
  148. package/dist/Progress/index.d.ts +183 -11
  149. package/dist/Progress/index.js +181 -9
  150. package/dist/Radio/index.d.ts +185 -6
  151. package/dist/Radio/index.js +253 -6
  152. package/dist/RadioGroup/index.d.ts +341 -2
  153. package/dist/RadioGroup/index.js +154 -3
  154. package/dist/ScrollArea/index.d.ts +265 -13
  155. package/dist/ScrollArea/index.js +892 -10
  156. package/dist/Select/index.d.ts +1493 -38
  157. package/dist/Select/index.js +1824 -23
  158. package/dist/Separator/index.d.ts +80 -6
  159. package/dist/Separator/index.js +3 -3
  160. package/dist/Slider/index.d.ts +678 -16
  161. package/dist/Slider/index.js +1199 -11
  162. package/dist/Switch/index.d.ts +393 -5
  163. package/dist/Switch/index.js +208 -6
  164. package/dist/Tabs/index.d.ts +523 -12
  165. package/dist/Tabs/index.js +685 -9
  166. package/dist/Toggle/index.d.ts +305 -2
  167. package/dist/Toggle/index.js +76 -3
  168. package/dist/ToggleGroup/index.d.ts +316 -2
  169. package/dist/ToggleGroup/index.js +102 -3
  170. package/dist/Toolbar/index.d.ts +282 -13
  171. package/dist/Toolbar/index.js +230 -9
  172. package/dist/Tooltip/index.d.ts +1572 -14
  173. package/dist/Tooltip/index.js +965 -14
  174. package/dist/index.d.ts +12758 -646
  175. package/dist/index.js +1 -0
  176. package/dist/rslib-runtime.js +18 -0
  177. package/package.json +3 -3
@@ -1,11 +1,2309 @@
1
- import { MenubarProps } from '@base-ui/react/menubar';
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';
3
+ import type { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
4
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
5
+ import { MenubarProps as MenubarProps_2 } from '@base-ui/react/menubar';
6
+ import { MenuRootChangeEventReason } from '../index.js';
7
+ import { Padding } from '@floating-ui/react-dom';
2
8
  import * as React_2 from 'react';
9
+ import { ReactStore } from '@base-ui/utils/store';
10
+ import { Rect } from '@floating-ui/utils';
11
+ import { TransitionStatus as TransitionStatus_2 } from '../../internals/useTransitionStatus.js';
12
+ import type { UseFloatingReturn } from '@floating-ui/react-dom';
13
+ import { VirtualElement } from '@floating-ui/react-dom';
3
14
 
4
- export declare const Menubar: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<MenubarProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
15
+ declare type Align = 'start' | 'center' | 'end';
16
+
17
+ declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
18
+ /**
19
+ * The reason for the event.
20
+ */
21
+ reason: Reason;
22
+ /**
23
+ * The native event associated with the custom event.
24
+ */
25
+ event: ReasonToEvent<Reason>;
26
+ /**
27
+ * Cancels Base UI from handling the event.
28
+ */
29
+ cancel: () => void;
30
+ /**
31
+ * Allows the event to propagate in cases where Base UI will stop the propagation.
32
+ */
33
+ allowPropagation: () => void;
34
+ /**
35
+ * Indicates whether the event has been canceled.
36
+ */
37
+ isCanceled: boolean;
38
+ /**
39
+ * Indicates whether the event is allowed to propagate.
40
+ */
41
+ isPropagationAllowed: boolean;
42
+ /**
43
+ * The element that triggered the event, if applicable.
44
+ */
45
+ trigger: Element | undefined;
46
+ } & CustomProperties;
47
+
48
+ /**
49
+ * Details of custom change events emitted by Base UI components.
50
+ */
51
+ declare type BaseUIChangeEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIChangeEventDetail<Reason, CustomProperties> & {} : never;
52
+
53
+ /**
54
+ * Props shared by all Base UI components.
55
+ * Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
56
+ */
57
+ declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
58
+ /**
59
+ * CSS class applied to the element, or a function that
60
+ * returns a class based on the component's state.
61
+ */
62
+ className?: string | ((state: State) => string | undefined) | undefined;
63
+ /**
64
+ * Allows you to replace the component's HTML element
65
+ * with a different tag, or compose it with another component.
66
+ *
67
+ * Accepts a `ReactElement` or a function that returns the element to render.
68
+ */
69
+ render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
70
+ /**
71
+ * Style applied to the element, or a function that
72
+ * returns a style object based on the component's state.
73
+ */
74
+ style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
75
+ };
76
+
77
+ declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
78
+ preventBaseUIHandler: () => void;
79
+ readonly baseUIHandlerPrevented?: boolean | undefined;
80
+ };
81
+
82
+ declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
83
+
84
+ declare const cancelOpen: "cancel-open";
85
+
86
+ declare const chipRemovePress: "chip-remove-press";
87
+
88
+ declare const clearPress: "clear-press";
89
+
90
+ declare const closePress: "close-press";
91
+
92
+ declare const closeWatcher: "close-watcher";
93
+
94
+ declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
95
+
96
+ /**
97
+ * Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
98
+ *
99
+ * @template Props Props to be spread on the rendered element.
100
+ * @template State Component's internal state.
101
+ */
102
+ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
103
+
104
+ declare type Context = PopupStoreContext<MenuRoot.ChangeEventDetails> & {
105
+ readonly positionerRef: React_2.RefObject<HTMLElement | null>;
106
+ readonly popupRef: React_2.RefObject<HTMLElement | null>;
107
+ readonly typingRef: React_2.RefObject<boolean>;
108
+ readonly itemDomElements: React_2.RefObject<(HTMLElement | null)[]>;
109
+ readonly itemLabels: React_2.RefObject<(string | null)[]>;
110
+ allowMouseUpTriggerRef: React_2.RefObject<boolean>;
111
+ readonly triggerFocusTargetRef: React_2.RefObject<HTMLElement | null>;
112
+ readonly beforeContentFocusGuardRef: React_2.RefObject<HTMLElement | null>;
113
+ };
114
+
115
+ declare interface ContextData {
116
+ openEvent?: Event | undefined;
117
+ floatingContext?: FloatingContext | undefined;
118
+ [key: string]: any;
119
+ }
120
+
121
+ /**
122
+ * A component that creates a context menu activated by right clicking or long pressing.
123
+ * Doesn't render its own HTML element.
124
+ *
125
+ * Documentation: [Base UI Context Menu](https://base-ui.com/react/components/context-menu)
126
+ */
127
+ declare function ContextMenuRoot(props: ContextMenuRoot.Props): JSX_2.Element;
128
+
129
+ declare namespace ContextMenuRoot {
130
+ type State = ContextMenuRootState;
131
+ type Props = ContextMenuRootProps;
132
+ type Actions = ContextMenuRootActions;
133
+ type ChangeEventReason = ContextMenuRootChangeEventReason;
134
+ type ChangeEventDetails = ContextMenuRootChangeEventDetails;
135
+ }
136
+
137
+ declare type ContextMenuRootActions = MenuRoot.Actions;
138
+
139
+ declare type ContextMenuRootChangeEventDetails = BaseUIChangeEventDetails<ContextMenuRoot.ChangeEventReason>;
140
+
141
+ declare type ContextMenuRootChangeEventReason = MenuRoot.ChangeEventReason;
142
+
143
+ declare interface ContextMenuRootContext {
144
+ anchor: {
145
+ getBoundingClientRect: () => DOMRect;
146
+ };
147
+ setAnchor: React_2.Dispatch<React_2.SetStateAction<ContextMenuRootContext['anchor']>>;
148
+ backdropRef: React_2.RefObject<HTMLDivElement | null>;
149
+ internalBackdropRef: React_2.RefObject<HTMLDivElement | null>;
150
+ actionsRef: React_2.RefObject<{
151
+ setOpen: (nextOpen: boolean, eventDetails: ContextMenuRoot.ChangeEventDetails) => void;
152
+ } | null>;
153
+ positionerRef: React_2.RefObject<HTMLElement | null>;
154
+ allowMouseUpTriggerRef: React_2.RefObject<boolean>;
155
+ initialCursorPointRef: React_2.RefObject<{
156
+ x: number;
157
+ y: number;
158
+ } | null>;
159
+ rootId: string | undefined;
160
+ }
161
+
162
+ declare const ContextMenuRootContext: React_2.Context<ContextMenuRootContext | undefined>;
163
+
164
+ declare interface ContextMenuRootProps extends Omit<Menu.Root.Props, 'modal' | 'openOnHover' | 'delay' | 'closeDelay' | 'onOpenChange'> {
165
+ /**
166
+ * Event handler called when the menu is opened or closed.
167
+ */
168
+ onOpenChange?: ((open: boolean, eventDetails: ContextMenuRoot.ChangeEventDetails) => void) | undefined;
169
+ }
170
+
171
+ declare interface ContextMenuRootState {}
172
+
173
+ /**
174
+ * Creates a new handle to connect a Menu.Root with detached Menu.Trigger components.
175
+ */
176
+ declare function createMenuHandle<Payload>(): MenuHandle<Payload>;
177
+
178
+ declare const decrementPress: "decrement-press";
179
+
180
+ declare const disabled: "disabled";
181
+
182
+ declare const drag: "drag";
183
+
184
+ declare const escapeKey: "escape-key";
185
+
186
+ declare interface ExtendedElements {
187
+ reference: ReferenceType | null;
188
+ floating: HTMLElement | null;
189
+ domReference: NarrowedElement<ReferenceType> | null;
190
+ }
191
+
192
+ declare interface ExtendedRefs {
193
+ reference: React_2.RefObject<ReferenceType | null>;
194
+ floating: React_2.RefObject<HTMLElement | null>;
195
+ domReference: React_2.RefObject<NarrowedElement<ReferenceType> | null>;
196
+ setReference(node: ReferenceType | null): void;
197
+ setFloating(node: HTMLElement | null): void;
198
+ setPositionReference(node: ReferenceType | null): void;
199
+ }
200
+
201
+ declare type FloatingContext = Omit<UseFloatingReturn<ReferenceType>, 'refs' | 'elements'> & {
202
+ open: boolean;
203
+ onOpenChange(open: boolean, eventDetails: BaseUIChangeEventDetails<string>): void;
204
+ events: FloatingEvents;
205
+ dataRef: React_2.RefObject<ContextData>;
206
+ nodeId: string | undefined;
207
+ floatingId: string | undefined;
208
+ refs: ExtendedRefs;
209
+ elements: ExtendedElements;
210
+ rootStore: FloatingRootContext;
211
+ };
212
+
213
+ declare interface FloatingEvents {
214
+ emit<T extends string>(event: T, data?: any): void;
215
+ on(event: string, handler: (data: any) => void): void;
216
+ off(event: string, handler: (data: any) => void): void;
217
+ }
218
+
219
+ declare interface FloatingNodeType {
220
+ id: string | undefined;
221
+ parentId: string | null;
222
+ context?: FloatingContext | undefined;
223
+ }
224
+
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
+ declare type FloatingRootContext = FloatingRootStore;
251
+
252
+ declare interface FloatingRootState {
253
+ open: boolean;
254
+ transitionStatus: TransitionStatus | undefined;
255
+ domReferenceElement: Element | null;
256
+ referenceElement: ReferenceType | null;
257
+ floatingElement: HTMLElement | null;
258
+ positionReference: ReferenceType | null;
259
+ /**
260
+ * The ID of the floating element.
261
+ */
262
+ floatingId: string | undefined;
263
+ }
264
+
265
+ declare class FloatingRootStore extends ReactStore<Readonly<FloatingRootState>, FloatingRootStoreContext, typeof selectors> {
266
+ private readonly syncOnly;
267
+ constructor(options: FloatingRootStoreOptions);
268
+ /**
269
+ * Syncs the event used by hover logic to distinguish hover-open from click-like interaction.
270
+ */
271
+ syncOpenEvent: (newOpen: boolean, event: Event | undefined) => void;
272
+ /**
273
+ * Runs the root-owned side effects for an open state change.
274
+ */
275
+ dispatchOpenChange: (newOpen: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void;
276
+ /**
277
+ * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.
278
+ *
279
+ * @param newOpen The new open state.
280
+ * @param eventDetails Details about the event that triggered the open state change.
281
+ */
282
+ setOpen: (newOpen: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void;
283
+ }
284
+
285
+ declare interface FloatingRootStoreContext {
286
+ onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
287
+ readonly dataRef: React_2.RefObject<ContextData>;
288
+ readonly events: FloatingEvents;
289
+ nested: boolean;
290
+ readonly triggerElements: PopupTriggerMap;
291
+ }
292
+
293
+ declare interface FloatingRootStoreOptions {
294
+ open: boolean;
295
+ transitionStatus: TransitionStatus | undefined;
296
+ referenceElement: ReferenceType | null;
297
+ floatingElement: HTMLElement | null;
298
+ triggerElements: PopupTriggerMap;
299
+ floatingId: string | undefined;
300
+ /**
301
+ * When true, `setOpen` only forwards to `onOpenChange`.
302
+ * The popup store owns `dispatchOpenChange(...)` in this mode.
303
+ */
304
+ syncOnly: boolean;
305
+ nested: boolean;
306
+ onOpenChange: ((open: boolean, eventDetails: BaseUIChangeEventDetails<string>) => void) | undefined;
307
+ }
308
+
309
+ /**
310
+ * Stores and manages floating elements in a tree structure.
311
+ * This is a backing store for the `FloatingTree` component.
312
+ */
313
+ declare class FloatingTreeStore {
314
+ readonly nodesRef: React.RefObject<Array<FloatingNodeType>>;
315
+ readonly events: FloatingEvents;
316
+ addNode(node: FloatingNodeType): void;
317
+ removeNode(node: FloatingNodeType): void;
318
+ }
319
+
320
+ declare const focusOut: "focus-out";
321
+
322
+ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
323
+ ref?: React_2.Ref<T> | undefined;
324
+ };
325
+
326
+ declare const imperativeAction: "imperative-action";
327
+
328
+ declare const incrementPress: "increment-press";
329
+
330
+ declare const initial: "initial";
331
+
332
+ declare const inputBlur: "input-blur";
333
+
334
+ declare const inputChange: "input-change";
335
+
336
+ declare const inputClear: "input-clear";
337
+
338
+ declare const inputPaste: "input-paste";
339
+
340
+ declare const inputPress: "input-press";
341
+
342
+ declare const itemPress: "item-press";
343
+
344
+ declare const keyboard: "keyboard";
345
+
346
+ declare const linkPress: "link-press";
347
+
348
+ declare const listNavigation: "list-navigation";
349
+
350
+ export declare namespace Menu {
351
+ export {
352
+ MenuArrow as Arrow,
353
+ MenuBackdrop as Backdrop,
354
+ MenuCheckboxItem as CheckboxItem,
355
+ MenuCheckboxItemIndicator as CheckboxItemIndicator,
356
+ MenuGroup as Group,
357
+ MenuGroupLabel as GroupLabel,
358
+ MenuItem as Item,
359
+ MenuLinkItem as LinkItem,
360
+ MenuPopup as Popup,
361
+ MenuPortal as Portal,
362
+ MenuPositioner as Positioner,
363
+ MenuRadioGroup as RadioGroup,
364
+ MenuRadioItem as RadioItem,
365
+ MenuRadioItemIndicator as RadioItemIndicator,
366
+ MenuRoot as Root,
367
+ MenuSubmenuRoot as SubmenuRoot,
368
+ MenuTrigger as Trigger,
369
+ MenuViewport as Viewport,
370
+ Separator,
371
+ MenuSubmenuTrigger as SubmenuTrigger,
372
+ MenuHandle as Handle,
373
+ createMenuHandle as createHandle
374
+ }
375
+ }
376
+
377
+ /**
378
+ * Displays an element positioned against the menu anchor.
379
+ * Renders a `<div>` element.
380
+ *
381
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
382
+ */
383
+ declare const MenuArrow: React_2.ForwardRefExoticComponent<Omit<MenuArrowProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
384
+
385
+ declare namespace MenuArrow {
386
+ type State = MenuArrowState;
387
+ type Props = MenuArrowProps;
388
+ }
389
+
390
+ declare interface MenuArrowProps extends BaseUIComponentProps<'div', MenuArrowState> {}
391
+
392
+ declare interface MenuArrowState {
393
+ /**
394
+ * Whether the menu is currently open.
395
+ */
396
+ open: boolean;
397
+ /**
398
+ * The side of the anchor the component is placed on.
399
+ */
400
+ side: Side;
401
+ /**
402
+ * The alignment of the component relative to the anchor.
403
+ */
404
+ align: Align;
405
+ /**
406
+ * Whether the arrow cannot be centered on the anchor.
407
+ */
408
+ uncentered: boolean;
409
+ }
410
+
411
+ /**
412
+ * An overlay displayed beneath the menu popup.
413
+ * Renders a `<div>` element.
414
+ *
415
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
416
+ */
417
+ declare const MenuBackdrop: React_2.ForwardRefExoticComponent<Omit<MenuBackdropProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
418
+
419
+ declare namespace MenuBackdrop {
420
+ type State = MenuBackdropState;
421
+ type Props = MenuBackdropProps;
422
+ }
423
+
424
+ declare interface MenuBackdropProps extends BaseUIComponentProps<'div', MenuBackdropState> {}
425
+
426
+ declare interface MenuBackdropState {
427
+ /**
428
+ * Whether the menu is currently open.
429
+ */
430
+ open: boolean;
431
+ /**
432
+ * The transition status of the component.
433
+ */
434
+ transitionStatus: TransitionStatus;
435
+ }
436
+
437
+ export declare const Menubar: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<MenubarProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
5
438
  className?: string | undefined;
6
439
  } & React_2.RefAttributes<HTMLDivElement>>;
7
440
 
441
+ declare interface MenubarContext {
442
+ modal: boolean;
443
+ disabled: boolean;
444
+ contentElement: HTMLElement | null;
445
+ setContentElement: (element: HTMLElement | null) => void;
446
+ hasSubmenuOpen: boolean;
447
+ setHasSubmenuOpen: (open: boolean) => void;
448
+ orientation: MenuRoot.Orientation;
449
+ allowMouseUpTriggerRef: React_2.RefObject<boolean>;
450
+ rootId: string | undefined;
451
+ }
452
+
453
+ declare const MenubarContext: React_2.Context<MenubarContext | null>;
454
+
455
+ export declare interface MenubarProps extends BaseUIComponentProps<'div', MenubarState> {
456
+ /**
457
+ * Whether the menubar is modal.
458
+ * @default true
459
+ */
460
+ modal?: boolean | undefined;
461
+ /**
462
+ * Whether the whole menubar is disabled.
463
+ * @default false
464
+ */
465
+ disabled?: boolean | undefined;
466
+ /**
467
+ * The orientation of the menubar.
468
+ * @default 'horizontal'
469
+ */
470
+ orientation?: MenuRoot.Orientation | undefined;
471
+ /**
472
+ * Whether to loop keyboard focus back to the first item
473
+ * when the end of the list is reached while using the arrow keys.
474
+ * @default true
475
+ */
476
+ loopFocus?: boolean | undefined;
477
+ }
478
+
479
+ export declare interface MenubarState {
480
+ /**
481
+ * The orientation of the menubar.
482
+ */
483
+ orientation: MenuRoot.Orientation;
484
+ /**
485
+ * Whether the menubar is modal.
486
+ */
487
+ modal: boolean;
488
+ /**
489
+ * Whether any submenu within the menubar is open.
490
+ */
491
+ hasSubmenuOpen: boolean;
492
+ }
493
+
494
+ /**
495
+ * A menu item that toggles a setting on or off.
496
+ * Renders a `<div>` element.
497
+ *
498
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
499
+ */
500
+ declare const MenuCheckboxItem: React_2.ForwardRefExoticComponent<Omit<MenuCheckboxItemProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
501
+
502
+ declare namespace MenuCheckboxItem {
503
+ type State = MenuCheckboxItemState;
504
+ type Props = MenuCheckboxItemProps;
505
+ type ChangeEventReason = MenuCheckboxItemChangeEventReason;
506
+ type ChangeEventDetails = MenuCheckboxItemChangeEventDetails;
507
+ }
508
+
509
+ declare type MenuCheckboxItemChangeEventDetails = MenuRoot.ChangeEventDetails;
510
+
511
+ declare type MenuCheckboxItemChangeEventReason = MenuRoot.ChangeEventReason;
512
+
513
+ /**
514
+ * Indicates whether the checkbox item is ticked.
515
+ * Renders a `<span>` element.
516
+ *
517
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
518
+ */
519
+ declare const MenuCheckboxItemIndicator: React_2.ForwardRefExoticComponent<Omit<MenuCheckboxItemIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
520
+
521
+ declare namespace MenuCheckboxItemIndicator {
522
+ type Props = MenuCheckboxItemIndicatorProps;
523
+ type State = MenuCheckboxItemIndicatorState;
524
+ }
525
+
526
+ declare interface MenuCheckboxItemIndicatorProps extends BaseUIComponentProps<'span', MenuCheckboxItemIndicatorState> {
527
+ /**
528
+ * Whether to keep the HTML element in the DOM when the checkbox item is not checked.
529
+ * @default false
530
+ */
531
+ keepMounted?: boolean | undefined;
532
+ }
533
+
534
+ declare interface MenuCheckboxItemIndicatorState {
535
+ /**
536
+ * Whether the checkbox item is currently ticked.
537
+ */
538
+ checked: boolean;
539
+ /**
540
+ * Whether the component should ignore user interaction.
541
+ */
542
+ disabled: boolean;
543
+ /**
544
+ * Whether the item is highlighted.
545
+ */
546
+ highlighted: boolean;
547
+ /**
548
+ * The transition status of the component.
549
+ */
550
+ transitionStatus: TransitionStatus;
551
+ }
552
+
553
+ declare interface MenuCheckboxItemProps extends NonNativeButtonProps, BaseUIComponentProps<'div', MenuCheckboxItemState> {
554
+ /**
555
+ * Whether the checkbox item is currently ticked.
556
+ *
557
+ * To render an uncontrolled checkbox item, use the `defaultChecked` prop instead.
558
+ */
559
+ checked?: boolean | undefined;
560
+ /**
561
+ * Whether the checkbox item is initially ticked.
562
+ *
563
+ * To render a controlled checkbox item, use the `checked` prop instead.
564
+ * @default false
565
+ */
566
+ defaultChecked?: boolean | undefined;
567
+ /**
568
+ * Event handler called when the checkbox item is ticked or unticked.
569
+ */
570
+ onCheckedChange?: ((checked: boolean, eventDetails: MenuCheckboxItem.ChangeEventDetails) => void) | undefined;
571
+ /**
572
+ * The click handler for the menu item.
573
+ */
574
+ onClick?: BaseUIComponentProps<'div', MenuCheckboxItemState>['onClick'] | undefined;
575
+ /**
576
+ * Whether the component should ignore user interaction.
577
+ * @default false
578
+ */
579
+ disabled?: boolean | undefined;
580
+ /**
581
+ * Overrides the text label to use when the item is matched during keyboard text navigation.
582
+ */
583
+ label?: string | undefined;
584
+ /**
585
+ * @ignore
586
+ */
587
+ id?: string | undefined;
588
+ /**
589
+ * Whether to close the menu when the item is clicked.
590
+ * @default false
591
+ */
592
+ closeOnClick?: boolean | undefined;
593
+ }
594
+
595
+ declare interface MenuCheckboxItemState {
596
+ /**
597
+ * Whether the checkbox item should ignore user interaction.
598
+ */
599
+ disabled: boolean;
600
+ /**
601
+ * Whether the checkbox item is currently highlighted.
602
+ */
603
+ highlighted: boolean;
604
+ /**
605
+ * Whether the checkbox item is currently ticked.
606
+ */
607
+ checked: boolean;
608
+ }
609
+
610
+ /**
611
+ * Groups related menu items with the corresponding label.
612
+ * Renders a `<div>` element.
613
+ *
614
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
615
+ */
616
+ declare const MenuGroup: React_2.ForwardRefExoticComponent<Omit<MenuGroupProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
617
+
618
+ declare namespace MenuGroup {
619
+ type Props = MenuGroupProps;
620
+ type State = MenuGroupState;
621
+ }
622
+
623
+ /**
624
+ * An accessible label that is automatically associated with its parent group.
625
+ * Renders a `<div>` element.
626
+ *
627
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
628
+ */
629
+ declare const MenuGroupLabel: React_2.ForwardRefExoticComponent<Omit<MenuGroupLabelProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
630
+
631
+ declare namespace MenuGroupLabel {
632
+ type Props = MenuGroupLabelProps;
633
+ type State = MenuGroupLabelState;
634
+ }
635
+
636
+ declare interface MenuGroupLabelProps extends BaseUIComponentProps<'div', MenuGroupLabelState> {}
637
+
638
+ declare interface MenuGroupLabelState {}
639
+
640
+ declare interface MenuGroupProps extends BaseUIComponentProps<'div', MenuGroupState> {
641
+ /**
642
+ * The content of the component.
643
+ */
644
+ children?: React_2.ReactNode;
645
+ }
646
+
647
+ declare interface MenuGroupState {}
648
+
649
+ declare class MenuHandle<Payload> {
650
+ /**
651
+ * Internal store holding the menu's state.
652
+ * @internal
653
+ */
654
+ readonly store: MenuStore<Payload>;
655
+ constructor();
656
+ /**
657
+ * 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
+ *
660
+ * @param triggerId ID of the trigger to associate with the menu.
661
+ */
662
+ open(triggerId: string): void;
663
+ /**
664
+ * Closes the menu.
665
+ */
666
+ close(): void;
667
+ /**
668
+ * Indicates whether the menu is currently open.
669
+ */
670
+ get isOpen(): boolean;
671
+ }
672
+
673
+ /**
674
+ * An individual interactive item in the menu.
675
+ * Renders a `<div>` element.
676
+ *
677
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
678
+ */
679
+ declare const MenuItem: React_2.ForwardRefExoticComponent<Omit<MenuItemProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
680
+
681
+ declare namespace MenuItem {
682
+ type State = MenuItemState;
683
+ type Props = MenuItemProps;
684
+ }
685
+
686
+ declare interface MenuItemProps extends NonNativeButtonProps, BaseUIComponentProps<'div', MenuItemState> {
687
+ /**
688
+ * The click handler for the menu item.
689
+ */
690
+ onClick?: BaseUIComponentProps<'div', MenuItemState>['onClick'] | undefined;
691
+ /**
692
+ * Whether the component should ignore user interaction.
693
+ * @default false
694
+ */
695
+ disabled?: boolean | undefined;
696
+ /**
697
+ * Overrides the text label to use when the item is matched during keyboard text navigation.
698
+ */
699
+ label?: string | undefined;
700
+ /**
701
+ * @ignore
702
+ */
703
+ id?: string | undefined;
704
+ /**
705
+ * Whether to close the menu when the item is clicked.
706
+ *
707
+ * @default true
708
+ */
709
+ closeOnClick?: boolean | undefined;
710
+ }
711
+
712
+ declare interface MenuItemState {
713
+ /**
714
+ * Whether the item should ignore user interaction.
715
+ */
716
+ disabled: boolean;
717
+ /**
718
+ * Whether the item is highlighted.
719
+ */
720
+ highlighted: boolean;
721
+ }
722
+
723
+ /**
724
+ * A link in the menu that can be used to navigate to a different page or section.
725
+ * Renders an `<a>` element.
726
+ *
727
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
728
+ */
729
+ declare const MenuLinkItem: React_2.ForwardRefExoticComponent<Omit<MenuLinkItemProps, "ref"> & React_2.RefAttributes<Element>>;
730
+
731
+ declare namespace MenuLinkItem {
732
+ type State = MenuLinkItemState;
733
+ type Props = MenuLinkItemProps;
734
+ }
735
+
736
+ declare interface MenuLinkItemProps extends BaseUIComponentProps<'a', MenuLinkItemState> {
737
+ /**
738
+ * Overrides the text label to use when the item is matched during keyboard text navigation.
739
+ */
740
+ label?: string | undefined;
741
+ /**
742
+ * @ignore
743
+ */
744
+ id?: string | undefined;
745
+ /**
746
+ * Whether to close the menu when the item is clicked.
747
+ * @default false
748
+ */
749
+ closeOnClick?: boolean | undefined;
750
+ }
751
+
752
+ declare interface MenuLinkItemState {
753
+ /**
754
+ * Whether the item is highlighted.
755
+ */
756
+ highlighted: boolean;
757
+ }
758
+
759
+ declare type MenuParent = {
760
+ type: 'menu';
761
+ store: MenuStore<unknown>;
762
+ } | {
763
+ type: 'menubar';
764
+ context: MenubarContext;
765
+ } | {
766
+ type: 'context-menu';
767
+ context: ContextMenuRootContext;
768
+ } | {
769
+ type: 'nested-context-menu';
770
+ context: ContextMenuRootContext;
771
+ menuContext: MenuRootContext;
772
+ } | {
773
+ type: undefined;
774
+ };
775
+
776
+ /**
777
+ * A container for the menu items.
778
+ * Renders a `<div>` element.
779
+ *
780
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
781
+ */
782
+ declare const MenuPopup: React_2.ForwardRefExoticComponent<Omit<MenuPopupProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
783
+
784
+ declare namespace MenuPopup {
785
+ type Props = MenuPopupProps;
786
+ type State = MenuPopupState;
787
+ }
788
+
789
+ declare interface MenuPopupProps extends BaseUIComponentProps<'div', MenuPopupState> {
790
+ children?: React_2.ReactNode;
791
+ /**
792
+ * @ignore
793
+ */
794
+ id?: string | undefined;
795
+ /**
796
+ * Determines the element to focus when the menu is closed.
797
+ *
798
+ * - `false`: Do not move focus.
799
+ * - `true`: Move focus based on the default behavior (trigger or previously focused element).
800
+ * - `RefObject`: Move focus to the ref element.
801
+ * - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`).
802
+ * Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing.
803
+ */
804
+ finalFocus?: boolean | React_2.RefObject<HTMLElement | null> | ((closeType: InteractionType) => boolean | HTMLElement | null | void) | undefined;
805
+ }
806
+
807
+ declare interface MenuPopupState {
808
+ /**
809
+ * The transition status of the component.
810
+ */
811
+ transitionStatus: TransitionStatus;
812
+ /**
813
+ * The side of the anchor the component is placed on.
814
+ */
815
+ side: Side;
816
+ /**
817
+ * The alignment of the component relative to the anchor.
818
+ */
819
+ align: Align;
820
+ /**
821
+ * Whether the menu is currently open.
822
+ */
823
+ open: boolean;
824
+ /**
825
+ * Whether the component is nested.
826
+ */
827
+ nested: boolean;
828
+ /**
829
+ * Whether transitions should be skipped.
830
+ */
831
+ instant: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
832
+ }
833
+
834
+ /**
835
+ * A portal element that moves the popup to a different part of the DOM.
836
+ * By default, the portal element is appended to `<body>`.
837
+ * Renders a `<div>` element.
838
+ *
839
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
840
+ */
841
+ declare const MenuPortal: React_2.ForwardRefExoticComponent<Omit<MenuPortalProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
842
+
843
+ declare namespace MenuPortal {
844
+ type State = MenuPortalState;
845
+ type Props = MenuPortalProps;
846
+ }
847
+
848
+ declare interface MenuPortalProps extends FloatingPortal.Props<MenuPortalState> {
849
+ /**
850
+ * Whether to keep the portal mounted in the DOM while the popup is hidden.
851
+ * @default false
852
+ */
853
+ keepMounted?: boolean | undefined;
854
+ }
855
+
856
+ declare interface MenuPortalState {}
857
+
858
+ /**
859
+ * Positions the menu popup against the trigger.
860
+ * Renders a `<div>` element.
861
+ *
862
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
863
+ */
864
+ declare const MenuPositioner: React_2.ForwardRefExoticComponent<Omit<MenuPositionerProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
865
+
866
+ declare namespace MenuPositioner {
867
+ type State = MenuPositionerState;
868
+ type Props = MenuPositionerProps;
869
+ }
870
+
871
+ declare interface MenuPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<'div', MenuPositionerState> {}
872
+
873
+ declare interface MenuPositionerState {
874
+ /**
875
+ * Whether the menu is currently open.
876
+ */
877
+ open: boolean;
878
+ /**
879
+ * The side of the anchor the component is placed on.
880
+ */
881
+ side: Side;
882
+ /**
883
+ * The alignment of the component relative to the anchor.
884
+ */
885
+ align: Align;
886
+ /**
887
+ * Whether the anchor element is hidden.
888
+ */
889
+ anchorHidden: boolean;
890
+ /**
891
+ * Whether the component is nested.
892
+ */
893
+ nested: boolean;
894
+ /**
895
+ * Whether CSS transitions should be disabled.
896
+ */
897
+ instant: string | undefined;
898
+ }
899
+
900
+ /**
901
+ * Groups related radio items.
902
+ * Renders a `<div>` element.
903
+ *
904
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
905
+ */
906
+ declare const MenuRadioGroup: React_2.NamedExoticComponent<Omit<MenuRadioGroupProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
907
+
908
+ declare namespace MenuRadioGroup {
909
+ type Props = MenuRadioGroupProps;
910
+ type State = MenuRadioGroupState;
911
+ type ChangeEventReason = MenuRadioGroupChangeEventReason;
912
+ type ChangeEventDetails = MenuRadioGroupChangeEventDetails;
913
+ }
914
+
915
+ declare type MenuRadioGroupChangeEventDetails = MenuRoot.ChangeEventDetails;
916
+
917
+ declare type MenuRadioGroupChangeEventReason = MenuRoot.ChangeEventReason;
918
+
919
+ declare interface MenuRadioGroupProps extends BaseUIComponentProps<'div', MenuRadioGroupState> {
920
+ /**
921
+ * The content of the component.
922
+ */
923
+ children?: React_2.ReactNode;
924
+ /**
925
+ * The controlled value of the radio item that should be currently selected.
926
+ *
927
+ * To render an uncontrolled radio group, use the `defaultValue` prop instead.
928
+ */
929
+ value?: any;
930
+ /**
931
+ * The uncontrolled value of the radio item that should be initially selected.
932
+ *
933
+ * To render a controlled radio group, use the `value` prop instead.
934
+ */
935
+ defaultValue?: any;
936
+ /**
937
+ * Function called when the selected value changes.
938
+ */
939
+ onValueChange?: ((value: any, eventDetails: MenuRadioGroup.ChangeEventDetails) => void) | undefined;
940
+ /**
941
+ * Whether the component should ignore user interaction.
942
+ *
943
+ * @default false
944
+ */
945
+ disabled?: boolean | undefined;
946
+ }
947
+
948
+ declare interface MenuRadioGroupState {
949
+ /**
950
+ * Whether the component is disabled.
951
+ */
952
+ disabled: boolean;
953
+ }
954
+
955
+ /**
956
+ * A menu item that works like a radio button in a given group.
957
+ * Renders a `<div>` element.
958
+ *
959
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
960
+ */
961
+ declare const MenuRadioItem: React_2.ForwardRefExoticComponent<Omit<MenuRadioItemProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
962
+
963
+ declare namespace MenuRadioItem {
964
+ type State = MenuRadioItemState;
965
+ type Props = MenuRadioItemProps;
966
+ }
967
+
968
+ /**
969
+ * Indicates whether the radio item is selected.
970
+ * Renders a `<span>` element.
971
+ *
972
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
973
+ */
974
+ declare const MenuRadioItemIndicator: React_2.ForwardRefExoticComponent<Omit<MenuRadioItemIndicatorProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
975
+
976
+ declare namespace MenuRadioItemIndicator {
977
+ type Props = MenuRadioItemIndicatorProps;
978
+ type State = MenuRadioItemIndicatorState;
979
+ }
980
+
981
+ declare interface MenuRadioItemIndicatorProps extends BaseUIComponentProps<'span', MenuRadioItemIndicatorState> {
982
+ /**
983
+ * Whether to keep the HTML element in the DOM when the radio item is inactive.
984
+ * @default false
985
+ */
986
+ keepMounted?: boolean | undefined;
987
+ }
988
+
989
+ declare interface MenuRadioItemIndicatorState {
990
+ /**
991
+ * Whether the radio item is currently selected.
992
+ */
993
+ checked: boolean;
994
+ /**
995
+ * Whether the component should ignore user interaction.
996
+ */
997
+ disabled: boolean;
998
+ /**
999
+ * Whether the item is highlighted.
1000
+ */
1001
+ highlighted: boolean;
1002
+ /**
1003
+ * The transition status of the component.
1004
+ */
1005
+ transitionStatus: TransitionStatus;
1006
+ }
1007
+
1008
+ declare interface MenuRadioItemProps extends NonNativeButtonProps, BaseUIComponentProps<'div', MenuRadioItemState> {
1009
+ /**
1010
+ * Value of the radio item.
1011
+ * This is the value that will be set in the MenuRadioGroup when the item is selected.
1012
+ */
1013
+ value: any;
1014
+ /**
1015
+ * The click handler for the menu item.
1016
+ */
1017
+ onClick?: BaseUIComponentProps<'div', MenuRadioItemState>['onClick'] | undefined;
1018
+ /**
1019
+ * Whether the component should ignore user interaction.
1020
+ * @default false
1021
+ */
1022
+ disabled?: boolean | undefined;
1023
+ /**
1024
+ * Overrides the text label to use when the item is matched during keyboard text navigation.
1025
+ */
1026
+ label?: string | undefined;
1027
+ /**
1028
+ * @ignore
1029
+ */
1030
+ id?: string | undefined;
1031
+ /**
1032
+ * Whether to close the menu when the item is clicked.
1033
+ * @default false
1034
+ */
1035
+ closeOnClick?: boolean | undefined;
1036
+ }
1037
+
1038
+ declare interface MenuRadioItemState {
1039
+ /**
1040
+ * Whether the radio item should ignore user interaction.
1041
+ */
1042
+ disabled: boolean;
1043
+ /**
1044
+ * Whether the radio item is currently highlighted.
1045
+ */
1046
+ highlighted: boolean;
1047
+ /**
1048
+ * Whether the radio item is currently selected.
1049
+ */
1050
+ checked: boolean;
1051
+ }
1052
+
1053
+ /**
1054
+ * Groups all parts of the menu.
1055
+ * Doesn't render its own HTML element.
1056
+ *
1057
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1058
+ */
1059
+ declare const MenuRoot: <Payload>(props: MenuRoot.Props<Payload>) => JSX_2.Element;
1060
+
1061
+ declare namespace MenuRoot {
1062
+ type State = MenuRootState;
1063
+ type Props<Payload = unknown> = MenuRootProps<Payload>;
1064
+ type Actions = MenuRootActions;
1065
+ type ChangeEventReason = MenuRootChangeEventReason_2;
1066
+ type ChangeEventDetails = MenuRootChangeEventDetails;
1067
+ type Orientation = MenuRootOrientation;
1068
+ }
1069
+
1070
+ declare interface MenuRootActions {
1071
+ unmount: () => void;
1072
+ close: () => void;
1073
+ }
1074
+
1075
+ declare type MenuRootChangeEventDetails = BaseUIChangeEventDetails<MenuRoot.ChangeEventReason> & {
1076
+ preventUnmountOnClose(): void;
1077
+ };
1078
+
1079
+ 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;
1080
+
1081
+ declare interface MenuRootContext<Payload = unknown> {
1082
+ store: MenuStore<Payload>;
1083
+ parent: MenuParent;
1084
+ }
1085
+
1086
+ declare const MenuRootContext: React_2.Context<MenuRootContext<unknown> | undefined>;
1087
+
1088
+ declare type MenuRootOrientation = 'horizontal' | 'vertical';
1089
+
1090
+ declare interface MenuRootProps<Payload = unknown> {
1091
+ /**
1092
+ * Whether the menu is initially open.
1093
+ *
1094
+ * To render a controlled menu, use the `open` prop instead.
1095
+ * @default false
1096
+ */
1097
+ defaultOpen?: boolean | undefined;
1098
+ /**
1099
+ * Whether to loop keyboard focus back to the first item
1100
+ * when the end of the list is reached while using the arrow keys.
1101
+ * @default true
1102
+ */
1103
+ loopFocus?: boolean | undefined;
1104
+ /**
1105
+ * Whether moving the pointer over items should highlight them.
1106
+ * Disabling this prop allows CSS `:hover` to be differentiated from the `:focus` (`data-highlighted`) state.
1107
+ * @default true
1108
+ */
1109
+ highlightItemOnHover?: boolean | undefined;
1110
+ /**
1111
+ * Determines if the menu enters a modal state when open.
1112
+ * - `true`: user interaction is limited to the menu: document page scroll is locked and pointer interactions on outside elements are disabled.
1113
+ * - `false`: user interaction with the rest of the document is allowed.
1114
+ * @default true
1115
+ */
1116
+ modal?: boolean | undefined;
1117
+ /**
1118
+ * Event handler called when the menu is opened or closed.
1119
+ */
1120
+ onOpenChange?: ((open: boolean, eventDetails: MenuRoot.ChangeEventDetails) => void) | undefined;
1121
+ /**
1122
+ * Event handler called after any animations complete when the menu is closed.
1123
+ */
1124
+ onOpenChangeComplete?: ((open: boolean) => void) | undefined;
1125
+ /**
1126
+ * Whether the menu is currently open.
1127
+ */
1128
+ open?: boolean | undefined;
1129
+ /**
1130
+ * The visual orientation of the menu.
1131
+ * Controls whether roving focus uses up/down or left/right arrow keys.
1132
+ * @default 'vertical'
1133
+ */
1134
+ orientation?: MenuRoot.Orientation | undefined;
1135
+ /**
1136
+ * Whether the component should ignore user interaction.
1137
+ * @default false
1138
+ */
1139
+ disabled?: boolean | undefined;
1140
+ /**
1141
+ * When in a submenu, determines whether pressing the Escape key
1142
+ * closes the entire menu, or only the current child menu.
1143
+ * @default false
1144
+ */
1145
+ closeParentOnEsc?: boolean | undefined;
1146
+ /**
1147
+ * 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.
1152
+ */
1153
+ actionsRef?: React_2.RefObject<MenuRoot.Actions | null> | undefined;
1154
+ /**
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).
1158
+ */
1159
+ triggerId?: string | null | undefined;
1160
+ /**
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.
1163
+ */
1164
+ defaultTriggerId?: string | null | undefined;
1165
+ /**
1166
+ * A handle to associate the menu with a trigger.
1167
+ * If specified, allows external triggers to control the menu's open state.
1168
+ */
1169
+ handle?: MenuHandle<Payload> | undefined;
1170
+ /**
1171
+ * The content of the popover.
1172
+ * This can be a regular React node or a render function that receives the `payload` of the active trigger.
1173
+ */
1174
+ children?: React_2.ReactNode | PayloadChildRenderFunction<Payload>;
1175
+ }
1176
+
1177
+ declare interface MenuRootState {}
1178
+
1179
+ declare class MenuStore<Payload> extends ReactStore<Readonly<State<Payload>>, Context, typeof selectors_2> {
1180
+ constructor(initialState?: Partial<State<Payload>>);
1181
+ 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;
1184
+ }
1185
+
1186
+ /**
1187
+ * Groups all parts of a submenu.
1188
+ * Doesn't render its own HTML element.
1189
+ *
1190
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1191
+ */
1192
+ declare function MenuSubmenuRoot(props: MenuSubmenuRoot.Props): JSX_2.Element;
1193
+
1194
+ declare namespace MenuSubmenuRoot {
1195
+ type Props = MenuSubmenuRootProps;
1196
+ type State = MenuSubmenuRootState;
1197
+ type ChangeEventReason = MenuSubmenuRootChangeEventReason;
1198
+ type ChangeEventDetails = MenuSubmenuRootChangeEventDetails;
1199
+ }
1200
+
1201
+ declare type MenuSubmenuRootChangeEventDetails = MenuRoot.ChangeEventDetails;
1202
+
1203
+ declare type MenuSubmenuRootChangeEventReason = MenuRoot.ChangeEventReason;
1204
+
1205
+ declare interface MenuSubmenuRootProps extends Omit<MenuRoot.Props, 'modal' | 'openOnHover' | 'onOpenChange'> {
1206
+ /**
1207
+ * Event handler called when the menu is opened or closed.
1208
+ */
1209
+ onOpenChange?: ((open: boolean, eventDetails: MenuSubmenuRoot.ChangeEventDetails) => void) | undefined;
1210
+ /**
1211
+ * When in a submenu, determines whether pressing the Escape key
1212
+ * closes the entire menu, or only the current child menu.
1213
+ * @default false
1214
+ */
1215
+ closeParentOnEsc?: boolean | undefined;
1216
+ }
1217
+
1218
+ declare interface MenuSubmenuRootState {}
1219
+
1220
+ /**
1221
+ * A menu item that opens a submenu.
1222
+ * Renders a `<div>` element.
1223
+ *
1224
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1225
+ */
1226
+ declare const MenuSubmenuTrigger: React_2.ForwardRefExoticComponent<Omit<MenuSubmenuTriggerProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
1227
+
1228
+ declare namespace MenuSubmenuTrigger {
1229
+ type Props = MenuSubmenuTriggerProps;
1230
+ type State = MenuSubmenuTriggerState;
1231
+ }
1232
+
1233
+ declare interface MenuSubmenuTriggerProps extends NonNativeButtonProps, BaseUIComponentProps<'div', MenuSubmenuTriggerState> {
1234
+ onClick?: BaseUIComponentProps<'div', MenuSubmenuTriggerState>['onClick'] | undefined;
1235
+ /**
1236
+ * Overrides the text label to use when the item is matched during keyboard text navigation.
1237
+ */
1238
+ label?: string | undefined;
1239
+ /**
1240
+ * @ignore
1241
+ */
1242
+ id?: string | undefined;
1243
+ /**
1244
+ * Whether the component should ignore user interaction.
1245
+ * @default false
1246
+ */
1247
+ disabled?: boolean | undefined;
1248
+ /**
1249
+ * How long to wait before the menu may be opened on hover. Specified in milliseconds.
1250
+ *
1251
+ * Requires the `openOnHover` prop.
1252
+ * @default 100
1253
+ */
1254
+ delay?: number | undefined;
1255
+ /**
1256
+ * How long to wait before closing the menu that was opened on hover.
1257
+ * Specified in milliseconds.
1258
+ *
1259
+ * Requires the `openOnHover` prop.
1260
+ * @default 0
1261
+ */
1262
+ closeDelay?: number | undefined;
1263
+ /**
1264
+ * Whether the menu should also open when the trigger is hovered.
1265
+ */
1266
+ openOnHover?: boolean | undefined;
1267
+ }
1268
+
1269
+ declare interface MenuSubmenuTriggerState {
1270
+ /**
1271
+ * Whether the component should ignore user interaction.
1272
+ */
1273
+ disabled: boolean;
1274
+ /**
1275
+ * Whether the item is highlighted.
1276
+ */
1277
+ highlighted: boolean;
1278
+ /**
1279
+ * Whether the menu is currently open.
1280
+ */
1281
+ open: boolean;
1282
+ }
1283
+
1284
+ /**
1285
+ * A button that opens the menu.
1286
+ * Renders a `<button>` element.
1287
+ *
1288
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1289
+ */
1290
+ declare const MenuTrigger: MenuTrigger;
1291
+
1292
+ declare interface MenuTrigger {
1293
+ <Payload>(componentProps: MenuTriggerProps<Payload> & React_2.RefAttributes<HTMLElement>): React_2.JSX.Element;
1294
+ }
1295
+
1296
+ declare namespace MenuTrigger {
1297
+ type Props<Payload = unknown> = MenuTriggerProps<Payload>;
1298
+ type State = MenuTriggerState;
1299
+ }
1300
+
1301
+ declare interface MenuTriggerProps<Payload = unknown> extends NativeButtonProps, BaseUIComponentProps<'button', MenuTriggerState> {
1302
+ children?: React_2.ReactNode;
1303
+ /**
1304
+ * Whether the component should ignore user interaction.
1305
+ * @default false
1306
+ */
1307
+ disabled?: boolean | undefined;
1308
+ /**
1309
+ * A handle to associate the trigger with a menu.
1310
+ */
1311
+ handle?: MenuHandle<Payload> | undefined;
1312
+ /**
1313
+ * A payload to pass to the menu when it is opened.
1314
+ */
1315
+ payload?: Payload | undefined;
1316
+ /**
1317
+ * How long to wait before the menu may be opened on hover. Specified in milliseconds.
1318
+ *
1319
+ * Requires the `openOnHover` prop.
1320
+ * @default 100
1321
+ */
1322
+ delay?: number | undefined;
1323
+ /**
1324
+ * How long to wait before closing the menu that was opened on hover.
1325
+ * Specified in milliseconds.
1326
+ *
1327
+ * Requires the `openOnHover` prop.
1328
+ * @default 0
1329
+ */
1330
+ closeDelay?: number | undefined;
1331
+ /**
1332
+ * Whether the menu should also open when the trigger is hovered.
1333
+ */
1334
+ openOnHover?: boolean | undefined;
1335
+ }
1336
+
1337
+ declare interface MenuTriggerState {
1338
+ /**
1339
+ * Whether the menu is currently open.
1340
+ */
1341
+ open: boolean;
1342
+ /**
1343
+ * Whether the trigger is disabled.
1344
+ */
1345
+ disabled: boolean;
1346
+ }
1347
+
1348
+ /**
1349
+ * A viewport for displaying content transitions.
1350
+ * This component is only required if one popup can be opened by multiple triggers, its content
1351
+ * changes based on the trigger, and switching between them is animated.
1352
+ * Renders a `<div>` element.
1353
+ *
1354
+ * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)
1355
+ */
1356
+ declare const MenuViewport: React_2.ForwardRefExoticComponent<Omit<MenuViewport.Props, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
1357
+
1358
+ 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
+ }
1376
+ }
1377
+
1378
+ declare const missing: "missing";
1379
+
1380
+ declare type NarrowedElement<T> = T extends Element ? T : Element;
1381
+
1382
+ declare interface NativeButtonProps {
1383
+ /**
1384
+ * Whether the component renders a native `<button>` element when replacing it
1385
+ * via the `render` prop.
1386
+ * Set to `false` if the rendered element is not a button (for example, `<div>`).
1387
+ * @default true
1388
+ */
1389
+ nativeButton?: boolean | undefined;
1390
+ }
1391
+
1392
+ declare const none: "none";
1393
+
1394
+ declare interface NonNativeButtonProps {
1395
+ /**
1396
+ * Whether the component renders a native `<button>` element when replacing it
1397
+ * via the `render` prop.
1398
+ * Set to `true` if the rendered element is a native button.
1399
+ * @default false
1400
+ */
1401
+ nativeButton?: boolean | undefined;
1402
+ }
1403
+
1404
+ declare type OffsetFunction = (data: {
1405
+ side: Side;
1406
+ align: Align;
1407
+ anchor: {
1408
+ width: number;
1409
+ height: number;
1410
+ };
1411
+ positioner: {
1412
+ width: number;
1413
+ height: number;
1414
+ };
1415
+ }) => number;
1416
+
1417
+ declare type Orientation = 'horizontal' | 'vertical';
1418
+
1419
+ declare const outsidePress: "outside-press";
1420
+
1421
+ declare type PayloadChildRenderFunction<Payload> = (arg: {
1422
+ payload: Payload | undefined;
1423
+ }) => React_2.ReactNode;
1424
+
1425
+ declare const pointer: "pointer";
1426
+
1427
+ declare type PopupStoreContext<ChangeEventDetails> = {
1428
+ /**
1429
+ * Map of registered trigger elements.
1430
+ */
1431
+ readonly triggerElements: PopupTriggerMap;
1432
+ /**
1433
+ * Reference to the popup element.
1434
+ */
1435
+ readonly popupRef: React.RefObject<HTMLElement | null>;
1436
+ /**
1437
+ * Callback fired when the open state changes.
1438
+ */
1439
+ onOpenChange?: ((open: boolean, eventDetails: ChangeEventDetails) => void) | undefined;
1440
+ /**
1441
+ * Callback fired when the open state change animation completes.
1442
+ */
1443
+ onOpenChangeComplete: ((open: boolean) => void) | undefined;
1444
+ };
1445
+
1446
+ /**
1447
+ * State common to all popup stores.
1448
+ */
1449
+ declare type PopupStoreState<Payload> = {
1450
+ /**
1451
+ * Whether the popup is open (internal state).
1452
+ */
1453
+ open: boolean;
1454
+ /**
1455
+ * Whether the popup is open (external prop).
1456
+ */
1457
+ readonly openProp: boolean | undefined;
1458
+ /**
1459
+ * Whether the popup should be mounted in the DOM.
1460
+ * This usually follows `open` but can be different during exit transitions.
1461
+ */
1462
+ mounted: boolean;
1463
+ /**
1464
+ * The current enter/exit transition status of the popup.
1465
+ */
1466
+ transitionStatus: TransitionStatus;
1467
+ floatingRootContext: FloatingRootContext;
1468
+ floatingId: string | undefined;
1469
+ /**
1470
+ * Number of trigger elements currently registered for this popup.
1471
+ */
1472
+ triggerCount: number;
1473
+ /**
1474
+ * Whether to prevent unmounting the popup when closed.
1475
+ * Useful for interacting with JS animation libraries that control unmounting themselves.
1476
+ */
1477
+ preventUnmountingOnClose: boolean;
1478
+ /**
1479
+ * Optional payload set by the trigger.
1480
+ */
1481
+ payload: Payload | undefined;
1482
+ /**
1483
+ * ID of the currently active trigger.
1484
+ */
1485
+ activeTriggerId: string | null;
1486
+ /**
1487
+ * The currently active trigger DOM element.
1488
+ */
1489
+ activeTriggerElement: Element | null;
1490
+ /**
1491
+ * ID of the trigger (external prop).
1492
+ */
1493
+ readonly triggerIdProp: string | null | undefined;
1494
+ /**
1495
+ * The popup DOM element.
1496
+ */
1497
+ popupElement: HTMLElement | null;
1498
+ /**
1499
+ * The positioner DOM element.
1500
+ */
1501
+ positionerElement: HTMLElement | null;
1502
+ /**
1503
+ * Props to spread onto the active trigger element.
1504
+ */
1505
+ activeTriggerProps: HTMLProps;
1506
+ /**
1507
+ * Props to spread onto inactive trigger elements.
1508
+ */
1509
+ inactiveTriggerProps: HTMLProps;
1510
+ /**
1511
+ * Props to spread onto the popup element.
1512
+ */
1513
+ popupProps: HTMLProps;
1514
+ };
1515
+
1516
+ /**
1517
+ * 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.
1519
+ */
1520
+ declare class PopupTriggerMap {
1521
+ private elementsSet;
1522
+ private idMap;
1523
+ constructor();
1524
+ /**
1525
+ * Adds a trigger element with the given ID.
1526
+ *
1527
+ * Note: The provided element is assumed to not be registered under multiple IDs.
1528
+ */
1529
+ add(id: string, element: Element): void;
1530
+ /**
1531
+ * Removes the trigger element with the given ID.
1532
+ */
1533
+ delete(id: string): void;
1534
+ /**
1535
+ * Whether the given element is registered as a trigger.
1536
+ */
1537
+ hasElement(element: Element): boolean;
1538
+ /**
1539
+ * Whether there is a registered trigger element matching the given predicate.
1540
+ */
1541
+ hasMatchingElement(predicate: (el: Element) => boolean): boolean;
1542
+ /**
1543
+ * Returns the trigger element associated with the given ID, or undefined if no such element exists.
1544
+ */
1545
+ getById(id: string): Element | undefined;
1546
+ /**
1547
+ * Returns an iterable of all registered trigger entries, where each entry is a tuple of [id, element].
1548
+ */
1549
+ entries(): IterableIterator<[string, Element]>;
1550
+ /**
1551
+ * Returns an iterable of all registered trigger elements.
1552
+ */
1553
+ elements(): IterableIterator<Element>;
1554
+ /**
1555
+ * Returns the number of registered trigger elements.
1556
+ */
1557
+ get size(): number;
1558
+ }
1559
+
1560
+ declare namespace REASONS {
1561
+ export {
1562
+ none,
1563
+ triggerPress,
1564
+ triggerHover,
1565
+ triggerFocus,
1566
+ outsidePress,
1567
+ itemPress,
1568
+ closePress,
1569
+ linkPress,
1570
+ clearPress,
1571
+ chipRemovePress,
1572
+ trackPress,
1573
+ incrementPress,
1574
+ decrementPress,
1575
+ inputChange,
1576
+ inputClear,
1577
+ inputBlur,
1578
+ inputPaste,
1579
+ inputPress,
1580
+ focusOut,
1581
+ escapeKey,
1582
+ closeWatcher,
1583
+ listNavigation,
1584
+ keyboard,
1585
+ pointer,
1586
+ drag,
1587
+ wheel,
1588
+ scrub,
1589
+ cancelOpen,
1590
+ siblingOpen,
1591
+ disabled,
1592
+ missing,
1593
+ initial,
1594
+ imperativeAction,
1595
+ swipe,
1596
+ windowResize
1597
+ }
1598
+ }
1599
+
1600
+ /**
1601
+ * Maps a change `reason` string to the corresponding native event type.
1602
+ */
1603
+ declare type ReasonToEvent<Reason extends string> = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event;
1604
+
1605
+ declare interface ReasonToEventMap {
1606
+ [REASONS.none]: Event;
1607
+ [REASONS.triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
1608
+ [REASONS.triggerHover]: MouseEvent;
1609
+ [REASONS.triggerFocus]: FocusEvent;
1610
+ [REASONS.outsidePress]: MouseEvent | PointerEvent | TouchEvent;
1611
+ [REASONS.itemPress]: MouseEvent | KeyboardEvent | PointerEvent;
1612
+ [REASONS.closePress]: MouseEvent | KeyboardEvent | PointerEvent;
1613
+ [REASONS.linkPress]: MouseEvent | PointerEvent;
1614
+ [REASONS.clearPress]: PointerEvent | MouseEvent | KeyboardEvent;
1615
+ [REASONS.chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent;
1616
+ [REASONS.trackPress]: PointerEvent | MouseEvent | TouchEvent;
1617
+ [REASONS.incrementPress]: PointerEvent | MouseEvent | TouchEvent;
1618
+ [REASONS.decrementPress]: PointerEvent | MouseEvent | TouchEvent;
1619
+ [REASONS.inputChange]: InputEvent | Event;
1620
+ [REASONS.inputClear]: InputEvent | FocusEvent | Event;
1621
+ [REASONS.inputBlur]: FocusEvent;
1622
+ [REASONS.inputPaste]: ClipboardEvent;
1623
+ [REASONS.inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
1624
+ [REASONS.focusOut]: FocusEvent | KeyboardEvent;
1625
+ [REASONS.escapeKey]: KeyboardEvent;
1626
+ [REASONS.closeWatcher]: Event;
1627
+ [REASONS.listNavigation]: KeyboardEvent;
1628
+ [REASONS.keyboard]: KeyboardEvent;
1629
+ [REASONS.pointer]: PointerEvent;
1630
+ [REASONS.drag]: PointerEvent | TouchEvent;
1631
+ [REASONS.swipe]: PointerEvent | TouchEvent;
1632
+ [REASONS.wheel]: WheelEvent;
1633
+ [REASONS.scrub]: PointerEvent;
1634
+ [REASONS.cancelOpen]: MouseEvent;
1635
+ [REASONS.siblingOpen]: Event;
1636
+ [REASONS.disabled]: Event;
1637
+ [REASONS.missing]: Event;
1638
+ [REASONS.initial]: Event;
1639
+ [REASONS.imperativeAction]: Event;
1640
+ [REASONS.windowResize]: UIEvent;
1641
+ }
1642
+
1643
+ declare type ReferenceType = Element | VirtualElement;
1644
+
1645
+ declare const scrub: "scrub";
1646
+
1647
+ declare const selectors: {
1648
+ open: (state: FloatingRootState) => boolean;
1649
+ transitionStatus: (state: FloatingRootState) => TransitionStatus;
1650
+ domReferenceElement: (state: FloatingRootState) => Element | null;
1651
+ referenceElement: (state: FloatingRootState) => ReferenceType | null;
1652
+ floatingElement: (state: FloatingRootState) => HTMLElement | null;
1653
+ floatingId: (state: FloatingRootState) => string | undefined;
1654
+ };
1655
+
1656
+ 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
+ open: (state: {
1677
+ open: boolean;
1678
+ readonly openProp: boolean | undefined;
1679
+ mounted: boolean;
1680
+ transitionStatus: TransitionStatus_2;
1681
+ floatingRootContext: FloatingRootContext_2;
1682
+ floatingId: string | undefined;
1683
+ triggerCount: number;
1684
+ preventUnmountingOnClose: boolean;
1685
+ payload: unknown;
1686
+ activeTriggerId: string | null;
1687
+ activeTriggerElement: Element | null;
1688
+ readonly triggerIdProp: string | null | undefined;
1689
+ popupElement: HTMLElement | null;
1690
+ positionerElement: HTMLElement | null;
1691
+ activeTriggerProps: HTMLProps;
1692
+ inactiveTriggerProps: HTMLProps;
1693
+ popupProps: HTMLProps;
1694
+ }) => boolean;
1695
+ mounted: (state: {
1696
+ open: boolean;
1697
+ readonly openProp: boolean | undefined;
1698
+ mounted: boolean;
1699
+ transitionStatus: TransitionStatus_2;
1700
+ floatingRootContext: FloatingRootContext_2;
1701
+ floatingId: string | undefined;
1702
+ triggerCount: number;
1703
+ preventUnmountingOnClose: boolean;
1704
+ payload: unknown;
1705
+ activeTriggerId: string | null;
1706
+ activeTriggerElement: Element | null;
1707
+ readonly triggerIdProp: string | null | undefined;
1708
+ popupElement: HTMLElement | null;
1709
+ positionerElement: HTMLElement | null;
1710
+ activeTriggerProps: HTMLProps;
1711
+ inactiveTriggerProps: HTMLProps;
1712
+ popupProps: HTMLProps;
1713
+ }) => boolean;
1714
+ transitionStatus: (state: {
1715
+ open: boolean;
1716
+ readonly openProp: boolean | undefined;
1717
+ mounted: boolean;
1718
+ transitionStatus: TransitionStatus_2;
1719
+ floatingRootContext: FloatingRootContext_2;
1720
+ floatingId: string | undefined;
1721
+ triggerCount: number;
1722
+ preventUnmountingOnClose: boolean;
1723
+ payload: unknown;
1724
+ activeTriggerId: string | null;
1725
+ activeTriggerElement: Element | null;
1726
+ readonly triggerIdProp: string | null | undefined;
1727
+ popupElement: HTMLElement | null;
1728
+ positionerElement: HTMLElement | null;
1729
+ activeTriggerProps: HTMLProps;
1730
+ inactiveTriggerProps: HTMLProps;
1731
+ popupProps: HTMLProps;
1732
+ }) => TransitionStatus_2;
1733
+ floatingRootContext: (state: {
1734
+ open: boolean;
1735
+ readonly openProp: boolean | undefined;
1736
+ mounted: boolean;
1737
+ transitionStatus: TransitionStatus_2;
1738
+ floatingRootContext: FloatingRootContext_2;
1739
+ floatingId: string | undefined;
1740
+ triggerCount: number;
1741
+ preventUnmountingOnClose: boolean;
1742
+ payload: unknown;
1743
+ activeTriggerId: string | null;
1744
+ activeTriggerElement: Element | null;
1745
+ readonly triggerIdProp: string | null | undefined;
1746
+ popupElement: HTMLElement | null;
1747
+ positionerElement: HTMLElement | null;
1748
+ activeTriggerProps: HTMLProps;
1749
+ inactiveTriggerProps: HTMLProps;
1750
+ popupProps: HTMLProps;
1751
+ }) => FloatingRootStore_2;
1752
+ triggerCount: (state: {
1753
+ open: boolean;
1754
+ readonly openProp: boolean | undefined;
1755
+ mounted: boolean;
1756
+ transitionStatus: TransitionStatus_2;
1757
+ floatingRootContext: FloatingRootContext_2;
1758
+ floatingId: string | undefined;
1759
+ triggerCount: number;
1760
+ preventUnmountingOnClose: boolean;
1761
+ payload: unknown;
1762
+ activeTriggerId: string | null;
1763
+ activeTriggerElement: Element | null;
1764
+ readonly triggerIdProp: string | null | undefined;
1765
+ popupElement: HTMLElement | null;
1766
+ positionerElement: HTMLElement | null;
1767
+ activeTriggerProps: HTMLProps;
1768
+ inactiveTriggerProps: HTMLProps;
1769
+ popupProps: HTMLProps;
1770
+ }) => number;
1771
+ preventUnmountingOnClose: (state: {
1772
+ open: boolean;
1773
+ readonly openProp: boolean | undefined;
1774
+ mounted: boolean;
1775
+ transitionStatus: TransitionStatus_2;
1776
+ floatingRootContext: FloatingRootContext_2;
1777
+ floatingId: string | undefined;
1778
+ triggerCount: number;
1779
+ preventUnmountingOnClose: boolean;
1780
+ payload: unknown;
1781
+ activeTriggerId: string | null;
1782
+ activeTriggerElement: Element | null;
1783
+ readonly triggerIdProp: string | null | undefined;
1784
+ popupElement: HTMLElement | null;
1785
+ positionerElement: HTMLElement | null;
1786
+ activeTriggerProps: HTMLProps;
1787
+ inactiveTriggerProps: HTMLProps;
1788
+ popupProps: HTMLProps;
1789
+ }) => boolean;
1790
+ payload: (state: {
1791
+ open: boolean;
1792
+ readonly openProp: boolean | undefined;
1793
+ mounted: boolean;
1794
+ transitionStatus: TransitionStatus_2;
1795
+ floatingRootContext: FloatingRootContext_2;
1796
+ floatingId: string | undefined;
1797
+ triggerCount: number;
1798
+ preventUnmountingOnClose: boolean;
1799
+ payload: unknown;
1800
+ activeTriggerId: string | null;
1801
+ activeTriggerElement: Element | null;
1802
+ readonly triggerIdProp: string | null | undefined;
1803
+ popupElement: HTMLElement | null;
1804
+ positionerElement: HTMLElement | null;
1805
+ activeTriggerProps: HTMLProps;
1806
+ inactiveTriggerProps: HTMLProps;
1807
+ popupProps: HTMLProps;
1808
+ }) => unknown;
1809
+ activeTriggerId: (state: {
1810
+ open: boolean;
1811
+ readonly openProp: boolean | undefined;
1812
+ mounted: boolean;
1813
+ transitionStatus: TransitionStatus_2;
1814
+ floatingRootContext: FloatingRootContext_2;
1815
+ floatingId: string | undefined;
1816
+ triggerCount: number;
1817
+ preventUnmountingOnClose: boolean;
1818
+ payload: unknown;
1819
+ activeTriggerId: string | null;
1820
+ activeTriggerElement: Element | null;
1821
+ readonly triggerIdProp: string | null | undefined;
1822
+ popupElement: HTMLElement | null;
1823
+ positionerElement: HTMLElement | null;
1824
+ activeTriggerProps: HTMLProps;
1825
+ inactiveTriggerProps: HTMLProps;
1826
+ popupProps: HTMLProps;
1827
+ }) => string | null;
1828
+ activeTriggerElement: (state: {
1829
+ open: boolean;
1830
+ readonly openProp: boolean | undefined;
1831
+ mounted: boolean;
1832
+ transitionStatus: TransitionStatus_2;
1833
+ floatingRootContext: FloatingRootContext_2;
1834
+ floatingId: string | undefined;
1835
+ triggerCount: number;
1836
+ preventUnmountingOnClose: boolean;
1837
+ payload: unknown;
1838
+ activeTriggerId: string | null;
1839
+ activeTriggerElement: Element | null;
1840
+ readonly triggerIdProp: string | null | undefined;
1841
+ popupElement: HTMLElement | null;
1842
+ positionerElement: HTMLElement | null;
1843
+ activeTriggerProps: HTMLProps;
1844
+ inactiveTriggerProps: HTMLProps;
1845
+ popupProps: HTMLProps;
1846
+ }) => Element | null;
1847
+ popupId: (state: {
1848
+ open: boolean;
1849
+ readonly openProp: boolean | undefined;
1850
+ mounted: boolean;
1851
+ transitionStatus: TransitionStatus_2;
1852
+ floatingRootContext: FloatingRootContext_2;
1853
+ floatingId: string | undefined;
1854
+ triggerCount: number;
1855
+ preventUnmountingOnClose: boolean;
1856
+ payload: unknown;
1857
+ activeTriggerId: string | null;
1858
+ activeTriggerElement: Element | null;
1859
+ readonly triggerIdProp: string | null | undefined;
1860
+ popupElement: HTMLElement | null;
1861
+ positionerElement: HTMLElement | null;
1862
+ activeTriggerProps: HTMLProps;
1863
+ inactiveTriggerProps: HTMLProps;
1864
+ popupProps: HTMLProps;
1865
+ }) => string | undefined;
1866
+ isTriggerActive: (state: {
1867
+ open: boolean;
1868
+ readonly openProp: boolean | undefined;
1869
+ mounted: boolean;
1870
+ transitionStatus: TransitionStatus_2;
1871
+ floatingRootContext: FloatingRootContext_2;
1872
+ floatingId: string | undefined;
1873
+ triggerCount: number;
1874
+ preventUnmountingOnClose: boolean;
1875
+ payload: unknown;
1876
+ activeTriggerId: string | null;
1877
+ activeTriggerElement: Element | null;
1878
+ readonly triggerIdProp: string | null | undefined;
1879
+ popupElement: HTMLElement | null;
1880
+ positionerElement: HTMLElement | null;
1881
+ activeTriggerProps: HTMLProps;
1882
+ inactiveTriggerProps: HTMLProps;
1883
+ popupProps: HTMLProps;
1884
+ }, triggerId: string | undefined) => boolean;
1885
+ isOpenedByTrigger: (state: {
1886
+ open: boolean;
1887
+ readonly openProp: boolean | undefined;
1888
+ mounted: boolean;
1889
+ transitionStatus: TransitionStatus_2;
1890
+ floatingRootContext: FloatingRootContext_2;
1891
+ floatingId: string | undefined;
1892
+ triggerCount: number;
1893
+ preventUnmountingOnClose: boolean;
1894
+ payload: unknown;
1895
+ activeTriggerId: string | null;
1896
+ activeTriggerElement: Element | null;
1897
+ readonly triggerIdProp: string | null | undefined;
1898
+ popupElement: HTMLElement | null;
1899
+ positionerElement: HTMLElement | null;
1900
+ activeTriggerProps: HTMLProps;
1901
+ inactiveTriggerProps: HTMLProps;
1902
+ popupProps: HTMLProps;
1903
+ }, triggerId: string | undefined) => boolean;
1904
+ isMountedByTrigger: (state: {
1905
+ open: boolean;
1906
+ readonly openProp: boolean | undefined;
1907
+ mounted: boolean;
1908
+ transitionStatus: TransitionStatus_2;
1909
+ floatingRootContext: FloatingRootContext_2;
1910
+ floatingId: string | undefined;
1911
+ triggerCount: number;
1912
+ preventUnmountingOnClose: boolean;
1913
+ payload: unknown;
1914
+ activeTriggerId: string | null;
1915
+ activeTriggerElement: Element | null;
1916
+ readonly triggerIdProp: string | null | undefined;
1917
+ popupElement: HTMLElement | null;
1918
+ positionerElement: HTMLElement | null;
1919
+ activeTriggerProps: HTMLProps;
1920
+ inactiveTriggerProps: HTMLProps;
1921
+ popupProps: HTMLProps;
1922
+ }, triggerId: string | undefined) => boolean;
1923
+ triggerProps: (state: {
1924
+ open: boolean;
1925
+ readonly openProp: boolean | undefined;
1926
+ mounted: boolean;
1927
+ transitionStatus: TransitionStatus_2;
1928
+ floatingRootContext: FloatingRootContext_2;
1929
+ floatingId: string | undefined;
1930
+ triggerCount: number;
1931
+ preventUnmountingOnClose: boolean;
1932
+ payload: unknown;
1933
+ activeTriggerId: string | null;
1934
+ activeTriggerElement: Element | null;
1935
+ readonly triggerIdProp: string | null | undefined;
1936
+ popupElement: HTMLElement | null;
1937
+ positionerElement: HTMLElement | null;
1938
+ activeTriggerProps: HTMLProps;
1939
+ inactiveTriggerProps: HTMLProps;
1940
+ popupProps: HTMLProps;
1941
+ }, isActive: boolean) => HTMLProps;
1942
+ triggerPopupId: (state: {
1943
+ open: boolean;
1944
+ readonly openProp: boolean | undefined;
1945
+ mounted: boolean;
1946
+ transitionStatus: TransitionStatus_2;
1947
+ floatingRootContext: FloatingRootContext_2;
1948
+ floatingId: string | undefined;
1949
+ triggerCount: number;
1950
+ preventUnmountingOnClose: boolean;
1951
+ payload: unknown;
1952
+ activeTriggerId: string | null;
1953
+ activeTriggerElement: Element | null;
1954
+ readonly triggerIdProp: string | null | undefined;
1955
+ popupElement: HTMLElement | null;
1956
+ positionerElement: HTMLElement | null;
1957
+ activeTriggerProps: HTMLProps;
1958
+ inactiveTriggerProps: HTMLProps;
1959
+ popupProps: HTMLProps;
1960
+ }, triggerId: string | undefined) => string | undefined;
1961
+ popupProps: (state: {
1962
+ open: boolean;
1963
+ readonly openProp: boolean | undefined;
1964
+ mounted: boolean;
1965
+ transitionStatus: TransitionStatus_2;
1966
+ floatingRootContext: FloatingRootContext_2;
1967
+ floatingId: string | undefined;
1968
+ triggerCount: number;
1969
+ preventUnmountingOnClose: boolean;
1970
+ payload: unknown;
1971
+ activeTriggerId: string | null;
1972
+ activeTriggerElement: Element | null;
1973
+ readonly triggerIdProp: string | null | undefined;
1974
+ popupElement: HTMLElement | null;
1975
+ positionerElement: HTMLElement | null;
1976
+ activeTriggerProps: HTMLProps;
1977
+ inactiveTriggerProps: HTMLProps;
1978
+ popupProps: HTMLProps;
1979
+ }) => HTMLProps;
1980
+ popupElement: (state: {
1981
+ open: boolean;
1982
+ readonly openProp: boolean | undefined;
1983
+ mounted: boolean;
1984
+ transitionStatus: TransitionStatus_2;
1985
+ floatingRootContext: FloatingRootContext_2;
1986
+ floatingId: string | undefined;
1987
+ triggerCount: number;
1988
+ preventUnmountingOnClose: boolean;
1989
+ payload: unknown;
1990
+ activeTriggerId: string | null;
1991
+ activeTriggerElement: Element | null;
1992
+ readonly triggerIdProp: string | null | undefined;
1993
+ popupElement: HTMLElement | null;
1994
+ positionerElement: HTMLElement | null;
1995
+ activeTriggerProps: HTMLProps;
1996
+ inactiveTriggerProps: HTMLProps;
1997
+ popupProps: HTMLProps;
1998
+ }) => HTMLElement | null;
1999
+ positionerElement: (state: {
2000
+ open: boolean;
2001
+ readonly openProp: boolean | undefined;
2002
+ mounted: boolean;
2003
+ transitionStatus: TransitionStatus_2;
2004
+ floatingRootContext: FloatingRootContext_2;
2005
+ floatingId: string | undefined;
2006
+ triggerCount: number;
2007
+ preventUnmountingOnClose: boolean;
2008
+ payload: unknown;
2009
+ activeTriggerId: string | null;
2010
+ activeTriggerElement: Element | null;
2011
+ readonly triggerIdProp: string | null | undefined;
2012
+ popupElement: HTMLElement | null;
2013
+ positionerElement: HTMLElement | null;
2014
+ activeTriggerProps: HTMLProps;
2015
+ inactiveTriggerProps: HTMLProps;
2016
+ popupProps: HTMLProps;
2017
+ }) => HTMLElement | null;
2018
+ };
2019
+
2020
+ /**
2021
+ * A separator element accessible to screen readers.
2022
+ * Renders a `<div>` element.
2023
+ *
2024
+ * Documentation: [Base UI Separator](https://base-ui.com/react/components/separator)
2025
+ */
2026
+ declare const Separator: React_2.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
2027
+
2028
+ declare namespace Separator {
2029
+ type Props = SeparatorProps;
2030
+ type State = SeparatorState;
2031
+ }
2032
+
2033
+ declare interface SeparatorProps extends BaseUIComponentProps<'div', SeparatorState> {
2034
+ /**
2035
+ * The orientation of the separator.
2036
+ * @default 'horizontal'
2037
+ */
2038
+ orientation?: Orientation | undefined;
2039
+ }
2040
+
2041
+ declare interface SeparatorState {
2042
+ /**
2043
+ * The orientation of the separator.
2044
+ */
2045
+ orientation: Orientation;
2046
+ }
2047
+
2048
+ declare const siblingOpen: "sibling-open";
2049
+
2050
+ declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
2051
+
2052
+ declare interface SideFlipMode {
2053
+ /**
2054
+ * How to avoid collisions on the side axis.
2055
+ * - `'flip'`: If there is not enough space, place the popup on the opposite side.
2056
+ * - `'none'`: Keep the preferred side even if it overflows.
2057
+ */
2058
+ side?: 'flip' | 'none' | undefined;
2059
+ /**
2060
+ * How to avoid collisions on the align axis.
2061
+ * - `'flip'`: If there is not enough space, swap `'start'` and `'end'` alignment.
2062
+ * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
2063
+ * - `'none'`: Keep the preferred alignment even if it overflows.
2064
+ */
2065
+ align?: 'flip' | 'shift' | 'none' | undefined;
2066
+ /**
2067
+ * If both sides on the preferred axis do not fit, determines whether to fallback
2068
+ * to a side on the perpendicular axis and which logical side to prefer.
2069
+ * - `'start'`: Prefer the logical start side on the perpendicular axis.
2070
+ * - `'end'`: Prefer the logical end side on the perpendicular axis.
2071
+ * - `'none'`: Do not fallback to the perpendicular axis.
2072
+ */
2073
+ fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
2074
+ }
2075
+
2076
+ declare interface SideShiftMode {
2077
+ /**
2078
+ * How to avoid collisions on the side axis.
2079
+ * - `'shift'`: Keep the preferred side and shift the popup to fit within the boundary.
2080
+ * - `'none'`: Keep the preferred side even if it overflows.
2081
+ */
2082
+ side?: 'shift' | 'none' | undefined;
2083
+ /**
2084
+ * How to avoid collisions on the align axis.
2085
+ * - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
2086
+ * - `'none'`: Keep the preferred alignment even if it overflows.
2087
+ */
2088
+ align?: 'shift' | 'none' | undefined;
2089
+ /**
2090
+ * If both sides on the preferred axis do not fit, determines whether to fallback
2091
+ * to a side on the perpendicular axis and which logical side to prefer.
2092
+ * - `'start'`: Prefer the logical start side on the perpendicular axis.
2093
+ * - `'end'`: Prefer the logical end side on the perpendicular axis.
2094
+ * - `'none'`: Do not fallback to the perpendicular axis.
2095
+ */
2096
+ fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
2097
+ }
2098
+
2099
+ declare type State<Payload> = PopupStoreState<Payload> & {
2100
+ disabled: boolean;
2101
+ modal: boolean;
2102
+ openMethod: InteractionType | null;
2103
+ allowMouseEnter: boolean;
2104
+ parent: MenuParent;
2105
+ rootId: string | undefined;
2106
+ activeIndex: number | null;
2107
+ hoverEnabled: boolean;
2108
+ stickIfOpen: boolean;
2109
+ instantType: 'dismiss' | 'click' | 'group' | 'trigger-change' | undefined;
2110
+ openChangeReason: MenuRoot.ChangeEventReason | null;
2111
+ floatingTreeRoot: FloatingTreeStore;
2112
+ floatingNodeId: string | undefined;
2113
+ floatingParentNodeId: string | null;
2114
+ itemProps: HTMLProps;
2115
+ closeDelay: number;
2116
+ keyboardEventRelay: ((event: React_2.KeyboardEvent<any>) => void) | undefined;
2117
+ hasViewport: boolean;
2118
+ };
2119
+
2120
+ declare const swipe: "swipe";
2121
+
2122
+ declare const trackPress: "track-press";
2123
+
2124
+ declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
2125
+
2126
+ declare const triggerFocus: "trigger-focus";
2127
+
2128
+ declare const triggerHover: "trigger-hover";
2129
+
2130
+ declare const triggerPress: "trigger-press";
2131
+
2132
+ declare interface UseAnchorPositioningSharedParameters {
2133
+ /**
2134
+ * An element to position the popup against.
2135
+ * By default, the popup will be positioned against the trigger.
2136
+ */
2137
+ anchor?: Element | null | VirtualElement | React_2.RefObject<Element | null> | (() => Element | VirtualElement | null) | undefined;
2138
+ /**
2139
+ * Determines which CSS `position` property to use.
2140
+ * @default 'absolute'
2141
+ */
2142
+ positionMethod?: 'absolute' | 'fixed' | undefined;
2143
+ /**
2144
+ * Which side of the anchor element to align the popup against.
2145
+ * May automatically change to avoid collisions.
2146
+ * @default 'bottom'
2147
+ */
2148
+ side?: Side | undefined;
2149
+ /**
2150
+ * Distance between the anchor and the popup in pixels.
2151
+ * Also accepts a function that returns the distance to read the dimensions of the anchor
2152
+ * and positioner elements, along with its side and alignment.
2153
+ *
2154
+ * The function takes a `data` object parameter with the following properties:
2155
+ * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
2156
+ * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
2157
+ * - `data.side`: which side of the anchor element the positioner is aligned against.
2158
+ * - `data.align`: how the positioner is aligned relative to the specified side.
2159
+ *
2160
+ * @example
2161
+ * ```jsx
2162
+ * <Positioner
2163
+ * sideOffset={({ side, align, anchor, positioner }) => {
2164
+ * return side === 'top' || side === 'bottom'
2165
+ * ? anchor.height
2166
+ * : anchor.width;
2167
+ * }}
2168
+ * />
2169
+ * ```
2170
+ *
2171
+ * @default 0
2172
+ */
2173
+ sideOffset?: number | OffsetFunction | undefined;
2174
+ /**
2175
+ * How to align the popup relative to the specified side.
2176
+ * @default 'center'
2177
+ */
2178
+ align?: Align | undefined;
2179
+ /**
2180
+ * Additional offset along the alignment axis in pixels.
2181
+ * Also accepts a function that returns the offset to read the dimensions of the anchor
2182
+ * and positioner elements, along with its side and alignment.
2183
+ *
2184
+ * The function takes a `data` object parameter with the following properties:
2185
+ * - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
2186
+ * - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
2187
+ * - `data.side`: which side of the anchor element the positioner is aligned against.
2188
+ * - `data.align`: how the positioner is aligned relative to the specified side.
2189
+ *
2190
+ * @example
2191
+ * ```jsx
2192
+ * <Positioner
2193
+ * alignOffset={({ side, align, anchor, positioner }) => {
2194
+ * return side === 'top' || side === 'bottom'
2195
+ * ? anchor.width
2196
+ * : anchor.height;
2197
+ * }}
2198
+ * />
2199
+ * ```
2200
+ *
2201
+ * @default 0
2202
+ */
2203
+ alignOffset?: number | OffsetFunction | undefined;
2204
+ /**
2205
+ * An element or a rectangle that delimits the area that the popup is confined to.
2206
+ * @default 'clipping-ancestors'
2207
+ */
2208
+ collisionBoundary?: Boundary | undefined;
2209
+ /**
2210
+ * Additional space to maintain from the edge of the collision boundary.
2211
+ * @default 5
2212
+ */
2213
+ collisionPadding?: Padding | undefined;
2214
+ /**
2215
+ * Whether to maintain the popup in the viewport after
2216
+ * the anchor element was scrolled out of view.
2217
+ * @default false
2218
+ */
2219
+ sticky?: boolean | undefined;
2220
+ /**
2221
+ * Minimum distance to maintain between the arrow and the edges of the popup.
2222
+ *
2223
+ * Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
2224
+ * @default 5
2225
+ */
2226
+ arrowPadding?: number | undefined;
2227
+ /**
2228
+ * Whether to disable the popup from tracking any layout shift of its positioning anchor.
2229
+ * @default false
2230
+ */
2231
+ disableAnchorTracking?: boolean | undefined;
2232
+ /**
2233
+ * Determines how to handle collisions when positioning the popup.
2234
+ *
2235
+ * `side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):
2236
+ * - `'flip'`: keep the requested side when it fits; otherwise try the opposite side
2237
+ * (`top` and `bottom`, or `left` and `right`).
2238
+ * - `'shift'`: never change side; keep the requested side and move the popup within
2239
+ * the clipping boundary so it stays visible.
2240
+ * - `'none'`: do not correct side-axis overflow.
2241
+ *
2242
+ * `align` controls overflow on the alignment axis (`start`/`center`/`end`):
2243
+ * - `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.
2244
+ * - `'shift'`: keep side and requested alignment, then nudge the popup along the
2245
+ * alignment axis to fit.
2246
+ * - `'none'`: do not correct alignment-axis overflow.
2247
+ *
2248
+ * `fallbackAxisSide` controls fallback behavior on the perpendicular axis when the
2249
+ * preferred axis cannot fit:
2250
+ * - `'start'`: allow perpendicular fallback and try the logical start side first
2251
+ * (`top` before `bottom`, or `left` before `right` in LTR).
2252
+ * - `'end'`: allow perpendicular fallback and try the logical end side first
2253
+ * (`bottom` before `top`, or `right` before `left` in LTR).
2254
+ * - `'none'`: do not fallback to the perpendicular axis.
2255
+ *
2256
+ * When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`.
2257
+ * If `align` is omitted, it defaults to `'flip'`.
2258
+ *
2259
+ * @example
2260
+ * ```jsx
2261
+ * <Positioner
2262
+ * collisionAvoidance={{
2263
+ * side: 'shift',
2264
+ * align: 'shift',
2265
+ * fallbackAxisSide: 'none',
2266
+ * }}
2267
+ * />
2268
+ * ```
2269
+ *
2270
+ */
2271
+ collisionAvoidance?: CollisionAvoidance | undefined;
2272
+ }
2273
+
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";
2299
+
2300
+ declare const windowResize: "window-resize";
2301
+
2302
+ /**
2303
+ * Adds a `preventBaseUIHandler` method to all event handlers.
2304
+ */
2305
+ declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
8
2306
 
9
- export * from "@base-ui/react/menubar";
2307
+ declare type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React_2.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
10
2308
 
11
2309
  export { }