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