@wix/site-ui 1.30.0 → 1.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1268.js +99 -0
- package/dist/1279.js +7 -0
- package/dist/1457.js +10 -0
- package/dist/1477.js +106 -0
- package/dist/1500.js +111 -0
- package/dist/167.js +6 -0
- package/dist/2274.js +34 -0
- package/dist/2287.js +17 -0
- package/dist/2418.js +31 -0
- package/dist/2801.js +20 -0
- package/dist/285.js +86 -0
- package/dist/2861.js +6 -0
- package/dist/3020.js +7 -0
- package/dist/3021.js +72 -0
- package/dist/3056.js +229 -0
- package/dist/3140.js +4 -0
- package/dist/3248.js +307 -0
- package/dist/3296.js +4 -0
- package/dist/3319.js +400 -0
- package/dist/3395.js +4 -0
- package/dist/3485.js +854 -0
- package/dist/353.js +14 -0
- package/dist/3670.js +418 -0
- package/dist/3829.js +113 -0
- package/dist/4026.js +12 -0
- package/dist/4143.js +46 -0
- package/dist/42.js +32 -0
- package/dist/4281.js +30 -0
- package/dist/4346.js +2 -0
- package/dist/4388.js +418 -0
- package/dist/4490.js +32 -0
- package/dist/4495.js +9 -0
- package/dist/4549.js +24 -0
- package/dist/4586.js +41 -0
- package/dist/4586.js.LICENSE.txt +19 -0
- package/dist/4707.js +19 -0
- package/dist/4723.js +7 -0
- package/dist/4745.js +7 -0
- package/dist/4768.js +35 -0
- package/dist/4922.js +15 -0
- package/dist/5036.js +17 -0
- package/dist/5085.js +20 -0
- package/dist/5299.js +597 -0
- package/dist/5659.js +4 -0
- package/dist/5778.js +10 -0
- package/dist/5864.js +86 -0
- package/dist/5992.js +913 -0
- package/dist/5992.js.LICENSE.txt +19 -0
- package/dist/6003.js +10 -0
- package/dist/6046.js +29 -0
- package/dist/6089.js +2355 -0
- package/dist/6107.js +10 -0
- package/dist/6247.js +20 -0
- package/dist/6270.js +487 -0
- package/dist/6329.js +32 -0
- package/dist/6330.js +30 -0
- package/dist/6499.js +7 -0
- package/dist/6535.js +71 -0
- package/dist/6588.js +382 -0
- package/dist/6706.js +16 -0
- package/dist/6825.js +7 -0
- package/dist/6882.js +1562 -0
- package/dist/6914.js +30 -0
- package/dist/7021.js +13 -0
- package/dist/7366.js +83 -0
- package/dist/7373.js +25 -0
- package/dist/7541.js +25 -0
- package/dist/7564.js +10 -0
- package/dist/7642.js +20 -0
- package/dist/7725.js +10 -0
- package/dist/7871.js +38 -0
- package/dist/8052.js +352 -0
- package/dist/8106.js +238 -0
- package/dist/8171.js +346 -0
- package/dist/8225.js +21 -0
- package/dist/8272.js +333 -0
- package/dist/8527.js +58 -0
- package/dist/8724.js +10 -0
- package/dist/8750.js +1920 -0
- package/dist/8758.js +43 -0
- package/dist/880.js +149 -0
- package/dist/8935.js +8 -0
- package/dist/8960.js +22 -0
- package/dist/8971.js +40 -0
- package/dist/8979.js +10 -0
- package/dist/8996.js +71 -0
- package/dist/904.js +121 -0
- package/dist/9048.js +52 -0
- package/dist/9087.js +256 -0
- package/dist/9189.js +158 -0
- package/dist/9255.js +136 -0
- package/dist/9352.js +148 -0
- package/dist/951.js +22 -0
- package/dist/9635.js +22 -0
- package/dist/9829.js +4 -0
- package/dist/9863.js +8 -0
- package/dist/Accordion/index.d.ts +569 -12
- package/dist/Accordion/index.js +423 -8
- package/dist/AlertDialog/index.d.ts +1417 -18
- package/dist/AlertDialog/index.js +34 -14
- package/dist/Autocomplete/index.d.ts +1861 -38
- package/dist/Autocomplete/index.js +98 -24
- package/dist/Avatar/index.d.ts +129 -7
- package/dist/Avatar/index.js +149 -6
- package/dist/Breadcrumbs/index.d.ts +960 -7
- package/dist/Breadcrumbs/index.js +5 -5
- package/dist/Button/index.d.ts +88 -6
- package/dist/Button/index.js +27 -3
- package/dist/Checkbox/index.d.ts +425 -5
- package/dist/Checkbox/index.js +45 -5
- package/dist/CheckboxGroup/index.d.ts +318 -3
- package/dist/CheckboxGroup/index.js +166 -3
- package/dist/Collapsible/index.d.ts +377 -7
- package/dist/Collapsible/index.js +160 -6
- package/dist/Combobox/index.d.ts +1984 -48
- package/dist/Combobox/index.js +352 -29
- package/dist/ContextMenu/index.d.ts +2340 -36
- package/dist/ContextMenu/index.js +197 -22
- package/dist/Dialog/index.d.ts +1355 -18
- package/dist/Dialog/index.js +16 -14
- package/dist/Drawer/index.d.ts +1653 -18
- package/dist/Drawer/index.js +2797 -20
- package/dist/Field/index.d.ts +655 -15
- package/dist/Field/index.js +677 -10
- package/dist/Fieldset/index.d.ts +94 -5
- package/dist/Fieldset/index.js +68 -5
- package/dist/Form/index.d.ts +331 -2
- package/dist/Form/index.js +106 -3
- package/dist/Input/index.d.ts +692 -3
- package/dist/Input/index.js +10 -3
- package/dist/Menu/index.d.ts +2301 -36
- package/dist/Menu/index.js +365 -26
- package/dist/Menubar/index.d.ts +2301 -3
- package/dist/Menubar/index.js +105 -3
- package/dist/Meter/index.d.ts +175 -11
- package/dist/Meter/index.js +129 -9
- package/dist/NavigationMenu/index.d.ts +978 -28
- package/dist/NavigationMenu/index.js +1034 -17
- package/dist/NumberField/index.d.ts +612 -15
- package/dist/NumberField/index.js +1409 -11
- package/dist/Popover/index.d.ts +1655 -20
- package/dist/Popover/index.js +792 -17
- package/dist/PreviewCard/index.d.ts +1523 -14
- package/dist/PreviewCard/index.js +679 -14
- package/dist/Progress/index.d.ts +183 -11
- package/dist/Progress/index.js +181 -9
- package/dist/Radio/index.d.ts +185 -6
- package/dist/Radio/index.js +253 -6
- package/dist/RadioGroup/index.d.ts +341 -2
- package/dist/RadioGroup/index.js +154 -3
- package/dist/ScrollArea/index.d.ts +265 -13
- package/dist/ScrollArea/index.js +892 -10
- package/dist/Select/index.d.ts +1493 -38
- package/dist/Select/index.js +1824 -23
- package/dist/Separator/index.d.ts +80 -6
- package/dist/Separator/index.js +3 -3
- package/dist/Slider/index.d.ts +678 -16
- package/dist/Slider/index.js +1199 -11
- package/dist/Switch/index.d.ts +393 -5
- package/dist/Switch/index.js +208 -6
- package/dist/Tabs/index.d.ts +523 -12
- package/dist/Tabs/index.js +685 -9
- package/dist/Toggle/index.d.ts +305 -2
- package/dist/Toggle/index.js +76 -3
- package/dist/ToggleGroup/index.d.ts +316 -2
- package/dist/ToggleGroup/index.js +102 -3
- package/dist/Toolbar/index.d.ts +282 -13
- package/dist/Toolbar/index.js +230 -9
- package/dist/Tooltip/index.d.ts +1572 -14
- package/dist/Tooltip/index.js +965 -14
- package/dist/index.d.ts +12749 -652
- package/dist/rslib-runtime.js +18 -0
- package/package.json +3 -3
|
@@ -1,19 +1,90 @@
|
|
|
1
1
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { NavigationMenuItemProps as NavigationMenuItemProps_2 } from '@base-ui/react/navigation-menu';
|
|
3
|
+
import { NavigationMenuLinkProps as NavigationMenuLinkProps_2 } from '@base-ui/react/navigation-menu';
|
|
4
|
+
import { NavigationMenuListProps as NavigationMenuListProps_2 } from '@base-ui/react/navigation-menu';
|
|
5
|
+
import { Padding } from '@floating-ui/react-dom';
|
|
6
6
|
import * as React_2 from 'react';
|
|
7
|
+
import { Rect } from '@floating-ui/utils';
|
|
8
|
+
import { VirtualElement } from '@floating-ui/react-dom';
|
|
9
|
+
|
|
10
|
+
declare type Align = 'start' | 'center' | 'end';
|
|
11
|
+
|
|
12
|
+
declare type BaseUIChangeEventDetail<Reason extends string, CustomProperties extends object> = {
|
|
13
|
+
/**
|
|
14
|
+
* The reason for the event.
|
|
15
|
+
*/
|
|
16
|
+
reason: Reason;
|
|
17
|
+
/**
|
|
18
|
+
* The native event associated with the custom event.
|
|
19
|
+
*/
|
|
20
|
+
event: ReasonToEvent<Reason>;
|
|
21
|
+
/**
|
|
22
|
+
* Cancels Base UI from handling the event.
|
|
23
|
+
*/
|
|
24
|
+
cancel: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Allows the event to propagate in cases where Base UI will stop the propagation.
|
|
27
|
+
*/
|
|
28
|
+
allowPropagation: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Indicates whether the event has been canceled.
|
|
31
|
+
*/
|
|
32
|
+
isCanceled: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Indicates whether the event is allowed to propagate.
|
|
35
|
+
*/
|
|
36
|
+
isPropagationAllowed: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The element that triggered the event, if applicable.
|
|
39
|
+
*/
|
|
40
|
+
trigger: Element | undefined;
|
|
41
|
+
} & CustomProperties;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Details of custom change events emitted by Base UI components.
|
|
45
|
+
*/
|
|
46
|
+
declare type BaseUIChangeEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIChangeEventDetail<Reason, CustomProperties> & {} : never;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Props shared by all Base UI components.
|
|
50
|
+
* Contains `className` (string or callback taking the component's state as an argument) and `render` (function to customize rendering).
|
|
51
|
+
*/
|
|
52
|
+
declare type BaseUIComponentProps<ElementType extends React_2.ElementType, State, RenderFunctionProps = HTMLProps> = Omit<WithBaseUIEvent<React_2.ComponentPropsWithRef<ElementType>>, 'className' | 'color' | 'defaultValue' | 'defaultChecked' | 'style'> & {
|
|
53
|
+
/**
|
|
54
|
+
* CSS class applied to the element, or a function that
|
|
55
|
+
* returns a class based on the component's state.
|
|
56
|
+
*/
|
|
57
|
+
className?: string | ((state: State) => string | undefined) | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Allows you to replace the component's HTML element
|
|
60
|
+
* with a different tag, or compose it with another component.
|
|
61
|
+
*
|
|
62
|
+
* Accepts a `ReactElement` or a function that returns the element to render.
|
|
63
|
+
*/
|
|
64
|
+
render?: React_2.ReactElement | ComponentRenderFn<RenderFunctionProps, State> | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Style applied to the element, or a function that
|
|
67
|
+
* returns a style object based on the component's state.
|
|
68
|
+
*/
|
|
69
|
+
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
declare type BaseUIEvent<E extends React_2.SyntheticEvent<Element, Event>> = E & {
|
|
73
|
+
preventBaseUIHandler: () => void;
|
|
74
|
+
readonly baseUIHandlerPrevented?: boolean | undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
|
|
7
78
|
|
|
8
79
|
export declare const Breadcrumbs: {
|
|
9
80
|
Root: typeof Root;
|
|
10
|
-
List: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
81
|
+
List: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuListProps_2, "ref"> & React_2.RefAttributes<HTMLUListElement>, "ref">, "className"> & {
|
|
11
82
|
className?: string | undefined;
|
|
12
83
|
} & React_2.RefAttributes<HTMLUListElement>>;
|
|
13
|
-
Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
84
|
+
Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuItemProps_2, "ref"> & React_2.RefAttributes<HTMLLIElement>, "ref">, "className"> & {
|
|
14
85
|
className?: string | undefined;
|
|
15
86
|
} & React_2.RefAttributes<HTMLLIElement>>;
|
|
16
|
-
Link: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
87
|
+
Link: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<NavigationMenuLinkProps_2, "ref"> & React_2.RefAttributes<HTMLAnchorElement>, "ref">, "className"> & {
|
|
17
88
|
className?: string | undefined;
|
|
18
89
|
} & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
19
90
|
Page: React_2.ForwardRefExoticComponent<{
|
|
@@ -21,10 +92,892 @@ export declare const Breadcrumbs: {
|
|
|
21
92
|
} & Omit<React_2.DetailedHTMLProps<React_2.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
22
93
|
};
|
|
23
94
|
|
|
95
|
+
declare const cancelOpen: "cancel-open";
|
|
96
|
+
|
|
97
|
+
declare const chipRemovePress: "chip-remove-press";
|
|
98
|
+
|
|
99
|
+
declare const clearPress: "clear-press";
|
|
100
|
+
|
|
101
|
+
declare const closePress: "close-press";
|
|
102
|
+
|
|
103
|
+
declare const closeWatcher: "close-watcher";
|
|
104
|
+
|
|
105
|
+
declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 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.
|
|
109
|
+
*
|
|
110
|
+
* @template Props Props to be spread on the rendered element.
|
|
111
|
+
* @template State Component's internal state.
|
|
112
|
+
*/
|
|
113
|
+
declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
|
|
114
|
+
|
|
115
|
+
declare const decrementPress: "decrement-press";
|
|
116
|
+
|
|
117
|
+
declare const disabled: "disabled";
|
|
118
|
+
|
|
119
|
+
declare const drag: "drag";
|
|
120
|
+
|
|
121
|
+
declare const escapeKey: "escape-key";
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Portals the floating element into a given container element — by default,
|
|
125
|
+
* outside of the app root and into the body.
|
|
126
|
+
* This is necessary to ensure the floating element can appear outside any
|
|
127
|
+
* potential parent containers that cause clipping (such as `overflow: hidden`),
|
|
128
|
+
* while retaining its location in the React tree.
|
|
129
|
+
* @see https://floating-ui.com/docs/FloatingPortal
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
|
|
133
|
+
renderGuards?: boolean | undefined;
|
|
134
|
+
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
135
|
+
|
|
136
|
+
declare namespace FloatingPortal {
|
|
137
|
+
type State = FloatingPortalState;
|
|
138
|
+
interface Props<TState> extends BaseUIComponentProps<'div', TState> {
|
|
139
|
+
/**
|
|
140
|
+
* A parent element to render the portal element into.
|
|
141
|
+
*/
|
|
142
|
+
container?: UseFloatingPortalNodeProps['container'] | undefined;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare interface FloatingPortalState {}
|
|
147
|
+
|
|
148
|
+
declare const focusOut: "focus-out";
|
|
149
|
+
|
|
150
|
+
declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
151
|
+
ref?: React_2.Ref<T> | undefined;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
declare const imperativeAction: "imperative-action";
|
|
155
|
+
|
|
156
|
+
declare const incrementPress: "increment-press";
|
|
157
|
+
|
|
158
|
+
declare const initial: "initial";
|
|
159
|
+
|
|
160
|
+
declare const inputBlur: "input-blur";
|
|
161
|
+
|
|
162
|
+
declare const inputChange: "input-change";
|
|
163
|
+
|
|
164
|
+
declare const inputClear: "input-clear";
|
|
165
|
+
|
|
166
|
+
declare const inputPaste: "input-paste";
|
|
167
|
+
|
|
168
|
+
declare const inputPress: "input-press";
|
|
169
|
+
|
|
170
|
+
declare const itemPress: "item-press";
|
|
171
|
+
|
|
172
|
+
declare const keyboard: "keyboard";
|
|
173
|
+
|
|
174
|
+
declare const linkPress: "link-press";
|
|
175
|
+
|
|
176
|
+
declare const listNavigation: "list-navigation";
|
|
177
|
+
|
|
178
|
+
declare const missing: "missing";
|
|
179
|
+
|
|
180
|
+
declare interface NativeButtonProps {
|
|
181
|
+
/**
|
|
182
|
+
* Whether the component renders a native `<button>` element when replacing it
|
|
183
|
+
* via the `render` prop.
|
|
184
|
+
* Set to `false` if the rendered element is not a button (for example, `<div>`).
|
|
185
|
+
* @default true
|
|
186
|
+
*/
|
|
187
|
+
nativeButton?: boolean | undefined;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export declare namespace NavigationMenu {
|
|
191
|
+
export {
|
|
192
|
+
NavigationMenuRoot as Root,
|
|
193
|
+
NavigationMenuList as List,
|
|
194
|
+
NavigationMenuItem as Item,
|
|
195
|
+
NavigationMenuContent as Content,
|
|
196
|
+
NavigationMenuTrigger as Trigger,
|
|
197
|
+
NavigationMenuPortal as Portal,
|
|
198
|
+
NavigationMenuPositioner as Positioner,
|
|
199
|
+
NavigationMenuViewport as Viewport,
|
|
200
|
+
NavigationMenuBackdrop as Backdrop,
|
|
201
|
+
NavigationMenuPopup as Popup,
|
|
202
|
+
NavigationMenuArrow as Arrow,
|
|
203
|
+
NavigationMenuLink as Link,
|
|
204
|
+
NavigationMenuIcon as Icon
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Displays an element pointing toward the navigation menu's current anchor.
|
|
210
|
+
* Renders a `<div>` element.
|
|
211
|
+
*
|
|
212
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
213
|
+
*/
|
|
214
|
+
declare const NavigationMenuArrow: React_2.ForwardRefExoticComponent<Omit<NavigationMenuArrowProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
215
|
+
|
|
216
|
+
declare namespace NavigationMenuArrow {
|
|
217
|
+
type State = NavigationMenuArrowState;
|
|
218
|
+
type Props = NavigationMenuArrowProps;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare interface NavigationMenuArrowProps extends BaseUIComponentProps<'div', NavigationMenuArrowState> {}
|
|
222
|
+
|
|
223
|
+
declare interface NavigationMenuArrowState {
|
|
224
|
+
/**
|
|
225
|
+
* Whether the popup is currently open.
|
|
226
|
+
*/
|
|
227
|
+
open: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* The side of the anchor the component is placed on.
|
|
230
|
+
*/
|
|
231
|
+
side: Side;
|
|
232
|
+
/**
|
|
233
|
+
* The alignment of the component relative to the anchor.
|
|
234
|
+
*/
|
|
235
|
+
align: Align;
|
|
236
|
+
/**
|
|
237
|
+
* Whether the arrow cannot be centered on the anchor.
|
|
238
|
+
*/
|
|
239
|
+
uncentered: boolean;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* A backdrop for the navigation menu popup.
|
|
244
|
+
* Renders a `<div>` element.
|
|
245
|
+
*
|
|
246
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
247
|
+
*/
|
|
248
|
+
declare const NavigationMenuBackdrop: React_2.ForwardRefExoticComponent<Omit<NavigationMenuBackdropProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
249
|
+
|
|
250
|
+
declare namespace NavigationMenuBackdrop {
|
|
251
|
+
type State = NavigationMenuBackdropState;
|
|
252
|
+
type Props = NavigationMenuBackdropProps;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
declare interface NavigationMenuBackdropProps extends BaseUIComponentProps<'div', NavigationMenuBackdropState> {}
|
|
256
|
+
|
|
257
|
+
declare interface NavigationMenuBackdropState {
|
|
258
|
+
/**
|
|
259
|
+
* If `true`, the popup is open.
|
|
260
|
+
*/
|
|
261
|
+
open: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* The transition status of the popup.
|
|
264
|
+
*/
|
|
265
|
+
transitionStatus: TransitionStatus;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* A container for the content of the navigation menu item that is moved into the popup
|
|
270
|
+
* when the item is active.
|
|
271
|
+
* Renders a `<div>` element.
|
|
272
|
+
*
|
|
273
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
274
|
+
*/
|
|
275
|
+
declare const NavigationMenuContent: React_2.ForwardRefExoticComponent<Omit<NavigationMenuContentProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
276
|
+
|
|
277
|
+
declare namespace NavigationMenuContent {
|
|
278
|
+
type State = NavigationMenuContentState;
|
|
279
|
+
type Props = NavigationMenuContentProps;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
declare interface NavigationMenuContentProps extends BaseUIComponentProps<'div', NavigationMenuContentState> {
|
|
283
|
+
/**
|
|
284
|
+
* Whether to keep the content mounted in the DOM while the popup is closed.
|
|
285
|
+
* Ensures the content is present during server-side rendering for web crawlers.
|
|
286
|
+
* @default false
|
|
287
|
+
*/
|
|
288
|
+
keepMounted?: boolean | undefined;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
declare interface NavigationMenuContentState {
|
|
292
|
+
/**
|
|
293
|
+
* If `true`, the component is open.
|
|
294
|
+
*/
|
|
295
|
+
open: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* The transition status of the component.
|
|
298
|
+
*/
|
|
299
|
+
transitionStatus: TransitionStatus;
|
|
300
|
+
/**
|
|
301
|
+
* The direction of the activation.
|
|
302
|
+
*/
|
|
303
|
+
activationDirection: 'left' | 'right' | 'up' | 'down' | null;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* An icon that indicates that the trigger button opens a menu.
|
|
308
|
+
*
|
|
309
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
310
|
+
*/
|
|
311
|
+
declare const NavigationMenuIcon: React_2.ForwardRefExoticComponent<Omit<NavigationMenuIconProps, "ref"> & React_2.RefAttributes<HTMLSpanElement>>;
|
|
312
|
+
|
|
313
|
+
declare namespace NavigationMenuIcon {
|
|
314
|
+
type State = NavigationMenuIconState;
|
|
315
|
+
type Props = NavigationMenuIconProps;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare interface NavigationMenuIconProps extends BaseUIComponentProps<'span', NavigationMenuIconState> {}
|
|
319
|
+
|
|
320
|
+
declare interface NavigationMenuIconState {
|
|
321
|
+
/**
|
|
322
|
+
* Whether the navigation menu is open and the item is active.
|
|
323
|
+
*/
|
|
324
|
+
open: boolean;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* An individual navigation menu item.
|
|
329
|
+
* Renders a `<li>` element.
|
|
330
|
+
*
|
|
331
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
332
|
+
*/
|
|
333
|
+
declare const NavigationMenuItem: React_2.ForwardRefExoticComponent<Omit<NavigationMenuItemProps, "ref"> & React_2.RefAttributes<HTMLLIElement>>;
|
|
334
|
+
|
|
335
|
+
declare namespace NavigationMenuItem {
|
|
336
|
+
type State = NavigationMenuItemState;
|
|
337
|
+
type Props = NavigationMenuItemProps;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
declare interface NavigationMenuItemProps extends BaseUIComponentProps<'li', NavigationMenuItemState> {
|
|
341
|
+
/**
|
|
342
|
+
* A unique value that identifies this navigation menu item.
|
|
343
|
+
* If no value is provided, a unique ID will be generated automatically.
|
|
344
|
+
* Use when controlling the navigation menu programmatically.
|
|
345
|
+
*/
|
|
346
|
+
value?: any;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
declare interface NavigationMenuItemState {}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* A link in the navigation menu that can be used to navigate to a different page or section.
|
|
353
|
+
* Renders an `<a>` element.
|
|
354
|
+
*
|
|
355
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
356
|
+
*/
|
|
357
|
+
declare const NavigationMenuLink: React_2.ForwardRefExoticComponent<Omit<NavigationMenuLinkProps, "ref"> & React_2.RefAttributes<HTMLAnchorElement>>;
|
|
358
|
+
|
|
359
|
+
declare namespace NavigationMenuLink {
|
|
360
|
+
type State = NavigationMenuLinkState;
|
|
361
|
+
type Props = NavigationMenuLinkProps;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
declare interface NavigationMenuLinkProps extends BaseUIComponentProps<'a', NavigationMenuLinkState> {
|
|
365
|
+
/**
|
|
366
|
+
* Whether the link is the currently active page.
|
|
367
|
+
* @default false
|
|
368
|
+
*/
|
|
369
|
+
active?: boolean | undefined;
|
|
370
|
+
/**
|
|
371
|
+
* Whether to close the navigation menu when the link is clicked.
|
|
372
|
+
* @default false
|
|
373
|
+
*/
|
|
374
|
+
closeOnClick?: boolean | undefined;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
declare interface NavigationMenuLinkState {
|
|
378
|
+
/**
|
|
379
|
+
* Whether the link is the currently active page.
|
|
380
|
+
*/
|
|
381
|
+
active: boolean;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Contains a list of navigation menu items.
|
|
386
|
+
* Renders a `<ul>` element.
|
|
387
|
+
*
|
|
388
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
389
|
+
*/
|
|
390
|
+
declare const NavigationMenuList: React_2.ForwardRefExoticComponent<Omit<NavigationMenuListProps, "ref"> & React_2.RefAttributes<HTMLUListElement>>;
|
|
391
|
+
|
|
392
|
+
declare namespace NavigationMenuList {
|
|
393
|
+
type State = NavigationMenuListState;
|
|
394
|
+
type Props = NavigationMenuListProps;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
declare interface NavigationMenuListProps extends BaseUIComponentProps<'ul', NavigationMenuListState> {}
|
|
398
|
+
|
|
399
|
+
declare interface NavigationMenuListState {
|
|
400
|
+
/**
|
|
401
|
+
* If `true`, the popup is open.
|
|
402
|
+
*/
|
|
403
|
+
open: boolean;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* A container for the navigation menu contents.
|
|
408
|
+
* Renders a `<nav>` element.
|
|
409
|
+
*
|
|
410
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
411
|
+
*/
|
|
412
|
+
declare const NavigationMenuPopup: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPopupProps, "ref"> & React_2.RefAttributes<HTMLElement>>;
|
|
413
|
+
|
|
414
|
+
declare namespace NavigationMenuPopup {
|
|
415
|
+
type State = NavigationMenuPopupState;
|
|
416
|
+
type Props = NavigationMenuPopupProps;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
declare interface NavigationMenuPopupProps extends BaseUIComponentProps<'nav', NavigationMenuPopupState> {}
|
|
420
|
+
|
|
421
|
+
declare interface NavigationMenuPopupState {
|
|
422
|
+
/**
|
|
423
|
+
* If `true`, the popup is open.
|
|
424
|
+
*/
|
|
425
|
+
open: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* The transition status of the popup.
|
|
428
|
+
*/
|
|
429
|
+
transitionStatus: TransitionStatus;
|
|
430
|
+
/**
|
|
431
|
+
* The side of the anchor the popup is positioned on.
|
|
432
|
+
*/
|
|
433
|
+
side: Side;
|
|
434
|
+
/**
|
|
435
|
+
* The alignment of the popup relative to the anchor.
|
|
436
|
+
*/
|
|
437
|
+
align: Align;
|
|
438
|
+
/**
|
|
439
|
+
* Whether the anchor element is hidden.
|
|
440
|
+
*/
|
|
441
|
+
anchorHidden: boolean;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* A portal element that moves the popup to a different part of the DOM.
|
|
446
|
+
* By default, the portal element is appended to `<body>`.
|
|
447
|
+
* Renders a `<div>` element.
|
|
448
|
+
*
|
|
449
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
450
|
+
*/
|
|
451
|
+
declare const NavigationMenuPortal: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPortalProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
452
|
+
|
|
453
|
+
declare namespace NavigationMenuPortal {
|
|
454
|
+
type State = NavigationMenuPortalState;
|
|
455
|
+
type Props = NavigationMenuPortalProps;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
declare interface NavigationMenuPortalProps extends FloatingPortal.Props<NavigationMenuPortalState> {
|
|
459
|
+
/**
|
|
460
|
+
* Whether to keep the portal mounted in the DOM while the popup is hidden.
|
|
461
|
+
* @default false
|
|
462
|
+
*/
|
|
463
|
+
keepMounted?: boolean | undefined;
|
|
464
|
+
/**
|
|
465
|
+
* A parent element to render the portal element into.
|
|
466
|
+
*/
|
|
467
|
+
container?: FloatingPortal.Props<NavigationMenuPortalState>['container'] | undefined;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
declare interface NavigationMenuPortalState {}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Positions the navigation menu against the currently active trigger.
|
|
474
|
+
* Renders a `<div>` element.
|
|
475
|
+
*
|
|
476
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
477
|
+
*/
|
|
478
|
+
declare const NavigationMenuPositioner: React_2.ForwardRefExoticComponent<Omit<NavigationMenuPositionerProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
479
|
+
|
|
480
|
+
declare namespace NavigationMenuPositioner {
|
|
481
|
+
type State = NavigationMenuPositionerState;
|
|
482
|
+
type Props = NavigationMenuPositionerProps;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
declare interface NavigationMenuPositionerProps extends UseAnchorPositioningSharedParameters, BaseUIComponentProps<'div', NavigationMenuPositionerState> {}
|
|
486
|
+
|
|
487
|
+
declare interface NavigationMenuPositionerState {
|
|
488
|
+
/**
|
|
489
|
+
* Whether the navigation menu is currently open.
|
|
490
|
+
*/
|
|
491
|
+
open: boolean;
|
|
492
|
+
/**
|
|
493
|
+
* The side of the anchor the component is placed on.
|
|
494
|
+
*/
|
|
495
|
+
side: Side;
|
|
496
|
+
/**
|
|
497
|
+
* The alignment of the component relative to the anchor.
|
|
498
|
+
*/
|
|
499
|
+
align: Align;
|
|
500
|
+
/**
|
|
501
|
+
* Whether the anchor element is hidden.
|
|
502
|
+
*/
|
|
503
|
+
anchorHidden: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* Whether CSS transitions should be disabled.
|
|
506
|
+
*/
|
|
507
|
+
instant: boolean;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Groups all parts of the navigation menu.
|
|
512
|
+
* Renders a `<nav>` element at the root, or `<div>` element when nested.
|
|
513
|
+
*
|
|
514
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
515
|
+
*/
|
|
516
|
+
declare const NavigationMenuRoot: {
|
|
517
|
+
<Value = any>(props: NavigationMenuRoot.Props<Value>): React_2.JSX.Element;
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
declare namespace NavigationMenuRoot {
|
|
521
|
+
type State = NavigationMenuRootState;
|
|
522
|
+
type Props<TValue = any> = NavigationMenuRootProps<TValue>;
|
|
523
|
+
type Value<TValue = any> = TValue | null;
|
|
524
|
+
type Actions = NavigationMenuRootActions;
|
|
525
|
+
type ChangeEventReason = NavigationMenuRootChangeEventReason;
|
|
526
|
+
type ChangeEventDetails = NavigationMenuRootChangeEventDetails;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
declare interface NavigationMenuRootActions {
|
|
530
|
+
unmount: () => void;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare type NavigationMenuRootChangeEventDetails = BaseUIChangeEventDetails<NavigationMenuRoot.ChangeEventReason>;
|
|
534
|
+
|
|
535
|
+
declare type NavigationMenuRootChangeEventReason = typeof REASONS.triggerPress | typeof REASONS.triggerHover | typeof REASONS.outsidePress | typeof REASONS.listNavigation | typeof REASONS.focusOut | typeof REASONS.escapeKey | typeof REASONS.linkPress | typeof REASONS.none;
|
|
536
|
+
|
|
537
|
+
declare interface NavigationMenuRootProps<Value = any> extends BaseUIComponentProps<'nav', NavigationMenuRootState> {
|
|
538
|
+
/**
|
|
539
|
+
* A ref to imperative actions.
|
|
540
|
+
*/
|
|
541
|
+
actionsRef?: React_2.RefObject<NavigationMenuRoot.Actions | null> | undefined;
|
|
542
|
+
/**
|
|
543
|
+
* Event handler called after any animations complete when the navigation menu is closed.
|
|
544
|
+
*/
|
|
545
|
+
onOpenChangeComplete?: ((open: boolean) => void) | undefined;
|
|
546
|
+
/**
|
|
547
|
+
* The controlled value of the navigation menu item that should be currently open.
|
|
548
|
+
* When non-nullish, the menu will be open. When nullish, the menu will be closed.
|
|
549
|
+
*
|
|
550
|
+
* To render an uncontrolled navigation menu, use the `defaultValue` prop instead.
|
|
551
|
+
* @default null
|
|
552
|
+
*/
|
|
553
|
+
value?: Value | null | undefined;
|
|
554
|
+
/**
|
|
555
|
+
* The uncontrolled value of the item that should be initially selected.
|
|
556
|
+
*
|
|
557
|
+
* To render a controlled navigation menu, use the `value` prop instead.
|
|
558
|
+
* @default null
|
|
559
|
+
*/
|
|
560
|
+
defaultValue?: Value | null | undefined;
|
|
561
|
+
/**
|
|
562
|
+
* Callback fired when the value changes.
|
|
563
|
+
*/
|
|
564
|
+
onValueChange?: ((value: Value | null, eventDetails: NavigationMenuRoot.ChangeEventDetails) => void) | undefined;
|
|
565
|
+
/**
|
|
566
|
+
* How long to wait before opening the navigation popup. Specified in milliseconds.
|
|
567
|
+
* @default 50
|
|
568
|
+
*/
|
|
569
|
+
delay?: number | undefined;
|
|
570
|
+
/**
|
|
571
|
+
* How long to wait before closing the navigation popup. Specified in milliseconds.
|
|
572
|
+
* @default 50
|
|
573
|
+
*/
|
|
574
|
+
closeDelay?: number | undefined;
|
|
575
|
+
/**
|
|
576
|
+
* The orientation of the navigation menu.
|
|
577
|
+
* @default 'horizontal'
|
|
578
|
+
*/
|
|
579
|
+
orientation?: 'horizontal' | 'vertical' | undefined;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
declare interface NavigationMenuRootState {
|
|
583
|
+
/**
|
|
584
|
+
* If `true`, the popup is open.
|
|
585
|
+
*/
|
|
586
|
+
open: boolean;
|
|
587
|
+
/**
|
|
588
|
+
* Whether the navigation menu is nested.
|
|
589
|
+
*/
|
|
590
|
+
nested: boolean;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Opens the navigation menu popup when hovered or clicked, revealing the
|
|
595
|
+
* associated content.
|
|
596
|
+
* Renders a `<button>` element.
|
|
597
|
+
*
|
|
598
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
599
|
+
*/
|
|
600
|
+
declare const NavigationMenuTrigger: React_2.ForwardRefExoticComponent<Omit<NavigationMenuTriggerProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
601
|
+
|
|
602
|
+
declare namespace NavigationMenuTrigger {
|
|
603
|
+
type State = NavigationMenuTriggerState;
|
|
604
|
+
type Props = NavigationMenuTriggerProps;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
declare interface NavigationMenuTriggerProps extends NativeButtonProps, BaseUIComponentProps<'button', NavigationMenuTriggerState> {}
|
|
608
|
+
|
|
609
|
+
declare interface NavigationMenuTriggerState {
|
|
610
|
+
/**
|
|
611
|
+
* If `true`, the popup is open and the item is active.
|
|
612
|
+
*/
|
|
613
|
+
open: boolean;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* The clipping viewport of the navigation menu's current content.
|
|
618
|
+
* Renders a `<div>` element.
|
|
619
|
+
*
|
|
620
|
+
* Documentation: [Base UI Navigation Menu](https://base-ui.com/react/components/navigation-menu)
|
|
621
|
+
*/
|
|
622
|
+
declare const NavigationMenuViewport: React_2.ForwardRefExoticComponent<Omit<NavigationMenuViewportProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
623
|
+
|
|
624
|
+
declare namespace NavigationMenuViewport {
|
|
625
|
+
type State = NavigationMenuViewportState;
|
|
626
|
+
type Props = NavigationMenuViewportProps;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
declare interface NavigationMenuViewportProps extends BaseUIComponentProps<'div', NavigationMenuViewportState> {}
|
|
630
|
+
|
|
631
|
+
declare interface NavigationMenuViewportState {}
|
|
632
|
+
|
|
633
|
+
declare const none: "none";
|
|
634
|
+
|
|
635
|
+
declare type OffsetFunction = (data: {
|
|
636
|
+
side: Side;
|
|
637
|
+
align: Align;
|
|
638
|
+
anchor: {
|
|
639
|
+
width: number;
|
|
640
|
+
height: number;
|
|
641
|
+
};
|
|
642
|
+
positioner: {
|
|
643
|
+
width: number;
|
|
644
|
+
height: number;
|
|
645
|
+
};
|
|
646
|
+
}) => number;
|
|
647
|
+
|
|
648
|
+
declare const outsidePress: "outside-press";
|
|
649
|
+
|
|
650
|
+
declare const pointer: "pointer";
|
|
651
|
+
|
|
652
|
+
declare namespace REASONS {
|
|
653
|
+
export {
|
|
654
|
+
none,
|
|
655
|
+
triggerPress,
|
|
656
|
+
triggerHover,
|
|
657
|
+
triggerFocus,
|
|
658
|
+
outsidePress,
|
|
659
|
+
itemPress,
|
|
660
|
+
closePress,
|
|
661
|
+
linkPress,
|
|
662
|
+
clearPress,
|
|
663
|
+
chipRemovePress,
|
|
664
|
+
trackPress,
|
|
665
|
+
incrementPress,
|
|
666
|
+
decrementPress,
|
|
667
|
+
inputChange,
|
|
668
|
+
inputClear,
|
|
669
|
+
inputBlur,
|
|
670
|
+
inputPaste,
|
|
671
|
+
inputPress,
|
|
672
|
+
focusOut,
|
|
673
|
+
escapeKey,
|
|
674
|
+
closeWatcher,
|
|
675
|
+
listNavigation,
|
|
676
|
+
keyboard,
|
|
677
|
+
pointer,
|
|
678
|
+
drag,
|
|
679
|
+
wheel,
|
|
680
|
+
scrub,
|
|
681
|
+
cancelOpen,
|
|
682
|
+
siblingOpen,
|
|
683
|
+
disabled,
|
|
684
|
+
missing,
|
|
685
|
+
initial,
|
|
686
|
+
imperativeAction,
|
|
687
|
+
swipe,
|
|
688
|
+
windowResize
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Maps a change `reason` string to the corresponding native event type.
|
|
694
|
+
*/
|
|
695
|
+
declare type ReasonToEvent<Reason extends string> = Reason extends keyof ReasonToEventMap ? ReasonToEventMap[Reason] : Event;
|
|
696
|
+
|
|
697
|
+
declare interface ReasonToEventMap {
|
|
698
|
+
[REASONS.none]: Event;
|
|
699
|
+
[REASONS.triggerPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
|
|
700
|
+
[REASONS.triggerHover]: MouseEvent;
|
|
701
|
+
[REASONS.triggerFocus]: FocusEvent;
|
|
702
|
+
[REASONS.outsidePress]: MouseEvent | PointerEvent | TouchEvent;
|
|
703
|
+
[REASONS.itemPress]: MouseEvent | KeyboardEvent | PointerEvent;
|
|
704
|
+
[REASONS.closePress]: MouseEvent | KeyboardEvent | PointerEvent;
|
|
705
|
+
[REASONS.linkPress]: MouseEvent | PointerEvent;
|
|
706
|
+
[REASONS.clearPress]: PointerEvent | MouseEvent | KeyboardEvent;
|
|
707
|
+
[REASONS.chipRemovePress]: PointerEvent | MouseEvent | KeyboardEvent;
|
|
708
|
+
[REASONS.trackPress]: PointerEvent | MouseEvent | TouchEvent;
|
|
709
|
+
[REASONS.incrementPress]: PointerEvent | MouseEvent | TouchEvent;
|
|
710
|
+
[REASONS.decrementPress]: PointerEvent | MouseEvent | TouchEvent;
|
|
711
|
+
[REASONS.inputChange]: InputEvent | Event;
|
|
712
|
+
[REASONS.inputClear]: InputEvent | FocusEvent | Event;
|
|
713
|
+
[REASONS.inputBlur]: FocusEvent;
|
|
714
|
+
[REASONS.inputPaste]: ClipboardEvent;
|
|
715
|
+
[REASONS.inputPress]: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
|
|
716
|
+
[REASONS.focusOut]: FocusEvent | KeyboardEvent;
|
|
717
|
+
[REASONS.escapeKey]: KeyboardEvent;
|
|
718
|
+
[REASONS.closeWatcher]: Event;
|
|
719
|
+
[REASONS.listNavigation]: KeyboardEvent;
|
|
720
|
+
[REASONS.keyboard]: KeyboardEvent;
|
|
721
|
+
[REASONS.pointer]: PointerEvent;
|
|
722
|
+
[REASONS.drag]: PointerEvent | TouchEvent;
|
|
723
|
+
[REASONS.swipe]: PointerEvent | TouchEvent;
|
|
724
|
+
[REASONS.wheel]: WheelEvent;
|
|
725
|
+
[REASONS.scrub]: PointerEvent;
|
|
726
|
+
[REASONS.cancelOpen]: MouseEvent;
|
|
727
|
+
[REASONS.siblingOpen]: Event;
|
|
728
|
+
[REASONS.disabled]: Event;
|
|
729
|
+
[REASONS.missing]: Event;
|
|
730
|
+
[REASONS.initial]: Event;
|
|
731
|
+
[REASONS.imperativeAction]: Event;
|
|
732
|
+
[REASONS.windowResize]: UIEvent;
|
|
733
|
+
}
|
|
734
|
+
|
|
24
735
|
declare function Root<Value = any>({ className, dir, separator, 'aria-label': ariaLabel, ...props }: WithStringClassName<NavigationMenu.Root.Props<Value>> & {
|
|
25
736
|
separator?: React_2.ReactNode;
|
|
26
737
|
}): JSX_2.Element;
|
|
27
738
|
|
|
739
|
+
declare const scrub: "scrub";
|
|
740
|
+
|
|
741
|
+
declare const siblingOpen: "sibling-open";
|
|
742
|
+
|
|
743
|
+
declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
|
|
744
|
+
|
|
745
|
+
declare interface SideFlipMode {
|
|
746
|
+
/**
|
|
747
|
+
* How to avoid collisions on the side axis.
|
|
748
|
+
* - `'flip'`: If there is not enough space, place the popup on the opposite side.
|
|
749
|
+
* - `'none'`: Keep the preferred side even if it overflows.
|
|
750
|
+
*/
|
|
751
|
+
side?: 'flip' | 'none' | undefined;
|
|
752
|
+
/**
|
|
753
|
+
* How to avoid collisions on the align axis.
|
|
754
|
+
* - `'flip'`: If there is not enough space, swap `'start'` and `'end'` alignment.
|
|
755
|
+
* - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
|
|
756
|
+
* - `'none'`: Keep the preferred alignment even if it overflows.
|
|
757
|
+
*/
|
|
758
|
+
align?: 'flip' | 'shift' | 'none' | undefined;
|
|
759
|
+
/**
|
|
760
|
+
* If both sides on the preferred axis do not fit, determines whether to fallback
|
|
761
|
+
* to a side on the perpendicular axis and which logical side to prefer.
|
|
762
|
+
* - `'start'`: Prefer the logical start side on the perpendicular axis.
|
|
763
|
+
* - `'end'`: Prefer the logical end side on the perpendicular axis.
|
|
764
|
+
* - `'none'`: Do not fallback to the perpendicular axis.
|
|
765
|
+
*/
|
|
766
|
+
fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
declare interface SideShiftMode {
|
|
770
|
+
/**
|
|
771
|
+
* How to avoid collisions on the side axis.
|
|
772
|
+
* - `'shift'`: Keep the preferred side and shift the popup to fit within the boundary.
|
|
773
|
+
* - `'none'`: Keep the preferred side even if it overflows.
|
|
774
|
+
*/
|
|
775
|
+
side?: 'shift' | 'none' | undefined;
|
|
776
|
+
/**
|
|
777
|
+
* How to avoid collisions on the align axis.
|
|
778
|
+
* - `'shift'`: Keep the alignment and shift the popup to fit within the boundary.
|
|
779
|
+
* - `'none'`: Keep the preferred alignment even if it overflows.
|
|
780
|
+
*/
|
|
781
|
+
align?: 'shift' | 'none' | undefined;
|
|
782
|
+
/**
|
|
783
|
+
* If both sides on the preferred axis do not fit, determines whether to fallback
|
|
784
|
+
* to a side on the perpendicular axis and which logical side to prefer.
|
|
785
|
+
* - `'start'`: Prefer the logical start side on the perpendicular axis.
|
|
786
|
+
* - `'end'`: Prefer the logical end side on the perpendicular axis.
|
|
787
|
+
* - `'none'`: Do not fallback to the perpendicular axis.
|
|
788
|
+
*/
|
|
789
|
+
fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
declare const swipe: "swipe";
|
|
793
|
+
|
|
794
|
+
declare const trackPress: "track-press";
|
|
795
|
+
|
|
796
|
+
declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
|
|
797
|
+
|
|
798
|
+
declare const triggerFocus: "trigger-focus";
|
|
799
|
+
|
|
800
|
+
declare const triggerHover: "trigger-hover";
|
|
801
|
+
|
|
802
|
+
declare const triggerPress: "trigger-press";
|
|
803
|
+
|
|
804
|
+
declare interface UseAnchorPositioningSharedParameters {
|
|
805
|
+
/**
|
|
806
|
+
* An element to position the popup against.
|
|
807
|
+
* By default, the popup will be positioned against the trigger.
|
|
808
|
+
*/
|
|
809
|
+
anchor?: Element | null | VirtualElement | React_2.RefObject<Element | null> | (() => Element | VirtualElement | null) | undefined;
|
|
810
|
+
/**
|
|
811
|
+
* Determines which CSS `position` property to use.
|
|
812
|
+
* @default 'absolute'
|
|
813
|
+
*/
|
|
814
|
+
positionMethod?: 'absolute' | 'fixed' | undefined;
|
|
815
|
+
/**
|
|
816
|
+
* Which side of the anchor element to align the popup against.
|
|
817
|
+
* May automatically change to avoid collisions.
|
|
818
|
+
* @default 'bottom'
|
|
819
|
+
*/
|
|
820
|
+
side?: Side | undefined;
|
|
821
|
+
/**
|
|
822
|
+
* Distance between the anchor and the popup in pixels.
|
|
823
|
+
* Also accepts a function that returns the distance to read the dimensions of the anchor
|
|
824
|
+
* and positioner elements, along with its side and alignment.
|
|
825
|
+
*
|
|
826
|
+
* The function takes a `data` object parameter with the following properties:
|
|
827
|
+
* - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
|
|
828
|
+
* - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
|
|
829
|
+
* - `data.side`: which side of the anchor element the positioner is aligned against.
|
|
830
|
+
* - `data.align`: how the positioner is aligned relative to the specified side.
|
|
831
|
+
*
|
|
832
|
+
* @example
|
|
833
|
+
* ```jsx
|
|
834
|
+
* <Positioner
|
|
835
|
+
* sideOffset={({ side, align, anchor, positioner }) => {
|
|
836
|
+
* return side === 'top' || side === 'bottom'
|
|
837
|
+
* ? anchor.height
|
|
838
|
+
* : anchor.width;
|
|
839
|
+
* }}
|
|
840
|
+
* />
|
|
841
|
+
* ```
|
|
842
|
+
*
|
|
843
|
+
* @default 0
|
|
844
|
+
*/
|
|
845
|
+
sideOffset?: number | OffsetFunction | undefined;
|
|
846
|
+
/**
|
|
847
|
+
* How to align the popup relative to the specified side.
|
|
848
|
+
* @default 'center'
|
|
849
|
+
*/
|
|
850
|
+
align?: Align | undefined;
|
|
851
|
+
/**
|
|
852
|
+
* Additional offset along the alignment axis in pixels.
|
|
853
|
+
* Also accepts a function that returns the offset to read the dimensions of the anchor
|
|
854
|
+
* and positioner elements, along with its side and alignment.
|
|
855
|
+
*
|
|
856
|
+
* The function takes a `data` object parameter with the following properties:
|
|
857
|
+
* - `data.anchor`: the dimensions of the anchor element with properties `width` and `height`.
|
|
858
|
+
* - `data.positioner`: the dimensions of the positioner element with properties `width` and `height`.
|
|
859
|
+
* - `data.side`: which side of the anchor element the positioner is aligned against.
|
|
860
|
+
* - `data.align`: how the positioner is aligned relative to the specified side.
|
|
861
|
+
*
|
|
862
|
+
* @example
|
|
863
|
+
* ```jsx
|
|
864
|
+
* <Positioner
|
|
865
|
+
* alignOffset={({ side, align, anchor, positioner }) => {
|
|
866
|
+
* return side === 'top' || side === 'bottom'
|
|
867
|
+
* ? anchor.width
|
|
868
|
+
* : anchor.height;
|
|
869
|
+
* }}
|
|
870
|
+
* />
|
|
871
|
+
* ```
|
|
872
|
+
*
|
|
873
|
+
* @default 0
|
|
874
|
+
*/
|
|
875
|
+
alignOffset?: number | OffsetFunction | undefined;
|
|
876
|
+
/**
|
|
877
|
+
* An element or a rectangle that delimits the area that the popup is confined to.
|
|
878
|
+
* @default 'clipping-ancestors'
|
|
879
|
+
*/
|
|
880
|
+
collisionBoundary?: Boundary | undefined;
|
|
881
|
+
/**
|
|
882
|
+
* Additional space to maintain from the edge of the collision boundary.
|
|
883
|
+
* @default 5
|
|
884
|
+
*/
|
|
885
|
+
collisionPadding?: Padding | undefined;
|
|
886
|
+
/**
|
|
887
|
+
* Whether to maintain the popup in the viewport after
|
|
888
|
+
* the anchor element was scrolled out of view.
|
|
889
|
+
* @default false
|
|
890
|
+
*/
|
|
891
|
+
sticky?: boolean | undefined;
|
|
892
|
+
/**
|
|
893
|
+
* Minimum distance to maintain between the arrow and the edges of the popup.
|
|
894
|
+
*
|
|
895
|
+
* Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
|
|
896
|
+
* @default 5
|
|
897
|
+
*/
|
|
898
|
+
arrowPadding?: number | undefined;
|
|
899
|
+
/**
|
|
900
|
+
* Whether to disable the popup from tracking any layout shift of its positioning anchor.
|
|
901
|
+
* @default false
|
|
902
|
+
*/
|
|
903
|
+
disableAnchorTracking?: boolean | undefined;
|
|
904
|
+
/**
|
|
905
|
+
* Determines how to handle collisions when positioning the popup.
|
|
906
|
+
*
|
|
907
|
+
* `side` controls overflow on the preferred placement axis (`top`/`bottom` or `left`/`right`):
|
|
908
|
+
* - `'flip'`: keep the requested side when it fits; otherwise try the opposite side
|
|
909
|
+
* (`top` and `bottom`, or `left` and `right`).
|
|
910
|
+
* - `'shift'`: never change side; keep the requested side and move the popup within
|
|
911
|
+
* the clipping boundary so it stays visible.
|
|
912
|
+
* - `'none'`: do not correct side-axis overflow.
|
|
913
|
+
*
|
|
914
|
+
* `align` controls overflow on the alignment axis (`start`/`center`/`end`):
|
|
915
|
+
* - `'flip'`: keep side, but swap `start` and `end` when the requested alignment overflows.
|
|
916
|
+
* - `'shift'`: keep side and requested alignment, then nudge the popup along the
|
|
917
|
+
* alignment axis to fit.
|
|
918
|
+
* - `'none'`: do not correct alignment-axis overflow.
|
|
919
|
+
*
|
|
920
|
+
* `fallbackAxisSide` controls fallback behavior on the perpendicular axis when the
|
|
921
|
+
* preferred axis cannot fit:
|
|
922
|
+
* - `'start'`: allow perpendicular fallback and try the logical start side first
|
|
923
|
+
* (`top` before `bottom`, or `left` before `right` in LTR).
|
|
924
|
+
* - `'end'`: allow perpendicular fallback and try the logical end side first
|
|
925
|
+
* (`bottom` before `top`, or `right` before `left` in LTR).
|
|
926
|
+
* - `'none'`: do not fallback to the perpendicular axis.
|
|
927
|
+
*
|
|
928
|
+
* When `side` is `'shift'`, explicitly setting `align` only supports `'shift'` or `'none'`.
|
|
929
|
+
* If `align` is omitted, it defaults to `'flip'`.
|
|
930
|
+
*
|
|
931
|
+
* @example
|
|
932
|
+
* ```jsx
|
|
933
|
+
* <Positioner
|
|
934
|
+
* collisionAvoidance={{
|
|
935
|
+
* side: 'shift',
|
|
936
|
+
* align: 'shift',
|
|
937
|
+
* fallbackAxisSide: 'none',
|
|
938
|
+
* }}
|
|
939
|
+
* />
|
|
940
|
+
* ```
|
|
941
|
+
*
|
|
942
|
+
*/
|
|
943
|
+
collisionAvoidance?: CollisionAvoidance | undefined;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
declare interface UseFloatingPortalNodeProps {
|
|
947
|
+
ref?: React_2.Ref<HTMLDivElement> | undefined;
|
|
948
|
+
container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
|
|
949
|
+
componentProps?: UseRenderElementComponentProps<any> | undefined;
|
|
950
|
+
elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
declare interface UseRenderElementComponentProps<State> {
|
|
954
|
+
/**
|
|
955
|
+
* The class name to apply to the rendered element.
|
|
956
|
+
* Can be a string or a function that accepts the state and returns a string.
|
|
957
|
+
*/
|
|
958
|
+
className?: string | ((state: State) => string | undefined) | undefined;
|
|
959
|
+
/**
|
|
960
|
+
* The render prop or React element to override the default element.
|
|
961
|
+
*/
|
|
962
|
+
render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
|
|
963
|
+
/**
|
|
964
|
+
* The style to apply to the rendered element.
|
|
965
|
+
* Can be a style object or a function that accepts the state and returns a style object.
|
|
966
|
+
*/
|
|
967
|
+
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
declare const wheel: "wheel";
|
|
971
|
+
|
|
972
|
+
declare const windowResize: "window-resize";
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* Adds a `preventBaseUIHandler` method to all event handlers.
|
|
976
|
+
*/
|
|
977
|
+
declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K]> };
|
|
978
|
+
|
|
979
|
+
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;
|
|
980
|
+
|
|
28
981
|
declare type WithStringClassName<P> = Omit<P, 'className'> & {
|
|
29
982
|
className?: string;
|
|
30
983
|
};
|